import {
    G as O,
    B as $,
    H as M,
    N as i,
    I as m,
    O as A,
    Q as L,
    J as e,
    P as b,
    ao as S,
    K as W,
    M as x,
    az as J,
    ap as B,
    aE as se,
    n as le,
    C as te,
    aA as P,
    ax as z,
    z as oe,
    R as ae,
    aB as re,
    r as y,
    au as H,
    av as R,
    aC as Ne,
    aD as Be,
    aT as Me,
    aU as he,
    X as We,
    ar as ee,
    $ as ke,
    V as xe,
    a6 as qe,
    E as Fe,
    ay as ze,
    W as Pe
} from "./common.modules-f9fa5dc7.js";
import {
    i as U,
    y as Ge,
    b as ye,
    _ as E,
    g as Ve
} from "./page-activity-ActivityDetail-0d51a056.js";
const Xe = {
        class: "hot_container"
    },
    je = {
        key: 0,
        class: "platform"
    },
    Je = {
        key: 0,
        class: "title"
    },
    Ue = {
        class: "list"
    },
    Ke = ["onClick"],
    Ye = {
        class: "item"
    },
    Qe = ["src", "data-img"],
    Ze = {
        key: 0,
        class: "win-odds"
    },
    et = {
        key: 0,
        class: "title"
    },
    tt = {
        class: "list"
    },
    at = ["onClick"],
    nt = {
        class: "item"
    },
    st = ["src", "data-img"],
    lt = {
        key: 0,
        class: "win-odds"
    },
    it = O({
        __name: "HotGameItem",
        props: {
            platformList: {
                type: Array,
                required: !0
            },
            clicksTopList: {
                type: Array,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            }
        },
        emits: ["onItemClick"],
        setup(t, {
            emit: a
        }) {
            const {
                platformList: s,
                clicksTopList: v
            } = t, {
                homeState: l
            } = U(), u = $(() => JSON.parse(JSON.stringify(l.allGameList || {}))), h = se(() => le(() =>
                import ("./gameHot-90f98a1e.js"), ["assets/js/gameHot-90f98a1e.js", "assets/js/common.modules-f9fa5dc7.js", "assets/css/common-05d2aa17.css", "assets/js/page-activity-ActivityDetail-0d51a056.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-eb46cb93.js", "assets/js/en-0806f032.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"])), _ = se(() => le(() =>
                import ("./gameRec-543de551.js"), ["assets/js/gameRec-543de551.js", "assets/js/common.modules-f9fa5dc7.js", "assets/css/common-05d2aa17.css", "assets/js/page-activity-ActivityDetail-0d51a056.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-eb46cb93.js", "assets/js/en-0806f032.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"])), p = se(() => le(() =>
                import ("./noticeBarHot-911142a1.js"), ["assets/js/noticeBarHot-911142a1.js", "assets/js/common.modules-f9fa5dc7.js", "assets/css/common-05d2aa17.css", "assets/js/page-activity-ActivityDetail-0d51a056.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-eb46cb93.js", "assets/js/en-0806f032.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"]));
            let n = s,
                o = v;
            console.log("platformList ", s), s || (n = u.value.popular.platformList, o = u.value.popular.clicksTopList);
            const c = Ge(),
                G = f => {
                    a("onItemClick", f)
                };
            return (f, I) => {
                var w, k;
                const d = M("Maintain");
                return i(), m("div", Xe, [((w = A(n)) == null ? void 0 : w.length) > 0 && !f.isAll ? (i(), m("div", je, [f.isAll ? S("v-if", !0) : (i(), m("div", Je, [L(A(_), {
                    class: "gameRec"
                }), e("span", null, b(f.$t("platRecom")), 1)])), e("div", Ue, [(i(!0), m(W, null, x(A(n), g => (i(), m("div", {
                    key: g.vendorId,
                    onClick: T => G(g)
                }, [e("div", Ye, [L(A(h), {
                    class: "hot_bage"
                }), e("img", {
                    src: g.imgUrl,
                    alt: "",
                    "data-img": A(ye)("images", "avatar")
                }, null, 8, Qe), L(d, {
                    size: !0,
                    item: g
                }, null, 8, ["item"])]), A(c).isShowHotGameWinOdds ? (i(), m("div", Ze, [e("span", null, b(f.$t("winOdds")), 1), e("span", null, b(g.winOdds) + "%", 1), e("div", {
                    class: "win-p",
                    style: J({
                        width: `${Math.min(g.winOdds,100)}%`
                    })
                }, null, 4)])) : S("v-if", !0)], 8, Ke))), 128))])])) : S("v-if", !0), ((k = A(n)) == null ? void 0 : k.length) > 0 ? (i(), m("div", {
                    key: 1,
                    class: B(["popular", {
                        pupularAll: f.isAll
                    }])
                }, [f.isAll ? S("v-if", !0) : (i(), m("div", et, [L(A(p), {
                    class: "hotGames"
                }), e("span", null, b(f.$t("hot")), 1)])), e("div", tt, [(i(!0), m(W, null, x(A(o), g => (i(), m("div", {
                    key: g.vendorId,
                    onClick: T => G(g)
                }, [e("div", nt, [e("img", {
                    src: g.imgUrl,
                    alt: "",
                    "data-img": A(ye)("images", "avatar")
                }, null, 8, st), L(d, {
                    size: !0,
                    item: g
                }, null, 8, ["item"])]), A(c).isShowHotGameWinOdds ? (i(), m("div", lt, [e("span", null, b(f.$t("winOdds")), 1), e("span", null, b(g.winOdds) + "%", 1), e("div", {
                    class: "win-p",
                    style: J({
                        width: `${Math.min(g.winOdds,100)}%`
                    })
                }, null, 4)])) : S("v-if", !0)], 8, at))), 128))])], 2)) : S("v-if", !0)])
            }
        }
    });
