import {
    G as J,
    r as $,
    B as oe,
    H as F,
    I as o,
    J as e,
    Q as m,
    av as O,
    O as l,
    N as t,
    K as R,
    M as X,
    au as Y,
    ao as f,
    ap as T,
    P as n,
    b0 as _e,
    b1 as he,
    aB as D,
    be as ie,
    R as Z,
    z as $e,
    a5 as ce,
    A as ge,
    C as re,
    aA as de,
    ax as U,
    aC as fe,
    aD as ye,
    ay as we,
    V as ke
} from "./common.modules-f9fa5dc7.js";
import {
    y as Te,
    A as B,
    d9 as Ve,
    b as I,
    _ as Q,
    a4 as L,
    g as A,
    c as M,
    da as be,
    db as me,
    dc as Ce,
    bR as x,
    bS as j,
    d8 as Se,
    G as Ie,
    ce as Re
} from "./page-activity-ActivityDetail-0d51a056.js";
import {
    E as Ae
} from "./page-activity-Bonus-f5229d51.js";
const De = {
        class: "vip-content-card"
    },
    Ee = {
        class: "vip-content-card-item"
    },
    Me = {
        class: "itemInfo-right"
    },
    Ne = ["src"],
    He = {
        class: "itemInfo-head"
    },
    Pe = ["src"],
    Ue = ["src"],
    Fe = {
        class: "bgg"
    },
    Be = ["innerHTML"],
    We = {
        class: "itemInfo-bottom mt50"
    },
    Ge = {
        class: "itemInfo-right"
    },
    ze = ["src"],
    xe = {
        class: "itemInfo-head"
    },
    je = ["src"],
    Oe = ["src"],
    Xe = {
        class: "bgg"
    },
    Je = ["innerHTML"],
    qe = {
        class: "mb8"
    },
    Ke = {
        class: "itemInfo-bottom"
    },
    Qe = {
        class: "first"
    },
    Ye = {
        class: "left"
    },
    Ze = {
        class: "right"
    },
    Le = ["innerHTML"],
    es = {
        class: "itemInfo-right"
    },
    ss = ["src"],
    ns = {
        class: "itemInfo-head"
    },
    as = ["src"],
    ls = ["src"],
    ts = {
        class: "mb30"
    },
    os = ["innerHTML"],
    is = {
        class: "itemInfo-bottom"
    },
    cs = J({
        __name: "VipCard",
        props: {
            haspermission: {
                type: Boolean,
                default: () => !0
            }
        },
        emits: ["changeLevel"],
        setup(S, {
            expose: E,
            emit: r
        }) {
            const k = $(0);
            let V = {
                    1: "#748AAA",
                    2: "#D67D26",
                    3: "#F05C5C",
                    4: "#32B6E8",
                    5: "#EA6ACA",
                    6: "#1EB18B",
                    7: "#1B9458",
                    8: "#3470E6",
                    9: "#8038F5",
                    10: "#EF7B27"
                },
                h = $();

            function C(a) {
                h = a
            }
            const g = $(!0),
                _ = a => {
                    g.value || r("changeLevel", i.value[a.activeIndex].id)
                },
                i = $([]);
            async function c() {
                var w;
                const a = await B(Ve());
                if (a) {
                    i.value = a == null ? void 0 : a.data;
                    let u = i.value.findIndex(N => N.id == k.value);
                    h.slideTo(u == -1 ? 0 : u);
                    let s = i.value.length > 0 ? (w = i.value[0]) == null ? void 0 : w.amount : 1e3;
                    sessionStorage.setItem("vipAmount", s)
                }
                g.value = !1
            }

            function d(a, w) {
                return !w || !w ? 0 : a > w ? 100 : Math.round(a / w * 1e4) / 100
            }

            function p(a, w) {
                return a > w ? w : a
            }
            const y = oe(() => Te().getDollarSign);
            return E({
                getVipUserLevelDetail: c,
                level: k
            }), (a, w) => {
                const u = F("van-progress");
                return t(), o("div", De, [e("div", Ee, [m(l(he), {
                    class: "my-swipe",
                    slidesPerView: "auto",
                    centeredSlides: !0,
                    "space-between": 20,
                    onSlideChangeTransitionEnd: _,
                    onSwiper: C
                }, {
                    default: O(() => [(t(!0), o(R, null, X(i.value, s => (t(), Y(l(_e), {
                        class: T(`itemInfo level${s.id}`),
                        key: s.id
                    }, {
                        default: O(() => [f("status:2 已达成"), (s == null ? void 0 : s.status) == 2 && s.id != k.value ? (t(), o(R, {
                            key: 0
                        }, [e("div", Me, [e("img", {
                            src: l(I)("vip/swiper/logo", `${s.id}`)
                        }, null, 8, Ne)]), e("div", He, [e("div", null, [e("img", {
                            src: l(I)("vip/swiper/crown", `${s.id!=1?2:s.id}`)
                        }, null, 8, Pe), e("h1", {
                            class: T(`level${s.id!=1?2:s.id}`)
                        }, n(s.vipName), 3), e("img", {
                            src: l(I)("vip/swiper", "HaveReached")
                        }, null, 8, Ue), e("span", Fe, n(a.$t("achieved")), 1)]), e("div", {
                            class: T(["border", `level${s.id}`])
                        }, [e("p", {
                            innerHTML: a.$t("vipTip1", [s.id, s.id])
                        }, null, 8, Be)], 2)]), e("div", We, [s.upgradeStatus == 2 ? (t(), o("h2", {
                            key: 0,
                            class: T(`level${s.id}`)
                        }, n(a.$t("vipTip3", [s.id])), 3)) : (t(), o("h2", {
                            key: 1,
                            class: T(`level${s.id}`)
                        }, n(a.$t("vipTip14", [s.id])), 3))])], 64)) : f("v-if", !0), (s == null ? void 0 : s.id) == k.value ? (t(), o(R, {
                            key: 1
                        }, [e("div", Ge, [e("img", {
                            src: l(I)("vip/swiper/logo", `${s.id}`)
                        }, null, 8, ze)]), e("div", xe, [e("div", null, [e("img", {
                            src: l(I)("vip/swiper/crown", `${s.id!=1?2:s.id}`)
                        }, null, 8, je), e("h1", {
                            class: T(`level${s.id!=1?2:s.id}`)
                        }, n(s.vipName), 3), e("img", {
                            src: l(I)("vip/swiper", "HaveReached")
                        }, null, 8, Oe), e("span", Xe, n(a.$t("achieved")), 1)]), e("div", {
                            class: T(["border mb25", `level${s.id}`])
                        }, [e("p", {
                            innerHTML: a.$t("vipTip1", [s.id, s.id])
                        }, null, 8, Je)], 2), e("div", qe, n(a.$t("vipcondition")), 1)]), e("div", Ke, [e("div", Qe, [e("div", Ye, [e("span", {
                            class: T(`level level${s.id}`)
                        }, n(S.haspermission ? p(s.relegationExp, s.relegation) : 0) + "/" + n(s.relegation), 3)]), e("p", Ze, n(a.$t("completed1", [d(S.haspermission ? p(s.relegationExp, s.relegation) : 0, s.relegation)])), 1)]), e("div", null, [m(u, {
                            class: T(`level${s.id}`),
                            percentage: d(S.haspermission ? p(s.relegationExp, s.relegation) : 0, s.relegation),
                            "stroke-width": "8",
                            color: "linear-gradient(180deg, #FFFCE7 0%, #FFC821 100%)",
                            "track-color": l(V)[s.id],
                            "show-pivot": !1
                        }, null, 8, ["class", "percentage", "track-color"])]), e("div", null, [e("span", {
                            innerHTML: a.$t("vipTip2", [s.deductExp])
                        }, null, 8, Le)])])], 64)) : f("v-if", !0), f("status:1 未解锁"), (s == null ? void 0 : s.status) == 1 && (s == null ? void 0 : s.id) != k.value ? (t(), o(R, {
                            key: 2
                        }, [e("div", es, [e("img", {
                            src: l(I)("vip/swiper/logo", `${s.id}`)
                        }, null, 8, ss)]), e("div", ns, [e("div", null, [e("img", {
                            src: l(I)("vip/swiper/crown", `${s.id!=1?2:s.id}`)
                        }, null, 8, as), e("h1", {
                            class: T(`level${s.id!=1?2:s.id}`)
                        }, n(s.vipName), 3), e("img", {
                            src: l(I)("vip/swiper", "ununlocked")
                        }, null, 8, ls), e("span", null, n(a.$t("notUnlocked")), 1)]), e("div", ts, [e("p", {
                            innerHTML: a.$t("experience", [s.id, s.upgrade - s.currentExp])
                        }, null, 8, os)]), e("div", {
                            class: T(["border", `level${s.id}`])
                        }, n(a.$t("experience1", [y.value, s.amount])), 3)]), e("div", is, [e("p", null, n(s.vipName), 1), e("div", null, [m(u, {
                            class: T(`level${s.id}`),
                            percentage: d(S.haspermission ? s.currentExp : 0, s.upgrade),
                            "stroke-width": "8",
                            color: "linear-gradient(180deg, #FFFCE7 0%, #FFC821 100%)",
                            "track-color": l(V)[s.id],
                            "show-pivot": !1
                        }, null, 8, ["class", "percentage", "track-color"])]), e("div", null, [e("span", {
                            class: T(`level level${s.id}`)
                        }, n(S.haspermission ? s.currentExp : 0) + "/" + n(s.upgrade), 3), e("span", null, n(a.$t("upgrade", [s.upgrade])), 1)])])], 64)) : f("v-if", !0)]),
                        _: 2
                    }, 1032, ["class"]))), 128))]),
                    _: 1
                })])])
            }
        }
    });
