@huyooo/ui 2.0.11 → 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,20 +1,20 @@
1
- import { defineComponent as V, computed as T, openBlock as l, createElementBlock as k, normalizeStyle as G, normalizeClass as he, renderSlot as Z, createBlock as S, unref as e, createCommentVNode as I, createElementVNode as _, toDisplayString as L, ref as A, createVNode as i, withCtx as p, createTextVNode as O, watchEffect as ne, Fragment as D, renderList as re, useModel as Ue, watch as ye, mergeModels as $e, useSlots as Re, onMounted as E, onUnmounted as ue, Teleport as Te } from "vue";
2
- import { useRouter as be, useRoute as qe } from "vue-router";
1
+ import { defineComponent as V, computed as $, openBlock as o, createElementBlock as k, normalizeStyle as N, normalizeClass as be, renderSlot as Z, createBlock as S, unref as e, createCommentVNode as I, createElementVNode as _, ref as z, createVNode as i, withCtx as c, createTextVNode as T, watchEffect as ue, Fragment as H, renderList as de, useModel as $e, watch as we, toDisplayString as M, mergeModels as Re, useSlots as Te, onMounted as E, onUnmounted as ce, Teleport as qe } from "vue";
2
+ import { useRouter as _e, useRoute as Oe } from "vue-router";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import "./userMenuModal-D-nDaYqM.js";
6
- import { Message as X, Form as H, FormItem as P, Input as C, Button as B, Link as Y, Tabs as de, TabPane as ce, Checkbox as Oe, Modal as xe, List as Le, ListItem as ae, ListItemMeta as oe, Avatar as te, Alert as fe, Spin as Be, Empty as Me } from "@arco-design/web-vue";
7
- import { a as F, u as N } from "./useAuthkitAuth-cHrJMM8E.js";
8
- import { g as M, u as we } from "./apiClients-Ctcq8NZs.js";
9
- import { u as j } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
10
- import { o as ve, j as Fe, k as ge, l as _e, u as De, m as Ee, n as He, p as Q, q as Ge, i as ke, S as W, r as K, s as Se, t as ze, v as le, w as Ne, x as je, b as We } from "./AuthkitAppSetting-gE5wTmN1.js";
6
+ import { Form as G, FormItem as P, Input as C, Button as L, Link as Y, Tabs as pe, TabPane as me, Checkbox as xe, Modal as Be, Message as re, List as Le, ListItem as oe, ListItemMeta as le, Avatar as se, Alert as ge, Spin as Fe, Empty as Me } from "@arco-design/web-vue";
7
+ import { a as D, u as j } from "./useAuthkitAuth-cHrJMM8E.js";
8
+ import { g as F, u as ke } from "./apiClients-Ctcq8NZs.js";
9
+ import { u as W } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
10
+ import { o as he, j as De, k as ye, l as Se, m as Ee, n as X, i as ze, S as K, p as J, u as He, q as Ge, r as Ie, s as Ae, t as ne, v as Ne, w as je, b as We } from "./AuthkitAppSetting-BHISSsE3.js";
11
11
  import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  /* empty css */
13
13
  import "./index-Cn6LcfZO.js";
14
14
  /* empty css */
15
- import { u as Ie, L as Ke, i as Je } from "./useLegalDocs-C4qk5CTb.js";
16
- import { u as pe } from "./runtime-Dp7MgwhI.js";
17
- import { u as Ae } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
15
+ import { u as Pe, L as Ke, i as Je } from "./useLegalDocs-C4qk5CTb.js";
16
+ import { u as fe } from "./runtime-Dp7MgwhI.js";
17
+ import { u as Ve } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
18
18
  /* empty css */
19
19
  /* empty css */
20
20
  import "./CustomTable-HDwqEcmB.js";
@@ -49,38 +49,35 @@ const Ze = ["title", "aria-label", "disabled"], et = {
49
49
  }
50
50
  },
