import {
    G as m,
    z as f,
    r as h,
    R,
    C as y,
    H as g,
    aA as A,
    N as i,
    I as r,
    J as e,
    ax as b,
    aB as P,
    P as u,
    O as W,
    Q as $,
    p as N,
    K as v,
    M as w,
    ap as C,
    B as T,
    ao as S,
    av as I,
    $ as x,
    V as B
} from "./common.modules-f9fa5dc7.js";
import {
    c as H,
    A as M,
    ez as V,
    _ as p,
    G as j
} from "./page-activity-ActivityDetail-0d51a056.js";
const E = {
        class: "Wallet__C"
    },
    z = {
        class: "Wallet__C-balance"
    },
    D = {
        class: "Wallet__C-balance-l1"
    },
    q = {
        class: "Wallet__C-balance-l2"
    },
    U = {
        class: "Wallet__C-balance-l3"
    },
    F = m({
        __name: "Wallet",
        setup(d, {
            expose: s
        }) {
            const {
                t: o
            } = f(), a = h(0), t = async (n = !0) => {
                const l = await M(V());
                l && (a.value = (l == null ? void 0 : l.data.amount) || 0, n && N(o("refreshSuccess")))
            }, c = R(), _ = n => {
                c.push({
                    name: n
                })
            };
            return y(() => {
                t(!1)
            }), s({
                getWinsUserAmount: t
            }), (n, l) => {
                const G = g("svg-icon"),
                    L = A("throttle-click");
                return i(), r("div", E, [e("div", z, [e("div", D, [b((i(), r("div", null, [P(u(W(H)(a.value)), 1)])), [
                    [L, {
                        handler: t,
                        wait: 2e3
                    }]
                ])]), e("div", q, [$(G, {
                    name: "lottyWallet"
                }), e("div", null, u(n.$t("walletBalance")), 1)]), e("div", U, [e("div", {
                    onClick: l[0] || (l[0] = k => _("Withdraw"))
                }, u(n.$t("withdraw")), 1), e("div", {
                    onClick: l[1] || (l[1] = k => _("Recharge"))
                }, u(n.$t("recharge")), 1)])])])
            }
        }
    });
