@huyooo/ui 0.13.8 → 0.13.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{AuthkitAppSetting-u2kUUH6q.js → AuthkitAppSetting-Xe-QQSQ4.js} +403 -406
  2. package/dist/{AuthkitGithubBinding-B-YSWc50.js → AuthkitGithubBinding-CK6ijijV.js} +329 -330
  3. package/dist/{Contact-CIMfdt_b.js → Contact-mb7deQOs.js} +1 -1
  4. package/dist/CustomTable-BT-cnhLR.js +280 -0
  5. package/dist/{MessageHandle-D2dcvWVr.js → MessageHandle-CVueKPFG.js} +1 -1
  6. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CSAIRPOj.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DL4qP8DA.js} +1 -1
  7. package/dist/{PaySubscriptions-BaUlQE-p.js → PaySubscriptions-BkZaeTgv.js} +2 -2
  8. package/dist/{PricingPlans-B0nt843Q.js → PricingPlans-B-GWpft_.js} +1 -1
  9. package/dist/{ReferrerReferees-B50_V69q.js → ReferrerReferees-DFCwvXJ6.js} +2 -2
  10. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BHXLN2Tu.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Iwq1MOFa.js} +5 -5
  11. package/dist/WidthContainer-jOX17pDu.js +691 -0
  12. package/dist/authkit.js +6 -6
  13. package/dist/common.js +2 -2
  14. package/dist/composables/Authkit/resolveRoutePermission.d.ts +4 -0
  15. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
  16. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +1 -1
  17. package/dist/composables.js +6 -6
  18. package/dist/main.js +19 -19
  19. package/dist/message.js +2 -2
  20. package/dist/pay.js +2 -2
  21. package/dist/privateCom.js +1 -1
  22. package/dist/referrer.js +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/types/api/ai.generated.d.ts +378 -247
  25. package/dist/types/api/billing.generated.d.ts +1105 -374
  26. package/dist/{useAuthkitAppsAuthPageInfo-CjPdpZ64.js → useAuthkitAppsAuthPageInfo-nCjfAjiw.js} +17 -7
  27. package/dist/useAuthkitCreateAndUpdate-u-ceTc-m.js +25 -0
  28. package/dist/useAuthkitUsersProfile-BC5EsA2f.js +40 -0
  29. package/dist/{useDownloads-CxoyuqyY.js → useDownloads-BC0QyEFr.js} +9 -9
  30. package/dist/{useLegalLinks-DHqsVvIK.js → useLegalLinks-DeXLE-yv.js} +1 -1
  31. package/dist/{useSEO-DypqLVfr.js → useSEO-BWAREYk4.js} +238 -227
  32. package/dist/user.js +1 -1
  33. package/package.json +2 -1
  34. package/dist/CustomTable-BBcd4nNL.js +0 -278
  35. package/dist/WidthContainer-BQIboxrg.js +0 -695
  36. package/dist/useAuthkitCreateAndUpdate-CsYn-oYu.js +0 -25
  37. package/dist/useAuthkitUsersProfile-CIFqG3gd.js +0 -36
@@ -1,19 +1,19 @@
1
- import { defineComponent as z, openBlock as c, createElementBlock as b, normalizeClass as me, createVNode as s, unref as t, computed as C, createElementVNode as y, createCommentVNode as I, createBlock as k, ref as S, withCtx as f, createTextVNode as $, watchEffect as ee, Fragment as G, renderList as te, toDisplayString as O, useSlots as re, renderSlot as N, normalizeStyle as Q, onMounted as j, onUnmounted as ie } from "vue";
1
+ import { defineComponent as z, openBlock as d, createElementBlock as b, normalizeClass as me, createVNode as s, unref as t, computed as C, createElementVNode as y, createCommentVNode as I, createBlock as k, ref as S, withCtx as f, createTextVNode as $, watchEffect as ee, Fragment as G, renderList as te, toDisplayString as O, useSlots as re, renderSlot as N, normalizeStyle as Q, onMounted as j, onUnmounted as ie } from "vue";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import "./index-D3Kp6R4z.js";
5
- import { Form as L, FormItem as A, Input as V, Button as B, Link as F, Tabs as oe, TabPane as se, Divider as ae, Modal as fe, Message as Z, List as ve, ListItem as X, ListItemMeta as Y, Avatar as E, Alert as le } from "@arco-design/web-vue";
6
- import { u as H } from "./useAuthkitAuth-C--qS6UE.js";
5
+ import { Form as x, FormItem as A, Input as V, Button as B, Link as M, Tabs as oe, TabPane as se, Divider as ae, Modal as fe, Message as Z, List as ve, ListItem as X, ListItemMeta as Y, Avatar as E, Alert as le } from "@arco-design/web-vue";
6
+ import { u as F } from "./useAuthkitAuth-C--qS6UE.js";
7
7
  import { e as T, u as ge, s as he, g as ye } from "./apiClients-CkI47p36.js";
8
- import { u as M } from "./useAuthkitAppsAuthPageInfo-CjPdpZ64.js";
9
- import { u as ue, S as D, a as we, b as _e } from "./AuthkitAppSetting-u2kUUH6q.js";
8
+ import { u as H } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
9
+ import { u as ue, S as D, a as we, b as _e } from "./AuthkitAppSetting-Xe-QQSQ4.js";
10
10
  import { Icon as de } from "@iconify/vue";
11
11
  import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
- import { u as be } from "./useLegalLinks-DHqsVvIK.js";
16
- import { u as J } from "./useAuthkitUsersProfile-CIFqG3gd.js";
15
+ import { u as be } from "./useLegalLinks-DeXLE-yv.js";
16
+ import { u as J } from "./useAuthkitUsersProfile-BC5EsA2f.js";
17
17
  /* empty css */
18
18
  /* empty css */
19
19
  /* empty css */
@@ -37,7 +37,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
37
37
  },
