@huyooo/ui 2.0.12 → 2.0.13

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.
@@ -1,49 +1,49 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- import { U as qe } from "./userMenuModal-D-nDaYqM.js";
4
- import { defineComponent as J, ref as A, computed as $, openBlock as y, createElementBlock as M, createElementVNode as z, createVNode as m, unref as n, withCtx as o, createTextVNode as k, createCommentVNode as E, toDisplayString as U, createBlock as I, onUnmounted as Ae, withDirectives as Le, vShow as Me, onMounted as de, Fragment as ie, createSlots as Ke, normalizeClass as Pe, renderList as Fe, watch as Ie } from "vue";
5
- import { Avatar as Ee, Input as Q, Textarea as He, Button as T, Message as G, Form as le, FormItem as L, Alert as Y, Space as me, Popconfirm as We, Link as Ce, InputPassword as Ge, Result as Ye, Modal as Je } from "@arco-design/web-vue";
3
+ import { U as Me } from "./userMenuModal-D-nDaYqM.js";
4
+ import { defineComponent as J, ref as A, computed as $, openBlock as y, createElementBlock as M, createElementVNode as z, createVNode as m, unref as n, withCtx as o, createTextVNode as k, createCommentVNode as C, toDisplayString as U, createBlock as I, onUnmounted as Ae, withDirectives as Ke, vShow as Fe, onMounted as de, Fragment as ie, createSlots as He, normalizeClass as Pe, renderList as We, watch as Ie } from "vue";
5
+ import { Avatar as Ee, Input as Q, Textarea as Ge, Button as T, Message as G, Form as le, FormItem as L, Alert as Y, Space as me, Popconfirm as Ye, Link as Re, InputPassword as Je, Result as je, Modal as Qe } from "@arco-design/web-vue";
6
6
  /* empty css */
7
- import { f as je, g as x, b as Qe, h as Re } from "./apiClients-Ctcq8NZs.js";
8
- import { C as Xe } from "./index-Cn6LcfZO.js";
7
+ import { f as Xe, g as x, b as Ze, h as Se } from "./apiClients-Ctcq8NZs.js";
8
+ import { C as et } from "./index-Cn6LcfZO.js";
9
9
  /* empty css */
10
10
  import { u as ne } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
11
- import { u as Se, g as Ze } from "./runtime-Dp7MgwhI.js";
11
+ import { u as Ve, g as $e } from "./runtime-Dp7MgwhI.js";
12
12
  import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  /* empty css */
14
14
  /* empty css */