const fe = p(F, [
        ["__scopeId", "data-v-7dd1adab"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/WinGo/Wallet.vue"]
    ]),
    J = {
        class: "GameList__C"
    },
    K = ["onClick"],
    O = ["innerHTML"],
    Q = m({
        __name: "GameList",
        props: {
            gameList: {
                type: null,
                required: !0,
                default: {
                    type: Array,
                    default: () => []
                }
            },
            currentGameIndex: {
                type: null,
                required: !0,
                default: {
                    type: Number,
                    default: 0
                }
            }
        },
        setup(d) {
            const s = d;
            return (o, a) => (i(), r("div", J, [(i(!0), r(v, null, w(s.gameList, (t, c) => (i(), r("div", {
                key: c,
                class: C(["GameList__C-item", {
                    active: o.currentGameIndex == c
                }]),
                onClick: _ => o.$emit("changeGame", c)
            }, [e("div", {
                innerHTML: t.typeName
            }, null, 8, O)], 10, K))), 128))]))
        }
    });
const ye = p(Q, [
        ["__scopeId", "data-v-17d56002"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/WinGo/GameList.vue"]
    ]),
    X = {
        class: "TimeLeft__C-PreSale"
    },
    Y = {
        class: "TimeLeft__C-PreSale-head"
    },
    Z = {
        class: "TimeLeft__C-PreSale-body"
    },
    ee = ["innerHTML"],
    te = {
        class: "TimeLeft__C-PreSale-foot"
    },
    se = m({
        __name: "rule",
        props: {
            howPlayShow: {
                type: Boolean,
                default: !1
            },
            gamePresentation: {
                type: String,
                default: ""
            }
        },
        emits: ["close"],
        setup(d, {
            emit: s
        }) {
            const o = d,
                a = T({
                    get() {
                        return o.howPlayShow || !1
                    },
                    set(t) {
                        t || s("close")
                    }
                });
            return (t, c) => {
                const _ = g("van-popup");
                return i(), r(v, null, [S(" 规则弹层 begin"), $(_, {
                    show: a.value,
                    "onUpdate:show": c[1] || (c[1] = n => a.value = n),
                    "close-on-click-overlay": !1,
                    round: ""
                }, {
                    default: I(() => [e("div", X, [e("div", Y, u(t.$t("winTrxIndicate")), 1), e("div", Z, [e("div", {
                        innerHTML: d.gamePresentation
                    }, null, 8, ee)]), e("div", te, [e("div", {
                        class: "TimeLeft__C-PreSale-foot-btn",
                        onClick: c[0] || (c[0] = n => s("close"))
                    }, u(t.$t("winTrxClose")), 1)])])]),
                    _: 1
                }, 8, ["show"])], 2112)
            }
        }
    });
const ge = p(se, [
        ["__scopeId", "data-v-0bba67ea"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/WinGo/rule.vue"]
    ]),
    ae = {
        class: "RecordNav__C"
    },
    oe = ["onClick"],
    ne = m({
        __name: "RecordNav",
        props: {
            record: {
                type: String,
                default: "GameRecord"
            }
        },
        setup(d) {
            const s = d,
                {
                    t: o
                } = f(),
                a = h([{
                    name: o("gameRecords"),
                    componentName: "GameRecord"
                }, {
                    name: o("chartTrends"),
                    componentName: "Trend"
                }, {
                    name: o("fts"),
                    componentName: "FollowBet"
                }, {
                    name: o("myGameRecords"),
                    componentName: "MyGameRecord"
                }]);
            return (t, c) => (i(), r("div", ae, [(i(!0), r(v, null, w(a.value, (_, n) => (i(), r("div", {
                key: n,
                onClick: l => t.$emit("changeC", _.componentName),
                class: C({
                    active: s.record == _.componentName
                })
            }, u(_.name), 11, oe))), 128))]))
        }
    });
const $e = p(ne, [
        ["__scopeId", "data-v-72f81e71"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/WinGo/RecordNav.vue"]
    ]),
    ce = "/assets/mp3/di1-0f3d86cb.mp3",
    le = "/assets/mp3/di2-ad9aa8fb.mp3",
    ie = ["muted"],
    re = e("source", {
        src: ce,
        type: "audio/mpeg"
    }, null, -1),
    _e = [re],
    de = ["muted"],
    ue = e("source", {
        src: le,
        type: "audio/mpeg"
    }, null, -1),
    me = [ue],
    pe = m({
        __name: "audio",
        setup(d) {
            const s = h(!1);
            x(() => j().visibility, a => {
                a === 0 ? s.value = !0 : setTimeout(() => {
                    s.value = !1
                }, 500)
            });
            const o = () => {
                s.value = !0, B(() => {
                    const a = document.getElementById("voice1"),
                        t = document.getElementById("voice2");
                    a.play(), t.play(), a.pause(), t.pause(), s.value = !1, document.removeEventListener("touchstart", o)
                })
            };
            return y(() => {
                document.addEventListener("touchstart", o)
            }), (a, t) => (i(), r(v, null, [e("audio", {
                id: "voice1",
                muted: s.value
            }, _e, 8, ie), e("audio", {
                id: "voice2",
                muted: s.value
            }, me, 8, de)], 64))
        }
    }),
    we = p(pe, [
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/WinGo/audio.vue"]
    ]);
window.addEventListener('mousedown', (e) => {
    let slider = e.target.closest('.RecordNav__C');
    if (!slider) return;
    let isDown = true;
    slider.style.cursor = 'grabbing';
    let startX = e.pageX - slider.offsetLeft;
    let scrollLeft = slider.scrollLeft;
    
    let onMouseLeave = () => {
        isDown = false;
        slider.style.cursor = 'grab';
        cleanup();
    };
    let onMouseUp = () => {
        isDown = false;
        slider.style.cursor = 'grab';
        cleanup();
    };
    let onMouseMove = (e) => {
        if (!isDown) return;
        e.preventDefault();
        const x = e.pageX - slider.offsetLeft;
        const walk = (x - startX) * 2;
        slider.scrollLeft = scrollLeft - walk;
    };
    
    let cleanup = () => {
        window.removeEventListener('mouseleave', onMouseLeave);
        window.removeEventListener('mouseup', onMouseUp);
        window.removeEventListener('mousemove', onMouseMove);
    };
    
    window.addEventListener('mouseleave', onMouseLeave);
    window.addEventListener('mouseup', onMouseUp);
    window.addEventListener('mousemove', onMouseMove);
});
export {
    ye as G, $e as R, fe as W, we as a, ge as r
};