@webx-ui/module-auth 0.8.15 → 0.9.0

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.
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { inject as ye, defineComponent as X, computed as P, ref as T, useTemplateRef as re, onBeforeUnmount as qe, resolveComponent as M, openBlock as p, createBlock as V, withCtx as t, createVNode as a, withModifiers as Pe, createCommentVNode as E, createElementVNode as S, createTextVNode as d, toDisplayString as i, watch as ue, unref as e, isRef as be, createElementBlock as G, resolveDynamicComponent as Fe, createSlots as Oe, Fragment as ce, renderList as _e, h as Re, normalizeClass as Qe } from "vue";
2
- import { useTranslate as J, HttpError as Xe, useAdmin as ee, useI18n as Be, useErrorText as ve, rowMenuWidth as Ze, WxDate as ie, WxRowMenu as Ve, WxFilterChips as Ee, WxListScreen as De, useTheme as et } from "@webx-ui/module-admin";
3
- import { useRouter as tt, useRoute as at } from "vue-router";
4
- import { useModal as ge, WxDialog as we, WxFormItem as H, WxInput as le, WxSelect as ne, WxSpace as oe, WxCheckbox as ze, WxText as B, WxButton as I, toast as Q, useElementWidth as xe, WxTable as ke, WxEntityCard as Ce, WxBadge as j, WxAvatar as lt, WxIcon as Z, confirm as Ne, createModal as $e, WxCard as Le, WxHeading as he, WxTabs as nt, WxTab as me, WxAlert as ot, WxThemeSwitch as st } from "@webx-ui/core";
5
- const Ie = /* @__PURE__ */ Symbol("webx-auth");
1
+ import { inject as ye, defineComponent as X, computed as U, ref as T, useTemplateRef as re, onBeforeUnmount as Ze, resolveComponent as H, openBlock as h, createBlock as V, withCtx as t, createVNode as a, withModifiers as Pe, createCommentVNode as E, createElementVNode as W, createTextVNode as m, toDisplayString as s, watch as ue, unref as e, isRef as be, normalizeClass as Fe, createElementBlock as G, resolveDynamicComponent as Oe, createSlots as Re, Fragment as ce, renderList as _e, h as Be } from "vue";
2
+ import { useTranslate as J, HttpError as et, useAdmin as ee, useI18n as Ee, useErrorText as ve, rowMenuWidth as tt, WxDate as ie, WxRowMenu as Ve, WxFilterChips as De, WxListScreen as Ne, useTheme as at } from "@webx-ui/module-admin";
3
+ import { useRouter as lt, useRoute as nt } from "vue-router";
4
+ import { useModal as ge, WxDialog as we, WxFormItem as K, WxInput as le, WxSelect as ne, WxSpace as oe, WxCheckbox as ze, WxText as B, WxButton as M, toast as Q, useElementWidth as xe, WxTable as ke, WxEntityCard as Ce, WxBadge as j, WxAvatar as ot, WxIcon as Z, confirm as Ie, createModal as $e, WxCard as Le, WxHeading as he, WxTabs as st, WxTab as me, WxAlert as it, WxThemeSwitch as rt } from "@webx-ui/core";
5
+ const Me = /* @__PURE__ */ Symbol("webx-auth");
6
6
  function Ae() {
7
- const n = ye(Ie, null);
7
+ const n = ye(Me, null);
8
8
  if (n === null)
9
9
  throw new Error("useAuth() was called outside a panel that installed the auth plugin.");
10
10
  return n;
11
11
  }
