import {
    G as M,
    aw as ee,
    r as w,
    $ as z,
    B as X,
    I as o,
    ax as F,
    ay as te,
    J as e,
    az as se,
    ar as N,
    N as n,
    ap as U,
    P as s,
    ao as m,
    O as l,
    D as ne,
    aA as Y,
    z as Z,
    R as G,
    A as ae,
    H as V,
    Q as C,
    av as O,
    K as L,
    M as H,
    F as oe,
    au as q,
    aB as j,
    C as ie,
    E as le,
    aC as ue,
    aD as re
} from "./common.modules-5cfe2cf4.js";
import {
    a as J,
    c as R,
    _ as P,
    g as ce,
    b as de,
    e as pe,
    j as ve,
    h as K,
    i as fe
} from "./page-activity-ActivityDetail-a58ec568.js";
import {
    L as me,
    E as Q
} from "./page-activity-Bonus-3c16c86d.js";
const he = {
        class: "item"
    },
    _e = ["src"],
    ge = {
        class: "right"
    },
    ye = {
        key: 0
    },
    $e = {
        key: 1
    },
    ke = {
        key: 2
    },
    Te = {
        key: 3,
        class: "time"
    },
    we = ["innerHTML"],
    Ce = {
        key: 4,
        class: "time"
    },
    Le = {
        key: 5,
        class: "time"
    },
    be = {
        class: "foot"
    },
    De = {
        class: "amount"
    },
    Be = M({
        __name: "card",
        props: {
            bgImgWidth: {
                type: String,
                required: !1,
                default: "100%"
            },
            bgImgHeight: {
                type: String,
                required: !1,
                default: "150px"
            },
            itemD: {
                type: null,
                required: !1,
                default: {}
            },
            state: {
                type: Number,
                required: !1
            },
            isRefresh: {
                type: Boolean,
                required: !1,
                default: !1
            }
        },
        emits: ["update:isRefresh"],
        setup(d, {
            emit: g
        }) {
            const v = d;

            function p() {
                if (v.state == 1) {
                    const a = f.value.replace(/-/g, "/"),
                        b = v.itemD.endTime.replace(/-/g, "/");
                    u.value = new Date(b).getTime() - new Date(a).getTime(), u.value > 0 && (k.value = ne({
                        time: u.value,
                        onChange: y
                    }), k.value.start())
                }
            }
            const {
                serviceNowTime: f
            } = J(), {
                isRefresh: t
            } = ee(v, g), u = w(0), k = w();
            z(() => v.itemD.id, a => {
                p()
            }, {
                immediate: !0
            });
            const T = X(() => k.value.current);

            function y(a) {
                a.total == 0 ? t.value = !0 : t.value = !1
            }

            function h(a) {
                const b = String(a.hours).padStart(2, "0"),
                    D = String(a.minutes).padStart(2, "0"),
                    B = String(a.seconds).padStart(2, "0");
                return b + ":" + D + ":" + B
            }
            return (a, b) => (n(), o("div", he, [F(e("img", {
                src: a.itemD.iconUrl,
                alt: "",
                style: se(`width:${a.bgImgWidth};height:${a.bgImgHeight};`)
            }, null, 12, _e), [
                [te, a.itemD.iconUrl]
            ]), e("div", ge, [N(a.$slots, "content", {}, () => {
                var D, B;
                return [e("div", {
                    class: U(["head", `type${a.state}`])
                }, [a.state == 1 ? (n(), o("h1", ye, s(a.$t("cpsTip3")), 1)) : a.state == 0 ? (n(), o("h1", $e, s(a.$t("startTime")), 1)) : a.state == 2 ? (n(), o("h1", ke, s(a.$t("ended")), 1)) : m("v-if", !0), a.state == 1 ? (n(), o("div", Te, [e("p", {
                    innerHTML: a.$t("fifteenDays", [T.value.days])
                }, null, 8, we), e("h6", null, s(h(T.value)), 1)])) : m("v-if", !0), a.state == 0 ? (n(), o("div", Ce, s((D = a.itemD) == null ? void 0 : D.startTime), 1)) : m("v-if", !0), a.state == 2 ? (n(), o("div", Le, "00:00:00")) : m("v-if", !0)], 2), e("div", be, [e("h1", null, s(a.$t("winTips5")), 1), e("div", De, s(l(R)(((B = a.itemD) == null ? void 0 : B.sumBonus) || 0)), 1)])]
            }, !0)]), N(a.$slots, "footer", {}, void 0, !0)]))
        }
    });
