import {
    G as F,
    z as R,
    B as X,
    H as V,
    aA as U,
    I as $,
    Q as u,
    av as z,
    O as o,
    N as C,
    J as e,
    ar as j,
    P as n,
    ax as x,
    aC as Z,
    aD as ee,
    R as oe,
    r as b,
    C as te,
    ao as se,
    K as ne,
    u as J,
    aB as pe,
    aF as _e,
    F as H,
    T as ge,
    w as ye,
    b4 as me
} from "./common.modules-5cfe2cf4.js";
import {
    V as Q,
    a as he
} from "./page-login-index.vue_vue_type_script_setup_true_lang.ts-f69c0404.js";
import {
    b as K,
    _ as L,
    a3 as we,
    G as be,
    b$ as $e,
    A as M,
    c0 as Ce,
    g as N,
    J as xe,
    bJ as Se,
    bE as Ve,
    bF as W,
    bK as ke,
    d as Te,
    y as De,
    aT as Ge,
    c1 as Be,
    c2 as Pe,
    L as Ie
} from "./page-activity-ActivityDetail-a58ec568.js";
const ae = i => (Z("data-v-2c18a1cc"), i = i(), ee(), i),
    Me = {
        class: "info-dialog"
    },
    Ne = {
        class: "info-dialog-header"
    },
    Oe = ae(() => e("span", {
        class: "info-dialog-header-left"
    }, null, -1)),
    Ae = ae(() => e("span", {
        class: "info-dialog-header-right"
    }, null, -1)),
    je = {
        class: "info-dialog-content"
    },
    ze = {
        class: "info-dialog-footer"
    },
    Fe = F({
        __name: "DiaLogOther",
        props: {
            show: {
                type: Boolean,
                default: !1
            },
            title: {
                type: String,
                default: ""
            },
            confirmText: {
                type: String,
                default: ""
            },
            showCancelBtn: {
                type: Boolean,
                default: !1
            },
            cancelText: {
                type: String,
                default: ""
            }
        },
        emits: ["update:show", "confirm", "cancel", "beforeClose"],
        setup(i, {
            emit: t
        }) {
            const _ = i,
                {
                    t: m
                } = R(),
                G = X({
                    get() {
                        return _.show || !1
                    },
                    set(r) {
                        t("update:show", r)
                    }
                });

            function c() {}
            return (r, a) => {
                const g = V("van-dialog"),
                    l = U("lazy");
                return C(), $("div", Me, [u(g, {
                    show: G.value,
                    "onUpdate:show": a[1] || (a[1] = y => G.value = y),
                    onCancel: a[2] || (a[2] = () => {
                        t("cancel")
                    }),
                    onConfirm: a[3] || (a[3] = () => {
                        t("confirm")
                    }),
                    "cancel-button-text": i.cancelText || o(m)("cancel"),
                    "confirm-button-text": i.confirmText || o(m)("confirm"),
                    "show-cancel-button": i.showCancelBtn,
                    "before-close": c
                }, {
                    default: z(() => [e("div", null, [e("div", Ne, [Oe, j(r.$slots, "header", {}, () => [e("h5", null, n(i.title), 1)], !0), Ae]), e("div", je, [j(r.$slots, "content", {}, () => [e("div", null, n(r.$t("contentsHere")), 1)], !0)]), e("div", ze, [j(r.$slots, "footer", {}, () => [x(e("img", {
                        onClick: a[0] || (a[0] = () => {
                            t("update:show", !1)
                        })
                    }, null, 512), [
                        [l, o(K)("main", "close")]
                    ])], !0)])])]),
                    _: 3
                }, 8, ["show", "cancel-button-text", "confirm-button-text", "show-cancel-button"])])
            }
        }
    });
