@webx-ui/module-admin 0.23.3 → 0.23.4

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,31 +1,31 @@
1
- import { inject as fe, reactive as ze, defineComponent as K, useModel as ge, ref as W, watch as oe, computed as w, openBlock as c, createElementBlock as k, createVNode as x, unref as n, withCtx as b, createElementVNode as P, toDisplayString as C, createBlock as L, createTextVNode as I, createCommentVNode as N, mergeModels as me, mergeProps as lt, provide as Re, normalizeClass as ve, createSlots as Ie, nextTick as nt, useId as Xt, Fragment as j, onMounted as Se, renderList as ie, withModifiers as Ct, useSlots as Jt, useTemplateRef as at, renderSlot as ae, useAttrs as Gt, normalizeProps as Qt, guardReactiveProps as Zt, resolveComponent as ne, watchEffect as el, onUnmounted as tl, isRef as At, createApp as ll, h as xe, onBeforeUnmount as ot, getCurrentScope as nl, onScopeDispose as al, readonly as we, withKeys as Wt } from "vue";
2
- import { RouterLink as ol, useRouter as Me, useRoute as Lt, createRouter as sl, createWebHistory as il, onBeforeRouteLeave as rl } from "vue-router";
3
- import { WxSortableList as st, WxAction as be, WxBadge as Oe, WxSelect as ke, WxAutocomplete as Je, WxSwitch as Fe, WxInputNumber as ul, WxButton as de, WxSegmented as dl, WxText as Q, WxInput as Te, WxCheckbox as pt, WxTooltip as Vt, WxEmpty as Ue, WxSkeleton as ye, WxAvatar as zt, WxDialog as it, toast as Z, WxActions as cl, WxDropdownItem as fl, useElementWidth as ml, WxHeading as vl, WxIcon as rt, WxTabs as pl, WxCard as Ge, WxRichText as hl, useLocales as Ut, WxAlert as Pe, WxResult as yl, useResponsiveShell as gl, shellLayoutFor as bl, WxToaster as wl, WebxUI as _l, dateLocaleKey as xl, localesKey as kl, useModal as $l, WxFormItem as Sl, WxSpace as Tl, createModal as Cl, confirm as Ee, localizedValue as Al, WxBreadcrumb as Wl, WxBreadcrumbItem as ht, WxActionBar as Ll, WxPopover as Vl, WxTextarea as yt } from "@webx-ui/core";
4
- import { watchSystemTheme as zl, applyTheme as Ul, systemTheme as El } from "@webx-ui/tokens";
1
+ import { inject as fe, reactive as Ue, defineComponent as j, useModel as ge, ref as W, watch as se, computed as w, openBlock as d, createElementBlock as x, createVNode as k, unref as n, withCtx as b, createElementVNode as P, toDisplayString as C, createBlock as L, createTextVNode as M, createCommentVNode as N, mergeModels as me, mergeProps as nt, provide as Me, normalizeClass as ve, createSlots as Te, nextTick as at, useId as Xt, Fragment as K, onMounted as Ce, renderList as ie, withModifiers as ot, useSlots as Jt, useTemplateRef as st, renderSlot as oe, useAttrs as Gt, normalizeProps as Qt, guardReactiveProps as Zt, resolveComponent as ae, watchEffect as el, onUnmounted as tl, isRef as Wt, createApp as ll, h as ke, onBeforeUnmount as it, getCurrentScope as nl, onScopeDispose as al, readonly as we, withKeys as Lt } from "vue";
2
+ import { RouterLink as ol, useRouter as Oe, useRoute as Vt, createRouter as sl, createWebHistory as il, onBeforeRouteLeave as rl } from "vue-router";
3
+ import { WxSortableList as rt, WxAction as be, WxBadge as Pe, WxSelect as xe, WxAutocomplete as Ge, WxSwitch as He, WxInputNumber as ul, WxButton as de, WxSegmented as dl, WxText as Q, WxInput as Ae, WxCheckbox as yt, WxTooltip as ut, WxEmpty as Ne, WxSkeleton as ye, WxAvatar as zt, WxDialog as dt, toast as Z, WxActions as cl, WxDropdownItem as fl, useElementWidth as ml, WxHeading as vl, WxIcon as Be, WxTabs as pl, WxCard as Qe, WxRichText as hl, useLocales as Et, WxAlert as $e, WxResult as yl, useResponsiveShell as gl, shellLayoutFor as bl, WxToaster as wl, WebxUI as _l, dateLocaleKey as kl, localesKey as xl, useModal as $l, WxFormItem as Sl, WxSpace as Tl, createModal as Cl, confirm as Re, localizedValue as Al, WxBreadcrumb as Wl, WxBreadcrumbItem as gt, WxActionBar as Ll, WxPopover as Vl, WxTextarea as bt } from "@webx-ui/core";
4
+ import { watchSystemTheme as zl, applyTheme as El, systemTheme as Ul } from "@webx-ui/tokens";
5
5
  import { WxScreenRenderer as Nl } from "@webx-ui/schema";
6
- const Be = /* @__PURE__ */ Symbol("webx-i18n");
6
+ const De = /* @__PURE__ */ Symbol("webx-i18n");
7
7
  function Rl() {
8
- const e = fe(Be, null);
8
+ const e = fe(De, null);
9
9
  if (e === null)
10
10
  throw new Error("useI18n() was called outside a panel created by createAdmin().");
11
11
  return e;
12
12
  }
13
13
  function J(e) {
14
- const t = fe(Be, null);
15
- return t === null ? ut().scope(e) : t.scope(e);
14
+ const t = fe(De, null);
15
+ return t === null ? ct().scope(e) : t.scope(e);
16
16
  }
17
17
  function Il(e, t) {
18
- e.provide(Be, t);
18
+ e.provide(De, t);
19
19
  }
