@webx-ui/module-admin 0.11.0 → 0.12.1

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,64 +1,64 @@
1
- import { inject as ee, reactive as se, defineComponent as U, computed as x, openBlock as v, createBlock as y, unref as r, withModifiers as pe, withCtx as b, createElementBlock as k, Fragment as B, renderList as N, createCommentVNode as W, createVNode as _, createTextVNode as z, toDisplayString as C, useSlots as Ce, useTemplateRef as Le, normalizeClass as j, renderSlot as L, createElementVNode as M, createSlots as be, useModel as ge, mergeModels as ie, mergeProps as ze, watch as te, resolveComponent as R, ref as E, watchEffect as We, onUnmounted as Ae, isRef as Re, createApp as Ee, h as X, nextTick as Ue, withKeys as Be } from "vue";
2
- import { RouterLink as Ie, useRouter as we, useRoute as Me, createRouter as De, createWebHistory as Ne } from "vue-router";
3
- import { WxAction as Y, WxActions as Pe, WxDropdownItem as Ve, useElementWidth as Fe, WxHeading as He, WxText as q, WxButton as O, WxIcon as Oe, WxTabs as je, WxCard as me, WxRichText as qe, WxResult as Ye, useResponsiveShell as Ke, shellLayoutFor as Xe, WxToaster as Ge, WebxUI as Je, dateLocaleKey as Qe, localesKey as Ze, WxAlert as et, WxSkeleton as ye, WxBadge as tt, WxPopover as nt, WxInput as at, WxDialog as lt, WxTooltip as ot, WxEmpty as st, WxAvatar as it, WxTextarea as fe, toast as F, confirm as rt } from "@webx-ui/core";
4
- import { WxScreenRenderer as ut } from "@webx-ui/schema";
1
+ import { inject as te, reactive as oe, defineComponent as R, computed as x, openBlock as h, createBlock as w, unref as i, withModifiers as pe, withCtx as g, createElementBlock as k, Fragment as I, renderList as P, createCommentVNode as z, createVNode as _, createTextVNode as W, toDisplayString as C, useSlots as Le, useTemplateRef as ze, normalizeClass as H, renderSlot as L, createElementVNode as M, createSlots as ge, useModel as be, mergeModels as ie, mergeProps as We, watch as Y, resolveComponent as U, ref as A, watchEffect as Ae, onUnmounted as Re, isRef as Ee, createApp as Ue, h as G, onBeforeUnmount as Be, nextTick as Ie, withKeys as Me } from "vue";
2
+ import { RouterLink as De, useRouter as we, useRoute as Ne, createRouter as Pe, createWebHistory as Ve } from "vue-router";
3
+ import { WxAction as K, WxActions as Fe, WxDropdownItem as He, useElementWidth as Oe, WxHeading as je, WxText as q, WxButton as j, WxIcon as ye, WxTabs as qe, WxCard as me, WxRichText as Ye, WxResult as Ke, useResponsiveShell as Xe, shellLayoutFor as Ge, WxToaster as Je, WebxUI as Qe, dateLocaleKey as Ze, localesKey as et, WxAlert as tt, WxSkeleton as xe, WxBadge as nt, WxPopover as at, WxInput as lt, WxDialog as st, WxTooltip as ot, WxEmpty as it, WxAvatar as rt, WxTextarea as fe, toast as F, confirm as ut } from "@webx-ui/core";
4
+ import { WxScreenRenderer as dt } from "@webx-ui/schema";
5
5
  const ne = /* @__PURE__ */ Symbol("webx-i18n");
