window.__require = function t(e, i, o) {
function n(s, a) {
if (!i[s]) {
if (!e[s]) {
var c = s.split("/");
c = c[c.length - 1];
if (!e[c]) {
var l = "function" == typeof __require && __require;
if (!a && l) return l(c, !0);
if (r) return r(c, !0);
throw new Error("Cannot find module '" + s + "'");
}
s = c;
}
var d = i[s] = {
exports: {}
};
e[s][0].call(d.exports, function(t) {
return n(e[s][1][t] || t);
}, d, d.exports, t, e, i, o);
}
return i[s].exports;
}
for (var r = "function" == typeof __require && __require, s = 0; s < o.length; s++) n(o[s]);
return n;
}({
AchievData: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "ee4e4AUWeVIxqo3tN5wHyaz", "AchievData");
var o = this && this.__values || function(t) {
var e = "function" == typeof Symbol && Symbol.iterator, i = e && t[e], o = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length) return {
next: function() {
t && o >= t.length && (t = void 0);
return {
value: t && t[o++],
done: !t
};
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(i, "__esModule", {
value: !0
});
i.AchievConfig = i.Achiev = void 0;
var n = t("../../../../framework/core/event/EventDispatcher"), r = t("../../../../framework/main/Constants"), s = t("../../../../framework/manager/ResMgr"), a = t("../../../../framework/utils/Tools"), c = function() {
this.id = 0;
this.name = "";
this.order = 0;
this.rate = 0;
this.complete = !1;
this.awarded = !1;
};
i.Achiev = c;
i.AchievConfig = function() {
this.id = 0;
this.name = "";
this.icon = "";
this.order = 0;
this.desc = "";
this.onditions = "";
this.total = 0;
this.propID = 0;
this.times = 1;
};
var l = r.default.OPEN_ACHIEV ? "WB2_ACHIEVE_KEY" : "WB2_ACHIEVE_KEY_TEMP", d = function() {
function t() {
this.config = {};
this._achievList = {};
this.dispatcher = new n.default();
this.eventName = "AchievementEvent";
this.needSave = !1;
}
t.prototype.loadConfig = function() {
s.default.loadRes("res/config/achievCfg", cc.JsonAsset).then(function(t) {
for (var e in t.json) if (Object.prototype.hasOwnProperty.call(t.json, e)) {
var i = t.json[e];
this.config[i.id] = i;
this._achievList[i.id] = a.default.fromJson(i, new c());
}
this.load();
}.bind(this));
};
t.prototype.load = function() {
var t = cc.sys.localStorage.getItem(l);
if (t) {
var e = JSON.parse(t);
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (this._achievList[i] = e[i]);
} else this.save();
setInterval(function() {
if (this.needSave) {
cc.sys.localStorage.setItem(l, JSON.stringify(this._achievList));
this.needSave = !1;
}
}.bind(this), 1e3);
};
t.prototype.save = function() {
(r.default.IS_LOCAL || r.default.OPEN_ACHIEV) && (this.needSave = !0);
};
t.prototype.getAchievCount = function() {
return Object.keys(this._achievList).length;
};
t.prototype.getCompleteCount = function() {
return this.getCompleteList(!0).length + this.getCompleteList(!1).length;
};
t.prototype.getAchievByID = function(t) {
return this._achievList[t.toString()];
};
t.prototype.getConfigByID = function(t) {
return this.config[t.toString()];
};
t.prototype.getRecommendedList = function() {
var t, e, i = Object.values(this._achievList);
i.sort(function(t, e) {
return t.order - e.order;
});
var n = this.getCompleteList(!1), r = 0;
try {
for (var s = o(i), a = s.next(); !a.done; a = s.next()) {
var c = a.value;
if (!c.complete) {
n.push(c);
r++;
}
if (r >= 5) break;
}
} catch (e) {
t = {
error: e
};
} finally {
try {
a && !a.done && (e = s.return) && e.call(s);
} finally {
if (t) throw t.error;
}
}
return n;
};
t.prototype.getAchievingList = function() {
var t, e, i = Object.values(this._achievList);
i.sort(function(t, e) {
return t.order - e.order;
});
var n = this.getCompleteList(!1);
try {
for (var r = o(i), s = r.next(); !s.done; s = r.next()) {
var a = s.value;
a.complete || n.push(a);
}
} catch (e) {
t = {
error: e
};
} finally {
try {
s && !s.done && (e = r.return) && e.call(r);
} finally {
if (t) throw t.error;
}
}
return n;
};
t.prototype.getCompleteList = function(t) {
var e, i, n = [], r = Object.values(this._achievList);
r.sort(function(t, e) {
return t.order - e.order;
});
try {
for (var s = o(r), a = s.next(); !a.done; a = s.next()) {
var c = a.value;
(t ? c.complete && c.awarded : c.complete && !c.awarded) && n.push(c);
}
} catch (t) {
e = {
error: t
};
} finally {
try {
a && !a.done && (i = s.return) && i.call(s);
} finally {
if (e) throw e.error;
}
}
return n;
};
t.prototype.update = function(t, e, i) {
void 0 === e && (e = 1);
void 0 === i && (i = !1);
if (r.default.IS_LOCAL || r.default.OPEN_ACHIEV) {
var o = this.getAchievByID(t), n = this.getConfigByID(t);
if (!o.complete) {
var s = o.rate;
o.rate = i ? e : o.rate + e;
if (o.rate >= n.total) {
o.rate = n.total;
o.complete = !0;
this.dispatcher.emit(this.eventName, o);
}
s != o.rate && this.save();
return s != o.rate;
}
}
return !1;
};
t.prototype.award = function(t) {
var e = this.getAchievByID(t);
if (e.complete && !e.awarded) {
e.awarded = !0;
this.save();
this.dispatcher.emit(this.eventName, e);
return !0;
}
return !1;
};
t.prototype.isComplete = function(t) {
return this.getAchievByID(t).complete;
};
t.inst = new t();
return t;
}();
i.default = d.inst;
cc._RF.pop();
}, {
"../../../../framework/core/event/EventDispatcher": void 0,
"../../../../framework/main/Constants": void 0,
"../../../../framework/manager/ResMgr": void 0,
"../../../../framework/utils/Tools": void 0
} ],
AdDeclare: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "7f260bNqPxAjqtZiglZIv2h", "AdDeclare");
Object.defineProperty(i, "__esModule", {
value: !0
});
i.BannerType = i.AdInitConfig = i.AdResultState = i.NativeAdItemModel = i.PlatformName = void 0;
var o;
(function(t) {
t.OPPO = "OPPO";
t.QQ = "QQ";
t.TT = "tt";
t.VIVO = "vivo";
t.WeChat = "WeChat";
t.HuaWei = "HuaWei";
t.BaiDu = "BaiDu";
t.XiaoMi = "XiaoMi";
t.KuaiShou = "KuaiShou";
t.JSB_OPPO = "JSB_OPPO";
t.JSB_VIVO = "JSB_VIVO";
t.JSB_HUAWEI = "JSB_HUAWEI";
t.JSB_XIAOMI = "JSB_XIAOMI";
t.JSB_MMY = "JSB_MMY";
t.JSB_233 = "JSB_233";
t.JSB_IOS = "JSB_IOS";
t.Dummy = "Dummy";
})(o = i.PlatformName || (i.PlatformName = {}));
var n = function() {
function t(t) {
this.adId = "";
this.adPositionId = "";
this.title = "";
this.source = "";
this.desc = "";
this.iconUrl = "";
this.imgUrlList = [];
this.logoUrl = "";
this.clickBtnTxt = "";
this.adPositionId = t;
}
t.prototype.init = function(t) {
this.adId = t.adId;
this.title = t.title;
this.desc = t.desc;
this.source = t.source ? t.source : "";
this.iconUrl = t.icon;
this.imgUrlList = t.imgUrlList;
this.logoUrl = t.logoUrl;
this.clickBtnTxt = t.clickBtnTxt;
this.creativeType = t.creativeType;
this.interactionType = t.interactionType;
};
return t;
}();
i.NativeAdItemModel = n;
(function(t) {
t[t.ON_CLOSE_CANCEL = 0] = "ON_CLOSE_CANCEL";
t[t.ON_CLOSE_FINISH = 1] = "ON_CLOSE_FINISH";
t[t.ON_ERROR = 2] = "ON_ERROR";
t[t.INTERNAL_ERROR = 3] = "INTERNAL_ERROR";
})(i.AdResultState || (i.AdResultState = {}));
i.AdInitConfig = function() {
this.platformName = o.Dummy;
this.gameId = "";
this.adSid = "";
this.bannerAdId = [];
this.customAdId = [];
this.boxBannerAdId = [];
this.interstitialAdId = [];
this.nativeAdId = [];
this.rewardedVideoAdId = [];
this.appBoxAdId = [];
};
(function(t) {
t[t.NORMAL = 0] = "NORMAL";
t[t.BOX = 1] = "BOX";
t[t.NATIVE = 2] = "NATIVE";
})(i.BannerType || (i.BannerType = {}));
cc._RF.pop();
}, {} ],
AdTools: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "cf304OUV6dOLYEmliTKweOr", "AdTools");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = function() {
function t() {}
t.getSDKVersion = function(t) {
var e = t.getSystemInfoSync().SDKVersion;
e = e.replace(/\./g, "");
return parseInt(e);
};
t.checkImageUrl = function(e, i) {
var o;
o = i ? e.iconUrl || e.imgUrlList.find(function(t) {
return t && "" != t ? t : null;
}) : e.imgUrlList.find(function(t) {
return t && "" != t ? t : null;
}) || e.iconUrl;
return t.checkUrl(o);
};
t.checkUrl = function(t) {
if (!t) return "";
var e = t.indexOf(".jpg"), i = t.indexOf(".png"), o = t;
-1 != e && (o = t.substring(0, e) + ".jpg");
-1 != i && (o = t.substring(0, i) + ".png");
return o;
};
return t;
}();
i.default = o;
cc._RF.pop();
}, {} ],
AdsManager: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "aaeb6HdosVPC6s4qxznwc6p", "AdsManager");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../../../../framework/main/Constants"), n = t("../../../../framework/utils/Log"), r = t("../../../../framework/utils/PlatformUtils"), s = t("../../../../framework/utils/UiUtil"), a = t("../../../../start/src/ShuFenReport"), c = t("../GameCommon"), l = t("../MsgCache"), d = t("./sdk/AdDeclare"), h = t("./sdk/GameTdd"), u = t("./sdk/PlatformAd"), p = t("./sdk/PlatformShare"), f = t("./view/NativeBanner"), _ = t("./view/NativeInterstitialAd"), m = function() {
function t() {
this.config = new d.AdInitConfig();
this.title = "当一回上帝";
this.desc = "是创造还是毁灭？";
this.interval_banner = -1;
this.interval_custom = -1;
this.btnClub = null;
this.nativeBanner = null;
this.bannerType = d.BannerType.NORMAL;
this.adIdx = 1;
this.videoShow = !0;
}
t.prototype.init = function() {
if (JSB_OPPO) {
this.config.gameId = "61d51baed7fc62473c827e2b";
this.config.platformName = d.PlatformName.JSB_OPPO;
this.config.rewardedVideoAdId = [ "434277" ];
this.config.nativeAdId = [ "434284", "434280" ];
} else if (JSB_VIVO) {
this.config.gameId = "61d51bbcd7fc62473c827e2d";
this.config.platformName = d.PlatformName.JSB_VIVO;
this.config.bannerAdId = [ "0e423c1cb7784a82a95db4292e2790c6" ];
this.config.rewardedVideoAdId = [ "98a7890f572c42b3aa5860907a7d4593" ];
this.config.interstitialAdId = [ "0e88186b8d6d44ff895bbe22f98bb5c9" ];
} else if (JSB_HUAWEI) {
this.config.gameId = "621342594c28c7097509c36c";
this.config.platformName = d.PlatformName.JSB_HUAWEI;
this.config.bannerAdId = [ "b4ipqsridd" ];
this.config.rewardedVideoAdId = [ "c33hk08k78" ];
this.config.interstitialAdId = [ "t6zpvk22d5" ];
} else if (JSB_233) {
this.config.gameId = "6204f4614c28c7097509ae0d";
this.config.platformName = d.PlatformName.JSB_233;
this.config.rewardedVideoAdId = [ "999000000", "999000001" ];
this.config.interstitialAdId = [ "999000003" ];
} else if (JSB_MMY) {
this.config.gameId = "";
this.config.platformName = d.PlatformName.JSB_MMY;
this.config.bannerAdId = [ "947670533" ];
this.config.rewardedVideoAdId = [ "947670580" ];
this.config.interstitialAdId = [ "947670873" ];
} else if (JSB_XIAOMI) {
this.config.gameId = "";
this.config.platformName = d.PlatformName.JSB_XIAOMI;
this.config.bannerAdId = [ "a5041909595b6f5b911e2cef754fb393" ];
this.config.rewardedVideoAdId = [ "3aa4eb41b05f0d615bb865bddf9e52fe" ];
this.config.interstitialAdId = [ "c87454af6a437d489db474500d60c480" ];
} else if (JSB_IOS) {
this.config.gameId = "";
this.config.platformName = d.PlatformName.JSB_IOS;
this.config.bannerAdId = [ "947742564" ];
this.config.rewardedVideoAdId = [ "947670867" ];
this.config.interstitialAdId = [ "947670871" ];
}
u.default.initAd(this.config);
};
t.prototype.setPause = function(t) {
if (t) {
cc.director.pause();
cc.audioEngine.pauseAll();
} else {
cc.director.resume();
cc.audioEngine.resumeAll();
}
};
t.prototype.isServerDataReady = function() {
return u.default.isServerDataReady();
};
t.prototype.getGameCustomData = function() {
return u.default.getCustomData();
};
t.prototype.getGameAdvertData = function() {
return u.default.getAdvertData();
};
t.prototype.reportNativeAdShow = function(t) {
u.default.reportNativeAdShow(t);
};
t.prototype.reportNativeAdClick = function(t) {
u.default.reportNativeAdClick(t);
};
t.prototype.showBannerAd = function() {
o.default.IS_AD_SHOW && !o.default.IS_LOCAL && (JSB_VIVO || JSB_MMY || JSB_IOS || JSB_HUAWEI || JSB_XIAOMI ? r.default.requestChannel("AdsUtil", "showBannerAD", this.config.bannerAdId[0]) : JSB_OPPO && r.default.requestChannel("AdsUtil", "showNativeBannerAd", this.config.nativeAdId[0], function() {}));
};
t.prototype.hideBannerAd = function(t) {
void 0 === t && (t = !0);
o.default.IS_AD_SHOW && !o.default.IS_LOCAL && (JSB_VIVO || JSB_OPPO || JSB_MMY || JSB_IOS || JSB_HUAWEI || JSB_XIAOMI) && r.default.requestChannel("AdsUtil", "hideBannerAD");
};
t.prototype.moveBanner = function(t) {
void 0 === t && (t = 0);
o.default.IS_AD_SHOW && !o.default.IS_LOCAL && cc.sys.platform == cc.sys.WECHAT_GAME && u.default.moveBannerAd(t);
};
t.prototype.showNativeBannerAd = function() {
var t = this;
if (cc.isValid(this.nativeBanner, !0)) {
this.nativeBanner.active = !0;
cc.director.emit("bannerResize", 115);
} else this.refreshNativeBannerAd();
var e = h.default.success ? h.default.getData("p3", h.v_type.NumberList)[0] : 45;
-1 == this.interval_banner && (this.interval_banner = setInterval(function() {
t.refreshNativeBannerAd();
}, 1e3 * e));
};
t.prototype.hideNativeBannerAd = function() {
cc.isValid(this.nativeBanner, !0) && (this.nativeBanner.active = !1);
};
t.prototype.refreshNativeBannerAd = function() {
var t = this, e = function() {
var e = OPPO_GAME ? t.config.nativeAdId[t.adIdx] : "";
t.adIdx++;
t.adIdx >= t.config.nativeAdId.length && (t.adIdx = 1);
return e;
}, i = e(), o = function(e) {
n.default.v("NativeAdData:", e);
s.UiUtil.openModule("res/prefab/advert/NativeBanner").then(function(i) {
t.nativeBanner = i;
i.getComponent(f.default).show(e);
});
}, r = u.default.getNativeAdData(i);
r ? c.default.isPaused || o(r) : u.default.preloadNativeAd(i, function() {
var t = u.default.getNativeAdData(i);
t && o(t);
u.default.preloadNativeAd(e());
});
};
t.prototype.showAppBoxAd = function(t) {
if (o.default.IS_AD_SHOW && !o.default.IS_LOCAL) if (QQ_GAME || OPPO_GAME) {
cc.audioEngine.pauseAll();
cc.game.pause();
u.default.showAppBoxAd(function() {
cc.game.resume();
cc.audioEngine.resumeAll();
t();
});
} else t(); else t();
};
t.prototype.showVideoAds = function(t, e) {
var i = this;
void 0 === e && (e = !0);
if (this.videoShow) if (o.default.IS_AD_SHOW && !o.default.IS_LOCAL) {
if (JSB_VIVO || JSB_OPPO || JSB_MMY || JSB_IOS || JSB_HUAWEI || JSB_XIAOMI) {
this.setPause(!0);
r.default.requestChannel("AdsUtil", "showVideoAd", this.config.rewardedVideoAdId[0], function(e) {
i.setPause(!1);
"1" == e && cc.director.emit("updateVideoCount");
t && t(e);
});
} else if (JSB_233) {
this.setPause(!0);
var n = e ? this.config.rewardedVideoAdId[0] : this.config.rewardedVideoAdId[1];
r.default.requestChannel("AdsUtil", "showVideoAd", n, function(e) {
i.setPause(!1);
"1" == e && cc.director.emit("updateVideoCount");
t && t(e);
});
} else {
t && t(0);
a.default.reportCustom("videoFaild");
}
this.videoShow = !1;
setTimeout(function() {
i.videoShow = !0;
}, 3e3);
} else {
cc.director.emit("updateVideoCount");
t && t(1);
} else l.default.pushToast("广告加载中");
};
t.prototype.showInterstitialAd = function(t) {
var e = this;
if (o.default.IS_AD_SHOW && !o.default.IS_LOCAL) if (JSB_VIVO || JSB_233 || JSB_MMY || JSB_HUAWEI || JSB_XIAOMI) {
this.setPause(!0);
r.default.requestChannel("AdsUtil", "showInterstitialAd", this.config.interstitialAdId[0], function(i) {
e.setPause(!1);
t && t(i);
});
} else JSB_OPPO ? r.default.requestChannel("AdsUtil", "showNativeInterstitialAd", this.config.nativeAdId[1], function(e) {
t && t(e);
}) : t && t(0); else t && t(0);
};
t.prototype.showNativeInterstitialAd = function(t) {
u.default.fetchNativeAdData(function(e) {
n.default.v("NativeAdData:", e);
e ? s.UiUtil.openModule("res/prefab/advert/NativeInterstitialAd", cc.director.getScene()).then(function(i) {
i.position = cc.v3(cc.winSize.width / 2, cc.winSize.height / 2);
i.getComponent(_.default).show(e, t);
}) : t(0);
});
};
t.prototype.preloadNativeAd = function() {
var t = OPPO_GAME ? this.config.nativeAdId[0] : "";
u.default.preloadNativeAd(t);
};
t.prototype.getNativeAdData = function() {
var t = OPPO_GAME ? this.config.nativeAdId[0] : "";
return u.default.getNativeAdData(t);
};
t.prototype.showCustomAd = function(t) {
var e = this;
if (o.default.IS_AD_SHOW && !o.default.IS_LOCAL && cc.sys.platform == cc.sys.WECHAT_GAME) {
var i = cc.view.getFrameSize();
t.x = i.width * t.x - 30;
t.y = i.height * t.y - 40;
var n = QQ_GAME ? this.config.boxBannerAdId[0] : "";
u.default.showCustomAd(t, n);
-1 == this.interval_custom && (this.interval_custom = setInterval(function() {
u.default.hideCustomAd();
e.showCustomAd(t);
}, 12e4));
}
};
t.prototype.hideCustomAd = function() {
if (o.default.IS_AD_SHOW && !o.default.IS_LOCAL && cc.sys.platform == cc.sys.WECHAT_GAME) {
if (-1 != this.interval_custom) {
clearInterval(this.interval_custom);
this.interval_custom = -1;
}
u.default.hideCustomAd();
}
};
t.prototype.showClubButton = function(t, e) {
if (o.default.IS_AD_SHOW && !o.default.IS_LOCAL && WECHAT_GAME) if (t) {
var i = cc.view.getFrameSize();
this.btnClub || (this.btnClub = wx.createGameClubButton({
icon: "light",
style: {
left: i.width * e.x - 20,
top: i.height * e.y - 20,
width: 40,
height: 40
}
}));
this.btnClub.show();
} else this.btnClub && this.btnClub.hide();
};
t.prototype.startRecording = function(t, e) {
void 0 === e && (e = 300);
o.default.IS_AD_SHOW && !o.default.IS_LOCAL && u.default.supportScreenRecording();
};
t.prototype.isRecording = function() {
return u.default.isRecording();
};
t.prototype.getRecordedVideoPath = function() {
return u.default.getRecordedVideoPath();
};
t.prototype.stopRecording = function(t) {
void 0 === t && (t = 30);
o.default.IS_AD_SHOW && !o.default.IS_LOCAL && u.default.supportScreenRecording();
};
t.prototype.shareAppMessage = function() {
o.default.IS_AD_SHOW && !o.default.IS_LOCAL && p.default.supportShareAppMessage();
};
t.prototype.shareVideo = function() {
o.default.IS_AD_SHOW && !o.default.IS_LOCAL && p.default.supportShareVideo();
};
t.prototype.showShareMenu = function() {
p.default.supportShowShareMenu() && p.default.showShareMenu();
};
t.prototype.hideShareMenu = function() {
p.default.supportShowShareMenu() && p.default.hideShareMenu();
};
t.prototype.checkImageUrl = function(t) {
var e = t.iconUrl;
if (e) return this.checkUrl(e);
e = t.imgUrlList.find(function(t) {
return t && "" != t ? t : null;
});
return this.checkUrl(e);
};
t.prototype.checkUrl = function(t) {
if (!t) return "";
var e = t.indexOf(".jpg"), i = t.indexOf(".png"), o = "";
-1 != e && (o = t.substring(0, e) + ".jpg");
-1 != i && (o = t.substring(0, i) + ".png");
o || (o = t + ".jpg");
return o;
};
t.inst = new t();
t.callbacks = {};
return t;
}();
i.default = m.inst;
cc._RF.pop();
}, {
"../../../../framework/main/Constants": void 0,
"../../../../framework/utils/Log": void 0,
"../../../../framework/utils/PlatformUtils": void 0,
"../../../../framework/utils/UiUtil": void 0,
"../../../../start/src/ShuFenReport": void 0,
"../GameCommon": "GameCommon",
"../MsgCache": "MsgCache",
"./sdk/AdDeclare": "AdDeclare",
"./sdk/GameTdd": "GameTdd",
"./sdk/PlatformAd": "PlatformAd",
"./sdk/PlatformShare": "PlatformShare",
"./view/NativeBanner": "NativeBanner",
"./view/NativeInterstitialAd": "NativeInterstitialAd"
} ],
AppBoxAdModule: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "84775HjIShG0ZUbuMGSsnAP", "AppBoxAdModule");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../AdDeclare"), n = function() {
function t() {
this.adPositionId = "";
this.adObj = null;
this.adResultCallback = null;
}
t.prototype.showAd = function(t, e) {
var i = this;
this.adResultCallback = t;
this.adPositionId = e;
window.qq ? this.adObj = qq.createAppBox && qq.createAppBox({
adUnitId: this.adPositionId
}) : window.qg && (this.adObj = qg.createGamePortalAd && qg.createGamePortalAd({
adUnitId: this.adPositionId
}));
this.adObj && this.adObj.onClose && this.adObj.onClose(this.onClose_.bind(this));
this.adObj.load().then(function() {
i.adObj.show();
});
};
t.prototype.onLoad_ = function() {
window.qg || this.adObj.show();
console.log("AppBoxAd onLoad");
};
t.prototype.onError_ = function(t) {
console.log("AppBoxAd onError:", t ? JSON.stringify(t) : t);
};
t.prototype.onClose_ = function() {
console.log("AppBoxAd onClose");
if (this.adResultCallback) {
this.adResultCallback(o.AdResultState.ON_CLOSE_FINISH);
this.adResultCallback = null;
}
};
t.inst = new t();
return t;
}();
i.default = n.inst;
cc._RF.pop();
}, {
"../AdDeclare": "AdDeclare"
} ],
BannerAdModule: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "f5c90jIBFtET6QHr7W3PWWH", "BannerAdModule");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../GameTdd"), n = function() {
function t() {
this.adPositionId = "";
this.appSid = "";
this.adObj = null;
this.loaded = !1;
this.top = 0;
this.realSize = cc.Size.ZERO;
this.createTime = 0;
this.adIntervals = 0;
this.isShow = !1;
this.isHide = !1;
}
t.prototype.showAd = function(t, e) {
void 0 === e && (e = "");
this.adPositionId = t;
this.appSid = e;
this.adIntervals = o.default.success ? o.default.getData("p3", o.v_type.NumberList)[0] : HUAWEI_GAME ? 60 : 30;
0 == this.createTime && (this.createTime = cc.sys.now() / 1e3);
if (this.adObj) {
var i = cc.sys.now() / 1e3 - this.createTime;
cc.sys.platform == cc.sys.WECHAT_GAME && i < 90 ? this.show_(!1) : this.create_();
} else this.create_();
};
t.prototype.create_ = function() {
this.adObj && this.closeAd();
console.log("BannerAd create: ", this.adPositionId);
var t = null === PLATFORM || void 0 === PLATFORM ? void 0 : PLATFORM.getSystemInfoSync(), e = WECHAT_GAME || BAIDU_GAME ? 300 : t.windowWidth;
HUAWEI_GAME && (e = 360);
var i = HUAWEI_GAME ? 57 : 115, o = HUAWEI_GAME ? t.safeArea.width / e : 1;
this.adObj = (null === PLATFORM || void 0 === PLATFORM ? void 0 : PLATFORM.createBannerAd) && PLATFORM.createBannerAd({
adUnitId: this.adPositionId,
appSid: this.appSid,
posId: this.adPositionId,
adIntervals: this.adIntervals,
style: VIVO_GAME || OPPO_GAME ? {} : {
left: BAIDU_GAME ? (t.windowWidth - e) / 2 : 0,
top: HUAWEI_GAME ? t.safeArea.bottom - i * o : t.windowHeight - i,
height: i,
width: e
}
});
if (this.adObj) {
this.adObj.onLoad && this.adObj.onLoad(this.onLoad_.bind(this));
this.adObj.onError && this.adObj.onError(this.onError_.bind(this));
this.adObj.onResize && this.adObj.onResize(this.onResize_.bind(this));
window.qg && this.show_(!0);
}
};
t.prototype.show_ = function(t) {
var e = this;
console.log("showBannerAd: ", this.adPositionId);
HUAWEI_GAME ? this.adObj.show() : this.isShow ? t || this.moveAd() : this.adObj.show().then(function() {
e.isShow = !0;
console.log("BannerAd show success2");
0 != e.realSize.height && cc.director.emit("bannerResize", e.realSize.height);
}).catch(function(t) {
e.create_();
console.log("BannerAd show failed2", t);
});
};
t.prototype.onLoad_ = function() {
this.loaded = !0;
console.log("BannerAd onLoad");
window.qg || this.show_(!0);
};
t.prototype.onError_ = function(t) {
this.closeAd();
console.log("BannerAd onError:", t ? JSON.stringify(t) : t);
};
t.prototype.onResize_ = function(t) {
console.log("BannerAd onResize", t);
if (this.adObj && 0 != t.width && 0 != t.height) {
var e = window.swan || window.tt || window.qq || window.wx;
if (e) {
var i = e.getSystemInfoSync();
console.log(t.width, t.height);
if (!this.isHide) {
this.adObj.style.top = i.windowHeight - t.height;
this.adObj.style.left = (i.windowWidth - t.width) / 2;
}
}
var o = WECHAT_GAME || BAIDU_GAME ? t.height : 114;
this.realSize = cc.size(t.width, o);
cc.director.emit("bannerResize", o);
}
};
t.prototype.moveAd = function(t) {
void 0 === t && (t = 0);
this.top = t;
this.isHide = !1;
var e = cc.view.getFrameSize();
if (this.adObj) {
if (0 == t) {
this.adObj.style.top = e.height - this.realSize.height;
this.adObj.style.left = (e.width - this.realSize.width) / 2;
} else {
var i = 1 - t / cc.winSize.height;
this.adObj.style.top = e.height * i - this.realSize.height / 2;
}
console.log("BannerAd show success1");
0 != this.realSize.height && cc.director.emit("bannerResize", this.realSize.height);
}
};
t.prototype.hideAd = function() {
if (this.adObj) if (cc.sys.platform == cc.sys.WECHAT_GAME) {
this.isHide = !0;
this.adObj.style.top = cc.view.getFrameSize().height;
} else this.adObj.hide();
console.log("BannerAd Hide");
};
t.prototype.closeAd = function() {
this.isShow = !1;
this.isHide = !1;
this.loaded = !1;
this.createTime = 0;
if (this.adObj) {
this.adObj.offLoad && this.adObj.offLoad(this.onLoad_.bind(this));
this.adObj.offError && this.adObj.offError(this.onError_.bind(this));
this.adObj.offResize && this.adObj.offResize(this.onResize_.bind(this));
this.adObj.hide();
this.adObj.destroy();
this.adObj = null;
console.log("BannerAd Close");
}
};
t.inst = new t();
return t;
}();
i.default = n.inst;
cc._RF.pop();
}, {
"../GameTdd": "GameTdd"
} ],
BoxBannerAdModule: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "2438fCpag9BvYnUKrSHJrPp", "BoxBannerAdModule");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../AdDeclare"), n = t("../ServerData"), r = function() {
function t() {
this.adPositionId = "";
this.adObj = null;
this.loaded = !1;
this.height = 0;
this.left = 0;
this.createTime = 0;
this.adIntervals = 0;
this.isMove = !1;
this.isShow = !1;
this.failedNum = 0;
}
t.prototype.showAd = function(t) {
this.adPositionId = t;
var e = n.default.advertData, i = e && e.boxBannerAd ? e.boxBannerAd.adResetTime : 90;
this.adIntervals = e && e.boxBannerAd ? e.boxBannerAd.adIntervals : 30;
0 == this.createTime && (this.createTime = cc.sys.now() / 1e3);
if (this.adObj) {
var r = cc.sys.now() / 1e3 - this.createTime;
if (WECHAT_GAME && r < i) this.show_(); else {
this.closeAd();
this.createTime = 0;
cc.director.emit("bannerSwitch", o.BannerType.NORMAL);
}
} else this.create_();
};
t.prototype.create_ = function() {
console.log("BoxBannerAd create");
if (window.qq) this.adObj = qq.createBlockAd && qq.createBlockAd({
adUnitId: this.adPositionId,
size: 4,
orientation: "landscape",
style: {
left: 15,
top: 15
}
}); else if (window.wx) {
var t = wx.getSystemInfoSync();
this.height = 106;
this.left = t.windowWidth / 2;
this.adObj = wx.createCustomAd && wx.createCustomAd({
adUnitId: this.adPositionId,
adIntervals: this.adIntervals,
style: {
left: this.left,
top: t.windowHeight - this.height
}
});
} else window.qg && (this.adObj = qg.createGameBannerAd && qg.createGameBannerAd({
adUnitId: this.adPositionId
}));
if (this.adObj) {
this.adObj.onLoad && this.adObj.onLoad(this.onLoad_.bind(this));
this.adObj.onError && this.adObj.onError(this.onError_.bind(this));
this.adObj.onResize && this.adObj.onResize(this.onResize_.bind(this));
window.qg && this.show_();
}
};
t.prototype.show_ = function() {
var t = this;
this.adObj && this.adObj.show().then(function() {
console.log("BoxBannerAd show success");
t.isShow = !0;
var e = wx.getSystemInfoSync();
t.adObj.style.left = t.isMove ? 2 * e.windowWidth : t.left;
0 != t.height && cc.director.emit("bannerResize", t.height);
}).catch(function(e) {
console.log("BoxBannerAd show failed", e);
t.closeAd();
t.failedNum++;
if (t.failedNum >= 2) {
t.failedNum = 0;
t.createTime = 0;
cc.director.emit("bannerSwitch", o.BannerType.NORMAL);
}
});
};
t.prototype.onLoad_ = function() {
this.loaded = !0;
window.qg || this.show_();
console.log("BoxBannerAd onLoad");
};
t.prototype.onError_ = function(t) {
var e = this;
this.isShow = !1;
cc.director.emit("bannerOnError");
console.log("BoxBannerAd onError:", t ? JSON.stringify(t) : t);
setTimeout(function() {
!e.loaded && e.adObj && e.showAd(e.adPositionId);
}, 5e3);
};
t.prototype.onResize_ = function(t) {
console.log("BoxBannerAd onResize", t);
if (this.adObj && 0 != t.width && 0 != t.height) if (window.qq) {
var e = ((o = qq.getSystemInfoSync()).windowWidth - t.width) / 2, i = o.windowHeight - t.height - 17;
if (this.adObj.style.left != e || this.adObj.style.top != i) {
this.adObj.style.left = e;
this.adObj.style.top = i;
}
cc.director.emit("bannerResize", t.height + 17);
} else if (window.wx) {
var o = wx.getSystemInfoSync();
console.log(t.width, t.height);
this.adObj.style.top = o.windowHeight - t.height;
this.adObj.style.left = (o.windowWidth - t.width) / 2;
cc.director.emit("bannerResize", t.height);
}
};
t.prototype.moveAd = function(t) {
if (WECHAT_GAME) {
if (this.adObj) {
var e = wx.getSystemInfoSync(), i = t ? 2 * e.windowWidth : this.left;
this.adObj.style.left = i;
this.isShow || this.show_();
}
this.isMove = t;
}
};
t.prototype.hideAd = function() {
this.isMove = !1;
this.isShow = !1;
this.loaded = !1;
this.adObj && this.adObj.hide();
console.log("BoxBannerAd Hide");
};
t.prototype.closeAd = function() {
this.isMove = !1;
this.isShow = !1;
this.loaded = !1;
if (this.adObj) {
this.adObj.offLoad && this.adObj.offLoad(this.onLoad_.bind(this));
this.adObj.offError && this.adObj.offError(this.onError_.bind(this));
this.adObj.offResize && this.adObj.offResize(this.onResize_.bind(this));
this.adObj.destroy && this.adObj.destroy();
this.adObj = null;
console.log("BoxBannerAd Close");
}
};
t.inst = new t();
return t;
}();
i.default = r.inst;
cc._RF.pop();
}, {
"../AdDeclare": "AdDeclare",
"../ServerData": "ServerData"
} ],
Counter: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "c77bbrvT/BBxLyBx5DYi672", "Counter");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = cc._decorator, a = s.ccclass, c = s.property, l = s.requireComponent, d = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.time = 1;
e.keepInteger = !0;
e.label = null;
e._value = 0;
e.tween = null;
e.lastTarget = 0;
return e;
}
Object.defineProperty(e.prototype, "value", {
get: function() {
return this._value;
},
set: function(t) {
this.keepInteger && (t = Math.floor(t));
this._value = t;
this.label.string = t.toString();
},
enumerable: !1,
configurable: !0
});
e.prototype.onLoad = function() {
this.init();
};
e.prototype.init = function() {
this.label = this.getComponent(cc.Label);
this.value = 0;
};
e.prototype.setValue = function(t) {
this.value = t;
};
e.prototype.setTime = function(t) {
this.time = t;
};
e.prototype.to = function(t, e, i) {
var o = this;
void 0 === e && (e = null);
return new Promise(function(n) {
if (o.tween) {
o.tween.stop();
o.tween = null;
}
null !== e && (o.time = e);
o.lastTarget = t;
o.tween = cc.tween(o).to(o.time, {
value: t
}).call(function() {
i && i();
o.tween = null;
n();
}).start();
});
};
e.prototype.by = function(t, e, i) {
var o = this;
void 0 === e && (e = null);
return new Promise(function(n) {
if (o.tween) {
o.tween.stop();
o.tween = null;
o.value = o.lastTarget;
}
null !== e && (o.time = e);
o.lastTarget = o.value + t;
o.tween = cc.tween(o).to(o.time, {
value: o.lastTarget
}).call(function() {
i && i();
o.tween = null;
n();
}).start();
});
};
r([ c({
tooltip: !1
}) ], e.prototype, "time", void 0);
r([ c({
tooltip: !1
}) ], e.prototype, "keepInteger", void 0);
return r([ a, l(cc.Label) ], e);
}(cc.Component);
i.default = d;
cc._RF.pop();
}, {} ],
CustomAdModule: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "2c5143BiIFOXbPrZT+XDwCw", "CustomAdModule");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../ServerData"), n = function() {
function t() {
this.adPositionId = "";
this.adObj = null;
}
t.prototype.showAd = function(t, e) {
this.adPositionId = t;
var i = o.default.advertData, n = i && i.customAd ? i.customAd.adIntervals : 30;
this.adObj && this.closeAd();
WECHAT_GAME ? this.adObj = window.wx && wx.createCustomAd && wx.createCustomAd({
adUnitId: this.adPositionId,
adIntervals: n,
style: {
left: e.x,
top: e.y
}
}) : QQ_GAME && (this.adObj = qq.createBlockAd && qq.createBlockAd({
adUnitId: this.adPositionId,
size: 1,
orientation: "landscape",
style: {
left: e.x,
top: e.y
}
}));
if (this.adObj) {
this.adObj.onLoad(this.onLoad_.bind(this));
this.adObj.onError(this.onError_.bind(this));
}
};
t.prototype.closeAd = function() {
if (this.adObj) {
this.adObj.offLoad(this.onLoad_.bind(this));
this.adObj.offError(this.onError_.bind(this));
this.adObj.destroy();
this.adObj = null;
console.log("Icon Ad Close");
}
};
t.prototype.onError_ = function(t) {
console.log("Icon Ad show error:", t);
};
t.prototype.onLoad_ = function() {
this.adObj && this.adObj.show().then(function() {
console.log("Icon Ad show success");
}).catch(function(t) {
console.log("Icon Ad show failed", t);
});
};
t.inst = new t();
return t;
}();
i.default = n.inst;
cc._RF.pop();
}, {
"../ServerData": "ServerData"
} ],
Dialog: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "95085OfOBBF9qj+15ES6U6s", "Dialog");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = t("../../../../framework/manager/AudioMgr"), a = cc._decorator, c = a.ccclass, l = a.property, d = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.btnOK = null;
e.btnNO = null;
e.text = null;
e.callback = null;
return e;
}
e.prototype.onLoad = function() {
this.okBtnX = this.btnOK.x;
};
e.prototype.close = function(t, e) {
void 0 === e && (e = "0");
s.default.playOpenEffect();
this.node.destroy();
this.callback && this.callback(parseInt(e));
};
e.prototype.show = function(t, e, i) {
void 0 === e && (e = null);
void 0 === i && (i = !0);
this.callback = e;
this.text.string = t;
this.btnNO.active = i;
this.btnOK.x = i ? this.okBtnX : 0;
};
r([ l(cc.Node) ], e.prototype, "btnOK", void 0);
r([ l(cc.Node) ], e.prototype, "btnNO", void 0);
r([ l(cc.Label) ], e.prototype, "text", void 0);
return r([ c ], e);
}(cc.Component);
i.default = d;
cc._RF.pop();
}, {
"../../../../framework/manager/AudioMgr": void 0
} ],
FestivityData: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "1c1da8qCUlPuKR1Yev3zTmd", "FestivityData");
Object.defineProperty(i, "__esModule", {
value: !0
});
i.FestConfig = i.Fest = void 0;
var o = t("../../../../framework/lib/prototype/DateUtils"), n = t("../../../../framework/main/Constants"), r = t("../../../../framework/manager/ResMgr"), s = t("../../../../framework/utils/Tools"), a = function() {
this.id = 0;
this.name = "";
this.start = 0;
this.end = 0;
this.rewarded = 0;
this.rate = {};
};
i.Fest = a;
i.FestConfig = function() {
this.id = 0;
this.name = "";
this.start = 0;
this.end = 0;
this.desc = "";
this.reward = [];
};
var c = n.default.IS_AD_SHOW ? "WB2_FEST_KEY" : "WB2_FEST_KEY_TEMP", l = function() {
function t() {
this.config = {};
this._festList = {};
this.needSave = !1;
}
t.prototype.loadConfig = function() {
r.default.loadRes("res/conf/festivityCfg", cc.JsonAsset).then(function(t) {
for (var e in t.json) if (Object.prototype.hasOwnProperty.call(t.json, e)) {
var i = t.json[e];
this.config[i.id] = i;
for (var o = s.default.fromJson(i, new a()), n = o.start; n < o.end + 1; n++) n % 100 == 0 || n % 100 > 31 || (o.rate[n.toString()] = !1);
this._festList[i.id] = o;
}
this.load();
}.bind(this));
};
t.prototype.load = function() {
var t = cc.sys.localStorage.getItem(c);
if (t) {
var e = JSON.parse(t);
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (this._festList[i] = e[i]);
} else this.save();
setInterval(function() {
if (this.needSave) {
cc.sys.localStorage.setItem(c, JSON.stringify(this._festList));
this.needSave = !1;
}
}.bind(this), 1e3);
};
t.prototype.save = function() {
(n.default.IS_LOCAL || n.default.OPEN_FEST) && (this.needSave = !0);
};
t.prototype.getFestByID = function(t) {
return this._festList[t.toString()];
};
t.prototype.getCurrentFestivals = function() {
var t = parseInt(o.default.formatDayTime());
for (var e in this._festList) {
var i = this._festList[e];
if (t >= i.start && t <= i.end) return i;
}
return null;
};
t.prototype.getConfigByID = function(t) {
return this.config[t.toString()];
};
t.inst = new t();
return t;
}();
i.default = l.inst;
cc._RF.pop();
}, {
"../../../../framework/lib/prototype/DateUtils": void 0,
"../../../../framework/main/Constants": void 0,
"../../../../framework/manager/ResMgr": void 0,
"../../../../framework/utils/Tools": void 0
} ],
GameCommon: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "f174cfvKAlHsJD4LFlXv6CE", "GameCommon");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("./advert/AdsManager"), n = function() {
function t() {
this._isPaused = !1;
this._pauseList = [];
this.isInAddressBlackList = !0;
this.serverDataReady = !1;
this.blackListNames = [ "广东", "北京" ];
this.whiteListScenes = [ 1058, 1095, 1045, 1046, 1067, 1084 ];
this.unLockBigMap = !1;
this.unLockSuperMap = !1;
}
Object.defineProperty(t.prototype, "isPaused", {
get: function() {
return this._isPaused || 0 != this._pauseList.length;
},
enumerable: !1,
configurable: !0
});
t.prototype.setPause = function(t) {
this._isPaused = t;
};
t.prototype.pushPause = function(t) {
t ? this._pauseList.push(1) : this._pauseList.pop();
};
t.prototype.isSceneBlackList = function() {
if (WECHAT_GAME) {
var t = o.default.getGameCustomData();
if (!t) return !1;
if (t.sceneList) {
if (t.sceneList.enable) {
for (var e = 0; e < t.sceneList.list.length; e++) if (t.scene == t.sceneList.list[e]) return !1;
return !0;
}
return !1;
}
for (e = 0; e < this.whiteListScenes.length; e++) if (t.scene == this.whiteListScenes[e]) return !1;
return !0;
}
return !1;
};
t.prototype.checkIsInBlackList = function(t) {
var e = this, i = setInterval(function() {
if (!e.serverDataReady && o.default.isServerDataReady()) {
e.serverDataReady = !0;
clearInterval(i);
var n = o.default.getGameCustomData();
n && n.blackList && n.blackList.enable && n.blackList.list && e.doCheck(t, n.blackList.list);
}
}, 100);
this.doCheck(t, this.blackListNames);
};
t.prototype.doCheck = function(t, e) {
for (var i = !1, o = 0; o < e.length; o++) {
var n = e[o];
if (t.includes(n)) {
i = !0;
this.isInAddressBlackList = !0;
break;
}
}
i || "" === t || (this.isInAddressBlackList = !1);
};
t.inst = new t();
return t;
}();
i.default = n.inst;
cc._RF.pop();
}, {
"./advert/AdsManager": "AdsManager"
} ],
GamePopBase: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "ddc42gjMdRN4aCQrr9/nc8U", "GamePopBase");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
i.GamePopBase = void 0;
var s = t("../../../framework/manager/AudioMgr"), a = t("./GameCommon"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.bg = null;
e.subBg = null;
e.closeCB = null;
e.clickCB = null;
e.tweenTime = .3;
return e;
}
e.prototype.onEnable = function() {
a.default.pushPause(!0);
};
e.prototype.onDisable = function() {
a.default.pushPause(!1);
};
e.prototype.setCallback = function(t, e) {
this.clickCB = t;
this.closeCB = e;
};
e.prototype.open = function(t) {
void 0 === t && (t = null);
this.bg.x = cc.winSize.width;
if (this.bg) {
this.bg.active = !0;
cc.tween(this.bg).to(this.tweenTime, {
x: 0
}, {
easing: "backOut"
}).call(function() {
t && t();
}).start();
}
};
e.prototype.close = function(t, e) {
var i = this;
void 0 === t && (t = !1);
void 0 === e && (e = null);
s.default.playCloseEffect();
t = "boolean" == typeof t && t;
this.closeCB && this.closeCB(t);
var o = t ? -cc.winSize.width : cc.winSize.width;
cc.tween(this.bg).to(this.tweenTime, {
x: o
}, {
easing: "backOut"
}).call(function() {
e && "function" == typeof e && e();
i.node.destroy();
}).start();
};
e.prototype.move = function(t, e) {
var i = this;
void 0 === t && (t = !0);
void 0 === e && (e = null);
s.default.playCloseEffect();
var o = t ? -cc.winSize.width : cc.winSize.width;
if (this.bg) {
this.bg.active = !0;
cc.tween(this.bg).by(this.tweenTime, {
x: o
}, {
easing: "backOut"
}).call(function() {
e && e();
i.bg.active = 0 == i.bg.x;
}).start();
}
if (this.subBg) {
this.subBg.active = !0;
cc.tween(this.subBg).by(this.tweenTime, {
x: o
}, {
easing: "backOut"
}).call(function() {
e && e();
i.subBg.active = 0 == i.subBg.x;
}).start();
}
};
r([ d({
type: cc.Node,
tooltip: "用来tween整个窗口的根节点"
}) ], e.prototype, "bg", void 0);
r([ d({
type: cc.Node,
tooltip: "如果有两级弹框，这个为子界面弹框，没有就不用填"
}) ], e.prototype, "subBg", void 0);
return r([ l ], e);
}(cc.Component);
i.GamePopBase = h;
cc._RF.pop();
}, {
"../../../framework/manager/AudioMgr": void 0,
"./GameCommon": "GameCommon"
} ],
GameScreenRecorder: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "400a5e8xfBIw4uEVdChkb6/", "GameScreenRecorder");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = function() {
function t() {
this.gameRecorderManager = null;
this.videoPath = null;
this.currentRecordMS = 0;
this.startRecordingTimeInMS = 0;
this.totalClipedSeconds = 0;
this.clipIndexList = [];
this.isRecording_ = !1;
this.callback = null;
this.keepLastSeconds = 30;
}
t.prototype.init = function() {
var t = this;
this.gameRecorderManager = tt.getGameRecorderManager();
this.gameRecorderManager.onError(function(e) {
console.error("Recorder onError", e);
if (t.callback) {
t.callback(!1);
t.callback = null;
}
});
this.gameRecorderManager.onInterruptionBegin(function() {
console.log("Recorder onInterruptionBegin");
});
this.gameRecorderManager.onInterruptionEnd(function() {
console.log("Recorder onInterruptionEnd");
});
this.gameRecorderManager.onPause(function() {
console.log("Recorder onPause");
});
this.gameRecorderManager.onResume(function() {
console.log("Recorder onResume");
});
this.gameRecorderManager.onStart(function(t) {
console.log("Recorder onStart", t);
});
this.gameRecorderManager.onStop(function(e) {
console.log("Recorder onStop", e);
t.isRecording_ = !1;
t.accumulateRecordTime_();
t.startRecordingTimeInMS = 0;
if (t.currentRecordMS < 3e3) {
console.warn("Recording time less 3s, discard");
if (t.callback) {
t.callback(!1);
t.callback = null;
}
} else {
var i = null, o = null;
t.currentRecordMS > 1e3 * t.keepLastSeconds && (i = [ t.keepLastSeconds, 0 ]);
if (t.clipIndexList.length > 0 && t.totalClipedSeconds >= 5) {
i = null;
o = t.clipIndexList;
}
console.log("Recorder onStop", i, o, e.videoPath);
if (i || o) t.clipVideo_(e, i, o, function(i) {
if (i) {
t.videoPath = i.videoPath;
console.log("clipVideo success", i.videoPath);
} else {
console.error("clipVideo failed");
t.videoPath = e.videoPath;
}
if (t.callback) {
t.callback(!0);
t.callback = null;
}
}); else {
t.videoPath = e.videoPath;
if (t.callback) {
t.callback(!0);
t.callback = null;
}
}
}
});
};
t.prototype.supportScreenRecording = function() {
return null != this.gameRecorderManager;
};
t.prototype.isRecording = function() {
return this.isRecording_;
};
t.prototype.startRecording = function(t, e) {
if (!this.isRecording_) {
console.log("startRecording");
this.callback = t;
this.isRecording_ = !0;
this.clipIndexList = [];
this.currentRecordMS = 0;
this.startRecordingTimeInMS = Date.now();
this.videoPath = null;
this.gameRecorderManager.start({
duration: e
});
}
};
t.prototype.stopRecording = function(t) {
console.log("stopRecording");
this.keepLastSeconds = t;
this.isRecording_ = !1;
this.gameRecorderManager.stop();
};
t.prototype.pause = function() {
if (this.isRecording_) {
console.log("pause Recording");
this.isRecording_ = !1;
this.accumulateRecordTime_();
this.gameRecorderManager.pause();
}
};
t.prototype.resume = function() {
if (!this.isRecording_) {
console.log("resume Recording");
this.isRecording_ = !0;
this.startRecordingTimeInMS = Date.now();
this.gameRecorderManager.resume();
}
};
t.prototype.recordClip = function(t) {
var e = this, i = t || [ 3, 3 ];
this.totalClipedSeconds, i[0];
this.totalClipedSeconds, i[1];
this.gameRecorderManager.recordClip({
timeRange: i,
success: function(t) {
e.clipIndexList.push(t.index);
console.log("recordClip", i, t.index);
}
});
};
t.prototype.getVideoPath = function() {
return this.videoPath;
};
t.prototype.clipVideo_ = function(t, e, i, o) {
this.gameRecorderManager.clipVideo({
path: t.videoPath,
timeRange: e,
clipRange: i,
success: o,
fail: function() {
console.error("clipVideo failed.");
}
});
};
t.prototype.accumulateRecordTime_ = function() {
this.startRecordingTimeInMS > 0 && (this.currentRecordMS += Date.now() - this.startRecordingTimeInMS);
};
t.inst = new t();
return t;
}();
i.default = o.inst;
cc._RF.pop();
}, {} ],
GameTdd: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "eb7adxtq+NNaJ4LeyGd1IIP", "GameTdd");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
});
Object.defineProperty(i, "__esModule", {
value: !0
});
i.v_type = void 0;
var r, s = t("../../../../../framework/net/NetCore"), a = t("../../../../../framework/utils/Log");
(function(t) {
t[t.String = 0] = "String";
t[t.Number = 1] = "Number";
t[t.Bool = 2] = "Bool";
t[t.Json = 3] = "Json";
t[t.StringList = 4] = "StringList";
t[t.NumberList = 5] = "NumberList";
t[t.BoolList = 6] = "BoolList";
})(r = i.v_type || (i.v_type = {}));
var c = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.serverData = null;
e.gameId = "";
e.sid = "";
e.serverDataReady = !1;
return e;
}
Object.defineProperty(e.prototype, "data", {
get: function() {
return this.serverData;
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "success", {
get: function() {
return this.serverDataReady;
},
enumerable: !1,
configurable: !0
});
e.prototype.requestData = function(t, e) {
void 0 === e && (e = "");
this.gameId = t;
this.sid = e;
var i = {
id: t,
sid: e
};
this.post("customData", "https://ga.gametdd.com/adCtrl/agd/conf", JSON.stringify(i), {
"Content-Type": "application/json; charset=utf-8"
});
};
e.prototype.onHttpMessage = function(t, e, i) {
if (e) {
var o = JSON.parse(i);
if (0 == (null == o ? void 0 : o.code)) {
this.serverDataReady = !0;
this.serverData = o.data;
a.default.v("customData:", JSON.stringify(o.data) + "\n");
} else a.default.e("获取数据失败:", o.desc);
} else a.default.e("获取数据失败:", i);
};
e.prototype.getData = function(t, e) {
void 0 === e && (e = r.String);
if (this.serverData) {
var i = this.serverData[t], o = [];
switch (e) {
case r.String:
return i;

case r.Number:
return Number(i);

case r.Bool:
return "yes" == i || "true" == i;

case r.Json:
return JSON.parse(i);

case r.StringList:
i.split(",").forEach(function(t) {
o.push(t);
});
return o;

case r.NumberList:
i.split(",").forEach(function(t) {
o.push(Number(t));
});
return o;

case r.BoolList:
i.split(",").forEach(function(t) {
o.push("yes" == t || "true" == t);
});
return o;

default:
return i;
}
} else this.gameId && this.requestData(this.gameId, this.sid);
return null;
};
e.inst = new e();
return e;
}(s.default);
i.default = c.inst;
cc._RF.pop();
}, {
"../../../../../framework/net/NetCore": void 0,
"../../../../../framework/utils/Log": void 0
} ],
GlobalNode: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "c5e1c/5OVVKVZzopFJVlEBz", "GlobalNode");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = t("../../../../framework/main/Constants"), a = t("../../../../framework/utils/Log"), c = cc._decorator, l = c.ccclass, d = (c.property, 
function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.touched = !1;
e.touchPos = null;
return e;
}
i = e;
e.prototype.onLoad = function() {
if (!cc.game.isPersistRootNode(this.node)) {
a.default.d("GlobalNode onLoad");
cc.game.addPersistRootNode(this.node);
s.default.GLOBAL_NODE = this.node;
i.inst = this;
this.node.zIndex = s.default.MAX_ZINDEX;
}
this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
this.node._touchListener.setSwallowTouches(!1);
};
e.prototype.onTouchStart = function() {
this.touched = !0;
};
e.prototype.onTouchEnd = function(t) {
this.touched = !1;
this.touchPos = t.getLocation();
};
var i;
e.inst = null;
return i = r([ l ], e);
}(cc.Component));
i.default = d;
cc._RF.pop();
}, {
"../../../../framework/main/Constants": void 0,
"../../../../framework/utils/Log": void 0
} ],
GuideView: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "71ed0gfXgRMdqCpyUwP0Dcs", "GuideView");
var o, n, r = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), s = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
}, a = this && this.__read || function(t, e) {
var i = "function" == typeof Symbol && t[Symbol.iterator];
if (!i) return t;
var o, n, r = i.call(t), s = [];
try {
for (;(void 0 === e || e-- > 0) && !(o = r.next()).done; ) s.push(o.value);
} catch (t) {
n = {
error: t
};
} finally {
try {
o && !o.done && (i = r.return) && i.call(r);
} finally {
if (n) throw n.error;
}
}
return s;
}, c = this && this.__spread || function() {
for (var t = [], e = 0; e < arguments.length; e++) t = t.concat(a(arguments[e]));
return t;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
i.FINGER_ACTION = void 0;
(function(t) {
t[t.touch = 0] = "touch";
t[t.upAndDown = 1] = "upAndDown";
t[t.leftAndRight = 2] = "leftAndRight";
})(n = i.FINGER_ACTION || (i.FINGER_ACTION = {}));
var l = cc._decorator, d = l.ccclass, h = l.property, u = function(t) {
r(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.mask = null;
e.frame = null;
e.touch = null;
e.highlightInterceptTouch = null;
e.finger = null;
e.fingerZoom = null;
e.text = null;
e.npc = null;
e.npcSp = [];
e.strList = [];
e.strIdx = 0;
e.audioIdx = 0;
e.talkEndCB = null;
e.clickEndCB = null;
e.obstruct = !1;
return e;
}
i = e;
e.prototype.onLoad = function() {
i.inst = this;
};
e.prototype.init = function(t) {
void 0 === t && (t = !1);
this.npc.spriteFrame = t ? this.npcSp[1] : this.npcSp[0];
};
e.prototype.start = function() {};
e.prototype.hide = function(t) {
void 0 === t && (t = null);
this.closeTips(t);
this.showFrame(!1);
this.showFinger(!1);
this.showFingerZoom(!1);
};
e.prototype.showMaskOpacity = function(t) {
void 0 === t && (t = 0);
this.enabledTouch(!0);
this.mask.getChildByName("touch").opacity = t;
};
e.prototype.showFrame = function(t, e, i) {
void 0 === e && (e = cc.v3(-2e3));
void 0 === i && (i = cc.Size.ZERO);
this.showMaskOpacity(t ? 100 : 0);
this.frame.position = this.node.convertToNodeSpaceAR(e);
this.frame.width = i.width;
this.frame.height = i.height;
this.mask.width = i.width;
this.mask.height = i.height;
};
e.prototype.enabledTouch = function(t) {
this.touch.active = t;
};
e.prototype.interceptHighlightFrameTouch = function(t) {
this.highlightInterceptTouch.active = t;
};
e.prototype.showFinger = function(t, e, i, o) {
var r = this;
void 0 === e && (e = cc.Vec3.ZERO);
void 0 === i && (i = !1);
void 0 === o && (o = n.touch);
var s = this.node.convertToNodeSpaceAR(e);
this.finger.active || (this.finger.position = s);
this.finger.active = t;
this.finger.stopAllActions();
this.finger.getChildByName("mask").active = i;
switch (o) {
case n.touch:
cc.tween(this.finger).to(.2, {
position: s
}).call(function() {
cc.tween(r.finger).delay(.5).to(.2, {
y: s.y - 10,
scale: 1.1
}).to(.2, {
y: s.y,
scale: 1
}).to(.2, {
y: s.y - 10,
scale: 1.1
}).to(.2, {
y: s.y,
scale: 1
}).union().repeatForever().start();
}).start();
break;

case n.upAndDown:
cc.tween(this.finger).to(.2, {
position: s
}).call(function() {
cc.tween(r.finger).delay(1).to(1, {
y: s.y + 100
}).to(1, {
y: s.y - 100
}).to(1, {
y: s.y + 100
}).to(1, {
y: s.y - 100
}).union().repeatForever().start();
}).start();
break;

case n.leftAndRight:
cc.tween(this.finger).to(.2, {
position: cc.v3(s.x - 100, s.y)
}).call(function() {
cc.tween(r.finger).delay(1).to(1, {
x: s.x + 100
}).to(1, {
x: s.x - 100
}).to(1, {
x: s.x + 100
}).to(1, {
x: s.x - 100
}).union().repeatForever().start();
}).start();
}
};
e.prototype.showFingerZoom = function(t) {
this.fingerZoom.active = t;
};
e.prototype.showTips = function(t, e, i, o) {
var n = this;
void 0 === i && (i = null);
void 0 === o && (o = null);
this.obstruct = !0;
this.enabledTouch(!0);
this.talkEndCB = i;
this.clickEndCB = o;
var r = this.text.node.parent;
r.active = !0;
r.stopAllActions();
this.text.string = "";
cc.tween(r).sequence(cc.moveTo(.2, cc.v2(r.width - cc.winSize.width / 2, r.y)), cc.callFunc(function() {
n.obstruct = !1;
n.strList = c(t);
n.strIdx = 0;
n.audioIdx = e;
n.showText(n.strList[n.strIdx], !0);
})).start();
};
e.prototype.closeTips = function(t) {
var e = this, i = this.text.node.parent;
cc.tween(i).sequence(cc.moveTo(.2, cc.v2(-cc.winSize.width / 2, i.y)), cc.callFunc(function() {
e.strList = [];
e.strIdx = 0;
e.enabledTouch(!1);
i.active = !1;
e.setTipsY(270);
t && t();
})).start();
};
e.prototype.setTipsY = function(t) {
var e = this.text.node.parent.getComponent(cc.Widget);
e.bottom = t;
e.updateAlignment();
};
e.prototype.click = function() {
if (!this.obstruct) if (this.text.string == this.strList[this.strIdx]) if (this.strList.length - 1 == this.strIdx) this.clickEndCB && this.clickEndCB(); else {
this.strIdx++;
this.showText(this.strList[this.strIdx], !0);
} else this.strList.length > 0 && this.showText(this.strList[this.strIdx], !1);
};
e.prototype.showText = function(t, e) {
var i = this;
void 0 === e && (e = !1);
this.text.node.parent.active = !0;
this.text.node.stopAllActions();
if (e) {
var o = t.split(""), n = 0;
cc.tween(this.text.node).sequence(cc.delayTime(.05), cc.callFunc(function() {
n++;
i.text.string = o.slice(0, n).join("");
i.text.string == i.strList[i.strList.length - 1] && i.talkEndCB && i.talkEndCB();
})).repeat(t.length).start();
} else {
this.text.string = t;
this.talkEndCB && this.talkEndCB();
}
};
var i;
e.inst = null;
s([ h(cc.Node) ], e.prototype, "mask", void 0);
s([ h(cc.Node) ], e.prototype, "frame", void 0);
s([ h(cc.Node) ], e.prototype, "touch", void 0);
s([ h({
type: cc.Node,
tooltip: "高亮框的触摸拦截"
}) ], e.prototype, "highlightInterceptTouch", void 0);
s([ h(cc.Node) ], e.prototype, "finger", void 0);
s([ h(cc.Node) ], e.prototype, "fingerZoom", void 0);
s([ h(cc.Label) ], e.prototype, "text", void 0);
s([ h(cc.Sprite) ], e.prototype, "npc", void 0);
s([ h(cc.SpriteFrame) ], e.prototype, "npcSp", void 0);
return i = s([ d ], e);
}(cc.Component);
i.default = u;
cc._RF.pop();
}, {} ],
HtBox: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "b63fb83o7FFRLOiczJ6Ersr", "HtBox");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
}, s = this && this.__values || function(t) {
var e = "function" == typeof Symbol && Symbol.iterator, i = e && t[e], o = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length) return {
next: function() {
t && o >= t.length && (t = void 0);
return {
value: t && t[o++],
done: !t
};
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var a = t("../module/scrollView/List"), c = t("../GamePopBase"), l = t("./HtIcon"), d = t("./HtManager"), h = cc._decorator, u = h.ccclass, p = h.property, f = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.scrollView = null;
e.pageView = null;
e.banners = [];
e.pbBanner = null;
e.list = null;
e.pageScrollingTime = 0;
return e;
}
e.prototype.onLoad = function() {
this.list = this.scrollView.getComponent(a.default);
};
e.prototype.start = function() {
this.showIconList();
this.showMaxBanner();
this.showMidBanner();
};
e.prototype.showMaxBanner = function() {
var t, e, i = d.default.getInstance().getBannerData(!0);
try {
for (var o = s(i), n = o.next(); !n.done; n = o.next()) {
var r = n.value, a = cc.instantiate(this.pbBanner);
this.pageView.addPage(a);
a.getComponent(l.default).init(r, function(t) {
d.default.getInstance().navigateToMiniGame(t);
});
}
} catch (e) {
t = {
error: e
};
} finally {
try {
n && !n.done && (e = o.return) && e.call(o);
} finally {
if (t) throw t.error;
}
}
};
e.prototype.showMidBanner = function() {
for (var t = d.default.getInstance().getBannerData(!1), e = 0; e < 2; e++) {
var i = t[e];
if (i) {
this.banners[e].node.active = !0;
this.banners[e].init(i, function(t) {
d.default.getInstance().navigateToMiniGame(t);
});
}
}
};
e.prototype.showIconList = function() {
var t = d.default.getInstance().getData(d.HT_TYPE.ICON_LIST);
if (t.length < 9) {
this.list.virtual = !1;
this.list.cyclic = !1;
}
this.list.numItems = t.length;
};
e.prototype.updateIcon = function(t, e) {
var i = d.default.getInstance().getData(d.HT_TYPE.ICON_LIST);
i.length <= e || t.getComponent(l.default).init(i[e], function(t) {
d.default.getInstance().navigateToMiniGame(t);
});
};
e.prototype.update = function(t) {
var e = d.default.getInstance().getData(d.HT_TYPE.ICON_LIST);
if (!this.scrollView.isAutoScrolling() && e.length >= 9) {
var i = this.scrollView.content.position;
this.scrollView.scrollToOffset(cc.v2(i.x, i.y + 1), t);
}
if (this.pageView.isScrolling()) this.pageScrollingTime = 0; else {
this.pageScrollingTime += t;
if (this.pageScrollingTime >= 5) {
this.pageScrollingTime = 0;
var o = this.pageView.getCurrentPageIndex() + 1;
o >= this.pageView.getPages().length && (o = 0);
this.pageView.scrollToPage(o, .5);
}
}
};
r([ p(cc.ScrollView) ], e.prototype, "scrollView", void 0);
r([ p(cc.PageView) ], e.prototype, "pageView", void 0);
r([ p([ l.default ]) ], e.prototype, "banners", void 0);
r([ p(cc.Prefab) ], e.prototype, "pbBanner", void 0);
return r([ u ], e);
}(c.GamePopBase);
i.default = f;
cc._RF.pop();
}, {
"../GamePopBase": "GamePopBase",
"../module/scrollView/List": "List",
"./HtIcon": "HtIcon",
"./HtManager": "HtManager"
} ],
HtIcon: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "bd641nmSqdEFIK93N9g5S7n", "HtIcon");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = cc._decorator, a = s.ccclass, c = s.property, l = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.label = null;
e.sprite = null;
e.callback = null;
e.info = null;
return e;
}
e.prototype.start = function() {};
e.prototype.init = function(t, e) {
var i = this;
this.info = t;
this.callback = e;
this.label && (this.label.string = this.getStr(t.title));
cc.assetManager.loadRemote(t.banner || t.icon, function(t, e) {
t || cc.isValid(i.sprite, !0) && (i.sprite.spriteFrame = new cc.SpriteFrame(e));
});
};
e.prototype.getStr = function(t) {
var e = t;
t.length > 6 && (e = t.substring(0, 5) + "...");
return e;
};
e.prototype.click = function() {
this.callback && this.callback(this.info);
};
r([ c(cc.Label) ], e.prototype, "label", void 0);
r([ c(cc.Sprite) ], e.prototype, "sprite", void 0);
return r([ a ], e);
}(cc.Component);
i.default = l;
cc._RF.pop();
}, {} ],
HtManager: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "7b647MtuMFHXru4hWbEUczW", "HtManager");
var o = this && this.__values || function(t) {
var e = "function" == typeof Symbol && Symbol.iterator, i = e && t[e], o = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length) return {
next: function() {
t && o >= t.length && (t = void 0);
return {
value: t && t[o++],
done: !t
};
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(i, "__esModule", {
value: !0
});
i.HT_TYPE = void 0;
var n, r = t("../../../../framework/main/Constants"), s = window.hzzxsdk;
(function(t) {
t[t.ICON = 0] = "ICON";
t[t.ICON_LIST = 1] = "ICON_LIST";
t[t.BANNER = 2] = "BANNER";
})(n = i.HT_TYPE || (i.HT_TYPE = {}));
var a = function() {
function t() {
this._iconList = [];
this._bannerList = [];
this.mIdx = 0;
}
t.getInstance = function() {
t.inst || (t.inst = new t());
return t.inst;
};
t.prototype.init = function() {
var t = this;
s.setDebugMode(!1);
var e = r.default.MODE == r.MODE_TYPE.LOCK ? "1181" : "1169";
s.initAndGetOpenId(e, !0).then(function() {
t.loadData();
}).catch(function(t) {
console.log("初始化失败.", t);
});
};
t.prototype.loadData = function() {
var t = this;
s.getRewardedAdList().then(function(e) {
e && (t._iconList = e);
});
s.getBannerAdList().then(function(e) {
e && (t._bannerList = e);
});
};
t.prototype.getData = function(t) {
switch (t) {
case n.ICON_LIST:
return this._iconList;

case n.BANNER:
return this._bannerList;

default:
return [];
}
};
t.prototype.getBannerData = function(t) {
var e, i, r = this.getData(n.BANNER), s = [];
try {
for (var a = o(r), c = a.next(); !c.done; c = a.next()) {
var l = c.value, d = t ? "Maxbanner" : "Midbanner";
l.description == d && s.push(l);
}
} catch (t) {
e = {
error: t
};
} finally {
try {
c && !c.done && (i = a.return) && i.call(a);
} finally {
if (e) throw e.error;
}
}
if (t) return s;
for (var h = [], u = 0; u < 2; u++) {
this.mIdx >= s.length && (this.mIdx = 0);
h.push(s[this.mIdx]);
this.mIdx++;
}
return h;
};
t.prototype.navigateToMiniGame = function(t, e) {
void 0 === e && (e = null);
WECHAT_GAME ? s.clickAndNavigate(t).then(function(t) {
console.log("跳转是否成功 = ", t.navigateTo);
console.log("是否是第一次点击 = ", t.isFristClick);
}) : e && e(0);
};
t.inst = null;
return t;
}();
i.default = a;
cc._RF.pop();
}, {
"../../../../framework/main/Constants": void 0
} ],
InterstitialAdModule: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "b561dacKgJCLZUxj3py+J3G", "InterstitialAdModule");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../AdDeclare"), n = function() {
function t() {
this.adPositionId = "";
this.adObj = null;
this.loaded = !1;
this.adResultCallback = null;
}
t.prototype.createAd = function(t) {
if (this.adObj) if (this.adPositionId != t) {
this.adPositionId = t;
this.destroyAd();
this.create_();
} else this.adObj.load(); else {
this.adPositionId = t;
this.create_();
}
};
t.prototype.create_ = function() {
var t, e;
this.adObj = (null === PLATFORM || void 0 === PLATFORM ? void 0 : PLATFORM.createInterstitialAd) && PLATFORM.createInterstitialAd({
adUnitId: this.adPositionId
});
if (this.adObj) {
console.log("create InterstitialAd:", this.adPositionId);
this.adObj.onClose(this.onClose_.bind(this));
this.adObj.onError(this.onError_.bind(this));
this.adObj.onLoad(this.onLoad_.bind(this));
(window.tt || window.qg) && (null === (e = (t = this.adObj).load) || void 0 === e || e.call(t));
}
};
t.prototype.showAd = function(t, e) {
this.adResultCallback = t;
e && (this.adPositionId = e);
this.loaded ? this.show_() : this.createAd(this.adPositionId);
};
t.prototype.show_ = function() {
var t = this;
console.log("Show InterstitialAd");
this.adObj.show().then(function() {
console.log("InterstitialAd show success.");
}).catch(function(e) {
console.log("InterstitialAd show failed", e ? JSON.stringify(e) : e);
t.adObj.load();
if (t.adResultCallback) {
t.adResultCallback(o.AdResultState.ON_ERROR);
t.adResultCallback = null;
}
});
};
t.prototype.onLoad_ = function() {
console.log("InterstitialAd onLoad success");
this.loaded = !0;
};
t.prototype.onError_ = function(t) {
var e = this;
console.log("InterstitialAd onError", t ? JSON.stringify(t) : t);
if (this.adResultCallback) {
this.adResultCallback(o.AdResultState.ON_ERROR);
this.adResultCallback = null;
}
this.loaded = !1;
this.destroyAd();
setTimeout(function() {
e.create_();
}, 3e3);
};
t.prototype.onClose_ = function() {
console.log("InterstitialAd onClose");
if (this.adResultCallback) {
this.adResultCallback(o.AdResultState.ON_CLOSE_FINISH);
this.adResultCallback = null;
}
XIAOMI_GAME || (this.loaded = !1);
window.qg && this.adObj.load && this.adObj.load();
};
t.prototype.destroyAd = function() {
if (this.adObj) {
console.log("InterstitialAd destroyAd");
this.adObj.offLoad && this.adObj.offLoad(this.onLoad_.bind(this));
this.adObj.offError && this.adObj.offError(this.onError_.bind(this));
this.adObj.offClose && this.adObj.offClose(this.onClose_.bind(this));
this.adObj.destroy();
this.adObj = null;
}
};
t.inst = new t();
return t;
}();
i.default = n.inst;
cc._RF.pop();
}, {
"../AdDeclare": "AdDeclare"
} ],
ListItem: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "b73818KWvVFEaMcLnpQK1xE", "ListItem");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s, a = cc._decorator, c = a.ccclass, l = a.property, d = a.disallowMultiple, h = a.menu, u = a.executionOrder;
(function(t) {
t[t.NONE = 0] = "NONE";
t[t.TOGGLE = 1] = "TOGGLE";
t[t.SWITCH = 2] = "SWITCH";
})(s || (s = {}));
var p = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.icon = null;
e.title = null;
e.selectedMode = s.NONE;
e.selectedFlag = null;
e.selectedSpriteFrame = null;
e._unselectedSpriteFrame = null;
e.adaptiveSize = !1;
e._selected = !1;
e._eventReg = !1;
return e;
}
Object.defineProperty(e.prototype, "selected", {
get: function() {
return this._selected;
},
set: function(t) {
this._selected = t;
if (this.selectedFlag) switch (this.selectedMode) {
case s.TOGGLE:
this.selectedFlag.active = t;
break;

case s.SWITCH:
var e = this.selectedFlag.getComponent(cc.Sprite);
e && (e.spriteFrame = t ? this.selectedSpriteFrame : this._unselectedSpriteFrame);
}
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "btnCom", {
get: function() {
this._btnCom || (this._btnCom = this.node.getComponent(cc.Button));
return this._btnCom;
},
enumerable: !1,
configurable: !0
});
e.prototype.onLoad = function() {
if (this.selectedMode == s.SWITCH) {
var t = this.selectedFlag.getComponent(cc.Sprite);
this._unselectedSpriteFrame = t.spriteFrame;
}
};
e.prototype.onDestroy = function() {
this.node.off(cc.Node.EventType.SIZE_CHANGED, this._onSizeChange, this);
};
e.prototype._registerEvent = function() {
if (!this._eventReg) {
this.btnCom && this.list.selectedMode > 0 && this.btnCom.clickEvents.unshift(this.createEvt(this, "onClickThis"));
this.adaptiveSize && this.node.on(cc.Node.EventType.SIZE_CHANGED, this._onSizeChange, this);
this._eventReg = !0;
}
};
e.prototype._onSizeChange = function() {
this.list._onItemAdaptive(this.node);
};
e.prototype.createEvt = function(t, e, i) {
void 0 === i && (i = null);
if (t.isValid) {
t.comName = t.comName || t.name.match(/\<(.*?)\>/g).pop().replace(/\<|>/g, "");
var o = new cc.Component.EventHandler();
o.target = i || t.node;
o.component = t.comName;
o.handler = e;
return o;
}
};
e.prototype.showAni = function(t, e, i) {
var o, n = this;
switch (t) {
case 0:
o = cc.tween(n.node).to(.2, {
scale: .7
}).by(.3, {
y: 2 * n.node.height
});
break;

case 1:
o = cc.tween(n.node).to(.2, {
scale: .7
}).by(.3, {
x: 2 * n.node.width
});
break;

case 2:
o = cc.tween(n.node).to(.2, {
scale: .7
}).by(.3, {
y: -2 * n.node.height
});
break;

case 3:
o = cc.tween(n.node).to(.2, {
scale: .7
}).by(.3, {
x: -2 * n.node.width
});
break;

default:
o = cc.tween(n.node).to(.3, {
scale: .1
});
}
(e || i) && o.call(function() {
if (i) {
n.list._delSingleItem(n.node);
for (var t = n.list.displayData.length - 1; t >= 0; t--) if (n.list.displayData[t].id == n.listId) {
n.list.displayData.splice(t, 1);
break;
}
}
e();
});
o.start();
};
e.prototype.onClickThis = function() {
this.list.selectedId = this.listId;
};
r([ l({
type: cc.Sprite,
tooltip: !1
}) ], e.prototype, "icon", void 0);
r([ l({
type: cc.Node,
tooltip: !1
}) ], e.prototype, "title", void 0);
r([ l({
type: cc.Enum(s),
tooltip: !1
}) ], e.prototype, "selectedMode", void 0);
r([ l({
type: cc.Node,
tooltip: !1,
visible: function() {
return this.selectedMode > s.NONE;
}
}) ], e.prototype, "selectedFlag", void 0);
r([ l({
type: cc.SpriteFrame,
tooltip: !1,
visible: function() {
return this.selectedMode == s.SWITCH;
}
}) ], e.prototype, "selectedSpriteFrame", void 0);
r([ l({
tooltip: !1
}) ], e.prototype, "adaptiveSize", void 0);
return r([ c, d(), h("自定义组件/List Item"), u(-5001) ], e);
}(cc.Component);
i.default = p;
cc._RF.pop();
}, {} ],
List: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "eec35DjEExMu7wn3xGbu0eF", "List");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s, a, c, l = cc._decorator, d = l.ccclass, h = l.property, u = l.disallowMultiple, p = l.menu, f = l.executionOrder, _ = l.requireComponent, m = t("./ListItem");
(function(t) {
t[t.NODE = 1] = "NODE";
t[t.PREFAB = 2] = "PREFAB";
})(s || (s = {}));
(function(t) {
t[t.NORMAL = 1] = "NORMAL";
t[t.ADHERING = 2] = "ADHERING";
t[t.PAGE = 3] = "PAGE";
})(a || (a = {}));
(function(t) {
t[t.NONE = 0] = "NONE";
t[t.SINGLE = 1] = "SINGLE";
t[t.MULT = 2] = "MULT";
})(c || (c = {}));
var y = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.templateType = s.NODE;
e.tmpNode = null;
e.tmpPrefab = null;
e._slideMode = a.NORMAL;
e.pageDistance = .3;
e.pageChangeEvent = new cc.Component.EventHandler();
e._virtual = !0;
e.cyclic = !1;
e.lackCenter = !1;
e.lackSlide = !1;
e._updateRate = 0;
e.frameByFrameRenderNum = 0;
e.renderEvent = new cc.Component.EventHandler();
e.selectedMode = c.NONE;
e.repeatEventSingle = !1;
e.selectedEvent = new cc.Component.EventHandler();
e._selectedId = -1;
e._forceUpdate = !1;
e._updateDone = !0;
e._numItems = 0;
e._inited = !1;
e._needUpdateWidget = !1;
e._aniDelRuning = !1;
e._doneAfterUpdate = !1;
e.adhering = !1;
e._adheringBarrier = !1;
e.curPageNum = 0;
return e;
}
Object.defineProperty(e.prototype, "slideMode", {
get: function() {
return this._slideMode;
},
set: function(t) {
this._slideMode = t;
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "virtual", {
get: function() {
return this._virtual;
},
set: function(t) {
null != t && (this._virtual = t);
0 != this._numItems && this._onScrolling();
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "updateRate", {
get: function() {
return this._updateRate;
},
set: function(t) {
t >= 0 && t <= 6 && (this._updateRate = t);
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "selectedId", {
get: function() {
return this._selectedId;
},
set: function(t) {
var e, i = this;
switch (i.selectedMode) {
case c.SINGLE:
if (!i.repeatEventSingle && t == i._selectedId) return;
e = i.getItemByListId(t);
var o = void 0;
i._selectedId >= 0 ? i._lastSelectedId = i._selectedId : i._lastSelectedId = null;
i._selectedId = t;
e && ((o = e.getComponent(m.default)).selected = !0);
if (i._lastSelectedId >= 0 && i._lastSelectedId != i._selectedId) {
var n = i.getItemByListId(i._lastSelectedId);
n && (n.getComponent(m.default).selected = !1);
}
i.selectedEvent && cc.Component.EventHandler.emitEvents([ i.selectedEvent ], e, t % this._actualNumItems, null == i._lastSelectedId ? null : i._lastSelectedId % this._actualNumItems);
break;

case c.MULT:
if (!(e = i.getItemByListId(t))) return;
o = e.getComponent(m.default);
i._selectedId >= 0 && (i._lastSelectedId = i._selectedId);
i._selectedId = t;
var r = !o.selected;
o.selected = r;
var s = i.multSelected.indexOf(t);
r && s < 0 ? i.multSelected.push(t) : !r && s >= 0 && i.multSelected.splice(s, 1);
i.selectedEvent && cc.Component.EventHandler.emitEvents([ i.selectedEvent ], e, t % this._actualNumItems, null == i._lastSelectedId ? null : i._lastSelectedId % this._actualNumItems, r);
}
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "numItems", {
get: function() {
return this._actualNumItems;
},
set: function(t) {
var e = this;
if (e.checkInited(!1)) if (null == t || t < 0) cc.error("numItems set the wrong::", t); else {
e._actualNumItems = e._numItems = t;
e._forceUpdate = !0;
if (e._virtual) {
e._resizeContent();
e.cyclic && (e._numItems = e._cyclicNum * e._numItems);
e._onScrolling();
e.frameByFrameRenderNum || e.slideMode != a.PAGE || (e.curPageNum = e.nearestListId);
} else {
if (e.cyclic) {
e._resizeContent();
e._numItems = e._cyclicNum * e._numItems;
}
var i = e.content.getComponent(cc.Layout);
i && (i.enabled = !0);
e._delRedundantItem();
e.firstListId = 0;
if (e.frameByFrameRenderNum > 0) {
for (var o = e.frameByFrameRenderNum > e._numItems ? e._numItems : e.frameByFrameRenderNum, n = 0; n < o; n++) e._createOrUpdateItem2(n);
if (e.frameByFrameRenderNum < e._numItems) {
e._updateCounter = e.frameByFrameRenderNum;
e._updateDone = !1;
}
} else {
for (n = 0; n < e._numItems; n++) e._createOrUpdateItem2(n);
e.displayItemNum = e._numItems;
}
}
}
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "scrollView", {
get: function() {
return this._scrollView;
},
enumerable: !1,
configurable: !0
});
e.prototype.onLoad = function() {
this._init();
};
e.prototype.onDestroy = function() {
var t = this;
cc.isValid(t._itemTmp) && t._itemTmp.destroy();
cc.isValid(t.tmpNode) && t.tmpNode.destroy();
t._pool && t._pool.clear();
};
e.prototype.onEnable = function() {
this._registerEvent();
this._init();
if (this._aniDelRuning) {
this._aniDelRuning = !1;
if (this._aniDelItem) {
if (this._aniDelBeforePos) {
this._aniDelItem.position = this._aniDelBeforePos;
delete this._aniDelBeforePos;
}
if (this._aniDelBeforeScale) {
this._aniDelItem.scale = this._aniDelBeforeScale;
delete this._aniDelBeforeScale;
}
delete this._aniDelItem;
}
if (this._aniDelCB) {
this._aniDelCB();
delete this._aniDelCB;
}
}
};
e.prototype.onDisable = function() {
this._unregisterEvent();
};
e.prototype._registerEvent = function() {
var t = this;
t.node.on(cc.Node.EventType.TOUCH_START, t._onTouchStart, t, !0);
t.node.on("touch-up", t._onTouchUp, t);
t.node.on(cc.Node.EventType.TOUCH_CANCEL, t._onTouchCancelled, t, !0);
t.node.on("scroll-began", t._onScrollBegan, t, !0);
t.node.on("scroll-ended", t._onScrollEnded, t, !0);
t.node.on("scrolling", t._onScrolling, t, !0);
t.node.on(cc.Node.EventType.SIZE_CHANGED, t._onSizeChanged, t);
};
e.prototype._unregisterEvent = function() {
var t = this;
t.node.off(cc.Node.EventType.TOUCH_START, t._onTouchStart, t, !0);
t.node.off("touch-up", t._onTouchUp, t);
t.node.off(cc.Node.EventType.TOUCH_CANCEL, t._onTouchCancelled, t, !0);
t.node.off("scroll-began", t._onScrollBegan, t, !0);
t.node.off("scroll-ended", t._onScrollEnded, t, !0);
t.node.off("scrolling", t._onScrolling, t, !0);
t.node.off(cc.Node.EventType.SIZE_CHANGED, t._onSizeChanged, t);
};
e.prototype._init = function() {
var t = this;
if (!t._inited) {
t._scrollView = t.node.getComponent(cc.ScrollView);
t.content = t._scrollView.content;
if (t.content) {
t._layout = t.content.getComponent(cc.Layout);
t._align = t._layout.type;
t._resizeMode = t._layout.resizeMode;
t._startAxis = t._layout.startAxis;
t._topGap = t._layout.paddingTop;
t._rightGap = t._layout.paddingRight;
t._bottomGap = t._layout.paddingBottom;
t._leftGap = t._layout.paddingLeft;
t._columnGap = t._layout.spacingX;
t._lineGap = t._layout.spacingY;
t._colLineNum;
t._verticalDir = t._layout.verticalDirection;
t._horizontalDir = t._layout.horizontalDirection;
t.setTemplateItem(cc.instantiate(t.templateType == s.PREFAB ? t.tmpPrefab : t.tmpNode));
if (t._slideMode == a.ADHERING || t._slideMode == a.PAGE) {
t._scrollView.inertia = !1;
t._scrollView._onMouseWheel = function() {};
}
t.virtual || (t.lackCenter = !1);
t._lastDisplayData = [];
t.displayData = [];
t._pool = new cc.NodePool();
t._forceUpdate = !1;
t._updateCounter = 0;
t._updateDone = !0;
t.curPageNum = 0;
if (t.cyclic) {
t._scrollView._processAutoScrolling = this._processAutoScrolling.bind(t);
t._scrollView._startBounceBackIfNeeded = function() {
return !1;
};
}
switch (t._align) {
case cc.Layout.Type.HORIZONTAL:
switch (t._horizontalDir) {
case cc.Layout.HorizontalDirection.LEFT_TO_RIGHT:
t._alignCalcType = 1;
break;

case cc.Layout.HorizontalDirection.RIGHT_TO_LEFT:
t._alignCalcType = 2;
}
break;

case cc.Layout.Type.VERTICAL:
switch (t._verticalDir) {
case cc.Layout.VerticalDirection.TOP_TO_BOTTOM:
t._alignCalcType = 3;
break;

case cc.Layout.VerticalDirection.BOTTOM_TO_TOP:
t._alignCalcType = 4;
}
break;

case cc.Layout.Type.GRID:
switch (t._startAxis) {
case cc.Layout.AxisDirection.HORIZONTAL:
switch (t._verticalDir) {
case cc.Layout.VerticalDirection.TOP_TO_BOTTOM:
t._alignCalcType = 3;
break;

case cc.Layout.VerticalDirection.BOTTOM_TO_TOP:
t._alignCalcType = 4;
}
break;

case cc.Layout.AxisDirection.VERTICAL:
switch (t._horizontalDir) {
case cc.Layout.HorizontalDirection.LEFT_TO_RIGHT:
t._alignCalcType = 1;
break;

case cc.Layout.HorizontalDirection.RIGHT_TO_LEFT:
t._alignCalcType = 2;
}
}
}
t.content.removeAllChildren();
t._inited = !0;
} else cc.error(t.node.name + "'s cc.ScrollView unset content!");
}
};
e.prototype._processAutoScrolling = function(t) {
this._scrollView._autoScrollAccumulatedTime += 1 * t;
var e = Math.min(1, this._scrollView._autoScrollAccumulatedTime / this._scrollView._autoScrollTotalTime);
if (this._scrollView._autoScrollAttenuate) {
var i = e - 1;
e = i * i * i * i * i + 1;
}
var o = this._scrollView._autoScrollStartPosition.add(this._scrollView._autoScrollTargetDelta.mul(e)), n = this._scrollView.getScrollEndedEventTiming(), r = Math.abs(e - 1) <= n;
if (Math.abs(e - 1) <= this._scrollView.getScrollEndedEventTiming() && !this._scrollView._isScrollEndedWithThresholdEventFired) {
this._scrollView._dispatchEvent("scroll-ended-with-threshold");
this._scrollView._isScrollEndedWithThresholdEventFired = !0;
}
r && (this._scrollView._autoScrolling = !1);
var s = o.sub(this._scrollView.getContentPosition());
this._scrollView._moveContent(this._scrollView._clampDelta(s), r);
this._scrollView._dispatchEvent("scrolling");
if (!this._scrollView._autoScrolling) {
this._scrollView._isBouncing = !1;
this._scrollView._scrolling = !1;
this._scrollView._dispatchEvent("scroll-ended");
}
};
e.prototype.setTemplateItem = function(t) {
if (t) {
var e = this;
e._itemTmp = t;
e._resizeMode == cc.Layout.ResizeMode.CHILDREN ? e._itemSize = e._layout.cellSize : e._itemSize = cc.size(t.width, t.height);
var i = t.getComponent(m.default), o = !1;
i || (o = !0);
o && (e.selectedMode = c.NONE);
(i = t.getComponent(cc.Widget)) && i.enabled && (e._needUpdateWidget = !0);
e.selectedMode == c.MULT && (e.multSelected = []);
switch (e._align) {
case cc.Layout.Type.HORIZONTAL:
e._colLineNum = 1;
e._sizeType = !1;
break;

case cc.Layout.Type.VERTICAL:
e._colLineNum = 1;
e._sizeType = !0;
break;

case cc.Layout.Type.GRID:
switch (e._startAxis) {
case cc.Layout.AxisDirection.HORIZONTAL:
var n = e.content.width - e._leftGap - e._rightGap;
e._colLineNum = Math.floor((n + e._columnGap) / (e._itemSize.width + e._columnGap));
e._sizeType = !0;
break;

case cc.Layout.AxisDirection.VERTICAL:
var r = e.content.height - e._topGap - e._bottomGap;
e._colLineNum = Math.floor((r + e._lineGap) / (e._itemSize.height + e._lineGap));
e._sizeType = !1;
}
}
}
};
e.prototype.checkInited = function(t) {
void 0 === t && (t = !0);
if (!this._inited) {
t && cc.error("List initialization not completed!");
return !1;
}
return !0;
};
e.prototype._resizeContent = function() {
var t, e = this;
switch (e._align) {
case cc.Layout.Type.HORIZONTAL:
if (e._customSize) {
var i = e._getFixedSize(null);
t = e._leftGap + i.val + e._itemSize.width * (e._numItems - i.count) + e._columnGap * (e._numItems - 1) + e._rightGap;
} else t = e._leftGap + e._itemSize.width * e._numItems + e._columnGap * (e._numItems - 1) + e._rightGap;
break;

case cc.Layout.Type.VERTICAL:
if (e._customSize) {
i = e._getFixedSize(null);
t = e._topGap + i.val + e._itemSize.height * (e._numItems - i.count) + e._lineGap * (e._numItems - 1) + e._bottomGap;
} else t = e._topGap + e._itemSize.height * e._numItems + e._lineGap * (e._numItems - 1) + e._bottomGap;
break;

case cc.Layout.Type.GRID:
e.lackCenter && (e.lackCenter = !1);
switch (e._startAxis) {
case cc.Layout.AxisDirection.HORIZONTAL:
var o = Math.ceil(e._numItems / e._colLineNum);
t = e._topGap + e._itemSize.height * o + e._lineGap * (o - 1) + e._bottomGap;
break;

case cc.Layout.AxisDirection.VERTICAL:
var n = Math.ceil(e._numItems / e._colLineNum);
t = e._leftGap + e._itemSize.width * n + e._columnGap * (n - 1) + e._rightGap;
}
}
var r = e.content.getComponent(cc.Layout);
r && (r.enabled = !1);
e._allItemSize = t;
e._allItemSizeNoEdge = e._allItemSize - (e._sizeType ? e._topGap + e._bottomGap : e._leftGap + e._rightGap);
if (e.cyclic) {
var s = e._sizeType ? e.node.height : e.node.width;
e._cyclicPos1 = 0;
s -= e._cyclicPos1;
e._cyclicNum = Math.ceil(s / e._allItemSizeNoEdge) + 1;
var a = e._sizeType ? e._lineGap : e._columnGap;
e._cyclicPos2 = e._cyclicPos1 + e._allItemSizeNoEdge + a;
e._cyclicAllItemSize = e._allItemSize + e._allItemSizeNoEdge * (e._cyclicNum - 1) + a * (e._cyclicNum - 1);
e._cycilcAllItemSizeNoEdge = e._allItemSizeNoEdge * e._cyclicNum;
e._cycilcAllItemSizeNoEdge += a * (e._cyclicNum - 1);
}
e._lack = !e.cyclic && e._allItemSize < (e._sizeType ? e.node.height : e.node.width);
var c = e._lack && e.lackCenter || !e.lackSlide ? .1 : 0, l = e._lack ? (e._sizeType ? e.node.height : e.node.width) - c : e.cyclic ? e._cyclicAllItemSize : e._allItemSize;
l < 0 && (l = 0);
e._sizeType ? e.content.height = l : e.content.width = l;
};
e.prototype._onScrolling = function(t) {
void 0 === t && (t = null);
null == this.frameCount && (this.frameCount = this._updateRate);
if (!this._forceUpdate && t && "scroll-ended" != t.type && this.frameCount > 0) this.frameCount--; else {
this.frameCount = this._updateRate;
if (!this._aniDelRuning) {
if (this.cyclic) {
var e = this.content.getPosition();
e = this._sizeType ? e.y : e.x;
var i = this._allItemSizeNoEdge + (this._sizeType ? this._lineGap : this._columnGap), o = this._sizeType ? cc.v2(0, i) : cc.v2(i, 0);
switch (this._alignCalcType) {
case 1:
if (e > -this._cyclicPos1) {
this.content.x = -this._cyclicPos2;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.sub(o));
} else if (e < -this._cyclicPos2) {
this.content.x = -this._cyclicPos1;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.add(o));
}
break;

case 2:
if (e < this._cyclicPos1) {
this.content.x = this._cyclicPos2;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.add(o));
} else if (e > this._cyclicPos2) {
this.content.x = this._cyclicPos1;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.sub(o));
}
break;

case 3:
if (e < this._cyclicPos1) {
this.content.y = this._cyclicPos2;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.add(o));
} else if (e > this._cyclicPos2) {
this.content.y = this._cyclicPos1;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.sub(o));
}
break;

case 4:
if (e > -this._cyclicPos1) {
this.content.y = -this._cyclicPos2;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.sub(o));
} else if (e < -this._cyclicPos2) {
this.content.y = -this._cyclicPos1;
this._scrollView.isAutoScrolling() && (this._scrollView._autoScrollStartPosition = this._scrollView._autoScrollStartPosition.add(o));
}
}
}
this._calcViewPos();
var n, r, s, a;
if (this._sizeType) {
n = this.viewTop;
s = this.viewBottom;
} else {
r = this.viewRight;
a = this.viewLeft;
}
if (this._virtual) {
this.displayData = [];
var c = void 0, l = 0, d = this._numItems - 1;
if (this._customSize) for (var h = !1; l <= d && !h; l++) {
c = this._calcItemPos(l);
switch (this._align) {
case cc.Layout.Type.HORIZONTAL:
c.right >= a && c.left <= r ? this.displayData.push(c) : 0 != l && this.displayData.length > 0 && (h = !0);
break;

case cc.Layout.Type.VERTICAL:
c.bottom <= n && c.top >= s ? this.displayData.push(c) : 0 != l && this.displayData.length > 0 && (h = !0);
break;

case cc.Layout.Type.GRID:
switch (this._startAxis) {
case cc.Layout.AxisDirection.HORIZONTAL:
c.bottom <= n && c.top >= s ? this.displayData.push(c) : 0 != l && this.displayData.length > 0 && (h = !0);
break;

case cc.Layout.AxisDirection.VERTICAL:
c.right >= a && c.left <= r ? this.displayData.push(c) : 0 != l && this.displayData.length > 0 && (h = !0);
}
}
} else {
var u = this._itemSize.width + this._columnGap, p = this._itemSize.height + this._lineGap;
switch (this._alignCalcType) {
case 1:
l = (a - this._leftGap) / u;
d = (r - this._leftGap) / u;
break;

case 2:
l = (-r - this._rightGap) / u;
d = (-a - this._rightGap) / u;
break;

case 3:
l = (-n - this._topGap) / p;
d = (-s - this._topGap) / p;
break;

case 4:
l = (s - this._bottomGap) / p;
d = (n - this._bottomGap) / p;
}
l = Math.floor(l) * this._colLineNum;
d = Math.ceil(d) * this._colLineNum;
l < 0 && (l = 0);
--d >= this._numItems && (d = this._numItems - 1);
for (;l <= d; l++) this.displayData.push(this._calcItemPos(l));
}
this._delRedundantItem();
if (this.displayData.length <= 0 || !this._numItems) {
this._lastDisplayData = [];
return;
}
this.firstListId = this.displayData[0].id;
this.displayItemNum = this.displayData.length;
var f = this._lastDisplayData.length, _ = this.displayItemNum != f;
if (_) {
this.frameByFrameRenderNum > 0 && this._lastDisplayData.sort(function(t, e) {
return t - e;
});
_ = this.firstListId != this._lastDisplayData[0] || this.displayData[this.displayItemNum - 1].id != this._lastDisplayData[f - 1];
}
if (this._forceUpdate || _) if (this.frameByFrameRenderNum > 0) if (this._numItems > 0) {
this._updateDone ? this._updateCounter = 0 : this._doneAfterUpdate = !0;
this._updateDone = !1;
} else {
this._updateCounter = 0;
this._updateDone = !0;
} else {
this._lastDisplayData = [];
for (var m = 0; m < this.displayItemNum; m++) this._createOrUpdateItem(this.displayData[m]);
this._forceUpdate = !1;
}
this._calcNearestItem();
}
}
}
};
e.prototype._calcViewPos = function() {
var t = this.content.getPosition();
switch (this._alignCalcType) {
case 1:
this.elasticLeft = t.x > 0 ? t.x : 0;
this.viewLeft = (t.x < 0 ? -t.x : 0) - this.elasticLeft;
this.viewRight = this.viewLeft + this.node.width;
this.elasticRight = this.viewRight > this.content.width ? Math.abs(this.viewRight - this.content.width) : 0;
this.viewRight += this.elasticRight;
break;

case 2:
this.elasticRight = t.x < 0 ? -t.x : 0;
this.viewRight = (t.x > 0 ? -t.x : 0) + this.elasticRight;
this.viewLeft = this.viewRight - this.node.width;
this.elasticLeft = this.viewLeft < -this.content.width ? Math.abs(this.viewLeft + this.content.width) : 0;
this.viewLeft -= this.elasticLeft;
break;

case 3:
this.elasticTop = t.y < 0 ? Math.abs(t.y) : 0;
this.viewTop = (t.y > 0 ? -t.y : 0) + this.elasticTop;
this.viewBottom = this.viewTop - this.node.height;
this.elasticBottom = this.viewBottom < -this.content.height ? Math.abs(this.viewBottom + this.content.height) : 0;
this.viewBottom += this.elasticBottom;
break;

case 4:
this.elasticBottom = t.y > 0 ? Math.abs(t.y) : 0;
this.viewBottom = (t.y < 0 ? -t.y : 0) - this.elasticBottom;
this.viewTop = this.viewBottom + this.node.height;
this.elasticTop = this.viewTop > this.content.height ? Math.abs(this.viewTop - this.content.height) : 0;
this.viewTop -= this.elasticTop;
}
};
e.prototype._calcItemPos = function(t) {
var e, i, o, n, r, s, a, c;
switch (this._align) {
case cc.Layout.Type.HORIZONTAL:
switch (this._horizontalDir) {
case cc.Layout.HorizontalDirection.LEFT_TO_RIGHT:
if (this._customSize) {
var l = this._getFixedSize(t);
r = this._leftGap + (this._itemSize.width + this._columnGap) * (t - l.count) + (l.val + this._columnGap * l.count);
e = (d = this._customSize[t]) > 0 ? d : this._itemSize.width;
} else {
r = this._leftGap + (this._itemSize.width + this._columnGap) * t;
e = this._itemSize.width;
}
if (this.lackCenter) {
r -= this._leftGap;
r += this.content.width / 2 - this._allItemSizeNoEdge / 2;
}
return {
id: t,
left: r,
right: s = r + e,
x: r + this._itemTmp.anchorX * e,
y: this._itemTmp.y
};

case cc.Layout.HorizontalDirection.RIGHT_TO_LEFT:
if (this._customSize) {
l = this._getFixedSize(t);
s = -this._rightGap - (this._itemSize.width + this._columnGap) * (t - l.count) - (l.val + this._columnGap * l.count);
e = (d = this._customSize[t]) > 0 ? d : this._itemSize.width;
} else {
s = -this._rightGap - (this._itemSize.width + this._columnGap) * t;
e = this._itemSize.width;
}
if (this.lackCenter) {
s += this._rightGap;
s -= this.content.width / 2 - this._allItemSizeNoEdge / 2;
}
return {
id: t,
right: s,
left: r = s - e,
x: r + this._itemTmp.anchorX * e,
y: this._itemTmp.y
};
}
break;

case cc.Layout.Type.VERTICAL:
switch (this._verticalDir) {
case cc.Layout.VerticalDirection.TOP_TO_BOTTOM:
if (this._customSize) {
l = this._getFixedSize(t);
o = -this._topGap - (this._itemSize.height + this._lineGap) * (t - l.count) - (l.val + this._lineGap * l.count);
i = (d = this._customSize[t]) > 0 ? d : this._itemSize.height;
} else {
o = -this._topGap - (this._itemSize.height + this._lineGap) * t;
i = this._itemSize.height;
}
if (this.lackCenter) {
o += this._topGap;
o -= this.content.height / 2 - this._allItemSizeNoEdge / 2;
}
return {
id: t,
top: o,
bottom: n = o - i,
x: this._itemTmp.x,
y: n + this._itemTmp.anchorY * i
};

case cc.Layout.VerticalDirection.BOTTOM_TO_TOP:
if (this._customSize) {
var d;
l = this._getFixedSize(t);
n = this._bottomGap + (this._itemSize.height + this._lineGap) * (t - l.count) + (l.val + this._lineGap * l.count);
i = (d = this._customSize[t]) > 0 ? d : this._itemSize.height;
} else {
n = this._bottomGap + (this._itemSize.height + this._lineGap) * t;
i = this._itemSize.height;
}
if (this.lackCenter) {
n -= this._bottomGap;
n += this.content.height / 2 - this._allItemSizeNoEdge / 2;
}
return {
id: t,
top: o = n + i,
bottom: n,
x: this._itemTmp.x,
y: n + this._itemTmp.anchorY * i
};
}

case cc.Layout.Type.GRID:
var h = Math.floor(t / this._colLineNum);
switch (this._startAxis) {
case cc.Layout.AxisDirection.HORIZONTAL:
switch (this._verticalDir) {
case cc.Layout.VerticalDirection.TOP_TO_BOTTOM:
c = (n = (o = -this._topGap - (this._itemSize.height + this._lineGap) * h) - this._itemSize.height) + this._itemTmp.anchorY * this._itemSize.height;
break;

case cc.Layout.VerticalDirection.BOTTOM_TO_TOP:
o = (n = this._bottomGap + (this._itemSize.height + this._lineGap) * h) + this._itemSize.height;
c = n + this._itemTmp.anchorY * this._itemSize.height;
}
a = this._leftGap + t % this._colLineNum * (this._itemSize.width + this._columnGap);
switch (this._horizontalDir) {
case cc.Layout.HorizontalDirection.LEFT_TO_RIGHT:
a += this._itemTmp.anchorX * this._itemSize.width;
a -= this.content.anchorX * this.content.width;
break;

case cc.Layout.HorizontalDirection.RIGHT_TO_LEFT:
a += (1 - this._itemTmp.anchorX) * this._itemSize.width;
a -= (1 - this.content.anchorX) * this.content.width;
a *= -1;
}
return {
id: t,
top: o,
bottom: n,
x: a,
y: c
};

case cc.Layout.AxisDirection.VERTICAL:
switch (this._horizontalDir) {
case cc.Layout.HorizontalDirection.LEFT_TO_RIGHT:
s = (r = this._leftGap + (this._itemSize.width + this._columnGap) * h) + this._itemSize.width;
a = r + this._itemTmp.anchorX * this._itemSize.width;
a -= this.content.anchorX * this.content.width;
break;

case cc.Layout.HorizontalDirection.RIGHT_TO_LEFT:
a = (r = (s = -this._rightGap - (this._itemSize.width + this._columnGap) * h) - this._itemSize.width) + this._itemTmp.anchorX * this._itemSize.width;
a += (1 - this.content.anchorX) * this.content.width;
}
c = -this._topGap - t % this._colLineNum * (this._itemSize.height + this._lineGap);
switch (this._verticalDir) {
case cc.Layout.VerticalDirection.TOP_TO_BOTTOM:
c -= (1 - this._itemTmp.anchorY) * this._itemSize.height;
c += (1 - this.content.anchorY) * this.content.height;
break;

case cc.Layout.VerticalDirection.BOTTOM_TO_TOP:
c -= this._itemTmp.anchorY * this._itemSize.height;
c += this.content.anchorY * this.content.height;
c *= -1;
}
return {
id: t,
left: r,
right: s,
x: a,
y: c
};
}
}
};
e.prototype._calcExistItemPos = function(t) {
var e = this.getItemByListId(t);
if (!e) return null;
var i = {
id: t,
x: e.x,
y: e.y
};
if (this._sizeType) {
i.top = e.y + e.height * (1 - e.anchorY);
i.bottom = e.y - e.height * e.anchorY;
} else {
i.left = e.x - e.width * e.anchorX;
i.right = e.x + e.width * (1 - e.anchorX);
}
return i;
};
e.prototype.getItemPos = function(t) {
return this._virtual ? this._calcItemPos(t) : this.frameByFrameRenderNum ? this._calcItemPos(t) : this._calcExistItemPos(t);
};
e.prototype._getFixedSize = function(t) {
if (!this._customSize) return null;
null == t && (t = this._numItems);
var e = 0, i = 0;
for (var o in this._customSize) if (parseInt(o) < t) {
e += this._customSize[o];
i++;
}
return {
val: e,
count: i
};
};
e.prototype._onScrollBegan = function() {
this._beganPos = this._sizeType ? this.viewTop : this.viewLeft;
};
e.prototype._onScrollEnded = function() {
var t = this;
t.curScrollIsTouch = !1;
if (null != t.scrollToListId) {
var e = t.getItemByListId(t.scrollToListId);
t.scrollToListId = null;
e && cc.tween(e).to(.1, {
scale: 1.06
}).to(.1, {
scale: 1
}).start();
}
t._onScrolling();
t._slideMode != a.ADHERING || t.adhering ? t._slideMode == a.PAGE && (null != t._beganPos && t.curScrollIsTouch ? this._pageAdhere() : t.adhere()) : t.adhere();
};
e.prototype._onTouchStart = function(t, e) {
if (!(this._scrollView.hasNestedViewGroup && this._scrollView.hasNestedViewGroup(t, e) || this._scrollView._hasNestedViewGroup && this._scrollView._hasNestedViewGroup(t, e))) {
this.curScrollIsTouch = !0;
if (t.eventPhase !== cc.Event.AT_TARGET || t.target !== this.node) {
for (var i = t.target; null == i._listId && i.parent; ) i = i.parent;
this._scrollItem = null != i._listId ? i : t.target;
}
}
};
e.prototype._onTouchUp = function() {
var t = this;
t._scrollPos = null;
if (t._slideMode == a.ADHERING) {
this.adhering && (this._adheringBarrier = !0);
t.adhere();
} else t._slideMode == a.PAGE && (null != t._beganPos ? this._pageAdhere() : t.adhere());
this._scrollItem = null;
};
e.prototype._onTouchCancelled = function(t, e) {
var i = this;
if (!(i._scrollView.hasNestedViewGroup && (i._scrollView.hasNestedViewGroup(t, e) || t.simulate) || i._scrollView._hasNestedViewGroup && (i._scrollView._hasNestedViewGroup(t, e) || t.simulate))) {
i._scrollPos = null;
if (i._slideMode == a.ADHERING) {
i.adhering && (i._adheringBarrier = !0);
i.adhere();
} else i._slideMode == a.PAGE && (null != i._beganPos ? i._pageAdhere() : i.adhere());
this._scrollItem = null;
}
};
e.prototype._onSizeChanged = function() {
this.checkInited(!1) && this._onScrolling();
};
e.prototype._onItemAdaptive = function(t) {
if (!this._sizeType && t.width != this._itemSize.width || this._sizeType && t.height != this._itemSize.height) {
this._customSize || (this._customSize = {});
var e = this._sizeType ? t.height : t.width;
if (this._customSize[t._listId] != e) {
this._customSize[t._listId] = e;
this._resizeContent();
this.updateAll();
if (null != this._scrollToListId) {
this._scrollPos = null;
this.unschedule(this._scrollToSo);
this.scrollTo(this._scrollToListId, Math.max(0, this._scrollToEndTime - new Date().getTime() / 1e3));
}
}
}
};
e.prototype._pageAdhere = function() {
var t = this;
if (t.cyclic || !(t.elasticTop > 0 || t.elasticRight > 0 || t.elasticBottom > 0 || t.elasticLeft > 0)) {
var e = t._sizeType ? t.viewTop : t.viewLeft, i = (t._sizeType ? t.node.height : t.node.width) * t.pageDistance;
if (Math.abs(t._beganPos - e) > i) switch (t._alignCalcType) {
case 1:
case 4:
t._beganPos > e ? t.prePage(.5) : t.nextPage(.5);
break;

case 2:
case 3:
t._beganPos < e ? t.prePage(.5) : t.nextPage(.5);
} else t.elasticTop <= 0 && t.elasticRight <= 0 && t.elasticBottom <= 0 && t.elasticLeft <= 0 && t.adhere();
t._beganPos = null;
}
};
e.prototype.adhere = function() {
var t = this;
if (t.checkInited() && !(t.elasticTop > 0 || t.elasticRight > 0 || t.elasticBottom > 0 || t.elasticLeft > 0)) {
t.adhering = !0;
t._calcNearestItem();
var e = (t._sizeType ? t._topGap : t._leftGap) / (t._sizeType ? t.node.height : t.node.width);
t.scrollTo(t.nearestListId, .7, e);
}
};
e.prototype.update = function() {
if (!(this.frameByFrameRenderNum <= 0 || this._updateDone)) if (this._virtual) {
for (var t = this._updateCounter + this.frameByFrameRenderNum > this.displayItemNum ? this.displayItemNum : this._updateCounter + this.frameByFrameRenderNum, e = this._updateCounter; e < t; e++) {
var i = this.displayData[e];
i && this._createOrUpdateItem(i);
}
if (this._updateCounter >= this.displayItemNum - 1) if (this._doneAfterUpdate) {
this._updateCounter = 0;
this._updateDone = !1;
this._doneAfterUpdate = !1;
} else {
this._updateDone = !0;
this._delRedundantItem();
this._forceUpdate = !1;
this._calcNearestItem();
this.slideMode == a.PAGE && (this.curPageNum = this.nearestListId);
} else this._updateCounter += this.frameByFrameRenderNum;
} else if (this._updateCounter < this._numItems) {
for (t = this._updateCounter + this.frameByFrameRenderNum > this._numItems ? this._numItems : this._updateCounter + this.frameByFrameRenderNum, 
e = this._updateCounter; e < t; e++) this._createOrUpdateItem2(e);
this._updateCounter += this.frameByFrameRenderNum;
} else {
this._updateDone = !0;
this._calcNearestItem();
this.slideMode == a.PAGE && (this.curPageNum = this.nearestListId);
}
};
e.prototype._createOrUpdateItem = function(t) {
var e = this.getItemByListId(t.id);
if (e) {
if (this._forceUpdate && this.renderEvent) {
e.setPosition(cc.v2(t.x, t.y));
this._resetItemSize(e);
this.renderEvent && cc.Component.EventHandler.emitEvents([ this.renderEvent ], e, t.id % this._actualNumItems);
}
} else {
var i = this._pool.size() > 0;
e = i ? this._pool.get() : cc.instantiate(this._itemTmp);
if (!i || !cc.isValid(e)) {
e = cc.instantiate(this._itemTmp);
i = !1;
}
if (e._listId != t.id) {
e._listId = t.id;
e.setContentSize(this._itemSize);
}
e.setPosition(cc.v2(t.x, t.y));
this._resetItemSize(e);
this.content.addChild(e);
if (i && this._needUpdateWidget) {
var o = e.getComponent(cc.Widget);
o && o.updateAlignment();
}
e.setSiblingIndex(this.content.childrenCount - 1);
var n = e.getComponent(m.default);
e.listItem = n;
if (n) {
n.listId = t.id;
n.list = this;
n._registerEvent();
}
this.renderEvent && cc.Component.EventHandler.emitEvents([ this.renderEvent ], e, t.id % this._actualNumItems);
}
this._resetItemSize(e);
this._updateListItem(e.listItem);
this._lastDisplayData.indexOf(t.id) < 0 && this._lastDisplayData.push(t.id);
};
e.prototype._createOrUpdateItem2 = function(t) {
var e, i = this.content.children[t];
if (i) {
if (this._forceUpdate && this.renderEvent) {
i._listId = t;
e && (e.listId = t);
this.renderEvent && cc.Component.EventHandler.emitEvents([ this.renderEvent ], i, t % this._actualNumItems);
}
} else {
(i = cc.instantiate(this._itemTmp))._listId = t;
this.content.addChild(i);
e = i.getComponent(m.default);
i.listItem = e;
if (e) {
e.listId = t;
e.list = this;
e._registerEvent();
}
this.renderEvent && cc.Component.EventHandler.emitEvents([ this.renderEvent ], i, t % this._actualNumItems);
}
this._updateListItem(e);
this._lastDisplayData.indexOf(t) < 0 && this._lastDisplayData.push(t);
};
e.prototype._updateListItem = function(t) {
if (t && this.selectedMode > c.NONE) {
var e = t.node;
switch (this.selectedMode) {
case c.SINGLE:
t.selected = this.selectedId == e._listId;
break;

case c.MULT:
t.selected = this.multSelected.indexOf(e._listId) >= 0;
}
}
};
e.prototype._resetItemSize = function() {};
e.prototype._updateItemPos = function(t) {
var e = isNaN(t) ? t : this.getItemByListId(t), i = this.getItemPos(e._listId);
e.setPosition(i.x, i.y);
};
e.prototype.setMultSelected = function(t, e) {
var i = this;
if (i.checkInited()) {
Array.isArray(t) || (t = [ t ]);
if (null == e) i.multSelected = t; else {
var o = void 0, n = void 0;
if (e) for (var r = t.length - 1; r >= 0; r--) {
o = t[r];
(n = i.multSelected.indexOf(o)) < 0 && i.multSelected.push(o);
} else for (r = t.length - 1; r >= 0; r--) {
o = t[r];
(n = i.multSelected.indexOf(o)) >= 0 && i.multSelected.splice(n, 1);
}
}
i._forceUpdate = !0;
i._onScrolling();
}
};
e.prototype.getMultSelected = function() {
return this.multSelected;
};
e.prototype.hasMultSelected = function(t) {
return this.multSelected && this.multSelected.indexOf(t) >= 0;
};
e.prototype.updateItem = function(t) {
if (this.checkInited()) {
Array.isArray(t) || (t = [ t ]);
for (var e = 0, i = t.length; e < i; e++) {
var o = t[e], n = this.getItemByListId(o);
n && cc.Component.EventHandler.emitEvents([ this.renderEvent ], n, o % this._actualNumItems);
}
}
};
e.prototype.updateAll = function() {
this.checkInited() && (this.numItems = this.numItems);
};
e.prototype.getItemByListId = function(t) {
if (this.content) for (var e = this.content.childrenCount - 1; e >= 0; e--) {
var i = this.content.children[e];
if (i._listId == t) return i;
}
};
e.prototype._getOutsideItem = function() {
for (var t, e = [], i = this.content.childrenCount - 1; i >= 0; i--) {
t = this.content.children[i];
this.displayData.find(function(e) {
return e.id == t._listId;
}) || e.push(t);
}
return e;
};
e.prototype._delRedundantItem = function() {
if (this._virtual) for (var t = this._getOutsideItem(), e = t.length - 1; e >= 0; e--) {
var i = t[e];
if (!this._scrollItem || i._listId != this._scrollItem._listId) {
i.isCached = !0;
this._pool.put(i);
for (var o = this._lastDisplayData.length - 1; o >= 0; o--) if (this._lastDisplayData[o] == i._listId) {
this._lastDisplayData.splice(o, 1);
break;
}
}
} else for (;this.content.childrenCount > this._numItems; ) this._delSingleItem(this.content.children[this.content.childrenCount - 1]);
};
e.prototype._delSingleItem = function(t) {
t.removeFromParent();
t.destroy && t.destroy();
t = null;
};
e.prototype.aniDelItem = function(t, e, i) {
var o = this;
if (!o.checkInited() || o.cyclic || !o._virtual) return cc.error("This function is not allowed to be called!");
if (!e) return cc.error("CallFunc are not allowed to be NULL, You need to delete the corresponding index in the data array in the CallFunc!");
if (o._aniDelRuning) return cc.warn("Please wait for the current deletion to finish!");
var n, r = o.getItemByListId(t);
if (r) {
n = r.getComponent(m.default);
o._aniDelRuning = !0;
o._aniDelCB = e;
o._aniDelItem = r;
o._aniDelBeforePos = r.position;
o._aniDelBeforeScale = r.scale;
var s = o.displayData[o.displayData.length - 1].id, a = n.selected;
n.showAni(i, function() {
var i, n, l;
s < o._numItems - 2 && (i = s + 1);
if (null != i) {
var d = o._calcItemPos(i);
o.displayData.push(d);
o._virtual ? o._createOrUpdateItem(d) : o._createOrUpdateItem2(i);
} else o._numItems--;
if (o.selectedMode == c.SINGLE) a ? o._selectedId = -1 : o._selectedId - 1 >= 0 && o._selectedId--; else if (o.selectedMode == c.MULT && o.multSelected.length) {
var h = o.multSelected.indexOf(t);
h >= 0 && o.multSelected.splice(h, 1);
for (var u = o.multSelected.length - 1; u >= 0; u--) (_ = o.multSelected[u]) >= t && o.multSelected[u]--;
}
if (o._customSize) {
o._customSize[t] && delete o._customSize[t];
var p = {}, f = void 0;
for (var _ in o._customSize) {
f = o._customSize[_];
var m = parseInt(_);
p[m - (m >= t ? 1 : 0)] = f;
}
o._customSize = p;
}
for (u = null != i ? i : s; u >= t + 1; u--) if (r = o.getItemByListId(u)) {
var y = o._calcItemPos(u - 1);
n = cc.tween(r).to(.2333, {
position: cc.v2(y.x, y.y)
});
if (u <= t + 1) {
l = !0;
n.call(function() {
o._aniDelRuning = !1;
e(t);
delete o._aniDelCB;
});
}
n.start();
}
if (!l) {
o._aniDelRuning = !1;
e(t);
o._aniDelCB = null;
}
}, !0);
} else e(t);
};
e.prototype.scrollTo = function(t, e, i, o) {
void 0 === e && (e = .5);
void 0 === i && (i = null);
void 0 === o && (o = !1);
var n = this;
if (n.checkInited(!1)) {
null == e ? e = .5 : e < 0 && (e = 0);
t < 0 ? t = 0 : t >= n._numItems && (t = n._numItems - 1);
!n._virtual && n._layout && n._layout.enabled && n._layout.updateLayout();
var r, s, a = n.getItemPos(t);
if (!a) return !1;
switch (n._alignCalcType) {
case 1:
r = a.left;
r -= null != i ? n.node.width * i : n._leftGap;
a = cc.v2(r, 0);
break;

case 2:
r = a.right - n.node.width;
r += null != i ? n.node.width * i : n._rightGap;
a = cc.v2(r + n.content.width, 0);
break;

case 3:
s = a.top;
s += null != i ? n.node.height * i : n._topGap;
a = cc.v2(0, -s);
break;

case 4:
s = a.bottom + n.node.height;
s -= null != i ? n.node.height * i : n._bottomGap;
a = cc.v2(0, -s + n.content.height);
}
var c = n.content.getPosition();
c = Math.abs(n._sizeType ? c.y : c.x);
var l = n._sizeType ? a.y : a.x;
if (Math.abs((null != n._scrollPos ? n._scrollPos : c) - l) > .5) {
n._scrollView.scrollToOffset(a, e);
n._scrollToListId = t;
n._scrollToEndTime = new Date().getTime() / 1e3 + e;
n._scrollToSo = n.scheduleOnce(function() {
n._adheringBarrier || (n.adhering = n._adheringBarrier = !1);
n._scrollPos = n._scrollToListId = n._scrollToEndTime = n._scrollToSo = null;
if (o) {
var e = n.getItemByListId(t);
e && cc.tween(e).to(.1, {
scale: 1.05
}).to(.1, {
scale: 1
}).start();
}
}, e + .1);
e <= 0 && n._onScrolling();
}
}
};
e.prototype._calcNearestItem = function() {
var t, e, i, o, n, r, s = this;
s.nearestListId = null;
s._virtual && s._calcViewPos();
i = s.viewTop;
o = s.viewRight;
n = s.viewBottom;
r = s.viewLeft;
for (var a = !1, c = 0; c < s.content.childrenCount && !a; c += s._colLineNum) if (t = s._virtual ? s.displayData[c] : s._calcExistItemPos(c)) {
e = s._sizeType ? (t.top + t.bottom) / 2 : e = (t.left + t.right) / 2;
switch (s._alignCalcType) {
case 1:
if (t.right >= r) {
s.nearestListId = t.id;
r > e && (s.nearestListId += s._colLineNum);
a = !0;
}
break;

case 2:
if (t.left <= o) {
s.nearestListId = t.id;
o < e && (s.nearestListId += s._colLineNum);
a = !0;
}
break;

case 3:
if (t.bottom <= i) {
s.nearestListId = t.id;
i < e && (s.nearestListId += s._colLineNum);
a = !0;
}
break;

case 4:
if (t.top >= n) {
s.nearestListId = t.id;
n > e && (s.nearestListId += s._colLineNum);
a = !0;
}
}
}
if ((t = s._virtual ? s.displayData[s.displayItemNum - 1] : s._calcExistItemPos(s._numItems - 1)) && t.id == s._numItems - 1) {
e = s._sizeType ? (t.top + t.bottom) / 2 : e = (t.left + t.right) / 2;
switch (s._alignCalcType) {
case 1:
o > e && (s.nearestListId = t.id);
break;

case 2:
r < e && (s.nearestListId = t.id);
break;

case 3:
n < e && (s.nearestListId = t.id);
break;

case 4:
i > e && (s.nearestListId = t.id);
}
}
};
e.prototype.prePage = function(t) {
void 0 === t && (t = .5);
this.checkInited() && this.skipPage(this.curPageNum - 1, t);
};
e.prototype.nextPage = function(t) {
void 0 === t && (t = .5);
this.checkInited() && this.skipPage(this.curPageNum + 1, t);
};
e.prototype.skipPage = function(t, e) {
var i = this;
if (i.checkInited()) {
if (i._slideMode != a.PAGE) return cc.error("This function is not allowed to be called, Must SlideMode = PAGE!");
if (!(t < 0 || t >= i._numItems) && i.curPageNum != t) {
i.curPageNum = t;
i.pageChangeEvent && cc.Component.EventHandler.emitEvents([ i.pageChangeEvent ], t);
i.scrollTo(t, e);
}
}
};
e.prototype.calcCustomSize = function(t) {
var e = this;
if (e.checkInited()) {
if (!e._itemTmp) return cc.error("Unset template item!");
if (!e.renderEvent) return cc.error("Unset Render-Event!");
e._customSize = {};
var i = cc.instantiate(e._itemTmp);
e.content.addChild(i);
for (var o = 0; o < t; o++) {
cc.Component.EventHandler.emitEvents([ e.renderEvent ], i, o);
i.height == e._itemSize.height && i.width == e._itemSize.width || (e._customSize[o] = e._sizeType ? i.height : i.width);
}
Object.keys(e._customSize).length || (e._customSize = null);
i.removeFromParent();
i.destroy && i.destroy();
return e._customSize;
}
};
r([ h({
type: cc.Enum(s),
tooltip: !1
}) ], e.prototype, "templateType", void 0);
r([ h({
type: cc.Node,
tooltip: !1,
visible: function() {
return this.templateType == s.NODE;
}
}) ], e.prototype, "tmpNode", void 0);
r([ h({
type: cc.Prefab,
tooltip: !1,
visible: function() {
return this.templateType == s.PREFAB;
}
}) ], e.prototype, "tmpPrefab", void 0);
r([ h() ], e.prototype, "_slideMode", void 0);
r([ h({
type: cc.Enum(a),
tooltip: !1
}) ], e.prototype, "slideMode", null);
r([ h({
type: cc.Float,
range: [ 0, 1, .1 ],
tooltip: !1,
slide: !0,
visible: function() {
return this._slideMode == a.PAGE;
}
}) ], e.prototype, "pageDistance", void 0);
r([ h({
type: cc.Component.EventHandler,
tooltip: !1,
visible: function() {
return this._slideMode == a.PAGE;
}
}) ], e.prototype, "pageChangeEvent", void 0);
r([ h() ], e.prototype, "_virtual", void 0);
r([ h({
type: cc.Boolean,
tooltip: !1
}) ], e.prototype, "virtual", null);
r([ h({
tooltip: !1,
visible: function() {
var t = this.slideMode == a.NORMAL;
t || (this.cyclic = !1);
return t;
}
}) ], e.prototype, "cyclic", void 0);
r([ h({
tooltip: !1,
visible: function() {
return this.virtual;
}
}) ], e.prototype, "lackCenter", void 0);
r([ h({
tooltip: !1,
visible: function() {
var t = this.virtual && !this.lackCenter;
t || (this.lackSlide = !1);
return t;
}
}) ], e.prototype, "lackSlide", void 0);
r([ h({
type: cc.Integer
}) ], e.prototype, "_updateRate", void 0);
r([ h({
type: cc.Integer,
range: [ 0, 6, 1 ],
tooltip: !1,
slide: !0
}) ], e.prototype, "updateRate", null);
r([ h({
type: cc.Integer,
range: [ 0, 12, 1 ],
tooltip: !1,
slide: !0
}) ], e.prototype, "frameByFrameRenderNum", void 0);
r([ h({
type: cc.Component.EventHandler,
tooltip: !1
}) ], e.prototype, "renderEvent", void 0);
r([ h({
type: cc.Enum(c),
tooltip: !1
}) ], e.prototype, "selectedMode", void 0);
r([ h({
tooltip: !1,
visible: function() {
return this.selectedMode == c.SINGLE;
}
}) ], e.prototype, "repeatEventSingle", void 0);
r([ h({
type: cc.Component.EventHandler,
tooltip: !1,
visible: function() {
return this.selectedMode > c.NONE;
}
}) ], e.prototype, "selectedEvent", void 0);
r([ h({
serializable: !1
}) ], e.prototype, "_numItems", void 0);
return r([ d, u(), p("自定义组件/List"), _(cc.ScrollView), f(-5e3) ], e);
}(cc.Component);
i.default = y;
cc._RF.pop();
}, {
"./ListItem": "ListItem"
} ],
LoadLayer: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "2c108snMHVGyZ94j6mfDSSw", "LoadLayer");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
}, s = this && this.__awaiter || function(t, e, i, o) {
return new (i || (i = Promise))(function(n, r) {
function s(t) {
try {
c(o.next(t));
} catch (t) {
r(t);
}
}
function a(t) {
try {
c(o.throw(t));
} catch (t) {
r(t);
}
}
function c(t) {
t.done ? n(t.value) : (e = t.value, e instanceof i ? e : new i(function(t) {
t(e);
})).then(s, a);
var e;
}
c((o = o.apply(t, e || [])).next());
});
}, a = this && this.__generator || function(t, e) {
var i, o, n, r, s = {
label: 0,
sent: function() {
if (1 & n[0]) throw n[1];
return n[1];
},
trys: [],
ops: []
};
return r = {
next: a(0),
throw: a(1),
return: a(2)
}, "function" == typeof Symbol && (r[Symbol.iterator] = function() {
return this;
}), r;
function a(t) {
return function(e) {
return c([ t, e ]);
};
}
function c(r) {
if (i) throw new TypeError("Generator is already executing.");
for (;s; ) try {
if (i = 1, o && (n = 2 & r[0] ? o.return : r[0] ? o.throw || ((n = o.return) && n.call(o), 
0) : o.next) && !(n = n.call(o, r[1])).done) return n;
(o = 0, n) && (r = [ 2 & r[0], n.value ]);
switch (r[0]) {
case 0:
case 1:
n = r;
break;

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

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

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

default:
if (!(n = s.trys, n = n.length > 0 && n[n.length - 1]) && (6 === r[0] || 2 === r[0])) {
s = 0;
continue;
}
if (3 === r[0] && (!n || r[1] > n[0] && r[1] < n[3])) {
s.label = r[1];
break;
}
if (6 === r[0] && s.label < n[1]) {
s.label = n[1];
n = r;
break;
}
if (n && s.label < n[2]) {
s.label = n[2];
s.ops.push(r);
break;
}
n[2] && s.ops.pop();
s.trys.pop();
continue;
}
r = e.call(t, s);
} catch (t) {
r = [ 6, t ];
o = 0;
} finally {
i = n = 0;
}
if (5 & r[0]) throw r[1];
return {
value: r[0] ? r[1] : void 0,
done: !0
};
}
};
Object.defineProperty(i, "__esModule", {
value: !0
});
i.LoadLayer = void 0;
var c = t("../../../../framework/main/Constants"), l = t("../../../../framework/utils/UiUtil"), d = t("../../../../start/src/ShuFenReport"), h = t("../text/LocalizedTextManager"), u = cc._decorator, p = u.ccclass, f = u.property, _ = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.tipsLabel = null;
e.loadingLabel = null;
e.loadingProgress = null;
e.sheepParent = null;
e.jsonText = null;
e.loadingTime = 0;
e.tipsUpdateTimer = 0;
return e;
}
i = e;
e.setMaxProgress = function(t) {
i.maxProgress_ = t;
};
e.openLoading = function() {
return s(this, void 0, void 0, function() {
return a(this, function(t) {
switch (t.label) {
case 0:
if (i.loadLayer || i.requestedOpen) return [ 3, 2 ];
i.requestedOpen = !0;
i.needClose = !1;
return [ 4, l.UiUtil.openModule("res/prefab/LoadLayer", cc.director.getScene()).then(function(t) {
cc.game.addPersistRootNode(t);
i.loadLayer = t.getComponent(i);
i.currentProgress_ = 0;
}) ];

case 1:
t.sent();
t.label = 2;

case 2:
return [ 2 ];
}
});
});
};
e.closeLoading = function() {
if (i.loadLayer) {
if (c.default.ENTER_TIME > 0) {
var t = Math.round((cc.sys.now() - c.default.ENTER_TIME) / 1e3);
d.default.reportLoad(!1, t);
c.default.ENTER_TIME = 0;
}
i.loadLayer.node.active = !1;
i.loadLayer.node.destroy();
i.loadLayer = null;
i.requestedOpen = !1;
} else i.requestedOpen && (i.needClose = !0);
};
e.prototype.start = function() {
var t = this;
this.loadingTime = 0;
this.scheduleOnce(function() {
var e = h.LocalizedTextManager.getRandomLoadingTips();
e && (t.tipsLabel.string = e);
}, .1);
};
e.prototype.update = function(t) {
this.loadingTime += t;
this.tipsUpdateTimer += t;
if (this.tipsUpdateTimer > 6 || "" == this.tipsLabel.string) {
this.tipsUpdateTimer = 0;
this.tipsLabel.string = h.LocalizedTextManager.getRandomLoadingTips();
}
if (i.currentProgress_ < i.maxProgress_) {
i.currentProgress_ += .4;
var e = i.currentProgress_ / 100;
this.loadingProgress.progress = e;
}
this.loadingLabel.string = "正在初始化游戏，请稍后 " + i.dot[Math.floor(this.loadingTime / .3 % 4)];
var o = this.sheepParent.angle;
o += 45 * t;
this.sheepParent.angle = o;
i.needClose && i.closeLoading();
};
var i;
e.maxProgress_ = 95;
e.currentProgress_ = 0;
e.loadLayer = null;
e.dot = [ "", ".", "..", "..." ];
e.requestedOpen = !1;
e.needClose = !1;
r([ f({
type: cc.Label
}) ], e.prototype, "tipsLabel", void 0);
r([ f({
type: cc.Label
}) ], e.prototype, "loadingLabel", void 0);
r([ f({
type: cc.ProgressBar
}) ], e.prototype, "loadingProgress", void 0);
r([ f({
type: cc.Node,
tooltip: "会旋转的节点"
}) ], e.prototype, "sheepParent", void 0);
r([ f(cc.JsonAsset) ], e.prototype, "jsonText", void 0);
return i = r([ p ], e);
}(cc.Component);
i.LoadLayer = _;
cc._RF.pop();
}, {
"../../../../framework/main/Constants": void 0,
"../../../../framework/utils/UiUtil": void 0,
"../../../../start/src/ShuFenReport": void 0,
"../text/LocalizedTextManager": "LocalizedTextManager"
} ],
LocalizedTextManager: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "bcf68JdXiVGtYMdsRT63UNd", "LocalizedTextManager");
var o = this && this.__awaiter || function(t, e, i, o) {
return new (i || (i = Promise))(function(n, r) {
function s(t) {
try {
c(o.next(t));
} catch (t) {
r(t);
}
}
function a(t) {
try {
c(o.throw(t));
} catch (t) {
r(t);
}
}
function c(t) {
t.done ? n(t.value) : (e = t.value, e instanceof i ? e : new i(function(t) {
t(e);
})).then(s, a);
var e;
}
c((o = o.apply(t, e || [])).next());
});
}, n = this && this.__generator || function(t, e) {
var i, o, n, r, s = {
label: 0,
sent: function() {
if (1 & n[0]) throw n[1];
return n[1];
},
trys: [],
ops: []
};
return r = {
next: a(0),
throw: a(1),
return: a(2)
}, "function" == typeof Symbol && (r[Symbol.iterator] = function() {
return this;
}), r;
function a(t) {
return function(e) {
return c([ t, e ]);
};
}
function c(r) {
if (i) throw new TypeError("Generator is already executing.");
for (;s; ) try {
if (i = 1, o && (n = 2 & r[0] ? o.return : r[0] ? o.throw || ((n = o.return) && n.call(o), 
0) : o.next) && !(n = n.call(o, r[1])).done) return n;
(o = 0, n) && (r = [ 2 & r[0], n.value ]);
switch (r[0]) {
case 0:
case 1:
n = r;
break;

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

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

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

default:
if (!(n = s.trys, n = n.length > 0 && n[n.length - 1]) && (6 === r[0] || 2 === r[0])) {
s = 0;
continue;
}
if (3 === r[0] && (!n || r[1] > n[0] && r[1] < n[3])) {
s.label = r[1];
break;
}
if (6 === r[0] && s.label < n[1]) {
s.label = n[1];
n = r;
break;
}
if (n && s.label < n[2]) {
s.label = n[2];
s.ops.push(r);
break;
}
n[2] && s.ops.pop();
s.trys.pop();
continue;
}
r = e.call(t, s);
} catch (t) {
r = [ 6, t ];
o = 0;
} finally {
i = n = 0;
}
if (5 & r[0]) throw r[1];
return {
value: r[0] ? r[1] : void 0,
done: !0
};
}
};
Object.defineProperty(i, "__esModule", {
value: !0
});
i.LocalizedTextManager = void 0;
var r = t("../../../../framework/manager/ResMgr"), s = t("../../../../framework/utils/Log"), a = function() {
function t() {}
Object.defineProperty(t, "isLoading", {
get: function() {
return t.isLoading_;
},
enumerable: !1,
configurable: !0
});
t.loadLocalizedText = function() {
return o(this, void 0, void 0, function() {
return n(this, function(e) {
switch (e.label) {
case 0:
return [ 4, r.default.loadRes("res/config/cz").then(function(e) {
t.localizedText = e.json;
t.localizedText.loadingTips.shuffle();
t.isLoading_ = !1;
}) ];

case 1:
e.sent();
return [ 2 ];
}
});
});
};
t.contains = function(e) {
return !!t.localizedText[e];
};
t.getText = function(e) {
var i = "";
if (t.contains(e)) i = t.localizedText[e]; else {
i = e;
e.includes("_placeholder") ? i = "" : s.default.d("LocalizedTextManager: missing text: " + e, i);
}
e.startsWith("world_law_", 4) && (i = i.replace("\n\n", "\n"));
return i || "404";
};
t.getGodPowerName = function(e) {
return t.getText(e);
};
t.getGodPowerDesc = function(e) {
return t.getText(e + " Description");
};
t.getRandomLoadingTips = function() {
var e, i = "";
if (null === (e = t.localizedText) || void 0 === e ? void 0 : e.loadingTips) {
i = t.localizedText.loadingTips[t.loadingTipsIndex];
t.loadingTipsIndex++;
if (t.loadingTipsIndex >= t.localizedText.loadingTips.length) {
t.localizedText.loadingTips.shuffle();
t.loadingTipsIndex = 0;
}
}
return i;
};
t.getRandomTips = function() {
var e, i = "";
if (null === (e = t.localizedText) || void 0 === e ? void 0 : e.otherTips) {
i = t.localizedText.otherTips[t.randomTipsIndex];
t.randomTipsIndex++;
if (t.randomTipsIndex >= t.localizedText.otherTips.length) {
t.localizedText.otherTips.shuffle();
t.randomTipsIndex = 0;
}
}
return i;
};
t.localizedText = {};
t.loadingTipsIndex = 0;
t.randomTipsIndex = 0;
t.isLoading_ = !0;
return t;
}();
i.LocalizedTextManager = a;
cc._RF.pop();
}, {
"../../../../framework/manager/ResMgr": void 0,
"../../../../framework/utils/Log": void 0
} ],
MsgBox: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "0b07a3XFMJBrZ90I0lpIki2", "MsgBox");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = t("../../../../framework/manager/AudioMgr"), a = cc._decorator, c = a.ccclass, l = a.property, d = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.label = null;
e.btnSure = null;
e.btnOk = null;
e.btnNo = null;
e.callback = null;
return e;
}
e.prototype.onLoad = function() {};
e.prototype.close = function(t, e) {
void 0 === e && (e = "0");
s.default.playOpenEffect();
this.node.destroy();
this.callback && this.callback(parseInt(e));
};
e.prototype.show = function(t, e, i) {
void 0 === e && (e = null);
void 0 === i && (i = !0);
this.label.string = t;
this.callback = e;
this.btnSure.active = !i;
this.btnOk.active = i;
this.btnNo.active = i;
};
r([ l(cc.Label) ], e.prototype, "label", void 0);
r([ l(cc.Node) ], e.prototype, "btnSure", void 0);
r([ l(cc.Node) ], e.prototype, "btnOk", void 0);
r([ l(cc.Node) ], e.prototype, "btnNo", void 0);
return r([ c ], e);
}(cc.Component);
i.default = d;
cc._RF.pop();
}, {
"../../../../framework/manager/AudioMgr": void 0
} ],
MsgCache: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "8a6cajqtS1KDJXYEaCnM6rU", "MsgCache");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../../../bundle/common/src/module/Dialog"), n = t("../../../framework/main/Constants"), r = t("../../../framework/utils/UiUtil"), s = function() {
function t() {
this.notice = [];
this.toast = [];
}
t.prototype.pushNotice = function(t) {
if (0 == t.type) {
this.notice.unshift(t);
(e = this.notice.length) > 50 && this.notice.pop();
} else {
var e;
if ((e = this.notice.length) >= 5) for (var i = 0; i < e; i++) if (1 == this.notice[i].type) {
this.notice.splice(i, 1);
e -= 1;
break;
}
e < 5 && this.notice.push(t);
}
};
t.prototype.popNotice = function() {
return this.notice.length >= 1 ? this.notice.shift() : "";
};
t.prototype.clearNotice = function() {
this.notice = [];
};
t.prototype.pushToast = function(t) {
for (var e = 0; e < this.toast.length; e++) if (this.toast[e] == t) return;
this.toast.push(t);
};
t.prototype.popToast = function() {
return this.toast.length >= 1 ? this.toast.shift() : "";
};
t.prototype.getToastCount = function() {
return this.toast.length;
};
t.prototype.clear = function() {
this.notice = [];
this.toast = [];
};
t.prototype.showMsgBox = function(t, e, i) {
void 0 === e && (e = null);
void 0 === i && (i = !0);
this.showDialog(t, e, i);
};
t.prototype.showDialog = function(t, e, i) {
void 0 === e && (e = null);
void 0 === i && (i = !0);
r.UiUtil.openModule("res/prefab/Dialog", n.default.GLOBAL_NODE).then(function(r) {
r.position = cc.v3(cc.winSize.width / 2, cc.winSize.height / 2);
r.zIndex = n.default.MAX_ZINDEX;
r.getComponent(o.default).show(t, e, i);
});
};
t.inst = new t();
return t;
}();
i.default = s.inst;
cc._RF.pop();
}, {
"../../../bundle/common/src/module/Dialog": "Dialog",
"../../../framework/main/Constants": void 0,
"../../../framework/utils/UiUtil": void 0
} ],
NativeAdModule: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "656ef3CVqtBP5kNLw6SxW0G", "NativeAdModule");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../../AdTools"), n = t("../AdDeclare"), r = function() {
function t() {
this.nativeAdId = "";
this.adItem = null;
this.nativeAd = null;
this.callback = null;
}
t.prototype.fetchNativeAdData = function(t, e) {
void 0 === e && (e = null);
this.adItem = null;
this.nativeAdId = t;
this.callback = e;
this.nativeAd && this.destroyAd();
(VIVO_GAME || OPPO_GAME || HUAWEI_GAME) && (this.nativeAd = qg && qg.createNativeAd && qg.createNativeAd({
adUnitId: t
}));
if (this.nativeAd) {
console.log("fetchNativeAdData:", t);
this.nativeAd.onLoad && this.nativeAd.onLoad(this.onLoad_.bind(this));
this.nativeAd.onError && this.nativeAd.onError(this.onError_.bind(this));
}
this.nativeAd && this.nativeAd.load && this.nativeAd.load();
};
t.prototype.onLoad_ = function(t) {
if (t && t.adList) {
for (var e = 0; e < t.adList.length; e++) {
var i = t.adList[e], o = new n.NativeAdItemModel(this.nativeAdId);
o.init(i);
this.adItem = o;
}
this.reportAdShow();
} else this.onError_(null);
this.preloadImage(this.adItem);
this.callback && this.callback(this.adItem);
console.log("NativeAd onLoad:", this.nativeAdId);
};
t.prototype.onError_ = function(t) {
this.destroyAd();
this.callback && this.callback(null);
console.log("NativeAd onError:", t ? JSON.stringify(t) : null);
};
t.prototype.preloadImage = function() {
var t = o.default.checkImageUrl(this.adItem, !0), e = o.default.checkImageUrl(this.adItem, !1);
cc.assetManager.loadRemote(t, function() {});
cc.assetManager.loadRemote(e, function() {});
};
t.prototype.reportAdShow = function() {
if (this.nativeAd && this.adItem) {
var t = this.adItem.adId;
console.log("NativeAd reportAdShow ", t);
this.nativeAd.reportAdShow({
adId: t
});
}
};
t.prototype.reportAdClick = function() {
if (this.nativeAd && this.adItem) {
var t = this.adItem.adId;
console.log("NativeAd reportAdClick ", t);
this.nativeAd.reportAdClick({
adId: t
});
HUAWEI_GAME && this.destroyAd();
}
};
t.prototype.destroyAd = function() {
if (this.nativeAd) {
this.nativeAd.offLoad && this.nativeAd.offLoad(this.onLoad_.bind(this));
this.nativeAd.offError && this.nativeAd.offError(this.onError_.bind(this));
this.nativeAd.destroy && this.nativeAd.destroy();
this.nativeAd = null;
this.adItem = null;
}
};
return t;
}();
i.default = r;
cc._RF.pop();
}, {
"../../AdTools": "AdTools",
"../AdDeclare": "AdDeclare"
} ],
NativeBanner: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "829d42FBjBJK7EgwaIz8xYy", "NativeBanner");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = t("../../../../../framework/core/event/GlobalEvent"), a = t("../../../../../framework/utils/Log"), c = t("../AdsManager"), l = t("../AdTools"), d = t("../sdk/GameTdd"), h = cc._decorator, u = h.ccclass, p = h.property, f = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.title = null;
e.desc = null;
e.btnText = null;
e.icon = null;
e.btnClose = null;
e.adId = "";
e.isClick = !1;
return e;
}
e.prototype.start = function() {
HUAWEI_GAME && s.default.on(s.Global_Event_Type.BACKGROUND_TO_GAME, this.reportAdShow, this);
};
e.prototype.onDisable = function() {
s.default.off(s.Global_Event_Type.BACKGROUND_TO_GAME, this);
};
e.prototype.show = function(t) {
var e = this;
this.adId = t.adPositionId;
this.title.string = t.title || "点击查看";
this.btnText.string = t.clickBtnTxt || "点击查看";
var i = t.desc || t.source;
this.desc.string = i || "";
OPPO_GAME && (this.btnClose.scale = d.default.success ? d.default.getData("p3", d.v_type.NumberList)[1] : 1);
this.icon.node.width = HUAWEI_GAME ? 160 : 90;
var o = l.default.checkImageUrl(t, !0);
a.default.v("NativeBanner:", o, this.title.string, this.desc.string);
cc.assetManager.loadRemote(o, {
ext: ".png"
}, function(t, i) {
t ? cc.error("广告图片展示错误：", JSON.stringify(t)) : cc.isValid(e.icon) && (e.icon.spriteFrame = new cc.SpriteFrame(i));
});
};
e.prototype.close = function() {
this.node.destroy();
};
e.prototype.clickClose = function() {
this.close();
};
e.prototype.clickAd = function() {
this.isClick = !0;
c.default.reportNativeAdClick(this.adId);
c.default.refreshNativeBannerAd();
HUAWEI_GAME && this.close();
};
e.prototype.reportAdShow = function() {
c.default.reportNativeAdShow(this.adId);
};
r([ p(cc.Label) ], e.prototype, "title", void 0);
r([ p(cc.Label) ], e.prototype, "desc", void 0);
r([ p(cc.Label) ], e.prototype, "btnText", void 0);
r([ p(cc.Sprite) ], e.prototype, "icon", void 0);
r([ p(cc.Node) ], e.prototype, "btnClose", void 0);
return r([ u ], e);
}(cc.Component);
i.default = f;
cc._RF.pop();
}, {
"../../../../../framework/core/event/GlobalEvent": void 0,
"../../../../../framework/utils/Log": void 0,
"../AdTools": "AdTools",
"../AdsManager": "AdsManager",
"../sdk/GameTdd": "GameTdd"
} ],
NativeInterstitialAd: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "9dc59XcPP1Al4T7HVVzUlf1", "NativeInterstitialAd");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = t("../../../../../framework/core/event/GlobalEvent"), a = t("../../../../../framework/manager/AudioMgr"), c = t("../AdsManager"), l = t("../AdTools"), d = cc._decorator, h = d.ccclass, u = d.property, p = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.desc = null;
e.source = null;
e.btnText = null;
e.sprite = null;
e.adId = "";
e.callback = null;
return e;
}
e.prototype.onLoad = function() {
HUAWEI_GAME && s.default.on(s.Global_Event_Type.BACKGROUND_TO_GAME, this.reportNativeAdShow, this);
};
e.prototype.onDisable = function() {
s.default.off(s.Global_Event_Type.BACKGROUND_TO_GAME, this);
};
e.prototype.show = function(t, e) {
var i = this;
void 0 === e && (e = null);
this.adId = t.adPositionId;
this.callback = e;
this.btnText.string = t.clickBtnTxt || "点击查看";
this.source.string = t.source;
var o = t.desc || "";
this.desc.string = o;
var n = l.default.checkImageUrl(t, !1);
cc.assetManager.loadRemote(n, {
ext: ".png"
}, function(t, e) {
t ? cc.error("广告图片展示错误：", JSON.stringify(t)) : cc.isValid(i.sprite) && (i.sprite.spriteFrame = new cc.SpriteFrame(e));
});
};
e.prototype.close = function(t) {
void 0 === t && (t = 0);
a.default.playOpenEffect();
this.callback && this.callback(t);
this.node.destroy();
};
e.prototype.click = function() {
c.default.reportNativeAdClick(this.adId);
this.close();
};
e.prototype.getReward = function() {
this.close(1);
};
e.prototype.reportNativeAdShow = function() {
c.default.reportNativeAdShow(this.adId);
};
r([ u(cc.Label) ], e.prototype, "desc", void 0);
r([ u(cc.Label) ], e.prototype, "source", void 0);
r([ u(cc.Label) ], e.prototype, "btnText", void 0);
r([ u(cc.Sprite) ], e.prototype, "sprite", void 0);
return r([ h ], e);
}(cc.Component);
i.default = p;
cc._RF.pop();
}, {
"../../../../../framework/core/event/GlobalEvent": void 0,
"../../../../../framework/manager/AudioMgr": void 0,
"../AdTools": "AdTools",
"../AdsManager": "AdsManager"
} ],
PlatformAd: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "ae880rhkFdM0IJeVhJGAs81", "PlatformAd");
Object.defineProperty(i, "__esModule", {
value: !0
});
i.AD_TYPE = void 0;
var o, n = t("../../../../../framework/main/Constants"), r = t("../../../../../framework/utils/Log"), s = t("../../data/UserData"), a = t("./GameTdd"), c = t("./modules/AppBoxAdModule"), l = t("./modules/BannerAdModule"), d = t("./modules/BoxBannerAdModule"), h = t("./modules/CustomAdModule"), u = t("./modules/GameScreenRecorder"), p = t("./modules/InterstitialAdModule"), f = t("./modules/NativeAdModule"), _ = t("./modules/RewardedVideoModule"), m = t("./ServerData");
(function(t) {
t.banner = "banner";
t.boxBanner = "boxBanner";
t.video = "video";
t.native = "native";
t.custom = "custom";
t.insert = "insert";
t.appbox = "appbox";
})(o = i.AD_TYPE || (i.AD_TYPE = {}));
var y = function() {
function t() {
this.nativeAdModules = {};
this.nativeAdDatas = new Map();
this.requestID = new Map();
this.adIndex = {};
this.config = null;
}
t.prototype.initAd = function(t) {
var e, i;
this.config = t;
if (n.default.IS_AD_SHOW) {
var r = this.getAdId(o.insert);
r && p.default.createAd(r);
_.default.createAd(this.getAdId(o.video), this.config.adSid);
}
BYTEDANCE_GAME && u.default.init();
this.config.gameId && a.default.requestData(this.config.gameId, null === (i = null === (e = s.default.member.wxSceneId) || void 0 === e ? void 0 : e.scene) || void 0 === i ? void 0 : i.toString());
};
t.prototype.getSDKVersion = function(t) {
var e = t.getSystemInfoSync().SDKVersion;
e = e.replace(/\./g, "");
return parseInt(e);
};
t.prototype.updateConfig = function(t) {
t.bannerAd && t.bannerAd.adUnitId.length > 0 && (this.config.bannerAdId = t.bannerAd.adUnitId);
t.boxBannerAd && t.boxBannerAd.adUnitId.length > 0 && (this.config.boxBannerAdId = t.boxBannerAd.adUnitId);
t.interstitialAd && t.interstitialAd.adUnitId.length > 0 && (this.config.interstitialAdId = t.interstitialAd.adUnitId);
t.nativeAd && t.nativeAd.adUnitId.length > 0 && (this.config.nativeAdId = t.nativeAd.adUnitId);
t.videoAd && t.videoAd.adUnitId.length > 0 && (this.config.rewardedVideoAdId = t.videoAd.adUnitId);
t.customAd && t.customAd.adUnitId.length > 0 && (this.config.customAdId = t.customAd.adUnitId);
t.appBoxAd && t.appBoxAd.adUnitId.length > 0 && (this.config.appBoxAdId = t.appBoxAd.adUnitId);
};
t.prototype.isServerDataReady = function() {
return m.default.isServerDataReady;
};
t.prototype.getCustomData = function() {
return m.default.customData;
};
t.prototype.getAdvertData = function() {
return m.default.advertData;
};
t.prototype.getAdId = function(t) {
this.adIndex[t] || (this.adIndex[t] = 0);
var e = [];
switch (t) {
case o.banner:
e = this.config.bannerAdId;
break;

case o.boxBanner:
e = this.config.boxBannerAdId;
break;

case o.video:
e = this.config.rewardedVideoAdId;
break;

case o.native:
e = this.config.nativeAdId;
break;

case o.custom:
e = this.config.customAdId;
break;

case o.insert:
e = this.config.interstitialAdId;
break;

case o.appbox:
e = this.config.appBoxAdId;
}
var i = e[this.adIndex[t]];
this.adIndex[t]++;
this.adIndex[t] >= e.length && (this.adIndex[t] = 0);
return i;
};
t.prototype.showBannerAd = function(t) {
l.default.showAd(t || this.getAdId(o.banner), this.config.adSid);
};
t.prototype.hideBannerAd = function(t) {
void 0 === t && (t = !0);
t ? l.default.closeAd() : l.default.hideAd();
};
t.prototype.moveBannerAd = function(t) {
void 0 === t && (t = 0);
l.default.moveAd(t);
};
t.prototype.showBoxBannerAd = function() {
d.default.showAd(this.getAdId(o.boxBanner));
};
t.prototype.hideBoxBannerAd = function(t) {
void 0 === t && (t = !0);
t ? d.default.closeAd() : d.default.hideAd();
};
t.prototype.moveBoxBannerAd = function(t) {
d.default.moveAd(t);
};
t.prototype.showAppBoxAd = function(t, e) {
c.default.showAd(t, e || this.getAdId(o.appbox));
};
t.prototype.showInterstitialAd = function(t, e) {
(e = e || this.getAdId(o.insert)) && p.default.showAd(t, e);
};
t.prototype.fetchNativeAdData = function(t, e) {
var i = e || this.getAdId(o.native), n = this.nativeAdModules[i];
if (!n) {
n = new f.default();
this.nativeAdModules[i] = n;
}
n.fetchNativeAdData(i, t);
};
t.prototype.reportNativeAdShow = function(t) {
var e = this.nativeAdModules[t];
e && e.reportAdShow();
};
t.prototype.reportNativeAdClick = function(t) {
var e = this.nativeAdModules[t];
e && e.reportAdClick();
};
t.prototype.preloadNativeAd = function(t, e) {
var i = this;
void 0 === e && (e = null);
if (!this.nativeAdDatas.has(t)) {
if (this.requestID.has(t)) {
clearTimeout(this.requestID.get(t));
this.requestID.delete(t);
}
this.fetchNativeAdData(function(o) {
if (o) {
i.nativeAdDatas.set(o.adPositionId, o);
e && e();
} else i.requestID.set(t, setTimeout(function() {
i.preloadNativeAd(t);
}, 5e3));
}, t);
}
};
t.prototype.getNativeAdData = function(t) {
t || (t = this.nativeAdDatas.size > 0 ? Array.from(this.nativeAdDatas.keys())[0] : "");
if (t) {
var e = this.nativeAdDatas.get(t);
if (e) {
r.default.v("NativeAdData:", e);
this.nativeAdDatas.delete(t);
return e;
}
}
return null;
};
t.prototype.showRewardedVideoAd = function(t) {
_.default.showAd(t);
};
t.prototype.showCustomAd = function(t, e) {
h.default.showAd(e || this.getAdId(o.custom), t);
};
t.prototype.hideCustomAd = function() {
h.default.closeAd();
};
t.prototype.supportScreenRecording = function() {
return BYTEDANCE_GAME && u.default.supportScreenRecording();
};
t.prototype.isRecording = function() {
return u.default.isRecording();
};
t.prototype.getRecordedVideoPath = function() {
return u.default.getVideoPath();
};
t.prototype.startRecording = function(t, e) {
u.default.startRecording(t, e);
};
t.prototype.stopRecording = function(t) {
u.default.stopRecording(t);
};
t.prototype.pauseRecording = function() {
u.default.pause();
};
t.prototype.resumeRecording = function() {
u.default.resume();
};
t.prototype.recordClip = function(t) {
u.default.recordClip(t);
};
t.inst = new t();
return t;
}();
i.default = y.inst;
cc._RF.pop();
}, {
"../../../../../framework/main/Constants": void 0,
"../../../../../framework/utils/Log": void 0,
"../../data/UserData": "UserData",
"./GameTdd": "GameTdd",
"./ServerData": "ServerData",
"./modules/AppBoxAdModule": "AppBoxAdModule",
"./modules/BannerAdModule": "BannerAdModule",
"./modules/BoxBannerAdModule": "BoxBannerAdModule",
"./modules/CustomAdModule": "CustomAdModule",
"./modules/GameScreenRecorder": "GameScreenRecorder",
"./modules/InterstitialAdModule": "InterstitialAdModule",
"./modules/NativeAdModule": "NativeAdModule",
"./modules/RewardedVideoModule": "RewardedVideoModule"
} ],
PlatformShare: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "c30f0pqh7tPxqSDel1XLW0t", "PlatformShare");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("./PlatformAd"), n = function() {
function t() {}
t.prototype.simpleShare = function(t) {
window.qq ? qq.shareAppMessage(t) : window.wx ? wx.shareAppMessage(t) : window.tt ? tt.shareAppMessage(t) : window.qg && qg.share && qg.share({
success: function() {
console.log("share success");
},
fail: function(t) {
console.log("share fail:", t);
},
cancel: function() {
console.log("share cancel");
}
});
};
t.prototype.supportShareAppMessage = function() {
return !0;
};
t.prototype.shareAppMessage = function(t) {
this.simpleShare(t);
};
t.prototype.supportShareVideo = function() {
return o.default.supportScreenRecording();
};
t.prototype.shareVideo = function(t) {
var e = o.default.getRecordedVideoPath();
if (e) {
console.log("begin share video", e);
tt.shareAppMessage && tt.shareAppMessage({
channel: "video",
title: t.title,
desc: t.desc,
extra: {
videoPath: e
},
success: function() {
console.log("分享视频成功");
t.success && t.success();
},
fail: function(e) {
console.log("分享视频失败", e);
t.fail && t.fail();
}
});
} else console.error("No video to share");
};
t.prototype.supportShowShareMenu = function() {
return window.tt || window.qq || window.wx;
};
t.prototype.showShareMenu = function() {
window.qq ? qq.showShareMenu({}) : window.wx ? wx.showShareMenu({
withShareTicket: !0,
menus: [ "shareAppMessage", "shareTimeline" ]
}) : window.tt && tt.showShareMenu({});
};
t.prototype.hideShareMenu = function() {
window.qq ? qq.hideShareMenu({}) : window.wx ? wx.hideShareMenu({
menus: [ "shareAppMessage", "shareTimeline" ]
}) : window.tt && tt.hideShareMenu({});
};
t.inst = new t();
return t;
}();
i.default = n.inst;
cc._RF.pop();
}, {
"./PlatformAd": "PlatformAd"
} ],
Pool: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "f00f8mdOeNIHonir/iAPIsf", "Pool");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../../../../framework/utils/Tools"), n = function() {
function t() {
this.poolSize = 0;
this.prefab = null;
this.nodePool = null;
this.createNode = function() {
return cc.instantiate(this.prefab);
};
}
t.create = function(e, i) {
var o = new t();
o.init(e, i);
return o;
};
t.prototype.init = function(t, e) {
this.poolSize = e || 250;
this.prefab = t;
o.default.isEmpty(this.nodePool) && (this.nodePool = new cc.NodePool());
for (var i = 0; i < e; i++) {
var n = this.createNode();
this.nodePool.put(n);
}
};
t.prototype.resetPool = function() {
for (var t = this.poolSize - this.nodePool.size(), e = 0; e < t; e++) {
var i = this.createNode();
this.nodePool.put(i);
}
};
t.prototype.put = function(t) {
t.stopAllActions();
t.active = !1;
this.nodePool.put(t);
};
t.prototype.get = function() {
if (0 == this.nodePool.size()) {
var t = this.createNode();
this.nodePool.put(t);
}
return this.nodePool.get();
};
t.prototype.clear = function() {
this.nodePool && this.nodePool.clear();
};
return t;
}();
i.default = n;
cc._RF.pop();
}, {
"../../../../framework/utils/Tools": void 0
} ],
RewardData: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "9e6b8DET+hGB713nI7DLOu2", "RewardData");
var o = this && this.__values || function(t) {
var e = "function" == typeof Symbol && Symbol.iterator, i = e && t[e], o = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length) return {
next: function() {
t && o >= t.length && (t = void 0);
return {
value: t && t[o++],
done: !t
};
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var n = t("../../../../framework/lib/prototype/MathUtils"), r = t("../../../../framework/manager/ResMgr"), s = t("../../../../framework/utils/Tools"), a = t("./UserData"), c = function() {
function t() {
this.config = {};
}
t.prototype.loadConfig = function() {
var t = this;
r.default.loadRes("res/config/rewardCfg", cc.JsonAsset).then(function(e) {
for (var i in e.json) Object.prototype.hasOwnProperty.call(e.json, i) && (t.config[i] = e.json[i]);
});
};
t.prototype.getRewards = function(t) {
for (var e = [], i = this.config[t.toString()], n = function(t) {
var n = i.reward[t], c = null;
if (n.id && 0 !== n.id) c = a.default.getPropConfigByID(n.id); else {
var l = a.default.getPropConfigByItem(n.type);
l = r.getPropConfigByRareType(n.rare, l);
var d = function() {
var t, i;
c = l.getRandom();
try {
for (var n = (t = void 0, o(e)), r = n.next(); !r.done; r = n.next()) r.value.propID == c.propID && (c = d());
} catch (e) {
t = {
error: e
};
} finally {
try {
r && !r.done && (i = n.return) && i.call(n);
} finally {
if (t) throw t.error;
}
}
return c;
};
c = d();
}
var h = s.default.fromJson(c, new a.PropConfig());
if (h) {
h.number = Math.floor(c.reward * n.times);
e.push(h);
}
}, r = this, c = 0; c < i.reward.length; c++) n(c);
return e;
};
t.prototype.getRandomReward = function(t) {
var e = n.default.randomInt(103, 107), i = a.default.getPropConfigByItem(e).getRandom(), o = s.default.fromJson(i, new a.PropConfig());
o && (o.number = Math.floor(i.reward * t));
return o;
};
t.prototype.getPropConfigByRareType = function(t, e) {
for (var i = [], o = 0; o < e.length; o++) -1 != t && e[o].rare != t || i.push(e[o]);
return i;
};
t.prototype.getLockPropConfig = function(t) {
for (var e = [], i = a.default.getLockProp(t), o = 0; o < t; o++) {
var n, r = i[o];
n = r ? s.default.fromJson(a.default.getPropConfigByID(r.propID), new a.PropConfig()) : s.default.fromJson(a.default.getPropConfigByID(1002), new a.PropConfig());
e.push(n);
}
return e;
};
t.inst = new t();
return t;
}();
i.default = c.inst;
cc._RF.pop();
}, {
"../../../../framework/lib/prototype/MathUtils": void 0,
"../../../../framework/manager/ResMgr": void 0,
"../../../../framework/utils/Tools": void 0,
"./UserData": "UserData"
} ],
RewardedVideoModule: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "9ec18mwI8JAQaqsjVKUuB8L", "RewardedVideoModule");
Object.defineProperty(i, "__esModule", {
value: !0
});
var o = t("../../../../../../framework/main/Constants"), n = t("../../../../../../start/src/ShuFenReport"), r = t("../AdDeclare"), s = function() {
function t() {
this.adPositionId = "";
this.appSid = "";
this.adObj = null;
this.loaded = !1;
this.adResultCallback = null;
}
t.prototype.createAd = function(t, e) {
var i = this;
void 0 === e && (e = "");
this.adPositionId = t;
this.appSid = e;
if (PLATFORM) {
console.log("RewardedVideoAd create: ", t);
this.adObj = PLATFORM.createRewardedVideoAd && PLATFORM.createRewardedVideoAd({
adUnitId: this.adPositionId,
posId: this.adPositionId,
appSid: e
});
}
if (this.adObj) {
this.adObj.onLoad(this.onLoad_.bind(this));
this.adObj.onError(this.onError_.bind(this));
this.adObj.onClose(this.onClose_.bind(this));
setTimeout(function() {
i.loaded || i.adObj.load();
}, 7e3);
}
};
t.prototype.showAd = function(t) {
var e = this;
this.adResultCallback = t;
n.default.reportVideo(o.default.REPORT_ID, 1);
if (this.loaded) this.adObj.show().then(function() {
console.log("RewardedVideoAd show success.");
n.default.reportVideo(o.default.REPORT_ID, 2);
}).catch(function(t) {
console.log("RewardedVideoAd show failed", t);
if (e.adResultCallback) {
e.adResultCallback(r.AdResultState.ON_ERROR);
e.adResultCallback = null;
}
}); else {
this.adObj.load();
if (this.adResultCallback) {
this.adResultCallback(r.AdResultState.ON_ERROR);
this.adResultCallback = null;
}
}
};
t.prototype.onError_ = function(t) {
console.log("RewardedVideoAd onError ", t ? JSON.stringify(t) : t);
this.loaded = !1;
};
t.prototype.onLoad_ = function() {
console.log("RewardedVideoAd onLoad");
this.loaded = !0;
};
t.prototype.onClose_ = function(t) {
var e = this;
if (t && t.isEnded || void 0 === t) {
console.log("RewardedVideoAd play finished.");
if (this.adResultCallback) {
this.adResultCallback(r.AdResultState.ON_CLOSE_FINISH);
this.adResultCallback = null;
}
n.default.reportVideo(o.default.REPORT_ID, 3);
} else {
console.log("RewardedVideoAd user cancelled.");
if (this.adResultCallback) {
this.adResultCallback(r.AdResultState.ON_CLOSE_CANCEL);
this.adResultCallback = null;
}
}
this.loaded = !1;
setTimeout(function() {
e.loaded || e.adObj.load();
}, 5e3);
};
t.inst = new t();
return t;
}();
i.default = s.inst;
cc._RF.pop();
}, {
"../../../../../../framework/main/Constants": void 0,
"../../../../../../start/src/ShuFenReport": void 0,
"../AdDeclare": "AdDeclare"
} ],
ServerData: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "53c53Ecx6FA/7uFqAx35WsT", "ServerData");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
});
Object.defineProperty(i, "__esModule", {
value: !0
});
i.SERVER_DATA_TYPE = void 0;
var r, s = t("../../../../../framework/main/Constants"), a = t("../../../../../framework/net/NetCore"), c = t("../../../../../framework/utils/Log"), l = t("./PlatformAd");
(function(t) {
t.CUSTOM = "gameCustomData";
t.ADVERT = "gameAdvertData";
})(r = i.SERVER_DATA_TYPE || (i.SERVER_DATA_TYPE = {}));
var d = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.serverData = "";
e.adData = "";
e.serverDataReady = !1;
return e;
}
Object.defineProperty(e.prototype, "customData", {
get: function() {
return this.serverData ? JSON.parse(this.serverData) : null;
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "advertData", {
get: function() {
return this.adData ? JSON.parse(this.adData) : null;
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "isServerDataReady", {
get: function() {
return this.serverDataReady;
},
enumerable: !1,
configurable: !0
});
e.prototype.requestData = function(t, e) {
void 0 === e && (e = r.CUSTOM);
var i = s.default.HTTP_PATH + "/" + t + "/" + e;
this.get(e, i);
};
e.prototype.onHttpMessage = function(t, e, i) {
if (e) {
var o = JSON.parse(i);
if (o && o.status) {
var n = o.data.settingList[0];
switch (t) {
case r.CUSTOM:
this.serverDataReady = !0;
this.serverData = n;
cc.log("customData", n + "\n");
break;

case r.ADVERT:
this.adData = n;
l.default.updateConfig(this.advertData);
cc.log("advertData", n + "\n");
}
} else c.default.d("获取数据失败:", o.errorMessage);
} else c.default.d("获取数据失败:", i);
};
e.inst = new e();
return e;
}(a.default);
i.default = d.inst;
cc._RF.pop();
}, {
"../../../../../framework/main/Constants": void 0,
"../../../../../framework/net/NetCore": void 0,
"../../../../../framework/utils/Log": void 0,
"./PlatformAd": "PlatformAd"
} ],
ShareNode: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "95732GT44lGdb88MKI+jX0b", "ShareNode");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = t("../../MsgCache"), a = t("../AdsManager"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.btnShare = null;
e.spRecording = null;
e.callback = null;
e.isShared = !1;
return e;
}
e.prototype.start = function() {
this.btnShare.active = !0;
this.spRecording.active = !1;
cc.tween(this.btnShare).sequence(cc.scaleTo(1.5, .9), cc.scaleTo(1.5, 1.1)).repeatForever().start();
};
e.prototype.init = function(t) {
this.callback = t;
};
e.prototype.close = function() {
this.callback && this.callback(this.isShared);
this.node.destroy();
};
e.prototype.share = function() {
var t = this;
a.default.shareVideo({
success: function() {
t.isShared = !0;
t.close();
},
fail: function() {
s.default.pushToast("录屏分享失败！");
}
});
};
r([ d(cc.Node) ], e.prototype, "btnShare", void 0);
r([ d(cc.Node) ], e.prototype, "spRecording", void 0);
return r([ l ], e);
}(cc.Component);
i.default = h;
cc._RF.pop();
}, {
"../../MsgCache": "MsgCache",
"../AdsManager": "AdsManager"
} ],
Toast: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "7afe7kYMKNAJaqrKDN9vJzA", "Toast");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = t("../MsgCache"), a = cc._decorator, c = a.ccclass, l = a.property, d = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.label = null;
e.sprite = null;
e.isShow = !1;
e.time = 0;
return e;
}
e.prototype.onLoad = function() {
var t = this;
this.label.node.on("size-changed", function() {
var e = .8 * cc.winSize.width;
t.label.node.width > e && cc.tween(t.label.node).delay(.02).call(function() {
t.label.overflow = cc.Label.Overflow.RESIZE_HEIGHT;
t.label.node.width = e;
}).start();
}, this);
};
e.prototype.hide = function() {
this.time = -1;
this.isShow = !1;
this.label.string = "";
this.node.opacity = 0;
};
e.prototype.update = function(t) {
var e = this, i = s.default.getToastCount();
if (this.isShow) {
-1 != this.time && (this.time += t);
this.time >= .3 && i > 0 && this.hide();
this.time >= 2 && this.hide();
} else if (i > 0) {
this.isShow = !0;
var o = s.default.popToast();
this.label.overflow = cc.Label.Overflow.NONE;
this.label.string = o;
this.node.opacity = 255;
this.node.zIndex = 2;
this.node.scale = .5;
cc.tween(this.node).to(.3, {
scale: 1
}, {
easing: "backOut"
}).call(function() {
e.time = 0;
}).start();
}
};
r([ l(cc.Label) ], e.prototype, "label", void 0);
r([ l(cc.Sprite) ], e.prototype, "sprite", void 0);
return r([ c ], e);
}(cc.Component);
i.default = d;
cc._RF.pop();
}, {
"../MsgCache": "MsgCache"
} ],
TrapezoidSprite: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "bc77dD4Iq9DHoIrYGUQXz/U", "TrapezoidSprite");
var o, n = this && this.__extends || (o = function(t, e) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(t, e) {
t.__proto__ = e;
} || function(t, e) {
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
})(t, e);
}, function(t, e) {
o(t, e);
function i() {
this.constructor = t;
}
t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i());
}), r = this && this.__decorate || function(t, e, i, o) {
var n, r = arguments.length, s = r < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, i) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t, e, i, o); else for (var a = t.length - 1; a >= 0; a--) (n = t[a]) && (s = (r < 3 ? n(s) : r > 3 ? n(e, i, s) : n(e, i)) || s);
return r > 3 && s && Object.defineProperty(e, i, s), s;
};
Object.defineProperty(i, "__esModule", {
value: !0
});
var s = cc._decorator, a = s.ccclass, c = s.property, l = s.executeInEditMode, d = s.requireComponent, h = s.menu, u = cc.gfx, p = function(t) {
n(e, t);
function e() {
var e = null !== t && t.apply(this, arguments) || this;
e.addCollider = !1;
e.isosceles = !0;
e.isLeft = !0;
e._spriteFrame = null;
e._topCenter = cc.v2(0, 40);
e._topWidth = 50;
e._bottomCenter = cc.v2(0, 0);
e._bottomWidth = 50;
e.renderer = null;
e.mesh = null;
e.collider = null;
return e;
}
Object.defineProperty(e.prototype, "spriteFrame", {
get: function() {
return this._spriteFrame;
},
set: function(t) {
this._spriteFrame = t;
this._refreshAll();
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "topCenter", {
get: function() {
return this._topCenter;
},
set: function(t) {
this._topCenter = t;
this._updateMesh();
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "topWidth", {
get: function() {
return this._topWidth;
},
set: function(t) {
this._topWidth = t;
this._updateMesh();
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "bottomCenter", {
get: function() {
return this._bottomCenter;
},
set: function(t) {
this._bottomCenter = t;
this._updateMesh();
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e.prototype, "bottomWidth", {
get: function() {
return this._bottomWidth;
},
set: function(t) {
this._bottomWidth = t;
this._updateMesh();
},
enumerable: !1,
configurable: !0
});
e.prototype.onLoad = function() {
this.init();
};
e.prototype.init = function() {
if (!this.renderer) {
this.renderer = this.node.getComponent(cc.MeshRenderer) || this.node.addComponent(cc.MeshRenderer);
this.renderer.mesh = null;
}
this.addCollider && !this.collider && (this.collider = this.node.getComponent(cc.PolygonCollider) || this.node.addComponent(cc.PolygonCollider));
};
e.prototype.onEnable = function() {
this._refreshAll();
};
e.prototype.start = function() {};
e.prototype._refreshAll = function() {
this._updateMesh();
this._applySpriteFrame();
};
e.prototype._updateMesh = function() {
this.init();
if (!this.mesh) {
this.mesh = new cc.Mesh();
this.mesh.init(new u.VertexFormat([ {
name: u.ATTR_POSITION,
type: u.ATTR_TYPE_FLOAT32,
num: 2
}, {
name: u.ATTR_UV0,
type: u.ATTR_TYPE_FLOAT32,
num: 3
}, {
name: u.ATTR_COLOR,
type: u.ATTR_TYPE_UINT8,
num: 4,
normalize: !0
} ]), 4, !0);
}
var t;
t = this.isosceles ? [ cc.v3(-this.topWidth / 2 + this.topCenter.x, this.topCenter.y, 0), cc.v3(-this.bottomWidth / 2 + this.bottomCenter.x, this.bottomCenter.y, 0), cc.v3(this.topWidth / 2 + this.topCenter.x, this.topCenter.y, 0), cc.v3(this.bottomWidth / 2 + this.topCenter.x, this.bottomCenter.y, 0) ] : this.isLeft ? [ cc.v3(-this.topWidth / 2, this.topCenter.y, 0), cc.v3(-this.bottomWidth / 2, this.bottomCenter.y, 0), cc.v3(this.topCenter.x, this.topCenter.y, 0), cc.v3(this.topCenter.x, this.bottomCenter.y, 0) ] : [ cc.v3(this.topCenter.x, this.topCenter.y, 0), cc.v3(this.bottomCenter.x, this.bottomCenter.y, 0), cc.v3(this.topWidth / 2, this.topCenter.y, 0), cc.v3(this.bottomWidth / 2, this.bottomCenter.y, 0) ];
this.mesh.setVertices(u.ATTR_POSITION, t);
var e = cc.v2(t[0]), i = cc.v2(t[1]), o = cc.v2(t[2]), n = cc.v2(t[3]), r = (o.y - i.y) / (o.x - i.x), s = (e.y - n.y) / (e.x - n.x), a = (i.x * r - n.x * s + (n.y - i.y)) / (r - s), c = cc.v2(a, r * a - i.x * r + i.y), l = cc.Vec2.distance(e, c), d = cc.Vec2.distance(i, c), h = cc.Vec2.distance(o, c), p = cc.Vec2.distance(n, c), f = (l + p) / p, _ = (d + h) / h, m = (h + d) / d, y = (p + l) / l, v = [ cc.v3(0, 0, 1), cc.v3(0, 1, 1), cc.v3(1, 0, 1), cc.v3(1, 1, 1) ];
v[0].mulSelf(f);
v[1].mulSelf(_);
v[2].mulSelf(m);
v[3].mulSelf(y);
v[0].z = v[0].z - 1;
v[1].z = v[1].z - 1;
v[2].z = v[2].z - 1;
v[3].z = v[3].z - 1;
var g = this.node.color, b = cc.color(g.r, g.g, g.b, 255), w = [ b, b, b, b ];
this.mesh.setVertices(u.ATTR_UV0, v);
this.mesh.setVertices(u.ATTR_COLOR, w);
this.mesh.setIndices([ 0, 1, 2, 1, 3, 2 ]);
this.renderer.mesh = this.mesh;
if (this.addCollider && this.collider) {
var A = cc.v2(t[0]), I = cc.v2(t[1]), S = cc.v2(t[2]), O = cc.v2(t[3]);
this.isosceles ? this.collider.points = [ A, S, O, I ] : this.isLeft ? this.collider.points = [ A, cc.v2(A.x + 3, A.y), cc.v2(I.x + 3, I.y), I ] : this.collider.points = [ cc.v2(S.x - 3, S.y), S, O, cc.v2(O.x - 3, O.y) ];
}
};
e.prototype._applySpriteFrame = function() {
if (this.spriteFrame) {
var t = this.renderer.getMaterial(0), e = this.spriteFrame.getTexture();
t.define("USE_TEXTURE", !0);
t.setProperty("texture", e);
}
};
r([ c({
tooltip: "是否需要生成碰撞体"
}) ], e.prototype, "addCollider", void 0);
r([ c({
tooltip: "是否等腰梯形"
}) ], e.prototype, "isosceles", void 0);
r([ c({
visible: function() {
return !this.isosceles;
},
tooltip: "是否左半部分"
}) ], e.prototype, "isLeft", void 0);
r([ c ], e.prototype, "_spriteFrame", void 0);
r([ c({
type: cc.SpriteFrame,
tooltip: "精灵的精灵帧"
}) ], e.prototype, "spriteFrame", null);
r([ c ], e.prototype, "_topCenter", void 0);
r([ c({
type: cc.Vec2,
tooltip: "顶边中心点，默认是(0, 40)"
}) ], e.prototype, "topCenter", null);
r([ c ], e.prototype, "_topWidth", void 0);
r([ c({
tooltip: "顶边宽度"
}) ], e.prototype, "topWidth", null);
r([ c ], e.prototype, "_bottomCenter", void 0);
r([ c({
type: cc.Vec2,
tooltip: "底边中心点，默认是(0, 0)"
}) ], e.prototype, "bottomCenter", null);
r([ c ], e.prototype, "_bottomWidth", void 0);
r([ c({
tooltip: "底边宽度"
}) ], e.prototype, "bottomWidth", null);
return r([ a, l, d(cc.MeshRenderer), h("RenderUtils/TrapezoidSprite") ], e);
}(cc.Component);
i.default = p;
cc._RF.pop();
}, {} ],
UserData: [ function(t, e, i) {
"use strict";
cc._RF.push(e, "756c6YFRY5MnKaEIQYwJOH8", "UserData");
var o = this && this.__awaiter || function(t, e, i, o) {
return new (i || (i = Promise))(function(n, r) {
function s(t) {
try {
c(o.next(t));
} catch (t) {
r(t);
}
}
function a(t) {
try {
c(o.throw(t));
} catch (t) {
r(t);
}
}
function c(t) {
t.done ? n(t.value) : (e = t.value, e instanceof i ? e : new i(function(t) {
t(e);
})).then(s, a);
var e;
}
c((o = o.apply(t, e || [])).next());
});
}, n = this && this.__generator || function(t, e) {
var i, o, n, r, s = {
label: 0,
sent: function() {
if (1 & n[0]) throw n[1];
return n[1];
},
trys: [],
ops: []
};
return r = {
next: a(0),
throw: a(1),
return: a(2)
}, "function" == typeof Symbol && (r[Symbol.iterator] = function() {
return this;
}), r;
function a(t) {
return function(e) {
return c([ t, e ]);
};
}
function c(r) {
if (i) throw new TypeError("Generator is already executing.");
for (;s; ) try {
if (i = 1, o && (n = 2 & r[0] ? o.return : r[0] ? o.throw || ((n = o.return) && n.call(o), 
0) : o.next) && !(n = n.call(o, r[1])).done) return n;
(o = 0, n) && (r = [ 2 & r[0], n.value ]);
switch (r[0]) {
case 0:
case 1:
n = r;
break;

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

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

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

default:
if (!(n = s.trys, n = n.length > 0 && n[n.length - 1]) && (6 === r[0] || 2 === r[0])) {
s = 0;
continue;
}
if (3 === r[0] && (!n || r[1] > n[0] && r[1] < n[3])) {
s.label = r[1];
break;
}
if (6 === r[0] && s.label < n[1]) {
s.label = n[1];
n = r;
break;
}
if (n && s.label < n[2]) {
s.label = n[2];
s.ops.push(r);
break;
}
n[2] && s.ops.pop();
s.trys.pop();
continue;
}
r = e.call(t, s);
} catch (t) {
r = [ 6, t ];
o = 0;
} finally {
i = n = 0;
}
if (5 & r[0]) throw r[1];
return {
value: r[0] ? r[1] : void 0,
done: !0
};
}
}, r = this && this.__values || function(t) {
var e = "function" == typeof Symbol && Symbol.iterator, i = e && t[e], o = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length) return {
next: function() {
t && o >= t.length && (t = void 0);
return {
value: t && t[o++],
done: !t
};
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(i, "__esModule", {
value: !0
});
i.Prop = i.PropConfig = i.SignInStatus = i.RARE_TYPE = void 0;
var s, a = t("../../../../framework/main/Constants"), c = t("../../../../framework/manager/ResMgr"), l = t("../../../../framework/utils/Tools"), d = t("../MsgCache");
(function(t) {
t[t.NORMAL = -1] = "NORMAL";
t[t.GENERAL = 0] = "GENERAL";
t[t.RARE = 1] = "RARE";
t[t.SUPER_RARE = 2] = "SUPER_RARE";
t[t.EXTER_RARE = 3] = "EXTER_RARE";
})(s = i.RARE_TYPE || (i.RARE_TYPE = {}));
(function(t) {
t[t.NotLogin = 0] = "NotLogin";
t[t.Login = 1] = "Login";
t[t.Normal = 2] = "Normal";
t[t.Video = 4] = "Video";
})(i.SignInStatus || (i.SignInStatus = {}));
i.PropConfig = function() {
this.propID = 0;
this.propName = "";
this.hide = !1;
this.lock = !1;
this.order = 0;
this.index = 0;
this.subIndex = 0;
this.number = 0;
this.rare = s.NORMAL;
this.reward = 0;
this.desc = "";
};
var h = function() {
function t() {
this.propID = 0;
this.propName = "";
this._number = 0;
this.infiniteTime = 0;
this.lock = !1;
this._useNum = 0;
}
Object.defineProperty(t.prototype, "number", {
get: function() {
return this._number;
},
set: function(t) {
this._number = t;
cc.director.emit("updateProp", this.propID);
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(t.prototype, "useNum", {
get: function() {
return this._useNum;
},
set: function(t) {
this._useNum < 9999 ? this._useNum += t : this._useNum = 9999;
},
enumerable: !1,
configurable: !0
});
return t;
}();
i.Prop = h;
var u = a.default.IS_AD_SHOW ? "WB2_USERDATA_KEY" : "WB2_USERDATA_KEY_TEMP", p = a.default.IS_AD_SHOW ? "WB2_PROP_KEY" : "WB2_PROP_KEY_TEMP", f = function() {
function t() {
this.member = {
saved: !1,
firstPlayTime: 0,
lastSignInTime: 0,
signInStatus: [ 0, 0, 0, 0, 0, 0, 0 ],
signInDays: -1,
onlineTime: 0,
onlineGuided: !1,
mysteryNum: 1,
mysteryGuided: !1,
useTimeScale: !1,
videoCount: 0,
luckyWheelCount: 0,
unLockMap: [ !0, !0, !1, !1, !1 ],
unLockSave: [ !0, !0 ],
firstFreeProp: {},
BoxGiftNum: {},
usedProp: {
usedAll: !1,
list: []
},
achievTotal: [ !1, !1, !1, !1 ],
brushUnlock: {},
wxSceneId: {
isCheck: !1,
scene: 1001
}
};
this.propConfig = {};
this.propList = {};
this.needSave = !1;
}
t.prototype.loadConfig = function() {
return o(this, void 0, void 0, function() {
return n(this, function() {
return [ 2, c.default.loadRes("res/config/propCfg", cc.JsonAsset).then(function(t) {
for (var e in t.json) if (Object.prototype.hasOwnProperty.call(t.json, e)) {
var i = t.json[e];
this.propConfig[i.propID] = i;
this.propList[i.propID] = l.default.fromJson(i, new h());
this.propList[i.propID]._number = i.number;
}
this.load();
}.bind(this)) ];
});
});
};
t.prototype.load = function() {
var t = cc.sys.localStorage.getItem(p);
if (t) {
var e = JSON.parse(t);
for (var i in e) if (Object.prototype.hasOwnProperty.call(e, i)) {
var o = e[i];
if (this.propList[i]) for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (this.propList[i][n] = o[n]);
}
}
var r = cc.sys.localStorage.getItem(u);
if (r) {
e = JSON.parse(r);
for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (this.member[s] = e[s]);
if (0 == this.member.firstPlayTime) {
this.member.firstPlayTime = cc.sys.now();
this.save();
}
} else {
this.member.firstPlayTime = cc.sys.now();
this.save();
}
if (WECHAT_GAME && !this.member.wxSceneId.isCheck) {
if (wx.getEnterOptionsSync) {
var a = wx.getEnterOptionsSync();
this.member.wxSceneId.scene = a.scene;
this.member.wxSceneId.isCheck = !0;
}
this.save();
}
setInterval(function() {
if (this.needSave) {
cc.sys.localStorage.setItem(u, JSON.stringify(this.member));
cc.sys.localStorage.setItem(p, JSON.stringify(this.propList));
this.needSave = !1;
}
for (var t in this.propList) {
var e = this.propList[t];
if (e.infiniteTime > 0) {
e.infiniteTime--;
if (0 == e.infiniteTime) {
cc.director.emit("updateProp", e.propID);
d.default.pushToast("无限使用《" + e.propName + "》道具时间结束");
}
}
}
}.bind(this), 1e3);
};
t.prototype.save = function() {
this.needSave = !0;
};
t.prototype.getPropByID = function(t) {
return this.propList[t];
};
t.prototype.getLockProp = function(t) {
var e, i, o = [], n = Object.values(this.propList);
try {
for (var s = r(n), a = s.next(); !a.done; a = s.next()) {
var c = a.value;
if (c.lock) {
o.push(c);
if (o.length >= t) break;
}
}
} catch (t) {
e = {
error: t
};
} finally {
try {
a && !a.done && (i = s.return) && i.call(s);
} finally {
if (e) throw e.error;
}
}
return o;
};
t.prototype.getPropConfigByID = function(t) {
return this.propConfig[t];
};
t.prototype.getPropConfigByItem = function(t) {
var e = [];
for (var i in this.propConfig) if (Object.prototype.hasOwnProperty.call(this.propConfig, i)) {
var o = this.propConfig[i];
1 != t && o.index != t || e.push(o);
}
return e;
};
t.inst = new t();
return t;
}();
i.default = f.inst;
cc._RF.pop();
}, {
"../../../../framework/main/Constants": void 0,
"../../../../framework/manager/ResMgr": void 0,
"../../../../framework/utils/Tools": void 0,
"../MsgCache": "MsgCache"
} ]
}, {}, [ "GameCommon", "GamePopBase", "MsgCache", "AdTools", "AdsManager", "AdDeclare", "GameTdd", "PlatformAd", "PlatformShare", "ServerData", "AppBoxAdModule", "BannerAdModule", "BoxBannerAdModule", "CustomAdModule", "GameScreenRecorder", "InterstitialAdModule", "NativeAdModule", "RewardedVideoModule", "NativeBanner", "NativeInterstitialAd", "ShareNode", "AchievData", "FestivityData", "RewardData", "UserData", "HtBox", "HtIcon", "HtManager", "Counter", "Dialog", "GlobalNode", "GuideView", "LoadLayer", "MsgBox", "Pool", "Toast", "TrapezoidSprite", "List", "ListItem", "LocalizedTextManager" ]);