38
38
  setup(g) {
39
39
  const u = g;
40
- return (a, o) => (c(), b("button", {
40
+ return (n, o) => (d(), b("button", {
41
41
  class: me(["OAuthItem", {
42
42
  "OAuthItem--wechat": u.label === "微信"
43
43
  }]),
@@ -70,36 +70,36 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
70
70
  setup(g) {
71
71
  const {
72
72
  appsData: u
73
- } = M(), a = g, {
73
+ } = H(), n = g, {
74
74
  githubAuth: o,
75
75
  googleAuth: v,
76
76
  microsoftAuth: l,
77
77
  wechatAuth: r
78
78
  } = ue(), e = C(() => !(!u.value.oauth.google.enabled && !u.value.oauth.microsoft.enabled && !u.value.oauth.github.enabled && !u.value.oauth.wechat.enabled));
79
- return (h, i) => (c(), b("div", Ie, [e.value ? (c(), b("div", ze, [...i[4] || (i[4] = [y("span", null, "其他登录方式", -1)])])) : I("", !0), y("div", Pe, [t(u).oauth.google.enabled ? (c(), k(W, {
79
+ return (h, i) => (d(), b("div", Ie, [e.value ? (d(), b("div", ze, [...i[4] || (i[4] = [y("span", null, "其他登录方式", -1)])])) : I("", !0), y("div", Pe, [t(u).oauth.google.enabled ? (d(), k(W, {
80
80
  key: 0,
81
81
  icon: "logos:google-icon",
82
82
  label: "Google",
83
- size: a.size,
84
- onClick: i[0] || (i[0] = (d) => t(v)())
85
- }, null, 8, ["size"])) : I("", !0), t(u).oauth.github.enabled ? (c(), k(W, {
83
+ size: n.size,
84
+ onClick: i[0] || (i[0] = (p) => t(v)())
85
+ }, null, 8, ["size"])) : I("", !0), t(u).oauth.github.enabled ? (d(), k(W, {
86
86
  key: 1,
87
87
  icon: "logos:github-icon",
88
88
  label: "Github",
89
- size: a.size,
90
- onClick: i[1] || (i[1] = (d) => t(o)())
91
- }, null, 8, ["size"])) : I("", !0), t(u).oauth.microsoft.enabled ? (c(), k(W, {
89
+ size: n.size,
90
+ onClick: i[1] || (i[1] = (p) => t(o)())
91
+ }, null, 8, ["size"])) : I("", !0), t(u).oauth.microsoft.enabled ? (d(), k(W, {
92
92
  key: 2,
93
93
  icon: "logos:microsoft-icon",
94
94
  label: "Microsoft",
95
- size: a.size,
96
- onClick: i[2] || (i[2] = (d) => t(l)())
97
- }, null, 8, ["size"])) : I("", !0), t(u).oauth.wechat.enabled ? (c(), k(W, {
95
+ size: n.size,
96
+ onClick: i[2] || (i[2] = (p) => t(l)())
97
+ }, null, 8, ["size"])) : I("", !0), t(u).oauth.wechat.enabled ? (d(), k(W, {
98
98
  key: 3,
99
99
  icon: "ri:wechat-fill",
100
100
  label: "微信",
101
- size: a.size,
102
- onClick: i[3] || (i[3] = (d) => t(r)())
101
+ size: n.size,
102
+ onClick: i[3] || (i[3] = (p) => t(r)())
103
103
  }, null, 8, ["size"])) : I("", !0)])]));
104
104
  }
105
105
  }), Ve = /* @__PURE__ */ P(Ae, [["__scopeId", "data-v-4ff27a11"]]), Ue = {
@@ -125,7 +125,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
125
125
  setup(g, {
126
126
  emit: u
127
127
  }) {
128
- const a = u, o = g, v = S(), l = S(!1), r = S(), e = S({
128
+ const n = u, o = g, v = S(), l = S(!1), r = S(), e = S({
129
129
  email: void 0,
130
130
  userToken: void 0,
131
131
  emailVerifyId: void 0,
@@ -136,20 +136,20 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
136
136
  if (!await r.value.validateField(["email"])) {
137
137
  l.value = !0;
138
138
  const {
139
- data: m
139
+ data: c
140
140
  } = await T.verify.email.retry.post({
141
141
  email: e.value.email,
142
142
  purpose: "resetPassword"
143
143
  });
144
- l.value = !1, m && (e.value.emailVerifyId = m.emailVerifyId, v.value.startCountFn());
144
+ l.value = !1, c && (e.value.emailVerifyId = c.emailVerifyId, v.value.startCountFn());
145
145
  }
146
146
  }
147
147
  async function i() {
148
- r.value.validate().then((d) => {
149
- d || a("submit", e.value);
148
+ r.value.validate().then((p) => {
149
+ p || n("submit", e.value);
150
150
  });
151
151
  }
152
- return (d, m) => (c(), b("div", Ue, [s(t(L), {
152
+ return (p, c) => (d(), b("div", Ue, [s(t(x), {
153
153
  ref_key: "formRef",
154
154
  ref: r,
155
155
  model: e.value,
@@ -170,7 +170,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
170
170
  }, {
171
171
  default: f(() => [s(t(V), {
172
172
  modelValue: e.value.email,
173
- "onUpdate:modelValue": m[0] || (m[0] = (n) => e.value.email = n),
173
+ "onUpdate:modelValue": c[0] || (c[0] = (a) => e.value.email = a),
174
174
  placeholder: "请输入邮箱"
175
175
  }, null, 8, ["modelValue"])]),
176
176
  _: 1
@@ -185,7 +185,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
185
185
  }, {
186
186
  default: f(() => [y("div", $e, [s(t(V), {
187
187
  modelValue: e.value.userToken,
188
- "onUpdate:modelValue": m[1] || (m[1] = (n) => e.value.userToken = n),
188
+ "onUpdate:modelValue": c[1] || (c[1] = (a) => e.value.userToken = a),
189
189
  placeholder: "请输入验证码"
190
190
  }, null, 8, ["modelValue"]), s(D, {
191
191
  ref_key: "SendVerifyCodeRef",
@@ -212,7 +212,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
212
212
  }, {
213
213
  default: f(() => [s(t(V), {
214
214
  modelValue: e.value.password,
215
- "onUpdate:modelValue": m[2] || (m[2] = (n) => e.value.password = n),
215
+ "onUpdate:modelValue": c[2] || (c[2] = (a) => e.value.password = a),
216
216
  placeholder: "请输入密码",
217
217
  type: "password",
218
218
  autocomplete: ""
@@ -229,14 +229,14 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
229
229
  minLength: 10,
230
230
  message: "确认密码不能少于10字符"
231
231
  }, {
232
- validator: (n, p) => {
233
- n !== e.value.password ? p("两次密码输入不一致,请重新输入") : p();
232
+ validator: (a, m) => {
233
+ a !== e.value.password ? m("两次密码输入不一致,请重新输入") : m();
234
234
  }
235
235
  }]
236
236
  }, {
237
237
  default: f(() => [s(t(V), {
238
238
  modelValue: e.value.confirmPassword,
239
- "onUpdate:modelValue": m[3] || (m[3] = (n) => e.value.confirmPassword = n),
239
+ "onUpdate:modelValue": c[3] || (c[3] = (a) => e.value.confirmPassword = a),
240
240
  placeholder: "请输入确认密码密码",
241
241
  type: "password",
242
242
  autocomplete: ""
@@ -249,7 +249,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
249
249
  size: o.size,
250
250
  onClick: i
251
251
  }, {
252
- default: f(() => [...m[4] || (m[4] = [$(" 提交 ", -1)])]),
252
+ default: f(() => [...c[4] || (c[4] = [$(" 提交 ", -1)])]),
253
253
  _: 1
254
254
  }, 8, ["loading", "size"])])]),
255
255
  _: 1
@@ -276,7 +276,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
276
276
  setup(g, {
277
277
  emit: u
278
278
  }) {
279
- const a = u, o = g, v = S(), l = S(!1), r = S(), e = S({
279
+ const n = u, o = g, v = S(), l = S(!1), r = S(), e = S({
280
280
  phone: void 0,
281
281
  code: void 0,
282
282
  password: void 0,
@@ -288,29 +288,29 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
288
288
  minLength: 10,
289
289
  message: "确认密码不能少于10字符"
290
290
  }, {
291
- validator: (m, n) => {
292
- if (m !== e.value.password) {
293
- n("两次密码输入不一致,请重新输入");
291
+ validator: (c, a) => {
292
+ if (c !== e.value.password) {
293
+ a("两次密码输入不一致,请重新输入");
294
294
  return;
295
295
  }
296
- n();
296
+ a();
297
297
  }
298
298
  }];
299
299
  async function i() {
300
300
  if (!await r.value.validateField(["phone"])) {
301
301
  l.value = !0;
302
302
  const {
303
- error: n
303
+ error: a
304
304
  } = await T.verify.sms.send.post({
305
305
  phone: e.value.phone,
306
306
  purpose: "resetPassword"
307
307
  });
308
- l.value = !1, n || v.value.startCountFn();
308
+ l.value = !1, a || v.value.startCountFn();
309
309
  }
310
310
  }
311
- async function d() {
312
- r.value.validate().then((m) => {
313
- m || a("submit", {
311
+ async function p() {
312
+ r.value.validate().then((c) => {
313
+ c || n("submit", {
314
314
  method: "phone",
315
315
  phone: e.value.phone,
316
316
  code: e.value.code,
@@ -318,7 +318,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
318
318
  });
319
319
  });
320
320
  }
321
- return (m, n) => (c(), b("div", Be, [s(t(L), {
321
+ return (c, a) => (d(), b("div", Be, [s(t(x), {
322
322
  ref_key: "formRef",
323
323
  ref: r,
324
324
  model: e.value,
@@ -339,7 +339,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
339
339
  }, {
340
340
  default: f(() => [s(t(V), {
341
341
  modelValue: e.value.phone,
342
- "onUpdate:modelValue": n[0] || (n[0] = (p) => e.value.phone = p),
342
+ "onUpdate:modelValue": a[0] || (a[0] = (m) => e.value.phone = m),
343
343
  placeholder: "请输入手机号",
344
344
  autocomplete: "tel",
345
345
  type: "tel"
@@ -356,7 +356,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
356
356
  }, {
357
357
  default: f(() => [y("div", Te, [s(t(V), {
358
358
  modelValue: e.value.code,
359
- "onUpdate:modelValue": n[1] || (n[1] = (p) => e.value.code = p),
359
+ "onUpdate:modelValue": a[1] || (a[1] = (m) => e.value.code = m),
360
360
  placeholder: "请输入验证码",
361
361
  autocomplete: "one-time-code"
362
362
  }, null, 8, ["modelValue"]), s(D, {
@@ -384,7 +384,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
384
384
  }, {
385
385
  default: f(() => [s(t(V), {
386
386
  modelValue: e.value.password,
387
- "onUpdate:modelValue": n[2] || (n[2] = (p) => e.value.password = p),
387
+ "onUpdate:modelValue": a[2] || (a[2] = (m) => e.value.password = m),
388
388
  placeholder: "请输入密码",
389
389
  type: "password",
390
390
  autocomplete: "new-password"
@@ -398,7 +398,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
398
398
  }, {
399
399
  default: f(() => [s(t(V), {
400
400
  modelValue: e.value.confirmPassword,
401
- "onUpdate:modelValue": n[3] || (n[3] = (p) => e.value.confirmPassword = p),
401
+ "onUpdate:modelValue": a[3] || (a[3] = (m) => e.value.confirmPassword = m),
402
402
  placeholder: "请输入确认密码",
403
403
  type: "password",
404
404
  autocomplete: "new-password"
@@ -409,9 +409,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
409
409
  loading: o.loading,
410
410
  long: "",
411
411
  size: o.size,
412
- onClick: d
412
+ onClick: p
413
413
  }, {
414
- default: f(() => [...n[4] || (n[4] = [$(" 提交 ", -1)])]),
414
+ default: f(() => [...a[4] || (a[4] = [$(" 提交 ", -1)])]),
415
415
  _: 1
416
416
  }, 8, ["loading", "size"])]),
417
417
  _: 1
@@ -425,11 +425,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
425
425
  setup(g, {
426
426
  emit: u
427
427
  }) {
428
- const a = u;
428
+ const n = u;
429
429
  function o() {
430
- a("switchSignIn");
430
+ n("switchSignIn");
431
431
  }
432
- return (v, l) => (c(), b("div", Le, [y("span", null, [l[1] || (l[1] = y("span", null, "已经有账号?", -1)), s(t(F), {
432
+ return (v, l) => (d(), b("div", Le, [y("span", null, [l[1] || (l[1] = y("span", null, "已经有账号?", -1)), s(t(M), {
433
433
  style: {
434
434
  padding: "0px"
435
435
  },
@@ -465,38 +465,38 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
465
465
  setup(g, {
466
466
  emit: u
467
467
  }) {
468
- const a = u, o = g, {
468
+ const n = u, o = g, {
469
469
  appsData: v
470
- } = M(), l = C(() => v.value.authMethods), r = C(() => {
471
- const d = [];
472
- return l.value.login.emailPassword && d.push({
470
+ } = H(), l = C(() => v.value.authMethods), r = C(() => {
471
+ const p = [];
472
+ return l.value.login.emailPassword && p.push({
473
473
  key: "email",
474
474
  title: "邮箱找回"
475
- }), l.value.login.phonePassword && d.push({
475
+ }), l.value.login.phonePassword && p.push({
476
476
  key: "phone",
477
477
  title: "手机号找回"
478
- }), d;
478
+ }), p;
479
479
  }), e = S("email");
480
480
  ee(() => {
481
- var d;
482
- r.value.some((m) => m.key === e.value) || (e.value = ((d = r.value[0]) == null ? void 0 : d.key) || "email");
481
+ var p;
482
+ r.value.some((c) => c.key === e.value) || (e.value = ((p = r.value[0]) == null ? void 0 : p.key) || "email");
483
483
  });
484
484
  function h() {
485
- a("switchSignIn");
485
+ n("switchSignIn");
486
486
  }
487
- async function i(d) {
488
- a("submit", {
487
+ async function i(p) {
488
+ n("submit", {
489
489
  method: e.value,
490
- ...d
490
+ ...p
491
491
  });
492
492
  }
493
- return (d, m) => (c(), b("div", Fe, [r.value.length > 1 ? (c(), b("div", He, [s(t(oe), {
493
+ return (p, c) => (d(), b("div", Fe, [r.value.length > 1 ? (d(), b("div", He, [s(t(oe), {
494
494
  "active-key": e.value,
495
- "onUpdate:activeKey": m[0] || (m[0] = (n) => e.value = n)
495
+ "onUpdate:activeKey": c[0] || (c[0] = (a) => e.value = a)
496
496
  }, {
497
- default: f(() => [(c(!0), b(G, null, te(r.value, (n) => (c(), k(t(se), {
498
- key: n.key,
499
- title: n.title
497
+ default: f(() => [(d(!0), b(G, null, te(r.value, (a) => (d(), k(t(se), {
498
+ key: a.key,
499
+ title: a.title
500
500
  }, null, 8, ["title"]))), 128))]),
501
501
  _: 1
502
502
  }, 8, ["active-key"]), s(t(ae), {
@@ -504,17 +504,17 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
504
504
  style: {
505
505
  margin: "0"
506
506
  }
507
- })])) : I("", !0), e.value === "email" && l.value.login.emailPassword ? (c(), k(qe, {
507
+ })])) : I("", !0), e.value === "email" && l.value.login.emailPassword ? (d(), k(qe, {
508
508
  key: 1,
509
509
  loading: g.loading,
510
510
  size: o.size,
511
511
  onSubmit: i
512
- }, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (c(), k(xe, {
512
+ }, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (d(), k(xe, {
513
513
  key: 2,
514
514
  loading: g.loading,
515
515
  size: o.size,
516
516
  onSubmit: i
517
- }, null, 8, ["loading", "size"])) : (c(), b("div", De, "当前应用未开放找回密码")), s(ne, {
517
+ }, null, 8, ["loading", "size"])) : (d(), b("div", De, "当前应用未开放找回密码")), s(ne, {
518
518
  onSwitchSignIn: h
519
519
  })]));
520
520
  }
@@ -529,7 +529,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
529
529
  setup(g, {
530
530
  emit: u
531
531
  }) {
532
- const a = u, {
532
+ const n = u, {
533
533
  getLink: o
534
534
  } = be(), v = C(() => {
535
535
  const i = o("userServiceAgreement");
@@ -539,18 +539,18 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
539
539
  return i != null && i.configured ? i : void 0;
540
540
  }), r = C(() => !!(v.value || l.value));
541
541
  function e() {
542
- a("toUserServiceAgreement");
542
+ n("toUserServiceAgreement");
543
543
  }
544
544
  function h() {
545
- a("toPrivacyPolicy");
545
+ n("toPrivacyPolicy");
546
546
  }
547
- return (i, d) => r.value ? (c(), b("div", Ne, [d[0] || (d[0] = y("span", null, "注册登陆即表示同意", -1)), v.value ? (c(), k(t(F), {
547
+ return (i, p) => r.value ? (d(), b("div", Ne, [p[0] || (p[0] = y("span", null, "注册登陆即表示同意", -1)), v.value ? (d(), k(t(M), {
548
548
  key: 0,
549
549
  onClick: e
550
550
  }, {
551
551
  default: f(() => [$(O(v.value.label), 1)]),
552
552
  _: 1
553
- })) : I("", !0), v.value && l.value ? (c(), b("span", je, "和")) : I("", !0), l.value ? (c(), k(t(F), {
553
+ })) : I("", !0), v.value && l.value ? (d(), b("span", je, "和")) : I("", !0), l.value ? (d(), k(t(M), {
554
554
  key: 2,
555
555
  onClick: h
556
556
  }, {
@@ -583,16 +583,16 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
583
583
  setup(g, {
584
584
  emit: u
585
585
  }) {
586
- const a = u, o = g, v = S(), l = S({
586
+ const n = u, o = g, v = S(), l = S({
587
587
  identifier: void 0,
588
588
  password: void 0
589
589
  });
590
590
  async function r() {
591
591
  v.value.validate().then((e) => {
592
- e || a("submit", l.value);
592
+ e || n("submit", l.value);
593
593
  });
594
594
  }
595
- return (e, h) => (c(), b("div", Qe, [s(t(L), {
595
+ return (e, h) => (d(), b("div", Qe, [s(t(x), {
596
596
  ref_key: "formRef",
597
597
  ref: v,
598
598
  model: l.value,
@@ -661,14 +661,14 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
661
661
  setup(g, {
662
662
  emit: u
663
663
  }) {
664
- const a = g, o = u;
664
+ const n = g, o = u;
665
665
  function v() {
666
666
  o("switchSignUp");
667
667
  }
668
668
  function l() {
669
669
  o("switchResetPassword");
670
670
  }
671
- return (r, e) => (c(), b("div", Ze, [a.showSignUp ? (c(), b("span", et, [e[1] || (e[1] = y("span", null, " 还没有账户?", -1)), s(t(F), {
671
+ return (r, e) => (d(), b("div", Ze, [n.showSignUp ? (d(), b("span", et, [e[1] || (e[1] = y("span", null, " 还没有账户?", -1)), s(t(M), {
672
672
  style: {
673
673
  padding: "0px"
674
674
  },
@@ -676,7 +676,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
676
676
  }, {
677
677
  default: f(() => [...e[0] || (e[0] = [$("去注册?", -1)])]),
678
678
  _: 1
679
- })])) : I("", !0), s(t(F), {
679
+ })])) : I("", !0), s(t(M), {
680
680
  style: {
681
681
  padding: "0px"
682
682
  },
@@ -711,17 +711,17 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
711
711
  setup(g, {
712
712
  emit: u
713
713
  }) {
714
- const a = u, o = g, v = re(), l = C(() => !!v.OAuth), r = S(), e = S(!1), h = S(), i = S({
714
+ const n = u, o = g, v = re(), l = C(() => !!v.OAuth), r = S(), e = S(!1), h = S(), i = S({
715
715
  phone: void 0,
716
716
  code: void 0
717
717
  });
718
- function d() {
719
- a("switchSignUp");
718
+ function p() {
719
+ n("switchSignUp");
720
720
  }
721
- function m() {
722
- a("switchResetPassword");
721
+ function c() {
722
+ n("switchResetPassword");
723
723
  }
724
- async function n() {
724
+ async function a() {
725
725
  if (!await h.value.validateField(["phone"])) {
726
726
  e.value = !0;
727
727
  const {
@@ -733,16 +733,16 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
733
733
  e.value = !1, w || r.value.startCountFn();
734
734
  }
735
735
  }
736
- async function p() {
736
+ async function m() {
737
737
  h.value.validate().then((_) => {
738
- _ || a("submit", {
738
+ _ || n("submit", {
739
739
  identifier: i.value.phone,
740
740
  code: i.value.code,
741
741
  method: "code"
742
742
  });
743
743
  });
744
744
  }
745
- return (_, w) => (c(), b("div", it, [y("div", ot, [s(t(L), {
745
+ return (_, w) => (d(), b("div", it, [y("div", ot, [s(t(x), {
746
746
  ref_key: "formRef",
747
747
  ref: h,
748
748
  model: i.value,
@@ -791,7 +791,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
791
791
  style: {
792
792
  "margin-left": "10px"
793
793
  },
794
- onSend: n
794
+ onSend: a
795
795
  }, null, 8, ["size", "loading"])])]),
796
796
  _: 1
797
797
  }), y("div", at, [s(t(B), {
@@ -799,7 +799,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
799
799
  loading: o.loading,
800
800
  long: "",
801
801
  size: o.size,
802
- onClick: p
802
+ onClick: m
803
803
  }, {
804
804
  default: f(() => [...w[2] || (w[2] = [$(" 登录 ", -1)])]),
805
805
  _: 1
@@ -808,8 +808,8 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
808
808
  }, 8, ["model", "size"])]), l.value ? N(_.$slots, "OAuth", {
809
809
  key: 0
810
810
  }, void 0, !0) : I("", !0), s(ce, {
811
- onSwitchSignUp: d,
812
- onSwitchResetPassword: m
811
+ onSwitchSignUp: p,
812
+ onSwitchResetPassword: c
813
813
  })]));
814
814
  }
815
815
  }), lt = /* @__PURE__ */ P(nt, [["__scopeId", "data-v-723d4155"]]), rt = {
@@ -833,7 +833,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
833
833
  setup(g, {
834
834
  emit: u
835
835
  }) {
836
- const a = u, o = g, v = S(), l = S(!1), r = S(), e = S({
836
+ const n = u, o = g, v = S(), l = S(!1), r = S(), e = S({
837
837
  email: void 0,
838
838
  code: void 0,
839
839
  emailVerifyId: ""
@@ -842,18 +842,18 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
842
842
  if (!await r.value.validateField(["email"])) {
843
843
  l.value = !0;
844
844
  const {
845
- data: m,
846
- error: n
845
+ data: c,
846
+ error: a
847
847
  } = await T.verify.email.retry.post({
848
848
  email: e.value.email,
849
849
  purpose: "signIn"
850
850
  });
851
- l.value = !1, !n && (m != null && m.emailVerifyId) && (e.value.emailVerifyId = m.emailVerifyId, v.value.startCountFn());
851
+ l.value = !1, !a && (c != null && c.emailVerifyId) && (e.value.emailVerifyId = c.emailVerifyId, v.value.startCountFn());
852
852
  }
853
853
  }
854
854
  async function i() {
855
- r.value.validate().then((d) => {
856
- d || a("submit", {
855
+ r.value.validate().then((p) => {
856
+ p || n("submit", {
857
857
  identifier: e.value.email,
858
858
  code: e.value.code,
859
859
  emailVerifyId: e.value.emailVerifyId,
@@ -861,7 +861,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
861
861
  });
862
862
  });
863
863
  }
864
- return (d, m) => (c(), b("div", rt, [s(t(L), {
864
+ return (p, c) => (d(), b("div", rt, [s(t(x), {
865
865
  ref_key: "formRef",
866
866
  ref: r,
867
867
  model: e.value,
@@ -881,7 +881,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
881
881
  }, {
882
882
  default: f(() => [s(t(V), {
883
883
  modelValue: e.value.email,
884
- "onUpdate:modelValue": m[0] || (m[0] = (n) => e.value.email = n),
884
+ "onUpdate:modelValue": c[0] || (c[0] = (a) => e.value.email = a),
885
885
  placeholder: "请输入邮箱",
886
886
  autocomplete: "email"
887
887
  }, null, 8, ["modelValue"])]),
@@ -896,7 +896,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
896
896
  }, {
897
897
  default: f(() => [y("div", ut, [s(t(V), {
898
898
  modelValue: e.value.code,
899
- "onUpdate:modelValue": m[1] || (m[1] = (n) => e.value.code = n),
899
+ "onUpdate:modelValue": c[1] || (c[1] = (a) => e.value.code = a),
900
900
  placeholder: "请输入验证码",
901
901
  autocomplete: "one-time-code"
902
902
  }, null, 8, ["modelValue"]), s(D, {
@@ -917,7 +917,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
917
917
  size: o.size,
918
918
  onClick: i
919
919
  }, {
920
- default: f(() => [...m[2] || (m[2] = [$(" 登录 ", -1)])]),
920
+ default: f(() => [...c[2] || (c[2] = [$(" 登录 ", -1)])]),
921
921
  _: 1
922
922
  }, 8, ["loading", "size"])]),
923
923
  _: 1
@@ -945,42 +945,42 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
945
945
  setup(g, {
946
946
  emit: u
947
947
  }) {
948
- const a = u, o = g, v = re(), l = C(() => !!v.OAuth), {
948
+ const n = u, o = g, v = re(), l = C(() => !!v.OAuth), {
949
949
  appsData: r
950
- } = M(), e = C(() => r.value.authMethods), h = C(() => {
951
- const p = [];
952
- return (e.value.login.emailPassword || e.value.login.phonePassword) && p.push({
950
+ } = H(), e = C(() => r.value.authMethods), h = C(() => {
951
+ const m = [];
952
+ return (e.value.login.emailPassword || e.value.login.phonePassword) && m.push({
953
953
  key: "password",
954
954
  title: e.value.login.phonePassword ? "邮箱/手机号密码登录" : "邮箱密码登录"
955
- }), e.value.login.phoneCode && p.push({
955
+ }), e.value.login.phoneCode && m.push({
956
956
  key: "phoneCode",
957
957
  title: "手机验证码登录"
958
- }), e.value.login.emailCode && p.push({
958
+ }), e.value.login.emailCode && m.push({
959
959
  key: "emailCode",
960
960
  title: "邮箱验证码登录"
961
- }), p;
961
+ }), m;
962
962
  }), i = S("password");
963
963
  ee(() => {
964
- var p;
965
- h.value.some((_) => _.key === i.value) || (i.value = ((p = h.value[0]) == null ? void 0 : p.key) || "password");
964
+ var m;
965
+ h.value.some((_) => _.key === i.value) || (i.value = ((m = h.value[0]) == null ? void 0 : m.key) || "password");
966
966
  });
967
- function d() {
968
- a("switchSignUp");
967
+ function p() {
968
+ n("switchSignUp");
969
969
  }
970
- function m() {
971
- a("switchResetPassword");
970
+ function c() {
971
+ n("switchResetPassword");
972
972
  }
973
- async function n(p) {
974
- a("submit", {
973
+ async function a(m) {
974
+ n("submit", {
975
975
  method: i.value === "password" ? "password" : "code",
976
- ...p
976
+ ...m
977
977
  });
978
978
  }
979
- return (p, _) => (c(), b("div", pt, [h.value.length > 1 ? (c(), b("div", mt, [s(t(oe), {
979
+ return (m, _) => (d(), b("div", pt, [h.value.length > 1 ? (d(), b("div", mt, [s(t(oe), {
980
980
  "active-key": i.value,
981
981
  "onUpdate:activeKey": _[0] || (_[0] = (w) => i.value = w)
982
982
  }, {
983
- default: f(() => [(c(!0), b(G, null, te(h.value, (w) => (c(), k(t(se), {
983
+ default: f(() => [(d(!0), b(G, null, te(h.value, (w) => (d(), k(t(se), {
984
984
  key: w.key,
985
985
  title: w.title
986
986
  }, null, 8, ["title"]))), 128))]),
@@ -990,28 +990,28 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
990
990
  style: {
991
991
  margin: "0"
992
992
  }
993
- })])) : I("", !0), i.value === "password" && (e.value.login.emailPassword || e.value.login.phonePassword) ? (c(), k(Ye, {
993
+ })])) : I("", !0), i.value === "password" && (e.value.login.emailPassword || e.value.login.phonePassword) ? (d(), k(Ye, {
994
994
  key: 1,
995
995
  loading: o.loading,
996
996
  size: o.size,
997
997
  "allow-phone": e.value.login.phonePassword,
998
- onSubmit: n
999
- }, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (c(), k(lt, {
998
+ onSubmit: a
999
+ }, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (d(), k(lt, {
1000
1000
  key: 2,
1001
1001
  loading: o.loading,
1002
1002
  size: o.size,
1003
- onSubmit: n
1004
- }, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (c(), k(ct, {
1003
+ onSubmit: a
1004
+ }, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (d(), k(ct, {
1005
1005
  key: 3,
1006
1006
  loading: o.loading,
1007
1007
  size: o.size,
1008
- onSubmit: n
1009
- }, null, 8, ["loading", "size"])) : I("", !0), l.value ? N(p.$slots, "OAuth", {
1008
+ onSubmit: a
1009
+ }, null, 8, ["loading", "size"])) : I("", !0), l.value ? N(m.$slots, "OAuth", {
1010
1010
  key: 4
1011
1011
  }, void 0, !0) : I("", !0), s(ce, {
1012
1012
  "show-sign-up": e.value.signUp.email || e.value.signUp.phone,
1013
- onSwitchSignUp: d,
1014
- onSwitchResetPassword: m
1013
+ onSwitchSignUp: p,
1014
+ onSwitchResetPassword: c
1015
1015
  }, null, 8, ["show-sign-up"])]));
1016
1016
  }
1017
1017
  }), vt = /* @__PURE__ */ P(ft, [["__scopeId", "data-v-08b42828"]]), gt = {
@@ -1044,7 +1044,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1044
1044
  setup(g, {
1045
1045
  emit: u
1046
1046
  }) {
1047
- const a = u, o = g, v = S(), l = S(!1), r = S(), e = S({
1047
+ const n = u, o = g, v = S(), l = S(!1), r = S(), e = S({
1048
1048
  phone: void 0,
1049
1049
  code: void 0,
1050
1050
  password: void 0,
@@ -1054,28 +1054,28 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1054
1054
  required: !0,
1055
1055
  message: "请输入确认密码"
1056
1056
  }, {
1057
- validator: (n, p) => {
1058
- e.value.password && n !== e.value.password ? p("两次密码输入不一致") : p();
1057
+ validator: (a, m) => {
1058
+ e.value.password && a !== e.value.password ? m("两次密码输入不一致") : m();
1059
1059
  }
1060
1060
  }];
1061
1061
  function i() {
1062
- a("switchSignIn");
1062
+ n("switchSignIn");
1063
1063
  }
1064
- async function d() {
1064
+ async function p() {
1065
1065
  if (!await r.value.validateField(["phone"])) {
1066
1066
  l.value = !0;
1067
1067
  const {
1068
- error: p
1068
+ error: m
1069
1069
  } = await T.verify.sms.send.post({
1070
1070
  phone: e.value.phone,
1071
1071
  purpose: "signUp"
1072
1072
  });
1073
- l.value = !1, p || v.value.startCountFn();
1073
+ l.value = !1, m || v.value.startCountFn();
1074
1074
  }
1075
1075
  }
1076
- async function m() {
1077
- r.value.validate().then((n) => {
1078
- n || a("submit", {
1076
+ async function c() {
1077
+ r.value.validate().then((a) => {
1078
+ a || n("submit", {
1079
1079
  type: "phone",
1080
1080
  phone: e.value.phone,
1081
1081
  code: e.value.code,
@@ -1084,7 +1084,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1084
1084
  });
1085
1085
  });
1086
1086
  }
1087
- return (n, p) => (c(), b("div", gt, [y("div", ht, [s(t(L), {
1087
+ return (a, m) => (d(), b("div", gt, [y("div", ht, [s(t(x), {
1088
1088
  ref_key: "formRef",
1089
1089
  ref: r,
1090
1090
  model: e.value,
@@ -1105,7 +1105,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1105
1105
  }, {
1106
1106
  default: f(() => [s(t(V), {
1107
1107
  modelValue: e.value.phone,
1108
- "onUpdate:modelValue": p[0] || (p[0] = (_) => e.value.phone = _),
1108
+ "onUpdate:modelValue": m[0] || (m[0] = (_) => e.value.phone = _),
1109
1109
  placeholder: "请输入手机号",
1110
1110
  autocomplete: "tel",
1111
1111
  type: "tel"
@@ -1122,7 +1122,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1122
1122
  }, {
1123
1123
  default: f(() => [y("div", yt, [s(t(V), {
1124
1124
  modelValue: e.value.code,
1125
- "onUpdate:modelValue": p[1] || (p[1] = (_) => e.value.code = _),
1125
+ "onUpdate:modelValue": m[1] || (m[1] = (_) => e.value.code = _),
1126
1126
  placeholder: "请输入验证码",
1127
1127
  autocomplete: "one-time-code"
1128
1128
  }, null, 8, ["modelValue"]), s(D, {
@@ -1133,10 +1133,10 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1133
1133
  style: {
1134
1134
  "margin-left": "10px"
1135
1135
  },
1136
- onSend: d
1136
+ onSend: p
1137
1137
  }, null, 8, ["size", "loading"])])]),
1138
1138
  _: 1
1139
- }), o.requirePassword ? (c(), k(t(A), {
1139
+ }), o.requirePassword ? (d(), k(t(A), {
1140
1140
  key: 0,
1141
1141
  field: "password",
1142
1142
  label: "密码",
@@ -1151,13 +1151,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1151
1151
  }, {
1152
1152
  default: f(() => [s(t(V), {
1153
1153
  modelValue: e.value.password,
1154
- "onUpdate:modelValue": p[2] || (p[2] = (_) => e.value.password = _),
1154
+ "onUpdate:modelValue": m[2] || (m[2] = (_) => e.value.password = _),
1155
1155
  placeholder: "请输入密码(可选)",
1156
1156
  type: "password",
1157
1157
  autocomplete: "new-password"
1158
1158
  }, null, 8, ["modelValue"])]),
1159
1159
  _: 1
1160
- }, 8, ["rules"])) : I("", !0), o.requirePassword && e.value.password ? (c(), k(t(A), {
1160
+ }, 8, ["rules"])) : I("", !0), o.requirePassword && e.value.password ? (d(), k(t(A), {
1161
1161
  key: 1,
1162
1162
  field: "confirmPassword",
1163
1163
  label: "确认密码",
@@ -1166,7 +1166,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1166
1166
  }, {
1167
1167
  default: f(() => [s(t(V), {
1168
1168
  modelValue: e.value.confirmPassword,
1169
- "onUpdate:modelValue": p[3] || (p[3] = (_) => e.value.confirmPassword = _),
1169
+ "onUpdate:modelValue": m[3] || (m[3] = (_) => e.value.confirmPassword = _),
1170
1170
  placeholder: "请输入确认密码",
1171
1171
  type: "password",
1172
1172
  autocomplete: "new-password"
@@ -1182,7 +1182,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1182
1182
  }, {
1183
1183
  default: f(() => [s(t(V), {
1184
1184
  modelValue: e.value.referrerId,
1185
- "onUpdate:modelValue": p[4] || (p[4] = (_) => e.value.referrerId = _),
1185
+ "onUpdate:modelValue": m[4] || (m[4] = (_) => e.value.referrerId = _),
1186
1186
  placeholder: "邀请人ID(可选)",
1187
1187
  autocomplete: "off"
1188
1188
  }, null, 8, ["modelValue"])]),
@@ -1192,9 +1192,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1192
1192
  loading: o.loading,
1193
1193
  long: "",
1194
1194
  size: o.size,
1195
- onClick: m
1195
+ onClick: c
1196
1196
  }, {
1197
- default: f(() => [...p[5] || (p[5] = [$(" 注册 ", -1)])]),
1197
+ default: f(() => [...m[5] || (m[5] = [$(" 注册 ", -1)])]),
1198
1198
  _: 1
1199
1199
  }, 8, ["loading", "size"])])]),
1200
1200
  _: 1
@@ -1227,38 +1227,38 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1227
1227
  setup(g, {
1228
1228
  emit: u
1229
1229
  }) {
1230
- const a = u, o = g, {
1230
+ const n = u, o = g, {
1231
1231
  appsData: v
1232
- } = M(), l = C(() => v.value.authMethods), r = C(() => {
1233
- const d = [];
1234
- return l.value.signUp.email && d.push({
1232
+ } = H(), l = C(() => v.value.authMethods), r = C(() => {
1233
+ const p = [];
1234
+ return l.value.signUp.email && p.push({
1235
1235
  key: "email",
1236
1236
  title: "邮箱注册"
1237
- }), l.value.signUp.phone && d.push({
1237
+ }), l.value.signUp.phone && p.push({
1238
1238
  key: "phone",
1239
1239
  title: "手机号注册"
1240
- }), d;
1240
+ }), p;
1241
1241
  }), e = S("email");
1242
1242
  ee(() => {
1243
- var d;
1244
- r.value.some((m) => m.key === e.value) || (e.value = ((d = r.value[0]) == null ? void 0 : d.key) || "email");
1243
+ var p;
1244
+ r.value.some((c) => c.key === e.value) || (e.value = ((p = r.value[0]) == null ? void 0 : p.key) || "email");
1245
1245
  });
1246
1246
  function h() {
1247
- a("switchSignIn");
1247
+ n("switchSignIn");
1248
1248
  }
1249
- async function i(d) {
1250
- a("submit", {
1249
+ async function i(p) {
1250
+ n("submit", {
1251
1251
  type: e.value,
1252
- ...d
1252
+ ...p
1253
1253
  });
1254
1254
  }
1255
- return (d, m) => (c(), b("div", St, [r.value.length > 1 ? (c(), b("div", kt, [s(t(oe), {
1255
+ return (p, c) => (d(), b("div", St, [r.value.length > 1 ? (d(), b("div", kt, [s(t(oe), {
1256
1256
  "active-key": e.value,
1257
- "onUpdate:activeKey": m[0] || (m[0] = (n) => e.value = n)
1257
+ "onUpdate:activeKey": c[0] || (c[0] = (a) => e.value = a)
1258
1258
  }, {
1259
- default: f(() => [(c(!0), b(G, null, te(r.value, (n) => (c(), k(t(se), {
1260
- key: n.key,
1261
- title: n.title
1259
+ default: f(() => [(d(!0), b(G, null, te(r.value, (a) => (d(), k(t(se), {
1260
+ key: a.key,
1261
+ title: a.title
1262
1262
  }, null, 8, ["title"]))), 128))]),
1263
1263
  _: 1
1264
1264
  }, 8, ["active-key"]), s(t(ae), {
@@ -1266,18 +1266,18 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1266
1266
  style: {
1267
1267
  margin: "0"
1268
1268
  }
1269
- })])) : I("", !0), e.value === "email" && l.value.signUp.email ? (c(), k(we, {
1269
+ })])) : I("", !0), e.value === "email" && l.value.signUp.email ? (d(), k(we, {
1270
1270
  key: 1,
1271
1271
  size: o.size,
1272
1272
  loading: g.loading,
1273
1273
  onSubmit: i
1274
- }, null, 8, ["size", "loading"])) : e.value === "phone" && l.value.signUp.phone ? (c(), k(bt, {
1274
+ }, null, 8, ["size", "loading"])) : e.value === "phone" && l.value.signUp.phone ? (d(), k(bt, {
1275
1275
  key: 2,
1276
1276
  size: o.size,
1277
1277
  loading: g.loading,
1278
1278
  onSubmit: i,
1279
1279
  onSwitchSignIn: h
1280
- }, null, 8, ["size", "loading"])) : (c(), b("div", It, " 当前应用未开放用户注册 ")), e.value === "email" ? (c(), k(ne, {
1280
+ }, null, 8, ["size", "loading"])) : (d(), b("div", It, " 当前应用未开放用户注册 ")), e.value === "email" ? (d(), k(ne, {
1281
1281
  key: 4,
1282
1282
  onSwitchSignIn: h
1283
1283
  })) : I("", !0)]));
@@ -1302,23 +1302,23 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1302
1302
  }
1303
1303
  },
1304
1304
  setup(g) {
1305
- const u = g, a = `${u.size}px`, o = `${u.fontSize}px`, v = `${u.lineHeight}px`, {
1305
+ const u = g, n = `${u.size}px`, o = `${u.fontSize}px`, v = `${u.lineHeight}px`, {
1306
1306
  currentView: l
1307
- } = H(), {
1307
+ } = F(), {
1308
1308
  appsData: r
1309
- } = M(), e = C(() => l.value === "signIn" ? `${r.value.name}登录` : l.value === "signUp" ? `${r.value.name}账号注册` : l.value === "resetPassword" ? `${r.value.name}密码重置` : "");
1310
- return (h, i) => (c(), b("div", {
1309
+ } = H(), e = C(() => l.value === "signIn" ? `${r.value.name}登录` : l.value === "signUp" ? `${r.value.name}账号注册` : l.value === "resetPassword" ? `${r.value.name}密码重置` : "");
1310
+ return (h, i) => (d(), b("div", {
1311
1311
  class: "Title",
1312
1312
  style: Q({
1313
1313
  fontSize: o,
1314
1314
  lineHeight: v
1315
1315
  })
1316
- }, [t(r).applicationLogoUrl ? (c(), b("img", {
1316
+ }, [t(r).applicationLogoUrl ? (d(), b("img", {
1317
1317
  key: 0,
1318
1318
  src: t(r).applicationLogoUrl,
1319
1319
  srcset: "",
1320
1320
  style: Q({
1321
- width: a
1321
+ width: n
1322
1322
  })
1323
1323
  }, null, 12, At)) : I("", !0), y("span", null, O(e.value), 1), N(h.$slots, "default", {}, void 0, !0)], 4));
1324
1324
  }
@@ -1342,60 +1342,58 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1342
1342
  setup(g, {
1343
1343
  emit: u
1344
1344
  }) {
1345
- const a = g, o = u, {
1345
+ const n = g, o = u, {
1346
1346
  signInSubmit: v,
1347
1347
  signUpSubmit: l,
1348
1348
  resetPasswordSubmit: r,
1349
1349
  currentView: e,
1350
1350
  authSignInLoading: h,
1351
1351
  authSignUpLoading: i,
1352
- resetPasswordLoading: d,
1353
- switchSignUp: m,
1354
- switchResetPassword: n,
1355
- switchSignIn: p
1356
- } = H(), {
1357
- appsAuthPageInfoApi: _
1358
- } = M();
1359
- function w() {
1352
+ resetPasswordLoading: p,
1353
+ switchSignUp: c,
1354
+ switchResetPassword: a,
1355
+ switchSignIn: m
1356
+ } = F();
1357
+ function _() {
1360
1358
  o("toPrivacyPolicy");
1361
1359
  }
1362
- function U() {
1360
+ function w() {
1363
1361
  o("toUserServiceAgreement");
1364
1362
  }
1365
- return _(), (x, R) => (c(), b("div", Ut, [g.showTitle ? (c(), k(pe, {
1363
+ return (U, R) => (d(), b("div", Ut, [g.showTitle ? (d(), k(pe, {
1366
1364
  key: 0,
1367
1365
  size: 32,
1368
1366
  "font-size": 20
1369
- })) : I("", !0), y("div", $t, [t(e) === "signIn" ? (c(), k(vt, {
1367
+ })) : I("", !0), y("div", $t, [t(e) === "signIn" ? (d(), k(vt, {
1370
1368
  key: 0,
1371
- size: a.size,
1369
+ size: n.size,
1372
1370
  loading: t(h),
1373
- onSwitchSignUp: t(m),
1374
- onSwitchResetPassword: t(n),
1371
+ onSwitchSignUp: t(c),
1372
+ onSwitchResetPassword: t(a),
1375
1373
  onSubmit: R[0] || (R[0] = (q) => t(v)(q))
1376
1374
  }, {
1377
1375
  OAuth: f(() => [s(Ve, {
1378
- size: a.size
1376
+ size: n.size
1379
1377
  }, null, 8, ["size"])]),
1380
1378
  _: 1
1381
- }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : t(e) === "signUp" ? (c(), k(Pt, {
1379
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : t(e) === "signUp" ? (d(), k(Pt, {
1382
1380
  key: 1,
1383
- size: a.size,
1381
+ size: n.size,
1384
1382
  loading: t(i),
1385
- onSwitchSignIn: t(p),
1383
+ onSwitchSignIn: t(m),
1386
1384
  onSubmit: R[1] || (R[1] = (q) => t(l)(q))
1387
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : t(e) === "resetPassword" ? (c(), k(Ge, {
1385
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : t(e) === "resetPassword" ? (d(), k(Ge, {
1388
1386
  key: 2,
1389
- size: a.size,
1390
- loading: t(d),
1391
- onSwitchSignIn: t(p),
1387
+ size: n.size,
1388
+ loading: t(p),
1389
+ onSwitchSignIn: t(m),
1392
1390
  onSubmit: R[2] || (R[2] = (q) => t(r)(q))
1393
1391
  }, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0), s(We, {
1394
- onToPrivacyPolicy: w,
1395
- onToUserServiceAgreement: U
1392
+ onToPrivacyPolicy: _,
1393
+ onToUserServiceAgreement: w
1396
1394
  })])]));
1397
1395
  }
1398
- }), Rt = /* @__PURE__ */ P(Ct, [["__scopeId", "data-v-99ccec1c"]]), qt = /* @__PURE__ */ z({
1396
+ }), Rt = /* @__PURE__ */ P(Ct, [["__scopeId", "data-v-859909ca"]]), qt = /* @__PURE__ */ z({
1399
1397
  __name: "AuthkitAuthModal",
1400
1398
  props: {
1401
1399
  size: {
@@ -1406,9 +1404,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1406
1404
  setup(g, {
1407
1405
  emit: u
1408
1406
  }) {
1409
- const a = u, {
1407
+ const n = u, {
1410
1408
  onSignIn: o
1411
- } = H(), {
1409
+ } = F(), {
1412
1410
  isOpen: v,
1413
1411
  close: l
1414
1412
  } = ge();
@@ -1422,9 +1420,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1422
1420
  i || l();
1423
1421
  }
1424
1422
  function h() {
1425
- l(), a("close");
1423
+ l(), n("close");
1426
1424
  }
1427
- return (i, d) => (c(), k(t(fe), {
1425
+ return (i, p) => (d(), k(t(fe), {
1428
1426
  visible: t(v),
1429
1427
  footer: !1,
1430
1428
  "mask-closable": !1,
@@ -1439,8 +1437,8 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1439
1437
  default: f(() => [s(Rt, {
1440
1438
  "show-title": !1,
1441
1439
  size: g.size,
1442
- onToPrivacyPolicy: d[0] || (d[0] = (m) => a("toPrivacyPolicy")),
1443
- onToUserServiceAgreement: d[1] || (d[1] = (m) => a("toUserServiceAgreement"))
1440
+ onToPrivacyPolicy: p[0] || (p[0] = (c) => n("toPrivacyPolicy")),
1441
+ onToUserServiceAgreement: p[1] || (p[1] = (c) => n("toUserServiceAgreement"))
1444
1442
  }, null, 8, ["size"])]),
1445
1443
  _: 1
1446
1444
  }, 8, ["visible"]));
@@ -1461,33 +1459,33 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1461
1459
  }
1462
1460
  },
1463
1461
  setup(g) {
1464
- const u = g, a = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
1462
+ const u = g, n = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
1465
1463
  completeSignIn: o
1466
- } = H(), {
1464
+ } = F(), {
1467
1465
  fetchUserProfile: v
1468
1466
  } = J();
1469
1467
  function l(i) {
1470
- return a.some((d) => i.searchParams.has(d));
1468
+ return n.some((p) => i.searchParams.has(p));
1471
1469
  }
1472
1470
  function r(i) {
1473
- a.forEach((m) => i.searchParams.delete(m));
1474
- const d = `${i.pathname}${i.search}${i.hash}`;
1475
- window.history.replaceState({}, "", d);
1471
+ n.forEach((c) => i.searchParams.delete(c));
1472
+ const p = `${i.pathname}${i.search}${i.hash}`;
1473
+ window.history.replaceState({}, "", p);
1476
1474
  }
1477
1475
  function e() {
1478
1476
  if (!u.restoreRedirectAfterSignIn) return null;
1479
1477
  const i = sessionStorage.getItem("auth_redirect");
1480
1478
  if (sessionStorage.removeItem("auth_redirect"), !i) return null;
1481
- const d = window.location.pathname + window.location.search + window.location.hash;
1482
- return i === d ? null : i;
1479
+ const p = window.location.pathname + window.location.search + window.location.hash;
1480
+ return i === p ? null : i;
1483
1481
  }
1484
1482
  async function h() {
1485
1483
  if (typeof window > "u") return;
1486
1484
  const i = new URL(window.location.href);
1487
1485
  if (!l(i)) return;
1488
- const d = i.searchParams.get("error");
1489
- if (d) {
1490
- r(i), Z.error(d);
1486
+ const p = i.searchParams.get("error");
1487
+ if (p) {
1488
+ r(i), Z.error(p);
1491
1489
  return;
1492
1490
  }
1493
1491
  if (i.searchParams.get("bindSuccess") === "true") {
@@ -1495,13 +1493,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1495
1493
  r(i), await v(), Z.success(U ? `${U} 绑定成功` : "绑定成功"), u.closePopupOnBindSuccess && window.opener && setTimeout(() => window.close(), 800);
1496
1494
  return;
1497
1495
  }
1498
- const m = i.searchParams.get("token");
1499
- if (!m) return;
1500
- const n = i.searchParams.get("userId"), p = i.searchParams.get("appId"), _ = i.searchParams.get("needBindIdentity") === "true";
1496
+ const c = i.searchParams.get("token");
1497
+ if (!c) return;
1498
+ const a = i.searchParams.get("userId"), m = i.searchParams.get("appId"), _ = i.searchParams.get("needBindIdentity") === "true";
1501
1499
  if (r(i), o({
1502
- jwtToken: m,
1503
- userId: n,
1504
- appId: p,
1500
+ jwtToken: c,
1501
+ userId: a,
1502
+ appId: m,
1505
1503
  needBindIdentity: _
1506
1504
  }), await v(), _ && u.bindIdentityRedirect) {
1507
1505
  window.location.href = u.bindIdentityRedirect;
@@ -1512,7 +1510,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1512
1510
  }
1513
1511
  return j(() => {
1514
1512
  h();
1515
- }), (i, d) => null;
1513
+ }), (i, p) => null;
1516
1514
  }
1517
1515
  }), Pi = /* @__PURE__ */ z({
1518
1516
  __name: "AuthkitProvider",
@@ -1553,32 +1551,33 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1553
1551
  setup(g, {
1554
1552
  emit: u
1555
1553
  }) {
1556
- const a = g, o = u;
1557
- a.config && he(a.config);
1554
+ const n = g, o = u;
1555
+ n.config && he(n.config);
1558
1556
  const {
1559
1557
  restoreSession: v,
1560
1558
  onSignIn: l
1561
- } = H(), {
1562
- fetchUserProfile: r
1559
+ } = F(), {
1560
+ fetchUserProfile: r,
1561
+ clearUserProfile: e
1563
1562
  } = J(), {
1564
- appsAuthPageInfoApi: e
1565
- } = M(), h = l(() => {
1563
+ appsAuthPageInfoApi: h
1564
+ } = H(), i = l(() => {
1566
1565
  r();
1567
1566
  });
1568
1567
  return j(async () => {
1569
- a.fetchAppInfo && await e(), a.restoreSession && v() && r();
1568
+ n.fetchAppInfo && await h(), n.restoreSession && v() ? r() : e();
1570
1569
  }), ie(() => {
1571
- h();
1572
- }), (i, d) => (c(), b(G, null, [N(i.$slots, "default"), a.handleOAuthCallback ? (c(), k(Tt, {
1570
+ i();
1571
+ }), (p, c) => (d(), b(G, null, [N(p.$slots, "default"), n.handleOAuthCallback ? (d(), k(Tt, {
1573
1572
  key: 0,
1574
- "bind-identity-redirect": a.bindIdentityRedirect,
1575
- "close-popup-on-bind-success": a.closePopupOnBindSuccess,
1576
- "restore-redirect-after-sign-in": a.restoreRedirectAfterSignIn
1577
- }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), a.showAuthModal ? (c(), k(Bt, {
1573
+ "bind-identity-redirect": n.bindIdentityRedirect,
1574
+ "close-popup-on-bind-success": n.closePopupOnBindSuccess,
1575
+ "restore-redirect-after-sign-in": n.restoreRedirectAfterSignIn
1576
+ }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), n.showAuthModal ? (d(), k(Bt, {
1578
1577
  key: 1,
1579
- size: a.authModalSize,
1580
- onToPrivacyPolicy: d[0] || (d[0] = (m) => o("toPrivacyPolicy")),
1581
- onToUserServiceAgreement: d[1] || (d[1] = (m) => o("toUserServiceAgreement"))
1578
+ size: n.authModalSize,
1579
+ onToPrivacyPolicy: c[0] || (c[0] = (a) => o("toPrivacyPolicy")),
1580
+ onToUserServiceAgreement: c[1] || (c[1] = (a) => o("toUserServiceAgreement"))
1582
1581
  }, null, 8, ["size"])) : I("", !0)], 64));
1583
1582
  }
1584
1583
  }), Ot = {
@@ -1628,15 +1627,15 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1628
1627
  }
1629
1628
  },
1630
1629
  setup(g) {
1631
- const u = g, a = C(() => u.backgroundType === "color" ? {
1630
+ const u = g, n = C(() => u.backgroundType === "color" ? {
1632
1631
  backgroundColor: u.backgroundColor
1633
1632
  } : {
1634
1633
  backgroundImage: `url(${u.backgroundImage})`
1635
1634
  });
1636
- return (o, v) => (c(), b("div", {
1635
+ return (o, v) => (d(), b("div", {
1637
1636
  class: "auth",
1638
- style: Q(a.value)
1639
- }, [y("div", Ot, [u.name ? (c(), b("a", {
1637
+ style: Q(n.value)
1638
+ }, [y("div", Ot, [u.name ? (d(), b("a", {
1640
1639
  key: 0,
1641
1640
  href: u.appHomePage,
1642
1641
  target: "_self",
@@ -1708,7 +1707,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1708
1707
  }
1709
1708
  },
1710
1709
  setup(g) {
1711
- const u = S(!1), a = g, o = S({
1710
+ const u = S(!1), n = g, o = S({
1712
1711
  appKey: "",
1713
1712
  name: "",
1714
1713
  homePageUrl: "",
@@ -1719,7 +1718,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1719
1718
  const {
1720
1719
  data: r
1721
1720
  } = await T.apps.findOne.post({
1722
- id: a.clientId
1721
+ id: n.clientId
1723
1722
  });
1724
1723
  r && (o.value = r);
1725
1724
  }
@@ -1729,27 +1728,27 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1729
1728
  const {
1730
1729
  data: r
1731
1730
  } = await T.oauth2.authorize.post({
1732
- client_id: a.clientId,
1733
- response_type: a.responseType,
1734
- scope: a.scope,
1735
- state: a.state,
1736
- redirect_uri: a.redirectUri
1731
+ client_id: n.clientId,
1732
+ response_type: n.responseType,
1733
+ scope: n.scope,
1734
+ state: n.state,
1735
+ redirect_uri: n.redirectUri
1737
1736
  });
1738
1737
  u.value = !1, r && (window.location = r.authorizeUrl);
1739
1738
  }
1740
- return (r, e) => (c(), b("div", Ft, [y("div", Ht, O(`授权 ${o.value.name}`), 1), y("div", Dt, [s(t(ve), null, {
1739
+ return (r, e) => (d(), b("div", Ft, [y("div", Ht, O(`授权 ${o.value.name}`), 1), y("div", Dt, [s(t(ve), null, {
1741
1740
  default: f(() => [s(t(X), null, {
1742
1741
  default: f(() => {
1743
1742
  var h;
1744
1743
  return [s(t(Y), {
1745
1744
  title: o.value.name,
1746
- description: `想要使用您的${(h = a.userInfo) == null ? void 0 : h.nickname}账户`
1745
+ description: `想要使用您的${(h = n.userInfo) == null ? void 0 : h.nickname}账户`
1747
1746
  }, {
1748
1747
  avatar: f(() => {
1749
1748
  var i;
1750
1749
  return [s(t(E), {
1751
1750
  shape: "square",
1752
- "image-url": (i = a.userInfo) == null ? void 0 : i.avatar
1751
+ "image-url": (i = n.userInfo) == null ? void 0 : i.avatar
1753
1752
  }, null, 8, ["image-url"])];
1754
1753
  }),
1755
1754
  _: 1
@@ -1794,7 +1793,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1794
1793
  _: 1
1795
1794
  }), s(t(B), {
1796
1795
  type: "primary",
1797
- size: a.size,
1796
+ size: n.size,
1798
1797
  loading: u.value,
1799
1798
  onClick: l
1800
1799
  }, {
@@ -1826,25 +1825,25 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1826
1825
  setup(g, {
1827
1826
  emit: u
1828
1827
  }) {
1829
- const a = g, o = u, v = S(!0), l = S(""), r = S("登录成功,正在跳转..."), {
1828
+ const n = g, o = u, v = S(!0), l = S(""), r = S("登录成功,正在跳转..."), {
1830
1829
  completeSignIn: e,
1831
1830
  restoreSession: h
1832
- } = H(), {
1831
+ } = F(), {
1833
1832
  fetchUserProfile: i
1834
1833
  } = J();
1835
- async function d() {
1836
- const n = new URLSearchParams(window.location.search), p = n.get("error");
1837
- if (p) {
1838
- l.value = p, v.value = !1, o("error", l.value);
1834
+ async function p() {
1835
+ const a = new URLSearchParams(window.location.search), m = a.get("error");
1836
+ if (m) {
1837
+ l.value = m, v.value = !1, o("error", l.value);
1839
1838
  return;
1840
1839
  }
1841
- if (n.get("bindSuccess") === "true") {
1840
+ if (a.get("bindSuccess") === "true") {
1842
1841
  r.value = "绑定成功,可以关闭此页面", window.history.replaceState({}, "", window.location.pathname), v.value = !1, setTimeout(() => {
1843
1842
  window.close();
1844
1843
  }, 800);
1845
1844
  return;
1846
1845
  }
1847
- const _ = n.get("token"), w = n.get("userId"), U = n.get("appId"), x = n.get("needBindIdentity") === "true";
1846
+ const _ = a.get("token"), w = a.get("userId"), U = a.get("appId"), R = a.get("needBindIdentity") === "true";
1848
1847
  if (!_) {
1849
1848
  l.value = "登录失败:未收到认证令牌", v.value = !1, o("error", l.value);
1850
1849
  return;
@@ -1854,16 +1853,16 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1854
1853
  jwtToken: _,
1855
1854
  userId: w,
1856
1855
  appId: U,
1857
- needBindIdentity: x
1856
+ needBindIdentity: R
1858
1857
  }), await i();
1859
- const R = window.location.pathname;
1860
- if (window.history.replaceState({}, "", R), x && (o("needBindIdentity", {
1858
+ const q = window.location.pathname;
1859
+ if (window.history.replaceState({}, "", q), R && (o("needBindIdentity", {
1861
1860
  token: _,
1862
1861
  userId: w || "",
1863
1862
  appId: U || ""
1864
- }), a.bindIdentityRedirect)) {
1863
+ }), n.bindIdentityRedirect)) {
1865
1864
  v.value = !1, setTimeout(() => {
1866
- window.location.href = a.bindIdentityRedirect;
1865
+ window.location.href = n.bindIdentityRedirect;
1867
1866
  }, 300);
1868
1867
  return;
1869
1868
  }
@@ -1871,39 +1870,39 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1871
1870
  token: _,
1872
1871
  userId: w || "",
1873
1872
  appId: U || "",
1874
- needBindIdentity: x
1873
+ needBindIdentity: R
1875
1874
  });
1876
- const q = sessionStorage.getItem("auth_redirect");
1875
+ const L = sessionStorage.getItem("auth_redirect");
1877
1876
  sessionStorage.removeItem("auth_redirect");
1878
- const K = q || a.defaultRedirect || "/";
1877
+ const K = L || n.defaultRedirect || "/";
1879
1878
  v.value = !1, setTimeout(() => {
1880
1879
  window.location.href = K;
1881
1880
  }, 500);
1882
- } catch (R) {
1883
- console.error("OAuth 回调处理失败:", R), l.value = "登录处理失败,请重试", v.value = !1, o("error", l.value);
1881
+ } catch (q) {
1882
+ console.error("OAuth 回调处理失败:", q), l.value = "登录处理失败,请重试", v.value = !1, o("error", l.value);
1884
1883
  }
1885
1884
  }
1886
- function m() {
1887
- const n = sessionStorage.getItem("auth_redirect");
1888
- sessionStorage.removeItem("auth_redirect"), window.location.href = n || a.defaultRedirect || "/";
1885
+ function c() {
1886
+ const a = sessionStorage.getItem("auth_redirect");
1887
+ sessionStorage.removeItem("auth_redirect"), window.location.href = a || n.defaultRedirect || "/";
1889
1888
  }
1890
1889
  return j(() => {
1891
- const n = new URLSearchParams(window.location.search);
1892
- if (n.has("token") || n.has("error") || n.has("bindSuccess"))
1893
- d();
1890
+ const a = new URLSearchParams(window.location.search);
1891
+ if (a.has("token") || a.has("error") || a.has("bindSuccess"))
1892
+ p();
1894
1893
  else if (h()) {
1895
- const p = sessionStorage.getItem("auth_redirect");
1896
- sessionStorage.removeItem("auth_redirect"), window.location.href = p || a.defaultRedirect || "/";
1894
+ const m = sessionStorage.getItem("auth_redirect");
1895
+ sessionStorage.removeItem("auth_redirect"), window.location.href = m || n.defaultRedirect || "/";
1897
1896
  } else
1898
1897
  l.value = "无效的访问", v.value = !1;
1899
- }), (n, p) => (c(), b("div", jt, [v.value ? (c(), b("div", Kt, [p[0] || (p[0] = y("div", {
1898
+ }), (a, m) => (d(), b("div", jt, [v.value ? (d(), b("div", Kt, [m[0] || (m[0] = y("div", {
1900
1899
  class: "spinner"
1901
- }, null, -1)), y("p", null, O(g.loadingText), 1)])) : l.value ? (c(), b("div", Wt, [p[1] || (p[1] = y("div", {
1900
+ }, null, -1)), y("p", null, O(g.loadingText), 1)])) : l.value ? (d(), b("div", Wt, [m[1] || (m[1] = y("div", {
1902
1901
  class: "error-icon"
1903
- }, "✕", -1)), p[2] || (p[2] = y("h2", null, "登录失败", -1)), y("p", null, O(l.value), 1), y("button", {
1902
+ }, "✕", -1)), m[2] || (m[2] = y("h2", null, "登录失败", -1)), y("p", null, O(l.value), 1), y("button", {
1904
1903
  class: "retry-btn",
1905
- onClick: m
1906
- }, "返回重试")])) : (c(), b("div", Qt, [p[3] || (p[3] = y("div", {
1904
+ onClick: c
1905
+ }, "返回重试")])) : (d(), b("div", Qt, [m[3] || (m[3] = y("div", {
1907
1906
  class: "success-icon"
1908
1907
  }, "✓", -1)), y("p", null, O(r.value), 1)]))]));
1909
1908
  }
@@ -1940,7 +1939,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1940
1939
  setup(g, {
1941
1940
  emit: u
1942
1941
  }) {
1943
- const a = u, o = g, v = S(), l = S(!1), r = S(), e = S({
1942
+ const n = u, o = g, v = S(), l = S(!1), r = S(), e = S({
1944
1943
  email: void 0,
1945
1944
  userToken: void 0,
1946
1945
  emailVerifyId: void 0
@@ -1949,33 +1948,33 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1949
1948
  if (!await r.value.validateField(["email"])) {
1950
1949
  l.value = !0;
1951
1950
  const {
1952
- data: n
1951
+ data: a
1953
1952
  } = await T.verify.email.retry.post({
1954
1953
  email: e.value.email,
1955
1954
  purpose: "bindEmail"
1956
1955
  });
1957
- l.value = !1, n && (e.value.emailVerifyId = n.emailVerifyId, v.value.startCountFn());
1956
+ l.value = !1, a && (e.value.emailVerifyId = a.emailVerifyId, v.value.startCountFn());
1958
1957
  }
1959
1958
  }
1960
1959
  async function i() {
1961
- r.value.validate().then((m) => {
1962
- m || a("submit", {
1960
+ r.value.validate().then((c) => {
1961
+ c || n("submit", {
1963
1962
  email: e.value.email,
1964
1963
  userToken: e.value.userToken,
1965
1964
  emailVerifyId: e.value.emailVerifyId
1966
1965
  });
1967
1966
  });
1968
1967
  }
1969
- function d() {
1970
- a("skip");
1968
+ function p() {
1969
+ n("skip");
1971
1970
  }
1972
- return (m, n) => (c(), b("div", Xt, [n[4] || (n[4] = y("div", {
1971
+ return (c, a) => (d(), b("div", Xt, [a[4] || (a[4] = y("div", {
1973
1972
  class: "header"
1974
1973
  }, [y("h3", {
1975
1974
  class: "title"
1976
1975
  }, "绑定邮箱"), y("p", {
1977
1976
  class: "subtitle"
1978
- }, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div", Yt, [s(t(L), {
1977
+ }, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div", Yt, [s(t(x), {
1979
1978
  ref_key: "formRef",
1980
1979
  ref: r,
1981
1980
  model: e.value,
@@ -1996,7 +1995,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
1996
1995
  }, {
1997
1996
  default: f(() => [s(t(V), {
1998
1997
  modelValue: e.value.email,
1999
- "onUpdate:modelValue": n[0] || (n[0] = (p) => e.value.email = p),
1998
+ "onUpdate:modelValue": a[0] || (a[0] = (m) => e.value.email = m),
2000
1999
  placeholder: "请输入邮箱",
2001
2000
  autocomplete: "email",
2002
2001
  type: "email"
@@ -2013,7 +2012,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
2013
2012
  }, {
2014
2013
  default: f(() => [y("div", Zt, [s(t(V), {
2015
2014
  modelValue: e.value.userToken,
2016
- "onUpdate:modelValue": n[1] || (n[1] = (p) => e.value.userToken = p),
2015
+ "onUpdate:modelValue": a[1] || (a[1] = (m) => e.value.userToken = m),
2017
2016
  placeholder: "请输入验证码",
2018
2017
  autocomplete: "one-time-code"
2019
2018
  }, null, 8, ["modelValue"]), s(D, {
@@ -2034,14 +2033,14 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
2034
2033
  size: o.size,
2035
2034
  onClick: i
2036
2035
  }, {
2037
- default: f(() => [...n[2] || (n[2] = [$(" 绑定邮箱 ", -1)])]),
2036
+ default: f(() => [...a[2] || (a[2] = [$(" 绑定邮箱 ", -1)])]),
2038
2037
  _: 1
2039
2038
  }, 8, ["loading", "size"])])]),
2040
2039
  _: 1
2041
- }, 8, ["model", "size"])]), o.showSkip ? (c(), b("div", ti, [s(t(F), {
2042
- onClick: d
2040
+ }, 8, ["model", "size"])]), o.showSkip ? (d(), b("div", ti, [s(t(M), {
2041
+ onClick: p
2043
2042
  }, {
2044
- default: f(() => [...n[3] || (n[3] = [$("稍后绑定", -1)])]),
2043
+ default: f(() => [...a[3] || (a[3] = [$("稍后绑定", -1)])]),
2045
2044
  _: 1
2046
2045
  })])) : I("", !0)]));
2047
2046
  }
@@ -2062,7 +2061,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
2062
2061
  setup(g) {
2063
2062
  const {
2064
2063
  userProfile: u,
2065
- fetchUserProfile: a
2064
+ fetchUserProfile: n
2066
2065
  } = J(), o = S("hidden"), v = S(!1);
2067
2066
  let l;
2068
2067
  const r = g, e = C(() => {
@@ -2074,7 +2073,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
2074
2073
  function i(_) {
2075
2074
  o.value = _;
2076
2075
  }
2077
- async function d() {
2076
+ async function p() {
2078
2077
  const _ = ye.appId;
2079
2078
  if (!_) {
2080
2079
  console.error("GitHub OAuth 失败: appId 未配置");
@@ -2094,60 +2093,60 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
2094
2093
  v.value = !0, window.open(U, "_blank");
2095
2094
  }
2096
2095
  }
2097
- async function m() {
2096
+ async function c() {
2098
2097
  const {
2099
2098
  error: _
2100
2099
  } = await T.users.unbind.oauth.post({
2101
2100
  provider: "github"
2102
2101
  });
2103
- _ || (Z.success("解绑成功"), o.value = "hidden", a());
2102
+ _ || (Z.success("解绑成功"), o.value = "hidden", n());
2104
2103
  }
2105
- function n() {
2106
- o.value === "bind" && (o.value = "hidden", d()), o.value === "unbind" && m();
2104
+ function a() {
2105
+ o.value === "bind" && (o.value = "hidden", p()), o.value === "unbind" && c();
2107
2106
  }
2108
- function p() {
2109
- v.value && a();
2107
+ function m() {
2108
+ v.value && n();
2110
2109
  }
2111
2110
  return j(() => {
2112
- u.value || a(), l = setInterval(p, 1e3);
2111
+ u.value || n(), l = setInterval(m, 1e3);
2113
2112
  }), ie(() => {
2114
2113
  l && clearInterval(l);
2115
2114
  }), (_, w) => {
2116
- var U, x, R;
2117
- return c(), b(G, null, [!((U = t(u)) != null && U.github) && o.value === "hidden" ? (c(), k(t(le), {
2115
+ var U, R, q;
2116
+ return d(), b(G, null, [!((U = t(u)) != null && U.github) && o.value === "hidden" ? (d(), k(t(le), {
2118
2117
  key: 0,
2119
2118
  title: "绑定GitHub"
2120
2119
  }, {
2121
2120
  action: f(() => [s(t(B), {
2122
2121
  size: r.size,
2123
2122
  type: "primary",
2124
- onClick: w[0] || (w[0] = (q) => i("bind"))
2123
+ onClick: w[0] || (w[0] = (L) => i("bind"))
2125
2124
  }, {
2126
2125
  default: f(() => [...w[2] || (w[2] = [$(" 绑定GitHub ", -1)])]),
2127
2126
  _: 1
2128
2127
  }, 8, ["size"])]),
2129
2128
  default: f(() => [w[3] || (w[3] = $(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2130
2129
  _: 1
2131
- })) : I("", !0), (x = t(u)) != null && x.github && o.value === "hidden" ? (c(), k(t(le), {
2130
+ })) : I("", !0), (R = t(u)) != null && R.github && o.value === "hidden" ? (d(), k(t(le), {
2132
2131
  key: 1,
2133
2132
  title: "解绑GitHub"
2134
2133
  }, {
2135
2134
  action: f(() => [s(t(B), {
2136
2135
  size: r.size,
2137
2136
  type: "primary",
2138
- onClick: w[1] || (w[1] = (q) => i("unbind"))
2137
+ onClick: w[1] || (w[1] = (L) => i("unbind"))
2139
2138
  }, {
2140
2139
  default: f(() => [...w[5] || (w[5] = [$(" 解绑GitHub ", -1)])]),
2141
2140
  _: 1
2142
2141
  }, 8, ["size"])]),
2143
2142
  default: f(() => {
2144
- var q, K;
2145
- return [y("div", oi, [e.value ? (c(), k(t(E), {
2143
+ var L, K;
2144
+ return [y("div", oi, [e.value ? (d(), k(t(E), {
2146
2145
  key: 0,
2147
2146
  class: "oauth-binding-account__avatar",
2148
2147
  "image-url": e.value,
2149
2148
  size: 42
2150
- }, null, 8, ["image-url"])) : (c(), k(t(E), {
2149
+ }, null, 8, ["image-url"])) : (d(), k(t(E), {
2151
2150
  key: 1,
2152
2151
  class: "oauth-binding-account__avatar oauth-binding-account__avatar--placeholder",
2153
2152
  size: 42
@@ -2159,14 +2158,14 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
2159
2158
  _: 1
2160
2159
  })), y("div", si, [w[4] || (w[4] = y("div", {
2161
2160
  class: "oauth-binding-account__provider"
2162
- }, "GitHub", -1)), y("div", ai, O(((K = (q = t(u)) == null ? void 0 : q.github) == null ? void 0 : K.login) || "GitHub"), 1)])])];
2161
+ }, "GitHub", -1)), y("div", ai, O(((K = (L = t(u)) == null ? void 0 : L.github) == null ? void 0 : K.login) || "GitHub"), 1)])])];
2163
2162
  }),
2164
2163
  _: 1
2165
- })) : I("", !0), o.value === "bind" || o.value === "unbind" ? (c(), k(_e, {
2164
+ })) : I("", !0), o.value === "bind" || o.value === "unbind" ? (d(), k(_e, {
2166
2165
  key: 2,
2167
2166
  size: r.size,
2168
- email: (R = t(u)) == null ? void 0 : R.email,
2169
- onNext: n
2167
+ email: (q = t(u)) == null ? void 0 : q.email,
2168
+ onNext: a
2170
2169
  }, null, 8, ["size", "email"])) : I("", !0)], 64);
2171
2170
  };
2172
2171
  }