const Re = L(Fe, [
        ["__scopeId", "data-v-2c18a1cc"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/common/DiaLogOther.vue"]
    ]),
    Ue = {
        class: "gverify-container"
    },
    Ke = {
        class: "gverify-container-header"
    },
    Le = {
        class: "gverify-container-header-belly"
    },
    qe = {
        alt: ""
    },
    Ee = {
        class: "gverify-container-content"
    },
    Ye = {
        class: "gverify-container-content-item"
    },
    Je = {
        class: "gverify-container-content-item-title"
    },
    He = {
        alt: ""
    },
    Qe = {
        class: "gverify-container-content-item-tip"
    },
    We = {
        class: "gverify-container-content-item-tip"
    },
    Xe = {
        class: "gravity-container-modal"
    },
    Ze = {
        class: "popup-content"
    },
    eo = {
        key: 0,
        class: "box"
    },
    oo = {
        class: "info"
    },
    to = {
        class: "txt"
    },
    so = {
        class: "txt"
    },
    no = {
        key: 1,
        class: "box"
    },
    ao = {
        class: "info"
    },
    io = {
        class: "txt"
    },
    lo = {
        class: "txt"
    },
    co = {
        key: 2,
        class: "box"
    },
    ro = {
        class: "label"
    },
    uo = ["placeholder"],
    vo = {
        class: "lab"
    },
    fo = {
        class: "other"
    },
    po = F({
        __name: "index",
        setup(i) {
            const {
                t
            } = R(), _ = oe(), m = we(), c = be().getUserInfo;
            let r = b(t("pwdVerify")),
                a = b(0),
                g = b(!1);
            const l = b(""),
                y = b(!1),
                k = b([]),
                O = {
                    text: "name",
                    value: "code"
                },
                {
                    isGoogleVerifySms: h,
                    isGoogleVerifyEmail: T,
                    registerState: A
                } = $e();
            A();
            const p = async d => {
                var I, D;
                const s = await M(Ce({
                    verifyCode: l.value.toString(),
                    verifyType: d
                }));
                console.log(s), (I = s == null ? void 0 : s.data) != null && I.secret && _.push({
                    name: "GoogleVerify-BindGoogle",
                    query: {
                        secret: (D = s.data) == null ? void 0 : D.secret,
                        type: 0
                    }
                })
            };
            te(() => {});
            const v = b(!1),
                B = () => {
                    l.value = "", m.setCountDown(0), c.regType === 1 ? h.value ? (a.value = 1, g.value = !0) : c.verifyMethods.email !== "" && T.value ? (a.value = 2, g.value = !0) : a.value = 0 : T.value ? (a.value = 2, g.value = !0) : c.verifyMethods.mobile !== "" && h.value ? (a.value = 1, g.value = !0) : a.value = 0, r.value = f(a.value), v.value = !0
                },
                f = d => {
                    let s = "";
                    switch (d) {
                        case 0:
                            s = t("pwdVerify");
                            break;
                        case 1:
                            s = t("SMSVerify");
                            break;
                        case 2:
                            s = t("emailverification");
                            break;
                        default:
                            s = t("pwdVerify");
                            break
                    }
                    return s
                },
                P = () => {
                    if (a.value === 1 || a.value === 2) {
                        if (!l.value) return J(t("noVerifyCodeFound"))
                    } else if (!l.value) return J(t("pwdNull"));
                    let d = ie(a.value);
                    p(d)
                },
                ie = d => {
                    let s = 1;
                    switch (d) {
                        case 0:
                            s = 2;
                            break;
                        case 1:
                            s = 1;
                            break;
                        case 2:
                            s = 4;
                            break;
                        default:
                            s = 2;
                            break
                    }
                    return s
                },
                le = () => {
                    y.value = !0, T.value && c.verifyMethods.email !== "" && h.value && c.verifyMethods.mobile !== "" ? k.value = [{
                        name: t("SMSVerify"),
                        code: 1
                    }, {
                        name: t("emailverification"),
                        code: 2
                    }] : T.value && c.verifyMethods.email !== "" ? k.value = [{
                        name: t("emailverification"),
                        code: 2
                    }] : h.value && c.verifyMethods.mobile !== "" && (k.value = [{
                        name: t("SMSVerify"),
                        code: 1
                    }])
                },
                ce = ({
                    selectedOptions: d
                }) => {
                    r.value = f(d[0].code), a.value = d[0].code, y.value = !1
                },
                q = async () => {
                    if (a.value === 1)
                        if (await M(Ve({
                                phone: c.verifyMethods.mobile,
                                codeType: W.openGoogle
                            }))) H(t("sendSuccess"));
                        else return -1;
                    else if (await M(ke({
                            email: c.verifyMethods.email,
                            emailType: W.openGoogle
                        }))) H(t("sendSuccess"));
                    else return -1
                };

            function re() {
                _.push({
                    name: "CustomerService"
                })
            }

            function de() {
                _.push({
                    name: "rpwd"
                })
            }
            return (d, s) => {
                const I = V("NavBar"),
                    D = V("svg-icon"),
                    ue = V("van-icon"),
                    ve = V("van-picker"),
                    fe = V("van-popup"),
                    E = U("lazy");
                return C(), $(ne, null, [e("div", Ue, [e("div", Ke, [u(I, {
                    title: o(t)("googleAuthenticator"),
                    class: "main",
                    "left-arrow": "",
                    onClickLeft: s[0] || (s[0] = w => o(_).go(-1))
                }, null, 8, ["title"]), e("div", Le, [x(e("img", qe, null, 512), [
                    [E, o(K)("main", "googleVerifyBg")]
                ])])]), e("div", Ee, [e("div", Ye, [e("div", Je, [x(e("img", He, null, 512), [
                    [E, o(N)("wallet", "hint")]
                ]), e("span", null, n(o(t)("googleIllustrate")), 1)]), e("div", Qe, [u(D, {
                    name: "hint"
                }), e("span", null, n(o(t)("googleTip1")), 1)]), e("div", We, [u(D, {
                    name: "hint"
                }), e("span", null, n(o(t)("googleTip2")), 1)])])]), e("div", {
                    class: "gverify-container-button",
                    onClick: B
                }, n(o(t)("turnGoogle")), 1)]), se(" 修改 短信&&密码验证弹窗修改 "), e("div", Xe, [u(Re, {
                    show: v.value,
                    "onUpdate:show": s[6] || (s[6] = w => v.value = w),
                    onConfirm: P,
                    onCancel: le,
                    showCancelBtn: o(g),
                    cancelText: o(t)("otherverificationmethods"),
                    title: o(r)
                }, {
                    content: z(() => {
                        var w, Y;
                        return [e("div", Ze, [o(a) === 1 ? (C(), $("div", eo, [e("div", oo, [e("p", to, n(o(t)("googleTip3")), 1), e("p", so, n(o(t)("googleTip4", [o(xe)()])), 1)]), u(Q, {
                            value: l.value,
                            "onUpdate:value": s[1] || (s[1] = S => l.value = S),
                            isShowVerifyT: !1,
                            sendFunc: q,
                            typeP: "updatePhone"
                        }, null, 8, ["value"])])) : o(a) === 2 ? (C(), $("div", no, [e("div", ao, [e("p", io, n(o(t)("googleTip3")), 1), e("p", lo, n(o(t)("googleTip7", [o(Se)((Y = (w = o(c)) == null ? void 0 : w.verifyMethods) == null ? void 0 : Y.email)])), 1)]), u(Q, {
                            value: l.value,
                            "onUpdate:value": s[2] || (s[2] = S => l.value = S),
                            isShowVerifyT: !1,
                            sendFunc: q,
                            typeP: "updatePhone"
                        }, null, 8, ["value"])])) : (C(), $("div", co, [e("label", ro, [u(D, {
                            name: "editPswIcon",
                            class: "img"
                        }), pe(" " + n(o(t)("withdrawDialogDesc2")), 1)]), x(e("input", {
                            class: "input",
                            maxlength: "20",
                            "onUpdate:modelValue": s[3] || (s[3] = S => l.value = S),
                            type: "password",
                            placeholder: o(t)("withdrawDialogPh")
                        }, null, 8, uo), [
                            [_e, l.value]
                        ]), e("p", vo, [u(ue, {
                            class: "icon",
                            name: "warning-o"
                        }), e("span", null, n(o(t)("withdrawDialogDesc3")), 1)]), e("div", fo, [e("span", {
                            class: "pwd",
                            onClick: s[4] || (s[4] = S => de())
                        }, n(o(t)("withdrawDialogDesc4")), 1), e("span", {
                            class: "service",
                            onClick: s[5] || (s[5] = S => re())
                        }, n(o(t)("withdrawDialogDesc5")), 1)])]))])]
                    }),
                    _: 1
                }, 8, ["show", "showCancelBtn", "cancelText", "title"])]), u(fe, {
                    show: y.value,
                    "onUpdate:show": s[8] || (s[8] = w => y.value = w),
                    round: "",
                    position: "bottom"
                }, {
                    default: z(() => [u(ve, {
                        "columns-field-names": O,
                        columns: k.value,
                        onCancel: s[7] || (s[7] = w => y.value = !1),
                        onConfirm: ce
                    }, null, 8, ["columns"])]),
                    _: 1
                }, 8, ["show"])], 64)
            }
        }
    });
const _o = L(po, [
        ["__scopeId", "data-v-1911143a"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/main/GoogleVerify/index.vue"]
    ]),
    qo = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: _o
    }, Symbol.toStringTag, {
        value: "Module"
    })),
    go = i => (Z("data-v-85031541"), i = i(), ee(), i),
    yo = {
        class: "gverify-container"
    },
    mo = {
        class: "gverify-container-header"
    },
    ho = {
        class: "gverify-container-header-belly"
    },
    wo = {
        alt: ""
    },
    bo = {
        class: "gverify-container-content"
    },
    $o = {
        class: "gverify-container-content-item"
    },
    Co = go(() => e("div", {
        class: "gverify-container-content-code"
    }, [e("canvas", {
        id: "qr-code"
    })], -1)),
    xo = {
        class: "gverify-container-content-item-title"
    },
    So = {
        alt: ""
    },
    Vo = {
        class: "gverify-container-content-item-text"
    },
    ko = {
        class: "gverify-container-content-item-tip"
    },
    To = {
        class: "gverify-container-footer"
    },
    Do = {
        class: "gverify-container-content-item footer-wrapper"
    },
    Go = {
        class: "gverify-container-content-item-title"
    },
    Bo = {
        alt: ""
    },
    Po = {
        class: "gverify-container-content-item-steps"
    },
    Io = {
        alt: ""
    },
    Mo = {
        class: "gverify-container-content-item-steps"
    },
    No = {
        class: "gverify-container-content-item-steps"
    },
    Oo = {
        class: "gverify-container-content-item-steps"
    },
    Ao = {
        class: "gverify-container-content-item-steps"
    },
    jo = {
        key: 0
    },
    zo = {
        key: 1
    },
    Fo = F({
        __name: "index",
        setup(i) {
            const {
                t
            } = R(), _ = oe(), m = ge(), {
                maxDate: G
            } = Te(0), c = ye(G).startOf("day").format("YYYY-MM-DD"), r = m.query.secret, a = X(() => De().getProjectName), g = `otpauth://totp/${c}?secret=${m.query.secret}&issuer=${a.value}`, l = Number(m.query.type), y = async (p, v) => {
                const B = v == 0 ? Be({
                        googleCode: p
                    }) : Pe({
                        googleCode: p
                    }),
                    f = await M(B);
                (f == null ? void 0 : f.code) == 0 && _.push({
                    name: "main"
                })
            }, k = () => {
                Ge("https://support.google.com/accounts/answer/1066447", 1)
            }, O = () => {
                h.value = !0
            }, h = b(!1), T = p => {
                y(p, l)
            };

            function A() {
                me.toCanvas(document.getElementById("qr-code"), g, p => {
                    p && console.error(p)
                })
            }
            return te(() => {
                A()
            }), (p, v) => {
                const B = V("NavBar"),
                    f = U("lazy");
                return C(), $(ne, null, [e("div", yo, [e("div", mo, [u(B, {
                    title: o(t)("googleVerify"),
                    class: "main",
                    "left-arrow": "",
                    onClickLeft: v[0] || (v[0] = P => o(_).go(-1))
                }, null, 8, ["title"]), e("div", ho, [x(e("img", wo, null, 512), [
                    [f, o(K)("main", "googleVerifyBg")]
                ])])]), e("div", bo, [e("div", $o, [Co, e("div", xo, [x(e("img", So, null, 512), [
                    [f, o(N)("main", "googleKey")]
                ]), e("span", null, n(o(t)("safeKey")), 1)]), e("div", Vo, n(o(r)), 1), e("div", {
                    class: "gverify-container-content-item-button",
                    onClick: v[1] || (v[1] = P => o(Ie)(o(r)))
                }, n(o(t)("copyKey")), 1), e("div", ko, n(o(t)("tipSaveKeyProperly")), 1)])]), e("div", To, [e("div", Do, [e("div", Go, [x(e("img", Bo, null, 512), [
                    [f, o(N)("main", "privacyIcon")]
                ]), e("span", null, n(o(t)("bindStep")), 1)]), e("div", Po, " 1." + n(o(t)("tipDownloadGoogleVerify")), 1), e("div", {
                    class: "footer-wrapper-button",
                    onClick: k
                }, [x(e("img", Io, null, 512), [
                    [f, o(N)("main", "gverifyDownload")]
                ]), e("span", null, n(o(t)("downloadGoogleVerify")), 1)]), e("div", Mo, " 2." + n(o(t)("tipCopyKeyToBind")), 1), e("div", No, " 3." + n(o(t)("tipAddNewAccount")), 1), e("div", Oo, " 4." + n(o(t)("tipNametheAccountPasteTheKey")), 1), e("div", Ao, " 5." + n(o(t)("tipGenerateSuccessCode")), 1)])]), e("div", {
                    class: "gverify-container-button",
                    onClick: O
                }, [o(l) === 0 ? (C(), $("span", jo, n(o(t)("confirmBinding")), 1)) : (C(), $("span", zo, n(o(t)("closeGoogle")), 1))])]), se(" 验证弹窗 "), u(he, {
                    showPopup: h.value,
                    onOnConfirm: T,
                    onOnBack: v[2] || (v[2] = P => h.value = !1)
                }, null, 8, ["showPopup"])], 64)
            }
        }
    });
const Ro = L(Fo, [
        ["__scopeId", "data-v-85031541"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/main/GoogleVerify/BindGoogle/index.vue"]
    ]),
    Eo = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: Ro
    }, Symbol.toStringTag, {
        value: "Module"
    }));
export {
    Re as D, Eo as a, qo as i
};