const x = P(Be, [
        ["__scopeId", "data-v-277c60ca"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/Activity/Championship/card.vue"]
    ]),
    Se = {
        class: "dialog__container",
        role: "dialog",
        tabindex: "0"
    },
    Re = {
        key: 0,
        class: "dialog__container-img"
    },
    Ae = {
        class: "dialog__container-title"
    },
    Ie = {
        class: "dialog__container-content"
    },
    Ne = {
        key: 1,
        class: "dialog__container-footer"
    },
    Oe = ["src"],
    Ue = M({
        __name: "Dialog",
        props: {
            show: {
                type: Boolean,
                default: !1
            },
            title: {
                type: String,
                default: ""
            },
            confirmText: {
                type: String,
                default: ""
            },
            showCancelBtn: {
                type: Boolean,
                default: !0
            },
            cancelText: {
                type: String,
                default: ""
            },
            clickOutSide: {
                type: Boolean,
                default: !1
            },
            isShowHeader: {
                type: Boolean,
                default: !0
            },
            imgUrl: {
                type: String,
                default: "tip"
            },
            showCloseIcon: {
                type: Boolean,
                default: !1
            },
            showFooter: {
                type: Boolean,
                default: !0
            }
        },
        emits: ["update:show", "confirm"],
        setup(d, {
            emit: g
        }) {
            const v = d;
            z(() => v.show, t => {
                t ? window.addEventListener("touchmove", f, {
                    passive: !1
                }) : window.removeEventListener("touchmove", f)
            });

            function p(t) {
                v.clickOutSide && g("update:show", !1)
            }
            const f = t => {};
            return (t, u) => {
                const k = Y("lazy");
                return n(), o("div", {
                    class: U(["dialog", {
                        active: d.show,
                        inactive: !d.show
                    }])
                }, [e("div", Se, [d.isShowHeader ? (n(), o("div", Re, [N(t.$slots, "header", {}, () => [F(e("img", {
                    class: U({
                        succed: d.imgUrl == "succeed"
                    }),
                    alt: ""
                }, null, 2), [
                    [k, l(ce)("wallet", d.imgUrl)]
                ])], !0)])) : m("v-if", !0), e("div", Ae, [N(t.$slots, "title", {}, () => [e("h1", null, s(d.title), 1)], !0)]), e("div", Ie, [N(t.$slots, "content", {}, void 0, !0)]), d.showFooter ? (n(), o("div", Ne, [N(t.$slots, "footer", {}, () => [e("button", {
                    onClick: u[0] || (u[0] = () => {
                        g("confirm")
                    })
                }, s(d.confirmText || t.$t("confirm")), 1), d.showCancelBtn ? (n(), o("button", {
                    key: 0,
                    onClick: u[1] || (u[1] = () => {
                        g("update:show", !1)
                    })
                }, s(d.cancelText || t.$t("cancel")), 1)) : m("v-if", !0)], !0)])) : m("v-if", !0), d.showCloseIcon ? (n(), o("img", {
                    key: 2,
                    class: "close_img",
                    src: l(de)("common", "close"),
                    onClick: p
                }, null, 8, Oe)) : m("v-if", !0)]), e("div", {
                    class: "dialog__outside",
                    onClick: p
                })], 2)
            }
        }
    });
const He = P(Ue, [
        ["__scopeId", "data-v-3e71d3da"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/common/Dialog.vue"]
    ]),
    Me = {
        class: "championship"
    },
    Pe = {
        class: "tabs"
    },
    je = ["onClick"],
    Ve = ["onClick"],
    qe = ["innerHTML"],
    ze = M({
        __name: "index",
        setup(d) {
            const {
                tabList: g,
                serviceNowTime: v,
                type: p
            } = J(), {
                t: f
            } = Z(), t = G(), u = ae({
                state: 1
            }), k = w([]), T = w(), y = w(!1), h = w(""), a = w(!1);
            z(a, r => {
                var i;
                a.value && ((i = T.value) == null || i.resetRefresh())
            });

            function b(r) {
                t.push({
                    name: "Championship-ChampionshipDetail",
                    query: {
                        championId: r
                    }
                })
            }

            function D(r) {
                var i;
                u.state = r, (i = T.value) == null || i.resetRefresh()
            }

            function B(r) {
                v.value = r.serviceNowTime
            }
            const $ = w(null),
                A = async r => {
                    $.value && clearTimeout($.value), $.value = setTimeout(async () => {
                        var _;
                        if (r.isJoin) return;
                        const i = await W(ve({
                            championId: r.id
                        }));
                        if (i)
                            if (i.code == 0) oe(f("success")), (_ = T.value) == null || _.resetRefresh();
                            else if ([803, 804, 805, 807].includes(i.msgCode) && i.data != null) switch (y.value = !0, i.msgCode) {
                            case 803:
                                h.value = f("cpsTip25", [i.data]);
                                break;
                            case 804:
                                h.value = f("cpsTip26", [i.data]);
                                break;
                            case 805:
                                h.value = f("cpsTip27", [p[i.data]]);
                                break;
                            case 807:
                                let S = f("code807", ["{0}", "{1}", "{2}"]);
                                Object.values(i.data || {}).filter(Boolean).forEach((c, I) => {
                                    S = S.replace(`{${I}}`, `<span>${c}</span>`)
                                }), h.value = S;
                                break;
                            default:
                                h.value = f(`code${i.msgCode}`)
                        } else {
                            y.value = !0;
                            let S = f(`code${i.msgCode}`, ["{0}"]);
                            Object.values(i.data || {}).filter(Boolean).forEach((c, I) => {
                                S = S.replace(`{${I}}`, `<span>${c}</span>`)
                            }), h.value = S
                        }
                    }, 100)
                },
                W = async r => await r.then(_ => _ && _.code !== 0 ? [803, 804, 805, 806, 807].includes(_.msgCode) ? _ : (K(_), null) : _).catch(_ => ([806].includes(_.msgCode) || K(_), _));
            return (r, i) => {
                const _ = V("NavBar"),
                    S = V("van-sticky");
                return n(), o("div", Me, [C(S, null, {
                    default: O(() => [C(_, {
                        title: r.$t("cpsTip1"),
                        "left-arrow": "",
                        onClickLeft: i[0] || (i[0] = () => l(t).back())
                    }, null, 8, ["title"]), e("div", Pe, [(n(!0), o(L, null, H(l(g), c => (n(), o("div", {
                        key: c.key,
                        class: U({
                            active: u.state == c.key
                        }),
                        onClick: I => D(c.key)
                    }, s(c.title), 11, je))), 128))])]),
                    _: 1
                }), C(me, {
                    list: k.value,
                    "onUpdate:list": i[2] || (i[2] = c => k.value = c),
                    api: l(pe),
                    "page-query": u,
                    "onUpdate:pageQuery": i[3] || (i[3] = c => u = c),
                    distance: 100,
                    ref_key: "listRef",
                    ref: T,
                    "is-auto-load": !0,
                    onListChange: B
                }, {
                    content: O(() => [(n(!0), o(L, null, H(k.value, c => (n(), o("div", {
                        key: c.id
                    }, [C(x, {
                        itemD: c,
                        state: c.state,
                        isRefresh: a.value,
                        "onUpdate:isRefresh": i[1] || (i[1] = I => a.value = I),
                        onClick: I => b(c.id)
                    }, null, 8, ["itemD", "state", "isRefresh", "onClick"]), [1].includes(c.state) ? (n(), o("div", {
                        key: 0,
                        class: U(["btn", {
                            active: !c.isJoin
                        }]),
                        onClick: I => A(c)
                    }, s(c.isJoin ? r.$t("cpsTip8") : r.$t("cpsTip9")), 11, Ve)) : m("v-if", !0)]))), 128))]),
                    _: 1
                }, 8, ["list", "api", "page-query"]), C(He, {
                    show: y.value,
                    "onUpdate:show": i[4] || (i[4] = c => y.value = c),
                    onConfirm: i[5] || (i[5] = () => y.value = !1),
                    showCancelBtn: !1,
                    showCloseIcon: !0,
                    clickOutSide: !0
                }, {
                    content: O(() => [e("h1", {
                        class: "championship-tips",
                        innerHTML: h.value
                    }, null, 8, qe)]),
                    _: 1
                }, 8, ["show"])])
            }
        }
    });
const Je = P(ze, [
        ["__scopeId", "data-v-5ffc4111"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/activity/Championship/index.vue"]
    ]),
    Lt = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: Je
    }, Symbol.toStringTag, {
        value: "Module"
    })),
    Ee = {
        class: "title"
    },
    We = {
        class: "con"
    },
    Fe = ["innerHTML"],
    Ge = ["innerHTML"],
    Qe = {
        class: "condition"
    },
    Ke = {
        key: 0
    },
    Xe = {
        key: 1
    },
    Ye = {
        key: 2
    },
    Ze = {
        class: "ranking"
    },
    xe = {
        class: "top"
    },
    et = M({
        __name: "rule",
        props: {
            data: {
                type: null,
                required: !1
            }
        },
        setup(d) {
            const {
                t: g
            } = Z(), v = w(["0"]), {
                type: p
            } = J();

            function f(t, u) {
                return t == u ? g("cpsTip20", [t]) : g("cpsTip21", [t, u])
            }
            return (t, u) => {
                const k = V("van-collapse-item"),
                    T = V("van-collapse");
                return n(), q(T, {
                    modelValue: v.value,
                    "onUpdate:modelValue": u[0] || (u[0] = y => v.value = y),
                    class: "rule"
                }, {
                    default: O(() => [C(k, {
                        name: "1"
                    }, {
                        title: O(() => [e("div", Ee, s(t.$t("cpsTip5").toLocaleUpperCase()), 1)]),
                        default: O(() => [e("div", We, [e("h1", null, [e("span", null, s(t.$t("cpsTip11")), 1)]), e("div", {
                            innerHTML: t.$t("cpsTip12", [t.data.vendorCode, t.data.startTime, t.data.endTime])
                        }, null, 8, Fe), e("h1", null, [e("span", null, s(t.$t("awardAmount")), 1)]), e("div", null, [j(s(t.$t("cpsTip13")), 1), e("span", null, s(l(R)(t.data.sumBonus || 0)), 1)]), e("h1", null, [e("span", null, s(t.$t("cpsTip14")), 1)]), e("div", null, [e("div", {
                            innerHTML: t.$t("cpsTip15", [t.data.vendorCode])
                        }, null, 8, Ge), e("div", Qe, [t.data.conditionsBetAmount > 0 ? (n(), o("p", Ke, [j(s(t.$t("betAmounts")) + " ", 1), e("span", null, s(l(R)(t.data.conditionsBetAmount || 0)), 1)])) : m("v-if", !0), t.data.conditionsRechargeAmount > 0 ? (n(), o("p", Xe, [j(s(t.$t("rechageAmount")) + " ", 1), e("span", null, s(l(R)(t.data.conditionsRechargeAmount || 0)), 1)])) : m("v-if", !0), t.data.conditionsBindType ? (n(), o("p", Ye, [j(s(t.$t("toBind")) + " ", 1), e("span", null, s(l(p)[t.data.conditionsBindType]), 1)])) : m("v-if", !0), t.data.conditionsBetAmount == 0 && t.data.conditionsRechargeAmount == 0 && !t.data.conditionsBindType ? (n(), o(L, {
                            key: 3
                        }, [j(s(t.$t("cpsTip10")), 1)], 64)) : m("v-if", !0)])]), e("h1", null, [e("span", null, s(t.$t("binguoPaimin")), 1)]), e("div", Ze, [e("div", xe, [e("span", null, s(t.$t("binguoPaimin")), 1), e("span", null, s(t.$t("k3WarningTip4")), 1)]), (n(!0), o(L, null, H(t.data.rankingAwardsList, (y, h) => (n(), o("div", {
                            class: "info",
                            key: h
                        }, [e("span", null, s(f(y.startRanking, y.endRanking)), 1), e("span", null, s(l(R)(y.awardsAmount || 0)), 1)]))), 128)), t.data.rankingAwardsList.length == 0 ? (n(), q(Q, {
                            key: 0
                        })) : m("v-if", !0)]), e("h1", null, [e("span", null, s(t.$t("cpsTip16")), 1)]), e("div", null, [e("p", null, s(t.$t("cpsTip17")), 1), e("p", null, s(t.$t("cpsTip18")), 1)]), e("h1", null, [e("span", null, s(t.$t("cpsTip19")), 1)]), e("p", null, [e("span", null, s(t.data.vendorCode), 1)])])]),
                        _: 1
                    })]),
                    _: 1
                }, 8, ["modelValue"])
            }
        }
    });
