@webx-ui/module-auth 0.11.1 → 0.12.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,7 +1,7 @@
1
- import { inject as xe, defineComponent as Q, computed as T, ref as A, useTemplateRef as oe, onBeforeUnmount as nt, resolveComponent as J, openBlock as m, createBlock as b, withCtx as t, createVNode as a, withModifiers as Oe, createCommentVNode as I, createElementVNode as S, createTextVNode as c, toDisplayString as i, watch as de, unref as e, isRef as Ve, normalizeClass as Be, createElementBlock as H, resolveDynamicComponent as Ee, createSlots as Ae, Fragment as ue, renderList as Ce, onMounted as Ie, h as De } from "vue";
1
+ import { inject as xe, defineComponent as Q, computed as L, ref as W, useTemplateRef as oe, onBeforeUnmount as nt, resolveComponent as Y, openBlock as m, createBlock as _, withCtx as t, createVNode as a, withModifiers as Oe, createCommentVNode as E, createElementVNode as S, createTextVNode as c, toDisplayString as i, watch as de, unref as e, isRef as Ve, normalizeClass as Be, createElementBlock as H, resolveDynamicComponent as Ee, createSlots as Ae, Fragment as ue, renderList as Ce, onMounted as Ie, h as De } from "vue";
2
2
  import { useTranslate as G, HttpError as st, useAdmin as X, useI18n as Ne, useErrorText as re, rowMenuWidth as ot, WxDate as ae, WxRowMenu as Se, WxFilterChips as Me, WxListScreen as Ke, WxScreen as it, useTheme as ut } from "@webx-ui/module-admin";
3
3
  import { useRouter as rt, useRoute as ct } from "vue-router";
4
- import { useModal as _e, WxDialog as be, WxFormItem as M, WxInput as le, WxSelect as ne, WxSpace as se, WxCheckbox as Le, WxText as E, WxButton as N, toast as K, useElementWidth as ge, WxTable as ke, WxEntityCard as we, WxBadge as q, WxAvatar as dt, WxIcon as Z, confirm as ze, WxAlert as qe, WxRadioGroup as mt, createModal as he, WxHeading as me, WxCard as $e, WxSkeleton as vt, WxTabs as pt, WxTab as ye, WxThemeSwitch as ft } from "@webx-ui/core";
4
+ import { useModal as _e, WxDialog as be, WxFormItem as M, WxInput as le, WxSelect as ne, WxSpace as se, WxCheckbox as Le, WxText as B, WxButton as N, toast as K, useElementWidth as ge, WxTable as ke, WxEntityCard as we, WxBadge as q, WxAvatar as dt, WxIcon as ee, confirm as ze, WxAlert as qe, WxRadioGroup as mt, createModal as he, WxHeading as me, WxCard as $e, WxSkeleton as vt, WxTabs as pt, WxTab as ye, WxThemeSwitch as ft } from "@webx-ui/core";
5
5
  const He = /* @__PURE__ */ Symbol("webx-auth");
6
6
  function We() {
7
7
  const s = xe(He, null);
@@ -82,98 +82,98 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
82
82
  },
83
83
  emits: ["success"],