20
- function ut(e = {}) {
21
- const t = e.fallback ?? "en", l = ze({
20
+ function ct(e = {}) {
21
+ const t = e.fallback ?? "en", l = Ue({
22
22
  locale: e.locale ?? t,
23
23
  fallback: t,
24
24
  panelLocales: [],
25
25
  contentLocales: []
26
- }), o = {}, a = ze({ value: {} });
27
- function i(r, f, m) {
28
- let p = r[f]?.[m[0] ?? ""];
26
+ }), o = {}, a = Ue({ value: {} });
27
+ function s(r, c, m) {
28
+ let p = r[c]?.[m[0] ?? ""];
29
29
  for (const v of m.slice(1)) {
30
30
  if (typeof p != "object" || p === null)
31
31
  return null;
@@ -33,24 +33,24 @@ function ut(e = {}) {
33
33
  }
34
34
  return typeof p == "string" ? p : null;
35
35
  }
36
- function s(r, f, m) {
37
- const [p, v] = f.includes("::") ? f.split("::", 2) : [r, f], u = v.split("."), _ = i(a.value, p, u) ?? i(o, p, u) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
36
+ function i(r, c, m) {
37
+ const [p, v] = c.includes("::") ? c.split("::", 2) : [r, c], u = v.split("."), _ = s(a.value, p, u) ?? s(o, p, u) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
38
38
  // label says nothing to anybody trying to fix it.
39
- f;
39
+ c;
40
40
  return m === void 0 ? _ : Ml(_, m);
41
41
  }
42
42
  return {
43
43
  state: l,
44
- defaults(r, f) {
45
- o[r] = { ...o[r], ...f };
44
+ defaults(r, c) {
45
+ o[r] = { ...o[r], ...c };
46
46
  },
47
- load(r, f, m) {
48
- a.value = r ?? {}, l.locale = f ?? l.locale, m !== void 0 && (l.fallback = m);
47
+ load(r, c, m) {
48
+ a.value = r ?? {}, l.locale = c ?? l.locale, m !== void 0 && (l.fallback = m);
49
49
  },
50
50
  scope(r) {
51
- return (f, m) => s(r, f, m);
51
+ return (c, m) => i(r, c, m);
52
52
  },
53
- t: (r, f) => s("", r, f)
53
+ t: (r, c) => i("", r, c)
54
54
  };
55
55
  }
56
56
  function Ml(e, t) {
@@ -63,12 +63,12 @@ function _e(e, t) {
63
63
  const l = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`, o = (a) => a.data;
64
64
  return {
65
65
  list: (a = {}) => {
66
- const i = new URLSearchParams();
67
- return a.q && i.set("q", a.q), a.visible && i.set("visible", "1"), e.http.get(i.size > 0 ? `${l}?${i}` : l);
66
+ const s = new URLSearchParams();
67
+ return a.q && s.set("q", a.q), a.visible && s.set("visible", "1"), e.http.get(s.size > 0 ? `${l}?${s}` : l);
68
68
  },
69
69
  create: (a) => e.http.post(l, a).then(o),
70
70
  get: (a) => e.http.get(`${l}/${a}`).then(o),
71
- save: (a, i) => e.http.put(`${l}/${a}`, { values: i }).then(o),
71
+ save: (a, s) => e.http.put(`${l}/${a}`, { values: s }).then(o),
72
72
  remove: (a) => e.http.delete(`${l}/${a}`).then(() => {
73
73
  }),
74
74
  restore: (a) => e.http.post(`${l}/${a}/restore`, {}).then(o),
@@ -81,7 +81,7 @@ function Ol(e, t, l, o = null) {
81
81
  return e.http.post(`${a}/reorder`, o === null ? { ids: l } : { ids: l, category: o }).then(() => {
82
82
  });
83
83
  }
84
- const Pl = { class: "wx-categories-field" }, Bl = { class: "wx-categories-field__name" }, Dl = /* @__PURE__ */ K({
84
+ const Pl = { class: "wx-categories-field" }, Bl = { class: "wx-categories-field__name" }, Dl = /* @__PURE__ */ j({
85
85
  name: "WxCategoriesField",
86
86
  __name: "CategoriesField",
87
87
  props: /* @__PURE__ */ me({
@@ -99,37 +99,37 @@ const Pl = { class: "wx-categories-field" }, Bl = { class: "wx-categories-field_
99
99
  }),
100
100
  emits: ["update:modelValue"],
101
101
  setup(e) {
102
- const t = e, l = ge(e, "modelValue"), o = ee(), a = J("webx-admin"), i = W([]);
103
- oe(
102
+ const t = e, l = ge(e, "modelValue"), o = ee(), a = J("webx-admin"), s = W([]);
103
+ se(
104
104
  () => t.source,
105
105
  async (u) => {
106
106
  try {
107
107
  const _ = await _e(o, u).list();
108
- i.value = _.data.map((S) => ({ id: S.id, name: S.name }));
108
+ s.value = _.data.map((S) => ({ id: S.id, name: S.name }));
109
109
  } catch {
110
- i.value = [];
110
+ s.value = [];
111
111
  }
112
112
  },
113
113
  { immediate: !0 }
114
114
  );
115
- const s = w(() => Array.isArray(l.value) ? l.value : []), r = w(() => new Map(i.value.map((u) => [u.id, u.name]))), f = w({
116
- get: () => s.value.map((u) => ({ id: u, name: r.value.get(u) ?? `#${u}` })),
115
+ const i = w(() => Array.isArray(l.value) ? l.value : []), r = w(() => new Map(s.value.map((u) => [u.id, u.name]))), c = w({
116
+ get: () => i.value.map((u) => ({ id: u, name: r.value.get(u) ?? `#${u}` })),
117
117
  set: (u) => {
118
118
  l.value = u.map((_) => _.id);
119
119
  }
120
120
  }), m = w(
121
- () => i.value.filter((u) => !s.value.includes(u.id)).map((u) => ({ label: u.name, value: u.id }))
121
+ () => s.value.filter((u) => !i.value.includes(u.id)).map((u) => ({ label: u.name, value: u.id }))
122
122
  );
123
123
  function p(u) {
124
- typeof u != "number" || s.value.includes(u) || (l.value = [...s.value, u]);
124
+ typeof u != "number" || i.value.includes(u) || (l.value = [...i.value, u]);
125
125
  }
126
126
  function v(u) {
127
- l.value = s.value.filter((_) => _ !== u);
127
+ l.value = i.value.filter((_) => _ !== u);
128
128
  }
129
- return (u, _) => (c(), k("div", Pl, [
130
- x(n(st), {
131
- modelValue: f.value,
132
- "onUpdate:modelValue": _[0] || (_[0] = (S) => f.value = S),
129
+ return (u, _) => (d(), x("div", Pl, [
130
+ k(n(rt), {
131
+ modelValue: c.value,
132
+ "onUpdate:modelValue": _[0] || (_[0] = (S) => c.value = S),
133
133
  plain: "",
134
134
  size: "sm",
135
135
  "item-key": "id",
@@ -137,30 +137,30 @@ const Pl = { class: "wx-categories-field" }, Bl = { class: "wx-categories-field_
137
137
  disabled: t.disabled,
138
138
  "empty-text": t.emptyText ?? n(a)("categories.field-empty")
139
139
  }, {
140
- default: b(({ item: S, index: d }) => [
140
+ default: b(({ item: S, index: f }) => [
141
141
  P("span", Bl, C(S.name), 1),
142
- t.main && d === 0 ? (c(), L(n(Oe), {
142
+ t.main && f === 0 ? (d(), L(n(Pe), {
143
143
  key: 0,
144
144
  type: "primary"
145
145
  }, {
146
146
  default: b(() => [
147
- I(C(t.mainText ?? n(a)("categories.field-main")), 1)
147
+ M(C(t.mainText ?? n(a)("categories.field-main")), 1)
148
148
  ]),
149
149
  _: 1
150
150
  })) : N("", !0)
151
151
  ]),
152
152
  actions: b(({ item: S }) => [
153
- x(n(be), {
153
+ k(n(be), {
154
154
  type: "remove",
155
155
  size: "sm",
156
156
  disabled: t.disabled,
157
157
  title: t.removeText ?? n(a)("categories.field-remove"),
158
- onClick: (d) => v(S.id)
158
+ onClick: (f) => v(S.id)
159
159
  }, null, 8, ["disabled", "title", "onClick"])
160
160
  ]),
161
161
  _: 1
162
162
  }, 8, ["modelValue", "disabled", "empty-text"]),
163
- x(n(ke), {
163
+ k(n(xe), {
164
164
  "model-value": null,
165
165
  options: m.value,
166
166
  placeholder: t.addText ?? n(a)("categories.field-add"),
@@ -173,12 +173,12 @@ const Pl = { class: "wx-categories-field" }, Bl = { class: "wx-categories-field_
173
173
  }, null, 8, ["options", "placeholder", "disabled", "empty-text", "aria-label"])
174
174
  ]));
175
175
  }
176
- }), se = (e, t) => {
176
+ }), ne = (e, t) => {
177
177
  const l = e.__vccOpts || e;
178
178
  for (const [o, a] of t)
179
179
  l[o] = a;
180
180
  return l;
181
- }, Fl = /* @__PURE__ */ se(Dl, [["__scopeId", "data-v-640cd836"]]), Hl = /* @__PURE__ */ K({
181
+ }, Fl = /* @__PURE__ */ ne(Dl, [["__scopeId", "data-v-640cd836"]]), Hl = /* @__PURE__ */ j({
182
182
  name: "WxSourceSelect",
183
183
  inheritAttrs: !1,
184
184
  __name: "SourceSelect",
@@ -188,16 +188,16 @@ const Pl = { class: "wx-categories-field" }, Bl = { class: "wx-categories-field_
188
188
  },
189
189
  setup(e) {
190
190
  const t = e, l = ee(), o = W([]);
191
- oe(
191
+ se(
192
192
  () => t.source,
193
- async (i) => {
194
- if (!i) {
193
+ async (s) => {
194
+ if (!s) {
195
195
  o.value = [];
196
196
  return;
197
197
  }
198
198
  try {
199
- const s = await _e(l, i).list();
200
- o.value = s.data.map((r) => ({ label: r.name, value: r.id }));
199
+ const i = await _e(l, s).list();
200
+ o.value = i.data.map((r) => ({ label: r.name, value: r.id }));
201
201
  } catch {
202
202
  o.value = [];
203
203
  }
@@ -205,12 +205,12 @@ const Pl = { class: "wx-categories-field" }, Bl = { class: "wx-categories-field_
205
205
  { immediate: !0 }
206
206
  );
207
207
  const a = w(() => t.source ? o.value : t.options);
208
- return (i, s) => (c(), L(n(ke), lt(i.$attrs, { options: a.value }), null, 16, ["options"]));
208
+ return (s, i) => (d(), L(n(xe), nt(s.$attrs, { options: a.value }), null, 16, ["options"]));
209
209
  }
210
210
  });
211
- class $e extends Error {
212
- constructor(t, l, o = {}, a = null, i = null) {
213
- super(t), this.status = l, this.errors = o, this.retryAfter = a, this.body = i, this.name = "HttpError";
211
+ class Se extends Error {
212
+ constructor(t, l, o = {}, a = null, s = null) {
213
+ super(t), this.status = l, this.errors = o, this.retryAfter = a, this.body = s, this.name = "HttpError";
214
214
  }
215
215
  status;
216
216
  errors;
@@ -229,43 +229,43 @@ class $e extends Error {
229
229
  }
230
230
  const jl = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
231
231
  function Kl(e = {}) {
232
- const t = (e.baseUrl ?? "").replace(/\/$/, ""), l = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", o = e.fetch ?? globalThis.fetch.bind(globalThis), a = e.onUnauthenticated, i = e.headers;
233
- let s = !1;
232
+ const t = (e.baseUrl ?? "").replace(/\/$/, ""), l = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", o = e.fetch ?? globalThis.fetch.bind(globalThis), a = e.onUnauthenticated, s = e.headers;
233
+ let i = !1;
234
234
  async function r(p = !1) {
235
- s && !p && gt("XSRF-TOKEN") !== null || (await o(l, { credentials: "same-origin" }), s = !0);
235
+ i && !p && wt("XSRF-TOKEN") !== null || (await o(l, { credentials: "same-origin" }), i = !0);
236
236
  }
237
- async function f(p, v, u = {}, _ = !1) {
237
+ async function c(p, v, u = {}, _ = !1) {
238
238
  const S = jl.has(p);
239
239
  S && await r();
240
- const d = {
240
+ const f = {
241
241
  Accept: "application/json",
242
242
  "X-Requested-With": "XMLHttpRequest",
243
243
  // Standing headers first, so a caller can still override one for a single request.
244
- ...i?.(),
244
+ ...s?.(),
245
245
  ...u.headers
246
246
  };
247
247
  if (S) {
248
- const y = gt("XSRF-TOKEN");
249
- y !== null && (d["X-XSRF-TOKEN"] = y);
248
+ const y = wt("XSRF-TOKEN");
249
+ y !== null && (f["X-XSRF-TOKEN"] = y);
250
250
  }
251
- u.json === !0 && (d["Content-Type"] = "application/json");
251
+ u.json === !0 && (f["Content-Type"] = "application/json");
252
252
  const T = await o(ql(t, v, u.query), {
253
253
  method: p,
254
254
  credentials: "same-origin",
255
- headers: d,
255
+ headers: f,
256
256
  signal: u.signal,
257
257
  body: u.body ?? void 0
258
258
  });
259
- return T.status === 419 && S && !_ ? (await r(!0), f(p, v, u, !0)) : (T.status === 401 && a?.(), T);
259
+ return T.status === 419 && S && !_ ? (await r(!0), c(p, v, u, !0)) : (T.status === 401 && a?.(), T);
260
260
  }
261
261
  async function m(p, v, u, _ = {}) {
262
- const S = await f(p, v, {
262
+ const S = await c(p, v, {
263
263
  ..._,
264
264
  json: u !== void 0,
265
265
  body: u === void 0 ? void 0 : JSON.stringify(u)
266
266
  });
267
267
  if (!S.ok)
268
- throw await Qe(S);
268
+ throw await Ze(S);
269
269
  if (S.status !== 204)
270
270
  return await S.json();
271
271
  }
@@ -275,21 +275,21 @@ function Kl(e = {}) {
275
275
  put: (p, v, u) => m("PUT", p, v, u),
276
276
  patch: (p, v, u) => m("PATCH", p, v, u),
277
277
  delete: (p, v) => m("DELETE", p, void 0, v),
278
- send: (p, v, u) => f(p.toUpperCase(), v, u)
278
+ send: (p, v, u) => c(p.toUpperCase(), v, u)
279
279
  };
280
280
  }
281
- async function Qe(e) {
281
+ async function Ze(e) {
282
282
  let t = null;
283
283
  try {
284
284
  t = await e.json();
285
285
  } catch {
286
286
  }
287
- const l = t ?? {}, o = typeof l.message == "string" && l.message !== "" ? l.message : e.statusText || `Request failed with ${e.status}`, a = l.errors !== null && typeof l.errors == "object" ? l.errors : {}, i = e.headers.get("Retry-After"), s = i === null ? null : Number.parseInt(i, 10);
288
- return new $e(
287
+ const l = t ?? {}, o = typeof l.message == "string" && l.message !== "" ? l.message : e.statusText || `Request failed with ${e.status}`, a = l.errors !== null && typeof l.errors == "object" ? l.errors : {}, s = e.headers.get("Retry-After"), i = s === null ? null : Number.parseInt(s, 10);
288
+ return new Se(
289
289
  o,
290
290
  e.status,
291
291
  a,
292
- Number.isFinite(s) ? s : null,
292
+ Number.isFinite(i) ? i : null,
293
293
  t
294
294
  );
295
295
  }
@@ -297,13 +297,13 @@ function ql(e, t, l) {
297
297
  const a = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
298
298
  if (l === void 0)
299
299
  return a;
300
- const i = new URLSearchParams();
301
- for (const [r, f] of Object.entries(l))
302
- f != null && i.set(r, String(f));
303
- const s = i.toString();
304
- return s === "" ? a : `${a}${a.includes("?") ? "&" : "?"}${s}`;
300
+ const s = new URLSearchParams();
301
+ for (const [r, c] of Object.entries(l))
302
+ c != null && s.set(r, String(c));
303
+ const i = s.toString();
304
+ return i === "" ? a : `${a}${a.includes("?") ? "&" : "?"}${i}`;
305
305
  }
306
- function gt(e) {
306
+ function wt(e) {
307
307
  if (typeof document > "u")
308
308
  return null;
309
309
  for (const t of document.cookie.split(";")) {
@@ -323,12 +323,12 @@ function Yl(e, t) {
323
323
  function Xl(e) {
324
324
  return Array.isArray(e) ? [...new Set(e.map(Number).filter((t) => Number.isInteger(t) && t > 0))] : [];
325
325
  }
326
- const Et = /* @__PURE__ */ Symbol("wx-relation-owner");
327
- function Fo(e) {
328
- Re(Et, e);
326
+ const Ut = /* @__PURE__ */ Symbol("wx-relation-owner");
327
+ function jo(e) {
328
+ Me(Ut, e);
329
329
  }
330
330
  function Jl() {
331
- return fe(Et, null);
331
+ return fe(Ut, null);
332
332
  }
333
333
  const Gl = ["src"], Ql = { class: "wx-relations-field__text" }, Zl = { class: "wx-relations-field__title" }, en = {
334
334
  key: 0,
@@ -339,7 +339,7 @@ const Gl = ["src"], Ql = { class: "wx-relations-field__text" }, Zl = { class: "w
339
339
  }, ln = {
340
340
  key: 1,
341
341
  class: "wx-relations-field__add"
342
- }, nn = /* @__PURE__ */ K({
342
+ }, nn = /* @__PURE__ */ j({
343
343
  name: "WxRelationsField",
344
344
  __name: "RelationsField",
345
345
  props: /* @__PURE__ */ me({
@@ -355,89 +355,89 @@ const Gl = ["src"], Ql = { class: "wx-relations-field__text" }, Zl = { class: "w
355
355
  }),
356
356
  emits: ["update:modelValue"],
357
357
  setup(e) {
358
- const t = e, l = ge(e, "modelValue"), o = ee(), a = Jl(), i = J("webx-admin"), s = w(() => Yl(o, t.target)), r = W(/* @__PURE__ */ new Map()), f = W(/* @__PURE__ */ new Set()), m = W(!1), p = W([]), v = W(!1), u = W(""), _ = w(() => Xl(l.value));
359
- function S(U) {
360
- const R = new Map(r.value);
361
- for (const B of U) R.set(B.id, B);
362
- r.value = R;
358
+ const t = e, l = ge(e, "modelValue"), o = ee(), a = Jl(), s = J("webx-admin"), i = w(() => Yl(o, t.target)), r = W(/* @__PURE__ */ new Map()), c = W(/* @__PURE__ */ new Set()), m = W(!1), p = W([]), v = W(!1), u = W(""), _ = w(() => Xl(l.value));
359
+ function S(E) {
360
+ const I = new Map(r.value);
361
+ for (const B of E) I.set(B.id, B);
362
+ r.value = I;
363
363
  }
364
- async function d(U) {
365
- const R = U.filter((B) => !r.value.has(B) && !f.value.has(B));
366
- if (!(R.length === 0 || m.value))
364
+ async function f(E) {
365
+ const I = E.filter((B) => !r.value.has(B) && !c.value.has(B));
366
+ if (!(I.length === 0 || m.value))
367
367
  try {
368
- const B = await s.value.named(R);
368
+ const B = await i.value.named(I);
369
369
  S(B);
370
370
  const te = new Set(B.map((re) => re.id));
371
- f.value = /* @__PURE__ */ new Set([...f.value, ...R.filter((re) => !te.has(re))]);
371
+ c.value = /* @__PURE__ */ new Set([...c.value, ...I.filter((re) => !te.has(re))]);
372
372
  } catch (B) {
373
- B instanceof $e && B.status === 403 && (m.value = !0);
373
+ B instanceof Se && B.status === 403 && (m.value = !0);
374
374
  }
375
375
  }
376
- oe(
376
+ se(
377
377
  () => t.target,
378
378
  () => {
379
- r.value = /* @__PURE__ */ new Map(), f.value = /* @__PURE__ */ new Set(), m.value = !1, p.value = [], d(_.value);
379
+ r.value = /* @__PURE__ */ new Map(), c.value = /* @__PURE__ */ new Set(), m.value = !1, p.value = [], f(_.value);
380
380
  }
381
- ), oe(_, (U) => {
382
- d(U);
381
+ ), se(_, (E) => {
382
+ f(E);
383
383
  }, { immediate: !0 });
384
384
  const T = w({
385
- get: () => _.value.map((U) => {
386
- const R = r.value.get(U) ?? null;
387
- return { id: U, title: R?.title || `#${U}`, candidate: R };
385
+ get: () => _.value.map((E) => {
386
+ const I = r.value.get(E) ?? null;
387
+ return { id: E, title: I?.title || `#${E}`, candidate: I };
388
388
  }),
389
- set: (U) => {
390
- l.value = U.map((R) => R.id);
389
+ set: (E) => {
390
+ l.value = E.map((I) => I.id);
391
391
  }
392
392
  }), y = w(() => t.max !== null && _.value.length >= t.max), V = w(() => a !== null && a.type === t.target ? a.id.value : null), O = w(
393
- () => p.value.filter((U) => U.id !== V.value && !_.value.includes(U.id)).map((U) => ({
394
- value: U.title,
395
- description: [U.subtitle, U.visible ? null : i("relations.field-hidden")].filter((R) => typeof R == "string" && R !== "").join(" · "),
396
- id: U.id
393
+ () => p.value.filter((E) => E.id !== V.value && !_.value.includes(E.id)).map((E) => ({
394
+ value: E.title,
395
+ description: [E.subtitle, E.visible ? null : s("relations.field-hidden")].filter((I) => typeof I == "string" && I !== "").join(" · "),
396
+ id: E.id
397
397
  }))
398
398
  );
399
- async function q(U) {
399
+ async function q(E) {
400
400
  v.value = !0;
401
401
  try {
402
- const R = await s.value.search(U);
403
- p.value = R, S(R);
404
- } catch (R) {
405
- p.value = [], R instanceof $e && R.status === 403 && (m.value = !0);
402
+ const I = await i.value.search(E);
403
+ p.value = I, S(I);
404
+ } catch (I) {
405
+ p.value = [], I instanceof Se && I.status === 403 && (m.value = !0);
406
406
  } finally {
407
407
  v.value = !1;
408
408
  }
409
409
  }
410
- function H(U) {
411
- const R = Number(U.id);
412
- !Number.isInteger(R) || _.value.includes(R) || y.value || (l.value = [..._.value, R], nt(() => {
410
+ function H(E) {
411
+ const I = Number(E.id);
412
+ !Number.isInteger(I) || _.value.includes(I) || y.value || (l.value = [..._.value, I], at(() => {
413
413
  u.value = "";
414
414
  }));
415
415
  }
416
- function h(U) {
417
- l.value = _.value.filter((R) => R !== U);
416
+ function h(E) {
417
+ l.value = _.value.filter((I) => I !== E);
418
418
  }
419
419
  const A = w(() => t.disabled || m.value), $ = w(
420
- () => y.value ? i("relations.field-full", { max: String(t.max) }) : t.addText ?? i("relations.field-add")
420
+ () => y.value ? s("relations.field-full", { max: String(t.max) }) : t.addText ?? s("relations.field-add")
421
421
  );
422
- function M(U) {
423
- return U.candidate === null ? f.value.has(U.id) ? i("relations.field-missing") : null : U.candidate.trashed === !0 ? i("relations.field-trashed") : U.candidate.visible ? null : i("relations.field-hidden");
422
+ function R(E) {
423
+ return E.candidate === null ? c.value.has(E.id) ? s("relations.field-missing") : null : E.candidate.trashed === !0 ? s("relations.field-trashed") : E.candidate.visible ? null : s("relations.field-hidden");
424
424
  }
425
- return (U, R) => (c(), k("div", {
425
+ return (E, I) => (d(), x("div", {
426
426
  class: ve(["wx-relations-field", { "is-unordered": !t.sortable }])
427
427
  }, [
428
- x(n(st), {
428
+ k(n(rt), {
429
429
  modelValue: T.value,
430
- "onUpdate:modelValue": R[0] || (R[0] = (B) => T.value = B),
430
+ "onUpdate:modelValue": I[0] || (I[0] = (B) => T.value = B),
431
431
  plain: "",
432
432
  size: "sm",
433
433
  "item-key": "id",
434
434
  "item-label": "title",
435
435
  disabled: A.value || !t.sortable,
436
- "empty-text": t.emptyText ?? n(i)("relations.field-empty"),
437
- "drag-label": n(i)("relations.field-drag")
438
- }, Ie({
436
+ "empty-text": t.emptyText ?? n(s)("relations.field-empty"),
437
+ "drag-label": n(s)("relations.field-drag")
438
+ }, Te({
439
439
  default: b(({ item: B }) => [
440
- B.candidate?.thumb ? (c(), k("img", {
440
+ B.candidate?.thumb ? (d(), x("img", {
441
441
  key: 0,
442
442
  class: "wx-relations-field__thumb",
443
443
  src: B.candidate.thumb,
@@ -445,14 +445,14 @@ const Gl = ["src"], Ql = { class: "wx-relations-field__text" }, Zl = { class: "w
445
445
  }, null, 8, Gl)) : N("", !0),
446
446
  P("span", Ql, [
447
447
  P("span", Zl, C(B.title), 1),
448
- B.candidate?.subtitle ? (c(), k("span", en, C(B.candidate.subtitle), 1)) : N("", !0)
448
+ B.candidate?.subtitle ? (d(), x("span", en, C(B.candidate.subtitle), 1)) : N("", !0)
449
449
  ]),
450
- M(B) ? (c(), L(n(Oe), {
450
+ R(B) ? (d(), L(n(Pe), {
451
451
  key: 1,
452
452
  type: "warning"
453
453
  }, {
454
454
  default: b(() => [
455
- I(C(M(B)), 1)
455
+ M(C(R(B)), 1)
456
456
  ]),
457
457
  _: 2
458
458
  }, 1024)) : N("", !0)
@@ -462,26 +462,26 @@ const Gl = ["src"], Ql = { class: "wx-relations-field__text" }, Zl = { class: "w
462
462
  A.value ? void 0 : {
463
463
  name: "actions",
464
464
  fn: b(({ item: B }) => [
465
- x(n(be), {
465
+ k(n(be), {
466
466
  type: "remove",
467
467
  size: "sm",
468
- title: n(i)("relations.field-remove"),
468
+ title: n(s)("relations.field-remove"),
469
469
  onClick: (te) => h(B.id)
470
470
  }, null, 8, ["title", "onClick"])
471
471
  ]),
472
472
  key: "0"
473
473
  }
474
474
  ]), 1032, ["modelValue", "disabled", "empty-text", "drag-label"]),
475
- m.value ? (c(), k("p", tn, C(n(i)("relations.field-forbidden")), 1)) : (c(), k("div", ln, [
476
- x(n(Je), {
475
+ m.value ? (d(), x("p", tn, C(n(s)("relations.field-forbidden")), 1)) : (d(), x("div", ln, [
476
+ k(n(Ge), {
477
477
  modelValue: u.value,
478
- "onUpdate:modelValue": R[1] || (R[1] = (B) => u.value = B),
478
+ "onUpdate:modelValue": I[1] || (I[1] = (B) => u.value = B),
479
479
  options: O.value,
480
480
  remote: "",
481
481
  teleport: "",
482
482
  loading: v.value,
483
- "loading-text": n(i)("relations.field-searching"),
484
- "empty-text": n(i)("relations.field-nothing"),
483
+ "loading-text": n(s)("relations.field-searching"),
484
+ "empty-text": n(s)("relations.field-nothing"),
485
485
  placeholder: $.value,
486
486
  "aria-label": $.value,
487
487
  disabled: t.disabled || y.value,
@@ -491,10 +491,10 @@ const Gl = ["src"], Ql = { class: "wx-relations-field__text" }, Zl = { class: "w
491
491
  ]))
492
492
  ], 2));
493
493
  }
494
- }), Nt = /* @__PURE__ */ se(nn, [["__scopeId", "data-v-5ecf0e47"]]), Rt = 100, He = /* @__PURE__ */ new WeakMap();
494
+ }), Nt = /* @__PURE__ */ ne(nn, [["__scopeId", "data-v-5ecf0e47"]]), Rt = 100, je = /* @__PURE__ */ new WeakMap();
495
495
  function an(e) {
496
- let t = He.get(e);
497
- return t === void 0 && (t = e.http.get(`${e.apiPath}/collections`).then((l) => l.data.map((o) => ({ ...o, relations: on(o) }))), t.catch(() => He.delete(e)), He.set(e, t)), t;
496
+ let t = je.get(e);
497
+ return t === void 0 && (t = e.http.get(`${e.apiPath}/collections`).then((l) => l.data.map((o) => ({ ...o, relations: on(o) }))), t.catch(() => je.delete(e)), je.set(e, t)), t;
498
498
  }
499
499
  function on(e) {
500
500
  return Array.isArray(e.relations) ? e.relations.flatMap((t) => {
@@ -523,7 +523,7 @@ function sn(e) {
523
523
  const a = It(l);
524
524
  return typeof t == "string" && t !== "" && a.length > 0 ? { type: t, ids: a } : null;
525
525
  }
526
- function bt(e) {
526
+ function _t(e) {
527
527
  const t = typeof e == "object" && e !== null && !Array.isArray(e) ? e : {}, l = typeof t.limit == "number" && Number.isInteger(t.limit) ? t.limit : null;
528
528
  return {
529
529
  categories: It(t.categories),
@@ -533,7 +533,7 @@ function bt(e) {
533
533
  markup: typeof t.markup == "boolean" ? t.markup : null
534
534
  };
535
535
  }
536
- function wt(e) {
536
+ function kt(e) {
537
537
  return e.categories.length === 0 && e.related === null;
538
538
  }
539
539
  const rn = ["aria-busy"], un = {
@@ -548,7 +548,7 @@ const rn = ["aria-busy"], un = {
548
548
  }, vn = { class: "wx-collection-field__label" }, pn = { class: "wx-collection-field__hint" }, hn = { class: "wx-collection-field__row" }, yn = ["for"], gn = { class: "wx-collection-field__limit" }, bn = {
549
549
  key: 3,
550
550
  class: "wx-collection-field__markup"
551
- }, wn = { class: "wx-collection-field__hint" }, _n = /* @__PURE__ */ K({
551
+ }, wn = { class: "wx-collection-field__hint" }, _n = /* @__PURE__ */ j({
552
552
  name: "WxCollectionField",
553
553
  __name: "CollectionField",
554
554
  props: /* @__PURE__ */ me({
@@ -560,19 +560,19 @@ const rn = ["aria-busy"], un = {
560
560
  }),
561
561
  emits: ["update:modelValue"],
562
562
  setup(e) {
563
- const t = e, l = ge(e, "modelValue"), o = ee(), a = J("webx-admin"), i = Xt(), s = W(void 0), r = W([]);
564
- oe(
563
+ const t = e, l = ge(e, "modelValue"), o = ee(), a = J("webx-admin"), s = Xt(), i = W(void 0), r = W([]);
564
+ se(
565
565
  () => t.source,
566
566
  async (h) => {
567
- s.value = void 0, r.value = [];
567
+ i.value = void 0, r.value = [];
568
568
  try {
569
- s.value = (await an(o)).find((A) => A.key === h) ?? null;
569
+ i.value = (await an(o)).find((A) => A.key === h) ?? null;
570
570
  } catch {
571
- s.value = null;
571
+ i.value = null;
572
572
  }
573
- if (s.value?.categories)
573
+ if (i.value?.categories)
574
574
  try {
575
- const A = await _e(o, s.value.categories).list();
575
+ const A = await _e(o, i.value.categories).list();
576
576
  r.value = A.data.map(($) => ({ label: $.name, value: $.id }));
577
577
  } catch {
578
578
  r.value = [];
@@ -580,12 +580,12 @@ const rn = ["aria-busy"], un = {
580
580
  },
581
581
  { immediate: !0 }
582
582
  );
583
- const f = w(() => bt(l.value));
583
+ const c = w(() => _t(l.value));
584
584
  function m(h) {
585
- l.value = bt({ ...f.value, ...h });
585
+ l.value = _t({ ...c.value, ...h });
586
586
  }
587
587
  const p = w(() => {
588
- const h = new Set(r.value.map(($) => $.value)), A = f.value.categories.filter(($) => !h.has($)).map(($) => ({ label: `#${$}`, value: $ }));
588
+ const h = new Set(r.value.map(($) => $.value)), A = c.value.categories.filter(($) => !h.has($)).map(($) => ({ label: `#${$}`, value: $ }));
589
589
  return [...r.value, ...A];
590
590
  });
591
591
  function v(h) {
@@ -595,49 +595,49 @@ const rn = ["aria-busy"], un = {
595
595
  m({ limit: h ?? null });
596
596
  }
597
597
  const _ = W(null), S = w(
598
- () => (s.value?.relations ?? []).map((h) => ({ label: h.title, value: h.key }))
599
- ), d = w(() => {
600
- const h = s.value?.relations ?? [];
598
+ () => (i.value?.relations ?? []).map((h) => ({ label: h.title, value: h.key }))
599
+ ), f = w(() => {
600
+ const h = i.value?.relations ?? [];
601
601
  if (h.length === 1) return h[0];
602
- const A = f.value.related?.type ?? _.value;
602
+ const A = c.value.related?.type ?? _.value;
603
603
  return h.find(($) => $.key === A) ?? null;
604
604
  });
605
605
  function T(h) {
606
606
  _.value = typeof h == "string" ? h : null, m({ related: null });
607
607
  }
608
608
  function y(h) {
609
- const A = d.value?.key;
609
+ const A = f.value?.key;
610
610
  m({ related: A && h && h.length > 0 ? { type: A, ids: h } : null });
611
611
  }
612
612
  function V(h) {
613
- const A = d.value?.key;
613
+ const A = f.value?.key;
614
614
  m({ related: h && A ? { type: A, ids: [], current: !0 } : null });
615
615
  }
616
- const O = w(() => f.value.markup ?? wt(f.value));
616
+ const O = w(() => c.value.markup ?? kt(c.value));
617
617
  function q(h) {
618
618
  m({ markup: h === !0 });
619
619
  }
620
620
  const H = w(
621
621
  () => a(
622
- wt(f.value) ? "collections.field-markup-auto-on" : "collections.field-markup-auto-off"
622
+ kt(c.value) ? "collections.field-markup-auto-on" : "collections.field-markup-auto-off"
623
623
  )
624
624
  );
625
- return (h, A) => (c(), k("div", {
625
+ return (h, A) => (d(), x("div", {
626
626
  class: "wx-collection-field",
627
- "aria-busy": s.value === void 0
627
+ "aria-busy": i.value === void 0
628
628
  }, [
629
- s.value === null ? (c(), k("p", un, C(n(a)("collections.field-unavailable", { source: t.source })), 1)) : s.value ? (c(), k(j, { key: 1 }, [
630
- P("p", dn, C(n(a)("collections.field-source", { source: s.value.title })), 1),
631
- s.value.categories ? (c(), k("div", cn, [
629
+ i.value === null ? (d(), x("p", un, C(n(a)("collections.field-unavailable", { source: t.source })), 1)) : i.value ? (d(), x(K, { key: 1 }, [
630
+ P("p", dn, C(n(a)("collections.field-source", { source: i.value.title })), 1),
631
+ i.value.categories ? (d(), x("div", cn, [
632
632
  P("label", {
633
633
  class: "wx-collection-field__label",
634
- for: `${n(i)}-categories`
634
+ for: `${n(s)}-categories`
635
635
  }, C(n(a)("collections.field-categories")), 9, fn),
636
- x(n(ke), {
637
- id: `${n(i)}-categories`,
638
- "model-value": f.value.categories,
636
+ k(n(xe), {
637
+ id: `${n(s)}-categories`,
638
+ "model-value": c.value.categories,
639
639
  options: p.value,
640
- placeholder: f.value.categories.length === 0 ? n(a)("collections.field-all") : "",
640
+ placeholder: c.value.categories.length === 0 ? n(a)("collections.field-all") : "",
641
641
  "empty-text": n(a)("collections.field-no-categories"),
642
642
  disabled: t.disabled,
643
643
  multiple: "",
@@ -647,11 +647,11 @@ const rn = ["aria-busy"], un = {
647
647
  "onUpdate:modelValue": v
648
648
  }, null, 8, ["id", "model-value", "options", "placeholder", "empty-text", "disabled"])
649
649
  ])) : N("", !0),
650
- s.value.relations.length > 0 ? (c(), k("div", mn, [
651
- P("span", vn, C(s.value.relations.length === 1 ? n(a)("relations.collection-related-to", { target: s.value.relations[0].title }) : n(a)("relations.collection-related")), 1),
652
- s.value.relations.length > 1 ? (c(), L(n(ke), {
650
+ i.value.relations.length > 0 ? (d(), x("div", mn, [
651
+ P("span", vn, C(i.value.relations.length === 1 ? n(a)("relations.collection-related-to", { target: i.value.relations[0].title }) : n(a)("relations.collection-related")), 1),
652
+ i.value.relations.length > 1 ? (d(), L(n(xe), {
653
653
  key: 0,
654
- "model-value": d.value?.key ?? null,
654
+ "model-value": f.value?.key ?? null,
655
655
  options: S.value,
656
656
  placeholder: n(a)("relations.collection-related-type"),
657
657
  "aria-label": n(a)("relations.collection-related-type"),
@@ -660,19 +660,19 @@ const rn = ["aria-busy"], un = {
660
660
  teleport: "",
661
661
  "onUpdate:modelValue": T
662
662
  }, null, 8, ["model-value", "options", "placeholder", "aria-label", "disabled"])) : N("", !0),
663
- d.value ? (c(), k(j, { key: 1 }, [
664
- x(n(Fe), {
665
- "model-value": f.value.related?.current === !0,
663
+ f.value ? (d(), x(K, { key: 1 }, [
664
+ k(n(He), {
665
+ "model-value": c.value.related?.current === !0,
666
666
  label: n(a)("relations.collection-related-current"),
667
667
  disabled: t.disabled,
668
668
  "onUpdate:modelValue": A[0] || (A[0] = ($) => V($ === !0))
669
669
  }, null, 8, ["model-value", "label", "disabled"]),
670
- P("p", pn, C(n(a)("relations.collection-related-current-hint", { target: d.value.title })), 1)
670
+ P("p", pn, C(n(a)("relations.collection-related-current-hint", { target: f.value.title })), 1)
671
671
  ], 64)) : N("", !0),
672
- d.value && f.value.related?.current !== !0 ? (c(), L(Nt, {
672
+ f.value && c.value.related?.current !== !0 ? (d(), L(Nt, {
673
673
  key: 2,
674
- "model-value": f.value.related?.ids ?? [],
675
- target: d.value.key,
674
+ "model-value": c.value.related?.ids ?? [],
675
+ target: f.value.key,
676
676
  sortable: !1,
677
677
  "empty-text": n(a)("relations.collection-related-any"),
678
678
  disabled: t.disabled,
@@ -682,12 +682,12 @@ const rn = ["aria-busy"], un = {
682
682
  P("div", hn, [
683
683
  P("label", {
684
684
  class: "wx-collection-field__label",
685
- for: `${n(i)}-limit`
685
+ for: `${n(s)}-limit`
686
686
  }, C(n(a)("collections.field-limit")), 9, yn),
687
687
  P("div", gn, [
688
- x(n(ul), {
689
- id: `${n(i)}-limit`,
690
- "model-value": f.value.limit,
688
+ k(n(ul), {
689
+ id: `${n(s)}-limit`,
690
+ "model-value": c.value.limit,
691
691
  min: 1,
692
692
  max: n(Rt),
693
693
  step: 1,
@@ -698,22 +698,22 @@ const rn = ["aria-busy"], un = {
698
698
  }, null, 8, ["id", "model-value", "max", "placeholder", "disabled"])
699
699
  ])
700
700
  ]),
701
- s.value.categories ? (c(), L(n(Fe), {
701
+ i.value.categories ? (d(), L(n(He), {
702
702
  key: 2,
703
- "model-value": f.value.filter,
703
+ "model-value": c.value.filter,
704
704
  label: n(a)("collections.field-filter"),
705
705
  disabled: t.disabled,
706
706
  "onUpdate:modelValue": A[1] || (A[1] = ($) => m({ filter: $ === !0 }))
707
707
  }, null, 8, ["model-value", "label", "disabled"])) : N("", !0),
708
- s.value.markup ? (c(), k("div", bn, [
709
- x(n(Fe), {
708
+ i.value.markup ? (d(), x("div", bn, [
709
+ k(n(He), {
710
710
  "model-value": O.value,
711
711
  label: n(a)("collections.field-markup"),
712
712
  disabled: t.disabled,
713
713
  "onUpdate:modelValue": q
714
714
  }, null, 8, ["model-value", "label", "disabled"]),
715
715
  P("p", wn, C(H.value), 1),
716
- f.value.markup !== null ? (c(), L(n(de), {
716
+ c.value.markup !== null ? (d(), L(n(de), {
717
717
  key: 0,
718
718
  class: "wx-collection-field__reset",
719
719
  variant: "text",
@@ -722,7 +722,7 @@ const rn = ["aria-busy"], un = {
722
722
  onClick: A[2] || (A[2] = ($) => m({ markup: null }))
723
723
  }, {
724
724
  default: b(() => [
725
- I(C(n(a)("collections.field-markup-reset")), 1)
725
+ M(C(n(a)("collections.field-markup-reset")), 1)
726
726
  ]),
727
727
  _: 1
728
728
  }, 8, ["disabled"])) : N("", !0)
@@ -730,8 +730,8 @@ const rn = ["aria-busy"], un = {
730
730
  ], 64)) : N("", !0)
731
731
  ], 8, rn));
732
732
  }
733
- }), xn = /* @__PURE__ */ se(_n, [["__scopeId", "data-v-023ad095"]]);
734
- function kn() {
733
+ }), kn = /* @__PURE__ */ ne(_n, [["__scopeId", "data-v-023ad095"]]);
734
+ function xn() {
735
735
  return {
736
736
  target: "entity",
737
737
  entity_type: null,
@@ -746,7 +746,7 @@ function $n(e) {
746
746
  const t = `${e.apiPath}/links`, l = (o) => o.data;
747
747
  return {
748
748
  sources: () => e.http.get(`${t}/sources`).then(l),
749
- search: (o, a, i) => e.http.get(`${t}/search`, { query: { type: o, q: a, locale: i } }).then(l),
749
+ search: (o, a, s) => e.http.get(`${t}/search`, { query: { type: o, q: a, locale: s } }).then(l),
750
750
  resolve: (o, a) => e.http.post(`${t}/resolve`, { links: o, locale: a }).then(l),
751
751
  routes: () => e.http.get(`${t}/routes`).then(l)
752
752
  };
@@ -763,7 +763,7 @@ const Sn = { class: "wx-link-picker" }, Tn = {
763
763
  }, Wn = {
764
764
  key: 3,
765
765
  class: "wx-link-picker__attributes"
766
- }, Ln = { class: "wx-link-picker__rel" }, Vn = /* @__PURE__ */ K({
766
+ }, Ln = { class: "wx-link-picker__rel" }, Vn = /* @__PURE__ */ j({
767
767
  name: "WxLinkPicker",
768
768
  __name: "LinkPicker",
769
769
  props: /* @__PURE__ */ me({
@@ -776,18 +776,18 @@ const Sn = { class: "wx-link-picker" }, Tn = {
776
776
  }),
777
777
  emits: ["update:modelValue"],
778
778
  setup(e) {
779
- const t = e, l = ge(e, "modelValue"), o = ee(), a = Rl(), i = $n(o), s = J("webx-admin"), r = W([]), f = W([]), m = W([]), p = W(!1), v = W(null), u = W(""), _ = W(null);
779
+ const t = e, l = ge(e, "modelValue"), o = ee(), a = Rl(), s = $n(o), i = J("webx-admin"), r = W([]), c = W([]), m = W([]), p = W(!1), v = W(null), u = W(""), _ = W(null);
780
780
  let S = null;
781
- const d = w(() => l.value ?? kn()), T = w(() => {
781
+ const f = w(() => l.value ?? xn()), T = w(() => {
782
782
  const g = [
783
- { value: "entity", label: s("links.target-entity") },
784
- { value: "url", label: s("links.target-url") }
783
+ { value: "entity", label: i("links.target-entity") },
784
+ { value: "url", label: i("links.target-url") }
785
785
  ];
786
- return t.allowNone ? [...g, { value: "none", label: s("links.target-none") }] : g;
786
+ return t.allowNone ? [...g, { value: "none", label: i("links.target-none") }] : g;
787
787
  }), y = w(
788
788
  () => r.value.map((g) => ({ value: g.type, label: g.title }))
789
789
  ), V = w(
790
- () => f.value.map((g) => ({
790
+ () => c.value.map((g) => ({
791
791
  value: g.title,
792
792
  description: ce(g),
793
793
  id: g.id
@@ -795,27 +795,27 @@ const Sn = { class: "wx-link-picker" }, Tn = {
795
795
  ), O = w(
796
796
  () => m.value.map((g) => ({ value: g.path, description: g.name }))
797
797
  );
798
- Se(async () => {
799
- r.value = await i.sources(), v.value = d.value.entity_type ?? r.value[0]?.type ?? null, await Promise.all([q(), H()]);
800
- }), oe(
801
- () => [d.value.entity_type, d.value.entity_id].join(":"),
798
+ Ce(async () => {
799
+ r.value = await s.sources(), v.value = f.value.entity_type ?? r.value[0]?.type ?? null, await Promise.all([q(), H()]);
800
+ }), se(
801
+ () => [f.value.entity_type, f.value.entity_id].join(":"),
802
802
  () => {
803
803
  q();
804
804
  }
805
805
  );
806
806
  async function q() {
807
- const { entity_type: g, entity_id: z } = d.value;
807
+ const { entity_type: g, entity_id: z } = f.value;
808
808
  if (g === null || z === null) {
809
809
  _.value = null, u.value = "";
810
810
  return;
811
811
  }
812
812
  if (_.value?.id === z)
813
813
  return;
814
- const [E] = await i.resolve([{ type: g, id: z }], a.state.locale);
815
- _.value = E ?? null, u.value = E?.title ?? s("links.missing"), S = u.value;
814
+ const [U] = await s.resolve([{ type: g, id: z }], a.state.locale);
815
+ _.value = U ?? null, u.value = U?.title ?? i("links.missing"), S = u.value;
816
816
  }
817
817
  async function H() {
818
- m.value = await i.routes();
818
+ m.value = await s.routes();
819
819
  }
820
820
  async function h(g) {
821
821
  if (g === S) {
@@ -825,101 +825,101 @@ const Sn = { class: "wx-link-picker" }, Tn = {
825
825
  if (S = null, v.value !== null) {
826
826
  p.value = !0;
827
827
  try {
828
- f.value = await i.search(v.value, g, a.state.locale);
828
+ c.value = await s.search(v.value, g, a.state.locale);
829
829
  } finally {
830
830
  p.value = !1;
831
831
  }
832
832
  }
833
833
  }
834
834
  function A(g) {
835
- g !== void 0 && (l.value = { ...d.value, target: g });
835
+ g !== void 0 && (l.value = { ...f.value, target: g });
836
836
  }
837
837
  function $(g) {
838
- v.value = g == null ? null : String(g), f.value = [], h("");
838
+ v.value = g == null ? null : String(g), c.value = [], h("");
839
839
  }
840
- function M(g) {
841
- const z = f.value.find((E) => E.id === g.id);
842
- z === void 0 || v.value === null || (_.value = z, u.value = z.title, l.value = { ...d.value, entity_type: v.value, entity_id: z.id });
840
+ function R(g) {
841
+ const z = c.value.find((U) => U.id === g.id);
842
+ z === void 0 || v.value === null || (_.value = z, u.value = z.title, l.value = { ...f.value, entity_type: v.value, entity_id: z.id });
843
843
  }
844
- function U() {
845
- _.value = null, u.value = "", f.value = [], l.value = { ...d.value, entity_type: null, entity_id: null };
844
+ function E() {
845
+ _.value = null, u.value = "", c.value = [], l.value = { ...f.value, entity_type: null, entity_id: null };
846
846
  }
847
- function R(g) {
848
- l.value = { ...d.value, url: g === "" ? null : g };
847
+ function I(g) {
848
+ l.value = { ...f.value, url: g === "" ? null : g };
849
849
  }
850
850
  function B(g) {
851
851
  const z = (typeof g == "string" || typeof g == "number" ? String(g) : "").replace(/^#+/, "").trim();
852
- l.value = { ...d.value, hash: z === "" ? null : z };
852
+ l.value = { ...f.value, hash: z === "" ? null : z };
853
853
  }
854
854
  function te(g) {
855
- l.value = { ...d.value, new_tab: g };
855
+ l.value = { ...f.value, new_tab: g };
856
856
  }
857
857
  function re(g, z) {
858
- const E = d.value.rel.filter((X) => X !== g);
859
- l.value = { ...d.value, rel: z ? [...E, g] : E };
858
+ const U = f.value.rel.filter((X) => X !== g);
859
+ l.value = { ...f.value, rel: z ? [...U, g] : U };
860
860
  }
861
861
  function ce(g) {
862
862
  const z = [g.hint, g.url ?? void 0].filter(
863
- (E) => typeof E == "string" && E !== ""
863
+ (U) => typeof U == "string" && U !== ""
864
864
  );
865
- return g.available || z.push(s("links.unavailable")), z.join(" · ");
865
+ return g.available || z.push(i("links.unavailable")), z.join(" · ");
866
866
  }
867
867
  const D = ["nofollow", "sponsored", "ugc"];
868
- return (g, z) => (c(), k("div", Sn, [
869
- x(n(dl), {
868
+ return (g, z) => (d(), x("div", Sn, [
869
+ k(n(dl), {
870
870
  options: T.value,
871
- "model-value": d.value.target,
871
+ "model-value": f.value.target,
872
872
  disabled: t.disabled,
873
- "aria-label": n(s)("links.target-entity"),
873
+ "aria-label": n(i)("links.target-entity"),
874
874
  "onUpdate:modelValue": A
875
875
  }, null, 8, ["options", "model-value", "disabled", "aria-label"]),
876
- d.value.target === "entity" ? (c(), k("div", Tn, [
877
- y.value.length > 1 ? (c(), L(n(ke), {
876
+ f.value.target === "entity" ? (d(), x("div", Tn, [
877
+ y.value.length > 1 ? (d(), L(n(xe), {
878
878
  key: 0,
879
879
  class: "wx-link-picker__section",
880
880
  options: y.value,
881
881
  "model-value": v.value,
882
882
  disabled: t.disabled,
883
- "aria-label": n(s)("links.section"),
883
+ "aria-label": n(i)("links.section"),
884
884
  "onUpdate:modelValue": $
885
885
  }, null, 8, ["options", "model-value", "disabled", "aria-label"])) : N("", !0),
886
- x(n(Je), {
886
+ k(n(Ge), {
887
887
  class: "wx-link-picker__search",
888
888
  "model-value": u.value,
889
889
  options: V.value,
890
890
  remote: "",
891
891
  clearable: "",
892
892
  loading: p.value,
893
- "loading-text": n(s)("links.searching"),
894
- "empty-text": n(s)("links.empty"),
895
- placeholder: n(s)("links.search"),
896
- "aria-label": n(s)("links.search"),
893
+ "loading-text": n(i)("links.searching"),
894
+ "empty-text": n(i)("links.empty"),
895
+ placeholder: n(i)("links.search"),
896
+ "aria-label": n(i)("links.search"),
897
897
  disabled: t.disabled,
898
- "onUpdate:modelValue": z[0] || (z[0] = (E) => u.value = E),
898
+ "onUpdate:modelValue": z[0] || (z[0] = (U) => u.value = U),
899
899
  onSearch: h,
900
- onSelect: M,
901
- onClear: U
900
+ onSelect: R,
901
+ onClear: E
902
902
  }, null, 8, ["model-value", "options", "loading", "loading-text", "empty-text", "placeholder", "aria-label", "disabled"])
903
- ])) : d.value.target === "url" ? (c(), k("div", Cn, [
904
- x(n(Je), {
905
- "model-value": d.value.url ?? "",
903
+ ])) : f.value.target === "url" ? (d(), x("div", Cn, [
904
+ k(n(Ge), {
905
+ "model-value": f.value.url ?? "",
906
906
  options: O.value,
907
907
  clearable: "",
908
908
  "open-on-focus": "",
909
- "empty-text": n(s)("links.url-routes"),
910
- placeholder: n(s)("links.url-placeholder"),
911
- "aria-label": n(s)("links.url-label"),
909
+ "empty-text": n(i)("links.url-routes"),
910
+ placeholder: n(i)("links.url-placeholder"),
911
+ "aria-label": n(i)("links.url-label"),
912
912
  disabled: t.disabled,
913
- "onUpdate:modelValue": R
913
+ "onUpdate:modelValue": I
914
914
  }, null, 8, ["model-value", "options", "empty-text", "placeholder", "aria-label", "disabled"])
915
915
  ])) : N("", !0),
916
- d.value.target !== "none" ? (c(), k("label", An, [
917
- x(n(Q), {
916
+ f.value.target !== "none" ? (d(), x("label", An, [
917
+ k(n(Q), {
918
918
  size: "sm",
919
919
  tone: "muted"
920
920
  }, {
921
921
  default: b(() => [
922
- I(C(n(s)("links.hash")), 1)
922
+ M(C(n(i)("links.hash")), 1)
923
923
  ]),
924
924
  _: 1
925
925
  }),
@@ -927,44 +927,44 @@ const Sn = { class: "wx-link-picker" }, Tn = {
927
927
  class: "wx-link-picker__sign",
928
928
  "aria-hidden": "true"
929
929
  }, "#", -1)),
930
- x(n(Te), {
931
- "model-value": d.value.hash ?? "",
932
- placeholder: n(s)("links.hash-placeholder"),
933
- "aria-label": n(s)("links.hash"),
930
+ k(n(Ae), {
931
+ "model-value": f.value.hash ?? "",
932
+ placeholder: n(i)("links.hash-placeholder"),
933
+ "aria-label": n(i)("links.hash"),
934
934
  disabled: t.disabled,
935
935
  clearable: "",
936
936
  "onUpdate:modelValue": B
937
937
  }, null, 8, ["model-value", "placeholder", "aria-label", "disabled"])
938
938
  ])) : N("", !0),
939
- t.attributes && d.value.target !== "none" ? (c(), k("div", Wn, [
940
- x(n(pt), {
941
- "model-value": d.value.new_tab,
939
+ t.attributes && f.value.target !== "none" ? (d(), x("div", Wn, [
940
+ k(n(yt), {
941
+ "model-value": f.value.new_tab,
942
942
  disabled: t.disabled,
943
- "onUpdate:modelValue": z[1] || (z[1] = (E) => te(E))
943
+ "onUpdate:modelValue": z[1] || (z[1] = (U) => te(U))
944
944
  }, {
945
945
  default: b(() => [
946
- I(C(n(s)("links.new-tab")), 1)
946
+ M(C(n(i)("links.new-tab")), 1)
947
947
  ]),
948
948
  _: 1
949
949
  }, 8, ["model-value", "disabled"]),
950
950
  P("div", Ln, [
951
- x(n(Q), {
951
+ k(n(Q), {
952
952
  size: "sm",
953
953
  tone: "muted"
954
954
  }, {
955
955
  default: b(() => [
956
- I(C(n(s)("links.rel")), 1)
956
+ M(C(n(i)("links.rel")), 1)
957
957
  ]),
958
958
  _: 1
959
959
  }),
960
- (c(), k(j, null, ie(D, (E) => x(n(pt), {
961
- key: E,
962
- "model-value": d.value.rel.includes(E),
960
+ (d(), x(K, null, ie(D, (U) => k(n(yt), {
961
+ key: U,
962
+ "model-value": f.value.rel.includes(U),
963
963
  disabled: t.disabled,
964
- "onUpdate:modelValue": (X) => re(E, X)
964
+ "onUpdate:modelValue": (X) => re(U, X)
965
965
  }, {
966
966
  default: b(() => [
967
- I(C(n(s)(`links.rel-${E}`)), 1)
967
+ M(C(n(i)(`links.rel-${U}`)), 1)
968
968
  ]),
969
969
  _: 2
970
970
  }, 1032, ["model-value", "disabled", "onUpdate:modelValue"])), 64))
@@ -972,7 +972,7 @@ const Sn = { class: "wx-link-picker" }, Tn = {
972
972
  ])) : N("", !0)
973
973
  ]));
974
974
  }
975
- }), zn = /* @__PURE__ */ se(Vn, [["__scopeId", "data-v-e54022e5"]]), Un = /* @__PURE__ */ K({
975
+ }), zn = /* @__PURE__ */ ne(Vn, [["__scopeId", "data-v-e54022e5"]]), En = /* @__PURE__ */ j({
976
976
  name: "WxLinkField",
977
977
  inheritAttrs: !1,
978
978
  __name: "LinkField",
@@ -987,9 +987,9 @@ const Sn = { class: "wx-link-picker" }, Tn = {
987
987
  emits: ["update:modelValue"],
988
988
  setup(e) {
989
989
  const t = e, l = ge(e, "modelValue");
990
- return (o, a) => (c(), L(zn, lt({
990
+ return (o, a) => (d(), L(zn, nt({
991
991
  modelValue: l.value,
992
- "onUpdate:modelValue": a[0] || (a[0] = (i) => l.value = i)
992
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => l.value = s)
993
993
  }, o.$attrs, {
994
994
  "allow-none": t.allowNone,
995
995
  attributes: t.attributes,
@@ -1011,7 +1011,10 @@ const Sn = { class: "wx-link-picker" }, Tn = {
1011
1011
  expand: "Expand the menu",
1012
1012
  language: "Language",
1013
1013
  // The one menu group the panel names itself; a module's own group is named by the module.
1014
- system: "System"
1014
+ system: "System",
1015
+ "system-site": "Site",
1016
+ "system-search": "Search and checks",
1017
+ "system-access": "Access"
1015
1018
  },
1016
1019
  // The three words on the theme switch. They belong to the panel rather than to whoever
1017
1020
  // places the switch: a core component ships English prop defaults and knows nothing about
@@ -1032,7 +1035,16 @@ const Sn = { class: "wx-link-picker" }, Tn = {
1032
1035
  save: "Save",
1033
1036
  // Said out loud to a screen reader while the little wheel turns, and after it stops.
1034
1037
  saving: "Saving…",
1035
- saved: "Saved"
1038
+ saved: "Saved",
1039
+ unpublish: "Take off the site",
1040
+ "unpublish-title": "Take it off the site?",
1041
+ "unpublish-text": "Visitors will no longer see it: its page will answer «not found» and leave the sitemap and search. Everything written stays in the panel, and «Publish» brings it back at the same address.",
1042
+ "keep-published": "Keep it on the site",
1043
+ "discard-title": "Discard changes?",
1044
+ "discard-text": "The published version comes back. Everything changed since publishing is lost and cannot be brought back.",
1045
+ "keep-changes": "Keep",
1046
+ "publish-moves": "The old address :old will lead to the new one.",
1047
+ unpublished: "Taken off the site."
1036
1048
  },
1037
1049
  // The page behind a '?'. Only the heading is the panel's: what the page says belongs to
1038
1050
  // whatever is being explained, and travels with that module's own words.
@@ -1201,7 +1213,9 @@ const Sn = { class: "wx-link-picker" }, Tn = {
1201
1213
  "url-scheme": "An address has to be a path or start with http, https, mailto or tel.",
1202
1214
  "hash-length": "An anchor may be at most :max characters long.",
1203
1215
  "hash-shape": "An anchor is a name on the page: no spaces in it.",
1204
- "not-localized": "A link is the same in every language and cannot be translated."
1216
+ "not-localized": "A link is the same in every language and cannot be translated.",
1217
+ "address-fallback": "No address in this language yet — this is the address in :locale, the site's main language.",
1218
+ "address-fallback-label": "Address in the main language"
1205
1219
  },
1206
1220
  // The categories every module shares: the refusals the server says, and the words of the
1207
1221
  // shared screens under a module's own.
@@ -1292,21 +1306,21 @@ const Sn = { class: "wx-link-picker" }, Tn = {
1292
1306
  "collection-related-current-hint": "On the page of a record of “:target” the block shows what is related to it; on any other page it shows nothing."
1293
1307
  }
1294
1308
  };
1295
- function En(e) {
1309
+ function Un(e) {
1296
1310
  const t = e.scope("webx-admin"), l = /* @__PURE__ */ new Map();
1297
- function o(i, s, r) {
1298
- const f = e.state.locale, m = `${f}:${i}`;
1311
+ function o(s, i, r) {
1312
+ const c = e.state.locale, m = `${c}:${s}`;
1299
1313
  let p = l.get(m);
1300
- return p === void 0 && (p = new Intl.DateTimeFormat(f, s), l.set(m, p)), p.format(r);
1314
+ return p === void 0 && (p = new Intl.DateTimeFormat(c, i), l.set(m, p)), p.format(r);
1301
1315
  }
1302
- const a = (i) => o("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, i);
1316
+ const a = (s) => o("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, s);
1303
1317
  return {
1304
- short(i) {
1305
- const s = Ae(i);
1306
- if (s === null)
1318
+ short(s) {
1319
+ const i = Le(s);
1320
+ if (i === null)
1307
1321
  return t("dates.never");
1308
- const r = /* @__PURE__ */ new Date(), f = _t(s, r);
1309
- return f === 0 ? t("dates.today", { time: a(s) }) : f === -1 ? t("dates.yesterday", { time: a(s) }) : s.getFullYear() === r.getFullYear() ? o(
1322
+ const r = /* @__PURE__ */ new Date(), c = xt(i, r);
1323
+ return c === 0 ? t("dates.today", { time: a(i) }) : c === -1 ? t("dates.yesterday", { time: a(i) }) : i.getFullYear() === r.getFullYear() ? o(
1310
1324
  "this-year",
1311
1325
  {
1312
1326
  day: "numeric",
@@ -1315,45 +1329,45 @@ function En(e) {
1315
1329
  minute: "2-digit",
1316
1330
  hourCycle: "h23"
1317
1331
  },
1318
- s
1319
- ) : o("earlier", { day: "numeric", month: "long", year: "numeric" }, s);
1332
+ i
1333
+ ) : o("earlier", { day: "numeric", month: "long", year: "numeric" }, i);
1320
1334
  },
1321
- compact(i) {
1322
- const s = Ae(i);
1323
- if (s === null)
1335
+ compact(s) {
1336
+ const i = Le(s);
1337
+ if (i === null)
1324
1338
  return t("dates.never");
1325
1339
  const r = /* @__PURE__ */ new Date();
1326
- return _t(s, r) === 0 ? a(s) : s.getFullYear() === r.getFullYear() ? o("compact", { day: "numeric", month: "short" }, s) : o("compact-earlier", { dateStyle: "short" }, s);
1340
+ return xt(i, r) === 0 ? a(i) : i.getFullYear() === r.getFullYear() ? o("compact", { day: "numeric", month: "short" }, i) : o("compact-earlier", { dateStyle: "short" }, i);
1327
1341
  },
1328
- exact(i) {
1329
- const s = Ae(i);
1330
- return s === null ? "" : o("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, s);
1342
+ exact(s) {
1343
+ const i = Le(s);
1344
+ return i === null ? "" : o("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, i);
1331
1345
  },
1332
- iso(i) {
1333
- const s = Ae(i);
1334
- return s === null ? "" : s.toISOString();
1346
+ iso(s) {
1347
+ const i = Le(s);
1348
+ return i === null ? "" : i.toISOString();
1335
1349
  }
1336
1350
  };
1337
1351
  }
1338
1352
  function Ot() {
1339
- const e = fe(Be, null);
1340
- return En(e ?? Nn());
1353
+ const e = fe(De, null);
1354
+ return Un(e ?? Nn());
1341
1355
  }
1342
- let Ce = null;
1356
+ let We = null;
1343
1357
  function Nn() {
1344
- return Ce === null && (Ce = ut(), Ce.defaults("webx-admin", Mt)), Ce;
1358
+ return We === null && (We = ct(), We.defaults("webx-admin", Mt)), We;
1345
1359
  }
1346
- function Ae(e) {
1360
+ function Le(e) {
1347
1361
  if (e == null || e === "")
1348
1362
  return null;
1349
1363
  const t = e instanceof Date ? e : new Date(e);
1350
1364
  return Number.isNaN(t.getTime()) ? null : t;
1351
1365
  }
1352
- function _t(e, t) {
1366
+ function xt(e, t) {
1353
1367
  const l = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate());
1354
1368
  return Math.round((l(e) - l(t)) / 864e5);
1355
1369
  }
1356
- const Ne = /* @__PURE__ */ K({
1370
+ const Ie = /* @__PURE__ */ j({
1357
1371
  name: "WxDate",
1358
1372
  __name: "DateText",
1359
1373
  props: {
@@ -1363,39 +1377,39 @@ const Ne = /* @__PURE__ */ K({
1363
1377
  tone: { default: "muted" }
1364
1378
  },
1365
1379
  setup(e) {
1366
- const t = e, l = Ot(), o = w(() => t.compact ? l.compact(t.value) : l.short(t.value)), a = w(() => l.exact(t.value)), i = w(() => l.iso(t.value));
1367
- return (s, r) => a.value ? (c(), L(n(Vt), {
1380
+ const t = e, l = Ot(), o = w(() => t.compact ? l.compact(t.value) : l.short(t.value)), a = w(() => l.exact(t.value)), s = w(() => l.iso(t.value));
1381
+ return (i, r) => a.value ? (d(), L(n(ut), {
1368
1382
  key: 0,
1369
1383
  content: a.value
1370
1384
  }, {
1371
1385
  default: b(() => [
1372
- x(n(Q), {
1386
+ k(n(Q), {
1373
1387
  as: "time",
1374
- datetime: i.value,
1388
+ datetime: s.value,
1375
1389
  size: e.size,
1376
1390
  tone: e.tone
1377
1391
  }, {
1378
1392
  default: b(() => [
1379
- I(C(o.value), 1)
1393
+ M(C(o.value), 1)
1380
1394
  ]),
1381
1395
  _: 1
1382
1396
  }, 8, ["datetime", "size", "tone"])
1383
1397
  ]),
1384
1398
  _: 1
1385
- }, 8, ["content"])) : (c(), L(n(Q), {
1399
+ }, 8, ["content"])) : (d(), L(n(Q), {
1386
1400
  key: 1,
1387
1401
  size: e.size,
1388
1402
  tone: e.tone
1389
1403
  }, {
1390
1404
  default: b(() => [
1391
- I(C(o.value), 1)
1405
+ M(C(o.value), 1)
1392
1406
  ]),
1393
1407
  _: 1
1394
1408
  }, 8, ["size", "tone"]));
1395
1409
  }
1396
1410
  });
1397
1411
  function Rn(e, t, l) {
1398
- const o = e instanceof $e ? e.status : In(e);
1412
+ const o = e instanceof Se ? e.status : In(e);
1399
1413
  if (o === 422)
1400
1414
  return Mn(e) ?? l ?? t("errors.unknown");
1401
1415
  if (o === 401) return t("errors.signed-out");
@@ -1403,12 +1417,12 @@ function Rn(e, t, l) {
1403
1417
  if (o === 404) return t("errors.gone");
1404
1418
  if (o === 409) return t("errors.conflict");
1405
1419
  if (o === 429) {
1406
- const a = e instanceof $e ? e.retryAfter : null;
1420
+ const a = e instanceof Se ? e.retryAfter : null;
1407
1421
  return a === null ? t("errors.throttled") : t("errors.throttled-in", { seconds: a });
1408
1422
  }
1409
1423
  return o !== null && o >= 500 ? t("errors.server") : o === null ? t("errors.offline") : l ?? t("errors.unknown");
1410
1424
  }
1411
- function De() {
1425
+ function Fe() {
1412
1426
  const e = J("webx-admin");
1413
1427
  return (t, l) => Rn(t, e, l);
1414
1428
  }
@@ -1423,22 +1437,22 @@ function Mn(e) {
1423
1437
  function On(e, t, l) {
1424
1438
  return {
1425
1439
  list: (o = 1) => e.http.get(`${e.apiPath}/history/${t}/${l}`, { query: { page: o } }),
1426
- run: (o, a = 1, i = null) => e.http.get(`${e.apiPath}/history/runs/${o}`, {
1427
- query: { page: a, search: i }
1440
+ run: (o, a = 1, s = null) => e.http.get(`${e.apiPath}/history/runs/${o}`, {
1441
+ query: { page: a, search: s }
1428
1442
  })
1429
1443
  };
1430
1444
  }
1431
1445
  const Pt = /* @__PURE__ */ Symbol("wx-history-subject");
1432
1446
  function Pn(e) {
1433
- Re(Pt, e);
1447
+ Me(Pt, e);
1434
1448
  }
1435
1449
  function Bn() {
1436
1450
  return fe(Pt, null);
1437
1451
  }
1438
- function je(e, t, l = 120) {
1439
- return e == null || e === "" ? t : typeof e == "boolean" ? e ? "✓" : "✗" : typeof e == "string" ? Ke(e, l) : typeof e == "number" ? String(e) : Array.isArray(e) && e.every((o) => typeof o == "string" || typeof o == "number") ? e.length === 0 ? t : Ke(e.join(", "), l) : Ke(JSON.stringify(e), l);
1452
+ function Ke(e, t, l = 120) {
1453
+ return e == null || e === "" ? t : typeof e == "boolean" ? e ? "✓" : "✗" : typeof e == "string" ? qe(e, l) : typeof e == "number" ? String(e) : Array.isArray(e) && e.every((o) => typeof o == "string" || typeof o == "number") ? e.length === 0 ? t : qe(e.join(", "), l) : qe(JSON.stringify(e), l);
1440
1454
  }
1441
- function Ke(e, t) {
1455
+ function qe(e, t) {
1442
1456
  return e.length > t ? `${e.slice(0, t - 1)}…` : e;
1443
1457
  }
1444
1458
  const Dn = { class: "wx-history" }, Fn = {
@@ -1465,7 +1479,7 @@ const Dn = { class: "wx-history" }, Fn = {
1465
1479
  }, sa = { class: "wx-history-change__from" }, ia = { class: "wx-history-change__to" }, ra = {
1466
1480
  key: 2,
1467
1481
  class: "wx-history__more"
1468
- }, ua = /* @__PURE__ */ K({
1482
+ }, ua = /* @__PURE__ */ j({
1469
1483
  name: "WxHistory",
1470
1484
  __name: "HistoryFeed",
1471
1485
  props: {
@@ -1474,17 +1488,17 @@ const Dn = { class: "wx-history" }, Fn = {
1474
1488
  title: { default: void 0 }
1475
1489
  },
1476
1490
  setup(e, { expose: t }) {
1477
- const l = e, o = ee(), a = J("webx-admin"), i = De(), s = Bn(), r = W([]), f = W(1), m = W(1), p = W(!1), v = W(!1), u = w(() => l.id ?? s?.id.value ?? null), _ = w(
1491
+ const l = e, o = ee(), a = J("webx-admin"), s = Fe(), i = Bn(), r = W([]), c = W(1), m = W(1), p = W(!1), v = W(!1), u = w(() => l.id ?? i?.id.value ?? null), _ = w(
1478
1492
  () => u.value === null ? null : On(o, l.type, u.value)
1479
1493
  ), S = w(() => l.title ?? a("history.title"));
1480
- async function d() {
1481
- if (r.value = [], f.value = 1, m.value = 1, _.value !== null) {
1494
+ async function f() {
1495
+ if (r.value = [], c.value = 1, m.value = 1, _.value !== null) {
1482
1496
  p.value = !0;
1483
1497
  try {
1484
1498
  const g = await _.value.list(1);
1485
1499
  r.value = g.data, m.value = g.last_page;
1486
1500
  } catch (g) {
1487
- Z.danger(i(g));
1501
+ Z.danger(s(g));
1488
1502
  } finally {
1489
1503
  p.value = !1;
1490
1504
  }
@@ -1494,18 +1508,18 @@ const Dn = { class: "wx-history" }, Fn = {
1494
1508
  if (!(_.value === null || v.value)) {
1495
1509
  v.value = !0;
1496
1510
  try {
1497
- const g = await _.value.list(f.value + 1);
1498
- r.value = [...r.value, ...g.data], f.value = g.current_page, m.value = g.last_page;
1511
+ const g = await _.value.list(c.value + 1);
1512
+ r.value = [...r.value, ...g.data], c.value = g.current_page, m.value = g.last_page;
1499
1513
  } catch (g) {
1500
- Z.danger(i(g));
1514
+ Z.danger(s(g));
1501
1515
  } finally {
1502
1516
  v.value = !1;
1503
1517
  }
1504
1518
  }
1505
1519
  }
1506
- oe([() => l.type, u], () => {
1507
- d();
1508
- }, { immediate: !0 }), t({ reload: d });
1520
+ se([() => l.type, u], () => {
1521
+ f();
1522
+ }, { immediate: !0 }), t({ reload: f });
1509
1523
  function y(g) {
1510
1524
  return g.admin?.name ?? a("history.unknown-author");
1511
1525
  }
@@ -1513,10 +1527,10 @@ const Dn = { class: "wx-history" }, Fn = {
1513
1527
  return `${a(`history.event-${g.event}`)} · ${a(`history.source-${g.source}`)}`;
1514
1528
  }
1515
1529
  function O(g) {
1516
- return je(g.from, a("history.empty-value"));
1530
+ return Ke(g.from, a("history.empty-value"));
1517
1531
  }
1518
1532
  function q(g) {
1519
- return je(g.to, a("history.empty-value"));
1533
+ return Ke(g.to, a("history.empty-value"));
1520
1534
  }
1521
1535
  function H(g) {
1522
1536
  return a("history.long", {
@@ -1528,102 +1542,102 @@ const Dn = { class: "wx-history" }, Fn = {
1528
1542
  const z = g.run?.summary?.what;
1529
1543
  return typeof z == "string" && z !== "" ? `${a("history.run")} · ${z}` : a("history.run");
1530
1544
  }
1531
- const A = W(!1), $ = W(null), M = W(null), U = W(""), R = W(!1);
1545
+ const A = W(!1), $ = W(null), R = W(null), E = W(""), I = W(!1);
1532
1546
  let B = 0;
1533
1547
  async function te(g, z = 1) {
1534
1548
  if (_.value === null) return;
1535
- R.value = !0;
1536
- const E = ++B;
1549
+ I.value = !0;
1550
+ const U = ++B;
1537
1551
  try {
1538
- const X = /^\d+$/.test(U.value.trim()) ? Number(U.value.trim()) : null, pe = await _.value.run(g, z, X);
1539
- if (E !== B) return;
1552
+ const X = /^\d+$/.test(E.value.trim()) ? Number(E.value.trim()) : null, pe = await _.value.run(g, z, X);
1553
+ if (U !== B) return;
1540
1554
  $.value = z === 1 || $.value === null ? pe : {
1541
1555
  run: pe.run,
1542
1556
  rows: { ...pe.rows, data: [...$.value.rows.data, ...pe.rows.data] }
1543
1557
  };
1544
1558
  } catch (X) {
1545
- Z.danger(i(X));
1559
+ Z.danger(s(X));
1546
1560
  } finally {
1547
- R.value = !1;
1561
+ I.value = !1;
1548
1562
  }
1549
1563
  }
1550
1564
  function re(g) {
1551
- M.value = g, $.value = null, U.value = "", A.value = !0, te(g);
1565
+ R.value = g, $.value = null, E.value = "", A.value = !0, te(g);
1552
1566
  }
1553
- oe(U, () => {
1554
- M.value !== null && A.value && te(M.value);
1567
+ se(E, () => {
1568
+ R.value !== null && A.value && te(R.value);
1555
1569
  });
1556
1570
  const ce = w(() => {
1557
1571
  const g = $.value?.run.summary ?? {};
1558
- return Object.entries(g).filter(([z]) => z !== "rows" && z !== "failed").map(([z, E]) => ({ key: z, value: je(E, a("history.empty-value")) }));
1572
+ return Object.entries(g).filter(([z]) => z !== "rows" && z !== "failed").map(([z, U]) => ({ key: z, value: Ke(U, a("history.empty-value")) }));
1559
1573
  }), D = w(() => {
1560
1574
  const g = $.value?.run.summary?.failed;
1561
1575
  return typeof g == "string" ? g : null;
1562
1576
  });
1563
- return (g, z) => (c(), k("section", Dn, [
1564
- S.value ? (c(), L(n(Q), {
1577
+ return (g, z) => (d(), x("section", Dn, [
1578
+ S.value ? (d(), L(n(Q), {
1565
1579
  key: 0,
1566
1580
  weight: "medium",
1567
1581
  class: "wx-history__title"
1568
1582
  }, {
1569
1583
  default: b(() => [
1570
- I(C(S.value), 1)
1584
+ M(C(S.value), 1)
1571
1585
  ]),
1572
1586
  _: 1
1573
1587
  })) : N("", !0),
1574
- u.value === null ? (c(), L(n(Ue), {
1588
+ u.value === null ? (d(), L(n(Ne), {
1575
1589
  key: 1,
1576
1590
  size: "sm",
1577
1591
  description: n(a)("history.unsaved")
1578
- }, null, 8, ["description"])) : p.value ? (c(), L(n(ye), {
1592
+ }, null, 8, ["description"])) : p.value ? (d(), L(n(ye), {
1579
1593
  key: 2,
1580
1594
  rows: 3
1581
- })) : r.value.length === 0 ? (c(), L(n(Ue), {
1595
+ })) : r.value.length === 0 ? (d(), L(n(Ne), {
1582
1596
  key: 3,
1583
1597
  size: "sm",
1584
1598
  description: n(a)("history.empty")
1585
- }, null, 8, ["description"])) : (c(), k("ul", Fn, [
1586
- (c(!0), k(j, null, ie(r.value, (E) => (c(), k("li", {
1587
- key: E.id,
1599
+ }, null, 8, ["description"])) : (d(), x("ul", Fn, [
1600
+ (d(!0), x(K, null, ie(r.value, (U) => (d(), x("li", {
1601
+ key: U.id,
1588
1602
  class: "wx-history-entry"
1589
1603
  }, [
1590
- x(n(zt), {
1591
- name: y(E),
1604
+ k(n(zt), {
1605
+ name: y(U),
1592
1606
  size: "sm",
1593
1607
  tone: "auto"
1594
1608
  }, null, 8, ["name"]),
1595
1609
  P("div", Hn, [
1596
1610
  P("div", jn, [
1597
- x(n(Q), {
1611
+ k(n(Q), {
1598
1612
  size: "sm",
1599
1613
  weight: "medium",
1600
1614
  truncate: ""
1601
1615
  }, {
1602
1616
  default: b(() => [
1603
- I(C(y(E)), 1)
1617
+ M(C(y(U)), 1)
1604
1618
  ]),
1605
1619
  _: 2
1606
1620
  }, 1024),
1607
- x(Ne, {
1608
- value: E.created_at
1621
+ k(Ie, {
1622
+ value: U.created_at
1609
1623
  }, null, 8, ["value"])
1610
1624
  ]),
1611
- x(n(Q), {
1625
+ k(n(Q), {
1612
1626
  size: "sm",
1613
1627
  tone: "muted"
1614
1628
  }, {
1615
1629
  default: b(() => [
1616
- I(C(V(E)), 1)
1630
+ M(C(V(U)), 1)
1617
1631
  ]),
1618
1632
  _: 2
1619
1633
  }, 1024),
1620
- E.changes.length > 0 ? (c(), k("ul", Kn, [
1621
- (c(!0), k(j, null, ie(E.changes, (X) => (c(), k("li", {
1634
+ U.changes.length > 0 ? (d(), x("ul", Kn, [
1635
+ (d(!0), x(K, null, ie(U.changes, (X) => (d(), x("li", {
1622
1636
  key: X.field,
1623
1637
  class: "wx-history-change"
1624
1638
  }, [
1625
1639
  P("span", qn, C(X.label) + ":", 1),
1626
- X.long ? (c(), k("span", Yn, C(H(X)), 1)) : (c(), k(j, { key: 1 }, [
1640
+ X.long ? (d(), x("span", Yn, C(H(X)), 1)) : (d(), x(K, { key: 1 }, [
1627
1641
  P("span", Xn, C(O(X)), 1),
1628
1642
  z[3] || (z[3] = P("span", {
1629
1643
  class: "wx-history-change__arrow",
@@ -1633,114 +1647,114 @@ const Dn = { class: "wx-history" }, Fn = {
1633
1647
  ], 64))
1634
1648
  ]))), 128))
1635
1649
  ])) : N("", !0),
1636
- E.run ? (c(), k("button", {
1650
+ U.run ? (d(), x("button", {
1637
1651
  key: 1,
1638
1652
  type: "button",
1639
1653
  class: "wx-history-entry__run",
1640
- onClick: (X) => re(E.run.id)
1641
- }, C(h(E)), 9, Gn)) : N("", !0)
1654
+ onClick: (X) => re(U.run.id)
1655
+ }, C(h(U)), 9, Gn)) : N("", !0)
1642
1656
  ])
1643
1657
  ]))), 128))
1644
1658
  ])),
1645
- f.value < m.value ? (c(), k("div", Qn, [
1646
- x(n(de), {
1659
+ c.value < m.value ? (d(), x("div", Qn, [
1660
+ k(n(de), {
1647
1661
  size: "sm",
1648
1662
  loading: v.value,
1649
1663
  onClick: T
1650
1664
  }, {
1651
1665
  default: b(() => [
1652
- I(C(n(a)("history.more")), 1)
1666
+ M(C(n(a)("history.more")), 1)
1653
1667
  ]),
1654
1668
  _: 1
1655
1669
  }, 8, ["loading"])
1656
1670
  ])) : N("", !0),
1657
- x(n(it), {
1671
+ k(n(dt), {
1658
1672
  open: A.value,
1659
- "onUpdate:open": z[2] || (z[2] = (E) => A.value = E),
1673
+ "onUpdate:open": z[2] || (z[2] = (U) => A.value = U),
1660
1674
  title: n(a)("history.run-title"),
1661
1675
  width: 640
1662
1676
  }, {
1663
1677
  default: b(() => [
1664
- $.value === null ? (c(), L(n(ye), {
1678
+ $.value === null ? (d(), L(n(ye), {
1665
1679
  key: 0,
1666
1680
  rows: 4
1667
- })) : (c(), k("div", Zn, [
1681
+ })) : (d(), x("div", Zn, [
1668
1682
  P("div", ea, [
1669
- x(n(Q), {
1683
+ k(n(Q), {
1670
1684
  size: "sm",
1671
1685
  weight: "medium"
1672
1686
  }, {
1673
1687
  default: b(() => [
1674
- I(C(y($.value.run)), 1)
1688
+ M(C(y($.value.run)), 1)
1675
1689
  ]),
1676
1690
  _: 1
1677
1691
  }),
1678
- x(Ne, {
1692
+ k(Ie, {
1679
1693
  value: $.value.run.created_at
1680
1694
  }, null, 8, ["value"])
1681
1695
  ]),
1682
- x(n(Q), {
1696
+ k(n(Q), {
1683
1697
  size: "sm",
1684
1698
  tone: "muted"
1685
1699
  }, {
1686
1700
  default: b(() => [
1687
- I(C(V($.value.run)), 1)
1701
+ M(C(V($.value.run)), 1)
1688
1702
  ]),
1689
1703
  _: 1
1690
1704
  }),
1691
- ce.value.length > 0 ? (c(), k("dl", ta, [
1692
- (c(!0), k(j, null, ie(ce.value, (E) => (c(), k(j, {
1693
- key: E.key
1705
+ ce.value.length > 0 ? (d(), x("dl", ta, [
1706
+ (d(!0), x(K, null, ie(ce.value, (U) => (d(), x(K, {
1707
+ key: U.key
1694
1708
  }, [
1695
- P("dt", null, C(E.key), 1),
1696
- P("dd", null, C(E.value), 1)
1709
+ P("dt", null, C(U.key), 1),
1710
+ P("dd", null, C(U.value), 1)
1697
1711
  ], 64))), 128))
1698
1712
  ])) : N("", !0),
1699
- x(n(Q), { size: "sm" }, {
1713
+ k(n(Q), { size: "sm" }, {
1700
1714
  default: b(() => [
1701
- I(C(n(a)("history.run-rows", { count: String($.value.run.rows ?? 0) })), 1)
1715
+ M(C(n(a)("history.run-rows", { count: String($.value.run.rows ?? 0) })), 1)
1702
1716
  ]),
1703
1717
  _: 1
1704
1718
  }),
1705
- D.value ? (c(), L(n(Q), {
1719
+ D.value ? (d(), L(n(Q), {
1706
1720
  key: 1,
1707
1721
  size: "sm",
1708
1722
  tone: "danger"
1709
1723
  }, {
1710
1724
  default: b(() => [
1711
- I(C(n(a)("history.run-failed", { message: D.value })), 1)
1725
+ M(C(n(a)("history.run-failed", { message: D.value })), 1)
1712
1726
  ]),
1713
1727
  _: 1
1714
1728
  })) : N("", !0),
1715
- x(n(Te), {
1716
- modelValue: U.value,
1717
- "onUpdate:modelValue": z[0] || (z[0] = (E) => U.value = E),
1729
+ k(n(Ae), {
1730
+ modelValue: E.value,
1731
+ "onUpdate:modelValue": z[0] || (z[0] = (U) => E.value = U),
1718
1732
  size: "sm",
1719
1733
  inputmode: "numeric",
1720
1734
  placeholder: n(a)("history.search"),
1721
1735
  clearable: ""
1722
1736
  }, null, 8, ["modelValue", "placeholder"]),
1723
1737
  P("ul", la, [
1724
- (c(!0), k(j, null, ie($.value.rows.data, (E) => (c(), k("li", {
1725
- key: E.id,
1738
+ (d(!0), x(K, null, ie($.value.rows.data, (U) => (d(), x("li", {
1739
+ key: U.id,
1726
1740
  class: "wx-history-run__row"
1727
1741
  }, [
1728
- x(n(Q), {
1742
+ k(n(Q), {
1729
1743
  size: "sm",
1730
1744
  weight: "medium"
1731
1745
  }, {
1732
1746
  default: b(() => [
1733
- I("#" + C(E.subject.id), 1)
1747
+ M("#" + C(U.subject.id), 1)
1734
1748
  ]),
1735
1749
  _: 2
1736
1750
  }, 1024),
1737
1751
  P("ul", na, [
1738
- (c(!0), k(j, null, ie(E.changes, (X) => (c(), k("li", {
1752
+ (d(!0), x(K, null, ie(U.changes, (X) => (d(), x("li", {
1739
1753
  key: X.field,
1740
1754
  class: "wx-history-change"
1741
1755
  }, [
1742
1756
  P("span", aa, C(X.label) + ":", 1),
1743
- X.long ? (c(), k("span", oa, C(H(X)), 1)) : (c(), k(j, { key: 1 }, [
1757
+ X.long ? (d(), x("span", oa, C(H(X)), 1)) : (d(), x(K, { key: 1 }, [
1744
1758
  P("span", sa, C(O(X)), 1),
1745
1759
  z[4] || (z[4] = P("span", {
1746
1760
  class: "wx-history-change__arrow",
@@ -1752,14 +1766,14 @@ const Dn = { class: "wx-history" }, Fn = {
1752
1766
  ])
1753
1767
  ]))), 128))
1754
1768
  ]),
1755
- $.value.rows.current_page < $.value.rows.last_page ? (c(), k("div", ra, [
1756
- x(n(de), {
1769
+ $.value.rows.current_page < $.value.rows.last_page ? (d(), x("div", ra, [
1770
+ k(n(de), {
1757
1771
  size: "sm",
1758
- loading: R.value,
1759
- onClick: z[1] || (z[1] = (E) => M.value !== null && te(M.value, $.value.rows.current_page + 1))
1772
+ loading: I.value,
1773
+ onClick: z[1] || (z[1] = (U) => R.value !== null && te(R.value, $.value.rows.current_page + 1))
1760
1774
  }, {
1761
1775
  default: b(() => [
1762
- I(C(n(a)("history.more")), 1)
1776
+ M(C(n(a)("history.more")), 1)
1763
1777
  ]),
1764
1778
  _: 1
1765
1779
  }, 8, ["loading"])
@@ -1770,7 +1784,7 @@ const Dn = { class: "wx-history" }, Fn = {
1770
1784
  }, 8, ["open", "title"])
1771
1785
  ]));
1772
1786
  }
1773
- }), da = /* @__PURE__ */ se(ua, [["__scopeId", "data-v-68eae472"]]), ca = /* @__PURE__ */ K({
1787
+ }), da = /* @__PURE__ */ ne(ua, [["__scopeId", "data-v-68eae472"]]), ca = /* @__PURE__ */ j({
1774
1788
  __name: "BackButton",
1775
1789
  props: {
1776
1790
  to: {},
@@ -1779,7 +1793,7 @@ const Dn = { class: "wx-history" }, Fn = {
1779
1793
  },
1780
1794
  setup(e) {
1781
1795
  const t = e, l = J("webx-admin"), o = w(() => t.label ?? l("editor.back"));
1782
- return (a, i) => (c(), L(n(be), {
1796
+ return (a, s) => (d(), L(n(be), {
1783
1797
  icon: "arrow-left",
1784
1798
  class: "wx-back-button",
1785
1799
  as: n(ol),
@@ -1792,7 +1806,7 @@ const Dn = { class: "wx-history" }, Fn = {
1792
1806
  }), fa = {
1793
1807
  key: 0,
1794
1808
  class: "wx-dropdown__divider"
1795
- }, ma = /* @__PURE__ */ K({
1809
+ }, ma = /* @__PURE__ */ j({
1796
1810
  __name: "RowMenu",
1797
1811
  props: {
1798
1812
  actions: {},
@@ -1801,44 +1815,44 @@ const Dn = { class: "wx-history" }, Fn = {
1801
1815
  },
1802
1816
  setup(e) {
1803
1817
  const t = J("webx-admin"), l = e, o = w(() => [
1804
- ...l.actions.filter((i) => !i.danger),
1805
- ...l.actions.filter((i) => i.danger)
1818
+ ...l.actions.filter((s) => !s.danger),
1819
+ ...l.actions.filter((s) => s.danger)
1806
1820
  ]), a = w(() => {
1807
- const i = o.value.find((s) => s.danger);
1808
- return i && o.value[0] !== i ? i.key : null;
1821
+ const s = o.value.find((i) => i.danger);
1822
+ return s && o.value[0] !== s ? s.key : null;
1809
1823
  });
1810
- return (i, s) => o.value.length > 0 ? (c(), L(n(cl), {
1824
+ return (s, i) => o.value.length > 0 ? (d(), L(n(cl), {
1811
1825
  key: 0,
1812
1826
  class: "wx-row-menu",
1813
1827
  collapse: "always",
1814
1828
  align: "end",
1815
1829
  size: e.size,
1816
1830
  "aria-label": e.label,
1817
- onClick: s[0] || (s[0] = Ct(() => {
1831
+ onClick: i[0] || (i[0] = ot(() => {
1818
1832
  }, ["stop"]))
1819
1833
  }, {
1820
1834
  trigger: b(() => [
1821
- x(n(be), {
1835
+ k(n(be), {
1822
1836
  type: "more",
1823
1837
  size: e.size,
1824
1838
  title: n(t)("editor.more")
1825
1839
  }, null, 8, ["size", "title"])
1826
1840
  ]),
1827
1841
  collapsed: b(() => [
1828
- (c(!0), k(j, null, ie(o.value, (r) => (c(), k(j, {
1842
+ (d(!0), x(K, null, ie(o.value, (r) => (d(), x(K, {
1829
1843
  key: r.key
1830
1844
  }, [
1831
- r.key === a.value ? (c(), k("hr", fa)) : N("", !0),
1832
- x(n(fl), {
1845
+ r.key === a.value ? (d(), x("hr", fa)) : N("", !0),
1846
+ k(n(fl), {
1833
1847
  icon: r.icon,
1834
1848
  tone: r.danger ? "danger" : "default",
1835
1849
  href: r.href,
1836
1850
  target: r.href ? r.target ?? "_blank" : void 0,
1837
1851
  disabled: r.disabled,
1838
- onClick: (f) => r.run?.()
1852
+ onClick: (c) => r.run?.()
1839
1853
  }, {
1840
1854
  default: b(() => [
1841
- I(C(r.label), 1)
1855
+ M(C(r.label), 1)
1842
1856
  ]),
1843
1857
  _: 2
1844
1858
  }, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
@@ -1847,13 +1861,13 @@ const Dn = { class: "wx-history" }, Fn = {
1847
1861
  _: 1
1848
1862
  }, 8, ["size", "aria-label"])) : N("", !0);
1849
1863
  }
1850
- }), dt = /* @__PURE__ */ se(ma, [["__scopeId", "data-v-cab01f7f"]]), va = ["data-level"], pa = {
1864
+ }), ft = /* @__PURE__ */ ne(ma, [["__scopeId", "data-v-cab01f7f"]]), va = ["data-level"], pa = {
1851
1865
  key: 0,
1852
1866
  class: "wx-screen-head__trail"
1853
1867
  }, ha = { class: "wx-screen-head__name" }, ya = {
1854
1868
  key: 4,
1855
1869
  class: "wx-screen-head__actions"
1856
- }, ga = /* @__PURE__ */ K({
1870
+ }, ga = /* @__PURE__ */ j({
1857
1871
  __name: "ScreenHead",
1858
1872
  props: {
1859
1873
  title: { default: void 0 },
@@ -1867,34 +1881,34 @@ const Dn = { class: "wx-history" }, Fn = {
1867
1881
  },
1868
1882
  emits: ["back"],
1869
1883
  setup(e, { emit: t }) {
1870
- const l = e, o = t, a = J("webx-admin"), i = Jt(), s = at("root"), r = ml(s), f = w(() => r.value > 0 && r.value < l.collapseBelow), m = w(() => l.actions ?? []), p = w(
1871
- () => m.value.find((d) => d.primary) ?? null
1872
- ), v = w(() => f.value ? p.value ? [p.value] : [] : m.value.filter((d) => !d.menu && !d.danger)), u = w(() => f.value ? m.value.filter((d) => d !== p.value) : m.value.filter((d) => d.menu || d.danger)), _ = w(
1884
+ const l = e, o = t, a = J("webx-admin"), s = Jt(), i = st("root"), r = ml(i), c = w(() => r.value > 0 && r.value < l.collapseBelow), m = w(() => l.actions ?? []), p = w(
1885
+ () => m.value.find((f) => f.primary) ?? null
1886
+ ), v = w(() => c.value ? p.value ? [p.value] : [] : m.value.filter((f) => !f.menu && !f.danger)), u = w(() => c.value ? m.value.filter((f) => f !== p.value) : m.value.filter((f) => f.menu || f.danger)), _ = w(
1873
1887
  () => l.back && l.back !== !0 ? l.back : null
1874
1888
  ), S = w(
1875
- () => v.value.length > 0 || u.value.length > 0 || !!i.extra
1889
+ () => v.value.length > 0 || u.value.length > 0 || !!s.extra
1876
1890
  );
1877
- return (d, T) => (c(), k("div", {
1891
+ return (f, T) => (d(), x("div", {
1878
1892
  ref_key: "root",
1879
- ref: s,
1893
+ ref: i,
1880
1894
  class: ve(["wx-screen-head", {
1881
- "is-narrow": f.value,
1895
+ "is-narrow": c.value,
1882
1896
  "has-button": v.value.length > 0,
1883
- "has-trail": !!d.$slots.trail,
1897
+ "has-trail": !!f.$slots.trail,
1884
1898
  "has-divider": e.divider
1885
1899
  }]),
1886
1900
  "data-level": e.level
1887
1901
  }, [
1888
- d.$slots.trail ? (c(), k("div", pa, [
1889
- ae(d.$slots, "trail", {}, void 0, !0)
1902
+ f.$slots.trail ? (d(), x("div", pa, [
1903
+ oe(f.$slots, "trail", {}, void 0, !0)
1890
1904
  ])) : N("", !0),
1891
- _.value ? (c(), L(ca, {
1905
+ _.value ? (d(), L(ca, {
1892
1906
  key: 1,
1893
1907
  class: "wx-screen-head__back",
1894
1908
  to: _.value,
1895
1909
  label: e.backLabel,
1896
1910
  "tooltip-side": "bottom"
1897
- }, null, 8, ["to", "label"])) : e.back ? (c(), L(n(be), {
1911
+ }, null, 8, ["to", "label"])) : e.back ? (d(), L(n(be), {
1898
1912
  key: 2,
1899
1913
  class: "wx-screen-head__back",
1900
1914
  icon: "arrow-left",
@@ -1904,20 +1918,20 @@ const Dn = { class: "wx-history" }, Fn = {
1904
1918
  onClick: T[0] || (T[0] = (y) => o("back"))
1905
1919
  }, null, 8, ["title"])) : N("", !0),
1906
1920
  P("div", ha, [
1907
- e.title ? (c(), L(n(vl), {
1921
+ e.title ? (d(), L(n(vl), {
1908
1922
  key: 0,
1909
1923
  level: e.level,
1910
1924
  truncate: "",
1911
1925
  class: "wx-screen-head__title"
1912
1926
  }, {
1913
1927
  default: b(() => [
1914
- I(C(e.title), 1)
1928
+ M(C(e.title), 1)
1915
1929
  ]),
1916
1930
  _: 1
1917
1931
  }, 8, ["level"])) : N("", !0),
1918
- ae(d.$slots, "title-after", {}, void 0, !0)
1932
+ oe(f.$slots, "title-after", {}, void 0, !0)
1919
1933
  ]),
1920
- e.subtitle || d.$slots.subtitle ? (c(), L(n(Q), {
1934
+ e.subtitle || f.$slots.subtitle ? (d(), L(n(Q), {
1921
1935
  key: 3,
1922
1936
  class: "wx-screen-head__subtitle",
1923
1937
  size: "sm",
@@ -1925,15 +1939,15 @@ const Dn = { class: "wx-history" }, Fn = {
1925
1939
  truncate: ""
1926
1940
  }, {
1927
1941
  default: b(() => [
1928
- ae(d.$slots, "subtitle", {}, () => [
1929
- I(C(e.subtitle), 1)
1942
+ oe(f.$slots, "subtitle", {}, () => [
1943
+ M(C(e.subtitle), 1)
1930
1944
  ], !0)
1931
1945
  ]),
1932
1946
  _: 3
1933
1947
  })) : N("", !0),
1934
- S.value ? (c(), k("div", ya, [
1935
- ae(d.$slots, "extra", {}, void 0, !0),
1936
- (c(!0), k(j, null, ie(v.value, (y) => (c(), L(n(de), {
1948
+ S.value ? (d(), x("div", ya, [
1949
+ oe(f.$slots, "extra", {}, void 0, !0),
1950
+ (d(!0), x(K, null, ie(v.value, (y) => (d(), L(n(de), {
1937
1951
  key: y.key,
1938
1952
  class: ve(["wx-screen-head__button", { "is-primary": y.primary }]),
1939
1953
  type: y.primary ? "primary" : "default",
@@ -1944,23 +1958,23 @@ const Dn = { class: "wx-history" }, Fn = {
1944
1958
  target: y.href ? y.target ?? "_blank" : void 0,
1945
1959
  rel: y.href ? "noopener" : void 0,
1946
1960
  onClick: (V) => y.run?.()
1947
- }, Ie({
1961
+ }, Te({
1948
1962
  default: b(() => [
1949
- I(" " + C(y.label), 1)
1963
+ M(" " + C(y.label), 1)
1950
1964
  ]),
1951
1965
  _: 2
1952
1966
  }, [
1953
1967
  y.icon ? {
1954
1968
  name: "icon",
1955
1969
  fn: b(() => [
1956
- x(n(rt), {
1970
+ k(n(Be), {
1957
1971
  name: y.icon
1958
1972
  }, null, 8, ["name"])
1959
1973
  ]),
1960
1974
  key: "0"
1961
1975
  } : void 0
1962
1976
  ]), 1032, ["class", "type", "variant", "loading", "disabled", "href", "target", "rel", "onClick"]))), 128)),
1963
- u.value.length > 0 ? (c(), L(dt, {
1977
+ u.value.length > 0 ? (d(), L(ft, {
1964
1978
  key: 0,
1965
1979
  actions: u.value,
1966
1980
  size: "lg",
@@ -1969,7 +1983,7 @@ const Dn = { class: "wx-history" }, Fn = {
1969
1983
  ])) : N("", !0)
1970
1984
  ], 10, va));
1971
1985
  }
1972
- }), Bt = /* @__PURE__ */ se(ga, [["__scopeId", "data-v-9ebd5372"]]), ba = ["data-wx-fill"], wa = /* @__PURE__ */ K({
1986
+ }), Bt = /* @__PURE__ */ ne(ga, [["__scopeId", "data-v-9ebd5372"]]), ba = ["data-wx-fill"], wa = /* @__PURE__ */ j({
1973
1987
  __name: "ListScreen",
1974
1988
  props: /* @__PURE__ */ me({
1975
1989
  title: { default: void 0 },
@@ -1989,11 +2003,11 @@ const Dn = { class: "wx-history" }, Fn = {
1989
2003
  emits: ["update:view"],
1990
2004
  setup(e) {
1991
2005
  const t = ge(e, "view");
1992
- return (l, o) => (c(), k("div", {
2006
+ return (l, o) => (d(), x("div", {
1993
2007
  class: ve(["wx-list-screen", { "is-fill": e.fill }]),
1994
2008
  "data-wx-fill": e.fill ? "" : void 0
1995
2009
  }, [
1996
- e.title || e.actions || l.$slots.actions ? (c(), L(Bt, {
2010
+ e.title || e.actions || l.$slots.actions ? (d(), L(Bt, {
1997
2011
  key: 0,
1998
2012
  class: "wx-list-screen__head",
1999
2013
  title: e.title,
@@ -2002,16 +2016,16 @@ const Dn = { class: "wx-history" }, Fn = {
2002
2016
  "back-label": e.backLabel,
2003
2017
  actions: e.actions,
2004
2018
  "collapse-below": 480
2005
- }, Ie({ _: 2 }, [
2019
+ }, Te({ _: 2 }, [
2006
2020
  l.$slots.actions ? {
2007
2021
  name: "extra",
2008
2022
  fn: b(() => [
2009
- ae(l.$slots, "actions", {}, void 0, !0)
2023
+ oe(l.$slots, "actions", {}, void 0, !0)
2010
2024
  ]),
2011
2025
  key: "0"
2012
2026
  } : void 0
2013
2027
  ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : N("", !0),
2014
- e.views && e.views.length > 0 ? (c(), L(n(pl), {
2028
+ e.views && e.views.length > 0 ? (d(), L(n(pl), {
2015
2029
  key: 1,
2016
2030
  modelValue: t.value,
2017
2031
  "onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
@@ -2021,91 +2035,91 @@ const Dn = { class: "wx-history" }, Fn = {
2021
2035
  "aria-label": e.title
2022
2036
  }, {
2023
2037
  default: b(() => [
2024
- e.card ? (c(), L(n(Ge), {
2038
+ e.card ? (d(), L(n(Qe), {
2025
2039
  key: 0,
2026
2040
  class: "wx-list-screen__card",
2027
2041
  padding: e.padding
2028
2042
  }, {
2029
2043
  default: b(() => [
2030
- ae(l.$slots, "default", {}, void 0, !0)
2044
+ oe(l.$slots, "default", {}, void 0, !0)
2031
2045
  ]),
2032
2046
  _: 3
2033
- }, 8, ["padding"])) : ae(l.$slots, "default", {}, void 0, !0, 1)
2047
+ }, 8, ["padding"])) : oe(l.$slots, "default", {}, void 0, !0, 1)
2034
2048
  ]),
2035
2049
  _: 3
2036
- }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (c(), k(j, { key: 2 }, [
2037
- e.card ? (c(), L(n(Ge), {
2050
+ }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (d(), x(K, { key: 2 }, [
2051
+ e.card ? (d(), L(n(Qe), {
2038
2052
  key: 0,
2039
2053
  class: "wx-list-screen__card",
2040
2054
  padding: e.padding
2041
2055
  }, {
2042
2056
  default: b(() => [
2043
- ae(l.$slots, "default", {}, void 0, !0)
2057
+ oe(l.$slots, "default", {}, void 0, !0)
2044
2058
  ]),
2045
2059
  _: 3
2046
- }, 8, ["padding"])) : ae(l.$slots, "default", {}, void 0, !0, 1)
2060
+ }, 8, ["padding"])) : oe(l.$slots, "default", {}, void 0, !0, 1)
2047
2061
  ], 64))
2048
2062
  ], 10, ba));
2049
2063
  }
2050
- }), Dt = /* @__PURE__ */ se(wa, [["__scopeId", "data-v-8c7e5ad1"]]), Ze = "data-wx-path";
2064
+ }), Dt = /* @__PURE__ */ ne(wa, [["__scopeId", "data-v-8c7e5ad1"]]), et = "data-wx-path";
2051
2065
  function _a(e) {
2052
2066
  return typeof e == "string" ? [e] : e !== null && typeof e == "object" ? Object.values(e).filter((t) => typeof t == "string") : [];
2053
2067
  }
2054
- function xa(e) {
2055
- const t = /* @__PURE__ */ new Set(), l = new RegExp(`${Ze}="([^"]+)"`, "g");
2068
+ function ka(e) {
2069
+ const t = /* @__PURE__ */ new Set(), l = new RegExp(`${et}="([^"]+)"`, "g");
2056
2070
  for (const o of _a(e))
2057
- for (const a of o.matchAll(l)) t.add(ka(a[1]));
2071
+ for (const a of o.matchAll(l)) t.add(xa(a[1]));
2058
2072
  return [...t];
2059
2073
  }
2060
- function ka(e) {
2074
+ function xa(e) {
2061
2075
  const t = document.createElement("textarea");
2062
2076
  return t.innerHTML = e, t.value;
2063
2077
  }
2064
- function xt(e, t) {
2078
+ function $t(e, t) {
2065
2079
  const l = document.createElement("template");
2066
2080
  l.innerHTML = e;
2067
2081
  let o = !1;
2068
- for (const a of l.content.querySelectorAll(`[${Ze}]`)) {
2069
- const i = t[a.getAttribute(Ze) ?? ""], s = a.tagName === "A" ? "href" : "src";
2070
- !i || a.getAttribute(s) === i || (a.setAttribute(s, i), o = !0);
2082
+ for (const a of l.content.querySelectorAll(`[${et}]`)) {
2083
+ const s = t[a.getAttribute(et) ?? ""], i = a.tagName === "A" ? "href" : "src";
2084
+ !s || a.getAttribute(i) === s || (a.setAttribute(i, s), o = !0);
2071
2085
  }
2072
2086
  return o ? l.innerHTML : e;
2073
2087
  }
2074
2088
  function $a(e, t) {
2075
- if (typeof e == "string") return xt(e, t);
2089
+ if (typeof e == "string") return $t(e, t);
2076
2090
  if (e !== null && typeof e == "object") {
2077
- const l = Object.entries(e).map(([a, i]) => [
2091
+ const l = Object.entries(e).map(([a, s]) => [
2078
2092
  a,
2079
- typeof i == "string" ? xt(i, t) : i
2093
+ typeof s == "string" ? $t(s, t) : s
2080
2094
  ]);
2081
2095
  return l.some(
2082
- ([a, i]) => i !== e[a]
2096
+ ([a, s]) => s !== e[a]
2083
2097
  ) ? Object.fromEntries(l) : e;
2084
2098
  }
2085
2099
  return e;
2086
2100
  }
2087
- const Sa = /* @__PURE__ */ K({
2101
+ const Sa = /* @__PURE__ */ j({
2088
2102
  name: "WxRichTextField",
2089
2103
  inheritAttrs: !1,
2090
2104
  __name: "RichTextField",
2091
2105
  setup(e) {
2092
- const t = ee(), l = J("webx-admin"), o = w(() => t.pickImage ?? void 0), a = Gt(), i = W(a.modelValue);
2093
- let s;
2094
- oe(
2106
+ const t = ee(), l = J("webx-admin"), o = w(() => t.pickImage ?? void 0), a = Gt(), s = W(a.modelValue);
2107
+ let i;
2108
+ se(
2095
2109
  () => a.modelValue,
2096
2110
  async (m) => {
2097
- i.value = m;
2098
- const p = t.assetUrls, v = m === s || !p ? [] : xa(m);
2111
+ s.value = m;
2112
+ const p = t.assetUrls, v = m === i || !p ? [] : ka(m);
2099
2113
  if (!p || v.length === 0) return;
2100
2114
  const u = await p(v).catch(() => null);
2101
- u && a.modelValue === m && (i.value = $a(m, u));
2115
+ u && a.modelValue === m && (s.value = $a(m, u));
2102
2116
  },
2103
2117
  { immediate: !0 }
2104
2118
  );
2105
2119
  function r(m) {
2106
- s = m;
2120
+ i = m;
2107
2121
  }
2108
- const f = w(() => ({
2122
+ const c = w(() => ({
2109
2123
  bold: l("rich-text.bold"),
2110
2124
  italic: l("rich-text.italic"),
2111
2125
  strike: l("rich-text.strike"),
@@ -2138,67 +2152,75 @@ const Sa = /* @__PURE__ */ K({
2138
2152
  cancel: l("rich-text.cancel"),
2139
2153
  uploading: l("rich-text.uploading")
2140
2154
  }));
2141
- return (m, p) => (c(), L(n(hl), lt(m.$attrs, {
2142
- "model-value": i.value,
2143
- labels: f.value,
2155
+ return (m, p) => (d(), L(n(hl), nt(m.$attrs, {
2156
+ "model-value": s.value,
2157
+ labels: c.value,
2144
2158
  "pick-image": o.value,
2145
2159
  "onUpdate:modelValue": r
2146
2160
  }), null, 16, ["model-value", "labels", "pick-image"]));
2147
2161
  }
2148
2162
  }), Ft = /* @__PURE__ */ Symbol("wx-record-address");
2149
2163
  function Ta(e) {
2150
- Re(Ft, e);
2164
+ Me(Ft, e);
2151
2165
  }
2152
2166
  function Ca() {
2153
2167
  return fe(Ft, null);
2154
2168
  }
2155
- const Aa = { class: "wx-slug" }, Wa = { class: "wx-slug__prefix" }, La = /* @__PURE__ */ K({
2169
+ const Aa = { class: "wx-slug" }, Wa = { class: "wx-slug__prefix" }, La = /* @__PURE__ */ j({
2156
2170
  name: "WxSlugField",
2157
2171
  inheritAttrs: !1,
2158
2172
  __name: "SlugField",
2159
2173
  setup(e) {
2160
- const t = Ca(), l = Ut(), o = w(() => {
2161
- const s = t?.prefix.value ?? "";
2162
- return s === "" ? "/" : `/${s}/`;
2163
- }), a = w(() => {
2164
- const s = t?.values.value.slug;
2165
- return typeof s == "string" ? s : s?.[l.active.value] ?? "";
2174
+ const t = Ca(), l = Et(), o = w(() => t?.prefix.value === null && t.missing !== void 0), a = w(() => {
2175
+ const r = t?.prefix.value ?? "";
2176
+ return r === "" ? "/" : `/${r}/`;
2177
+ }), s = w(() => {
2178
+ const r = t?.values.value.slug;
2179
+ return typeof r == "string" ? r : r?.[l.active.value] ?? "";
2166
2180
  }), i = w(() => {
2167
- const s = t?.path.value;
2168
- return typeof s == "string" && a.value !== "" && `${o.value}${a.value}` != `/${s}`;
2181
+ const r = t?.path.value;
2182
+ return !o.value && typeof r == "string" && s.value !== "" && `${a.value}${s.value}` != `/${r}`;
2169
2183
  });
2170
- return (s, r) => (c(), k("div", Aa, [
2171
- x(n(Te), Qt(Zt(s.$attrs)), {
2172
- prefix: b(() => [
2173
- P("span", Wa, C(o.value), 1)
2174
- ]),
2175
- _: 1
2176
- }, 16),
2177
- i.value && n(t) ? (c(), L(n(Pe), {
2184
+ return (r, c) => (d(), x("div", Aa, [
2185
+ k(n(Ae), Qt(Zt(r.$attrs)), Te({ _: 2 }, [
2186
+ o.value ? void 0 : {
2187
+ name: "prefix",
2188
+ fn: b(() => [
2189
+ P("span", Wa, C(a.value), 1)
2190
+ ]),
2191
+ key: "0"
2192
+ }
2193
+ ]), 1040),
2194
+ o.value && n(t)?.missing ? (d(), L(n($e), {
2178
2195
  key: 0,
2179
2196
  type: "info",
2180
2197
  variant: "soft",
2198
+ description: n(t).missing()
2199
+ }, null, 8, ["description"])) : i.value && n(t) ? (d(), L(n($e), {
2200
+ key: 1,
2201
+ type: "info",
2202
+ variant: "soft",
2181
2203
  description: n(t).moving()
2182
2204
  }, null, 8, ["description"])) : N("", !0)
2183
2205
  ]));
2184
2206
  }
2185
- }), kt = /* @__PURE__ */ se(La, [["__scopeId", "data-v-5921c0dd"]]), Va = {
2207
+ }), St = /* @__PURE__ */ ne(La, [["__scopeId", "data-v-2866b684"]]), Va = {
2186
2208
  "wx-list": { component: Dt, kind: "layout", labelProp: "title" },
2187
2209
  // Full width: an editor shares a row with nothing, and a form of two columns would give it
2188
2210
  // half a line to write a page of text in.
2189
2211
  "wx-rich-text": { component: Sa, kind: "field", wide: !0 },
2190
2212
  // Wide as well: a row of the picker is a segmented switch, a section and a search box, and half
2191
2213
  // a form's width leaves the search box too narrow to read a page title in.
2192
- "wx-link": { component: Un, kind: "field", wide: !0 },
2214
+ "wx-link": { component: En, kind: "field", wide: !0 },
2193
2215
  "wx-categories": { component: Fl, kind: "field" },
2194
2216
  "wx-select": { component: Hl, kind: "field" },
2195
2217
  // Wide: four controls in a column, and half a line leaves the category chips one to a row.
2196
- "wx-collection": { component: xn, kind: "field", wide: !0 },
2218
+ "wx-collection": { component: kn, kind: "field", wide: !0 },
2197
2219
  // Wide: a row carries a picture, a name with a line under it and a mark, and the search box
2198
2220
  // under the list reads titles.
2199
2221
  "wx-relations": { component: Nt, kind: "field", wide: !0 },
2200
- "wx-slug": { component: kt, kind: "field" },
2201
- "wx-category-slug": { component: kt, kind: "field" },
2222
+ "wx-slug": { component: St, kind: "field" },
2223
+ "wx-category-slug": { component: St, kind: "field" },
2202
2224
  // The node's label is the feed's heading; inside a tab that already names it, `props.title: ""`.
2203
2225
  "wx-history": { component: da, kind: "display", labelProp: "title" }
2204
2226
  }, Ht = /* @__PURE__ */ Symbol("webx-admin");
@@ -2209,17 +2231,17 @@ function ee() {
2209
2231
  return e;
2210
2232
  }
2211
2233
  function za(e) {
2212
- const t = ze({
2234
+ const t = Ue({
2213
2235
  status: "loading",
2214
2236
  manifest: null,
2215
2237
  user: null,
2216
2238
  error: null
2217
2239
  }), l = w(() => {
2218
- const d = t.manifest;
2219
- if (d === null)
2240
+ const f = t.manifest;
2241
+ if (f === null)
2220
2242
  return [];
2221
2243
  const T = [];
2222
- for (const y of d.modules) {
2244
+ for (const y of f.modules) {
2223
2245
  const V = e.modules.find((q) => q.id === y.id);
2224
2246
  if (V === void 0)
2225
2247
  continue;
@@ -2235,16 +2257,16 @@ function za(e) {
2235
2257
  }
2236
2258
  return T;
2237
2259
  }), o = w(() => {
2238
- const d = t.manifest?.groups ?? [], T = [], y = /* @__PURE__ */ new Map();
2260
+ const f = t.manifest?.groups ?? [], T = [], y = /* @__PURE__ */ new Map();
2239
2261
  for (const V of l.value)
2240
- if (V.group !== null && d.some((O) => O.id === V.group)) {
2262
+ if (V.group !== null && f.some((O) => O.id === V.group)) {
2241
2263
  const O = y.get(V.group) ?? [];
2242
2264
  O.push(V), y.set(V.group, O);
2243
2265
  } else
2244
2266
  T.push(V);
2245
2267
  return {
2246
2268
  top: T,
2247
- groups: d.filter((V) => y.has(V.id)).map((V) => {
2269
+ groups: f.filter((V) => y.has(V.id)).map((V) => {
2248
2270
  const O = y.get(V.id) ?? [], q = V.sections ?? [], H = (h) => q.some((A) => A.id === h.section);
2249
2271
  return {
2250
2272
  id: V.id,
@@ -2260,14 +2282,14 @@ function za(e) {
2260
2282
  })
2261
2283
  };
2262
2284
  }), a = { ...Va };
2263
- for (const d of e.modules)
2264
- Object.assign(a, d.types);
2285
+ for (const f of e.modules)
2286
+ Object.assign(a, f.types);
2265
2287
  Object.assign(a, e.types);
2266
- const i = e.modules.find((d) => d.pickImage !== void 0)?.pickImage, s = e.modules.find((d) => d.assetUrls !== void 0)?.assetUrls, r = /* @__PURE__ */ new Map();
2267
- async function f(d) {
2268
- const T = `${e.i18n.state.locale}:${d}`;
2288
+ const s = e.modules.find((f) => f.pickImage !== void 0)?.pickImage, i = e.modules.find((f) => f.assetUrls !== void 0)?.assetUrls, r = /* @__PURE__ */ new Map();
2289
+ async function c(f) {
2290
+ const T = `${e.i18n.state.locale}:${f}`;
2269
2291
  let y = r.get(T);
2270
- return y === void 0 && (y = e.http.get(`${e.apiPath}/screens/${d}`).then((V) => V.data.root).catch((V) => {
2292
+ return y === void 0 && (y = e.http.get(`${e.apiPath}/screens/${f}`).then((V) => V.data.root).catch((V) => {
2271
2293
  throw r.delete(T), V;
2272
2294
  }), r.set(T, y)), y;
2273
2295
  }
@@ -2279,14 +2301,14 @@ function za(e) {
2279
2301
  t.manifest = null, t.status = "unauthenticated";
2280
2302
  return;
2281
2303
  }
2282
- const d = await e.loadManifest();
2283
- t.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 _(d.locale), t.status = "ready";
2284
- } catch (d) {
2285
- if (Ea(d)) {
2304
+ const f = await e.loadManifest();
2305
+ t.manifest = f, e.i18n.state.contentLocales = f.locales ?? [], e.i18n.state.panelLocales = f.panelLocales ?? e.i18n.state.panelLocales, f.locale !== void 0 && f.locale !== e.i18n.state.locale && await _(f.locale), t.status = "ready";
2306
+ } catch (f) {
2307
+ if (Ua(f)) {
2286
2308
  t.manifest = null, t.user = null, t.status = "unauthenticated";
2287
2309
  return;
2288
2310
  }
2289
- t.error = d instanceof Error ? d.message : String(d), t.status = "error";
2311
+ t.error = f instanceof Error ? f.message : String(f), t.status = "error";
2290
2312
  }
2291
2313
  }
2292
2314
  async function v() {
@@ -2296,15 +2318,15 @@ function za(e) {
2296
2318
  } catch {
2297
2319
  }
2298
2320
  }
2299
- function u(d) {
2300
- d !== null && e.theme?.adopt(d.theme);
2321
+ function u(f) {
2322
+ f !== null && e.theme?.adopt(f.theme);
2301
2323
  }
2302
- async function _(d) {
2324
+ async function _(f) {
2303
2325
  if (e.loadDictionary === void 0) {
2304
- e.i18n.state.locale = d;
2326
+ e.i18n.state.locale = f;
2305
2327
  return;
2306
2328
  }
2307
- await e.loadDictionary(d), await v();
2329
+ await e.loadDictionary(f), await v();
2308
2330
  }
2309
2331
  const S = {
2310
2332
  http: e.http,
@@ -2316,86 +2338,86 @@ function za(e) {
2316
2338
  nav: l,
2317
2339
  groups: o,
2318
2340
  types: a,
2319
- pickImage: i ?? null,
2320
- assetUrls: s ? (d) => s(d, S) : null,
2341
+ pickImage: s ?? null,
2342
+ assetUrls: i ? (f) => i(f, S) : null,
2321
2343
  reload: p,
2322
2344
  refreshManifest: v,
2323
2345
  setLocale: _,
2324
- setUser(d) {
2325
- t.user = d, u(d);
2346
+ setUser(f) {
2347
+ t.user = f, u(f);
2326
2348
  },
2327
- useSessionLoader(d) {
2328
- m = d;
2349
+ useSessionLoader(f) {
2350
+ m = f;
2329
2351
  },
2330
- can(d) {
2352
+ can(f) {
2331
2353
  const T = t.user;
2332
- return T === null ? !1 : T.isSuper || T.permissions.includes(d);
2354
+ return T === null ? !1 : T.isSuper || T.permissions.includes(f);
2333
2355
  },
2334
- loadScreen: f,
2335
- screenPatch(d) {
2336
- return e.screens?.[d] ?? [];
2356
+ loadScreen: c,
2357
+ screenPatch(f) {
2358
+ return e.screens?.[f] ?? [];
2337
2359
  }
2338
2360
  };
2339
2361
  return S;
2340
2362
  }
2341
- function Ua(e, t) {
2363
+ function Ea(e, t) {
2342
2364
  e.provide(Ht, t);
2343
2365
  }
2344
- function Ea(e) {
2366
+ function Ua(e) {
2345
2367
  return typeof e == "object" && e !== null && "status" in e && e.status === 401;
2346
2368
  }
2347
- const Na = /* @__PURE__ */ K({
2369
+ const Na = /* @__PURE__ */ j({
2348
2370
  __name: "AdminLanding",
2349
2371
  props: {
2350
2372
  landing: { default: null }
2351
2373
  },
2352
2374
  setup(e) {
2353
- const t = e, l = ee(), o = Me(), a = J("webx-admin"), i = w(() => {
2354
- const s = l.nav.value;
2355
- return s.length === 0 ? null : ((t.landing === null ? void 0 : s.find((f) => f.path === t.landing)) ?? s[0])?.path ?? null;
2375
+ const t = e, l = ee(), o = Oe(), a = J("webx-admin"), s = w(() => {
2376
+ const i = l.nav.value;
2377
+ return i.length === 0 ? null : ((t.landing === null ? void 0 : i.find((c) => c.path === t.landing)) ?? i[0])?.path ?? null;
2356
2378
  });
2357
- return oe(
2358
- i,
2359
- (s) => {
2360
- s !== null && o.replace(s);
2379
+ return se(
2380
+ s,
2381
+ (i) => {
2382
+ i !== null && o.replace(i);
2361
2383
  },
2362
2384
  { immediate: !0 }
2363
- ), (s, r) => i.value === null && n(l).state.status === "ready" ? (c(), L(n(yl), {
2385
+ ), (i, r) => s.value === null && n(l).state.status === "ready" ? (d(), L(n(yl), {
2364
2386
  key: 0,
2365
2387
  status: "info",
2366
2388
  title: n(a)("shell.empty-title"),
2367
2389
  description: n(a)("shell.empty-description")
2368
2390
  }, null, 8, ["title", "description"])) : N("", !0);
2369
2391
  }
2370
- }), Ra = /* @__PURE__ */ K({
2392
+ }), Ra = /* @__PURE__ */ j({
2371
2393
  __name: "AdminNav",
2372
2394
  props: {
2373
2395
  collapsed: { type: Boolean }
2374
2396
  },
2375
2397
  emits: ["select"],
2376
2398
  setup(e, { emit: t }) {
2377
- const l = t, o = ee(), a = J("webx-admin"), i = Me(), s = Lt(), r = w({
2399
+ const l = t, o = ee(), a = J("webx-admin"), s = Oe(), i = Vt(), r = w({
2378
2400
  /*
2379
2401
  * The longest path that contains this one, on a segment boundary: a section may live inside
2380
2402
  * another's path (`/services/categories` under `/services`), and the first match in the order
2381
2403
  * of the menu would light up the outer one.
2382
2404
  */
2383
- get: () => o.nav.value.filter((u) => s.path === u.path || s.path.startsWith(`${u.path}/`)).sort((u, _) => _.path.length - u.path.length)[0]?.id ?? "",
2405
+ get: () => o.nav.value.filter((u) => i.path === u.path || i.path.startsWith(`${u.path}/`)).sort((u, _) => _.path.length - u.path.length)[0]?.id ?? "",
2384
2406
  set: (v) => {
2385
2407
  const u = o.nav.value.find((_) => _.id === v);
2386
- u !== void 0 && i.push(u.path);
2408
+ u !== void 0 && s.push(u.path);
2387
2409
  }
2388
- }), f = at("root");
2410
+ }), c = st("root");
2389
2411
  let m = !1;
2390
2412
  async function p() {
2391
- const v = f.value?.$el;
2413
+ const v = c.value?.$el;
2392
2414
  m || r.value === "" || !(v instanceof HTMLElement) || (m = !0, await Promise.allSettled((v.getAnimations?.({ subtree: !0 }) ?? []).map((u) => u.finished)), v.querySelector(".wx-menu-row.is-active")?.scrollIntoView?.({ block: "center" }));
2393
2415
  }
2394
- return Se(p), oe(r, p, { flush: "post" }), (v, u) => {
2395
- const _ = ne("wx-menu-item"), S = ne("wx-menu-group"), d = ne("wx-submenu"), T = ne("wx-menu");
2396
- return c(), L(T, {
2416
+ return Ce(p), se(r, p, { flush: "post" }), (v, u) => {
2417
+ const _ = ae("wx-menu-item"), S = ae("wx-menu-group"), f = ae("wx-submenu"), T = ae("wx-menu");
2418
+ return d(), L(T, {
2397
2419
  ref_key: "root",
2398
- ref: f,
2420
+ ref: c,
2399
2421
  modelValue: r.value,
2400
2422
  "onUpdate:modelValue": u[0] || (u[0] = (y) => r.value = y),
2401
2423
  collapsed: e.collapsed,
@@ -2403,31 +2425,31 @@ const Na = /* @__PURE__ */ K({
2403
2425
  onSelect: u[1] || (u[1] = (y) => l("select"))
2404
2426
  }, {
2405
2427
  default: b(() => [
2406
- (c(!0), k(j, null, ie(n(o).groups.value.top, (y) => (c(), L(_, {
2428
+ (d(!0), x(K, null, ie(n(o).groups.value.top, (y) => (d(), L(_, {
2407
2429
  key: y.id,
2408
2430
  value: y.id,
2409
2431
  icon: y.icon ?? void 0,
2410
2432
  label: y.title
2411
2433
  }, null, 8, ["value", "icon", "label"]))), 128)),
2412
- (c(!0), k(j, null, ie(n(o).groups.value.groups, (y) => (c(), L(d, {
2434
+ (d(!0), x(K, null, ie(n(o).groups.value.groups, (y) => (d(), L(f, {
2413
2435
  key: y.id,
2414
2436
  value: `group:${y.id}`,
2415
2437
  title: y.title,
2416
2438
  icon: y.icon ?? "gear"
2417
2439
  }, {
2418
2440
  default: b(() => [
2419
- (c(!0), k(j, null, ie(y.entries, (V) => (c(), L(_, {
2441
+ (d(!0), x(K, null, ie(y.entries, (V) => (d(), L(_, {
2420
2442
  key: V.id,
2421
2443
  value: V.id,
2422
2444
  icon: V.icon ?? void 0,
2423
2445
  label: V.title
2424
2446
  }, null, 8, ["value", "icon", "label"]))), 128)),
2425
- (c(!0), k(j, null, ie(y.sections, (V) => (c(), L(S, {
2447
+ (d(!0), x(K, null, ie(y.sections, (V) => (d(), L(S, {
2426
2448
  key: V.id,
2427
2449
  title: V.title
2428
2450
  }, {
2429
2451
  default: b(() => [
2430
- (c(!0), k(j, null, ie(V.entries, (O) => (c(), L(_, {
2452
+ (d(!0), x(K, null, ie(V.entries, (O) => (d(), L(_, {
2431
2453
  key: O.id,
2432
2454
  value: O.id,
2433
2455
  icon: O.icon ?? void 0,
@@ -2453,10 +2475,10 @@ const Na = /* @__PURE__ */ K({
2453
2475
  }, Oa = {
2454
2476
  key: 2,
2455
2477
  class: "wx-root wx-admin-plain"
2456
- }, Pa = ["src", "alt", "width", "height"], Ba = ["src", "alt", "width", "height"], Da = ["src", "alt"], Fa = { class: "wx-admin__user" }, Ha = { class: "wx-admin__user wx-admin__user--drawer" }, ja = /* @__PURE__ */ K({
2478
+ }, Pa = ["src", "alt", "width", "height"], Ba = ["src", "alt", "width", "height"], Da = ["src", "alt"], Fa = { class: "wx-admin__user" }, Ha = { class: "wx-admin__user wx-admin__user--drawer" }, ja = /* @__PURE__ */ j({
2457
2479
  __name: "AdminShell",
2458
2480
  setup(e) {
2459
- const t = ee(), l = J("webx-admin"), o = W(null), { width: a, layout: i, collapsed: s, showAside: r, drawerOpen: f, toggle: m, close: p } = gl(
2481
+ const t = ee(), l = J("webx-admin"), o = W(null), { width: a, layout: s, collapsed: i, showAside: r, drawerOpen: c, toggle: m, close: p } = gl(
2460
2482
  o,
2461
2483
  { persist: "webx-admin-shell" }
2462
2484
  ), v = w(() => t.state.manifest?.title ?? ""), u = w(() => t.state.manifest?.branding?.logo ?? null), _ = w(() => t.state.manifest?.branding?.mark ?? null), S = w(() => bl(a.value, null));
@@ -2464,48 +2486,48 @@ const Na = /* @__PURE__ */ K({
2464
2486
  typeof document > "u" || (document.documentElement.dataset.wxShell = S.value);
2465
2487
  }), tl(() => {
2466
2488
  typeof document < "u" && delete document.documentElement.dataset.wxShell;
2467
- }), (d, T) => {
2468
- const y = ne("router-view"), V = ne("wx-loading"), O = ne("wx-button"), q = ne("wx-result"), H = ne("wx-action"), h = ne("wx-text"), A = ne("wx-header"), $ = ne("wx-aside"), M = ne("wx-main"), U = ne("wx-container"), R = ne("wx-drawer");
2469
- return c(), k(j, null, [
2470
- x(n(wl), { placement: "bottom-center" }),
2471
- n(t).state.status === "unauthenticated" ? (c(), k("div", Ia, [
2472
- x(y)
2473
- ])) : n(t).state.status === "loading" ? (c(), k("div", Ma, [
2474
- x(V, {
2489
+ }), (f, T) => {
2490
+ const y = ae("router-view"), V = ae("wx-loading"), O = ae("wx-button"), q = ae("wx-result"), H = ae("wx-action"), h = ae("wx-text"), A = ae("wx-header"), $ = ae("wx-aside"), R = ae("wx-main"), E = ae("wx-container"), I = ae("wx-drawer");
2491
+ return d(), x(K, null, [
2492
+ k(n(wl), { placement: "bottom-center" }),
2493
+ n(t).state.status === "unauthenticated" ? (d(), x("div", Ia, [
2494
+ k(y)
2495
+ ])) : n(t).state.status === "loading" ? (d(), x("div", Ma, [
2496
+ k(V, {
2475
2497
  label: n(l)("shell.loading")
2476
2498
  }, null, 8, ["label"])
2477
- ])) : n(t).state.status === "error" ? (c(), k("div", Oa, [
2478
- x(q, {
2499
+ ])) : n(t).state.status === "error" ? (d(), x("div", Oa, [
2500
+ k(q, {
2479
2501
  status: "error",
2480
2502
  title: n(l)("shell.error-title"),
2481
2503
  description: n(t).state.error
2482
2504
  }, {
2483
2505
  default: b(() => [
2484
- x(O, {
2506
+ k(O, {
2485
2507
  type: "primary",
2486
2508
  onClick: T[0] || (T[0] = (B) => n(t).reload())
2487
2509
  }, {
2488
2510
  default: b(() => [
2489
- I(C(n(l)("shell.retry")), 1)
2511
+ M(C(n(l)("shell.retry")), 1)
2490
2512
  ]),
2491
2513
  _: 1
2492
2514
  })
2493
2515
  ]),
2494
2516
  _: 1
2495
2517
  }, 8, ["title", "description"])
2496
- ])) : (c(), k("div", {
2518
+ ])) : (d(), x("div", {
2497
2519
  key: 3,
2498
2520
  ref_key: "shellEl",
2499
2521
  ref: o,
2500
2522
  class: ve(["wx-root wx-admin", `wx-admin--${S.value}`])
2501
2523
  }, [
2502
- x(U, {
2503
- direction: n(i) === "drawer" ? "vertical" : "horizontal",
2524
+ k(E, {
2525
+ direction: n(s) === "drawer" ? "vertical" : "horizontal",
2504
2526
  "full-height": "",
2505
2527
  class: "wx-admin__frame"
2506
2528
  }, {
2507
2529
  default: b(() => [
2508
- n(i) === "drawer" ? (c(), L(A, {
2530
+ n(s) === "drawer" ? (d(), L(A, {
2509
2531
  key: 0,
2510
2532
  class: "wx-admin__header",
2511
2533
  floating: "",
@@ -2515,29 +2537,29 @@ const Na = /* @__PURE__ */ K({
2515
2537
  height: "var(--wx-admin-header-height)"
2516
2538
  }, {
2517
2539
  end: b(() => [
2518
- ae(d.$slots, "user", { expanded: !1 }, void 0, !0)
2540
+ oe(f.$slots, "user", { expanded: !1 }, void 0, !0)
2519
2541
  ]),
2520
2542
  default: b(() => [
2521
- x(H, {
2543
+ k(H, {
2522
2544
  icon: "menu",
2523
2545
  title: n(l)("nav.menu"),
2524
2546
  onClick: n(m)
2525
2547
  }, null, 8, ["title", "onClick"]),
2526
- ae(d.$slots, "brand", {}, () => [
2527
- u.value ? (c(), k("img", {
2548
+ oe(f.$slots, "brand", {}, () => [
2549
+ u.value ? (d(), x("img", {
2528
2550
  key: 0,
2529
2551
  class: "wx-admin__logo",
2530
2552
  src: u.value.url,
2531
2553
  alt: v.value,
2532
2554
  width: u.value.width ?? void 0,
2533
2555
  height: u.value.height ?? void 0
2534
- }, null, 8, Pa)) : (c(), L(h, {
2556
+ }, null, 8, Pa)) : (d(), L(h, {
2535
2557
  key: 1,
2536
2558
  weight: "semibold",
2537
2559
  truncate: ""
2538
2560
  }, {
2539
2561
  default: b(() => [
2540
- I(C(v.value), 1)
2562
+ M(C(v.value), 1)
2541
2563
  ]),
2542
2564
  _: 1
2543
2565
  }))
@@ -2545,80 +2567,80 @@ const Na = /* @__PURE__ */ K({
2545
2567
  ]),
2546
2568
  _: 3
2547
2569
  })) : N("", !0),
2548
- n(r) ? (c(), L($, {
2570
+ n(r) ? (d(), L($, {
2549
2571
  key: 1,
2550
2572
  class: "wx-admin__aside",
2551
2573
  sticky: "",
2552
2574
  floating: "",
2553
2575
  scroll: "",
2554
2576
  bordered: !1,
2555
- collapsed: n(s),
2577
+ collapsed: n(i),
2556
2578
  width: 220,
2557
2579
  "collapsed-width": 56
2558
2580
  }, {
2559
2581
  top: b(() => [
2560
2582
  P("div", {
2561
- class: ve(["wx-admin__brand", { "wx-admin__brand--stacked": n(s) && _.value }])
2583
+ class: ve(["wx-admin__brand", { "wx-admin__brand--stacked": n(i) && _.value }])
2562
2584
  }, [
2563
- n(s) ? _.value ? (c(), k("img", {
2585
+ n(i) ? _.value ? (d(), x("img", {
2564
2586
  key: 1,
2565
2587
  class: "wx-admin__mark",
2566
2588
  src: _.value.url,
2567
2589
  alt: v.value
2568
- }, null, 8, Da)) : N("", !0) : ae(d.$slots, "brand", {}, () => [
2569
- u.value ? (c(), k("img", {
2590
+ }, null, 8, Da)) : N("", !0) : oe(f.$slots, "brand", {}, () => [
2591
+ u.value ? (d(), x("img", {
2570
2592
  key: 0,
2571
2593
  class: "wx-admin__logo",
2572
2594
  src: u.value.url,
2573
2595
  alt: v.value,
2574
2596
  width: u.value.width ?? void 0,
2575
2597
  height: u.value.height ?? void 0
2576
- }, null, 8, Ba)) : (c(), L(h, {
2598
+ }, null, 8, Ba)) : (d(), L(h, {
2577
2599
  key: 1,
2578
2600
  weight: "semibold",
2579
2601
  truncate: "",
2580
2602
  class: "wx-admin__title"
2581
2603
  }, {
2582
2604
  default: b(() => [
2583
- I(C(v.value), 1)
2605
+ M(C(v.value), 1)
2584
2606
  ]),
2585
2607
  _: 1
2586
2608
  }))
2587
2609
  ], !0, 0),
2588
- x(H, {
2610
+ k(H, {
2589
2611
  icon: "sidebar",
2590
- title: n(s) ? n(l)("nav.expand") : n(l)("nav.collapse"),
2612
+ title: n(i) ? n(l)("nav.expand") : n(l)("nav.collapse"),
2591
2613
  onClick: n(m)
2592
2614
  }, null, 8, ["title", "onClick"])
2593
2615
  ], 2)
2594
2616
  ]),
2595
2617
  bottom: b(() => [
2596
2618
  P("div", Fa, [
2597
- ae(d.$slots, "user", {
2598
- expanded: !n(s)
2619
+ oe(f.$slots, "user", {
2620
+ expanded: !n(i)
2599
2621
  }, void 0, !0)
2600
2622
  ])
2601
2623
  ]),
2602
2624
  default: b(() => [
2603
- ae(d.$slots, "nav", { collapsed: n(s) }, void 0, !0)
2625
+ oe(f.$slots, "nav", { collapsed: n(i) }, void 0, !0)
2604
2626
  ]),
2605
2627
  _: 3
2606
2628
  }, 8, ["collapsed"])) : N("", !0),
2607
- x(M, {
2629
+ k(R, {
2608
2630
  padding: "none",
2609
2631
  class: "wx-admin__screen"
2610
2632
  }, {
2611
2633
  default: b(() => [
2612
- x(y)
2634
+ k(y)
2613
2635
  ]),
2614
2636
  _: 1
2615
2637
  })
2616
2638
  ]),
2617
2639
  _: 3
2618
2640
  }, 8, ["direction"]),
2619
- x(R, {
2620
- open: n(f),
2621
- "onUpdate:open": T[1] || (T[1] = (B) => At(f) ? f.value = B : null),
2641
+ k(I, {
2642
+ open: n(c),
2643
+ "onUpdate:open": T[1] || (T[1] = (B) => Wt(c) ? c.value = B : null),
2622
2644
  class: "wx-admin__drawer",
2623
2645
  title: v.value === "" ? n(l)("nav.menu") : v.value,
2624
2646
  side: "left",
@@ -2628,11 +2650,11 @@ const Na = /* @__PURE__ */ K({
2628
2650
  }, {
2629
2651
  footer: b(() => [
2630
2652
  P("div", Ha, [
2631
- ae(d.$slots, "user", { expanded: !0 }, void 0, !0)
2653
+ oe(f.$slots, "user", { expanded: !0 }, void 0, !0)
2632
2654
  ])
2633
2655
  ]),
2634
2656
  default: b(() => [
2635
- ae(d.$slots, "nav", {
2657
+ oe(f.$slots, "nav", {
2636
2658
  collapsed: !1,
2637
2659
  select: n(p)
2638
2660
  }, void 0, !0)
@@ -2643,8 +2665,8 @@ const Na = /* @__PURE__ */ K({
2643
2665
  ], 64);
2644
2666
  };
2645
2667
  }
2646
- }), Ka = /* @__PURE__ */ se(ja, [["__scopeId", "data-v-819885ab"]]), qa = "webx.theme", jt = /* @__PURE__ */ Symbol("webx-theme");
2647
- function Ho() {
2668
+ }), Ka = /* @__PURE__ */ ne(ja, [["__scopeId", "data-v-819885ab"]]), qa = "webx.theme", jt = /* @__PURE__ */ Symbol("webx-theme");
2669
+ function Ko() {
2648
2670
  const e = fe(jt, null);
2649
2671
  if (e === null)
2650
2672
  throw new Error("useTheme() was called outside a panel created by createAdmin().");
@@ -2654,29 +2676,29 @@ function Ya(e, t) {
2654
2676
  e.provide(jt, t);
2655
2677
  }
2656
2678
  function Xa(e = {}) {
2657
- const t = e.storageKey === void 0 ? qa : e.storageKey, l = ze({
2679
+ const t = e.storageKey === void 0 ? qa : e.storageKey, l = Ue({
2658
2680
  preference: Ja(t) ?? "system",
2659
2681
  resolved: "light"
2660
2682
  });
2661
2683
  function o() {
2662
- Ul(l.preference), l.resolved = l.preference === "system" ? El() : l.preference;
2684
+ El(l.preference), l.resolved = l.preference === "system" ? Ul() : l.preference;
2663
2685
  }
2664
2686
  return o(), zl((a) => {
2665
2687
  l.preference === "system" && (l.resolved = a);
2666
2688
  }), {
2667
2689
  state: l,
2668
2690
  set(a) {
2669
- l.preference = a, o(), $t(t, a);
2691
+ l.preference = a, o(), Tt(t, a);
2670
2692
  },
2671
2693
  adopt(a) {
2672
2694
  if (a === void 0)
2673
2695
  return;
2674
- const i = a ?? "system";
2675
- i !== l.preference && (l.preference = i, o(), $t(t, i));
2696
+ const s = a ?? "system";
2697
+ s !== l.preference && (l.preference = s, o(), Tt(t, s));
2676
2698
  }
2677
2699
  };
2678
2700
  }
2679
- function $t(e, t) {
2701
+ function Tt(e, t) {
2680
2702
  if (e !== null)
2681
2703
  try {
2682
2704
  localStorage.setItem(e, t);
@@ -2694,23 +2716,23 @@ function Ja(e) {
2694
2716
  }
2695
2717
  }
2696
2718
  const Kt = "webx.locale";
2697
- function jo(e = {}) {
2698
- const t = e.manifestUrl ?? lo() ?? "/api/cms/manifest", l = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), o = e.basePath ?? "/cms", a = e.modules ?? [], i = [...e.routes ?? []];
2719
+ function qo(e = {}) {
2720
+ const t = e.manifestUrl ?? lo() ?? "/api/cms/manifest", l = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), o = e.basePath ?? "/cms", a = e.modules ?? [], s = [...e.routes ?? []];
2699
2721
  for (const T of a)
2700
- i.push(...T.routes ?? []);
2701
- if (!i.some((T) => T.path === "/")) {
2722
+ s.push(...T.routes ?? []);
2723
+ if (!s.some((T) => T.path === "/")) {
2702
2724
  const T = a.find((y) => y.landing === !0);
2703
- i.push({
2725
+ s.push({
2704
2726
  path: "/",
2705
2727
  name: "webx.home",
2706
2728
  component: Na,
2707
2729
  props: { landing: T?.path ?? T?.routes?.[0]?.path ?? null }
2708
2730
  });
2709
2731
  }
2710
- const s = sl({
2732
+ const i = sl({
2711
2733
  history: il(o),
2712
- routes: i
2713
- }), r = ut({ locale: e.locale ?? Qa() }), f = Xa(), m = e.http ?? Kl({
2734
+ routes: s
2735
+ }), r = ct({ locale: e.locale ?? Qa() }), c = Xa(), m = e.http ?? Kl({
2714
2736
  baseUrl: "",
2715
2737
  csrfUrl: `${l}/auth/csrf-cookie`,
2716
2738
  onUnauthenticated: () => {
@@ -2729,7 +2751,7 @@ function jo(e = {}) {
2729
2751
  }
2730
2752
  const v = za({
2731
2753
  http: m,
2732
- theme: f,
2754
+ theme: c,
2733
2755
  basePath: o,
2734
2756
  apiPath: l,
2735
2757
  modules: a,
@@ -2739,12 +2761,12 @@ function jo(e = {}) {
2739
2761
  screens: e.screens,
2740
2762
  loadManifest: async () => (await m.get(t)).data
2741
2763
  }), u = ll(Ga(e));
2742
- u.use(_l), Ua(u, v), Il(u, r), Ya(u, f);
2764
+ u.use(_l), Ea(u, v), Il(u, r), Ya(u, c);
2743
2765
  const _ = W("");
2744
2766
  u.provide(
2745
- xl,
2767
+ kl,
2746
2768
  w(() => r.state.locale)
2747
- ), u.provide(kl, {
2769
+ ), u.provide(xl, {
2748
2770
  list: w(
2749
2771
  () => r.state.contentLocales.map((T) => ({
2750
2772
  code: T.code,
@@ -2760,22 +2782,22 @@ function jo(e = {}) {
2760
2782
  });
2761
2783
  const S = {
2762
2784
  app: u,
2763
- router: s,
2785
+ router: i,
2764
2786
  context: v,
2765
2787
  i18n: r,
2766
- theme: f,
2788
+ theme: c,
2767
2789
  async mount() {
2768
- await Promise.all([d(), p(r.state.locale)]).catch(() => {
2790
+ await Promise.all([f(), p(r.state.locale)]).catch(() => {
2769
2791
  }), u.mount(e.el ?? "#webx-app"), await v.reload();
2770
2792
  }
2771
2793
  };
2772
- async function d() {
2794
+ async function f() {
2773
2795
  const T = await m.get(`${l}/locales`);
2774
2796
  r.state.panelLocales = T.data.panel, r.state.contentLocales = T.data.content;
2775
2797
  }
2776
2798
  for (const T of e.plugins ?? [])
2777
2799
  T.install(S);
2778
- return u.use(s), S;
2800
+ return u.use(i), S;
2779
2801
  }
2780
2802
  function Ga(e) {
2781
2803
  const t = {
@@ -2783,9 +2805,9 @@ function Ga(e) {
2783
2805
  // The shell hands in what a choice means where it drew the menu — in the drawer it is what
2784
2806
  // closes it, and a drawer that stays open over the section it just opened is a drawer the
2785
2807
  // reader has to dismiss by hand.
2786
- nav: (l) => xe(Ra, { collapsed: l.collapsed === !0, onSelect: l.select })
2808
+ nav: (l) => ke(Ra, { collapsed: l.collapsed === !0, onSelect: l.select })
2787
2809
  };
2788
- return e.brand !== void 0 && (t.brand = () => xe(e.brand)), e.userMenu !== void 0 && (t.user = (l) => xe(e.userMenu, { expanded: l.expanded === !0 })), { render: () => xe(Ka, null, t) };
2810
+ return e.brand !== void 0 && (t.brand = () => ke(e.brand)), e.userMenu !== void 0 && (t.user = (l) => ke(e.userMenu, { expanded: l.expanded === !0 })), { render: () => ke(Ka, null, t) };
2789
2811
  }
2790
2812
  function Qa() {
2791
2813
  const e = eo(Kt);
@@ -2822,95 +2844,95 @@ function no(e) {
2822
2844
  continue;
2823
2845
  }
2824
2846
  if (/^```([\w-]*)\s*$/.exec(a)) {
2825
- const f = [];
2847
+ const c = [];
2826
2848
  for (o += 1; o < t.length && !/^```\s*$/.test(t[o] ?? ""); )
2827
- f.push(t[o] ?? ""), o += 1;
2828
- o += 1, l.push(`<pre><code>${et(f.join(`
2849
+ c.push(t[o] ?? ""), o += 1;
2850
+ o += 1, l.push(`<pre><code>${tt(c.join(`
2829
2851
  `))}</code></pre>`);
2830
2852
  continue;
2831
2853
  }
2832
- const s = /^(#{1,4})\s+(.*)$/.exec(a);
2833
- if (s) {
2834
- const f = Math.min(s[1].length + 1, 5);
2835
- l.push(`<h${f}>${qe(s[2] ?? "")}</h${f}>`), o += 1;
2854
+ const i = /^(#{1,4})\s+(.*)$/.exec(a);
2855
+ if (i) {
2856
+ const c = Math.min(i[1].length + 1, 5);
2857
+ l.push(`<h${c}>${Ye(i[2] ?? "")}</h${c}>`), o += 1;
2836
2858
  continue;
2837
2859
  }
2838
- if (Le(a)) {
2839
- const f = /^\s*\d+[.)]\s+/.test(a), m = [];
2840
- for (; o < t.length && Le(t[o] ?? ""); )
2860
+ if (ze(a)) {
2861
+ const c = /^\s*\d+[.)]\s+/.test(a), m = [];
2862
+ for (; o < t.length && ze(t[o] ?? ""); )
2841
2863
  for (m.push((t[o] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), o += 1; o < t.length; ) {
2842
2864
  const v = t[o] ?? "";
2843
- if (v.trim() === "" || Le(v) || /^(#{1,4})\s/.test(v) || /^```/.test(v))
2865
+ if (v.trim() === "" || ze(v) || /^(#{1,4})\s/.test(v) || /^```/.test(v))
2844
2866
  break;
2845
2867
  m[m.length - 1] += ` ${v.trim()}`, o += 1;
2846
2868
  }
2847
- const p = f ? "ol" : "ul";
2848
- l.push(`<${p}>${m.map((v) => `<li>${qe(v)}</li>`).join("")}</${p}>`);
2869
+ const p = c ? "ol" : "ul";
2870
+ l.push(`<${p}>${m.map((v) => `<li>${Ye(v)}</li>`).join("")}</${p}>`);
2849
2871
  continue;
2850
2872
  }
2851
2873
  const r = [];
2852
2874
  for (; o < t.length; ) {
2853
- const f = t[o] ?? "";
2854
- if (f.trim() === "" || Le(f) || /^(#{1,4})\s/.test(f) || /^```/.test(f)) break;
2855
- r.push(f.trim()), o += 1;
2875
+ const c = t[o] ?? "";
2876
+ if (c.trim() === "" || ze(c) || /^(#{1,4})\s/.test(c) || /^```/.test(c)) break;
2877
+ r.push(c.trim()), o += 1;
2856
2878
  }
2857
- l.push(`<p>${qe(r.join(" "))}</p>`);
2879
+ l.push(`<p>${Ye(r.join(" "))}</p>`);
2858
2880
  }
2859
2881
  return l.join("");
2860
2882
  }
2861
- const We = "\0";
2862
- function Le(e) {
2883
+ const Ve = "\0";
2884
+ function ze(e) {
2863
2885
  return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
2864
2886
  }
2865
- function qe(e) {
2866
- const t = [], l = e.replace(/`([^`]+)`/g, (a, i) => (t.push(`<code>${et(i)}</code>`), `${We}${t.length - 1}${We}`));
2867
- return et(l).replace(
2887
+ function Ye(e) {
2888
+ const t = [], l = e.replace(/`([^`]+)`/g, (a, s) => (t.push(`<code>${tt(s)}</code>`), `${Ve}${t.length - 1}${Ve}`));
2889
+ return tt(l).replace(
2868
2890
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
2869
2891
  '<a href="$2" target="_blank" rel="noopener">$1</a>'
2870
2892
  ).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
2871
- new RegExp(`${We}(\\d+)${We}`, "g"),
2872
- (a, i) => t[Number(i)] ?? ""
2893
+ new RegExp(`${Ve}(\\d+)${Ve}`, "g"),
2894
+ (a, s) => t[Number(s)] ?? ""
2873
2895
  );
2874
2896
  }
2875
- function et(e) {
2897
+ function tt(e) {
2876
2898
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2877
2899
  }
2878
2900
  function ao(e) {
2879
2901
  function t(l) {
2880
2902
  (l.target === document.body || l.target === document.documentElement) && e(l);
2881
2903
  }
2882
- Se(() => window.addEventListener("keydown", t)), ot(() => window.removeEventListener("keydown", t));
2904
+ Ce(() => window.addEventListener("keydown", t)), it(() => window.removeEventListener("keydown", t));
2883
2905
  }
2884
2906
  function oo(e, t, l) {
2885
- const o = `${e.apiPath}/entities/${t}/${l}/notes`, a = (s) => `${e.apiPath}/notes/${s}`, i = (s) => s.data;
2907
+ const o = `${e.apiPath}/entities/${t}/${l}/notes`, a = (i) => `${e.apiPath}/notes/${i}`, s = (i) => i.data;
2886
2908
  return {
2887
- list: () => e.http.get(o).then(i),
2888
- add: (s) => e.http.post(o, { body: s }).then(i),
2889
- save: (s, r) => e.http.put(a(s), { body: r }).then(i),
2890
- remove: (s) => e.http.delete(a(s)).then(() => {
2909
+ list: () => e.http.get(o).then(s),
2910
+ add: (i) => e.http.post(o, { body: i }).then(s),
2911
+ save: (i, r) => e.http.put(a(i), { body: r }).then(s),
2912
+ remove: (i) => e.http.delete(a(i)).then(() => {
2891
2913
  })
2892
2914
  };
2893
2915
  }
2894
- const Ve = 256 * 1024, tt = "webx:uploads", so = 8e3;
2895
- function Ye(e) {
2916
+ const Ee = 256 * 1024, lt = "webx:uploads", so = 8e3;
2917
+ function Xe(e) {
2896
2918
  return `${e.name}|${e.size}|${e.lastModified}`;
2897
2919
  }
2898
- function Ko(e, t = ct()) {
2899
- return ft(t).filter((l) => e === void 0 || l.purpose === e);
2920
+ function Yo(e, t = mt()) {
2921
+ return vt(t).filter((l) => e === void 0 || l.purpose === e);
2900
2922
  }
2901
- function io(e, t, l = ct()) {
2923
+ function io(e, t, l = mt()) {
2902
2924
  qt(
2903
2925
  l,
2904
- ft(l).filter(
2926
+ vt(l).filter(
2905
2927
  (o) => o.fingerprint !== e || o.purpose !== t
2906
2928
  )
2907
2929
  );
2908
2930
  }
2909
- function qo(e = {}) {
2910
- const t = e.admin ?? ee(), l = e.storage === void 0 ? ct() : e.storage, o = e.retries ?? 3, a = e.retryDelay ?? 1e3, i = `${t.apiPath}/uploads`, s = W("idle"), r = W(0), f = W(0), m = W(0), p = W(null), v = W(null), u = w(() => f.value > 0 ? Math.min(1, r.value / f.value) : 0), _ = w(
2911
- () => m.value > 0 ? Math.ceil((f.value - r.value) / m.value) : null
2931
+ function Xo(e = {}) {
2932
+ const t = e.admin ?? ee(), l = e.storage === void 0 ? mt() : e.storage, o = e.retries ?? 3, a = e.retryDelay ?? 1e3, s = `${t.apiPath}/uploads`, i = W("idle"), r = W(0), c = W(0), m = W(0), p = W(null), v = W(null), u = w(() => c.value > 0 ? Math.min(1, r.value / c.value) : 0), _ = w(
2933
+ () => m.value > 0 ? Math.ceil((c.value - r.value) / m.value) : null
2912
2934
  );
2913
- let S = null, d = "", T = Ve, y = 0, V = null, O = [], q = null, H = null;
2935
+ let S = null, f = "", T = Ee, y = 0, V = null, O = [], q = null, H = null;
2914
2936
  function h(F, Y, G = {}) {
2915
2937
  return ro(t.http, F, Y, G);
2916
2938
  }
@@ -2924,18 +2946,18 @@ function qo(e = {}) {
2924
2946
  const G = q;
2925
2947
  q = null, H = null, Y !== void 0 ? G?.reject(Y) : G?.resolve(F);
2926
2948
  }
2927
- function M(F) {
2928
- v.value = F instanceof Error ? F : new Error(String(F)), s.value = "failed", m.value = 0, $(null, v.value);
2949
+ function R(F) {
2950
+ v.value = F instanceof Error ? F : new Error(String(F)), i.value = "failed", m.value = 0, $(null, v.value);
2929
2951
  }
2930
- function U(F) {
2931
- r.value = Math.min(F, f.value);
2952
+ function E(F) {
2953
+ r.value = Math.min(F, c.value);
2932
2954
  const Y = Date.now();
2933
2955
  O.push({ at: Y, bytes: r.value }), O = O.filter((le) => Y - le.at <= so);
2934
2956
  const G = O[0], ue = G === void 0 ? 0 : (Y - G.at) / 1e3;
2935
- m.value = G !== void 0 && ue > 0 ? (r.value - G.bytes) / ue : 0, S !== null && R(S, d, r.value);
2957
+ m.value = G !== void 0 && ue > 0 ? (r.value - G.bytes) / ue : 0, S !== null && I(S, f, r.value);
2936
2958
  }
2937
- function R(F, Y, G) {
2938
- const ue = Ye(F), le = ft(l).filter(
2959
+ function I(F, Y, G) {
2960
+ const ue = Xe(F), le = vt(l).filter(
2939
2961
  (he) => he.fingerprint !== ue || he.purpose !== Y
2940
2962
  );
2941
2963
  qt(l, [
@@ -2951,52 +2973,52 @@ function qo(e = {}) {
2951
2973
  ]);
2952
2974
  }
2953
2975
  function B() {
2954
- S !== null && io(Ye(S), d, l);
2976
+ S !== null && io(Xe(S), f, l);
2955
2977
  }
2956
2978
  function te() {
2957
2979
  y += 1, V?.abort(), V = null, m.value = 0, O = [];
2958
2980
  }
2959
2981
  async function re(F, Y) {
2960
- if (s.value === "uploading" || s.value === "paused" || s.value === "offline")
2982
+ if (i.value === "uploading" || i.value === "paused" || i.value === "offline")
2961
2983
  throw new Error("This upload is still going; cancel it before starting another.");
2962
- te(), S = F, d = Y, p.value = null, v.value = null, r.value = 0, f.value = F.size, s.value = "uploading";
2984
+ te(), S = F, f = Y, p.value = null, v.value = null, r.value = 0, c.value = F.size, i.value = "uploading";
2963
2985
  const G = A(), ue = y;
2964
2986
  try {
2965
- const le = await t.http.post(i, {
2987
+ const le = await t.http.post(s, {
2966
2988
  name: F.name,
2967
2989
  size: F.size,
2968
2990
  type: F.type,
2969
- fingerprint: Ye(F),
2991
+ fingerprint: Xe(F),
2970
2992
  purpose: Y
2971
2993
  });
2972
2994
  if (ue !== y)
2973
2995
  return G;
2974
- p.value = le.data.id, T = Math.max(Ve, le.data.chunk_size), U(le.data.offset), D();
2996
+ p.value = le.data.id, T = Math.max(Ee, le.data.chunk_size), E(le.data.offset), D();
2975
2997
  } catch (le) {
2976
- ue === y && M(le);
2998
+ ue === y && R(le);
2977
2999
  }
2978
3000
  return G;
2979
3001
  }
2980
3002
  async function ce() {
2981
- const F = await h("HEAD", `${i}/${p.value}`);
3003
+ const F = await h("HEAD", `${s}/${p.value}`);
2982
3004
  if (!F.ok)
2983
- return M(await Qe(F)), !1;
2984
- const Y = Xe(F);
2985
- return Y !== null && U(Y), !0;
3005
+ return R(await Ze(F)), !1;
3006
+ const Y = Je(F);
3007
+ return Y !== null && E(Y), !0;
2986
3008
  }
2987
3009
  async function D() {
2988
3010
  const F = y;
2989
3011
  let Y = 0;
2990
- for (s.value = "uploading"; F === y && S !== null && p.value !== null; ) {
2991
- if (r.value >= f.value) {
2992
- s.value = "done", m.value = 0, B(), $(p.value);
3012
+ for (i.value = "uploading"; F === y && S !== null && p.value !== null; ) {
3013
+ if (r.value >= c.value) {
3014
+ i.value = "done", m.value = 0, B(), $(p.value);
2993
3015
  return;
2994
3016
  }
2995
- const G = r.value, ue = Math.min(f.value, G + T);
3017
+ const G = r.value, ue = Math.min(c.value, G + T);
2996
3018
  V = new AbortController();
2997
3019
  let le;
2998
3020
  try {
2999
- le = await h("PATCH", `${i}/${p.value}`, {
3021
+ le = await h("PATCH", `${s}/${p.value}`, {
3000
3022
  body: S.slice(G, ue),
3001
3023
  headers: {
3002
3024
  "Upload-Offset": String(G),
@@ -3007,12 +3029,12 @@ function qo(e = {}) {
3007
3029
  } catch (he) {
3008
3030
  if (F !== y)
3009
3031
  return;
3010
- if (St()) {
3032
+ if (Ct()) {
3011
3033
  z();
3012
3034
  return;
3013
3035
  }
3014
3036
  if (Y += 1, Y > o) {
3015
- M(he);
3037
+ R(he);
3016
3038
  return;
3017
3039
  }
3018
3040
  if (await uo(a * 2 ** (Y - 1)), F !== y)
@@ -3027,74 +3049,74 @@ function qo(e = {}) {
3027
3049
  if (F !== y)
3028
3050
  return;
3029
3051
  if (le.ok) {
3030
- Y = 0, U(Xe(le) ?? ue);
3052
+ Y = 0, E(Je(le) ?? ue);
3031
3053
  continue;
3032
3054
  }
3033
3055
  if (le.status === 409) {
3034
- const he = Xe(le);
3056
+ const he = Je(le);
3035
3057
  if (he !== null) {
3036
- U(he);
3058
+ E(he);
3037
3059
  continue;
3038
3060
  }
3039
3061
  }
3040
- if (le.status === 413 && T > Ve) {
3041
- T = Math.max(Ve, Math.floor(T / 2));
3062
+ if (le.status === 413 && T > Ee) {
3063
+ T = Math.max(Ee, Math.floor(T / 2));
3042
3064
  continue;
3043
3065
  }
3044
- M(await Qe(le));
3066
+ R(await Ze(le));
3045
3067
  return;
3046
3068
  }
3047
3069
  }
3048
3070
  function g() {
3049
- s.value === "uploading" && (te(), s.value = "paused");
3071
+ i.value === "uploading" && (te(), i.value = "paused");
3050
3072
  }
3051
3073
  function z() {
3052
- te(), s.value = "offline";
3074
+ te(), i.value = "offline";
3053
3075
  }
3054
- async function E() {
3055
- if (s.value === "uploading" || s.value === "done" || s.value === "idle")
3056
- return H ?? Promise.resolve(s.value === "done" ? p.value : null);
3076
+ async function U() {
3077
+ if (i.value === "uploading" || i.value === "done" || i.value === "idle")
3078
+ return H ?? Promise.resolve(i.value === "done" ? p.value : null);
3057
3079
  if (S === null)
3058
3080
  return Promise.resolve(null);
3059
3081
  if (p.value === null)
3060
- return s.value = "idle", re(S, d);
3061
- te(), v.value = null, s.value = "uploading";
3082
+ return i.value = "idle", re(S, f);
3083
+ te(), v.value = null, i.value = "uploading";
3062
3084
  const F = A(), Y = y;
3063
3085
  try {
3064
3086
  await ce() && Y === y && D();
3065
3087
  } catch (G) {
3066
- Y === y && (St() ? z() : M(G));
3088
+ Y === y && (Ct() ? z() : R(G));
3067
3089
  }
3068
3090
  return F;
3069
3091
  }
3070
3092
  async function X() {
3071
3093
  const F = p.value;
3072
- if (te(), B(), s.value = "idle", r.value = 0, p.value = null, $(null), F !== null)
3094
+ if (te(), B(), i.value = "idle", r.value = 0, p.value = null, $(null), F !== null)
3073
3095
  try {
3074
- await h("DELETE", `${i}/${F}`);
3096
+ await h("DELETE", `${s}/${F}`);
3075
3097
  } catch {
3076
3098
  }
3077
3099
  }
3078
3100
  function pe() {
3079
- s.value === "uploading" && z();
3101
+ i.value === "uploading" && z();
3080
3102
  }
3081
- function vt() {
3082
- s.value === "offline" && E();
3103
+ function ht() {
3104
+ i.value === "offline" && U();
3083
3105
  }
3084
- return typeof window < "u" && (window.addEventListener("offline", pe), window.addEventListener("online", vt)), nl() !== void 0 && al(() => {
3085
- typeof window < "u" && (window.removeEventListener("offline", pe), window.removeEventListener("online", vt)), g();
3106
+ return typeof window < "u" && (window.addEventListener("offline", pe), window.addEventListener("online", ht)), nl() !== void 0 && al(() => {
3107
+ typeof window < "u" && (window.removeEventListener("offline", pe), window.removeEventListener("online", ht)), g();
3086
3108
  }), {
3087
- state: we(s),
3109
+ state: we(i),
3088
3110
  progress: u,
3089
3111
  uploaded: we(r),
3090
- total: we(f),
3112
+ total: we(c),
3091
3113
  speed: we(m),
3092
3114
  remaining: _,
3093
3115
  id: we(p),
3094
3116
  error: we(v),
3095
3117
  start: re,
3096
3118
  pause: g,
3097
- resume: E,
3119
+ resume: U,
3098
3120
  cancel: X
3099
3121
  };
3100
3122
  }
@@ -3107,28 +3129,28 @@ async function ro(e, t, l, o) {
3107
3129
  signal: o.signal
3108
3130
  });
3109
3131
  }
3110
- function Xe(e) {
3132
+ function Je(e) {
3111
3133
  const t = e.headers.get("Upload-Offset");
3112
3134
  return t === null || !/^\d+$/.test(t) ? null : Number.parseInt(t, 10);
3113
3135
  }
3114
- function St() {
3136
+ function Ct() {
3115
3137
  return typeof navigator < "u" && navigator.onLine === !1;
3116
3138
  }
3117
3139
  function uo(e) {
3118
3140
  return new Promise((t) => setTimeout(t, e));
3119
3141
  }
3120
- function ct() {
3142
+ function mt() {
3121
3143
  try {
3122
3144
  return typeof localStorage > "u" ? null : localStorage;
3123
3145
  } catch {
3124
3146
  return null;
3125
3147
  }
3126
3148
  }
3127
- function ft(e) {
3149
+ function vt(e) {
3128
3150
  if (e === null)
3129
3151
  return [];
3130
3152
  try {
3131
- const t = JSON.parse(e.getItem(tt) ?? "[]");
3153
+ const t = JSON.parse(e.getItem(lt) ?? "[]");
3132
3154
  return Array.isArray(t) ? t : [];
3133
3155
  } catch {
3134
3156
  return [];
@@ -3137,86 +3159,116 @@ function ft(e) {
3137
3159
  function qt(e, t) {
3138
3160
  if (e !== null)
3139
3161
  try {
3140
- t.length === 0 ? e.removeItem(tt) : e.setItem(tt, JSON.stringify(t));
3162
+ t.length === 0 ? e.removeItem(lt) : e.setItem(lt, JSON.stringify(t));
3141
3163
  } catch {
3142
3164
  }
3143
3165
  }
3144
3166
  const Yt = /* @__PURE__ */ Symbol("wx-category-editor");
3145
3167
  function co(e) {
3146
- Re(Yt, e);
3168
+ Me(Yt, e);
3147
3169
  }
3148
- function Yo() {
3170
+ function Jo() {
3149
3171
  return fe(Yt, null);
3150
3172
  }
3151
3173
  function fo(e) {
3152
3174
  return (e.q ?? "").trim() !== "" || e.filtered ? "locked" : e.category == null ? "all" : "category";
3153
3175
  }
3154
- function Xo(e, t) {
3176
+ function Go(e, t) {
3155
3177
  const l = ee(), o = J("webx-admin"), a = w(() => fo(t()));
3156
3178
  return {
3157
3179
  mode: a,
3158
3180
  sortable: w(() => a.value !== "locked"),
3159
3181
  hint: w(() => o(`categories.order-${a.value}`)),
3160
- move: (i) => Ol(l, e, i, a.value === "category" ? t().category ?? null : null)
3182
+ move: (s) => Ol(l, e, s, a.value === "category" ? t().category ?? null : null)
3161
3183
  };
3162
3184
  }
3163
- function mt(e = {}) {
3185
+ const mo = /* @__PURE__ */ j({
3186
+ __name: "AddressNote",
3187
+ props: {
3188
+ locale: {}
3189
+ },
3190
+ setup(e) {
3191
+ const t = e, l = J("webx-admin");
3192
+ return (o, a) => t.locale ? (d(), L(n(ut), {
3193
+ key: 0,
3194
+ content: n(l)("links.address-fallback", { locale: t.locale.toUpperCase() }),
3195
+ "max-width": 280
3196
+ }, {
3197
+ default: b(() => [
3198
+ P("span", {
3199
+ class: "wx-address-note",
3200
+ tabindex: "0",
3201
+ onClick: a[0] || (a[0] = ot(() => {
3202
+ }, ["stop"]))
3203
+ }, [
3204
+ k(n(Be), {
3205
+ name: "info",
3206
+ size: "14px",
3207
+ label: n(l)("links.address-fallback-label")
3208
+ }, null, 8, ["label"])
3209
+ ])
3210
+ ]),
3211
+ _: 1
3212
+ }, 8, ["content"])) : N("", !0);
3213
+ }
3214
+ }), vo = /* @__PURE__ */ ne(mo, [["__scopeId", "data-v-38e2b4c5"]]);
3215
+ function pt(e = {}) {
3164
3216
  const t = J("webx-admin");
3165
3217
  return (l, o) => t(e[l] ?? `webx-admin::categories.${l}`, o);
3166
3218
  }
3167
- const mo = /* @__PURE__ */ K({
3219
+ const po = /* @__PURE__ */ j({
3168
3220
  name: "WxCategoryCreateDialog",
3169
3221
  __name: "CategoryCreateDialog",
3170
3222
  props: {
3171
3223
  options: {}
3172
3224
  },
3173
3225
  setup(e) {
3174
- const t = e, { open: l, resolve: o, dismiss: a } = $l(), i = _e(ee(), t.options.api), s = mt(t.options.words), r = W(""), f = W(!1), m = W({}), p = at("field");
3175
- Se(async () => {
3176
- await nt(), p.value?.querySelector("input")?.focus();
3226
+ const t = e, { open: l, resolve: o, dismiss: a } = $l(), s = _e(ee(), t.options.api), i = pt(t.options.words), r = W(""), c = W(!1), m = W({}), p = st("field");
3227
+ Ce(async () => {
3228
+ await at(), p.value?.querySelector("input")?.focus();
3177
3229
  });
3178
3230
  function v(_) {
3179
- const S = Object.keys(m.value).find((d) => d === _ || d.startsWith(`${_}.`));
3231
+ const S = Object.keys(m.value).find((f) => f === _ || f.startsWith(`${_}.`));
3180
3232
  return S === void 0 ? void 0 : m.value[S]?.[0];
3181
3233
  }
3182
3234
  async function u() {
3183
- if (!(r.value.trim() === "" || f.value)) {
3184
- f.value = !0, m.value = {};
3235
+ if (!(r.value.trim() === "" || c.value)) {
3236
+ c.value = !0, m.value = {};
3185
3237
  try {
3186
- o(await i.create({ title: r.value.trim() }));
3238
+ o(await s.create({ title: r.value.trim() }));
3187
3239
  } catch (_) {
3188
3240
  m.value = _.body?.errors ?? {};
3189
3241
  } finally {
3190
- f.value = !1;
3242
+ c.value = !1;
3191
3243
  }
3192
3244
  }
3193
3245
  }
3194
- return (_, S) => (c(), L(n(it), {
3246
+ return (_, S) => (d(), L(n(dt), {
3195
3247
  open: n(l),
3196
- "onUpdate:open": S[2] || (S[2] = (d) => At(l) ? l.value = d : null),
3197
- title: n(s)("new"),
3248
+ "onUpdate:open": S[2] || (S[2] = (f) => Wt(l) ? l.value = f : null),
3249
+ title: n(i)("new"),
3198
3250
  width: 440
3199
3251
  }, {
3200
3252
  footer: b(() => [
3201
- x(n(Tl), { size: "sm" }, {
3253
+ k(n(Tl), { size: "sm" }, {
3202
3254
  default: b(() => [
3203
- x(n(de), {
3255
+ k(n(de), {
3204
3256
  variant: "outline",
3205
- onClick: S[1] || (S[1] = (d) => n(a)())
3257
+ onClick: S[1] || (S[1] = (f) => n(a)())
3206
3258
  }, {
3207
3259
  default: b(() => [
3208
- I(C(n(s)("cancel")), 1)
3260
+ M(C(n(i)("cancel")), 1)
3209
3261
  ]),
3210
3262
  _: 1
3211
3263
  }),
3212
- x(n(de), {
3264
+ k(n(de), {
3213
3265
  type: "primary",
3214
- loading: f.value,
3266
+ loading: c.value,
3215
3267
  disabled: r.value.trim() === "",
3216
3268
  onClick: u
3217
3269
  }, {
3218
3270
  default: b(() => [
3219
- I(C(n(s)("create")), 1)
3271
+ M(C(n(i)("create")), 1)
3220
3272
  ]),
3221
3273
  _: 1
3222
3274
  }, 8, ["loading", "disabled"])
@@ -3225,8 +3277,8 @@ const mo = /* @__PURE__ */ K({
3225
3277
  })
3226
3278
  ]),
3227
3279
  default: b(() => [
3228
- x(n(Sl), {
3229
- label: n(s)("field-title"),
3280
+ k(n(Sl), {
3281
+ label: n(i)("field-title"),
3230
3282
  error: v("title") ?? v("slug"),
3231
3283
  required: ""
3232
3284
  }, {
@@ -3235,11 +3287,11 @@ const mo = /* @__PURE__ */ K({
3235
3287
  ref_key: "field",
3236
3288
  ref: p
3237
3289
  }, [
3238
- x(n(Te), {
3290
+ k(n(Ae), {
3239
3291
  modelValue: r.value,
3240
- "onUpdate:modelValue": S[0] || (S[0] = (d) => r.value = d),
3241
- "aria-label": n(s)("field-title"),
3242
- onKeyup: Wt(u, ["enter"])
3292
+ "onUpdate:modelValue": S[0] || (S[0] = (f) => r.value = f),
3293
+ "aria-label": n(i)("field-title"),
3294
+ onKeyup: Lt(u, ["enter"])
3243
3295
  }, null, 8, ["modelValue", "aria-label"])
3244
3296
  ], 512)
3245
3297
  ]),
@@ -3249,28 +3301,28 @@ const mo = /* @__PURE__ */ K({
3249
3301
  _: 1
3250
3302
  }, 8, ["open", "title"]));
3251
3303
  }
3252
- }), vo = { class: "wx-category-row__name" }, po = /* @__PURE__ */ K({
3304
+ }), ho = { class: "wx-category-row__name" }, yo = /* @__PURE__ */ j({
3253
3305
  name: "WxCategoriesPage",
3254
3306
  __name: "CategoriesPage",
3255
3307
  props: {
3256
3308
  options: {}
3257
3309
  },
3258
3310
  setup(e) {
3259
- const t = e, l = ee(), o = _e(l, t.options.api), a = Me(), i = mt(t.options.words), s = J("webx-admin"), r = De(), f = W([]), m = W(!0), p = W(!0), v = w(() => l.can(t.options.manage)), u = w(
3260
- () => t.options.title ? s(t.options.title) : l.state.manifest?.modules.find((h) => h.id === t.options.module)?.title ?? ""
3261
- ), _ = Cl(mo), S = w(
3262
- () => v.value ? [{ key: "new", label: i("new"), icon: "plus", primary: !0, run: () => {
3311
+ const t = e, l = ee(), o = _e(l, t.options.api), a = Oe(), s = pt(t.options.words), i = J("webx-admin"), r = Fe(), c = W([]), m = W(!0), p = W(!0), v = w(() => l.can(t.options.manage)), u = w(
3312
+ () => t.options.title ? i(t.options.title) : l.state.manifest?.modules.find((h) => h.id === t.options.module)?.title ?? ""
3313
+ ), _ = Cl(po), S = w(
3314
+ () => v.value ? [{ key: "new", label: s("new"), icon: "plus", primary: !0, run: () => {
3263
3315
  V();
3264
3316
  } }] : []
3265
3317
  );
3266
- function d(h) {
3318
+ function f(h) {
3267
3319
  return Number(h[t.options.count] ?? 0);
3268
3320
  }
3269
3321
  async function T() {
3270
3322
  m.value = !0;
3271
3323
  try {
3272
3324
  const h = await o.list();
3273
- f.value = h.data, p.value = h.prefix !== null;
3325
+ c.value = h.data, p.value = h.prefix !== null;
3274
3326
  } catch (h) {
3275
3327
  Z.danger(r(h));
3276
3328
  } finally {
@@ -3286,35 +3338,35 @@ const mo = /* @__PURE__ */ K({
3286
3338
  h !== void 0 && y(h);
3287
3339
  }
3288
3340
  async function O(h) {
3289
- if (d(h) > 0) {
3290
- Z.warning(i("delete-blocked"));
3341
+ if (f(h) > 0) {
3342
+ Z.warning(s("delete-blocked"));
3291
3343
  return;
3292
3344
  }
3293
- if (await Ee({
3294
- title: i("delete-title", { name: h.name }),
3295
- message: i("delete-text"),
3296
- confirmText: i("delete"),
3297
- cancelText: i("cancel"),
3345
+ if (await Re({
3346
+ title: s("delete-title", { name: h.name }),
3347
+ message: s("delete-text"),
3348
+ confirmText: s("delete"),
3349
+ cancelText: s("cancel"),
3298
3350
  tone: "danger"
3299
3351
  }))
3300
3352
  try {
3301
- await o.remove(h.id), Z.success(i("deleted")), await T();
3353
+ await o.remove(h.id), Z.success(s("deleted")), await T();
3302
3354
  } catch ($) {
3303
3355
  Z.danger(r($));
3304
3356
  }
3305
3357
  }
3306
3358
  function q(h) {
3307
- const A = [{ key: "edit", label: i("edit"), icon: "edit", run: () => y(h) }], $ = t.options.items;
3308
- return $ && d(h) > 0 && A.push({
3359
+ const A = [{ key: "edit", label: s("edit"), icon: "edit", run: () => y(h) }], $ = t.options.items;
3360
+ return $ && f(h) > 0 && A.push({
3309
3361
  key: "items",
3310
- label: i("show-items"),
3362
+ label: s("show-items"),
3311
3363
  icon: "file-txt",
3312
3364
  run: () => {
3313
3365
  a.push($(h.id));
3314
3366
  }
3315
- }), h.url && h.is_visible && A.push({ key: "site", label: i("open-on-site"), icon: "link", href: h.url }), v.value && A.push({
3367
+ }), h.url && h.is_visible && A.push({ key: "site", label: s("open-on-site"), icon: "link", href: h.url }), v.value && A.push({
3316
3368
  key: "delete",
3317
- label: i("delete"),
3369
+ label: s("delete"),
3318
3370
  icon: "trash",
3319
3371
  danger: !0,
3320
3372
  run: () => {
@@ -3324,63 +3376,63 @@ const mo = /* @__PURE__ */ K({
3324
3376
  }
3325
3377
  async function H() {
3326
3378
  try {
3327
- await o.reorder(f.value.map((h) => h.id));
3379
+ await o.reorder(c.value.map((h) => h.id));
3328
3380
  } catch (h) {
3329
- Z.danger(r(h, i("reorder-failed"))), await T();
3381
+ Z.danger(r(h, s("reorder-failed"))), await T();
3330
3382
  }
3331
3383
  }
3332
3384
  return (h, A) => {
3333
- const $ = ne("router-link");
3334
- return c(), L(Dt, {
3385
+ const $ = ae("router-link");
3386
+ return d(), L(Dt, {
3335
3387
  class: "wx-categories",
3336
3388
  title: u.value,
3337
3389
  back: t.options.back?.path,
3338
- "back-label": t.options.back ? n(s)(t.options.back.label) : void 0,
3390
+ "back-label": t.options.back ? n(i)(t.options.back.label) : void 0,
3339
3391
  actions: S.value,
3340
3392
  padding: "sm"
3341
3393
  }, {
3342
3394
  default: b(() => [
3343
- m.value ? (c(), L(n(ye), {
3395
+ m.value ? (d(), L(n(ye), {
3344
3396
  key: 0,
3345
3397
  class: "wx-categories__loading",
3346
3398
  rows: 5
3347
- })) : f.value.length === 0 ? (c(), L(n(Ue), {
3399
+ })) : c.value.length === 0 ? (d(), L(n(Ne), {
3348
3400
  key: 1,
3349
- title: n(i)("empty"),
3350
- description: n(i)("empty-help")
3351
- }, null, 8, ["title", "description"])) : (c(), k(j, { key: 2 }, [
3352
- x(n(st), {
3353
- modelValue: f.value,
3354
- "onUpdate:modelValue": A[0] || (A[0] = (M) => f.value = M),
3401
+ title: n(s)("empty"),
3402
+ description: n(s)("empty-help")
3403
+ }, null, 8, ["title", "description"])) : (d(), x(K, { key: 2 }, [
3404
+ k(n(rt), {
3405
+ modelValue: c.value,
3406
+ "onUpdate:modelValue": A[0] || (A[0] = (R) => c.value = R),
3355
3407
  class: "wx-categories__list",
3356
3408
  plain: "",
3357
3409
  "item-key": "id",
3358
- "item-label": (M) => M.name,
3410
+ "item-label": (R) => R.name,
3359
3411
  disabled: !v.value,
3360
3412
  onMove: H
3361
3413
  }, {
3362
- default: b(({ item: M }) => [
3363
- x($, {
3364
- class: ve(["wx-category-row", { "is-hidden": !M.is_visible }]),
3365
- to: `${t.options.path}/${M.id}`
3414
+ default: b(({ item: R }) => [
3415
+ k($, {
3416
+ class: ve(["wx-category-row", { "is-hidden": !R.is_visible }]),
3417
+ to: `${t.options.path}/${R.id}`
3366
3418
  }, {
3367
3419
  default: b(() => [
3368
- P("span", vo, [
3369
- x(n(Q), {
3420
+ P("span", ho, [
3421
+ k(n(Q), {
3370
3422
  truncate: "",
3371
3423
  weight: "medium"
3372
3424
  }, {
3373
3425
  default: b(() => [
3374
- I(C(M.name), 1)
3426
+ M(C(R.name), 1)
3375
3427
  ]),
3376
3428
  _: 2
3377
3429
  }, 1024),
3378
- M.is_visible ? N("", !0) : (c(), L(n(Vt), {
3430
+ R.is_visible ? N("", !0) : (d(), L(n(ut), {
3379
3431
  key: 0,
3380
- content: n(i)("hidden")
3432
+ content: n(s)("hidden")
3381
3433
  }, {
3382
3434
  default: b(() => [
3383
- x(n(rt), {
3435
+ k(n(Be), {
3384
3436
  name: "eye-off",
3385
3437
  size: "sm"
3386
3438
  })
@@ -3388,14 +3440,18 @@ const mo = /* @__PURE__ */ K({
3388
3440
  _: 1
3389
3441
  }, 8, ["content"]))
3390
3442
  ]),
3391
- p.value ? (c(), L(n(Q), {
3443
+ p.value ? (d(), L(n(Q), {
3392
3444
  key: 0,
3393
3445
  size: "sm",
3394
3446
  tone: "muted",
3395
3447
  truncate: ""
3396
3448
  }, {
3397
3449
  default: b(() => [
3398
- I(C(M.path === null ? n(i)("no-address") : `/${M.path}`), 1)
3450
+ M(C(R.path === null ? n(s)("no-address") : `/${R.path}`) + " ", 1),
3451
+ R.path !== null ? (d(), L(vo, {
3452
+ key: 0,
3453
+ locale: R.address_locale
3454
+ }, null, 8, ["locale"])) : N("", !0)
3399
3455
  ]),
3400
3456
  _: 2
3401
3457
  }, 1024)) : N("", !0)
@@ -3403,28 +3459,28 @@ const mo = /* @__PURE__ */ K({
3403
3459
  _: 2
3404
3460
  }, 1032, ["class", "to"])
3405
3461
  ]),
3406
- actions: b(({ item: M }) => [
3407
- x(n(Q), {
3462
+ actions: b(({ item: R }) => [
3463
+ k(n(Q), {
3408
3464
  class: "wx-category-row__count",
3409
3465
  size: "sm",
3410
3466
  tone: "muted"
3411
3467
  }, {
3412
3468
  default: b(() => [
3413
- I(C(n(i)("count", { count: d(M) })), 1)
3469
+ M(C(n(s)("count", { count: f(R) })), 1)
3414
3470
  ]),
3415
3471
  _: 2
3416
3472
  }, 1024),
3417
- x(dt, {
3418
- actions: q(M),
3419
- label: M.name
3473
+ k(ft, {
3474
+ actions: q(R),
3475
+ label: R.name
3420
3476
  }, null, 8, ["actions", "label"])
3421
3477
  ]),
3422
3478
  _: 1
3423
3479
  }, 8, ["modelValue", "item-label", "disabled"]),
3424
- x(n(Pe), {
3480
+ k(n($e), {
3425
3481
  class: "wx-categories__note",
3426
3482
  type: "info",
3427
- description: n(i)("order")
3483
+ description: n(s)("order")
3428
3484
  }, null, 8, ["description"])
3429
3485
  ], 64))
3430
3486
  ]),
@@ -3432,11 +3488,11 @@ const mo = /* @__PURE__ */ K({
3432
3488
  }, 8, ["title", "back", "back-label", "actions"]);
3433
3489
  };
3434
3490
  }
3435
- }), ho = {
3491
+ }), go = {
3436
3492
  class: "wx-save-state",
3437
3493
  role: "status",
3438
3494
  "aria-live": "polite"
3439
- }, yo = /* @__PURE__ */ K({
3495
+ }, bo = /* @__PURE__ */ j({
3440
3496
  __name: "SaveState",
3441
3497
  props: {
3442
3498
  state: {},
@@ -3445,30 +3501,30 @@ const mo = /* @__PURE__ */ K({
3445
3501
  setup(e) {
3446
3502
  const t = e, l = J("webx-admin"), o = W(!1);
3447
3503
  let a = null;
3448
- oe(
3504
+ se(
3449
3505
  () => t.state,
3450
- (s, r) => {
3451
- a !== null && clearTimeout(a), o.value = r === "saving" && s === "saved", o.value && (a = window.setTimeout(() => {
3506
+ (i, r) => {
3507
+ a !== null && clearTimeout(a), o.value = r === "saving" && i === "saved", o.value && (a = window.setTimeout(() => {
3452
3508
  o.value = !1, a = null;
3453
3509
  }, t.linger));
3454
3510
  }
3455
3511
  );
3456
- const i = w(
3512
+ const s = w(
3457
3513
  () => t.state === "saving" ? "saving" : o.value ? "saved" : null
3458
3514
  );
3459
- return ot(() => {
3515
+ return it(() => {
3460
3516
  a !== null && clearTimeout(a);
3461
- }), (s, r) => (c(), k("span", ho, [
3462
- i.value ? (c(), L(n(rt), {
3517
+ }), (i, r) => (d(), x("span", go, [
3518
+ s.value ? (d(), L(n(Be), {
3463
3519
  key: 0,
3464
- class: ve(["wx-save-state__mark", { "is-saved": i.value === "saved" }]),
3465
- name: i.value === "saving" ? "loader" : "check",
3466
- spin: i.value === "saving",
3467
- label: n(l)(`editor.${i.value}`)
3520
+ class: ve(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
3521
+ name: s.value === "saving" ? "loader" : "check",
3522
+ spin: s.value === "saving",
3523
+ label: n(l)(`editor.${s.value}`)
3468
3524
  }, null, 8, ["class", "name", "spin", "label"])) : N("", !0)
3469
3525
  ]));
3470
3526
  }
3471
- }), go = /* @__PURE__ */ se(yo, [["__scopeId", "data-v-216e5e44"]]), bo = { class: "wx-screen-host" }, wo = /* @__PURE__ */ K({
3527
+ }), wo = /* @__PURE__ */ ne(bo, [["__scopeId", "data-v-216e5e44"]]), _o = { class: "wx-screen-host" }, ko = /* @__PURE__ */ j({
3472
3528
  __name: "Screen",
3473
3529
  props: /* @__PURE__ */ me({
3474
3530
  name: {},
@@ -3483,37 +3539,37 @@ const mo = /* @__PURE__ */ K({
3483
3539
  }),
3484
3540
  emits: /* @__PURE__ */ me(["loaded"], ["update:modelValue"]),
3485
3541
  setup(e, { expose: t, emit: l }) {
3486
- const o = e, a = l, i = ge(e, "modelValue"), s = ee(), r = J("webx-admin"), f = W(null), m = W(null);
3542
+ const o = e, a = l, s = ge(e, "modelValue"), i = ee(), r = J("webx-admin"), c = W(null), m = W(null);
3487
3543
  async function p() {
3488
- f.value = null, m.value = null;
3544
+ c.value = null, m.value = null;
3489
3545
  try {
3490
- const v = await s.loadScreen(o.name);
3491
- f.value = v, a("loaded", v);
3546
+ const v = await i.loadScreen(o.name);
3547
+ c.value = v, a("loaded", v);
3492
3548
  } catch (v) {
3493
3549
  m.value = v instanceof Error ? v.message : String(v);
3494
3550
  }
3495
3551
  }
3496
- return oe([() => o.name, () => s.i18n.state.locale], () => {
3552
+ return se([() => o.name, () => i.i18n.state.locale], () => {
3497
3553
  p();
3498
- }, { immediate: !0 }), t({ reload: p }), (v, u) => (c(), k("div", bo, [
3499
- m.value ? (c(), L(n(Pe), {
3554
+ }, { immediate: !0 }), t({ reload: p }), (v, u) => (d(), x("div", _o, [
3555
+ m.value ? (d(), L(n($e), {
3500
3556
  key: 0,
3501
3557
  type: "danger",
3502
3558
  title: n(r)("shell.error-title"),
3503
3559
  description: m.value
3504
- }, null, 8, ["title", "description"])) : f.value === null ? (c(), L(n(ye), {
3560
+ }, null, 8, ["title", "description"])) : c.value === null ? (d(), L(n(ye), {
3505
3561
  key: 1,
3506
3562
  rows: 4
3507
- })) : (c(), L(n(Nl), {
3563
+ })) : (d(), L(n(Nl), {
3508
3564
  key: 2,
3509
- modelValue: i.value,
3510
- "onUpdate:modelValue": u[0] || (u[0] = (_) => i.value = _),
3511
- root: f.value,
3512
- patch: n(s).screenPatch(e.name),
3513
- types: n(s).types,
3565
+ modelValue: s.value,
3566
+ "onUpdate:modelValue": u[0] || (u[0] = (_) => s.value = _),
3567
+ root: c.value,
3568
+ patch: n(i).screenPatch(e.name),
3569
+ types: n(i).types,
3514
3570
  errors: e.errors,
3515
- translate: n(s).i18n.t,
3516
- can: n(s).can,
3571
+ translate: n(i).i18n.t,
3572
+ can: n(i).can,
3517
3573
  disabled: e.disabled,
3518
3574
  "label-position": e.labelPosition,
3519
3575
  "label-width": e.labelWidth,
@@ -3521,18 +3577,18 @@ const mo = /* @__PURE__ */ K({
3521
3577
  }, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
3522
3578
  ]));
3523
3579
  }
3524
- }), _o = /* @__PURE__ */ K({
3580
+ }), xo = /* @__PURE__ */ j({
3525
3581
  name: "WxCategoryEditorPage",
3526
3582
  __name: "CategoryEditorPage",
3527
3583
  props: {
3528
3584
  options: {}
3529
3585
  },
3530
3586
  setup(e) {
3531
- const t = e, l = ee(), o = _e(l, t.options.api), a = Lt(), i = Me(), s = Ut(), r = mt(t.options.words), f = J("webx-admin"), m = De(), p = w(() => Number(a.params.id)), v = w(() => t.options.path), u = W(null), _ = W({}), S = W(null), d = W(""), T = W(!0), y = W(!1), V = W({}), O = w(() => l.can(t.options.manage)), q = w(() => JSON.stringify(_.value)), H = w(() => d.value !== "" && q.value !== d.value), h = w(() => y.value ? "saving" : H.value ? "unsaved" : "saved"), A = w(
3532
- () => t.options.title ? f(t.options.title) : l.state.manifest?.modules.find((D) => D.id === t.options.module)?.title ?? ""
3587
+ const t = e, l = ee(), o = _e(l, t.options.api), a = Vt(), s = Oe(), i = Et(), r = pt(t.options.words), c = J("webx-admin"), m = Fe(), p = w(() => Number(a.params.id)), v = w(() => t.options.path), u = W(null), _ = W({}), S = W(null), f = W(""), T = W(!0), y = W(!1), V = W({}), O = w(() => l.can(t.options.manage)), q = w(() => JSON.stringify(_.value)), H = w(() => f.value !== "" && q.value !== f.value), h = w(() => y.value ? "saving" : H.value ? "unsaved" : "saved"), A = w(
3588
+ () => t.options.title ? c(t.options.title) : l.state.manifest?.modules.find((D) => D.id === t.options.module)?.title ?? ""
3533
3589
  ), $ = w(() => {
3534
3590
  const D = _.value.title;
3535
- return Al(D, s.active.value, u.value?.name ?? "") || r("untitled");
3591
+ return Al(D, i.active.value, u.value?.name ?? "") || r("untitled");
3536
3592
  });
3537
3593
  co({ category: u, values: _, prefix: S, moving: () => r("address-moving") }), Pn({ id: w(() => u.value?.id ?? null) }), Ta({
3538
3594
  values: _,
@@ -3540,24 +3596,24 @@ const mo = /* @__PURE__ */ K({
3540
3596
  path: w(() => u.value?.path),
3541
3597
  moving: () => r("address-moving")
3542
3598
  });
3543
- function M(D) {
3544
- u.value = D.category, _.value = D.values, S.value = D.prefix, d.value = JSON.stringify(D.values);
3599
+ function R(D) {
3600
+ u.value = D.category, _.value = D.values, S.value = D.prefix, f.value = JSON.stringify(D.values);
3545
3601
  }
3546
- async function U() {
3602
+ async function E() {
3547
3603
  T.value = !0;
3548
3604
  try {
3549
- M(await o.get(p.value));
3605
+ R(await o.get(p.value));
3550
3606
  } catch (D) {
3551
- Z.danger(m(D)), i.push(v.value);
3607
+ Z.danger(m(D)), s.push(v.value);
3552
3608
  } finally {
3553
3609
  T.value = !1;
3554
3610
  }
3555
3611
  }
3556
- async function R() {
3612
+ async function I() {
3557
3613
  if (!(!u.value || y.value || !O.value)) {
3558
3614
  y.value = !0, V.value = {};
3559
3615
  try {
3560
- M(await o.save(u.value.id, _.value)), Z.success(r("saved"));
3616
+ R(await o.save(u.value.id, _.value)), Z.success(r("saved"));
3561
3617
  } catch (D) {
3562
3618
  const g = D.body;
3563
3619
  g?.errors ? (V.value = g.errors, Z.danger(r("save-failed"))) : Z.danger(m(D));
@@ -3568,7 +3624,7 @@ const mo = /* @__PURE__ */ K({
3568
3624
  }
3569
3625
  async function B() {
3570
3626
  const D = u.value;
3571
- if (!(!D || !await Ee({
3627
+ if (!(!D || !await Re({
3572
3628
  title: r("delete-title", { name: D.name }),
3573
3629
  message: r("delete-text"),
3574
3630
  confirmText: r("delete"),
@@ -3576,7 +3632,7 @@ const mo = /* @__PURE__ */ K({
3576
3632
  tone: "danger"
3577
3633
  })))
3578
3634
  try {
3579
- await o.remove(D.id), Z.success(r("deleted")), d.value = q.value, i.push(v.value);
3635
+ await o.remove(D.id), Z.success(r("deleted")), f.value = q.value, s.push(v.value);
3580
3636
  } catch (z) {
3581
3637
  Z.danger(m(z));
3582
3638
  }
@@ -3585,15 +3641,15 @@ const mo = /* @__PURE__ */ K({
3585
3641
  H.value && D.preventDefault();
3586
3642
  }
3587
3643
  function re(D) {
3588
- (D.ctrlKey || D.metaKey) && D.key.toLowerCase() === "s" && (D.preventDefault(), H.value && R());
3644
+ (D.ctrlKey || D.metaKey) && D.key.toLowerCase() === "s" && (D.preventDefault(), H.value && I());
3589
3645
  }
3590
- ao(re), oe(p, () => {
3591
- U();
3592
- }), Se(() => {
3593
- U(), window.addEventListener("beforeunload", te);
3594
- }), ot(() => {
3646
+ ao(re), se(p, () => {
3647
+ E();
3648
+ }), Ce(() => {
3649
+ E(), window.addEventListener("beforeunload", te);
3650
+ }), it(() => {
3595
3651
  window.removeEventListener("beforeunload", te);
3596
- }), rl(async () => !H.value || !O.value ? !0 : await Ee({
3652
+ }), rl(async () => !H.value || !O.value ? !0 : await Re({
3597
3653
  title: r("leave-title"),
3598
3654
  message: r("leave-text"),
3599
3655
  confirmText: r("leave"),
@@ -3613,49 +3669,49 @@ const mo = /* @__PURE__ */ K({
3613
3669
  }
3614
3670
  })), g;
3615
3671
  });
3616
- return (D, g) => (c(), k("div", {
3672
+ return (D, g) => (d(), x("div", {
3617
3673
  class: "wx-category-editor",
3618
3674
  onKeydown: re
3619
3675
  }, [
3620
- T.value || !u.value ? (c(), k(j, { key: 0 }, [
3621
- x(n(ye), {
3676
+ T.value || !u.value ? (d(), x(K, { key: 0 }, [
3677
+ k(n(ye), {
3622
3678
  class: "wx-category-editor__ghost",
3623
3679
  title: "",
3624
3680
  rows: 1
3625
3681
  }),
3626
- x(n(Ge), null, {
3682
+ k(n(Qe), null, {
3627
3683
  default: b(() => [
3628
- x(n(ye), { rows: 6 })
3684
+ k(n(ye), { rows: 6 })
3629
3685
  ]),
3630
3686
  _: 1
3631
3687
  })
3632
- ], 64)) : (c(), k(j, { key: 1 }, [
3633
- x(Bt, {
3688
+ ], 64)) : (d(), x(K, { key: 1 }, [
3689
+ k(Bt, {
3634
3690
  divider: "",
3635
3691
  back: v.value,
3636
3692
  "back-label": A.value,
3637
3693
  title: $.value,
3638
3694
  subtitle: u.value.path === null ? void 0 : `/${u.value.path}`,
3639
3695
  actions: ce.value
3640
- }, Ie({
3696
+ }, Te({
3641
3697
  trail: b(() => [
3642
- x(n(Wl), {
3698
+ k(n(Wl), {
3643
3699
  size: "sm",
3644
3700
  label: n(r)("trail")
3645
3701
  }, {
3646
3702
  default: b(() => [
3647
- x(n(ht), {
3703
+ k(n(gt), {
3648
3704
  as: "router-link",
3649
3705
  to: v.value
3650
3706
  }, {
3651
3707
  default: b(() => [
3652
- I(C(A.value), 1)
3708
+ M(C(A.value), 1)
3653
3709
  ]),
3654
3710
  _: 1
3655
3711
  }, 8, ["to"]),
3656
- x(n(ht), { current: "" }, {
3712
+ k(n(gt), { current: "" }, {
3657
3713
  default: b(() => [
3658
- I(C($.value), 1)
3714
+ M(C($.value), 1)
3659
3715
  ]),
3660
3716
  _: 1
3661
3717
  })
@@ -3668,9 +3724,9 @@ const mo = /* @__PURE__ */ K({
3668
3724
  u.value.is_visible ? void 0 : {
3669
3725
  name: "title-after",
3670
3726
  fn: b(() => [
3671
- x(n(Oe), { dot: "" }, {
3727
+ k(n(Pe), { dot: "" }, {
3672
3728
  default: b(() => [
3673
- I(C(n(r)("hidden")), 1)
3729
+ M(C(n(r)("hidden")), 1)
3674
3730
  ]),
3675
3731
  _: 1
3676
3732
  })
@@ -3678,26 +3734,26 @@ const mo = /* @__PURE__ */ K({
3678
3734
  key: "0"
3679
3735
  }
3680
3736
  ]), 1032, ["back", "back-label", "title", "subtitle", "actions"]),
3681
- x(wo, {
3737
+ k(ko, {
3682
3738
  modelValue: _.value,
3683
3739
  "onUpdate:modelValue": g[0] || (g[0] = (z) => _.value = z),
3684
3740
  name: t.options.screen,
3685
3741
  errors: V.value,
3686
3742
  disabled: !O.value || y.value
3687
3743
  }, null, 8, ["modelValue", "name", "errors", "disabled"]),
3688
- O.value ? (c(), L(n(Ll), { key: 0 }, {
3744
+ O.value ? (d(), L(n(Ll), { key: 0 }, {
3689
3745
  state: b(() => [
3690
- x(go, { state: h.value }, null, 8, ["state"])
3746
+ k(wo, { state: h.value }, null, 8, ["state"])
3691
3747
  ]),
3692
3748
  default: b(() => [
3693
- x(n(de), {
3749
+ k(n(de), {
3694
3750
  type: "primary",
3695
3751
  loading: y.value,
3696
3752
  disabled: !H.value,
3697
- onClick: R
3753
+ onClick: I
3698
3754
  }, {
3699
3755
  default: b(() => [
3700
- I(C(n(r)("save")), 1)
3756
+ M(C(n(r)("save")), 1)
3701
3757
  ]),
3702
3758
  _: 1
3703
3759
  }, 8, ["loading", "disabled"])
@@ -3707,30 +3763,30 @@ const mo = /* @__PURE__ */ K({
3707
3763
  ], 64))
3708
3764
  ], 32));
3709
3765
  }
3710
- }), xo = /* @__PURE__ */ se(_o, [["__scopeId", "data-v-55265992"]]);
3711
- function Tt(e, t) {
3712
- return K({
3766
+ }), $o = /* @__PURE__ */ ne(xo, [["__scopeId", "data-v-55265992"]]);
3767
+ function At(e, t) {
3768
+ return j({
3713
3769
  name: "WxCategoriesView",
3714
- setup: () => () => xe(e, { options: t })
3770
+ setup: () => () => ke(e, { options: t })
3715
3771
  });
3716
3772
  }
3717
- function Jo(e) {
3773
+ function Qo(e) {
3718
3774
  return [
3719
- { path: e.path, name: e.name, component: Tt(po, e) },
3775
+ { path: e.path, name: e.name, component: At(yo, e) },
3720
3776
  {
3721
3777
  path: `${e.path}/:id(\\d+)`,
3722
3778
  name: `${e.name}.edit`,
3723
- component: Tt(xo, e)
3779
+ component: At($o, e)
3724
3780
  }
3725
3781
  ];
3726
3782
  }
3727
- const Go = 76, Qo = /* @__PURE__ */ K({
3783
+ const Zo = 76, es = /* @__PURE__ */ j({
3728
3784
  __name: "FilterChips",
3729
3785
  props: {
3730
3786
  filters: {}
3731
3787
  },
3732
3788
  setup(e) {
3733
- return (t, l) => (c(!0), k(j, null, ie(e.filters, (o) => (c(), L(n(Oe), {
3789
+ return (t, l) => (d(!0), x(K, null, ie(e.filters, (o) => (d(), L(n(Pe), {
3734
3790
  key: o.key,
3735
3791
  class: "wx-filter-chip",
3736
3792
  size: "sm",
@@ -3739,12 +3795,12 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3739
3795
  onClose: (a) => o.clear()
3740
3796
  }, {
3741
3797
  default: b(() => [
3742
- I(C(o.label), 1)
3798
+ M(C(o.label), 1)
3743
3799
  ]),
3744
3800
  _: 2
3745
3801
  }, 1032, ["onClose"]))), 128));
3746
3802
  }
3747
- }), ko = { class: "wx-rename__footer" }, $o = /* @__PURE__ */ K({
3803
+ }), So = { class: "wx-rename__footer" }, To = /* @__PURE__ */ j({
3748
3804
  __name: "RenameButton",
3749
3805
  props: {
3750
3806
  name: { default: "" },
@@ -3755,31 +3811,31 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3755
3811
  },
3756
3812
  emits: ["rename"],
3757
3813
  setup(e, { emit: t }) {
3758
- const l = e, o = t, a = J("webx-admin"), i = W(!1), s = W(l.name), r = W(null), f = w(() => l.label ?? a("editor.rename"));
3759
- oe(i, async (p) => {
3760
- p && (s.value = l.name, await nt(), r.value?.focus(), r.value?.select());
3814
+ const l = e, o = t, a = J("webx-admin"), s = W(!1), i = W(l.name), r = W(null), c = w(() => l.label ?? a("editor.rename"));
3815
+ se(s, async (p) => {
3816
+ p && (i.value = l.name, await at(), r.value?.focus(), r.value?.select());
3761
3817
  });
3762
3818
  function m() {
3763
- const p = s.value.trim();
3819
+ const p = i.value.trim();
3764
3820
  if (p === "" || p === l.name) {
3765
- i.value = !1;
3821
+ s.value = !1;
3766
3822
  return;
3767
3823
  }
3768
- o("rename", p), i.value = !1;
3824
+ o("rename", p), s.value = !1;
3769
3825
  }
3770
- return (p, v) => (c(), L(n(Vl), {
3771
- open: i.value,
3772
- "onUpdate:open": v[2] || (v[2] = (u) => i.value = u),
3773
- title: f.value,
3826
+ return (p, v) => (d(), L(n(Vl), {
3827
+ open: s.value,
3828
+ "onUpdate:open": v[2] || (v[2] = (u) => s.value = u),
3829
+ title: c.value,
3774
3830
  width: 320,
3775
3831
  side: "bottom",
3776
3832
  align: "start",
3777
3833
  teleport: ""
3778
3834
  }, {
3779
3835
  trigger: b(() => [
3780
- x(n(be), {
3836
+ k(n(be), {
3781
3837
  type: "edit",
3782
- title: f.value,
3838
+ title: c.value,
3783
3839
  size: e.size,
3784
3840
  disabled: e.disabled
3785
3841
  }, null, 8, ["title", "size", "disabled"])
@@ -3787,25 +3843,25 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3787
3843
  default: b(() => [
3788
3844
  P("form", {
3789
3845
  class: "wx-rename",
3790
- onSubmit: Ct(m, ["prevent"])
3846
+ onSubmit: ot(m, ["prevent"])
3791
3847
  }, [
3792
- x(n(Te), {
3848
+ k(n(Ae), {
3793
3849
  ref_key: "field",
3794
3850
  ref: r,
3795
- modelValue: s.value,
3796
- "onUpdate:modelValue": v[0] || (v[0] = (u) => s.value = u),
3797
- "aria-label": f.value,
3851
+ modelValue: i.value,
3852
+ "onUpdate:modelValue": v[0] || (v[0] = (u) => i.value = u),
3853
+ "aria-label": c.value,
3798
3854
  placeholder: e.placeholder,
3799
- onKeydown: v[1] || (v[1] = Wt((u) => i.value = !1, ["esc"]))
3855
+ onKeydown: v[1] || (v[1] = Lt((u) => s.value = !1, ["esc"]))
3800
3856
  }, null, 8, ["modelValue", "aria-label", "placeholder"]),
3801
- P("div", ko, [
3802
- x(n(de), {
3857
+ P("div", So, [
3858
+ k(n(de), {
3803
3859
  type: "primary",
3804
3860
  size: "sm",
3805
3861
  "native-type": "submit"
3806
3862
  }, {
3807
3863
  default: b(() => [
3808
- I(C(n(a)("editor.save")), 1)
3864
+ M(C(n(a)("editor.save")), 1)
3809
3865
  ]),
3810
3866
  _: 1
3811
3867
  })
@@ -3815,7 +3871,7 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3815
3871
  _: 1
3816
3872
  }, 8, ["open", "title"]));
3817
3873
  }
3818
- }), Zo = /* @__PURE__ */ se($o, [["__scopeId", "data-v-d879e8d3"]]), So = ["innerHTML"], To = /* @__PURE__ */ K({
3874
+ }), ts = /* @__PURE__ */ ne(To, [["__scopeId", "data-v-d879e8d3"]]), Co = ["innerHTML"], Ao = /* @__PURE__ */ j({
3819
3875
  __name: "HelpButton",
3820
3876
  props: {
3821
3877
  body: {},
@@ -3825,42 +3881,42 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3825
3881
  width: { default: 720 }
3826
3882
  },
3827
3883
  setup(e) {
3828
- const t = e, l = J("webx-admin"), o = W(!1), a = w(() => t.title ?? l("help.title")), i = w(() => no(t.body));
3829
- return (s, r) => (c(), k(j, null, [
3830
- x(n(be), {
3884
+ const t = e, l = J("webx-admin"), o = W(!1), a = w(() => t.title ?? l("help.title")), s = w(() => no(t.body));
3885
+ return (i, r) => (d(), x(K, null, [
3886
+ k(n(be), {
3831
3887
  type: "details",
3832
3888
  icon: "question",
3833
3889
  tone: "neutral",
3834
3890
  size: e.size,
3835
3891
  title: e.label ?? a.value,
3836
- onClick: r[0] || (r[0] = (f) => o.value = !0)
3892
+ onClick: r[0] || (r[0] = (c) => o.value = !0)
3837
3893
  }, null, 8, ["size", "title"]),
3838
- x(n(it), {
3894
+ k(n(dt), {
3839
3895
  open: o.value,
3840
- "onUpdate:open": r[1] || (r[1] = (f) => o.value = f),
3896
+ "onUpdate:open": r[1] || (r[1] = (c) => o.value = c),
3841
3897
  title: a.value,
3842
3898
  width: e.width
3843
3899
  }, {
3844
3900
  default: b(() => [
3845
3901
  P("div", {
3846
3902
  class: "wx-help",
3847
- innerHTML: i.value
3848
- }, null, 8, So)
3903
+ innerHTML: s.value
3904
+ }, null, 8, Co)
3849
3905
  ]),
3850
3906
  _: 1
3851
3907
  }, 8, ["open", "title", "width"])
3852
3908
  ], 64));
3853
3909
  }
3854
- }), es = /* @__PURE__ */ se(To, [["__scopeId", "data-v-6c280d42"]]), Co = { class: "wx-notes" }, Ao = {
3910
+ }), ls = /* @__PURE__ */ ne(Ao, [["__scopeId", "data-v-6c280d42"]]), Wo = { class: "wx-notes" }, Lo = {
3855
3911
  key: 3,
3856
3912
  class: "wx-notes__list"
3857
- }, Wo = { class: "wx-note__body" }, Lo = { class: "wx-note__head" }, Vo = { class: "wx-note__buttons" }, zo = {
3913
+ }, Vo = { class: "wx-note__body" }, zo = { class: "wx-note__head" }, Eo = { class: "wx-note__buttons" }, Uo = {
3858
3914
  key: 1,
3859
3915
  class: "wx-note__text"
3860
- }, Uo = {
3916
+ }, No = {
3861
3917
  key: 4,
3862
3918
  class: "wx-notes__new"
3863
- }, Eo = /* @__PURE__ */ K({
3919
+ }, Ro = /* @__PURE__ */ j({
3864
3920
  name: "WxNotes",
3865
3921
  __name: "NotesFeed",
3866
3922
  props: {
@@ -3871,21 +3927,21 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3871
3927
  },
3872
3928
  emits: ["change"],
3873
3929
  setup(e, { emit: t }) {
3874
- const l = e, o = t, a = ee(), i = J("webx-admin"), s = De(), r = W([]), f = W(!0), m = W(""), p = W(!1), v = W(null), u = W(""), _ = w(() => oo(a, l.type, l.id)), S = w(() => l.title ?? i("notes.title"));
3875
- async function d() {
3876
- f.value = !0;
3930
+ const l = e, o = t, a = ee(), s = J("webx-admin"), i = Fe(), r = W([]), c = W(!0), m = W(""), p = W(!1), v = W(null), u = W(""), _ = w(() => oo(a, l.type, l.id)), S = w(() => l.title ?? s("notes.title"));
3931
+ async function f() {
3932
+ c.value = !0;
3877
3933
  try {
3878
3934
  r.value = await _.value.list();
3879
3935
  } catch (h) {
3880
- Z.danger(s(h));
3936
+ Z.danger(i(h));
3881
3937
  } finally {
3882
- f.value = !1;
3938
+ c.value = !1;
3883
3939
  }
3884
3940
  }
3885
- oe(
3941
+ se(
3886
3942
  () => [l.type, l.id],
3887
3943
  () => {
3888
- v.value = null, m.value = "", d();
3944
+ v.value = null, m.value = "", f();
3889
3945
  },
3890
3946
  { immediate: !0 }
3891
3947
  );
@@ -3896,7 +3952,7 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3896
3952
  try {
3897
3953
  r.value = [...r.value, await _.value.add(h)], m.value = "", o("change");
3898
3954
  } catch (A) {
3899
- Z.danger(s(A));
3955
+ Z.danger(i(A));
3900
3956
  } finally {
3901
3957
  p.value = !1;
3902
3958
  }
@@ -3910,32 +3966,32 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3910
3966
  if (A !== "")
3911
3967
  try {
3912
3968
  const $ = await _.value.save(h.id, A);
3913
- r.value = r.value.map((M) => M.id === $.id ? $ : M), v.value = null, Z.success(i("notes.saved")), o("change");
3969
+ r.value = r.value.map((R) => R.id === $.id ? $ : R), v.value = null, Z.success(s("notes.saved")), o("change");
3914
3970
  } catch ($) {
3915
- Z.danger(s($));
3971
+ Z.danger(i($));
3916
3972
  }
3917
3973
  }
3918
3974
  async function O(h) {
3919
- if (await Ee({
3920
- title: i("notes.delete-title"),
3921
- message: i("notes.delete-text"),
3922
- confirmText: i("notes.delete"),
3923
- cancelText: i("notes.cancel"),
3975
+ if (await Re({
3976
+ title: s("notes.delete-title"),
3977
+ message: s("notes.delete-text"),
3978
+ confirmText: s("notes.delete"),
3979
+ cancelText: s("notes.cancel"),
3924
3980
  tone: "danger"
3925
3981
  }))
3926
3982
  try {
3927
- await _.value.remove(h.id), r.value = r.value.filter(($) => $.id !== h.id), Z.success(i("notes.deleted")), o("change");
3983
+ await _.value.remove(h.id), r.value = r.value.filter(($) => $.id !== h.id), Z.success(s("notes.deleted")), o("change");
3928
3984
  } catch ($) {
3929
- Z.danger(s($));
3985
+ Z.danger(i($));
3930
3986
  }
3931
3987
  }
3932
3988
  function q(h) {
3933
3989
  return !l.can || !h.is_mine ? [] : [
3934
- { key: "edit", icon: "edit", label: i("notes.edit"), run: () => y(h) },
3990
+ { key: "edit", icon: "edit", label: s("notes.edit"), run: () => y(h) },
3935
3991
  {
3936
3992
  key: "delete",
3937
3993
  icon: "trash",
3938
- label: i("notes.delete"),
3994
+ label: s("notes.delete"),
3939
3995
  danger: !0,
3940
3996
  run: () => {
3941
3997
  O(h);
@@ -3944,96 +4000,96 @@ const Go = 76, Qo = /* @__PURE__ */ K({
3944
4000
  ];
3945
4001
  }
3946
4002
  function H(h) {
3947
- return h.author?.name ?? i("notes.unknown-author");
4003
+ return h.author?.name ?? s("notes.unknown-author");
3948
4004
  }
3949
- return (h, A) => (c(), k("section", Co, [
3950
- S.value ? (c(), L(n(Q), {
4005
+ return (h, A) => (d(), x("section", Wo, [
4006
+ S.value ? (d(), L(n(Q), {
3951
4007
  key: 0,
3952
4008
  weight: "medium",
3953
4009
  class: "wx-notes__title"
3954
4010
  }, {
3955
4011
  default: b(() => [
3956
- I(C(S.value), 1)
4012
+ M(C(S.value), 1)
3957
4013
  ]),
3958
4014
  _: 1
3959
4015
  })) : N("", !0),
3960
- f.value ? (c(), L(n(ye), {
4016
+ c.value ? (d(), L(n(ye), {
3961
4017
  key: 1,
3962
4018
  rows: 2
3963
- })) : r.value.length === 0 ? (c(), L(n(Ue), {
4019
+ })) : r.value.length === 0 ? (d(), L(n(Ne), {
3964
4020
  key: 2,
3965
4021
  size: "sm",
3966
- description: n(i)("notes.empty")
3967
- }, null, 8, ["description"])) : (c(), k("ul", Ao, [
3968
- (c(!0), k(j, null, ie(r.value, ($) => (c(), k("li", {
4022
+ description: n(s)("notes.empty")
4023
+ }, null, 8, ["description"])) : (d(), x("ul", Lo, [
4024
+ (d(!0), x(K, null, ie(r.value, ($) => (d(), x("li", {
3969
4025
  key: $.id,
3970
4026
  class: "wx-note"
3971
4027
  }, [
3972
- x(n(zt), {
4028
+ k(n(zt), {
3973
4029
  name: H($),
3974
4030
  size: "sm",
3975
4031
  tone: "auto"
3976
4032
  }, null, 8, ["name"]),
3977
- P("div", Wo, [
3978
- P("div", Lo, [
3979
- x(n(Q), {
4033
+ P("div", Vo, [
4034
+ P("div", zo, [
4035
+ k(n(Q), {
3980
4036
  size: "sm",
3981
4037
  weight: "medium",
3982
4038
  truncate: ""
3983
4039
  }, {
3984
4040
  default: b(() => [
3985
- I(C(H($)), 1)
4041
+ M(C(H($)), 1)
3986
4042
  ]),
3987
4043
  _: 2
3988
4044
  }, 1024),
3989
- x(Ne, {
4045
+ k(Ie, {
3990
4046
  value: $.created_at
3991
4047
  }, null, 8, ["value"]),
3992
- x(dt, {
4048
+ k(ft, {
3993
4049
  actions: q($),
3994
4050
  label: H($)
3995
4051
  }, null, 8, ["actions", "label"])
3996
4052
  ]),
3997
- v.value === $.id ? (c(), k(j, { key: 0 }, [
3998
- x(n(yt), {
4053
+ v.value === $.id ? (d(), x(K, { key: 0 }, [
4054
+ k(n(bt), {
3999
4055
  modelValue: u.value,
4000
- "onUpdate:modelValue": A[0] || (A[0] = (M) => u.value = M),
4056
+ "onUpdate:modelValue": A[0] || (A[0] = (R) => u.value = R),
4001
4057
  autosize: { minRows: 2, maxRows: 10 }
4002
4058
  }, null, 8, ["modelValue"]),
4003
- P("div", Vo, [
4004
- x(n(de), {
4059
+ P("div", Eo, [
4060
+ k(n(de), {
4005
4061
  size: "sm",
4006
4062
  type: "primary",
4007
- onClick: (M) => V($)
4063
+ onClick: (R) => V($)
4008
4064
  }, {
4009
4065
  default: b(() => [
4010
- I(C(n(i)("notes.save")), 1)
4066
+ M(C(n(s)("notes.save")), 1)
4011
4067
  ]),
4012
4068
  _: 1
4013
4069
  }, 8, ["onClick"]),
4014
- x(n(de), {
4070
+ k(n(de), {
4015
4071
  size: "sm",
4016
4072
  variant: "text",
4017
- onClick: A[1] || (A[1] = (M) => v.value = null)
4073
+ onClick: A[1] || (A[1] = (R) => v.value = null)
4018
4074
  }, {
4019
4075
  default: b(() => [
4020
- I(C(n(i)("notes.cancel")), 1)
4076
+ M(C(n(s)("notes.cancel")), 1)
4021
4077
  ]),
4022
4078
  _: 1
4023
4079
  })
4024
4080
  ])
4025
- ], 64)) : (c(), k("p", zo, C($.body), 1))
4081
+ ], 64)) : (d(), x("p", Uo, C($.body), 1))
4026
4082
  ])
4027
4083
  ]))), 128))
4028
4084
  ])),
4029
- e.can ? (c(), k("div", Uo, [
4030
- x(n(yt), {
4085
+ e.can ? (d(), x("div", No, [
4086
+ k(n(bt), {
4031
4087
  modelValue: m.value,
4032
4088
  "onUpdate:modelValue": A[2] || (A[2] = ($) => m.value = $),
4033
- placeholder: n(i)("notes.placeholder"),
4089
+ placeholder: n(s)("notes.placeholder"),
4034
4090
  autosize: { minRows: 2, maxRows: 8 }
4035
4091
  }, null, 8, ["modelValue", "placeholder"]),
4036
- x(n(de), {
4092
+ k(n(de), {
4037
4093
  size: "sm",
4038
4094
  type: "primary",
4039
4095
  disabled: m.value.trim() === "",
@@ -4041,25 +4097,25 @@ const Go = 76, Qo = /* @__PURE__ */ K({
4041
4097
  onClick: T
4042
4098
  }, {
4043
4099
  default: b(() => [
4044
- I(C(n(i)("notes.add")), 1)
4100
+ M(C(n(s)("notes.add")), 1)
4045
4101
  ]),
4046
4102
  _: 1
4047
4103
  }, 8, ["disabled", "loading"])
4048
4104
  ])) : N("", !0)
4049
4105
  ]));
4050
4106
  }
4051
- }), ts = /* @__PURE__ */ se(Eo, [["__scopeId", "data-v-71004c1a"]]), No = {
4107
+ }), ns = /* @__PURE__ */ ne(Ro, [["__scopeId", "data-v-71004c1a"]]), Io = {
4052
4108
  key: 1,
4053
4109
  class: "wx-backup-note"
4054
- }, Ro = 48, Io = /* @__PURE__ */ K({
4110
+ }, Mo = 48, Oo = /* @__PURE__ */ j({
4055
4111
  name: "WxBackupNote",
4056
4112
  __name: "BackupNote",
4057
4113
  setup(e) {
4058
- const t = ee(), l = Ot(), o = J("webx-admin"), a = w(() => t.state.manifest?.backup ?? null), i = w(() => a.value !== null && t.can("settings.view")), s = w(() => {
4114
+ const t = ee(), l = Ot(), o = J("webx-admin"), a = w(() => t.state.manifest?.backup ?? null), s = w(() => a.value !== null && t.can("settings.view")), i = w(() => {
4059
4115
  const m = a.value?.at;
4060
4116
  if (m == null) return !0;
4061
4117
  const p = new Date(m).getTime();
4062
- return Number.isNaN(p) || Date.now() - p > Ro * 36e5;
4118
+ return Number.isNaN(p) || Date.now() - p > Mo * 36e5;
4063
4119
  }), r = w(() => {
4064
4120
  const m = a.value?.bytes;
4065
4121
  if (m == null) return "";
@@ -4073,128 +4129,129 @@ const Go = 76, Qo = /* @__PURE__ */ K({
4073
4129
  unitDisplay: "short",
4074
4130
  maximumFractionDigits: v >= 10 || u === 0 ? 0 : 1
4075
4131
  }).format(v);
4076
- }), f = w(
4132
+ }), c = w(
4077
4133
  () => a.value?.at == null ? o("backup.never") : o("backup.stale", { date: l.short(a.value.at) })
4078
4134
  );
4079
- return (m, p) => i.value && s.value ? (c(), L(n(Pe), {
4135
+ return (m, p) => s.value && i.value ? (d(), L(n($e), {
4080
4136
  key: 0,
4081
4137
  type: "warning",
4082
4138
  variant: "soft",
4083
- description: f.value
4084
- }, null, 8, ["description"])) : i.value ? (c(), k("p", No, [
4085
- x(n(Q), {
4139
+ description: c.value
4140
+ }, null, 8, ["description"])) : s.value ? (d(), x("p", Io, [
4141
+ k(n(Q), {
4086
4142
  size: "sm",
4087
4143
  tone: "muted"
4088
4144
  }, {
4089
4145
  default: b(() => [
4090
- I(C(n(o)("backup.title")), 1)
4146
+ M(C(n(o)("backup.title")), 1)
4091
4147
  ]),
4092
4148
  _: 1
4093
4149
  }),
4094
- x(Ne, {
4150
+ k(Ie, {
4095
4151
  value: a.value?.at
4096
4152
  }, null, 8, ["value"]),
4097
- r.value ? (c(), L(n(Q), {
4153
+ r.value ? (d(), L(n(Q), {
4098
4154
  key: 0,
4099
4155
  size: "sm",
4100
4156
  tone: "muted"
4101
4157
  }, {
4102
4158
  default: b(() => [
4103
- I("· " + C(r.value), 1)
4159
+ M("· " + C(r.value), 1)
4104
4160
  ]),
4105
4161
  _: 1
4106
4162
  })) : N("", !0)
4107
4163
  ])) : N("", !0);
4108
4164
  }
4109
- }), ls = /* @__PURE__ */ se(Io, [["__scopeId", "data-v-beeee67e"]]);
4165
+ }), as = /* @__PURE__ */ ne(Oo, [["__scopeId", "data-v-beeee67e"]]);
4110
4166
  export {
4111
4167
  Na as AdminLanding,
4112
4168
  Ra as AdminNav,
4113
4169
  Ka as AdminShell,
4114
4170
  Rt as COLLECTION_MAX_LIMIT,
4115
- $e as HttpError,
4116
- Ve as MIN_CHUNK,
4171
+ Se as HttpError,
4172
+ Ee as MIN_CHUNK,
4173
+ vo as WxAddressNote,
4117
4174
  ca as WxBackButton,
4118
- ls as WxBackupNote,
4175
+ as as WxBackupNote,
4119
4176
  Fl as WxCategoriesField,
4120
- po as WxCategoriesPage,
4121
- mo as WxCategoryCreateDialog,
4122
- xo as WxCategoryEditorPage,
4123
- kt as WxCategorySlug,
4124
- xn as WxCollectionField,
4125
- Ne as WxDate,
4126
- Qo as WxFilterChips,
4127
- es as WxHelpButton,
4177
+ yo as WxCategoriesPage,
4178
+ po as WxCategoryCreateDialog,
4179
+ $o as WxCategoryEditorPage,
4180
+ St as WxCategorySlug,
4181
+ kn as WxCollectionField,
4182
+ Ie as WxDate,
4183
+ es as WxFilterChips,
4184
+ ls as WxHelpButton,
4128
4185
  da as WxHistory,
4129
- Un as WxLinkField,
4186
+ En as WxLinkField,
4130
4187
  zn as WxLinkPicker,
4131
4188
  Dt as WxListScreen,
4132
- ts as WxNotes,
4189
+ ns as WxNotes,
4133
4190
  Nt as WxRelationsField,
4134
- Zo as WxRenameButton,
4191
+ ts as WxRenameButton,
4135
4192
  Sa as WxRichTextField,
4136
- dt as WxRowMenu,
4137
- go as WxSaveState,
4138
- wo as WxScreen,
4193
+ ft as WxRowMenu,
4194
+ wo as WxSaveState,
4195
+ ko as WxScreen,
4139
4196
  Bt as WxScreenHead,
4140
- kt as WxSlugField,
4197
+ St as WxSlugField,
4141
4198
  Hl as WxSourceSelect,
4142
4199
  Ht as adminKey,
4143
4200
  Mt as adminMessages,
4144
4201
  Va as adminTypes,
4145
4202
  Yt as categoryEditorKey,
4146
- Jo as categoryRoutes,
4203
+ Qo as categoryRoutes,
4147
4204
  an as collectionSources,
4148
- jo as createAdmin,
4205
+ qo as createAdmin,
4149
4206
  za as createAdminContext,
4150
4207
  _e as createCategoriesApi,
4151
- En as createDates,
4208
+ Un as createDates,
4152
4209
  On as createHistoryApi,
4153
4210
  Kl as createHttp,
4154
- ut as createI18n,
4211
+ ct as createI18n,
4155
4212
  $n as createLinksApi,
4156
4213
  oo as createNotesApi,
4157
4214
  Yl as createRelationsApi,
4158
4215
  Xa as createTheme,
4159
- wt as defaultMarkup,
4160
- kn as emptyLink,
4216
+ kt as defaultMarkup,
4217
+ xn as emptyLink,
4161
4218
  Rn as errorText,
4162
4219
  io as forgetUnfinishedUpload,
4163
4220
  Pt as historySubjectKey,
4164
- je as historyValue,
4165
- Be as i18nKey,
4221
+ Ke as historyValue,
4222
+ De as i18nKey,
4166
4223
  fo as itemOrderMode,
4167
- bt as normaliseCollection,
4224
+ _t as normaliseCollection,
4168
4225
  Xl as normaliseRelations,
4169
- Ua as provideAdmin,
4226
+ Ea as provideAdmin,
4170
4227
  co as provideCategoryEditor,
4171
4228
  Pn as provideHistorySubject,
4172
4229
  Il as provideI18n,
4173
4230
  Ta as provideRecordAddress,
4174
- Fo as provideRelationOwner,
4231
+ jo as provideRelationOwner,
4175
4232
  Ya as provideTheme,
4176
- gt as readCookie,
4233
+ wt as readCookie,
4177
4234
  Ft as recordAddressKey,
4178
- Et as relationOwnerKey,
4235
+ Ut as relationOwnerKey,
4179
4236
  no as renderMarkdown,
4180
4237
  Ol as reorderItems,
4181
- Go as rowMenuWidth,
4238
+ Zo as rowMenuWidth,
4182
4239
  jt as themeKey,
4183
- Ko as unfinishedUploads,
4184
- Ye as uploadFingerprint,
4240
+ Yo as unfinishedUploads,
4241
+ Xe as uploadFingerprint,
4185
4242
  ee as useAdmin,
4186
4243
  ao as useBodyKeys,
4187
- Yo as useCategoryEditor,
4188
- mt as useCategoryWords,
4189
- qo as useChunkedUpload,
4244
+ Jo as useCategoryEditor,
4245
+ pt as useCategoryWords,
4246
+ Xo as useChunkedUpload,
4190
4247
  Ot as useDates,
4191
- De as useErrorText,
4248
+ Fe as useErrorText,
4192
4249
  Bn as useHistorySubject,
4193
4250
  Rl as useI18n,
4194
- Xo as useItemOrder,
4251
+ Go as useItemOrder,
4195
4252
  Ca as useRecordAddress,
4196
4253
  Jl as useRelationOwner,
4197
- Ho as useTheme,
4254
+ Ko as useTheme,
4198
4255
  J as useTranslate
4199
4256
  };
4200
4257
  //# sourceMappingURL=index.js.map