51
51
  setup(b) {
52
- const r = b, u = T(() => ({
53
- width: `${ge}px`,
54
- height: `${ge}px`,
55
- padding: `${Fe}px`,
56
- "--oauth-icon-size": `${ve}px`
52
+ const n = b, u = $(() => ({
53
+ width: `${ye}px`,
54
+ height: `${ye}px`,
55
+ padding: `${De}px`,
56
+ "--oauth-icon-size": `${he}px`
57
57
  }));
58
- return (o, h) => (l(), k("button", {
59
- class: he(["OAuthItem", {
60
- "OAuthItem--loading": r.loading
58
+ return (r, h) => (o(), k("button", {
59
+ class: be(["OAuthItem", {
60
+ "OAuthItem--loading": n.loading
61
61
  }]),
62
62
  type: "button",
63
- title: r.label,
64
- "aria-label": r.label,
65
- disabled: r.disabled || r.loading,
66
- style: G(u.value)
67
- }, [r.loading ? (l(), k("span", et)) : Z(o.$slots, "icon", {
63
+ title: n.label,
64
+ "aria-label": n.label,
65
+ disabled: n.disabled || n.loading,
66
+ style: N(u.value)
67
+ }, [n.loading ? (o(), k("span", et)) : Z(r.$slots, "icon", {
68
68
  key: 1
69
- }, () => [r.icon ? (l(), S(_e, {
69
+ }, () => [n.icon ? (o(), S(Se, {
70
70
  key: 0,
71
- icon: r.icon,
72
- size: e(ve)
71
+ icon: n.icon,
72
+ size: e(he)
73
73
  }, null, 8, ["icon", "size"])) : I("", !0)], !0)], 14, Ze));
74
74
  }
75
- }), J = /* @__PURE__ */ U(tt, [["__scopeId", "data-v-e00c1d80"]]), st = {
75
+ }), te = /* @__PURE__ */ U(tt, [["__scopeId", "data-v-e00c1d80"]]), st = {
76
76
  class: "OAuthList"
77
77
  }, it = {
78
78
  key: 0,
79
79
  class: "OAuthDivider"
80
- }, at = {
81
- key: 1,
82
- class: "OAuthHint"
83
- }, ot = /* @__PURE__ */ V({
80
+ }, at = /* @__PURE__ */ V({
84
81
  __name: "AuthkitOauthList",
85
82
  props: {
86
83
  size: {
@@ -88,97 +85,65 @@ const Ze = ["title", "aria-label", "disabled"], et = {
88
85
  default: () => "large"
89
86
  }
90
87
  },
91
- emits: ["passkeySubmit"],
92
- setup(b, {
93
- emit: r
94
- }) {
95
- const u = r, {
96
- appsData: o
97
- } = j(), {
98
- loading: h,
99
- supported: g,
100
- loginWithPasskey: a,
101
- formatError: s
102
- } = De(), {
103
- githubAuth: d,
104
- googleAuth: v,
105
- microsoftAuth: t,
106
- wechatAuth: f
107
- } = ke(), {
108
- acceptedTerms: n,
109
- ensureTermsAcceptedForSignIn: w
110
- } = F();
111
- function c($) {
112
- w() && $({
113
- acceptedTerms: n.value ? !0 : void 0
88
+ setup(b) {
89
+ const {
90
+ appsData: n
91
+ } = W(), {
92
+ githubAuth: u,
93
+ googleAuth: r,
94
+ microsoftAuth: h,
95
+ wechatAuth: g
96
+ } = ze(), {
97
+ acceptedTerms: a,
98
+ ensureTermsAcceptedForSignIn: s
99
+ } = D();
100
+ function m(d) {
101
+ s() && d({
102
+ acceptedTerms: a.value ? !0 : void 0
114
103
  });
115
104
  }
116
- const m = b, y = T(() => o.value.authMethods.login.passkey && Ee() || ""), z = T(() => {
117
- const $ = o.value.oauth, R = $.google.enabled || $.microsoft.enabled || $.github.enabled || $.wechat.enabled, x = o.value.authMethods.login.passkey;
118
- return R || x;
105
+ const p = b, t = $(() => {
106
+ const d = n.value.oauth;
107
+ return d.google.enabled || d.microsoft.enabled || d.github.enabled || d.wechat.enabled;
119
108
  });
120
- async function q() {
121
- if (w())
122
- try {
123
- const $ = await a();
124
- if (!$)
125
- return;
126
- u("passkeySubmit", $);
127
- } catch ($) {
128
- const R = s($);
129
- if ($ instanceof Error && $.name === "NotAllowedError") {
130
- X.warning(R);
131
- return;
132
- }
133
- X.error(R);
134
- }
135
- }
136
- return ($, R) => (l(), k("div", st, [z.value ? (l(), k("div", it, [...R[4] || (R[4] = [_("span", null, "其他登录方式", -1)])])) : I("", !0), _("div", {
109
+ return (d, l) => (o(), k("div", st, [t.value ? (o(), k("div", it, [...l[4] || (l[4] = [_("span", null, "其他登录方式", -1)])])) : I("", !0), _("div", {
137
110
  class: "OAuthIcons",
138
- style: G({
139
- gap: `${e(He)}px`
111
+ style: N({
112
+ gap: `${e(Ee)}px`
140
113
  })
141
- }, [e(o).oauth.google.enabled ? (l(), S(J, {
114
+ }, [e(n).oauth.google.enabled ? (o(), S(te, {
142
115
  key: 0,
143
- icon: e(Q).google,
116
+ icon: e(X).google,
144
117
  label: "Google",
145
- size: m.size,
146
- onClick: R[0] || (R[0] = (x) => c(e(v)))
147
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).oauth.github.enabled ? (l(), S(J, {
118
+ size: p.size,
119
+ onClick: l[0] || (l[0] = (y) => m(e(r)))
120
+ }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.github.enabled ? (o(), S(te, {
148
121
  key: 1,
149
- icon: e(Q).github,
122
+ icon: e(X).github,
150
123
  label: "Github",
151
- size: m.size,
152
- onClick: R[1] || (R[1] = (x) => c(e(d)))
153
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).oauth.microsoft.enabled ? (l(), S(J, {
124
+ size: p.size,
125
+ onClick: l[1] || (l[1] = (y) => m(e(u)))
126
+ }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.microsoft.enabled ? (o(), S(te, {
154
127
  key: 2,
155
- icon: e(Q).microsoft,
128
+ icon: e(X).microsoft,
156
129
  label: "Microsoft",
157
- size: m.size,
158
- onClick: R[2] || (R[2] = (x) => c(e(t)))
159
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).oauth.wechat.enabled ? (l(), S(J, {
130
+ size: p.size,
131
+ onClick: l[2] || (l[2] = (y) => m(e(h)))
132
+ }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.wechat.enabled ? (o(), S(te, {
160
133
  key: 3,
161
- icon: e(Q).wechat,
134
+ icon: e(X).wechat,
162
135
  label: "微信",
163
- size: m.size,
164
- onClick: R[3] || (R[3] = (x) => c(e(f)))
165
- }, null, 8, ["icon", "size"])) : I("", !0), e(o).authMethods.login.passkey ? (l(), S(J, {
166
- key: 4,
167
- icon: e(Ge),
168
- label: "Passkey",
169
- size: m.size,
170
- loading: e(h),
171
- disabled: !e(g),
172
- onClick: q
173
- }, null, 8, ["icon", "size", "loading", "disabled"])) : I("", !0)], 4), y.value ? (l(), k("p", at, L(y.value), 1)) : I("", !0)]));
136
+ size: p.size,
137
+ onClick: l[3] || (l[3] = (y) => m(e(g)))
138
+ }, null, 8, ["icon", "size"])) : I("", !0)], 4)]));
174
139
  }
175
- }), lt = /* @__PURE__ */ U(ot, [["__scopeId", "data-v-aa6a61de"]]), nt = {
140
+ }), ot = /* @__PURE__ */ U(at, [["__scopeId", "data-v-46484a88"]]), lt = {
176
141
  class: "content"
177
- }, rt = {
142
+ }, nt = {
178
143
  class: "sendVerifyCodeItem"
179
- }, ut = {
144
+ }, rt = {
180
145
  class: "handle"
181
- }, dt = /* @__PURE__ */ V({
146
+ }, ut = /* @__PURE__ */ V({
182
147
  __name: "AuthkitPasswordUpdateAndVerify",
183
148
  props: {
184
149
  size: {
@@ -193,38 +158,38 @@ const Ze = ["title", "aria-label", "disabled"], et = {
193
158
  },
194
159
  emits: ["signIn", "submit"],
195
160
  setup(b, {
196
- emit: r
161
+ emit: n
197
162
  }) {
198
- const u = r, o = b, h = A(), g = A(!1), a = A(), s = A({
163
+ const u = n, r = b, h = z(), g = z(!1), a = z(), s = z({
199
164
  email: void 0,
200
165
  userToken: void 0,
201
166
  emailVerifyId: void 0,
202
167
  password: void 0,
203
168
  confirmPassword: void 0
204
169
  });
205
- async function d() {
170
+ async function m() {
206
171
  if (!await a.value.validateField(["email"])) {
207
172
  g.value = !0;
208
- const f = await M().auth.verify.email.retry.post({
173
+ const d = await F().auth.verify.email.retry.post({
209
174
  email: s.value.email,
210
175
  purpose: "resetPassword"
211
176
  });
212
- g.value = !1, f.data && (s.value.emailVerifyId = f.data.emailVerifyId), K(h.value, f);
177
+ g.value = !1, d.data && (s.value.emailVerifyId = d.data.emailVerifyId), J(h.value, d);
213
178
  }
214
179
  }
215
- async function v() {
180
+ async function p() {
216
181
  a.value.validate().then((t) => {
217
182
  t || u("submit", s.value);
218
183
  });
219
184
  }
220
- return (t, f) => (l(), k("div", nt, [i(e(H), {
185
+ return (t, d) => (o(), k("div", lt, [i(e(G), {
221
186
  ref_key: "formRef",
222
187
  ref: a,
223
188
  model: s.value,
224
- size: o.size,
189
+ size: r.size,
225
190
  "auto-label-width": ""
226
191
  }, {
227
- default: p(() => [i(e(P), {
192
+ default: c(() => [i(e(P), {
228
193
  field: "email",
229
194
  label: "邮箱",
230
195
  "hide-label": "",
@@ -236,9 +201,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
236
201
  message: "请输入有效的邮箱"
237
202
  }]
238
203
  }, {
239
- default: p(() => [i(e(C), {
204
+ default: c(() => [i(e(C), {
240
205
  modelValue: s.value.email,
241
- "onUpdate:modelValue": f[0] || (f[0] = (n) => s.value.email = n),
206
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => s.value.email = l),
242
207
  placeholder: "请输入邮箱"
243
208
  }, null, 8, ["modelValue"])]),
244
209
  _: 1
@@ -251,19 +216,19 @@ const Ze = ["title", "aria-label", "disabled"], et = {
251
216
  message: "请输入验证码"
252
217
  }]
253
218
  }, {
254
- default: p(() => [_("div", rt, [i(e(C), {
219
+ default: c(() => [_("div", nt, [i(e(C), {
255
220
  modelValue: s.value.userToken,
256
- "onUpdate:modelValue": f[1] || (f[1] = (n) => s.value.userToken = n),
221
+ "onUpdate:modelValue": d[1] || (d[1] = (l) => s.value.userToken = l),
257
222
  placeholder: "请输入验证码"
258
- }, null, 8, ["modelValue"]), i(W, {
223
+ }, null, 8, ["modelValue"]), i(K, {
259
224
  ref_key: "SendVerifyCodeRef",
260
225
  ref: h,
261
- size: o.size,
226
+ size: r.size,
262
227
  loading: g.value,
263
228
  style: {
264
229
  "margin-left": "10px"
265
230
  },
266
- onSend: d
231
+ onSend: m
267
232
  }, null, 8, ["size", "loading"])])]),
268
233
  _: 1
269
234
  }), i(e(P), {
@@ -278,9 +243,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
278
243
  message: "密码不能少于10字符"
279
244
  }]
280
245
  }, {
281
- default: p(() => [i(e(C), {
246
+ default: c(() => [i(e(C), {
282
247
  modelValue: s.value.password,
283
- "onUpdate:modelValue": f[2] || (f[2] = (n) => s.value.password = n),
248
+ "onUpdate:modelValue": d[2] || (d[2] = (l) => s.value.password = l),
284
249
  placeholder: "请输入密码",
285
250
  type: "password",
286
251
  autocomplete: ""
@@ -297,37 +262,37 @@ const Ze = ["title", "aria-label", "disabled"], et = {
297
262
  minLength: 10,
298
263
  message: "确认密码不能少于10字符"
299
264
  }, {
300
- validator: (n, w) => {
301
- n !== s.value.password ? w("两次密码输入不一致,请重新输入") : w();
265
+ validator: (l, y) => {
266
+ l !== s.value.password ? y("两次密码输入不一致,请重新输入") : y();
302
267
  }
303
268
  }]
304
269
  }, {
305
- default: p(() => [i(e(C), {
270
+ default: c(() => [i(e(C), {
306
271
  modelValue: s.value.confirmPassword,
307
- "onUpdate:modelValue": f[3] || (f[3] = (n) => s.value.confirmPassword = n),
272
+ "onUpdate:modelValue": d[3] || (d[3] = (l) => s.value.confirmPassword = l),
308
273
  placeholder: "请输入确认密码密码",
309
274
  type: "password",
310
275
  autocomplete: ""
311
276
  }, null, 8, ["modelValue"])]),
312
277
  _: 1
313
- }, 8, ["rules"]), _("div", ut, [i(e(B), {
278
+ }, 8, ["rules"]), _("div", rt, [i(e(L), {
314
279
  type: "primary",
315
- loading: o.loading,
280
+ loading: r.loading,
316
281
  long: "",
317
- size: o.size,
318
- onClick: v
282
+ size: r.size,
283
+ onClick: p
319
284
  }, {
320
- default: p(() => [...f[4] || (f[4] = [O(" 提交 ", -1)])]),
285
+ default: c(() => [...d[4] || (d[4] = [T(" 提交 ", -1)])]),
321
286
  _: 1
322
287
  }, 8, ["loading", "size"])])]),
323
288
  _: 1
324
289
  }, 8, ["model", "size"])]));
325
290
  }
326
- }), ct = /* @__PURE__ */ U(dt, [["__scopeId", "data-v-4091e418"]]), pt = {
291
+ }), dt = /* @__PURE__ */ U(ut, [["__scopeId", "data-v-4091e418"]]), ct = {
327
292
  class: "content"
328
- }, mt = {
293
+ }, pt = {
329
294
  class: "sendVerifyCodeItem"
330
- }, ft = /* @__PURE__ */ V({
295
+ }, mt = /* @__PURE__ */ V({
331
296
  __name: "AuthkitPhonePasswordUpdateAndVerify",
332
297
  props: {
333
298
  size: {
@@ -342,41 +307,41 @@ const Ze = ["title", "aria-label", "disabled"], et = {
342
307
  },
343
308
  emits: ["submit"],
344
309
  setup(b, {
345
- emit: r
310
+ emit: n
346
311
  }) {
347
- const u = r, o = b, h = A(), g = A(!1), a = A(), s = A({
312
+ const u = n, r = b, h = z(), g = z(!1), a = z(), s = z({
348
313
  phone: void 0,
349
314
  code: void 0,
350
315
  password: void 0,
351
316
  confirmPassword: void 0
352
- }), d = [{
317
+ }), m = [{
353
318
  required: !0,
354
319
  message: "请输入确认密码"
355
320
  }, {
356
321
  minLength: 10,
357
322
  message: "确认密码不能少于10字符"
358
323
  }, {
359
- validator: (f, n) => {
360
- if (f !== s.value.password) {
361
- n("两次密码输入不一致,请重新输入");
324
+ validator: (d, l) => {
325
+ if (d !== s.value.password) {
326
+ l("两次密码输入不一致,请重新输入");
362
327
  return;
363
328
  }
364
- n();
329
+ l();
365
330
  }
366
331
  }];
367
- async function v() {
332
+ async function p() {
368
333
  if (!await a.value.validateField(["phone"])) {
369
334
  g.value = !0;
370
- const n = await M().auth.verify.sms.send.post({
335
+ const l = await F().auth.verify.sms.send.post({
371
336
  phone: s.value.phone,
372
337
  purpose: "resetPassword"
373
338
  });
374
- g.value = !1, K(h.value, n);
339
+ g.value = !1, J(h.value, l);
375
340
  }
376
341
  }
377
342
  async function t() {
378
- a.value.validate().then((f) => {
379
- f || u("submit", {
343
+ a.value.validate().then((d) => {
344
+ d || u("submit", {
380
345
  method: "phone",
381
346
  phone: s.value.phone,
382
347
  code: s.value.code,
@@ -384,14 +349,14 @@ const Ze = ["title", "aria-label", "disabled"], et = {
384
349
  });
385
350
  });
386
351
  }
387
- return (f, n) => (l(), k("div", pt, [i(e(H), {
352
+ return (d, l) => (o(), k("div", ct, [i(e(G), {
388
353
  ref_key: "formRef",
389
354
  ref: a,
390
355
  model: s.value,
391
- size: o.size,
356
+ size: r.size,
392
357
  "auto-label-width": ""
393
358
  }, {
394
- default: p(() => [i(e(P), {
359
+ default: c(() => [i(e(P), {
395
360
  field: "phone",
396
361
  label: "手机号",
397
362
  "hide-label": "",
@@ -403,9 +368,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
403
368
  message: "请输入有效的手机号"
404
369
  }]
405
370
  }, {
406
- default: p(() => [i(e(C), {
371
+ default: c(() => [i(e(C), {
407
372
  modelValue: s.value.phone,
408
- "onUpdate:modelValue": n[0] || (n[0] = (w) => s.value.phone = w),
373
+ "onUpdate:modelValue": l[0] || (l[0] = (y) => s.value.phone = y),
409
374
  placeholder: "请输入手机号",
410
375
  autocomplete: "tel",
411
376
  type: "tel"
@@ -420,20 +385,20 @@ const Ze = ["title", "aria-label", "disabled"], et = {
420
385
  message: "请输入验证码"
421
386
  }]
422
387
  }, {
423
- default: p(() => [_("div", mt, [i(e(C), {
388
+ default: c(() => [_("div", pt, [i(e(C), {
424
389
  modelValue: s.value.code,
425
- "onUpdate:modelValue": n[1] || (n[1] = (w) => s.value.code = w),
390
+ "onUpdate:modelValue": l[1] || (l[1] = (y) => s.value.code = y),
426
391
  placeholder: "请输入验证码",
427
392
  autocomplete: "one-time-code"
428
- }, null, 8, ["modelValue"]), i(W, {
393
+ }, null, 8, ["modelValue"]), i(K, {
429
394
  ref_key: "SendVerifyCodeRef",
430
395
  ref: h,
431
- size: o.size,
396
+ size: r.size,
432
397
  loading: g.value,
433
398
  style: {
434
399
  "margin-left": "10px"
435
400
  },
436
- onSend: v
401
+ onSend: p
437
402
  }, null, 8, ["size", "loading"])])]),
438
403
  _: 1
439
404
  }), i(e(P), {
@@ -448,9 +413,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
448
413
  message: "密码不能少于10字符"
449
414
  }]
450
415
  }, {
451
- default: p(() => [i(e(C), {
416
+ default: c(() => [i(e(C), {
452
417
  modelValue: s.value.password,
453
- "onUpdate:modelValue": n[2] || (n[2] = (w) => s.value.password = w),
418
+ "onUpdate:modelValue": l[2] || (l[2] = (y) => s.value.password = y),
454
419
  placeholder: "请输入密码",
455
420
  type: "password",
456
421
  autocomplete: "new-password"
@@ -460,60 +425,60 @@ const Ze = ["title", "aria-label", "disabled"], et = {
460
425
  field: "confirmPassword",
461
426
  label: "确认密码",
462
427
  "hide-label": "",
463
- rules: d
428
+ rules: m
464
429
  }, {
465
- default: p(() => [i(e(C), {
430
+ default: c(() => [i(e(C), {
466
431
  modelValue: s.value.confirmPassword,
467
- "onUpdate:modelValue": n[3] || (n[3] = (w) => s.value.confirmPassword = w),
432
+ "onUpdate:modelValue": l[3] || (l[3] = (y) => s.value.confirmPassword = y),
468
433
  placeholder: "请输入确认密码",
469
434
  type: "password",
470
435
  autocomplete: "new-password"
471
436
  }, null, 8, ["modelValue"])]),
472
437
  _: 1
473
- }), i(e(B), {
438
+ }), i(e(L), {
474
439
  type: "primary",
475
- loading: o.loading,
440
+ loading: r.loading,
476
441
  long: "",
477
- size: o.size,
442
+ size: r.size,
478
443
  onClick: t
479
444
  }, {
480
- default: p(() => [...n[4] || (n[4] = [O(" 提交 ", -1)])]),
445
+ default: c(() => [...l[4] || (l[4] = [T(" 提交 ", -1)])]),
481
446
  _: 1
482
447
  }, 8, ["loading", "size"])]),
483
448
  _: 1
484
449
  }, 8, ["model", "size"])]));
485
450
  }
486
- }), vt = /* @__PURE__ */ U(ft, [["__scopeId", "data-v-a01a994e"]]), gt = {
451
+ }), ft = /* @__PURE__ */ U(mt, [["__scopeId", "data-v-a01a994e"]]), vt = {
487
452
  class: "SwitchSignIn"
488
- }, ht = /* @__PURE__ */ V({
453
+ }, gt = /* @__PURE__ */ V({
489
454
  __name: "AuthkitSwitchSignIn",
490
455
  emits: ["switchSignIn"],
491
456
  setup(b, {
492
- emit: r
457
+ emit: n
493
458
  }) {
494
- const u = r;
495
- function o() {
459
+ const u = n;
460
+ function r() {
496
461
  u("switchSignIn");
497
462
  }
498
- return (h, g) => (l(), k("div", gt, [_("span", null, [g[1] || (g[1] = _("span", null, "已经有账号?", -1)), i(e(Y), {
463
+ return (h, g) => (o(), k("div", vt, [_("span", null, [g[1] || (g[1] = _("span", null, "已经有账号?", -1)), i(e(Y), {
499
464
  style: {
500
465
  padding: "0px"
501
466
  },
502
- onClick: o
467
+ onClick: r
503
468
  }, {
504
- default: p(() => [...g[0] || (g[0] = [O("去登录", -1)])]),
469
+ default: c(() => [...g[0] || (g[0] = [T("去登录", -1)])]),
505
470
  _: 1
506
471
  })])]));
507
472
  }
508
- }), me = /* @__PURE__ */ U(ht, [["__scopeId", "data-v-c09d6c18"]]), yt = {
473
+ }), ve = /* @__PURE__ */ U(gt, [["__scopeId", "data-v-c09d6c18"]]), ht = {
509
474
  class: "ResetPassword"
510
- }, bt = {
475
+ }, yt = {
511
476
  key: 0,
512
477
  class: "tabsContainer"
513
- }, wt = {
478
+ }, bt = {
514
479
  key: 3,
515
480
  class: "empty"
516
- }, _t = /* @__PURE__ */ V({
481
+ }, wt = /* @__PURE__ */ V({
517
482
  __name: "AuthkitResetPassword",
518
483
  props: {
519
484
  size: {
@@ -529,11 +494,11 @@ const Ze = ["title", "aria-label", "disabled"], et = {
529
494
  },
530
495
  emits: ["switchSignIn", "submit"],
531
496
  setup(b, {
532
- emit: r
497
+ emit: n
533
498
  }) {
534
- const u = r, o = b, {
499
+ const u = n, r = b, {
535
500
  appsData: h
536
- } = j(), g = T(() => h.value.authMethods), a = T(() => {
501
+ } = W(), g = $(() => h.value.authMethods), a = $(() => {
537
502
  const t = [];
538
503
  return g.value.login.emailPassword && t.push({
539
504
  key: "email",
@@ -542,59 +507,59 @@ const Ze = ["title", "aria-label", "disabled"], et = {
542
507
  key: "phone",
543
508
  title: "手机号找回"
544
509
  }), t;
545
- }), s = A("email");
546
- ne(() => {
510
+ }), s = z("email");
511
+ ue(() => {
547
512
  var t;
548
- a.value.some((f) => f.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
513
+ a.value.some((d) => d.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
549
514
  });
550
- function d() {
515
+ function m() {
551
516
  u("switchSignIn");
552
517
  }
553
- async function v(t) {
518
+ async function p(t) {
554
519
  u("submit", {
555
520
  method: s.value,
556
521
  ...t
557
522
  });
558
523
  }
559
- return (t, f) => (l(), k("div", yt, [a.value.length > 1 ? (l(), k("div", bt, [i(e(de), {
524
+ return (t, d) => (o(), k("div", ht, [a.value.length > 1 ? (o(), k("div", yt, [i(e(pe), {
560
525
  "active-key": s.value,
561
- "onUpdate:activeKey": f[0] || (f[0] = (n) => s.value = n)
526
+ "onUpdate:activeKey": d[0] || (d[0] = (l) => s.value = l)
562
527
  }, {
563
- default: p(() => [(l(!0), k(D, null, re(a.value, (n) => (l(), S(e(ce), {
564
- key: n.key,
565
- title: n.title
528
+ default: c(() => [(o(!0), k(H, null, de(a.value, (l) => (o(), S(e(me), {
529
+ key: l.key,
530
+ title: l.title
566
531
  }, null, 8, ["title"]))), 128))]),
567
532
  _: 1
568
- }, 8, ["active-key"])])) : I("", !0), s.value === "email" && g.value.login.emailPassword ? (l(), S(ct, {
533
+ }, 8, ["active-key"])])) : I("", !0), s.value === "email" && g.value.login.emailPassword ? (o(), S(dt, {
569
534
  key: 1,
570
535
  loading: b.loading,
571
- size: o.size,
572
- onSubmit: v
573
- }, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (l(), S(vt, {
536
+ size: r.size,
537
+ onSubmit: p
538
+ }, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (o(), S(ft, {
574
539
  key: 2,
575
540
  loading: b.loading,
576
- size: o.size,
577
- onSubmit: v
578
- }, null, 8, ["loading", "size"])) : (l(), k("div", wt, "当前应用未开放找回密码")), i(me, {
579
- onSwitchSignIn: d
541
+ size: r.size,
542
+ onSubmit: p
543
+ }, null, 8, ["loading", "size"])) : (o(), k("div", bt, "当前应用未开放找回密码")), i(ve, {
544
+ onSwitchSignIn: m
580
545
  })]));
581
546
  }
582
- }), kt = /* @__PURE__ */ U(_t, [["__scopeId", "data-v-90d789bb"]]);
583
- let se = null, ie = null;
584
- function St(b) {
585
- se = b.onPrivacyPolicy ?? null, ie = b.onUserServiceAgreement ?? null;
586
- }
587
- function zt() {
588
- se == null || se();
547
+ }), _t = /* @__PURE__ */ U(wt, [["__scopeId", "data-v-90d789bb"]]);
548
+ let ie = null, ae = null;
549
+ function kt(b) {
550
+ ie = b.onPrivacyPolicy ?? null, ae = b.onUserServiceAgreement ?? null;
589
551
  }
590
- function It() {
552
+ function St() {
591
553
  ie == null || ie();
592
554
  }
593
- const At = {
555
+ function zt() {
556
+ ae == null || ae();
557
+ }
558
+ const It = {
594
559
  key: 2
595
- }, Pt = /* @__PURE__ */ V({
560
+ }, At = /* @__PURE__ */ V({
596
561
  __name: "AuthkitServiceAgreementAndPrivacyProtection",
597
- props: /* @__PURE__ */ $e({
562
+ props: /* @__PURE__ */ Re({
598
563
  currentView: {}
599
564
  }, {
600
565
  acceptedTerms: {
@@ -606,76 +571,76 @@ const At = {
606
571
  emits: ["update:acceptedTerms"],
607
572
  setup(b) {
608
573
  const {
609
- config: r
610
- } = pe(), u = b, o = Ue(b, "acceptedTerms"), {
574
+ config: n
575
+ } = fe(), u = b, r = $e(b, "acceptedTerms"), {
611
576
  getLink: h,
612
577
  openLegalDoc: g
613
- } = Ie(), {
578
+ } = Pe(), {
614
579
  termsShaking: a,
615
580
  requiresAcceptanceForSignUp: s,
616
- requiresAcceptanceForOAuth: d,
617
- syncAcceptedTerms: v
618
- } = F();
619
- ye(o, (z) => {
620
- v(z);
581
+ requiresAcceptanceForOAuth: m,
582
+ syncAcceptedTerms: p
583
+ } = D();
584
+ we(r, (A) => {
585
+ p(A);
621
586
  });
622
- const t = T(() => {
623
- const z = h("userServiceAgreement");
624
- return z != null && z.configured ? z : void 0;
625
- }), f = T(() => {
626
- const z = h("privacyPolicy");
627
- return z != null && z.configured ? z : void 0;
628
- }), n = T(() => !!(t.value || f.value)), w = T(() => u.currentView === "signUp" ? s() : u.currentView === "signIn" ? d() : !1), c = T(() => n.value && w.value);
629
- function m() {
630
- if (r.legalDocsMode === "builtin") {
587
+ const t = $(() => {
588
+ const A = h("userServiceAgreement");
589
+ return A != null && A.configured ? A : void 0;
590
+ }), d = $(() => {
591
+ const A = h("privacyPolicy");
592
+ return A != null && A.configured ? A : void 0;
593
+ }), l = $(() => !!(t.value || d.value)), y = $(() => u.currentView === "signUp" ? s() : u.currentView === "signIn" ? m() : !1), v = $(() => l.value && y.value);
594
+ function f() {
595
+ if (n.legalDocsMode === "builtin") {
631
596
  g("userServiceAgreement");
632
597
  return;
633
598
  }
634
- It();
599
+ zt();
635
600
  }
636
- function y() {
637
- if (r.legalDocsMode === "builtin") {
601
+ function w() {
602
+ if (n.legalDocsMode === "builtin") {
638
603
  g("privacyPolicy");
639
604
  return;
640
605
  }
641
- zt();
606
+ St();
642
607
  }
643
- return (z, q) => c.value ? (l(), k("div", {
608
+ return (A, O) => v.value ? (o(), k("div", {
644
609
  key: 0,
645
- class: he(["ServiceAgreementAndPrivacyProtection", {
610
+ class: be(["ServiceAgreementAndPrivacyProtection", {
646
611
  "terms-shake": e(a)
647
612
  }])
648
- }, [n.value ? (l(), k(D, {
613
+ }, [l.value ? (o(), k(H, {
649
614
  key: 0
650
- }, [w.value ? (l(), S(e(Oe), {
615
+ }, [y.value ? (o(), S(e(xe), {
651
616
  key: 0,
652
- modelValue: o.value,
653
- "onUpdate:modelValue": q[0] || (q[0] = ($) => o.value = $),
617
+ modelValue: r.value,
618
+ "onUpdate:modelValue": O[0] || (O[0] = (x) => r.value = x),
654
619
  class: "terms-checkbox"
655
620
  }, {
656
- default: p(() => [...q[1] || (q[1] = [_("span", {
621
+ default: c(() => [...O[1] || (O[1] = [_("span", {
657
622
  class: "terms-text"
658
623
  }, "我已阅读并同意", -1)])]),
659
624
  _: 1
660
- }, 8, ["modelValue"])) : I("", !0), t.value ? (l(), S(e(Y), {
625
+ }, 8, ["modelValue"])) : I("", !0), t.value ? (o(), S(e(Y), {
661
626
  key: 1,
662
- onClick: m
627
+ onClick: f
663
628
  }, {
664
- default: p(() => [O(L(t.value.label), 1)]),
629
+ default: c(() => [T(M(t.value.label), 1)]),
665
630
  _: 1
666
- })) : I("", !0), t.value && f.value ? (l(), k("span", At, "和")) : I("", !0), f.value ? (l(), S(e(Y), {
631
+ })) : I("", !0), t.value && d.value ? (o(), k("span", It, "和")) : I("", !0), d.value ? (o(), S(e(Y), {
667
632
  key: 3,
668
- onClick: y
633
+ onClick: w
669
634
  }, {
670
- default: p(() => [O(L(f.value.label), 1)]),
635
+ default: c(() => [T(M(d.value.label), 1)]),
671
636
  _: 1
672
637
  })) : I("", !0)], 64)) : I("", !0)], 2)) : I("", !0);
673
638
  }
674
- }), ee = /* @__PURE__ */ U(Pt, [["__scopeId", "data-v-a0c2f361"]]), Vt = {
639
+ }), ee = /* @__PURE__ */ U(At, [["__scopeId", "data-v-a0c2f361"]]), Pt = {
675
640
  class: "content"
676
- }, Ct = {
641
+ }, Vt = {
677
642
  class: "handle"
678
- }, Ut = /* @__PURE__ */ V({
643
+ }, Ct = /* @__PURE__ */ V({
679
644
  __name: "AuthkitPasswordAuth",
680
645
  props: {
681
646
  size: {
@@ -694,31 +659,31 @@ const At = {
694
659
  },
695
660
  emits: ["submit"],
696
661
  setup(b, {
697
- emit: r
662
+ emit: n
698
663
  }) {
699
- const u = r, {
700
- useTermsFormField: o
701
- } = F(), {
664
+ const u = n, {
665
+ useTermsFormField: r
666
+ } = D(), {
702
667
  showTermsField: h,
703
668
  termsRules: g
704
- } = o("signIn"), a = b, s = A(), d = A({
669
+ } = r("signIn"), a = b, s = z(), m = z({
705
670
  identifier: void 0,
706
671
  password: void 0,
707
672
  acceptedTerms: !1
708
673
  });
709
- async function v() {
674
+ async function p() {
710
675
  s.value.validate().then((t) => {
711
- t || u("submit", d.value);
676
+ t || u("submit", m.value);
712
677
  });
713
678
  }
714
- return (t, f) => (l(), k("div", Vt, [i(e(H), {
679
+ return (t, d) => (o(), k("div", Pt, [i(e(G), {
715
680
  ref_key: "formRef",
716
681
  ref: s,
717
- model: d.value,
682
+ model: m.value,
718
683
  size: a.size,
719
684
  "auto-label-width": ""
720
685
  }, {
721
- default: p(() => [i(e(P), {
686
+ default: c(() => [i(e(P), {
722
687
  field: "identifier",
723
688
  label: "邮箱或手机号",
724
689
  "hide-label": "",
@@ -727,11 +692,11 @@ const At = {
727
692
  message: "请输入邮箱或手机号"
728
693
  }]
729
694
  }, {
730
- default: p(() => [i(e(C), {
731
- modelValue: d.value.identifier,
732
- "onUpdate:modelValue": f[0] || (f[0] = (n) => d.value.identifier = n),
695
+ default: c(() => [i(e(C), {
696
+ modelValue: m.value.identifier,
697
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => m.value.identifier = l),
733
698
  placeholder: a.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
734
- autocomplete: "email username"
699
+ autocomplete: "username webauthn"
735
700
  }, null, 8, ["modelValue", "placeholder"])]),
736
701
  _: 1
737
702
  }), i(e(P), {
@@ -743,32 +708,32 @@ const At = {
743
708
  message: "请输入密码"
744
709
  }]
745
710
  }, {
746
- default: p(() => [i(e(C), {
747
- modelValue: d.value.password,
748
- "onUpdate:modelValue": f[1] || (f[1] = (n) => d.value.password = n),
711
+ default: c(() => [i(e(C), {
712
+ modelValue: m.value.password,
713
+ "onUpdate:modelValue": d[1] || (d[1] = (l) => m.value.password = l),
749
714
  placeholder: "请输入密码",
750
715
  type: "password",
751
716
  autocomplete: "current-password"
752
717
  }, null, 8, ["modelValue"])]),
753
718
  _: 1
754
- }), _("div", Ct, [i(e(B), {
719
+ }), _("div", Vt, [i(e(L), {
755
720
  type: "primary",
756
721
  loading: a.loading,
757
722
  long: "",
758
723
  size: a.size,
759
- onClick: v
724
+ onClick: p
760
725
  }, {
761
- default: p(() => [...f[3] || (f[3] = [O(" 登录 ", -1)])]),
726
+ default: c(() => [...d[3] || (d[3] = [T(" 登录 ", -1)])]),
762
727
  _: 1
763
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
728
+ }, 8, ["loading", "size"]), e(h) ? (o(), S(e(P), {
764
729
  key: 0,
765
730
  field: "acceptedTerms",
766
731
  "hide-label": "",
767
732
  rules: e(g)
768
733
  }, {
769
- default: p(() => [i(ee, {
770
- "accepted-terms": d.value.acceptedTerms,
771
- "onUpdate:acceptedTerms": f[2] || (f[2] = (n) => d.value.acceptedTerms = n),
734
+ default: c(() => [i(ee, {
735
+ "accepted-terms": m.value.acceptedTerms,
736
+ "onUpdate:acceptedTerms": d[2] || (d[2] = (l) => m.value.acceptedTerms = l),
772
737
  "current-view": "signIn"
773
738
  }, null, 8, ["accepted-terms"])]),
774
739
  _: 1
@@ -776,15 +741,15 @@ const At = {
776
741
  _: 1
777
742
  }, 8, ["model", "size"])]));
778
743
  }
779
- }), $t = /* @__PURE__ */ U(Ut, [["__scopeId", "data-v-cca59a39"]]), Rt = {
744
+ }), Ut = /* @__PURE__ */ U(Ct, [["__scopeId", "data-v-1e935b15"]]), $t = {
780
745
  class: "SignInPhone"
781
- }, Tt = {
746
+ }, Rt = {
782
747
  class: "content"
783
- }, qt = {
748
+ }, Tt = {
784
749
  class: "sendVerifyCodeItem"
785
- }, Ot = {
750
+ }, qt = {
786
751
  class: "handle"
787
- }, xt = /* @__PURE__ */ V({
752
+ }, Ot = /* @__PURE__ */ V({
788
753
  __name: "AuthkitSignInPhone",
789
754
  props: {
790
755
  size: {
@@ -799,45 +764,45 @@ const At = {
799
764
  },
800
765
  emits: ["submit"],
801
766
  setup(b, {
802
- emit: r
767
+ emit: n
803
768
  }) {
804
- const u = r, {
805
- useTermsFormField: o
806
- } = F(), {
769
+ const u = n, {
770
+ useTermsFormField: r
771
+ } = D(), {
807
772
  showTermsField: h,
808
773
  termsRules: g
809
- } = o("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
774
+ } = r("signIn"), a = b, s = z(), m = z(!1), p = z(), t = z({
810
775
  phone: void 0,
811
776
  code: void 0,
812
777
  acceptedTerms: !1
813
778
  });
814
- async function f() {
815
- if (!await v.value.validateField(["phone"])) {
816
- d.value = !0;
817
- const c = await M().auth.verify.sms.send.post({
779
+ async function d() {
780
+ if (!await p.value.validateField(["phone"])) {
781
+ m.value = !0;
782
+ const v = await F().auth.verify.sms.send.post({
818
783
  phone: t.value.phone,
819
784
  purpose: "signIn"
820
785
  });
821
- d.value = !1, K(s.value, c);
786
+ m.value = !1, J(s.value, v);
822
787
  }
823
788
  }
824
- async function n() {
825
- v.value.validate().then((w) => {
826
- w || u("submit", {
789
+ async function l() {
790
+ p.value.validate().then((y) => {
791
+ y || u("submit", {
827
792
  identifier: t.value.phone,
828
793
  code: t.value.code,
829
794
  method: "code"
830
795
  });
831
796
  });
832
797
  }
833
- return (w, c) => (l(), k("div", Rt, [_("div", Tt, [i(e(H), {
798
+ return (y, v) => (o(), k("div", $t, [_("div", Rt, [i(e(G), {
834
799
  ref_key: "formRef",
835
- ref: v,
800
+ ref: p,
836
801
  model: t.value,
837
802
  size: a.size,
838
803
  "auto-label-width": ""
839
804
  }, {
840
- default: p(() => [i(e(P), {
805
+ default: c(() => [i(e(P), {
841
806
  field: "phone",
842
807
  label: "手机号",
843
808
  "hide-label": "",
@@ -849,11 +814,11 @@ const At = {
849
814
  message: "请输入有效的手机号"
850
815
  }]
851
816
  }, {
852
- default: p(() => [i(e(C), {
817
+ default: c(() => [i(e(C), {
853
818
  modelValue: t.value.phone,
854
- "onUpdate:modelValue": c[0] || (c[0] = (m) => t.value.phone = m),
819
+ "onUpdate:modelValue": v[0] || (v[0] = (f) => t.value.phone = f),
855
820
  placeholder: "请输入手机号",
856
- autocomplete: "tel",
821
+ autocomplete: "username webauthn",
857
822
  type: "tel"
858
823
  }, null, 8, ["modelValue"])]),
859
824
  _: 1
@@ -866,40 +831,40 @@ const At = {
866
831
  message: "请输入验证码"
867
832
  }]
868
833
  }, {
869
- default: p(() => [_("div", qt, [i(e(C), {
834
+ default: c(() => [_("div", Tt, [i(e(C), {
870
835
  modelValue: t.value.code,
871
- "onUpdate:modelValue": c[1] || (c[1] = (m) => t.value.code = m),
836
+ "onUpdate:modelValue": v[1] || (v[1] = (f) => t.value.code = f),
872
837
  placeholder: "请输入验证码",
873
838
  autocomplete: "one-time-code"
874
- }, null, 8, ["modelValue"]), i(W, {
839
+ }, null, 8, ["modelValue"]), i(K, {
875
840
  ref_key: "SendVerifyCodeRef",
876
841
  ref: s,
877
842
  size: a.size,
878
- loading: d.value,
843
+ loading: m.value,
879
844
  style: {
880
845
  "margin-left": "10px"
881
846
  },
882
- onSend: f
847
+ onSend: d
883
848
  }, null, 8, ["size", "loading"])])]),
884
849
  _: 1
885
- }), _("div", Ot, [i(e(B), {
850
+ }), _("div", qt, [i(e(L), {
886
851
  type: "primary",
887
852
  loading: a.loading,
888
853
  long: "",
889
854
  size: a.size,
890
- onClick: n
855
+ onClick: l
891
856
  }, {
892
- default: p(() => [...c[3] || (c[3] = [O(" 登录 ", -1)])]),
857
+ default: c(() => [...v[3] || (v[3] = [T(" 登录 ", -1)])]),
893
858
  _: 1
894
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
859
+ }, 8, ["loading", "size"]), e(h) ? (o(), S(e(P), {
895
860
  key: 0,
896
861
  field: "acceptedTerms",
897
862
  "hide-label": "",
898
863
  rules: e(g)
899
864
  }, {
900
- default: p(() => [i(ee, {
865
+ default: c(() => [i(ee, {
901
866
  "accepted-terms": t.value.acceptedTerms,
902
- "onUpdate:acceptedTerms": c[2] || (c[2] = (m) => t.value.acceptedTerms = m),
867
+ "onUpdate:acceptedTerms": v[2] || (v[2] = (f) => t.value.acceptedTerms = f),
903
868
  "current-view": "signIn"
904
869
  }, null, 8, ["accepted-terms"])]),
905
870
  _: 1
@@ -907,13 +872,13 @@ const At = {
907
872
  _: 1
908
873
  }, 8, ["model", "size"])])]));
909
874
  }
910
- }), Lt = /* @__PURE__ */ U(xt, [["__scopeId", "data-v-ef67e91c"]]), Bt = {
875
+ }), xt = /* @__PURE__ */ U(Ot, [["__scopeId", "data-v-fa7bbccf"]]), Bt = {
911
876
  class: "SignInEmailCode"
912
- }, Mt = {
877
+ }, Lt = {
913
878
  class: "sendVerifyCodeItem"
914
879
  }, Ft = {
915
880
  class: "handle"
916
- }, Dt = /* @__PURE__ */ V({
881
+ }, Mt = /* @__PURE__ */ V({
917
882
  __name: "AuthkitSignInEmailCode",
918
883
  props: {
919
884
  size: {
@@ -928,33 +893,33 @@ const At = {
928
893
  },
929
894
  emits: ["submit"],
930
895
  setup(b, {
931
- emit: r
896
+ emit: n
932
897
  }) {
933
- const u = r, {
934
- useTermsFormField: o
935
- } = F(), {
898
+ const u = n, {
899
+ useTermsFormField: r
900
+ } = D(), {
936
901
  showTermsField: h,
937
902
  termsRules: g
938
- } = o("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
903
+ } = r("signIn"), a = b, s = z(), m = z(!1), p = z(), t = z({
939
904
  email: void 0,
940
905
  code: void 0,
941
906
  emailVerifyId: "",
942
907
  acceptedTerms: !1
943
908
  });
944
- async function f() {
945
- var c;
946
- if (!await v.value.validateField(["email"])) {
947
- d.value = !0;
948
- const m = await M().auth.verify.email.retry.post({
909
+ async function d() {
910
+ var v;
911
+ if (!await p.value.validateField(["email"])) {
912
+ m.value = !0;
913
+ const f = await F().auth.verify.email.retry.post({
949
914
  email: t.value.email,
950
915
  purpose: "signIn"
951
916
  });
952
- d.value = !1, (c = m.data) != null && c.emailVerifyId && (t.value.emailVerifyId = m.data.emailVerifyId), K(s.value, m);
917
+ m.value = !1, (v = f.data) != null && v.emailVerifyId && (t.value.emailVerifyId = f.data.emailVerifyId), J(s.value, f);
953
918
  }
954
919
  }
955
- async function n() {
956
- v.value.validate().then((w) => {
957
- w || u("submit", {
920
+ async function l() {
921
+ p.value.validate().then((y) => {
922
+ y || u("submit", {
958
923
  identifier: t.value.email,
959
924
  code: t.value.code,
960
925
  emailVerifyId: t.value.emailVerifyId,
@@ -962,14 +927,14 @@ const At = {
962
927
  });
963
928
  });
964
929
  }
965
- return (w, c) => (l(), k("div", Bt, [i(e(H), {
930
+ return (y, v) => (o(), k("div", Bt, [i(e(G), {
966
931
  ref_key: "formRef",
967
- ref: v,
932
+ ref: p,
968
933
  model: t.value,
969
934
  size: a.size,
970
935
  "auto-label-width": ""
971
936
  }, {
972
- default: p(() => [i(e(P), {
937
+ default: c(() => [i(e(P), {
973
938
  field: "email",
974
939
  "hide-label": "",
975
940
  rules: [{
@@ -980,11 +945,11 @@ const At = {
980
945
  message: "请输入有效的邮箱"
981
946
  }]
982
947
  }, {
983
- default: p(() => [i(e(C), {
948
+ default: c(() => [i(e(C), {
984
949
  modelValue: t.value.email,
985
- "onUpdate:modelValue": c[0] || (c[0] = (m) => t.value.email = m),
950
+ "onUpdate:modelValue": v[0] || (v[0] = (f) => t.value.email = f),
986
951
  placeholder: "请输入邮箱",
987
- autocomplete: "email"
952
+ autocomplete: "username webauthn"
988
953
  }, null, 8, ["modelValue"])]),
989
954
  _: 1
990
955
  }), i(e(P), {
@@ -995,40 +960,40 @@ const At = {
995
960
  message: "请输入验证码"
996
961
  }]
997
962
  }, {
998
- default: p(() => [_("div", Mt, [i(e(C), {
963
+ default: c(() => [_("div", Lt, [i(e(C), {
999
964
  modelValue: t.value.code,
1000
- "onUpdate:modelValue": c[1] || (c[1] = (m) => t.value.code = m),
965
+ "onUpdate:modelValue": v[1] || (v[1] = (f) => t.value.code = f),
1001
966
  placeholder: "请输入验证码",
1002
967
  autocomplete: "one-time-code"
1003
- }, null, 8, ["modelValue"]), i(W, {
968
+ }, null, 8, ["modelValue"]), i(K, {
1004
969
  ref_key: "SendVerifyCodeRef",
1005
970
  ref: s,
1006
971
  size: a.size,
1007
- loading: d.value,
972
+ loading: m.value,
1008
973
  style: {
1009
974
  "margin-left": "10px"
1010
975
  },
1011
- onSend: f
976
+ onSend: d
1012
977
  }, null, 8, ["size", "loading"])])]),
1013
978
  _: 1
1014
- }), _("div", Ft, [i(e(B), {
979
+ }), _("div", Ft, [i(e(L), {
1015
980
  type: "primary",
1016
981
  loading: a.loading,
1017
982
  long: "",
1018
983
  size: a.size,
1019
- onClick: n
984
+ onClick: l
1020
985
  }, {
1021
- default: p(() => [...c[3] || (c[3] = [O(" 登录 ", -1)])]),
986
+ default: c(() => [...v[3] || (v[3] = [T(" 登录 ", -1)])]),
1022
987
  _: 1
1023
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
988
+ }, 8, ["loading", "size"]), e(h) ? (o(), S(e(P), {
1024
989
  key: 0,
1025
990
  field: "acceptedTerms",
1026
991
  "hide-label": "",
1027
992
  rules: e(g)
1028
993
  }, {
1029
- default: p(() => [i(ee, {
994
+ default: c(() => [i(ee, {
1030
995
  "accepted-terms": t.value.acceptedTerms,
1031
- "onUpdate:acceptedTerms": c[2] || (c[2] = (m) => t.value.acceptedTerms = m),
996
+ "onUpdate:acceptedTerms": v[2] || (v[2] = (f) => t.value.acceptedTerms = f),
1032
997
  "current-view": "signIn"
1033
998
  }, null, 8, ["accepted-terms"])]),
1034
999
  _: 1
@@ -1036,11 +1001,11 @@ const At = {
1036
1001
  _: 1
1037
1002
  }, 8, ["model", "size"])]));
1038
1003
  }
1039
- }), Et = /* @__PURE__ */ U(Dt, [["__scopeId", "data-v-fee4702f"]]), Ht = {
1004
+ }), Dt = /* @__PURE__ */ U(Mt, [["__scopeId", "data-v-2f4189ae"]]), Et = {
1040
1005
  class: "SwitchSignUpOrResetPassword"
1041
- }, Gt = {
1006
+ }, Ht = {
1042
1007
  key: 0
1043
- }, Nt = /* @__PURE__ */ V({
1008
+ }, Gt = /* @__PURE__ */ V({
1044
1009
  __name: "AuthkitSwitchSignUpOrResetPassword",
1045
1010
  props: {
1046
1011
  showSignUp: {
@@ -1054,39 +1019,46 @@ const At = {
1054
1019
  },
1055
1020
  emits: ["switchSignUp", "switchResetPassword"],
1056
1021
  setup(b, {
1057
- emit: r
1022
+ emit: n
1058
1023
  }) {
1059
- const u = b, o = r;
1024
+ const u = b, r = n;
1060
1025
  function h() {
1061
- o("switchSignUp");
1026
+ r("switchSignUp");
1062
1027
  }
1063
1028
  function g() {
1064
- o("switchResetPassword");
1029
+ r("switchResetPassword");
1065
1030
  }
1066
- return (a, s) => (l(), k("div", Ht, [u.showSignUp ? (l(), k("span", Gt, [s[1] || (s[1] = _("span", null, " 还没有账户?", -1)), i(e(Y), {
1031
+ return (a, s) => (o(), k("div", Et, [u.showSignUp ? (o(), k("span", Ht, [s[1] || (s[1] = _("span", null, " 还没有账户?", -1)), i(e(Y), {
1067
1032
  style: {
1068
1033
  padding: "0px"
1069
1034
  },
1070
1035
  onClick: h
1071
1036
  }, {
1072
- default: p(() => [...s[0] || (s[0] = [O("去注册?", -1)])]),
1037
+ default: c(() => [...s[0] || (s[0] = [T("去注册?", -1)])]),
1073
1038
  _: 1
1074
- })])) : I("", !0), u.showResetPassword ? (l(), S(e(Y), {
1039
+ })])) : I("", !0), u.showResetPassword ? (o(), S(e(Y), {
1075
1040
  key: 1,
1076
1041
  style: {
1077
1042
  padding: "0px"
1078
1043
  },
1079
1044
  onClick: g
1080
1045
  }, {
1081
- default: p(() => [...s[2] || (s[2] = [O(" 忘记密码? ", -1)])]),
1046
+ default: c(() => [...s[2] || (s[2] = [T(" 忘记密码? ", -1)])]),
1082
1047
  _: 1
1083
1048
  })) : I("", !0)]));
1084
1049
  }
1085
- }), jt = /* @__PURE__ */ U(Nt, [["__scopeId", "data-v-6ca7b1f2"]]), Wt = {
1050
+ }), Nt = /* @__PURE__ */ U(Gt, [["__scopeId", "data-v-6ca7b1f2"]]), jt = {
1086
1051
  class: "SignIn"
1087
- }, Kt = {
1052
+ }, Wt = {
1088
1053
  key: 0,
1089
1054
  class: "tabsContainer"
1055
+ }, Kt = {
1056
+ key: 4,
1057
+ type: "text",
1058
+ autocomplete: "username webauthn",
1059
+ tabindex: "-1",
1060
+ "aria-hidden": "true",
1061
+ class: "passkeyAutofillAnchor"
1090
1062
  }, Jt = /* @__PURE__ */ V({
1091
1063
  __name: "AuthkitSignIn",
1092
1064
  props: {
@@ -1100,78 +1072,106 @@ const At = {
1100
1072
  default: () => !0
1101
1073
  }
1102
1074
  },
1103
- emits: ["submit", "switchSignUp", "switchResetPassword"],
1075
+ emits: ["submit", "switchSignUp", "switchResetPassword", "passkeySubmit"],
1104
1076
  setup(b, {
1105
- emit: r
1077
+ emit: n
1106
1078
  }) {
1107
- const u = r, o = b, h = Re(), g = T(() => !!h.OAuth), {
1079
+ const u = n, r = b, h = Te(), g = $(() => !!h.OAuth), {
1108
1080
  appsData: a
1109
- } = j(), {
1110
- signUpAuthEnabled: s
1111
- } = F(), d = T(() => a.value.authMethods), v = T(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = T(() => d.value.login.emailPassword || d.value.login.phonePassword), f = T(() => {
1112
- const y = [];
1113
- return (d.value.login.emailPassword || d.value.login.phonePassword) && y.push({
1081
+ } = W(), {
1082
+ loginWithPasskey: s
1083
+ } = He(), {
1084
+ signUpAuthEnabled: m,
1085
+ ensureTermsAcceptedForSignIn: p
1086
+ } = D(), t = $(() => a.value.authMethods), d = $(() => m.value && (t.value.signUp.email || t.value.signUp.phone)), l = $(() => t.value.login.emailPassword || t.value.login.phonePassword), y = $(() => {
1087
+ const R = [];
1088
+ return (t.value.login.emailPassword || t.value.login.phonePassword) && R.push({
1114
1089
  key: "password",
1115
1090
  title: "密码登录"
1116
- }), d.value.login.phoneCode && y.push({
1091
+ }), t.value.login.phoneCode && R.push({
1117
1092
  key: "phoneCode",
1118
1093
  title: "手机验证码登录"
1119
- }), d.value.login.emailCode && y.push({
1094
+ }), t.value.login.emailCode && R.push({
1120
1095
  key: "emailCode",
1121
1096
  title: "邮箱验证码登录"
1122
- }), y;
1123
- }), n = A("password");
1124
- ne(() => {
1125
- var y;
1126
- f.value.some((z) => z.key === n.value) || (n.value = ((y = f.value[0]) == null ? void 0 : y.key) || "password");
1097
+ }), R;
1098
+ }), v = $(() => t.value.login.passkey && y.value.length === 0), f = z("password"), w = z(!1);
1099
+ ue(() => {
1100
+ var R;
1101
+ y.value.some((q) => q.key === f.value) || (f.value = ((R = y.value[0]) == null ? void 0 : R.key) || "password");
1127
1102
  });
1128
- function w() {
1103
+ async function A() {
1104
+ const R = Ge();
1105
+ if (R) {
1106
+ console.info(`[Passkey] ${R}`);
1107
+ return;
1108
+ }
1109
+ try {
1110
+ const q = await s(void 0, {
1111
+ useBrowserAutofill: !0,
1112
+ beforeVerify: p
1113
+ });
1114
+ if (!q)
1115
+ return;
1116
+ u("passkeySubmit", q);
1117
+ } catch (q) {
1118
+ if (q instanceof Error && (q.name === "AbortError" || q.name === "NotAllowedError")) {
1119
+ console.info(`[Passkey] ${q.message}`);
1120
+ return;
1121
+ }
1122
+ console.info("[Passkey] 条件式登录不可用", q);
1123
+ }
1124
+ }
1125
+ E(() => {
1126
+ !t.value.login.passkey || w.value || (w.value = !0, A());
1127
+ });
1128
+ function O() {
1129
1129
  u("switchSignUp");
1130
1130
  }
1131
- function c() {
1131
+ function x() {
1132
1132
  u("switchResetPassword");
1133
1133
  }
1134
- async function m(y) {
1134
+ async function B(R) {
1135
1135
  u("submit", {
1136
- method: n.value === "password" ? "password" : "code",
1137
- ...y
1136
+ method: f.value === "password" ? "password" : "code",
1137
+ ...R
1138
1138
  });
1139
1139
  }
1140
- return (y, z) => (l(), k("div", Wt, [f.value.length > 1 ? (l(), k("div", Kt, [i(e(de), {
1141
- "active-key": n.value,
1142
- "onUpdate:activeKey": z[0] || (z[0] = (q) => n.value = q)
1140
+ return (R, q) => (o(), k("div", jt, [y.value.length > 1 ? (o(), k("div", Wt, [i(e(pe), {
1141
+ "active-key": f.value,
1142
+ "onUpdate:activeKey": q[0] || (q[0] = (Q) => f.value = Q)
1143
1143
  }, {
1144
- default: p(() => [(l(!0), k(D, null, re(f.value, (q) => (l(), S(e(ce), {
1145
- key: q.key,
1146
- title: q.title
1144
+ default: c(() => [(o(!0), k(H, null, de(y.value, (Q) => (o(), S(e(me), {
1145
+ key: Q.key,
1146
+ title: Q.title
1147
1147
  }, null, 8, ["title"]))), 128))]),
1148
1148
  _: 1
1149
- }, 8, ["active-key"])])) : I("", !0), n.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (l(), S($t, {
1149
+ }, 8, ["active-key"])])) : I("", !0), f.value === "password" && (t.value.login.emailPassword || t.value.login.phonePassword) ? (o(), S(Ut, {
1150
1150
  key: 1,
1151
- loading: o.loading,
1152
- size: o.size,
1153
- "allow-phone": d.value.login.phonePassword,
1154
- onSubmit: m
1155
- }, null, 8, ["loading", "size", "allow-phone"])) : n.value === "phoneCode" ? (l(), S(Lt, {
1151
+ loading: r.loading,
1152
+ size: r.size,
1153
+ "allow-phone": t.value.login.phonePassword,
1154
+ onSubmit: B
1155
+ }, null, 8, ["loading", "size", "allow-phone"])) : f.value === "phoneCode" ? (o(), S(xt, {
1156
1156
  key: 2,
1157
- loading: o.loading,
1158
- size: o.size,
1159
- onSubmit: m
1160
- }, null, 8, ["loading", "size"])) : n.value === "emailCode" ? (l(), S(Et, {
1157
+ loading: r.loading,
1158
+ size: r.size,
1159
+ onSubmit: B
1160
+ }, null, 8, ["loading", "size"])) : f.value === "emailCode" ? (o(), S(Dt, {
1161
1161
  key: 3,
1162
- loading: o.loading,
1163
- size: o.size,
1164
- onSubmit: m
1165
- }, null, 8, ["loading", "size"])) : I("", !0), g.value ? Z(y.$slots, "OAuth", {
1166
- key: 4
1167
- }, void 0, !0) : I("", !0), i(jt, {
1168
- "show-sign-up": v.value,
1169
- "show-reset-password": t.value,
1170
- onSwitchSignUp: w,
1171
- onSwitchResetPassword: c
1162
+ loading: r.loading,
1163
+ size: r.size,
1164
+ onSubmit: B
1165
+ }, null, 8, ["loading", "size"])) : I("", !0), v.value ? (o(), k("input", Kt)) : I("", !0), g.value ? Z(R.$slots, "OAuth", {
1166
+ key: 5
1167
+ }, void 0, !0) : I("", !0), i(Nt, {
1168
+ "show-sign-up": d.value,
1169
+ "show-reset-password": l.value,
1170
+ onSwitchSignUp: O,
1171
+ onSwitchResetPassword: x
1172
1172
  }, null, 8, ["show-sign-up", "show-reset-password"])]));
1173
1173
  }
1174
- }), Qt = /* @__PURE__ */ U(Jt, [["__scopeId", "data-v-a7aef80e"]]), Xt = {
1174
+ }), Qt = /* @__PURE__ */ U(Jt, [["__scopeId", "data-v-04157b1e"]]), Xt = {
1175
1175
  class: "content"
1176
1176
  }, Yt = {
1177
1177
  class: "sendVerifyCodeItem"
@@ -1196,14 +1196,14 @@ const At = {
1196
1196
  },
1197
1197
  emits: ["submit"],
1198
1198
  setup(b, {
1199
- emit: r
1199
+ emit: n
1200
1200
  }) {
1201
- const u = r, {
1202
- useTermsFormField: o
1203
- } = F(), {
1201
+ const u = n, {
1202
+ useTermsFormField: r
1203
+ } = D(), {
1204
1204
  showTermsField: h,
1205
1205
  termsRules: g
1206
- } = o("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
1206
+ } = r("signUp"), a = b, s = z(), m = z(!1), p = z(), t = z({
1207
1207
  email: void 0,
1208
1208
  userToken: void 0,
1209
1209
  emailVerifyId: void 0,
@@ -1213,32 +1213,32 @@ const At = {
1213
1213
  acceptedTerms: !1
1214
1214
  });
1215
1215
  E(() => {
1216
- const w = Se();
1217
- w && (t.value.inviteCode = w);
1216
+ const y = Ie();
1217
+ y && (t.value.inviteCode = y);
1218
1218
  });
1219
- async function f() {
1220
- if (!await v.value.validateField(["email"])) {
1221
- d.value = !0;
1222
- const c = await M().auth.verify.email.retry.post({
1219
+ async function d() {
1220
+ if (!await p.value.validateField(["email"])) {
1221
+ m.value = !0;
1222
+ const v = await F().auth.verify.email.retry.post({
1223
1223
  email: t.value.email,
1224
1224
  purpose: a.purpose
1225
1225
  });
1226
- d.value = !1, c.data && (t.value.emailVerifyId = c.data.emailVerifyId), K(s.value, c);
1226
+ m.value = !1, v.data && (t.value.emailVerifyId = v.data.emailVerifyId), J(s.value, v);
1227
1227
  }
1228
1228
  }
1229
- async function n() {
1230
- v.value.validate().then((w) => {
1231
- w || u("submit", t.value);
1229
+ async function l() {
1230
+ p.value.validate().then((y) => {
1231
+ y || u("submit", t.value);
1232
1232
  });
1233
1233
  }
1234
- return (w, c) => (l(), k("div", Xt, [i(e(H), {
1234
+ return (y, v) => (o(), k("div", Xt, [i(e(G), {
1235
1235
  ref_key: "formRef",
1236
- ref: v,
1236
+ ref: p,
1237
1237
  model: t.value,
1238
1238
  size: a.size,
1239
1239
  "auto-label-width": ""
1240
1240
  }, {
1241
- default: p(() => [i(e(P), {
1241
+ default: c(() => [i(e(P), {
1242
1242
  field: "email",
1243
1243
  label: "邮箱",
1244
1244
  "hide-label": "",
@@ -1250,9 +1250,9 @@ const At = {
1250
1250
  message: "请输入有效的邮箱"
1251
1251
  }]
1252
1252
  }, {
1253
- default: p(() => [i(e(C), {
1253
+ default: c(() => [i(e(C), {
1254
1254
  modelValue: t.value.email,
1255
- "onUpdate:modelValue": c[0] || (c[0] = (m) => t.value.email = m),
1255
+ "onUpdate:modelValue": v[0] || (v[0] = (f) => t.value.email = f),
1256
1256
  placeholder: "请输入邮箱",
1257
1257
  autocomplete: "email username",
1258
1258
  type: "email"
@@ -1267,20 +1267,20 @@ const At = {
1267
1267
  message: "请输入验证码"
1268
1268
  }]
1269
1269
  }, {
1270
- default: p(() => [_("div", Yt, [i(e(C), {
1270
+ default: c(() => [_("div", Yt, [i(e(C), {
1271
1271
  modelValue: t.value.userToken,
1272
- "onUpdate:modelValue": c[1] || (c[1] = (m) => t.value.userToken = m),
1272
+ "onUpdate:modelValue": v[1] || (v[1] = (f) => t.value.userToken = f),
1273
1273
  placeholder: "请输入验证码",
1274
1274
  autocomplete: "one-time-code"
1275
- }, null, 8, ["modelValue"]), i(W, {
1275
+ }, null, 8, ["modelValue"]), i(K, {
1276
1276
  ref_key: "SendVerifyCodeRef",
1277
1277
  ref: s,
1278
1278
  size: a.size,
1279
- loading: d.value,
1279
+ loading: m.value,
1280
1280
  style: {
1281
1281
  "margin-left": "10px"
1282
1282
  },
1283
- onSend: f
1283
+ onSend: d
1284
1284
  }, null, 8, ["size", "loading"])])]),
1285
1285
  _: 1
1286
1286
  }), i(e(P), {
@@ -1295,9 +1295,9 @@ const At = {
1295
1295
  message: "密码不能少于10字符"
1296
1296
  }]
1297
1297
  }, {
1298
- default: p(() => [i(e(C), {
1298
+ default: c(() => [i(e(C), {
1299
1299
  modelValue: t.value.password,
1300
- "onUpdate:modelValue": c[2] || (c[2] = (m) => t.value.password = m),
1300
+ "onUpdate:modelValue": v[2] || (v[2] = (f) => t.value.password = f),
1301
1301
  placeholder: "请输入密码",
1302
1302
  type: "password",
1303
1303
  autocomplete: "new-password"
@@ -1314,14 +1314,14 @@ const At = {
1314
1314
  minLength: 10,
1315
1315
  message: "确认密码不能少于10字符"
1316
1316
  }, {
1317
- validator: (m, y) => {
1318
- m !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
1317
+ validator: (f, w) => {
1318
+ f !== t.value.password ? w("两次密码输入不一致,请重新输入") : w();
1319
1319
  }
1320
1320
  }]
1321
1321
  }, {
1322
- default: p(() => [i(e(C), {
1322
+ default: c(() => [i(e(C), {
1323
1323
  modelValue: t.value.confirmPassword,
1324
- "onUpdate:modelValue": c[3] || (c[3] = (m) => t.value.confirmPassword = m),
1324
+ "onUpdate:modelValue": v[3] || (v[3] = (f) => t.value.confirmPassword = f),
1325
1325
  placeholder: "请输入确认密码密码",
1326
1326
  type: "password",
1327
1327
  autocomplete: "new-password"
@@ -1335,31 +1335,31 @@ const At = {
1335
1335
  required: !1
1336
1336
  }]
1337
1337
  }, {
1338
- default: p(() => [i(e(C), {
1338
+ default: c(() => [i(e(C), {
1339
1339
  modelValue: t.value.inviteCode,
1340
- "onUpdate:modelValue": c[4] || (c[4] = (m) => t.value.inviteCode = m),
1340
+ "onUpdate:modelValue": v[4] || (v[4] = (f) => t.value.inviteCode = f),
1341
1341
  placeholder: "邀请码(可选)",
1342
1342
  autocomplete: "off"
1343
1343
  }, null, 8, ["modelValue"])]),
1344
1344
  _: 1
1345
- }), _("div", Zt, [i(e(B), {
1345
+ }), _("div", Zt, [i(e(L), {
1346
1346
  type: "primary",
1347
1347
  loading: a.loading,
1348
1348
  long: "",
1349
1349
  size: a.size,
1350
- onClick: n
1350
+ onClick: l
1351
1351
  }, {
1352
- default: p(() => [...c[6] || (c[6] = [O(" 提交 ", -1)])]),
1352
+ default: c(() => [...v[6] || (v[6] = [T(" 提交 ", -1)])]),
1353
1353
  _: 1
1354
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
1354
+ }, 8, ["loading", "size"]), e(h) ? (o(), S(e(P), {
1355
1355
  key: 0,
1356
1356
  field: "acceptedTerms",
1357
1357
  "hide-label": "",
1358
1358
  rules: e(g)
1359
1359
  }, {
1360
- default: p(() => [i(ee, {
1360
+ default: c(() => [i(ee, {
1361
1361
  "accepted-terms": t.value.acceptedTerms,
1362
- "onUpdate:acceptedTerms": c[5] || (c[5] = (m) => t.value.acceptedTerms = m),
1362
+ "onUpdate:acceptedTerms": v[5] || (v[5] = (f) => t.value.acceptedTerms = f),
1363
1363
  "current-view": "signUp"
1364
1364
  }, null, 8, ["accepted-terms"])]),
1365
1365
  _: 1
@@ -1395,14 +1395,14 @@ const At = {
1395
1395
  },
1396
1396
  emits: ["switchSignIn", "submit"],
1397
1397
  setup(b, {
1398
- emit: r
1398
+ emit: n
1399
1399
  }) {
1400
- const u = r, {
1401
- useTermsFormField: o
1402
- } = F(), {
1400
+ const u = n, {
1401
+ useTermsFormField: r
1402
+ } = D(), {
1403
1403
  showTermsField: h,
1404
1404
  termsRules: g
1405
- } = o("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
1405
+ } = r("signUp"), a = b, s = z(), m = z(!1), p = z(), t = z({
1406
1406
  phone: void 0,
1407
1407
  code: void 0,
1408
1408
  password: void 0,
@@ -1411,33 +1411,33 @@ const At = {
1411
1411
  acceptedTerms: !1
1412
1412
  });
1413
1413
  E(() => {
1414
- const m = Se();
1415
- m && (t.value.inviteCode = m);
1414
+ const f = Ie();
1415
+ f && (t.value.inviteCode = f);
1416
1416
  });
1417
- const f = [{
1417
+ const d = [{
1418
1418
  required: !0,
1419
1419
  message: "请输入确认密码"
1420
1420
  }, {
1421
- validator: (m, y) => {
1422
- t.value.password && m !== t.value.password ? y("两次密码输入不一致") : y();
1421
+ validator: (f, w) => {
1422
+ t.value.password && f !== t.value.password ? w("两次密码输入不一致") : w();
1423
1423
  }
1424
1424
  }];
1425
- function n() {
1425
+ function l() {
1426
1426
  u("switchSignIn");
1427
1427
  }
1428
- async function w() {
1429
- if (!await v.value.validateField(["phone"])) {
1430
- d.value = !0;
1431
- const y = await M().auth.verify.sms.send.post({
1428
+ async function y() {
1429
+ if (!await p.value.validateField(["phone"])) {
1430
+ m.value = !0;
1431
+ const w = await F().auth.verify.sms.send.post({
1432
1432
  phone: t.value.phone,
1433
1433
  purpose: "signUp"
1434
1434
  });
1435
- d.value = !1, K(s.value, y);
1435
+ m.value = !1, J(s.value, w);
1436
1436
  }
1437
1437
  }
1438
- async function c() {
1439
- v.value.validate().then((m) => {
1440
- m || u("submit", {
1438
+ async function v() {
1439
+ p.value.validate().then((f) => {
1440
+ f || u("submit", {
1441
1441
  type: "phone",
1442
1442
  phone: t.value.phone,
1443
1443
  code: t.value.code,
@@ -1446,14 +1446,14 @@ const At = {
1446
1446
  });
1447
1447
  });
1448
1448
  }
1449
- return (m, y) => (l(), k("div", ss, [_("div", is, [i(e(H), {
1449
+ return (f, w) => (o(), k("div", ss, [_("div", is, [i(e(G), {
1450
1450
  ref_key: "formRef",
1451
- ref: v,
1451
+ ref: p,
1452
1452
  model: t.value,
1453
1453
  size: a.size,
1454
1454
  "auto-label-width": ""
1455
1455
  }, {
1456
- default: p(() => [i(e(P), {
1456
+ default: c(() => [i(e(P), {
1457
1457
  field: "phone",
1458
1458
  label: "手机号",
1459
1459
  "hide-label": "",
@@ -1465,9 +1465,9 @@ const At = {
1465
1465
  message: "请输入有效的手机号"
1466
1466
  }]
1467
1467
  }, {
1468
- default: p(() => [i(e(C), {
1468
+ default: c(() => [i(e(C), {
1469
1469
  modelValue: t.value.phone,
1470
- "onUpdate:modelValue": y[0] || (y[0] = (z) => t.value.phone = z),
1470
+ "onUpdate:modelValue": w[0] || (w[0] = (A) => t.value.phone = A),
1471
1471
  placeholder: "请输入手机号",
1472
1472
  autocomplete: "tel",
1473
1473
  type: "tel"
@@ -1482,23 +1482,23 @@ const At = {
1482
1482
  message: "请输入验证码"
1483
1483
  }]
1484
1484
  }, {
1485
- default: p(() => [_("div", as, [i(e(C), {
1485
+ default: c(() => [_("div", as, [i(e(C), {
1486
1486
  modelValue: t.value.code,
1487
- "onUpdate:modelValue": y[1] || (y[1] = (z) => t.value.code = z),
1487
+ "onUpdate:modelValue": w[1] || (w[1] = (A) => t.value.code = A),
1488
1488
  placeholder: "请输入验证码",
1489
1489
  autocomplete: "one-time-code"
1490
- }, null, 8, ["modelValue"]), i(W, {
1490
+ }, null, 8, ["modelValue"]), i(K, {
1491
1491
  ref_key: "SendVerifyCodeRef",
1492
1492
  ref: s,
1493
1493
  size: a.size,
1494
- loading: d.value,
1494
+ loading: m.value,
1495
1495
  style: {
1496
1496
  "margin-left": "10px"
1497
1497
  },
1498
- onSend: w
1498
+ onSend: y
1499
1499
  }, null, 8, ["size", "loading"])])]),
1500
1500
  _: 1
1501
- }), a.requirePassword ? (l(), S(e(P), {
1501
+ }), a.requirePassword ? (o(), S(e(P), {
1502
1502
  key: 0,
1503
1503
  field: "password",
1504
1504
  label: "密码",
@@ -1511,24 +1511,24 @@ const At = {
1511
1511
  message: "密码不能少于10字符"
1512
1512
  }]
1513
1513
  }, {
1514
- default: p(() => [i(e(C), {
1514
+ default: c(() => [i(e(C), {
1515
1515
  modelValue: t.value.password,
1516
- "onUpdate:modelValue": y[2] || (y[2] = (z) => t.value.password = z),
1516
+ "onUpdate:modelValue": w[2] || (w[2] = (A) => t.value.password = A),
1517
1517
  placeholder: "请输入密码(可选)",
1518
1518
  type: "password",
1519
1519
  autocomplete: "new-password"
1520
1520
  }, null, 8, ["modelValue"])]),
1521
1521
  _: 1
1522
- }, 8, ["rules"])) : I("", !0), a.requirePassword && t.value.password ? (l(), S(e(P), {
1522
+ }, 8, ["rules"])) : I("", !0), a.requirePassword && t.value.password ? (o(), S(e(P), {
1523
1523
  key: 1,
1524
1524
  field: "confirmPassword",
1525
1525
  label: "确认密码",
1526
1526
  "hide-label": "",
1527
- rules: f
1527
+ rules: d
1528
1528
  }, {
1529
- default: p(() => [i(e(C), {
1529
+ default: c(() => [i(e(C), {
1530
1530
  modelValue: t.value.confirmPassword,
1531
- "onUpdate:modelValue": y[3] || (y[3] = (z) => t.value.confirmPassword = z),
1531
+ "onUpdate:modelValue": w[3] || (w[3] = (A) => t.value.confirmPassword = A),
1532
1532
  placeholder: "请输入确认密码",
1533
1533
  type: "password",
1534
1534
  autocomplete: "new-password"
@@ -1542,38 +1542,38 @@ const At = {
1542
1542
  required: !1
1543
1543
  }]
1544
1544
  }, {
1545
- default: p(() => [i(e(C), {
1545
+ default: c(() => [i(e(C), {
1546
1546
  modelValue: t.value.inviteCode,
1547
- "onUpdate:modelValue": y[4] || (y[4] = (z) => t.value.inviteCode = z),
1547
+ "onUpdate:modelValue": w[4] || (w[4] = (A) => t.value.inviteCode = A),
1548
1548
  placeholder: "邀请码(可选)",
1549
1549
  autocomplete: "off"
1550
1550
  }, null, 8, ["modelValue"])]),
1551
1551
  _: 1
1552
- }), _("div", os, [i(e(B), {
1552
+ }), _("div", os, [i(e(L), {
1553
1553
  type: "primary",
1554
1554
  loading: a.loading,
1555
1555
  long: "",
1556
1556
  size: a.size,
1557
- onClick: c
1557
+ onClick: v
1558
1558
  }, {
1559
- default: p(() => [...y[6] || (y[6] = [O(" 注册 ", -1)])]),
1559
+ default: c(() => [...w[6] || (w[6] = [T(" 注册 ", -1)])]),
1560
1560
  _: 1
1561
- }, 8, ["loading", "size"]), e(h) ? (l(), S(e(P), {
1561
+ }, 8, ["loading", "size"]), e(h) ? (o(), S(e(P), {
1562
1562
  key: 0,
1563
1563
  field: "acceptedTerms",
1564
1564
  "hide-label": "",
1565
1565
  rules: e(g)
1566
1566
  }, {
1567
- default: p(() => [i(ee, {
1567
+ default: c(() => [i(ee, {
1568
1568
  "accepted-terms": t.value.acceptedTerms,
1569
- "onUpdate:acceptedTerms": y[5] || (y[5] = (z) => t.value.acceptedTerms = z),
1569
+ "onUpdate:acceptedTerms": w[5] || (w[5] = (A) => t.value.acceptedTerms = A),
1570
1570
  "current-view": "signUp"
1571
1571
  }, null, 8, ["accepted-terms"])]),
1572
1572
  _: 1
1573
1573
  }, 8, ["rules"])) : I("", !0)])]),
1574
1574
  _: 1
1575
- }, 8, ["model", "size"])]), i(me, {
1576
- onSwitchSignIn: n
1575
+ }, 8, ["model", "size"])]), i(ve, {
1576
+ onSwitchSignIn: l
1577
1577
  })]));
1578
1578
  }
1579
1579
  }), ns = /* @__PURE__ */ U(ls, [["__scopeId", "data-v-d0af58fd"]]), rs = {
@@ -1605,62 +1605,62 @@ const At = {
1605
1605
  },
1606
1606
  emits: ["switchSignIn", "submit"],
1607
1607
  setup(b, {
1608
- emit: r
1608
+ emit: n
1609
1609
  }) {
1610
- const u = r, o = b, {
1610
+ const u = n, r = b, {
1611
1611
  appsData: h
1612
- } = j(), {
1612
+ } = W(), {
1613
1613
  registrationBlocked: g,
1614
1614
  signUpAuthEnabled: a
1615
- } = F(), s = T(() => h.value.authMethods), d = T(() => {
1616
- const n = [];
1617
- return s.value.signUp.email && n.push({
1615
+ } = D(), s = $(() => h.value.authMethods), m = $(() => {
1616
+ const l = [];
1617
+ return s.value.signUp.email && l.push({
1618
1618
  key: "email",
1619
1619
  title: "邮箱注册"
1620
- }), s.value.signUp.phone && n.push({
1620
+ }), s.value.signUp.phone && l.push({
1621
1621
  key: "phone",
1622
1622
  title: "手机号注册"
1623
- }), n;
1624
- }), v = A("email");
1625
- ne(() => {
1626
- var n;
1627
- d.value.some((w) => w.key === v.value) || (v.value = ((n = d.value[0]) == null ? void 0 : n.key) || "email");
1623
+ }), l;
1624
+ }), p = z("email");
1625
+ ue(() => {
1626
+ var l;
1627
+ m.value.some((y) => y.key === p.value) || (p.value = ((l = m.value[0]) == null ? void 0 : l.key) || "email");
1628
1628
  });
1629
1629
  function t() {
1630
1630
  u("switchSignIn");
1631
1631
  }
1632
- async function f(n) {
1632
+ async function d(l) {
1633
1633
  u("submit", {
1634
- type: v.value,
1635
- ...n
1634
+ type: p.value,
1635
+ ...l
1636
1636
  });
1637
1637
  }
1638
- return (n, w) => (l(), k("div", rs, [d.value.length > 1 ? (l(), k("div", us, [i(e(de), {
1639
- "active-key": v.value,
1640
- "onUpdate:activeKey": w[0] || (w[0] = (c) => v.value = c)
1638
+ return (l, y) => (o(), k("div", rs, [m.value.length > 1 ? (o(), k("div", us, [i(e(pe), {
1639
+ "active-key": p.value,
1640
+ "onUpdate:activeKey": y[0] || (y[0] = (v) => p.value = v)
1641
1641
  }, {
1642
- default: p(() => [(l(!0), k(D, null, re(d.value, (c) => (l(), S(e(ce), {
1643
- key: c.key,
1644
- title: c.title
1642
+ default: c(() => [(o(!0), k(H, null, de(m.value, (v) => (o(), S(e(me), {
1643
+ key: v.key,
1644
+ title: v.title
1645
1645
  }, null, 8, ["title"]))), 128))]),
1646
1646
  _: 1
1647
- }, 8, ["active-key"])])) : I("", !0), e(a) ? e(g) ? (l(), k("div", cs, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (l(), k(D, {
1647
+ }, 8, ["active-key"])])) : I("", !0), e(a) ? e(g) ? (o(), k("div", cs, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (o(), k(H, {
1648
1648
  key: 3
1649
- }, [v.value === "email" && s.value.signUp.email ? (l(), S(ts, {
1649
+ }, [p.value === "email" && s.value.signUp.email ? (o(), S(ts, {
1650
1650
  key: 0,
1651
- size: o.size,
1651
+ size: r.size,
1652
1652
  loading: b.loading,
1653
- onSubmit: f
1654
- }, null, 8, ["size", "loading"])) : v.value === "phone" && s.value.signUp.phone ? (l(), S(ns, {
1653
+ onSubmit: d
1654
+ }, null, 8, ["size", "loading"])) : p.value === "phone" && s.value.signUp.phone ? (o(), S(ns, {
1655
1655
  key: 1,
1656
- size: o.size,
1656
+ size: r.size,
1657
1657
  loading: b.loading,
1658
- onSubmit: f,
1658
+ onSubmit: d,
1659
1659
  onSwitchSignIn: t
1660
- }, null, 8, ["size", "loading"])) : (l(), k("div", ps, " 当前应用未开放用户注册 ")), v.value === "email" ? (l(), S(me, {
1660
+ }, null, 8, ["size", "loading"])) : (o(), k("div", ps, " 当前应用未开放用户注册 ")), p.value === "email" ? (o(), S(ve, {
1661
1661
  key: 3,
1662
1662
  onSwitchSignIn: t
1663
- })) : I("", !0)], 64)) : (l(), k("div", ds, " 系统已停止用户注册 "))]));
1663
+ })) : I("", !0)], 64)) : (o(), k("div", ds, " 系统已停止用户注册 "))]));
1664
1664
  }
1665
1665
  }), fs = /* @__PURE__ */ U(ms, [["__scopeId", "data-v-b211d5ef"]]), vs = ["src"], gs = /* @__PURE__ */ V({
1666
1666
  __name: "AuthkitAuthTitle",
@@ -1682,27 +1682,27 @@ const At = {
1682
1682
  }
1683
1683
  },
1684
1684
  setup(b) {
1685
- const r = b, u = `${r.size}px`, o = `${r.fontSize}px`, h = `${r.lineHeight}px`, {
1685
+ const n = b, u = `${n.size}px`, r = `${n.fontSize}px`, h = `${n.lineHeight}px`, {
1686
1686
  currentView: g
1687
- } = N(), {
1687
+ } = j(), {
1688
1688
  appsData: a
1689
- } = j(), s = T(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
1690
- return (d, v) => (l(), k("div", {
1689
+ } = W(), s = $(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
1690
+ return (m, p) => (o(), k("div", {
1691
1691
  class: "Title",
1692
- style: G({
1693
- fontSize: o,
1692
+ style: N({
1693
+ fontSize: r,
1694
1694
  lineHeight: h
1695
1695
  })
1696
- }, [e(a).applicationLogoUrl ? (l(), k("img", {
1696
+ }, [e(a).applicationLogoUrl ? (o(), k("img", {
1697
1697
  key: 0,
1698
1698
  src: e(a).applicationLogoUrl,
1699
1699
  srcset: "",
1700
- style: G({
1700
+ style: N({
1701
1701
  width: u
1702
1702
  })
1703
- }, null, 12, vs)) : I("", !0), _("span", null, L(s.value), 1), Z(d.$slots, "default", {}, void 0, !0)], 4));
1703
+ }, null, 12, vs)) : I("", !0), _("span", null, M(s.value), 1), Z(m.$slots, "default", {}, void 0, !0)], 4));
1704
1704
  }
1705
- }), Pe = /* @__PURE__ */ U(gs, [["__scopeId", "data-v-8ebe7939"]]), hs = {
1705
+ }), Ce = /* @__PURE__ */ U(gs, [["__scopeId", "data-v-8ebe7939"]]), hs = {
1706
1706
  class: "Auth"
1707
1707
  }, ys = {
1708
1708
  class: "body"
@@ -1719,51 +1719,51 @@ const At = {
1719
1719
  }
1720
1720
  },
1721
1721
  setup(b) {
1722
- const r = b, {
1722
+ const n = b, {
1723
1723
  signInSubmit: u,
1724
- passkeySignInSubmit: o,
1724
+ passkeySignInSubmit: r,
1725
1725
  signUpSubmit: h,
1726
1726
  resetPasswordSubmit: g,
1727
1727
  currentView: a,
1728
1728
  authSignInLoading: s,
1729
- authSignUpLoading: d,
1730
- resetPasswordLoading: v,
1729
+ authSignUpLoading: m,
1730
+ resetPasswordLoading: p,
1731
1731
  switchSignUp: t,
1732
- switchResetPassword: f,
1733
- switchSignIn: n
1734
- } = N();
1735
- return (w, c) => (l(), k("div", hs, [b.showTitle ? (l(), S(Pe, {
1732
+ switchResetPassword: d,
1733
+ switchSignIn: l
1734
+ } = j();
1735
+ return (y, v) => (o(), k("div", hs, [b.showTitle ? (o(), S(Ce, {
1736
1736
  key: 0,
1737
1737
  size: 32,
1738
1738
  "font-size": 20
1739
- })) : I("", !0), _("div", ys, [e(a) === "signIn" ? (l(), S(Qt, {
1739
+ })) : I("", !0), _("div", ys, [e(a) === "signIn" ? (o(), S(Qt, {
1740
1740
  key: 0,
1741
- size: r.size,
1741
+ size: n.size,
1742
1742
  loading: e(s),
1743
1743
  onSwitchSignUp: e(t),
1744
- onSwitchResetPassword: e(f),
1745
- onSubmit: c[0] || (c[0] = (m) => e(u)(m))
1744
+ onSwitchResetPassword: e(d),
1745
+ onSubmit: v[0] || (v[0] = (f) => e(u)(f)),
1746
+ onPasskeySubmit: e(r)
1746
1747
  }, {
1747
- OAuth: p(() => [i(lt, {
1748
- size: r.size,
1749
- onPasskeySubmit: e(o)
1750
- }, null, 8, ["size", "onPasskeySubmit"])]),
1748
+ OAuth: c(() => [i(ot, {
1749
+ size: n.size
1750
+ }, null, 8, ["size"])]),
1751
1751
  _: 1
1752
- }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (l(), S(fs, {
1752
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword", "onPasskeySubmit"])) : e(a) === "signUp" ? (o(), S(fs, {
1753
1753
  key: 1,
1754
- size: r.size,
1755
- loading: e(d),
1756
- onSwitchSignIn: e(n),
1757
- onSubmit: c[1] || (c[1] = (m) => e(h)(m))
1758
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (l(), S(kt, {
1754
+ size: n.size,
1755
+ loading: e(m),
1756
+ onSwitchSignIn: e(l),
1757
+ onSubmit: v[1] || (v[1] = (f) => e(h)(f))
1758
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (o(), S(_t, {
1759
1759
  key: 2,
1760
- size: r.size,
1761
- loading: e(v),
1762
- onSwitchSignIn: e(n),
1763
- onSubmit: c[2] || (c[2] = (m) => e(g)(m))
1760
+ size: n.size,
1761
+ loading: e(p),
1762
+ onSwitchSignIn: e(l),
1763
+ onSubmit: v[2] || (v[2] = (f) => e(g)(f))
1764
1764
  }, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0)])]));
1765
1765
  }
1766
- }), ws = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-60874d88"]]), _s = /* @__PURE__ */ V({
1766
+ }), ws = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-72c23914"]]), _s = /* @__PURE__ */ V({
1767
1767
  __name: "AuthkitAuthModal",
1768
1768
  props: {
1769
1769
  size: {
@@ -1772,27 +1772,27 @@ const At = {
1772
1772
  },
1773
1773
  emits: ["close"],
1774
1774
  setup(b, {
1775
- emit: r
1775
+ emit: n
1776
1776
  }) {
1777
- const u = r, {
1778
- onSignIn: o,
1777
+ const u = n, {
1778
+ onSignIn: r,
1779
1779
  switchSignIn: h
1780
- } = N(), {
1780
+ } = j(), {
1781
1781
  close: g
1782
- } = we();
1782
+ } = ke();
1783
1783
  let a = null;
1784
1784
  E(() => {
1785
- a = o(() => g());
1786
- }), ue(() => {
1785
+ a = r(() => g());
1786
+ }), ce(() => {
1787
1787
  a == null || a(), a = null;
1788
1788
  });
1789
- function s(v) {
1790
- v || d();
1789
+ function s(p) {
1790
+ p || m();
1791
1791
  }
1792
- function d() {
1792
+ function m() {
1793
1793
  h(), g(), u("close");
1794
1794
  }
1795
- return (v, t) => (l(), S(e(xe), {
1795
+ return (p, t) => (o(), S(e(Be), {
1796
1796
  visible: !0,
1797
1797
  footer: !1,
1798
1798
  "mask-closable": !1,
@@ -1800,10 +1800,10 @@ const At = {
1800
1800
  width: "auto",
1801
1801
  "modal-class": "SignInModalClass",
1802
1802
  "onUpdate:visible": s,
1803
- onClose: d
1803
+ onClose: m
1804
1804
  }, {
1805
- title: p(() => [i(Pe)]),
1806
- default: p(() => [i(ws, {
1805
+ title: c(() => [i(Ce)]),
1806
+ default: c(() => [i(ws, {
1807
1807
  "show-title": !1,
1808
1808
  size: b.size
1809
1809
  }, null, 8, ["size"])]),
@@ -1811,50 +1811,50 @@ const At = {
1811
1811
  }));
1812
1812
  }
1813
1813
  }), ks = /* @__PURE__ */ U(_s, [["__scopeId", "data-v-19a4d5d0"]]);
1814
- function Ve(b, r = {}) {
1814
+ function Ue(b, n = {}) {
1815
1815
  const {
1816
1816
  bindIdentityRedirect: u = "",
1817
- closePopupOnBindSuccess: o = !0,
1817
+ closePopupOnBindSuccess: r = !0,
1818
1818
  restoreRedirectAfterSignIn: h = !0,
1819
1819
  defaultRedirect: g = ""
1820
- } = r, a = A(!1), {
1820
+ } = n, a = z(!1), {
1821
1821
  completeSignIn: s
1822
- } = N();
1823
- async function d() {
1822
+ } = j();
1823
+ async function m() {
1824
1824
  if (typeof window > "u")
1825
1825
  return !1;
1826
- const v = new URL(window.location.href);
1827
- if (!ze(v))
1826
+ const p = new URL(window.location.href);
1827
+ if (!Ae(p))
1828
1828
  return !1;
1829
- const t = v.searchParams.get("error");
1829
+ const t = p.searchParams.get("error");
1830
1830
  if (t)
1831
- return window.history.replaceState({}, "", le(v)), X.error(t), !0;
1832
- if (v.searchParams.get("bindSuccess") === "true") {
1833
- const n = v.searchParams.get("provider");
1834
- return window.history.replaceState({}, "", le(v)), X.success(n ? `${n} 绑定成功` : "绑定成功"), o && window.opener && setTimeout(() => window.close(), 800), !0;
1831
+ return window.history.replaceState({}, "", ne(p)), re.error(t), !0;
1832
+ if (p.searchParams.get("bindSuccess") === "true") {
1833
+ const l = p.searchParams.get("provider");
1834
+ return window.history.replaceState({}, "", ne(p)), re.success(l ? `${l} 绑定成功` : "绑定成功"), r && window.opener && setTimeout(() => window.close(), 800), !0;
1835
1835
  }
1836
- const f = v.searchParams.get("token");
1837
- if (!f)
1836
+ const d = p.searchParams.get("token");
1837
+ if (!d)
1838
1838
  return !1;
1839
1839
  a.value = !0;
1840
1840
  try {
1841
- const n = v.searchParams.get("userId"), w = v.searchParams.get("appId"), c = v.searchParams.get("needBindIdentity") === "true";
1842
- if (window.history.replaceState({}, "", le(v)), s({
1843
- jwtToken: f,
1844
- userId: n,
1845
- appId: w,
1846
- needBindIdentity: c
1847
- }), c && u)
1841
+ const l = p.searchParams.get("userId"), y = p.searchParams.get("appId"), v = p.searchParams.get("needBindIdentity") === "true";
1842
+ if (window.history.replaceState({}, "", ne(p)), s({
1843
+ jwtToken: d,
1844
+ userId: l,
1845
+ appId: y,
1846
+ needBindIdentity: v
1847
+ }), v && u)
1848
1848
  return await b.replace(u), !0;
1849
- const y = Ne(h) || g;
1850
- return y && await b.replace(y), !0;
1849
+ const w = Ne(h) || g;
1850
+ return w && await b.replace(w), !0;
1851
1851
  } finally {
1852
1852
  a.value = !1;
1853
1853
  }
1854
1854
  }
1855
1855
  return {
1856
1856
  processing: a,
1857
- handleOAuthCallback: d
1857
+ handleOAuthCallback: m
1858
1858
  };
1859
1859
  }
1860
1860
  const Ss = {
@@ -1878,19 +1878,19 @@ const Ss = {
1878
1878
  }
1879
1879
  },
1880
1880
  setup(b) {
1881
- const r = b, u = be(), {
1882
- processing: o,
1881
+ const n = b, u = _e(), {
1882
+ processing: r,
1883
1883
  handleOAuthCallback: h
1884
- } = Ve(u, {
1885
- bindIdentityRedirect: r.bindIdentityRedirect,
1886
- closePopupOnBindSuccess: r.closePopupOnBindSuccess,
1887
- restoreRedirectAfterSignIn: r.restoreRedirectAfterSignIn
1884
+ } = Ue(u, {
1885
+ bindIdentityRedirect: n.bindIdentityRedirect,
1886
+ closePopupOnBindSuccess: n.closePopupOnBindSuccess,
1887
+ restoreRedirectAfterSignIn: n.restoreRedirectAfterSignIn
1888
1888
  });
1889
1889
  return E(() => {
1890
1890
  h();
1891
- }), (g, a) => (l(), S(Te, {
1891
+ }), (g, a) => (o(), S(qe, {
1892
1892
  to: "body"
1893
- }, [e(o) ? (l(), k("div", Ss, [...a[0] || (a[0] = [_("div", {
1893
+ }, [e(r) ? (o(), k("div", Ss, [...a[0] || (a[0] = [_("div", {
1894
1894
  class: "AuthkitOAuthCallbackOverlay__panel"
1895
1895
  }, [_("div", {
1896
1896
  class: "AuthkitOAuthCallbackOverlay__spinner"
@@ -1898,7 +1898,7 @@ const Ss = {
1898
1898
  class: "AuthkitOAuthCallbackOverlay__text"
1899
1899
  }, "正在登录...")], -1)])])) : I("", !0)]));
1900
1900
  }
1901
- }), Is = /* @__PURE__ */ U(zs, [["__scopeId", "data-v-7162b776"]]), hi = /* @__PURE__ */ V({
1901
+ }), Is = /* @__PURE__ */ U(zs, [["__scopeId", "data-v-7162b776"]]), gi = /* @__PURE__ */ V({
1902
1902
  __name: "AuthkitProvider",
1903
1903
  props: {
1904
1904
  handleOAuthCallback: {
@@ -1934,75 +1934,75 @@ const Ss = {
1934
1934
  },
1935
1935
  emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
1936
1936
  setup(b, {
1937
- emit: r
1937
+ emit: n
1938
1938
  }) {
1939
1939
  const {
1940
1940
  config: u
1941
- } = pe(), o = b, h = r, g = qe(), {
1941
+ } = fe(), r = b, h = n, g = Oe(), {
1942
1942
  openLegalDoc: a
1943
- } = Ie({
1943
+ } = Pe({
1944
1944
  route: g
1945
1945
  }), {
1946
1946
  isOpen: s
1947
- } = we(), {
1948
- restoreSession: d,
1949
- onSignIn: v,
1947
+ } = ke(), {
1948
+ restoreSession: m,
1949
+ onSignIn: p,
1950
1950
  onSignOut: t
1951
- } = N(), {
1952
- fetchUserProfile: f,
1953
- clearUserProfile: n,
1954
- markAuthSessionBootstrapped: w
1955
- } = Ae(), {
1956
- appsAuthPageInfoApi: c
1957
- } = j(), m = v(() => {
1958
- f();
1959
- }), y = t(() => {
1960
- n();
1951
+ } = j(), {
1952
+ fetchUserProfile: d,
1953
+ clearUserProfile: l,
1954
+ markAuthSessionBootstrapped: y
1955
+ } = Ve(), {
1956
+ appsAuthPageInfoApi: v
1957
+ } = W(), f = p(() => {
1958
+ d();
1959
+ }), w = t(() => {
1960
+ l();
1961
1961
  });
1962
- function z() {
1962
+ function A() {
1963
1963
  if (u.legalDocsMode === "builtin") {
1964
1964
  a("privacyPolicy");
1965
1965
  return;
1966
1966
  }
1967
1967
  h("toPrivacyPolicy");
1968
1968
  }
1969
- function q() {
1969
+ function O() {
1970
1970
  if (u.legalDocsMode === "builtin") {
1971
1971
  a("userServiceAgreement");
1972
1972
  return;
1973
1973
  }
1974
1974
  h("toUserServiceAgreement");
1975
1975
  }
1976
- let $ = null;
1977
- async function R() {
1976
+ let x = null;
1977
+ async function B() {
1978
1978
  try {
1979
- if (o.fetchAppInfo && c(), o.restoreSession && d()) {
1980
- await f();
1979
+ if (r.fetchAppInfo && v(), r.restoreSession && m()) {
1980
+ await d();
1981
1981
  return;
1982
1982
  }
1983
- n();
1983
+ l();
1984
1984
  } finally {
1985
- w();
1985
+ y();
1986
1986
  }
1987
1987
  }
1988
- function x() {
1989
- return $ || ($ = R()), $;
1988
+ function R() {
1989
+ return x || (x = B()), x;
1990
1990
  }
1991
- return typeof window < "u" && x(), E(() => {
1992
- St({
1993
- onPrivacyPolicy: z,
1994
- onUserServiceAgreement: q
1991
+ return typeof window < "u" && R(), E(() => {
1992
+ kt({
1993
+ onPrivacyPolicy: A,
1994
+ onUserServiceAgreement: O
1995
1995
  });
1996
- }), ue(() => {
1997
- m(), y();
1998
- }), (Ce, Ws) => (l(), k(D, null, [Z(Ce.$slots, "default"), o.handleOAuthCallback ? (l(), S(Is, {
1996
+ }), ce(() => {
1997
+ f(), w();
1998
+ }), (q, Q) => (o(), k(H, null, [Z(q.$slots, "default"), r.handleOAuthCallback ? (o(), S(Is, {
1999
1999
  key: 0,
2000
- "bind-identity-redirect": o.bindIdentityRedirect,
2001
- "close-popup-on-bind-success": o.closePopupOnBindSuccess,
2002
- "restore-redirect-after-sign-in": o.restoreRedirectAfterSignIn
2003
- }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), o.showAuthModal && e(s) ? (l(), S(ks, {
2000
+ "bind-identity-redirect": r.bindIdentityRedirect,
2001
+ "close-popup-on-bind-success": r.closePopupOnBindSuccess,
2002
+ "restore-redirect-after-sign-in": r.restoreRedirectAfterSignIn
2003
+ }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), r.showAuthModal && e(s) ? (o(), S(ks, {
2004
2004
  key: 1,
2005
- size: o.authModalSize
2005
+ size: r.authModalSize
2006
2006
  }, null, 8, ["size"])) : I("", !0)], 64));
2007
2007
  }
2008
2008
  }), As = {
@@ -2052,25 +2052,25 @@ const Ss = {
2052
2052
  }
2053
2053
  },
2054
2054
  setup(b) {
2055
- const r = b, u = T(() => r.backgroundType === "color" ? {
2056
- backgroundColor: r.backgroundColor
2055
+ const n = b, u = $(() => n.backgroundType === "color" ? {
2056
+ backgroundColor: n.backgroundColor
2057
2057
  } : {
2058
- backgroundImage: `url(${r.backgroundImage})`
2058
+ backgroundImage: `url(${n.backgroundImage})`
2059
2059
  });
2060
- return (o, h) => (l(), k("div", {
2060
+ return (r, h) => (o(), k("div", {
2061
2061
  class: "auth",
2062
- style: G(u.value)
2063
- }, [_("div", As, [r.name ? (l(), k("a", {
2062
+ style: N(u.value)
2063
+ }, [_("div", As, [n.name ? (o(), k("a", {
2064
2064
  key: 0,
2065
- href: r.appHomePage,
2065
+ href: n.appHomePage,
2066
2066
  target: "_self",
2067
2067
  class: "link",
2068
- style: G({
2069
- color: r.linkColor
2068
+ style: N({
2069
+ color: n.linkColor
2070
2070
  })
2071
- }, " 返回主页 ", 12, Ps)) : I("", !0)]), _("div", Vs, [Z(o.$slots, "default", {}, void 0, !0)])], 4));
2071
+ }, " 返回主页 ", 12, Ps)) : I("", !0)]), _("div", Vs, [Z(r.$slots, "default", {}, void 0, !0)])], 4));
2072
2072
  }
2073
- }), yi = /* @__PURE__ */ U(Cs, [["__scopeId", "data-v-0e13d3ff"]]), Us = {
2073
+ }), hi = /* @__PURE__ */ U(Cs, [["__scopeId", "data-v-0e13d3ff"]]), Us = {
2074
2074
  class: "box"
2075
2075
  }, $s = {
2076
2076
  class: "title"
@@ -2132,7 +2132,7 @@ const Ss = {
2132
2132
  }
2133
2133
  },
2134
2134
  setup(b) {
2135
- const r = A(!1), u = b, o = A({
2135
+ const n = z(!1), u = b, r = z({
2136
2136
  name: "",
2137
2137
  homePageUrl: "",
2138
2138
  createAt: "",
@@ -2142,8 +2142,8 @@ const Ss = {
2142
2142
  const {
2143
2143
  data: a,
2144
2144
  error: s
2145
- } = await M().auth.apps.authPageInfo.post({});
2146
- s || !a || (o.value = {
2145
+ } = await F().auth.apps.authPageInfo.post({});
2146
+ s || !a || (r.value = {
2147
2147
  name: a.name,
2148
2148
  homePageUrl: a.homePageUrl || "",
2149
2149
  createAt: "",
@@ -2152,50 +2152,50 @@ const Ss = {
2152
2152
  }
2153
2153
  h();
2154
2154
  async function g() {
2155
- r.value = !0;
2155
+ n.value = !0;
2156
2156
  const {
2157
2157
  data: a,
2158
2158
  error: s
2159
- } = await M().auth.oauth2.authorize.post({
2159
+ } = await F().auth.oauth2.authorize.post({
2160
2160
  client_id: u.clientId,
2161
2161
  response_type: u.responseType,
2162
2162
  scope: u.scope,
2163
2163
  state: u.state,
2164
2164
  redirect_uri: u.redirectUri
2165
2165
  });
2166
- if (r.value = !1, s || !a)
2166
+ if (n.value = !1, s || !a)
2167
2167
  return;
2168
- const d = a;
2169
- window.location.href = d.authorizeUrl;
2170
- }
2171
- return (a, s) => (l(), k("div", Us, [_("div", $s, L(`授权 ${o.value.name}`), 1), _("div", Rs, [i(e(Le), null, {
2172
- default: p(() => [i(e(ae), null, {
2173
- default: p(() => {
2174
- var d;
2175
- return [i(e(oe), {
2176
- title: o.value.name,
2177
- description: `想要使用您的${(d = u.userInfo) == null ? void 0 : d.nickname}账户`
2168
+ const m = a;
2169
+ window.location.href = m.authorizeUrl;
2170
+ }
2171
+ return (a, s) => (o(), k("div", Us, [_("div", $s, M(`授权 ${r.value.name}`), 1), _("div", Rs, [i(e(Le), null, {
2172
+ default: c(() => [i(e(oe), null, {
2173
+ default: c(() => {
2174
+ var m;
2175
+ return [i(e(le), {
2176
+ title: r.value.name,
2177
+ description: `想要使用您的${(m = u.userInfo) == null ? void 0 : m.nickname}账户`
2178
2178
  }, {
2179
- avatar: p(() => {
2180
- var v;
2181
- return [i(e(te), {
2179
+ avatar: c(() => {
2180
+ var p;
2181
+ return [i(e(se), {
2182
2182
  shape: "square",
2183
- "image-url": (v = u.userInfo) == null ? void 0 : v.avatar
2183
+ "image-url": (p = u.userInfo) == null ? void 0 : p.avatar
2184
2184
  }, null, 8, ["image-url"])];
2185
2185
  }),
2186
2186
  _: 1
2187
2187
  }, 8, ["title", "description"])];
2188
2188
  }),
2189
2189
  _: 1
2190
- }), i(e(ae), null, {
2191
- default: p(() => [i(e(oe), {
2190
+ }), i(e(oe), null, {
2191
+ default: c(() => [i(e(le), {
2192
2192
  title: "公开信息",
2193
2193
  description: "头像、昵称"
2194
2194
  }, {
2195
- avatar: p(() => [i(e(te), {
2195
+ avatar: c(() => [i(e(se), {
2196
2196
  shape: "square"
2197
2197
  }, {
2198
- default: p(() => [...s[0] || (s[0] = [_("img", {
2198
+ default: c(() => [...s[0] || (s[0] = [_("img", {
2199
2199
  alt: "avatar",
2200
2200
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2201
2201
  }, null, -1)])]),
@@ -2204,15 +2204,15 @@ const Ss = {
2204
2204
  _: 1
2205
2205
  })]),
2206
2206
  _: 1
2207
- }), i(e(ae), null, {
2208
- default: p(() => [i(e(oe), {
2207
+ }), i(e(oe), null, {
2208
+ default: c(() => [i(e(le), {
2209
2209
  title: "个人用户数据",
2210
2210
  description: "电子邮件地址"
2211
2211
  }, {
2212
- avatar: p(() => [i(e(te), {
2212
+ avatar: c(() => [i(e(se), {
2213
2213
  shape: "square"
2214
2214
  }, {
2215
- default: p(() => [...s[1] || (s[1] = [_("img", {
2215
+ default: c(() => [...s[1] || (s[1] = [_("img", {
2216
2216
  alt: "avatar",
2217
2217
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2218
2218
  }, null, -1)])]),
@@ -2223,30 +2223,30 @@ const Ss = {
2223
2223
  _: 1
2224
2224
  })]),
2225
2225
  _: 1
2226
- }), i(e(B), {
2226
+ }), i(e(L), {
2227
2227
  type: "primary",
2228
2228
  size: u.size,
2229
- loading: r.value,
2229
+ loading: n.value,
2230
2230
  onClick: g
2231
2231
  }, {
2232
- default: p(() => [...s[2] || (s[2] = [O(" 授权 ", -1)])]),
2232
+ default: c(() => [...s[2] || (s[2] = [T(" 授权 ", -1)])]),
2233
2233
  _: 1
2234
2234
  }, 8, ["size", "loading"]), _("div", Ts, [s[3] || (s[3] = _("div", {
2235
2235
  class: "redirect-hint"
2236
- }, "授权后将跳转至", -1)), _("div", qs, L(o.value.authorizationCallback), 1)])])]));
2236
+ }, "授权后将跳转至", -1)), _("div", qs, M(r.value.authorizationCallback), 1)])])]));
2237
2237
  }
2238
- }), bi = /* @__PURE__ */ U(Os, [["__scopeId", "data-v-6c1792d3"]]), xs = {
2238
+ }), yi = /* @__PURE__ */ U(Os, [["__scopeId", "data-v-6c1792d3"]]), xs = {
2239
2239
  class: "oauth-callback"
2240
- }, Ls = {
2240
+ }, Bs = {
2241
2241
  key: 0,
2242
2242
  class: "callback-loading"
2243
- }, Bs = {
2243
+ }, Ls = {
2244
2244
  key: 1,
2245
2245
  class: "callback-error"
2246
- }, Ms = {
2246
+ }, Fs = {
2247
2247
  key: 2,
2248
2248
  class: "callback-success"
2249
- }, Fs = /* @__PURE__ */ V({
2249
+ }, Ms = /* @__PURE__ */ V({
2250
2250
  __name: "AuthkitOauthCallback",
2251
2251
  props: {
2252
2252
  defaultRedirect: {},
@@ -2255,20 +2255,20 @@ const Ss = {
2255
2255
  },
2256
2256
  emits: ["success", "error", "needBindIdentity"],
2257
2257
  setup(b, {
2258
- emit: r
2258
+ emit: n
2259
2259
  }) {
2260
- const u = b, o = r, h = A("登录成功,正在跳转..."), g = A(""), {
2260
+ const u = b, r = n, h = z("登录成功,正在跳转..."), g = z(""), {
2261
2261
  restoreSession: a
2262
- } = N(), s = be(), {
2263
- processing: d,
2264
- handleOAuthCallback: v
2265
- } = Ve(s, {
2262
+ } = j(), s = _e(), {
2263
+ processing: m,
2264
+ handleOAuthCallback: p
2265
+ } = Ue(s, {
2266
2266
  bindIdentityRedirect: u.bindIdentityRedirect,
2267
2267
  defaultRedirect: u.defaultRedirect
2268
2268
  });
2269
2269
  async function t() {
2270
- const n = new URL(window.location.href);
2271
- if (!ze(n)) {
2270
+ const l = new URL(window.location.href);
2271
+ if (!Ae(l)) {
2272
2272
  if (a()) {
2273
2273
  await s.replace(u.defaultRedirect || "/");
2274
2274
  return;
@@ -2276,31 +2276,31 @@ const Ss = {
2276
2276
  g.value = "无效的访问";
2277
2277
  return;
2278
2278
  }
2279
- const w = n.searchParams.get("error");
2280
- if (w) {
2281
- g.value = w, o("error", w), await v();
2279
+ const y = l.searchParams.get("error");
2280
+ if (y) {
2281
+ g.value = y, r("error", y), await p();
2282
2282
  return;
2283
2283
  }
2284
- await v() || (g.value = "登录失败:未收到认证令牌", o("error", g.value));
2284
+ await p() || (g.value = "登录失败:未收到认证令牌", r("error", g.value));
2285
2285
  }
2286
- function f() {
2286
+ function d() {
2287
2287
  s.replace(u.defaultRedirect || "/");
2288
2288
  }
2289
2289
  return E(() => {
2290
2290
  t();
2291
- }), (n, w) => (l(), k("div", xs, [e(d) ? (l(), k("div", Ls, [w[0] || (w[0] = _("div", {
2291
+ }), (l, y) => (o(), k("div", xs, [e(m) ? (o(), k("div", Bs, [y[0] || (y[0] = _("div", {
2292
2292
  class: "spinner"
2293
- }, null, -1)), _("p", null, L(u.loadingText ?? "正在登录..."), 1)])) : g.value ? (l(), k("div", Bs, [w[1] || (w[1] = _("div", {
2293
+ }, null, -1)), _("p", null, M(u.loadingText ?? "正在登录..."), 1)])) : g.value ? (o(), k("div", Ls, [y[1] || (y[1] = _("div", {
2294
2294
  class: "error-icon"
2295
- }, "✕", -1)), w[2] || (w[2] = _("h2", null, "登录失败", -1)), _("p", null, L(g.value), 1), _("button", {
2295
+ }, "✕", -1)), y[2] || (y[2] = _("h2", null, "登录失败", -1)), _("p", null, M(g.value), 1), _("button", {
2296
2296
  class: "retry-btn",
2297
2297
  type: "button",
2298
- onClick: f
2299
- }, "返回重试")])) : (l(), k("div", Ms, [w[3] || (w[3] = _("div", {
2298
+ onClick: d
2299
+ }, "返回重试")])) : (o(), k("div", Fs, [y[3] || (y[3] = _("div", {
2300
2300
  class: "success-icon"
2301
- }, "✓", -1)), _("p", null, L(h.value), 1)]))]));
2301
+ }, "✓", -1)), _("p", null, M(h.value), 1)]))]));
2302
2302
  }
2303
- }), wi = /* @__PURE__ */ U(Fs, [["__scopeId", "data-v-98babf68"]]), Ds = {
2303
+ }), bi = /* @__PURE__ */ U(Ms, [["__scopeId", "data-v-98babf68"]]), Ds = {
2304
2304
  class: "oauth-binding-account"
2305
2305
  }, Es = {
2306
2306
  key: 1,
@@ -2319,179 +2319,179 @@ const Ss = {
2319
2319
  },
2320
2320
  setup(b) {
2321
2321
  const {
2322
- config: r
2323
- } = pe(), {
2322
+ config: n
2323
+ } = fe(), {
2324
2324
  userProfile: u,
2325
- fetchUserProfile: o
2326
- } = Ae(), h = A("hidden"), g = A(!1);
2325
+ fetchUserProfile: r
2326
+ } = Ve(), h = z("hidden"), g = z(!1);
2327
2327
  let a;
2328
- const s = b, d = T(() => {
2329
- var m, y, z;
2330
- return ((y = (m = u.value) == null ? void 0 : m.github) == null ? void 0 : y.avatar_url) || ((z = u.value) == null ? void 0 : z.avatar) || "";
2328
+ const s = b, m = $(() => {
2329
+ var f, w, A;
2330
+ return ((w = (f = u.value) == null ? void 0 : f.github) == null ? void 0 : w.avatar_url) || ((A = u.value) == null ? void 0 : A.avatar) || "";
2331
2331
  }), {
2332
- buildBindOauthRedirectUri: v
2333
- } = ke();
2334
- function t(m) {
2335
- h.value = m;
2332
+ buildBindOauthRedirectUri: p
2333
+ } = ze();
2334
+ function t(f) {
2335
+ h.value = f;
2336
2336
  }
2337
- async function f() {
2338
- const m = r.appId;
2339
- if (!m) {
2337
+ async function d() {
2338
+ const f = n.appId;
2339
+ if (!f) {
2340
2340
  console.error("GitHub OAuth 失败: appId 未配置");
2341
2341
  return;
2342
2342
  }
2343
2343
  const {
2344
- data: y,
2345
- error: z
2346
- } = await M().auth.oauth.github.login.get({
2347
- appId: m,
2344
+ data: w,
2345
+ error: A
2346
+ } = await F().auth.oauth.github.login.get({
2347
+ appId: f,
2348
2348
  mode: "bind",
2349
- redirectUri: v()
2349
+ redirectUri: p()
2350
2350
  });
2351
- z || !y || (g.value = !0, window.open(y.redirectUri, "_blank"));
2351
+ A || !w || (g.value = !0, window.open(w.redirectUri, "_blank"));
2352
2352
  }
2353
- async function n() {
2353
+ async function l() {
2354
2354
  const {
2355
- error: m
2356
- } = await M().auth.users.unbind.oauth.post({
2355
+ error: f
2356
+ } = await F().auth.users.unbind.oauth.post({
2357
2357
  provider: "github"
2358
2358
  });
2359
- m || (X.success("解绑成功"), h.value = "hidden", o());
2359
+ f || (re.success("解绑成功"), h.value = "hidden", r());
2360
2360
  }
2361
- function w() {
2362
- h.value === "bind" && (h.value = "hidden", f()), h.value === "unbind" && n();
2361
+ function y() {
2362
+ h.value === "bind" && (h.value = "hidden", d()), h.value === "unbind" && l();
2363
2363
  }
2364
- function c() {
2365
- g.value && o();
2364
+ function v() {
2365
+ g.value && r();
2366
2366
  }
2367
2367
  return E(() => {
2368
- u.value || o(), a = setInterval(c, 1e3);
2369
- }), ue(() => {
2368
+ u.value || r(), a = setInterval(v, 1e3);
2369
+ }), ce(() => {
2370
2370
  a && clearInterval(a);
2371
- }), (m, y) => {
2372
- var z, q, $;
2373
- return l(), k(D, null, [!((z = e(u)) != null && z.github) && h.value === "hidden" ? (l(), S(e(fe), {
2371
+ }), (f, w) => {
2372
+ var A, O, x;
2373
+ return o(), k(H, null, [!((A = e(u)) != null && A.github) && h.value === "hidden" ? (o(), S(e(ge), {
2374
2374
  key: 0,
2375
2375
  title: "绑定GitHub"
2376
2376
  }, {
2377
- action: p(() => [i(e(B), {
2377
+ action: c(() => [i(e(L), {
2378
2378
  size: s.size,
2379
2379
  type: "primary",
2380
- onClick: y[0] || (y[0] = (R) => t("bind"))
2380
+ onClick: w[0] || (w[0] = (B) => t("bind"))
2381
2381
  }, {
2382
- default: p(() => [...y[2] || (y[2] = [O(" 绑定GitHub ", -1)])]),
2382
+ default: c(() => [...w[2] || (w[2] = [T(" 绑定GitHub ", -1)])]),
2383
2383
  _: 1
2384
2384
  }, 8, ["size"])]),
2385
- default: p(() => [y[3] || (y[3] = O(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2385
+ default: c(() => [w[3] || (w[3] = T(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2386
2386
  _: 1
2387
- })) : I("", !0), (q = e(u)) != null && q.github && h.value === "hidden" ? (l(), S(e(fe), {
2387
+ })) : I("", !0), (O = e(u)) != null && O.github && h.value === "hidden" ? (o(), S(e(ge), {
2388
2388
  key: 1,
2389
2389
  title: "解绑GitHub"
2390
2390
  }, {
2391
- action: p(() => [i(e(B), {
2391
+ action: c(() => [i(e(L), {
2392
2392
  size: s.size,
2393
2393
  type: "primary",
2394
- onClick: y[1] || (y[1] = (R) => t("unbind"))
2394
+ onClick: w[1] || (w[1] = (B) => t("unbind"))
2395
2395
  }, {
2396
- default: p(() => [...y[5] || (y[5] = [O(" 解绑GitHub ", -1)])]),
2396
+ default: c(() => [...w[5] || (w[5] = [T(" 解绑GitHub ", -1)])]),
2397
2397
  _: 1
2398
2398
  }, 8, ["size"])]),
2399
- default: p(() => {
2400
- var R, x;
2401
- return [_("div", Ds, [d.value ? (l(), S(e(te), {
2399
+ default: c(() => {
2400
+ var B, R;
2401
+ return [_("div", Ds, [m.value ? (o(), S(e(se), {
2402
2402
  key: 0,
2403
2403
  class: "oauth-binding-account__avatar",
2404
- "image-url": d.value,
2404
+ "image-url": m.value,
2405
2405
  size: 42
2406
- }, null, 8, ["image-url"])) : (l(), k("div", Es, [i(_e, {
2407
- icon: e(Q).github,
2406
+ }, null, 8, ["image-url"])) : (o(), k("div", Es, [i(Se, {
2407
+ icon: e(X).github,
2408
2408
  size: e(je),
2409
2409
  alt: "GitHub"
2410
- }, null, 8, ["icon", "size"])])), _("div", Hs, [y[4] || (y[4] = _("div", {
2410
+ }, null, 8, ["icon", "size"])])), _("div", Hs, [w[4] || (w[4] = _("div", {
2411
2411
  class: "oauth-binding-account__provider"
2412
- }, "GitHub", -1)), _("div", Gs, L(((x = (R = e(u)) == null ? void 0 : R.github) == null ? void 0 : x.login) || "GitHub"), 1)])])];
2412
+ }, "GitHub", -1)), _("div", Gs, M(((R = (B = e(u)) == null ? void 0 : B.github) == null ? void 0 : R.login) || "GitHub"), 1)])])];
2413
2413
  }),
2414
2414
  _: 1
2415
- })) : I("", !0), h.value === "bind" || h.value === "unbind" ? (l(), S(We, {
2415
+ })) : I("", !0), h.value === "bind" || h.value === "unbind" ? (o(), S(We, {
2416
2416
  key: 2,
2417
2417
  size: s.size,
2418
- email: ($ = e(u)) == null ? void 0 : $.email,
2419
- onNext: w
2418
+ email: (x = e(u)) == null ? void 0 : x.email,
2419
+ onNext: y
2420
2420
  }, null, 8, ["size", "email"])) : I("", !0)], 64);
2421
2421
  };
2422
2422
  }
2423
- }), _i = /* @__PURE__ */ U(Ns, [["__scopeId", "data-v-1cfa8892"]]), js = /* @__PURE__ */ V({
2423
+ }), wi = /* @__PURE__ */ U(Ns, [["__scopeId", "data-v-1cfa8892"]]), js = /* @__PURE__ */ V({
2424
2424
  __name: "LegalDocViewer",
2425
2425
  props: {
2426
2426
  type: {},
2427
2427
  appId: {}
2428
2428
  },
2429
2429
  setup(b) {
2430
- const r = b, u = T(() => Ke[r.type] ?? ""), o = A(!1), h = A(null);
2430
+ const n = b, u = $(() => Ke[n.type] ?? ""), r = z(!1), h = z(null);
2431
2431
  async function g() {
2432
- if (!r.type || !r.appId) {
2432
+ if (!n.type || !n.appId) {
2433
2433
  h.value = null;
2434
2434
  return;
2435
2435
  }
2436
- o.value = !0;
2437
- const a = await Ye(r.appId);
2438
- if (o.value = !1, !a) {
2436
+ r.value = !0;
2437
+ const a = await Ye(n.appId);
2438
+ if (r.value = !1, !a) {
2439
2439
  h.value = null;
2440
2440
  return;
2441
2441
  }
2442
- const s = a[r.type];
2442
+ const s = a[n.type];
2443
2443
  h.value = Je(s) ? s : null;
2444
2444
  }
2445
- return ye(() => [r.type, r.appId], () => {
2445
+ return we(() => [n.type, n.appId], () => {
2446
2446
  g();
2447
2447
  }, {
2448
2448
  immediate: !0
2449
- }), (a, s) => o.value ? (l(), S(e(Be), {
2449
+ }), (a, s) => r.value ? (o(), S(e(Fe), {
2450
2450
  key: 0,
2451
- loading: o.value,
2451
+ loading: r.value,
2452
2452
  class: "legal-doc-viewer-loading"
2453
- }, null, 8, ["loading"])) : h.value ? (l(), S(e(Qe), {
2453
+ }, null, 8, ["loading"])) : h.value ? (o(), S(e(Qe), {
2454
2454
  key: 2,
2455
2455
  modelValue: h.value,
2456
- "onUpdate:modelValue": s[1] || (s[1] = (d) => h.value = d),
2456
+ "onUpdate:modelValue": s[1] || (s[1] = (m) => h.value = m),
2457
2457
  editable: !1
2458
2458
  }, {
2459
- title: p(() => [i(e(Xe), {
2459
+ title: c(() => [i(e(Xe), {
2460
2460
  modelValue: u.value,
2461
- "onUpdate:modelValue": s[0] || (s[0] = (d) => u.value = d),
2461
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => u.value = m),
2462
2462
  editable: !1,
2463
2463
  class: "legal-doc-viewer-title"
2464
2464
  }, null, 8, ["modelValue"])]),
2465
2465
  _: 1
2466
- }, 8, ["modelValue"])) : (l(), S(e(Me), {
2466
+ }, 8, ["modelValue"])) : (o(), S(e(Me), {
2467
2467
  key: 1,
2468
2468
  description: "暂无内容"
2469
2469
  }));
2470
2470
  }
2471
- }), ki = /* @__PURE__ */ U(js, [["__scopeId", "data-v-fe9a3621"]]);
2471
+ }), _i = /* @__PURE__ */ U(js, [["__scopeId", "data-v-fe9a3621"]]);
2472
2472
  export {
2473
2473
  ws as A,
2474
2474
  ts as E,
2475
- ki as L,
2476
- J as O,
2477
- $t as P,
2478
- kt as R,
2475
+ _i as L,
2476
+ te as O,
2477
+ Ut as P,
2478
+ _t as R,
2479
2479
  ee as S,
2480
- hi as _,
2481
- yi as a,
2480
+ gi as _,
2481
+ hi as a,
2482
2482
  ks as b,
2483
- Pe as c,
2484
- bi as d,
2485
- _i as e,
2483
+ Ce as c,
2484
+ yi as d,
2485
+ wi as e,
2486
2486
  Is as f,
2487
- wi as g,
2488
- lt as h,
2489
- ct as i,
2490
- vt as j,
2487
+ bi as g,
2488
+ ot as h,
2489
+ dt as i,
2490
+ ft as j,
2491
2491
  Qt as k,
2492
- Lt as l,
2492
+ xt as l,
2493
2493
  fs as m,
2494
2494
  ns as n,
2495
- me as o,
2496
- jt as p
2495
+ ve as o,
2496
+ Nt as p
2497
2497
  };