84
84
  setup(s, { expose: r, emit: l }) {
85
- const u = s, v = l, y = We(), V = G("webx-auth"), o = T(() => ({
86
- email: u.emailLabel ?? V("card.email"),
87
- password: u.passwordLabel ?? V("card.password"),
88
- remember: u.rememberLabel ?? V("card.remember"),
89
- submit: u.submitLabel ?? V("card.submit"),
90
- capsLock: u.capsLockWarning ?? V("card.caps-lock"),
91
- reveal: u.revealLabel ?? V("card.reveal"),
92
- hide: u.hideLabel ?? V("card.hide")
93
- })), h = A(""), F = A(""), d = A(!1), w = A(!1), x = A(!1), p = A(!1), g = A(""), _ = A({}), k = A(0), B = oe("emailField");
85
+ const u = s, v = l, y = We(), A = G("webx-auth"), o = L(() => ({
86
+ email: u.emailLabel ?? A("card.email"),
87
+ password: u.passwordLabel ?? A("card.password"),
88
+ remember: u.rememberLabel ?? A("card.remember"),
89
+ submit: u.submitLabel ?? A("card.submit"),
90
+ capsLock: u.capsLockWarning ?? A("card.caps-lock"),
91
+ reveal: u.revealLabel ?? A("card.reveal"),
92
+ hide: u.hideLabel ?? A("card.hide")
93
+ })), h = W(""), U = W(""), d = W(!1), k = W(!1), V = W(!1), p = W(!1), g = W(""), b = W({}), w = W(0), F = oe("emailField");
94
94
  let C = null;
95
- nt(U);
96
- const O = T(() => k.value > 0), n = T(
97
- () => u.throttleMessage === void 0 ? V("card.throttled", { seconds: k.value }) : u.throttleMessage.replace(":seconds", String(k.value))
95
+ nt(O);
96
+ const D = L(() => w.value > 0), n = L(
97
+ () => u.throttleMessage === void 0 ? A("card.throttled", { seconds: w.value }) : u.throttleMessage.replace(":seconds", String(w.value))
98
98
  );
99
- async function $() {
100
- if (!(w.value || O.value)) {
101
- w.value = !0, g.value = "", _.value = {};
99
+ async function x() {
100
+ if (!(k.value || D.value)) {
101
+ k.value = !0, g.value = "", b.value = {};
102
102
  try {
103
103
  await y.login({
104
104
  email: h.value,
105
- password: F.value,
105
+ password: U.value,
106
106
  remember: d.value
107
- }), F.value = "", v("success");
107
+ }), U.value = "", v("success");
108
108
  } catch (f) {
109
- R(f);
109
+ P(f);
110
110
  } finally {
111
- w.value = !1;
111
+ k.value = !1;
112
112
  }
113
113
  }
114
114
  }
115
- function R(f) {
115
+ function P(f) {
116
116
  if (!(f instanceof st)) {
117
117
  g.value = f instanceof Error ? f.message : String(f);
118
118
  return;
119
119
  }
120
120
  if (f.isValidation) {
121
- _.value = f.errors;
121
+ b.value = f.errors;
122
122
  return;
123
123
  }
124
124
  if (f.isThrottled) {
125
- Y(f.retryAfter ?? 60);
125
+ J(f.retryAfter ?? 60);
126
126
  return;
127
127
  }
128
128
  g.value = f.message;
129
129
  }
130
- function Y(f) {
131
- U(), k.value = f, C = setInterval(() => {
132
- k.value -= 1, k.value <= 0 && U();
130
+ function J(f) {
131
+ O(), w.value = f, C = setInterval(() => {
132
+ w.value -= 1, w.value <= 0 && O();
133
133
  }, 1e3);
134
134
  }
135
- function U() {
136
- C !== null && (clearInterval(C), C = null), k.value = 0;
135
+ function O() {
136
+ C !== null && (clearInterval(C), C = null), w.value = 0;
137
137
  }
138
138
  function z(f) {
139
139
  p.value = f.getModifierState("CapsLock");
140
140
  }
141
- return r({ focus: () => B.value?.focus() }), (f, L) => {
142
- const W = J("wx-alert"), te = J("wx-icon"), fe = J("wx-input"), D = J("wx-form-item"), j = J("wx-checkbox"), P = J("wx-button"), ie = J("wx-form"), lt = J("wx-card");
143
- return m(), b(lt, {
141
+ return r({ focus: () => F.value?.focus() }), (f, R) => {
142
+ const $ = Y("wx-alert"), Z = Y("wx-icon"), fe = Y("wx-input"), I = Y("wx-form-item"), j = Y("wx-checkbox"), T = Y("wx-button"), ie = Y("wx-form"), lt = Y("wx-card");
143
+ return m(), _(lt, {
144
144
  class: "wx-login",
145
145
  padding: 24
146
146
  }, {
147
147
  default: t(() => [
148
148
  a(ie, {
149
- errors: _.value,
150
- disabled: w.value,
149
+ errors: b.value,
150
+ disabled: k.value,
151
151
  gap: "md",
152
- onSubmit: Oe($, ["prevent"])
152
+ onSubmit: Oe(x, ["prevent"])
153
153
  }, {
154
154
  default: t(() => [
155
- g.value !== "" ? (m(), b(W, {
155
+ g.value !== "" ? (m(), _($, {
156
156
  key: 0,
157
157
  type: "danger",
158
158
  variant: "soft",
159
159
  live: "",
160
160
  description: g.value,
161
161
  class: "wx-login__message"
162
- }, null, 8, ["description"])) : O.value ? (m(), b(W, {
162
+ }, null, 8, ["description"])) : D.value ? (m(), _($, {
163
163
  key: 1,
164
164
  type: "warning",
165
165
  variant: "soft",
166
166
  live: "",
167
167
  description: n.value,
168
168
  class: "wx-login__message"
169
- }, null, 8, ["description"])) : I("", !0),
170
- a(D, { name: "email" }, {
169
+ }, null, 8, ["description"])) : E("", !0),
170
+ a(I, { name: "email" }, {
171
171
  default: t(() => [
172
172
  a(fe, {
173
173
  ref_key: "emailField",
174
- ref: B,
174
+ ref: F,
175
175
  modelValue: h.value,
176
- "onUpdate:modelValue": L[0] || (L[0] = (ce) => h.value = ce),
176
+ "onUpdate:modelValue": R[0] || (R[0] = (ce) => h.value = ce),
177
177
  type: "email",
178
178
  placeholder: o.value.email,
179
179
  "aria-label": o.value.email,
@@ -183,22 +183,22 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
183
183
  size: "lg"
184
184
  }, {
185
185
  prefix: t(() => [
186
- a(te, { name: "mail" })
186
+ a(Z, { name: "mail" })
187
187
  ]),
188
188
  _: 1
189
189
  }, 8, ["modelValue", "placeholder", "aria-label", "autofocus"])
190
190
  ]),
191
191
  _: 1
192
192
  }),
193
- a(D, {
193
+ a(I, {
194
194
  name: "password",
195
195
  help: p.value ? o.value.capsLock : void 0
196
196
  }, {
197
197
  default: t(() => [
198
198
  a(fe, {
199
- modelValue: F.value,
200
- "onUpdate:modelValue": L[2] || (L[2] = (ce) => F.value = ce),
201
- type: x.value ? "text" : "password",
199
+ modelValue: U.value,
200
+ "onUpdate:modelValue": R[2] || (R[2] = (ce) => U.value = ce),
201
+ type: V.value ? "text" : "password",
202
202
  placeholder: o.value.password,
203
203
  "aria-label": o.value.password,
204
204
  autocomplete: "current-password",
@@ -207,20 +207,20 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
207
207
  onKeyup: z
208
208
  }, {
209
209
  prefix: t(() => [
210
- a(te, { name: "lock" })
210
+ a(Z, { name: "lock" })
211
211
  ]),
212
212
  suffix: t(() => [
213
213
  S("button", {
214
214
  type: "button",
215
215
  class: "wx-login__reveal",
216
- title: x.value ? o.value.hide : o.value.reveal,
217
- "aria-label": x.value ? o.value.hide : o.value.reveal,
218
- "aria-pressed": x.value,
216
+ title: V.value ? o.value.hide : o.value.reveal,
217
+ "aria-label": V.value ? o.value.hide : o.value.reveal,
218
+ "aria-pressed": V.value,
219
219
  tabindex: "-1",
220
- onClick: L[1] || (L[1] = (ce) => x.value = !x.value)
220
+ onClick: R[1] || (R[1] = (ce) => V.value = !V.value)
221
221
  }, [
222
- a(te, {
223
- name: x.value ? "eye-off" : "eye"
222
+ a(Z, {
223
+ name: V.value ? "eye-off" : "eye"
224
224
  }, null, 8, ["name"])
225
225
  ], 8, bt)
226
226
  ]),
@@ -229,20 +229,20 @@ const bt = ["title", "aria-label", "aria-pressed"], gt = /* @__PURE__ */ Q({
229
229
  ]),
230
230
  _: 1
231
231
  }, 8, ["help"]),
232
- s.remember ? (m(), b(j, {
232
+ s.remember ? (m(), _(j, {
233
233
  key: 2,
234
234
  modelValue: d.value,
235
- "onUpdate:modelValue": L[3] || (L[3] = (ce) => d.value = ce),
235
+ "onUpdate:modelValue": R[3] || (R[3] = (ce) => d.value = ce),
236
236
  label: o.value.remember,
237
237
  class: "wx-login__remember"
238
- }, null, 8, ["modelValue", "label"])) : I("", !0),
239
- a(P, {
238
+ }, null, 8, ["modelValue", "label"])) : E("", !0),
239
+ a(T, {
240
240
  type: "primary",
241
241
  "native-type": "submit",
242
242
  size: "lg",
243
243
  block: "",
244
- loading: w.value,
245
- disabled: O.value
244
+ loading: k.value,
245
+ disabled: D.value
246
246
  }, {
247
247
  default: t(() => [
248
248
  c(i(o.value.submit), 1)
@@ -520,7 +520,7 @@ function pe(s) {
520
520
  };
521
521
  }
522
522
  const Te = /* @__PURE__ */ new WeakSet();
523
- function ee() {
523
+ function te() {
524
524
  try {
525
525
  const { i18n: s } = X();
526
526
  Te.has(s) || (s.defaults("webx-auth", Qe), Te.add(s));
@@ -537,9 +537,9 @@ const wt = { class: "wx-admin-form" }, xt = {
537
537
  avatarField: { default: void 0 }
538
538
  },
539
539
  setup(s) {
540
- const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(), V = pe(y), o = Ne();
541
- ee();
542
- const h = G("webx-auth"), F = re(), d = A([]), w = A(!1), x = A({}), p = A({
540
+ const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(), A = pe(y), o = Ne();
541
+ te();
542
+ const h = G("webx-auth"), U = re(), d = W([]), k = W(!1), V = W({}), p = W({
543
543
  name: "",
544
544
  email: "",
545
545
  password: "",
@@ -548,16 +548,16 @@ const wt = { class: "wx-admin-form" }, xt = {
548
548
  is_super: !1,
549
549
  locale: null,
550
550
  roles: []
551
- }), g = T({
551
+ }), g = L({
552
552
  get: () => p.value.avatar ? { path: p.value.avatar } : null,
553
553
  set: (n) => {
554
554
  p.value.avatar = n?.path ?? null;
555
555
  }
556
- }), _ = T(() => r.admin !== null), k = T(() => d.value.map((n) => ({ value: n.id, label: n.name }))), B = T(() => [
556
+ }), b = L(() => r.admin !== null), w = L(() => d.value.map((n) => ({ value: n.id, label: n.name }))), F = L(() => [
557
557
  { value: "auto", label: h("admins.locale-auto") },
558
558
  ...o.state.panelLocales.map((n) => ({ value: n.code, label: n.nativeName }))
559
559
  ]);
560
- V.roles().then((n) => d.value = n), de(
560
+ A.roles().then((n) => d.value = n), de(
561
561
  () => r.admin,
562
562
  (n) => {
563
563
  p.value = {
@@ -568,16 +568,16 @@ const wt = { class: "wx-admin-form" }, xt = {
568
568
  is_active: n?.is_active ?? !0,
569
569
  is_super: n?.is_super ?? !1,
570
570
  locale: n?.locale ?? "auto",
571
- roles: n?.roles.map(($) => $.id) ?? []
572
- }, x.value = {};
571
+ roles: n?.roles.map((x) => x.id) ?? []
572
+ }, V.value = {};
573
573
  },
574
574
  { immediate: !0 }
575
575
  );
576
576
  function C(n) {
577
- return x.value[n]?.[0];
577
+ return V.value[n]?.[0];
578
578
  }
579
- async function O() {
580
- w.value = !0, x.value = {};
579
+ async function D() {
580
+ k.value = !0, V.value = {};
581
581
  const n = {
582
582
  name: p.value.name,
583
583
  email: p.value.email,
@@ -589,19 +589,19 @@ const wt = { class: "wx-admin-form" }, xt = {
589
589
  };
590
590
  p.value.password && (n.password = p.value.password);
591
591
  try {
592
- const $ = r.admin ? await V.update(r.admin.id, n) : await V.create(n);
593
- K.success(h(_.value ? "admins.updated" : "admins.created")), l($);
594
- } catch ($) {
595
- const R = $.body;
596
- R?.errors ? x.value = R.errors : K.danger(F($));
592
+ const x = r.admin ? await A.update(r.admin.id, n) : await A.create(n);
593
+ K.success(h(b.value ? "admins.updated" : "admins.created")), l(x);
594
+ } catch (x) {
595
+ const P = x.body;
596
+ P?.errors ? V.value = P.errors : K.danger(U(x));
597
597
  } finally {
598
- w.value = !1;
598
+ k.value = !1;
599
599
  }
600
600
  }
601
- return (n, $) => (m(), b(e(be), {
601
+ return (n, x) => (m(), _(e(be), {
602
602
  open: e(v),
603
- "onUpdate:open": $[9] || ($[9] = (R) => Ve(v) ? v.value = R : null),
604
- title: _.value ? e(h)("admins.edit-short") : e(h)("admins.new-short"),
603
+ "onUpdate:open": x[9] || (x[9] = (P) => Ve(v) ? v.value = P : null),
604
+ title: b.value ? e(h)("admins.edit-short") : e(h)("admins.new-short"),
605
605
  width: 720
606
606
  }, {
607
607
  footer: t(() => [
@@ -609,7 +609,7 @@ const wt = { class: "wx-admin-form" }, xt = {
609
609
  default: t(() => [
610
610
  a(e(N), {
611
611
  variant: "outline",
612
- onClick: $[8] || ($[8] = (R) => e(u)())
612
+ onClick: x[8] || (x[8] = (P) => e(u)())
613
613
  }, {
614
614
  default: t(() => [
615
615
  c(i(e(h)("admins.cancel")), 1)
@@ -618,8 +618,8 @@ const wt = { class: "wx-admin-form" }, xt = {
618
618
  }),
619
619
  a(e(N), {
620
620
  type: "primary",
621
- loading: w.value,
622
- onClick: O
621
+ loading: k.value,
622
+ onClick: D
623
623
  }, {
624
624
  default: t(() => [
625
625
  c(i(e(h)("admins.save")), 1)
@@ -636,14 +636,14 @@ const wt = { class: "wx-admin-form" }, xt = {
636
636
  class: Be(["wx-admin-form__grid", { "has-aside": s.avatarField }])
637
637
  }, [
638
638
  s.avatarField ? (m(), H("div", xt, [
639
- (m(), b(Ee(s.avatarField), {
639
+ (m(), _(Ee(s.avatarField), {
640
640
  modelValue: g.value,
641
- "onUpdate:modelValue": $[0] || ($[0] = (R) => g.value = R),
641
+ "onUpdate:modelValue": x[0] || (x[0] = (P) => g.value = P),
642
642
  label: e(h)("admins.avatar"),
643
643
  aspect: "1/1",
644
644
  captions: !1
645
645
  }, null, 8, ["modelValue", "label"]))
646
- ])) : I("", !0),
646
+ ])) : E("", !0),
647
647
  S("div", Ct, [
648
648
  a(e(M), {
649
649
  label: e(h)("admins.name"),
@@ -652,7 +652,7 @@ const wt = { class: "wx-admin-form" }, xt = {
652
652
  default: t(() => [
653
653
  a(e(le), {
654
654
  modelValue: p.value.name,
655
- "onUpdate:modelValue": $[1] || ($[1] = (R) => p.value.name = R),
655
+ "onUpdate:modelValue": x[1] || (x[1] = (P) => p.value.name = P),
656
656
  name: "name"
657
657
  }, null, 8, ["modelValue"])
658
658
  ]),
@@ -665,7 +665,7 @@ const wt = { class: "wx-admin-form" }, xt = {
665
665
  default: t(() => [
666
666
  a(e(le), {
667
667
  modelValue: p.value.email,
668
- "onUpdate:modelValue": $[2] || ($[2] = (R) => p.value.email = R),
668
+ "onUpdate:modelValue": x[2] || (x[2] = (P) => p.value.email = P),
669
669
  type: "email",
670
670
  name: "email",
671
671
  autocomplete: "off"
@@ -676,12 +676,12 @@ const wt = { class: "wx-admin-form" }, xt = {
676
676
  a(e(M), {
677
677
  label: e(h)("admins.password"),
678
678
  error: C("password"),
679
- help: _.value ? e(h)("admins.password-keep") : e(h)("admins.password-hint")
679
+ help: b.value ? e(h)("admins.password-keep") : e(h)("admins.password-hint")
680
680
  }, {
681
681
  default: t(() => [
682
682
  a(e(le), {
683
683
  modelValue: p.value.password,
684
- "onUpdate:modelValue": $[3] || ($[3] = (R) => p.value.password = R),
684
+ "onUpdate:modelValue": x[3] || (x[3] = (P) => p.value.password = P),
685
685
  type: "password",
686
686
  name: "password",
687
687
  autocomplete: "new-password"
@@ -696,8 +696,8 @@ const wt = { class: "wx-admin-form" }, xt = {
696
696
  default: t(() => [
697
697
  a(e(ne), {
698
698
  modelValue: p.value.roles,
699
- "onUpdate:modelValue": $[4] || ($[4] = (R) => p.value.roles = R),
700
- options: k.value,
699
+ "onUpdate:modelValue": x[4] || (x[4] = (P) => p.value.roles = P),
700
+ options: w.value,
701
701
  multiple: ""
702
702
  }, null, 8, ["modelValue", "options"])
703
703
  ]),
@@ -709,8 +709,8 @@ const wt = { class: "wx-admin-form" }, xt = {
709
709
  default: t(() => [
710
710
  a(e(ne), {
711
711
  modelValue: p.value.locale,
712
- "onUpdate:modelValue": $[5] || ($[5] = (R) => p.value.locale = R),
713
- options: B.value
712
+ "onUpdate:modelValue": x[5] || (x[5] = (P) => p.value.locale = P),
713
+ options: F.value
714
714
  }, null, 8, ["modelValue", "options"])
715
715
  ]),
716
716
  _: 1
@@ -719,18 +719,18 @@ const wt = { class: "wx-admin-form" }, xt = {
719
719
  default: t(() => [
720
720
  a(e(Le), {
721
721
  modelValue: p.value.is_active,
722
- "onUpdate:modelValue": $[6] || ($[6] = (R) => p.value.is_active = R),
722
+ "onUpdate:modelValue": x[6] || (x[6] = (P) => p.value.is_active = P),
723
723
  label: e(h)("admins.active")
724
724
  }, null, 8, ["modelValue", "label"]),
725
725
  a(e(Le), {
726
726
  modelValue: p.value.is_super,
727
- "onUpdate:modelValue": $[7] || ($[7] = (R) => p.value.is_super = R),
727
+ "onUpdate:modelValue": x[7] || (x[7] = (P) => p.value.is_super = P),
728
728
  label: e(h)("admins.super")
729
729
  }, null, 8, ["modelValue", "label"])
730
730
  ]),
731
731
  _: 1
732
732
  }),
733
- a(e(E), {
733
+ a(e(B), {
734
734
  size: "sm",
735
735
  tone: "muted"
736
736
  }, {
@@ -757,33 +757,33 @@ const wt = { class: "wx-admin-form" }, xt = {
757
757
  },
758
758
  emits: ["open", "chosen", "selection", "remove"],
759
759
  setup(s, { expose: r, emit: l }) {
760
- const u = s, v = l, y = X(), V = pe(y);
761
- ee();
762
- const o = oe("root"), h = ge(o), F = T(() => h.value > 0 && h.value < Ue), d = G("webx-auth"), w = G("webx-admin"), x = A(null), p = A([]), g = A(!1), _ = A("all"), k = A("any"), B = A([]), C = A({});
763
- let O = { page: 1, perPage: 20, sort: null, search: "" };
764
- const n = T(() => [
760
+ const u = s, v = l, y = X(), A = pe(y);
761
+ te();
762
+ const o = oe("root"), h = ge(o), U = L(() => h.value > 0 && h.value < Ue), d = G("webx-auth"), k = G("webx-admin"), V = W(null), p = W([]), g = W(!1), b = W("all"), w = W("any"), F = W([]), C = W({});
763
+ let D = { page: 1, perPage: 20, sort: null, search: "" };
764
+ const n = L(() => [
765
765
  { value: "all", label: d("admins.all-roles") },
766
- ...p.value.map((D) => ({ value: D.slug, label: D.name }))
767
- ]), $ = T(() => [
766
+ ...p.value.map((I) => ({ value: I.slug, label: I.name }))
767
+ ]), x = L(() => [
768
768
  { value: "any", label: d("admins.any-state") },
769
769
  { value: "yes", label: d("admins.only-active") },
770
770
  { value: "no", label: d("admins.only-inactive") }
771
- ]), R = T(() => {
772
- const D = [], j = p.value.find((P) => P.slug === _.value);
773
- return j && D.push({
771
+ ]), P = L(() => {
772
+ const I = [], j = p.value.find((T) => T.slug === b.value);
773
+ return j && I.push({
774
774
  key: "role",
775
775
  label: `${d("admins.filter-role")}: ${j.name}`,
776
- clear: () => _.value = "all"
777
- }), k.value !== "any" && D.push({
776
+ clear: () => b.value = "all"
777
+ }), w.value !== "any" && I.push({
778
778
  key: "state",
779
- label: `${d("admins.filter-state")}: ${k.value === "yes" ? d("admins.only-active") : d("admins.only-inactive")}`,
780
- clear: () => k.value = "any"
781
- }), D;
779
+ label: `${d("admins.filter-state")}: ${w.value === "yes" ? d("admins.only-active") : d("admins.only-inactive")}`,
780
+ clear: () => w.value = "any"
781
+ }), I;
782
782
  });
783
- function Y() {
784
- _.value = "all", k.value = "any";
783
+ function J() {
784
+ b.value = "all", w.value = "any";
785
785
  }
786
- const U = T(() => F.value ? [{ key: "card", label: "" }] : [
786
+ const O = L(() => U.value ? [{ key: "card", label: "" }] : [
787
787
  { key: "name", label: d("admins.name"), sortable: !0 },
788
788
  { key: "email", label: d("admins.email"), sortable: !0, hideBelow: 560 },
789
789
  { key: "roles", label: d("admins.roles"), hideBelow: 760 },
@@ -807,92 +807,92 @@ const wt = { class: "wx-admin-form" }, xt = {
807
807
  hideOnCards: !0
808
808
  }
809
809
  ]);
810
- V.roles().then((D) => p.value = D), de([_, k], () => z(O));
811
- async function z(D) {
812
- O = D, g.value = !0;
810
+ A.roles().then((I) => p.value = I), de([b, w], () => z(D));
811
+ async function z(I) {
812
+ D = I, g.value = !0;
813
813
  try {
814
- x.value = await V.list({
815
- q: D.search,
816
- role: _.value === "all" ? null : _.value,
817
- active: k.value === "any" ? null : k.value,
818
- sort: D.sort ? `${D.sort.order === "desc" ? "-" : ""}${D.sort.key}` : "name",
819
- page: D.page,
820
- per_page: D.perPage
814
+ V.value = await A.list({
815
+ q: I.search,
816
+ role: b.value === "all" ? null : b.value,
817
+ active: w.value === "any" ? null : w.value,
818
+ sort: I.sort ? `${I.sort.order === "desc" ? "-" : ""}${I.sort.key}` : "name",
819
+ page: I.page,
820
+ per_page: I.perPage
821
821
  }), f();
822
822
  } finally {
823
823
  g.value = !1;
824
824
  }
825
825
  }
826
826
  async function f() {
827
- const D = u.resolveAvatar;
828
- if (D)
829
- for (const j of x.value?.data ?? []) {
827
+ const I = u.resolveAvatar;
828
+ if (I)
829
+ for (const j of V.value?.data ?? []) {
830
830
  if (!j.avatar || C.value[j.avatar]) continue;
831
- const P = await D(j.avatar);
832
- P && (C.value = { ...C.value, [j.avatar]: P });
831
+ const T = await I(j.avatar);
832
+ T && (C.value = { ...C.value, [j.avatar]: T });
833
833
  }
834
834
  }
835
- function L(D) {
835
+ function R(I) {
836
836
  return [
837
837
  {
838
838
  key: "delete",
839
839
  icon: "trash",
840
840
  label: d("admins.delete"),
841
841
  danger: !0,
842
- run: () => v("remove", D)
842
+ run: () => v("remove", I)
843
843
  }
844
844
  ];
845
845
  }
846
- function W(D) {
846
+ function $(I) {
847
847
  if (u.picking) {
848
- v("chosen", [D]);
848
+ v("chosen", [I]);
849
849
  return;
850
850
  }
851
- v("open", D);
851
+ v("open", I);
852
852
  }
853
- const te = T(() => !(u.picking && u.multiple));
854
- function fe(D, j) {
855
- B.value = j, v("selection", j);
853
+ const Z = L(() => !(u.picking && u.multiple));
854
+ function fe(I, j) {
855
+ F.value = j, v("selection", j);
856
856
  }
857
- return r({ reload: () => z(O), chosen: () => B.value }), (D, j) => (m(), H("div", {
857
+ return r({ reload: () => z(D), chosen: () => F.value }), (I, j) => (m(), H("div", {
858
858
  ref_key: "root",
859
859
  ref: o,
860
860
  class: "wx-admin-list"
861
861
  }, [
862
862
  a(e(ke), {
863
- data: x.value,
864
- columns: U.value,
863
+ data: V.value,
864
+ columns: O.value,
865
865
  "row-key": "id",
866
866
  searchable: "",
867
- clickable: te.value,
868
- hover: te.value,
867
+ clickable: Z.value,
868
+ hover: Z.value,
869
869
  flush: "",
870
870
  loading: g.value,
871
871
  "search-placeholder": e(d)("admins.search"),
872
872
  "empty-text": e(d)("admins.empty"),
873
873
  selectable: s.picking && s.multiple,
874
- "select-row-label": e(w)("filters.select-row"),
875
- "select-all-label": e(w)("filters.select-all"),
874
+ "select-row-label": e(k)("filters.select-row"),
875
+ "select-all-label": e(k)("filters.select-all"),
876
876
  "cards-below": Ue,
877
- "filters-count": R.value.length,
878
- "filters-label": e(w)("filters.title"),
879
- onRowClick: W,
877
+ "filters-count": P.value.length,
878
+ "filters-label": e(k)("filters.title"),
879
+ onRowClick: $,
880
880
  onStateChange: z,
881
881
  onSelectionChange: fe
882
882
  }, Ae({
883
- "cell-name": t(({ row: P }) => [
883
+ "cell-name": t(({ row: T }) => [
884
884
  a(e(se), {
885
885
  size: "sm",
886
886
  align: "center"
887
887
  }, {
888
888
  default: t(() => [
889
889
  a(e(dt), {
890
- name: P.name,
891
- src: P.avatar ? C.value[P.avatar] : void 0,
890
+ name: T.name,
891
+ src: T.avatar ? C.value[T.avatar] : void 0,
892
892
  size: "sm"
893
893
  }, null, 8, ["name", "src"]),
894
- S("span", null, i(P.name), 1),
895
- P.is_super ? (m(), b(e(q), {
894
+ S("span", null, i(T.name), 1),
895
+ T.is_super ? (m(), _(e(q), {
896
896
  key: 0,
897
897
  type: "warning"
898
898
  }, {
@@ -900,19 +900,19 @@ const wt = { class: "wx-admin-form" }, xt = {
900
900
  c(i(e(d)("admins.super")), 1)
901
901
  ]),
902
902
  _: 1
903
- })) : I("", !0)
903
+ })) : E("", !0)
904
904
  ]),
905
905
  _: 2
906
906
  }, 1024)
907
907
  ]),
908
- "cell-roles": t(({ row: P }) => [
909
- P.roles.length > 0 ? (m(), b(e(se), {
908
+ "cell-roles": t(({ row: T }) => [
909
+ T.roles.length > 0 ? (m(), _(e(se), {
910
910
  key: 0,
911
911
  size: "xs",
912
912
  wrap: ""
913
913
  }, {
914
914
  default: t(() => [
915
- (m(!0), H(ue, null, Ce(P.roles, (ie) => (m(), b(e(q), {
915
+ (m(!0), H(ue, null, Ce(T.roles, (ie) => (m(), _(e(q), {
916
916
  key: ie.id
917
917
  }, {
918
918
  default: t(() => [
@@ -922,7 +922,7 @@ const wt = { class: "wx-admin-form" }, xt = {
922
922
  }, 1024))), 128))
923
923
  ]),
924
924
  _: 2
925
- }, 1024)) : (m(), b(e(E), {
925
+ }, 1024)) : (m(), _(e(B), {
926
926
  key: 1,
927
927
  size: "sm",
928
928
  tone: "muted"
@@ -933,47 +933,47 @@ const wt = { class: "wx-admin-form" }, xt = {
933
933
  _: 1
934
934
  }))
935
935
  ]),
936
- "cell-is_active": t(({ row: P }) => [
936
+ "cell-is_active": t(({ row: T }) => [
937
937
  a(e(q), {
938
- type: P.is_active ? "success" : "default",
938
+ type: T.is_active ? "success" : "default",
939
939
  dot: ""
940
940
  }, {
941
941
  default: t(() => [
942
- c(i(P.is_active ? e(d)("admins.active") : e(d)("admins.only-inactive")), 1)
942
+ c(i(T.is_active ? e(d)("admins.active") : e(d)("admins.only-inactive")), 1)
943
943
  ]),
944
944
  _: 2
945
945
  }, 1032, ["type"])
946
946
  ]),
947
- "card-actions": t(({ row: P }) => [
948
- s.removable ? (m(), b(e(Se), {
947
+ "card-actions": t(({ row: T }) => [
948
+ s.removable ? (m(), _(e(Se), {
949
949
  key: 0,
950
- actions: L(P),
951
- label: P.name
952
- }, null, 8, ["actions", "label"])) : I("", !0)
950
+ actions: R(T),
951
+ label: T.name
952
+ }, null, 8, ["actions", "label"])) : E("", !0)
953
953
  ]),
954
- "cell-actions": t(({ row: P }) => [
954
+ "cell-actions": t(({ row: T }) => [
955
955
  a(e(Se), {
956
- actions: L(P),
957
- label: P.name
956
+ actions: R(T),
957
+ label: T.name
958
958
  }, null, 8, ["actions", "label"])
959
959
  ]),
960
- "cell-last_login_at": t(({ row: P }) => [
960
+ "cell-last_login_at": t(({ row: T }) => [
961
961
  a(e(ae), {
962
- value: P.last_login_at,
963
- tone: P.last_login_at ? "default" : "muted",
962
+ value: T.last_login_at,
963
+ tone: T.last_login_at ? "default" : "muted",
964
964
  compact: ""
965
965
  }, null, 8, ["value", "tone"])
966
966
  ]),
967
- "cell-card": t(({ row: P }) => [
967
+ "cell-card": t(({ row: T }) => [
968
968
  a(e(we), {
969
969
  variant: "plain",
970
970
  shape: "circle",
971
- title: P.name,
972
- image: P.avatar ? C.value[P.avatar] : void 0,
973
- subtitle: P.email
971
+ title: T.name,
972
+ image: T.avatar ? C.value[T.avatar] : void 0,
973
+ subtitle: T.email
974
974
  }, {
975
975
  meta: t(() => [
976
- P.is_super ? (m(), b(e(q), {
976
+ T.is_super ? (m(), _(e(q), {
977
977
  key: 0,
978
978
  type: "warning",
979
979
  size: "sm"
@@ -982,8 +982,8 @@ const wt = { class: "wx-admin-form" }, xt = {
982
982
  c(i(e(d)("admins.super")), 1)
983
983
  ]),
984
984
  _: 1
985
- })) : I("", !0),
986
- (m(!0), H(ue, null, Ce(P.roles, (ie) => (m(), b(e(q), {
985
+ })) : E("", !0),
986
+ (m(!0), H(ue, null, Ce(T.roles, (ie) => (m(), _(e(q), {
987
987
  key: ie.id,
988
988
  size: "sm"
989
989
  }, {
@@ -993,12 +993,12 @@ const wt = { class: "wx-admin-form" }, xt = {
993
993
  _: 2
994
994
  }, 1024))), 128)),
995
995
  a(e(q), {
996
- type: P.is_active ? "success" : "default",
996
+ type: T.is_active ? "success" : "default",
997
997
  dot: "",
998
998
  size: "sm"
999
999
  }, {
1000
1000
  default: t(() => [
1001
- c(i(P.is_active ? e(d)("admins.active") : e(d)("admins.only-inactive")), 1)
1001
+ c(i(T.is_active ? e(d)("admins.active") : e(d)("admins.only-inactive")), 1)
1002
1002
  ]),
1003
1003
  _: 2
1004
1004
  }, 1032, ["type"])
@@ -1016,8 +1016,8 @@ const wt = { class: "wx-admin-form" }, xt = {
1016
1016
  }, {
1017
1017
  default: t(() => [
1018
1018
  a(e(ne), {
1019
- modelValue: _.value,
1020
- "onUpdate:modelValue": j[0] || (j[0] = (P) => _.value = P),
1019
+ modelValue: b.value,
1020
+ "onUpdate:modelValue": j[0] || (j[0] = (T) => b.value = T),
1021
1021
  options: n.value,
1022
1022
  size: "sm"
1023
1023
  }, null, 8, ["modelValue", "options"])
@@ -1029,36 +1029,36 @@ const wt = { class: "wx-admin-form" }, xt = {
1029
1029
  }, {
1030
1030
  default: t(() => [
1031
1031
  a(e(ne), {
1032
- modelValue: k.value,
1033
- "onUpdate:modelValue": j[1] || (j[1] = (P) => k.value = P),
1034
- options: $.value,
1032
+ modelValue: w.value,
1033
+ "onUpdate:modelValue": j[1] || (j[1] = (T) => w.value = T),
1034
+ options: x.value,
1035
1035
  size: "sm"
1036
1036
  }, null, 8, ["modelValue", "options"])
1037
1037
  ]),
1038
1038
  _: 1
1039
1039
  }, 8, ["label"]),
1040
- R.value.length > 0 ? (m(), b(e(N), {
1040
+ P.value.length > 0 ? (m(), _(e(N), {
1041
1041
  key: 0,
1042
1042
  variant: "text",
1043
1043
  size: "sm",
1044
1044
  block: "",
1045
- onClick: Y
1045
+ onClick: J
1046
1046
  }, {
1047
1047
  icon: t(() => [
1048
- a(e(Z), { name: "close" })
1048
+ a(e(ee), { name: "close" })
1049
1049
  ]),
1050
1050
  default: t(() => [
1051
- c(" " + i(e(w)("filters.reset")), 1)
1051
+ c(" " + i(e(k)("filters.reset")), 1)
1052
1052
  ]),
1053
1053
  _: 1
1054
- })) : I("", !0)
1054
+ })) : E("", !0)
1055
1055
  ]),
1056
1056
  key: "0"
1057
1057
  } : void 0,
1058
1058
  s.filters ? {
1059
1059
  name: "applied",
1060
1060
  fn: t(() => [
1061
- a(e(Me), { filters: R.value }, null, 8, ["filters"])
1061
+ a(e(Me), { filters: P.value }, null, 8, ["filters"])
1062
1062
  ]),
1063
1063
  key: "1"
1064
1064
  } : void 0
@@ -1078,48 +1078,48 @@ const wt = { class: "wx-admin-form" }, xt = {
1078
1078
  __name: "CallList",
1079
1079
  setup(s, { expose: r }) {
1080
1080
  const l = X(), u = pe(l);
1081
- ee();
1082
- const v = oe("root"), y = ge(v), V = T(() => y.value > 0 && y.value < Pe), o = G("webx-auth"), h = G("webx-admin"), F = A(null), d = A({ users: [], tools: [] }), w = A(!1), x = A("all"), p = A("all"), g = A("any");
1083
- let _ = { page: 1, perPage: 30, sort: null, search: "" };
1084
- function k(f) {
1081
+ te();
1082
+ const v = oe("root"), y = ge(v), A = L(() => y.value > 0 && y.value < Pe), o = G("webx-auth"), h = G("webx-admin"), U = W(null), d = W({ users: [], tools: [] }), k = W(!1), V = W("all"), p = W("all"), g = W("any");
1083
+ let b = { page: 1, perPage: 30, sort: null, search: "" };
1084
+ function w(f) {
1085
1085
  return f === null ? o("calls.local") : f.name ?? o("calls.deleted", { id: f.id });
1086
1086
  }
1087
- const B = T(() => [
1087
+ const F = L(() => [
1088
1088
  { value: "all", label: o("calls.everybody") },
1089
1089
  ...d.value.users.map((f) => ({
1090
1090
  value: f.id === null ? "none" : String(f.id),
1091
- label: k(f.id === null ? null : { id: f.id, name: f.name })
1091
+ label: w(f.id === null ? null : { id: f.id, name: f.name })
1092
1092
  }))
1093
- ]), C = T(() => [
1093
+ ]), C = L(() => [
1094
1094
  { value: "all", label: o("calls.all-tools") },
1095
1095
  ...d.value.tools.map((f) => ({ value: f, label: f }))
1096
- ]), O = T(() => [
1096
+ ]), D = L(() => [
1097
1097
  { value: "any", label: o("calls.any-outcome") },
1098
1098
  { value: "ok", label: o("calls.only-answered") },
1099
1099
  { value: "failed", label: o("calls.only-refused") },
1100
1100
  { value: "dry", label: o("calls.only-dry") }
1101
- ]), n = T(() => {
1102
- const f = [], L = B.value.find((te) => te.value === x.value);
1103
- x.value !== "all" && L && f.push({
1101
+ ]), n = L(() => {
1102
+ const f = [], R = F.value.find((Z) => Z.value === V.value);
1103
+ V.value !== "all" && R && f.push({
1104
1104
  key: "user",
1105
- label: `${o("calls.filter-user")}: ${L.label}`,
1106
- clear: () => x.value = "all"
1105
+ label: `${o("calls.filter-user")}: ${R.label}`,
1106
+ clear: () => V.value = "all"
1107
1107
  }), p.value !== "all" && f.push({
1108
1108
  key: "tool",
1109
1109
  label: `${o("calls.filter-tool")}: ${p.value}`,
1110
1110
  clear: () => p.value = "all"
1111
1111
  });
1112
- const W = O.value.find((te) => te.value === g.value);
1113
- return g.value !== "any" && W && f.push({
1112
+ const $ = D.value.find((Z) => Z.value === g.value);
1113
+ return g.value !== "any" && $ && f.push({
1114
1114
  key: "outcome",
1115
- label: `${o("calls.filter-outcome")}: ${W.label}`,
1115
+ label: `${o("calls.filter-outcome")}: ${$.label}`,
1116
1116
  clear: () => g.value = "any"
1117
1117
  }), f;
1118
1118
  });
1119
- function $() {
1120
- x.value = "all", p.value = "all", g.value = "any";
1119
+ function x() {
1120
+ V.value = "all", p.value = "all", g.value = "any";
1121
1121
  }
1122
- const R = T(() => V.value ? [{ key: "card", label: "" }] : [
1122
+ const P = L(() => A.value ? [{ key: "card", label: "" }] : [
1123
1123
  { key: "at", label: o("calls.when") },
1124
1124
  { key: "user", label: o("calls.who"), hideBelow: 640 },
1125
1125
  { key: "tool", label: o("calls.tool") },
@@ -1127,46 +1127,46 @@ const wt = { class: "wx-admin-form" }, xt = {
1127
1127
  { key: "duration_ms", label: o("calls.took"), align: "right", hideBelow: 820 },
1128
1128
  { key: "client", label: o("calls.client"), hideBelow: 960 }
1129
1129
  ]);
1130
- de([x, p, g], () => Y({ ..._, page: 1 }));
1131
- async function Y(f) {
1132
- _ = f, w.value = !0;
1130
+ de([V, p, g], () => J({ ...b, page: 1 }));
1131
+ async function J(f) {
1132
+ b = f, k.value = !0;
1133
1133
  try {
1134
- F.value = await u.calls({
1135
- user: x.value === "all" ? null : x.value,
1134
+ U.value = await u.calls({
1135
+ user: V.value === "all" ? null : V.value,
1136
1136
  tool: p.value === "all" ? null : p.value,
1137
1137
  outcome: g.value === "any" ? null : g.value,
1138
1138
  page: f.page,
1139
1139
  per_page: f.perPage
1140
- }), d.value = F.value.filters;
1140
+ }), d.value = U.value.filters;
1141
1141
  } finally {
1142
- w.value = !1;
1142
+ k.value = !1;
1143
1143
  }
1144
1144
  }
1145
- function U(f) {
1145
+ function O(f) {
1146
1146
  return f.ok ? f.dry_run ? { type: "info", label: o("calls.dry-run") } : { type: "success", label: o("calls.answered") } : { type: "danger", label: o("calls.refused") };
1147
1147
  }
1148
1148
  function z(f) {
1149
1149
  return f.arguments !== null || f.error !== null;
1150
1150
  }
1151
- return r({ reload: () => Y(_) }), (f, L) => (m(), H("div", {
1151
+ return r({ reload: () => J(b) }), (f, R) => (m(), H("div", {
1152
1152
  ref_key: "root",
1153
1153
  ref: v,
1154
1154
  class: "wx-call-list"
1155
1155
  }, [
1156
1156
  a(e(ke), {
1157
- data: F.value,
1158
- columns: R.value,
1157
+ data: U.value,
1158
+ columns: P.value,
1159
1159
  "row-key": "id",
1160
1160
  flush: "",
1161
- loading: w.value,
1161
+ loading: k.value,
1162
1162
  clickable: !1,
1163
- expandable: !V.value,
1163
+ expandable: !A.value,
1164
1164
  "expandable-if": z,
1165
1165
  "empty-text": e(o)("calls.empty"),
1166
1166
  "cards-below": Pe,
1167
1167
  "filters-count": n.value.length,
1168
1168
  "filters-label": e(h)("filters.title"),
1169
- onStateChange: Y
1169
+ onStateChange: J
1170
1170
  }, {
1171
1171
  filters: t(() => [
1172
1172
  a(e(M), {
@@ -1174,9 +1174,9 @@ const wt = { class: "wx-admin-form" }, xt = {
1174
1174
  }, {
1175
1175
  default: t(() => [
1176
1176
  a(e(ne), {
1177
- modelValue: x.value,
1178
- "onUpdate:modelValue": L[0] || (L[0] = (W) => x.value = W),
1179
- options: B.value,
1177
+ modelValue: V.value,
1178
+ "onUpdate:modelValue": R[0] || (R[0] = ($) => V.value = $),
1179
+ options: F.value,
1180
1180
  size: "sm"
1181
1181
  }, null, 8, ["modelValue", "options"])
1182
1182
  ]),
@@ -1188,7 +1188,7 @@ const wt = { class: "wx-admin-form" }, xt = {
1188
1188
  default: t(() => [
1189
1189
  a(e(ne), {
1190
1190
  modelValue: p.value,
1191
- "onUpdate:modelValue": L[1] || (L[1] = (W) => p.value = W),
1191
+ "onUpdate:modelValue": R[1] || (R[1] = ($) => p.value = $),
1192
1192
  options: C.value,
1193
1193
  size: "sm"
1194
1194
  }, null, 8, ["modelValue", "options"])
@@ -1201,105 +1201,105 @@ const wt = { class: "wx-admin-form" }, xt = {
1201
1201
  default: t(() => [
1202
1202
  a(e(ne), {
1203
1203
  modelValue: g.value,
1204
- "onUpdate:modelValue": L[2] || (L[2] = (W) => g.value = W),
1205
- options: O.value,
1204
+ "onUpdate:modelValue": R[2] || (R[2] = ($) => g.value = $),
1205
+ options: D.value,
1206
1206
  size: "sm"
1207
1207
  }, null, 8, ["modelValue", "options"])
1208
1208
  ]),
1209
1209
  _: 1
1210
1210
  }, 8, ["label"]),
1211
- n.value.length > 0 ? (m(), b(e(N), {
1211
+ n.value.length > 0 ? (m(), _(e(N), {
1212
1212
  key: 0,
1213
1213
  variant: "text",
1214
1214
  size: "sm",
1215
1215
  block: "",
1216
- onClick: $
1216
+ onClick: x
1217
1217
  }, {
1218
1218
  icon: t(() => [
1219
- a(e(Z), { name: "close" })
1219
+ a(e(ee), { name: "close" })
1220
1220
  ]),
1221
1221
  default: t(() => [
1222
1222
  c(" " + i(e(h)("filters.reset")), 1)
1223
1223
  ]),
1224
1224
  _: 1
1225
- })) : I("", !0)
1225
+ })) : E("", !0)
1226
1226
  ]),
1227
1227
  applied: t(() => [
1228
1228
  a(e(Me), { filters: n.value }, null, 8, ["filters"])
1229
1229
  ]),
1230
- "cell-at": t(({ row: W }) => [
1230
+ "cell-at": t(({ row: $ }) => [
1231
1231
  a(e(ae), {
1232
- value: W.at,
1232
+ value: $.at,
1233
1233
  tone: "default",
1234
1234
  compact: ""
1235
1235
  }, null, 8, ["value"])
1236
1236
  ]),
1237
- "cell-user": t(({ row: W }) => [
1238
- a(e(E), {
1239
- tone: W.user === null || W.user.name === null ? "muted" : "default"
1237
+ "cell-user": t(({ row: $ }) => [
1238
+ a(e(B), {
1239
+ tone: $.user === null || $.user.name === null ? "muted" : "default"
1240
1240
  }, {
1241
1241
  default: t(() => [
1242
- c(i(k(W.user)), 1)
1242
+ c(i(w($.user)), 1)
1243
1243
  ]),
1244
1244
  _: 2
1245
1245
  }, 1032, ["tone"])
1246
1246
  ]),
1247
- "cell-tool": t(({ row: W }) => [
1248
- a(e(E), {
1247
+ "cell-tool": t(({ row: $ }) => [
1248
+ a(e(B), {
1249
1249
  mono: "",
1250
1250
  size: "sm"
1251
1251
  }, {
1252
1252
  default: t(() => [
1253
- c(i(W.tool), 1)
1253
+ c(i($.tool), 1)
1254
1254
  ]),
1255
1255
  _: 2
1256
1256
  }, 1024)
1257
1257
  ]),
1258
- "cell-outcome": t(({ row: W }) => [
1258
+ "cell-outcome": t(({ row: $ }) => [
1259
1259
  a(e(q), {
1260
- type: U(W).type,
1260
+ type: O($).type,
1261
1261
  dot: ""
1262
1262
  }, {
1263
1263
  default: t(() => [
1264
- c(i(U(W).label), 1)
1264
+ c(i(O($).label), 1)
1265
1265
  ]),
1266
1266
  _: 2
1267
1267
  }, 1032, ["type"])
1268
1268
  ]),
1269
- "cell-duration_ms": t(({ row: W }) => [
1270
- a(e(E), {
1269
+ "cell-duration_ms": t(({ row: $ }) => [
1270
+ a(e(B), {
1271
1271
  size: "sm",
1272
1272
  tone: "muted"
1273
1273
  }, {
1274
1274
  default: t(() => [
1275
- c(i(e(o)("calls.ms", { count: W.duration_ms })), 1)
1275
+ c(i(e(o)("calls.ms", { count: $.duration_ms })), 1)
1276
1276
  ]),
1277
1277
  _: 2
1278
1278
  }, 1024)
1279
1279
  ]),
1280
- "cell-client": t(({ row: W }) => [
1281
- W.client ? (m(), b(e(E), {
1280
+ "cell-client": t(({ row: $ }) => [
1281
+ $.client ? (m(), _(e(B), {
1282
1282
  key: 0,
1283
1283
  size: "sm"
1284
1284
  }, {
1285
1285
  default: t(() => [
1286
- c(i(W.client), 1)
1286
+ c(i($.client), 1)
1287
1287
  ]),
1288
1288
  _: 2
1289
- }, 1024)) : (m(), b(e(E), {
1289
+ }, 1024)) : (m(), _(e(B), {
1290
1290
  key: 1,
1291
1291
  size: "sm",
1292
1292
  tone: "muted"
1293
1293
  }, {
1294
- default: t(() => [...L[3] || (L[3] = [
1294
+ default: t(() => [...R[3] || (R[3] = [
1295
1295
  c("—", -1)
1296
1296
  ])]),
1297
1297
  _: 1
1298
1298
  }))
1299
1299
  ]),
1300
- expanded: t(({ row: W }) => [
1300
+ expanded: t(({ row: $ }) => [
1301
1301
  S("div", Vt, [
1302
- W.error ? (m(), b(e(E), {
1302
+ $.error ? (m(), _(e(B), {
1303
1303
  key: 0,
1304
1304
  tone: "danger",
1305
1305
  size: "sm",
@@ -1307,12 +1307,12 @@ const wt = { class: "wx-admin-form" }, xt = {
1307
1307
  }, {
1308
1308
  default: t(() => [
1309
1309
  S("strong", null, i(e(o)("calls.error")) + ":", 1),
1310
- c(" " + i(W.error), 1)
1310
+ c(" " + i($.error), 1)
1311
1311
  ]),
1312
1312
  _: 2
1313
- }, 1024)) : I("", !0),
1313
+ }, 1024)) : E("", !0),
1314
1314
  S("div", At, [
1315
- a(e(E), {
1315
+ a(e(B), {
1316
1316
  size: "sm",
1317
1317
  weight: "semibold"
1318
1318
  }, {
@@ -1321,7 +1321,7 @@ const wt = { class: "wx-admin-form" }, xt = {
1321
1321
  ]),
1322
1322
  _: 1
1323
1323
  }),
1324
- a(e(E), {
1324
+ a(e(B), {
1325
1325
  size: "xs",
1326
1326
  tone: "muted"
1327
1327
  }, {
@@ -1331,7 +1331,7 @@ const wt = { class: "wx-admin-form" }, xt = {
1331
1331
  _: 1
1332
1332
  })
1333
1333
  ]),
1334
- W.arguments ? (m(), H("pre", zt, i(W.arguments), 1)) : (m(), b(e(E), {
1334
+ $.arguments ? (m(), H("pre", zt, i($.arguments), 1)) : (m(), _(e(B), {
1335
1335
  key: 2,
1336
1336
  size: "sm",
1337
1337
  tone: "muted"
@@ -1343,62 +1343,62 @@ const wt = { class: "wx-admin-form" }, xt = {
1343
1343
  }))
1344
1344
  ])
1345
1345
  ]),
1346
- "cell-card": t(({ row: W }) => [
1346
+ "cell-card": t(({ row: $ }) => [
1347
1347
  a(e(we), {
1348
1348
  variant: "plain",
1349
- title: W.tool,
1350
- subtitle: k(W.user)
1349
+ title: $.tool,
1350
+ subtitle: w($.user)
1351
1351
  }, {
1352
1352
  media: t(() => [
1353
1353
  S("span", Wt, [
1354
- a(e(Z), { name: "sliders" })
1354
+ a(e(ee), { name: "sliders" })
1355
1355
  ])
1356
1356
  ]),
1357
1357
  meta: t(() => [
1358
1358
  a(e(q), {
1359
- type: U(W).type,
1359
+ type: O($).type,
1360
1360
  dot: "",
1361
1361
  size: "sm"
1362
1362
  }, {
1363
1363
  default: t(() => [
1364
- c(i(U(W).label), 1)
1364
+ c(i(O($).label), 1)
1365
1365
  ]),
1366
1366
  _: 2
1367
1367
  }, 1032, ["type"]),
1368
1368
  a(e(ae), {
1369
- value: W.at,
1369
+ value: $.at,
1370
1370
  compact: ""
1371
1371
  }, null, 8, ["value"]),
1372
- W.client ? (m(), b(e(E), {
1372
+ $.client ? (m(), _(e(B), {
1373
1373
  key: 0,
1374
1374
  size: "xs",
1375
1375
  tone: "muted"
1376
1376
  }, {
1377
1377
  default: t(() => [
1378
- c(i(W.client), 1)
1378
+ c(i($.client), 1)
1379
1379
  ]),
1380
1380
  _: 2
1381
- }, 1024)) : I("", !0)
1381
+ }, 1024)) : E("", !0)
1382
1382
  ]),
1383
1383
  default: t(() => [
1384
- z(W) ? (m(), b(e(se), {
1384
+ z($) ? (m(), _(e(se), {
1385
1385
  key: 0,
1386
1386
  direction: "vertical",
1387
1387
  size: "xs",
1388
1388
  class: "wx-call-list__card-details"
1389
1389
  }, {
1390
1390
  default: t(() => [
1391
- W.error ? (m(), b(e(E), {
1391
+ $.error ? (m(), _(e(B), {
1392
1392
  key: 0,
1393
1393
  tone: "danger",
1394
1394
  size: "sm"
1395
1395
  }, {
1396
1396
  default: t(() => [
1397
- c(i(W.error), 1)
1397
+ c(i($.error), 1)
1398
1398
  ]),
1399
1399
  _: 2
1400
- }, 1024)) : I("", !0),
1401
- W.arguments ? (m(), b(e(E), {
1400
+ }, 1024)) : E("", !0),
1401
+ $.arguments ? (m(), _(e(B), {
1402
1402
  key: 1,
1403
1403
  size: "xs",
1404
1404
  tone: "muted"
@@ -1407,11 +1407,11 @@ const wt = { class: "wx-admin-form" }, xt = {
1407
1407
  c(i(e(o)("calls.request")), 1)
1408
1408
  ]),
1409
1409
  _: 1
1410
- })) : I("", !0),
1411
- W.arguments ? (m(), H("pre", St, i(W.arguments), 1)) : I("", !0)
1410
+ })) : E("", !0),
1411
+ $.arguments ? (m(), H("pre", St, i($.arguments), 1)) : E("", !0)
1412
1412
  ]),
1413
1413
  _: 2
1414
- }, 1024)) : I("", !0)
1414
+ }, 1024)) : E("", !0)
1415
1415
  ]),
1416
1416
  _: 2
1417
1417
  }, 1032, ["title", "subtitle"])
@@ -1442,8 +1442,8 @@ const Ut = {
1442
1442
  },
1443
1443
  setup(s, { expose: r }) {
1444
1444
  const l = s, u = X(), v = Tt(u);
1445
- ee();
1446
- const y = G("webx-auth"), V = re(), o = oe("root"), h = ge(o), F = T(() => h.value > 0 && h.value < Fe), d = A([]), w = A(!1), x = A(null), p = T(() => F.value ? [{ key: "card", label: "" }] : [
1445
+ te();
1446
+ const y = G("webx-auth"), A = re(), o = oe("root"), h = ge(o), U = L(() => h.value > 0 && h.value < Fe), d = W([]), k = W(!1), V = W(null), p = L(() => U.value ? [{ key: "card", label: "" }] : [
1447
1447
  { key: "client", label: y("connections.client"), minWidth: 210 },
1448
1448
  ...l.scope === "all" ? [{ key: "user", label: y("connections.who"), minWidth: 140 }] : [],
1449
1449
  { key: "read_only", label: y("connections.allowed"), minWidth: 160 },
@@ -1454,23 +1454,23 @@ const Ut = {
1454
1454
  function g(C) {
1455
1455
  return C.user.name ?? y("calls.deleted", { id: C.user.id });
1456
1456
  }
1457
- function _(C) {
1457
+ function b(C) {
1458
1458
  if (C.read_only) return y("connections.read-only");
1459
1459
  if (l.scope !== "all") return y("connections.full-you");
1460
- const O = C.user.name?.split(" ")[0];
1461
- return y("connections.full", { name: O || g(C) });
1460
+ const D = C.user.name?.split(" ")[0];
1461
+ return y("connections.full", { name: D || g(C) });
1462
1462
  }
1463
- async function k() {
1464
- w.value = !0;
1463
+ async function w() {
1464
+ k.value = !0;
1465
1465
  try {
1466
1466
  d.value = (await v.list(l.scope)).data;
1467
1467
  } catch (C) {
1468
- K.danger(V(C));
1468
+ K.danger(A(C));
1469
1469
  } finally {
1470
- w.value = !1;
1470
+ k.value = !1;
1471
1471
  }
1472
1472
  }
1473
- async function B(C) {
1473
+ async function F(C) {
1474
1474
  if (await ze({
1475
1475
  title: y("connections.confirm-title", { client: C.client }),
1476
1476
  message: y("connections.confirm-text"),
@@ -1478,18 +1478,18 @@ const Ut = {
1478
1478
  cancelText: y("connections.cancel"),
1479
1479
  tone: "danger"
1480
1480
  })) {
1481
- x.value = C.id;
1481
+ V.value = C.id;
1482
1482
  try {
1483
1483
  const n = await v.disconnect(C.id);
1484
- d.value = d.value.map(($) => $.id === n.id ? n : $), K.success(y("connections.done", { client: C.client }));
1484
+ d.value = d.value.map((x) => x.id === n.id ? n : x), K.success(y("connections.done", { client: C.client }));
1485
1485
  } catch (n) {
1486
- K.danger(V(n));
1486
+ K.danger(A(n));
1487
1487
  } finally {
1488
- x.value = null;
1488
+ V.value = null;
1489
1489
  }
1490
1490
  }
1491
1491
  }
1492
- return de(() => l.scope, k, { immediate: !0 }), r({ reload: k }), (C, O) => (m(), H("div", {
1492
+ return de(() => l.scope, w, { immediate: !0 }), r({ reload: w }), (C, D) => (m(), H("div", {
1493
1493
  ref_key: "root",
1494
1494
  ref: o,
1495
1495
  class: "wx-connection-list"
@@ -1499,7 +1499,7 @@ const Ut = {
1499
1499
  columns: p.value,
1500
1500
  "row-key": "id",
1501
1501
  flush: "",
1502
- loading: w.value,
1502
+ loading: k.value,
1503
1503
  clickable: !1,
1504
1504
  "empty-text": s.scope === "all" ? e(y)("connections.empty-all") : e(y)("connections.empty"),
1505
1505
  "cards-below": Fe,
@@ -1511,7 +1511,7 @@ const Ut = {
1511
1511
  size: "none"
1512
1512
  }, {
1513
1513
  default: t(() => [
1514
- a(e(E), {
1514
+ a(e(B), {
1515
1515
  tone: n.revoked_at ? "muted" : "default",
1516
1516
  weight: "medium"
1517
1517
  }, {
@@ -1520,7 +1520,7 @@ const Ut = {
1520
1520
  ]),
1521
1521
  _: 2
1522
1522
  }, 1032, ["tone"]),
1523
- a(e(E), {
1523
+ a(e(B), {
1524
1524
  size: "xs",
1525
1525
  tone: "muted"
1526
1526
  }, {
@@ -1534,7 +1534,7 @@ const Ut = {
1534
1534
  }, 1024)
1535
1535
  ]),
1536
1536
  "cell-user": t(({ row: n }) => [
1537
- a(e(E), {
1537
+ a(e(B), {
1538
1538
  tone: n.user.name === null ? "muted" : "default"
1539
1539
  }, {
1540
1540
  default: t(() => [
@@ -1544,7 +1544,7 @@ const Ut = {
1544
1544
  }, 1032, ["tone"])
1545
1545
  ]),
1546
1546
  "cell-read_only": t(({ row: n }) => [
1547
- n.revoked_at ? (m(), b(e(q), {
1547
+ n.revoked_at ? (m(), _(e(q), {
1548
1548
  key: 0,
1549
1549
  type: "default",
1550
1550
  dot: ""
@@ -1553,13 +1553,13 @@ const Ut = {
1553
1553
  c(i(e(y)("connections.disconnected")), 1)
1554
1554
  ]),
1555
1555
  _: 1
1556
- })) : (m(), b(e(q), {
1556
+ })) : (m(), _(e(q), {
1557
1557
  key: 1,
1558
1558
  type: n.read_only ? "info" : "success",
1559
1559
  dot: ""
1560
1560
  }, {
1561
1561
  default: t(() => [
1562
- c(i(_(n)), 1)
1562
+ c(i(b(n)), 1)
1563
1563
  ]),
1564
1564
  _: 2
1565
1565
  }, 1032, ["type"]))
@@ -1572,12 +1572,12 @@ const Ut = {
1572
1572
  }, null, 8, ["value"])
1573
1573
  ]),
1574
1574
  "cell-last_used_at": t(({ row: n }) => [
1575
- n.last_used_at ? (m(), b(e(ae), {
1575
+ n.last_used_at ? (m(), _(e(ae), {
1576
1576
  key: 0,
1577
1577
  value: n.last_used_at,
1578
1578
  tone: "default",
1579
1579
  compact: ""
1580
- }, null, 8, ["value"])) : (m(), b(e(E), {
1580
+ }, null, 8, ["value"])) : (m(), _(e(B), {
1581
1581
  key: 1,
1582
1582
  size: "sm",
1583
1583
  tone: "muted"
@@ -1589,13 +1589,13 @@ const Ut = {
1589
1589
  }))
1590
1590
  ]),
1591
1591
  "cell-end": t(({ row: n }) => [
1592
- n.revoked_at ? I("", !0) : (m(), b(e(N), {
1592
+ n.revoked_at ? E("", !0) : (m(), _(e(N), {
1593
1593
  key: 0,
1594
1594
  type: "danger",
1595
1595
  variant: "text",
1596
1596
  size: "sm",
1597
- loading: x.value === n.id,
1598
- onClick: ($) => B(n)
1597
+ loading: V.value === n.id,
1598
+ onClick: (x) => F(n)
1599
1599
  }, {
1600
1600
  default: t(() => [
1601
1601
  c(i(e(y)("connections.disconnect")), 1)
@@ -1611,11 +1611,11 @@ const Ut = {
1611
1611
  }, {
1612
1612
  media: t(() => [
1613
1613
  S("span", Ut, [
1614
- a(e(Z), { name: "link" })
1614
+ a(e(ee), { name: "link" })
1615
1615
  ])
1616
1616
  ]),
1617
1617
  meta: t(() => [
1618
- n.revoked_at ? (m(), b(e(q), {
1618
+ n.revoked_at ? (m(), _(e(q), {
1619
1619
  key: 0,
1620
1620
  type: "default",
1621
1621
  dot: "",
@@ -1625,18 +1625,18 @@ const Ut = {
1625
1625
  c(i(e(y)("connections.disconnected")), 1)
1626
1626
  ]),
1627
1627
  _: 1
1628
- })) : (m(), b(e(q), {
1628
+ })) : (m(), _(e(q), {
1629
1629
  key: 1,
1630
1630
  type: n.read_only ? "info" : "success",
1631
1631
  dot: "",
1632
1632
  size: "sm"
1633
1633
  }, {
1634
1634
  default: t(() => [
1635
- c(i(_(n)), 1)
1635
+ c(i(b(n)), 1)
1636
1636
  ]),
1637
1637
  _: 2
1638
1638
  }, 1032, ["type"])),
1639
- s.scope === "all" ? (m(), b(e(E), {
1639
+ s.scope === "all" ? (m(), _(e(B), {
1640
1640
  key: 2,
1641
1641
  size: "xs",
1642
1642
  tone: "muted"
@@ -1645,12 +1645,12 @@ const Ut = {
1645
1645
  c(i(g(n)), 1)
1646
1646
  ]),
1647
1647
  _: 2
1648
- }, 1024)) : I("", !0),
1649
- n.last_used_at ? (m(), b(e(ae), {
1648
+ }, 1024)) : E("", !0),
1649
+ n.last_used_at ? (m(), _(e(ae), {
1650
1650
  key: 3,
1651
1651
  value: n.last_used_at,
1652
1652
  compact: ""
1653
- }, null, 8, ["value"])) : (m(), b(e(E), {
1653
+ }, null, 8, ["value"])) : (m(), _(e(B), {
1654
1654
  key: 4,
1655
1655
  size: "xs",
1656
1656
  tone: "muted"
@@ -1662,13 +1662,13 @@ const Ut = {
1662
1662
  }))
1663
1663
  ]),
1664
1664
  actions: t(() => [
1665
- n.revoked_at ? I("", !0) : (m(), b(e(N), {
1665
+ n.revoked_at ? E("", !0) : (m(), _(e(N), {
1666
1666
  key: 0,
1667
1667
  type: "danger",
1668
1668
  variant: "text",
1669
1669
  size: "sm",
1670
- loading: x.value === n.id,
1671
- onClick: ($) => B(n)
1670
+ loading: V.value === n.id,
1671
+ onClick: (x) => F(n)
1672
1672
  }, {
1673
1673
  default: t(() => [
1674
1674
  c(i(e(y)("connections.disconnect")), 1)
@@ -1724,46 +1724,46 @@ const Ft = {
1724
1724
  }, Bt = /* @__PURE__ */ Q({
1725
1725
  __name: "KeyDialog",
1726
1726
  setup(s) {
1727
- const { open: r, resolve: l, dismiss: u } = _e(), v = X(), y = tt(v), V = pe(v);
1728
- ee();
1729
- const o = G("webx-auth"), h = re(), F = [30, 90, 365, 1095, 3650], d = A({
1727
+ const { open: r, resolve: l, dismiss: u } = _e(), v = X(), y = tt(v), A = pe(v);
1728
+ te();
1729
+ const o = G("webx-auth"), h = re(), U = [30, 90, 365, 1095, 3650], d = W({
1730
1730
  name: "",
1731
1731
  admin: null,
1732
1732
  access: "everything",
1733
1733
  scopes: [],
1734
1734
  days: 365
1735
- }), w = A([]), x = A([]), p = A(!1), g = A({}), _ = A(null), k = A(!1), B = T(
1736
- () => w.value.filter((z) => z !== "mcp:use").map((z) => ({ value: z, label: z }))
1737
- ), C = T(() => [
1735
+ }), k = W([]), V = W([]), p = W(!1), g = W({}), b = W(null), w = W(!1), F = L(
1736
+ () => k.value.filter((z) => z !== "mcp:use").map((z) => ({ value: z, label: z }))
1737
+ ), C = L(() => [
1738
1738
  { value: "everything", label: o("keys.everything") },
1739
1739
  { value: "chosen", label: o("keys.chosen") }
1740
- ]), O = T(
1741
- () => F.map((z) => ({ value: z, label: o(`keys.days-${z}`) }))
1742
- ), n = T(() => {
1740
+ ]), D = L(
1741
+ () => U.map((z) => ({ value: z, label: o(`keys.days-${z}`) }))
1742
+ ), n = L(() => {
1743
1743
  const z = v.state.manifest?.modules.find((f) => f.id === "connect")?.meta;
1744
1744
  return typeof z?.url == "string" ? z.url : "";
1745
1745
  });
1746
1746
  y.list().then(
1747
- (z) => w.value = z.scopes,
1747
+ (z) => k.value = z.scopes,
1748
1748
  (z) => K.danger(h(z))
1749
- ), V.list({ active: "yes", per_page: 100, sort: "name" }).then(
1750
- (z) => x.value = z.data.map((f) => ({
1749
+ ), A.list({ active: "yes", per_page: 100, sort: "name" }).then(
1750
+ (z) => V.value = z.data.map((f) => ({
1751
1751
  value: f.id,
1752
1752
  label: `${f.name} · ${f.email}`
1753
1753
  })),
1754
1754
  (z) => K.danger(h(z))
1755
1755
  );
1756
- function $(z) {
1756
+ function x(z) {
1757
1757
  return g.value[z]?.[0] ?? g.value[`${z}.0`]?.[0];
1758
1758
  }
1759
- async function R() {
1759
+ async function P() {
1760
1760
  if (g.value = {}, d.value.access === "chosen" && d.value.scopes.length === 0) {
1761
1761
  g.value = { scopes: [o("keys.scopes-required")] };
1762
1762
  return;
1763
1763
  }
1764
1764
  p.value = !0;
1765
1765
  try {
1766
- _.value = await y.issue({
1766
+ b.value = await y.issue({
1767
1767
  name: d.value.name,
1768
1768
  admin: d.value.admin ?? 0,
1769
1769
  scopes: d.value.access === "chosen" ? d.value.scopes : [],
@@ -1776,25 +1776,25 @@ const Ft = {
1776
1776
  p.value = !1;
1777
1777
  }
1778
1778
  }
1779
- async function Y() {
1780
- _.value !== null && (await et(_.value.token) ? k.value = !0 : K.danger(o("keys.copy-failed")));
1779
+ async function J() {
1780
+ b.value !== null && (await et(b.value.token) ? w.value = !0 : K.danger(o("keys.copy-failed")));
1781
1781
  }
1782
- function U() {
1783
- _.value ? l(_.value.key) : u();
1782
+ function O() {
1783
+ b.value ? l(b.value.key) : u();
1784
1784
  }
1785
- return (z, f) => (m(), b(e(be), {
1785
+ return (z, f) => (m(), _(e(be), {
1786
1786
  open: e(r),
1787
- title: _.value ? e(o)("keys.issued-title") : e(o)("keys.issue"),
1787
+ title: b.value ? e(o)("keys.issued-title") : e(o)("keys.issue"),
1788
1788
  width: 640,
1789
- "onUpdate:open": f[5] || (f[5] = (L) => L ? void 0 : U())
1789
+ "onUpdate:open": f[5] || (f[5] = (R) => R ? void 0 : O())
1790
1790
  }, {
1791
1791
  footer: t(() => [
1792
1792
  a(e(se), { size: "sm" }, {
1793
1793
  default: t(() => [
1794
- _.value ? (m(), b(e(N), {
1794
+ b.value ? (m(), _(e(N), {
1795
1795
  key: 0,
1796
1796
  type: "primary",
1797
- onClick: U
1797
+ onClick: O
1798
1798
  }, {
1799
1799
  default: t(() => [
1800
1800
  c(i(e(o)("keys.done")), 1)
@@ -1803,7 +1803,7 @@ const Ft = {
1803
1803
  })) : (m(), H(ue, { key: 1 }, [
1804
1804
  a(e(N), {
1805
1805
  variant: "outline",
1806
- onClick: U
1806
+ onClick: O
1807
1807
  }, {
1808
1808
  default: t(() => [
1809
1809
  c(i(e(o)("keys.cancel")), 1)
@@ -1813,7 +1813,7 @@ const Ft = {
1813
1813
  a(e(N), {
1814
1814
  type: "primary",
1815
1815
  loading: p.value,
1816
- onClick: R
1816
+ onClick: P
1817
1817
  }, {
1818
1818
  default: t(() => [
1819
1819
  c(i(e(o)("keys.issue-short")), 1)
@@ -1826,7 +1826,7 @@ const Ft = {
1826
1826
  })
1827
1827
  ]),
1828
1828
  default: t(() => [
1829
- _.value ? (m(), H("div", Ft, [
1829
+ b.value ? (m(), H("div", Ft, [
1830
1830
  a(e(qe), {
1831
1831
  type: "warning",
1832
1832
  closable: !1
@@ -1842,21 +1842,21 @@ const Ft = {
1842
1842
  default: t(() => [
1843
1843
  S("div", Rt, [
1844
1844
  a(e(le), {
1845
- "model-value": _.value.token,
1845
+ "model-value": b.value.token,
1846
1846
  readonly: "",
1847
1847
  name: "token"
1848
1848
  }, null, 8, ["model-value"]),
1849
1849
  a(e(N), {
1850
1850
  type: "primary",
1851
- onClick: Y
1851
+ onClick: J
1852
1852
  }, {
1853
1853
  icon: t(() => [
1854
- a(e(Z), {
1855
- name: k.value ? "check" : "copy"
1854
+ a(e(ee), {
1855
+ name: w.value ? "check" : "copy"
1856
1856
  }, null, 8, ["name"])
1857
1857
  ]),
1858
1858
  default: t(() => [
1859
- c(" " + i(k.value ? e(o)("keys.copied") : e(o)("keys.copy")), 1)
1859
+ c(" " + i(w.value ? e(o)("keys.copied") : e(o)("keys.copy")), 1)
1860
1860
  ]),
1861
1861
  _: 1
1862
1862
  })
@@ -1864,7 +1864,7 @@ const Ft = {
1864
1864
  ]),
1865
1865
  _: 1
1866
1866
  }, 8, ["label"]),
1867
- n.value ? (m(), b(e(M), {
1867
+ n.value ? (m(), _(e(M), {
1868
1868
  key: 0,
1869
1869
  label: e(o)("keys.address")
1870
1870
  }, {
@@ -1876,8 +1876,8 @@ const Ft = {
1876
1876
  }, null, 8, ["model-value"])
1877
1877
  ]),
1878
1878
  _: 1
1879
- }, 8, ["label"])) : I("", !0),
1880
- a(e(E), {
1879
+ }, 8, ["label"])) : E("", !0),
1880
+ a(e(B), {
1881
1881
  size: "sm",
1882
1882
  tone: "muted"
1883
1883
  }, {
@@ -1887,7 +1887,7 @@ const Ft = {
1887
1887
  _: 1
1888
1888
  })
1889
1889
  ])) : (m(), H("div", Ot, [
1890
- a(e(E), {
1890
+ a(e(B), {
1891
1891
  size: "sm",
1892
1892
  tone: "muted"
1893
1893
  }, {
@@ -1898,13 +1898,13 @@ const Ft = {
1898
1898
  }),
1899
1899
  a(e(M), {
1900
1900
  label: e(o)("keys.name"),
1901
- error: $("name"),
1901
+ error: x("name"),
1902
1902
  help: e(o)("keys.name-hint")
1903
1903
  }, {
1904
1904
  default: t(() => [
1905
1905
  a(e(le), {
1906
1906
  modelValue: d.value.name,
1907
- "onUpdate:modelValue": f[0] || (f[0] = (L) => d.value.name = L),
1907
+ "onUpdate:modelValue": f[0] || (f[0] = (R) => d.value.name = R),
1908
1908
  name: "name",
1909
1909
  autocomplete: "off"
1910
1910
  }, null, 8, ["modelValue"])
@@ -1913,14 +1913,14 @@ const Ft = {
1913
1913
  }, 8, ["label", "error", "help"]),
1914
1914
  a(e(M), {
1915
1915
  label: e(o)("keys.who"),
1916
- error: $("admin"),
1916
+ error: x("admin"),
1917
1917
  help: e(o)("keys.who-hint")
1918
1918
  }, {
1919
1919
  default: t(() => [
1920
1920
  a(e(ne), {
1921
1921
  modelValue: d.value.admin,
1922
- "onUpdate:modelValue": f[1] || (f[1] = (L) => d.value.admin = L),
1923
- options: x.value,
1922
+ "onUpdate:modelValue": f[1] || (f[1] = (R) => d.value.admin = R),
1923
+ options: V.value,
1924
1924
  filterable: "",
1925
1925
  name: "admin"
1926
1926
  }, null, 8, ["modelValue", "options"])
@@ -1933,41 +1933,41 @@ const Ft = {
1933
1933
  default: t(() => [
1934
1934
  a(e(mt), {
1935
1935
  modelValue: d.value.access,
1936
- "onUpdate:modelValue": f[2] || (f[2] = (L) => d.value.access = L),
1936
+ "onUpdate:modelValue": f[2] || (f[2] = (R) => d.value.access = R),
1937
1937
  options: C.value,
1938
1938
  name: "access"
1939
1939
  }, null, 8, ["modelValue", "options"])
1940
1940
  ]),
1941
1941
  _: 1
1942
1942
  }, 8, ["label"]),
1943
- d.value.access === "chosen" ? (m(), b(e(M), {
1943
+ d.value.access === "chosen" ? (m(), _(e(M), {
1944
1944
  key: 0,
1945
1945
  label: e(o)("keys.scopes"),
1946
- error: $("scopes"),
1946
+ error: x("scopes"),
1947
1947
  help: e(o)("keys.scopes-hint")
1948
1948
  }, {
1949
1949
  default: t(() => [
1950
1950
  a(e(ne), {
1951
1951
  modelValue: d.value.scopes,
1952
- "onUpdate:modelValue": f[3] || (f[3] = (L) => d.value.scopes = L),
1953
- options: B.value,
1952
+ "onUpdate:modelValue": f[3] || (f[3] = (R) => d.value.scopes = R),
1953
+ options: F.value,
1954
1954
  multiple: "",
1955
1955
  filterable: "",
1956
1956
  name: "scopes"
1957
1957
  }, null, 8, ["modelValue", "options"])
1958
1958
  ]),
1959
1959
  _: 1
1960
- }, 8, ["label", "error", "help"])) : I("", !0),
1960
+ }, 8, ["label", "error", "help"])) : E("", !0),
1961
1961
  a(e(M), {
1962
1962
  label: e(o)("keys.lifetime"),
1963
- error: $("days"),
1963
+ error: x("days"),
1964
1964
  help: e(o)("keys.lifetime-hint")
1965
1965
  }, {
1966
1966
  default: t(() => [
1967
1967
  a(e(ne), {
1968
1968
  modelValue: d.value.days,
1969
- "onUpdate:modelValue": f[4] || (f[4] = (L) => d.value.days = L),
1970
- options: O.value,
1969
+ "onUpdate:modelValue": f[4] || (f[4] = (R) => d.value.days = R),
1970
+ options: D.value,
1971
1971
  name: "days"
1972
1972
  }, null, 8, ["modelValue", "options"])
1973
1973
  ]),
@@ -1985,8 +1985,8 @@ const Ft = {
1985
1985
  __name: "KeyList",
1986
1986
  setup(s, { expose: r }) {
1987
1987
  const l = X(), u = tt(l);
1988
- ee();
1989
- const v = G("webx-auth"), y = re(), V = oe("root"), o = ge(V), h = T(() => o.value > 0 && o.value < Re), F = A([]), d = A(!1), w = A(null), x = T(() => h.value ? [{ key: "card", label: "" }] : [
1988
+ te();
1989
+ const v = G("webx-auth"), y = re(), A = oe("root"), o = ge(A), h = L(() => o.value > 0 && o.value < Re), U = W([]), d = W(!1), k = W(null), V = L(() => h.value ? [{ key: "card", label: "" }] : [
1990
1990
  { key: "name", label: v("keys.name"), minWidth: 200 },
1991
1991
  { key: "user", label: v("keys.who"), minWidth: 140 },
1992
1992
  { key: "scopes", label: v("keys.allowed"), minWidth: 180 },
@@ -2000,20 +2000,20 @@ const Ft = {
2000
2000
  function g(C) {
2001
2001
  return C.created_by?.name ? v("keys.issued-by", { name: C.created_by.name }) : v("keys.issued-console");
2002
2002
  }
2003
- function _(C) {
2003
+ function b(C) {
2004
2004
  return C.everything ? v("keys.full", { name: C.user.name?.split(" ")[0] || p(C) }) : C.scopes.join(", ");
2005
2005
  }
2006
- async function k() {
2006
+ async function w() {
2007
2007
  d.value = !0;
2008
2008
  try {
2009
- F.value = (await u.list()).data;
2009
+ U.value = (await u.list()).data;
2010
2010
  } catch (C) {
2011
2011
  K.danger(y(C));
2012
2012
  } finally {
2013
2013
  d.value = !1;
2014
2014
  }
2015
2015
  }
2016
- async function B(C) {
2016
+ async function F(C) {
2017
2017
  if (await ze({
2018
2018
  title: v("keys.confirm-title", { name: C.name }),
2019
2019
  message: v("keys.confirm-text"),
@@ -2021,25 +2021,25 @@ const Ft = {
2021
2021
  cancelText: v("keys.cancel"),
2022
2022
  tone: "danger"
2023
2023
  })) {
2024
- w.value = C.id;
2024
+ k.value = C.id;
2025
2025
  try {
2026
2026
  const n = await u.revoke(C.id);
2027
- F.value = F.value.map(($) => $.id === n.id ? n : $), K.success(v("keys.revoked-done", { name: C.name }));
2027
+ U.value = U.value.map((x) => x.id === n.id ? n : x), K.success(v("keys.revoked-done", { name: C.name }));
2028
2028
  } catch (n) {
2029
2029
  K.danger(y(n));
2030
2030
  } finally {
2031
- w.value = null;
2031
+ k.value = null;
2032
2032
  }
2033
2033
  }
2034
2034
  }
2035
- return Ie(k), r({ reload: k }), (C, O) => (m(), H("div", {
2035
+ return Ie(w), r({ reload: w }), (C, D) => (m(), H("div", {
2036
2036
  ref_key: "root",
2037
- ref: V,
2037
+ ref: A,
2038
2038
  class: "wx-key-list"
2039
2039
  }, [
2040
2040
  a(e(ke), {
2041
- data: F.value,
2042
- columns: x.value,
2041
+ data: U.value,
2042
+ columns: V.value,
2043
2043
  "row-key": "id",
2044
2044
  flush: "",
2045
2045
  loading: d.value,
@@ -2054,7 +2054,7 @@ const Ft = {
2054
2054
  size: "none"
2055
2055
  }, {
2056
2056
  default: t(() => [
2057
- a(e(E), {
2057
+ a(e(B), {
2058
2058
  tone: n.state === "live" ? "default" : "muted",
2059
2059
  weight: "medium"
2060
2060
  }, {
@@ -2063,7 +2063,7 @@ const Ft = {
2063
2063
  ]),
2064
2064
  _: 2
2065
2065
  }, 1032, ["tone"]),
2066
- a(e(E), {
2066
+ a(e(B), {
2067
2067
  size: "xs",
2068
2068
  tone: "muted"
2069
2069
  }, {
@@ -2082,7 +2082,7 @@ const Ft = {
2082
2082
  }, 1024)
2083
2083
  ]),
2084
2084
  "cell-user": t(({ row: n }) => [
2085
- a(e(E), {
2085
+ a(e(B), {
2086
2086
  tone: n.user.name === null ? "muted" : "default"
2087
2087
  }, {
2088
2088
  default: t(() => [
@@ -2092,7 +2092,7 @@ const Ft = {
2092
2092
  }, 1032, ["tone"])
2093
2093
  ]),
2094
2094
  "cell-scopes": t(({ row: n }) => [
2095
- n.state === "revoked" ? (m(), b(e(q), {
2095
+ n.state === "revoked" ? (m(), _(e(q), {
2096
2096
  key: 0,
2097
2097
  type: "default",
2098
2098
  dot: ""
@@ -2101,7 +2101,7 @@ const Ft = {
2101
2101
  c(i(e(v)("keys.revoked")), 1)
2102
2102
  ]),
2103
2103
  _: 1
2104
- })) : n.state === "expired" ? (m(), b(e(q), {
2104
+ })) : n.state === "expired" ? (m(), _(e(q), {
2105
2105
  key: 1,
2106
2106
  type: "default",
2107
2107
  dot: ""
@@ -2110,30 +2110,30 @@ const Ft = {
2110
2110
  c(i(e(v)("keys.expired")), 1)
2111
2111
  ]),
2112
2112
  _: 1
2113
- })) : (m(), b(e(q), {
2113
+ })) : (m(), _(e(q), {
2114
2114
  key: 2,
2115
2115
  type: n.everything ? "success" : "info",
2116
2116
  dot: ""
2117
2117
  }, {
2118
2118
  default: t(() => [
2119
- c(i(_(n)), 1)
2119
+ c(i(b(n)), 1)
2120
2120
  ]),
2121
2121
  _: 2
2122
2122
  }, 1032, ["type"]))
2123
2123
  ]),
2124
2124
  "cell-expires_at": t(({ row: n }) => [
2125
- n.expires_at ? (m(), b(e(ae), {
2125
+ n.expires_at ? (m(), _(e(ae), {
2126
2126
  key: 0,
2127
2127
  value: n.expires_at,
2128
2128
  compact: ""
2129
- }, null, 8, ["value"])) : I("", !0)
2129
+ }, null, 8, ["value"])) : E("", !0)
2130
2130
  ]),
2131
2131
  "cell-last_used_at": t(({ row: n }) => [
2132
- n.last_used_at ? (m(), b(e(ae), {
2132
+ n.last_used_at ? (m(), _(e(ae), {
2133
2133
  key: 0,
2134
2134
  value: n.last_used_at,
2135
2135
  compact: ""
2136
- }, null, 8, ["value"])) : (m(), b(e(E), {
2136
+ }, null, 8, ["value"])) : (m(), _(e(B), {
2137
2137
  key: 1,
2138
2138
  size: "sm",
2139
2139
  tone: "muted"
@@ -2145,19 +2145,19 @@ const Ft = {
2145
2145
  }))
2146
2146
  ]),
2147
2147
  "cell-end": t(({ row: n }) => [
2148
- n.state === "live" ? (m(), b(e(N), {
2148
+ n.state === "live" ? (m(), _(e(N), {
2149
2149
  key: 0,
2150
2150
  type: "danger",
2151
2151
  variant: "text",
2152
2152
  size: "sm",
2153
- loading: w.value === n.id,
2154
- onClick: ($) => B(n)
2153
+ loading: k.value === n.id,
2154
+ onClick: (x) => F(n)
2155
2155
  }, {
2156
2156
  default: t(() => [
2157
2157
  c(i(e(v)("keys.revoke")), 1)
2158
2158
  ]),
2159
2159
  _: 1
2160
- }, 8, ["loading", "onClick"])) : I("", !0)
2160
+ }, 8, ["loading", "onClick"])) : E("", !0)
2161
2161
  ]),
2162
2162
  "cell-card": t(({ row: n }) => [
2163
2163
  a(e(we), {
@@ -2167,11 +2167,11 @@ const Ft = {
2167
2167
  }, {
2168
2168
  media: t(() => [
2169
2169
  S("span", Et, [
2170
- a(e(Z), { name: "lock" })
2170
+ a(e(ee), { name: "lock" })
2171
2171
  ])
2172
2172
  ]),
2173
2173
  meta: t(() => [
2174
- n.state === "revoked" ? (m(), b(e(q), {
2174
+ n.state === "revoked" ? (m(), _(e(q), {
2175
2175
  key: 0,
2176
2176
  type: "default",
2177
2177
  dot: "",
@@ -2181,7 +2181,7 @@ const Ft = {
2181
2181
  c(i(e(v)("keys.revoked")), 1)
2182
2182
  ]),
2183
2183
  _: 1
2184
- })) : n.state === "expired" ? (m(), b(e(q), {
2184
+ })) : n.state === "expired" ? (m(), _(e(q), {
2185
2185
  key: 1,
2186
2186
  type: "default",
2187
2187
  dot: "",
@@ -2191,18 +2191,18 @@ const Ft = {
2191
2191
  c(i(e(v)("keys.expired")), 1)
2192
2192
  ]),
2193
2193
  _: 1
2194
- })) : (m(), b(e(q), {
2194
+ })) : (m(), _(e(q), {
2195
2195
  key: 2,
2196
2196
  type: n.everything ? "success" : "info",
2197
2197
  dot: "",
2198
2198
  size: "sm"
2199
2199
  }, {
2200
2200
  default: t(() => [
2201
- c(i(_(n)), 1)
2201
+ c(i(b(n)), 1)
2202
2202
  ]),
2203
2203
  _: 2
2204
2204
  }, 1032, ["type"])),
2205
- n.expires_at ? (m(), b(e(E), {
2205
+ n.expires_at ? (m(), _(e(B), {
2206
2206
  key: 3,
2207
2207
  size: "xs",
2208
2208
  tone: "muted"
@@ -2215,22 +2215,22 @@ const Ft = {
2215
2215
  }, null, 8, ["value"])
2216
2216
  ]),
2217
2217
  _: 2
2218
- }, 1024)) : I("", !0)
2218
+ }, 1024)) : E("", !0)
2219
2219
  ]),
2220
2220
  actions: t(() => [
2221
- n.state === "live" ? (m(), b(e(N), {
2221
+ n.state === "live" ? (m(), _(e(N), {
2222
2222
  key: 0,
2223
2223
  type: "danger",
2224
2224
  variant: "text",
2225
2225
  size: "sm",
2226
- loading: w.value === n.id,
2227
- onClick: ($) => B(n)
2226
+ loading: k.value === n.id,
2227
+ onClick: (x) => F(n)
2228
2228
  }, {
2229
2229
  default: t(() => [
2230
2230
  c(i(e(v)("keys.revoke")), 1)
2231
2231
  ]),
2232
2232
  _: 1
2233
- }, 8, ["loading", "onClick"])) : I("", !0)
2233
+ }, 8, ["loading", "onClick"])) : E("", !0)
2234
2234
  ]),
2235
2235
  _: 2
2236
2236
  }, 1032, ["title", "subtitle"])
@@ -2248,27 +2248,27 @@ const Ft = {
2248
2248
  resolveAvatar: { type: Function, default: void 0 }
2249
2249
  },
2250
2250
  setup(s) {
2251
- const r = s, l = X(), u = pe(l), v = r.avatarField ?? Ye(l) ?? void 0, y = r.resolveAvatar ?? Je(l) ?? void 0, V = rt(), o = ct();
2252
- ee();
2253
- const h = G("webx-auth"), F = re(), d = oe("list"), w = oe("keys"), x = A(null), p = he($t), g = he(Bt), _ = l.can("admins.manage"), k = l.can("admins.audit"), B = T(
2254
- () => l.state.manifest?.modules.find((U) => U.id === "admins")?.title ?? h("admins.title")
2255
- ), C = T(() => {
2256
- const U = [{ value: "admins", label: B.value }];
2257
- return k && U.push({ value: "calls", label: h("calls.title") }), _ && U.push({ value: "connections", label: h("connections.title") }), _ && U.push({ value: "keys", label: h("keys.title") }), U.length > 1 ? U : void 0;
2258
- }), O = T({
2251
+ const r = s, l = X(), u = pe(l), v = r.avatarField ?? Ye(l) ?? void 0, y = r.resolveAvatar ?? Je(l) ?? void 0, A = rt(), o = ct();
2252
+ te();
2253
+ const h = G("webx-auth"), U = re(), d = oe("list"), k = oe("keys"), V = W(null), p = he($t), g = he(Bt), b = l.can("admins.manage"), w = l.can("admins.audit"), F = L(
2254
+ () => l.state.manifest?.modules.find((O) => O.id === "admins")?.title ?? h("admins.title")
2255
+ ), C = L(() => {
2256
+ const O = [{ value: "admins", label: F.value }];
2257
+ return w && O.push({ value: "calls", label: h("calls.title") }), b && O.push({ value: "connections", label: h("connections.title") }), b && O.push({ value: "keys", label: h("keys.title") }), O.length > 1 ? O : void 0;
2258
+ }), D = L({
2259
2259
  get: () => r.current,
2260
- set: (U) => {
2261
- const z = U === "admins" ? r.base : `${r.base}/${String(U)}`;
2262
- z !== o.path && V.push(z);
2260
+ set: (O) => {
2261
+ const z = O === "admins" ? r.base : `${r.base}/${String(O)}`;
2262
+ z !== o.path && A.push(z);
2263
2263
  }
2264
- }), n = T(() => _ ? r.current === "admins" ? [
2264
+ }), n = L(() => b ? r.current === "admins" ? [
2265
2265
  {
2266
2266
  key: "new",
2267
2267
  label: h("admins.new-short"),
2268
2268
  icon: "plus",
2269
2269
  primary: !0,
2270
2270
  run: () => {
2271
- R(null);
2271
+ P(null);
2272
2272
  }
2273
2273
  }
2274
2274
  ] : r.current === "keys" ? [
@@ -2278,52 +2278,52 @@ const Ft = {
2278
2278
  icon: "plus",
2279
2279
  primary: !0,
2280
2280
  run: () => {
2281
- $();
2281
+ x();
2282
2282
  }
2283
2283
  }
2284
2284
  ] : [] : []);
2285
- async function $() {
2286
- await g() && w.value?.reload();
2285
+ async function x() {
2286
+ await g() && k.value?.reload();
2287
2287
  }
2288
- async function R(U) {
2289
- x.value = U, await p({ admin: U, avatarField: v }) && d.value?.reload();
2288
+ async function P(O) {
2289
+ V.value = O, await p({ admin: O, avatarField: v }) && d.value?.reload();
2290
2290
  }
2291
- async function Y(U) {
2291
+ async function J(O) {
2292
2292
  if (await ze({
2293
- title: h("admins.delete-title", { name: U.name }),
2293
+ title: h("admins.delete-title", { name: O.name }),
2294
2294
  message: h("admins.delete-text"),
2295
2295
  confirmText: h("admins.delete"),
2296
2296
  cancelText: h("admins.cancel"),
2297
2297
  tone: "danger"
2298
2298
  }))
2299
2299
  try {
2300
- await u.remove(U.id), K.success(h("admins.deleted")), d.value?.reload();
2300
+ await u.remove(O.id), K.success(h("admins.deleted")), d.value?.reload();
2301
2301
  } catch (f) {
2302
- K.danger(F(f));
2302
+ K.danger(U(f));
2303
2303
  }
2304
2304
  }
2305
- return (U, z) => (m(), b(e(Ke), {
2306
- view: O.value,
2307
- "onUpdate:view": z[0] || (z[0] = (f) => O.value = f),
2308
- title: B.value,
2305
+ return (O, z) => (m(), _(e(Ke), {
2306
+ view: D.value,
2307
+ "onUpdate:view": z[0] || (z[0] = (f) => D.value = f),
2308
+ title: F.value,
2309
2309
  views: C.value,
2310
2310
  actions: n.value
2311
2311
  }, {
2312
2312
  default: t(() => [
2313
- s.current === "calls" ? (m(), b(Lt, { key: 0 })) : s.current === "connections" ? (m(), b(Ze, {
2313
+ s.current === "calls" ? (m(), _(Lt, { key: 0 })) : s.current === "connections" ? (m(), _(Ze, {
2314
2314
  key: 1,
2315
2315
  scope: "all"
2316
- })) : s.current === "keys" ? (m(), b(It, {
2316
+ })) : s.current === "keys" ? (m(), _(It, {
2317
2317
  key: 2,
2318
2318
  ref: "keys"
2319
- }, null, 512)) : (m(), b(Xe, {
2319
+ }, null, 512)) : (m(), _(Xe, {
2320
2320
  key: 3,
2321
2321
  ref_key: "list",
2322
2322
  ref: d,
2323
- removable: e(_),
2323
+ removable: e(b),
2324
2324
  "resolve-avatar": e(y),
2325
- onOpen: R,
2326
- onRemove: Y
2325
+ onOpen: P,
2326
+ onRemove: J
2327
2327
  }, null, 8, ["removable", "resolve-avatar"]))
2328
2328
  ]),
2329
2329
  _: 1
@@ -2336,15 +2336,15 @@ const Ft = {
2336
2336
  __name: "ContentRulesCard",
2337
2337
  setup(s) {
2338
2338
  const r = X();
2339
- ee();
2340
- const l = G("webx-auth"), u = G("webx-admin"), v = re(), y = T(() => {
2341
- const _ = r.state.manifest?.modules.find((k) => k.id === "settings")?.meta?.content_screen;
2342
- return typeof _ == "string" ? _ : null;
2343
- }), V = r.can("settings.view") || r.can("settings.manage"), o = r.can("settings.manage"), h = A({}), F = A({}), d = A(!0), w = A(!1), x = `${r.apiPath}/settings/content`;
2339
+ te();
2340
+ const l = G("webx-auth"), u = G("webx-admin"), v = re(), y = L(() => {
2341
+ const b = r.state.manifest?.modules.find((w) => w.id === "settings")?.meta?.content_screen;
2342
+ return typeof b == "string" ? b : null;
2343
+ }), A = r.can("settings.view") || r.can("settings.manage"), o = r.can("settings.manage"), h = W({}), U = W({}), d = W(!0), k = W(!1), V = `${r.apiPath}/settings/content`;
2344
2344
  Ie(async () => {
2345
- if (!(!y.value || !V))
2345
+ if (!(!y.value || !A))
2346
2346
  try {
2347
- const g = await r.http.get(x);
2347
+ const g = await r.http.get(V);
2348
2348
  h.value = g.data.values;
2349
2349
  } catch (g) {
2350
2350
  K.danger(v(g));
@@ -2353,20 +2353,20 @@ const Ft = {
2353
2353
  }
2354
2354
  });
2355
2355
  async function p() {
2356
- w.value = !0, F.value = {};
2356
+ k.value = !0, U.value = {};
2357
2357
  try {
2358
- const g = await r.http.put(x, {
2358
+ const g = await r.http.put(V, {
2359
2359
  values: h.value
2360
2360
  });
2361
2361
  h.value = g.data.values, K.success(u("editor.saved"));
2362
2362
  } catch (g) {
2363
- const _ = g.body;
2364
- _?.errors && (F.value = _.errors), K.danger(v(g));
2363
+ const b = g.body;
2364
+ b?.errors && (U.value = b.errors), K.danger(v(g));
2365
2365
  } finally {
2366
- w.value = !1;
2366
+ k.value = !1;
2367
2367
  }
2368
2368
  }
2369
- return (g, _) => y.value && e(V) ? (m(), H("section", Nt, [
2369
+ return (g, b) => y.value && e(A) ? (m(), H("section", Nt, [
2370
2370
  a(e(me), {
2371
2371
  level: 2,
2372
2372
  size: "sm"
@@ -2378,15 +2378,15 @@ const Ft = {
2378
2378
  }),
2379
2379
  a(e($e), null, Ae({
2380
2380
  default: t(() => [
2381
- d.value ? (m(), b(e(vt), {
2381
+ d.value ? (m(), _(e(vt), {
2382
2382
  key: 0,
2383
2383
  rows: 4
2384
- })) : (m(), b(e(it), {
2384
+ })) : (m(), _(e(it), {
2385
2385
  key: 1,
2386
2386
  modelValue: h.value,
2387
- "onUpdate:modelValue": _[0] || (_[0] = (k) => h.value = k),
2387
+ "onUpdate:modelValue": b[0] || (b[0] = (w) => h.value = w),
2388
2388
  name: y.value,
2389
- errors: F.value,
2389
+ errors: U.value,
2390
2390
  disabled: !e(o)
2391
2391
  }, null, 8, ["modelValue", "name", "errors", "disabled"]))
2392
2392
  ]),
@@ -2396,7 +2396,7 @@ const Ft = {
2396
2396
  name: "footer",
2397
2397
  fn: t(() => [
2398
2398
  S("div", Mt, [
2399
- a(e(E), {
2399
+ a(e(B), {
2400
2400
  size: "sm",
2401
2401
  tone: "muted"
2402
2402
  }, {
@@ -2405,68 +2405,68 @@ const Ft = {
2405
2405
  ]),
2406
2406
  _: 1
2407
2407
  }),
2408
- e(o) ? (m(), b(e(N), {
2408
+ e(o) ? (m(), _(e(N), {
2409
2409
  key: 0,
2410
2410
  type: "primary",
2411
- loading: w.value,
2411
+ loading: k.value,
2412
2412
  onClick: p
2413
2413
  }, {
2414
2414
  default: t(() => [
2415
2415
  c(i(e(u)("editor.save")), 1)
2416
2416
  ]),
2417
2417
  _: 1
2418
- }, 8, ["loading"])) : I("", !0)
2418
+ }, 8, ["loading"])) : E("", !0)
2419
2419
  ])
2420
2420
  ]),
2421
2421
  key: "0"
2422
2422
  }
2423
2423
  ]), 1024)
2424
- ])) : I("", !0);
2424
+ ])) : E("", !0);
2425
2425
  }
2426
2426
  }), qt = /* @__PURE__ */ ve(Kt, [["__scopeId", "data-v-55be157e"]]), Ht = { class: "wx-connect" }, jt = { class: "wx-connect__section" }, Gt = { class: "wx-connect__row" }, Yt = { class: "wx-connect__url" }, Jt = { class: "wx-connect__section" }, Qt = { class: "wx-connect__steps" }, Xt = { class: "wx-connect__steps" }, Zt = { class: "wx-connect__snippet" }, ea = { class: "wx-connect__snippet" }, ta = { class: "wx-connect__section" }, aa = { class: "wx-connect__links" }, la = { class: "wx-connect__steps" }, na = { class: "wx-connect__section" }, sa = /* @__PURE__ */ Q({
2427
2427
  __name: "ConnectPage",
2428
2428
  setup(s) {
2429
2429
  const r = X();
2430
- ee();
2431
- const l = G("webx-auth"), u = A(!1);
2430
+ te();
2431
+ const l = G("webx-auth"), u = W(!1);
2432
2432
  let v;
2433
- const y = T(() => {
2433
+ const y = L(() => {
2434
2434
  const p = r.state.manifest?.modules.find((g) => g.id === "connect")?.meta;
2435
2435
  return typeof p?.url == "string" ? p.url : "";
2436
- }), V = T(() => {
2436
+ }), A = L(() => {
2437
2437
  try {
2438
2438
  return new URL(y.value).hostname.split(".")[0] || "webx";
2439
2439
  } catch {
2440
2440
  return "webx";
2441
2441
  }
2442
- }), o = T(() => `claude mcp add --transport http ${V.value} ${y.value}`), h = T(() => `[mcp_servers.${V.value}]
2443
- url = "${y.value}"`), F = T(() => {
2444
- const p = w(JSON.stringify({ url: y.value }));
2445
- return `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(V.value)}&config=${p}`;
2446
- }), d = T(() => {
2447
- const p = JSON.stringify({ name: V.value, type: "http", url: y.value });
2442
+ }), o = L(() => `claude mcp add --transport http ${A.value} ${y.value}`), h = L(() => `[mcp_servers.${A.value}]
2443
+ url = "${y.value}"`), U = L(() => {
2444
+ const p = k(JSON.stringify({ url: y.value }));
2445
+ return `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(A.value)}&config=${p}`;
2446
+ }), d = L(() => {
2447
+ const p = JSON.stringify({ name: A.value, type: "http", url: y.value });
2448
2448
  return `vscode:mcp/install?${encodeURIComponent(p)}`;
2449
2449
  });
2450
- function w(p) {
2450
+ function k(p) {
2451
2451
  const g = new TextEncoder().encode(p);
2452
- let _ = "";
2453
- for (const k of g) _ += String.fromCharCode(k);
2454
- return encodeURIComponent(btoa(_));
2452
+ let b = "";
2453
+ for (const w of g) b += String.fromCharCode(w);
2454
+ return encodeURIComponent(btoa(b));
2455
2455
  }
2456
- async function x(p) {
2456
+ async function V(p) {
2457
2457
  if (!await et(p)) {
2458
2458
  K.danger(l("connect.copy-failed"));
2459
2459
  return;
2460
2460
  }
2461
2461
  u.value = !0, clearTimeout(v), v = setTimeout(() => u.value = !1, 2e3);
2462
2462
  }
2463
- return (p, g) => (m(), b(e(Ke), {
2463
+ return (p, g) => (m(), _(e(Ke), {
2464
2464
  title: e(l)("connect.title"),
2465
2465
  card: !1
2466
2466
  }, {
2467
2467
  default: t(() => [
2468
2468
  S("div", Ht, [
2469
- a(e(E), { class: "wx-connect__lead" }, {
2469
+ a(e(B), { class: "wx-connect__lead" }, {
2470
2470
  default: t(() => [
2471
2471
  c(i(e(l)("connect.lead")), 1)
2472
2472
  ]),
@@ -2489,10 +2489,10 @@ url = "${y.value}"`), F = T(() => {
2489
2489
  a(e(N), {
2490
2490
  type: "primary",
2491
2491
  disabled: y.value === "",
2492
- onClick: g[0] || (g[0] = (_) => x(y.value))
2492
+ onClick: g[0] || (g[0] = (b) => V(y.value))
2493
2493
  }, {
2494
2494
  icon: t(() => [
2495
- a(e(Z), {
2495
+ a(e(ee), {
2496
2496
  name: u.value ? "check" : "copy"
2497
2497
  }, null, 8, ["name"])
2498
2498
  ]),
@@ -2552,7 +2552,7 @@ url = "${y.value}"`), F = T(() => {
2552
2552
  label: e(l)("connect.claude-code-title")
2553
2553
  }, {
2554
2554
  default: t(() => [
2555
- a(e(E), { size: "sm" }, {
2555
+ a(e(B), { size: "sm" }, {
2556
2556
  default: t(() => [
2557
2557
  c(i(e(l)("connect.claude-code-hint")), 1)
2558
2558
  ]),
@@ -2563,10 +2563,10 @@ url = "${y.value}"`), F = T(() => {
2563
2563
  a(e(N), {
2564
2564
  variant: "text",
2565
2565
  size: "sm",
2566
- onClick: g[1] || (g[1] = (_) => x(o.value))
2566
+ onClick: g[1] || (g[1] = (b) => V(o.value))
2567
2567
  }, {
2568
2568
  icon: t(() => [
2569
- a(e(Z), { name: "copy" })
2569
+ a(e(ee), { name: "copy" })
2570
2570
  ]),
2571
2571
  default: t(() => [
2572
2572
  c(" " + i(e(l)("connect.copy-line")), 1)
@@ -2582,7 +2582,7 @@ url = "${y.value}"`), F = T(() => {
2582
2582
  label: e(l)("connect.codex-title")
2583
2583
  }, {
2584
2584
  default: t(() => [
2585
- a(e(E), { size: "sm" }, {
2585
+ a(e(B), { size: "sm" }, {
2586
2586
  default: t(() => [
2587
2587
  c(i(e(l)("connect.codex-hint")), 1)
2588
2588
  ]),
@@ -2593,10 +2593,10 @@ url = "${y.value}"`), F = T(() => {
2593
2593
  a(e(N), {
2594
2594
  variant: "text",
2595
2595
  size: "sm",
2596
- onClick: g[2] || (g[2] = (_) => x(h.value))
2596
+ onClick: g[2] || (g[2] = (b) => V(h.value))
2597
2597
  }, {
2598
2598
  icon: t(() => [
2599
- a(e(Z), { name: "copy" })
2599
+ a(e(ee), { name: "copy" })
2600
2600
  ]),
2601
2601
  default: t(() => [
2602
2602
  c(" " + i(e(l)("connect.copy-line")), 1)
@@ -2621,7 +2621,7 @@ url = "${y.value}"`), F = T(() => {
2621
2621
  ]),
2622
2622
  _: 1
2623
2623
  }),
2624
- a(e(E), {
2624
+ a(e(B), {
2625
2625
  size: "sm",
2626
2626
  tone: "muted"
2627
2627
  }, {
@@ -2632,13 +2632,13 @@ url = "${y.value}"`), F = T(() => {
2632
2632
  }),
2633
2633
  S("div", aa, [
2634
2634
  a(e(N), {
2635
- href: F.value,
2635
+ href: U.value,
2636
2636
  variant: "outline",
2637
2637
  disabled: y.value === "",
2638
2638
  class: "wx-connect__link"
2639
2639
  }, {
2640
2640
  icon: t(() => [
2641
- a(e(Z), { name: "external-link" })
2641
+ a(e(ee), { name: "external-link" })
2642
2642
  ]),
2643
2643
  default: t(() => [
2644
2644
  c(" " + i(e(l)("connect.install-in", { client: e(l)("connect.cursor-title") })), 1)
@@ -2652,7 +2652,7 @@ url = "${y.value}"`), F = T(() => {
2652
2652
  class: "wx-connect__link"
2653
2653
  }, {
2654
2654
  icon: t(() => [
2655
- a(e(Z), { name: "external-link" })
2655
+ a(e(ee), { name: "external-link" })
2656
2656
  ]),
2657
2657
  default: t(() => [
2658
2658
  c(" " + i(e(l)("connect.install-in", { client: e(l)("connect.vscode-title") })), 1)
@@ -2744,29 +2744,29 @@ const ia = /* @__PURE__ */ Q({
2744
2744
  },
2745
2745
  setup(s) {
2746
2746
  const r = s, { open: l, resolve: u, dismiss: v } = _e();
2747
- ee();
2748
- const y = G("webx-auth"), V = oe("list"), o = A(0);
2747
+ te();
2748
+ const y = G("webx-auth"), A = oe("list"), o = W(0);
2749
2749
  function h(d) {
2750
2750
  u(d);
2751
2751
  }
2752
- function F(d) {
2752
+ function U(d) {
2753
2753
  o.value = d.length;
2754
2754
  }
2755
- return (d, w) => (m(), b(e(be), {
2755
+ return (d, k) => (m(), _(e(be), {
2756
2756
  open: e(l),
2757
- "onUpdate:open": w[2] || (w[2] = (x) => Ve(l) ? l.value = x : null),
2757
+ "onUpdate:open": k[2] || (k[2] = (V) => Ve(l) ? l.value = V : null),
2758
2758
  title: s.title ?? e(y)(s.multiple ? "admins.select-many" : "admins.select-one"),
2759
2759
  width: 880
2760
2760
  }, Ae({
2761
2761
  default: t(() => [
2762
2762
  a(Xe, {
2763
2763
  ref_key: "list",
2764
- ref: V,
2764
+ ref: A,
2765
2765
  picking: "",
2766
2766
  multiple: s.multiple,
2767
2767
  "resolve-avatar": r.resolveAvatar,
2768
2768
  onChosen: h,
2769
- onSelection: F
2769
+ onSelection: U
2770
2770
  }, null, 8, ["multiple", "resolve-avatar"])
2771
2771
  ]),
2772
2772
  _: 2
@@ -2779,7 +2779,7 @@ const ia = /* @__PURE__ */ Q({
2779
2779
  align: "center"
2780
2780
  }, {
2781
2781
  default: t(() => [
2782
- a(e(E), {
2782
+ a(e(B), {
2783
2783
  size: "sm",
2784
2784
  tone: "muted"
2785
2785
  }, {
@@ -2790,7 +2790,7 @@ const ia = /* @__PURE__ */ Q({
2790
2790
  }),
2791
2791
  a(e(N), {
2792
2792
  variant: "outline",
2793
- onClick: w[0] || (w[0] = (x) => e(v)())
2793
+ onClick: k[0] || (k[0] = (V) => e(v)())
2794
2794
  }, {
2795
2795
  default: t(() => [
2796
2796
  c(i(e(y)("admins.cancel")), 1)
@@ -2800,7 +2800,7 @@ const ia = /* @__PURE__ */ Q({
2800
2800
  a(e(N), {
2801
2801
  type: "primary",
2802
2802
  disabled: o.value === 0,
2803
- onClick: w[1] || (w[1] = (x) => e(u)(V.value?.chosen() ?? []))
2803
+ onClick: k[1] || (k[1] = (V) => e(u)(A.value?.chosen() ?? []))
2804
2804
  }, {
2805
2805
  default: t(() => [
2806
2806
  c(i(e(y)("admins.save")), 1)
@@ -2831,43 +2831,43 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
2831
2831
  avatarField: { default: void 0 }
2832
2832
  },
2833
2833
  setup(s) {
2834
- const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(), V = We();
2835
- ee();
2836
- const o = G("webx-auth"), h = re(), F = A(!1), d = A({}), w = A({
2834
+ const r = s, { resolve: l, dismiss: u, open: v } = _e(), y = X(), A = We();
2835
+ te();
2836
+ const o = G("webx-auth"), h = re(), U = W(!1), d = W({}), k = W({
2837
2837
  name: y.state.user?.name ?? "",
2838
2838
  avatar: y.state.user?.avatar ?? null,
2839
2839
  password: "",
2840
2840
  current_password: ""
2841
- }), x = A(w.value.avatar ? { path: w.value.avatar } : null);
2842
- function p(_) {
2843
- return d.value[_]?.[0];
2841
+ }), V = W(k.value.avatar ? { path: k.value.avatar } : null);
2842
+ function p(b) {
2843
+ return d.value[b]?.[0];
2844
2844
  }
2845
2845
  async function g() {
2846
- F.value = !0, d.value = {};
2846
+ U.value = !0, d.value = {};
2847
2847
  try {
2848
- await V.updateProfile({
2849
- name: w.value.name,
2850
- avatar: x.value?.path ?? null,
2848
+ await A.updateProfile({
2849
+ name: k.value.name,
2850
+ avatar: V.value?.path ?? null,
2851
2851
  // Blank is left out entirely rather than sent as an empty string: the server reads a
2852
2852
  // filled password as "change it", and an empty one would be a change to nothing.
2853
- ...w.value.password ? { password: w.value.password, current_password: w.value.current_password } : {}
2853
+ ...k.value.password ? { password: k.value.password, current_password: k.value.current_password } : {}
2854
2854
  }), K.success(o("profile.saved")), l(!0);
2855
- } catch (_) {
2856
- const k = _.body;
2857
- k?.errors ? d.value = k.errors : K.danger(h(_));
2855
+ } catch (b) {
2856
+ const w = b.body;
2857
+ w?.errors ? d.value = w.errors : K.danger(h(b));
2858
2858
  } finally {
2859
- F.value = !1;
2859
+ U.value = !1;
2860
2860
  }
2861
2861
  }
2862
- return (_, k) => (m(), b(e(be), {
2862
+ return (b, w) => (m(), _(e(be), {
2863
2863
  open: e(v),
2864
- "onUpdate:open": k[5] || (k[5] = (B) => Ve(v) ? v.value = B : null),
2864
+ "onUpdate:open": w[5] || (w[5] = (F) => Ve(v) ? v.value = F : null),
2865
2865
  title: e(o)("profile.title"),
2866
2866
  width: 560
2867
2867
  }, {
2868
2868
  footer: t(() => [
2869
2869
  a(e(N), {
2870
- onClick: k[4] || (k[4] = (B) => e(u)())
2870
+ onClick: w[4] || (w[4] = (F) => e(u)())
2871
2871
  }, {
2872
2872
  default: t(() => [
2873
2873
  c(i(e(o)("profile.cancel")), 1)
@@ -2876,7 +2876,7 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
2876
2876
  }),
2877
2877
  a(e(N), {
2878
2878
  type: "primary",
2879
- loading: F.value,
2879
+ loading: U.value,
2880
2880
  onClick: g
2881
2881
  }, {
2882
2882
  default: t(() => [
@@ -2889,14 +2889,14 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
2889
2889
  S("div", ua, [
2890
2890
  S("div", ra, [
2891
2891
  r.avatarField ? (m(), H("div", ca, [
2892
- (m(), b(Ee(r.avatarField), {
2893
- modelValue: x.value,
2894
- "onUpdate:modelValue": k[0] || (k[0] = (B) => x.value = B),
2892
+ (m(), _(Ee(r.avatarField), {
2893
+ modelValue: V.value,
2894
+ "onUpdate:modelValue": w[0] || (w[0] = (F) => V.value = F),
2895
2895
  label: e(o)("profile.avatar"),
2896
2896
  aspect: "1/1",
2897
2897
  captions: !1
2898
2898
  }, null, 8, ["modelValue", "label"]))
2899
- ])) : I("", !0),
2899
+ ])) : E("", !0),
2900
2900
  S("div", da, [
2901
2901
  a(e(M), {
2902
2902
  label: e(o)("profile.name"),
@@ -2904,8 +2904,8 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
2904
2904
  }, {
2905
2905
  default: t(() => [
2906
2906
  a(e(le), {
2907
- modelValue: w.value.name,
2908
- "onUpdate:modelValue": k[1] || (k[1] = (B) => w.value.name = B),
2907
+ modelValue: k.value.name,
2908
+ "onUpdate:modelValue": w[1] || (w[1] = (F) => k.value.name = F),
2909
2909
  name: "name"
2910
2910
  }, null, 8, ["modelValue"])
2911
2911
  ]),
@@ -2929,15 +2929,15 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
2929
2929
  }, {
2930
2930
  default: t(() => [
2931
2931
  a(e(le), {
2932
- modelValue: w.value.password,
2933
- "onUpdate:modelValue": k[2] || (k[2] = (B) => w.value.password = B),
2932
+ modelValue: k.value.password,
2933
+ "onUpdate:modelValue": w[2] || (w[2] = (F) => k.value.password = F),
2934
2934
  type: "password",
2935
2935
  autocomplete: "new-password"
2936
2936
  }, null, 8, ["modelValue"])
2937
2937
  ]),
2938
2938
  _: 1
2939
2939
  }, 8, ["label", "help", "error"]),
2940
- w.value.password ? (m(), b(e(M), {
2940
+ k.value.password ? (m(), _(e(M), {
2941
2941
  key: 0,
2942
2942
  label: e(o)("profile.current-password"),
2943
2943
  help: e(o)("profile.current-password-hint"),
@@ -2945,14 +2945,14 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
2945
2945
  }, {
2946
2946
  default: t(() => [
2947
2947
  a(e(le), {
2948
- modelValue: w.value.current_password,
2949
- "onUpdate:modelValue": k[3] || (k[3] = (B) => w.value.current_password = B),
2948
+ modelValue: k.value.current_password,
2949
+ "onUpdate:modelValue": w[3] || (w[3] = (F) => k.value.current_password = F),
2950
2950
  type: "password",
2951
2951
  autocomplete: "current-password"
2952
2952
  }, null, 8, ["modelValue"])
2953
2953
  ]),
2954
2954
  _: 1
2955
- }, 8, ["label", "help", "error"])) : I("", !0)
2955
+ }, 8, ["label", "help", "error"])) : E("", !0)
2956
2956
  ])
2957
2957
  ])
2958
2958
  ])
@@ -2969,57 +2969,57 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
2969
2969
  expanded: { type: Boolean, default: !1 }
2970
2970
  },
2971
2971
  setup(s) {
2972
- const r = s, l = X(), u = We(), v = Ne(), y = ut(), V = G("webx-auth"), o = v.scope("webx-admin"), h = T(() => l.state.user), F = T(
2972
+ const r = s, l = X(), u = We(), v = Ne(), y = ut(), A = G("webx-auth"), o = v.scope("webx-admin"), h = L(() => l.state.user), U = l.siteUrl, d = L(
2973
2973
  () => v.state.panelLocales.length > 1 ? v.state.panelLocales : []
2974
- ), d = xe(je, null), w = xe(Ge, null), x = A(void 0);
2974
+ ), k = xe(je, null), V = xe(Ge, null), p = W(void 0);
2975
2975
  de(
2976
2976
  () => typeof h.value?.avatar == "string" ? h.value.avatar : null,
2977
- async (O) => {
2978
- const n = r.resolveAvatar ?? d;
2979
- if (O === null || O === "" || n === null) {
2980
- x.value = void 0;
2977
+ async (n) => {
2978
+ const x = r.resolveAvatar ?? k;
2979
+ if (n === null || n === "" || x === null) {
2980
+ p.value = void 0;
2981
2981
  return;
2982
2982
  }
2983
- const $ = await n(O);
2984
- h.value?.avatar === O && (x.value = $ ?? void 0);
2983
+ const P = await x(n);
2984
+ h.value?.avatar === n && (p.value = P ?? void 0);
2985
2985
  },
2986
2986
  { immediate: !0 }
2987
2987
  );
2988
- const p = he(va);
2989
- function g() {
2988
+ const g = he(va);
2989
+ function b() {
2990
2990
  setTimeout(
2991
2991
  () => {
2992
- p({ avatarField: r.avatarField ?? w ?? void 0 });
2992
+ g({ avatarField: r.avatarField ?? V ?? void 0 });
2993
2993
  },
2994
2994
  0
2995
2995
  );
2996
2996
  }
2997
- const _ = T({
2997
+ const w = L({
2998
2998
  get: () => y.state.preference,
2999
- set: (O) => {
3000
- y.set(O), u.setTheme(O);
2999
+ set: (n) => {
3000
+ y.set(n), u.setTheme(n);
3001
3001
  }
3002
- }), k = T(
3002
+ }), F = L(
3003
3003
  () => typeof h.value?.siteBar == "boolean" ? h.value.siteBar : null
3004
3004
  );
3005
- function B() {
3006
- k.value !== null && u.setSiteBar(!k.value);
3005
+ function C() {
3006
+ F.value !== null && u.setSiteBar(!F.value);
3007
3007
  }
3008
- async function C(O) {
3009
- O !== v.state.locale && await u.setLocale(O);
3008
+ async function D(n) {
3009
+ n !== v.state.locale && await u.setLocale(n);
3010
3010
  }
3011
- return (O, n) => {
3012
- const $ = J("wx-avatar"), R = J("wx-icon"), Y = J("wx-text"), U = J("wx-dropdown-item"), z = J("wx-divider"), f = J("wx-dropdown");
3013
- return h.value !== null ? (m(), b(f, { key: 0 }, {
3011
+ return (n, x) => {
3012
+ const P = Y("wx-avatar"), J = Y("wx-icon"), O = Y("wx-text"), z = Y("wx-dropdown-item"), f = Y("wx-divider"), R = Y("wx-dropdown");
3013
+ return h.value !== null ? (m(), _(R, { key: 0 }, {
3014
3014
  trigger: t(() => [
3015
3015
  S("button", {
3016
3016
  type: "button",
3017
3017
  class: Be(["wx-user-menu__trigger", { "wx-user-menu__trigger--named": s.expanded }]),
3018
3018
  title: h.value.name
3019
3019
  }, [
3020
- a($, {
3020
+ a(P, {
3021
3021
  name: h.value.name,
3022
- src: x.value,
3022
+ src: p.value,
3023
3023
  size: "lg"
3024
3024
  }, null, 8, ["name", "src"]),
3025
3025
  s.expanded ? (m(), H(ue, { key: 0 }, [
@@ -3027,18 +3027,18 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
3027
3027
  S("span", ya, i(h.value.name), 1),
3028
3028
  S("span", ha, i(h.value.email), 1)
3029
3029
  ]),
3030
- a(R, {
3030
+ a(J, {
3031
3031
  name: "chevron-up",
3032
3032
  size: "sm",
3033
3033
  class: "wx-user-menu__chevron"
3034
3034
  })
3035
- ], 64)) : I("", !0)
3035
+ ], 64)) : E("", !0)
3036
3036
  ], 10, pa)
3037
3037
  ]),
3038
3038
  default: t(() => [
3039
- a(U, { disabled: "" }, {
3039
+ a(z, { disabled: "" }, {
3040
3040
  default: t(() => [
3041
- a(Y, { size: "sm" }, {
3041
+ a(O, { size: "sm" }, {
3042
3042
  default: t(() => [
3043
3043
  c(i(h.value.email), 1)
3044
3044
  ]),
@@ -3047,20 +3047,32 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
3047
3047
  ]),
3048
3048
  _: 1
3049
3049
  }),
3050
- a(z, { spacing: "sm" }),
3051
- a(U, {
3050
+ a(f, { spacing: "sm" }),
3051
+ a(z, {
3052
3052
  icon: "user",
3053
- onClick: g
3053
+ onClick: b
3054
3054
  }, {
3055
3055
  default: t(() => [
3056
- c(i(e(V)("profile.menu")), 1)
3056
+ c(i(e(A)("profile.menu")), 1)
3057
3057
  ]),
3058
3058
  _: 1
3059
3059
  }),
3060
- a(z, { spacing: "sm" }),
3061
- a(U, { disabled: "" }, {
3060
+ e(U) ? (m(), _(z, {
3061
+ key: 0,
3062
+ icon: "external-link",
3063
+ href: e(U),
3064
+ target: "_blank",
3065
+ rel: "noopener"
3066
+ }, {
3067
+ default: t(() => [
3068
+ c(i(e(o)("nav.open-site")), 1)
3069
+ ]),
3070
+ _: 1
3071
+ }, 8, ["href"])) : E("", !0),
3072
+ a(f, { spacing: "sm" }),
3073
+ a(z, { disabled: "" }, {
3062
3074
  default: t(() => [
3063
- a(Y, {
3075
+ a(O, {
3064
3076
  size: "sm",
3065
3077
  tone: "muted"
3066
3078
  }, {
@@ -3074,12 +3086,12 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
3074
3086
  }),
3075
3087
  S("div", {
3076
3088
  class: "wx-user-menu__theme",
3077
- onClick: n[1] || (n[1] = Oe(() => {
3089
+ onClick: x[1] || (x[1] = Oe(() => {
3078
3090
  }, ["stop"]))
3079
3091
  }, [
3080
3092
  a(e(ft), {
3081
- modelValue: _.value,
3082
- "onUpdate:modelValue": n[0] || (n[0] = (L) => _.value = L),
3093
+ modelValue: w.value,
3094
+ "onUpdate:modelValue": x[0] || (x[0] = ($) => w.value = $),
3083
3095
  size: "sm",
3084
3096
  block: "",
3085
3097
  "aria-label": e(o)("theme.label"),
@@ -3088,61 +3100,61 @@ const ua = { class: "wx-profile-host" }, ra = { class: "wx-profile" }, ca = {
3088
3100
  "system-label": e(o)("theme.system")
3089
3101
  }, null, 8, ["modelValue", "aria-label", "light-label", "dark-label", "system-label"])
3090
3102
  ]),
3091
- k.value !== null ? (m(), H(ue, { key: 0 }, [
3092
- a(z, { spacing: "sm" }),
3093
- a(U, {
3094
- icon: k.value ? "check" : void 0,
3095
- onClick: B
3103
+ F.value !== null ? (m(), H(ue, { key: 1 }, [
3104
+ a(f, { spacing: "sm" }),
3105
+ a(z, {
3106
+ icon: F.value ? "check" : void 0,
3107
+ onClick: C
3096
3108
  }, {
3097
3109
  default: t(() => [
3098
- c(i(e(V)("menu.site-bar")), 1)
3110
+ c(i(e(A)("menu.site-bar")), 1)
3099
3111
  ]),
3100
3112
  _: 1
3101
3113
  }, 8, ["icon"])
3102
- ], 64)) : I("", !0),
3103
- F.value.length > 0 ? (m(), H(ue, { key: 1 }, [
3104
- a(z, { spacing: "sm" }),
3105
- a(U, { disabled: "" }, {
3114
+ ], 64)) : E("", !0),
3115
+ d.value.length > 0 ? (m(), H(ue, { key: 2 }, [
3116
+ a(f, { spacing: "sm" }),
3117
+ a(z, { disabled: "" }, {
3106
3118
  default: t(() => [
3107
- a(Y, {
3119
+ a(O, {
3108
3120
  size: "sm",
3109
3121
  tone: "muted"
3110
3122
  }, {
3111
3123
  default: t(() => [
3112
- c(i(e(V)("menu.language")), 1)
3124
+ c(i(e(A)("menu.language")), 1)
3113
3125
  ]),
3114
3126
  _: 1
3115
3127
  })
3116
3128
  ]),
3117
3129
  _: 1
3118
3130
  }),
3119
- (m(!0), H(ue, null, Ce(F.value, (L) => (m(), b(U, {
3120
- key: L.code,
3121
- icon: L.code === e(v).state.locale ? "check" : void 0,
3122
- onClick: (W) => C(L.code)
3131
+ (m(!0), H(ue, null, Ce(d.value, ($) => (m(), _(z, {
3132
+ key: $.code,
3133
+ icon: $.code === e(v).state.locale ? "check" : void 0,
3134
+ onClick: (Z) => D($.code)
3123
3135
  }, {
3124
3136
  default: t(() => [
3125
- c(i(L.nativeName), 1)
3137
+ c(i($.nativeName), 1)
3126
3138
  ]),
3127
3139
  _: 2
3128
3140
  }, 1032, ["icon", "onClick"]))), 128)),
3129
- a(z, { spacing: "sm" })
3130
- ], 64)) : I("", !0),
3131
- a(U, {
3141
+ a(f, { spacing: "sm" })
3142
+ ], 64)) : E("", !0),
3143
+ a(z, {
3132
3144
  icon: "logout",
3133
- onClick: n[2] || (n[2] = (L) => e(u).logout())
3145
+ onClick: x[2] || (x[2] = ($) => e(u).logout())
3134
3146
  }, {
3135
3147
  default: t(() => [
3136
- c(i(s.signOutLabel ?? e(V)("menu.sign-out")), 1)
3148
+ c(i(s.signOutLabel ?? e(A)("menu.sign-out")), 1)
3137
3149
  ]),
3138
3150
  _: 1
3139
3151
  })
3140
3152
  ]),
3141
3153
  _: 1
3142
- })) : I("", !0);
3154
+ })) : E("", !0);
3143
3155
  };
3144
3156
  }
3145
- }), za = /* @__PURE__ */ ve(_a, [["__scopeId", "data-v-22dfea95"]]);
3157
+ }), za = /* @__PURE__ */ ve(_a, [["__scopeId", "data-v-31b12be6"]]);
3146
3158
  function Wa(s = {}) {
3147
3159
  const r = s.path ?? "/login";
3148
3160
  return {
@@ -3167,12 +3179,12 @@ function Wa(s = {}) {
3167
3179
  return;
3168
3180
  }
3169
3181
  if (v === "ready" && y.path === r) {
3170
- const V = y.query.next;
3171
- if (typeof V == "string" && ba(V)) {
3172
- location.assign(V);
3182
+ const A = y.query.next;
3183
+ if (typeof A == "string" && ba(A)) {
3184
+ location.assign(A);
3173
3185
  return;
3174
3186
  }
3175
- l.router.replace(typeof V == "string" ? V : "/");
3187
+ l.router.replace(typeof A == "string" ? A : "/");
3176
3188
  }
3177
3189
  }
3178
3190
  );