const ot = E(it, [
        ["__scopeId", "data-v-d06787cb"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/GameList/HotGameItem.vue"]
    ]),
    rt = ["onClick"],
    ct = O({
        __name: "OnlineGamesItem",
        props: {
            gameData: {
                type: Array,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            },
            gameType: {
                type: String,
                required: !0
            }
        },
        emits: ["onItemClick"],
        setup(t, {
            emit: a
        }) {
            const s = t,
                v = $(() => s.isAll ? s.gameData : s.gameData.length > 8 ? s.gameData.slice(0, 8) : s.gameData),
                l = u => {
                    a("onItemClick", u)
                };
            return te(() => {}), (u, h) => {
                const _ = M("Maintain"),
                    p = P("lazy");
                return i(), m("div", {
                    class: B(["minGame_container", {
                        all_game: u.isAll
                    }])
                }, [(i(!0), m(W, null, x(v.value, n => (i(), m("div", {
                    class: B(["onlineGamesItem", u.gameType]),
                    key: n.gameID,
                    onClick: o => l(n)
                }, [z((i(), m("img", {
                    class: B(u.gameType === "fish" ? "fish_img" : "min_game_img"),
                    key: n.gameID
                }, null, 2)), [
                    [p, n.img]
                ]), L(_, {
                    item: n
                }, null, 8, ["item"])], 10, rt))), 128))], 2)
            }
        }
    });
const ut = E(ct, [
        ["__scopeId", "data-v-860d7030"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/GameList/OnlineGamesItem.vue"]
    ]),
    dt = {
        class: "lottery_container"
    },
    vt = ["onClick"],
    mt = O({
        __name: "LotterySlotItem",
        props: {
            gameData: {
                type: Array,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            }
        },
        setup(t) {
            const {
                isAlowGame: a,
                openThirdGame: s,
                isSassLotteryGame: v
            } = U(), {
                t: l
            } = oe(), u = ae(), h = o => {
                if (o) {
                    let c = o;
                    switch (c) {
                        case "Trx Win Go":
                            c = "Trx Win";
                            break;
                        case "FXOSO":
                            c = l("FXOSO");
                        default:
                            c = c
                    }
                    return c
                }
                return ""
            }, _ = o => {
                if (o) {
                    let c = [];
                    switch (o) {
                        case "Win Go":
                        case "Trx Win Go":
                            c = [l("lotteryHintStr1"), l("lotteryHintStr2")];
                            break;
                        case "5D":
                        case "K3":
                            c = [l("lotteryHintStr3"), l("lotteryHintStr4")];
                            break;
                        case "XOSO":
                        case "FXOSO":
                            c = [l("lotteryHintStr5"), l("lotteryHintStr6")];
                            break;
                        case "Bingo18":
                            c = [l("lotteryHintStr5"), l("lotteryHintStr6")];
                            break;
                        case "4D":
                            c = [l("lotteryHintStr7"), l("lotteryHintStr6")];
                            break;
                        case "MotoRace":
                            c = [l("moto8"), l("moto9")];
                            break;
                        case "VideoWinGo":
                            c = [l("VideoWinGoTip"), l("VideoWinGoTip2")];
                            break;
                        default:
                            c = []
                    }
                    return c
                }
                return ""
            }, p = [{
                value: 1,
                path: "WinGo"
            }, {
                value: 3,
                path: "5D"
            }, {
                value: 2,
                path: "K3"
            }, {
                value: 4,
                path: "WinTrx"
            }, {
                value: 5,
                path: "XoSo"
            }, {
                value: 6,
                path: "XoSo"
            }, {
                value: 7,
                path: "Binguo"
            }, {
                value: 8,
                path: "4D"
            }], n = o => {
                if (v(o)) return s({ ...o,
                    vendorCode: "ARLottery"
                });
                u.push({
                    name: "AllLotteryGames-" + p[p.findIndex(c => c.value === o.id)].path,
                    query: {
                        id: o.id
                    }
                })
            };
            return (o, c) => {
                const G = P("lazy");
                return i(), m("div", dt, [(i(!0), m(W, null, x(o.gameData, f => (i(), m("div", {
                    class: "lotterySlotItem",
                    key: f.id,
                    onClick: I => A(a)(f, n)
                }, [z(e("img", null, null, 512), [
                    [G, f.categoryImg]
                ]), e("span", null, b(h(f.categoryCode)), 1), e("h4", null, [e("div", null, b(_(f.categoryCode)[0]), 1), e("div", null, b(_(f.categoryCode)[1]), 1)])], 8, vt))), 128))])
            }
        }
    });
const _t = E(mt, [
        ["__scopeId", "data-v-acaadf81"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/GameList/LotterySlotItem.vue"]
    ]),
    ft = {
        class: "lotterySlotItem__container"
    },
    pt = {
        class: "title"
    },
    gt = {
        class: "tit"
    },
    yt = {
        class: "game_img"
    },
    ht = O({
        __name: "OtherGameItem",
        props: {
            info: {
                type: null,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            },
            gameType: {
                type: String,
                required: !0
            }
        },
        setup(t) {
            const {
                t: a
            } = oe(), s = {
                sport: a("sport"),
                video: a("live"),
                chess: a("chess")
            };
            return (v, l) => {
                const u = M("Maintain"),
                    h = P("lazy");
                return i(), m("div", ft, [e("div", pt, [e("div", gt, b(s[v.gameType]), 1)]), z(e("img", yt, null, 512), [
                    [h, v.info.vendorImg]
                ]), L(u, {
                    item: v.info
                }, null, 8, ["item"])])
            }
        }
    });
const kt = E(ht, [
        ["__scopeId", "data-v-1153e4fd"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/GameList/OtherGameItem.vue"]
    ]),
    Gt = ["onClick"],
    wt = {
        class: "gameImg"
    },
    It = O({
        __name: "ElectronicItem",
        props: {
            gameData: {
                type: Array,
                default: []
            },
            isAll: {
                type: Boolean,
                default: !1
            }
        },
        emits: ["handleOpenGame"],
        setup(t, {
            emit: a
        }) {
            const s = t,
                v = $(() => s.isAll ? s.gameData : s.gameData.slice(0, 6)),
                l = u => {
                    a("handleOpenGame", u, "slot")
                };
            return (u, h) => {
                const _ = M("Maintain"),
                    p = P("lazy");
                return i(), m("div", {
                    class: B(["onlineGamesItem__container", {
                        allGame: t.isAll
                    }])
                }, [(i(!0), m(W, null, x(v.value, n => (i(), m("div", {
                    key: n.slotsTypeID,
                    class: "item",
                    onClick: o => l(n)
                }, [z(e("img", wt, null, 512), [
                    [p, n.vendorImg]
                ]), L(_, {
                    item: n
                }, null, 8, ["item"])], 8, Gt))), 128))], 2)
            }
        }
    });
const At = E(It, [
        ["__scopeId", "data-v-54337c48"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/GameList/ElectronicItem.vue"]
    ]),
    St = {
        alt: ""
    },
    bt = O({
        __name: "ElectronicWinRate",
        setup(t) {
            const a = Ge(),
                s = $(() => a.winRate.electronicWinRateImgUrl || ""),
                v = $(() => !!(a.winRate.isShowElectronicWinRateExternalLink && s.value)),
                l = () => {
                    a.winRate.electronicWinRateExternalLink && window.open(a.winRate.electronicWinRateExternalLink)
                };
            return (u, h) => {
                const _ = P("lazy");
                return v.value ? (i(), m("div", {
                    key: 0,
                    class: "WinRate",
                    onClick: l
                }, [z(e("img", St, null, 512), [
                    [_, s.value]
                ])])) : S("v-if", !0)
            }
        }
    });
const we = E(bt, [
        ["__scopeId", "data-v-0d36c546"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/GameList/ElectronicWinRate.vue"]
    ]),
    Lt = {
        class: "slot_list"
    },
    Ct = {
        class: "slot_title"
    },
    $t = {
        class: "slot_img_box"
    },
    Tt = ["onClick"],
    Rt = ["onClick"],
    Ot = O({
        __name: "index",
        setup(t) {
            const a = ae(),
                {
                    getSlotList: s,
                    homeState: v,
                    onItemClick: l,
                    checkMaintain: u
                } = U(),
                h = p => {
                    let n = p;
                    return p.indexOf("_") === -1 ? p : (n = p.split("_")[0], n = n.replace("G9", "9G"), n = n.replace("AG", "PA"), n)
                },
                _ = p => {
                    if (u(p)) return;
                    const n = v.allGameList.slot.find(o => o.slotsName === p.vendorCode);
                    sessionStorage.setItem("slotGamesList", JSON.stringify(v.allGameList.slot)), sessionStorage.setItem("gameType", JSON.stringify("slot")), sessionStorage.setItem("clickedItem", JSON.stringify(n)), a.push({
                        name: "AllOnlineGames"
                    })
                };
            return s(), (p, n) => {
                const o = M("svg-icon"),
                    c = M("Maintain"),
                    G = P("lazy");
                return i(), m("div", Lt, [L(we), (i(!0), m(W, null, x(A(v).slotsGame, f => (i(), m("div", {
                    class: "slot_item",
                    key: f.vendorCode
                }, [e("div", Ct, [L(o, {
                    name: f.vendorCode
                }, null, 8, ["name"]), re(" " + b(h(f.vendorCode)) + b(p.$t("electric")), 1)]), e("div", $t, [(i(!0), m(W, null, x(f.childList.slice(0, 6), I => (i(), m("div", {
                    class: "slot_img",
                    onClick: d => A(l)(I)
                }, [z((i(), m("img", {
                    key: I.gameID + f.vendorCode
                })), [
                    [G, I.img]
                ]), L(c, {
                    item: I
                }, null, 8, ["item"])], 8, Tt))), 256))]), e("div", {
                    class: "all_slot",
                    onClick: () => _(f)
                }, b(p.$t("allGame")), 9, Rt)]))), 128))])
            }
        }
    });
const Dt = E(Ot, [
        ["__scopeId", "data-v-1b7d97f8"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/Electronic/Slot/index.vue"]
    ]),
    K = t => (Ne("data-v-df3cc798"), t = t(), Be(), t),
    Ht = K(() => e("div", {
        class: "skeleton_hot"
    }, [e("div", {
        class: "hot_tit"
    }), e("div", {
        class: "hot_list"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div")]), e("div", {
        class: "hot_tit"
    }), e("div", {
        class: "hot_list"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div")])], -1)),
    Et = K(() => e("div", {
        class: "skeleton_other"
    }, [e("div"), e("div"), e("div"), e("div")], -1)),
    Nt = {
        class: "otherGame"
    },
    Bt = K(() => e("div", {
        class: "skeleton_slot"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div")], -1)),
    Mt = K(() => e("div", {
        class: "skeleton_other"
    }, [e("div"), e("div"), e("div"), e("div")], -1)),
    Wt = K(() => e("div", {
        class: "skeleton_flash"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div")], -1)),
    xt = ["src"],
    qt = O({
        __name: "GameListGrid",
        props: {
            currentGame: {
                type: String,
                default: ""
            },
            isAll: {
                type: Boolean,
                default: !1
            }
        },
        setup(t) {
            const a = t,
                s = ae(),
                v = y(!0),
                l = $(() => s.currentRoute.value.name !== "AllGames"),
                {
                    onItemClick: u,
                    getAllGame: h,
                    homeState: _,
                    checkMaintain: p
                } = U(),
                n = $(() => JSON.parse(JSON.stringify(_.allGameList || {}))),
                o = $(() => a.currentGame === "popular" ? 1 : ["sport", "chess", "video"].includes(a.currentGame) ? 2 : a.currentGame === "lottery" ? 3 : a.currentGame === "slot" ? 4 : a.currentGame === "flash" || a.currentGame === "fish" ? 5 : -1),
                c = async () => {
                    var w, k;
                    await h(), n.value.popular = [(w = _.allGameList) == null ? void 0 : w.popular.platformList, (k = _.allGameList) == null ? void 0 : k.popular.clicksTopList], v.value = !1
                },
                G = () => {
                    s.push({
                        name: "AllGames",
                        query: {
                            type: a.currentGame
                        }
                    })
                },
                f = $(() => n.value[a.currentGame].length < 1 ? [] : n.value[a.currentGame][0] || []),
                I = $(() => {
                    var w;
                    return n.value[a.currentGame].length < 1 ? [] : a.isAll ? n.value[a.currentGame][1] || [] : ((w = n.value[a.currentGame][1]) == null ? void 0 : w.slice(0, 9)) || []
                }),
                d = async (w, k) => {
                    if (["chess", "slot"].includes(k)) {
                        if (p(w)) return;
                        sessionStorage.setItem("slotGamesList", JSON.stringify(n.value[a.currentGame])), sessionStorage.setItem("gameType", JSON.stringify(a.currentGame)), sessionStorage.setItem("clickedItem", JSON.stringify(w)), await s.push({
                            name: "AllOnlineGames"
                        })
                    } else u(w)
                };
            return c(), (w, k) => {
                const g = M("van-skeleton");
                return i(), m("div", {
                    class: B(["gameListGrid__container", {
                        all_container: t.isAll
                    }])
                }, [t.currentGame === "popular" ? (i(), H(g, {
                    key: 0,
                    loading: v.value
                }, {
                    template: R(() => [Ht]),
                    default: R(() => [L(ot, {
                        platformList: f.value,
                        clicksTopList: I.value,
                        onOnItemClick: A(u),
                        isAll: t.isAll
                    }, null, 8, ["platformList", "clicksTopList", "onOnItemClick", "isAll"])]),
                    _: 1
                }, 8, ["loading"])) : S("v-if", !0), o.value === 2 ? (i(), H(g, {
                    key: 1,
                    loading: v.value
                }, {
                    template: R(() => [Et]),
                    default: R(() => [e("div", Nt, [(i(!0), m(W, null, x(n.value[t.currentGame], (T, N) => (i(), H(kt, {
                        key: N,
                        info: T,
                        gameType: t.currentGame,
                        isAll: t.isAll,
                        onClick: V => d(T, t.currentGame)
                    }, null, 8, ["info", "gameType", "isAll", "onClick"]))), 128))])]),
                    _: 1
                }, 8, ["loading"])) : S("v-if", !0), o.value === 4 ? (i(), H(g, {
                    key: 2,
                    loading: v.value
                }, {
                    template: R(() => [Bt]),
                    default: R(() => [t.isAll ? S("v-if", !0) : (i(), H(we, {
                        key: 0
                    })), l.value ? (i(), H(At, {
                        key: 1,
                        gameData: n.value[t.currentGame],
                        isAll: t.isAll,
                        onHandleOpenGame: d
                    }, null, 8, ["gameData", "isAll"])) : (i(), H(Dt, {
                        key: 2
                    }))]),
                    _: 1
                }, 8, ["loading"])) : S("v-if", !0), o.value === 3 ? (i(), H(g, {
                    key: 3,
                    loading: v.value
                }, {
                    template: R(() => [Mt]),
                    default: R(() => [L(_t, {
                        gameData: n.value[t.currentGame],
                        isAll: t.isAll
                    }, null, 8, ["gameData", "isAll"])]),
                    _: 1
                }, 8, ["loading"])) : S("v-if", !0), S(" 小游戏、捕鱼 "), o.value === 5 ? (i(), H(g, {
                    key: 4,
                    loading: v.value
                }, {
                    template: R(() => [Wt]),
                    default: R(() => [L(ut, {
                        gameData: n.value[t.currentGame],
                        gameType: t.currentGame,
                        isAll: t.isAll,
                        onOnItemClick: A(u)
                    }, null, 8, ["gameData", "gameType", "isAll", "onOnItemClick"])]),
                    _: 1
                }, 8, ["loading"])) : S("v-if", !0), t.isAll ? S("v-if", !0) : (i(), m("button", {
                    key: 5,
                    onClick: G,
                    class: "look_all"
                }, [e("img", {
                    src: A(Ve)("home", "all"),
                    alt: ""
                }, null, 8, xt), re(" " + b(w.$t("viewAll")), 1)]))], 2)
            }
        }
    });
const Ft = E(qt, [
        ["__scopeId", "data-v-df3cc798"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/GameList/GameListGrid.vue"]
    ]),
    zt = {
        class: "gamesList__container"
    },
    Pt = {
        class: "gamesList__container-title"
    },
    Vt = O({
        __name: "GameList",
        props: {
            gameData: {
                type: Object,
                required: !0
            },
            title: {
                type: String,
                required: !0
            },
            gameType: {
                type: String,
                required: !0
            }
        },
        setup(t) {
            return (a, s) => (i(), m("div", zt, [e("div", Pt, b(a.title), 1), L(Ft, {
                currentGame: a.gameType,
                isAll: !0
            }, null, 8, ["currentGame"])]))
        }
    });
const Xt = E(Vt, [
        ["__scopeId", "data-v-e4c17073"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/RedHome/AllGames/GameList.vue"]
    ]),
    Ie = Symbol();
var Ae = (t, a) => {
    const s = t.__vccOpts || t;
    for (const [v, l] of a) s[v] = l;
    return s
};
const jt = O({
        name: "FunTabItem",
        props: {
            title: String,
            name: [String, Number],
            badge: [String, Number]
        },
        setup(t) {
            const a = Me(Ie),
                s = y(),
                v = $(() => (a == null ? void 0 : a.activeValue.value) === t.name ? {
                    color: a == null ? void 0 : a.activeColor.value
                } : {}),
                l = () => {
                    a == null || a.setActiveValue(t.name)
                },
                u = {
                    name: he(t, "name"),
                    el: s
                };
            return te(() => {
                var h;
                (h = a.addItem) == null || h.call(a, u)
            }), We(() => {
                var h;
                (h = a.removeItem) == null || h.call(a, u)
            }), {
                el: s,
                style: v,
                handleClick: l
            }
        }
    }),
    Jt = {
        class: "fun-tab-item__wrap"
    },
    Ut = {
        class: "fun-tab-item__label"
    },
    Kt = {
        key: 0,
        class: "fun-tab-item__badge"
    };

function Yt(t, a, s, v, l, u) {
    return i(), m("div", {
        ref: "el",
        style: J(t.style),
        class: "fun-tab-item",
        onClick: a[0] || (a[0] = (...h) => t.handleClick && t.handleClick(...h))
    }, [e("div", Jt, [ee(t.$slots, "icon"), e("div", Ut, [ee(t.$slots, "default", {}, () => [re(b(t.title), 1)])]), t.badge ? (i(), m("div", Kt, b(t.badge), 1)) : S("v-if", !0)])], 4)
}
var Qt = Ae(jt, [
    ["render", Yt],
    ["__file", "/Users/scoutyin/Documents/ScoutYin/fun-tab/src/tab-item.vue"]
]);
const ie = window;

function Zt() {
    let t = 0;
    const a = ["webkit", "moz"];
    for (let s = 0; s < a.length && !window.requestAnimationFrame; ++s) window.requestAnimationFrame = ie[a[s] + "RequestAnimationFrame"], window.cancelAnimationFrame = ie[a[s] + "CancelAnimationFrame"] || ie[a[s] + "CancelRequestAnimationFrame"];
    window.requestAnimationFrame || (window.requestAnimationFrame = function(s) {
        const v = Date.now(),
            l = v - t,
            u = Math.max(0, 16.7 - l),
            h = window.setTimeout(function() {
                s(l)
            }, u);
        return t = v + u, h
    }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(s) {
        clearTimeout(s)
    })
}
const ea = O({
        name: "FunTabs",
        props: {
            modelValue: {
                type: [String, Number],
                default: ""
            },
            lineWidth: {
                type: [Number, String],
                default: 30
            },
            lineHeight: {
                type: Number,
                default: 3
            },
            activeColor: {
                type: String,
                default: "#1677ff"
            },
            additionalX: {
                type: Number,
                default: 50
            },
            reBoundExponent: {
                type: Number,
                default: 10,
                validator(t) {
                    return t > 0
                }
            },
            inertialDuration: {
                type: Number,
                default: 1e3,
                validator(t) {
                    return t > 0
                }
            },
            reBoundingDuration: {
                type: Number,
                default: 360
            }
        },
        emits: ["update:modelValue", "change"],
        setup(t, {
            emit: a,
            expose: s
        }) {
            let v = null;
            const l = [],
                u = y(),
                h = y(),
                _ = y(t.modelValue),
                p = y(0),
                n = y(0),
                o = y(0),
                c = y(0),
                G = y(0),
                f = y(!1),
                I = y(!1),
                d = y(0),
                w = y(0),
                k = y(0),
                g = y(0),
                T = y(0),
                N = y(0),
                V = y(16.7),
                Y = y(0),
                Q = y(0),
                X = y(0),
                ce = y(.001),
                q = y(.001),
                Se = $(() => {
                    const r = I.value && !f.value ? t.reBoundingDuration : 0;
                    return {
                        transitionTimingFunction: I.value ? "cubic-bezier(0.25, 0.46, 0.45, 0.94)" : "cubic-bezier(0.1, 0.57, 0.1, 1)",
                        transitionDuration: `${r}ms`,
                        transform: `translate3d(${d.value}px, 0px, 0px)`
                    }
                }),
                be = $(() => ({
                    transition: "all 300ms",
                    width: `${n.value}px`,
                    height: `${t.lineHeight}px`,
                    transform: `translate3d(${p.value}px, 0, 0)`,
                    backgroundColor: t.activeColor
                })),
                ne = $(() => g.value <= w.value);
            ke(() => t.modelValue, r => {
                _.value = r, Z()
            });
            const Z = () => {
                    v || (v = new Promise(r => {
                        xe(() => {
                            ue(), r(), v = null
                        })
                    }))
                },
                Le = r => {
                    _.value = r, a("update:modelValue", r), a("change", r)
                },
                Ce = r => {
                    l.push(r), Z()
                },
                $e = r => {
                    const C = l.findIndex(D => D.name === r.name);
                    C !== -1 && (l.splice(C, 1), Z())
                },
                Te = {
                    activeValue: _,
                    activeColor: he(t, "activeColor"),
                    addItem: Ce,
                    removeItem: $e,
                    setActiveValue: Le
                };
            qe(Ie, Te);
            const ue = () => {
                    var r, C;
                    o.value = ((r = u.value) == null ? void 0 : r.offsetWidth) || 0, c.value = ((C = h.value) == null ? void 0 : C.offsetWidth) - o.value, De(), Oe()
                },
                de = () => (I.value = !1, d.value > 0 ? (I.value = !0, d.value = 0) : d.value < -c.value && (I.value = !0, d.value = -c.value), I.value),
                Re = () => {
                    ne.value ? d.value <= 0 && d.value + c.value > 0 || d.value > 0 ? d.value += g.value - k.value : d.value + c.value <= 0 && (d.value += t.additionalX * (g.value - k.value) / (o.value + Math.abs(d.value + c.value))) : d.value >= 0 ? d.value += t.additionalX * (g.value - k.value) / (o.value + d.value) : (d.value <= 0 && d.value + c.value >= 0 || d.value + c.value <= 0) && (d.value += g.value - k.value), k.value = g.value
                },
                ve = () => {
                    if (Q.value = Date.now(), V.value = Q.value - Y.value, ne.value ? d.value <= -c.value ? (q.value *= (t.reBoundExponent + Math.abs(d.value + c.value)) / t.reBoundExponent, G.value = Math.min(G.value - q.value, 0)) : G.value = Math.min(G.value - q.value * V.value, 0) : d.value >= 0 ? (q.value *= (t.reBoundExponent + d.value) / t.reBoundExponent, G.value = Math.max(G.value - q.value, 0)) : G.value = Math.max(G.value - q.value * V.value, 0), d.value += G.value * V.value / 2, Math.abs(G.value) <= ce.value) {
                        de();
                        return
                    }
                    Y.value = Q.value, X.value = requestAnimationFrame(ve)
                },
                me = () => {
                    if (!l.length) return;
                    const r = l.find(C => C.name.value === _.value);
                    return r && r.el.value
                },
                Oe = () => {
                    const r = me();
                    if (!r) return;
                    const C = r.offsetWidth,
                        D = r.offsetLeft,
                        {
                            lineWidth: F
                        } = t;
                    F === "auto" ? n.value = C : F < 1 ? n.value = C * F : n.value = F, p.value = D + (C - n.value) / 2
                },
                De = () => {
                    const r = me();
                    if (!r) return;
                    const C = r.offsetLeft,
                        D = (o.value - r.offsetWidth) / 2;
                    let F = 0;
                    const ge = Math.abs(d.value);
                    C <= ge + D ? F = D - (C + d.value) : F = -(C - ge - D);
                    let j = F + d.value;
                    j > 0 && (j = 0), j < -c.value && (j = -c.value), I.value = !0, d.value = j
                },
                _e = r => {
                    r.stopPropagation(), cancelAnimationFrame(X.value), k.value = r.touches[0].clientX
                },
                fe = r => {
                    c.value <= 0 || (r.preventDefault(), r.stopPropagation(), f.value = !0, T.value = N.value, w.value = k.value, g.value = r.touches[0].clientX, Re(), N.value = r.timeStamp)
                },
                pe = r => {
                    if (f.value = !1, de()) cancelAnimationFrame(X.value);
                    else {
                        let C = r.timeStamp - N.value,
                            D = N.value - T.value;
                        if (D = D > 0 ? D : 8, C > 100) return;
                        G.value = (k.value - w.value) / D, q.value = G.value / t.inertialDuration, Y.value = Date.now(), X.value = requestAnimationFrame(ve)
                    }
                },
                He = () => {
                    const r = u.value;
                    r.addEventListener("touchstart", _e, !1), r.addEventListener("touchmove", fe, !1), r.addEventListener("touchend", pe, !1)
                },
                Ee = () => {
                    const r = u.value;
                    r.removeEventListener("touchstart", _e), r.removeEventListener("touchmove", fe), r.removeEventListener("touchend", pe)
                };
            return te(() => {
                Zt(), He(), Z()
            }), Fe(() => {
                Ee()
            }), s({
                resize: ue
            }), {
                viewAreaRef: u,
                listRef: h,
                activeValue: _,
                lineOffset: p,
                activeLineWidth: n,
                viewAreaWidth: o,
                offsetX: c,
                speed: G,
                touching: f,
                reBounding: I,
                translateX: d,
                startX: w,
                lastX: k,
                currentX: g,
                startMoveTime: T,
                endMoveTime: N,
                frameTime: V,
                frameStartTime: Y,
                frameEndTime: Q,
                inertiaFrame: X,
                zeroSpeed: ce,
                acceleration: q,
                listStyle: Se,
                activeBarStyle: be,
                isMoveLeft: ne
            }
        }
    }),
    ta = {
        ref: "viewAreaRef",
        class: "fun-tabs"
    };

function aa(t, a, s, v, l, u) {
    return i(), m("div", ta, [e("div", {
        ref: "listRef",
        style: J(t.listStyle),
        class: "fun-tabs__tab-list"
    }, [ee(t.$slots, "default"), e("div", {
        style: J(t.activeBarStyle),
        class: "fun-tabs__active-line"
    }, null, 4)], 4)], 512)
}
var na = Ae(ea, [
    ["render", aa],
    ["__file", "/Users/scoutyin/Documents/ScoutYin/fun-tab/src/tabs.vue"]
]);
const sa = O({
        __name: "NavBar",
        props: {
            list: {
                type: Array,
                required: !0
            },
            tabClassName: {
                type: String,
                required: !0
            },
            active: {
                type: Number,
                required: !0,
                default: 0
            },
            tabItemClassName: {
                type: String,
                required: !1
            }
        },
        emits: ["update:active", "onClickTab"],
        setup(t, {
            expose: a,
            emit: s
        }) {
            const v = t,
                l = y(),
                u = y(0),
                h = (_, p) => {
                    s("update:active", u.value), s("onClickTab", {
                        item: _,
                        index: p
                    })
                };
            return ke(() => v.active, _ => {
                u.value = _
            }), a({
                funtabRef: l
            }), (_, p) => (i(), H(A(na), {
                modelValue: u.value,
                "onUpdate:modelValue": p[0] || (p[0] = n => u.value = n),
                class: B(_.tabClassName),
                lineWidth: "0",
                ref_key: "funtabRef",
                ref: l
            }, {
                default: R(() => [(i(!0), m(W, null, x(_.list, (n, o) => z((i(), H(A(Qt), {
                    name: o,
                    key: o,
                    class: B([_.tabItemClassName, {
                        activeClassName: _.active === o
                    }]),
                    onClick: c => h(n, o)
                }, {
                    default: R(() => [ee(_.$slots, "default", {
                        item: n,
                        index: o
                    })]),
                    _: 2
                }, 1032, ["name", "class", "onClick"])), [
                    [ze, n.isShow !== void 0 ? n.isShow : !0]
                ])), 128))]),
                _: 3
            }, 8, ["modelValue", "class"]))
        }
    }),
    la = E(sa, [
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/FunTab/NavBar.vue"]
    ]),
    ia = {
        class: "allGames__container"
    },
    oa = O({
        __name: "index",
        setup(t) {
            const {
                homeState: a,
                getGameType: s,
                getAllGame: v
            } = U(), l = y(0), u = y(null), h = y(), _ = ae(), {
                t: p
            } = oe(), n = y([]), o = y({});

            function c() {
                _.go(-1)
            }
            const G = $(() => n.value[l.value]);
            te(() => {
                f()
            }), Pe(() => {
                f()
            });
            const f = async () => {
                var d, w;
                !a.gameTypeList.length && await s(), !a.allGameList && await v(), n.value = [], a.gameTypeList.forEach(k => {
                    k.categoryCode === "BigAward" || k.state !== 1 || n.value.push({
                        isShow: k.state === 1,
                        title: p("code" + k.typeNameCode),
                        img: k.categoryImg,
                        key: k.categoryCode.toLocaleLowerCase()
                    })
                }), o.value = a.allGameList || {}, o.value.popular = [(d = o.value) == null ? void 0 : d.popular.platformList, (w = o.value) == null ? void 0 : w.popular.clicksTopList];
                const I = _.currentRoute.value.query.type || "";
                l.value = n.value.findIndex(k => k.key + "" === I) || 0
            };
            return (I, d) => {
                const w = M("NavBar"),
                    k = M("van-sticky"),
                    g = P("lazy");
                return i(), m("div", ia, [L(w, {
                    title: I.$t("all"),
                    "left-arrow": "",
                    onClickLeft: c
                }, null, 8, ["title"]), L(k, {
                    class: "alGames__container-sticky"
                }, {
                    default: R(() => [L(la, {
                        list: n.value,
                        active: l.value,
                        "onUpdate:active": d[0] || (d[0] = T => l.value = T),
                        tabClassName: "tabs",
                        activeClassName: "tab_active",
                        ref_key: "tabRefs",
                        ref: h
                    }, {
                        default: R(({
                            item: T,
                            index: N
                        }) => [T.isShow ? (i(), m("div", {
                            key: 0,
                            class: B(["tab_item", {
                                tab_active: N === l.value
                            }])
                        }, [z(e("img", null, null, 512), [
                            [g, T.img]
                        ]), e("span", null, b(T.title), 1)], 2)) : S("v-if", !0)]),
                        _: 1
                    }, 8, ["list", "active"])]),
                    _: 1
                }), e("div", {
                    class: "allGames__container-list",
                    ref_key: "allGamesContainer",
                    ref: u
                }, [n.value.length > 0 ? (i(), H(Xt, {
                    key: 0,
                    gameType: G.value.key,
                    title: G.value.title,
                    gameData: o.value[G.value.key]
                }, null, 8, ["gameType", "title", "gameData"])) : S("v-if", !0)], 512)])
            }
        }
    });
const ra = E(oa, [
        ["__scopeId", "data-v-0a9bf0c5"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/views/home/AllGames/index.vue"]
    ]),
    da = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: ra
    }, Symbol.toStringTag, {
        value: "Module"
    }));
export {
    na as F, la as N, Qt as a, da as i
};