6
- function Tn() {
7
- const e = ee(ne, null);
6
+ function Ln() {
7
+ const e = te(ne, null);
8
8
  if (e === null)
9
9
  throw new Error("useI18n() was called outside a panel created by createAdmin().");
10
10
  return e;
11
11
  }
12
- function I(e) {
13
- const n = ee(ne, null);
12
+ function B(e) {
13
+ const n = te(ne, null);
14
14
  return n === null ? de().scope(e) : n.scope(e);
15
15
  }
16
- function dt(e, n) {
16
+ function ct(e, n) {
17
17
  e.provide(ne, n);
18
18
  }
19
19
  function de(e = {}) {
20
- const n = e.fallback ?? "en", t = se({
20
+ const n = e.fallback ?? "en", t = oe({
21
21
  locale: e.locale ?? n,
22
22
  fallback: n,
23
23
  panelLocales: [],
24
24
  contentLocales: []
25
- }), a = {}, u = se({ value: {} });
26
- function o(s, i, m) {
27
- let h = s[i]?.[m[0] ?? ""];
25
+ }), a = {}, u = oe({ value: {} });
26
+ function s(o, r, m) {
27
+ let v = o[r]?.[m[0] ?? ""];
28
28
  for (const f of m.slice(1)) {
29
- if (typeof h != "object" || h === null)
29
+ if (typeof v != "object" || v === null)
30
30
  return null;
31
- h = h[f];
31
+ v = v[f];
32
32
  }
33
- return typeof h == "string" ? h : null;
33
+ return typeof v == "string" ? v : null;
34
34
  }
35
- function l(s, i, m) {
36
- const [h, f] = i.includes("::") ? i.split("::", 2) : [s, i], d = f.split("."), p = o(u.value, h, d) ?? o(a, h, d) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
35
+ function l(o, r, m) {
36
+ const [v, f] = r.includes("::") ? r.split("::", 2) : [o, r], d = f.split("."), p = s(u.value, v, d) ?? s(a, v, d) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
37
37
  // label says nothing to anybody trying to fix it.
38
- i;
39
- return m === void 0 ? p : ct(p, m);
38
+ r;
39
+ return m === void 0 ? p : mt(p, m);
40
40
  }
41
41
  return {
42
42
  state: t,
43
- defaults(s, i) {
44
- a[s] = { ...a[s], ...i };
43
+ defaults(o, r) {
44
+ a[o] = { ...a[o], ...r };
45
45
  },
46
- load(s, i, m) {
47
- u.value = s ?? {}, t.locale = i ?? t.locale, m !== void 0 && (t.fallback = m);
46
+ load(o, r, m) {
47
+ u.value = o ?? {}, t.locale = r ?? t.locale, m !== void 0 && (t.fallback = m);
48
48
  },
49
- scope(s) {
50
- return (i, m) => l(s, i, m);
49
+ scope(o) {
50
+ return (r, m) => l(o, r, m);
51
51
  },
52
- t: (s, i) => l("", s, i)
52
+ t: (o, r) => l("", o, r)
53
53
  };
54
54
  }
55
- function ct(e, n) {
55
+ function mt(e, n) {
56
56
  let t = e;
57
57
  for (const [a, u] of Object.entries(n))
58
58
  t = t.replaceAll(`:${a}`, String(u));
59
59
  return t;
60
60
  }
61
- const mt = /* @__PURE__ */ U({
61
+ const ft = /* @__PURE__ */ R({
62
62
  __name: "BackButton",
63
63
  props: {
64
64
  to: {},
@@ -66,21 +66,21 @@ const mt = /* @__PURE__ */ U({
66
66
  size: { default: "sm" }
67
67
  },
68
68
  setup(e) {
69
- const n = e, t = I("webx-admin"), a = x(() => n.label ?? t("editor.back"));
70
- return (u, o) => (v(), y(r(Y), {
69
+ const n = e, t = B("webx-admin"), a = x(() => n.label ?? t("editor.back"));
70
+ return (u, s) => (h(), w(i(K), {
71
71
  icon: "arrow-left",
72
72
  class: "wx-back-button",
73
- as: r(Ie),
73
+ as: i(De),
74
74
  to: e.to,
75
75
  title: a.value,
76
76
  size: e.size,
77
77
  "tooltip-side": "bottom"
78
78
  }, null, 8, ["as", "to", "title", "size"]));
79
79
  }
80
- }), ft = {
80
+ }), vt = {
81
81
  key: 0,
82
82
  class: "wx-dropdown__divider"
83
- }, ht = /* @__PURE__ */ U({
83
+ }, ht = /* @__PURE__ */ R({
84
84
  __name: "RowMenu",
85
85
  props: {
86
86
  actions: {},
@@ -88,14 +88,14 @@ const mt = /* @__PURE__ */ U({
88
88
  size: { default: "sm" }
89
89
  },
90
90
  setup(e) {
91
- const n = I("webx-admin"), t = e, a = x(() => [
92
- ...t.actions.filter((o) => !o.danger),
93
- ...t.actions.filter((o) => o.danger)
91
+ const n = B("webx-admin"), t = e, a = x(() => [
92
+ ...t.actions.filter((s) => !s.danger),
93
+ ...t.actions.filter((s) => s.danger)
94
94
  ]), u = x(() => {
95
- const o = a.value.find((l) => l.danger);
96
- return o && a.value[0] !== o ? o.key : null;
95
+ const s = a.value.find((l) => l.danger);
96
+ return s && a.value[0] !== s ? s.key : null;
97
97
  });
98
- return (o, l) => a.value.length > 0 ? (v(), y(r(Pe), {
98
+ return (s, l) => a.value.length > 0 ? (h(), w(i(Fe), {
99
99
  key: 0,
100
100
  class: "wx-row-menu",
101
101
  collapse: "always",
@@ -105,48 +105,48 @@ const mt = /* @__PURE__ */ U({
105
105
  onClick: l[0] || (l[0] = pe(() => {
106
106
  }, ["stop"]))
107
107
  }, {
108
- trigger: b(() => [
109
- _(r(Y), {
108
+ trigger: g(() => [
109
+ _(i(K), {
110
110
  type: "more",
111
111
  size: e.size,
112
- title: r(n)("editor.more")
112
+ title: i(n)("editor.more")
113
113
  }, null, 8, ["size", "title"])
114
114
  ]),
115
- collapsed: b(() => [
116
- (v(!0), k(B, null, N(a.value, (s) => (v(), k(B, {
117
- key: s.key
115
+ collapsed: g(() => [
116
+ (h(!0), k(I, null, P(a.value, (o) => (h(), k(I, {
117
+ key: o.key
118
118
  }, [
119
- s.key === u.value ? (v(), k("hr", ft)) : W("", !0),
120
- _(r(Ve), {
121
- icon: s.icon,
122
- tone: s.danger ? "danger" : "default",
123
- href: s.href,
124
- target: s.href ? s.target ?? "_blank" : void 0,
125
- disabled: s.disabled,
126
- onClick: (i) => s.run?.()
119
+ o.key === u.value ? (h(), k("hr", vt)) : z("", !0),
120
+ _(i(He), {
121
+ icon: o.icon,
122
+ tone: o.danger ? "danger" : "default",
123
+ href: o.href,
124
+ target: o.href ? o.target ?? "_blank" : void 0,
125
+ disabled: o.disabled,
126
+ onClick: (r) => o.run?.()
127
127
  }, {
128
- default: b(() => [
129
- z(C(s.label), 1)
128
+ default: g(() => [
129
+ W(C(o.label), 1)
130
130
  ]),
131
131
  _: 2
132
132
  }, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
133
133
  ], 64))), 128))
134
134
  ]),
135
135
  _: 1
136
- }, 8, ["size", "aria-label"])) : W("", !0);
136
+ }, 8, ["size", "aria-label"])) : z("", !0);
137
137
  }
138
- }), P = (e, n) => {
138
+ }), N = (e, n) => {
139
139
  const t = e.__vccOpts || e;
140
140
  for (const [a, u] of n)
141
141
  t[a] = u;
142
142
  return t;
143
- }, xe = /* @__PURE__ */ P(ht, [["__scopeId", "data-v-cab01f7f"]]), vt = ["data-level"], pt = {
143
+ }, ke = /* @__PURE__ */ N(ht, [["__scopeId", "data-v-cab01f7f"]]), pt = ["data-level"], gt = {
144
144
  key: 0,
145
145
  class: "wx-screen-head__trail"
146
- }, bt = { class: "wx-screen-head__name" }, gt = {
146
+ }, bt = { class: "wx-screen-head__name" }, wt = {
147
147
  key: 4,
148
148
  class: "wx-screen-head__actions"
149
- }, wt = /* @__PURE__ */ U({
149
+ }, yt = /* @__PURE__ */ R({
150
150
  __name: "ScreenHead",
151
151
  props: {
152
152
  title: { default: void 0 },
@@ -160,75 +160,75 @@ const mt = /* @__PURE__ */ U({
160
160
  },
161
161
  emits: ["back"],
162
162
  setup(e, { emit: n }) {
163
- const t = e, a = n, u = I("webx-admin"), o = Ce(), l = Le("root"), s = Fe(l), i = x(() => s.value > 0 && s.value < t.collapseBelow), m = x(() => t.actions ?? []), h = x(
163
+ const t = e, a = n, u = B("webx-admin"), s = Le(), l = ze("root"), o = Oe(l), r = x(() => o.value > 0 && o.value < t.collapseBelow), m = x(() => t.actions ?? []), v = x(
164
164
  () => m.value.find((c) => c.primary) ?? null
165
- ), f = x(() => i.value ? h.value ? [h.value] : [] : m.value.filter((c) => !c.menu && !c.danger)), d = x(() => i.value ? m.value.filter((c) => c !== h.value) : m.value.filter((c) => c.menu || c.danger)), p = x(
165
+ ), f = x(() => r.value ? v.value ? [v.value] : [] : m.value.filter((c) => !c.menu && !c.danger)), d = x(() => r.value ? m.value.filter((c) => c !== v.value) : m.value.filter((c) => c.menu || c.danger)), p = x(
166
166
  () => t.back && t.back !== !0 ? t.back : null
167
- ), g = x(
168
- () => f.value.length > 0 || d.value.length > 0 || !!o.extra
167
+ ), b = x(
168
+ () => f.value.length > 0 || d.value.length > 0 || !!s.extra
169
169
  );
170
- return (c, w) => (v(), k("div", {
170
+ return (c, y) => (h(), k("div", {
171
171
  ref_key: "root",
172
172
  ref: l,
173
- class: j(["wx-screen-head", {
174
- "is-narrow": i.value,
173
+ class: H(["wx-screen-head", {
174
+ "is-narrow": r.value,
175
175
  "has-button": f.value.length > 0,
176
176
  "has-trail": !!c.$slots.trail,
177
177
  "has-divider": e.divider
178
178
  }]),
179
179
  "data-level": e.level
180
180
  }, [
181
- c.$slots.trail ? (v(), k("div", pt, [
181
+ c.$slots.trail ? (h(), k("div", gt, [
182
182
  L(c.$slots, "trail", {}, void 0, !0)
183
- ])) : W("", !0),
184
- p.value ? (v(), y(mt, {
183
+ ])) : z("", !0),
184
+ p.value ? (h(), w(ft, {
185
185
  key: 1,
186
186
  class: "wx-screen-head__back",
187
187
  to: p.value,
188
188
  label: e.backLabel,
189
189
  "tooltip-side": "bottom"
190
- }, null, 8, ["to", "label"])) : e.back ? (v(), y(r(Y), {
190
+ }, null, 8, ["to", "label"])) : e.back ? (h(), w(i(K), {
191
191
  key: 2,
192
192
  class: "wx-screen-head__back",
193
193
  icon: "arrow-left",
194
194
  size: "sm",
195
195
  "tooltip-side": "bottom",
196
- title: e.backLabel ?? r(u)("editor.back"),
197
- onClick: w[0] || (w[0] = ($) => a("back"))
198
- }, null, 8, ["title"])) : W("", !0),
196
+ title: e.backLabel ?? i(u)("editor.back"),
197
+ onClick: y[0] || (y[0] = ($) => a("back"))
198
+ }, null, 8, ["title"])) : z("", !0),
199
199
  M("div", bt, [
200
- e.title ? (v(), y(r(He), {
200
+ e.title ? (h(), w(i(je), {
201
201
  key: 0,
202
202
  level: e.level,
203
203
  truncate: "",
204
204
  class: "wx-screen-head__title"
205
205
  }, {
206
- default: b(() => [
207
- z(C(e.title), 1)
206
+ default: g(() => [
207
+ W(C(e.title), 1)
208
208
  ]),
209
209
  _: 1
210
- }, 8, ["level"])) : W("", !0),
210
+ }, 8, ["level"])) : z("", !0),
211
211
  L(c.$slots, "title-after", {}, void 0, !0)
212
212
  ]),
213
- e.subtitle || c.$slots.subtitle ? (v(), y(r(q), {
213
+ e.subtitle || c.$slots.subtitle ? (h(), w(i(q), {
214
214
  key: 3,
215
215
  class: "wx-screen-head__subtitle",
216
216
  size: "sm",
217
217
  tone: "muted",
218
218
  truncate: ""
219
219
  }, {
220
- default: b(() => [
220
+ default: g(() => [
221
221
  L(c.$slots, "subtitle", {}, () => [
222
- z(C(e.subtitle), 1)
222
+ W(C(e.subtitle), 1)
223
223
  ], !0)
224
224
  ]),
225
225
  _: 3
226
- })) : W("", !0),
227
- g.value ? (v(), k("div", gt, [
226
+ })) : z("", !0),
227
+ b.value ? (h(), k("div", wt, [
228
228
  L(c.$slots, "extra", {}, void 0, !0),
229
- (v(!0), k(B, null, N(f.value, ($) => (v(), y(r(O), {
229
+ (h(!0), k(I, null, P(f.value, ($) => (h(), w(i(j), {
230
230
  key: $.key,
231
- class: j(["wx-screen-head__button", { "is-primary": $.primary }]),
231
+ class: H(["wx-screen-head__button", { "is-primary": $.primary }]),
232
232
  type: $.primary ? "primary" : "default",
233
233
  variant: $.primary ? "solid" : $.variant ?? "outline",
234
234
  loading: $.loading,
@@ -236,33 +236,33 @@ const mt = /* @__PURE__ */ U({
236
236
  href: $.href,
237
237
  target: $.href ? $.target ?? "_blank" : void 0,
238
238
  rel: $.href ? "noopener" : void 0,
239
- onClick: (K) => $.run?.()
240
- }, be({
241
- default: b(() => [
242
- z(" " + C($.label), 1)
239
+ onClick: (X) => $.run?.()
240
+ }, ge({
241
+ default: g(() => [
242
+ W(" " + C($.label), 1)
243
243
  ]),
244
244
  _: 2
245
245
  }, [
246
246
  $.icon ? {
247
247
  name: "icon",
248
- fn: b(() => [
249
- _(r(Oe), {
248
+ fn: g(() => [
249
+ _(i(ye), {
250
250
  name: $.icon
251
251
  }, null, 8, ["name"])
252
252
  ]),
253
253
  key: "0"
254
254
  } : void 0
255
255
  ]), 1032, ["class", "type", "variant", "loading", "disabled", "href", "target", "rel", "onClick"]))), 128)),
256
- d.value.length > 0 ? (v(), y(xe, {
256
+ d.value.length > 0 ? (h(), w(ke, {
257
257
  key: 0,
258
258
  actions: d.value,
259
259
  size: "lg",
260
- label: e.title ?? r(u)("editor.more")
261
- }, null, 8, ["actions", "label"])) : W("", !0)
262
- ])) : W("", !0)
263
- ], 10, vt));
260
+ label: e.title ?? i(u)("editor.more")
261
+ }, null, 8, ["actions", "label"])) : z("", !0)
262
+ ])) : z("", !0)
263
+ ], 10, pt));
264
264
  }
265
- }), yt = /* @__PURE__ */ P(wt, [["__scopeId", "data-v-e27d184e"]]), xt = ["data-wx-fill"], kt = /* @__PURE__ */ U({
265
+ }), xt = /* @__PURE__ */ N(yt, [["__scopeId", "data-v-e27d184e"]]), kt = ["data-wx-fill"], _t = /* @__PURE__ */ R({
266
266
  __name: "ListScreen",
267
267
  props: /* @__PURE__ */ ie({
268
268
  title: { default: void 0 },
@@ -281,12 +281,12 @@ const mt = /* @__PURE__ */ U({
281
281
  }),
282
282
  emits: ["update:view"],
283
283
  setup(e) {
284
- const n = ge(e, "view");
285
- return (t, a) => (v(), k("div", {
286
- class: j(["wx-list-screen", { "is-fill": e.fill }]),
284
+ const n = be(e, "view");
285
+ return (t, a) => (h(), k("div", {
286
+ class: H(["wx-list-screen", { "is-fill": e.fill }]),
287
287
  "data-wx-fill": e.fill ? "" : void 0
288
288
  }, [
289
- e.title || e.actions || t.$slots.actions ? (v(), y(yt, {
289
+ e.title || e.actions || t.$slots.actions ? (h(), w(xt, {
290
290
  key: 0,
291
291
  class: "wx-list-screen__head",
292
292
  title: e.title,
@@ -295,16 +295,16 @@ const mt = /* @__PURE__ */ U({
295
295
  "back-label": e.backLabel,
296
296
  actions: e.actions,
297
297
  "collapse-below": 480
298
- }, be({ _: 2 }, [
298
+ }, ge({ _: 2 }, [
299
299
  t.$slots.actions ? {
300
300
  name: "extra",
301
- fn: b(() => [
301
+ fn: g(() => [
302
302
  L(t.$slots, "actions", {}, void 0, !0)
303
303
  ]),
304
304
  key: "0"
305
305
  } : void 0
306
- ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : W("", !0),
307
- e.views && e.views.length > 0 ? (v(), y(r(je), {
306
+ ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : z("", !0),
307
+ e.views && e.views.length > 0 ? (h(), w(i(qe), {
308
308
  key: 1,
309
309
  modelValue: n.value,
310
310
  "onUpdate:modelValue": a[0] || (a[0] = (u) => n.value = u),
@@ -313,39 +313,39 @@ const mt = /* @__PURE__ */ U({
313
313
  "collapse-below": e.collapseBelow,
314
314
  "aria-label": e.title
315
315
  }, {
316
- default: b(() => [
317
- e.card ? (v(), y(r(me), {
316
+ default: g(() => [
317
+ e.card ? (h(), w(i(me), {
318
318
  key: 0,
319
319
  class: "wx-list-screen__card",
320
320
  padding: e.padding
321
321
  }, {
322
- default: b(() => [
322
+ default: g(() => [
323
323
  L(t.$slots, "default", {}, void 0, !0)
324
324
  ]),
325
325
  _: 3
326
326
  }, 8, ["padding"])) : L(t.$slots, "default", {}, void 0, !0, 1)
327
327
  ]),
328
328
  _: 3
329
- }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (v(), k(B, { key: 2 }, [
330
- e.card ? (v(), y(r(me), {
329
+ }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (h(), k(I, { key: 2 }, [
330
+ e.card ? (h(), w(i(me), {
331
331
  key: 0,
332
332
  class: "wx-list-screen__card",
333
333
  padding: e.padding
334
334
  }, {
335
- default: b(() => [
335
+ default: g(() => [
336
336
  L(t.$slots, "default", {}, void 0, !0)
337
337
  ]),
338
338
  _: 3
339
339
  }, 8, ["padding"])) : L(t.$slots, "default", {}, void 0, !0, 1)
340
340
  ], 64))
341
- ], 10, xt));
341
+ ], 10, kt));
342
342
  }
343
- }), _t = /* @__PURE__ */ P(kt, [["__scopeId", "data-v-8c7e5ad1"]]), $t = /* @__PURE__ */ U({
343
+ }), $t = /* @__PURE__ */ N(_t, [["__scopeId", "data-v-8c7e5ad1"]]), St = /* @__PURE__ */ R({
344
344
  name: "WxRichTextField",
345
345
  inheritAttrs: !1,
346
346
  __name: "RichTextField",
347
347
  setup(e) {
348
- const n = H(), t = I("webx-admin"), a = x(() => n.pickImage ?? void 0), u = x(() => ({
348
+ const n = O(), t = B("webx-admin"), a = x(() => n.pickImage ?? void 0), u = x(() => ({
349
349
  bold: t("rich-text.bold"),
350
350
  italic: t("rich-text.italic"),
351
351
  strike: t("rich-text.strike"),
@@ -378,25 +378,25 @@ const mt = /* @__PURE__ */ U({
378
378
  cancel: t("rich-text.cancel"),
379
379
  uploading: t("rich-text.uploading")
380
380
  }));
381
- return (o, l) => (v(), y(r(qe), ze(o.$attrs, {
381
+ return (s, l) => (h(), w(i(Ye), We(s.$attrs, {
382
382
  labels: u.value,
383
383
  "pick-image": a.value
384
384
  }), null, 16, ["labels", "pick-image"]));
385
385
  }
386
386
  }), Tt = {
387
- "wx-list": { component: _t, kind: "layout", labelProp: "title" },
387
+ "wx-list": { component: $t, kind: "layout", labelProp: "title" },
388
388
  // Full width: an editor shares a row with nothing, and a form of two columns would give it
389
389
  // half a line to write a page of text in.
390
- "wx-rich-text": { component: $t, kind: "field", wide: !0 }
391
- }, ke = /* @__PURE__ */ Symbol("webx-admin");
392
- function H() {
393
- const e = ee(ke, null);
390
+ "wx-rich-text": { component: St, kind: "field", wide: !0 }
391
+ }, _e = /* @__PURE__ */ Symbol("webx-admin");
392
+ function O() {
393
+ const e = te(_e, null);
394
394
  if (e === null)
395
395
  throw new Error("useAdmin() was called outside a panel created by createAdmin().");
396
396
  return e;
397
397
  }
398
- function St(e) {
399
- const n = se({
398
+ function Ct(e) {
399
+ const n = oe({
400
400
  status: "loading",
401
401
  manifest: null,
402
402
  user: null,
@@ -406,68 +406,68 @@ function St(e) {
406
406
  if (d === null)
407
407
  return [];
408
408
  const p = [];
409
- for (const g of d.modules) {
410
- const c = e.modules.find(($) => $.id === g.id);
409
+ for (const b of d.modules) {
410
+ const c = e.modules.find(($) => $.id === b.id);
411
411
  if (c === void 0)
412
412
  continue;
413
- const w = c.path ?? c.routes?.[0]?.path;
414
- w !== void 0 && p.push({
415
- id: g.id,
416
- title: g.title,
417
- icon: g.icon,
418
- path: w,
419
- group: g.group ?? null
413
+ const y = c.path ?? c.routes?.[0]?.path;
414
+ y !== void 0 && p.push({
415
+ id: b.id,
416
+ title: b.title,
417
+ icon: b.icon,
418
+ path: y,
419
+ group: b.group ?? null
420
420
  });
421
421
  }
422
422
  return p;
423
423
  }), a = x(() => {
424
- const d = n.manifest?.groups ?? [], p = [], g = /* @__PURE__ */ new Map();
424
+ const d = n.manifest?.groups ?? [], p = [], b = /* @__PURE__ */ new Map();
425
425
  for (const c of t.value)
426
- if (c.group !== null && d.some((w) => w.id === c.group)) {
427
- const w = g.get(c.group) ?? [];
428
- w.push(c), g.set(c.group, w);
426
+ if (c.group !== null && d.some((y) => y.id === c.group)) {
427
+ const y = b.get(c.group) ?? [];
428
+ y.push(c), b.set(c.group, y);
429
429
  } else
430
430
  p.push(c);
431
431
  return {
432
432
  top: p,
433
- groups: d.filter((c) => g.has(c.id)).map((c) => ({
433
+ groups: d.filter((c) => b.has(c.id)).map((c) => ({
434
434
  id: c.id,
435
435
  title: c.title,
436
436
  icon: c.icon ?? null,
437
- entries: g.get(c.id) ?? []
437
+ entries: b.get(c.id) ?? []
438
438
  }))
439
439
  };
440
440
  }), u = { ...Tt };
441
441
  for (const d of e.modules)
442
442
  Object.assign(u, d.types);
443
443
  Object.assign(u, e.types);
444
- const o = e.modules.find((d) => d.pickImage !== void 0)?.pickImage, l = /* @__PURE__ */ new Map();
445
- async function s(d) {
444
+ const s = e.modules.find((d) => d.pickImage !== void 0)?.pickImage, l = /* @__PURE__ */ new Map();
445
+ async function o(d) {
446
446
  const p = `${e.i18n.state.locale}:${d}`;
447
- let g = l.get(p);
448
- return g === void 0 && (g = e.http.get(`${e.apiPath}/screens/${d}`).then((c) => c.data.root).catch((c) => {
447
+ let b = l.get(p);
448
+ return b === void 0 && (b = e.http.get(`${e.apiPath}/screens/${d}`).then((c) => c.data.root).catch((c) => {
449
449
  throw l.delete(p), c;
450
- }), l.set(p, g)), g;
450
+ }), l.set(p, b)), b;
451
451
  }
452
- let i = null;
452
+ let r = null;
453
453
  async function m() {
454
454
  n.status = "loading", n.error = null;
455
455
  try {
456
- if (i !== null && (n.user = await i(), n.user === null)) {
456
+ if (r !== null && (n.user = await r(), n.user === null)) {
457
457
  n.manifest = null, n.status = "unauthenticated";
458
458
  return;
459
459
  }
460
460
  const d = await e.loadManifest();
461
461
  n.manifest = d, e.i18n.state.contentLocales = d.locales ?? [], e.i18n.state.panelLocales = d.panelLocales ?? e.i18n.state.panelLocales, d.locale !== void 0 && d.locale !== e.i18n.state.locale && await f(d.locale), n.status = "ready";
462
462
  } catch (d) {
463
- if (Lt(d)) {
463
+ if (zt(d)) {
464
464
  n.manifest = null, n.user = null, n.status = "unauthenticated";
465
465
  return;
466
466
  }
467
467
  n.error = d instanceof Error ? d.message : String(d), n.status = "error";
468
468
  }
469
469
  }
470
- async function h() {
470
+ async function v() {
471
471
  if (n.manifest !== null)
472
472
  try {
473
473
  n.manifest = await e.loadManifest();
@@ -479,7 +479,7 @@ function St(e) {
479
479
  e.i18n.state.locale = d;
480
480
  return;
481
481
  }
482
- await e.loadDictionary(d), await h();
482
+ await e.loadDictionary(d), await v();
483
483
  }
484
484
  return {
485
485
  http: e.http,
@@ -491,97 +491,97 @@ function St(e) {
491
491
  nav: t,
492
492
  groups: a,
493
493
  types: u,
494
- pickImage: o ?? null,
494
+ pickImage: s ?? null,
495
495
  reload: m,
496
- refreshManifest: h,
496
+ refreshManifest: v,
497
497
  setLocale: f,
498
498
  setUser(d) {
499
499
  n.user = d;
500
500
  },
501
501
  useSessionLoader(d) {
502
- i = d;
502
+ r = d;
503
503
  },
504
504
  can(d) {
505
505
  const p = n.user;
506
506
  return p === null ? !1 : p.isSuper || p.permissions.includes(d);
507
507
  },
508
- loadScreen: s,
508
+ loadScreen: o,
509
509
  screenPatch(d) {
510
510
  return e.screens?.[d] ?? [];
511
511
  }
512
512
  };
513
513
  }
514
- function Ct(e, n) {
515
- e.provide(ke, n);
514
+ function Lt(e, n) {
515
+ e.provide(_e, n);
516
516
  }
517
- function Lt(e) {
517
+ function zt(e) {
518
518
  return typeof e == "object" && e !== null && "status" in e && e.status === 401;
519
519
  }
520
- const zt = /* @__PURE__ */ U({
520
+ const Wt = /* @__PURE__ */ R({
521
521
  __name: "AdminLanding",
522
522
  props: {
523
523
  landing: { default: null }
524
524
  },
525
525
  setup(e) {
526
- const n = e, t = H(), a = we(), u = I("webx-admin"), o = x(() => {
526
+ const n = e, t = O(), a = we(), u = B("webx-admin"), s = x(() => {
527
527
  const l = t.nav.value;
528
- return l.length === 0 ? null : ((n.landing === null ? void 0 : l.find((i) => i.path === n.landing)) ?? l[0])?.path ?? null;
528
+ return l.length === 0 ? null : ((n.landing === null ? void 0 : l.find((r) => r.path === n.landing)) ?? l[0])?.path ?? null;
529
529
  });
530
- return te(
531
- o,
530
+ return Y(
531
+ s,
532
532
  (l) => {
533
533
  l !== null && a.replace(l);
534
534
  },
535
535
  { immediate: !0 }
536
- ), (l, s) => o.value === null && r(t).state.status === "ready" ? (v(), y(r(Ye), {
536
+ ), (l, o) => s.value === null && i(t).state.status === "ready" ? (h(), w(i(Ke), {
537
537
  key: 0,
538
538
  status: "info",
539
- title: r(u)("shell.empty-title"),
540
- description: r(u)("shell.empty-description")
541
- }, null, 8, ["title", "description"])) : W("", !0);
539
+ title: i(u)("shell.empty-title"),
540
+ description: i(u)("shell.empty-description")
541
+ }, null, 8, ["title", "description"])) : z("", !0);
542
542
  }
543
- }), Wt = /* @__PURE__ */ U({
543
+ }), At = /* @__PURE__ */ R({
544
544
  __name: "AdminNav",
545
545
  props: {
546
546
  collapsed: { type: Boolean }
547
547
  },
548
548
  emits: ["select"],
549
549
  setup(e, { emit: n }) {
550
- const t = n, a = H(), u = I("webx-admin"), o = we(), l = Me(), s = x({
550
+ const t = n, a = O(), u = B("webx-admin"), s = we(), l = Ne(), o = x({
551
551
  get: () => a.nav.value.find((m) => l.path.startsWith(m.path))?.id ?? "",
552
- set: (i) => {
553
- const m = a.nav.value.find((h) => h.id === i);
554
- m !== void 0 && o.push(m.path);
552
+ set: (r) => {
553
+ const m = a.nav.value.find((v) => v.id === r);
554
+ m !== void 0 && s.push(m.path);
555
555
  }
556
556
  });
557
- return (i, m) => {
558
- const h = R("wx-menu-item"), f = R("wx-submenu"), d = R("wx-menu");
559
- return v(), y(d, {
560
- modelValue: s.value,
561
- "onUpdate:modelValue": m[0] || (m[0] = (p) => s.value = p),
557
+ return (r, m) => {
558
+ const v = U("wx-menu-item"), f = U("wx-submenu"), d = U("wx-menu");
559
+ return h(), w(d, {
560
+ modelValue: o.value,
561
+ "onUpdate:modelValue": m[0] || (m[0] = (p) => o.value = p),
562
562
  collapsed: e.collapsed,
563
- label: r(u)("nav.sections"),
563
+ label: i(u)("nav.sections"),
564
564
  onSelect: m[1] || (m[1] = (p) => t("select"))
565
565
  }, {
566
- default: b(() => [
567
- (v(!0), k(B, null, N(r(a).groups.value.top, (p) => (v(), y(h, {
566
+ default: g(() => [
567
+ (h(!0), k(I, null, P(i(a).groups.value.top, (p) => (h(), w(v, {
568
568
  key: p.id,
569
569
  value: p.id,
570
570
  icon: p.icon ?? void 0,
571
571
  label: p.title
572
572
  }, null, 8, ["value", "icon", "label"]))), 128)),
573
- (v(!0), k(B, null, N(r(a).groups.value.groups, (p) => (v(), y(f, {
573
+ (h(!0), k(I, null, P(i(a).groups.value.groups, (p) => (h(), w(f, {
574
574
  key: p.id,
575
575
  value: `group:${p.id}`,
576
576
  title: p.title,
577
577
  icon: p.icon ?? "gear"
578
578
  }, {
579
- default: b(() => [
580
- (v(!0), k(B, null, N(p.entries, (g) => (v(), y(h, {
581
- key: g.id,
582
- value: g.id,
583
- icon: g.icon ?? void 0,
584
- label: g.title
579
+ default: g(() => [
580
+ (h(!0), k(I, null, P(p.entries, (b) => (h(), w(v, {
581
+ key: b.id,
582
+ value: b.id,
583
+ icon: b.icon ?? void 0,
584
+ label: b.title
585
585
  }, null, 8, ["value", "icon", "label"]))), 128))
586
586
  ]),
587
587
  _: 2
@@ -591,68 +591,68 @@ const zt = /* @__PURE__ */ U({
591
591
  }, 8, ["modelValue", "collapsed", "label"]);
592
592
  };
593
593
  }
594
- }), At = {
594
+ }), Rt = {
595
595
  key: 0,
596
596
  class: "wx-root wx-admin-plain"
597
- }, Rt = {
597
+ }, Et = {
598
598
  key: 1,
599
599
  class: "wx-root wx-admin-plain"
600
- }, Et = {
600
+ }, Ut = {
601
601
  key: 2,
602
602
  class: "wx-root wx-admin-plain"
603
- }, Ut = ["src", "alt", "width", "height"], Bt = ["src", "alt", "width", "height"], It = ["src", "alt"], Mt = { class: "wx-admin__user" }, Dt = { class: "wx-admin__user wx-admin__user--drawer" }, Nt = /* @__PURE__ */ U({
603
+ }, Bt = ["src", "alt", "width", "height"], It = ["src", "alt", "width", "height"], Mt = ["src", "alt"], Dt = { class: "wx-admin__user" }, Nt = { class: "wx-admin__user wx-admin__user--drawer" }, Pt = /* @__PURE__ */ R({
604
604
  __name: "AdminShell",
605
605
  setup(e) {
606
- const n = H(), t = I("webx-admin"), a = E(null), { width: u, layout: o, collapsed: l, showAside: s, drawerOpen: i, toggle: m, close: h } = Ke(
606
+ const n = O(), t = B("webx-admin"), a = A(null), { width: u, layout: s, collapsed: l, showAside: o, drawerOpen: r, toggle: m, close: v } = Xe(
607
607
  a,
608
608
  { persist: "webx-admin-shell" }
609
- ), f = x(() => n.state.manifest?.title ?? ""), d = x(() => n.state.manifest?.branding?.logo ?? null), p = x(() => n.state.manifest?.branding?.mark ?? null), g = x(() => Xe(u.value, null));
610
- return We(() => {
611
- typeof document > "u" || (document.documentElement.dataset.wxShell = g.value);
612
- }), Ae(() => {
609
+ ), f = x(() => n.state.manifest?.title ?? ""), d = x(() => n.state.manifest?.branding?.logo ?? null), p = x(() => n.state.manifest?.branding?.mark ?? null), b = x(() => Ge(u.value, null));
610
+ return Ae(() => {
611
+ typeof document > "u" || (document.documentElement.dataset.wxShell = b.value);
612
+ }), Re(() => {
613
613
  typeof document < "u" && delete document.documentElement.dataset.wxShell;
614
- }), (c, w) => {
615
- const $ = R("router-view"), K = R("wx-loading"), ae = R("wx-button"), le = R("wx-result"), V = R("wx-action"), T = R("wx-text"), A = R("wx-header"), S = R("wx-aside"), D = R("wx-main"), Te = R("wx-container"), Se = R("wx-drawer");
616
- return v(), k(B, null, [
617
- _(r(Ge)),
618
- r(n).state.status === "unauthenticated" ? (v(), k("div", At, [
614
+ }), (c, y) => {
615
+ const $ = U("router-view"), X = U("wx-loading"), ae = U("wx-button"), le = U("wx-result"), V = U("wx-action"), S = U("wx-text"), E = U("wx-header"), T = U("wx-aside"), D = U("wx-main"), Te = U("wx-container"), Ce = U("wx-drawer");
616
+ return h(), k(I, null, [
617
+ _(i(Je)),
618
+ i(n).state.status === "unauthenticated" ? (h(), k("div", Rt, [
619
619
  _($)
620
- ])) : r(n).state.status === "loading" ? (v(), k("div", Rt, [
621
- _(K, {
622
- label: r(t)("shell.loading")
620
+ ])) : i(n).state.status === "loading" ? (h(), k("div", Et, [
621
+ _(X, {
622
+ label: i(t)("shell.loading")
623
623
  }, null, 8, ["label"])
624
- ])) : r(n).state.status === "error" ? (v(), k("div", Et, [
624
+ ])) : i(n).state.status === "error" ? (h(), k("div", Ut, [
625
625
  _(le, {
626
626
  status: "error",
627
- title: r(t)("shell.error-title"),
628
- description: r(n).state.error
627
+ title: i(t)("shell.error-title"),
628
+ description: i(n).state.error
629
629
  }, {
630
- default: b(() => [
630
+ default: g(() => [
631
631
  _(ae, {
632
632
  type: "primary",
633
- onClick: w[0] || (w[0] = (ce) => r(n).reload())
633
+ onClick: y[0] || (y[0] = (ce) => i(n).reload())
634
634
  }, {
635
- default: b(() => [
636
- z(C(r(t)("shell.retry")), 1)
635
+ default: g(() => [
636
+ W(C(i(t)("shell.retry")), 1)
637
637
  ]),
638
638
  _: 1
639
639
  })
640
640
  ]),
641
641
  _: 1
642
642
  }, 8, ["title", "description"])
643
- ])) : (v(), k("div", {
643
+ ])) : (h(), k("div", {
644
644
  key: 3,
645
645
  ref_key: "shellEl",
646
646
  ref: a,
647
- class: j(["wx-root wx-admin", `wx-admin--${g.value}`])
647
+ class: H(["wx-root wx-admin", `wx-admin--${b.value}`])
648
648
  }, [
649
649
  _(Te, {
650
- direction: r(o) === "drawer" ? "vertical" : "horizontal",
650
+ direction: i(s) === "drawer" ? "vertical" : "horizontal",
651
651
  "full-height": "",
652
652
  class: "wx-admin__frame"
653
653
  }, {
654
- default: b(() => [
655
- r(o) === "drawer" ? (v(), y(A, {
654
+ default: g(() => [
655
+ i(s) === "drawer" ? (h(), w(E, {
656
656
  key: 0,
657
657
  class: "wx-admin__header",
658
658
  floating: "",
@@ -661,101 +661,101 @@ const zt = /* @__PURE__ */ U({
661
661
  padding: "sm",
662
662
  height: "var(--wx-admin-header-height)"
663
663
  }, {
664
- end: b(() => [
664
+ end: g(() => [
665
665
  L(c.$slots, "user", { expanded: !1 }, void 0, !0)
666
666
  ]),
667
- default: b(() => [
667
+ default: g(() => [
668
668
  _(V, {
669
669
  icon: "menu",
670
- title: r(t)("nav.menu"),
671
- onClick: r(m)
670
+ title: i(t)("nav.menu"),
671
+ onClick: i(m)
672
672
  }, null, 8, ["title", "onClick"]),
673
673
  L(c.$slots, "brand", {}, () => [
674
- d.value ? (v(), k("img", {
674
+ d.value ? (h(), k("img", {
675
675
  key: 0,
676
676
  class: "wx-admin__logo",
677
677
  src: d.value.url,
678
678
  alt: f.value,
679
679
  width: d.value.width ?? void 0,
680
680
  height: d.value.height ?? void 0
681
- }, null, 8, Ut)) : (v(), y(T, {
681
+ }, null, 8, Bt)) : (h(), w(S, {
682
682
  key: 1,
683
683
  weight: "semibold",
684
684
  truncate: ""
685
685
  }, {
686
- default: b(() => [
687
- z(C(f.value), 1)
686
+ default: g(() => [
687
+ W(C(f.value), 1)
688
688
  ]),
689
689
  _: 1
690
690
  }))
691
691
  ], !0)
692
692
  ]),
693
693
  _: 3
694
- })) : W("", !0),
695
- r(s) ? (v(), y(S, {
694
+ })) : z("", !0),
695
+ i(o) ? (h(), w(T, {
696
696
  key: 1,
697
697
  class: "wx-admin__aside",
698
698
  sticky: "",
699
699
  floating: "",
700
700
  scroll: "",
701
701
  bordered: !1,
702
- collapsed: r(l),
702
+ collapsed: i(l),
703
703
  width: 220,
704
704
  "collapsed-width": 56
705
705
  }, {
706
- top: b(() => [
706
+ top: g(() => [
707
707
  M("div", {
708
- class: j(["wx-admin__brand", { "wx-admin__brand--stacked": r(l) && p.value }])
708
+ class: H(["wx-admin__brand", { "wx-admin__brand--stacked": i(l) && p.value }])
709
709
  }, [
710
- r(l) ? p.value ? (v(), k("img", {
710
+ i(l) ? p.value ? (h(), k("img", {
711
711
  key: 1,
712
712
  class: "wx-admin__mark",
713
713
  src: p.value.url,
714
714
  alt: f.value
715
- }, null, 8, It)) : W("", !0) : L(c.$slots, "brand", {}, () => [
716
- d.value ? (v(), k("img", {
715
+ }, null, 8, Mt)) : z("", !0) : L(c.$slots, "brand", {}, () => [
716
+ d.value ? (h(), k("img", {
717
717
  key: 0,
718
718
  class: "wx-admin__logo",
719
719
  src: d.value.url,
720
720
  alt: f.value,
721
721
  width: d.value.width ?? void 0,
722
722
  height: d.value.height ?? void 0
723
- }, null, 8, Bt)) : (v(), y(T, {
723
+ }, null, 8, It)) : (h(), w(S, {
724
724
  key: 1,
725
725
  weight: "semibold",
726
726
  truncate: "",
727
727
  class: "wx-admin__title"
728
728
  }, {
729
- default: b(() => [
730
- z(C(f.value), 1)
729
+ default: g(() => [
730
+ W(C(f.value), 1)
731
731
  ]),
732
732
  _: 1
733
733
  }))
734
734
  ], !0, 0),
735
735
  _(V, {
736
736
  icon: "sidebar",
737
- title: r(l) ? r(t)("nav.expand") : r(t)("nav.collapse"),
738
- onClick: r(m)
737
+ title: i(l) ? i(t)("nav.expand") : i(t)("nav.collapse"),
738
+ onClick: i(m)
739
739
  }, null, 8, ["title", "onClick"])
740
740
  ], 2)
741
741
  ]),
742
- bottom: b(() => [
743
- M("div", Mt, [
742
+ bottom: g(() => [
743
+ M("div", Dt, [
744
744
  L(c.$slots, "user", {
745
- expanded: !r(l)
745
+ expanded: !i(l)
746
746
  }, void 0, !0)
747
747
  ])
748
748
  ]),
749
- default: b(() => [
750
- L(c.$slots, "nav", { collapsed: r(l) }, void 0, !0)
749
+ default: g(() => [
750
+ L(c.$slots, "nav", { collapsed: i(l) }, void 0, !0)
751
751
  ]),
752
752
  _: 3
753
- }, 8, ["collapsed"])) : W("", !0),
753
+ }, 8, ["collapsed"])) : z("", !0),
754
754
  _(D, {
755
755
  padding: "none",
756
756
  class: "wx-admin__screen"
757
757
  }, {
758
- default: b(() => [
758
+ default: g(() => [
759
759
  _($)
760
760
  ]),
761
761
  _: 1
@@ -763,25 +763,25 @@ const zt = /* @__PURE__ */ U({
763
763
  ]),
764
764
  _: 3
765
765
  }, 8, ["direction"]),
766
- _(Se, {
767
- open: r(i),
768
- "onUpdate:open": w[1] || (w[1] = (ce) => Re(i) ? i.value = ce : null),
766
+ _(Ce, {
767
+ open: i(r),
768
+ "onUpdate:open": y[1] || (y[1] = (ce) => Ee(r) ? r.value = ce : null),
769
769
  class: "wx-admin__drawer",
770
- title: f.value === "" ? r(t)("nav.menu") : f.value,
770
+ title: f.value === "" ? i(t)("nav.menu") : f.value,
771
771
  side: "left",
772
772
  size: 260,
773
773
  "full-screen": !1,
774
774
  closable: ""
775
775
  }, {
776
- footer: b(() => [
777
- M("div", Dt, [
776
+ footer: g(() => [
777
+ M("div", Nt, [
778
778
  L(c.$slots, "user", { expanded: !0 }, void 0, !0)
779
779
  ])
780
780
  ]),
781
- default: b(() => [
781
+ default: g(() => [
782
782
  L(c.$slots, "nav", {
783
783
  collapsed: !1,
784
- select: r(h)
784
+ select: i(v)
785
785
  }, void 0, !0)
786
786
  ]),
787
787
  _: 3
@@ -790,10 +790,10 @@ const zt = /* @__PURE__ */ U({
790
790
  ], 64);
791
791
  };
792
792
  }
793
- }), Pt = /* @__PURE__ */ P(Nt, [["__scopeId", "data-v-5baa6cbf"]]);
793
+ }), Vt = /* @__PURE__ */ N(Pt, [["__scopeId", "data-v-309fdb9d"]]);
794
794
  class re extends Error {
795
- constructor(n, t, a = {}, u = null, o = null) {
796
- super(n), this.status = t, this.errors = a, this.retryAfter = u, this.body = o, this.name = "HttpError";
795
+ constructor(n, t, a = {}, u = null, s = null) {
796
+ super(n), this.status = t, this.errors = a, this.retryAfter = u, this.body = s, this.name = "HttpError";
797
797
  }
798
798
  status;
799
799
  errors;
@@ -810,57 +810,57 @@ class re extends Error {
810
810
  return this.status === 429;
811
811
  }
812
812
  }
813
- const Vt = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
814
- function Ft(e = {}) {
815
- const n = (e.baseUrl ?? "").replace(/\/$/, ""), t = e.csrfUrl ?? "/sanctum/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), u = e.onUnauthenticated, o = e.headers;
813
+ const Ft = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
814
+ function Ht(e = {}) {
815
+ const n = (e.baseUrl ?? "").replace(/\/$/, ""), t = e.csrfUrl ?? "/sanctum/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), u = e.onUnauthenticated, s = e.headers;
816
816
  let l = !1;
817
- async function s(m = !1) {
818
- l && !m && he("XSRF-TOKEN") !== null || (await a(t, { credentials: "same-origin" }), l = !0);
817
+ async function o(m = !1) {
818
+ l && !m && ve("XSRF-TOKEN") !== null || (await a(t, { credentials: "same-origin" }), l = !0);
819
819
  }
820
- async function i(m, h, f, d = {}, p = !1) {
821
- const g = Vt.has(m);
822
- g && await s();
820
+ async function r(m, v, f, d = {}, p = !1) {
821
+ const b = Ft.has(m);
822
+ b && await o();
823
823
  const c = {
824
824
  Accept: "application/json",
825
825
  "X-Requested-With": "XMLHttpRequest",
826
826
  // Standing headers first, so a caller can still override one for a single request.
827
- ...o?.(),
827
+ ...s?.(),
828
828
  ...d.headers
829
829
  };
830
- if (g) {
831
- const $ = he("XSRF-TOKEN");
830
+ if (b) {
831
+ const $ = ve("XSRF-TOKEN");
832
832
  $ !== null && (c["X-XSRF-TOKEN"] = $);
833
833
  }
834
834
  f !== void 0 && (c["Content-Type"] = "application/json");
835
- const w = await a(Ot(n, h, d.query), {
835
+ const y = await a(jt(n, v, d.query), {
836
836
  method: m,
837
837
  credentials: "same-origin",
838
838
  headers: c,
839
839
  signal: d.signal,
840
840
  body: f === void 0 ? void 0 : JSON.stringify(f)
841
841
  });
842
- if (w.status === 419 && g && !p)
843
- return await s(!0), i(m, h, f, d, !0);
844
- if (w.status === 401 && u?.(), !w.ok)
845
- throw await Ht(w);
846
- if (w.status !== 204)
847
- return await w.json();
842
+ if (y.status === 419 && b && !p)
843
+ return await o(!0), r(m, v, f, d, !0);
844
+ if (y.status === 401 && u?.(), !y.ok)
845
+ throw await Ot(y);
846
+ if (y.status !== 204)
847
+ return await y.json();
848
848
  }
849
849
  return {
850
- get: (m, h) => i("GET", m, void 0, h),
851
- post: (m, h, f) => i("POST", m, h, f),
852
- put: (m, h, f) => i("PUT", m, h, f),
853
- patch: (m, h, f) => i("PATCH", m, h, f),
854
- delete: (m, h) => i("DELETE", m, void 0, h)
850
+ get: (m, v) => r("GET", m, void 0, v),
851
+ post: (m, v, f) => r("POST", m, v, f),
852
+ put: (m, v, f) => r("PUT", m, v, f),
853
+ patch: (m, v, f) => r("PATCH", m, v, f),
854
+ delete: (m, v) => r("DELETE", m, void 0, v)
855
855
  };
856
856
  }
857
- async function Ht(e) {
857
+ async function Ot(e) {
858
858
  let n = null;
859
859
  try {
860
860
  n = await e.json();
861
861
  } catch {
862
862
  }
863
- const t = n ?? {}, a = typeof t.message == "string" && t.message !== "" ? t.message : e.statusText || `Request failed with ${e.status}`, u = t.errors !== null && typeof t.errors == "object" ? t.errors : {}, o = e.headers.get("Retry-After"), l = o === null ? null : Number.parseInt(o, 10);
863
+ const t = n ?? {}, a = typeof t.message == "string" && t.message !== "" ? t.message : e.statusText || `Request failed with ${e.status}`, u = t.errors !== null && typeof t.errors == "object" ? t.errors : {}, s = e.headers.get("Retry-After"), l = s === null ? null : Number.parseInt(s, 10);
864
864
  return new re(
865
865
  a,
866
866
  e.status,
@@ -869,17 +869,17 @@ async function Ht(e) {
869
869
  n
870
870
  );
871
871
  }
872
- function Ot(e, n, t) {
872
+ function jt(e, n, t) {
873
873
  const u = /^https?:\/\//i.test(n) ? n : `${e}/${n.replace(/^\//, "")}`;
874
874
  if (t === void 0)
875
875
  return u;
876
- const o = new URLSearchParams();
877
- for (const [s, i] of Object.entries(t))
878
- i != null && o.set(s, String(i));
879
- const l = o.toString();
876
+ const s = new URLSearchParams();
877
+ for (const [o, r] of Object.entries(t))
878
+ r != null && s.set(o, String(r));
879
+ const l = s.toString();
880
880
  return l === "" ? u : `${u}${u.includes("?") ? "&" : "?"}${l}`;
881
881
  }
882
- function he(e) {
882
+ function ve(e) {
883
883
  if (typeof document > "u")
884
884
  return null;
885
885
  for (const n of document.cookie.split(";")) {
@@ -889,7 +889,7 @@ function he(e) {
889
889
  }
890
890
  return null;
891
891
  }
892
- const _e = {
892
+ const $e = {
893
893
  shell: {
894
894
  loading: "Loading the panel…",
895
895
  "error-title": "The panel could not start",
@@ -913,7 +913,10 @@ const _e = {
913
913
  // The head's ··· on a screen that has no name to give the menu.
914
914
  more: "More",
915
915
  rename: "Rename",
916
- save: "Save"
916
+ save: "Save",
917
+ // Said out loud to a screen reader while the little wheel turns, and after it stops.
918
+ saving: "Saving…",
919
+ saved: "Saved"
917
920
  },
918
921
  // The page behind a '?'. Only the heading is the panel's: what the page says belongs to
919
922
  // whatever is being explained, and travels with that module's own words.
@@ -1007,64 +1010,64 @@ const _e = {
1007
1010
  forbidden: "You may not read the notes of this record.",
1008
1011
  "not-yours": "A note is edited by whoever wrote it."
1009
1012
  }
1010
- }, $e = "webx.locale";
1011
- function Sn(e = {}) {
1012
- const n = e.manifestUrl ?? Gt() ?? "/api/cms/manifest", t = e.apiPath ?? n.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", u = e.modules ?? [], o = [...e.routes ?? []];
1013
+ }, Se = "webx.locale";
1014
+ function zn(e = {}) {
1015
+ const n = e.manifestUrl ?? Jt() ?? "/api/cms/manifest", t = e.apiPath ?? n.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", u = e.modules ?? [], s = [...e.routes ?? []];
1013
1016
  for (const c of u)
1014
- o.push(...c.routes ?? []);
1015
- if (!o.some((c) => c.path === "/")) {
1016
- const c = u.find((w) => w.landing === !0);
1017
- o.push({
1017
+ s.push(...c.routes ?? []);
1018
+ if (!s.some((c) => c.path === "/")) {
1019
+ const c = u.find((y) => y.landing === !0);
1020
+ s.push({
1018
1021
  path: "/",
1019
1022
  name: "webx.home",
1020
- component: zt,
1023
+ component: Wt,
1021
1024
  props: { landing: c?.path ?? c?.routes?.[0]?.path ?? null }
1022
1025
  });
1023
1026
  }
1024
- const l = De({
1025
- history: Ne(a),
1026
- routes: o
1027
- }), s = de({ locale: e.locale ?? qt() }), i = e.http ?? Ft({
1027
+ const l = Pe({
1028
+ history: Ve(a),
1029
+ routes: s
1030
+ }), o = de({ locale: e.locale ?? Yt() }), r = e.http ?? Ht({
1028
1031
  baseUrl: "",
1029
1032
  onUnauthenticated: () => {
1030
- h.setUser(null), h.state.status = "unauthenticated";
1033
+ v.setUser(null), v.state.status = "unauthenticated";
1031
1034
  },
1032
1035
  // Every request says which language the panel is currently showing. It decides what
1033
1036
  // the server writes its own messages in — a 422 under a field — for anybody who has
1034
1037
  // not stored a preference yet, which is everybody until they choose one. Without it,
1035
1038
  // signing in on a Russian sign-in screen lands in an English panel.
1036
- headers: () => ({ "X-Webx-Locale": s.state.locale })
1039
+ headers: () => ({ "X-Webx-Locale": o.state.locale })
1037
1040
  });
1038
- s.defaults("webx-admin", _e);
1041
+ o.defaults("webx-admin", $e);
1039
1042
  async function m(c) {
1040
- const w = await i.get(`${t}/translations/${c}`);
1041
- s.load(w.data.namespaces, w.data.locale, w.data.fallback), Yt(w.data.locale), Xt(w.data.locale, s.state.panelLocales);
1043
+ const y = await r.get(`${t}/translations/${c}`);
1044
+ o.load(y.data.namespaces, y.data.locale, y.data.fallback), Kt(y.data.locale), Gt(y.data.locale, o.state.panelLocales);
1042
1045
  }
1043
- const h = St({
1044
- http: i,
1046
+ const v = Ct({
1047
+ http: r,
1045
1048
  basePath: a,
1046
1049
  apiPath: t,
1047
1050
  modules: u,
1048
- i18n: s,
1051
+ i18n: o,
1049
1052
  loadDictionary: m,
1050
1053
  types: e.types,
1051
1054
  screens: e.screens,
1052
- loadManifest: async () => (await i.get(n)).data
1053
- }), f = Ee(jt(e));
1054
- f.use(Je), Ct(f, h), dt(f, s);
1055
- const d = E("");
1055
+ loadManifest: async () => (await r.get(n)).data
1056
+ }), f = Ue(qt(e));
1057
+ f.use(Qe), Lt(f, v), ct(f, o);
1058
+ const d = A("");
1056
1059
  f.provide(
1057
- Qe,
1058
- x(() => s.state.locale)
1059
- ), f.provide(Ze, {
1060
+ Ze,
1061
+ x(() => o.state.locale)
1062
+ ), f.provide(et, {
1060
1063
  list: x(
1061
- () => s.state.contentLocales.map((c) => ({
1064
+ () => o.state.contentLocales.map((c) => ({
1062
1065
  code: c.code,
1063
1066
  label: c.code.toUpperCase()
1064
1067
  }))
1065
1068
  ),
1066
1069
  active: x({
1067
- get: () => d.value || (s.state.contentLocales[0]?.code ?? ""),
1070
+ get: () => d.value || (o.state.contentLocales[0]?.code ?? ""),
1068
1071
  set: (c) => {
1069
1072
  d.value = c;
1070
1073
  }
@@ -1073,55 +1076,55 @@ function Sn(e = {}) {
1073
1076
  const p = {
1074
1077
  app: f,
1075
1078
  router: l,
1076
- context: h,
1077
- i18n: s,
1079
+ context: v,
1080
+ i18n: o,
1078
1081
  async mount() {
1079
- await Promise.all([g(), m(s.state.locale)]).catch(() => {
1080
- }), f.mount(e.el ?? "#webx-app"), await h.reload();
1082
+ await Promise.all([b(), m(o.state.locale)]).catch(() => {
1083
+ }), f.mount(e.el ?? "#webx-app"), await v.reload();
1081
1084
  }
1082
1085
  };
1083
- async function g() {
1084
- const c = await i.get(`${t}/locales`);
1085
- s.state.panelLocales = c.data.panel, s.state.contentLocales = c.data.content;
1086
+ async function b() {
1087
+ const c = await r.get(`${t}/locales`);
1088
+ o.state.panelLocales = c.data.panel, o.state.contentLocales = c.data.content;
1086
1089
  }
1087
1090
  for (const c of e.plugins ?? [])
1088
1091
  c.install(p);
1089
1092
  return f.use(l), p;
1090
1093
  }
1091
- function jt(e) {
1094
+ function qt(e) {
1092
1095
  const n = {
1093
1096
  // The menu is the panel's own: it is the manifest, drawn.
1094
1097
  // The shell hands in what a choice means where it drew the menu — in the drawer it is what
1095
1098
  // closes it, and a drawer that stays open over the section it just opened is a drawer the
1096
1099
  // reader has to dismiss by hand.
1097
- nav: (t) => X(Wt, { collapsed: t.collapsed === !0, onSelect: t.select })
1100
+ nav: (t) => G(At, { collapsed: t.collapsed === !0, onSelect: t.select })
1098
1101
  };
1099
- return e.brand !== void 0 && (n.brand = () => X(e.brand)), e.userMenu !== void 0 && (n.user = (t) => X(e.userMenu, { expanded: t.expanded === !0 })), { render: () => X(Pt, null, n) };
1102
+ return e.brand !== void 0 && (n.brand = () => G(e.brand)), e.userMenu !== void 0 && (n.user = (t) => G(e.userMenu, { expanded: t.expanded === !0 })), { render: () => G(Vt, null, n) };
1100
1103
  }
1101
- function qt() {
1102
- const e = Kt($e);
1104
+ function Yt() {
1105
+ const e = Xt(Se);
1103
1106
  return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
1104
1107
  }
1105
- function Yt(e) {
1108
+ function Kt(e) {
1106
1109
  try {
1107
- localStorage.setItem($e, e);
1110
+ localStorage.setItem(Se, e);
1108
1111
  } catch {
1109
1112
  }
1110
1113
  }
1111
- function Kt(e) {
1114
+ function Xt(e) {
1112
1115
  try {
1113
1116
  return localStorage.getItem(e);
1114
1117
  } catch {
1115
1118
  return null;
1116
1119
  }
1117
1120
  }
1118
- function Xt(e, n) {
1121
+ function Gt(e, n) {
1119
1122
  typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = n.find((t) => t.code === e)?.direction ?? "ltr");
1120
1123
  }
1121
- function Gt() {
1124
+ function Jt() {
1122
1125
  return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
1123
1126
  }
1124
- function Jt(e) {
1127
+ function Qt(e) {
1125
1128
  const n = e.replace(/\r\n?/g, `
1126
1129
  `).split(`
1127
1130
  `), t = [];
@@ -1133,74 +1136,74 @@ function Jt(e) {
1133
1136
  continue;
1134
1137
  }
1135
1138
  if (/^```([\w-]*)\s*$/.exec(u)) {
1136
- const i = [];
1139
+ const r = [];
1137
1140
  for (a += 1; a < n.length && !/^```\s*$/.test(n[a] ?? ""); )
1138
- i.push(n[a] ?? ""), a += 1;
1139
- a += 1, t.push(`<pre><code>${ue(i.join(`
1141
+ r.push(n[a] ?? ""), a += 1;
1142
+ a += 1, t.push(`<pre><code>${ue(r.join(`
1140
1143
  `))}</code></pre>`);
1141
1144
  continue;
1142
1145
  }
1143
1146
  const l = /^(#{1,4})\s+(.*)$/.exec(u);
1144
1147
  if (l) {
1145
- const i = Math.min(l[1].length + 1, 5);
1146
- t.push(`<h${i}>${oe(l[2] ?? "")}</h${i}>`), a += 1;
1148
+ const r = Math.min(l[1].length + 1, 5);
1149
+ t.push(`<h${r}>${se(l[2] ?? "")}</h${r}>`), a += 1;
1147
1150
  continue;
1148
1151
  }
1149
- if (J(u)) {
1150
- const i = /^\s*\d+[.)]\s+/.test(u), m = [];
1151
- for (; a < n.length && J(n[a] ?? ""); )
1152
+ if (Q(u)) {
1153
+ const r = /^\s*\d+[.)]\s+/.test(u), m = [];
1154
+ for (; a < n.length && Q(n[a] ?? ""); )
1152
1155
  for (m.push((n[a] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), a += 1; a < n.length; ) {
1153
1156
  const f = n[a] ?? "";
1154
- if (f.trim() === "" || J(f) || /^(#{1,4})\s/.test(f) || /^```/.test(f))
1157
+ if (f.trim() === "" || Q(f) || /^(#{1,4})\s/.test(f) || /^```/.test(f))
1155
1158
  break;
1156
1159
  m[m.length - 1] += ` ${f.trim()}`, a += 1;
1157
1160
  }
1158
- const h = i ? "ol" : "ul";
1159
- t.push(`<${h}>${m.map((f) => `<li>${oe(f)}</li>`).join("")}</${h}>`);
1161
+ const v = r ? "ol" : "ul";
1162
+ t.push(`<${v}>${m.map((f) => `<li>${se(f)}</li>`).join("")}</${v}>`);
1160
1163
  continue;
1161
1164
  }
1162
- const s = [];
1165
+ const o = [];
1163
1166
  for (; a < n.length; ) {
1164
- const i = n[a] ?? "";
1165
- if (i.trim() === "" || J(i) || /^(#{1,4})\s/.test(i) || /^```/.test(i)) break;
1166
- s.push(i.trim()), a += 1;
1167
+ const r = n[a] ?? "";
1168
+ if (r.trim() === "" || Q(r) || /^(#{1,4})\s/.test(r) || /^```/.test(r)) break;
1169
+ o.push(r.trim()), a += 1;
1167
1170
  }
1168
- t.push(`<p>${oe(s.join(" "))}</p>`);
1171
+ t.push(`<p>${se(o.join(" "))}</p>`);
1169
1172
  }
1170
1173
  return t.join("");
1171
1174
  }
1172
- const G = "\0";
1173
- function J(e) {
1175
+ const J = "\0";
1176
+ function Q(e) {
1174
1177
  return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
1175
1178
  }
1176
- function oe(e) {
1177
- const n = [], t = e.replace(/`([^`]+)`/g, (u, o) => (n.push(`<code>${ue(o)}</code>`), `${G}${n.length - 1}${G}`));
1179
+ function se(e) {
1180
+ const n = [], t = e.replace(/`([^`]+)`/g, (u, s) => (n.push(`<code>${ue(s)}</code>`), `${J}${n.length - 1}${J}`));
1178
1181
  return ue(t).replace(
1179
1182
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
1180
1183
  '<a href="$2" target="_blank" rel="noopener">$1</a>'
1181
1184
  ).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
1182
- new RegExp(`${G}(\\d+)${G}`, "g"),
1183
- (u, o) => n[Number(o)] ?? ""
1185
+ new RegExp(`${J}(\\d+)${J}`, "g"),
1186
+ (u, s) => n[Number(s)] ?? ""
1184
1187
  );
1185
1188
  }
1186
1189
  function ue(e) {
1187
1190
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1188
1191
  }
1189
- function Qt(e) {
1192
+ function Zt(e) {
1190
1193
  const n = e.scope("webx-admin"), t = /* @__PURE__ */ new Map();
1191
- function a(o, l, s) {
1192
- const i = e.state.locale, m = `${i}:${o}`;
1193
- let h = t.get(m);
1194
- return h === void 0 && (h = new Intl.DateTimeFormat(i, l), t.set(m, h)), h.format(s);
1194
+ function a(s, l, o) {
1195
+ const r = e.state.locale, m = `${r}:${s}`;
1196
+ let v = t.get(m);
1197
+ return v === void 0 && (v = new Intl.DateTimeFormat(r, l), t.set(m, v)), v.format(o);
1195
1198
  }
1196
- const u = (o) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, o);
1199
+ const u = (s) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, s);
1197
1200
  return {
1198
- short(o) {
1199
- const l = Z(o);
1201
+ short(s) {
1202
+ const l = ee(s);
1200
1203
  if (l === null)
1201
1204
  return n("dates.never");
1202
- const s = /* @__PURE__ */ new Date(), i = ve(l, s);
1203
- return i === 0 ? n("dates.today", { time: u(l) }) : i === -1 ? n("dates.yesterday", { time: u(l) }) : l.getFullYear() === s.getFullYear() ? a(
1205
+ const o = /* @__PURE__ */ new Date(), r = he(l, o);
1206
+ return r === 0 ? n("dates.today", { time: u(l) }) : r === -1 ? n("dates.yesterday", { time: u(l) }) : l.getFullYear() === o.getFullYear() ? a(
1204
1207
  "this-year",
1205
1208
  {
1206
1209
  day: "numeric",
@@ -1212,45 +1215,45 @@ function Qt(e) {
1212
1215
  l
1213
1216
  ) : a("earlier", { day: "numeric", month: "long", year: "numeric" }, l);
1214
1217
  },
1215
- compact(o) {
1216
- const l = Z(o);
1218
+ compact(s) {
1219
+ const l = ee(s);
1217
1220
  if (l === null)
1218
1221
  return n("dates.never");
1219
- const s = /* @__PURE__ */ new Date();
1220
- return ve(l, s) === 0 ? u(l) : l.getFullYear() === s.getFullYear() ? a("compact", { day: "numeric", month: "short" }, l) : a("compact-earlier", { dateStyle: "short" }, l);
1222
+ const o = /* @__PURE__ */ new Date();
1223
+ return he(l, o) === 0 ? u(l) : l.getFullYear() === o.getFullYear() ? a("compact", { day: "numeric", month: "short" }, l) : a("compact-earlier", { dateStyle: "short" }, l);
1221
1224
  },
1222
- exact(o) {
1223
- const l = Z(o);
1225
+ exact(s) {
1226
+ const l = ee(s);
1224
1227
  return l === null ? "" : a("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, l);
1225
1228
  },
1226
- iso(o) {
1227
- const l = Z(o);
1229
+ iso(s) {
1230
+ const l = ee(s);
1228
1231
  return l === null ? "" : l.toISOString();
1229
1232
  }
1230
1233
  };
1231
1234
  }
1232
- function Zt() {
1233
- const e = ee(ne, null);
1234
- return Qt(e ?? en());
1235
- }
1236
- let Q = null;
1237
1235
  function en() {
1238
- return Q === null && (Q = de(), Q.defaults("webx-admin", _e)), Q;
1236
+ const e = te(ne, null);
1237
+ return Zt(e ?? tn());
1238
+ }
1239
+ let Z = null;
1240
+ function tn() {
1241
+ return Z === null && (Z = de(), Z.defaults("webx-admin", $e)), Z;
1239
1242
  }
1240
- function Z(e) {
1243
+ function ee(e) {
1241
1244
  if (e == null || e === "")
1242
1245
  return null;
1243
1246
  const n = e instanceof Date ? e : new Date(e);
1244
1247
  return Number.isNaN(n.getTime()) ? null : n;
1245
1248
  }
1246
- function ve(e, n) {
1249
+ function he(e, n) {
1247
1250
  const t = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
1248
1251
  return Math.round((t(e) - t(n)) / 864e5);
1249
1252
  }
1250
- function tn(e, n, t) {
1251
- const a = e instanceof re ? e.status : an(e);
1253
+ function nn(e, n, t) {
1254
+ const a = e instanceof re ? e.status : ln(e);
1252
1255
  if (a === 422)
1253
- return ln(e) ?? t ?? n("errors.unknown");
1256
+ return sn(e) ?? t ?? n("errors.unknown");
1254
1257
  if (a === 401) return n("errors.signed-out");
1255
1258
  if (a === 403) return n("errors.forbidden");
1256
1259
  if (a === 404) return n("errors.gone");
@@ -1261,29 +1264,29 @@ function tn(e, n, t) {
1261
1264
  }
1262
1265
  return a !== null && a >= 500 ? n("errors.server") : a === null ? n("errors.offline") : t ?? n("errors.unknown");
1263
1266
  }
1264
- function nn() {
1265
- const e = I("webx-admin");
1266
- return (n, t) => tn(n, e, t);
1267
+ function an() {
1268
+ const e = B("webx-admin");
1269
+ return (n, t) => nn(n, e, t);
1267
1270
  }
1268
- function an(e) {
1271
+ function ln(e) {
1269
1272
  const n = e?.status;
1270
1273
  return typeof n == "number" ? n : null;
1271
1274
  }
1272
- function ln(e) {
1275
+ function sn(e) {
1273
1276
  const t = e?.body?.message;
1274
1277
  return typeof t == "string" && t !== "" ? t : null;
1275
1278
  }
1276
1279
  function on(e, n, t) {
1277
- const a = `${e.apiPath}/entities/${n}/${t}/notes`, u = (l) => `${e.apiPath}/notes/${l}`, o = (l) => l.data;
1280
+ const a = `${e.apiPath}/entities/${n}/${t}/notes`, u = (l) => `${e.apiPath}/notes/${l}`, s = (l) => l.data;
1278
1281
  return {
1279
- list: () => e.http.get(a).then(o),
1280
- add: (l) => e.http.post(a, { body: l }).then(o),
1281
- save: (l, s) => e.http.put(u(l), { body: s }).then(o),
1282
+ list: () => e.http.get(a).then(s),
1283
+ add: (l) => e.http.post(a, { body: l }).then(s),
1284
+ save: (l, o) => e.http.put(u(l), { body: o }).then(s),
1282
1285
  remove: (l) => e.http.delete(u(l)).then(() => {
1283
1286
  })
1284
1287
  };
1285
1288
  }
1286
- const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1289
+ const rn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
1287
1290
  __name: "Screen",
1288
1291
  props: /* @__PURE__ */ ie({
1289
1292
  name: {},
@@ -1298,37 +1301,37 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1298
1301
  }),
1299
1302
  emits: /* @__PURE__ */ ie(["loaded"], ["update:modelValue"]),
1300
1303
  setup(e, { expose: n, emit: t }) {
1301
- const a = e, u = t, o = ge(e, "modelValue"), l = H(), s = I("webx-admin"), i = E(null), m = E(null);
1302
- async function h() {
1303
- i.value = null, m.value = null;
1304
+ const a = e, u = t, s = be(e, "modelValue"), l = O(), o = B("webx-admin"), r = A(null), m = A(null);
1305
+ async function v() {
1306
+ r.value = null, m.value = null;
1304
1307
  try {
1305
1308
  const f = await l.loadScreen(a.name);
1306
- i.value = f, u("loaded", f);
1309
+ r.value = f, u("loaded", f);
1307
1310
  } catch (f) {
1308
1311
  m.value = f instanceof Error ? f.message : String(f);
1309
1312
  }
1310
1313
  }
1311
- return te([() => a.name, () => l.i18n.state.locale], () => {
1312
- h();
1313
- }, { immediate: !0 }), n({ reload: h }), (f, d) => (v(), k("div", sn, [
1314
- m.value ? (v(), y(r(et), {
1314
+ return Y([() => a.name, () => l.i18n.state.locale], () => {
1315
+ v();
1316
+ }, { immediate: !0 }), n({ reload: v }), (f, d) => (h(), k("div", rn, [
1317
+ m.value ? (h(), w(i(tt), {
1315
1318
  key: 0,
1316
1319
  type: "danger",
1317
- title: r(s)("shell.error-title"),
1320
+ title: i(o)("shell.error-title"),
1318
1321
  description: m.value
1319
- }, null, 8, ["title", "description"])) : i.value === null ? (v(), y(r(ye), {
1322
+ }, null, 8, ["title", "description"])) : r.value === null ? (h(), w(i(xe), {
1320
1323
  key: 1,
1321
1324
  rows: 4
1322
- })) : (v(), y(r(ut), {
1325
+ })) : (h(), w(i(dt), {
1323
1326
  key: 2,
1324
- modelValue: o.value,
1325
- "onUpdate:modelValue": d[0] || (d[0] = (p) => o.value = p),
1326
- root: i.value,
1327
- patch: r(l).screenPatch(e.name),
1328
- types: r(l).types,
1327
+ modelValue: s.value,
1328
+ "onUpdate:modelValue": d[0] || (d[0] = (p) => s.value = p),
1329
+ root: r.value,
1330
+ patch: i(l).screenPatch(e.name),
1331
+ types: i(l).types,
1329
1332
  errors: e.errors,
1330
- translate: r(l).i18n.t,
1331
- can: r(l).can,
1333
+ translate: i(l).i18n.t,
1334
+ can: i(l).can,
1332
1335
  disabled: e.disabled,
1333
1336
  "label-position": e.labelPosition,
1334
1337
  "label-width": e.labelWidth,
@@ -1336,13 +1339,49 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1336
1339
  }, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
1337
1340
  ]));
1338
1341
  }
1339
- }), Ln = 76, zn = /* @__PURE__ */ U({
1342
+ }), An = 76, un = {
1343
+ class: "wx-save-state",
1344
+ role: "status",
1345
+ "aria-live": "polite"
1346
+ }, dn = /* @__PURE__ */ R({
1347
+ __name: "SaveState",
1348
+ props: {
1349
+ state: {},
1350
+ linger: { default: 2e3 }
1351
+ },
1352
+ setup(e) {
1353
+ const n = e, t = B("webx-admin"), a = A(!1);
1354
+ let u = null;
1355
+ Y(
1356
+ () => n.state,
1357
+ (l, o) => {
1358
+ u !== null && clearTimeout(u), a.value = o === "saving" && l === "saved", a.value && (u = window.setTimeout(() => {
1359
+ a.value = !1, u = null;
1360
+ }, n.linger));
1361
+ }
1362
+ );
1363
+ const s = x(
1364
+ () => n.state === "saving" ? "saving" : a.value ? "saved" : null
1365
+ );
1366
+ return Be(() => {
1367
+ u !== null && clearTimeout(u);
1368
+ }), (l, o) => (h(), k("span", un, [
1369
+ s.value ? (h(), w(i(ye), {
1370
+ key: 0,
1371
+ class: H(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
1372
+ name: s.value === "saving" ? "loader" : "check",
1373
+ spin: s.value === "saving",
1374
+ label: i(t)(`editor.${s.value}`)
1375
+ }, null, 8, ["class", "name", "spin", "label"])) : z("", !0)
1376
+ ]));
1377
+ }
1378
+ }), Rn = /* @__PURE__ */ N(dn, [["__scopeId", "data-v-216e5e44"]]), En = /* @__PURE__ */ R({
1340
1379
  __name: "FilterChips",
1341
1380
  props: {
1342
1381
  filters: {}
1343
1382
  },
1344
1383
  setup(e) {
1345
- return (n, t) => (v(!0), k(B, null, N(e.filters, (a) => (v(), y(r(tt), {
1384
+ return (n, t) => (h(!0), k(I, null, P(e.filters, (a) => (h(), w(i(nt), {
1346
1385
  key: a.key,
1347
1386
  class: "wx-filter-chip",
1348
1387
  size: "sm",
@@ -1350,13 +1389,13 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1350
1389
  closable: "",
1351
1390
  onClose: (u) => a.clear()
1352
1391
  }, {
1353
- default: b(() => [
1354
- z(C(a.label), 1)
1392
+ default: g(() => [
1393
+ W(C(a.label), 1)
1355
1394
  ]),
1356
1395
  _: 2
1357
1396
  }, 1032, ["onClose"]))), 128));
1358
1397
  }
1359
- }), rn = { class: "wx-rename__footer" }, un = /* @__PURE__ */ U({
1398
+ }), cn = { class: "wx-rename__footer" }, mn = /* @__PURE__ */ R({
1360
1399
  __name: "RenameButton",
1361
1400
  props: {
1362
1401
  name: { default: "" },
@@ -1367,57 +1406,57 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1367
1406
  },
1368
1407
  emits: ["rename"],
1369
1408
  setup(e, { emit: n }) {
1370
- const t = e, a = n, u = I("webx-admin"), o = E(!1), l = E(t.name), s = E(null), i = x(() => t.label ?? u("editor.rename"));
1371
- te(o, async (h) => {
1372
- h && (l.value = t.name, await Ue(), s.value?.focus(), s.value?.select());
1409
+ const t = e, a = n, u = B("webx-admin"), s = A(!1), l = A(t.name), o = A(null), r = x(() => t.label ?? u("editor.rename"));
1410
+ Y(s, async (v) => {
1411
+ v && (l.value = t.name, await Ie(), o.value?.focus(), o.value?.select());
1373
1412
  });
1374
1413
  function m() {
1375
- const h = l.value.trim();
1376
- if (h === "" || h === t.name) {
1377
- o.value = !1;
1414
+ const v = l.value.trim();
1415
+ if (v === "" || v === t.name) {
1416
+ s.value = !1;
1378
1417
  return;
1379
1418
  }
1380
- a("rename", h), o.value = !1;
1419
+ a("rename", v), s.value = !1;
1381
1420
  }
1382
- return (h, f) => (v(), y(r(nt), {
1383
- open: o.value,
1384
- "onUpdate:open": f[2] || (f[2] = (d) => o.value = d),
1385
- title: i.value,
1421
+ return (v, f) => (h(), w(i(at), {
1422
+ open: s.value,
1423
+ "onUpdate:open": f[2] || (f[2] = (d) => s.value = d),
1424
+ title: r.value,
1386
1425
  width: 320,
1387
1426
  side: "bottom",
1388
1427
  align: "start",
1389
1428
  teleport: ""
1390
1429
  }, {
1391
- trigger: b(() => [
1392
- _(r(Y), {
1430
+ trigger: g(() => [
1431
+ _(i(K), {
1393
1432
  type: "edit",
1394
- title: i.value,
1433
+ title: r.value,
1395
1434
  size: e.size,
1396
1435
  disabled: e.disabled
1397
1436
  }, null, 8, ["title", "size", "disabled"])
1398
1437
  ]),
1399
- default: b(() => [
1438
+ default: g(() => [
1400
1439
  M("form", {
1401
1440
  class: "wx-rename",
1402
1441
  onSubmit: pe(m, ["prevent"])
1403
1442
  }, [
1404
- _(r(at), {
1443
+ _(i(lt), {
1405
1444
  ref_key: "field",
1406
- ref: s,
1445
+ ref: o,
1407
1446
  modelValue: l.value,
1408
1447
  "onUpdate:modelValue": f[0] || (f[0] = (d) => l.value = d),
1409
- "aria-label": i.value,
1448
+ "aria-label": r.value,
1410
1449
  placeholder: e.placeholder,
1411
- onKeydown: f[1] || (f[1] = Be((d) => o.value = !1, ["esc"]))
1450
+ onKeydown: f[1] || (f[1] = Me((d) => s.value = !1, ["esc"]))
1412
1451
  }, null, 8, ["modelValue", "aria-label", "placeholder"]),
1413
- M("div", rn, [
1414
- _(r(O), {
1452
+ M("div", cn, [
1453
+ _(i(j), {
1415
1454
  type: "primary",
1416
1455
  size: "sm",
1417
1456
  "native-type": "submit"
1418
1457
  }, {
1419
- default: b(() => [
1420
- z(C(r(u)("editor.save")), 1)
1458
+ default: g(() => [
1459
+ W(C(i(u)("editor.save")), 1)
1421
1460
  ]),
1422
1461
  _: 1
1423
1462
  })
@@ -1427,7 +1466,7 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1427
1466
  _: 1
1428
1467
  }, 8, ["open", "title"]));
1429
1468
  }
1430
- }), Wn = /* @__PURE__ */ P(un, [["__scopeId", "data-v-d879e8d3"]]), dn = ["innerHTML"], cn = /* @__PURE__ */ U({
1469
+ }), Un = /* @__PURE__ */ N(mn, [["__scopeId", "data-v-d879e8d3"]]), fn = ["innerHTML"], vn = /* @__PURE__ */ R({
1431
1470
  __name: "HelpButton",
1432
1471
  props: {
1433
1472
  body: {},
@@ -1437,33 +1476,33 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1437
1476
  width: { default: 720 }
1438
1477
  },
1439
1478
  setup(e) {
1440
- const n = e, t = I("webx-admin"), a = E(!1), u = x(() => n.title ?? t("help.title")), o = x(() => Jt(n.body));
1441
- return (l, s) => (v(), k(B, null, [
1442
- _(r(Y), {
1479
+ const n = e, t = B("webx-admin"), a = A(!1), u = x(() => n.title ?? t("help.title")), s = x(() => Qt(n.body));
1480
+ return (l, o) => (h(), k(I, null, [
1481
+ _(i(K), {
1443
1482
  type: "details",
1444
1483
  icon: "question",
1445
1484
  tone: "neutral",
1446
1485
  size: e.size,
1447
1486
  title: e.label ?? u.value,
1448
- onClick: s[0] || (s[0] = (i) => a.value = !0)
1487
+ onClick: o[0] || (o[0] = (r) => a.value = !0)
1449
1488
  }, null, 8, ["size", "title"]),
1450
- _(r(lt), {
1489
+ _(i(st), {
1451
1490
  open: a.value,
1452
- "onUpdate:open": s[1] || (s[1] = (i) => a.value = i),
1491
+ "onUpdate:open": o[1] || (o[1] = (r) => a.value = r),
1453
1492
  title: u.value,
1454
1493
  width: e.width
1455
1494
  }, {
1456
- default: b(() => [
1495
+ default: g(() => [
1457
1496
  M("div", {
1458
1497
  class: "wx-help",
1459
- innerHTML: o.value
1460
- }, null, 8, dn)
1498
+ innerHTML: s.value
1499
+ }, null, 8, fn)
1461
1500
  ]),
1462
1501
  _: 1
1463
1502
  }, 8, ["open", "title", "width"])
1464
1503
  ], 64));
1465
1504
  }
1466
- }), An = /* @__PURE__ */ P(cn, [["__scopeId", "data-v-6c280d42"]]), mn = /* @__PURE__ */ U({
1505
+ }), Bn = /* @__PURE__ */ N(vn, [["__scopeId", "data-v-6c280d42"]]), hn = /* @__PURE__ */ R({
1467
1506
  name: "WxDate",
1468
1507
  __name: "DateText",
1469
1508
  props: {
@@ -1473,46 +1512,46 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1473
1512
  tone: { default: "muted" }
1474
1513
  },
1475
1514
  setup(e) {
1476
- const n = e, t = Zt(), a = x(() => n.compact ? t.compact(n.value) : t.short(n.value)), u = x(() => t.exact(n.value)), o = x(() => t.iso(n.value));
1477
- return (l, s) => u.value ? (v(), y(r(ot), {
1515
+ const n = e, t = en(), a = x(() => n.compact ? t.compact(n.value) : t.short(n.value)), u = x(() => t.exact(n.value)), s = x(() => t.iso(n.value));
1516
+ return (l, o) => u.value ? (h(), w(i(ot), {
1478
1517
  key: 0,
1479
1518
  content: u.value
1480
1519
  }, {
1481
- default: b(() => [
1482
- _(r(q), {
1520
+ default: g(() => [
1521
+ _(i(q), {
1483
1522
  as: "time",
1484
- datetime: o.value,
1523
+ datetime: s.value,
1485
1524
  size: e.size,
1486
1525
  tone: e.tone
1487
1526
  }, {
1488
- default: b(() => [
1489
- z(C(a.value), 1)
1527
+ default: g(() => [
1528
+ W(C(a.value), 1)
1490
1529
  ]),
1491
1530
  _: 1
1492
1531
  }, 8, ["datetime", "size", "tone"])
1493
1532
  ]),
1494
1533
  _: 1
1495
- }, 8, ["content"])) : (v(), y(r(q), {
1534
+ }, 8, ["content"])) : (h(), w(i(q), {
1496
1535
  key: 1,
1497
1536
  size: e.size,
1498
1537
  tone: e.tone
1499
1538
  }, {
1500
- default: b(() => [
1501
- z(C(a.value), 1)
1539
+ default: g(() => [
1540
+ W(C(a.value), 1)
1502
1541
  ]),
1503
1542
  _: 1
1504
1543
  }, 8, ["size", "tone"]));
1505
1544
  }
1506
- }), fn = { class: "wx-notes" }, hn = {
1545
+ }), pn = { class: "wx-notes" }, gn = {
1507
1546
  key: 3,
1508
1547
  class: "wx-notes__list"
1509
- }, vn = { class: "wx-note__body" }, pn = { class: "wx-note__head" }, bn = { class: "wx-note__buttons" }, gn = {
1548
+ }, bn = { class: "wx-note__body" }, wn = { class: "wx-note__head" }, yn = { class: "wx-note__buttons" }, xn = {
1510
1549
  key: 1,
1511
1550
  class: "wx-note__text"
1512
- }, wn = {
1551
+ }, kn = {
1513
1552
  key: 4,
1514
1553
  class: "wx-notes__new"
1515
- }, yn = /* @__PURE__ */ U({
1554
+ }, _n = /* @__PURE__ */ R({
1516
1555
  name: "WxNotes",
1517
1556
  __name: "NotesFeed",
1518
1557
  props: {
@@ -1523,220 +1562,221 @@ const sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ U({
1523
1562
  },
1524
1563
  emits: ["change"],
1525
1564
  setup(e, { emit: n }) {
1526
- const t = e, a = n, u = H(), o = I("webx-admin"), l = nn(), s = E([]), i = E(!0), m = E(""), h = E(!1), f = E(null), d = E(""), p = x(() => on(u, t.type, t.id)), g = x(() => t.title ?? o("notes.title"));
1565
+ const t = e, a = n, u = O(), s = B("webx-admin"), l = an(), o = A([]), r = A(!0), m = A(""), v = A(!1), f = A(null), d = A(""), p = x(() => on(u, t.type, t.id)), b = x(() => t.title ?? s("notes.title"));
1527
1566
  async function c() {
1528
- i.value = !0;
1567
+ r.value = !0;
1529
1568
  try {
1530
- s.value = await p.value.list();
1531
- } catch (T) {
1532
- F.danger(l(T));
1569
+ o.value = await p.value.list();
1570
+ } catch (S) {
1571
+ F.danger(l(S));
1533
1572
  } finally {
1534
- i.value = !1;
1573
+ r.value = !1;
1535
1574
  }
1536
1575
  }
1537
- te(
1576
+ Y(
1538
1577
  () => [t.type, t.id],
1539
1578
  () => {
1540
1579
  f.value = null, m.value = "", c();
1541
1580
  },
1542
1581
  { immediate: !0 }
1543
1582
  );
1544
- async function w() {
1545
- const T = m.value.trim();
1546
- if (!(T === "" || h.value)) {
1547
- h.value = !0;
1583
+ async function y() {
1584
+ const S = m.value.trim();
1585
+ if (!(S === "" || v.value)) {
1586
+ v.value = !0;
1548
1587
  try {
1549
- s.value = [...s.value, await p.value.add(T)], m.value = "", a("change");
1550
- } catch (A) {
1551
- F.danger(l(A));
1588
+ o.value = [...o.value, await p.value.add(S)], m.value = "", a("change");
1589
+ } catch (E) {
1590
+ F.danger(l(E));
1552
1591
  } finally {
1553
- h.value = !1;
1592
+ v.value = !1;
1554
1593
  }
1555
1594
  }
1556
1595
  }
1557
- function $(T) {
1558
- f.value = T.id, d.value = T.body;
1596
+ function $(S) {
1597
+ f.value = S.id, d.value = S.body;
1559
1598
  }
1560
- async function K(T) {
1561
- const A = d.value.trim();
1562
- if (A !== "")
1599
+ async function X(S) {
1600
+ const E = d.value.trim();
1601
+ if (E !== "")
1563
1602
  try {
1564
- const S = await p.value.save(T.id, A);
1565
- s.value = s.value.map((D) => D.id === S.id ? S : D), f.value = null, F.success(o("notes.saved")), a("change");
1566
- } catch (S) {
1567
- F.danger(l(S));
1603
+ const T = await p.value.save(S.id, E);
1604
+ o.value = o.value.map((D) => D.id === T.id ? T : D), f.value = null, F.success(s("notes.saved")), a("change");
1605
+ } catch (T) {
1606
+ F.danger(l(T));
1568
1607
  }
1569
1608
  }
1570
- async function ae(T) {
1571
- if (await rt({
1572
- title: o("notes.delete-title"),
1573
- message: o("notes.delete-text"),
1574
- confirmText: o("notes.delete"),
1575
- cancelText: o("notes.cancel"),
1609
+ async function ae(S) {
1610
+ if (await ut({
1611
+ title: s("notes.delete-title"),
1612
+ message: s("notes.delete-text"),
1613
+ confirmText: s("notes.delete"),
1614
+ cancelText: s("notes.cancel"),
1576
1615
  tone: "danger"
1577
1616
  }))
1578
1617
  try {
1579
- await p.value.remove(T.id), s.value = s.value.filter((S) => S.id !== T.id), F.success(o("notes.deleted")), a("change");
1580
- } catch (S) {
1581
- F.danger(l(S));
1618
+ await p.value.remove(S.id), o.value = o.value.filter((T) => T.id !== S.id), F.success(s("notes.deleted")), a("change");
1619
+ } catch (T) {
1620
+ F.danger(l(T));
1582
1621
  }
1583
1622
  }
1584
- function le(T) {
1585
- return !t.can || !T.is_mine ? [] : [
1586
- { key: "edit", icon: "edit", label: o("notes.edit"), run: () => $(T) },
1623
+ function le(S) {
1624
+ return !t.can || !S.is_mine ? [] : [
1625
+ { key: "edit", icon: "edit", label: s("notes.edit"), run: () => $(S) },
1587
1626
  {
1588
1627
  key: "delete",
1589
1628
  icon: "trash",
1590
- label: o("notes.delete"),
1629
+ label: s("notes.delete"),
1591
1630
  danger: !0,
1592
1631
  run: () => {
1593
- ae(T);
1632
+ ae(S);
1594
1633
  }
1595
1634
  }
1596
1635
  ];
1597
1636
  }
1598
- function V(T) {
1599
- return T.author?.name ?? o("notes.unknown-author");
1637
+ function V(S) {
1638
+ return S.author?.name ?? s("notes.unknown-author");
1600
1639
  }
1601
- return (T, A) => (v(), k("section", fn, [
1602
- g.value ? (v(), y(r(q), {
1640
+ return (S, E) => (h(), k("section", pn, [
1641
+ b.value ? (h(), w(i(q), {
1603
1642
  key: 0,
1604
1643
  weight: "medium",
1605
1644
  class: "wx-notes__title"
1606
1645
  }, {
1607
- default: b(() => [
1608
- z(C(g.value), 1)
1646
+ default: g(() => [
1647
+ W(C(b.value), 1)
1609
1648
  ]),
1610
1649
  _: 1
1611
- })) : W("", !0),
1612
- i.value ? (v(), y(r(ye), {
1650
+ })) : z("", !0),
1651
+ r.value ? (h(), w(i(xe), {
1613
1652
  key: 1,
1614
1653
  rows: 2
1615
- })) : s.value.length === 0 ? (v(), y(r(st), {
1654
+ })) : o.value.length === 0 ? (h(), w(i(it), {
1616
1655
  key: 2,
1617
1656
  size: "sm",
1618
- description: r(o)("notes.empty")
1619
- }, null, 8, ["description"])) : (v(), k("ul", hn, [
1620
- (v(!0), k(B, null, N(s.value, (S) => (v(), k("li", {
1621
- key: S.id,
1657
+ description: i(s)("notes.empty")
1658
+ }, null, 8, ["description"])) : (h(), k("ul", gn, [
1659
+ (h(!0), k(I, null, P(o.value, (T) => (h(), k("li", {
1660
+ key: T.id,
1622
1661
  class: "wx-note"
1623
1662
  }, [
1624
- _(r(it), {
1625
- name: V(S),
1663
+ _(i(rt), {
1664
+ name: V(T),
1626
1665
  size: "sm",
1627
1666
  tone: "auto"
1628
1667
  }, null, 8, ["name"]),
1629
- M("div", vn, [
1630
- M("div", pn, [
1631
- _(r(q), {
1668
+ M("div", bn, [
1669
+ M("div", wn, [
1670
+ _(i(q), {
1632
1671
  size: "sm",
1633
1672
  weight: "medium",
1634
1673
  truncate: ""
1635
1674
  }, {
1636
- default: b(() => [
1637
- z(C(V(S)), 1)
1675
+ default: g(() => [
1676
+ W(C(V(T)), 1)
1638
1677
  ]),
1639
1678
  _: 2
1640
1679
  }, 1024),
1641
- _(mn, {
1642
- value: S.created_at
1680
+ _(hn, {
1681
+ value: T.created_at
1643
1682
  }, null, 8, ["value"]),
1644
- _(xe, {
1645
- actions: le(S),
1646
- label: V(S)
1683
+ _(ke, {
1684
+ actions: le(T),
1685
+ label: V(T)
1647
1686
  }, null, 8, ["actions", "label"])
1648
1687
  ]),
1649
- f.value === S.id ? (v(), k(B, { key: 0 }, [
1650
- _(r(fe), {
1688
+ f.value === T.id ? (h(), k(I, { key: 0 }, [
1689
+ _(i(fe), {
1651
1690
  modelValue: d.value,
1652
- "onUpdate:modelValue": A[0] || (A[0] = (D) => d.value = D),
1691
+ "onUpdate:modelValue": E[0] || (E[0] = (D) => d.value = D),
1653
1692
  autosize: { minRows: 2, maxRows: 10 }
1654
1693
  }, null, 8, ["modelValue"]),
1655
- M("div", bn, [
1656
- _(r(O), {
1694
+ M("div", yn, [
1695
+ _(i(j), {
1657
1696
  size: "sm",
1658
1697
  type: "primary",
1659
- onClick: (D) => K(S)
1698
+ onClick: (D) => X(T)
1660
1699
  }, {
1661
- default: b(() => [
1662
- z(C(r(o)("notes.save")), 1)
1700
+ default: g(() => [
1701
+ W(C(i(s)("notes.save")), 1)
1663
1702
  ]),
1664
1703
  _: 1
1665
1704
  }, 8, ["onClick"]),
1666
- _(r(O), {
1705
+ _(i(j), {
1667
1706
  size: "sm",
1668
1707
  variant: "text",
1669
- onClick: A[1] || (A[1] = (D) => f.value = null)
1708
+ onClick: E[1] || (E[1] = (D) => f.value = null)
1670
1709
  }, {
1671
- default: b(() => [
1672
- z(C(r(o)("notes.cancel")), 1)
1710
+ default: g(() => [
1711
+ W(C(i(s)("notes.cancel")), 1)
1673
1712
  ]),
1674
1713
  _: 1
1675
1714
  })
1676
1715
  ])
1677
- ], 64)) : (v(), k("p", gn, C(S.body), 1))
1716
+ ], 64)) : (h(), k("p", xn, C(T.body), 1))
1678
1717
  ])
1679
1718
  ]))), 128))
1680
1719
  ])),
1681
- e.can ? (v(), k("div", wn, [
1682
- _(r(fe), {
1720
+ e.can ? (h(), k("div", kn, [
1721
+ _(i(fe), {
1683
1722
  modelValue: m.value,
1684
- "onUpdate:modelValue": A[2] || (A[2] = (S) => m.value = S),
1685
- placeholder: r(o)("notes.placeholder"),
1723
+ "onUpdate:modelValue": E[2] || (E[2] = (T) => m.value = T),
1724
+ placeholder: i(s)("notes.placeholder"),
1686
1725
  autosize: { minRows: 2, maxRows: 8 }
1687
1726
  }, null, 8, ["modelValue", "placeholder"]),
1688
- _(r(O), {
1727
+ _(i(j), {
1689
1728
  size: "sm",
1690
1729
  type: "primary",
1691
1730
  disabled: m.value.trim() === "",
1692
- loading: h.value,
1693
- onClick: w
1731
+ loading: v.value,
1732
+ onClick: y
1694
1733
  }, {
1695
- default: b(() => [
1696
- z(C(r(o)("notes.add")), 1)
1734
+ default: g(() => [
1735
+ W(C(i(s)("notes.add")), 1)
1697
1736
  ]),
1698
1737
  _: 1
1699
1738
  }, 8, ["disabled", "loading"])
1700
- ])) : W("", !0)
1739
+ ])) : z("", !0)
1701
1740
  ]));
1702
1741
  }
1703
- }), Rn = /* @__PURE__ */ P(yn, [["__scopeId", "data-v-71004c1a"]]);
1742
+ }), In = /* @__PURE__ */ N(_n, [["__scopeId", "data-v-71004c1a"]]);
1704
1743
  export {
1705
- zt as AdminLanding,
1706
- Wt as AdminNav,
1707
- Pt as AdminShell,
1744
+ Wt as AdminLanding,
1745
+ At as AdminNav,
1746
+ Vt as AdminShell,
1708
1747
  re as HttpError,
1709
- mt as WxBackButton,
1710
- mn as WxDate,
1711
- zn as WxFilterChips,
1712
- An as WxHelpButton,
1713
- _t as WxListScreen,
1714
- Rn as WxNotes,
1715
- Wn as WxRenameButton,
1716
- $t as WxRichTextField,
1717
- xe as WxRowMenu,
1718
- Cn as WxScreen,
1719
- yt as WxScreenHead,
1720
- ke as adminKey,
1721
- _e as adminMessages,
1748
+ ft as WxBackButton,
1749
+ hn as WxDate,
1750
+ En as WxFilterChips,
1751
+ Bn as WxHelpButton,
1752
+ $t as WxListScreen,
1753
+ In as WxNotes,
1754
+ Un as WxRenameButton,
1755
+ St as WxRichTextField,
1756
+ ke as WxRowMenu,
1757
+ Rn as WxSaveState,
1758
+ Wn as WxScreen,
1759
+ xt as WxScreenHead,
1760
+ _e as adminKey,
1761
+ $e as adminMessages,
1722
1762
  Tt as adminTypes,
1723
- Sn as createAdmin,
1724
- St as createAdminContext,
1725
- Qt as createDates,
1726
- Ft as createHttp,
1763
+ zn as createAdmin,
1764
+ Ct as createAdminContext,
1765
+ Zt as createDates,
1766
+ Ht as createHttp,
1727
1767
  de as createI18n,
1728
1768
  on as createNotesApi,
1729
- tn as errorText,
1769
+ nn as errorText,
1730
1770
  ne as i18nKey,
1731
- Ct as provideAdmin,
1732
- dt as provideI18n,
1733
- he as readCookie,
1734
- Jt as renderMarkdown,
1735
- Ln as rowMenuWidth,
1736
- H as useAdmin,
1737
- Zt as useDates,
1738
- nn as useErrorText,
1739
- Tn as useI18n,
1740
- I as useTranslate
1771
+ Lt as provideAdmin,
1772
+ ct as provideI18n,
1773
+ ve as readCookie,
1774
+ Qt as renderMarkdown,
1775
+ An as rowMenuWidth,
1776
+ O as useAdmin,
1777
+ en as useDates,
1778
+ an as useErrorText,
1779
+ Ln as useI18n,
1780
+ B as useTranslate
1741
1781
  };
1742
1782
  //# sourceMappingURL=index.js.map