const tt = P(et, [
        ["__scopeId", "data-v-5c0f1c84"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/Activity/Championship/rule.vue"]
    ]),
    st = {
        class: "game"
    },
    nt = {
        class: "items"
    },
    at = ["onClick"],
    ot = ["onClick"],
    it = M({
        __name: "game",
        props: {
            data: {
                type: null,
                required: !1
            },
            arLotteryList: {
                type: null,
                required: !1
            }
        },
        setup(d) {
            const {
                onItemClick: g
            } = fe();
            return G(), (v, p) => {
                const f = Y("lazy");
                return n(), o("div", st, [e("h1", null, s(v.$t("cpsTip22")), 1), e("div", nt, [(n(!0), o(L, null, H(v.data, t => (n(), o("div", {
                    class: "item",
                    key: t.gameID,
                    onClick: u => l(g)(t)
                }, [F(e("img", null, null, 512), [
                    [f, t.img]
                ])], 8, at))), 128)), (n(!0), o(L, null, H(v.arLotteryList, (t, u) => (n(), o("div", {
                    class: "lottery",
                    key: u,
                    onClick: k => l(g)(t)
                }, s(t.title), 9, ot))), 128)), v.data.length == 0 && v.arLotteryList.length == 0 ? (n(), q(Q, {
                    key: 0
                })) : m("v-if", !0)])])
            }
        }
    });
const lt = P(it, [
        ["__scopeId", "data-v-303ee053"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/Activity/Championship/game.vue"]
    ]),
    E = d => (ue("data-v-a9d644da"), d = d(), re(), d),
    ut = {
        class: "ChampionshipDetail"
    },
    rt = {
        class: "ranking"
    },
    ct = {
        class: "title"
    },
    dt = {
        class: "amount"
    },
    pt = E(() => e("span", null, "--", -1)),
    vt = E(() => e("span", null, "--", -1)),
    ft = E(() => e("span", null, "--", -1)),
    mt = {
        class: "rankingList"
    },
    ht = {
        class: "title"
    },
    _t = E(() => e("span", null, "TOP", -1)),
    gt = {
        key: 0,
        class: "txt"
    },
    yt = {
        class: "refresh"
    },
    $t = M({
        __name: "index",
        setup(d) {
            const {
                tabList: g,
                getChampionTaskDetailV: v,
                championTaskDetailVO: p,
                getTop10UserList: f,
                top10UserListVO: t,
                thirdGameListVO: u,
                arLotteryList: k
            } = J(), T = G(), y = X(() => {
                var $;
                return p.value ? ($ = g.find(A => A.key == p.value.state)) == null ? void 0 : $.title : ""
            }), h = w(), a = w(!1), b = w(null);

            function D() {
                v(h.value)
            }
            z(a, $ => {
                a.value && D()
            });
            const B = () => {
                f(h.value)
            };
            return ie(() => {
                h.value = Number(T.currentRoute.value.query.championId) || 0, h.value != 0 && (D(), B(), b.value = setInterval(B, 10 * 60 * 1e3))
            }), le(() => {
                clearInterval(b.value)
            }), ($, A) => {
                const W = V("NavBar");
                return n(), o("div", ut, [C(W, {
                    title: y.value,
                    "left-arrow": "",
                    onClickLeft: A[0] || (A[0] = () => l(T).back())
                }, null, 8, ["title"]), JSON.stringify(l(p)) !== "{}" ? (n(), o(L, {
                    key: 0
                }, [C(x, {
                    itemD: l(p),
                    state: l(p).state,
                    isRefresh: a.value,
                    "onUpdate:isRefresh": A[1] || (A[1] = r => a.value = r)
                }, null, 8, ["itemD", "state", "isRefresh"]), e("div", rt, [e("div", ct, [e("span", null, s($.$t("binguoPaimin")), 1), e("span", null, s($.$t("betAmounts")), 1), e("span", null, s($.$t("k3WarningTip4")), 1)]), e("div", dt, [l(p) && l(p).userJoinInfo ? (n(), o(L, {
                    key: 0
                }, [e("span", null, s(l(p).userJoinInfo.ranking), 1), e("span", null, s(l(R)(l(p).userJoinInfo.sumBetAmount || 0)), 1), e("span", null, s(l(R)(l(p).userJoinInfo.awardsAmount || 0)), 1)], 64)) : (n(), o(L, {
                    key: 1
                }, [pt, vt, ft], 64))])])], 64)) : m("v-if", !0), e("div", mt, [e("div", ht, [_t, e("span", null, s($.$t("account")), 1), e("span", null, s($.$t("betAmounts")), 1), e("span", null, s($.$t("k3WarningTip4")), 1)]), (n(!0), o(L, null, H(l(t), (r, i) => (n(), o("div", {
                    class: "info",
                    key: i
                }, [
                    [1, 2, 3].includes(r.ranking) ? (n(), o("span", {
                        key: 1,
                        class: U(`top${r.ranking}`)
                    }, null, 2)) : (n(), o("span", gt, s(r.ranking), 1)), e("span", null, s(r.userName), 1), e("span", null, s(l(R)(r.sumBetAmount || 0)), 1), e("span", null, s(l(R)(r.awardsAmount || 0)), 1)
                ]))), 128)), e("div", yt, s($.$t("cpsTip28")), 1), l(t).length == 0 ? (n(), q(Q, {
                    key: 0
                })) : m("v-if", !0)]), C(tt, {
                    data: l(p)
                }, null, 8, ["data"]), C(lt, {
                    data: l(u),
                    arLotteryList: l(k)
                }, null, 8, ["data", "arLotteryList"])])
            }
        }
    });
const kt = P($t, [
        ["__scopeId", "data-v-a9d644da"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/activity/Championship/ChampionshipDetail/index.vue"]
    ]),
    bt = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: kt
    }, Symbol.toStringTag, {
        value: "Module"
    }));
export {
    x as C, He as D, bt as a, Lt as i
};