12
- function it(n) {
12
+ function ut(n) {
13
13
  const u = `${n.apiPath}/auth`;
14
14
  return {
15
15
  async me() {
16
16
  try {
17
17
  return (await n.http.get(`${u}/me`)).data;
18
18
  } catch (l) {
19
- if (ut(l))
19
+ if (dt(l))
20
20
  return null;
21
21
  throw l;
22
22
  }
@@ -55,14 +55,14 @@ function it(n) {
55
55
  }
56
56
  };
57
57
  }
58
- const Me = /* @__PURE__ */ Symbol("webx-auth-avatar"), He = /* @__PURE__ */ Symbol("webx-auth-avatar-field");
59
- function rt(n, u, l = null, o = null) {
60
- n.provide(Ie, u), n.provide(Me, l), n.provide(He, o);
58
+ const He = /* @__PURE__ */ Symbol("webx-auth-avatar"), Ke = /* @__PURE__ */ Symbol("webx-auth-avatar-field");
59
+ function ct(n, u, l = null, o = null) {
60
+ n.provide(Me, u), n.provide(He, l), n.provide(Ke, o);
61
61
  }
62
- function ut(n) {
62
+ function dt(n) {
63
63
  return typeof n == "object" && n !== null && "status" in n && n.status === 401;
64
64
  }
65
- const ct = ["title", "aria-label", "aria-pressed"], dt = /* @__PURE__ */ X({
65
+ const mt = ["title", "aria-label", "aria-pressed"], vt = /* @__PURE__ */ X({
66
66
  __name: "LoginCard",
67
67
  props: {
68
68
  emailLabel: { default: void 0 },
@@ -78,98 +78,98 @@ const ct = ["title", "aria-label", "aria-pressed"], dt = /* @__PURE__ */ X({
78
78
  },
79
79
  emits: ["success"],
80
80
  setup(n, { expose: u, emit: l }) {
81
- const o = n, y = l, c = Ae(), _ = J("webx-auth"), r = P(() => ({
82
- email: o.emailLabel ?? _("card.email"),
83
- password: o.passwordLabel ?? _("card.password"),
84
- remember: o.rememberLabel ?? _("card.remember"),
85
- submit: o.submitLabel ?? _("card.submit"),
86
- capsLock: o.capsLockWarning ?? _("card.caps-lock"),
87
- reveal: o.revealLabel ?? _("card.reveal"),
88
- hide: o.hideLabel ?? _("card.hide")
89
- })), b = T(""), O = T(""), v = T(!1), g = T(!1), w = T(!1), m = T(!1), x = T(""), f = T({}), h = T(0), z = re("emailField");
90
- let A = null;
91
- qe(Y);
92
- const W = P(() => h.value > 0), s = P(
93
- () => o.throttleMessage === void 0 ? _("card.throttled", { seconds: h.value }) : o.throttleMessage.replace(":seconds", String(h.value))
81
+ const o = n, b = l, c = Ae(), z = J("webx-auth"), r = U(() => ({
82
+ email: o.emailLabel ?? z("card.email"),
83
+ password: o.passwordLabel ?? z("card.password"),
84
+ remember: o.rememberLabel ?? z("card.remember"),
85
+ submit: o.submitLabel ?? z("card.submit"),
86
+ capsLock: o.capsLockWarning ?? z("card.caps-lock"),
87
+ reveal: o.revealLabel ?? z("card.reveal"),
88
+ hide: o.hideLabel ?? z("card.hide")
89
+ })), f = T(""), F = T(""), p = T(!1), g = T(!1), w = T(!1), d = T(!1), x = T(""), y = T({}), _ = T(0), L = re("emailField");
90
+ let $ = null;
91
+ Ze(Y);
92
+ const O = U(() => _.value > 0), i = U(
93
+ () => o.throttleMessage === void 0 ? z("card.throttled", { seconds: _.value }) : o.throttleMessage.replace(":seconds", String(_.value))
94
94
  );
95
- async function $() {
96
- if (!(g.value || W.value)) {
97
- g.value = !0, x.value = "", f.value = {};
95
+ async function v() {
96
+ if (!(g.value || O.value)) {
97
+ g.value = !0, x.value = "", y.value = {};
98
98
  try {
99
99
  await c.login({
100
- email: b.value,
101
- password: O.value,
102
- remember: v.value
103
- }), O.value = "", y("success");
100
+ email: f.value,
101
+ password: F.value,
102
+ remember: p.value
103
+ }), F.value = "", b("success");
104
104
  } catch (k) {
105
- U(k);
105
+ A(k);
106
106
  } finally {
107
107
  g.value = !1;
108
108
  }
109
109
  }
110
110
  }
111
- function U(k) {
112
- if (!(k instanceof Xe)) {
111
+ function A(k) {
112
+ if (!(k instanceof et)) {
113
113
  x.value = k instanceof Error ? k.message : String(k);
114
114
  return;
115
115
  }
116
116
  if (k.isValidation) {
117
- f.value = k.errors;
117
+ y.value = k.errors;
118
118
  return;
119
119
  }
120
120
  if (k.isThrottled) {
121
- K(k.retryAfter ?? 60);
121
+ I(k.retryAfter ?? 60);
122
122
  return;
123
123
  }
124
124
  x.value = k.message;
125
125
  }
126
- function K(k) {
127
- Y(), h.value = k, A = setInterval(() => {
128
- h.value -= 1, h.value <= 0 && Y();
126
+ function I(k) {
127
+ Y(), _.value = k, $ = setInterval(() => {
128
+ _.value -= 1, _.value <= 0 && Y();
129
129
  }, 1e3);
130
130
  }
131
131
  function Y() {
132
- A !== null && (clearInterval(A), A = null), h.value = 0;
132
+ $ !== null && (clearInterval($), $ = null), _.value = 0;
133
133
  }
134
134
  function D(k) {
135
- m.value = k.getModifierState("CapsLock");
135
+ d.value = k.getModifierState("CapsLock");
136
136
  }
137
- return u({ focus: () => z.value?.focus() }), (k, R) => {
138
- const C = M("wx-alert"), q = M("wx-icon"), de = M("wx-input"), F = M("wx-form-item"), N = M("wx-checkbox"), L = M("wx-button"), ae = M("wx-form"), Je = M("wx-card");
139
- return p(), V(Je, {
137
+ return u({ focus: () => L.value?.focus() }), (k, R) => {
138
+ const C = H("wx-alert"), q = H("wx-icon"), de = H("wx-input"), P = H("wx-form-item"), N = H("wx-checkbox"), S = H("wx-button"), ae = H("wx-form"), Xe = H("wx-card");
139
+ return h(), V(Xe, {
140
140
  class: "wx-login",
141
141
  padding: 24
142
142
  }, {
143
143
  default: t(() => [
144
144
  a(ae, {
145
- errors: f.value,
145
+ errors: y.value,
146
146
  disabled: g.value,
147
147
  gap: "md",
148
- onSubmit: Pe($, ["prevent"])
148
+ onSubmit: Pe(v, ["prevent"])
149
149
  }, {
150
150
  default: t(() => [
151
- x.value !== "" ? (p(), V(C, {
151
+ x.value !== "" ? (h(), V(C, {
152
152
  key: 0,
153
153
  type: "danger",
154
154
  variant: "soft",
155
155
  live: "",
156
156
  description: x.value,
157
157
  class: "wx-login__message"
158
- }, null, 8, ["description"])) : W.value ? (p(), V(C, {
158
+ }, null, 8, ["description"])) : O.value ? (h(), V(C, {
159
159
  key: 1,
160
160
  type: "warning",
161
161
  variant: "soft",
162
162
  live: "",
163
- description: s.value,
163
+ description: i.value,
164
164
  class: "wx-login__message"
165
165
  }, null, 8, ["description"])) : E("", !0),
166
- a(F, { name: "email" }, {
166
+ a(P, { name: "email" }, {
167
167
  default: t(() => [
168
168
  a(de, {
169
169
  ref_key: "emailField",
170
- ref: z,
171
- modelValue: b.value,
172
- "onUpdate:modelValue": R[0] || (R[0] = (se) => b.value = se),
170
+ ref: L,
171
+ modelValue: f.value,
172
+ "onUpdate:modelValue": R[0] || (R[0] = (se) => f.value = se),
173
173
  type: "email",
174
174
  placeholder: r.value.email,
175
175
  "aria-label": r.value.email,
@@ -186,14 +186,14 @@ const ct = ["title", "aria-label", "aria-pressed"], dt = /* @__PURE__ */ X({
186
186
  ]),
187
187
  _: 1
188
188
  }),
189
- a(F, {
189
+ a(P, {
190
190
  name: "password",
191
- help: m.value ? r.value.capsLock : void 0
191
+ help: d.value ? r.value.capsLock : void 0
192
192
  }, {
193
193
  default: t(() => [
194
194
  a(de, {
195
- modelValue: O.value,
196
- "onUpdate:modelValue": R[2] || (R[2] = (se) => O.value = se),
195
+ modelValue: F.value,
196
+ "onUpdate:modelValue": R[2] || (R[2] = (se) => F.value = se),
197
197
  type: w.value ? "text" : "password",
198
198
  placeholder: r.value.password,
199
199
  "aria-label": r.value.password,
@@ -206,7 +206,7 @@ const ct = ["title", "aria-label", "aria-pressed"], dt = /* @__PURE__ */ X({
206
206
  a(q, { name: "lock" })
207
207
  ]),
208
208
  suffix: t(() => [
209
- S("button", {
209
+ W("button", {
210
210
  type: "button",
211
211
  class: "wx-login__reveal",
212
212
  title: w.value ? r.value.hide : r.value.reveal,
@@ -218,30 +218,30 @@ const ct = ["title", "aria-label", "aria-pressed"], dt = /* @__PURE__ */ X({
218
218
  a(q, {
219
219
  name: w.value ? "eye-off" : "eye"
220
220
  }, null, 8, ["name"])
221
- ], 8, ct)
221
+ ], 8, mt)
222
222
  ]),
223
223
  _: 1
224
224
  }, 8, ["modelValue", "type", "placeholder", "aria-label"])
225
225
  ]),
226
226
  _: 1
227
227
  }, 8, ["help"]),
228
- n.remember ? (p(), V(N, {
228
+ n.remember ? (h(), V(N, {
229
229
  key: 2,
230
- modelValue: v.value,
231
- "onUpdate:modelValue": R[3] || (R[3] = (se) => v.value = se),
230
+ modelValue: p.value,
231
+ "onUpdate:modelValue": R[3] || (R[3] = (se) => p.value = se),
232
232
  label: r.value.remember,
233
233
  class: "wx-login__remember"
234
234
  }, null, 8, ["modelValue", "label"])) : E("", !0),
235
- a(L, {
235
+ a(S, {
236
236
  type: "primary",
237
237
  "native-type": "submit",
238
238
  size: "lg",
239
239
  block: "",
240
240
  loading: g.value,
241
- disabled: W.value
241
+ disabled: O.value
242
242
  }, {
243
243
  default: t(() => [
244
- d(i(r.value.submit), 1)
244
+ m(s(r.value.submit), 1)
245
245
  ]),
246
246
  _: 1
247
247
  }, 8, ["loading", "disabled"])
@@ -255,10 +255,18 @@ const ct = ["title", "aria-label", "aria-pressed"], dt = /* @__PURE__ */ X({
255
255
  }
256
256
  }), pe = (n, u) => {
257
257
  const l = n.__vccOpts || n;
258
- for (const [o, y] of u)
259
- l[o] = y;
258
+ for (const [o, b] of u)
259
+ l[o] = b;
260
260
  return l;
261
- }, mt = /* @__PURE__ */ pe(dt, [["__scopeId", "data-v-3c206e31"]]), Ke = {
261
+ }, pt = /* @__PURE__ */ pe(vt, [["__scopeId", "data-v-3c206e31"]]);
262
+ function Ye(n) {
263
+ return n.types["wx-media"]?.component ?? null;
264
+ }
265
+ function je(n) {
266
+ const u = n.assetUrls;
267
+ return u ? async (l) => (await u([l]))[l] ?? null : null;
268
+ }
269
+ const Ge = {
262
270
  card: {
263
271
  email: "Email",
264
272
  password: "Password",
@@ -435,10 +443,10 @@ function fe(n) {
435
443
  page: o.page,
436
444
  per_page: o.per_page
437
445
  }
438
- }).then((y) => ({ ...y.meta, data: y.data })),
446
+ }).then((b) => ({ ...b.meta, data: b.data })),
439
447
  get: (o) => n.http.get(`${u}/admins/${o}`).then(l),
440
448
  create: (o) => n.http.post(`${u}/admins`, o).then(l),
441
- update: (o, y) => n.http.patch(`${u}/admins/${o}`, y).then(l),
449
+ update: (o, b) => n.http.patch(`${u}/admins/${o}`, b).then(l),
442
450
  remove: (o) => n.http.delete(`${u}/admins/${o}`),
443
451
  roles: () => n.http.get(`${u}/roles`).then(l),
444
452
  calls: (o = {}) => n.http.get(`${u}/mcp-calls`, {
@@ -449,30 +457,30 @@ function fe(n) {
449
457
  page: o.page,
450
458
  per_page: o.per_page
451
459
  }
452
- }).then((y) => ({ ...y.meta, data: y.data, filters: y.filters }))
460
+ }).then((b) => ({ ...b.meta, data: b.data, filters: b.filters }))
453
461
  };
454
462
  }
455
463
  const Se = /* @__PURE__ */ new WeakSet();
456
464
  function te() {
457
465
  try {
458
466
  const { i18n: n } = ee();
459
- Se.has(n) || (n.defaults("webx-auth", Ke), Se.add(n));
467
+ Se.has(n) || (n.defaults("webx-auth", Ge), Se.add(n));
460
468
  } catch {
461
469
  }
462
470
  }
463
- const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft = {
471
+ const ft = { class: "wx-admin-form" }, ht = {
464
472
  key: 0,
465
473
  class: "wx-admin-form__aside"
466
- }, ht = { class: "wx-admin-form__fields" }, yt = /* @__PURE__ */ X({
474
+ }, yt = { class: "wx-admin-form__fields" }, _t = /* @__PURE__ */ X({
467
475
  __name: "AdminDialog",
468
476
  props: {
469
477
  admin: { default: null },
470
478
  avatarField: { default: void 0 }
471
479
  },
472
480
  setup(n) {
473
- const u = n, { resolve: l, dismiss: o, open: y } = ge(), c = ee(), _ = fe(c), r = Be();
481
+ const u = n, { resolve: l, dismiss: o, open: b } = ge(), c = ee(), z = fe(c), r = Ee();
474
482
  te();
475
- const b = J("webx-auth"), O = ve(), v = T([]), g = T(!1), w = T({}), m = T({
483
+ const f = J("webx-auth"), F = ve(), p = T([]), g = T(!1), w = T({}), d = T({
476
484
  name: "",
477
485
  email: "",
478
486
  password: "",
@@ -481,81 +489,81 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
481
489
  is_super: !1,
482
490
  locale: null,
483
491
  roles: []
484
- }), x = P({
485
- get: () => m.value.avatar ? { path: m.value.avatar } : null,
486
- set: (s) => {
487
- m.value.avatar = s?.path ?? null;
492
+ }), x = U({
493
+ get: () => d.value.avatar ? { path: d.value.avatar } : null,
494
+ set: (i) => {
495
+ d.value.avatar = i?.path ?? null;
488
496
  }
489
- }), f = P(() => u.admin !== null), h = P(() => v.value.map((s) => ({ value: s.id, label: s.name }))), z = P(() => [
490
- { value: "auto", label: b("admins.locale-auto") },
491
- ...r.state.panelLocales.map((s) => ({ value: s.code, label: s.nativeName }))
497
+ }), y = U(() => u.admin !== null), _ = U(() => p.value.map((i) => ({ value: i.id, label: i.name }))), L = U(() => [
498
+ { value: "auto", label: f("admins.locale-auto") },
499
+ ...r.state.panelLocales.map((i) => ({ value: i.code, label: i.nativeName }))
492
500
  ]);
493
- _.roles().then((s) => v.value = s), ue(
501
+ z.roles().then((i) => p.value = i), ue(
494
502
  () => u.admin,
495
- (s) => {
496
- m.value = {
497
- name: s?.name ?? "",
498
- email: s?.email ?? "",
503
+ (i) => {
504
+ d.value = {
505
+ name: i?.name ?? "",
506
+ email: i?.email ?? "",
499
507
  password: "",
500
- avatar: s?.avatar ?? null,
501
- is_active: s?.is_active ?? !0,
502
- is_super: s?.is_super ?? !1,
503
- locale: s?.locale ?? "auto",
504
- roles: s?.roles.map(($) => $.id) ?? []
508
+ avatar: i?.avatar ?? null,
509
+ is_active: i?.is_active ?? !0,
510
+ is_super: i?.is_super ?? !1,
511
+ locale: i?.locale ?? "auto",
512
+ roles: i?.roles.map((v) => v.id) ?? []
505
513
  }, w.value = {};
506
514
  },
507
515
  { immediate: !0 }
508
516
  );
509
- function A(s) {
510
- return w.value[s]?.[0];
517
+ function $(i) {
518
+ return w.value[i]?.[0];
511
519
  }
512
- async function W() {
520
+ async function O() {
513
521
  g.value = !0, w.value = {};
514
- const s = {
515
- name: m.value.name,
516
- email: m.value.email,
517
- avatar: m.value.avatar,
518
- is_active: m.value.is_active,
519
- is_super: m.value.is_super,
520
- locale: m.value.locale === "auto" ? null : m.value.locale,
521
- roles: m.value.roles ?? []
522
+ const i = {
523
+ name: d.value.name,
524
+ email: d.value.email,
525
+ avatar: d.value.avatar,
526
+ is_active: d.value.is_active,
527
+ is_super: d.value.is_super,
528
+ locale: d.value.locale === "auto" ? null : d.value.locale,
529
+ roles: d.value.roles ?? []
522
530
  };
523
- m.value.password && (s.password = m.value.password);
531
+ d.value.password && (i.password = d.value.password);
524
532
  try {
525
- const $ = u.admin ? await _.update(u.admin.id, s) : await _.create(s);
526
- Q.success(b(f.value ? "admins.updated" : "admins.created")), l($);
527
- } catch ($) {
528
- const U = $.body;
529
- U?.errors ? w.value = U.errors : Q.danger(O($));
533
+ const v = u.admin ? await z.update(u.admin.id, i) : await z.create(i);
534
+ Q.success(f(y.value ? "admins.updated" : "admins.created")), l(v);
535
+ } catch (v) {
536
+ const A = v.body;
537
+ A?.errors ? w.value = A.errors : Q.danger(F(v));
530
538
  } finally {
531
539
  g.value = !1;
532
540
  }
533
541
  }
534
- return (s, $) => (p(), V(e(we), {
535
- open: e(y),
536
- "onUpdate:open": $[9] || ($[9] = (U) => be(y) ? y.value = U : null),
537
- title: f.value ? e(b)("admins.edit-short") : e(b)("admins.new-short"),
542
+ return (i, v) => (h(), V(e(we), {
543
+ open: e(b),
544
+ "onUpdate:open": v[9] || (v[9] = (A) => be(b) ? b.value = A : null),
545
+ title: y.value ? e(f)("admins.edit-short") : e(f)("admins.new-short"),
538
546
  width: 720
539
547
  }, {
540
548
  footer: t(() => [
541
549
  a(e(oe), { size: "sm" }, {
542
550
  default: t(() => [
543
- a(e(I), {
551
+ a(e(M), {
544
552
  variant: "outline",
545
- onClick: $[8] || ($[8] = (U) => e(o)())
553
+ onClick: v[8] || (v[8] = (A) => e(o)())
546
554
  }, {
547
555
  default: t(() => [
548
- d(i(e(b)("admins.cancel")), 1)
556
+ m(s(e(f)("admins.cancel")), 1)
549
557
  ]),
550
558
  _: 1
551
559
  }),
552
- a(e(I), {
560
+ a(e(M), {
553
561
  type: "primary",
554
562
  loading: g.value,
555
- onClick: W
563
+ onClick: O
556
564
  }, {
557
565
  default: t(() => [
558
- d(i(e(b)("admins.save")), 1)
566
+ m(s(e(f)("admins.save")), 1)
559
567
  ]),
560
568
  _: 1
561
569
  }, 8, ["loading"])
@@ -564,39 +572,41 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
564
572
  })
565
573
  ]),
566
574
  default: t(() => [
567
- S("div", vt, [
568
- S("div", pt, [
569
- n.avatarField ? (p(), G("div", ft, [
570
- (p(), V(Fe(n.avatarField), {
575
+ W("div", ft, [
576
+ W("div", {
577
+ class: Fe(["wx-admin-form__grid", { "has-aside": n.avatarField }])
578
+ }, [
579
+ n.avatarField ? (h(), G("div", ht, [
580
+ (h(), V(Oe(n.avatarField), {
571
581
  modelValue: x.value,
572
- "onUpdate:modelValue": $[0] || ($[0] = (U) => x.value = U),
573
- label: e(b)("admins.avatar"),
582
+ "onUpdate:modelValue": v[0] || (v[0] = (A) => x.value = A),
583
+ label: e(f)("admins.avatar"),
574
584
  aspect: "1/1",
575
585
  captions: !1
576
586
  }, null, 8, ["modelValue", "label"]))
577
587
  ])) : E("", !0),
578
- S("div", ht, [
579
- a(e(H), {
580
- label: e(b)("admins.name"),
581
- error: A("name")
588
+ W("div", yt, [
589
+ a(e(K), {
590
+ label: e(f)("admins.name"),
591
+ error: $("name")
582
592
  }, {
583
593
  default: t(() => [
584
594
  a(e(le), {
585
- modelValue: m.value.name,
586
- "onUpdate:modelValue": $[1] || ($[1] = (U) => m.value.name = U),
595
+ modelValue: d.value.name,
596
+ "onUpdate:modelValue": v[1] || (v[1] = (A) => d.value.name = A),
587
597
  name: "name"
588
598
  }, null, 8, ["modelValue"])
589
599
  ]),
590
600
  _: 1
591
601
  }, 8, ["label", "error"]),
592
- a(e(H), {
593
- label: e(b)("admins.email"),
594
- error: A("email")
602
+ a(e(K), {
603
+ label: e(f)("admins.email"),
604
+ error: $("email")
595
605
  }, {
596
606
  default: t(() => [
597
607
  a(e(le), {
598
- modelValue: m.value.email,
599
- "onUpdate:modelValue": $[2] || ($[2] = (U) => m.value.email = U),
608
+ modelValue: d.value.email,
609
+ "onUpdate:modelValue": v[2] || (v[2] = (A) => d.value.email = A),
600
610
  type: "email",
601
611
  name: "email",
602
612
  autocomplete: "off"
@@ -604,15 +614,15 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
604
614
  ]),
605
615
  _: 1
606
616
  }, 8, ["label", "error"]),
607
- a(e(H), {
608
- label: e(b)("admins.password"),
609
- error: A("password"),
610
- help: f.value ? e(b)("admins.password-keep") : e(b)("admins.password-hint")
617
+ a(e(K), {
618
+ label: e(f)("admins.password"),
619
+ error: $("password"),
620
+ help: y.value ? e(f)("admins.password-keep") : e(f)("admins.password-hint")
611
621
  }, {
612
622
  default: t(() => [
613
623
  a(e(le), {
614
- modelValue: m.value.password,
615
- "onUpdate:modelValue": $[3] || ($[3] = (U) => m.value.password = U),
624
+ modelValue: d.value.password,
625
+ "onUpdate:modelValue": v[3] || (v[3] = (A) => d.value.password = A),
616
626
  type: "password",
617
627
  name: "password",
618
628
  autocomplete: "new-password"
@@ -620,28 +630,28 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
620
630
  ]),
621
631
  _: 1
622
632
  }, 8, ["label", "error", "help"]),
623
- a(e(H), {
624
- label: e(b)("admins.roles"),
625
- error: A("roles")
633
+ a(e(K), {
634
+ label: e(f)("admins.roles"),
635
+ error: $("roles")
626
636
  }, {
627
637
  default: t(() => [
628
638
  a(e(ne), {
629
- modelValue: m.value.roles,
630
- "onUpdate:modelValue": $[4] || ($[4] = (U) => m.value.roles = U),
631
- options: h.value,
639
+ modelValue: d.value.roles,
640
+ "onUpdate:modelValue": v[4] || (v[4] = (A) => d.value.roles = A),
641
+ options: _.value,
632
642
  multiple: ""
633
643
  }, null, 8, ["modelValue", "options"])
634
644
  ]),
635
645
  _: 1
636
646
  }, 8, ["label", "error"]),
637
- a(e(H), {
638
- label: e(b)("admins.locale")
647
+ a(e(K), {
648
+ label: e(f)("admins.locale")
639
649
  }, {
640
650
  default: t(() => [
641
651
  a(e(ne), {
642
- modelValue: m.value.locale,
643
- "onUpdate:modelValue": $[5] || ($[5] = (U) => m.value.locale = U),
644
- options: z.value
652
+ modelValue: d.value.locale,
653
+ "onUpdate:modelValue": v[5] || (v[5] = (A) => d.value.locale = A),
654
+ options: L.value
645
655
  }, null, 8, ["modelValue", "options"])
646
656
  ]),
647
657
  _: 1
@@ -649,14 +659,14 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
649
659
  a(e(oe), { size: "md" }, {
650
660
  default: t(() => [
651
661
  a(e(ze), {
652
- modelValue: m.value.is_active,
653
- "onUpdate:modelValue": $[6] || ($[6] = (U) => m.value.is_active = U),
654
- label: e(b)("admins.active")
662
+ modelValue: d.value.is_active,
663
+ "onUpdate:modelValue": v[6] || (v[6] = (A) => d.value.is_active = A),
664
+ label: e(f)("admins.active")
655
665
  }, null, 8, ["modelValue", "label"]),
656
666
  a(e(ze), {
657
- modelValue: m.value.is_super,
658
- "onUpdate:modelValue": $[7] || ($[7] = (U) => m.value.is_super = U),
659
- label: e(b)("admins.super")
667
+ modelValue: d.value.is_super,
668
+ "onUpdate:modelValue": v[7] || (v[7] = (A) => d.value.is_super = A),
669
+ label: e(f)("admins.super")
660
670
  }, null, 8, ["modelValue", "label"])
661
671
  ]),
662
672
  _: 1
@@ -666,18 +676,18 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
666
676
  tone: "muted"
667
677
  }, {
668
678
  default: t(() => [
669
- d(i(e(b)("admins.super-hint")), 1)
679
+ m(s(e(f)("admins.super-hint")), 1)
670
680
  ]),
671
681
  _: 1
672
682
  })
673
683
  ])
674
- ])
684
+ ], 2)
675
685
  ])
676
686
  ]),
677
687
  _: 1
678
688
  }, 8, ["open", "title"]));
679
689
  }
680
- }), We = 480, Ye = /* @__PURE__ */ X({
690
+ }), We = 480, Je = /* @__PURE__ */ X({
681
691
  __name: "AdminList",
682
692
  props: {
683
693
  picking: { type: Boolean, default: !1 },
@@ -688,40 +698,40 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
688
698
  },
689
699
  emits: ["open", "chosen", "selection", "remove"],
690
700
  setup(n, { expose: u, emit: l }) {
691
- const o = n, y = l, c = ee(), _ = fe(c);
701
+ const o = n, b = l, c = ee(), z = fe(c);
692
702
  te();
693
- const r = re("root"), b = xe(r), O = P(() => b.value > 0 && b.value < We), v = J("webx-auth"), g = J("webx-admin"), w = T(null), m = T([]), x = T(!1), f = T("all"), h = T("any"), z = T([]), A = T({});
694
- let W = { page: 1, perPage: 20, sort: null, search: "" };
695
- const s = P(() => [
696
- { value: "all", label: v("admins.all-roles") },
697
- ...m.value.map((F) => ({ value: F.slug, label: F.name }))
698
- ]), $ = P(() => [
699
- { value: "any", label: v("admins.any-state") },
700
- { value: "yes", label: v("admins.only-active") },
701
- { value: "no", label: v("admins.only-inactive") }
702
- ]), U = P(() => {
703
- const F = [], N = m.value.find((L) => L.slug === f.value);
704
- return N && F.push({
703
+ const r = re("root"), f = xe(r), F = U(() => f.value > 0 && f.value < We), p = J("webx-auth"), g = J("webx-admin"), w = T(null), d = T([]), x = T(!1), y = T("all"), _ = T("any"), L = T([]), $ = T({});
704
+ let O = { page: 1, perPage: 20, sort: null, search: "" };
705
+ const i = U(() => [
706
+ { value: "all", label: p("admins.all-roles") },
707
+ ...d.value.map((P) => ({ value: P.slug, label: P.name }))
708
+ ]), v = U(() => [
709
+ { value: "any", label: p("admins.any-state") },
710
+ { value: "yes", label: p("admins.only-active") },
711
+ { value: "no", label: p("admins.only-inactive") }
712
+ ]), A = U(() => {
713
+ const P = [], N = d.value.find((S) => S.slug === y.value);
714
+ return N && P.push({
705
715
  key: "role",
706
- label: `${v("admins.filter-role")}: ${N.name}`,
707
- clear: () => f.value = "all"
708
- }), h.value !== "any" && F.push({
716
+ label: `${p("admins.filter-role")}: ${N.name}`,
717
+ clear: () => y.value = "all"
718
+ }), _.value !== "any" && P.push({
709
719
  key: "state",
710
- label: `${v("admins.filter-state")}: ${h.value === "yes" ? v("admins.only-active") : v("admins.only-inactive")}`,
711
- clear: () => h.value = "any"
712
- }), F;
720
+ label: `${p("admins.filter-state")}: ${_.value === "yes" ? p("admins.only-active") : p("admins.only-inactive")}`,
721
+ clear: () => _.value = "any"
722
+ }), P;
713
723
  });
714
- function K() {
715
- f.value = "all", h.value = "any";
724
+ function I() {
725
+ y.value = "all", _.value = "any";
716
726
  }
717
- const Y = P(() => O.value ? [{ key: "card", label: "" }] : [
718
- { key: "name", label: v("admins.name"), sortable: !0 },
719
- { key: "email", label: v("admins.email"), sortable: !0, hideBelow: 560 },
720
- { key: "roles", label: v("admins.roles"), hideBelow: 760 },
721
- { key: "is_active", label: v("admins.active"), align: "center", hideBelow: 660 },
727
+ const Y = U(() => F.value ? [{ key: "card", label: "" }] : [
728
+ { key: "name", label: p("admins.name"), sortable: !0 },
729
+ { key: "email", label: p("admins.email"), sortable: !0, hideBelow: 560 },
730
+ { key: "roles", label: p("admins.roles"), hideBelow: 760 },
731
+ { key: "is_active", label: p("admins.active"), align: "center", hideBelow: 660 },
722
732
  {
723
733
  key: "last_login_at",
724
- label: v("admins.last-login"),
734
+ label: p("admins.last-login"),
725
735
  sortable: !0,
726
736
  hideBelow: 900,
727
737
  // The first thing to go when a row becomes a card: it is a date somebody scans down a
@@ -731,61 +741,61 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
731
741
  {
732
742
  key: "actions",
733
743
  label: "",
734
- width: Ze,
744
+ width: tt,
735
745
  align: "right",
736
746
  hidden: !o.removable,
737
747
  // A card puts them along its top instead, through the `card-actions` slot.
738
748
  hideOnCards: !0
739
749
  }
740
750
  ]);
741
- _.roles().then((F) => m.value = F), ue([f, h], () => D(W));
742
- async function D(F) {
743
- W = F, x.value = !0;
751
+ z.roles().then((P) => d.value = P), ue([y, _], () => D(O));
752
+ async function D(P) {
753
+ O = P, x.value = !0;
744
754
  try {
745
- w.value = await _.list({
746
- q: F.search,
747
- role: f.value === "all" ? null : f.value,
748
- active: h.value === "any" ? null : h.value,
749
- sort: F.sort ? `${F.sort.order === "desc" ? "-" : ""}${F.sort.key}` : "name",
750
- page: F.page,
751
- per_page: F.perPage
755
+ w.value = await z.list({
756
+ q: P.search,
757
+ role: y.value === "all" ? null : y.value,
758
+ active: _.value === "any" ? null : _.value,
759
+ sort: P.sort ? `${P.sort.order === "desc" ? "-" : ""}${P.sort.key}` : "name",
760
+ page: P.page,
761
+ per_page: P.perPage
752
762
  }), k();
753
763
  } finally {
754
764
  x.value = !1;
755
765
  }
756
766
  }
757
767
  async function k() {
758
- const F = o.resolveAvatar;
759
- if (F)
768
+ const P = o.resolveAvatar;
769
+ if (P)
760
770
  for (const N of w.value?.data ?? []) {
761
- if (!N.avatar || A.value[N.avatar]) continue;
762
- const L = await F(N.avatar);
763
- L && (A.value = { ...A.value, [N.avatar]: L });
771
+ if (!N.avatar || $.value[N.avatar]) continue;
772
+ const S = await P(N.avatar);
773
+ S && ($.value = { ...$.value, [N.avatar]: S });
764
774
  }
765
775
  }
766
- function R(F) {
776
+ function R(P) {
767
777
  return [
768
778
  {
769
779
  key: "delete",
770
780
  icon: "trash",
771
- label: v("admins.delete"),
781
+ label: p("admins.delete"),
772
782
  danger: !0,
773
- run: () => y("remove", F)
783
+ run: () => b("remove", P)
774
784
  }
775
785
  ];
776
786
  }
777
- function C(F) {
787
+ function C(P) {
778
788
  if (o.picking) {
779
- y("chosen", [F]);
789
+ b("chosen", [P]);
780
790
  return;
781
791
  }
782
- y("open", F);
792
+ b("open", P);
783
793
  }
784
- const q = P(() => !(o.picking && o.multiple));
785
- function de(F, N) {
786
- z.value = N, y("selection", N);
794
+ const q = U(() => !(o.picking && o.multiple));
795
+ function de(P, N) {
796
+ L.value = N, b("selection", N);
787
797
  }
788
- return u({ reload: () => D(W), chosen: () => z.value }), (F, N) => (p(), G("div", {
798
+ return u({ reload: () => D(O), chosen: () => L.value }), (P, N) => (h(), G("div", {
789
799
  ref_key: "root",
790
800
  ref: r,
791
801
  class: "wx-admin-list"
@@ -799,36 +809,36 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
799
809
  hover: q.value,
800
810
  flush: "",
801
811
  loading: x.value,
802
- "search-placeholder": e(v)("admins.search"),
803
- "empty-text": e(v)("admins.empty"),
812
+ "search-placeholder": e(p)("admins.search"),
813
+ "empty-text": e(p)("admins.empty"),
804
814
  selectable: n.picking && n.multiple,
805
815
  "select-row-label": e(g)("filters.select-row"),
806
816
  "select-all-label": e(g)("filters.select-all"),
807
817
  "cards-below": We,
808
- "filters-count": U.value.length,
818
+ "filters-count": A.value.length,
809
819
  "filters-label": e(g)("filters.title"),
810
820
  onRowClick: C,
811
821
  onStateChange: D,
812
822
  onSelectionChange: de
813
- }, Oe({
814
- "cell-name": t(({ row: L }) => [
823
+ }, Re({
824
+ "cell-name": t(({ row: S }) => [
815
825
  a(e(oe), {
816
826
  size: "sm",
817
827
  align: "center"
818
828
  }, {
819
829
  default: t(() => [
820
- a(e(lt), {
821
- name: L.name,
822
- src: L.avatar ? A.value[L.avatar] : void 0,
830
+ a(e(ot), {
831
+ name: S.name,
832
+ src: S.avatar ? $.value[S.avatar] : void 0,
823
833
  size: "sm"
824
834
  }, null, 8, ["name", "src"]),
825
- S("span", null, i(L.name), 1),
826
- L.is_super ? (p(), V(e(j), {
835
+ W("span", null, s(S.name), 1),
836
+ S.is_super ? (h(), V(e(j), {
827
837
  key: 0,
828
838
  type: "warning"
829
839
  }, {
830
840
  default: t(() => [
831
- d(i(e(v)("admins.super")), 1)
841
+ m(s(e(p)("admins.super")), 1)
832
842
  ]),
833
843
  _: 1
834
844
  })) : E("", !0)
@@ -836,100 +846,100 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
836
846
  _: 2
837
847
  }, 1024)
838
848
  ]),
839
- "cell-roles": t(({ row: L }) => [
840
- L.roles.length > 0 ? (p(), V(e(oe), {
849
+ "cell-roles": t(({ row: S }) => [
850
+ S.roles.length > 0 ? (h(), V(e(oe), {
841
851
  key: 0,
842
852
  size: "xs",
843
853
  wrap: ""
844
854
  }, {
845
855
  default: t(() => [
846
- (p(!0), G(ce, null, _e(L.roles, (ae) => (p(), V(e(j), {
856
+ (h(!0), G(ce, null, _e(S.roles, (ae) => (h(), V(e(j), {
847
857
  key: ae.id
848
858
  }, {
849
859
  default: t(() => [
850
- d(i(ae.name), 1)
860
+ m(s(ae.name), 1)
851
861
  ]),
852
862
  _: 2
853
863
  }, 1024))), 128))
854
864
  ]),
855
865
  _: 2
856
- }, 1024)) : (p(), V(e(B), {
866
+ }, 1024)) : (h(), V(e(B), {
857
867
  key: 1,
858
868
  size: "sm",
859
869
  tone: "muted"
860
870
  }, {
861
871
  default: t(() => [
862
- d(i(e(v)("admins.no-roles")), 1)
872
+ m(s(e(p)("admins.no-roles")), 1)
863
873
  ]),
864
874
  _: 1
865
875
  }))
866
876
  ]),
867
- "cell-is_active": t(({ row: L }) => [
877
+ "cell-is_active": t(({ row: S }) => [
868
878
  a(e(j), {
869
- type: L.is_active ? "success" : "default",
879
+ type: S.is_active ? "success" : "default",
870
880
  dot: ""
871
881
  }, {
872
882
  default: t(() => [
873
- d(i(L.is_active ? e(v)("admins.active") : e(v)("admins.only-inactive")), 1)
883
+ m(s(S.is_active ? e(p)("admins.active") : e(p)("admins.only-inactive")), 1)
874
884
  ]),
875
885
  _: 2
876
886
  }, 1032, ["type"])
877
887
  ]),
878
- "card-actions": t(({ row: L }) => [
879
- n.removable ? (p(), V(e(Ve), {
888
+ "card-actions": t(({ row: S }) => [
889
+ n.removable ? (h(), V(e(Ve), {
880
890
  key: 0,
881
- actions: R(L),
882
- label: L.name
891
+ actions: R(S),
892
+ label: S.name
883
893
  }, null, 8, ["actions", "label"])) : E("", !0)
884
894
  ]),
885
- "cell-actions": t(({ row: L }) => [
895
+ "cell-actions": t(({ row: S }) => [
886
896
  a(e(Ve), {
887
- actions: R(L),
888
- label: L.name
897
+ actions: R(S),
898
+ label: S.name
889
899
  }, null, 8, ["actions", "label"])
890
900
  ]),
891
- "cell-last_login_at": t(({ row: L }) => [
901
+ "cell-last_login_at": t(({ row: S }) => [
892
902
  a(e(ie), {
893
- value: L.last_login_at,
894
- tone: L.last_login_at ? "default" : "muted",
903
+ value: S.last_login_at,
904
+ tone: S.last_login_at ? "default" : "muted",
895
905
  compact: ""
896
906
  }, null, 8, ["value", "tone"])
897
907
  ]),
898
- "cell-card": t(({ row: L }) => [
908
+ "cell-card": t(({ row: S }) => [
899
909
  a(e(Ce), {
900
910
  variant: "plain",
901
911
  shape: "circle",
902
- title: L.name,
903
- image: L.avatar ? A.value[L.avatar] : void 0,
904
- subtitle: L.email
912
+ title: S.name,
913
+ image: S.avatar ? $.value[S.avatar] : void 0,
914
+ subtitle: S.email
905
915
  }, {
906
916
  meta: t(() => [
907
- L.is_super ? (p(), V(e(j), {
917
+ S.is_super ? (h(), V(e(j), {
908
918
  key: 0,
909
919
  type: "warning",
910
920
  size: "sm"
911
921
  }, {
912
922
  default: t(() => [
913
- d(i(e(v)("admins.super")), 1)
923
+ m(s(e(p)("admins.super")), 1)
914
924
  ]),
915
925
  _: 1
916
926
  })) : E("", !0),
917
- (p(!0), G(ce, null, _e(L.roles, (ae) => (p(), V(e(j), {
927
+ (h(!0), G(ce, null, _e(S.roles, (ae) => (h(), V(e(j), {
918
928
  key: ae.id,
919
929
  size: "sm"
920
930
  }, {
921
931
  default: t(() => [
922
- d(i(ae.name), 1)
932
+ m(s(ae.name), 1)
923
933
  ]),
924
934
  _: 2
925
935
  }, 1024))), 128)),
926
936
  a(e(j), {
927
- type: L.is_active ? "success" : "default",
937
+ type: S.is_active ? "success" : "default",
928
938
  dot: "",
929
939
  size: "sm"
930
940
  }, {
931
941
  default: t(() => [
932
- d(i(L.is_active ? e(v)("admins.active") : e(v)("admins.only-inactive")), 1)
942
+ m(s(S.is_active ? e(p)("admins.active") : e(p)("admins.only-inactive")), 1)
933
943
  ]),
934
944
  _: 2
935
945
  }, 1032, ["type"])
@@ -942,44 +952,44 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
942
952
  n.filters ? {
943
953
  name: "filters",
944
954
  fn: t(() => [
945
- a(e(H), {
946
- label: e(v)("admins.filter-role")
955
+ a(e(K), {
956
+ label: e(p)("admins.filter-role")
947
957
  }, {
948
958
  default: t(() => [
949
959
  a(e(ne), {
950
- modelValue: f.value,
951
- "onUpdate:modelValue": N[0] || (N[0] = (L) => f.value = L),
952
- options: s.value,
960
+ modelValue: y.value,
961
+ "onUpdate:modelValue": N[0] || (N[0] = (S) => y.value = S),
962
+ options: i.value,
953
963
  size: "sm"
954
964
  }, null, 8, ["modelValue", "options"])
955
965
  ]),
956
966
  _: 1
957
967
  }, 8, ["label"]),
958
- a(e(H), {
959
- label: e(v)("admins.filter-state")
968
+ a(e(K), {
969
+ label: e(p)("admins.filter-state")
960
970
  }, {
961
971
  default: t(() => [
962
972
  a(e(ne), {
963
- modelValue: h.value,
964
- "onUpdate:modelValue": N[1] || (N[1] = (L) => h.value = L),
965
- options: $.value,
973
+ modelValue: _.value,
974
+ "onUpdate:modelValue": N[1] || (N[1] = (S) => _.value = S),
975
+ options: v.value,
966
976
  size: "sm"
967
977
  }, null, 8, ["modelValue", "options"])
968
978
  ]),
969
979
  _: 1
970
980
  }, 8, ["label"]),
971
- U.value.length > 0 ? (p(), V(e(I), {
981
+ A.value.length > 0 ? (h(), V(e(M), {
972
982
  key: 0,
973
983
  variant: "text",
974
984
  size: "sm",
975
985
  block: "",
976
- onClick: K
986
+ onClick: I
977
987
  }, {
978
988
  icon: t(() => [
979
989
  a(e(Z), { name: "close" })
980
990
  ]),
981
991
  default: t(() => [
982
- d(" " + i(e(g)("filters.reset")), 1)
992
+ m(" " + s(e(g)("filters.reset")), 1)
983
993
  ]),
984
994
  _: 1
985
995
  })) : E("", !0)
@@ -989,68 +999,68 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
989
999
  n.filters ? {
990
1000
  name: "applied",
991
1001
  fn: t(() => [
992
- a(e(Ee), { filters: U.value }, null, 8, ["filters"])
1002
+ a(e(De), { filters: A.value }, null, 8, ["filters"])
993
1003
  ]),
994
1004
  key: "1"
995
1005
  } : void 0
996
1006
  ]), 1032, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text", "selectable", "select-row-label", "select-all-label", "filters-count", "filters-label"])
997
1007
  ], 512));
998
1008
  }
999
- }), _t = { class: "wx-call-list__details" }, bt = {
1009
+ }), bt = { class: "wx-call-list__details" }, gt = {
1000
1010
  key: 1,
1001
1011
  class: "wx-call-list__arguments"
1002
- }, gt = {
1012
+ }, wt = {
1003
1013
  class: "wx-call-list__glyph",
1004
1014
  "aria-hidden": "true"
1005
- }, wt = {
1015
+ }, xt = {
1006
1016
  key: 1,
1007
1017
  class: "wx-call-list__arguments"
1008
- }, Te = 480, xt = /* @__PURE__ */ X({
1018
+ }, Te = 480, kt = /* @__PURE__ */ X({
1009
1019
  __name: "CallList",
1010
1020
  setup(n, { expose: u }) {
1011
1021
  const l = ee(), o = fe(l);
1012
1022
  te();
1013
- const y = re("root"), c = xe(y), _ = P(() => c.value > 0 && c.value < Te), r = J("webx-auth"), b = J("webx-admin"), O = T(null), v = T({ users: [], tools: [] }), g = T(!1), w = T("all"), m = T("all"), x = T("any");
1014
- let f = { page: 1, perPage: 30, sort: null, search: "" };
1015
- function h(k) {
1023
+ const b = re("root"), c = xe(b), z = U(() => c.value > 0 && c.value < Te), r = J("webx-auth"), f = J("webx-admin"), F = T(null), p = T({ users: [], tools: [] }), g = T(!1), w = T("all"), d = T("all"), x = T("any");
1024
+ let y = { page: 1, perPage: 30, sort: null, search: "" };
1025
+ function _(k) {
1016
1026
  return k === null ? r("calls.local") : k.name ?? r("calls.deleted", { id: k.id });
1017
1027
  }
1018
- const z = P(() => [
1028
+ const L = U(() => [
1019
1029
  { value: "all", label: r("calls.everybody") },
1020
- ...v.value.users.map((k) => ({
1030
+ ...p.value.users.map((k) => ({
1021
1031
  value: k.id === null ? "none" : String(k.id),
1022
- label: h(k.id === null ? null : { id: k.id, name: k.name })
1032
+ label: _(k.id === null ? null : { id: k.id, name: k.name })
1023
1033
  }))
1024
- ]), A = P(() => [
1034
+ ]), $ = U(() => [
1025
1035
  { value: "all", label: r("calls.all-tools") },
1026
- ...v.value.tools.map((k) => ({ value: k, label: k }))
1027
- ]), W = P(() => [
1036
+ ...p.value.tools.map((k) => ({ value: k, label: k }))
1037
+ ]), O = U(() => [
1028
1038
  { value: "any", label: r("calls.any-outcome") },
1029
1039
  { value: "ok", label: r("calls.only-answered") },
1030
1040
  { value: "failed", label: r("calls.only-refused") },
1031
1041
  { value: "dry", label: r("calls.only-dry") }
1032
- ]), s = P(() => {
1033
- const k = [], R = z.value.find((q) => q.value === w.value);
1042
+ ]), i = U(() => {
1043
+ const k = [], R = L.value.find((q) => q.value === w.value);
1034
1044
  w.value !== "all" && R && k.push({
1035
1045
  key: "user",
1036
1046
  label: `${r("calls.filter-user")}: ${R.label}`,
1037
1047
  clear: () => w.value = "all"
1038
- }), m.value !== "all" && k.push({
1048
+ }), d.value !== "all" && k.push({
1039
1049
  key: "tool",
1040
- label: `${r("calls.filter-tool")}: ${m.value}`,
1041
- clear: () => m.value = "all"
1050
+ label: `${r("calls.filter-tool")}: ${d.value}`,
1051
+ clear: () => d.value = "all"
1042
1052
  });
1043
- const C = W.value.find((q) => q.value === x.value);
1053
+ const C = O.value.find((q) => q.value === x.value);
1044
1054
  return x.value !== "any" && C && k.push({
1045
1055
  key: "outcome",
1046
1056
  label: `${r("calls.filter-outcome")}: ${C.label}`,
1047
1057
  clear: () => x.value = "any"
1048
1058
  }), k;
1049
1059
  });
1050
- function $() {
1051
- w.value = "all", m.value = "all", x.value = "any";
1060
+ function v() {
1061
+ w.value = "all", d.value = "all", x.value = "any";
1052
1062
  }
1053
- const U = P(() => _.value ? [{ key: "card", label: "" }] : [
1063
+ const A = U(() => z.value ? [{ key: "card", label: "" }] : [
1054
1064
  { key: "at", label: r("calls.when") },
1055
1065
  { key: "user", label: r("calls.who"), hideBelow: 640 },
1056
1066
  { key: "tool", label: r("calls.tool") },
@@ -1058,17 +1068,17 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1058
1068
  { key: "duration_ms", label: r("calls.took"), align: "right", hideBelow: 820 },
1059
1069
  { key: "client", label: r("calls.client"), hideBelow: 960 }
1060
1070
  ]);
1061
- ue([w, m, x], () => K({ ...f, page: 1 }));
1062
- async function K(k) {
1063
- f = k, g.value = !0;
1071
+ ue([w, d, x], () => I({ ...y, page: 1 }));
1072
+ async function I(k) {
1073
+ y = k, g.value = !0;
1064
1074
  try {
1065
- O.value = await o.calls({
1075
+ F.value = await o.calls({
1066
1076
  user: w.value === "all" ? null : w.value,
1067
- tool: m.value === "all" ? null : m.value,
1077
+ tool: d.value === "all" ? null : d.value,
1068
1078
  outcome: x.value === "any" ? null : x.value,
1069
1079
  page: k.page,
1070
1080
  per_page: k.perPage
1071
- }), v.value = O.value.filters;
1081
+ }), p.value = F.value.filters;
1072
1082
  } finally {
1073
1083
  g.value = !1;
1074
1084
  }
@@ -1079,84 +1089,84 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1079
1089
  function D(k) {
1080
1090
  return k.arguments !== null || k.error !== null;
1081
1091
  }
1082
- return u({ reload: () => K(f) }), (k, R) => (p(), G("div", {
1092
+ return u({ reload: () => I(y) }), (k, R) => (h(), G("div", {
1083
1093
  ref_key: "root",
1084
- ref: y,
1094
+ ref: b,
1085
1095
  class: "wx-call-list"
1086
1096
  }, [
1087
1097
  a(e(ke), {
1088
- data: O.value,
1089
- columns: U.value,
1098
+ data: F.value,
1099
+ columns: A.value,
1090
1100
  "row-key": "id",
1091
1101
  flush: "",
1092
1102
  loading: g.value,
1093
1103
  clickable: !1,
1094
- expandable: !_.value,
1104
+ expandable: !z.value,
1095
1105
  "expandable-if": D,
1096
1106
  "empty-text": e(r)("calls.empty"),
1097
1107
  "cards-below": Te,
1098
- "filters-count": s.value.length,
1099
- "filters-label": e(b)("filters.title"),
1100
- onStateChange: K
1108
+ "filters-count": i.value.length,
1109
+ "filters-label": e(f)("filters.title"),
1110
+ onStateChange: I
1101
1111
  }, {
1102
1112
  filters: t(() => [
1103
- a(e(H), {
1113
+ a(e(K), {
1104
1114
  label: e(r)("calls.filter-user")
1105
1115
  }, {
1106
1116
  default: t(() => [
1107
1117
  a(e(ne), {
1108
1118
  modelValue: w.value,
1109
1119
  "onUpdate:modelValue": R[0] || (R[0] = (C) => w.value = C),
1110
- options: z.value,
1120
+ options: L.value,
1111
1121
  size: "sm"
1112
1122
  }, null, 8, ["modelValue", "options"])
1113
1123
  ]),
1114
1124
  _: 1
1115
1125
  }, 8, ["label"]),
1116
- a(e(H), {
1126
+ a(e(K), {
1117
1127
  label: e(r)("calls.filter-tool")
1118
1128
  }, {
1119
1129
  default: t(() => [
1120
1130
  a(e(ne), {
1121
- modelValue: m.value,
1122
- "onUpdate:modelValue": R[1] || (R[1] = (C) => m.value = C),
1123
- options: A.value,
1131
+ modelValue: d.value,
1132
+ "onUpdate:modelValue": R[1] || (R[1] = (C) => d.value = C),
1133
+ options: $.value,
1124
1134
  size: "sm"
1125
1135
  }, null, 8, ["modelValue", "options"])
1126
1136
  ]),
1127
1137
  _: 1
1128
1138
  }, 8, ["label"]),
1129
- a(e(H), {
1139
+ a(e(K), {
1130
1140
  label: e(r)("calls.filter-outcome")
1131
1141
  }, {
1132
1142
  default: t(() => [
1133
1143
  a(e(ne), {
1134
1144
  modelValue: x.value,
1135
1145
  "onUpdate:modelValue": R[2] || (R[2] = (C) => x.value = C),
1136
- options: W.value,
1146
+ options: O.value,
1137
1147
  size: "sm"
1138
1148
  }, null, 8, ["modelValue", "options"])
1139
1149
  ]),
1140
1150
  _: 1
1141
1151
  }, 8, ["label"]),
1142
- s.value.length > 0 ? (p(), V(e(I), {
1152
+ i.value.length > 0 ? (h(), V(e(M), {
1143
1153
  key: 0,
1144
1154
  variant: "text",
1145
1155
  size: "sm",
1146
1156
  block: "",
1147
- onClick: $
1157
+ onClick: v
1148
1158
  }, {
1149
1159
  icon: t(() => [
1150
1160
  a(e(Z), { name: "close" })
1151
1161
  ]),
1152
1162
  default: t(() => [
1153
- d(" " + i(e(b)("filters.reset")), 1)
1163
+ m(" " + s(e(f)("filters.reset")), 1)
1154
1164
  ]),
1155
1165
  _: 1
1156
1166
  })) : E("", !0)
1157
1167
  ]),
1158
1168
  applied: t(() => [
1159
- a(e(Ee), { filters: s.value }, null, 8, ["filters"])
1169
+ a(e(De), { filters: i.value }, null, 8, ["filters"])
1160
1170
  ]),
1161
1171
  "cell-at": t(({ row: C }) => [
1162
1172
  a(e(ie), {
@@ -1170,7 +1180,7 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1170
1180
  tone: C.user === null || C.user.name === null ? "muted" : "default"
1171
1181
  }, {
1172
1182
  default: t(() => [
1173
- d(i(h(C.user)), 1)
1183
+ m(s(_(C.user)), 1)
1174
1184
  ]),
1175
1185
  _: 2
1176
1186
  }, 1032, ["tone"])
@@ -1181,7 +1191,7 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1181
1191
  size: "sm"
1182
1192
  }, {
1183
1193
  default: t(() => [
1184
- d(i(C.tool), 1)
1194
+ m(s(C.tool), 1)
1185
1195
  ]),
1186
1196
  _: 2
1187
1197
  }, 1024)
@@ -1192,7 +1202,7 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1192
1202
  dot: ""
1193
1203
  }, {
1194
1204
  default: t(() => [
1195
- d(i(Y(C).label), 1)
1205
+ m(s(Y(C).label), 1)
1196
1206
  ]),
1197
1207
  _: 2
1198
1208
  }, 1032, ["type"])
@@ -1203,52 +1213,52 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1203
1213
  tone: "muted"
1204
1214
  }, {
1205
1215
  default: t(() => [
1206
- d(i(e(r)("calls.ms", { count: C.duration_ms })), 1)
1216
+ m(s(e(r)("calls.ms", { count: C.duration_ms })), 1)
1207
1217
  ]),
1208
1218
  _: 2
1209
1219
  }, 1024)
1210
1220
  ]),
1211
1221
  "cell-client": t(({ row: C }) => [
1212
- C.client ? (p(), V(e(B), {
1222
+ C.client ? (h(), V(e(B), {
1213
1223
  key: 0,
1214
1224
  size: "sm"
1215
1225
  }, {
1216
1226
  default: t(() => [
1217
- d(i(C.client), 1)
1227
+ m(s(C.client), 1)
1218
1228
  ]),
1219
1229
  _: 2
1220
- }, 1024)) : (p(), V(e(B), {
1230
+ }, 1024)) : (h(), V(e(B), {
1221
1231
  key: 1,
1222
1232
  size: "sm",
1223
1233
  tone: "muted"
1224
1234
  }, {
1225
1235
  default: t(() => [...R[3] || (R[3] = [
1226
- d("—", -1)
1236
+ m("—", -1)
1227
1237
  ])]),
1228
1238
  _: 1
1229
1239
  }))
1230
1240
  ]),
1231
1241
  expanded: t(({ row: C }) => [
1232
- S("div", _t, [
1233
- C.error ? (p(), V(e(B), {
1242
+ W("div", bt, [
1243
+ C.error ? (h(), V(e(B), {
1234
1244
  key: 0,
1235
1245
  tone: "danger",
1236
1246
  size: "sm",
1237
1247
  class: "wx-call-list__error"
1238
1248
  }, {
1239
1249
  default: t(() => [
1240
- S("strong", null, i(e(r)("calls.error")) + ":", 1),
1241
- d(" " + i(C.error), 1)
1250
+ W("strong", null, s(e(r)("calls.error")) + ":", 1),
1251
+ m(" " + s(C.error), 1)
1242
1252
  ]),
1243
1253
  _: 2
1244
1254
  }, 1024)) : E("", !0),
1245
- C.arguments ? (p(), G("pre", bt, i(C.arguments), 1)) : (p(), V(e(B), {
1255
+ C.arguments ? (h(), G("pre", gt, s(C.arguments), 1)) : (h(), V(e(B), {
1246
1256
  key: 2,
1247
1257
  size: "sm",
1248
1258
  tone: "muted"
1249
1259
  }, {
1250
1260
  default: t(() => [
1251
- d(i(e(r)("calls.no-arguments")), 1)
1261
+ m(s(e(r)("calls.no-arguments")), 1)
1252
1262
  ]),
1253
1263
  _: 1
1254
1264
  }))
@@ -1258,10 +1268,10 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1258
1268
  a(e(Ce), {
1259
1269
  variant: "plain",
1260
1270
  title: C.tool,
1261
- subtitle: h(C.user)
1271
+ subtitle: _(C.user)
1262
1272
  }, {
1263
1273
  media: t(() => [
1264
- S("span", gt, [
1274
+ W("span", wt, [
1265
1275
  a(e(Z), { name: "sliders" })
1266
1276
  ])
1267
1277
  ]),
@@ -1272,7 +1282,7 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1272
1282
  size: "sm"
1273
1283
  }, {
1274
1284
  default: t(() => [
1275
- d(i(Y(C).label), 1)
1285
+ m(s(Y(C).label), 1)
1276
1286
  ]),
1277
1287
  _: 2
1278
1288
  }, 1032, ["type"]),
@@ -1280,36 +1290,36 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1280
1290
  value: C.at,
1281
1291
  compact: ""
1282
1292
  }, null, 8, ["value"]),
1283
- C.client ? (p(), V(e(B), {
1293
+ C.client ? (h(), V(e(B), {
1284
1294
  key: 0,
1285
1295
  size: "xs",
1286
1296
  tone: "muted"
1287
1297
  }, {
1288
1298
  default: t(() => [
1289
- d(i(C.client), 1)
1299
+ m(s(C.client), 1)
1290
1300
  ]),
1291
1301
  _: 2
1292
1302
  }, 1024)) : E("", !0)
1293
1303
  ]),
1294
1304
  default: t(() => [
1295
- D(C) ? (p(), V(e(oe), {
1305
+ D(C) ? (h(), V(e(oe), {
1296
1306
  key: 0,
1297
1307
  direction: "vertical",
1298
1308
  size: "xs",
1299
1309
  class: "wx-call-list__card-details"
1300
1310
  }, {
1301
1311
  default: t(() => [
1302
- C.error ? (p(), V(e(B), {
1312
+ C.error ? (h(), V(e(B), {
1303
1313
  key: 0,
1304
1314
  tone: "danger",
1305
1315
  size: "sm"
1306
1316
  }, {
1307
1317
  default: t(() => [
1308
- d(i(C.error), 1)
1318
+ m(s(C.error), 1)
1309
1319
  ]),
1310
1320
  _: 2
1311
1321
  }, 1024)) : E("", !0),
1312
- C.arguments ? (p(), G("pre", wt, i(C.arguments), 1)) : E("", !0)
1322
+ C.arguments ? (h(), G("pre", xt, s(C.arguments), 1)) : E("", !0)
1313
1323
  ]),
1314
1324
  _: 2
1315
1325
  }, 1024)) : E("", !0)
@@ -1322,7 +1332,7 @@ const vt = { class: "wx-admin-form" }, pt = { class: "wx-admin-form__grid" }, ft
1322
1332
  ], 512));
1323
1333
  }
1324
1334
  });
1325
- function kt(n) {
1335
+ function Ct(n) {
1326
1336
  const u = `${n.apiPath}/auth/connections`;
1327
1337
  return {
1328
1338
  list: (l = "mine") => n.http.get(u, { query: { all: l === "all" ? 1 : void 0 } }).then((o) => ({
@@ -1333,18 +1343,18 @@ function kt(n) {
1333
1343
  disconnect: (l) => n.http.delete(`${u}/${l}`).then((o) => o.data)
1334
1344
  };
1335
1345
  }
1336
- const Ct = {
1346
+ const $t = {
1337
1347
  class: "wx-connection-list__glyph",
1338
1348
  "aria-hidden": "true"
1339
- }, Ue = 560, je = /* @__PURE__ */ X({
1349
+ }, Ue = 560, qe = /* @__PURE__ */ X({
1340
1350
  __name: "ConnectionList",
1341
1351
  props: {
1342
1352
  scope: { default: "mine" }
1343
1353
  },
1344
1354
  setup(n, { expose: u }) {
1345
- const l = n, o = ee(), y = kt(o);
1355
+ const l = n, o = ee(), b = Ct(o);
1346
1356
  te();
1347
- const c = J("webx-auth"), _ = ve(), r = re("root"), b = xe(r), O = P(() => b.value > 0 && b.value < Ue), v = T([]), g = T(!1), w = T(null), m = P(() => O.value ? [{ key: "card", label: "" }] : [
1357
+ const c = J("webx-auth"), z = ve(), r = re("root"), f = xe(r), F = U(() => f.value > 0 && f.value < Ue), p = T([]), g = T(!1), w = T(null), d = U(() => F.value ? [{ key: "card", label: "" }] : [
1348
1358
  { key: "client", label: c("connections.client"), minWidth: 210 },
1349
1359
  ...l.scope === "all" ? [{ key: "user", label: c("connections.who"), minWidth: 140 }] : [],
1350
1360
  { key: "read_only", label: c("connections.allowed"), minWidth: 160 },
@@ -1352,72 +1362,72 @@ const Ct = {
1352
1362
  { key: "last_used_at", label: c("connections.last-used"), minWidth: 130 },
1353
1363
  { key: "end", label: "", align: "right", width: 140 }
1354
1364
  ]);
1355
- function x(A) {
1356
- return A.user.name ?? c("calls.deleted", { id: A.user.id });
1365
+ function x($) {
1366
+ return $.user.name ?? c("calls.deleted", { id: $.user.id });
1357
1367
  }
1358
- function f(A) {
1359
- if (A.read_only) return c("connections.read-only");
1368
+ function y($) {
1369
+ if ($.read_only) return c("connections.read-only");
1360
1370
  if (l.scope !== "all") return c("connections.full-you");
1361
- const W = A.user.name?.split(" ")[0];
1362
- return c("connections.full", { name: W || x(A) });
1371
+ const O = $.user.name?.split(" ")[0];
1372
+ return c("connections.full", { name: O || x($) });
1363
1373
  }
1364
- async function h() {
1374
+ async function _() {
1365
1375
  g.value = !0;
1366
1376
  try {
1367
- v.value = (await y.list(l.scope)).data;
1368
- } catch (A) {
1369
- Q.danger(_(A));
1377
+ p.value = (await b.list(l.scope)).data;
1378
+ } catch ($) {
1379
+ Q.danger(z($));
1370
1380
  } finally {
1371
1381
  g.value = !1;
1372
1382
  }
1373
1383
  }
1374
- async function z(A) {
1375
- if (await Ne({
1376
- title: c("connections.confirm-title", { client: A.client }),
1384
+ async function L($) {
1385
+ if (await Ie({
1386
+ title: c("connections.confirm-title", { client: $.client }),
1377
1387
  message: c("connections.confirm-text"),
1378
1388
  confirmText: c("connections.confirm"),
1379
1389
  cancelText: c("connections.cancel"),
1380
1390
  tone: "danger"
1381
1391
  })) {
1382
- w.value = A.id;
1392
+ w.value = $.id;
1383
1393
  try {
1384
- const s = await y.disconnect(A.id);
1385
- v.value = v.value.map(($) => $.id === s.id ? s : $), Q.success(c("connections.done", { client: A.client }));
1386
- } catch (s) {
1387
- Q.danger(_(s));
1394
+ const i = await b.disconnect($.id);
1395
+ p.value = p.value.map((v) => v.id === i.id ? i : v), Q.success(c("connections.done", { client: $.client }));
1396
+ } catch (i) {
1397
+ Q.danger(z(i));
1388
1398
  } finally {
1389
1399
  w.value = null;
1390
1400
  }
1391
1401
  }
1392
1402
  }
1393
- return ue(() => l.scope, h, { immediate: !0 }), u({ reload: h }), (A, W) => (p(), G("div", {
1403
+ return ue(() => l.scope, _, { immediate: !0 }), u({ reload: _ }), ($, O) => (h(), G("div", {
1394
1404
  ref_key: "root",
1395
1405
  ref: r,
1396
1406
  class: "wx-connection-list"
1397
1407
  }, [
1398
1408
  a(e(ke), {
1399
- data: v.value,
1400
- columns: m.value,
1409
+ data: p.value,
1410
+ columns: d.value,
1401
1411
  "row-key": "id",
1402
1412
  flush: "",
1403
1413
  loading: g.value,
1404
1414
  clickable: !1,
1405
1415
  "empty-text": n.scope === "all" ? e(c)("connections.empty-all") : e(c)("connections.empty"),
1406
1416
  "cards-below": Ue,
1407
- "row-class": (s) => s.revoked_at ? "is-ended" : ""
1417
+ "row-class": (i) => i.revoked_at ? "is-ended" : ""
1408
1418
  }, {
1409
- "cell-client": t(({ row: s }) => [
1419
+ "cell-client": t(({ row: i }) => [
1410
1420
  a(e(oe), {
1411
1421
  direction: "vertical",
1412
1422
  size: "none"
1413
1423
  }, {
1414
1424
  default: t(() => [
1415
1425
  a(e(B), {
1416
- tone: s.revoked_at ? "muted" : "default",
1426
+ tone: i.revoked_at ? "muted" : "default",
1417
1427
  weight: "medium"
1418
1428
  }, {
1419
1429
  default: t(() => [
1420
- d(i(s.client), 1)
1430
+ m(s(i.client), 1)
1421
1431
  ]),
1422
1432
  _: 2
1423
1433
  }, 1032, ["tone"]),
@@ -1426,7 +1436,7 @@ const Ct = {
1426
1436
  tone: "muted"
1427
1437
  }, {
1428
1438
  default: t(() => [
1429
- d(i(e(c)("connections.returns-to", { host: s.host })), 1)
1439
+ m(s(e(c)("connections.returns-to", { host: i.host })), 1)
1430
1440
  ]),
1431
1441
  _: 2
1432
1442
  }, 1024)
@@ -1434,145 +1444,145 @@ const Ct = {
1434
1444
  _: 2
1435
1445
  }, 1024)
1436
1446
  ]),
1437
- "cell-user": t(({ row: s }) => [
1447
+ "cell-user": t(({ row: i }) => [
1438
1448
  a(e(B), {
1439
- tone: s.user.name === null ? "muted" : "default"
1449
+ tone: i.user.name === null ? "muted" : "default"
1440
1450
  }, {
1441
1451
  default: t(() => [
1442
- d(i(x(s)), 1)
1452
+ m(s(x(i)), 1)
1443
1453
  ]),
1444
1454
  _: 2
1445
1455
  }, 1032, ["tone"])
1446
1456
  ]),
1447
- "cell-read_only": t(({ row: s }) => [
1448
- s.revoked_at ? (p(), V(e(j), {
1457
+ "cell-read_only": t(({ row: i }) => [
1458
+ i.revoked_at ? (h(), V(e(j), {
1449
1459
  key: 0,
1450
1460
  type: "default",
1451
1461
  dot: ""
1452
1462
  }, {
1453
1463
  default: t(() => [
1454
- d(i(e(c)("connections.disconnected")), 1)
1464
+ m(s(e(c)("connections.disconnected")), 1)
1455
1465
  ]),
1456
1466
  _: 1
1457
- })) : (p(), V(e(j), {
1467
+ })) : (h(), V(e(j), {
1458
1468
  key: 1,
1459
- type: s.read_only ? "info" : "success",
1469
+ type: i.read_only ? "info" : "success",
1460
1470
  dot: ""
1461
1471
  }, {
1462
1472
  default: t(() => [
1463
- d(i(f(s)), 1)
1473
+ m(s(y(i)), 1)
1464
1474
  ]),
1465
1475
  _: 2
1466
1476
  }, 1032, ["type"]))
1467
1477
  ]),
1468
- "cell-connected_at": t(({ row: s }) => [
1478
+ "cell-connected_at": t(({ row: i }) => [
1469
1479
  a(e(ie), {
1470
- value: s.connected_at,
1480
+ value: i.connected_at,
1471
1481
  tone: "muted",
1472
1482
  compact: ""
1473
1483
  }, null, 8, ["value"])
1474
1484
  ]),
1475
- "cell-last_used_at": t(({ row: s }) => [
1476
- s.last_used_at ? (p(), V(e(ie), {
1485
+ "cell-last_used_at": t(({ row: i }) => [
1486
+ i.last_used_at ? (h(), V(e(ie), {
1477
1487
  key: 0,
1478
- value: s.last_used_at,
1488
+ value: i.last_used_at,
1479
1489
  tone: "default",
1480
1490
  compact: ""
1481
- }, null, 8, ["value"])) : (p(), V(e(B), {
1491
+ }, null, 8, ["value"])) : (h(), V(e(B), {
1482
1492
  key: 1,
1483
1493
  size: "sm",
1484
1494
  tone: "muted"
1485
1495
  }, {
1486
1496
  default: t(() => [
1487
- d(i(e(c)("connections.never-used")), 1)
1497
+ m(s(e(c)("connections.never-used")), 1)
1488
1498
  ]),
1489
1499
  _: 1
1490
1500
  }))
1491
1501
  ]),
1492
- "cell-end": t(({ row: s }) => [
1493
- s.revoked_at ? E("", !0) : (p(), V(e(I), {
1502
+ "cell-end": t(({ row: i }) => [
1503
+ i.revoked_at ? E("", !0) : (h(), V(e(M), {
1494
1504
  key: 0,
1495
1505
  type: "danger",
1496
1506
  variant: "text",
1497
1507
  size: "sm",
1498
- loading: w.value === s.id,
1499
- onClick: ($) => z(s)
1508
+ loading: w.value === i.id,
1509
+ onClick: (v) => L(i)
1500
1510
  }, {
1501
1511
  default: t(() => [
1502
- d(i(e(c)("connections.disconnect")), 1)
1512
+ m(s(e(c)("connections.disconnect")), 1)
1503
1513
  ]),
1504
1514
  _: 1
1505
1515
  }, 8, ["loading", "onClick"]))
1506
1516
  ]),
1507
- "cell-card": t(({ row: s }) => [
1517
+ "cell-card": t(({ row: i }) => [
1508
1518
  a(e(Ce), {
1509
1519
  variant: "plain",
1510
- title: s.client,
1511
- subtitle: e(c)("connections.returns-to", { host: s.host })
1520
+ title: i.client,
1521
+ subtitle: e(c)("connections.returns-to", { host: i.host })
1512
1522
  }, {
1513
1523
  media: t(() => [
1514
- S("span", Ct, [
1524
+ W("span", $t, [
1515
1525
  a(e(Z), { name: "link" })
1516
1526
  ])
1517
1527
  ]),
1518
1528
  meta: t(() => [
1519
- s.revoked_at ? (p(), V(e(j), {
1529
+ i.revoked_at ? (h(), V(e(j), {
1520
1530
  key: 0,
1521
1531
  type: "default",
1522
1532
  dot: "",
1523
1533
  size: "sm"
1524
1534
  }, {
1525
1535
  default: t(() => [
1526
- d(i(e(c)("connections.disconnected")), 1)
1536
+ m(s(e(c)("connections.disconnected")), 1)
1527
1537
  ]),
1528
1538
  _: 1
1529
- })) : (p(), V(e(j), {
1539
+ })) : (h(), V(e(j), {
1530
1540
  key: 1,
1531
- type: s.read_only ? "info" : "success",
1541
+ type: i.read_only ? "info" : "success",
1532
1542
  dot: "",
1533
1543
  size: "sm"
1534
1544
  }, {
1535
1545
  default: t(() => [
1536
- d(i(f(s)), 1)
1546
+ m(s(y(i)), 1)
1537
1547
  ]),
1538
1548
  _: 2
1539
1549
  }, 1032, ["type"])),
1540
- n.scope === "all" ? (p(), V(e(B), {
1550
+ n.scope === "all" ? (h(), V(e(B), {
1541
1551
  key: 2,
1542
1552
  size: "xs",
1543
1553
  tone: "muted"
1544
1554
  }, {
1545
1555
  default: t(() => [
1546
- d(i(x(s)), 1)
1556
+ m(s(x(i)), 1)
1547
1557
  ]),
1548
1558
  _: 2
1549
1559
  }, 1024)) : E("", !0),
1550
- s.last_used_at ? (p(), V(e(ie), {
1560
+ i.last_used_at ? (h(), V(e(ie), {
1551
1561
  key: 3,
1552
- value: s.last_used_at,
1562
+ value: i.last_used_at,
1553
1563
  compact: ""
1554
- }, null, 8, ["value"])) : (p(), V(e(B), {
1564
+ }, null, 8, ["value"])) : (h(), V(e(B), {
1555
1565
  key: 4,
1556
1566
  size: "xs",
1557
1567
  tone: "muted"
1558
1568
  }, {
1559
1569
  default: t(() => [
1560
- d(i(e(c)("connections.never-used")), 1)
1570
+ m(s(e(c)("connections.never-used")), 1)
1561
1571
  ]),
1562
1572
  _: 1
1563
1573
  }))
1564
1574
  ]),
1565
1575
  actions: t(() => [
1566
- s.revoked_at ? E("", !0) : (p(), V(e(I), {
1576
+ i.revoked_at ? E("", !0) : (h(), V(e(M), {
1567
1577
  key: 0,
1568
1578
  type: "danger",
1569
1579
  variant: "text",
1570
1580
  size: "sm",
1571
- loading: w.value === s.id,
1572
- onClick: ($) => z(s)
1581
+ loading: w.value === i.id,
1582
+ onClick: (v) => L(i)
1573
1583
  }, {
1574
1584
  default: t(() => [
1575
- d(i(e(c)("connections.disconnect")), 1)
1585
+ m(s(e(c)("connections.disconnect")), 1)
1576
1586
  ]),
1577
1587
  _: 1
1578
1588
  }, 8, ["loading", "onClick"]))
@@ -1584,7 +1594,7 @@ const Ct = {
1584
1594
  }, 8, ["data", "columns", "loading", "empty-text", "row-class"])
1585
1595
  ], 512));
1586
1596
  }
1587
- }), $t = /* @__PURE__ */ X({
1597
+ }), At = /* @__PURE__ */ X({
1588
1598
  __name: "AdminsPage",
1589
1599
  props: {
1590
1600
  base: { default: "/admins" },
@@ -1593,135 +1603,135 @@ const Ct = {
1593
1603
  resolveAvatar: { type: Function, default: void 0 }
1594
1604
  },
1595
1605
  setup(n) {
1596
- const u = n, l = ee(), o = fe(l), y = tt(), c = at();
1606
+ const u = n, l = ee(), o = fe(l), b = u.avatarField ?? Ye(l) ?? void 0, c = u.resolveAvatar ?? je(l) ?? void 0, z = lt(), r = nt();
1597
1607
  te();
1598
- const _ = J("webx-auth"), r = ve(), b = re("list"), O = T(null), v = $e(yt), g = l.can("admins.manage"), w = l.can("admins.audit"), m = P(
1599
- () => l.state.manifest?.modules.find((W) => W.id === "admins")?.title ?? _("admins.title")
1600
- ), x = P(() => {
1601
- const W = [{ value: "admins", label: m.value }];
1602
- return w && W.push({ value: "calls", label: _("calls.title") }), g && W.push({ value: "connections", label: _("connections.title") }), W.length > 1 ? W : void 0;
1603
- }), f = P({
1608
+ const f = J("webx-auth"), F = ve(), p = re("list"), g = T(null), w = $e(_t), d = l.can("admins.manage"), x = l.can("admins.audit"), y = U(
1609
+ () => l.state.manifest?.modules.find((v) => v.id === "admins")?.title ?? f("admins.title")
1610
+ ), _ = U(() => {
1611
+ const v = [{ value: "admins", label: y.value }];
1612
+ return x && v.push({ value: "calls", label: f("calls.title") }), d && v.push({ value: "connections", label: f("connections.title") }), v.length > 1 ? v : void 0;
1613
+ }), L = U({
1604
1614
  get: () => u.current,
1605
- set: (W) => {
1606
- const s = W === "admins" ? u.base : `${u.base}/${String(W)}`;
1607
- s !== c.path && y.push(s);
1615
+ set: (v) => {
1616
+ const A = v === "admins" ? u.base : `${u.base}/${String(v)}`;
1617
+ A !== r.path && z.push(A);
1608
1618
  }
1609
- }), h = P(
1610
- () => g && u.current === "admins" ? [
1619
+ }), $ = U(
1620
+ () => d && u.current === "admins" ? [
1611
1621
  {
1612
1622
  key: "new",
1613
- label: _("admins.new-short"),
1623
+ label: f("admins.new-short"),
1614
1624
  icon: "plus",
1615
1625
  primary: !0,
1616
1626
  run: () => {
1617
- z(null);
1627
+ O(null);
1618
1628
  }
1619
1629
  }
1620
1630
  ] : []
1621
1631
  );
1622
- async function z(W) {
1623
- O.value = W, await v({ admin: W, avatarField: u.avatarField }) && b.value?.reload();
1632
+ async function O(v) {
1633
+ g.value = v, await w({ admin: v, avatarField: b }) && p.value?.reload();
1624
1634
  }
1625
- async function A(W) {
1626
- if (await Ne({
1627
- title: _("admins.delete-title", { name: W.name }),
1628
- message: _("admins.delete-text"),
1629
- confirmText: _("admins.delete"),
1630
- cancelText: _("admins.cancel"),
1635
+ async function i(v) {
1636
+ if (await Ie({
1637
+ title: f("admins.delete-title", { name: v.name }),
1638
+ message: f("admins.delete-text"),
1639
+ confirmText: f("admins.delete"),
1640
+ cancelText: f("admins.cancel"),
1631
1641
  tone: "danger"
1632
1642
  }))
1633
1643
  try {
1634
- await o.remove(W.id), Q.success(_("admins.deleted")), b.value?.reload();
1635
- } catch ($) {
1636
- Q.danger(r($));
1644
+ await o.remove(v.id), Q.success(f("admins.deleted")), p.value?.reload();
1645
+ } catch (I) {
1646
+ Q.danger(F(I));
1637
1647
  }
1638
1648
  }
1639
- return (W, s) => (p(), V(e(De), {
1640
- view: f.value,
1641
- "onUpdate:view": s[0] || (s[0] = ($) => f.value = $),
1642
- title: m.value,
1643
- views: x.value,
1644
- actions: h.value
1649
+ return (v, A) => (h(), V(e(Ne), {
1650
+ view: L.value,
1651
+ "onUpdate:view": A[0] || (A[0] = (I) => L.value = I),
1652
+ title: y.value,
1653
+ views: _.value,
1654
+ actions: $.value
1645
1655
  }, {
1646
1656
  default: t(() => [
1647
- n.current === "calls" ? (p(), V(xt, { key: 0 })) : n.current === "connections" ? (p(), V(je, {
1657
+ n.current === "calls" ? (h(), V(kt, { key: 0 })) : n.current === "connections" ? (h(), V(qe, {
1648
1658
  key: 1,
1649
1659
  scope: "all"
1650
- })) : (p(), V(Ye, {
1660
+ })) : (h(), V(Je, {
1651
1661
  key: 2,
1652
1662
  ref_key: "list",
1653
- ref: b,
1654
- removable: e(g),
1655
- "resolve-avatar": u.resolveAvatar,
1656
- onOpen: z,
1657
- onRemove: A
1663
+ ref: p,
1664
+ removable: e(d),
1665
+ "resolve-avatar": e(c),
1666
+ onOpen: O,
1667
+ onRemove: i
1658
1668
  }, null, 8, ["removable", "resolve-avatar"]))
1659
1669
  ]),
1660
1670
  _: 1
1661
1671
  }, 8, ["view", "title", "views", "actions"]));
1662
1672
  }
1663
- }), At = { class: "wx-connect" }, Vt = { class: "wx-connect__row" }, zt = { class: "wx-connect__url" }, Lt = { class: "wx-connect__section" }, St = { class: "wx-connect__steps" }, Wt = { class: "wx-connect__steps" }, Tt = { class: "wx-connect__snippet" }, Ut = { class: "wx-connect__snippet" }, Pt = { class: "wx-connect__section" }, Ft = { class: "wx-connect__links" }, Ot = { class: "wx-connect__steps" }, Rt = { class: "wx-connect__section" }, Bt = /* @__PURE__ */ X({
1673
+ }), Vt = { class: "wx-connect" }, zt = { class: "wx-connect__row" }, Lt = { class: "wx-connect__url" }, St = { class: "wx-connect__section" }, Wt = { class: "wx-connect__steps" }, Tt = { class: "wx-connect__steps" }, Ut = { class: "wx-connect__snippet" }, Pt = { class: "wx-connect__snippet" }, Ft = { class: "wx-connect__section" }, Ot = { class: "wx-connect__links" }, Rt = { class: "wx-connect__steps" }, Bt = { class: "wx-connect__section" }, Et = /* @__PURE__ */ X({
1664
1674
  __name: "ConnectPage",
1665
1675
  setup(n) {
1666
1676
  const u = ee();
1667
1677
  te();
1668
1678
  const l = J("webx-auth"), o = T(!1);
1669
- let y;
1670
- const c = P(() => {
1671
- const x = u.state.manifest?.modules.find((f) => f.id === "connect")?.meta;
1679
+ let b;
1680
+ const c = U(() => {
1681
+ const x = u.state.manifest?.modules.find((y) => y.id === "connect")?.meta;
1672
1682
  return typeof x?.url == "string" ? x.url : "";
1673
- }), _ = P(() => {
1683
+ }), z = U(() => {
1674
1684
  try {
1675
1685
  return new URL(c.value).hostname.split(".")[0] || "webx";
1676
1686
  } catch {
1677
1687
  return "webx";
1678
1688
  }
1679
- }), r = P(() => `claude mcp add --transport http ${_.value} ${c.value}`), b = P(() => `[mcp_servers.${_.value}]
1680
- url = "${c.value}"`), O = P(() => {
1689
+ }), r = U(() => `claude mcp add --transport http ${z.value} ${c.value}`), f = U(() => `[mcp_servers.${z.value}]
1690
+ url = "${c.value}"`), F = U(() => {
1681
1691
  const x = g(JSON.stringify({ url: c.value }));
1682
- return `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(_.value)}&config=${x}`;
1683
- }), v = P(() => {
1684
- const x = JSON.stringify({ name: _.value, type: "http", url: c.value });
1692
+ return `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(z.value)}&config=${x}`;
1693
+ }), p = U(() => {
1694
+ const x = JSON.stringify({ name: z.value, type: "http", url: c.value });
1685
1695
  return `vscode:mcp/install?${encodeURIComponent(x)}`;
1686
1696
  });
1687
1697
  function g(x) {
1688
- const f = new TextEncoder().encode(x);
1689
- let h = "";
1690
- for (const z of f) h += String.fromCharCode(z);
1691
- return encodeURIComponent(btoa(h));
1698
+ const y = new TextEncoder().encode(x);
1699
+ let _ = "";
1700
+ for (const L of y) _ += String.fromCharCode(L);
1701
+ return encodeURIComponent(btoa(_));
1692
1702
  }
1693
1703
  async function w(x) {
1694
1704
  try {
1695
1705
  if (navigator.clipboard?.writeText)
1696
1706
  await navigator.clipboard.writeText(x);
1697
- else if (!m(x))
1707
+ else if (!d(x))
1698
1708
  throw new Error("no clipboard");
1699
- o.value = !0, clearTimeout(y), y = setTimeout(() => o.value = !1, 2e3);
1709
+ o.value = !0, clearTimeout(b), b = setTimeout(() => o.value = !1, 2e3);
1700
1710
  } catch {
1701
- if (m(x)) return;
1711
+ if (d(x)) return;
1702
1712
  Q.danger(l("connect.copy-failed"));
1703
1713
  }
1704
1714
  }
1705
- function m(x) {
1706
- const f = document.createElement("textarea");
1707
- f.value = x, f.setAttribute("readonly", ""), f.style.position = "fixed", f.style.opacity = "0", document.body.append(f), f.select();
1715
+ function d(x) {
1716
+ const y = document.createElement("textarea");
1717
+ y.value = x, y.setAttribute("readonly", ""), y.style.position = "fixed", y.style.opacity = "0", document.body.append(y), y.select();
1708
1718
  try {
1709
1719
  return document.execCommand("copy");
1710
1720
  } catch {
1711
1721
  return !1;
1712
1722
  } finally {
1713
- f.remove();
1723
+ y.remove();
1714
1724
  }
1715
1725
  }
1716
- return (x, f) => (p(), V(e(De), {
1726
+ return (x, y) => (h(), V(e(Ne), {
1717
1727
  title: e(l)("connect.title"),
1718
1728
  card: !1
1719
1729
  }, {
1720
1730
  default: t(() => [
1721
- S("div", At, [
1731
+ W("div", Vt, [
1722
1732
  a(e(B), { class: "wx-connect__lead" }, {
1723
1733
  default: t(() => [
1724
- d(i(e(l)("connect.lead")), 1)
1734
+ m(s(e(l)("connect.lead")), 1)
1725
1735
  ]),
1726
1736
  _: 1
1727
1737
  }),
@@ -1733,16 +1743,16 @@ url = "${c.value}"`), O = P(() => {
1733
1743
  class: "wx-connect__label"
1734
1744
  }, {
1735
1745
  default: t(() => [
1736
- d(i(e(l)("connect.address")), 1)
1746
+ m(s(e(l)("connect.address")), 1)
1737
1747
  ]),
1738
1748
  _: 1
1739
1749
  }),
1740
- S("div", Vt, [
1741
- S("code", zt, i(c.value), 1),
1742
- a(e(I), {
1750
+ W("div", zt, [
1751
+ W("code", Lt, s(c.value), 1),
1752
+ a(e(M), {
1743
1753
  type: "primary",
1744
1754
  disabled: c.value === "",
1745
- onClick: f[0] || (f[0] = (h) => w(c.value))
1755
+ onClick: y[0] || (y[0] = (_) => w(c.value))
1746
1756
  }, {
1747
1757
  icon: t(() => [
1748
1758
  a(e(Z), {
@@ -1750,7 +1760,7 @@ url = "${c.value}"`), O = P(() => {
1750
1760
  }, null, 8, ["name"])
1751
1761
  ]),
1752
1762
  default: t(() => [
1753
- d(" " + i(o.value ? e(l)("connect.copied") : e(l)("connect.copy")), 1)
1763
+ m(" " + s(o.value ? e(l)("connect.copied") : e(l)("connect.copy")), 1)
1754
1764
  ]),
1755
1765
  _: 1
1756
1766
  }, 8, ["disabled"])
@@ -1758,17 +1768,17 @@ url = "${c.value}"`), O = P(() => {
1758
1768
  ]),
1759
1769
  _: 1
1760
1770
  }),
1761
- S("section", Lt, [
1771
+ W("section", St, [
1762
1772
  a(e(he), {
1763
1773
  level: 2,
1764
1774
  size: "sm"
1765
1775
  }, {
1766
1776
  default: t(() => [
1767
- d(i(e(l)("connect.how")), 1)
1777
+ m(s(e(l)("connect.how")), 1)
1768
1778
  ]),
1769
1779
  _: 1
1770
1780
  }),
1771
- a(e(nt), {
1781
+ a(e(st), {
1772
1782
  variant: "line",
1773
1783
  "aria-label": e(l)("connect.how")
1774
1784
  }, {
@@ -1778,10 +1788,10 @@ url = "${c.value}"`), O = P(() => {
1778
1788
  label: e(l)("connect.claude-title")
1779
1789
  }, {
1780
1790
  default: t(() => [
1781
- S("ol", St, [
1782
- S("li", null, i(e(l)("connect.claude-1")), 1),
1783
- S("li", null, i(e(l)("connect.claude-2")), 1),
1784
- S("li", null, i(e(l)("connect.claude-3")), 1)
1791
+ W("ol", Wt, [
1792
+ W("li", null, s(e(l)("connect.claude-1")), 1),
1793
+ W("li", null, s(e(l)("connect.claude-2")), 1),
1794
+ W("li", null, s(e(l)("connect.claude-3")), 1)
1785
1795
  ])
1786
1796
  ]),
1787
1797
  _: 1
@@ -1791,10 +1801,10 @@ url = "${c.value}"`), O = P(() => {
1791
1801
  label: e(l)("connect.chatgpt-title")
1792
1802
  }, {
1793
1803
  default: t(() => [
1794
- S("ol", Wt, [
1795
- S("li", null, i(e(l)("connect.chatgpt-1")), 1),
1796
- S("li", null, i(e(l)("connect.chatgpt-2")), 1),
1797
- S("li", null, i(e(l)("connect.chatgpt-3")), 1)
1804
+ W("ol", Tt, [
1805
+ W("li", null, s(e(l)("connect.chatgpt-1")), 1),
1806
+ W("li", null, s(e(l)("connect.chatgpt-2")), 1),
1807
+ W("li", null, s(e(l)("connect.chatgpt-3")), 1)
1798
1808
  ])
1799
1809
  ]),
1800
1810
  _: 1
@@ -1806,22 +1816,22 @@ url = "${c.value}"`), O = P(() => {
1806
1816
  default: t(() => [
1807
1817
  a(e(B), { size: "sm" }, {
1808
1818
  default: t(() => [
1809
- d(i(e(l)("connect.claude-code-hint")), 1)
1819
+ m(s(e(l)("connect.claude-code-hint")), 1)
1810
1820
  ]),
1811
1821
  _: 1
1812
1822
  }),
1813
- S("div", Tt, [
1814
- S("pre", null, i(r.value), 1),
1815
- a(e(I), {
1823
+ W("div", Ut, [
1824
+ W("pre", null, s(r.value), 1),
1825
+ a(e(M), {
1816
1826
  variant: "text",
1817
1827
  size: "sm",
1818
- onClick: f[1] || (f[1] = (h) => w(r.value))
1828
+ onClick: y[1] || (y[1] = (_) => w(r.value))
1819
1829
  }, {
1820
1830
  icon: t(() => [
1821
1831
  a(e(Z), { name: "copy" })
1822
1832
  ]),
1823
1833
  default: t(() => [
1824
- d(" " + i(e(l)("connect.copy-line")), 1)
1834
+ m(" " + s(e(l)("connect.copy-line")), 1)
1825
1835
  ]),
1826
1836
  _: 1
1827
1837
  })
@@ -1836,22 +1846,22 @@ url = "${c.value}"`), O = P(() => {
1836
1846
  default: t(() => [
1837
1847
  a(e(B), { size: "sm" }, {
1838
1848
  default: t(() => [
1839
- d(i(e(l)("connect.codex-hint")), 1)
1849
+ m(s(e(l)("connect.codex-hint")), 1)
1840
1850
  ]),
1841
1851
  _: 1
1842
1852
  }),
1843
- S("div", Ut, [
1844
- S("pre", null, i(b.value), 1),
1845
- a(e(I), {
1853
+ W("div", Pt, [
1854
+ W("pre", null, s(f.value), 1),
1855
+ a(e(M), {
1846
1856
  variant: "text",
1847
1857
  size: "sm",
1848
- onClick: f[2] || (f[2] = (h) => w(b.value))
1858
+ onClick: y[2] || (y[2] = (_) => w(f.value))
1849
1859
  }, {
1850
1860
  icon: t(() => [
1851
1861
  a(e(Z), { name: "copy" })
1852
1862
  ]),
1853
1863
  default: t(() => [
1854
- d(" " + i(e(l)("connect.copy-line")), 1)
1864
+ m(" " + s(e(l)("connect.copy-line")), 1)
1855
1865
  ]),
1856
1866
  _: 1
1857
1867
  })
@@ -1863,13 +1873,13 @@ url = "${c.value}"`), O = P(() => {
1863
1873
  _: 1
1864
1874
  }, 8, ["aria-label"])
1865
1875
  ]),
1866
- S("section", Pt, [
1876
+ W("section", Ft, [
1867
1877
  a(e(he), {
1868
1878
  level: 2,
1869
1879
  size: "sm"
1870
1880
  }, {
1871
1881
  default: t(() => [
1872
- d(i(e(l)("connect.one-click")), 1)
1882
+ m(s(e(l)("connect.one-click")), 1)
1873
1883
  ]),
1874
1884
  _: 1
1875
1885
  }),
@@ -1878,13 +1888,13 @@ url = "${c.value}"`), O = P(() => {
1878
1888
  tone: "muted"
1879
1889
  }, {
1880
1890
  default: t(() => [
1881
- d(i(e(l)("connect.one-click-hint")), 1)
1891
+ m(s(e(l)("connect.one-click-hint")), 1)
1882
1892
  ]),
1883
1893
  _: 1
1884
1894
  }),
1885
- S("div", Ft, [
1886
- a(e(I), {
1887
- href: O.value,
1895
+ W("div", Ot, [
1896
+ a(e(M), {
1897
+ href: F.value,
1888
1898
  variant: "outline",
1889
1899
  disabled: c.value === "",
1890
1900
  class: "wx-connect__link"
@@ -1893,12 +1903,12 @@ url = "${c.value}"`), O = P(() => {
1893
1903
  a(e(Z), { name: "external-link" })
1894
1904
  ]),
1895
1905
  default: t(() => [
1896
- d(" " + i(e(l)("connect.install-in", { client: e(l)("connect.cursor-title") })), 1)
1906
+ m(" " + s(e(l)("connect.install-in", { client: e(l)("connect.cursor-title") })), 1)
1897
1907
  ]),
1898
1908
  _: 1
1899
1909
  }, 8, ["href", "disabled"]),
1900
- a(e(I), {
1901
- href: v.value,
1910
+ a(e(M), {
1911
+ href: p.value,
1902
1912
  variant: "outline",
1903
1913
  disabled: c.value === "",
1904
1914
  class: "wx-connect__link"
@@ -1907,38 +1917,38 @@ url = "${c.value}"`), O = P(() => {
1907
1917
  a(e(Z), { name: "external-link" })
1908
1918
  ]),
1909
1919
  default: t(() => [
1910
- d(" " + i(e(l)("connect.install-in", { client: e(l)("connect.vscode-title") })), 1)
1920
+ m(" " + s(e(l)("connect.install-in", { client: e(l)("connect.vscode-title") })), 1)
1911
1921
  ]),
1912
1922
  _: 1
1913
1923
  }, 8, ["href", "disabled"])
1914
1924
  ])
1915
1925
  ]),
1916
- a(e(ot), {
1926
+ a(e(it), {
1917
1927
  type: "info",
1918
1928
  title: e(l)("connect.next")
1919
1929
  }, {
1920
1930
  default: t(() => [
1921
- S("ol", Ot, [
1922
- S("li", null, i(e(l)("connect.next-1")), 1),
1923
- S("li", null, i(e(l)("connect.next-2")), 1),
1924
- S("li", null, i(e(l)("connect.next-3")), 1)
1931
+ W("ol", Rt, [
1932
+ W("li", null, s(e(l)("connect.next-1")), 1),
1933
+ W("li", null, s(e(l)("connect.next-2")), 1),
1934
+ W("li", null, s(e(l)("connect.next-3")), 1)
1925
1935
  ])
1926
1936
  ]),
1927
1937
  _: 1
1928
1938
  }, 8, ["title"]),
1929
- S("section", Rt, [
1939
+ W("section", Bt, [
1930
1940
  a(e(he), {
1931
1941
  level: 2,
1932
1942
  size: "sm"
1933
1943
  }, {
1934
1944
  default: t(() => [
1935
- d(i(e(l)("connect.mine")), 1)
1945
+ m(s(e(l)("connect.mine")), 1)
1936
1946
  ]),
1937
1947
  _: 1
1938
1948
  }),
1939
1949
  a(e(Le), { padding: "none" }, {
1940
1950
  default: t(() => [
1941
- a(je, { scope: "mine" })
1951
+ a(qe, { scope: "mine" })
1942
1952
  ]),
1943
1953
  _: 1
1944
1954
  })
@@ -1948,10 +1958,10 @@ url = "${c.value}"`), O = P(() => {
1948
1958
  _: 1
1949
1959
  }, 8, ["title"]));
1950
1960
  }
1951
- }), Et = /* @__PURE__ */ pe(Bt, [["__scopeId", "data-v-92d62c98"]]);
1952
- function la(n = {}) {
1961
+ }), Dt = /* @__PURE__ */ pe(Et, [["__scopeId", "data-v-92d62c98"]]);
1962
+ function na(n = {}) {
1953
1963
  const u = n.path ?? "/admins", l = (o) => ({
1954
- render: () => Re($t, {
1964
+ render: () => Be(At, {
1955
1965
  base: u,
1956
1966
  current: o,
1957
1967
  avatarField: n.avatarField,
@@ -1975,15 +1985,15 @@ function la(n = {}) {
1975
1985
  ]
1976
1986
  };
1977
1987
  }
1978
- function na(n = {}) {
1988
+ function oa(n = {}) {
1979
1989
  const u = n.path ?? "/connect";
1980
1990
  return {
1981
1991
  id: "connect",
1982
1992
  path: u,
1983
- routes: [{ path: u, name: "webx.connect", component: Et }]
1993
+ routes: [{ path: u, name: "webx.connect", component: Dt }]
1984
1994
  };
1985
1995
  }
1986
- const Dt = /* @__PURE__ */ X({
1996
+ const Nt = /* @__PURE__ */ X({
1987
1997
  __name: "AdminPicker",
1988
1998
  props: {
1989
1999
  multiple: { type: Boolean, default: !1 },
@@ -1991,30 +2001,30 @@ const Dt = /* @__PURE__ */ X({
1991
2001
  resolveAvatar: { type: Function, default: void 0 }
1992
2002
  },
1993
2003
  setup(n) {
1994
- const u = n, { open: l, resolve: o, dismiss: y } = ge();
2004
+ const u = n, { open: l, resolve: o, dismiss: b } = ge();
1995
2005
  te();
1996
- const c = J("webx-auth"), _ = re("list"), r = T(0);
1997
- function b(v) {
1998
- o(v);
2006
+ const c = J("webx-auth"), z = re("list"), r = T(0);
2007
+ function f(p) {
2008
+ o(p);
1999
2009
  }
2000
- function O(v) {
2001
- r.value = v.length;
2010
+ function F(p) {
2011
+ r.value = p.length;
2002
2012
  }
2003
- return (v, g) => (p(), V(e(we), {
2013
+ return (p, g) => (h(), V(e(we), {
2004
2014
  open: e(l),
2005
2015
  "onUpdate:open": g[2] || (g[2] = (w) => be(l) ? l.value = w : null),
2006
2016
  title: n.title ?? e(c)(n.multiple ? "admins.select-many" : "admins.select-one"),
2007
2017
  width: 880
2008
- }, Oe({
2018
+ }, Re({
2009
2019
  default: t(() => [
2010
- a(Ye, {
2020
+ a(Je, {
2011
2021
  ref_key: "list",
2012
- ref: _,
2022
+ ref: z,
2013
2023
  picking: "",
2014
2024
  multiple: n.multiple,
2015
2025
  "resolve-avatar": u.resolveAvatar,
2016
- onChosen: b,
2017
- onSelection: O
2026
+ onChosen: f,
2027
+ onSelection: F
2018
2028
  }, null, 8, ["multiple", "resolve-avatar"])
2019
2029
  ]),
2020
2030
  _: 2
@@ -2032,26 +2042,26 @@ const Dt = /* @__PURE__ */ X({
2032
2042
  tone: "muted"
2033
2043
  }, {
2034
2044
  default: t(() => [
2035
- d(i(e(c)("admins.chosen", { count: r.value })), 1)
2045
+ m(s(e(c)("admins.chosen", { count: r.value })), 1)
2036
2046
  ]),
2037
2047
  _: 1
2038
2048
  }),
2039
- a(e(I), {
2049
+ a(e(M), {
2040
2050
  variant: "outline",
2041
- onClick: g[0] || (g[0] = (w) => e(y)())
2051
+ onClick: g[0] || (g[0] = (w) => e(b)())
2042
2052
  }, {
2043
2053
  default: t(() => [
2044
- d(i(e(c)("admins.cancel")), 1)
2054
+ m(s(e(c)("admins.cancel")), 1)
2045
2055
  ]),
2046
2056
  _: 1
2047
2057
  }),
2048
- a(e(I), {
2058
+ a(e(M), {
2049
2059
  type: "primary",
2050
2060
  disabled: r.value === 0,
2051
- onClick: g[1] || (g[1] = (w) => e(o)(_.value?.chosen() ?? []))
2061
+ onClick: g[1] || (g[1] = (w) => e(o)(z.value?.chosen() ?? []))
2052
2062
  }, {
2053
2063
  default: t(() => [
2054
- d(i(e(c)("admins.save")), 1)
2064
+ m(s(e(c)("admins.save")), 1)
2055
2065
  ]),
2056
2066
  _: 1
2057
2067
  }, 8, ["disabled"])
@@ -2063,103 +2073,103 @@ const Dt = /* @__PURE__ */ X({
2063
2073
  } : void 0
2064
2074
  ]), 1032, ["open", "title"]));
2065
2075
  }
2066
- }), Ge = $e(Dt);
2067
- async function oa(n = {}) {
2068
- return (await Ge({ ...n, multiple: !1 }))?.[0];
2076
+ }), Qe = $e(Nt);
2077
+ async function sa(n = {}) {
2078
+ return (await Qe({ ...n, multiple: !1 }))?.[0];
2069
2079
  }
2070
- function sa(n = {}) {
2071
- return Ge({ ...n, multiple: !0 });
2080
+ function ia(n = {}) {
2081
+ return Qe({ ...n, multiple: !0 });
2072
2082
  }
2073
- const Nt = { class: "wx-profile-host" }, It = { class: "wx-profile" }, Mt = {
2083
+ const It = { class: "wx-profile-host" }, Mt = { class: "wx-profile" }, Ht = {
2074
2084
  key: 0,
2075
2085
  class: "wx-profile__aside"
2076
- }, Ht = { class: "wx-profile__fields" }, Kt = /* @__PURE__ */ X({
2086
+ }, Kt = { class: "wx-profile__fields" }, Yt = /* @__PURE__ */ X({
2077
2087
  __name: "ProfileDialog",
2078
2088
  props: {
2079
2089
  avatarField: { default: void 0 }
2080
2090
  },
2081
2091
  setup(n) {
2082
- const u = n, { resolve: l, dismiss: o, open: y } = ge(), c = ee(), _ = Ae();
2092
+ const u = n, { resolve: l, dismiss: o, open: b } = ge(), c = ee(), z = Ae();
2083
2093
  te();
2084
- const r = J("webx-auth"), b = ve(), O = T(!1), v = T({}), g = T({
2094
+ const r = J("webx-auth"), f = ve(), F = T(!1), p = T({}), g = T({
2085
2095
  name: c.state.user?.name ?? "",
2086
2096
  avatar: c.state.user?.avatar ?? null,
2087
2097
  password: "",
2088
2098
  current_password: ""
2089
2099
  }), w = T(g.value.avatar ? { path: g.value.avatar } : null);
2090
- function m(f) {
2091
- return v.value[f]?.[0];
2100
+ function d(y) {
2101
+ return p.value[y]?.[0];
2092
2102
  }
2093
2103
  async function x() {
2094
- O.value = !0, v.value = {};
2104
+ F.value = !0, p.value = {};
2095
2105
  try {
2096
- await _.updateProfile({
2106
+ await z.updateProfile({
2097
2107
  name: g.value.name,
2098
2108
  avatar: w.value?.path ?? null,
2099
2109
  // Blank is left out entirely rather than sent as an empty string: the server reads a
2100
2110
  // filled password as "change it", and an empty one would be a change to nothing.
2101
2111
  ...g.value.password ? { password: g.value.password, current_password: g.value.current_password } : {}
2102
2112
  }), Q.success(r("profile.saved")), l(!0);
2103
- } catch (f) {
2104
- const h = f.body;
2105
- h?.errors ? v.value = h.errors : Q.danger(b(f));
2113
+ } catch (y) {
2114
+ const _ = y.body;
2115
+ _?.errors ? p.value = _.errors : Q.danger(f(y));
2106
2116
  } finally {
2107
- O.value = !1;
2117
+ F.value = !1;
2108
2118
  }
2109
2119
  }
2110
- return (f, h) => (p(), V(e(we), {
2111
- open: e(y),
2112
- "onUpdate:open": h[5] || (h[5] = (z) => be(y) ? y.value = z : null),
2120
+ return (y, _) => (h(), V(e(we), {
2121
+ open: e(b),
2122
+ "onUpdate:open": _[5] || (_[5] = (L) => be(b) ? b.value = L : null),
2113
2123
  title: e(r)("profile.title"),
2114
2124
  width: 560
2115
2125
  }, {
2116
2126
  footer: t(() => [
2117
- a(e(I), {
2118
- onClick: h[4] || (h[4] = (z) => e(o)())
2127
+ a(e(M), {
2128
+ onClick: _[4] || (_[4] = (L) => e(o)())
2119
2129
  }, {
2120
2130
  default: t(() => [
2121
- d(i(e(r)("profile.cancel")), 1)
2131
+ m(s(e(r)("profile.cancel")), 1)
2122
2132
  ]),
2123
2133
  _: 1
2124
2134
  }),
2125
- a(e(I), {
2135
+ a(e(M), {
2126
2136
  type: "primary",
2127
- loading: O.value,
2137
+ loading: F.value,
2128
2138
  onClick: x
2129
2139
  }, {
2130
2140
  default: t(() => [
2131
- d(i(e(r)("profile.save")), 1)
2141
+ m(s(e(r)("profile.save")), 1)
2132
2142
  ]),
2133
2143
  _: 1
2134
2144
  }, 8, ["loading"])
2135
2145
  ]),
2136
2146
  default: t(() => [
2137
- S("div", Nt, [
2138
- S("div", It, [
2139
- u.avatarField ? (p(), G("div", Mt, [
2140
- (p(), V(Fe(u.avatarField), {
2147
+ W("div", It, [
2148
+ W("div", Mt, [
2149
+ u.avatarField ? (h(), G("div", Ht, [
2150
+ (h(), V(Oe(u.avatarField), {
2141
2151
  modelValue: w.value,
2142
- "onUpdate:modelValue": h[0] || (h[0] = (z) => w.value = z),
2152
+ "onUpdate:modelValue": _[0] || (_[0] = (L) => w.value = L),
2143
2153
  label: e(r)("profile.avatar"),
2144
2154
  aspect: "1/1",
2145
2155
  captions: !1
2146
2156
  }, null, 8, ["modelValue", "label"]))
2147
2157
  ])) : E("", !0),
2148
- S("div", Ht, [
2149
- a(e(H), {
2158
+ W("div", Kt, [
2159
+ a(e(K), {
2150
2160
  label: e(r)("profile.name"),
2151
- error: m("name")
2161
+ error: d("name")
2152
2162
  }, {
2153
2163
  default: t(() => [
2154
2164
  a(e(le), {
2155
2165
  modelValue: g.value.name,
2156
- "onUpdate:modelValue": h[1] || (h[1] = (z) => g.value.name = z),
2166
+ "onUpdate:modelValue": _[1] || (_[1] = (L) => g.value.name = L),
2157
2167
  name: "name"
2158
2168
  }, null, 8, ["modelValue"])
2159
2169
  ]),
2160
2170
  _: 1
2161
2171
  }, 8, ["label", "error"]),
2162
- a(e(H), {
2172
+ a(e(K), {
2163
2173
  label: e(r)("admins.email")
2164
2174
  }, {
2165
2175
  default: t(() => [
@@ -2170,31 +2180,31 @@ const Nt = { class: "wx-profile-host" }, It = { class: "wx-profile" }, Mt = {
2170
2180
  ]),
2171
2181
  _: 1
2172
2182
  }, 8, ["label"]),
2173
- a(e(H), {
2183
+ a(e(K), {
2174
2184
  label: e(r)("profile.password"),
2175
2185
  help: e(r)("profile.password-hint"),
2176
- error: m("password")
2186
+ error: d("password")
2177
2187
  }, {
2178
2188
  default: t(() => [
2179
2189
  a(e(le), {
2180
2190
  modelValue: g.value.password,
2181
- "onUpdate:modelValue": h[2] || (h[2] = (z) => g.value.password = z),
2191
+ "onUpdate:modelValue": _[2] || (_[2] = (L) => g.value.password = L),
2182
2192
  type: "password",
2183
2193
  autocomplete: "new-password"
2184
2194
  }, null, 8, ["modelValue"])
2185
2195
  ]),
2186
2196
  _: 1
2187
2197
  }, 8, ["label", "help", "error"]),
2188
- g.value.password ? (p(), V(e(H), {
2198
+ g.value.password ? (h(), V(e(K), {
2189
2199
  key: 0,
2190
2200
  label: e(r)("profile.current-password"),
2191
2201
  help: e(r)("profile.current-password-hint"),
2192
- error: m("current_password")
2202
+ error: d("current_password")
2193
2203
  }, {
2194
2204
  default: t(() => [
2195
2205
  a(e(le), {
2196
2206
  modelValue: g.value.current_password,
2197
- "onUpdate:modelValue": h[3] || (h[3] = (z) => g.value.current_password = z),
2207
+ "onUpdate:modelValue": _[3] || (_[3] = (L) => g.value.current_password = L),
2198
2208
  type: "password",
2199
2209
  autocomplete: "current-password"
2200
2210
  }, null, 8, ["modelValue"])
@@ -2208,7 +2218,7 @@ const Nt = { class: "wx-profile-host" }, It = { class: "wx-profile" }, Mt = {
2208
2218
  _: 1
2209
2219
  }, 8, ["open", "title"]));
2210
2220
  }
2211
- }), Yt = /* @__PURE__ */ pe(Kt, [["__scopeId", "data-v-9583a67a"]]), jt = ["title"], Gt = { class: "wx-user-menu__who" }, Jt = { class: "wx-user-menu__name" }, qt = { class: "wx-user-menu__email" }, Qt = /* @__PURE__ */ X({
2221
+ }), jt = /* @__PURE__ */ pe(Yt, [["__scopeId", "data-v-9583a67a"]]), Gt = ["title"], Jt = { class: "wx-user-menu__who" }, qt = { class: "wx-user-menu__name" }, Qt = { class: "wx-user-menu__email" }, Xt = /* @__PURE__ */ X({
2212
2222
  __name: "UserMenu",
2213
2223
  props: {
2214
2224
  signOutLabel: { default: void 0 },
@@ -2217,112 +2227,112 @@ const Nt = { class: "wx-profile-host" }, It = { class: "wx-profile" }, Mt = {
2217
2227
  expanded: { type: Boolean, default: !1 }
2218
2228
  },
2219
2229
  setup(n) {
2220
- const u = n, l = ee(), o = Ae(), y = Be(), c = et(), _ = J("webx-auth"), r = y.scope("webx-admin"), b = P(() => l.state.user), O = P(
2221
- () => y.state.panelLocales.length > 1 ? y.state.panelLocales : []
2222
- ), v = ye(Me, null), g = ye(He, null), w = T(void 0);
2230
+ const u = n, l = ee(), o = Ae(), b = Ee(), c = at(), z = J("webx-auth"), r = b.scope("webx-admin"), f = U(() => l.state.user), F = U(
2231
+ () => b.state.panelLocales.length > 1 ? b.state.panelLocales : []
2232
+ ), p = ye(He, null), g = ye(Ke, null), w = T(void 0);
2223
2233
  ue(
2224
- () => typeof b.value?.avatar == "string" ? b.value.avatar : null,
2225
- async (z) => {
2226
- const A = u.resolveAvatar ?? v;
2227
- if (z === null || z === "" || A === null) {
2234
+ () => typeof f.value?.avatar == "string" ? f.value.avatar : null,
2235
+ async (L) => {
2236
+ const $ = u.resolveAvatar ?? p;
2237
+ if (L === null || L === "" || $ === null) {
2228
2238
  w.value = void 0;
2229
2239
  return;
2230
2240
  }
2231
- const W = await A(z);
2232
- b.value?.avatar === z && (w.value = W ?? void 0);
2241
+ const O = await $(L);
2242
+ f.value?.avatar === L && (w.value = O ?? void 0);
2233
2243
  },
2234
2244
  { immediate: !0 }
2235
2245
  );
2236
- const m = $e(Yt);
2246
+ const d = $e(jt);
2237
2247
  function x() {
2238
2248
  setTimeout(
2239
2249
  () => {
2240
- m({ avatarField: u.avatarField ?? g ?? void 0 });
2250
+ d({ avatarField: u.avatarField ?? g ?? void 0 });
2241
2251
  },
2242
2252
  0
2243
2253
  );
2244
2254
  }
2245
- const f = P({
2255
+ const y = U({
2246
2256
  get: () => c.state.preference,
2247
- set: (z) => {
2248
- c.set(z), o.setTheme(z);
2257
+ set: (L) => {
2258
+ c.set(L), o.setTheme(L);
2249
2259
  }
2250
2260
  });
2251
- async function h(z) {
2252
- z !== y.state.locale && await o.setLocale(z);
2261
+ async function _(L) {
2262
+ L !== b.state.locale && await o.setLocale(L);
2253
2263
  }
2254
- return (z, A) => {
2255
- const W = M("wx-avatar"), s = M("wx-icon"), $ = M("wx-text"), U = M("wx-dropdown-item"), K = M("wx-divider"), Y = M("wx-dropdown");
2256
- return b.value !== null ? (p(), V(Y, { key: 0 }, {
2264
+ return (L, $) => {
2265
+ const O = H("wx-avatar"), i = H("wx-icon"), v = H("wx-text"), A = H("wx-dropdown-item"), I = H("wx-divider"), Y = H("wx-dropdown");
2266
+ return f.value !== null ? (h(), V(Y, { key: 0 }, {
2257
2267
  trigger: t(() => [
2258
- S("button", {
2268
+ W("button", {
2259
2269
  type: "button",
2260
- class: Qe(["wx-user-menu__trigger", { "wx-user-menu__trigger--named": n.expanded }]),
2261
- title: b.value.name
2270
+ class: Fe(["wx-user-menu__trigger", { "wx-user-menu__trigger--named": n.expanded }]),
2271
+ title: f.value.name
2262
2272
  }, [
2263
- a(W, {
2264
- name: b.value.name,
2273
+ a(O, {
2274
+ name: f.value.name,
2265
2275
  src: w.value,
2266
2276
  size: "lg"
2267
2277
  }, null, 8, ["name", "src"]),
2268
- n.expanded ? (p(), G(ce, { key: 0 }, [
2269
- S("span", Gt, [
2270
- S("span", Jt, i(b.value.name), 1),
2271
- S("span", qt, i(b.value.email), 1)
2278
+ n.expanded ? (h(), G(ce, { key: 0 }, [
2279
+ W("span", Jt, [
2280
+ W("span", qt, s(f.value.name), 1),
2281
+ W("span", Qt, s(f.value.email), 1)
2272
2282
  ]),
2273
- a(s, {
2283
+ a(i, {
2274
2284
  name: "chevron-up",
2275
2285
  size: "sm",
2276
2286
  class: "wx-user-menu__chevron"
2277
2287
  })
2278
2288
  ], 64)) : E("", !0)
2279
- ], 10, jt)
2289
+ ], 10, Gt)
2280
2290
  ]),
2281
2291
  default: t(() => [
2282
- a(U, { disabled: "" }, {
2292
+ a(A, { disabled: "" }, {
2283
2293
  default: t(() => [
2284
- a($, { size: "sm" }, {
2294
+ a(v, { size: "sm" }, {
2285
2295
  default: t(() => [
2286
- d(i(b.value.email), 1)
2296
+ m(s(f.value.email), 1)
2287
2297
  ]),
2288
2298
  _: 1
2289
2299
  })
2290
2300
  ]),
2291
2301
  _: 1
2292
2302
  }),
2293
- a(K, { spacing: "sm" }),
2294
- a(U, {
2303
+ a(I, { spacing: "sm" }),
2304
+ a(A, {
2295
2305
  icon: "user",
2296
2306
  onClick: x
2297
2307
  }, {
2298
2308
  default: t(() => [
2299
- d(i(e(_)("profile.menu")), 1)
2309
+ m(s(e(z)("profile.menu")), 1)
2300
2310
  ]),
2301
2311
  _: 1
2302
2312
  }),
2303
- a(K, { spacing: "sm" }),
2304
- a(U, { disabled: "" }, {
2313
+ a(I, { spacing: "sm" }),
2314
+ a(A, { disabled: "" }, {
2305
2315
  default: t(() => [
2306
- a($, {
2316
+ a(v, {
2307
2317
  size: "sm",
2308
2318
  tone: "muted"
2309
2319
  }, {
2310
2320
  default: t(() => [
2311
- d(i(e(r)("theme.label")), 1)
2321
+ m(s(e(r)("theme.label")), 1)
2312
2322
  ]),
2313
2323
  _: 1
2314
2324
  })
2315
2325
  ]),
2316
2326
  _: 1
2317
2327
  }),
2318
- S("div", {
2328
+ W("div", {
2319
2329
  class: "wx-user-menu__theme",
2320
- onClick: A[1] || (A[1] = Pe(() => {
2330
+ onClick: $[1] || ($[1] = Pe(() => {
2321
2331
  }, ["stop"]))
2322
2332
  }, [
2323
- a(e(st), {
2324
- modelValue: f.value,
2325
- "onUpdate:modelValue": A[0] || (A[0] = (D) => f.value = D),
2333
+ a(e(rt), {
2334
+ modelValue: y.value,
2335
+ "onUpdate:modelValue": $[0] || ($[0] = (D) => y.value = D),
2326
2336
  size: "sm",
2327
2337
  block: "",
2328
2338
  "aria-label": e(r)("theme.label"),
@@ -2331,40 +2341,40 @@ const Nt = { class: "wx-profile-host" }, It = { class: "wx-profile" }, Mt = {
2331
2341
  "system-label": e(r)("theme.system")
2332
2342
  }, null, 8, ["modelValue", "aria-label", "light-label", "dark-label", "system-label"])
2333
2343
  ]),
2334
- O.value.length > 0 ? (p(), G(ce, { key: 0 }, [
2335
- a(K, { spacing: "sm" }),
2336
- a(U, { disabled: "" }, {
2344
+ F.value.length > 0 ? (h(), G(ce, { key: 0 }, [
2345
+ a(I, { spacing: "sm" }),
2346
+ a(A, { disabled: "" }, {
2337
2347
  default: t(() => [
2338
- a($, {
2348
+ a(v, {
2339
2349
  size: "sm",
2340
2350
  tone: "muted"
2341
2351
  }, {
2342
2352
  default: t(() => [
2343
- d(i(e(_)("menu.language")), 1)
2353
+ m(s(e(z)("menu.language")), 1)
2344
2354
  ]),
2345
2355
  _: 1
2346
2356
  })
2347
2357
  ]),
2348
2358
  _: 1
2349
2359
  }),
2350
- (p(!0), G(ce, null, _e(O.value, (D) => (p(), V(U, {
2360
+ (h(!0), G(ce, null, _e(F.value, (D) => (h(), V(A, {
2351
2361
  key: D.code,
2352
- icon: D.code === e(y).state.locale ? "check" : void 0,
2353
- onClick: (k) => h(D.code)
2362
+ icon: D.code === e(b).state.locale ? "check" : void 0,
2363
+ onClick: (k) => _(D.code)
2354
2364
  }, {
2355
2365
  default: t(() => [
2356
- d(i(D.nativeName), 1)
2366
+ m(s(D.nativeName), 1)
2357
2367
  ]),
2358
2368
  _: 2
2359
2369
  }, 1032, ["icon", "onClick"]))), 128)),
2360
- a(K, { spacing: "sm" })
2370
+ a(I, { spacing: "sm" })
2361
2371
  ], 64)) : E("", !0),
2362
- a(U, {
2372
+ a(A, {
2363
2373
  icon: "logout",
2364
- onClick: A[2] || (A[2] = (D) => e(o).logout())
2374
+ onClick: $[2] || ($[2] = (D) => e(o).logout())
2365
2375
  }, {
2366
2376
  default: t(() => [
2367
- d(i(n.signOutLabel ?? e(_)("menu.sign-out")), 1)
2377
+ m(s(n.signOutLabel ?? e(z)("menu.sign-out")), 1)
2368
2378
  ]),
2369
2379
  _: 1
2370
2380
  })
@@ -2373,39 +2383,44 @@ const Nt = { class: "wx-profile-host" }, It = { class: "wx-profile" }, Mt = {
2373
2383
  })) : E("", !0);
2374
2384
  };
2375
2385
  }
2376
- }), ia = /* @__PURE__ */ pe(Qt, [["__scopeId", "data-v-09f012fd"]]);
2377
- function ra(n = {}) {
2386
+ }), ra = /* @__PURE__ */ pe(Xt, [["__scopeId", "data-v-09f012fd"]]);
2387
+ function ua(n = {}) {
2378
2388
  const u = n.path ?? "/login";
2379
2389
  return {
2380
2390
  install(l) {
2381
- const o = it(l.context);
2382
- l.i18n.defaults("webx-auth", Ke), rt(l.app, o, n.resolveAvatar ?? null, n.avatarField ?? null), l.context.useSessionLoader(() => o.me()), l.router.addRoute({
2391
+ const o = ut(l.context);
2392
+ l.i18n.defaults("webx-auth", Ge), ct(
2393
+ l.app,
2394
+ o,
2395
+ n.resolveAvatar ?? je(l.context),
2396
+ n.avatarField ?? Ye(l.context)
2397
+ ), l.context.useSessionLoader(() => o.me()), l.router.addRoute({
2383
2398
  path: u,
2384
2399
  name: "webx.login",
2385
2400
  meta: { public: !0 },
2386
- component: { render: () => Re(mt, { ...n.card }) }
2387
- }), l.router.beforeEach((y) => y.meta.public === !0 || l.context.state.status !== "unauthenticated" ? !0 : { path: u, query: y.fullPath === "/" ? {} : { next: y.fullPath } }), ue(
2401
+ component: { render: () => Be(pt, { ...n.card }) }
2402
+ }), l.router.beforeEach((b) => b.meta.public === !0 || l.context.state.status !== "unauthenticated" ? !0 : { path: u, query: b.fullPath === "/" ? {} : { next: b.fullPath } }), ue(
2388
2403
  () => l.context.state.status,
2389
- (y) => {
2404
+ (b) => {
2390
2405
  const c = l.router.currentRoute.value;
2391
- if (y === "unauthenticated" && c.path !== u) {
2406
+ if (b === "unauthenticated" && c.path !== u) {
2392
2407
  l.router.replace({ path: u, query: { next: c.fullPath } });
2393
2408
  return;
2394
2409
  }
2395
- if (y === "ready" && c.path === u) {
2396
- const _ = c.query.next;
2397
- if (typeof _ == "string" && Xt(_)) {
2398
- location.assign(_);
2410
+ if (b === "ready" && c.path === u) {
2411
+ const z = c.query.next;
2412
+ if (typeof z == "string" && Zt(z)) {
2413
+ location.assign(z);
2399
2414
  return;
2400
2415
  }
2401
- l.router.replace(typeof _ == "string" ? _ : "/");
2416
+ l.router.replace(typeof z == "string" ? z : "/");
2402
2417
  }
2403
2418
  }
2404
2419
  );
2405
2420
  }
2406
2421
  };
2407
2422
  }
2408
- function Xt(n) {
2423
+ function Zt(n) {
2409
2424
  if (!/^https?:\/\//i.test(n))
2410
2425
  return !1;
2411
2426
  try {
@@ -2415,27 +2430,27 @@ function Xt(n) {
2415
2430
  }
2416
2431
  }
2417
2432
  export {
2418
- Ye as WxAdminList,
2419
- $t as WxAdminsPage,
2420
- xt as WxAgentCallList,
2421
- Et as WxConnectPage,
2422
- je as WxConnectionList,
2423
- mt as WxLoginCard,
2424
- Yt as WxProfileDialog,
2425
- ia as WxUserMenu,
2426
- la as admins,
2427
- ra as auth,
2428
- Ie as authKey,
2429
- Ke as authMessages,
2430
- He as avatarFieldKey,
2431
- Me as avatarResolverKey,
2432
- na as connect,
2433
+ Je as WxAdminList,
2434
+ At as WxAdminsPage,
2435
+ kt as WxAgentCallList,
2436
+ Dt as WxConnectPage,
2437
+ qe as WxConnectionList,
2438
+ pt as WxLoginCard,
2439
+ jt as WxProfileDialog,
2440
+ ra as WxUserMenu,
2441
+ na as admins,
2442
+ ua as auth,
2443
+ Me as authKey,
2444
+ Ge as authMessages,
2445
+ Ke as avatarFieldKey,
2446
+ He as avatarResolverKey,
2447
+ oa as connect,
2433
2448
  fe as createAdminsApi,
2434
- it as createAuthSession,
2435
- kt as createConnectionsApi,
2436
- rt as provideAuth,
2437
- oa as selectAdmin,
2438
- sa as selectAdmins,
2449
+ ut as createAuthSession,
2450
+ Ct as createConnectionsApi,
2451
+ ct as provideAuth,
2452
+ sa as selectAdmin,
2453
+ ia as selectAdmins,
2439
2454
  Ae as useAuth
2440
2455
  };
2441
2456
  //# sourceMappingURL=index.js.map