15
- import { C as et } from "./CustomTable-HDwqEcmB.js";
16
- import { u as Ve } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
17
- import { Icon as tt } from "@iconify/vue";
18
- import { i as it, M as nt } from "./Menu-uCexrsKP.js";
19
- import { u as at } from "./useAuthkitAuth-cHrJMM8E.js";
20
- import { u as ot } from "./useAuthkitCreateAndUpdate-Bbv7vZZn.js";
21
- const st = {
15
+ import { C as tt } from "./CustomTable-HDwqEcmB.js";
16
+ import { u as Te } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
17
+ import { Icon as it } from "@iconify/vue";
18
+ import { i as nt, M as at } from "./Menu-uCexrsKP.js";
19
+ import { u as ot } from "./useAuthkitAuth-cHrJMM8E.js";
20
+ import { u as st } from "./useAuthkitCreateAndUpdate-Bbv7vZZn.js";
21
+ const lt = {
22
22
  class: "personal-information"
23
- }, lt = {
24
- class: "profile-card"
25
23
  }, rt = {
26
- class: "profile-field profile-field--nickname"
24
+ class: "profile-card"
27
25
  }, ut = {
26
+ class: "profile-field profile-field--nickname"
27
+ }, dt = {
28
28
  class: "nickname-field"
29
- }, dt = ["disabled"], ct = {
29
+ }, ct = ["disabled"], ft = {
30
30
  class: "profile-field"
31
- }, ft = {
31
+ }, pt = {
32
32
  key: 0,
33
33
  class: "profile-actions"
34
- }, pt = {
35
- class: "profile-card profile-card--meta"
36
34
  }, mt = {
37
- class: "account-meta"
35
+ class: "profile-card profile-card--meta"
38
36
  }, vt = {
39
- class: "account-meta__row"
37
+ class: "account-meta"
40
38
  }, ht = {
41
39
  class: "account-meta__row"
42
40
  }, yt = {
43
41
  class: "account-meta__row"
44
42
  }, gt = {
45
43
  class: "account-meta__row"
46
- }, wt = 1e3, bt = /* @__PURE__ */ J({
44
+ }, wt = {
45
+ class: "account-meta__row"
46
+ }, bt = 1e3, _t = /* @__PURE__ */ J({
47
47
  __name: "AuthkitPersonalInformation",
48
48
  props: {
49
49
  size: {
@@ -56,11 +56,11 @@ const st = {
56
56
  emit: i
57
57
  }) {
58
58
  const a = i, {
59
- fetchUserProfile: u
59
+ fetchUserProfile: s
60
60
  } = ne(), {
61
- config: s,
61
+ config: l,
62
62
  upload: d
63
- } = Se(), l = e, t = A({
63
+ } = Ve(), r = e, t = A({
64
64
  id: void 0,
65
65
  nickname: "",
66
66
  description: "",
@@ -68,7 +68,7 @@ const st = {
68
68
  avatarUrl: "",
69
69
  email: "",
70
70
  phone: ""
71
- }), h = A({
71
+ }), v = A({
72
72
  nickname: "",
73
73
  description: ""
74
74
  }), g = A({
@@ -76,9 +76,9 @@ const st = {
76
76
  createAt: "",
77
77
  status: "",
78
78
  loginIdentity: "-"
79
- }), f = A(!1), v = A(!1), r = $(() => t.value.nickname !== h.value.nickname || t.value.description !== h.value.description);
79
+ }), f = A(!1), h = A(!1), u = $(() => t.value.nickname !== v.value.nickname || t.value.description !== v.value.description);
80
80
  function p() {
81
- h.value = {
81
+ v.value = {
82
82
  nickname: t.value.nickname,
83
83
  description: t.value.description
84
84
  };
@@ -88,26 +88,26 @@ const st = {
88
88
  id: V.id,
89
89
  createAt: V.createAt || "-",
90
90
  status: V.status || "",
91
- loginIdentity: Qe(V)
91
+ loginIdentity: Ze(V)
92
92
  }, p();
93
93
  }
94
94
  async function R() {
95
- v.value = !0;
95
+ h.value = !0;
96
96
  const {
97
97
  data: V,
98
98
  error: w
99
99
  } = await x().auth.users.profile.post({});
100
- if (v.value = !1, w || !V)
100
+ if (h.value = !1, w || !V)
101
101
  return;
102
102
  S(V);
103
103
  }
104
104
  function B() {
105
- t.value.nickname = h.value.nickname, t.value.description = h.value.description;
105
+ t.value.nickname = v.value.nickname, t.value.description = v.value.description;
106
106
  }
107
107
  async function K() {
108
108
  if (!t.value.id)
109
109
  return;
110
- v.value = !0;
110
+ h.value = !0;
111
111
  const V = {
112
112
  id: t.value.id,
113
113
  nickname: t.value.nickname,
@@ -117,7 +117,7 @@ const st = {
117
117
  data: w,
118
118
  error: q
119
119
  } = await x().auth.users.update.baseInfo.post(V);
120
- v.value = !1, !q && w && (G.success("更新成功"), t.value.avatarUrl = w.avatarUrl || t.value.avatarUrl, p(), await u(), a("submit"));
120
+ h.value = !1, !q && w && (G.success("更新成功"), t.value.avatarUrl = w.avatarUrl || t.value.avatarUrl, p(), await s(), a("submit"));
121
121
  }
122
122
  function j() {
123
123
  const V = document.createElement("input");
@@ -133,7 +133,7 @@ const st = {
133
133
  data: P,
134
134
  error: N
135
135
  } = await d.upload({
136
- bucketId: s.avatarBucketId,
136
+ bucketId: l.avatarBucketId,
137
137
  file: _
138
138
  });
139
139
  if (N || !P) {
@@ -146,14 +146,14 @@ const st = {
146
146
  description: t.value.description,
147
147
  avatar: P.key
148
148
  });
149
- f.value = !1, F.error || (G.success("头像已更新"), await R(), await u(), a("submit")), V.remove();
149
+ f.value = !1, F.error || (G.success("头像已更新"), await R(), await s(), a("submit")), V.remove();
150
150
  }), V.click();
151
151
  }
152
- return R(), (V, w) => (y(), M("div", st, [z("section", lt, [w[6] || (w[6] = z("h3", {
152
+ return R(), (V, w) => (y(), M("div", lt, [z("section", rt, [w[6] || (w[6] = z("h3", {
153
153
  class: "profile-card__title"
154
- }, "个人资料", -1)), z("div", rt, [w[2] || (w[2] = z("label", {
154
+ }, "个人资料", -1)), z("div", ut, [w[2] || (w[2] = z("label", {
155
155
  class: "profile-field__label"
156
- }, "昵称", -1)), z("div", ut, [z("button", {
156
+ }, "昵称", -1)), z("div", dt, [z("button", {
157
157
  type: "button",
158
158
  class: "nickname-field__avatar",
159
159
  disabled: f.value,
@@ -163,48 +163,48 @@ const st = {
163
163
  "image-url": t.value.avatarUrl,
164
164
  size: 28,
165
165
  "object-fit": "cover"
166
- }, null, 8, ["image-url"])], 8, dt), m(n(Q), {
166
+ }, null, 8, ["image-url"])], 8, ct), m(n(Q), {
167
167
  modelValue: t.value.nickname,
168
168
  "onUpdate:modelValue": w[0] || (w[0] = (q) => t.value.nickname = q),
169
169
  class: "nickname-field__input",
170
- size: l.size,
170
+ size: r.size,
171
171
  placeholder: "例如:小明"
172
- }, null, 8, ["modelValue", "size"])])]), z("div", ct, [w[3] || (w[3] = z("label", {
172
+ }, null, 8, ["modelValue", "size"])])]), z("div", ft, [w[3] || (w[3] = z("label", {
173
173
  class: "profile-field__label"
174
- }, "个人简介", -1)), m(n(He), {
174
+ }, "个人简介", -1)), m(n(Ge), {
175
175
  modelValue: t.value.description,
176
176
  "onUpdate:modelValue": w[1] || (w[1] = (q) => t.value.description = q),
177
- size: l.size,
177
+ size: r.size,
178
178
  placeholder: "介绍一下你自己",
179
- "max-length": wt,
179
+ "max-length": bt,
180
180
  "show-word-limit": "",
181
181
  "auto-size": {
182
182
  minRows: 4,
183
183
  maxRows: 8
184
184
  }
185
- }, null, 8, ["modelValue", "size"])]), r.value ? (y(), M("div", ft, [m(n(T), {
186
- size: l.size,
185
+ }, null, 8, ["modelValue", "size"])]), u.value ? (y(), M("div", pt, [m(n(T), {
186
+ size: r.size,
187
187
  onClick: B
188
188
  }, {
189
189
  default: o(() => [...w[4] || (w[4] = [k("取消", -1)])]),
190
190
  _: 1
191
191
  }, 8, ["size"]), m(n(T), {
192
192
  type: "primary",
193
- size: l.size,
194
- loading: v.value,
193
+ size: r.size,
194
+ loading: h.value,
195
195
  onClick: K
196
196
  }, {
197
197
  default: o(() => [...w[5] || (w[5] = [k(" 保存修改 ", -1)])]),
198
198
  _: 1
199
- }, 8, ["size", "loading"])])) : E("", !0)]), z("section", pt, [w[11] || (w[11] = z("h3", {
199
+ }, 8, ["size", "loading"])])) : C("", !0)]), z("section", mt, [w[11] || (w[11] = z("h3", {
200
200
  class: "profile-card__title"
201
- }, "账号信息", -1)), z("dl", mt, [z("div", vt, [w[7] || (w[7] = z("dt", null, "用户 ID", -1)), z("dd", null, [z("span", null, U(g.value.id || "-"), 1), g.value.id ? (y(), I(Xe, {
201
+ }, "账号信息", -1)), z("dl", vt, [z("div", ht, [w[7] || (w[7] = z("dt", null, "用户 ID", -1)), z("dd", null, [z("span", null, U(g.value.id || "-"), 1), g.value.id ? (y(), I(et, {
202
202
  key: 0,
203
203
  value: g.value.id,
204
204
  message: "用户 ID 已复制"
205
- }, null, 8, ["value"])) : E("", !0)])]), z("div", ht, [w[8] || (w[8] = z("dt", null, "注册时间", -1)), z("dd", null, U(g.value.createAt || "-"), 1)]), z("div", yt, [w[9] || (w[9] = z("dt", null, "账号状态", -1)), z("dd", null, U(n(je)(g.value.status)), 1)]), z("div", gt, [w[10] || (w[10] = z("dt", null, "登录标识", -1)), z("dd", null, U(g.value.loginIdentity), 1)])])])]));
205
+ }, null, 8, ["value"])) : C("", !0)])]), z("div", yt, [w[8] || (w[8] = z("dt", null, "注册时间", -1)), z("dd", null, U(g.value.createAt || "-"), 1)]), z("div", gt, [w[9] || (w[9] = z("dt", null, "账号状态", -1)), z("dd", null, U(n(Xe)(g.value.status)), 1)]), z("div", wt, [w[10] || (w[10] = z("dt", null, "登录标识", -1)), z("dd", null, U(g.value.loginIdentity), 1)])])])]));
206
206
  }
207
- }), _t = /* @__PURE__ */ X(bt, [["__scopeId", "data-v-e03e688b"]]), kt = /* @__PURE__ */ J({
207
+ }), kt = /* @__PURE__ */ X(_t, [["__scopeId", "data-v-e03e688b"]]), At = /* @__PURE__ */ J({
208
208
  __name: "AuthkitSendVerifyCode",
209
209
  props: {
210
210
  size: {
@@ -222,13 +222,13 @@ const st = {
222
222
  expose: i,
223
223
  emit: a
224
224
  }) {
225
- const u = a, s = e, d = A(!1);
226
- let l;
227
- const t = A(0), h = $(() => t.value.toString().padStart(2, "0")), g = $(() => t.value > 0);
225
+ const s = a, l = e, d = A(!1);
226
+ let r;
227
+ const t = A(0), v = $(() => t.value.toString().padStart(2, "0")), g = $(() => t.value > 0);
228
228
  function f() {
229
- l && (clearInterval(l), l = void 0);
229
+ r && (clearInterval(r), r = void 0);
230
230
  }
231
- function v() {
231
+ function h() {
232
232
  if (d.value) {
233
233
  if (t.value <= 0) {
234
234
  f(), d.value = !1;
@@ -237,11 +237,11 @@ const st = {
237
237
  t.value--, t.value <= 0 && (f(), d.value = !1);
238
238
  }
239
239
  }
240
- function r() {
241
- u("send");
240
+ function u() {
241
+ s("send");
242
242
  }
243
243
  function p(S) {
244
- !Number.isFinite(S) || S <= 0 || (t.value = Math.ceil(S), d.value = !0, f(), l = setInterval(v, 1e3));
244
+ !Number.isFinite(S) || S <= 0 || (t.value = Math.ceil(S), d.value = !0, f(), r = setInterval(h, 1e3));
245
245
  }
246
246
  return i({
247
247
  startCountFn: p
@@ -250,19 +250,19 @@ const st = {
250
250
  }), (S, R) => (y(), I(n(T), {
251
251
  class: "OAuthItem",
252
252
  type: "primary",
253
- size: s.size,
253
+ size: l.size,
254
254
  disabled: g.value,
255
- loading: s.loading,
256
- onClick: r
255
+ loading: l.loading,
256
+ onClick: u
257
257
  }, {
258
- default: o(() => [R[0] || (R[0] = z("span", null, " 发送验证码", -1)), Le(z("span", {
258
+ default: o(() => [R[0] || (R[0] = z("span", null, " 发送验证码", -1)), Ke(z("span", {
259
259
  class: "verify-code-timer"
260
- }, U(`(${h.value})`), 513), [[Me, g.value]])]),
260
+ }, U(`(${v.value})`), 513), [[Fe, g.value]])]),
261
261
  _: 1
262
262
  }, 8, ["size", "disabled", "loading"]));
263
263
  }
264
- }), he = /* @__PURE__ */ X(kt, [["__scopeId", "data-v-63c6fb3a"]]);
265
- function At(e) {
264
+ }), he = /* @__PURE__ */ X(At, [["__scopeId", "data-v-63c6fb3a"]]);
265
+ function zt(e) {
266
266
  if (!e)
267
267
  return null;
268
268
  const i = e.match(/请\s*(\d+)\s*秒后再试/);
@@ -272,19 +272,19 @@ function At(e) {
272
272
  return Number.isFinite(a) && a > 0 ? a : null;
273
273
  }
274
274
  function ke(e) {
275
- var a, u;
275
+ var a, s;
276
276
  const i = (a = e.data) == null ? void 0 : a.cooldownSeconds;
277
- return typeof i == "number" && i > 0 ? i : At((u = e.error) == null ? void 0 : u.message);
277
+ return typeof i == "number" && i > 0 ? i : zt((s = e.error) == null ? void 0 : s.message);
278
278
  }
279
279
  function ye(e, i) {
280
280
  const a = ke(i);
281
281
  a && e && e.startCountFn(a);
282
282
  }
283
- const zt = {
283
+ const Pt = {
284
284
  class: "sendVerifyCodeItem"
285
- }, Pt = {
285
+ }, It = {
286
286
  class: "handle"
287
- }, It = /* @__PURE__ */ J({
287
+ }, Ct = /* @__PURE__ */ J({
288
288
  __name: "AuthkitEmailVerify",
289
289
  props: {
290
290
  email: {
@@ -301,25 +301,25 @@ const zt = {
301
301
  setup(e, {
302
302
  emit: i
303
303
  }) {
304
- const a = i, u = e, s = $(() => Re(u.email)), d = A(), l = A(!1), t = A(!1), h = A(), g = A({
304
+ const a = i, s = e, l = $(() => Se(s.email)), d = A(), r = A(!1), t = A(!1), v = A(), g = A({
305
305
  userToken: void 0,
306
306
  emailVerifyId: void 0
307
307
  });
308
308
  async function f() {
309
- l.value = !0;
310
- const r = await x().auth.verify.email.retry.post({
311
- email: u.email,
309
+ r.value = !0;
310
+ const u = await x().auth.verify.email.retry.post({
311
+ email: s.email,
312
312
  purpose: "bindEmail"
313
313
  });
314
- l.value = !1, r.data && (g.value.emailVerifyId = r.data.emailVerifyId), ye(d.value, r);
314
+ r.value = !1, u.data && (g.value.emailVerifyId = u.data.emailVerifyId), ye(d.value, u);
315
315
  }
316
- async function v() {
317
- if (!await h.value.validate(["userToken"])) {
316
+ async function h() {
317
+ if (!await v.value.validate(["userToken"])) {
318
318
  t.value = !0;
319
319
  const {
320
320
  error: p
321
321
  } = await x().auth.verify.email.post({
322
- email: u.email,
322
+ email: s.email,
323
323
  userToken: g.value.userToken,
324
324
  emailVerifyId: g.value.emailVerifyId,
325
325
  purpose: "bindEmail"
@@ -327,12 +327,12 @@ const zt = {
327
327
  t.value = !1, p || a("next");
328
328
  }
329
329
  }
330
- return (r, p) => (y(), I(n(le), {
330
+ return (u, p) => (y(), I(n(le), {
331
331
  ref_key: "formRef",
332
- ref: h,
332
+ ref: v,
333
333
  model: g.value,
334
334
  "auto-label-width": "",
335
- size: u.size
335
+ size: s.size
336
336
  }, {
337
337
  default: o(() => [m(n(L), {
338
338
  field: "email",
@@ -345,7 +345,7 @@ const zt = {
345
345
  message: "请输入有效的邮箱"
346
346
  }]
347
347
  }, {
348
- default: o(() => [k(U(s.value), 1)]),
348
+ default: o(() => [k(U(l.value), 1)]),
349
349
  _: 1
350
350
  }), m(n(L), {
351
351
  field: "userToken",
@@ -356,15 +356,15 @@ const zt = {
356
356
  message: "请输入验证码"
357
357
  }]
358
358
  }, {
359
- default: o(() => [z("div", zt, [m(n(Q), {
359
+ default: o(() => [z("div", Pt, [m(n(Q), {
360
360
  modelValue: g.value.userToken,
361
361
  "onUpdate:modelValue": p[0] || (p[0] = (S) => g.value.userToken = S),
362
362
  placeholder: "请输入验证码"
363
363
  }, null, 8, ["modelValue"]), m(he, {
364
364
  ref_key: "SendVerifyCodeRef",
365
365
  ref: d,
366
- size: u.size,
367
- loading: l.value,
366
+ size: s.size,
367
+ loading: r.value,
368
368
  style: {
369
369
  "margin-left": "10px"
370
370
  },
@@ -376,10 +376,10 @@ const zt = {
376
376
  label: "",
377
377
  rules: []
378
378
  }, {
379
- default: o(() => [z("div", Pt, [m(n(T), {
379
+ default: o(() => [z("div", It, [m(n(T), {
380
380
  loading: t.value,
381
381
  type: "primary",
382
- onClick: v
382
+ onClick: h
383
383
  }, {
384
384
  default: o(() => [...p[1] || (p[1] = [k(" 提交 ", -1)])]),
385
385
  _: 1
@@ -389,11 +389,11 @@ const zt = {
389
389
  _: 1
390
390
  }, 8, ["model", "size"]));
391
391
  }
392
- }), ge = /* @__PURE__ */ X(It, [["__scopeId", "data-v-0939d925"]]), Et = {
392
+ }), ge = /* @__PURE__ */ X(Ct, [["__scopeId", "data-v-0939d925"]]), Et = {
393
393
  class: "sendVerifyCodeItem"
394
- }, Ct = {
394
+ }, Rt = {
395
395
  class: "handle"
396
- }, Rt = /* @__PURE__ */ J({
396
+ }, St = /* @__PURE__ */ J({
397
397
  __name: "AuthkitPhoneVerify",
398
398
  props: {
399
399
  phone: {
@@ -413,39 +413,39 @@ const zt = {
413
413
  setup(e, {
414
414
  emit: i
415
415
  }) {
416
- const a = i, u = e, s = A(), d = A(!1), l = A(!1), t = A(), h = A({
416
+ const a = i, s = e, l = A(), d = A(!1), r = A(!1), t = A(), v = A({
417
417
  code: void 0
418
418
  }), g = $(() => {
419
- const r = u.phone.trim();
420
- return r.length < 7 ? r : `${r.slice(0, 3)}****${r.slice(-4)}`;
419
+ const u = s.phone.trim();
420
+ return u.length < 7 ? u : `${u.slice(0, 3)}****${u.slice(-4)}`;
421
421
  });
422
422
  async function f() {
423
423
  d.value = !0;
424
- const r = await x().auth.verify.sms.send.post({
425
- phone: u.phone,
426
- purpose: u.purpose
424
+ const u = await x().auth.verify.sms.send.post({
425
+ phone: s.phone,
426
+ purpose: s.purpose
427
427
  });
428
- d.value = !1, ye(s.value, r);
428
+ d.value = !1, ye(l.value, u);
429
429
  }
430
- async function v() {
430
+ async function h() {
431
431
  if (!await t.value.validate(["code"])) {
432
- l.value = !0;
432
+ r.value = !0;
433
433
  const {
434
434
  error: p
435
435
  } = await x().auth.verify.sms.verify.post({
436
- phone: u.phone,
437
- code: h.value.code,
438
- purpose: u.purpose
436
+ phone: s.phone,
437
+ code: v.value.code,
438
+ purpose: s.purpose
439
439
  });
440
- l.value = !1, p || a("next");
440
+ r.value = !1, p || a("next");
441
441
  }
442
442
  }
443
- return (r, p) => (y(), I(n(le), {
443
+ return (u, p) => (y(), I(n(le), {
444
444
  ref_key: "formRef",
445
445
  ref: t,
446
- model: h.value,
446
+ model: v.value,
447
447
  "auto-label-width": "",
448
- size: u.size
448
+ size: s.size
449
449
  }, {
450
450
  default: o(() => [m(n(L), {
451
451
  field: "phone",
@@ -463,13 +463,13 @@ const zt = {
463
463
  }]
464
464
  }, {
465
465
  default: o(() => [z("div", Et, [m(n(Q), {
466
- modelValue: h.value.code,
467
- "onUpdate:modelValue": p[0] || (p[0] = (S) => h.value.code = S),
466
+ modelValue: v.value.code,
467
+ "onUpdate:modelValue": p[0] || (p[0] = (S) => v.value.code = S),
468
468
  placeholder: "请输入验证码"
469
469
  }, null, 8, ["modelValue"]), m(he, {
470
470
  ref_key: "sendVerifyCodeRef",
471
- ref: s,
472
- size: u.size,
471
+ ref: l,
472
+ size: s.size,
473
473
  loading: d.value,
474
474
  style: {
475
475
  "margin-left": "10px"
@@ -482,10 +482,10 @@ const zt = {
482
482
  label: "",
483
483
  rules: []
484
484
  }, {
485
- default: o(() => [z("div", Ct, [m(n(T), {
486
- loading: l.value,
485
+ default: o(() => [z("div", Rt, [m(n(T), {
486
+ loading: r.value,
487
487
  type: "primary",
488
- onClick: v
488
+ onClick: h
489
489
  }, {
490
490
  default: o(() => [...p[1] || (p[1] = [k("提交", -1)])]),
491
491
  _: 1
@@ -495,9 +495,9 @@ const zt = {
495
495
  _: 1
496
496
  }, 8, ["model", "size"]));
497
497
  }
498
- }), we = /* @__PURE__ */ X(Rt, [["__scopeId", "data-v-d26a59d3"]]), St = {
498
+ }), we = /* @__PURE__ */ X(St, [["__scopeId", "data-v-d26a59d3"]]), Vt = {
499
499
  class: "handle"
500
- }, Vt = /* @__PURE__ */ J({
500
+ }, $t = /* @__PURE__ */ J({
501
501
  __name: "AuthkitPasswordUpdate",
502
502
  props: {
503
503
  size: {
@@ -513,7 +513,7 @@ const zt = {
513
513
  setup(e, {
514
514
  emit: i
515
515
  }) {
516
- const a = i, u = A(!1), s = A(), d = e, l = A({
516
+ const a = i, s = A(!1), l = A(), d = e, r = A({
517
517
  oldPassword: "",
518
518
  password: "",
519
519
  confirmPassword: ""
@@ -525,27 +525,27 @@ const zt = {
525
525
  message: "确认密码不能少于10字符"
526
526
  }, {
527
527
  validator: (g, f) => {
528
- g !== l.value.password ? f("两次密码输入不一致,请重新输入") : f();
528
+ g !== r.value.password ? f("两次密码输入不一致,请重新输入") : f();
529
529
  }
530
530
  }];
531
- async function h() {
532
- if (!await s.value.validate()) {
533
- u.value = !0;
531
+ async function v() {
532
+ if (!await l.value.validate()) {
533
+ s.value = !0;
534
534
  const f = d.requireOldPassword ? {
535
- password: l.value.password,
536
- oldPassword: l.value.oldPassword
535
+ password: r.value.password,
536
+ oldPassword: r.value.oldPassword
537
537
  } : {
538
- password: l.value.password
538
+ password: r.value.password
539
539
  }, {
540
- error: v
540
+ error: h
541
541
  } = await x().auth.users.update.password.post(f);
542
- u.value = !1, v || a("submit", f);
542
+ s.value = !1, h || a("submit", f);
543
543
  }
544
544
  }
545
545
  return (g, f) => (y(), I(n(le), {
546
546
  ref_key: "formRef",
547
- ref: s,
548
- model: l.value,
547
+ ref: l,
548
+ model: r.value,
549
549
  "auto-label-width": "",
550
550
  size: d.size
551
551
  }, {
@@ -560,13 +560,13 @@ const zt = {
560
560
  }]
561
561
  }, {
562
562
  default: o(() => [m(n(Q), {
563
- modelValue: l.value.oldPassword,
564
- "onUpdate:modelValue": f[0] || (f[0] = (v) => l.value.oldPassword = v),
563
+ modelValue: r.value.oldPassword,
564
+ "onUpdate:modelValue": f[0] || (f[0] = (h) => r.value.oldPassword = h),
565
565
  placeholder: "请输入当前密码",
566
566
  type: "password"
567
567
  }, null, 8, ["modelValue"])]),
568
568
  _: 1
569
- })) : E("", !0), m(n(L), {
569
+ })) : C("", !0), m(n(L), {
570
570
  field: "password",
571
571
  label: d.requireOldPassword ? "新密码" : "登录密码",
572
572
  "hide-label": "",
@@ -579,8 +579,8 @@ const zt = {
579
579
  }]
580
580
  }, {
581
581
  default: o(() => [m(n(Q), {
582
- modelValue: l.value.password,
583
- "onUpdate:modelValue": f[1] || (f[1] = (v) => l.value.password = v),
582
+ modelValue: r.value.password,
583
+ "onUpdate:modelValue": f[1] || (f[1] = (h) => r.value.password = h),
584
584
  placeholder: d.requireOldPassword ? "请输入新密码" : "请输入登录密码",
585
585
  type: "password"
586
586
  }, null, 8, ["modelValue", "placeholder"])]),
@@ -592,8 +592,8 @@ const zt = {
592
592
  rules: t
593
593
  }, {
594
594
  default: o(() => [m(n(Q), {
595
- modelValue: l.value.confirmPassword,
596
- "onUpdate:modelValue": f[2] || (f[2] = (v) => l.value.confirmPassword = v),
595
+ modelValue: r.value.confirmPassword,
596
+ "onUpdate:modelValue": f[2] || (f[2] = (h) => r.value.confirmPassword = h),
597
597
  placeholder: "请输入确认密码",
598
598
  type: "password"
599
599
  }, null, 8, ["modelValue"])]),
@@ -603,10 +603,10 @@ const zt = {
603
603
  label: "",
604
604
  rules: []
605
605
  }, {
606
- default: o(() => [z("div", St, [m(n(T), {
606
+ default: o(() => [z("div", Vt, [m(n(T), {
607
607
  type: "primary",
608
- loading: u.value,
609
- onClick: h
608
+ loading: s.value,
609
+ onClick: v
610
610
  }, {
611
611
  default: o(() => [...f[3] || (f[3] = [k("提交", -1)])]),
612
612
  _: 1
@@ -616,7 +616,7 @@ const zt = {
616
616
  _: 1
617
617
  }, 8, ["model", "size"]));
618
618
  }
619
- }), $t = /* @__PURE__ */ X(Vt, [["__scopeId", "data-v-627d759a"]]), Tt = /* @__PURE__ */ J({
619
+ }), Tt = /* @__PURE__ */ X($t, [["__scopeId", "data-v-627d759a"]]), Ut = /* @__PURE__ */ J({
620
620
  __name: "AuthkitSetPassword",
621
621
  props: {
622
622
  size: {
@@ -628,37 +628,37 @@ const zt = {
628
628
  const {
629
629
  userProfile: i,
630
630
  fetchUserProfile: a,
631
- isLoggedIn: u
632
- } = ne(), s = A("hidden"), d = e;
633
- function l(g) {
634
- s.value = g;
631
+ isLoggedIn: s
632
+ } = ne(), l = A("hidden"), d = e;
633
+ function r(g) {
634
+ l.value = g;
635
635
  }
636
636
  function t(g) {
637
637
  var f;
638
- G.success((f = i.value) != null && f.hasPassword ? "密码修改成功" : "密码设置成功"), s.value = "hidden", a();
638
+ G.success((f = i.value) != null && f.hasPassword ? "密码修改成功" : "密码设置成功"), l.value = "hidden", a();
639
639
  }
640
- function h() {
641
- s.value = "update";
640
+ function v() {
641
+ l.value = "update";
642
642
  }
643
643
  return de(() => {
644
- u.value && !i.value && a();
644
+ s.value && !i.value && a();
645
645
  }), (g, f) => {
646
- var v, r, p, S, R, B, K, j, V;
647
- return y(), M(ie, null, [!((v = n(i)) != null && v.email) && !((r = n(i)) != null && r.phone) ? (y(), I(n(Y), {
646
+ var h, u, p, S, R, B, K, j, V;
647
+ return y(), M(ie, null, [!((h = n(i)) != null && h.email) && !((u = n(i)) != null && u.phone) ? (y(), I(n(Y), {
648
648
  key: 0,
649
649
  type: "info",
650
650
  title: "先绑定账号"
651
651
  }, {
652
652
  default: o(() => [...f[1] || (f[1] = [k(" 请先绑定邮箱或手机号,再设置登录密码。 ", -1)])]),
653
653
  _: 1
654
- })) : E("", !0), ((p = n(i)) != null && p.email || (S = n(i)) != null && S.phone) && s.value === "hidden" ? (y(), I(n(Y), {
654
+ })) : C("", !0), ((p = n(i)) != null && p.email || (S = n(i)) != null && S.phone) && l.value === "hidden" ? (y(), I(n(Y), {
655
655
  key: 1,
656
656
  title: (R = n(i)) != null && R.hasPassword ? "更改密码" : "设置登录密码"
657
657
  }, {
658
658
  action: o(() => [m(n(T), {
659
659
  size: d.size,
660
660
  type: "primary",
661
- onClick: f[0] || (f[0] = (w) => l("verify"))
661
+ onClick: f[0] || (f[0] = (w) => r("verify"))
662
662
  }, {
663
663
  default: o(() => {
664
664
  var w;
@@ -671,22 +671,22 @@ const zt = {
671
671
  return [k(U((w = n(i)) != null && w.hasPassword ? "为了账户安全,修改密码前会先验证身份。" : "设置登录密码前会先验证身份。") + " ", 1)];
672
672
  }),
673
673
  _: 1
674
- }, 8, ["title"])) : E("", !0), s.value === "update" ? (y(), I($t, {
674
+ }, 8, ["title"])) : C("", !0), l.value === "update" ? (y(), I(Tt, {
675
675
  key: 2,
676
676
  size: d.size,
677
677
  "require-old-password": !!((B = n(i)) != null && B.hasPassword),
678
678
  onSubmit: t
679
- }, null, 8, ["size", "require-old-password"])) : E("", !0), s.value === "verify" && ((K = n(i)) != null && K.email) ? (y(), I(ge, {
679
+ }, null, 8, ["size", "require-old-password"])) : C("", !0), l.value === "verify" && ((K = n(i)) != null && K.email) ? (y(), I(ge, {
680
680
  key: 3,
681
681
  size: d.size,
682
682
  email: n(i).email,
683
- onNext: h
684
- }, null, 8, ["size", "email"])) : E("", !0), s.value === "verify" && !((j = n(i)) != null && j.email) && ((V = n(i)) != null && V.phone) ? (y(), I(we, {
683
+ onNext: v
684
+ }, null, 8, ["size", "email"])) : C("", !0), l.value === "verify" && !((j = n(i)) != null && j.email) && ((V = n(i)) != null && V.phone) ? (y(), I(we, {
685
685
  key: 4,
686
686
  size: d.size,
687
687
  phone: n(i).phone,
688
- onNext: h
689
- }, null, 8, ["size", "phone"])) : E("", !0)], 64);
688
+ onNext: v
689
+ }, null, 8, ["size", "phone"])) : C("", !0)], 64);
690
690
  };
691
691
  }
692
692
  }), fe = {
@@ -698,20 +698,20 @@ const zt = {
698
698
  function ee(e) {
699
699
  const i = new Uint8Array(e);
700
700
  let a = "";
701
- for (const s of i)
702
- a += String.fromCharCode(s);
701
+ for (const l of i)
702
+ a += String.fromCharCode(l);
703
703
  return btoa(a).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
704
704
  }
705
705
  function ve(e) {
706
- const i = e.replace(/-/g, "+").replace(/_/g, "/"), a = (4 - i.length % 4) % 4, u = i.padEnd(i.length + a, "="), s = atob(u), d = new ArrayBuffer(s.length), l = new Uint8Array(d);
707
- for (let t = 0; t < s.length; t++)
708
- l[t] = s.charCodeAt(t);
706
+ const i = e.replace(/-/g, "+").replace(/_/g, "/"), a = (4 - i.length % 4) % 4, s = i.padEnd(i.length + a, "="), l = atob(s), d = new ArrayBuffer(l.length), r = new Uint8Array(d);
707
+ for (let t = 0; t < l.length; t++)
708
+ r[t] = l.charCodeAt(t);
709
709
  return d;
710
710
  }
711
711
  function be() {
712
712
  return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
713
713
  }
714
- function $e(e) {
714
+ function Ue(e) {
715
715
  const {
716
716
  id: i
717
717
  } = e;
@@ -721,26 +721,26 @@ function $e(e) {
721
721
  transports: e.transports
722
722
  };
723
723
  }
724
- function Te(e) {
724
+ function xe(e) {
725
725
  return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
726
726
  }
727
727
  class W extends Error {
728
728
  constructor({
729
729
  message: i,
730
730
  code: a,
731
- cause: u,
732
- name: s
731
+ cause: s,
732
+ name: l
733
733
  }) {
734
734
  super(i, {
735
- cause: u
736
- }), this.name = s ?? u.name, this.code = a;
735
+ cause: s
736
+ }), this.name = l ?? s.name, this.code = a;
737
737
  }
738
738
  }
739
- function Ut({
739
+ function xt({
740
740
  error: e,
741
741
  options: i
742
742
  }) {
743
- var u, s, d;
743
+ var s, l, d;
744
744
  const {
745
745
  publicKey: a
746
746
  } = i;
@@ -754,13 +754,13 @@ function Ut({
754
754
  cause: e
755
755
  });
756
756
  } else if (e.name === "ConstraintError") {
757
- if (((u = a.authenticatorSelection) == null ? void 0 : u.requireResidentKey) === !0)
757
+ if (((s = a.authenticatorSelection) == null ? void 0 : s.requireResidentKey) === !0)
758
758
  return new W({
759
759
  message: "Discoverable credentials were required but no available authenticator supported it",
760
760
  code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
761
761
  cause: e
762
762
  });
763
- if (i.mediation === "conditional" && ((s = a.authenticatorSelection) == null ? void 0 : s.userVerification) === "required")
763
+ if (i.mediation === "conditional" && ((l = a.authenticatorSelection) == null ? void 0 : l.userVerification) === "required")
764
764
  return new W({
765
765
  message: "User verification was required during automatic registration but it could not be performed",
766
766
  code: "ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",
@@ -796,9 +796,9 @@ function Ut({
796
796
  cause: e
797
797
  });
798
798
  if (e.name === "SecurityError") {
799
- const l = window.location.hostname;
800
- if (Te(l)) {
801
- if (a.rp.id !== l)
799
+ const r = window.location.hostname;
800
+ if (xe(r)) {
801
+ if (a.rp.id !== r)
802
802
  return new W({
803
803
  message: `The RP ID "${a.rp.id}" is invalid for this domain`,
804
804
  code: "ERROR_INVALID_RP_ID",
@@ -825,7 +825,7 @@ function Ut({
825
825
  }
826
826
  return e;
827
827
  }
828
- class xt {
828
+ class Ot {
829
829
  createNewAbortSignal() {
830
830
  if (this.controller) {
831
831
  const a = new Error("Cancelling existing WebAuthn API call for new one");
@@ -841,12 +841,12 @@ class xt {
841
841
  }
842
842
  }
843
843
  }
844
- const Ue = new xt(), Ot = ["cross-platform", "platform"];
845
- function xe(e) {
846
- if (e && !(Ot.indexOf(e) < 0))
844
+ const Oe = new Ot(), Nt = ["cross-platform", "platform"];
845
+ function Ne(e) {
846
+ if (e && !(Nt.indexOf(e) < 0))
847
847
  return e;
848
848
  }
849
- async function Nt(e) {
849
+ async function Dt(e) {
850
850
  var S;
851
851
  const {
852
852
  optionsJSON: i,
@@ -854,84 +854,84 @@ async function Nt(e) {
854
854
  } = e;
855
855
  if (!be())
856
856
  throw new Error("WebAuthn is not supported in this browser");
857
- const u = {
857
+ const s = {
858
858
  ...i,
859
859
  challenge: ve(i.challenge),
860
860
  user: {
861
861
  ...i.user,
862
862
  id: ve(i.user.id)
863
863
  },
864
- excludeCredentials: (S = i.excludeCredentials) == null ? void 0 : S.map($e)
865
- }, s = {};
866
- a && (s.mediation = "conditional"), s.publicKey = u, s.signal = Ue.createNewAbortSignal();
864
+ excludeCredentials: (S = i.excludeCredentials) == null ? void 0 : S.map(Ue)
865
+ }, l = {};
866
+ a && (l.mediation = "conditional"), l.publicKey = s, l.signal = Oe.createNewAbortSignal();
867
867
  let d;
868
868
  try {
869
- d = await navigator.credentials.create(s);
869
+ d = await navigator.credentials.create(l);
870
870
  } catch (R) {
871
- throw Ut({
871
+ throw xt({
872
872
  error: R,
873
- options: s
873
+ options: l
874
874
  });
875
875
  }
876
876
  if (!d)
877
877
  throw new Error("Registration was not completed");
878
878
  const {
879
- id: l,
879
+ id: r,
880
880
  rawId: t,
881
- response: h,
881
+ response: v,
882
882
  type: g
883
883
  } = d;
884
884
  let f;
885
- typeof h.getTransports == "function" && (f = h.getTransports());
886
- let v;
887
- if (typeof h.getPublicKeyAlgorithm == "function")
885
+ typeof v.getTransports == "function" && (f = v.getTransports());
886
+ let h;
887
+ if (typeof v.getPublicKeyAlgorithm == "function")
888
888
  try {
889
- v = h.getPublicKeyAlgorithm();
889
+ h = v.getPublicKeyAlgorithm();
890
890
  } catch (R) {
891
891
  _e("getPublicKeyAlgorithm()", R);
892
892
  }
893
- let r;
894
- if (typeof h.getPublicKey == "function")
893
+ let u;
894
+ if (typeof v.getPublicKey == "function")
895
895
  try {
896
- const R = h.getPublicKey();
897
- R !== null && (r = ee(R));
896
+ const R = v.getPublicKey();
897
+ R !== null && (u = ee(R));
898
898
  } catch (R) {
899
899
  _e("getPublicKey()", R);
900
900
  }
901
901
  let p;
902
- if (typeof h.getAuthenticatorData == "function")
902
+ if (typeof v.getAuthenticatorData == "function")
903
903
  try {
904
- p = ee(h.getAuthenticatorData());
904
+ p = ee(v.getAuthenticatorData());
905
905
  } catch (R) {
906
906
  _e("getAuthenticatorData()", R);
907
907
  }
908
908
  return {
909
- id: l,
909
+ id: r,
910
910
  rawId: ee(t),
911
911
  response: {
912
- attestationObject: ee(h.attestationObject),
913
- clientDataJSON: ee(h.clientDataJSON),
912
+ attestationObject: ee(v.attestationObject),
913
+ clientDataJSON: ee(v.clientDataJSON),
914
914
  transports: f,
915
- publicKeyAlgorithm: v,
916
- publicKey: r,
915
+ publicKeyAlgorithm: h,
916
+ publicKey: u,
917
917
  authenticatorData: p
918
918
  },
919
919
  type: g,
920
920
  clientExtensionResults: d.getClientExtensionResults(),
921
- authenticatorAttachment: xe(d.authenticatorAttachment)
921
+ authenticatorAttachment: Ne(d.authenticatorAttachment)
922
922
  };
923
923
  }
924
924
  function _e(e, i) {
925
925
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
926
926
  `, i);
927
927
  }
928
- function Oe() {
928
+ function De() {
929
929
  if (!be())
930
930
  return new Promise((i) => i(!1));
931
931
  const e = window.PublicKeyCredential;
932
932
  return e.isConditionalMediationAvailable === void 0 ? new Promise((i) => i(!1)) : e.isConditionalMediationAvailable();
933
933
  }
934
- function Dt({
934
+ function Bt({
935
935
  error: e,
936
936
  options: i
937
937
  }) {
@@ -955,9 +955,9 @@ function Dt({
955
955
  cause: e
956
956
  });
957
957
  if (e.name === "SecurityError") {
958
- const u = window.location.hostname;
959
- if (Te(u)) {
960
- if (a.rpId !== u)
958
+ const s = window.location.hostname;
959
+ if (xe(s)) {
960
+ if (a.rpId !== s)
961
961
  return new W({
962
962
  message: `The RP ID "${a.rpId}" is invalid for this domain`,
963
963
  code: "ERROR_INVALID_RP_ID",
@@ -977,160 +977,181 @@ function Dt({
977
977
  }
978
978
  return e;
979
979
  }
980
- async function Bt(e) {
980
+ async function qt(e) {
981
981
  var p, S;
982
982
  const {
983
983
  optionsJSON: i,
984
984
  useBrowserAutofill: a = !1,
985
- verifyBrowserAutofillInput: u = !0
985
+ verifyBrowserAutofillInput: s = !0
986
986
  } = e;
987
987
  if (!be())
988
988
  throw new Error("WebAuthn is not supported in this browser");
989
- let s;
990
- ((p = i.allowCredentials) == null ? void 0 : p.length) !== 0 && (s = (S = i.allowCredentials) == null ? void 0 : S.map($e));
989
+ let l;
990
+ ((p = i.allowCredentials) == null ? void 0 : p.length) !== 0 && (l = (S = i.allowCredentials) == null ? void 0 : S.map(Ue));
991
991
  const d = {
992
992
  ...i,
993
993
  challenge: ve(i.challenge),
994
- allowCredentials: s
995
- }, l = {};
994
+ allowCredentials: l
995
+ }, r = {};
996
996
  if (a) {
997
- if (!await Oe())
997
+ if (!await De())
998
998
  throw Error("Browser does not support WebAuthn autofill");
999
- if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && u)
999
+ if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && s)
1000
1000
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
1001
- l.mediation = "conditional", d.allowCredentials = [];
1001
+ r.mediation = "conditional", d.allowCredentials = [];
1002
1002
  }
1003
- l.publicKey = d, l.signal = Ue.createNewAbortSignal();
1003
+ r.publicKey = d, r.signal = Oe.createNewAbortSignal();
1004
1004
  let t;
1005
1005
  try {
1006
- t = await navigator.credentials.get(l);
1006
+ t = await navigator.credentials.get(r);
1007
1007
  } catch (R) {
1008
- throw Dt({
1008
+ throw Bt({
1009
1009
  error: R,
1010
- options: l
1010
+ options: r
1011
1011
  });
1012
1012
  }
1013
1013
  if (!t)
1014
1014
  throw new Error("Authentication was not completed");
1015
1015
  const {
1016
- id: h,
1016
+ id: v,
1017
1017
  rawId: g,
1018
1018
  response: f,
1019
- type: v
1019
+ type: h
1020
1020
  } = t;
1021
- let r;
1022
- return f.userHandle && (r = ee(f.userHandle)), {
1023
- id: h,
1021
+ let u;
1022
+ return f.userHandle && (u = ee(f.userHandle)), {
1023
+ id: v,
1024
1024
  rawId: ee(g),
1025
1025
  response: {
1026
1026
  authenticatorData: ee(f.authenticatorData),
1027
1027
  clientDataJSON: ee(f.clientDataJSON),
1028
1028
  signature: ee(f.signature),
1029
- userHandle: r
1029
+ userHandle: u
1030
1030
  },
1031
- type: v,
1031
+ type: h,
1032
1032
  clientExtensionResults: t.getClientExtensionResults(),
1033
- authenticatorAttachment: xe(t.authenticatorAttachment)
1033
+ authenticatorAttachment: Ne(t.authenticatorAttachment)
1034
1034
  };
1035
1035
  }
1036
- function qt() {
1036
+ function Lt() {
1037
1037
  return se() === null;
1038
1038
  }
1039
1039
  function se() {
1040
1040
  return typeof window > "u" ? "非浏览器环境,无法使用 Passkey" : window.isSecureContext ? be() ? null : "当前浏览器不支持 Passkey,请使用 Chrome / Safari / Edge" : "Passkey 需要在安全环境下使用(HTTPS,或 localhost)";
1041
1041
  }
1042
- function Lt(e) {
1042
+ function Mt(e) {
1043
1043
  return e instanceof Error ? e.name === "NotAllowedError" ? "已取消操作" : e.message.includes("WebAuthn is not supported") ? se() || "当前环境不支持 Passkey" : e.name === "NotSupportedError" ? "当前设备无可用认证器" : e.message || "Passkey 操作失败" : "Passkey 操作失败";
1044
1044
  }
1045
- function Mt() {
1045
+ function Kt() {
1046
1046
  const e = navigator.userAgent;
1047
1047
  return e.includes("Chrome") ? "Chrome" : e.includes("Safari") ? "Safari" : e.includes("Firefox") ? "Firefox" : e.includes("Edge") ? "Edge" : "Browser";
1048
1048
  }
1049
- function Kt() {
1050
- return `${Mt()} - ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`;
1051
- }
1052
1049
  function Ft() {
1053
- const e = A(!1), i = qt();
1054
- async function a(d, l) {
1050
+ return `${Kt()} - ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`;
1051
+ }
1052
+ async function Ce(e, i) {
1053
+ const {
1054
+ config: a
1055
+ } = $e();
1056
+ try {
1057
+ const s = await fetch(`${a.authPrefixUrl}/passkey/auth/${e}`, {
1058
+ method: "POST",
1059
+ headers: {
1060
+ "Content-Type": "application/json",
1061
+ "app-id": a.appId
1062
+ },
1063
+ body: JSON.stringify(i ?? {})
1064
+ });
1065
+ return s.ok ? await s.json() : null;
1066
+ } catch {
1067
+ return null;
1068
+ }
1069
+ }
1070
+ function Ht() {
1071
+ const e = A(!1), i = Lt();
1072
+ async function a(d, r) {
1055
1073
  const t = se();
1056
1074
  if (t)
1057
1075
  throw new Error(t);
1058
- const h = (l == null ? void 0 : l.useBrowserAutofill) === !0;
1059
- if (h && !await Oe())
1076
+ const v = (r == null ? void 0 : r.useBrowserAutofill) === !0;
1077
+ if (v && !await De())
1060
1078
  return null;
1061
- h || (e.value = !0);
1079
+ v || (e.value = !0);
1062
1080
  try {
1063
- const {
1064
- data: g,
1065
- error: f
1066
- } = await x().auth.passkey.auth.options.post({
1081
+ const g = v ? await Ce("options", {
1067
1082
  email: (d == null ? void 0 : d.trim()) || void 0
1068
- });
1069
- if (f || !g)
1083
+ }) : (await x().auth.passkey.auth.options.post({
1084
+ email: (d == null ? void 0 : d.trim()) || void 0
1085
+ })).data;
1086
+ if (!g)
1070
1087
  return null;
1071
- const v = await Bt({
1088
+ const f = await qt({
1072
1089
  optionsJSON: g,
1073
- useBrowserAutofill: h
1090
+ useBrowserAutofill: v
1074
1091
  });
1075
- if (l != null && l.beforeVerify && !l.beforeVerify())
1092
+ if (r != null && r.beforeVerify && !r.beforeVerify())
1076
1093
  return null;
1094
+ if (v)
1095
+ return await Ce("verify", {
1096
+ response: f
1097
+ });
1077
1098
  const {
1078
- data: r,
1079
- error: p
1099
+ data: h,
1100
+ error: u
1080
1101
  } = await x().auth.passkey.auth.verify.post({
1081
- response: v
1102
+ response: f
1082
1103
  });
1083
- return p || !r ? null : r;
1104
+ return u || !h ? null : h;
1084
1105
  } finally {
1085
- h || (e.value = !1);
1106
+ v || (e.value = !1);
1086
1107
  }
1087
1108
  }
1088
- async function u(d) {
1089
- const l = se();
1090
- if (l)
1091
- throw new Error(l);
1109
+ async function s(d) {
1110
+ const r = se();
1111
+ if (r)
1112
+ throw new Error(r);
1092
1113
  e.value = !0;
1093
1114
  try {
1094
1115
  const {
1095
1116
  data: t,
1096
- error: h
1117
+ error: v
1097
1118
  } = await x().auth.passkey.register.options.post();
1098
- if (h || !t)
1119
+ if (v || !t)
1099
1120
  return !1;
1100
- const g = await Nt({
1121
+ const g = await Dt({
1101
1122
  optionsJSON: t
1102
1123
  }), {
1103
1124
  error: f
1104
1125
  } = await x().auth.passkey.register.verify.post({
1105
1126
  response: g,
1106
- name: (d == null ? void 0 : d.trim()) || Kt()
1127
+ name: (d == null ? void 0 : d.trim()) || Ft()
1107
1128
  });
1108
1129
  return !f;
1109
1130
  } finally {
1110
1131
  e.value = !1;
1111
1132
  }
1112
1133
  }
1113
- function s(d) {
1114
- return Lt(d);
1134
+ function l(d) {
1135
+ return Mt(d);
1115
1136
  }
1116
1137
  return {
1117
1138
  loading: e,
1118
1139
  supported: i,
1119
1140
  loginWithPasskey: a,
1120
- registerPasskey: u,
1121
- formatError: s,
1141
+ registerPasskey: s,
1142
+ formatError: l,
1122
1143
  getPasskeyEnvironmentIssue: se
1123
1144
  };
1124
1145
  }
1125
- const Ht = {
1146
+ const Wt = {
1126
1147
  class: "passkey-binding"
1127
- }, Wt = {
1148
+ }, Gt = {
1128
1149
  key: 0,
1129
1150
  class: "passkey-binding__issue"
1130
- }, Gt = {
1151
+ }, Yt = {
1131
1152
  key: 4,
1132
1153
  class: "passkey-binding__toolbar"
1133
- }, Yt = /* @__PURE__ */ J({
1154
+ }, Jt = /* @__PURE__ */ J({
1134
1155
  __name: "AuthkitPasskeyBinding",
1135
1156
  props: {
1136
1157
  size: {
@@ -1141,13 +1162,13 @@ const Ht = {
1141
1162
  setup(e) {
1142
1163
  const i = e, {
1143
1164
  userProfile: a
1144
- } = ne(), u = A(!1), s = A(!1), d = A([]), l = se(), {
1165
+ } = ne(), s = A(!1), l = A(!1), d = A([]), r = se(), {
1145
1166
  registerPasskey: t,
1146
- formatError: h
1147
- } = Ft(), g = A(""), f = A(!1), v = A(), r = $(() => {
1167
+ formatError: v
1168
+ } = Ht(), g = A(""), f = A(!1), h = A(), u = $(() => {
1148
1169
  var _, P;
1149
1170
  return !!((_ = a.value) != null && _.email || (P = a.value) != null && P.phone);
1150
- }), p = $(() => r.value && !v.value), S = [{
1171
+ }), p = $(() => u.value && !h.value), S = [{
1151
1172
  title: "通行密钥",
1152
1173
  dataIndex: "name",
1153
1174
  minWidth: fe.name,
@@ -1175,49 +1196,49 @@ const Ht = {
1175
1196
  cellClassName: "passkey-actions-cell"
1176
1197
  }];
1177
1198
  async function R() {
1178
- u.value = !0;
1199
+ s.value = !0;
1179
1200
  const {
1180
1201
  data: _,
1181
1202
  error: P
1182
1203
  } = await x().auth.passkey.list.post();
1183
- if (u.value = !1, P || !_) {
1204
+ if (s.value = !1, P || !_) {
1184
1205
  d.value = [];
1185
1206
  return;
1186
1207
  }
1187
1208
  d.value = _.list;
1188
1209
  }
1189
1210
  async function B() {
1190
- s.value = !0;
1211
+ l.value = !0;
1191
1212
  try {
1192
1213
  if (!await t())
1193
1214
  return;
1194
1215
  G.success("Passkey 添加成功"), await R();
1195
1216
  } catch (_) {
1196
- G.error(h(_));
1217
+ G.error(v(_));
1197
1218
  } finally {
1198
- s.value = !1;
1219
+ l.value = !1;
1199
1220
  }
1200
1221
  }
1201
1222
  function K(_) {
1202
1223
  var P, N, F;
1203
- if (g.value = _, f.value = !1, !r.value) {
1224
+ if (g.value = _, f.value = !1, !u.value) {
1204
1225
  q();
1205
1226
  return;
1206
1227
  }
1207
1228
  if ((P = a.value) != null && P.email && ((N = a.value) != null && N.phone)) {
1208
- v.value = void 0;
1229
+ h.value = void 0;
1209
1230
  return;
1210
1231
  }
1211
- v.value = (F = a.value) != null && F.email ? "email" : "phone";
1232
+ h.value = (F = a.value) != null && F.email ? "email" : "phone";
1212
1233
  }
1213
1234
  function j(_) {
1214
- v.value = _;
1235
+ h.value = _;
1215
1236
  }
1216
1237
  function V() {
1217
1238
  f.value = !0, q();
1218
1239
  }
1219
1240
  function w() {
1220
- g.value = "", f.value = !1, v.value = void 0;
1241
+ g.value = "", f.value = !1, h.value = void 0;
1221
1242
  }
1222
1243
  async function q() {
1223
1244
  if (!g.value)
@@ -1233,7 +1254,7 @@ const Ht = {
1233
1254
  R();
1234
1255
  }), (_, P) => {
1235
1256
  var N, F;
1236
- return y(), M("div", Ht, [m(n(Y), {
1257
+ return y(), M("div", Wt, [m(n(Y), {
1237
1258
  type: "info",
1238
1259
  style: {
1239
1260
  "margin-bottom": "16px"
@@ -1241,11 +1262,11 @@ const Ht = {
1241
1262
  }, {
1242
1263
  default: o(() => [...P[2] || (P[2] = [k(" Passkey 使用设备生物识别(指纹 / 面容)登录,绑定后可在登录页一键验证身份。 ", -1)])]),
1243
1264
  _: 1
1244
- }), n(l) ? (y(), M("div", Wt, U(n(l)), 1)) : E("", !0), g.value && !f.value ? (y(), I(n(Y), {
1265
+ }), n(r) ? (y(), M("div", Gt, U(n(r)), 1)) : C("", !0), g.value && !f.value ? (y(), I(n(Y), {
1245
1266
  key: 1,
1246
1267
  type: "warning",
1247
1268
  title: "移除前验证身份"
1248
- }, Ke({
1269
+ }, He({
1249
1270
  default: o(() => [P[6] || (P[6] = k(" 移除 Passkey 前请先完成身份验证。 ", -1))]),
1250
1271
  _: 2
1251
1272
  }, [p.value ? {
@@ -1261,7 +1282,7 @@ const Ht = {
1261
1282
  }, {
1262
1283
  default: o(() => [...P[3] || (P[3] = [k(" 邮箱验证 ", -1)])]),
1263
1284
  _: 1
1264
- }, 8, ["size"])) : E("", !0), (Z = n(a)) != null && Z.phone ? (y(), I(n(T), {
1285
+ }, 8, ["size"])) : C("", !0), (Z = n(a)) != null && Z.phone ? (y(), I(n(T), {
1265
1286
  key: 1,
1266
1287
  size: i.size,
1267
1288
  type: "primary",
@@ -1269,7 +1290,7 @@ const Ht = {
1269
1290
  }, {
1270
1291
  default: o(() => [...P[4] || (P[4] = [k(" 手机验证 ", -1)])]),
1271
1292
  _: 1
1272
- }, 8, ["size"])) : E("", !0), m(n(T), {
1293
+ }, 8, ["size"])) : C("", !0), m(n(T), {
1273
1294
  size: i.size,
1274
1295
  onClick: w
1275
1296
  }, {
@@ -1280,30 +1301,30 @@ const Ht = {
1280
1301
  _: 1
1281
1302
  })]),
1282
1303
  key: "0"
1283
- } : void 0]), 1024)) : E("", !0), g.value && v.value === "email" && ((N = n(a)) != null && N.email) ? (y(), I(ge, {
1304
+ } : void 0]), 1024)) : C("", !0), g.value && h.value === "email" && ((N = n(a)) != null && N.email) ? (y(), I(ge, {
1284
1305
  key: 2,
1285
1306
  size: i.size,
1286
1307
  email: n(a).email,
1287
1308
  onNext: V
1288
- }, null, 8, ["size", "email"])) : E("", !0), g.value && v.value === "phone" && ((F = n(a)) != null && F.phone) ? (y(), I(we, {
1309
+ }, null, 8, ["size", "email"])) : C("", !0), g.value && h.value === "phone" && ((F = n(a)) != null && F.phone) ? (y(), I(we, {
1289
1310
  key: 3,
1290
1311
  size: i.size,
1291
1312
  phone: n(a).phone,
1292
1313
  onNext: V
1293
- }, null, 8, ["size", "phone"])) : E("", !0), g.value ? E("", !0) : (y(), M("div", Gt, [m(n(T), {
1314
+ }, null, 8, ["size", "phone"])) : C("", !0), g.value ? C("", !0) : (y(), M("div", Yt, [m(n(T), {
1294
1315
  type: "primary",
1295
1316
  size: i.size,
1296
- loading: s.value,
1297
- disabled: !!n(l),
1317
+ loading: l.value,
1318
+ disabled: !!n(r),
1298
1319
  onClick: B
1299
1320
  }, {
1300
1321
  default: o(() => [...P[7] || (P[7] = [k(" 添加 Passkey ", -1)])]),
1301
1322
  _: 1
1302
- }, 8, ["size", "loading", "disabled"])])), g.value ? E("", !0) : (y(), I(et, {
1323
+ }, 8, ["size", "loading", "disabled"])])), g.value ? C("", !0) : (y(), I(tt, {
1303
1324
  key: 5,
1304
1325
  columns: S,
1305
1326
  data: d.value,
1306
- loading: u.value,
1327
+ loading: s.value,
1307
1328
  pagination: !1,
1308
1329
  bordered: !1,
1309
1330
  "row-key": "credentialId"
@@ -1316,7 +1337,7 @@ const Ht = {
1316
1337
  }) => [k(U(D.createdAt || "-"), 1)]),
1317
1338
  actions: o(({
1318
1339
  record: D
1319
- }) => [m(n(We), {
1340
+ }) => [m(n(Ye), {
1320
1341
  content: "确定移除此 Passkey?移除后将无法使用该设备登录",
1321
1342
  onOk: (Z) => K(D.credentialId)
1322
1343
  }, {
@@ -1334,18 +1355,18 @@ const Ht = {
1334
1355
  }, 8, ["data", "loading"]))]);
1335
1356
  };
1336
1357
  }
1337
- }), Jt = /* @__PURE__ */ X(Yt, [["__scopeId", "data-v-08d3a331"]]), jt = {
1358
+ }), jt = /* @__PURE__ */ X(Jt, [["__scopeId", "data-v-08d3a331"]]), Qt = {
1338
1359
  class: "BindEmail"
1339
- }, Qt = {
1340
- class: "content"
1341
1360
  }, Xt = {
1342
- class: "sendVerifyCodeItem"
1361
+ class: "content"
1343
1362
  }, Zt = {
1344
- class: "handle"
1363
+ class: "sendVerifyCodeItem"
1345
1364
  }, ei = {
1365
+ class: "handle"
1366
+ }, ti = {
1346
1367
  key: 0,
1347
1368
  class: "skip"
1348
- }, ti = /* @__PURE__ */ J({
1369
+ }, ii = /* @__PURE__ */ J({
1349
1370
  __name: "AuthkitBindEmail",
1350
1371
  props: {
1351
1372
  size: {
@@ -1379,24 +1400,24 @@ const Ht = {
1379
1400
  setup(e, {
1380
1401
  emit: i
1381
1402
  }) {
1382
- const a = i, u = e, s = A(), d = A(!1), l = A(), t = A({
1403
+ const a = i, s = e, l = A(), d = A(!1), r = A(), t = A({
1383
1404
  email: void 0,
1384
1405
  userToken: void 0,
1385
1406
  emailVerifyId: void 0
1386
1407
  });
1387
- async function h() {
1388
- if (!await l.value.validateField(["email"])) {
1408
+ async function v() {
1409
+ if (!await r.value.validateField(["email"])) {
1389
1410
  d.value = !0;
1390
- const r = await x().auth.verify.email.retry.post({
1411
+ const u = await x().auth.verify.email.retry.post({
1391
1412
  email: t.value.email,
1392
1413
  purpose: "bindEmail"
1393
1414
  });
1394
- d.value = !1, r.data && (t.value.emailVerifyId = r.data.emailVerifyId), ye(s.value, r);
1415
+ d.value = !1, u.data && (t.value.emailVerifyId = u.data.emailVerifyId), ye(l.value, u);
1395
1416
  }
1396
1417
  }
1397
1418
  async function g() {
1398
- l.value.validate().then((v) => {
1399
- v || a("submit", {
1419
+ r.value.validate().then((h) => {
1420
+ h || a("submit", {
1400
1421
  email: t.value.email,
1401
1422
  userToken: t.value.userToken,
1402
1423
  emailVerifyId: t.value.emailVerifyId
@@ -1406,17 +1427,17 @@ const Ht = {
1406
1427
  function f() {
1407
1428
  a("skip");
1408
1429
  }
1409
- return (v, r) => (y(), M("div", jt, [m(n(Y), {
1430
+ return (h, u) => (y(), M("div", Qt, [m(n(Y), {
1410
1431
  type: "info",
1411
- title: u.title
1432
+ title: s.title
1412
1433
  }, {
1413
- default: o(() => [k(U(u.subtitle), 1)]),
1434
+ default: o(() => [k(U(s.subtitle), 1)]),
1414
1435
  _: 1
1415
- }, 8, ["title"]), z("div", Qt, [m(n(le), {
1436
+ }, 8, ["title"]), z("div", Xt, [m(n(le), {
1416
1437
  ref_key: "formRef",
1417
- ref: l,
1438
+ ref: r,
1418
1439
  model: t.value,
1419
- size: u.size,
1440
+ size: s.size,
1420
1441
  "auto-label-width": ""
1421
1442
  }, {
1422
1443
  default: o(() => [m(n(L), {
@@ -1433,7 +1454,7 @@ const Ht = {
1433
1454
  }, {
1434
1455
  default: o(() => [m(n(Q), {
1435
1456
  modelValue: t.value.email,
1436
- "onUpdate:modelValue": r[0] || (r[0] = (p) => t.value.email = p),
1457
+ "onUpdate:modelValue": u[0] || (u[0] = (p) => t.value.email = p),
1437
1458
  placeholder: "请输入邮箱",
1438
1459
  autocomplete: "email",
1439
1460
  type: "email"
@@ -1448,41 +1469,41 @@ const Ht = {
1448
1469
  message: "请输入验证码"
1449
1470
  }]
1450
1471
  }, {
1451
- default: o(() => [z("div", Xt, [m(n(Q), {
1472
+ default: o(() => [z("div", Zt, [m(n(Q), {
1452
1473
  modelValue: t.value.userToken,
1453
- "onUpdate:modelValue": r[1] || (r[1] = (p) => t.value.userToken = p),
1474
+ "onUpdate:modelValue": u[1] || (u[1] = (p) => t.value.userToken = p),
1454
1475
  placeholder: "请输入验证码",
1455
1476
  autocomplete: "one-time-code"
1456
1477
  }, null, 8, ["modelValue"]), m(he, {
1457
1478
  ref_key: "SendVerifyCodeRef",
1458
- ref: s,
1459
- size: u.size,
1479
+ ref: l,
1480
+ size: s.size,
1460
1481
  loading: d.value,
1461
1482
  style: {
1462
1483
  "margin-left": "10px"
1463
1484
  },
1464
- onSend: h
1485
+ onSend: v
1465
1486
  }, null, 8, ["size", "loading"])])]),
1466
1487
  _: 1
1467
- }), z("div", Zt, [m(n(T), {
1488
+ }), z("div", ei, [m(n(T), {
1468
1489
  type: "primary",
1469
- loading: u.loading,
1490
+ loading: s.loading,
1470
1491
  long: "",
1471
- size: u.size,
1492
+ size: s.size,
1472
1493
  onClick: g
1473
1494
  }, {
1474
- default: o(() => [k(U(u.submitText), 1)]),
1495
+ default: o(() => [k(U(s.submitText), 1)]),
1475
1496
  _: 1
1476
1497
  }, 8, ["loading", "size"])])]),
1477
1498
  _: 1
1478
- }, 8, ["model", "size"])]), u.showSkip ? (y(), M("div", ei, [m(n(Ce), {
1499
+ }, 8, ["model", "size"])]), s.showSkip ? (y(), M("div", ti, [m(n(Re), {
1479
1500
  onClick: f
1480
1501
  }, {
1481
- default: o(() => [...r[2] || (r[2] = [k("稍后绑定", -1)])]),
1502
+ default: o(() => [...u[2] || (u[2] = [k("稍后绑定", -1)])]),
1482
1503
  _: 1
1483
- })])) : E("", !0)]));
1504
+ })])) : C("", !0)]));
1484
1505
  }
1485
- }), ii = /* @__PURE__ */ X(ti, [["__scopeId", "data-v-00ac3b6a"]]), ni = /* @__PURE__ */ J({
1506
+ }), ni = /* @__PURE__ */ X(ii, [["__scopeId", "data-v-00ac3b6a"]]), ai = /* @__PURE__ */ J({
1486
1507
  __name: "AuthkitEmailBinding",
1487
1508
  props: {
1488
1509
  size: {
@@ -1494,84 +1515,84 @@ const Ht = {
1494
1515
  const {
1495
1516
  userProfile: i,
1496
1517
  loading: a,
1497
- fetchUserProfile: u
1498
- } = ne(), s = A("hidden"), d = A(!1), l = e, t = $(() => {
1499
- var v;
1500
- return !!((v = i.value) != null && v.email) && d.value;
1518
+ fetchUserProfile: s
1519
+ } = ne(), l = A("hidden"), d = A(!1), r = e, t = $(() => {
1520
+ var h;
1521
+ return !!((h = i.value) != null && h.email) && d.value;
1501
1522
  });
1502
- function h(v) {
1503
- s.value = v;
1523
+ function v(h) {
1524
+ l.value = h;
1504
1525
  }
1505
- async function g(v) {
1526
+ async function g(h) {
1506
1527
  a.value = !0;
1507
- const r = t.value ? x().auth.users.update.myEmail.post({
1508
- email: v.email,
1509
- userToken: v.userToken,
1510
- emailVerifyId: v.emailVerifyId
1528
+ const u = t.value ? x().auth.users.update.myEmail.post({
1529
+ email: h.email,
1530
+ userToken: h.userToken,
1531
+ emailVerifyId: h.emailVerifyId
1511
1532
  }) : x().auth.auth.bind.email.post({
1512
- email: v.email,
1513
- userToken: v.userToken,
1514
- emailVerifyId: v.emailVerifyId
1533
+ email: h.email,
1534
+ userToken: h.userToken,
1535
+ emailVerifyId: h.emailVerifyId
1515
1536
  }), {
1516
1537
  error: p
1517
- } = await r;
1518
- a.value = !1, p || (G.success(t.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, u());
1538
+ } = await u;
1539
+ a.value = !1, p || (G.success(t.value ? "更改成功" : "绑定成功"), l.value = "hidden", d.value = !1, s());
1519
1540
  }
1520
1541
  function f() {
1521
- d.value = !0, s.value = "update";
1542
+ d.value = !0, l.value = "update";
1522
1543
  }
1523
1544
  return de(() => {
1524
- i.value || u();
1525
- }), (v, r) => {
1545
+ i.value || s();
1546
+ }), (h, u) => {
1526
1547
  var p, S, R;
1527
- return y(), M(ie, null, [(p = n(i)) != null && p.email && s.value === "hidden" ? (y(), I(n(Y), {
1548
+ return y(), M(ie, null, [(p = n(i)) != null && p.email && l.value === "hidden" ? (y(), I(n(Y), {
1528
1549
  key: 0,
1529
1550
  title: "更改邮箱"
1530
1551
  }, {
1531
1552
  action: o(() => [m(n(T), {
1532
- size: l.size,
1553
+ size: r.size,
1533
1554
  type: "primary",
1534
- onClick: r[0] || (r[0] = (B) => h("verify"))
1555
+ onClick: u[0] || (u[0] = (B) => v("verify"))
1535
1556
  }, {
1536
- default: o(() => [...r[1] || (r[1] = [k("更改邮箱", -1)])]),
1557
+ default: o(() => [...u[1] || (u[1] = [k("更改邮箱", -1)])]),
1537
1558
  _: 1
1538
1559
  }, 8, ["size"])]),
1539
- default: o(() => [k(U(`您绑定的邮箱为 ${n(Re)(n(i).email)}`) + " ", 1)]),
1560
+ default: o(() => [k(U(`您绑定的邮箱为 ${n(Se)(n(i).email)}`) + " ", 1)]),
1540
1561
  _: 1
1541
- })) : E("", !0), !((S = n(i)) != null && S.email) || s.value === "update" ? (y(), I(ii, {
1562
+ })) : C("", !0), !((S = n(i)) != null && S.email) || l.value === "update" ? (y(), I(ni, {
1542
1563
  key: 1,
1543
1564
  loading: n(a),
1544
- size: l.size,
1565
+ size: r.size,
1545
1566
  title: t.value ? "更改邮箱" : "绑定邮箱",
1546
1567
  subtitle: t.value ? "请输入新的邮箱并完成验证" : "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录",
1547
1568
  "submit-text": t.value ? "更改邮箱" : "绑定邮箱",
1548
1569
  onSubmit: g
1549
- }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : E("", !0), s.value === "verify" ? (y(), I(ge, {
1570
+ }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : C("", !0), l.value === "verify" ? (y(), I(ge, {
1550
1571
  key: 2,
1551
- size: l.size,
1572
+ size: r.size,
1552
1573
  email: (R = n(i)) == null ? void 0 : R.email,
1553
1574
  onNext: f
1554
- }, null, 8, ["size", "email"])) : E("", !0)], 64);
1575
+ }, null, 8, ["size", "email"])) : C("", !0)], 64);
1555
1576
  };
1556
1577
  }
1557
- }), ai = {
1578
+ }), oi = {
1558
1579
  class: "BindPhone"
1559
- }, oi = {
1560
- class: "header"
1561
1580
  }, si = {
1562
- class: "title"
1581
+ class: "header"
1563
1582
  }, li = {
1564
- class: "subtitle"
1583
+ class: "title"
1565
1584
  }, ri = {
1566
- class: "content"
1585
+ class: "subtitle"
1567
1586
  }, ui = {
1568
- class: "sendVerifyCodeItem"
1587
+ class: "content"
1569
1588
  }, di = {
1570
- class: "handle"
1589
+ class: "sendVerifyCodeItem"
1571
1590
  }, ci = {
1591
+ class: "handle"
1592
+ }, fi = {
1572
1593
  key: 0,
1573
1594
  class: "skip"
1574
- }, fi = /* @__PURE__ */ J({
1595
+ }, pi = /* @__PURE__ */ J({
1575
1596
  __name: "AuthkitBindPhone",
1576
1597
  props: {
1577
1598
  size: {
@@ -1604,23 +1625,23 @@ const Ht = {
1604
1625
  setup(e, {
1605
1626
  emit: i
1606
1627
  }) {
1607
- const a = i, u = e, s = A(), d = A(!1), l = A(), t = A({
1628
+ const a = i, s = e, l = A(), d = A(!1), r = A(), t = A({
1608
1629
  phone: void 0,
1609
1630
  code: void 0
1610
1631
  });
1611
- async function h() {
1612
- if (!await l.value.validateField(["phone"])) {
1632
+ async function v() {
1633
+ if (!await r.value.validateField(["phone"])) {
1613
1634
  d.value = !0;
1614
- const r = await x().auth.verify.sms.send.post({
1635
+ const u = await x().auth.verify.sms.send.post({
1615
1636
  phone: t.value.phone,
1616
1637
  purpose: "bindPhone"
1617
1638
  });
1618
- d.value = !1, ye(s.value, r);
1639
+ d.value = !1, ye(l.value, u);
1619
1640
  }
1620
1641
  }
1621
1642
  async function g() {
1622
- l.value.validate().then((v) => {
1623
- v || a("submit", {
1643
+ r.value.validate().then((h) => {
1644
+ h || a("submit", {
1624
1645
  phone: t.value.phone,
1625
1646
  code: t.value.code
1626
1647
  });
@@ -1629,11 +1650,11 @@ const Ht = {
1629
1650
  function f() {
1630
1651
  a("skip");
1631
1652
  }
1632
- return (v, r) => (y(), M("div", ai, [z("div", oi, [z("h3", si, U(u.title), 1), z("p", li, U(u.subtitle), 1)]), z("div", ri, [m(n(le), {
1653
+ return (h, u) => (y(), M("div", oi, [z("div", si, [z("h3", li, U(s.title), 1), z("p", ri, U(s.subtitle), 1)]), z("div", ui, [m(n(le), {
1633
1654
  ref_key: "formRef",
1634
- ref: l,
1655
+ ref: r,
1635
1656
  model: t.value,
1636
- size: u.size,
1657
+ size: s.size,
1637
1658
  "auto-label-width": ""
1638
1659
  }, {
1639
1660
  default: o(() => [m(n(L), {
@@ -1650,7 +1671,7 @@ const Ht = {
1650
1671
  }, {
1651
1672
  default: o(() => [m(n(Q), {
1652
1673
  modelValue: t.value.phone,
1653
- "onUpdate:modelValue": r[0] || (r[0] = (p) => t.value.phone = p),
1674
+ "onUpdate:modelValue": u[0] || (u[0] = (p) => t.value.phone = p),
1654
1675
  placeholder: "请输入手机号",
1655
1676
  autocomplete: "tel",
1656
1677
  type: "tel"
@@ -1665,41 +1686,41 @@ const Ht = {
1665
1686
  message: "请输入验证码"
1666
1687
  }]
1667
1688
  }, {
1668
- default: o(() => [z("div", ui, [m(n(Q), {
1689
+ default: o(() => [z("div", di, [m(n(Q), {
1669
1690
  modelValue: t.value.code,
1670
- "onUpdate:modelValue": r[1] || (r[1] = (p) => t.value.code = p),
1691
+ "onUpdate:modelValue": u[1] || (u[1] = (p) => t.value.code = p),
1671
1692
  placeholder: "请输入验证码",
1672
1693
  autocomplete: "one-time-code"
1673
1694
  }, null, 8, ["modelValue"]), m(he, {
1674
1695
  ref_key: "SendVerifyCodeRef",
1675
- ref: s,
1676
- size: u.size,
1696
+ ref: l,
1697
+ size: s.size,
1677
1698
  loading: d.value,
1678
1699
  style: {
1679
1700
  "margin-left": "10px"
1680
1701
  },
1681
- onSend: h
1702
+ onSend: v
1682
1703
  }, null, 8, ["size", "loading"])])]),
1683
1704
  _: 1
1684
- }), z("div", di, [m(n(T), {
1705
+ }), z("div", ci, [m(n(T), {
1685
1706
  type: "primary",
1686
- loading: u.loading,
1707
+ loading: s.loading,
1687
1708
  long: "",
1688
- size: u.size,
1709
+ size: s.size,
1689
1710
  onClick: g
1690
1711
  }, {
1691
- default: o(() => [k(U(u.submitText), 1)]),
1712
+ default: o(() => [k(U(s.submitText), 1)]),
1692
1713
  _: 1
1693
1714
  }, 8, ["loading", "size"])])]),
1694
1715
  _: 1
1695
- }, 8, ["model", "size"])]), u.showSkip ? (y(), M("div", ci, [m(n(Ce), {
1716
+ }, 8, ["model", "size"])]), s.showSkip ? (y(), M("div", fi, [m(n(Re), {
1696
1717
  onClick: f
1697
1718
  }, {
1698
- default: o(() => [...r[2] || (r[2] = [k("稍后绑定", -1)])]),
1719
+ default: o(() => [...u[2] || (u[2] = [k("稍后绑定", -1)])]),
1699
1720
  _: 1
1700
- })])) : E("", !0)]));
1721
+ })])) : C("", !0)]));
1701
1722
  }
1702
- }), pi = /* @__PURE__ */ X(fi, [["__scopeId", "data-v-1db8897d"]]), mi = /* @__PURE__ */ J({
1723
+ }), mi = /* @__PURE__ */ X(pi, [["__scopeId", "data-v-1db8897d"]]), vi = /* @__PURE__ */ J({
1703
1724
  __name: "AuthkitPhoneBinding",
1704
1725
  props: {
1705
1726
  size: {
@@ -1711,45 +1732,45 @@ const Ht = {
1711
1732
  const {
1712
1733
  userProfile: i,
1713
1734
  loading: a,
1714
- fetchUserProfile: u
1715
- } = ne(), s = A("hidden"), d = A(!1), l = e, t = $(() => {
1735
+ fetchUserProfile: s
1736
+ } = ne(), l = A("hidden"), d = A(!1), r = e, t = $(() => {
1716
1737
  var p;
1717
- const r = ((p = i.value) == null ? void 0 : p.phone) || "";
1718
- return r.length < 7 ? r : `${r.slice(0, 3)}****${r.slice(-4)}`;
1719
- }), h = $(() => {
1720
- var r;
1721
- return !!((r = i.value) != null && r.phone) && d.value;
1738
+ const u = ((p = i.value) == null ? void 0 : p.phone) || "";
1739
+ return u.length < 7 ? u : `${u.slice(0, 3)}****${u.slice(-4)}`;
1740
+ }), v = $(() => {
1741
+ var u;
1742
+ return !!((u = i.value) != null && u.phone) && d.value;
1722
1743
  });
1723
- function g(r) {
1744
+ function g(u) {
1724
1745
  var p;
1725
- s.value = r, r === "update" && !((p = i.value) != null && p.phone) && (d.value = !1);
1746
+ l.value = u, u === "update" && !((p = i.value) != null && p.phone) && (d.value = !1);
1726
1747
  }
1727
- async function f(r) {
1748
+ async function f(u) {
1728
1749
  a.value = !0;
1729
- const p = h.value ? x().auth.users.update.myPhone.post({
1730
- phone: r.phone,
1731
- code: r.code
1750
+ const p = v.value ? x().auth.users.update.myPhone.post({
1751
+ phone: u.phone,
1752
+ code: u.code
1732
1753
  }) : x().auth.auth.bind.phone.post({
1733
- phone: r.phone,
1734
- code: r.code
1754
+ phone: u.phone,
1755
+ code: u.code
1735
1756
  }), {
1736
1757
  error: S
1737
1758
  } = await p;
1738
- a.value = !1, S || (G.success(h.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, u());
1759
+ a.value = !1, S || (G.success(v.value ? "更改成功" : "绑定成功"), l.value = "hidden", d.value = !1, s());
1739
1760
  }
1740
- function v() {
1741
- d.value = !0, s.value = "update";
1761
+ function h() {
1762
+ d.value = !0, l.value = "update";
1742
1763
  }
1743
1764
  return de(() => {
1744
- i.value || u();
1745
- }), (r, p) => {
1765
+ i.value || s();
1766
+ }), (u, p) => {
1746
1767
  var S, R, B;
1747
- return y(), M(ie, null, [!((S = n(i)) != null && S.phone) && s.value === "hidden" ? (y(), I(n(Y), {
1768
+ return y(), M(ie, null, [!((S = n(i)) != null && S.phone) && l.value === "hidden" ? (y(), I(n(Y), {
1748
1769
  key: 0,
1749
1770
  title: "绑定手机号"
1750
1771
  }, {
1751
1772
  action: o(() => [m(n(T), {
1752
- size: l.size,
1773
+ size: r.size,
1753
1774
  type: "primary",
1754
1775
  onClick: p[0] || (p[0] = (K) => g("update"))
1755
1776
  }, {
@@ -1758,12 +1779,12 @@ const Ht = {
1758
1779
  }, 8, ["size"])]),
1759
1780
  default: o(() => [p[3] || (p[3] = k(" 您还未绑定手机号,请点击绑定手机号。 ", -1))]),
1760
1781
  _: 1
1761
- })) : E("", !0), (R = n(i)) != null && R.phone && s.value === "hidden" ? (y(), I(n(Y), {
1782
+ })) : C("", !0), (R = n(i)) != null && R.phone && l.value === "hidden" ? (y(), I(n(Y), {
1762
1783
  key: 1,
1763
1784
  title: "已绑定手机号"
1764
1785
  }, {
1765
1786
  action: o(() => [m(n(T), {
1766
- size: l.size,
1787
+ size: r.size,
1767
1788
  type: "primary",
1768
1789
  onClick: p[1] || (p[1] = (K) => g("verify"))
1769
1790
  }, {
@@ -1772,54 +1793,54 @@ const Ht = {
1772
1793
  }, 8, ["size"])]),
1773
1794
  default: o(() => [k(U(`您绑定的手机号为 ${t.value}`) + " ", 1)]),
1774
1795
  _: 1
1775
- })) : E("", !0), s.value === "update" ? (y(), I(pi, {
1796
+ })) : C("", !0), l.value === "update" ? (y(), I(mi, {
1776
1797
  key: 2,
1777
1798
  loading: n(a),
1778
- size: l.size,
1779
- title: h.value ? "更改手机号" : "绑定手机号",
1780
- subtitle: h.value ? "请输入新的手机号并完成短信验证" : "请绑定手机号以完成账号设置",
1781
- "submit-text": h.value ? "更改手机号" : "绑定手机号",
1799
+ size: r.size,
1800
+ title: v.value ? "更改手机号" : "绑定手机号",
1801
+ subtitle: v.value ? "请输入新的手机号并完成短信验证" : "请绑定手机号以完成账号设置",
1802
+ "submit-text": v.value ? "更改手机号" : "绑定手机号",
1782
1803
  onSubmit: f
1783
- }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : E("", !0), s.value === "verify" ? (y(), I(we, {
1804
+ }, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : C("", !0), l.value === "verify" ? (y(), I(we, {
1784
1805
  key: 3,
1785
- size: l.size,
1806
+ size: r.size,
1786
1807
  phone: ((B = n(i)) == null ? void 0 : B.phone) || "",
1787
- onNext: v
1788
- }, null, 8, ["size", "phone"])) : E("", !0)], 64);
1808
+ onNext: h
1809
+ }, null, 8, ["size", "phone"])) : C("", !0)], 64);
1789
1810
  };
1790
1811
  }
1791
1812
  });
1792
- function vi() {
1813
+ function hi() {
1793
1814
  var i;
1794
1815
  return typeof window > "u" ? "" : ((i = new URLSearchParams(window.location.search).get("inviteCode")) == null ? void 0 : i.trim()) || "";
1795
1816
  }
1796
1817
  const ze = ["token", "refreshToken", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider", "expiresIn"], ue = "auth_redirect";
1797
- function hi(e) {
1818
+ function yi(e) {
1798
1819
  return ze.some((i) => e.searchParams.has(i));
1799
1820
  }
1800
- function gn(e) {
1821
+ function wn(e) {
1801
1822
  return ze.forEach((i) => e.searchParams.delete(i)), `${e.pathname}${e.search}${e.hash}`;
1802
1823
  }
1803
- function Ne() {
1824
+ function Be() {
1804
1825
  return new URL(window.location.href);
1805
1826
  }
1806
- function De() {
1807
- const e = Ne();
1827
+ function qe() {
1828
+ const e = Be();
1808
1829
  return ze.forEach((i) => e.searchParams.delete(i)), `${e.origin}${e.pathname}${e.search}${e.hash}`;
1809
1830
  }
1810
- function yi() {
1831
+ function gi() {
1811
1832
  return `${window.location.origin}/`;
1812
1833
  }
1813
- function gi() {
1834
+ function wi() {
1814
1835
  if (typeof window > "u")
1815
1836
  return;
1816
- const e = Ne();
1817
- if (hi(e))
1837
+ const e = Be();
1838
+ if (yi(e))
1818
1839
  return;
1819
1840
  const i = `${e.pathname}${e.search}${e.hash}`;
1820
1841
  sessionStorage.setItem(ue, i);
1821
1842
  }
1822
- function wn(e) {
1843
+ function bn(e) {
1823
1844
  if (!e || typeof window > "u")
1824
1845
  return null;
1825
1846
  const i = sessionStorage.getItem(ue);
@@ -1828,34 +1849,34 @@ function wn(e) {
1828
1849
  const a = window.location.pathname + window.location.search + window.location.hash;
1829
1850
  return i === a ? null : i;
1830
1851
  }
1831
- function bn(e = "/") {
1852
+ function _n(e = "/") {
1832
1853
  if (typeof window > "u")
1833
1854
  return e;
1834
1855
  const i = sessionStorage.getItem(ue);
1835
1856
  return sessionStorage.removeItem(ue), i || e;
1836
1857
  }
1837
1858
  async function ce(e, i) {
1838
- const a = Ze().config.appId;
1859
+ const a = $e().config.appId;
1839
1860
  if (!a) {
1840
1861
  console.error(`${e} OAuth 失败: appId 未配置`);
1841
1862
  return;
1842
1863
  }
1843
- gi();
1844
- const u = De(), s = (i == null ? void 0 : i.inviteCode) || vi() || void 0, d = {
1864
+ wi();
1865
+ const s = qe(), l = (i == null ? void 0 : i.inviteCode) || hi() || void 0, d = {
1845
1866
  appId: a,
1846
- inviteCode: s,
1847
- redirectUri: u,
1867
+ inviteCode: l,
1868
+ redirectUri: s,
1848
1869
  acceptedTerms: (i == null ? void 0 : i.acceptedTerms) === !0 ? !0 : void 0
1849
- }, l = {
1870
+ }, r = {
1850
1871
  github: () => x().auth.oauth.github.login.get(d),
1851
1872
  google: () => x().auth.oauth.google.login.get(d),
1852
1873
  microsoft: () => x().auth.oauth.microsoft.login.get(d),
1853
1874
  wechat: () => x().auth.oauth.wechat.login.get(d)
1854
1875
  }, {
1855
1876
  data: t,
1856
- error: h
1857
- } = await l[e]();
1858
- if (!h) {
1877
+ error: v
1878
+ } = await r[e]();
1879
+ if (!v) {
1859
1880
  if (t != null && t.redirectUri) {
1860
1881
  window.location.href = t.redirectUri;
1861
1882
  return;
@@ -1863,30 +1884,30 @@ async function ce(e, i) {
1863
1884
  console.error(`${e} OAuth 重定向URL为空`);
1864
1885
  }
1865
1886
  }
1866
- function wi(e) {
1887
+ function bi(e) {
1867
1888
  ce("github", e);
1868
1889
  }
1869
- function bi(e) {
1890
+ function _i(e) {
1870
1891
  ce("google", e);
1871
1892
  }
1872
- function _i(e) {
1893
+ function ki(e) {
1873
1894
  ce("microsoft", e);
1874
1895
  }
1875
- function ki(e) {
1896
+ function Ai(e) {
1876
1897
  ce("wechat", e);
1877
1898
  }
1878
- function Ai() {
1899
+ function zi() {
1879
1900
  return {
1880
- githubAuth: wi,
1881
- googleAuth: bi,
1882
- microsoftAuth: _i,
1883
- wechatAuth: ki,
1901
+ githubAuth: bi,
1902
+ googleAuth: _i,
1903
+ microsoftAuth: ki,
1904
+ wechatAuth: Ai,
1884
1905
  startOauth: ce,
1885
- buildLoginOauthRedirectUri: De,
1886
- buildBindOauthRedirectUri: yi
1906
+ buildLoginOauthRedirectUri: qe,
1907
+ buildBindOauthRedirectUri: gi
1887
1908
  };
1888
1909
  }
1889
- const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
1910
+ const Pi = ["src", "alt", "width", "height"], Ii = /* @__PURE__ */ J({
1890
1911
  __name: "AuthProviderIcon",
1891
1912
  props: {
1892
1913
  icon: {},
@@ -1902,7 +1923,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
1902
1923
  },
1903
1924
  setup(e) {
1904
1925
  const i = e;
1905
- return (a, u) => n(it)(i.icon) ? (y(), I(n(tt), {
1926
+ return (a, s) => n(nt)(i.icon) ? (y(), I(n(it), {
1906
1927
  key: 0,
1907
1928
  icon: i.icon,
1908
1929
  width: i.size,
@@ -1915,32 +1936,32 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
1915
1936
  width: i.size,
1916
1937
  height: i.size,
1917
1938
  class: Pe(["auth-provider-icon__image", i.class])
1918
- }, null, 10, zi)) : E("", !0);
1939
+ }, null, 10, Pi)) : C("", !0);
1919
1940
  }
1920
- }), Ii = /* @__PURE__ */ X(Pi, [["__scopeId", "data-v-1d09c1ef"]]), re = {
1941
+ }), Ci = /* @__PURE__ */ X(Ii, [["__scopeId", "data-v-1d09c1ef"]]), re = {
1921
1942
  github: "selfhst:github",
1922
1943
  google: "selfhst:google",
1923
1944
  microsoft: "selfhst:microsoft",
1924
1945
  wechat: "selfhst:wechat"
1925
- }, Ei = "selfhst:ksuite-kpaste", Ci = 32, Ri = 2, _n = Ci + Ri * 2, kn = 12, Si = 24, pe = {
1946
+ }, Ei = "selfhst:ksuite-kpaste", Ri = 32, Si = 2, kn = Ri + Si * 2, An = 12, Vi = 24, pe = {
1926
1947
  github: "GitHub",
1927
1948
  google: "Google",
1928
1949
  microsoft: "Microsoft",
1929
1950
  wechat: "微信"
1930
- }, Vi = {
1931
- class: "oauth-binding-account"
1932
1951
  }, $i = {
1952
+ class: "oauth-binding-account"
1953
+ }, Ti = {
1933
1954
  key: 1,
1934
1955
  class: "oauth-binding-account__icon"
1935
- }, Ti = {
1936
- class: "oauth-binding-account__info"
1937
1956
  }, Ui = {
1938
- class: "oauth-binding-account__provider"
1957
+ class: "oauth-binding-account__info"
1939
1958
  }, xi = {
1940
- class: "oauth-binding-account__name"
1959
+ class: "oauth-binding-account__provider"
1941
1960
  }, Oi = {
1961
+ class: "oauth-binding-account__name"
1962
+ }, Ni = {
1942
1963
  class: "oauth-binding-verify-actions"
1943
- }, Ni = /* @__PURE__ */ J({
1964
+ }, Di = /* @__PURE__ */ J({
1944
1965
  __name: "AuthkitOAuthBinding",
1945
1966
  props: {
1946
1967
  provider: {
@@ -1959,23 +1980,23 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
1959
1980
  setup(e) {
1960
1981
  const {
1961
1982
  config: i
1962
- } = Se(), a = e, {
1963
- userProfile: u,
1964
- fetchUserProfile: s
1983
+ } = Ve(), a = e, {
1984
+ userProfile: s,
1985
+ fetchUserProfile: l
1965
1986
  } = ne(), {
1966
1987
  appsData: d
1967
- } = Ve(), {
1968
- buildBindOauthRedirectUri: l
1969
- } = Ai(), t = A("hidden"), h = A(), g = A(!1);
1988
+ } = Te(), {
1989
+ buildBindOauthRedirectUri: r
1990
+ } = zi(), t = A("hidden"), v = A(), g = A(!1);
1970
1991
  let f;
1971
- const v = $(() => {
1992
+ const h = $(() => {
1972
1993
  var c;
1973
- return ((c = u.value) == null ? void 0 : c[a.provider]) || null;
1974
- }), r = $(() => {
1975
- const c = v.value;
1994
+ return ((c = s.value) == null ? void 0 : c[a.provider]) || null;
1995
+ }), u = $(() => {
1996
+ const c = h.value;
1976
1997
  return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid || a.label : "";
1977
1998
  }), p = $(() => {
1978
- const c = v.value;
1999
+ const c = h.value;
1979
2000
  return (c == null ? void 0 : c.avatar_url) || (c == null ? void 0 : c.picture) || (c == null ? void 0 : c.headimgurl) || "";
1980
2001
  }), S = $(() => re[a.provider]), R = $(() => {
1981
2002
  const c = d.value.authMethods;
@@ -1985,38 +2006,38 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
1985
2006
  return c.signUp.phone || c.login.phonePassword || c.login.phoneCode;
1986
2007
  }), K = $(() => {
1987
2008
  var c;
1988
- return R.value && !!((c = u.value) != null && c.email);
2009
+ return R.value && !!((c = s.value) != null && c.email);
1989
2010
  }), j = $(() => {
1990
2011
  var c;
1991
- return B.value && !!((c = u.value) != null && c.phone);
2012
+ return B.value && !!((c = s.value) != null && c.phone);
1992
2013
  }), V = $(() => {
1993
2014
  const c = [];
1994
2015
  return K.value && c.push("email"), j.value && c.push("phone"), c;
1995
- }), w = $(() => R.value || B.value), q = $(() => t.value !== "hidden" && V.value.length > 1 && !h.value), _ = $(() => {
2016
+ }), w = $(() => R.value || B.value), q = $(() => t.value !== "hidden" && V.value.length > 1 && !v.value), _ = $(() => {
1996
2017
  var c;
1997
- return t.value !== "hidden" && h.value === "email" && !!((c = u.value) != null && c.email);
2018
+ return t.value !== "hidden" && v.value === "email" && !!((c = s.value) != null && c.email);
1998
2019
  }), P = $(() => {
1999
2020
  var c;
2000
- return t.value !== "hidden" && h.value === "phone" && !!((c = u.value) != null && c.phone);
2021
+ return t.value !== "hidden" && v.value === "phone" && !!((c = s.value) != null && c.phone);
2001
2022
  }), N = $(() => t.value === "unbind" ? "解绑" : "绑定");
2002
2023
  function F(c) {
2003
2024
  if (c === "hidden") {
2004
- t.value = c, h.value = void 0;
2025
+ t.value = c, v.value = void 0;
2005
2026
  return;
2006
2027
  }
2007
2028
  if (!w.value) {
2008
2029
  c === "bind" && Z(), c === "unbind" && ae();
2009
2030
  return;
2010
2031
  }
2011
- const C = V.value;
2012
- if (C.length === 0) {
2032
+ const E = V.value;
2033
+ if (E.length === 0) {
2013
2034
  G.error("请先绑定应用已开启的邮箱或手机号后再操作第三方账号");
2014
2035
  return;
2015
2036
  }
2016
- t.value = c, h.value = C.length === 1 ? C[0] : void 0;
2037
+ t.value = c, v.value = E.length === 1 ? E[0] : void 0;
2017
2038
  }
2018
2039
  function D(c) {
2019
- h.value = c;
2040
+ v.value = c;
2020
2041
  }
2021
2042
  async function Z() {
2022
2043
  const c = i.appId;
@@ -2024,32 +2045,32 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2024
2045
  console.error(`${a.label} OAuth 失败: appId 未配置`);
2025
2046
  return;
2026
2047
  }
2027
- const C = l(), H = x().auth, oe = {
2048
+ const E = r(), H = x().auth, oe = {
2028
2049
  github: () => H.oauth.github.login.get({
2029
2050
  appId: c,
2030
2051
  mode: "bind",
2031
- redirectUri: C
2052
+ redirectUri: E
2032
2053
  }),
2033
2054
  google: () => H.oauth.google.login.get({
2034
2055
  appId: c,
2035
2056
  mode: "bind",
2036
- redirectUri: C
2057
+ redirectUri: E
2037
2058
  }),
2038
2059
  microsoft: () => H.oauth.microsoft.login.get({
2039
2060
  appId: c,
2040
2061
  mode: "bind",
2041
- redirectUri: C
2062
+ redirectUri: E
2042
2063
  }),
2043
2064
  wechat: () => H.oauth.wechat.login.get({
2044
2065
  appId: c,
2045
2066
  mode: "bind",
2046
- redirectUri: C
2067
+ redirectUri: E
2047
2068
  })
2048
2069
  }, {
2049
2070
  data: te,
2050
- error: Be
2071
+ error: Le
2051
2072
  } = await oe[a.provider]();
2052
- Be || !(te != null && te.redirectUri) || (g.value = !0, window.open(te.redirectUri, "_blank"));
2073
+ Le || !(te != null && te.redirectUri) || (g.value = !0, window.open(te.redirectUri, "_blank"));
2053
2074
  }
2054
2075
  async function ae() {
2055
2076
  const {
@@ -2057,106 +2078,106 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2057
2078
  } = await x().auth.users.unbind.oauth.post({
2058
2079
  provider: a.provider
2059
2080
  });
2060
- c || (G.success("解绑成功"), t.value = "hidden", s());
2081
+ c || (G.success("解绑成功"), t.value = "hidden", l());
2061
2082
  }
2062
2083
  function O() {
2063
2084
  t.value === "bind" && (t.value = "hidden", Z()), t.value === "unbind" && ae();
2064
2085
  }
2065
2086
  function b() {
2066
- g.value && s();
2087
+ g.value && l();
2067
2088
  }
2068
2089
  return de(() => {
2069
- u.value || s(), f = setInterval(b, 1e3);
2090
+ s.value || l(), f = setInterval(b, 1e3);
2070
2091
  }), Ae(() => {
2071
2092
  f && clearInterval(f);
2072
- }), (c, C) => {
2093
+ }), (c, E) => {
2073
2094
  var H, oe;
2074
- return y(), M(ie, null, [!v.value && t.value === "hidden" ? (y(), I(n(Y), {
2095
+ return y(), M(ie, null, [!h.value && t.value === "hidden" ? (y(), I(n(Y), {
2075
2096
  key: 0,
2076
2097
  title: `绑定${a.label}`
2077
2098
  }, {
2078
2099
  action: o(() => [m(n(T), {
2079
2100
  size: a.size,
2080
2101
  type: "primary",
2081
- onClick: C[0] || (C[0] = (te) => F("bind"))
2102
+ onClick: E[0] || (E[0] = (te) => F("bind"))
2082
2103
  }, {
2083
2104
  default: o(() => [k(" 绑定" + U(a.label), 1)]),
2084
2105
  _: 1
2085
2106
  }, 8, ["size"])]),
2086
2107
  default: o(() => [k(" 您还未绑定" + U(a.label) + "账号,请点击绑定。 ", 1)]),
2087
2108
  _: 1
2088
- }, 8, ["title"])) : E("", !0), v.value && t.value === "hidden" ? (y(), I(n(Y), {
2109
+ }, 8, ["title"])) : C("", !0), h.value && t.value === "hidden" ? (y(), I(n(Y), {
2089
2110
  key: 1,
2090
2111
  title: `解绑${a.label}`
2091
2112
  }, {
2092
2113
  action: o(() => [m(n(T), {
2093
2114
  size: a.size,
2094
2115
  type: "primary",
2095
- onClick: C[1] || (C[1] = (te) => F("unbind"))
2116
+ onClick: E[1] || (E[1] = (te) => F("unbind"))
2096
2117
  }, {
2097
2118
  default: o(() => [k(" 解绑" + U(a.label), 1)]),
2098
2119
  _: 1
2099
2120
  }, 8, ["size"])]),
2100
- default: o(() => [z("div", Vi, [p.value ? (y(), I(n(Ee), {
2121
+ default: o(() => [z("div", $i, [p.value ? (y(), I(n(Ee), {
2101
2122
  key: 0,
2102
2123
  class: "oauth-binding-account__avatar",
2103
2124
  "image-url": p.value,
2104
2125
  size: 42
2105
- }, null, 8, ["image-url"])) : (y(), M("div", $i, [m(Ii, {
2126
+ }, null, 8, ["image-url"])) : (y(), M("div", Ti, [m(Ci, {
2106
2127
  icon: S.value,
2107
- size: n(Si),
2128
+ size: n(Vi),
2108
2129
  alt: a.label
2109
- }, null, 8, ["icon", "size", "alt"])])), z("div", Ti, [z("div", Ui, U(a.label), 1), z("div", xi, U(r.value), 1)])])]),
2130
+ }, null, 8, ["icon", "size", "alt"])])), z("div", Ui, [z("div", xi, U(a.label), 1), z("div", Oi, U(u.value), 1)])])]),
2110
2131
  _: 1
2111
- }, 8, ["title"])) : E("", !0), q.value ? (y(), I(n(Y), {
2132
+ }, 8, ["title"])) : C("", !0), q.value ? (y(), I(n(Y), {
2112
2133
  key: 2,
2113
2134
  title: `${N.value}前验证身份`
2114
2135
  }, {
2115
- action: o(() => [z("div", Oi, [K.value ? (y(), I(n(T), {
2136
+ action: o(() => [z("div", Ni, [K.value ? (y(), I(n(T), {
2116
2137
  key: 0,
2117
2138
  size: a.size,
2118
2139
  type: "primary",
2119
- onClick: C[2] || (C[2] = (te) => D("email"))
2140
+ onClick: E[2] || (E[2] = (te) => D("email"))
2120
2141
  }, {
2121
- default: o(() => [...C[4] || (C[4] = [k(" 邮箱验证 ", -1)])]),
2142
+ default: o(() => [...E[4] || (E[4] = [k(" 邮箱验证 ", -1)])]),
2122
2143
  _: 1
2123
- }, 8, ["size"])) : E("", !0), j.value ? (y(), I(n(T), {
2144
+ }, 8, ["size"])) : C("", !0), j.value ? (y(), I(n(T), {
2124
2145
  key: 1,
2125
2146
  size: a.size,
2126
2147
  type: "primary",
2127
- onClick: C[3] || (C[3] = (te) => D("phone"))
2148
+ onClick: E[3] || (E[3] = (te) => D("phone"))
2128
2149
  }, {
2129
- default: o(() => [...C[5] || (C[5] = [k(" 手机验证 ", -1)])]),
2150
+ default: o(() => [...E[5] || (E[5] = [k(" 手机验证 ", -1)])]),
2130
2151
  _: 1
2131
- }, 8, ["size"])) : E("", !0)])]),
2132
- default: o(() => [C[6] || (C[6] = k(" 请选择一种已绑定的验证方式。 ", -1))]),
2152
+ }, 8, ["size"])) : C("", !0)])]),
2153
+ default: o(() => [E[6] || (E[6] = k(" 请选择一种已绑定的验证方式。 ", -1))]),
2133
2154
  _: 1
2134
- }, 8, ["title"])) : E("", !0), _.value ? (y(), I(ge, {
2155
+ }, 8, ["title"])) : C("", !0), _.value ? (y(), I(ge, {
2135
2156
  key: 3,
2136
2157
  size: a.size,
2137
- email: (H = n(u)) == null ? void 0 : H.email,
2158
+ email: (H = n(s)) == null ? void 0 : H.email,
2138
2159
  onNext: O
2139
- }, null, 8, ["size", "email"])) : E("", !0), P.value ? (y(), I(we, {
2160
+ }, null, 8, ["size", "email"])) : C("", !0), P.value ? (y(), I(we, {
2140
2161
  key: 4,
2141
2162
  size: a.size,
2142
- phone: ((oe = n(u)) == null ? void 0 : oe.phone) || "",
2163
+ phone: ((oe = n(s)) == null ? void 0 : oe.phone) || "",
2143
2164
  onNext: O
2144
- }, null, 8, ["size", "phone"])) : E("", !0)], 64);
2165
+ }, null, 8, ["size", "phone"])) : C("", !0)], 64);
2145
2166
  };
2146
2167
  }
2147
- }), Di = /* @__PURE__ */ X(Ni, [["__scopeId", "data-v-6b13b949"]]), Bi = {
2168
+ }), Bi = /* @__PURE__ */ X(Di, [["__scopeId", "data-v-6b13b949"]]), qi = {
2148
2169
  class: "dependency-list"
2149
- }, qi = {
2150
- class: "label"
2151
2170
  }, Li = {
2152
- class: "count"
2171
+ class: "label"
2153
2172
  }, Mi = {
2154
- class: "action-bar"
2173
+ class: "count"
2155
2174
  }, Ki = {
2156
- class: "verify-code-row"
2175
+ class: "action-bar"
2157
2176
  }, Fi = {
2158
2177
  class: "verify-code-row"
2159
- }, Hi = /* @__PURE__ */ J({
2178
+ }, Hi = {
2179
+ class: "verify-code-row"
2180
+ }, Wi = /* @__PURE__ */ J({
2160
2181
  __name: "AuthkitAccountDelete",
2161
2182
  props: {
2162
2183
  size: {
@@ -2168,22 +2189,22 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2168
2189
  setup(e, {
2169
2190
  emit: i
2170
2191
  }) {
2171
- const a = e, u = i, {
2172
- userProfile: s,
2192
+ const a = e, s = i, {
2193
+ userProfile: l,
2173
2194
  clearUserProfile: d
2174
2195
  } = ne(), {
2175
- clearAuth: l
2176
- } = at(), t = A("check"), h = A(!1), g = A([]), f = A(!1), v = A(""), r = A(0);
2196
+ clearAuth: r
2197
+ } = ot(), t = A("check"), v = A(!1), g = A([]), f = A(!1), h = A(""), u = A(0);
2177
2198
  let p = null;
2178
2199
  const S = A("email"), R = $(() => {
2179
- var C;
2180
- const O = ((C = s.value) == null ? void 0 : C.email) || "";
2200
+ var E;
2201
+ const O = ((E = l.value) == null ? void 0 : E.email) || "";
2181
2202
  if (!O) return "";
2182
2203
  const [b, c] = O.split("@");
2183
2204
  return b.length <= 2 ? O : `${b.slice(0, 2)}***@${c}`;
2184
2205
  }), B = $(() => {
2185
2206
  var b;
2186
- const O = ((b = s.value) == null ? void 0 : b.phone) || "";
2207
+ const O = ((b = l.value) == null ? void 0 : b.phone) || "";
2187
2208
  return O.length < 7 ? O : `${O.slice(0, 3)}****${O.slice(-4)}`;
2188
2209
  }), K = $(() => S.value === "email" ? `为确保账号安全,我们将向您的邮箱 ${R.value} 发送验证码` : `为确保账号安全,我们将向您的手机号 ${B.value} 发送验证码`), j = $(() => S.value === "email" ? `验证码已发送至 ${R.value},注销后该账号将无法继续登录,请谨慎操作` : `验证码已发送至 ${B.value},注销后该账号将无法继续登录,请谨慎操作`), V = A(), w = A({
2189
2210
  userToken: "",
@@ -2196,43 +2217,43 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2196
2217
  }
2197
2218
  async function P() {
2198
2219
  var O, b;
2199
- if (h.value = !0, h.value = !1, !((O = s.value) != null && O.email) && !((b = s.value) != null && b.phone)) {
2220
+ if (v.value = !0, v.value = !1, !((O = l.value) != null && O.email) && !((b = l.value) != null && b.phone)) {
2200
2221
  G.error("请先绑定邮箱或手机号后再注销账号");
2201
2222
  return;
2202
2223
  }
2203
- if (s.value.email && s.value.phone) {
2224
+ if (l.value.email && l.value.phone) {
2204
2225
  t.value = "chooseMethod";
2205
2226
  return;
2206
2227
  }
2207
- S.value = s.value.email ? "email" : "phone", t.value = "sendCode";
2228
+ S.value = l.value.email ? "email" : "phone", t.value = "sendCode";
2208
2229
  }
2209
2230
  function N(O) {
2210
2231
  S.value = O, t.value = "sendCode";
2211
2232
  }
2212
2233
  async function F() {
2213
- var c, C;
2234
+ var c, E;
2214
2235
  if (S.value === "email") {
2215
- if (!((c = s.value) != null && c.email)) {
2236
+ if (!((c = l.value) != null && c.email)) {
2216
2237
  G.error("请先绑定邮箱");
2217
2238
  return;
2218
2239
  }
2219
2240
  f.value = !0;
2220
2241
  const H = await x().auth.verify.email.retry.post({
2221
- email: s.value.email,
2242
+ email: l.value.email,
2222
2243
  purpose: "deleteAccount"
2223
2244
  });
2224
2245
  f.value = !1;
2225
2246
  const oe = ke(H);
2226
- H.data && (v.value = H.data.emailVerifyId, G.success("验证码已发送"), t.value = "confirm"), D(oe);
2247
+ H.data && (h.value = H.data.emailVerifyId, G.success("验证码已发送"), t.value = "confirm"), D(oe);
2227
2248
  return;
2228
2249
  }
2229
- if (!((C = s.value) != null && C.phone)) {
2250
+ if (!((E = l.value) != null && E.phone)) {
2230
2251
  G.error("请先绑定手机号");
2231
2252
  return;
2232
2253
  }
2233
2254
  f.value = !0;
2234
2255
  const O = await x().auth.verify.sms.send.post({
2235
- phone: s.value.phone,
2256
+ phone: l.value.phone,
2236
2257
  purpose: "deleteAccount"
2237
2258
  });
2238
2259
  f.value = !1;
@@ -2240,33 +2261,33 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2240
2261
  O.error || (G.success("验证码已发送"), t.value = "confirm"), D(b);
2241
2262
  }
2242
2263
  function D(O) {
2243
- !O || O <= 0 || (r.value = Math.ceil(O), p && clearInterval(p), p = setInterval(() => {
2244
- r.value--, r.value <= 0 && p && (clearInterval(p), p = null);
2264
+ !O || O <= 0 || (u.value = Math.ceil(O), p && clearInterval(p), p = setInterval(() => {
2265
+ u.value--, u.value <= 0 && p && (clearInterval(p), p = null);
2245
2266
  }, 1e3));
2246
2267
  }
2247
2268
  Ae(() => {
2248
2269
  p && (clearInterval(p), p = null);
2249
2270
  });
2250
2271
  async function Z() {
2251
- var C, H;
2252
- if (await ((C = V.value) == null ? void 0 : C.validate())) return;
2272
+ var E, H;
2273
+ if (await ((E = V.value) == null ? void 0 : E.validate())) return;
2253
2274
  q.value = !0;
2254
2275
  const b = S.value === "email" ? {
2255
2276
  method: "email",
2256
2277
  userToken: w.value.userToken,
2257
- emailVerifyId: v.value,
2278
+ emailVerifyId: h.value,
2258
2279
  password: w.value.password || void 0,
2259
2280
  confirmText: w.value.confirmText
2260
2281
  } : {
2261
2282
  method: "phone",
2262
- phone: (H = s.value) == null ? void 0 : H.phone,
2283
+ phone: (H = l.value) == null ? void 0 : H.phone,
2263
2284
  code: w.value.code,
2264
2285
  password: w.value.password || void 0,
2265
2286
  confirmText: w.value.confirmText
2266
2287
  }, {
2267
2288
  error: c
2268
2289
  } = await x().auth.users.deleteAccount.post(b);
2269
- q.value = !1, c || (t.value = "success", d(), l(), u("deleted"));
2290
+ q.value = !1, c || (t.value = "success", d(), r(), s("deleted"));
2270
2291
  }
2271
2292
  function ae() {
2272
2293
  window.location.href = "/";
@@ -2280,10 +2301,10 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2280
2301
  size: a.size,
2281
2302
  type: "primary",
2282
2303
  status: "danger",
2283
- loading: h.value,
2304
+ loading: v.value,
2284
2305
  onClick: P
2285
2306
  }, {
2286
- default: o(() => [k(U(h.value ? "检查中..." : "开始注销"), 1)]),
2307
+ default: o(() => [k(U(v.value ? "检查中..." : "开始注销"), 1)]),
2287
2308
  _: 1
2288
2309
  }, 8, ["size", "loading"])]),
2289
2310
  default: o(() => [b[10] || (b[10] = k(" 注销账号后,登录凭据、第三方绑定和当前登录态会被清除;历史订单、用量、审计等业务记录会保留用于对账和安全追溯。 ", -1))]),
@@ -2296,10 +2317,10 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2296
2317
  }, {
2297
2318
  default: o(() => [...b[11] || (b[11] = [k(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
2298
2319
  _: 1
2299
- }), z("div", Bi, [(y(!0), M(ie, null, Fe(g.value, (c) => (y(), M("div", {
2320
+ }), z("div", qi, [(y(!0), M(ie, null, We(g.value, (c) => (y(), M("div", {
2300
2321
  key: c.type,
2301
2322
  class: "dependency-item"
2302
- }, [z("span", qi, U(c.label), 1), z("span", Li, U(c.count) + " 个", 1)]))), 128))]), z("div", Mi, [m(n(T), {
2323
+ }, [z("span", Li, U(c.label), 1), z("span", Mi, U(c.count) + " 个", 1)]))), 128))]), z("div", Ki, [m(n(T), {
2303
2324
  size: a.size,
2304
2325
  onClick: b[0] || (b[0] = (c) => t.value = "check")
2305
2326
  }, {
@@ -2312,14 +2333,14 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2312
2333
  }, {
2313
2334
  action: o(() => [m(n(me), null, {
2314
2335
  default: o(() => {
2315
- var c, C;
2336
+ var c, E;
2316
2337
  return [m(n(T), {
2317
2338
  size: a.size,
2318
2339
  onClick: b[1] || (b[1] = (H) => t.value = "check")
2319
2340
  }, {
2320
2341
  default: o(() => [...b[13] || (b[13] = [k("取消", -1)])]),
2321
2342
  _: 1
2322
- }, 8, ["size"]), (c = n(s)) != null && c.email ? (y(), I(n(T), {
2343
+ }, 8, ["size"]), (c = n(l)) != null && c.email ? (y(), I(n(T), {
2323
2344
  key: 0,
2324
2345
  size: a.size,
2325
2346
  type: "primary",
@@ -2327,7 +2348,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2327
2348
  }, {
2328
2349
  default: o(() => [...b[14] || (b[14] = [k(" 邮箱验证 ", -1)])]),
2329
2350
  _: 1
2330
- }, 8, ["size"])) : E("", !0), (C = n(s)) != null && C.phone ? (y(), I(n(T), {
2351
+ }, 8, ["size"])) : C("", !0), (E = n(l)) != null && E.phone ? (y(), I(n(T), {
2331
2352
  key: 1,
2332
2353
  size: a.size,
2333
2354
  type: "primary",
@@ -2335,7 +2356,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2335
2356
  }, {
2336
2357
  default: o(() => [...b[15] || (b[15] = [k(" 手机验证 ", -1)])]),
2337
2358
  _: 1
2338
- }, 8, ["size"])) : E("", !0)];
2359
+ }, 8, ["size"])) : C("", !0)];
2339
2360
  }),
2340
2361
  _: 1
2341
2362
  })]),
@@ -2393,18 +2414,18 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2393
2414
  message: "请输入验证码"
2394
2415
  }]
2395
2416
  }, {
2396
- default: o(() => [z("div", Ki, [m(n(Q), {
2417
+ default: o(() => [z("div", Fi, [m(n(Q), {
2397
2418
  modelValue: w.value.userToken,
2398
- "onUpdate:modelValue": b[5] || (b[5] = (C) => w.value.userToken = C),
2419
+ "onUpdate:modelValue": b[5] || (b[5] = (E) => w.value.userToken = E),
2399
2420
  placeholder: "请输入6位验证码",
2400
2421
  "max-length": 6,
2401
2422
  "allow-clear": ""
2402
2423
  }, null, 8, ["modelValue"]), m(n(T), {
2403
- disabled: r.value > 0,
2424
+ disabled: u.value > 0,
2404
2425
  loading: f.value,
2405
2426
  onClick: F
2406
2427
  }, {
2407
- default: o(() => [k(U(r.value > 0 ? `${r.value}s 后重发` : "重新发送"), 1)]),
2428
+ default: o(() => [k(U(u.value > 0 ? `${u.value}s 后重发` : "重新发送"), 1)]),
2408
2429
  _: 1
2409
2430
  }, 8, ["disabled", "loading"])])]),
2410
2431
  _: 1
@@ -2417,21 +2438,21 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2417
2438
  message: "请输入验证码"
2418
2439
  }]
2419
2440
  }, {
2420
- default: o(() => [z("div", Fi, [m(n(Q), {
2441
+ default: o(() => [z("div", Hi, [m(n(Q), {
2421
2442
  modelValue: w.value.code,
2422
- "onUpdate:modelValue": b[6] || (b[6] = (C) => w.value.code = C),
2443
+ "onUpdate:modelValue": b[6] || (b[6] = (E) => w.value.code = E),
2423
2444
  placeholder: "请输入验证码",
2424
2445
  "allow-clear": ""
2425
2446
  }, null, 8, ["modelValue"]), m(n(T), {
2426
- disabled: r.value > 0,
2447
+ disabled: u.value > 0,
2427
2448
  loading: f.value,
2428
2449
  onClick: F
2429
2450
  }, {
2430
- default: o(() => [k(U(r.value > 0 ? `${r.value}s 后重发` : "重新发送"), 1)]),
2451
+ default: o(() => [k(U(u.value > 0 ? `${u.value}s 后重发` : "重新发送"), 1)]),
2431
2452
  _: 1
2432
2453
  }, 8, ["disabled", "loading"])])]),
2433
2454
  _: 1
2434
- })), (c = n(s)) != null && c.hasPassword ? (y(), I(n(L), {
2455
+ })), (c = n(l)) != null && c.hasPassword ? (y(), I(n(L), {
2435
2456
  key: 2,
2436
2457
  field: "password",
2437
2458
  label: "登录密码",
@@ -2440,14 +2461,14 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2440
2461
  message: "请输入密码"
2441
2462
  }]
2442
2463
  }, {
2443
- default: o(() => [m(n(Ge), {
2464
+ default: o(() => [m(n(Je), {
2444
2465
  modelValue: w.value.password,
2445
- "onUpdate:modelValue": b[7] || (b[7] = (C) => w.value.password = C),
2466
+ "onUpdate:modelValue": b[7] || (b[7] = (E) => w.value.password = E),
2446
2467
  placeholder: "请输入您的登录密码",
2447
2468
  "allow-clear": ""
2448
2469
  }, null, 8, ["modelValue"])]),
2449
2470
  _: 1
2450
- })) : E("", !0), m(n(L), {
2471
+ })) : C("", !0), m(n(L), {
2451
2472
  field: "confirmText",
2452
2473
  label: "请输入「注销」以确认",
2453
2474
  rules: [{
@@ -2459,7 +2480,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2459
2480
  }, {
2460
2481
  default: o(() => [m(n(Q), {
2461
2482
  modelValue: w.value.confirmText,
2462
- "onUpdate:modelValue": b[8] || (b[8] = (C) => w.value.confirmText = C),
2483
+ "onUpdate:modelValue": b[8] || (b[8] = (E) => w.value.confirmText = E),
2463
2484
  placeholder: "注销",
2464
2485
  "allow-clear": ""
2465
2486
  }, null, 8, ["modelValue"])]),
@@ -2467,7 +2488,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2467
2488
  }, 8, ["rules"]), m(n(L), null, {
2468
2489
  default: o(() => [m(n(me), null, {
2469
2490
  default: o(() => [m(n(T), {
2470
- onClick: b[9] || (b[9] = (C) => t.value = "check")
2491
+ onClick: b[9] || (b[9] = (E) => t.value = "check")
2471
2492
  }, {
2472
2493
  default: o(() => [...b[18] || (b[18] = [k("取消", -1)])]),
2473
2494
  _: 1
@@ -2486,7 +2507,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2486
2507
  })];
2487
2508
  }),
2488
2509
  _: 1
2489
- }, 8, ["model", "size"])], 64)) : t.value === "success" ? (y(), I(n(Ye), {
2510
+ }, 8, ["model", "size"])], 64)) : t.value === "success" ? (y(), I(n(je), {
2490
2511
  key: 5,
2491
2512
  status: "success",
2492
2513
  title: "账号已注销"
@@ -2500,29 +2521,29 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2500
2521
  _: 1
2501
2522
  })]),
2502
2523
  _: 1
2503
- })) : E("", !0);
2524
+ })) : C("", !0);
2504
2525
  }
2505
- }), Wi = /* @__PURE__ */ X(Hi, [["__scopeId", "data-v-90439767"]]), Gi = {
2526
+ }), Gi = /* @__PURE__ */ X(Wi, [["__scopeId", "data-v-90439767"]]), Yi = {
2506
2527
  class: "content"
2507
- }, Yi = {
2508
- class: "left"
2509
2528
  }, Ji = {
2529
+ class: "left"
2530
+ }, ji = {
2510
2531
  class: "right"
2511
- }, ji = /* @__PURE__ */ J({
2532
+ }, Qi = /* @__PURE__ */ J({
2512
2533
  __name: "AuthkitAppSetting",
2513
2534
  emits: ["confirm", "cancel"],
2514
2535
  setup(e, {
2515
2536
  expose: i,
2516
2537
  emit: a
2517
2538
  }) {
2518
- const u = a;
2519
- function s() {
2520
- w.value = !1, t.value = ["PersonalInformation"], u("cancel");
2539
+ const s = a;
2540
+ function l() {
2541
+ w.value = !1, t.value = ["PersonalInformation"], s("cancel");
2521
2542
  }
2522
2543
  function d() {
2523
- s();
2544
+ l();
2524
2545
  }
2525
- const l = A("large"), t = A(["PersonalInformation"]), h = [{
2546
+ const r = A("large"), t = A(["PersonalInformation"]), v = [{
2526
2547
  provider: "github",
2527
2548
  name: pe.github,
2528
2549
  meta: {
@@ -2548,16 +2569,16 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2548
2569
  }
2549
2570
  }], {
2550
2571
  appsData: g
2551
- } = Ve(), f = $(() => {
2572
+ } = Te(), f = $(() => {
2552
2573
  const _ = g.value.authMethods;
2553
2574
  return _.signUp.email || _.login.emailPassword || _.login.emailCode;
2554
- }), v = $(() => {
2575
+ }), h = $(() => {
2555
2576
  const _ = g.value.authMethods;
2556
2577
  return _.signUp.phone || _.login.phonePassword || _.login.phoneCode;
2557
- }), r = $(() => {
2578
+ }), u = $(() => {
2558
2579
  const _ = g.value.authMethods;
2559
2580
  return _.login.emailPassword || _.login.phonePassword;
2560
- }), p = $(() => r.value || f.value || v.value), S = $(() => g.value.authMethods.login.passkey), R = $(() => h.filter((_) => {
2581
+ }), p = $(() => u.value || f.value || h.value), S = $(() => g.value.authMethods.login.passkey), R = $(() => v.filter((_) => {
2561
2582
  var P, N;
2562
2583
  return (N = (P = g.value.oauth) == null ? void 0 : P[_.provider]) == null ? void 0 : N.enabled;
2563
2584
  }).map((_) => ({
@@ -2571,7 +2592,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2571
2592
  meta: {
2572
2593
  icon: "ic:baseline-email"
2573
2594
  }
2574
- }), v.value && _.push({
2595
+ }), h.value && _.push({
2575
2596
  name: "手机号",
2576
2597
  path: "PhoneBinding",
2577
2598
  meta: {
@@ -2627,7 +2648,7 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2627
2648
  const {
2628
2649
  changeType: V,
2629
2650
  show: w
2630
- } = ot(u);
2651
+ } = st(s);
2631
2652
  Ie(R, (_) => {
2632
2653
  t.value[0].startsWith("OAuthBinding:") && !_.some((P) => P.path === t.value[0]) && (t.value = ["PersonalInformation"]);
2633
2654
  }), Ie(B, (_) => {
@@ -2642,78 +2663,78 @@ const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
2642
2663
  }
2643
2664
  return i({
2644
2665
  setData: q
2645
- }), (_, P) => n(w) ? (y(), I(n(Je), {
2666
+ }), (_, P) => n(w) ? (y(), I(n(Qe), {
2646
2667
  key: 0,
2647
2668
  visible: !0,
2648
2669
  "body-class": "AppSettingbodyClass",
2649
2670
  "mask-closable": !1,
2650
2671
  footer: !1,
2651
- width: n(qe),
2652
- onCancel: s
2672
+ width: n(Me),
2673
+ onCancel: l
2653
2674
  }, {
2654
2675
  title: o(() => [...P[1] || (P[1] = [k(" 用户信息 ", -1)])]),
2655
- default: o(() => [z("div", Gi, [z("div", Yi, [m(nt, {
2676
+ default: o(() => [z("div", Yi, [z("div", Ji, [m(at, {
2656
2677
  "selected-keys": t.value,
2657
2678
  "onUpdate:selectedKeys": P[0] || (P[0] = (N) => t.value = N),
2658
2679
  menus: B.value,
2659
2680
  onChange: j
2660
- }, null, 8, ["selected-keys", "menus"])]), z("div", Ji, [t.value[0] === "PersonalInformation" ? (y(), I(_t, {
2681
+ }, null, 8, ["selected-keys", "menus"])]), z("div", ji, [t.value[0] === "PersonalInformation" ? (y(), I(kt, {
2661
2682
  key: 0,
2662
- size: l.value
2663
- }, null, 8, ["size"])) : E("", !0), t.value[0] === "EmailBinding" ? (y(), I(ni, {
2683
+ size: r.value
2684
+ }, null, 8, ["size"])) : C("", !0), t.value[0] === "EmailBinding" ? (y(), I(ai, {
2664
2685
  key: 1,
2665
- size: l.value
2666
- }, null, 8, ["size"])) : E("", !0), t.value[0] === "PhoneBinding" ? (y(), I(mi, {
2686
+ size: r.value
2687
+ }, null, 8, ["size"])) : C("", !0), t.value[0] === "PhoneBinding" ? (y(), I(vi, {
2667
2688
  key: 2,
2668
- size: l.value
2669
- }, null, 8, ["size"])) : E("", !0), t.value[0] === "SetPassword" ? (y(), I(Tt, {
2689
+ size: r.value
2690
+ }, null, 8, ["size"])) : C("", !0), t.value[0] === "SetPassword" ? (y(), I(Ut, {
2670
2691
  key: 3,
2671
- size: l.value
2672
- }, null, 8, ["size"])) : E("", !0), t.value[0] === "PasskeyBinding" ? (y(), I(Jt, {
2692
+ size: r.value
2693
+ }, null, 8, ["size"])) : C("", !0), t.value[0] === "PasskeyBinding" ? (y(), I(jt, {
2673
2694
  key: 4,
2674
- size: l.value
2675
- }, null, 8, ["size"])) : E("", !0), K.value ? (y(), I(Di, {
2695
+ size: r.value
2696
+ }, null, 8, ["size"])) : C("", !0), K.value ? (y(), I(Bi, {
2676
2697
  key: K.value.provider,
2677
2698
  provider: K.value.provider,
2678
2699
  label: K.value.name,
2679
- size: l.value
2680
- }, null, 8, ["provider", "label", "size"])) : E("", !0), t.value[0] === "AccountDelete" ? (y(), I(Wi, {
2700
+ size: r.value
2701
+ }, null, 8, ["provider", "label", "size"])) : C("", !0), t.value[0] === "AccountDelete" ? (y(), I(Gi, {
2681
2702
  key: 6,
2682
- size: l.value,
2703
+ size: r.value,
2683
2704
  onDeleted: d
2684
- }, null, 8, ["size"])) : E("", !0)])])]),
2705
+ }, null, 8, ["size"])) : C("", !0)])])]),
2685
2706
  _: 1
2686
- }, 8, ["width"])) : E("", !0);
2707
+ }, 8, ["width"])) : C("", !0);
2687
2708
  }
2688
- }), An = /* @__PURE__ */ X(ji, [["__scopeId", "data-v-ff81539f"]]);
2709
+ }), zn = /* @__PURE__ */ X(Qi, [["__scopeId", "data-v-ff81539f"]]);
2689
2710
  export {
2690
- An as A,
2691
- ii as B,
2692
- Di as O,
2693
- Jt as P,
2711
+ zn as A,
2712
+ ni as B,
2713
+ Bi as O,
2714
+ jt as P,
2694
2715
  he as S,
2695
- ni as _,
2696
- pi as a,
2716
+ ai as _,
2717
+ mi as a,
2697
2718
  ge as b,
2698
- $t as c,
2699
- _t as d,
2700
- mi as e,
2719
+ Tt as c,
2720
+ kt as d,
2721
+ vi as e,
2701
2722
  we as f,
2702
- Tt as g,
2703
- bn as h,
2704
- Ai as i,
2705
- Ri as j,
2706
- _n as k,
2707
- Ii as l,
2708
- kn as m,
2723
+ Ut as g,
2724
+ _n as h,
2725
+ zi as i,
2726
+ Si as j,
2727
+ kn as k,
2728
+ Ci as l,
2729
+ An as m,
2709
2730
  re as n,
2710
- Ci as o,
2711
- se as p,
2712
- ye as q,
2713
- vi as r,
2714
- hi as s,
2715
- gn as t,
2716
- Ft as u,
2717
- wn as v,
2718
- Si as w
2731
+ Ri as o,
2732
+ ye as p,
2733
+ se as q,
2734
+ hi as r,
2735
+ yi as s,
2736
+ wn as t,
2737
+ Ht as u,
2738
+ bn as v,
2739
+ Vi as w
2719
2740
  };