const rs = Q(cs, [
        ["__scopeId", "data-v-31cfa30d"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Vip/VipCard.vue"]
    ]),
    ds = {
        class: "vip-content-weal"
    },
    ps = {
        key: 0,
        class: "vip-content-weal-head ar-1px-b"
    },
    vs = ["src"],
    us = {
        key: 0
    },
    _s = {
        key: 1
    },
    hs = {
        key: 0
    },
    $s = ["src"],
    gs = {
        key: 1
    },
    fs = {
        class: "max"
    },
    ys = J({
        __name: "Weal",
        setup(S, {
            expose: E
        }) {
            const {
                setLoading: r
            } = L(), k = $(0), V = oe(() => k.value == 0 ? 1 : k.value), h = $([]);
            async function C(_) {
                r(!0);
                const i = await B(be({
                    vipLevel: _ == 0 ? 1 : _
                }));
                i && (h.value = i.data.filter(c => c.id > 2 && c.rate > 0 || c.id <= 2)), r(!1)
            }
            const g = _ => [1, 2].includes(_.id) && _.balance === 0 && _.integral === 0;
            return E({
                getListVipLevel: C,
                level: k
            }), (_, i) => {
                const c = F("svg-icon");
                return t(), o("div", ds, [m(ie, {
                    mode: "out-in"
                }, {
                    default: O(() => [(t(), o("div", {
                        class: "slide",
                        key: k.value
                    }, [h.value.length ? (t(), o("div", ps, [m(c, {
                        name: "diamond"
                    }), e("h1", null, "VIP" + n(V.value) + " " + n(_.$t("wealTXT1")), 1)])) : f("v-if", !0), (t(!0), o(R, null, X(h.value, (d, p) => (t(), o("div", {
                        class: T(`${g(d)?"isShow":"vip-content-weal-con"}`),
                        key: p
                    }, [e("div", null, [e("img", {
                        src: l(A)("main/weal", `${d.id}`)
                    }, null, 8, vs)]), e("div", null, [d.id != 3 ? (t(), o("h2", us, n(_.$t(`wealName${d.id}`)), 1)) : (t(), o("h2", _s, n(_.$t(`wealName${d.id}_1`)), 1)), e("span", null, n(_.$t(`wealDescription${d.id}`)), 1)]), d.id == 1 || d.id == 2 ? (t(), o("div", hs, [e("p", null, [e("img", {
                        src: l(A)("main", "gold")
                    }, null, 8, $s), D(n(l(M)(d.balance, " ", 0)), 1)]), e("p", null, [m(c, {
                        name: "love"
                    }), D(n(l(M)(d.integral, " ", 0)), 1)])])) : (t(), o("div", gs, [e("p", fs, [m(c, {
                        name: `weal${d.id}`
                    }, null, 8, ["name"]), D(n(d.rate) + "% ", 1)])]))], 2))), 128))]))]),
                    _: 1
                })])
            }
        }
    });
const ws = Q(ys, [
        ["__scopeId", "data-v-9bb5e81c"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Vip/Weal.vue"]
    ]),
    ks = {
        class: "vip-content-myWelfare"
    },
    Ts = {
        class: "vip-content-myWelfare-head ar-1px-b"
    },
    Vs = {
        class: "vip-content-myWelfare-con"
    },
    bs = {
        class: "card"
    },
    ms = {
        class: "card-head"
    },
    Cs = ["src"],
    Ss = {
        class: "card-head-mon"
    },
    Is = ["src"],
    Rs = ["src"],
    As = {
        class: "card-bottom"
    },
    Ds = {
        key: 0,
        class: "noActive"
    },
    Es = ["onClick"],
    Ms = {
        key: 1,
        class: "card"
    },
    Ns = {
        class: "card-head tilt"
    },
    Hs = ["src"],
    Ps = {
        class: "card-head-mon"
    },
    Us = ["src"],
    Fs = {
        class: "card-bottom"
    },
    Bs = {
        key: 0
    },
    Ws = {
        key: 1
    },
    Gs = J({
        __name: "MyWelfare",
        emits: ["succeedDialog"],
        setup(S, {
            expose: E,
            emit: r
        }) {
            const k = Z(),
                {
                    setLoading: V
                } = L(),
                h = $(0),
                C = $([]);
            async function g(i) {
                V(!0);
                const c = await B(me({
                    vipLevel: i
                }));
                c && (C.value = c.data.filter(d => d.rewardType > 2 && d.rate > 0 || d.rewardType <= 2)), V(!1)
            }
            async function _(i) {
                const c = await B(Ce({
                    receiveId: i.id,
                    vipLevel: h.value,
                    rewardType: i.rewardType
                }));
                c && (g(h.value), c != null && c.data && r("succeedDialog", {
                    integral: c == null ? void 0 : c.data.integral,
                    balance: c == null ? void 0 : c.data.balance
                }))
            }
            return E({
                getListVipUserRewards: g,
                levelMy: h
            }), (i, c) => {
                const d = F("svg-icon");
                return t(), o("div", ks, [m(ie, {
                    mode: "out-in"
                }, {
                    default: O(() => [(t(), o("div", {
                        class: "slideMy",
                        key: h.value
                    }, [e("div", Ts, [m(d, {
                        name: "crown"
                    }), e("h1", null, n(i.$t("vipDesc1")), 1)]), e("div", Vs, [(t(!0), o(R, null, X(C.value, (p, y) => (t(), o("div", {
                        class: "cards",
                        key: y
                    }, [p.rewardType == 1 || p.rewardType == 2 ? (t(), o(R, {
                        key: 0
                    }, [e("div", bs, [e("div", ms, [e("img", {
                        src: l(A)("main/myWelfare", `welfare${p.rewardType}`)
                    }, null, 8, Cs), e("div", Ss, [e("p", null, [e("img", {
                        src: l(A)("main", "gold")
                    }, null, 8, Is), D(n(l(M)(p.balance, " ", 0)), 1)]), e("p", null, [e("img", {
                        src: l(A)("main", "love2")
                    }, null, 8, Rs), D(n(l(M)(p.integral, " ", 0)), 1)])])]), e("div", As, [e("h1", null, n(i.$t(`wealName${p.rewardType}`)), 1), e("span", null, n(i.$t(`wealDescription${p.rewardType}`)), 1)])]), p.status == 2 ? (t(), o("button", Ds, n(i.$t("vipDesc4")), 1)) : (t(), o("button", {
                        key: 1,
                        class: "active",
                        onClick: a => _(p)
                    }, n(i.$t("vipDesc7")), 9, Es))], 64)) : (t(), o("div", Ms, [e("div", Ns, [e("img", {
                        src: l(A)("main/myWelfare", `welfare${p.rewardType}`)
                    }, null, 8, Hs), e("div", Ps, [e("p", null, [e("img", {
                        src: l(A)("main", "wallet1")
                    }, null, 8, Us), D(n(p.rate) + "%", 1)])])]), e("div", Fs, [p.rewardType != 3 ? (t(), o("h1", Bs, n(i.$t(`wealName${p.rewardType}`)), 1)) : (t(), o("h1", Ws, n(i.$t(`wealName${p.rewardType}_1`)), 1)), e("span", null, n(i.$t(`wealDescription${p.rewardType}`)), 1), p.rewardType == 5 ? (t(), o("div", {
                        key: 2,
                        class: "viewD",
                        onClick: c[0] || (c[0] = a => l(k).push({
                            name: "RebateDetails"
                        }))
                    }, n(i.$t("viewDetail")), 1)) : f("v-if", !0)])]))]))), 128))])]))]),
                    _: 1
                })])
            }
        }
    });
const zs = Q(Gs, [
        ["__scopeId", "data-v-4e842459"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Vip/MyWelfare.vue"]
    ]),
    q = S => (fe("data-v-eaa4a307"), S = S(), ye(), S),
    xs = {
        class: "vip-content-recordVsrule"
    },
    js = {
        class: "vip-content-recordVsrule-head"
    },
    Os = {
        key: 0,
        class: "vip-content-recordVsrule-con"
    },
    Xs = {
        class: "item-left"
    },
    Js = {
        class: "green"
    },
    qs = {
        class: "item-right"
    },
    Ks = ["src"],
    Qs = ["src"],
    Ys = {
        class: "item-left"
    },
    Zs = {
        class: "red"
    },
    Ls = {
        class: "item-right"
    },
    en = q(() => e("span", null, null, -1)),
    sn = q(() => e("span", null, null, -1)),
    nn = {
        key: 2,
        class: "item-left"
    },
    an = {
        class: "yellow"
    },
    ln = {
        class: "item-left"
    },
    tn = {
        class: "blue"
    },
    on = {
        class: "item-right"
    },
    cn = q(() => e("span", null, null, -1)),
    rn = q(() => e("span", null, null, -1)),
    dn = {
        class: "green"
    },
    pn = {
        key: 4,
        class: "item-left"
    },
    vn = {
        class: "yellow"
    },
    un = {
        key: 1,
        class: "vip-content-recordVsrule-con"
    },
    _n = {
        class: "con-content"
    },
    hn = {
        class: "con-content__title"
    },
    $n = {
        class: "con-content__rules"
    },
    gn = {
        class: "con-content__rules-item__title"
    },
    fn = q(() => e("div", {
        class: "con-content__rules-item__titleRight"
    }, null, -1)),
    yn = J({
        __name: "RecordVsrule",
        setup(S, {
            expose: E
        }) {
            const {
                t: r
            } = $e(), k = Z();
            let V = ce("permission", null);
            V && (V = JSON.parse(V.value));
            const h = $(1);
            V && V[18] === !1 && (h.value = 2);
            const C = [{
                title: r("promotionCriteria"),
                content: r("rVsTip1", [sessionStorage.getItem("vipAmount") || 1e3])
            }, {
                title: r("promotionOrder"),
                content: r("rVsTip2")
            }, {
                title: r("relegationRequirements"),
                content: r("rVsTip3")
            }, {
                title: r("downgradeStandard"),
                content: r("rVsTip4")
            }, {
                title: r("upgradeReward"),
                content: r("rVsTip5")
            }, {
                title: r("wealName2"),
                content: r("rVsTip6")
            }, {
                title: r("wealName3"),
                content: r("rVsTip7")
            }, {
                title: r("wealName4"),
                content: r("rVsTip8")
            }];

            function g(y, a) {
                switch (y) {
                    case 1:
                        return r("vipTip12");
                    case 2:
                        return r("vipTip13");
                    case 3:
                        return r("vipTip10");
                    case 4:
                        return r("vipTip11", [a]);
                    case 5:
                        return r("vipTip6", [a]);
                    case 6:
                        return r("vipTip7");
                    case 7:
                        return r("vipTip15", [a]);
                    case 8:
                        return r("vipTip17", [a])
                }
            }

            function _(y) {
                h.value = y
            }

            function i() {
                k.push({
                    name: "RecordVsruleHistory"
                })
            }
            const c = ge({
                    pageSize: 10,
                    pageNo: 1
                }),
                d = $([]);
            async function p() {
                const y = await B(Se(c));
                y && (d.value = y.data.list)
            }
            return re(() => {
                p()
            }), E({
                getPageListVipUserRecord: p
            }), (y, a) => {
                const w = F("svg-icon"),
                    u = de("haspermission");
                return t(), o("div", xs, [e("div", js, [U((t(), o("button", {
                    class: T({
                        active: h.value == 1
                    }),
                    onClick: a[0] || (a[0] = s => _(1))
                }, [D(n(y.$t("record")), 1)], 2)), [
                    [u, 18]
                ]), e("button", {
                    class: T({
                        active: h.value == 2
                    }),
                    onClick: a[1] || (a[1] = s => _(2))
                }, n(y.$t("rule")), 3)]), h.value == 1 ? U((t(), o("div", Os, [d.value.length > 0 ? (t(!0), o(R, {
                    key: 0
                }, X(d.value, (s, N) => (t(), o("div", {
                    class: "item ar-1px-b",
                    key: N
                }, [s.type == 1 || s.type == 2 ? (t(), o(R, {
                    key: 0
                }, [e("div", Xs, [e("span", Js, n(l(x)(l(j).VipType, s.type)), 1), e("span", null, n(g(s.type, s.remark)), 1), e("span", null, n(s.createTime), 1)]), e("div", qs, [e("p", null, [e("img", {
                    src: l(A)("main", "gold")
                }, null, 8, Ks), D(n(l(M)(s.awardAmount, " ", 0)), 1)]), e("p", null, [e("img", {
                    src: l(A)("main", "love")
                }, null, 8, Qs), D(n(l(M)(s.bonusPoints, " ", 0)), 1)])])], 64)) : f("v-if", !0), s.type == 3 || s.type == 4 ? (t(), o(R, {
                    key: 1
                }, [e("div", Ys, [e("span", Zs, n(l(x)(l(j).VipType, s.type)), 1), e("span", null, n(g(s.type, s.remark)), 1), e("span", null, n(s.createTime), 1)]), e("div", Ls, [en, sn, e("span", null, n(s.experience) + " EXP", 1)])], 64)) : f("v-if", !0), s.type == 5 ? (t(), o("div", nn, [e("span", an, n(l(x)(l(j).VipType, s.type)), 1), e("span", null, n(g(s.type, s.remark)), 1), e("span", null, n(s.createTime), 1)])) : f("v-if", !0), s.type == 6 ? (t(), o(R, {
                    key: 3
                }, [e("div", ln, [e("span", tn, n(l(x)(l(j).VipType, s.type)), 1), e("span", null, n(g(s.type, s.remark)), 1), e("span", null, n(s.createTime), 1)]), e("div", on, [cn, rn, e("span", dn, n(s.experience) + " EXP", 1)])], 64)) : f("v-if", !0), [7, 8].includes(s.type) ? (t(), o("div", pn, [e("span", vn, n(l(x)(l(j).VipType, s.type)), 1), e("span", null, n(g(s.type, s.remark)), 1), e("span", null, n(s.createTime), 1)])) : f("v-if", !0)]))), 128)) : (t(), Y(Ae, {
                    key: 1
                })), U((t(), o("button", {
                    onClick: i
                }, [D(n(y.$t("viewAll")), 1)])), [
                    [u, 18]
                ])])), [
                    [u, 18]
                ]) : (t(), o("div", un, [e("div", _n, [e("div", hn, [e("h1", null, n(y.$t("vipPrivilege")), 1), e("p", null, n(y.$t("vipRule")), 1)]), e("div", $n, [(t(), o(R, null, X(C, (s, N) => e("div", {
                    class: "con-content__rules-item ruleHead",
                    key: N
                }, [m(w, {
                    name: "ruleHead"
                }), e("div", gn, n(s.title), 1), fn, e("p", null, n(s.content), 1)])), 64))])])]))])
            }
        }
    });
const wn = Q(yn, [
        ["__scopeId", "data-v-eaa4a307"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Vip/RecordVsrule.vue"]
    ]),
    kn = {
        class: "vip"
    },
    Tn = {
        class: "vip-header"
    },
    Vn = {
        class: "vip-header-wrapper"
    },
    bn = ["src"],
    mn = {
        class: "vip-header-wrapper-name"
    },
    Cn = {
        class: "vip-header-wrapper-name-nickName"
    },
    Sn = {
        class: "vip-content"
    },
    In = {
        class: "vip-content-empirical"
    },
    Rn = {
        class: "red"
    },
    An = ["innerHTML"],
    Dn = {
        class: "vip-content-tip"
    },
    En = {
        class: "succeed"
    },
    Mn = {
        class: "van-dialog__content-title"
    },
    Nn = {
        class: "van-dialog__content-note"
    },
    Hn = {
        class: "main"
    },
    Pn = ["src"],
    Un = {
        class: "yellow"
    },
    Fn = ["src"],
    Bn = ["innerHTML"],
    Wn = {
        class: "van-dialog__content-btn"
    },
    On = J({
        __name: "index",
        setup(S) {
            const r = Ie().getUserInfo,
                k = $(I("main/Avatar", r.userPhoto)),
                V = Z(),
                {
                    setLoading: h
                } = L(),
                C = $(!1),
                g = $(),
                _ = $(),
                i = $(),
                c = $(),
                d = $(),
                p = $(!1);

            function y() {
                V.push({
                    name: "Avatar"
                })
            }
            let a = ce("permission", null);
            a && (a = JSON.parse(a.value));
            const w = $(!0);
            a && a[18] === !1 && (w.value = !1);
            const u = $();
            async function s() {
                var b, H, K, W, G, z;
                h(!0);
                const v = await B(Re());
                v && v != null && v.data && (u.value = v.data, i.value.level = (b = u.value) == null ? void 0 : b.vipLevel, i.value.getListVipLevel((H = u.value) == null ? void 0 : H.vipLevel), ((K = u.value) == null ? void 0 : K.vipLevel) > 0 && (c.value.levelMy = (W = u.value) == null ? void 0 : W.vipLevel, c.value.getListVipUserRewards((G = u.value) == null ? void 0 : G.vipLevel)), _.value.level = (z = u.value) == null ? void 0 : z.vipLevel, await _.value.getVipUserLevelDetail(), p.value = !0), h(!1)
            }
            re(() => {
                s()
            });

            function N(v) {
                ke(() => {
                    var b;
                    i.value.level = v, i.value.getListVipLevel(v), v <= ((b = u.value) == null ? void 0 : b.vipLevel) && (c.value.levelMy = v, c.value.getListVipUserRewards(v))
                })
            }

            function pe(v) {
                g.value = v, C.value = !0
            }

            function ve() {
                C.value = !1, d.value.getPageListVipUserRecord()
            }
            const ue = (v, b) => {
                v = I("images", "avatar1");
                let H = document.querySelector(`.${b}`);
                H.src = v
            };
            return (v, b) => {
                var G, z, ee, se, ne;
                const H = F("NavBar"),
                    K = F("van-dialog"),
                    W = de("lazy");
                return t(), o("div", kn, [e("div", Tn, [m(H, {
                    title: "VIP",
                    class: "main",
                    "left-arrow": "",
                    onClickLeft: b[0] || (b[0] = P => l(V).go(-1))
                }), e("div", Vn, [e("div", {
                    class: "vip-header-wrapper-avatar",
                    onClick: y
                }, [e("img", {
                    src: k.value,
                    class: "userAvatar",
                    onError: b[1] || (b[1] = P => ue(k.value, "userAvatar"))
                }, null, 40, bn)]), e("div", mn, [e("div", {
                    class: T(["vip-header-wrapper-name-vip", ["n" + ((G = u.value) == null ? void 0 : G.vipLevel)]])
                }, null, 2), e("div", Cn, [e("h3", null, n((z = u.value) == null ? void 0 : z.nickName), 1)])])])]), e("div", Sn, [e("div", In, [e("div", null, [e("p", Rn, n(v.$t("eightThousandEXP", [w.value ? (ee = u.value) == null ? void 0 : ee.exp : 0])), 1), e("p", null, n(v.$t("myExperience")), 1)]), e("div", null, [e("p", {
                    class: "timeTop",
                    innerHTML: v.$t("fifteenDays", [w.value ? (se = u.value) == null ? void 0 : se.settlementDate : 0])
                }, null, 8, An), e("p", null, n(v.$t("settlementTime")), 1)])]), e("div", Dn, n(v.$t("vipTip18")), 1), f("vip卡片"), m(rs, {
                    ref_key: "vipCardRef",
                    ref: _,
                    haspermission: w.value,
                    onChangeLevel: N
                }, null, 8, ["haspermission"]), f("等级福利"), m(ws, {
                    ref_key: "weal",
                    ref: i
                }, null, 512), f("我的福利"), U(m(zs, {
                    onSucceedDialog: pe,
                    ref_key: "myWelfare",
                    ref: c
                }, null, 512), [
                    [we, ((ne = u.value) == null ? void 0 : ne.vipLevel) > 0]
                ]), f("记录规则"), p.value ? (t(), Y(wn, {
                    key: 0,
                    ref_key: "recordVsrule",
                    ref: d
                }, null, 512)) : f("v-if", !0)]), f("领取成功弹窗"), m(K, {
                    show: C.value,
                    "onUpdate:show": b[3] || (b[3] = P => C.value = P),
                    "show-confirm-button": !1,
                    "z-index": "99"
                }, {
                    default: O(() => {
                        var P, ae, le, te;
                        return [U(e("img", En, null, 512), [
                            [W, l(A)("public", "succeed")]
                        ]), e("div", Mn, n(v.$t("receivedSuccessfully")), 1), e("div", Nn, [e("div", null, [e("p", Hn, [e("img", {
                            src: l(A)("main", "love")
                        }, null, 8, Pn), D(n(l(M)((P = g.value) == null ? void 0 : P.integral, " ", 0)), 1)]), e("p", Un, [e("img", {
                            src: l(A)("main", "gold")
                        }, null, 8, Fn), D(n(l(M)((ae = g.value) == null ? void 0 : ae.balance, " ", 0)), 1)])]), e("div", null, [e("p", {
                            innerHTML: v.$t("vipTip4", [(le = g.value) == null ? void 0 : le.integral, (te = g.value) == null ? void 0 : te.balance])
                        }, null, 8, Bn), f(" <p>{{ $t('vipTip5') }}</p> ")])]), e("div", Wn, [e("button", {
                            onClick: ve
                        }, n(v.$t("sure")), 1)]), U(e("img", {
                            class: "close",
                            onClick: b[2] || (b[2] = Gn => C.value = !1)
                        }, null, 512), [
                            [W, l(I)("main", "close")]
                        ])]
                    }),
                    _: 1
                }, 8, ["show"])])
            }
        }
    });
export {
    On as _
};