@aerogel/core 0.1.0 → 0.1.1-next.01bc3a1d850a91b650f8cade6c0dd8e44109e0d8

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.
Files changed (33) hide show
  1. package/dist/aerogel-core.d.ts +163 -228
  2. package/dist/aerogel-core.js +1501 -1524
  3. package/dist/aerogel-core.js.map +1 -1
  4. package/package.json +3 -2
  5. package/src/components/AppOverlays.vue +3 -2
  6. package/src/components/contracts/AlertModal.ts +1 -1
  7. package/src/components/contracts/Button.ts +1 -1
  8. package/src/components/contracts/ConfirmModal.ts +5 -2
  9. package/src/components/contracts/Modal.ts +6 -3
  10. package/src/components/contracts/PromptModal.ts +6 -2
  11. package/src/components/contracts/Toast.ts +1 -1
  12. package/src/components/headless/HeadlessInputInput.vue +5 -3
  13. package/src/components/headless/HeadlessModal.vue +6 -34
  14. package/src/components/headless/HeadlessModalContent.vue +5 -12
  15. package/src/components/index.ts +0 -1
  16. package/src/components/ui/Button.vue +1 -0
  17. package/src/components/ui/ConfirmModal.vue +7 -2
  18. package/src/components/ui/Form.vue +1 -1
  19. package/src/components/ui/Modal.vue +26 -25
  20. package/src/components/ui/PromptModal.vue +7 -2
  21. package/src/components/ui/Toast.vue +1 -0
  22. package/src/components/ui/index.ts +0 -1
  23. package/src/directives/index.ts +10 -8
  24. package/src/directives/safe-html.ts +10 -0
  25. package/src/ui/UI.state.ts +0 -11
  26. package/src/ui/UI.ts +42 -125
  27. package/src/ui/index.ts +1 -0
  28. package/src/ui/modals.ts +36 -0
  29. package/src/utils/composition/reactiveSet.test.ts +32 -0
  30. package/src/utils/composition/reactiveSet.ts +53 -0
  31. package/src/utils/index.ts +1 -0
  32. package/src/components/AppModals.vue +0 -14
  33. package/src/components/ui/ModalContext.vue +0 -31
@@ -1,42 +1,44 @@
1
- var kt = Object.defineProperty;
2
- var St = (t, s, e) => s in t ? kt(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
- var _ = (t, s, e) => St(t, typeof s != "symbol" ? s + "" : s, e);
4
- import { markRaw as E, Comment as Tt, Text as Mt, Static as Ht, inject as X, reactive as pe, nextTick as Oe, unref as o, watchEffect as Y, defineComponent as g, computed as c, createBlock as h, openBlock as u, mergeProps as H, withCtx as f, renderSlot as w, createPropsRestProxy as N, onUnmounted as ge, ref as U, readonly as ve, useAttrs as Ne, onMounted as Et, watch as Me, toRaw as Vt, createVNode as p, normalizeProps as ne, guardReactiveProps as ae, createTextVNode as I, toDisplayString as x, normalizeClass as k, createElementBlock as b, Fragment as D, renderList as F, provide as le, resolveDynamicComponent as W, useSlots as He, createCommentVNode as T, createElementVNode as y, h as Lt, toRef as Re, useTemplateRef as G, withModifiers as We, withDirectives as Ke, vModelCheckbox as It, normalizeStyle as qt, resolveComponent as zt, createApp as Rt, vModelText as Pt } from "vue";
5
- import { JSError as be, stringToSlug as At, tap as ee, MagicObject as Qe, PromisedValue as K, Storage as O, objectOnly as oe, arrayFrom as Je, isEmpty as xe, objectDeepClone as Dt, fail as Q, facade as te, arrayRemove as Se, getEnv as jt, updateLocationQueryParameters as Bt, forever as Ft, toString as B, isDevelopment as J, isTesting as Ee, after as ue, uuid as re, required as Ut, isObject as ce, objectWithoutEmpty as Ze, stringMatchAll as Xe, objectWithout as Ot, noop as Nt, debounce as Wt, value as Kt, isInstanceOf as Pe, stringExcerpt as Qt, arraySorted as Jt, ListenersManager as Zt, toError as Xt, round as Yt } from "@noeldemartin/utils";
1
+ var It = Object.defineProperty;
2
+ var qt = (t, s, e) => s in t ? It(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
+ var _ = (t, s, e) => qt(t, typeof s != "symbol" ? s + "" : s, e);
4
+ import { markRaw as E, Comment as At, Text as Pt, Static as Dt, inject as X, reactive as ge, unref as l, onUnmounted as we, ref as N, computed as c, readonly as $e, nextTick as jt, useAttrs as et, onMounted as tt, watch as Le, toRaw as Bt, customRef as Ft, watchEffect as G, defineComponent as h, createBlock as f, openBlock as i, mergeProps as V, withCtx as m, renderSlot as $, createPropsRestProxy as K, createVNode as d, normalizeProps as ue, guardReactiveProps as ce, createTextVNode as L, toDisplayString as x, normalizeClass as C, createElementBlock as y, Fragment as D, renderList as U, provide as de, resolveDynamicComponent as Y, useSlots as Re, createCommentVNode as M, createElementVNode as b, h as Ut, useTemplateRef as ee, withModifiers as st, withDirectives as rt, vModelCheckbox as Ot, normalizeStyle as Nt, resolveComponent as Wt, createApp as Kt, vModelText as Qt } from "vue";
5
+ import { JSError as _e, stringToSlug as Jt, tap as te, MagicObject as nt, PromisedValue as Q, Storage as O, objectOnly as ne, arrayFrom as at, isEmpty as Se, objectDeepClone as Zt, fail as W, facade as se, arrayRemove as Ve, getEnv as Xt, updateLocationQueryParameters as Gt, forever as Yt, toString as B, objectWithout as es, noop as ts, debounce as ss, stringMatchAll as lt, isDevelopment as J, isTesting as ze, after as le, uuid as oe, isObject as fe, objectWithoutEmpty as it, value as rs, isInstanceOf as Oe, stringExcerpt as ns, arraySorted as as, ListenersManager as ls, toError as is, round as os } from "@noeldemartin/utils";
6
6
  import j from "virtual:aerogel";
7
- import { createPinia as Gt, setActivePinia as es, defineStore as ts } from "pinia";
8
- import ss from "dompurify";
9
- import { marked as rs, Renderer as Ae } from "marked";
10
- import ns from "clsx";
11
- import { cva as as } from "class-variance-authority";
12
- import { twMerge as ls } from "tailwind-merge";
13
- import { Primitive as os, SelectValue as De, SelectTrigger as is, SelectIcon as us, SelectItem as cs, SelectItemText as ds, SelectPortal as ps, SelectContent as ms, SelectViewport as fs, SelectRoot as hs, Label as gs, useForwardExpose as Ve, SwitchRoot as vs, SwitchThumb as bs, DialogRoot as ys, DialogPortal as ws, DialogContent as $s, DialogDescription as _s, DialogOverlay as xs, DialogTitle as Cs, ToastClose as ks, ToastRoot as Ss, ToastProvider as Ts, ToastViewport as Ms, DropdownMenuItem as Hs, DropdownMenuContent as Es, DropdownMenuRoot as Vs, DropdownMenuTrigger as Ls, DropdownMenuPortal as Is } from "reka-ui";
14
- class Te extends be {
7
+ import { createPinia as us, setActivePinia as cs, defineStore as ds } from "pinia";
8
+ import ps from "dompurify";
9
+ import { marked as ms, Renderer as Ne } from "marked";
10
+ import { injectModal as ot, useModal as fs, createModal as hs, showModal as We, closeModal as Ke, modals as ae, ModalComponent as gs, ModalsPortal as vs } from "@noeldemartin/vue-modals";
11
+ import { ModalComponent as oi, ModalsPortal as ui, closeModal as ci, createModal as di, injectModal as pi, modals as mi, showModal as fi } from "@noeldemartin/vue-modals";
12
+ import bs from "clsx";
13
+ import { cva as ys } from "class-variance-authority";
14
+ import { twMerge as ws } from "tailwind-merge";
15
+ import { Primitive as $s, SelectValue as Qe, SelectTrigger as _s, SelectIcon as xs, SelectItem as Cs, SelectItemText as ks, SelectPortal as Ss, SelectContent as Ts, SelectViewport as Ms, SelectRoot as Hs, Label as Vs, useForwardExpose as Ie, SwitchRoot as Es, SwitchThumb as Ls, DialogRoot as Rs, DialogPortal as zs, DialogContent as Is, DialogDescription as qs, DialogOverlay as As, DialogTitle as Ps, ToastClose as Ds, ToastRoot as js, ToastProvider as Bs, ToastViewport as Fs, DropdownMenuItem as Us, DropdownMenuContent as Os, DropdownMenuRoot as Ns, DropdownMenuTrigger as Ws, DropdownMenuPortal as Ks } from "reka-ui";
16
+ class Ee extends _e {
15
17
  constructor(s, e) {
16
18
  super(`Service '${s}' failed booting`, { cause: e });
17
19
  }
18
20
  }
19
- function qs() {
20
- return j.namespace ?? At(j.name);
21
+ function Qs() {
22
+ return j.namespace ?? Jt(j.name);
21
23
  }
22
- let Le = null;
23
- function Ye() {
24
- return Le ?? zs();
24
+ let qe = null;
25
+ function ut() {
26
+ return qe ?? Js();
25
27
  }
26
- function zs() {
27
- return ee(Gt(), (t) => {
28
- Le = t, es(t);
28
+ function Js() {
29
+ return te(us(), (t) => {
30
+ qe = t, cs(t);
29
31
  });
30
32
  }
31
- function Rs() {
32
- return Le ?? Ye();
33
+ function Zs() {
34
+ return qe ?? ut();
33
35
  }
34
- function Ps(t, s) {
35
- return Ye(), ts(t, s)();
36
+ function Xs(t, s) {
37
+ return ut(), ds(t, s)();
36
38
  }
37
- function ye(t) {
39
+ function xe(t) {
38
40
  var s;
39
- return s = class extends we {
41
+ return s = class extends Ce {
40
42
  usesStore() {
41
43
  return !0;
42
44
  }
@@ -72,8 +74,8 @@ To fix this problem, declare your initialState as a function instead.`
72
74
  }
73
75
  }, _(s, "persist", t.persist ?? []), s;
74
76
  }
75
- var ke;
76
- let we = (ke = class extends Qe {
77
+ var He;
78
+ let Ce = (He = class extends nt {
77
79
  constructor() {
78
80
  super();
79
81
  _(this, "_name");
@@ -82,7 +84,7 @@ let we = (ke = class extends Qe {
82
84
  _(this, "_watchers");
83
85
  _(this, "_store");
84
86
  const e = this.getComputedStateDefinition();
85
- this._name = this.getName() ?? new.target.name, this._booted = new K(), this._computedStateKeys = new Set(Object.keys(e)), this._watchers = this.getStateWatchers(), this._store = this.usesStore() && Ps(this._name, {
87
+ this._name = this.getName() ?? new.target.name, this._booted = new Q(), this._computedStateKeys = new Set(Object.keys(e)), this._watchers = this.getStateWatchers(), this._store = this.usesStore() && Xs(this._name, {
86
88
  state: () => this.getInitialState(),
87
89
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
88
90
  getters: e
@@ -95,7 +97,7 @@ let we = (ke = class extends Qe {
95
97
  return super.static(e);
96
98
  }
97
99
  launch() {
98
- const e = (r) => this._booted.reject(new Te(this._name, r));
100
+ const e = (r) => this._booted.reject(new Ee(this._name, r));
99
101
  try {
100
102
  this.frameworkBoot().then(() => this.boot()).then(() => this._booted.resolve()).catch(e);
101
103
  } catch (r) {
@@ -116,14 +118,14 @@ let we = (ke = class extends Qe {
116
118
  setState(e, r) {
117
119
  if (!this._store)
118
120
  return;
119
- const n = typeof e == "string" ? { [e]: r } : e, a = oe(this._store.$state, Object.keys(n));
121
+ const n = typeof e == "string" ? { [e]: r } : e, a = ne(this._store.$state, Object.keys(n));
120
122
  Object.assign(this._store.$state, n), this.onStateUpdated(n, a);
121
123
  }
122
124
  updatePersistedState(e) {
123
125
  if (!this._store)
124
126
  return;
125
- const r = Je(e), n = oe(this._store.$state, r);
126
- xe(n) || this.onPersistentStateUpdated(n);
127
+ const r = at(e), n = ne(this._store.$state, r);
128
+ Se(n) || this.onPersistentStateUpdated(n);
127
129
  }
128
130
  __get(e) {
129
131
  return this.hasState(e) ? this.getState(e) : super.__get(e);
@@ -132,21 +134,21 @@ let we = (ke = class extends Qe {
132
134
  this.setState({ [e]: r });
133
135
  }
134
136
  get storageKey() {
135
- return `${qs()}:${this._name}`;
137
+ return `${Qs()}:${this._name}`;
136
138
  }
137
139
  onStateUpdated(e, r) {
138
- const n = oe(e, this.static("persist"));
139
- xe(n) || this.onPersistentStateUpdated(n);
140
+ const n = ne(e, this.static("persist"));
141
+ Se(n) || this.onPersistentStateUpdated(n);
140
142
  for (const a in e) {
141
- const i = this._watchers[a];
142
- !i || e[a] === r[a] || i.call(this, e[a], r[a]);
143
+ const u = this._watchers[a];
144
+ !u || e[a] === r[a] || u.call(this, e[a], r[a]);
143
145
  }
144
146
  }
145
147
  onPersistentStateUpdated(e) {
146
148
  const r = O.get(this.storageKey);
147
149
  r && O.set(this.storageKey, {
148
150
  ...r,
149
- ...this.serializePersistedState(Dt(e))
151
+ ...this.serializePersistedState(Zt(e))
150
152
  });
151
153
  }
152
154
  usesStore() {
@@ -176,25 +178,25 @@ let we = (ke = class extends Qe {
176
178
  async boot() {
177
179
  }
178
180
  restorePersistedState() {
179
- if (!(!this.usesStore() || xe(this.static("persist")))) {
181
+ if (!(!this.usesStore() || Se(this.static("persist")))) {
180
182
  if (O.has(this.storageKey)) {
181
183
  const e = O.require(this.storageKey);
182
184
  this.setState(this.deserializePersistedState(e));
183
185
  return;
184
186
  }
185
- O.set(this.storageKey, oe(this.getState(), this.static("persist")));
187
+ O.set(this.storageKey, ne(this.getState(), this.static("persist")));
186
188
  }
187
189
  }
188
190
  requireStore() {
189
- return this._store ? this._store : Q(`Failed getting '${this._name}' store`);
191
+ return this._store ? this._store : W(`Failed getting '${this._name}' store`);
190
192
  }
191
- }, _(ke, "persist", []), ke);
192
- const ll = {
193
+ }, _(He, "persist", []), He);
194
+ const $l = {
193
195
  Low: -256,
194
196
  Default: 0,
195
197
  High: 256
196
198
  };
197
- class As extends we {
199
+ class Gs extends Ce {
198
200
  constructor() {
199
201
  super(...arguments);
200
202
  _(this, "listeners", {});
@@ -208,55 +210,55 @@ class As extends we {
208
210
  async emit(e, r) {
209
211
  var a;
210
212
  const n = this.listeners[e] ?? { priorities: [], handlers: {} };
211
- for (const i of n.priorities)
212
- await Promise.all(((a = n.handlers[i]) == null ? void 0 : a.map((l) => l(r))) ?? []);
213
+ for (const u of n.priorities)
214
+ await Promise.all(((a = n.handlers[u]) == null ? void 0 : a.map((o) => o(r))) ?? []);
213
215
  }
214
216
  // prettier-ignore
215
217
  /* eslint-enable max-len */
216
218
  on(e, r, n) {
217
- const a = typeof r == "function" ? {} : typeof r == "number" ? { priority: r } : r, i = typeof r == "function" ? r : n;
218
- return this.registerListener(e, a, i), () => this.off(e, i);
219
+ const a = typeof r == "function" ? {} : typeof r == "number" ? { priority: r } : r, u = typeof r == "function" ? r : n;
220
+ return this.registerListener(e, a, u), () => this.off(e, u);
219
221
  }
220
222
  // prettier-ignore
221
223
  /* eslint-enable max-len */
222
224
  once(e, r, n) {
223
225
  let a = null;
224
- const i = typeof r == "function" ? {} : r, l = typeof r == "function" ? r : n;
225
- return ee(
226
+ const u = typeof r == "function" ? {} : r, o = typeof r == "function" ? r : n;
227
+ return te(
226
228
  () => a && this.off(e, a),
227
- (d) => {
228
- a = (...v) => (d(), l(...v)), this.registerListener(e, i, l);
229
+ (p) => {
230
+ a = (...g) => (p(), o(...g)), this.registerListener(e, u, o);
229
231
  }
230
232
  );
231
233
  }
232
234
  off(e, r) {
233
- var i;
235
+ var u;
234
236
  const n = this.listeners[e];
235
237
  if (!n)
236
238
  return;
237
239
  const a = [...n.priorities];
238
- for (const l of a)
239
- Se(n.handlers[l] ?? [], r), ((i = n.handlers[l]) == null ? void 0 : i.length) === 0 && (delete n.handlers[l], Se(n.priorities, l));
240
+ for (const o of a)
241
+ Ve(n.handlers[o] ?? [], r), ((u = n.handlers[o]) == null ? void 0 : u.length) === 0 && (delete n.handlers[o], Ve(n.priorities, o));
240
242
  n.priorities.length === 0 && delete this.listeners[e];
241
243
  }
242
244
  registerListener(e, r, n) {
243
- var d, v, $;
245
+ var p, g, w;
244
246
  const a = r.priority ?? 0;
245
247
  e in this.listeners || (this.listeners[e] = { priorities: [], handlers: {} });
246
- const i = ((d = this.listeners[e]) == null ? void 0 : d.priorities) ?? Q(`priorities missing for event '${e}'`), l = ((v = this.listeners[e]) == null ? void 0 : v.handlers) ?? Q(`handlers missing for event '${e}'`);
247
- i.includes(a) || (i.push(a), i.sort((m, C) => C - m), l[a] = []), ($ = l[a]) == null || $.push(n);
248
+ const u = ((p = this.listeners[e]) == null ? void 0 : p.priorities) ?? W(`priorities missing for event '${e}'`), o = ((g = this.listeners[e]) == null ? void 0 : g.handlers) ?? W(`handlers missing for event '${e}'`);
249
+ u.includes(a) || (u.push(a), u.sort((v, S) => S - v), o[a] = []), (w = o[a]) == null || w.push(n);
248
250
  }
249
251
  }
250
- const R = te(As);
251
- function ol(t) {
252
+ const F = se(Gs);
253
+ function _l(t) {
252
254
  return t;
253
255
  }
254
- const Ds = ye({
256
+ const Ys = xe({
255
257
  name: "app",
256
258
  initialState: {
257
259
  plugins: {},
258
260
  instance: null,
259
- environment: jt() ?? "development",
261
+ environment: Xt() ?? "development",
260
262
  version: j.version,
261
263
  sourceUrl: j.sourceUrl,
262
264
  settings: []
@@ -273,12 +275,12 @@ const Ds = ye({
273
275
  }
274
276
  }
275
277
  });
276
- class js extends Ds {
278
+ class er extends Ys {
277
279
  constructor() {
278
280
  super(...arguments);
279
281
  _(this, "name", j.name);
280
- _(this, "ready", new K());
281
- _(this, "mounted", new K());
282
+ _(this, "ready", new Q());
283
+ _(this, "mounted", new Q());
282
284
  }
283
285
  isReady() {
284
286
  return this.ready.isResolved();
@@ -293,7 +295,7 @@ class js extends Ds {
293
295
  return await this.ready.then(e);
294
296
  }
295
297
  async reload(e) {
296
- e && Bt(e), location.reload(), await Ft();
298
+ e && Gt(e), location.reload(), await Yt();
297
299
  }
298
300
  plugin(e) {
299
301
  return this.plugins[e] ?? null;
@@ -303,14 +305,14 @@ class js extends Ds {
303
305
  return ((r = this.instance) == null ? void 0 : r.config.globalProperties[e]) ?? null;
304
306
  }
305
307
  async boot() {
306
- R.once("application-ready", () => this.ready.resolve()), R.once("application-mounted", () => this.mounted.resolve());
308
+ F.once("application-ready", () => this.ready.resolve()), F.once("application-mounted", () => this.mounted.resolve());
307
309
  }
308
310
  }
309
- const A = te(js);
310
- function il(t) {
311
+ const A = se(er);
312
+ function xl(t) {
311
313
  return t;
312
314
  }
313
- async function Bs(t, ...s) {
315
+ async function tr(t, ...s) {
314
316
  A.setState(
315
317
  "plugins",
316
318
  t.reduce(
@@ -319,52 +321,298 @@ async function Bs(t, ...s) {
319
321
  )
320
322
  ), await Promise.all(t.map((e) => e.install(...s)) ?? []);
321
323
  }
322
- function Fs(t) {
324
+ function sr(t) {
323
325
  return Object.entries(t.props ?? {}).reduce((s, [e, r]) => s + `${e}="${B(r)}"`, "");
324
326
  }
325
- function ul(t) {
327
+ function Cl(t) {
326
328
  return t;
327
329
  }
328
- function Us(t) {
330
+ function rr(t) {
329
331
  const s = X(t);
330
- return s ? pe(s) : void 0;
332
+ return s ? ge(s) : void 0;
331
333
  }
332
- function V(t, s) {
333
- return Us(t) ?? Q(s ?? `Could not resolve '${B(t)}' injection key`);
334
+ function I(t, s) {
335
+ return rr(t) ?? W(s ?? `Could not resolve '${B(t)}' injection key`);
334
336
  }
335
- function Os(t, s) {
336
- return X(t) ?? Q(s ?? `Could not resolve '${B(t)}' injection key`);
337
+ function nr(t, s) {
338
+ return X(t) ?? W(s ?? `Could not resolve '${B(t)}' injection key`);
337
339
  }
338
- function Ge(t) {
339
- return typeof t == "string" ? t : t.type === Tt ? "" : t.type === Mt || t.type === Ht ? t.children : t.type === "br" ? `
340
+ function ct(t) {
341
+ return typeof t == "string" ? t : t.type === At ? "" : t.type === Pt || t.type === Dt ? t.children : t.type === "br" ? `
340
342
 
341
- ` : `<${t.type} ${Fs(t)}>${Array.from(t.children).map(Ge).join("")}</${t.type}>`;
343
+ ` : `<${t.type} ${sr(t)}>${Array.from(t.children).map(ct).join("")}</${t.type}>`;
342
344
  }
343
- const Ce = /* @__PURE__ */ new WeakMap(), Ns = {
345
+ const Te = /* @__PURE__ */ new WeakMap(), ar = {
344
346
  mounted(t, { value: s, modifiers: e }) {
345
347
  const r = typeof s == "function" ? s : null, n = () => {
346
348
  const a = t.getBoundingClientRect();
347
349
  e.css && (t.style.setProperty("--width", `${a.width}px`), t.style.setProperty("--height", `${a.height}px`)), r == null || r({ width: a.width, height: a.height });
348
350
  };
349
- e.watch && Ce.set(t, ee(new ResizeObserver(n)).observe(t)), n();
351
+ e.watch && Te.set(t, te(new ResizeObserver(n)).observe(t)), n();
350
352
  },
351
353
  unmounted(t) {
352
354
  var s;
353
- (s = Ce.get(t)) == null || s.unobserve(t), Ce.delete(t);
355
+ (s = Te.get(t)) == null || s.unobserve(t), Te.delete(t);
356
+ }
357
+ };
358
+ function dt(t, s) {
359
+ const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, u = ys(n, a);
360
+ return H(u(r), l(e));
361
+ }
362
+ function H(...t) {
363
+ return ws(bs(t));
364
+ }
365
+ function kl(t, s) {
366
+ const e = F.on(t, s);
367
+ we(() => e());
368
+ }
369
+ const lr = {
370
+ required: (t) => t ? void 0 : "required"
371
+ };
372
+ function ir(t, s) {
373
+ var e;
374
+ if (t == null)
375
+ return !0;
376
+ switch (s.type) {
377
+ case "string":
378
+ return typeof t == "string";
379
+ case "enum":
380
+ return !!((e = s.values) != null && e.includes(t));
381
+ case "number":
382
+ return typeof t == "number";
383
+ case "boolean":
384
+ return typeof t == "boolean";
385
+ case "date":
386
+ return t instanceof Date;
387
+ case "object":
388
+ return typeof t == "object";
389
+ }
390
+ }
391
+ const he = { ...lr };
392
+ function Sl(t, s) {
393
+ he[t] = s;
394
+ }
395
+ function or(t, s) {
396
+ return ir(t, s) ? [] : ["invalid_value"];
397
+ }
398
+ function ur(t, s) {
399
+ var r;
400
+ const e = (r = he[s]) == null ? void 0 : r.call(he, t);
401
+ return e ? at(e) : [];
402
+ }
403
+ const Tl = Symbol(), Je = /* @__PURE__ */ new WeakMap();
404
+ class cr extends nt {
405
+ constructor(e) {
406
+ super();
407
+ _(this, "errors");
408
+ _(this, "_fields");
409
+ _(this, "_data");
410
+ _(this, "_submitted");
411
+ _(this, "_errors");
412
+ _(this, "_listeners", {});
413
+ this._fields = e, this._submitted = N(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), Je.set(
414
+ this,
415
+ c(() => !Object.values(this._errors).some((r) => r !== null))
416
+ ), this.errors = $e(this._errors);
417
+ }
418
+ get valid() {
419
+ var e;
420
+ return !!((e = Je.get(this)) != null && e.value);
421
+ }
422
+ get submitted() {
423
+ return this._submitted.value;
424
+ }
425
+ setFieldValue(e, r) {
426
+ const n = this._fields[e] ?? W(`Trying to set undefined '${B(e)}' field`);
427
+ this._data[e] = n.type === "string" && (n.trim ?? !0) ? B(r).trim() : r, this._submitted.value && this.validate();
428
+ }
429
+ getFieldValue(e) {
430
+ return this._data[e];
431
+ }
432
+ getFieldRules(e) {
433
+ var r, n;
434
+ return ((n = (r = this._fields[e]) == null ? void 0 : r.rules) == null ? void 0 : n.split("|")) ?? [];
435
+ }
436
+ getFieldType(e) {
437
+ var r;
438
+ return ((r = this._fields[e]) == null ? void 0 : r.type) ?? null;
439
+ }
440
+ data() {
441
+ return { ...this._data };
442
+ }
443
+ validate() {
444
+ const e = Object.entries(this._fields).reduce(
445
+ (r, [n, a]) => (r[n] = this.getFieldErrors(n, a), r),
446
+ {}
447
+ );
448
+ return this.resetErrors(e), this.valid;
449
+ }
450
+ reset(e = {}) {
451
+ this._submitted.value = !1, e.keepData || this.resetData(), e.keepErrors || this.resetErrors();
452
+ }
453
+ submit() {
454
+ var r;
455
+ this._submitted.value = !0;
456
+ const e = this.validate();
457
+ return e && ((r = this._listeners.submit) == null || r.forEach((n) => n())), e;
458
+ }
459
+ on(e, r) {
460
+ var n, a;
461
+ return (n = this._listeners)[e] ?? (n[e] = []), (a = this._listeners[e]) == null || a.push(r), () => this.off(e, r);
462
+ }
463
+ off(e, r) {
464
+ Ve(this._listeners[e] ?? [], r);
465
+ }
466
+ async focus(e) {
467
+ var r;
468
+ await jt(), (r = this._listeners.focus) == null || r.forEach((n) => n(e));
354
469
  }
355
- }, Ws = {
356
- measure: Ns
357
- }, Ks = {
470
+ __get(e) {
471
+ return e in this._fields ? this.getFieldValue(e) : super.__get(e);
472
+ }
473
+ __set(e, r) {
474
+ if (!(e in this._fields)) {
475
+ super.__set(e, r);
476
+ return;
477
+ }
478
+ this.setFieldValue(e, r);
479
+ }
480
+ getFieldErrors(e, r) {
481
+ var o;
482
+ const n = [], a = this._data[e], u = ((o = r.rules) == null ? void 0 : o.split("|")) ?? [];
483
+ n.push(...or(a, r));
484
+ for (const p of u)
485
+ p !== "required" && a == null || n.push(...ur(a, p));
486
+ return n.length > 0 ? n : null;
487
+ }
488
+ getInitialData(e) {
489
+ if (this.static().isConjuring())
490
+ return {};
491
+ const r = Object.entries(e).reduce((n, [a, u]) => (n[a] = u.default ?? null, n), {});
492
+ return ge(r);
493
+ }
494
+ getInitialErrors(e) {
495
+ if (this.static().isConjuring())
496
+ return {};
497
+ const r = Object.keys(e).reduce((n, a) => (n[a] = null, n), {});
498
+ return ge(r);
499
+ }
500
+ resetData() {
501
+ for (const [e, r] of Object.entries(this._fields))
502
+ this._data[e] = r.default ?? null;
503
+ }
504
+ resetErrors(e) {
505
+ Object.keys(this._errors).forEach((r) => delete this._errors[r]), e && Object.assign(this._errors, e);
506
+ }
507
+ }
508
+ function pt(t, s) {
509
+ const e = X("form", null), r = e == null ? void 0 : e.on("focus", (n) => t.name === n && s());
510
+ we(() => r == null ? void 0 : r());
511
+ }
512
+ function mt(t) {
513
+ return new cr(t);
514
+ }
515
+ function Ae() {
516
+ const t = et(), s = c(() => t.class);
517
+ return [c(() => es(t, "class")), s];
518
+ }
519
+ function Ml(t) {
520
+ let s = ts;
521
+ tt(() => s = t()), we(() => s());
522
+ }
523
+ function Hl(t, s) {
524
+ const e = ge(O.get(t) ?? s);
525
+ return Le(e, () => O.set(t, Bt(e))), e;
526
+ }
527
+ function dr(t) {
528
+ let s = new Set(t), e, r;
529
+ const n = Ft((a, u) => (r = a, e = u, {
530
+ get: () => s,
531
+ set: () => W("Attempted to write read-only reactive set")
532
+ }));
533
+ return {
534
+ values() {
535
+ return r(), Array.from(n.value.values());
536
+ },
537
+ has(a) {
538
+ return r(), n.value.has(a);
539
+ },
540
+ add(a) {
541
+ e(), n.value.add(a);
542
+ },
543
+ delete(a) {
544
+ e(), n.value.delete(a);
545
+ },
546
+ clear() {
547
+ e(), n.value.clear();
548
+ },
549
+ reset(a) {
550
+ e(), s = new Set(a);
551
+ }
552
+ };
553
+ }
554
+ function Vl(t) {
555
+ const s = N(), e = c(t);
556
+ return Le(e, async () => s.value = await e.value, { immediate: !0 }), s;
557
+ }
558
+ function El(t, s) {
559
+ const e = s ? t : {}, r = s ?? t, n = N(e.initial ?? null), a = ss((u) => n.value = u, e.delay ?? 300);
560
+ return G(() => a(r())), n;
561
+ }
562
+ let ie = null;
563
+ function pr() {
564
+ return te(new Ne(), (t) => {
565
+ t.link = function(s) {
566
+ const e = Ne.prototype.link.apply(this, [s]);
567
+ return s.href.startsWith("#") ? e : e.replace("<a", '<a target="_blank"');
568
+ };
569
+ });
570
+ }
571
+ function mr(t) {
572
+ const s = lt(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
573
+ for (const [e, r, n] of s)
574
+ t = t.replace(e, `<button type="button" data-markdown-action="${r}">${n}</button>`);
575
+ return t;
576
+ }
577
+ function fr(t) {
578
+ const s = lt(t, /<a[^>]*href="#route:([^"]+)"[^>]*>([^<]+)<\/a>/g);
579
+ for (const [e, r, n] of s) {
580
+ const a = (ie == null ? void 0 : ie.resolve(r)) ?? r;
581
+ t = t.replace(e, `<a data-markdown-route="${r}" href="${a}">${n}</a>`);
582
+ }
583
+ return t;
584
+ }
585
+ function hr() {
586
+ return ie;
587
+ }
588
+ function Ll(t) {
589
+ ie = t;
590
+ }
591
+ function gr(t) {
592
+ let s = ms(t, { renderer: pr(), async: !1 });
593
+ return s = ft(s), s = mr(s), s = fr(s), s;
594
+ }
595
+ function ft(t) {
596
+ return ps.sanitize(t, { ADD_ATTR: ["target"] });
597
+ }
598
+ const vr = {
599
+ mounted(t, { value: s }) {
600
+ t.innerHTML = ft(s);
601
+ }
602
+ }, br = {
603
+ measure: ar,
604
+ "safe-html": vr
605
+ }, yr = {
358
606
  install(t, s) {
359
607
  const e = {
360
- ...Ws,
608
+ ...br,
361
609
  ...s.directives
362
610
  };
363
611
  for (const [r, n] of Object.entries(e))
364
612
  t.directive(r, n);
365
613
  }
366
614
  };
367
- class Qs extends we {
615
+ class wr extends Ce {
368
616
  constructor() {
369
617
  super(...arguments);
370
618
  _(this, "cache");
@@ -380,72 +628,79 @@ class Qs extends we {
380
628
  (await n.keys(e)).length !== 0 && await n.put(e, r);
381
629
  }
382
630
  async open() {
383
- return this.cache = this.cache ?? ee(new K(), (e) => {
631
+ return this.cache = this.cache ?? te(new Q(), (e) => {
384
632
  caches.open("app").then((r) => e.resolve(r));
385
633
  });
386
634
  }
387
635
  }
388
- const cl = te(Qs);
389
- class Js extends we {
636
+ const Rl = se(wr);
637
+ class $r extends Ce {
390
638
  async purge() {
391
- await R.emit("purge-storage");
639
+ await F.emit("purge-storage");
392
640
  }
393
641
  }
394
- const et = te(Js);
395
- function dl(t, s) {
642
+ const ht = se($r);
643
+ function zl(t, s) {
396
644
  return {
397
645
  ...t,
398
- ...oe(s, Object.keys(t))
646
+ ...ne(s, Object.keys(t))
399
647
  };
400
648
  }
401
- const Zs = {
649
+ const _r = {
402
650
  $app: A,
403
- $events: R,
404
- $storage: et
651
+ $events: F,
652
+ $storage: ht
405
653
  };
406
- async function $e(t, s) {
654
+ async function ke(t, s) {
407
655
  await Promise.all(
408
656
  Object.entries(s).map(async ([e, r]) => {
409
657
  await r.launch().catch((n) => {
410
- var a, i;
411
- return (i = (a = t.config).errorHandler) == null ? void 0 : i.call(a, n, null, `Failed launching ${e}.`);
658
+ var a, u;
659
+ return (u = (a = t.config).errorHandler) == null ? void 0 : u.call(a, n, null, `Failed launching ${e}.`);
412
660
  });
413
661
  })
414
- ), Object.assign(t.config.globalProperties, s), (J() || Ee()) && Object.assign(globalThis, s);
662
+ ), Object.assign(t.config.globalProperties, s), (J() || ze()) && Object.assign(globalThis, s);
415
663
  }
416
- const Xs = {
664
+ const xr = {
417
665
  async install(t, s) {
418
666
  var r;
419
667
  const e = {
420
- ...Zs,
668
+ ..._r,
421
669
  ...s.services
422
670
  };
423
- t.use(Rs()), (r = s.settings) == null || r.forEach((n) => A.addSetting(n)), await $e(t, e);
424
- }
425
- }, tt = 768, me = {
671
+ t.use(Zs()), (r = s.settings) == null || r.forEach((n) => A.addSetting(n)), await ke(t, e);
672
+ }
673
+ }, Ze = /* @__PURE__ */ new WeakSet();
674
+ function Pe() {
675
+ const t = ot(), { close: s, remove: e, ...r } = fs(Ze.has(t) ? {} : { removeOnClose: !1 });
676
+ return Ze.add(t), {
677
+ ...r,
678
+ async close(n) {
679
+ s(n), await le(1e3), e();
680
+ }
681
+ };
682
+ }
683
+ const gt = 768, ve = {
426
684
  Mobile: "mobile",
427
685
  Desktop: "desktop"
428
686
  };
429
- function st() {
430
- return globalThis.innerWidth > tt ? me.Desktop : me.Mobile;
687
+ function vt() {
688
+ return globalThis.innerWidth > gt ? ve.Desktop : ve.Mobile;
431
689
  }
432
- const Ys = ye({
690
+ const Cr = xe({
433
691
  name: "ui",
434
692
  initialState: {
435
- modals: [],
436
693
  toasts: [],
437
- layout: st()
694
+ layout: vt()
438
695
  },
439
696
  computed: {
440
- desktop: ({ layout: t }) => t === me.Desktop,
441
- mobile: ({ layout: t }) => t === me.Mobile,
442
- openModals: ({ modals: t }) => t.filter(({ closing: s }) => !s)
697
+ desktop: ({ layout: t }) => t === ve.Desktop,
698
+ mobile: ({ layout: t }) => t === ve.Mobile
443
699
  }
444
700
  });
445
- class Gs extends Ys {
701
+ class kr extends Cr {
446
702
  constructor() {
447
703
  super(...arguments);
448
- _(this, "modalCallbacks", {});
449
704
  _(this, "components", {});
450
705
  }
451
706
  registerComponent(e, r) {
@@ -455,7 +710,7 @@ class Gs extends Ys {
455
710
  return this.components[e] ?? null;
456
711
  }
457
712
  requireComponent(e) {
458
- return this.resolveComponent(e) ?? Q(`UI Component '${e}' is not defined!`);
713
+ return this.resolveComponent(e) ?? W(`UI Component '${e}' is not defined!`);
459
714
  }
460
715
  alert(e, r) {
461
716
  const n = () => typeof r != "string" ? { message: e } : {
@@ -467,7 +722,7 @@ class Gs extends Ys {
467
722
  // prettier-ignore
468
723
  /* eslint-enable max-len */
469
724
  async confirm(e, r, n) {
470
- const i = typeof r != "string" ? {
725
+ const u = typeof r != "string" ? {
471
726
  ...r ?? {},
472
727
  message: e,
473
728
  required: !!(r != null && r.required)
@@ -476,31 +731,31 @@ class Gs extends Ys {
476
731
  title: e,
477
732
  message: r,
478
733
  required: !!(n != null && n.required)
479
- }, l = await this.modalForm(this.requireComponent("confirm-modal"), i), d = typeof l == "object" ? l[0] : l ?? !1, v = typeof l == "object" ? l[1] : Object.entries(i.checkboxes ?? {}).reduce(
480
- ($, [m, { default: C }]) => ({
481
- [m]: C ?? !1,
482
- ...$
734
+ }, { response: o } = await this.modal(this.requireComponent("confirm-modal"), u), p = typeof o == "object" ? o[0] : o ?? !1, g = typeof o == "object" ? o[1] : Object.entries(u.checkboxes ?? {}).reduce(
735
+ (w, [v, { default: S }]) => ({
736
+ [v]: S ?? !1,
737
+ ...w
483
738
  }),
484
739
  {}
485
740
  );
486
- for (const [$, m] of Object.entries(i.checkboxes ?? {}))
487
- if (!(!m.required || v[$]))
488
- return d && J() && console.warn(`Confirmed confirm modal was suppressed because required '${$}' checkbox was missing`), [!1, v];
489
- return "checkboxes" in i ? [d, v] : d;
741
+ for (const [w, v] of Object.entries(u.checkboxes ?? {}))
742
+ if (!(!v.required || g[w]))
743
+ return p && J() && console.warn(`Confirmed confirm modal was suppressed because required '${w}' checkbox was missing`), [!1, g];
744
+ return "checkboxes" in u ? [p, g] : p;
490
745
  }
491
746
  async prompt(e, r, n) {
492
- const a = (n == null ? void 0 : n.trim) ?? !0, i = () => typeof r != "string" ? {
747
+ const a = (n == null ? void 0 : n.trim) ?? !0, u = () => typeof r != "string" ? {
493
748
  message: e,
494
749
  ...r ?? {}
495
750
  } : {
496
751
  title: e,
497
752
  message: r,
498
753
  ...n ?? {}
499
- }, l = await this.modalForm(this.requireComponent("prompt-modal"), i());
500
- return (a && typeof l == "string" ? l == null ? void 0 : l.trim() : l) ?? null;
754
+ }, { response: o } = await this.modal(this.requireComponent("prompt-modal"), u());
755
+ return (a && typeof o == "string" ? o == null ? void 0 : o.trim() : o) ?? null;
501
756
  }
502
757
  async loading(e, r) {
503
- const n = (m) => typeof m == "function" ? Promise.resolve(m()) : m, a = () => {
758
+ const n = (v) => typeof v == "function" ? Promise.resolve(v()) : v, a = () => {
504
759
  if (typeof e == "string")
505
760
  return {
506
761
  props: { message: e },
@@ -508,93 +763,59 @@ class Gs extends Ys {
508
763
  };
509
764
  if (typeof e == "function" || e instanceof Promise)
510
765
  return { operationPromise: n(e) };
511
- const { delay: m, ...C } = e;
766
+ const { delay: v, ...S } = e;
512
767
  return {
513
- props: C,
514
- delay: o(m),
768
+ props: S,
769
+ delay: l(v),
515
770
  operationPromise: n(r)
516
771
  };
517
772
  };
518
- let i = !1;
519
- const { operationPromise: l, props: d, delay: v } = a();
520
- if (v && await Promise.race([ue({ ms: v }).then(() => i = !0), l]), v && !i)
521
- return l;
522
- const $ = await this.modal(this.requireComponent("loading-modal"), d);
773
+ let u = !1;
774
+ const { operationPromise: o, props: p, delay: g } = a();
775
+ if (g && await Promise.race([le({ ms: g }).then(() => u = !0), o]), g && !u)
776
+ return o;
777
+ const w = hs(this.requireComponent("loading-modal"), p);
778
+ We(w);
523
779
  try {
524
- const m = await l;
525
- return await ue({ ms: 500 }), m;
780
+ const v = await o;
781
+ return await le({ ms: 500 }), v;
526
782
  } finally {
527
- await this.closeModal($.id);
783
+ await Ke(w.id, { removeAfter: 1e3 });
528
784
  }
529
785
  }
530
786
  toast(e, r = {}) {
531
- const { component: n, ...a } = r, i = {
532
- id: re(),
787
+ const { component: n, ...a } = r, u = {
788
+ id: oe(),
533
789
  properties: { message: e, ...a },
534
790
  component: E(n ?? this.requireComponent("toast"))
535
791
  };
536
- this.setState("toasts", this.toasts.concat(i));
537
- }
538
- async modal(e, r) {
539
- const n = re(), a = {}, i = {
540
- id: n,
541
- closing: !1,
542
- properties: r ?? {},
543
- component: E(e),
544
- beforeClose: new Promise((d) => a.willClose = d),
545
- afterClose: new Promise((d) => a.hasClosed = d)
546
- }, l = this.modals.concat(i);
547
- return this.modalCallbacks[i.id] = a, this.setState({ modals: l }), await Oe(), i;
548
- }
549
- async modalForm(e, r) {
550
- return await (await this.modal(e, r)).beforeClose;
551
- }
552
- async closeModal(e, r) {
553
- if (!A.isMounted()) {
554
- await this.removeModal(e, r);
555
- return;
556
- }
557
- await R.emit("close-modal", { id: e, result: r });
792
+ this.setState("toasts", this.toasts.concat(u));
793
+ }
794
+ modal(e, r) {
795
+ return We(e, r ?? {});
558
796
  }
559
797
  async closeAllModals() {
560
- for (; this.modals.length > 0; )
561
- await this.closeModal(Ut(this.modals[this.modals.length - 1]).id);
798
+ await Promise.all(ae.value.map(({ id: e }) => Ke(e, { removeAfter: 1e3 })));
562
799
  }
563
800
  async boot() {
564
- this.watchModalEvents(), this.watchMountedEvent(), this.watchViewportBreakpoints();
565
- }
566
- async removeModal(e, r) {
567
- var n, a;
568
- this.setState(
569
- "modals",
570
- this.modals.filter((i) => i.id !== e)
571
- ), (a = (n = this.modalCallbacks[e]) == null ? void 0 : n.hasClosed) == null || a.call(n, r), delete this.modalCallbacks[e];
572
- }
573
- watchModalEvents() {
574
- R.on("modal-will-close", ({ modal: { id: e }, result: r }) => {
575
- var a, i;
576
- const n = this.modals.find((l) => e === l.id);
577
- n && (n.closing = !0), (i = (a = this.modalCallbacks[e]) == null ? void 0 : a.willClose) == null || i.call(a, r);
578
- }), R.on("modal-has-closed", async ({ modal: { id: e }, result: r }) => {
579
- await this.removeModal(e, r);
580
- });
801
+ this.watchMountedEvent(), this.watchViewportBreakpoints();
581
802
  }
582
803
  watchMountedEvent() {
583
- R.once("application-mounted", async () => {
804
+ F.once("application-mounted", async () => {
584
805
  if (!globalThis.document || !globalThis.getComputedStyle)
585
806
  return;
586
807
  const e = globalThis.document.getElementById("splash");
587
- e && (globalThis.getComputedStyle(e).opacity !== "0" && (e.style.opacity = "0", await ue({ ms: 600 })), e.remove());
808
+ e && (globalThis.getComputedStyle(e).opacity !== "0" && (e.style.opacity = "0", await le({ ms: 600 })), e.remove());
588
809
  });
589
810
  }
590
811
  watchViewportBreakpoints() {
591
812
  if (!globalThis.matchMedia)
592
813
  return;
593
- globalThis.matchMedia(`(min-width: ${tt}px)`).addEventListener("change", () => this.setState({ layout: st() }));
814
+ globalThis.matchMedia(`(min-width: ${gt}px)`).addEventListener("change", () => this.setState({ layout: vt() }));
594
815
  }
595
816
  }
596
- const z = te(Gs);
597
- class er {
817
+ const P = se(kr);
818
+ class Sr {
598
819
  constructor(s, e) {
599
820
  this.locale = s, this.fallbackLocale = e;
600
821
  }
@@ -620,7 +841,7 @@ class er {
620
841
  return J() && console.warn("Lang provider is missing"), e;
621
842
  }
622
843
  }
623
- const tr = ye({
844
+ const Tr = xe({
624
845
  name: "lang",
625
846
  persist: ["locale", "fallbackLocale"],
626
847
  initialState: {
@@ -629,11 +850,11 @@ const tr = ye({
629
850
  fallbackLocale: "en"
630
851
  }
631
852
  });
632
- class sr extends tr {
853
+ class Mr extends Tr {
633
854
  constructor() {
634
855
  super();
635
856
  _(this, "provider");
636
- this.provider = new er(
857
+ this.provider = new Sr(
637
858
  this.getState("locale") ?? this.getBrowserLocale(),
638
859
  this.getState("fallbackLocale")
639
860
  );
@@ -661,7 +882,7 @@ class sr extends tr {
661
882
  );
662
883
  }
663
884
  }
664
- const Z = te(sr), rt = Z.translate.bind(Z), S = Z.translateWithDefault.bind(Z), rr = ye({
885
+ const Z = se(Mr), bt = Z.translate.bind(Z), k = Z.translateWithDefault.bind(Z), Hr = xe({
665
886
  name: "errors",
666
887
  initialState: {
667
888
  logs: [],
@@ -674,7 +895,7 @@ const Z = te(sr), rt = Z.translate.bind(Z), S = Z.translateWithDefault.bind(Z),
674
895
  hasStartupErrors: ({ startupErrors: t }) => t.length > 0
675
896
  }
676
897
  });
677
- class nr extends rr {
898
+ class Vr extends Hr {
678
899
  constructor() {
679
900
  super(...arguments);
680
901
  _(this, "forceReporting", !1);
@@ -689,18 +910,18 @@ class nr extends rr {
689
910
  }
690
911
  async inspect(e, r) {
691
912
  if (Array.isArray(e) && e.length === 0) {
692
- z.alert(S("errors.inspectEmpty", "Nothing to inspect!"));
913
+ P.alert(k("errors.inspectEmpty", "Nothing to inspect!"));
693
914
  return;
694
915
  }
695
916
  const n = Array.isArray(e) ? e[0] : this.isErrorReport(e) ? e : await this.createErrorReport(e), a = Array.isArray(e) ? e : r ?? [n];
696
- z.modal(z.requireComponent("error-report-modal"), { report: n, reports: a });
917
+ P.modal(P.requireComponent("error-report-modal"), { report: n, reports: a });
697
918
  }
698
919
  async report(e, r) {
699
- if (await R.emit("error", { error: e, message: r }), Ee("unit") || (J() && this.logError(e), !this.enabled))
920
+ if (await F.emit("error", { error: e, message: r }), ze("unit") || (J() && this.logError(e), !this.enabled))
700
921
  throw e;
701
922
  if (!A.isMounted()) {
702
- const i = await this.createStartupErrorReport(e);
703
- i && this.setState({ startupErrors: this.startupErrors.concat(i) });
923
+ const u = await this.createStartupErrorReport(e);
924
+ u && this.setState({ startupErrors: this.startupErrors.concat(u) });
704
925
  return;
705
926
  }
706
927
  const n = await this.createErrorReport(e), a = {
@@ -708,15 +929,15 @@ class nr extends rr {
708
929
  seen: !1,
709
930
  date: /* @__PURE__ */ new Date()
710
931
  };
711
- z.toast(
712
- r ?? S("errors.notice", "Something went wrong, but it's not your fault. Try again!"),
932
+ P.toast(
933
+ r ?? k("errors.notice", "Something went wrong, but it's not your fault. Try again!"),
713
934
  {
714
935
  variant: "danger",
715
936
  actions: [
716
937
  {
717
- label: S("errors.viewDetails", "View details"),
938
+ label: k("errors.viewDetails", "View details"),
718
939
  dismiss: !0,
719
- click: () => z.modal(z.requireComponent("error-report-modal"), { report: n, reports: [n] })
940
+ click: () => P.modal(P.requireComponent("error-report-modal"), { report: n, reports: [n] })
720
941
  }
721
942
  ]
722
943
  }
@@ -734,7 +955,7 @@ class nr extends rr {
734
955
  });
735
956
  }
736
957
  async boot() {
737
- Y(async () => {
958
+ G(async () => {
738
959
  var e;
739
960
  if (!this.debug) {
740
961
  (e = this.eruda) == null || e.destroy();
@@ -744,27 +965,27 @@ class nr extends rr {
744
965
  });
745
966
  }
746
967
  logError(e) {
747
- console.error(e), ce(e) && e.cause && this.logError(e.cause);
968
+ console.error(e), fe(e) && e.cause && this.logError(e.cause);
748
969
  }
749
970
  isErrorReport(e) {
750
- return ce(e) && "title" in e;
971
+ return fe(e) && "title" in e;
751
972
  }
752
973
  async createErrorReport(e) {
753
- return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof be ? this.createErrorReportFromError(e) : ce(e) ? Ze({
974
+ return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof _e ? this.createErrorReportFromError(e) : fe(e) ? it({
754
975
  title: B(
755
- e.name ?? e.title ?? S("errors.unknown", "Unknown Error")
976
+ e.name ?? e.title ?? k("errors.unknown", "Unknown Error")
756
977
  ),
757
978
  description: B(
758
- e.message ?? e.description ?? S("errors.unknownDescription", "Unknown error object")
979
+ e.message ?? e.description ?? k("errors.unknownDescription", "Unknown error object")
759
980
  ),
760
981
  error: e
761
982
  }) : {
762
- title: S("errors.unknown", "Unknown Error"),
983
+ title: k("errors.unknown", "Unknown Error"),
763
984
  error: e
764
985
  };
765
986
  }
766
987
  async createStartupErrorReport(e) {
767
- return e instanceof Te ? e.cause instanceof Te ? null : this.createErrorReport(e.cause) : this.createErrorReport(e);
988
+ return e instanceof Ee ? e.cause instanceof Ee ? null : this.createErrorReport(e.cause) : this.createErrorReport(e);
768
989
  }
769
990
  createErrorReportFromError(e, r = {}) {
770
991
  return {
@@ -776,44 +997,7 @@ class nr extends rr {
776
997
  };
777
998
  }
778
999
  }
779
- const nt = te(nr);
780
- let ie = null;
781
- function ar() {
782
- return ee(new Ae(), (t) => {
783
- t.link = function(s) {
784
- const e = Ae.prototype.link.apply(this, [s]);
785
- return s.href.startsWith("#") ? e : e.replace("<a", '<a target="_blank"');
786
- };
787
- });
788
- }
789
- function lr(t) {
790
- const s = Xe(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
791
- for (const [e, r, n] of s)
792
- t = t.replace(e, `<button type="button" data-markdown-action="${r}">${n}</button>`);
793
- return t;
794
- }
795
- function or(t) {
796
- const s = Xe(t, /<a[^>]*href="#route:([^"]+)"[^>]*>([^<]+)<\/a>/g);
797
- for (const [e, r, n] of s) {
798
- const a = (ie == null ? void 0 : ie.resolve(r)) ?? r;
799
- t = t.replace(e, `<a data-markdown-route="${r}" href="${a}">${n}</a>`);
800
- }
801
- return t;
802
- }
803
- function ir() {
804
- return ie;
805
- }
806
- function pl(t) {
807
- ie = t;
808
- }
809
- function ur(t) {
810
- let s = rs(t, { renderer: ar(), async: !1 });
811
- return s = cr(s), s = lr(s), s = or(s), s;
812
- }
813
- function cr(t) {
814
- return ss.sanitize(t, { ADD_ATTR: ["target"] });
815
- }
816
- const at = /* @__PURE__ */ g({
1000
+ const yt = se(Vr), wt = /* @__PURE__ */ h({
817
1001
  __name: "HeadlessButton",
818
1002
  props: {
819
1003
  class: {},
@@ -830,8 +1014,8 @@ const at = /* @__PURE__ */ g({
830
1014
  },
831
1015
  setup(t) {
832
1016
  const s = c(() => t.as ? { as: t.as } : t.route ? {
833
- as: z.resolveComponent("router-link") ?? "a",
834
- to: Ze({
1017
+ as: P.resolveComponent("router-link") ?? "a",
1018
+ to: it({
835
1019
  name: t.route,
836
1020
  params: t.routeParams,
837
1021
  query: t.routeQuery
@@ -844,26 +1028,18 @@ const at = /* @__PURE__ */ g({
844
1028
  as: "button",
845
1029
  type: t.submit ? "submit" : "button"
846
1030
  });
847
- return (e, r) => (u(), h(o(os), H({
1031
+ return (e, r) => (i(), f(l($s), V({
848
1032
  class: t.class,
849
1033
  "as-child": e.asChild,
850
1034
  disabled: e.disabled
851
1035
  }, s.value), {
852
- default: f(() => [
853
- w(e.$slots, "default")
1036
+ default: m(() => [
1037
+ $(e.$slots, "default")
854
1038
  ]),
855
1039
  _: 3
856
1040
  }, 16, ["class", "as-child", "disabled"]));
857
1041
  }
858
- });
859
- function lt(t, s) {
860
- const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, i = as(n, a);
861
- return M(i(r), o(e));
862
- }
863
- function M(...t) {
864
- return ls(ns(t));
865
- }
866
- const q = /* @__PURE__ */ g({
1042
+ }), R = /* @__PURE__ */ h({
867
1043
  __name: "Button",
868
1044
  props: {
869
1045
  class: {},
@@ -879,7 +1055,7 @@ const q = /* @__PURE__ */ g({
879
1055
  as: {}
880
1056
  },
881
1057
  setup(t) {
882
- const s = N(t, ["class", "size", "variant", "disabled"]), e = c(() => lt(
1058
+ const s = K(t, ["class", "size", "variant", "disabled"]), e = c(() => dt(
883
1059
  { baseClasses: t.class, variant: t.variant, size: t.size, disabled: t.disabled },
884
1060
  {
885
1061
  baseClasses: "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
@@ -888,6 +1064,7 @@ const q = /* @__PURE__ */ g({
888
1064
  default: "bg-primary-600 text-white focus-visible:outline-primary-600",
889
1065
  secondary: "bg-background text-gray-900 ring-gray-300",
890
1066
  danger: "bg-red-600 text-white focus-visible:outline-red-600",
1067
+ warning: "bg-yellow-600 text-white focus-visible:outline-yellow-600",
891
1068
  ghost: "bg-transparent",
892
1069
  outline: "bg-transparent text-primary-600 ring-primary-600",
893
1070
  link: "text-links"
@@ -974,232 +1151,62 @@ const q = /* @__PURE__ */ g({
974
1151
  }
975
1152
  }
976
1153
  ));
977
- return (r, n) => (u(), h(at, H({
1154
+ return (r, n) => (i(), f(wt, V({
978
1155
  class: e.value,
979
1156
  disabled: r.disabled
980
1157
  }, s), {
981
- default: f(() => [
982
- w(r.$slots, "default")
1158
+ default: m(() => [
1159
+ $(r.$slots, "default")
983
1160
  ]),
984
1161
  _: 3
985
1162
  }, 16, ["class", "disabled"]));
986
1163
  }
987
1164
  });
988
- function dr(t) {
1165
+ function Er(t) {
989
1166
  return typeof t == "object" && t !== null && "label" in t;
990
1167
  }
991
- function ot(t, s) {
992
- const e = R.on(t, s);
993
- ge(() => e());
994
- }
995
- const pr = {
996
- required: (t) => t ? void 0 : "required"
997
- };
998
- function mr(t, s) {
999
- var e;
1000
- if (t == null)
1001
- return !0;
1002
- switch (s.type) {
1003
- case "string":
1004
- return typeof t == "string";
1005
- case "enum":
1006
- return !!((e = s.values) != null && e.includes(t));
1007
- case "number":
1008
- return typeof t == "number";
1009
- case "boolean":
1010
- return typeof t == "boolean";
1011
- case "date":
1012
- return t instanceof Date;
1013
- case "object":
1014
- return typeof t == "object";
1015
- }
1016
- }
1017
- const de = { ...pr };
1018
- function ml(t, s) {
1019
- de[t] = s;
1020
- }
1021
- function fr(t, s) {
1022
- return mr(t, s) ? [] : ["invalid_value"];
1023
- }
1024
- function hr(t, s) {
1025
- var r;
1026
- const e = (r = de[s]) == null ? void 0 : r.call(de, t);
1027
- return e ? Je(e) : [];
1028
- }
1029
- const fl = Symbol(), je = /* @__PURE__ */ new WeakMap();
1030
- class gr extends Qe {
1031
- constructor(e) {
1032
- super();
1033
- _(this, "errors");
1034
- _(this, "_fields");
1035
- _(this, "_data");
1036
- _(this, "_submitted");
1037
- _(this, "_errors");
1038
- _(this, "_listeners", {});
1039
- this._fields = e, this._submitted = U(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), je.set(
1040
- this,
1041
- c(() => !Object.values(this._errors).some((r) => r !== null))
1042
- ), this.errors = ve(this._errors);
1043
- }
1044
- get valid() {
1045
- var e;
1046
- return !!((e = je.get(this)) != null && e.value);
1047
- }
1048
- get submitted() {
1049
- return this._submitted.value;
1050
- }
1051
- setFieldValue(e, r) {
1052
- const n = this._fields[e] ?? Q(`Trying to set undefined '${B(e)}' field`);
1053
- this._data[e] = n.type === "string" && (n.trim ?? !0) ? B(r).trim() : r, this._submitted.value && this.validate();
1054
- }
1055
- getFieldValue(e) {
1056
- return this._data[e];
1057
- }
1058
- getFieldRules(e) {
1059
- var r, n;
1060
- return ((n = (r = this._fields[e]) == null ? void 0 : r.rules) == null ? void 0 : n.split("|")) ?? [];
1061
- }
1062
- getFieldType(e) {
1063
- var r;
1064
- return ((r = this._fields[e]) == null ? void 0 : r.type) ?? null;
1065
- }
1066
- data() {
1067
- return { ...this._data };
1068
- }
1069
- validate() {
1070
- const e = Object.entries(this._fields).reduce(
1071
- (r, [n, a]) => (r[n] = this.getFieldErrors(n, a), r),
1072
- {}
1073
- );
1074
- return this.resetErrors(e), this.valid;
1075
- }
1076
- reset(e = {}) {
1077
- this._submitted.value = !1, e.keepData || this.resetData(), e.keepErrors || this.resetErrors();
1078
- }
1079
- submit() {
1080
- var r;
1081
- this._submitted.value = !0;
1082
- const e = this.validate();
1083
- return e && ((r = this._listeners.submit) == null || r.forEach((n) => n())), e;
1084
- }
1085
- on(e, r) {
1086
- var n, a;
1087
- return (n = this._listeners)[e] ?? (n[e] = []), (a = this._listeners[e]) == null || a.push(r), () => this.off(e, r);
1088
- }
1089
- off(e, r) {
1090
- Se(this._listeners[e] ?? [], r);
1091
- }
1092
- async focus(e) {
1093
- var r;
1094
- await Oe(), (r = this._listeners.focus) == null || r.forEach((n) => n(e));
1095
- }
1096
- __get(e) {
1097
- return e in this._fields ? this.getFieldValue(e) : super.__get(e);
1098
- }
1099
- __set(e, r) {
1100
- if (!(e in this._fields)) {
1101
- super.__set(e, r);
1102
- return;
1103
- }
1104
- this.setFieldValue(e, r);
1105
- }
1106
- getFieldErrors(e, r) {
1107
- var l;
1108
- const n = [], a = this._data[e], i = ((l = r.rules) == null ? void 0 : l.split("|")) ?? [];
1109
- n.push(...fr(a, r));
1110
- for (const d of i)
1111
- d !== "required" && a == null || n.push(...hr(a, d));
1112
- return n.length > 0 ? n : null;
1113
- }
1114
- getInitialData(e) {
1115
- if (this.static().isConjuring())
1116
- return {};
1117
- const r = Object.entries(e).reduce((n, [a, i]) => (n[a] = i.default ?? null, n), {});
1118
- return pe(r);
1119
- }
1120
- getInitialErrors(e) {
1121
- if (this.static().isConjuring())
1122
- return {};
1123
- const r = Object.keys(e).reduce((n, a) => (n[a] = null, n), {});
1124
- return pe(r);
1125
- }
1126
- resetData() {
1127
- for (const [e, r] of Object.entries(this._fields))
1128
- this._data[e] = r.default ?? null;
1129
- }
1130
- resetErrors(e) {
1131
- Object.keys(this._errors).forEach((r) => delete this._errors[r]), e && Object.assign(this._errors, e);
1132
- }
1133
- }
1134
- function it(t, s) {
1135
- const e = X("form", null), r = e == null ? void 0 : e.on("focus", (n) => t.name === n && s());
1136
- ge(() => r == null ? void 0 : r());
1137
- }
1138
- function ut(t) {
1139
- return new gr(t);
1140
- }
1141
- function Ie() {
1142
- const t = Ne(), s = c(() => t.class);
1143
- return [c(() => Ot(t, "class")), s];
1144
- }
1145
- function hl(t) {
1146
- let s = Nt;
1147
- Et(() => s = t()), ge(() => s());
1148
- }
1149
- function gl(t, s) {
1150
- const e = pe(O.get(t) ?? s);
1151
- return Me(e, () => O.set(t, Vt(e))), e;
1152
- }
1153
- function vl(t) {
1154
- const s = U(), e = c(t);
1155
- return Me(e, async () => s.value = await e.value, { immediate: !0 }), s;
1156
- }
1157
- function bl(t, s) {
1158
- const e = s ? t : {}, r = s ?? t, n = U(e.initial ?? null), a = Wt((i) => n.value = i, e.delay ?? 300);
1159
- return Y(() => a(r())), n;
1160
- }
1161
- const ct = /* @__PURE__ */ g({
1168
+ const $t = /* @__PURE__ */ h({
1162
1169
  __name: "HeadlessSelectValue",
1163
1170
  setup(t) {
1164
- const s = V(
1171
+ const s = I(
1165
1172
  "select",
1166
1173
  "<HeadlessSelectValue> must be a child of a <HeadlessSelect>"
1167
1174
  );
1168
- return (e, r) => e.$slots.default ? (u(), h(o(De), {
1175
+ return (e, r) => e.$slots.default ? (i(), f(l(Qe), {
1169
1176
  key: 0,
1170
- placeholder: o(s).placeholder
1177
+ placeholder: l(s).placeholder
1171
1178
  }, {
1172
- default: f(() => [
1173
- w(e.$slots, "default")
1179
+ default: m(() => [
1180
+ $(e.$slots, "default")
1174
1181
  ]),
1175
1182
  _: 3
1176
- }, 8, ["placeholder"])) : (u(), h(o(De), {
1183
+ }, 8, ["placeholder"])) : (i(), f(l(Qe), {
1177
1184
  key: 1,
1178
- placeholder: o(s).placeholder
1185
+ placeholder: l(s).placeholder
1179
1186
  }, null, 8, ["placeholder"]));
1180
1187
  }
1181
- }), dt = /* @__PURE__ */ g({
1188
+ }), _t = /* @__PURE__ */ h({
1182
1189
  __name: "HeadlessSelectTrigger",
1183
1190
  setup(t) {
1184
- const s = V(
1191
+ const s = I(
1185
1192
  "select",
1186
1193
  "<HeadlessSelectTrigger> must be a child of a <HeadlessSelect>"
1187
1194
  );
1188
- return (e, r) => (u(), h(o(is), {
1189
- id: o(s).id
1195
+ return (e, r) => (i(), f(l(_s), {
1196
+ id: l(s).id
1190
1197
  }, {
1191
- default: f(() => [
1192
- w(e.$slots, "default", {}, () => [
1193
- p(ct, {
1194
- placeholder: o(s).placeholder
1198
+ default: m(() => [
1199
+ $(e.$slots, "default", {}, () => [
1200
+ d($t, {
1201
+ placeholder: l(s).placeholder
1195
1202
  }, null, 8, ["placeholder"]),
1196
- p(o(us))
1203
+ d(l(xs))
1197
1204
  ])
1198
1205
  ]),
1199
1206
  _: 3
1200
1207
  }, 8, ["id"]));
1201
1208
  }
1202
- }), pt = /* @__PURE__ */ g({
1209
+ }), xt = /* @__PURE__ */ h({
1203
1210
  __name: "HeadlessSelectOption",
1204
1211
  props: {
1205
1212
  value: {},
@@ -1209,7 +1216,7 @@ const ct = /* @__PURE__ */ g({
1209
1216
  as: {}
1210
1217
  },
1211
1218
  setup(t) {
1212
- const s = V(
1219
+ const s = I(
1213
1220
  "select",
1214
1221
  "<HeadlessSelectOption> must be a child of a <HeadlessSelect>"
1215
1222
  ), e = c(() => {
@@ -1217,12 +1224,12 @@ const ct = /* @__PURE__ */ g({
1217
1224
  const r = (n = s.options) == null ? void 0 : n.find((a) => a.value === t.value);
1218
1225
  return r ? r.label : B(t.value);
1219
1226
  });
1220
- return (r, n) => (u(), h(o(cs), ne(ae(r.$props)), {
1221
- default: f(() => [
1222
- p(o(ds), null, {
1223
- default: f(() => [
1224
- w(r.$slots, "default", {}, () => [
1225
- I(x(e.value), 1)
1227
+ return (r, n) => (i(), f(l(Cs), ue(ce(r.$props)), {
1228
+ default: m(() => [
1229
+ d(l(ks), null, {
1230
+ default: m(() => [
1231
+ $(r.$slots, "default", {}, () => [
1232
+ L(x(e.value), 1)
1226
1233
  ])
1227
1234
  ]),
1228
1235
  _: 3
@@ -1231,33 +1238,33 @@ const ct = /* @__PURE__ */ g({
1231
1238
  _: 3
1232
1239
  }, 16));
1233
1240
  }
1234
- }), mt = /* @__PURE__ */ g({
1241
+ }), Ct = /* @__PURE__ */ h({
1235
1242
  __name: "HeadlessSelectOptions",
1236
1243
  props: {
1237
1244
  class: {},
1238
1245
  innerClass: {}
1239
1246
  },
1240
1247
  setup(t) {
1241
- const s = V(
1248
+ const s = I(
1242
1249
  "select",
1243
1250
  "<HeadlessSelectOptions> must be a child of a <HeadlessSelect>"
1244
- ), e = c(() => M("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
1245
- return (r, n) => (u(), h(o(ps), null, {
1246
- default: f(() => [
1247
- p(o(ms), {
1251
+ ), e = c(() => H("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
1252
+ return (r, n) => (i(), f(l(Ss), null, {
1253
+ default: m(() => [
1254
+ d(l(Ts), {
1248
1255
  position: "popper",
1249
- class: k(e.value),
1250
- align: o(s).align,
1251
- side: o(s).side,
1256
+ class: C(e.value),
1257
+ align: l(s).align,
1258
+ side: l(s).side,
1252
1259
  "side-offset": 4
1253
1260
  }, {
1254
- default: f(() => [
1255
- p(o(fs), {
1256
- class: k(r.innerClass)
1261
+ default: m(() => [
1262
+ d(l(Ms), {
1263
+ class: C(r.innerClass)
1257
1264
  }, {
1258
- default: f(() => [
1259
- w(r.$slots, "default", {}, () => [
1260
- (u(!0), b(D, null, F(o(s).options ?? [], (a) => (u(), h(pt, {
1265
+ default: m(() => [
1266
+ $(r.$slots, "default", {}, () => [
1267
+ (i(!0), y(D, null, U(l(s).options ?? [], (a) => (i(), f(xt, {
1261
1268
  key: a.key,
1262
1269
  value: a.value
1263
1270
  }, null, 8, ["value"]))), 128))
@@ -1272,7 +1279,7 @@ const ct = /* @__PURE__ */ g({
1272
1279
  _: 3
1273
1280
  }));
1274
1281
  }
1275
- }), vr = /* @__PURE__ */ g({
1282
+ }), Lr = /* @__PURE__ */ h({
1276
1283
  inheritAttrs: !1,
1277
1284
  __name: "HeadlessSelect",
1278
1285
  props: {
@@ -1292,56 +1299,56 @@ const ct = /* @__PURE__ */ g({
1292
1299
  },
1293
1300
  emits: ["update:modelValue"],
1294
1301
  setup(t, { expose: s, emit: e }) {
1295
- const r = e, n = X("form", null), a = c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue), i = c(() => a.value), l = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), d = c(() => t.options ? t.options.map((m) => ({
1296
- key: re(),
1297
- label: t.renderOption ? t.renderOption(m) : dr(m) ? Kt(m.label) : B(m),
1298
- value: m
1299
- })) : null), v = {
1302
+ const r = e, n = X("form", null), a = c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue), u = c(() => a.value), o = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), p = c(() => t.options ? t.options.map((v) => ({
1303
+ key: oe(),
1304
+ label: t.renderOption ? t.renderOption(v) : Er(v) ? rs(v.label) : B(v),
1305
+ value: v
1306
+ })) : null), g = {
1300
1307
  labelClass: t.labelClass,
1301
1308
  optionsClass: t.optionsClass,
1302
1309
  align: t.align,
1303
1310
  side: t.side,
1304
1311
  value: a,
1305
- id: `select-${re()}`,
1312
+ id: `select-${oe()}`,
1306
1313
  name: c(() => t.name),
1307
1314
  label: c(() => t.label),
1308
1315
  description: c(() => t.description),
1309
- placeholder: c(() => t.placeholder ?? S("ui.select", "Select an option")),
1310
- options: d,
1316
+ placeholder: c(() => t.placeholder ?? k("ui.select", "Select an option")),
1317
+ options: p,
1311
1318
  selectedOption: c(() => {
1312
- var m;
1313
- return (m = d.value) == null ? void 0 : m.find((C) => C.value === t.modelValue);
1319
+ var v;
1320
+ return (v = p.value) == null ? void 0 : v.find((S) => S.value === t.modelValue);
1314
1321
  }),
1315
- errors: ve(l),
1322
+ errors: $e(o),
1316
1323
  required: c(() => {
1317
1324
  if (!(!t.name || !n))
1318
1325
  return n.getFieldRules(t.name).includes("required");
1319
1326
  }),
1320
- update(m) {
1327
+ update(v) {
1321
1328
  if (n && t.name) {
1322
- n.setFieldValue(t.name, m);
1329
+ n.setFieldValue(t.name, v);
1323
1330
  return;
1324
1331
  }
1325
- r("update:modelValue", m);
1332
+ r("update:modelValue", v);
1326
1333
  }
1327
1334
  };
1328
- function $(m) {
1329
- v.update(m);
1335
+ function w(v) {
1336
+ g.update(v);
1330
1337
  }
1331
- return le("select", v), s(v), (m, C) => (u(), h(o(hs), {
1332
- "model-value": i.value,
1333
- by: m.compareOptions,
1334
- "onUpdate:modelValue": C[0] || (C[0] = (L) => $(L))
1338
+ return de("select", g), s(g), (v, S) => (i(), f(l(Hs), {
1339
+ "model-value": u.value,
1340
+ by: v.compareOptions,
1341
+ "onUpdate:modelValue": S[0] || (S[0] = (q) => w(q))
1335
1342
  }, {
1336
- default: f(({ open: L }) => [
1337
- (u(), h(W(m.as), ne(ae(m.$attrs)), {
1338
- default: f(() => [
1339
- w(m.$slots, "default", {
1340
- modelValue: m.modelValue,
1341
- open: L
1343
+ default: m(({ open: q }) => [
1344
+ (i(), f(Y(v.as), ue(ce(v.$attrs)), {
1345
+ default: m(() => [
1346
+ $(v.$slots, "default", {
1347
+ modelValue: v.modelValue,
1348
+ open: q
1342
1349
  }, () => [
1343
- p(dt),
1344
- p(mt)
1350
+ d(_t),
1351
+ d(Ct)
1345
1352
  ])
1346
1353
  ]),
1347
1354
  _: 2
@@ -1350,50 +1357,50 @@ const ct = /* @__PURE__ */ g({
1350
1357
  _: 3
1351
1358
  }, 8, ["model-value", "by"]));
1352
1359
  }
1353
- }), Be = /* @__PURE__ */ g({
1360
+ }), Xe = /* @__PURE__ */ h({
1354
1361
  __name: "HeadlessSelectLabel",
1355
1362
  props: {
1356
1363
  asChild: { type: Boolean },
1357
1364
  as: {}
1358
1365
  },
1359
1366
  setup(t) {
1360
- const s = V(
1367
+ const s = I(
1361
1368
  "select",
1362
1369
  "<HeadlessSelectLabel> must be a child of a <HeadlessSelect>"
1363
- ), e = He(), r = c(() => !!(s.label || e.default));
1364
- return (n, a) => r.value ? (u(), h(o(gs), H({
1370
+ ), e = Re(), r = c(() => !!(s.label || e.default));
1371
+ return (n, a) => r.value ? (i(), f(l(Vs), V({
1365
1372
  key: 0,
1366
- for: o(s).id
1373
+ for: l(s).id
1367
1374
  }, n.$props), {
1368
- default: f(() => [
1369
- w(n.$slots, "default", {}, () => [
1370
- I(x(o(s).label), 1)
1375
+ default: m(() => [
1376
+ $(n.$slots, "default", {}, () => [
1377
+ L(x(l(s).label), 1)
1371
1378
  ])
1372
1379
  ]),
1373
1380
  _: 3
1374
- }, 16, ["for"])) : T("", !0);
1381
+ }, 16, ["for"])) : M("", !0);
1375
1382
  }
1376
- }), ft = /* @__PURE__ */ g({
1383
+ }), kt = /* @__PURE__ */ h({
1377
1384
  __name: "SelectLabel",
1378
1385
  props: {
1379
1386
  class: {}
1380
1387
  },
1381
1388
  setup(t) {
1382
- const s = V("select", "<SelectLabel> must be a child of a <Select>"), e = c(() => M("block text-sm leading-6 font-medium text-gray-900", s.labelClass, t.class));
1383
- return (r, n) => r.$slots.default ? (u(), h(Be, {
1389
+ const s = I("select", "<SelectLabel> must be a child of a <Select>"), e = c(() => H("block text-sm leading-6 font-medium text-gray-900", s.labelClass, t.class));
1390
+ return (r, n) => r.$slots.default ? (i(), f(Xe, {
1384
1391
  key: 0,
1385
- class: k(e.value)
1392
+ class: C(e.value)
1386
1393
  }, {
1387
- default: f(() => [
1388
- w(r.$slots, "default")
1394
+ default: m(() => [
1395
+ $(r.$slots, "default")
1389
1396
  ]),
1390
1397
  _: 3
1391
- }, 8, ["class"])) : (u(), h(Be, {
1398
+ }, 8, ["class"])) : (i(), f(Xe, {
1392
1399
  key: 1,
1393
- class: k(e.value)
1400
+ class: C(e.value)
1394
1401
  }, null, 8, ["class"]));
1395
1402
  }
1396
- }), Fe = /* @__PURE__ */ g({
1403
+ }), Ge = /* @__PURE__ */ h({
1397
1404
  __name: "SelectOption",
1398
1405
  props: {
1399
1406
  value: {},
@@ -1401,62 +1408,62 @@ const ct = /* @__PURE__ */ g({
1401
1408
  innerClass: {}
1402
1409
  },
1403
1410
  setup(t) {
1404
- const s = c(() => M("group p-1 outline-none", t.class)), e = c(() => M(
1411
+ const s = c(() => H("group p-1 outline-none", t.class)), e = c(() => H(
1405
1412
  // eslint-disable-next-line vue/max-len
1406
1413
  "relative flex max-w-[calc(100vw-2rem)] cursor-pointer items-center truncate rounded-md gap-2 px-2 py-1 text-sm select-none *:truncate group-data-[highlighted]:bg-gray-100 group-data-[state=checked]:font-semibold group-data-[state=unchecked]:opacity-50",
1407
1414
  t.innerClass
1408
1415
  ));
1409
- return (r, n) => (u(), h(pt, {
1410
- class: k(s.value),
1416
+ return (r, n) => (i(), f(xt, {
1417
+ class: C(s.value),
1411
1418
  value: r.value
1412
1419
  }, {
1413
- default: f(() => [
1414
- y("div", {
1415
- class: k(e.value)
1420
+ default: m(() => [
1421
+ b("div", {
1422
+ class: C(e.value)
1416
1423
  }, [
1417
- w(r.$slots, "default")
1424
+ $(r.$slots, "default")
1418
1425
  ], 2)
1419
1426
  ]),
1420
1427
  _: 3
1421
1428
  }, 8, ["class", "value"]));
1422
1429
  }
1423
- }), ht = /* @__PURE__ */ g({
1430
+ }), St = /* @__PURE__ */ h({
1424
1431
  __name: "SelectOptions",
1425
1432
  props: {
1426
1433
  class: {}
1427
1434
  },
1428
1435
  setup(t) {
1429
- const s = V("select", "<SelectOptions> must be a child of a <Select>"), e = c(() => M(
1436
+ const s = I("select", "<SelectOptions> must be a child of a <Select>"), e = c(() => H(
1430
1437
  "z-50 overflow-auto rounded-lg bg-white text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden",
1431
1438
  s.optionsClass,
1432
1439
  t.class
1433
1440
  ));
1434
- return (r, n) => (u(), h(mt, {
1435
- class: k(e.value)
1441
+ return (r, n) => (i(), f(Ct, {
1442
+ class: C(e.value)
1436
1443
  }, {
1437
- default: f(() => {
1444
+ default: m(() => {
1438
1445
  var a;
1439
1446
  return [
1440
- (a = o(s).options) != null && a.length ? w(r.$slots, "default", { key: 0 }, () => {
1441
- var i;
1447
+ (a = l(s).options) != null && a.length ? $(r.$slots, "default", { key: 0 }, () => {
1448
+ var u;
1442
1449
  return [
1443
- (u(!0), b(D, null, F(((i = o(s)) == null ? void 0 : i.options) ?? [], (l) => (u(), h(Fe, {
1444
- key: l.key,
1445
- value: l.value
1450
+ (i(!0), y(D, null, U(((u = l(s)) == null ? void 0 : u.options) ?? [], (o) => (i(), f(Ge, {
1451
+ key: o.key,
1452
+ value: o.value
1446
1453
  }, {
1447
- default: f(() => [
1448
- I(x(l.label), 1)
1454
+ default: m(() => [
1455
+ L(x(o.label), 1)
1449
1456
  ]),
1450
1457
  _: 2
1451
1458
  }, 1032, ["value"]))), 128))
1452
1459
  ];
1453
- }) : w(r.$slots, "default", { key: 1 }, () => [
1454
- p(Fe, {
1460
+ }) : $(r.$slots, "default", { key: 1 }, () => [
1461
+ d(Ge, {
1455
1462
  disabled: "",
1456
1463
  value: null
1457
1464
  }, {
1458
- default: f(() => [
1459
- I(x(r.$td("ui.selectEmpty", "No options available")), 1)
1465
+ default: m(() => [
1466
+ L(x(r.$td("ui.selectEmpty", "No options available")), 1)
1460
1467
  ]),
1461
1468
  _: 1
1462
1469
  })
@@ -1466,42 +1473,42 @@ const ct = /* @__PURE__ */ g({
1466
1473
  _: 3
1467
1474
  }, 8, ["class"]));
1468
1475
  }
1469
- }), br = {
1476
+ }), Rr = {
1470
1477
  viewBox: "0 0 20 20",
1471
1478
  width: "1.2em",
1472
1479
  height: "1.2em"
1473
1480
  };
1474
- function yr(t, s) {
1475
- return u(), b("svg", br, s[0] || (s[0] = [
1476
- y("path", {
1481
+ function zr(t, s) {
1482
+ return i(), y("svg", Rr, s[0] || (s[0] = [
1483
+ b("path", {
1477
1484
  fill: "currentColor",
1478
1485
  d: "m9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828L5.757 6.586L4.343 8z"
1479
1486
  }, null, -1)
1480
1487
  ]));
1481
1488
  }
1482
- const wr = E({ name: "zondicons-cheveron-down", render: yr }), gt = /* @__PURE__ */ g({
1489
+ const Ir = E({ name: "zondicons-cheveron-down", render: zr }), Tt = /* @__PURE__ */ h({
1483
1490
  __name: "SelectTrigger",
1484
1491
  props: {
1485
1492
  class: {}
1486
1493
  },
1487
1494
  setup(t) {
1488
- const s = V("select", "<SelectTrigger> must be a child of a <Select>"), e = c(() => M(
1495
+ const s = I("select", "<SelectTrigger> must be a child of a <Select>"), e = c(() => H(
1489
1496
  // eslint-disable-next-line vue/max-len
1490
1497
  "focus:outline-primary-600 data-[state=open]:outline-primary-600 grid w-full cursor-default grid-cols-1 rounded-md bg-white py-1.5 pr-2 pl-3 text-left text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 sm:text-sm/6",
1491
1498
  { "mt-1": s.label },
1492
1499
  t.class
1493
1500
  ));
1494
- return (r, n) => (u(), h(dt, {
1495
- class: k(e.value)
1501
+ return (r, n) => (i(), f(_t, {
1502
+ class: C(e.value)
1496
1503
  }, {
1497
- default: f(() => [
1498
- p(ct, { class: "col-start-1 row-start-1 truncate pr-6" }),
1499
- p(o(wr), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
1504
+ default: m(() => [
1505
+ d($t, { class: "col-start-1 row-start-1 truncate pr-6" }),
1506
+ d(l(Ir), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
1500
1507
  ]),
1501
1508
  _: 1
1502
1509
  }, 8, ["class"]));
1503
1510
  }
1504
- }), $r = /* @__PURE__ */ g({
1511
+ }), qr = /* @__PURE__ */ h({
1505
1512
  __name: "Select",
1506
1513
  props: {
1507
1514
  as: {},
@@ -1520,72 +1527,72 @@ const wr = E({ name: "zondicons-cheveron-down", render: yr }), gt = /* @__PURE__
1520
1527
  },
1521
1528
  emits: ["update:modelValue"],
1522
1529
  setup(t) {
1523
- const { forwardRef: s } = Ve();
1524
- return (e, r) => (u(), h(vr, H({ ref: o(s) }, e.$props, {
1530
+ const { forwardRef: s } = Ie();
1531
+ return (e, r) => (i(), f(Lr, V({ ref: l(s) }, e.$props, {
1525
1532
  "onUpdate:modelValue": r[0] || (r[0] = (n) => e.$emit("update:modelValue", n))
1526
1533
  }), {
1527
- default: f(() => [
1528
- p(ft),
1529
- w(e.$slots, "default", {}, () => [
1530
- p(gt),
1531
- p(ht)
1534
+ default: m(() => [
1535
+ d(kt),
1536
+ $(e.$slots, "default", {}, () => [
1537
+ d(Tt),
1538
+ d(St)
1532
1539
  ])
1533
1540
  ]),
1534
1541
  _: 3
1535
1542
  }, 16));
1536
1543
  }
1537
- }), _r = { class: "grow" }, xr = /* @__PURE__ */ g({
1544
+ }), Ar = { class: "grow" }, Pr = /* @__PURE__ */ h({
1538
1545
  __name: "Language",
1539
1546
  setup(t) {
1540
1547
  const s = Z.getBrowserLocale(), e = c(() => [null, ...Z.locales]);
1541
1548
  function r(n) {
1542
- return (n && j.locales[n]) ?? S("settings.localeDefault", "{locale} (default)", {
1549
+ return (n && j.locales[n]) ?? k("settings.localeDefault", "{locale} (default)", {
1543
1550
  locale: j.locales[s] ?? s
1544
1551
  });
1545
1552
  }
1546
- return (n, a) => (u(), h($r, {
1553
+ return (n, a) => (i(), f(qr, {
1547
1554
  modelValue: n.$lang.locale,
1548
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n.$lang.locale = i),
1555
+ "onUpdate:modelValue": a[0] || (a[0] = (u) => n.$lang.locale = u),
1549
1556
  class: "flex flex-col items-start md:flex-row",
1550
1557
  as: "div",
1551
1558
  options: e.value,
1552
1559
  "render-option": r
1553
1560
  }, {
1554
- default: f(() => [
1555
- y("div", _r, [
1556
- p(ft, { class: "text-base font-semibold" }, {
1557
- default: f(() => [
1558
- I(x(n.$td("settings.locale", "Language")), 1)
1561
+ default: m(() => [
1562
+ b("div", Ar, [
1563
+ d(kt, { class: "text-base font-semibold" }, {
1564
+ default: m(() => [
1565
+ L(x(n.$td("settings.locale", "Language")), 1)
1559
1566
  ]),
1560
1567
  _: 1
1561
1568
  }),
1562
- p(P, {
1569
+ d(z, {
1563
1570
  "lang-key": "settings.localeDescription",
1564
1571
  "lang-default": "Choose the application's language.",
1565
1572
  class: "mt-1 text-sm text-gray-500"
1566
1573
  })
1567
1574
  ]),
1568
- p(q, {
1575
+ d(R, {
1569
1576
  variant: "ghost",
1570
- as: gt,
1577
+ as: Tt,
1571
1578
  class: "grid w-auto outline-none"
1572
1579
  }),
1573
- p(ht)
1580
+ d(St)
1574
1581
  ]),
1575
1582
  _: 1
1576
1583
  }, 8, ["modelValue", "options"]));
1577
1584
  }
1578
- }), Cr = [
1585
+ }), Dr = [
1579
1586
  {
1580
1587
  priority: 100,
1581
- component: xr
1588
+ component: Pr
1582
1589
  }
1583
- ], kr = { $lang: Z }, Sr = {
1590
+ ], jr = { $lang: Z }, Br = {
1584
1591
  async install(t) {
1585
1592
  var s;
1586
- (s = t.config.globalProperties).$t ?? (s.$t = rt), t.config.globalProperties.$td = S, Cr.forEach((e) => A.addSetting(e)), await $e(t, kr);
1593
+ (s = t.config.globalProperties).$t ?? (s.$t = bt), t.config.globalProperties.$td = k, Dr.forEach((e) => A.addSetting(e)), await ke(t, jr);
1587
1594
  }
1588
- }, Tr = /* @__PURE__ */ g({
1595
+ }, Fr = /* @__PURE__ */ h({
1589
1596
  __name: "Markdown",
1590
1597
  props: {
1591
1598
  as: {},
@@ -1597,38 +1604,38 @@ const wr = E({ name: "zondicons-cheveron-down", render: yr }), gt = /* @__PURE__
1597
1604
  actions: {}
1598
1605
  },
1599
1606
  setup(t) {
1600
- const s = Ne(), e = He(), r = c(() => e.default ? e.default().map(Ge).join("") : t.text ?? (t.langKey && (t.langDefault ? S(t.langKey, t.langDefault, t.langParams ?? {}) : rt(t.langKey, t.langParams ?? {})))), n = c(() => {
1607
+ const s = et(), e = Re(), r = c(() => e.default ? e.default().map(ct).join("") : t.text ?? (t.langKey && (t.langDefault ? k(t.langKey, t.langDefault, t.langParams ?? {}) : bt(t.langKey, t.langParams ?? {})))), n = c(() => {
1601
1608
  if (!r.value)
1602
1609
  return null;
1603
- let l = ur(r.value);
1604
- return t.inline && (l = l.replace("<p>", "<span>").replace("</p>", "</span>")), l;
1605
- }), a = () => Lt(t.as ?? (t.inline ? "span" : "div"), {
1610
+ let o = gr(r.value);
1611
+ return t.inline && (o = o.replace("<p>", "<span>").replace("</p>", "</span>")), o;
1612
+ }), a = () => Ut(t.as ?? (t.inline ? "span" : "div"), {
1606
1613
  innerHTML: n.value,
1607
- onClick: i,
1614
+ onClick: u,
1608
1615
  ...s,
1609
1616
  class: `${s.class ?? ""} ${t.inline ? "" : "prose"}`
1610
1617
  });
1611
- async function i(l) {
1612
- var v, $;
1613
- const { target: d } = l;
1614
- if (Pe(d, HTMLElement) && d.dataset.markdownAction) {
1615
- ($ = (v = t.actions) == null ? void 0 : v[d.dataset.markdownAction]) == null || $.call(v);
1618
+ async function u(o) {
1619
+ var g, w;
1620
+ const { target: p } = o;
1621
+ if (Oe(p, HTMLElement) && p.dataset.markdownAction) {
1622
+ (w = (g = t.actions) == null ? void 0 : g[p.dataset.markdownAction]) == null || w.call(g);
1616
1623
  return;
1617
1624
  }
1618
- if (Pe(d, HTMLAnchorElement) && d.dataset.markdownRoute) {
1619
- const m = ir();
1620
- m && (l.preventDefault(), m.visit(d.dataset.markdownRoute));
1625
+ if (Oe(p, HTMLAnchorElement) && p.dataset.markdownRoute) {
1626
+ const v = hr();
1627
+ v && (o.preventDefault(), v.visit(p.dataset.markdownRoute));
1621
1628
  return;
1622
1629
  }
1623
1630
  }
1624
- return (l, d) => (u(), h(a));
1631
+ return (o, p) => (i(), f(a));
1625
1632
  }
1626
- }), Mr = (t, s) => {
1633
+ }), Ur = (t, s) => {
1627
1634
  const e = t.__vccOpts || t;
1628
1635
  for (const [r, n] of s)
1629
1636
  e[r] = n;
1630
1637
  return e;
1631
- }, P = /* @__PURE__ */ Mr(Tr, [["__scopeId", "data-v-8b211cfb"]]), Hr = { class: "flex-grow" }, Er = ["id"], Vr = /* @__PURE__ */ g({
1638
+ }, z = /* @__PURE__ */ Ur(Fr, [["__scopeId", "data-v-8b211cfb"]]), Or = { class: "flex-grow" }, Nr = ["id"], Wr = /* @__PURE__ */ h({
1632
1639
  __name: "Setting",
1633
1640
  props: {
1634
1641
  title: {},
@@ -1638,29 +1645,29 @@ const wr = E({ name: "zondicons-cheveron-down", render: yr }), gt = /* @__PURE__
1638
1645
  layout: { default: "horizontal" }
1639
1646
  },
1640
1647
  setup(t) {
1641
- const s = c(() => M(t.class, "flex flex-col justify-center gap-1"));
1642
- return (e, r) => (u(), b("div", {
1643
- class: k(["mt-4 flex", { "flex-col": e.layout === "vertical" }])
1648
+ const s = c(() => H(t.class, "flex flex-col justify-center gap-1"));
1649
+ return (e, r) => (i(), y("div", {
1650
+ class: C(["mt-4 flex", { "flex-col": e.layout === "vertical" }])
1644
1651
  }, [
1645
- y("div", Hr, [
1646
- y("h3", {
1652
+ b("div", Or, [
1653
+ b("h3", {
1647
1654
  id: e.titleId,
1648
1655
  class: "text-base font-semibold"
1649
- }, x(e.title), 9, Er),
1650
- e.description ? (u(), h(P, {
1656
+ }, x(e.title), 9, Nr),
1657
+ e.description ? (i(), f(z, {
1651
1658
  key: 0,
1652
1659
  text: e.description,
1653
1660
  class: "mt-1 text-sm text-gray-500"
1654
- }, null, 8, ["text"])) : T("", !0)
1661
+ }, null, 8, ["text"])) : M("", !0)
1655
1662
  ]),
1656
- y("div", {
1657
- class: k(s.value)
1663
+ b("div", {
1664
+ class: C(s.value)
1658
1665
  }, [
1659
- w(e.$slots, "default")
1666
+ $(e.$slots, "default")
1660
1667
  ], 2)
1661
1668
  ], 2));
1662
1669
  }
1663
- }), Lr = ["for"], Ir = /* @__PURE__ */ g({
1670
+ }), Kr = ["for"], Qr = /* @__PURE__ */ h({
1664
1671
  inheritAttrs: !1,
1665
1672
  __name: "HeadlessSwitch",
1666
1673
  props: {
@@ -1675,71 +1682,71 @@ const wr = E({ name: "zondicons-cheveron-down", render: yr }), gt = /* @__PURE__
1675
1682
  },
1676
1683
  emits: ["update:modelValue"],
1677
1684
  setup(t, { expose: s, emit: e }) {
1678
- const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), i = {
1679
- id: `switch-${re()}`,
1685
+ const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), u = {
1686
+ id: `switch-${oe()}`,
1680
1687
  name: c(() => t.name),
1681
1688
  label: c(() => t.label),
1682
1689
  description: c(() => t.description),
1683
1690
  value: c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
1684
- errors: ve(a),
1691
+ errors: $e(a),
1685
1692
  required: c(() => {
1686
1693
  if (!(!t.name || !n))
1687
1694
  return n.getFieldRules(t.name).includes("required");
1688
1695
  }),
1689
- update(l) {
1696
+ update(o) {
1690
1697
  if (n && t.name) {
1691
- n.setFieldValue(t.name, l);
1698
+ n.setFieldValue(t.name, o);
1692
1699
  return;
1693
1700
  }
1694
- r("update:modelValue", l);
1701
+ r("update:modelValue", o);
1695
1702
  }
1696
1703
  };
1697
- return s(i), Y(() => {
1704
+ return s(u), G(() => {
1698
1705
  !t.description && !a.value || console.warn("Errors and description not implemented in <HeadlessSwitch>");
1699
- }), (l, d) => (u(), b("div", {
1700
- class: k(t.class)
1706
+ }), (o, p) => (i(), y("div", {
1707
+ class: C(t.class)
1701
1708
  }, [
1702
- l.label ? (u(), b("label", {
1709
+ o.label ? (i(), y("label", {
1703
1710
  key: 0,
1704
- for: i.id,
1705
- class: k(l.labelClass)
1706
- }, x(l.label), 11, Lr)) : T("", !0),
1707
- p(o(vs), H({
1708
- id: i.id,
1709
- name: l.name,
1710
- "model-value": i.value.value
1711
- }, l.$attrs, {
1712
- class: l.inputClass,
1713
- "onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
1711
+ for: u.id,
1712
+ class: C(o.labelClass)
1713
+ }, x(o.label), 11, Kr)) : M("", !0),
1714
+ d(l(Es), V({
1715
+ id: u.id,
1716
+ name: o.name,
1717
+ "model-value": u.value.value
1718
+ }, o.$attrs, {
1719
+ class: o.inputClass,
1720
+ "onUpdate:modelValue": p[0] || (p[0] = (g) => o.$emit("update:modelValue", g))
1714
1721
  }), {
1715
- default: f(() => [
1716
- p(o(bs), {
1717
- class: k(l.thumbClass)
1722
+ default: m(() => [
1723
+ d(l(Ls), {
1724
+ class: C(o.thumbClass)
1718
1725
  }, null, 8, ["class"])
1719
1726
  ]),
1720
1727
  _: 1
1721
1728
  }, 16, ["id", "name", "model-value", "class"])
1722
1729
  ], 2));
1723
1730
  }
1724
- }), qr = /* @__PURE__ */ g({
1731
+ }), Jr = /* @__PURE__ */ h({
1725
1732
  __name: "Switch",
1726
1733
  setup(t) {
1727
- return (s, e) => (u(), h(Ir, {
1734
+ return (s, e) => (i(), f(Qr, {
1728
1735
  class: "flex flex-row items-center gap-1",
1729
1736
  "input-class": "disabled:opacity-50 disabled:cursor-not-allowed data-[state=checked]:bg-primary-600 data-[state=unchecked]:bg-gray-200 relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focusdisabled:opacity-50 disabled:cursor-not-allowed :ring-2 focus:ring-primary-600 focus:ring-offset-2 focus:outline-hidden",
1730
1737
  "thumb-class": "data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 pointer-events-none inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out"
1731
1738
  }));
1732
1739
  }
1733
- }), zr = /* @__PURE__ */ g({
1740
+ }), Zr = /* @__PURE__ */ h({
1734
1741
  __name: "Debug",
1735
1742
  setup(t) {
1736
- return (s, e) => (u(), h(Vr, {
1743
+ return (s, e) => (i(), f(Wr, {
1737
1744
  "title-id": "debug-setting",
1738
1745
  title: s.$td("settings.debug", "Debugging"),
1739
1746
  description: s.$td("settings.debugDescription", "Enable debugging with [Eruda](https://eruda.liriliri.io/).")
1740
1747
  }, {
1741
- default: f(() => [
1742
- p(qr, {
1748
+ default: m(() => [
1749
+ d(Jr, {
1743
1750
  modelValue: s.$errors.debug,
1744
1751
  "onUpdate:modelValue": e[0] || (e[0] = (r) => s.$errors.debug = r),
1745
1752
  "aria-labelledby": "debug-setting"
@@ -1748,55 +1755,55 @@ const wr = E({ name: "zondicons-cheveron-down", render: yr }), gt = /* @__PURE__
1748
1755
  _: 1
1749
1756
  }, 8, ["title", "description"]));
1750
1757
  }
1751
- }), Rr = [
1758
+ }), Xr = [
1752
1759
  {
1753
1760
  priority: 10,
1754
- component: zr
1761
+ component: Zr
1755
1762
  }
1756
- ], vt = [];
1757
- function yl(t) {
1758
- vt.push(t);
1763
+ ], Mt = [];
1764
+ function Il(t) {
1765
+ Mt.push(t);
1759
1766
  }
1760
- function bt(t) {
1761
- for (const s of vt) {
1767
+ function Ht(t) {
1768
+ for (const s of Mt) {
1762
1769
  const e = s(t);
1763
1770
  if (e)
1764
1771
  return e;
1765
1772
  }
1766
- return typeof t == "string" ? t : t instanceof Error || t instanceof be ? t.message : ce(t) ? B(t.message ?? t.description ?? "Unknown error object") : S("errors.unknown", "Unknown Error");
1773
+ return typeof t == "string" ? t : t instanceof Error || t instanceof _e ? t.message : fe(t) ? B(t.message ?? t.description ?? "Unknown error object") : k("errors.unknown", "Unknown Error");
1767
1774
  }
1768
- class Ue extends be {
1775
+ class Ye extends _e {
1769
1776
  }
1770
- const Pr = { $errors: nt }, Ar = (t) => (nt.report(t), !0);
1771
- function Dr(t, s = () => !1) {
1772
- const e = (r) => s(r) || Ar(r);
1773
- t.config.errorHandler = e, globalThis.onerror = (r, n, a, i, l) => e(l ?? r), globalThis.onunhandledrejection = (r) => e(r.reason);
1777
+ const Gr = { $errors: yt }, Yr = (t) => (yt.report(t), !0);
1778
+ function en(t, s = () => !1) {
1779
+ const e = (r) => s(r) || Yr(r);
1780
+ t.config.errorHandler = e, globalThis.onerror = (r, n, a, u, o) => e(o ?? r), globalThis.onunhandledrejection = (r) => e(r.reason);
1774
1781
  }
1775
- const jr = {
1782
+ const tn = {
1776
1783
  async install(t, s) {
1777
- Dr(t, s.handleError), Rr.forEach((e) => A.addSetting(e)), await $e(t, Pr);
1784
+ en(t, s.handleError), Xr.forEach((e) => A.addSetting(e)), await ke(t, Gr);
1778
1785
  }
1779
- }, Br = {
1786
+ }, sn = {
1780
1787
  async install() {
1781
- Ee() && (globalThis.testingRuntime = {
1782
- on: (...t) => R.on(...t),
1788
+ ze() && (globalThis.testingRuntime = {
1789
+ on: (...t) => F.on(...t),
1783
1790
  service: (t) => A.service(t)
1784
1791
  });
1785
1792
  }
1786
- }, Fr = {
1793
+ }, rn = {
1787
1794
  viewBox: "0 0 20 20",
1788
1795
  width: "1.2em",
1789
1796
  height: "1.2em"
1790
1797
  };
1791
- function Ur(t, s) {
1792
- return u(), b("svg", Fr, s[0] || (s[0] = [
1793
- y("path", {
1798
+ function nn(t, s) {
1799
+ return i(), y("svg", rn, s[0] || (s[0] = [
1800
+ b("path", {
1794
1801
  fill: "currentColor",
1795
1802
  d: "M10 8.586L2.929 1.515L1.515 2.929L8.586 10l-7.071 7.071l1.414 1.414L10 11.414l7.071 7.071l1.414-1.414L11.414 10l7.071-7.071l-1.414-1.414z"
1796
1803
  }, null, -1)
1797
1804
  ]));
1798
1805
  }
1799
- const Or = E({ name: "zondicons-close", render: Ur }), Nr = /* @__PURE__ */ g({
1806
+ const an = E({ name: "zondicons-close", render: nn }), ln = /* @__PURE__ */ h({
1800
1807
  __name: "HeadlessModal",
1801
1808
  props: {
1802
1809
  persistent: { type: Boolean },
@@ -1806,27 +1813,18 @@ const Or = E({ name: "zondicons-close", render: Ur }), Nr = /* @__PURE__ */ g({
1806
1813
  descriptionHidden: { type: Boolean }
1807
1814
  },
1808
1815
  setup(t, { expose: s }) {
1809
- const e = U(null), { modal: r } = V(
1810
- "modal",
1811
- "could not obtain modal reference from <HeadlessModal>, did you render this component manually? Show it using $ui.modal() instead"
1812
- );
1813
- s({ close: i, $content: e });
1814
- const { forwardRef: n } = Ve(), a = U(!1);
1815
- le("$modalContentRef", e), ot("close-modal", async ({ id: l, result: d }) => {
1816
- l === r.id && await i(d);
1817
- });
1818
- async function i(l) {
1819
- a.value || (await R.emit("modal-will-close", { modal: r, result: l }), a.value = !0, await R.emit("modal-has-closed", { modal: r, result: l }));
1820
- }
1821
- return (l, d) => (u(), h(o(ys), {
1822
- ref: o(n),
1816
+ const e = N(null), { close: r } = Pe();
1817
+ s({ $content: e });
1818
+ const { forwardRef: n } = Ie();
1819
+ return de("$modalContentRef", e), (a, u) => (i(), f(l(Rs), {
1820
+ ref: l(n),
1823
1821
  open: "",
1824
- "onUpdate:open": d[0] || (d[0] = (v) => l.persistent || i())
1822
+ "onUpdate:open": u[0] || (u[0] = (o) => a.persistent || o || l(r)())
1825
1823
  }, {
1826
- default: f(() => [
1827
- p(o(ws), null, {
1828
- default: f(() => [
1829
- w(l.$slots, "default", { close: i })
1824
+ default: m(() => [
1825
+ d(l(zs), null, {
1826
+ default: m(() => [
1827
+ $(a.$slots, "default", { close: l(r) })
1830
1828
  ]),
1831
1829
  _: 3
1832
1830
  })
@@ -1834,58 +1832,36 @@ const Or = E({ name: "zondicons-close", render: Ur }), Nr = /* @__PURE__ */ g({
1834
1832
  _: 3
1835
1833
  }, 512));
1836
1834
  }
1837
- }), yt = /* @__PURE__ */ g({
1838
- __name: "ModalContext",
1839
- props: {
1840
- modal: {},
1841
- childIndex: {}
1842
- },
1843
- setup(t) {
1844
- const s = t, e = c(() => {
1845
- const r = {};
1846
- for (const n in s.modal.properties)
1847
- r[n] = o(s.modal.properties[n]);
1848
- return r;
1849
- });
1850
- return le("modal", {
1851
- modal: Re(s, "modal"),
1852
- childIndex: Re(s, "childIndex")
1853
- }), (r, n) => (u(), h(W(r.modal.component), ne(ae(e.value)), null, 16));
1854
- }
1855
- }), Wr = /* @__PURE__ */ g({
1835
+ }), on = /* @__PURE__ */ h({
1856
1836
  __name: "HeadlessModalContent",
1857
1837
  setup(t) {
1858
- const { childIndex: s = 0 } = V(
1859
- "modal",
1860
- "could not obtain modal reference from <HeadlessModalContent>, did you render this component manually? Show it using $ui.modal() instead"
1861
- ), e = Os("$modalContentRef"), r = G("$contentRef"), n = c(() => z.modals[s] ?? null);
1862
- return Y(() => e.value = r.value), (a, i) => (u(), h(o($s), { ref: "$contentRef" }, {
1863
- default: f(() => [
1864
- w(a.$slots, "default"),
1865
- n.value ? (u(), h(yt, {
1838
+ const { child: s } = Pe(), e = nr("$modalContentRef"), r = ee("$contentRef");
1839
+ return G(() => e.value = r.value), (n, a) => (i(), f(l(Is), { ref: "$contentRef" }, {
1840
+ default: m(() => [
1841
+ $(n.$slots, "default"),
1842
+ l(s) ? (i(), f(l(gs), {
1866
1843
  key: 0,
1867
- "child-index": o(s) + 1,
1868
- modal: n.value
1869
- }, null, 8, ["child-index", "modal"])) : T("", !0)
1844
+ is: l(s)
1845
+ }, null, 8, ["is"])) : M("", !0)
1870
1846
  ]),
1871
1847
  _: 3
1872
1848
  }, 512));
1873
1849
  }
1874
- }), Kr = /* @__PURE__ */ g({
1850
+ }), un = /* @__PURE__ */ h({
1875
1851
  __name: "HeadlessModalDescription",
1876
1852
  props: {
1877
1853
  asChild: { type: Boolean },
1878
1854
  as: {}
1879
1855
  },
1880
1856
  setup(t) {
1881
- return (s, e) => (u(), h(o(_s), ne(ae(s.$props)), {
1882
- default: f(() => [
1883
- w(s.$slots, "default")
1857
+ return (s, e) => (i(), f(l(qs), ue(ce(s.$props)), {
1858
+ default: m(() => [
1859
+ $(s.$slots, "default")
1884
1860
  ]),
1885
1861
  _: 3
1886
1862
  }, 16));
1887
1863
  }
1888
- }), Qr = /* @__PURE__ */ g({
1864
+ }), cn = /* @__PURE__ */ h({
1889
1865
  __name: "HeadlessModalOverlay",
1890
1866
  props: {
1891
1867
  forceMount: { type: Boolean },
@@ -1893,31 +1869,31 @@ const Or = E({ name: "zondicons-close", render: Ur }), Nr = /* @__PURE__ */ g({
1893
1869
  as: {}
1894
1870
  },
1895
1871
  setup(t) {
1896
- return (s, e) => (u(), h(o(xs), ne(ae(s.$props)), {
1897
- default: f(() => [
1898
- w(s.$slots, "default")
1872
+ return (s, e) => (i(), f(l(As), ue(ce(s.$props)), {
1873
+ default: m(() => [
1874
+ $(s.$slots, "default")
1899
1875
  ]),
1900
1876
  _: 3
1901
1877
  }, 16));
1902
1878
  }
1903
- }), Jr = /* @__PURE__ */ g({
1879
+ }), dn = /* @__PURE__ */ h({
1904
1880
  __name: "HeadlessModalTitle",
1905
1881
  props: {
1906
1882
  asChild: { type: Boolean },
1907
1883
  as: {}
1908
1884
  },
1909
1885
  setup(t) {
1910
- return (s, e) => (u(), h(o(Cs), ne(ae(s.$props)), {
1911
- default: f(() => [
1912
- w(s.$slots, "default")
1886
+ return (s, e) => (i(), f(l(Ps), ue(ce(s.$props)), {
1887
+ default: m(() => [
1888
+ $(s.$slots, "default")
1913
1889
  ]),
1914
1890
  _: 3
1915
1891
  }, 16));
1916
1892
  }
1917
- }), Zr = {
1893
+ }), pn = {
1918
1894
  key: 0,
1919
1895
  class: "absolute top-0 right-0 hidden pt-3.5 pr-2.5 sm:block"
1920
- }, Xr = ["onClick"], Yr = { class: "sr-only" }, se = /* @__PURE__ */ g({
1896
+ }, mn = ["onClick"], fn = { class: "sr-only" }, Me = dr(), re = /* @__PURE__ */ h({
1921
1897
  __name: "Modal",
1922
1898
  props: {
1923
1899
  persistent: { type: Boolean },
@@ -1930,117 +1906,120 @@ const Or = E({ name: "zondicons-close", render: Ur }), Nr = /* @__PURE__ */ g({
1930
1906
  closeHidden: { type: Boolean }
1931
1907
  },
1932
1908
  setup(t, { expose: s }) {
1933
- const e = N(t, ["class", "wrapperClass", "title", "titleHidden", "description", "persistent", "closeHidden"]);
1909
+ const e = K(t, ["class", "wrapperClass", "title", "titleHidden", "description", "persistent", "closeHidden"]);
1934
1910
  s({
1935
- close: async (m) => {
1936
- var C;
1937
- return (C = a.value) == null ? void 0 : C.close(m);
1938
- },
1939
1911
  $content: c(() => {
1940
- var m;
1941
- return (m = a.value) == null ? void 0 : m.$content;
1912
+ var T;
1913
+ return (T = o.value) == null ? void 0 : T.$content;
1942
1914
  })
1943
1915
  });
1944
- const { forwardRef: r, currentRef: n } = Ve(), a = n, i = V("modal"), l = c(() => !i.modal.closing && i.childIndex === z.openModals.length), d = c(() => t.description ? {} : { "aria-describedby": void 0 }), v = c(() => M("max-h-[90vh] overflow-auto px-4 pb-4", { "pt-4": !t.title || t.titleHidden }, t.class)), $ = c(() => M(
1916
+ const { forwardRef: r, currentRef: n } = Ie(), { id: a, visible: u } = Pe(), o = n, p = ot(), g = c(
1917
+ () => {
1918
+ var T;
1919
+ return u.value && ((T = ae.value.toReversed().find((Be) => Be.visible.value)) == null ? void 0 : T.id) === a.value;
1920
+ }
1921
+ ), w = c(() => ae.value.find((T) => T.visible.value)), v = c(() => ae.value.some((T) => Me.has(T))), S = c(() => t.description ? {} : { "aria-describedby": void 0 }), q = c(() => H("max-h-[90vh] overflow-auto px-4 pb-4", { "pt-4": !t.title || t.titleHidden }, t.class)), pe = c(() => H(
1945
1922
  "isolate fixed top-1/2 left-1/2 z-50 w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2",
1946
1923
  "overflow-hidden rounded-lg bg-white text-left shadow-xl sm:max-w-lg",
1947
- "animate-[fade-in_var(--tw-duration)_ease-in-out,grow_var(--tw-duration)_ease-in-out]",
1924
+ Me.has(p.value) || "animate-[fade-in_var(--tw-duration)_ease-in-out,grow_var(--tw-duration)_ease-in-out]",
1948
1925
  "transition-[scale,opacity] will-change-[scale,opacity] duration-300",
1949
1926
  {
1950
- "scale-50 opacity-0": !l.value,
1951
- "scale-100 opacity-100": l.value
1927
+ "scale-50 opacity-0": !g.value,
1928
+ "scale-100 opacity-100": g.value
1952
1929
  },
1953
1930
  t.wrapperClass
1954
1931
  ));
1955
- return ot("modal-will-close", async ({ modal: { id: m } }) => {
1956
- m === i.modal.id && await ue({ ms: 300 });
1957
- }), (m, C) => (u(), h(Nr, H(e, {
1958
- ref: (L) => o(r)(L),
1959
- persistent: m.persistent
1932
+ return tt(() => le(500).then(() => Me.add(p.value))), (T, Be) => (i(), f(ln, V(e, {
1933
+ ref: (me) => l(r)(me),
1934
+ persistent: T.persistent
1960
1935
  }), {
1961
- default: f(({ close: L }) => [
1962
- p(Qr, {
1963
- class: k(["fixed inset-0 animate-[fade-in_var(--tw-duration)_ease-in-out] transition-opacity duration-300 will-change-[opacity]", {
1964
- "bg-black/30": o(i).childIndex === 1,
1965
- "opacity-0": o(i).childIndex === 1 && o(i).modal.closing
1966
- }])
1967
- }, null, 8, ["class"]),
1968
- p(Wr, H(d.value, { class: $.value }), {
1969
- default: f(() => [
1970
- !m.persistent && !m.closeHidden ? (u(), b("div", Zr, [
1971
- y("button", {
1972
- type: "button",
1973
- class: "clickable z-10 rounded-full p-2.5 text-gray-400 hover:text-gray-500",
1974
- onClick: (_e) => L()
1936
+ default: m(({ close: me }) => {
1937
+ var Fe, Ue;
1938
+ return [
1939
+ d(cn, {
1940
+ class: C(["fixed inset-0 transition-opacity duration-300 will-change-[opacity]", {
1941
+ "animate-[fade-in_var(--tw-duration)_ease-in-out]": !v.value,
1942
+ "bg-black/30": ((Fe = w.value) == null ? void 0 : Fe.id) === l(a) || !w.value && ((Ue = l(ae)[0]) == null ? void 0 : Ue.id) === l(a),
1943
+ "opacity-0": !w.value
1944
+ }])
1945
+ }, null, 8, ["class"]),
1946
+ d(on, V(S.value, { class: pe.value }), {
1947
+ default: m(() => [
1948
+ !T.persistent && !T.closeHidden ? (i(), y("div", pn, [
1949
+ b("button", {
1950
+ type: "button",
1951
+ class: "clickable z-10 rounded-full p-2.5 text-gray-400 hover:text-gray-500",
1952
+ onClick: (il) => me()
1953
+ }, [
1954
+ b("span", fn, x(T.$td("ui.close", "Close")), 1),
1955
+ d(l(an), { class: "size-4" })
1956
+ ], 8, mn)
1957
+ ])) : M("", !0),
1958
+ T.title ? (i(), f(dn, {
1959
+ key: 1,
1960
+ class: C(["px-4 pt-5 text-base font-semibold text-gray-900", {
1961
+ "sr-only": T.titleHidden,
1962
+ "pb-0": T.description && !T.descriptionHidden,
1963
+ "pb-2": !T.description || T.descriptionHidden
1964
+ }])
1965
+ }, {
1966
+ default: m(() => [
1967
+ d(z, {
1968
+ text: T.title,
1969
+ inline: ""
1970
+ }, null, 8, ["text"])
1971
+ ]),
1972
+ _: 1
1973
+ }, 8, ["class"])) : M("", !0),
1974
+ T.description ? (i(), f(un, {
1975
+ key: 2,
1976
+ class: C(["px-4 pt-1 pb-2", { "sr-only": T.descriptionHidden }])
1977
+ }, {
1978
+ default: m(() => [
1979
+ d(z, {
1980
+ text: T.description,
1981
+ class: "text-sm leading-6 text-gray-500"
1982
+ }, null, 8, ["text"])
1983
+ ]),
1984
+ _: 1
1985
+ }, 8, ["class"])) : M("", !0),
1986
+ b("div", {
1987
+ class: C(q.value)
1975
1988
  }, [
1976
- y("span", Yr, x(m.$td("ui.close", "Close")), 1),
1977
- p(o(Or), { class: "size-4" })
1978
- ], 8, Xr)
1979
- ])) : T("", !0),
1980
- m.title ? (u(), h(Jr, {
1981
- key: 1,
1982
- class: k(["px-4 pt-5 text-base font-semibold text-gray-900", {
1983
- "sr-only": m.titleHidden,
1984
- "pb-0": m.description && !m.descriptionHidden,
1985
- "pb-2": !m.description || m.descriptionHidden
1986
- }])
1987
- }, {
1988
- default: f(() => [
1989
- p(P, {
1990
- text: m.title,
1991
- inline: ""
1992
- }, null, 8, ["text"])
1993
- ]),
1994
- _: 1
1995
- }, 8, ["class"])) : T("", !0),
1996
- m.description ? (u(), h(Kr, {
1997
- key: 2,
1998
- class: k(["px-4 pt-1 pb-2", { "sr-only": m.descriptionHidden }])
1999
- }, {
2000
- default: f(() => [
2001
- p(P, {
2002
- text: m.description,
2003
- class: "text-sm leading-6 text-gray-500"
2004
- }, null, 8, ["text"])
2005
- ]),
2006
- _: 1
2007
- }, 8, ["class"])) : T("", !0),
2008
- y("div", {
2009
- class: k(v.value)
2010
- }, [
2011
- w(m.$slots, "default", { close: L })
2012
- ], 2)
2013
- ]),
2014
- _: 2
2015
- }, 1040, ["class"])
2016
- ]),
1989
+ $(T.$slots, "default", { close: me })
1990
+ ], 2)
1991
+ ]),
1992
+ _: 2
1993
+ }, 1040, ["class"])
1994
+ ];
1995
+ }),
2017
1996
  _: 3
2018
1997
  }, 16, ["persistent"]));
2019
1998
  }
2020
1999
  });
2021
- function Gr(t) {
2022
- const s = c(() => t.title ?? S("ui.alert", "Alert")), e = c(() => !t.title);
2000
+ function hn(t) {
2001
+ const s = c(() => t.title ?? k("ui.alert", "Alert")), e = c(() => !t.title);
2023
2002
  return { renderedTitle: s, titleHidden: e };
2024
2003
  }
2025
- const en = /* @__PURE__ */ g({
2004
+ const gn = /* @__PURE__ */ h({
2026
2005
  __name: "AlertModal",
2027
2006
  props: {
2028
2007
  title: {},
2029
2008
  message: {}
2030
2009
  },
2031
2010
  setup(t, { expose: s }) {
2032
- const e = t, { renderedTitle: r, titleHidden: n } = Gr(e);
2033
- return s(), (a, i) => (u(), h(se, {
2034
- title: o(r),
2035
- "title-hidden": o(n)
2011
+ const e = t, { renderedTitle: r, titleHidden: n } = hn(e);
2012
+ return s(), (a, u) => (i(), f(re, {
2013
+ title: l(r),
2014
+ "title-hidden": l(n)
2036
2015
  }, {
2037
- default: f(() => [
2038
- p(P, { text: a.message }, null, 8, ["text"])
2016
+ default: m(() => [
2017
+ d(z, { text: a.message }, null, 8, ["text"])
2039
2018
  ]),
2040
2019
  _: 1
2041
2020
  }, 8, ["title", "title-hidden"]));
2042
2021
  }
2043
- }), wt = /* @__PURE__ */ g({
2022
+ }), Vt = /* @__PURE__ */ h({
2044
2023
  __name: "Form",
2045
2024
  props: {
2046
2025
  form: {}
@@ -2049,39 +2028,36 @@ const en = /* @__PURE__ */ g({
2049
2028
  setup(t, { emit: s }) {
2050
2029
  let e;
2051
2030
  const r = s;
2052
- return Y((n) => {
2031
+ return G((n) => {
2053
2032
  var a;
2054
2033
  e == null || e(), e = (a = t.form) == null ? void 0 : a.on("submit", () => r("submit")), n(() => e == null ? void 0 : e());
2055
- }), le("form", t.form), (n, a) => (u(), b("form", {
2056
- onSubmit: a[0] || (a[0] = We((i) => {
2057
- var l;
2058
- return (l = n.form) == null ? void 0 : l.submit();
2059
- }, ["prevent"]))
2034
+ }), de("form", t.form), (n, a) => (i(), y("form", {
2035
+ onSubmit: a[0] || (a[0] = st((u) => n.form ? n.form.submit() : n.$emit("submit"), ["prevent"]))
2060
2036
  }, [
2061
- w(n.$slots, "default")
2037
+ $(n.$slots, "default")
2062
2038
  ], 32));
2063
2039
  }
2064
2040
  });
2065
- function tn(t) {
2066
- const s = ut(
2041
+ function vn(t) {
2042
+ const s = mt(
2067
2043
  Object.entries(t.checkboxes ?? {}).reduce(
2068
- (i, [l, d]) => ({
2069
- [l]: {
2044
+ (u, [o, p]) => ({
2045
+ [o]: {
2070
2046
  type: "boolean",
2071
- default: d.default,
2072
- required: d.required ? "required" : void 0
2047
+ default: p.default,
2048
+ required: p.required ? "required" : void 0
2073
2049
  },
2074
- ...i
2050
+ ...u
2075
2051
  }),
2076
2052
  {}
2077
2053
  )
2078
- ), e = c(() => t.title ?? S("ui.confirm", "Confirm")), r = c(() => !t.title), n = c(() => t.acceptText ?? S("ui.accept", "Ok")), a = c(() => t.cancelText ?? S("ui.cancel", "Cancel"));
2054
+ ), e = c(() => t.title ?? k("ui.confirm", "Confirm")), r = c(() => !t.title), n = c(() => t.acceptText ?? k("ui.accept", "Ok")), a = c(() => t.cancelText ?? k("ui.cancel", "Cancel"));
2079
2055
  return { form: s, renderedTitle: e, titleHidden: r, renderedAcceptText: n, renderedCancelText: a };
2080
2056
  }
2081
- const sn = {
2057
+ const bn = {
2082
2058
  key: 0,
2083
2059
  class: "mt-4 flex flex-col text-sm text-gray-600"
2084
- }, rn = { class: "flex items-center" }, nn = ["onUpdate:modelValue", "required"], an = { class: "ml-1.5" }, ln = { class: "mt-4 flex flex-row-reverse gap-2" }, on = /* @__PURE__ */ g({
2060
+ }, yn = { class: "flex items-center" }, wn = ["onUpdate:modelValue", "required"], $n = { class: "ml-1.5" }, _n = { class: "mt-4 flex flex-row-reverse gap-2" }, xn = /* @__PURE__ */ h({
2085
2061
  __name: "ConfirmModal",
2086
2062
  props: {
2087
2063
  title: {},
@@ -2094,55 +2070,56 @@ const sn = {
2094
2070
  actions: {},
2095
2071
  required: { type: Boolean }
2096
2072
  },
2073
+ emits: ["close"],
2097
2074
  setup(t, { expose: s }) {
2098
- const e = N(t, ["cancelVariant"]), { form: r, renderedTitle: n, titleHidden: a, renderedAcceptText: i, renderedCancelText: l } = tn(e);
2099
- return s(), (d, v) => (u(), h(se, {
2100
- title: o(n),
2101
- "title-hidden": o(a),
2075
+ const e = K(t, ["cancelVariant"]), { form: r, renderedTitle: n, titleHidden: a, renderedAcceptText: u, renderedCancelText: o } = vn(e);
2076
+ return s(), (p, g) => (i(), f(re, {
2077
+ title: l(n),
2078
+ "title-hidden": l(a),
2102
2079
  persistent: ""
2103
2080
  }, {
2104
- default: f(({ close: $ }) => [
2105
- p(wt, {
2106
- form: o(r),
2107
- onSubmit: (m) => $([!0, o(r).data()])
2081
+ default: m(({ close: w }) => [
2082
+ d(Vt, {
2083
+ form: l(r),
2084
+ onSubmit: (v) => w([!0, l(r).data()])
2108
2085
  }, {
2109
- default: f(() => [
2110
- p(P, {
2111
- text: d.message,
2112
- actions: d.actions
2086
+ default: m(() => [
2087
+ d(z, {
2088
+ text: p.message,
2089
+ actions: p.actions
2113
2090
  }, null, 8, ["text", "actions"]),
2114
- d.checkboxes ? (u(), b("ul", sn, [
2115
- (u(!0), b(D, null, F(d.checkboxes, (m, C) => (u(), b("li", { key: C }, [
2116
- y("label", rn, [
2117
- Ke(y("input", {
2118
- "onUpdate:modelValue": (L) => o(r)[C] = L,
2091
+ p.checkboxes ? (i(), y("ul", bn, [
2092
+ (i(!0), y(D, null, U(p.checkboxes, (v, S) => (i(), y("li", { key: S }, [
2093
+ b("label", yn, [
2094
+ rt(b("input", {
2095
+ "onUpdate:modelValue": (q) => l(r)[S] = q,
2119
2096
  type: "checkbox",
2120
- required: m.required,
2097
+ required: v.required,
2121
2098
  class: "border-primary-600 text-primary-600 hover:bg-primary-50 hover:checked:bg-primary-500 focus:ring-primary-600 focus-visible:ring-primary-600 rounded border-2"
2122
- }, null, 8, nn), [
2123
- [It, o(r)[C]]
2099
+ }, null, 8, wn), [
2100
+ [Ot, l(r)[S]]
2124
2101
  ]),
2125
- y("span", an, x(m.label), 1)
2102
+ b("span", $n, x(v.label), 1)
2126
2103
  ])
2127
2104
  ]))), 128))
2128
- ])) : T("", !0),
2129
- y("div", ln, [
2130
- p(q, {
2131
- variant: d.acceptVariant,
2105
+ ])) : M("", !0),
2106
+ b("div", _n, [
2107
+ d(R, {
2108
+ variant: p.acceptVariant,
2132
2109
  submit: ""
2133
2110
  }, {
2134
- default: f(() => [
2135
- I(x(o(i)), 1)
2111
+ default: m(() => [
2112
+ L(x(l(u)), 1)
2136
2113
  ]),
2137
2114
  _: 1
2138
2115
  }, 8, ["variant"]),
2139
- d.required ? T("", !0) : (u(), h(q, {
2116
+ p.required ? M("", !0) : (i(), f(R, {
2140
2117
  key: 0,
2141
- variant: d.cancelVariant,
2142
- onClick: (m) => $(!1)
2118
+ variant: p.cancelVariant,
2119
+ onClick: (v) => w(!1)
2143
2120
  }, {
2144
- default: f(() => [
2145
- I(x(o(l)), 1)
2121
+ default: m(() => [
2122
+ L(x(l(o)), 1)
2146
2123
  ]),
2147
2124
  _: 2
2148
2125
  }, 1032, ["variant", "onClick"]))
@@ -2154,85 +2131,85 @@ const sn = {
2154
2131
  _: 1
2155
2132
  }, 8, ["title", "title-hidden"]));
2156
2133
  }
2157
- }), un = {
2134
+ }), Cn = {
2158
2135
  viewBox: "0 0 20 20",
2159
2136
  width: "1.2em",
2160
2137
  height: "1.2em"
2161
2138
  };
2162
- function cn(t, s) {
2163
- return u(), b("svg", un, s[0] || (s[0] = [
2164
- y("path", {
2139
+ function kn(t, s) {
2140
+ return i(), y("svg", Cn, s[0] || (s[0] = [
2141
+ b("path", {
2165
2142
  fill: "currentColor",
2166
2143
  d: "M7.05 9.293L6.343 10L12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"
2167
2144
  }, null, -1)
2168
2145
  ]));
2169
2146
  }
2170
- const dn = E({ name: "zondicons-cheveron-left", render: cn }), pn = {
2147
+ const Sn = E({ name: "zondicons-cheveron-left", render: kn }), Tn = {
2171
2148
  viewBox: "0 0 20 20",
2172
2149
  width: "1.2em",
2173
2150
  height: "1.2em"
2174
2151
  };
2175
- function mn(t, s) {
2176
- return u(), b("svg", pn, s[0] || (s[0] = [
2177
- y("path", {
2152
+ function Mn(t, s) {
2153
+ return i(), y("svg", Tn, s[0] || (s[0] = [
2154
+ b("path", {
2178
2155
  fill: "currentColor",
2179
2156
  d: "m12.95 10.707l.707-.707L8 4.343L6.586 5.757L10.828 10l-4.242 4.243L8 15.657z"
2180
2157
  }, null, -1)
2181
2158
  ]));
2182
2159
  }
2183
- const $t = E({ name: "zondicons-cheveron-right", render: mn }), fn = {
2160
+ const Et = E({ name: "zondicons-cheveron-right", render: Mn }), Hn = {
2184
2161
  viewBox: "0 0 20 20",
2185
2162
  width: "1.2em",
2186
2163
  height: "1.2em"
2187
2164
  };
2188
- function hn(t, s) {
2189
- return u(), b("svg", fn, s[0] || (s[0] = [
2190
- y("path", {
2165
+ function Vn(t, s) {
2166
+ return i(), y("svg", Hn, s[0] || (s[0] = [
2167
+ b("path", {
2191
2168
  fill: "currentColor",
2192
2169
  d: "M2.93 17.07A10 10 0 1 1 17.07 2.93A10 10 0 0 1 2.93 17.07M9 5v6h2V5zm0 8v2h2v-2z"
2193
2170
  }, null, -1)
2194
2171
  ]));
2195
2172
  }
2196
- const qe = E({ name: "zondicons-exclamation-solid", render: hn }), gn = {
2173
+ const De = E({ name: "zondicons-exclamation-solid", render: Vn }), En = {
2197
2174
  viewBox: "0 0 24 24",
2198
2175
  width: "1.2em",
2199
2176
  height: "1.2em"
2200
2177
  };
2201
- function vn(t, s) {
2202
- return u(), b("svg", gn, s[0] || (s[0] = [
2203
- y("path", {
2178
+ function Ln(t, s) {
2179
+ return i(), y("svg", En, s[0] || (s[0] = [
2180
+ b("path", {
2204
2181
  fill: "currentColor",
2205
2182
  d: "M20 19V7H4v12zm0-16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm-7 14v-2h5v2zm-3.42-4L5.57 9H8.4l3.3 3.3c.39.39.39 1.03 0 1.42L8.42 17H5.59z"
2206
2183
  }, null, -1)
2207
2184
  ]));
2208
2185
  }
2209
- const bn = E({ name: "mdi-console", render: vn }), yn = {
2186
+ const Rn = E({ name: "mdi-console", render: Ln }), zn = {
2210
2187
  viewBox: "0 0 20 20",
2211
2188
  width: "1.2em",
2212
2189
  height: "1.2em"
2213
2190
  };
2214
- function wn(t, s) {
2215
- return u(), b("svg", yn, s[0] || (s[0] = [
2216
- y("path", {
2191
+ function In(t, s) {
2192
+ return i(), y("svg", zn, s[0] || (s[0] = [
2193
+ b("path", {
2217
2194
  fill: "currentColor",
2218
2195
  d: "M6 6V2c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4v4a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8c0-1.1.9-2 2-2zm2 0h4a2 2 0 0 1 2 2v4h4V2H8zM2 8v10h10V8z"
2219
2196
  }, null, -1)
2220
2197
  ]));
2221
2198
  }
2222
- const $n = E({ name: "zondicons-copy", render: wn }), _n = {
2199
+ const qn = E({ name: "zondicons-copy", render: In }), An = {
2223
2200
  viewBox: "0 0 24 24",
2224
2201
  width: "1.2em",
2225
2202
  height: "1.2em"
2226
2203
  };
2227
- function xn(t, s) {
2228
- return u(), b("svg", _n, s[0] || (s[0] = [
2229
- y("path", {
2204
+ function Pn(t, s) {
2205
+ return i(), y("svg", An, s[0] || (s[0] = [
2206
+ b("path", {
2230
2207
  fill: "currentColor",
2231
2208
  d: "M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
2232
2209
  }, null, -1)
2233
2210
  ]));
2234
2211
  }
2235
- const Cn = E({ name: "mdi-github", render: xn }), kn = { class: "flex" }, Sn = { class: "sr-only" }, Tn = /* @__PURE__ */ g({
2212
+ const Dn = E({ name: "mdi-github", render: Pn }), jn = { class: "flex" }, Bn = { class: "sr-only" }, Fn = /* @__PURE__ */ h({
2236
2213
  __name: "ErrorReportModalButtons",
2237
2214
  props: {
2238
2215
  report: {}
@@ -2241,13 +2218,13 @@ const Cn = E({ name: "mdi-github", render: xn }), kn = { class: "flex" }, Sn = {
2241
2218
  const s = t, e = c(() => s.report.description ? `${s.report.title}: ${s.report.description}` : s.report.title), r = c(() => {
2242
2219
  if (!A.sourceUrl)
2243
2220
  return !1;
2244
- const a = encodeURIComponent(e.value), i = encodeURIComponent(
2221
+ const a = encodeURIComponent(e.value), u = encodeURIComponent(
2245
2222
  [
2246
2223
  "[Please, explain here what you were trying to do when this error appeared]",
2247
2224
  "",
2248
2225
  "Error details:",
2249
2226
  "```",
2250
- Qt(
2227
+ ns(
2251
2228
  s.report.details ?? "Details missing from report",
2252
2229
  1800 - a.length - A.sourceUrl.length
2253
2230
  ).trim(),
@@ -2255,27 +2232,27 @@ const Cn = E({ name: "mdi-github", render: xn }), kn = { class: "flex" }, Sn = {
2255
2232
  ].join(`
2256
2233
  `)
2257
2234
  );
2258
- return `${A.sourceUrl}/issues/new?title=${a}&body=${i}`;
2259
- }), n = c(() => ee(
2235
+ return `${A.sourceUrl}/issues/new?title=${a}&body=${u}`;
2236
+ }), n = c(() => te(
2260
2237
  [
2261
2238
  {
2262
2239
  id: "clipboard",
2263
2240
  description: "Copy to clipboard",
2264
- iconComponent: $n,
2241
+ iconComponent: qn,
2265
2242
  async click() {
2266
2243
  await navigator.clipboard.writeText(`${e.value}
2267
2244
 
2268
- ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information copied to clipboard"));
2245
+ ${s.report.details}`), P.toast(k("errors.copiedToClipboard", "Debug information copied to clipboard"));
2269
2246
  }
2270
2247
  },
2271
2248
  {
2272
2249
  id: "console",
2273
2250
  description: "Log to console",
2274
- iconComponent: bn,
2251
+ iconComponent: Rn,
2275
2252
  click() {
2276
2253
  const a = s.report.error ?? s.report;
2277
- window.error = a, console.error(a), z.toast(
2278
- S(
2254
+ window.error = a, console.error(a), P.toast(
2255
+ k(
2279
2256
  "errors.addedToConsole",
2280
2257
  "You can now use the **error** variable in the console"
2281
2258
  )
@@ -2287,24 +2264,24 @@ ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information
2287
2264
  r.value && a.push({
2288
2265
  id: "github",
2289
2266
  description: "Report in GitHub",
2290
- iconComponent: Cn,
2267
+ iconComponent: Dn,
2291
2268
  url: r.value
2292
2269
  });
2293
2270
  }
2294
2271
  ));
2295
- return (a, i) => (u(), b("div", kn, [
2296
- (u(!0), b(D, null, F(n.value, (l) => w(a.$slots, "default", H({ ref_for: !0 }, l), () => [
2297
- p(q, {
2272
+ return (a, u) => (i(), y("div", jn, [
2273
+ (i(!0), y(D, null, U(n.value, (o) => $(a.$slots, "default", V({ ref_for: !0 }, o), () => [
2274
+ d(R, {
2298
2275
  size: "icon",
2299
2276
  variant: "ghost",
2300
2277
  class: "group whitespace-nowrap",
2301
- href: l.url,
2302
- title: a.$td(`errors.report_${l.id}`, l.description),
2303
- onClick: l.click
2278
+ href: o.url,
2279
+ title: a.$td(`errors.report_${o.id}`, o.description),
2280
+ onClick: o.click
2304
2281
  }, {
2305
- default: f(() => [
2306
- y("span", Sn, x(a.$td(`errors.report_${l.id}`, l.description)), 1),
2307
- (u(), h(W(l.iconComponent), {
2282
+ default: m(() => [
2283
+ b("span", Bn, x(a.$td(`errors.report_${o.id}`, o.description)), 1),
2284
+ (i(), f(Y(o.iconComponent), {
2308
2285
  class: "size-4",
2309
2286
  "aria-hidden": "true"
2310
2287
  }))
@@ -2314,7 +2291,7 @@ ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information
2314
2291
  ])), 256))
2315
2292
  ]));
2316
2293
  }
2317
- }), Mn = /* @__PURE__ */ g({
2294
+ }), Un = /* @__PURE__ */ h({
2318
2295
  __name: "ErrorReportModalTitle",
2319
2296
  props: {
2320
2297
  report: {},
@@ -2323,19 +2300,19 @@ ${s.report.details}`), z.toast(S("errors.copiedToClipboard", "Debug information
2323
2300
  },
2324
2301
  setup(t) {
2325
2302
  const s = c(() => !t.totalReports || t.totalReports <= 1 ? t.report.title : `${t.report.title} (${t.currentReport}/${t.totalReports})`);
2326
- return (e, r) => (u(), h(P, {
2303
+ return (e, r) => (i(), f(z, {
2327
2304
  text: s.value,
2328
2305
  inline: ""
2329
2306
  }, null, 8, ["text"]));
2330
2307
  }
2331
2308
  });
2332
- function Hn(t) {
2333
- const s = U(t.reports.includes(t.report) ? t.reports.indexOf(t.report) : 0), e = c(() => t.reports[s.value]), r = c(
2309
+ function On(t) {
2310
+ const s = N(t.reports.includes(t.report) ? t.reports.indexOf(t.report) : 0), e = c(() => t.reports[s.value]), r = c(
2334
2311
  () => {
2335
- var i;
2336
- return ((i = e.value.details) == null ? void 0 : i.trim()) || S("errors.detailsEmpty", "This error is missing a stacktrace.");
2312
+ var u;
2313
+ return ((u = e.value.details) == null ? void 0 : u.trim()) || k("errors.detailsEmpty", "This error is missing a stacktrace.");
2337
2314
  }
2338
- ), n = S("errors.previousReport", "Show previous report"), a = S("errors.nextReport", "Show next report");
2315
+ ), n = k("errors.previousReport", "Show previous report"), a = k("errors.nextReport", "Show next report");
2339
2316
  return {
2340
2317
  activeReportIndex: s,
2341
2318
  details: r,
@@ -2344,102 +2321,102 @@ function Hn(t) {
2344
2321
  activeReport: e
2345
2322
  };
2346
2323
  }
2347
- const En = { class: "px-4 pt-5 pb-4" }, Vn = { class: "flex justify-between gap-4" }, Ln = { class: "flex items-center gap-2" }, In = {
2324
+ const Nn = { class: "px-4 pt-5 pb-4" }, Wn = { class: "flex justify-between gap-4" }, Kn = { class: "flex items-center gap-2" }, Qn = {
2348
2325
  key: 0,
2349
2326
  class: "flex gap-0.5"
2350
- }, qn = { class: "-mt-2 max-h-[75vh] overflow-auto bg-red-800/10" }, zn = ["textContent"], Rn = /* @__PURE__ */ g({
2327
+ }, Jn = { class: "-mt-2 max-h-[75vh] overflow-auto bg-red-800/10" }, Zn = ["textContent"], Xn = /* @__PURE__ */ h({
2351
2328
  __name: "ErrorReportModal",
2352
2329
  props: {
2353
2330
  report: {},
2354
2331
  reports: {}
2355
2332
  },
2356
2333
  setup(t, { expose: s }) {
2357
- const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: i, activeReport: l } = Hn(e);
2358
- return s(), (d, v) => (u(), h(se, {
2359
- title: d.$td("errors.report", "Error report"),
2334
+ const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: u, activeReport: o } = On(e);
2335
+ return s(), (p, g) => (i(), f(re, {
2336
+ title: p.$td("errors.report", "Error report"),
2360
2337
  "title-hidden": "",
2361
2338
  "close-hidden": "",
2362
2339
  class: "p-0",
2363
2340
  "wrapper-class": "sm:w-auto sm:min-w-lg sm:max-w-[80vw]"
2364
2341
  }, {
2365
- default: f(() => [
2366
- y("div", En, [
2367
- y("h2", Vn, [
2368
- y("div", Ln, [
2369
- p(o(qe), { class: "size-5 text-red-600" }),
2370
- p(Mn, {
2342
+ default: m(() => [
2343
+ b("div", Nn, [
2344
+ b("h2", Wn, [
2345
+ b("div", Kn, [
2346
+ d(l(De), { class: "size-5 text-red-600" }),
2347
+ d(Un, {
2371
2348
  class: "text-lg leading-6 font-semibold text-gray-900",
2372
- report: o(l),
2373
- "current-report": o(r) + 1,
2374
- "total-reports": d.reports.length
2349
+ report: l(o),
2350
+ "current-report": l(r) + 1,
2351
+ "total-reports": p.reports.length
2375
2352
  }, null, 8, ["report", "current-report", "total-reports"]),
2376
- d.reports.length > 1 ? (u(), b("span", In, [
2377
- p(q, {
2353
+ p.reports.length > 1 ? (i(), y("span", Qn, [
2354
+ d(R, {
2378
2355
  size: "icon",
2379
2356
  variant: "ghost",
2380
- disabled: o(r) === 0,
2381
- "aria-label": o(i),
2382
- title: o(i),
2383
- onClick: v[0] || (v[0] = ($) => r.value--)
2357
+ disabled: l(r) === 0,
2358
+ "aria-label": l(u),
2359
+ title: l(u),
2360
+ onClick: g[0] || (g[0] = (w) => r.value--)
2384
2361
  }, {
2385
- default: f(() => [
2386
- p(o(dn), { class: "size-4" })
2362
+ default: m(() => [
2363
+ d(l(Sn), { class: "size-4" })
2387
2364
  ]),
2388
2365
  _: 1
2389
2366
  }, 8, ["disabled", "aria-label", "title"]),
2390
- p(q, {
2367
+ d(R, {
2391
2368
  size: "icon",
2392
2369
  variant: "ghost",
2393
- disabled: o(r) === d.reports.length - 1,
2394
- "aria-label": o(a),
2395
- title: o(a),
2396
- onClick: v[1] || (v[1] = ($) => r.value++)
2370
+ disabled: l(r) === p.reports.length - 1,
2371
+ "aria-label": l(a),
2372
+ title: l(a),
2373
+ onClick: g[1] || (g[1] = (w) => r.value++)
2397
2374
  }, {
2398
- default: f(() => [
2399
- p(o($t), { class: "size-4" })
2375
+ default: m(() => [
2376
+ d(l(Et), { class: "size-4" })
2400
2377
  ]),
2401
2378
  _: 1
2402
2379
  }, 8, ["disabled", "aria-label", "title"])
2403
- ])) : T("", !0)
2380
+ ])) : M("", !0)
2404
2381
  ]),
2405
- p(Tn, {
2406
- report: o(l),
2382
+ d(Fn, {
2383
+ report: l(o),
2407
2384
  class: "gap-0.5"
2408
2385
  }, null, 8, ["report"])
2409
2386
  ]),
2410
- o(l).description ? (u(), h(P, {
2387
+ l(o).description ? (i(), f(z, {
2411
2388
  key: 0,
2412
- text: o(l).description,
2389
+ text: l(o).description,
2413
2390
  class: "text-gray-600"
2414
- }, null, 8, ["text"])) : T("", !0)
2391
+ }, null, 8, ["text"])) : M("", !0)
2415
2392
  ]),
2416
- y("div", qn, [
2417
- y("pre", {
2393
+ b("div", Jn, [
2394
+ b("pre", {
2418
2395
  class: "p-4 text-xs text-red-800",
2419
- textContent: x(o(n))
2420
- }, null, 8, zn)
2396
+ textContent: x(l(n))
2397
+ }, null, 8, Zn)
2421
2398
  ])
2422
2399
  ]),
2423
2400
  _: 1
2424
2401
  }, 8, ["title"]));
2425
2402
  }
2426
- }), Pn = {
2403
+ }), Gn = {
2427
2404
  viewBox: "0 0 24 24",
2428
2405
  width: "1.2em",
2429
2406
  height: "1.2em"
2430
2407
  };
2431
- function An(t, s) {
2432
- return u(), b("svg", Pn, s[0] || (s[0] = [
2433
- y("path", {
2408
+ function Yn(t, s) {
2409
+ return i(), y("svg", Gn, s[0] || (s[0] = [
2410
+ b("path", {
2434
2411
  fill: "currentColor",
2435
2412
  d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
2436
2413
  opacity: ".25"
2437
2414
  }, null, -1),
2438
- y("path", {
2415
+ b("path", {
2439
2416
  fill: "currentColor",
2440
2417
  d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
2441
2418
  }, [
2442
- y("animateTransform", {
2419
+ b("animateTransform", {
2443
2420
  attributeName: "transform",
2444
2421
  dur: "0.75s",
2445
2422
  repeatCount: "indefinite",
@@ -2449,7 +2426,7 @@ function An(t, s) {
2449
2426
  ], -1)
2450
2427
  ]));
2451
2428
  }
2452
- const Dn = E({ name: "svg-spinners-90-ring-with-bg", render: An }), jn = { class: "mt-1 h-2 w-full overflow-hidden rounded-full bg-gray-200" }, Bn = { class: "sr-only" }, Fn = /* @__PURE__ */ g({
2429
+ const ea = E({ name: "svg-spinners-90-ring-with-bg", render: Yn }), ta = { class: "mt-1 h-2 w-full overflow-hidden rounded-full bg-gray-200" }, sa = { class: "sr-only" }, ra = /* @__PURE__ */ h({
2453
2430
  __name: "ProgressBar",
2454
2431
  props: {
2455
2432
  filledClass: {},
@@ -2458,31 +2435,31 @@ const Dn = E({ name: "svg-spinners-90-ring-with-bg", render: An }), jn = { class
2458
2435
  },
2459
2436
  setup(t) {
2460
2437
  let s;
2461
- const e = U(0), r = c(() => M("size-full transition-transform duration-500 rounded-r-full ease-linear bg-primary-600", t.filledClass)), n = c(() => typeof t.progress == "number" ? t.progress : e.value);
2462
- return Me(
2438
+ const e = N(0), r = c(() => H("size-full transition-transform duration-500 rounded-r-full ease-linear bg-primary-600", t.filledClass)), n = c(() => typeof t.progress == "number" ? t.progress : e.value);
2439
+ return Le(
2463
2440
  () => t.job,
2464
2441
  () => {
2465
2442
  s && s(), e.value = t.job ? t.job.progress : 0, s = t.job && t.job.listeners.add({ onUpdated: (a) => e.value = a });
2466
2443
  },
2467
2444
  { immediate: !0 }
2468
- ), ge(() => s && s()), (a, i) => (u(), b("div", jn, [
2469
- y("div", {
2470
- class: k(r.value),
2471
- style: qt(`transform:translateX(-${(1 - n.value) * 100}%)`)
2445
+ ), we(() => s && s()), (a, u) => (i(), y("div", ta, [
2446
+ b("div", {
2447
+ class: C(r.value),
2448
+ style: Nt(`transform:translateX(-${(1 - n.value) * 100}%)`)
2472
2449
  }, null, 6),
2473
- y("span", Bn, x(a.$td("ui.progress", "{progress}% complete", {
2450
+ b("span", sa, x(a.$td("ui.progress", "{progress}% complete", {
2474
2451
  progress: n.value * 100
2475
2452
  })), 1)
2476
2453
  ]));
2477
2454
  }
2478
2455
  });
2479
- function Un(t) {
2480
- const s = c(() => t.title ?? S("ui.loading", "Loading")), e = c(
2481
- () => t.message ?? S("ui.loadingInProgress", "Loading in progress...")
2456
+ function na(t) {
2457
+ const s = c(() => t.title ?? k("ui.loading", "Loading")), e = c(
2458
+ () => t.message ?? k("ui.loadingInProgress", "Loading in progress...")
2482
2459
  ), r = c(() => typeof t.progress == "number" || !!t.job), n = c(() => !t.title);
2483
2460
  return { renderedTitle: s, renderedMessage: e, titleHidden: n, showProgress: r };
2484
2461
  }
2485
- const On = /* @__PURE__ */ g({
2462
+ const aa = /* @__PURE__ */ h({
2486
2463
  __name: "LoadingModal",
2487
2464
  props: {
2488
2465
  title: {},
@@ -2491,30 +2468,30 @@ const On = /* @__PURE__ */ g({
2491
2468
  job: {}
2492
2469
  },
2493
2470
  setup(t, { expose: s }) {
2494
- const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: i } = Un(e);
2495
- return s(), (l, d) => (u(), h(se, {
2471
+ const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: u } = na(e);
2472
+ return s(), (o, p) => (i(), f(re, {
2496
2473
  persistent: "",
2497
- class: k(["flex", { "flex-col-reverse": o(i), "items-center justify-center gap-2": !o(i) }]),
2474
+ class: C(["flex", { "flex-col-reverse": l(u), "items-center justify-center gap-2": !l(u) }]),
2498
2475
  "wrapper-class": "w-auto",
2499
- title: o(r),
2500
- "title-hidden": o(a)
2476
+ title: l(r),
2477
+ "title-hidden": l(a)
2501
2478
  }, {
2502
- default: f(() => [
2503
- o(i) ? (u(), h(Fn, {
2479
+ default: m(() => [
2480
+ l(u) ? (i(), f(ra, {
2504
2481
  key: 0,
2505
- progress: l.progress,
2506
- job: l.job,
2482
+ progress: o.progress,
2483
+ job: o.job,
2507
2484
  class: "min-w-[min(400px,80vw)]"
2508
- }, null, 8, ["progress", "job"])) : (u(), h(o(Dn), {
2485
+ }, null, 8, ["progress", "job"])) : (i(), f(l(ea), {
2509
2486
  key: 1,
2510
2487
  class: "text-primary-600 mr-1 size-6"
2511
2488
  })),
2512
- p(P, { text: o(n) }, null, 8, ["text"])
2489
+ d(z, { text: l(n) }, null, 8, ["text"])
2513
2490
  ]),
2514
2491
  _: 1
2515
2492
  }, 8, ["title", "title-hidden", "class"]));
2516
2493
  }
2517
- }), ze = /* @__PURE__ */ g({
2494
+ }), je = /* @__PURE__ */ h({
2518
2495
  __name: "HeadlessInput",
2519
2496
  props: {
2520
2497
  name: {},
@@ -2525,128 +2502,130 @@ const On = /* @__PURE__ */ g({
2525
2502
  },
2526
2503
  emits: ["update:modelValue"],
2527
2504
  setup(t, { expose: s, emit: e }) {
2528
- const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), i = {
2529
- id: `input-${re()}`,
2505
+ const r = e, n = X("form", null), a = c(() => !n || !t.name ? null : n.errors[t.name] ?? null), u = {
2506
+ id: `input-${oe()}`,
2530
2507
  name: c(() => t.name),
2531
2508
  label: c(() => t.label),
2532
2509
  description: c(() => t.description),
2533
2510
  value: c(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
2534
- errors: ve(a),
2511
+ errors: $e(a),
2535
2512
  required: c(() => {
2536
2513
  if (!(!t.name || !n))
2537
2514
  return n.getFieldRules(t.name).includes("required");
2538
2515
  }),
2539
- update(l) {
2516
+ update(o) {
2540
2517
  if (n && t.name) {
2541
- n.setFieldValue(t.name, l);
2518
+ n.setFieldValue(t.name, o);
2542
2519
  return;
2543
2520
  }
2544
- r("update:modelValue", l);
2521
+ r("update:modelValue", o);
2545
2522
  }
2546
2523
  };
2547
- return le("input", i), s(i), (l, d) => (u(), h(W(l.as), null, {
2548
- default: f(() => [
2549
- w(l.$slots, "default")
2524
+ return de("input", u), s(u), (o, p) => (i(), f(Y(o.as), null, {
2525
+ default: m(() => [
2526
+ $(o.$slots, "default")
2550
2527
  ]),
2551
2528
  _: 3
2552
2529
  }));
2553
2530
  }
2554
- }), Nn = ["for"], fe = /* @__PURE__ */ g({
2531
+ }), la = ["for"], be = /* @__PURE__ */ h({
2555
2532
  __name: "HeadlessInputLabel",
2556
2533
  setup(t) {
2557
- const s = V("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = He(), r = c(() => !!(s.label || e.default));
2558
- return (n, a) => r.value ? (u(), b("label", {
2534
+ const s = I("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = Re(), r = c(() => !!(s.label || e.default));
2535
+ return (n, a) => r.value ? (i(), y("label", {
2559
2536
  key: 0,
2560
- for: o(s).id
2537
+ for: l(s).id
2561
2538
  }, [
2562
- w(n.$slots, "default", {}, () => [
2563
- I(x(o(s).label), 1)
2539
+ $(n.$slots, "default", {}, () => [
2540
+ L(x(l(s).label), 1)
2564
2541
  ])
2565
- ], 8, Nn)) : T("", !0);
2542
+ ], 8, la)) : M("", !0);
2566
2543
  }
2567
- }), Wn = ["id", "name", "checked", "type", "required", "aria-invalid", "aria-describedby"], _t = /* @__PURE__ */ g({
2544
+ }), ia = ["id", "name", "checked", "type", "required", "aria-invalid", "aria-describedby"], Lt = /* @__PURE__ */ h({
2568
2545
  __name: "HeadlessInputInput",
2569
2546
  props: {
2570
2547
  type: {}
2571
2548
  },
2572
2549
  setup(t) {
2573
- const s = G("$inputRef"), e = V("input", "<HeadlessInputInput> must be a child of a <HeadlessInput>"), r = X("form", null), n = c(() => e.name ?? void 0), a = c(() => e.value), i = c(() => {
2550
+ const s = ee("$inputRef"), e = I("input", "<HeadlessInputInput> must be a child of a <HeadlessInput>"), r = X("form", null), n = c(() => e.name ?? void 0), a = c(() => e.value), u = c(() => {
2574
2551
  if (t.type)
2575
2552
  return t.type;
2576
- const $ = (n.value && (r == null ? void 0 : r.getFieldType(n.value))) ?? "";
2577
- return ["text", "email", "number", "tel", "url"].includes($) ? $ : "text";
2578
- }), l = c(() => {
2579
- if (t.type === "checkbox")
2553
+ const w = (n.value && (r == null ? void 0 : r.getFieldType(n.value))) ?? "";
2554
+ return ["text", "email", "number", "tel", "url"].includes(w) ? w : "text";
2555
+ }), o = c(() => {
2556
+ if (u.value === "checkbox")
2580
2557
  return !!a.value;
2581
2558
  });
2582
- function d() {
2583
- s.value && e.update(v());
2559
+ function p() {
2560
+ s.value && e.update(g());
2584
2561
  }
2585
- function v() {
2562
+ function g() {
2586
2563
  if (!s.value)
2587
2564
  return null;
2588
- switch (t.type) {
2565
+ switch (u.value) {
2589
2566
  case "checkbox":
2590
2567
  return s.value.checked;
2591
2568
  case "date":
2592
2569
  return s.value.valueAsDate;
2570
+ case "number":
2571
+ return s.value.valueAsNumber;
2593
2572
  default:
2594
2573
  return s.value.value;
2595
2574
  }
2596
2575
  }
2597
- return it(e, () => {
2598
- var $;
2599
- return ($ = s.value) == null ? void 0 : $.focus();
2600
- }), Y(() => {
2576
+ return pt(e, () => {
2577
+ var w;
2578
+ return (w = s.value) == null ? void 0 : w.focus();
2579
+ }), G(() => {
2601
2580
  if (s.value) {
2602
- if (t.type === "date" && a.value instanceof Date) {
2581
+ if (u.value === "date" && a.value instanceof Date) {
2603
2582
  s.value.valueAsDate = a.value;
2604
2583
  return;
2605
2584
  }
2606
2585
  s.value.value = a.value ?? null;
2607
2586
  }
2608
- }), ($, m) => (u(), b("input", {
2609
- id: o(e).id,
2587
+ }), (w, v) => (i(), y("input", {
2588
+ id: l(e).id,
2610
2589
  ref: "$inputRef",
2611
2590
  name: n.value,
2612
- checked: l.value,
2613
- type: i.value,
2614
- required: o(e).required ?? void 0,
2615
- "aria-invalid": o(e).errors ? "true" : "false",
2616
- "aria-describedby": o(e).errors ? `${o(e).id}-error` : o(e).description ? `${o(e).id}-description` : void 0,
2617
- onInput: d
2618
- }, null, 40, Wn));
2619
- }
2620
- }), xt = /* @__PURE__ */ g({
2591
+ checked: o.value,
2592
+ type: u.value,
2593
+ required: l(e).required ?? void 0,
2594
+ "aria-invalid": l(e).errors ? "true" : "false",
2595
+ "aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
2596
+ onInput: p
2597
+ }, null, 40, ia));
2598
+ }
2599
+ }), Rt = /* @__PURE__ */ h({
2621
2600
  inheritAttrs: !1,
2622
2601
  __name: "HeadlessInputDescription",
2623
2602
  setup(t) {
2624
- const s = V(
2603
+ const s = I(
2625
2604
  "input",
2626
2605
  "<HeadlessInputDescription> must be a child of a <HeadlessInput>"
2627
2606
  ), e = c(() => typeof s.description == "string" ? s.description : ""), r = c(() => !!s.description);
2628
- return (n, a) => w(n.$slots, "default", {
2629
- id: `${o(s).id}-description`
2607
+ return (n, a) => $(n.$slots, "default", {
2608
+ id: `${l(s).id}-description`
2630
2609
  }, () => [
2631
- r.value ? (u(), h(P, H({ key: 0 }, n.$attrs, {
2632
- id: `${o(s).id}-description`,
2610
+ r.value ? (i(), f(z, V({ key: 0 }, n.$attrs, {
2611
+ id: `${l(s).id}-description`,
2633
2612
  text: e.value
2634
- }), null, 16, ["id", "text"])) : T("", !0)
2613
+ }), null, 16, ["id", "text"])) : M("", !0)
2635
2614
  ]);
2636
2615
  }
2637
- }), Kn = ["id"], he = /* @__PURE__ */ g({
2616
+ }), oa = ["id"], ye = /* @__PURE__ */ h({
2638
2617
  __name: "HeadlessInputError",
2639
2618
  setup(t) {
2640
- const s = V("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = c(() => s.errors ? S(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
2641
- return (r, n) => e.value ? (u(), b("p", {
2619
+ const s = I("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = c(() => s.errors ? k(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
2620
+ return (r, n) => e.value ? (i(), y("p", {
2642
2621
  key: 0,
2643
- id: `${o(s).id}-error`
2644
- }, x(e.value), 9, Kn)) : T("", !0);
2622
+ id: `${l(s).id}-error`
2623
+ }, x(e.value), 9, oa)) : M("", !0);
2645
2624
  }
2646
- }), Qn = {
2625
+ }), ua = {
2647
2626
  key: 0,
2648
2627
  class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
2649
- }, Jn = /* @__PURE__ */ g({
2628
+ }, ca = /* @__PURE__ */ h({
2650
2629
  inheritAttrs: !1,
2651
2630
  __name: "Input",
2652
2631
  props: {
@@ -2659,61 +2638,61 @@ const On = /* @__PURE__ */ g({
2659
2638
  },
2660
2639
  emits: ["update:modelValue"],
2661
2640
  setup(t) {
2662
- const s = N(t, ["label", "inputClass", "wrapperClass"]), e = G("$inputRef"), [r, n] = Ie(), a = c(() => M("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), i = c(() => {
2663
- var l, d, v;
2664
- return M(
2641
+ const s = K(t, ["label", "inputClass", "wrapperClass"]), e = ee("$inputRef"), [r, n] = Ae(), a = c(() => H("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), u = c(() => {
2642
+ var o, p, g;
2643
+ return H(
2665
2644
  // eslint-disable-next-line vue/max-len
2666
2645
  "block w-full rounded-md border-0 py-1.5 ring-1 ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6",
2667
2646
  {
2668
- "focus:ring-primary-600": !((l = e.value) != null && l.errors),
2669
- "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((d = e.value) != null && d.errors),
2670
- "pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (v = e.value) == null ? void 0 : v.errors
2647
+ "focus:ring-primary-600": !((o = e.value) != null && o.errors),
2648
+ "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((p = e.value) != null && p.errors),
2649
+ "pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (g = e.value) == null ? void 0 : g.errors
2671
2650
  },
2672
2651
  t.inputClass
2673
2652
  );
2674
2653
  });
2675
- return (l, d) => (u(), h(ze, H({
2654
+ return (o, p) => (i(), f(je, V({
2676
2655
  ref: "$inputRef",
2677
- label: l.label,
2678
- class: o(n)
2656
+ label: o.label,
2657
+ class: l(n)
2679
2658
  }, s, {
2680
- "onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
2659
+ "onUpdate:modelValue": p[0] || (p[0] = (g) => o.$emit("update:modelValue", g))
2681
2660
  }), {
2682
- default: f(() => {
2683
- var v;
2661
+ default: m(() => {
2662
+ var g;
2684
2663
  return [
2685
- p(fe, { class: "block text-sm leading-6 font-medium text-gray-900" }),
2686
- y("div", {
2687
- class: k(a.value)
2664
+ d(be, { class: "block text-sm leading-6 font-medium text-gray-900" }),
2665
+ b("div", {
2666
+ class: C(a.value)
2688
2667
  }, [
2689
- p(_t, H(o(r), { class: i.value }), null, 16, ["class"]),
2690
- (v = e.value) != null && v.errors ? (u(), b("div", Qn, [
2691
- p(o(qe), { class: "size-5 text-red-500" })
2692
- ])) : T("", !0)
2668
+ d(Lt, V(l(r), { class: u.value }), null, 16, ["class"]),
2669
+ (g = e.value) != null && g.errors ? (i(), y("div", ua, [
2670
+ d(l(De), { class: "size-5 text-red-500" })
2671
+ ])) : M("", !0)
2693
2672
  ], 2),
2694
- p(xt, { class: "mt-2 text-sm text-gray-600" }),
2695
- p(he, { class: "mt-2 text-sm text-red-600" })
2673
+ d(Rt, { class: "mt-2 text-sm text-gray-600" }),
2674
+ d(ye, { class: "mt-2 text-sm text-red-600" })
2696
2675
  ];
2697
2676
  }),
2698
2677
  _: 1
2699
2678
  }, 16, ["label", "class"]));
2700
2679
  }
2701
2680
  });
2702
- function wl(t, s = {}) {
2681
+ function ql(t, s = {}) {
2703
2682
  return {
2704
2683
  default: t,
2705
2684
  type: "boolean",
2706
2685
  rules: s.rules
2707
2686
  };
2708
2687
  }
2709
- function $l(t, s = {}) {
2688
+ function Al(t, s = {}) {
2710
2689
  return {
2711
2690
  default: t,
2712
2691
  type: "date",
2713
2692
  rules: s.rules
2714
2693
  };
2715
2694
  }
2716
- function _l(t, s, e = {}) {
2695
+ function Pl(t, s, e = {}) {
2717
2696
  return {
2718
2697
  default: s,
2719
2698
  type: "enum",
@@ -2721,21 +2700,21 @@ function _l(t, s, e = {}) {
2721
2700
  values: t
2722
2701
  };
2723
2702
  }
2724
- function xl(t) {
2703
+ function Dl(t) {
2725
2704
  return {
2726
2705
  default: t,
2727
2706
  type: "boolean",
2728
2707
  rules: "required"
2729
2708
  };
2730
2709
  }
2731
- function Cl(t) {
2710
+ function jl(t) {
2732
2711
  return {
2733
2712
  default: t,
2734
2713
  type: "date",
2735
2714
  rules: "required"
2736
2715
  };
2737
2716
  }
2738
- function kl(t, s) {
2717
+ function Bl(t, s) {
2739
2718
  return {
2740
2719
  default: s,
2741
2720
  type: "enum",
@@ -2743,55 +2722,55 @@ function kl(t, s) {
2743
2722
  values: t
2744
2723
  };
2745
2724
  }
2746
- function Sl(t) {
2725
+ function Fl(t) {
2747
2726
  return {
2748
2727
  default: t,
2749
2728
  type: "number",
2750
2729
  rules: "required"
2751
2730
  };
2752
2731
  }
2753
- function Tl(t) {
2732
+ function Ul(t) {
2754
2733
  return {
2755
2734
  default: t,
2756
2735
  type: "object",
2757
2736
  rules: "required"
2758
2737
  };
2759
2738
  }
2760
- function Zn(t) {
2739
+ function da(t) {
2761
2740
  return {
2762
2741
  default: t,
2763
2742
  type: "string",
2764
2743
  rules: "required"
2765
2744
  };
2766
2745
  }
2767
- function Ml(t, s = {}) {
2746
+ function Ol(t, s = {}) {
2768
2747
  return {
2769
2748
  default: t,
2770
2749
  type: "number",
2771
2750
  rules: s.rules
2772
2751
  };
2773
2752
  }
2774
- function Hl(t, s = {}) {
2753
+ function Nl(t, s = {}) {
2775
2754
  return {
2776
2755
  default: t,
2777
2756
  type: "object",
2778
2757
  rules: s.rules
2779
2758
  };
2780
2759
  }
2781
- function El(t, s = {}) {
2760
+ function Wl(t, s = {}) {
2782
2761
  return {
2783
2762
  default: t,
2784
2763
  type: "string",
2785
2764
  rules: s.rules
2786
2765
  };
2787
2766
  }
2788
- function Xn(t) {
2789
- const s = ut({
2790
- draft: Zn(t.defaultValue ?? "")
2791
- }), e = c(() => t.title ?? t.message), r = c(() => t.title ? t.message : null), n = c(() => t.acceptText ?? S("ui.accept", "Ok")), a = c(() => t.cancelText ?? S("ui.cancel", "Cancel"));
2767
+ function pa(t) {
2768
+ const s = mt({
2769
+ draft: da(t.defaultValue ?? "")
2770
+ }), e = c(() => t.title ?? t.message), r = c(() => t.title ? t.message : null), n = c(() => t.acceptText ?? k("ui.accept", "Ok")), a = c(() => t.cancelText ?? k("ui.cancel", "Cancel"));
2792
2771
  return { form: s, renderedTitle: e, renderedMessage: r, renderedAcceptText: n, renderedCancelText: a };
2793
2772
  }
2794
- const Yn = { class: "mt-4 flex flex-row-reverse gap-2" }, Gn = /* @__PURE__ */ g({
2773
+ const ma = { class: "mt-4 flex flex-row-reverse gap-2" }, fa = /* @__PURE__ */ h({
2795
2774
  __name: "PromptModal",
2796
2775
  props: {
2797
2776
  title: {},
@@ -2804,44 +2783,45 @@ const Yn = { class: "mt-4 flex flex-row-reverse gap-2" }, Gn = /* @__PURE__ */ g
2804
2783
  cancelText: {},
2805
2784
  cancelVariant: { default: "secondary" }
2806
2785
  },
2786
+ emits: ["close"],
2807
2787
  setup(t, { expose: s }) {
2808
- const e = N(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: i, renderedCancelText: l } = Xn(e);
2809
- return s(), (d, v) => (u(), h(se, {
2810
- title: o(n),
2788
+ const e = K(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: u, renderedCancelText: o } = pa(e);
2789
+ return s(), (p, g) => (i(), f(re, {
2790
+ title: l(n),
2811
2791
  persistent: ""
2812
2792
  }, {
2813
- default: f(({ close: $ }) => [
2814
- p(wt, {
2815
- form: o(r),
2816
- onSubmit: (m) => $(o(r).draft)
2793
+ default: m(({ close: w }) => [
2794
+ d(Vt, {
2795
+ form: l(r),
2796
+ onSubmit: (v) => w(l(r).draft)
2817
2797
  }, {
2818
- default: f(() => [
2819
- o(a) ? (u(), h(P, {
2798
+ default: m(() => [
2799
+ l(a) ? (i(), f(z, {
2820
2800
  key: 0,
2821
- text: o(a)
2822
- }, null, 8, ["text"])) : T("", !0),
2823
- p(Jn, {
2801
+ text: l(a)
2802
+ }, null, 8, ["text"])) : M("", !0),
2803
+ d(ca, {
2824
2804
  name: "draft",
2825
2805
  class: "mt-2",
2826
- placeholder: d.placeholder,
2827
- label: d.label
2806
+ placeholder: p.placeholder,
2807
+ label: p.label
2828
2808
  }, null, 8, ["placeholder", "label"]),
2829
- y("div", Yn, [
2830
- p(q, {
2831
- variant: d.acceptVariant,
2809
+ b("div", ma, [
2810
+ d(R, {
2811
+ variant: p.acceptVariant,
2832
2812
  submit: ""
2833
2813
  }, {
2834
- default: f(() => [
2835
- I(x(o(i)), 1)
2814
+ default: m(() => [
2815
+ L(x(l(u)), 1)
2836
2816
  ]),
2837
2817
  _: 1
2838
2818
  }, 8, ["variant"]),
2839
- p(q, {
2840
- variant: d.cancelVariant,
2841
- onClick: (m) => $()
2819
+ d(R, {
2820
+ variant: p.cancelVariant,
2821
+ onClick: (v) => w()
2842
2822
  }, {
2843
- default: f(() => [
2844
- I(x(o(l)), 1)
2823
+ default: m(() => [
2824
+ L(x(l(o)), 1)
2845
2825
  ]),
2846
2826
  _: 2
2847
2827
  }, 1032, ["variant", "onClick"])
@@ -2853,65 +2833,65 @@ const Yn = { class: "mt-4 flex flex-row-reverse gap-2" }, Gn = /* @__PURE__ */ g
2853
2833
  _: 1
2854
2834
  }, 8, ["title"]));
2855
2835
  }
2856
- }), ea = {
2836
+ }), ha = {
2857
2837
  viewBox: "0 0 24 24",
2858
2838
  width: "1.2em",
2859
2839
  height: "1.2em"
2860
2840
  };
2861
- function ta(t, s) {
2862
- return u(), b("svg", ea, s[0] || (s[0] = [
2863
- y("path", {
2841
+ function ga(t, s) {
2842
+ return i(), y("svg", ha, s[0] || (s[0] = [
2843
+ b("path", {
2864
2844
  fill: "currentColor",
2865
2845
  d: "M12 21q-1.625 0-3.012-.8T6.8 18H4v-2h2.1q-.075-.5-.088-1T6 14H4v-2h2q0-.5.012-1t.088-1H4V8h2.8q.35-.575.788-1.075T8.6 6.05L7 4.4L8.4 3l2.15 2.15q.7-.225 1.425-.225t1.425.225L15.6 3L17 4.4l-1.65 1.65q.575.375 1.038.862T17.2 8H20v2h-2.1q.075.5.088 1T18 12h2v2h-2q0 .5-.013 1t-.087 1H20v2h-2.8q-.8 1.4-2.187 2.2T12 21m-2-5h4v-2h-4zm0-4h4v-2h-4z"
2866
2846
  }, null, -1)
2867
2847
  ]));
2868
2848
  }
2869
- const sa = E({ name: "material-symbols-bug-report", render: ta }), ra = {
2849
+ const va = E({ name: "material-symbols-bug-report", render: ga }), ba = {
2870
2850
  viewBox: "0 0 24 24",
2871
2851
  width: "1.2em",
2872
2852
  height: "1.2em"
2873
2853
  };
2874
- function na(t, s) {
2875
- return u(), b("svg", ra, s[0] || (s[0] = [
2876
- y("path", {
2854
+ function ya(t, s) {
2855
+ return i(), y("svg", ba, s[0] || (s[0] = [
2856
+ b("path", {
2877
2857
  fill: "currentColor",
2878
2858
  d: "M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zm5-7.1l1.9 1.9q.275.275.7.275t.7-.275t.275-.7t-.275-.7l-1.9-1.9l1.9-1.9q.275-.275.275-.7t-.275-.7t-.7-.275t-.7.275L12 11.1l-1.9-1.9q-.275-.275-.7-.275t-.7.275t-.275.7t.275.7l1.9 1.9l-1.9 1.9q-.275.275-.275.7t.275.7t.7.275t.7-.275z"
2879
2859
  }, null, -1)
2880
2860
  ]));
2881
2861
  }
2882
- const aa = E({ name: "material-symbols-delete-forever-rounded", render: na }), la = {
2862
+ const wa = E({ name: "material-symbols-delete-forever-rounded", render: ya }), $a = {
2883
2863
  viewBox: "0 0 24 24",
2884
2864
  width: "1.2em",
2885
2865
  height: "1.2em"
2886
2866
  };
2887
- function oa(t, s) {
2888
- return u(), b("svg", la, s[0] || (s[0] = [
2889
- y("path", {
2867
+ function _a(t, s) {
2868
+ return i(), y("svg", $a, s[0] || (s[0] = [
2869
+ b("path", {
2890
2870
  fill: "currentColor",
2891
2871
  d: "M11.25 13.5q.95 0 1.6-.65t.65-1.6t-.65-1.6t-1.6-.65t-1.6.65t-.65 1.6t.65 1.6t1.6.65m4.825 4l-2.625-2.625q-.5.325-1.062.475t-1.138.15q-1.775 0-3.012-1.237T7 11.25t1.238-3.012T11.25 7t3.013 1.238T15.5 11.25q0 .575-.162 1.138t-.488 1.062l2.65 2.65zM5 21q-.825 0-1.412-.587T3 19v-4h2v4h4v2zm10 0v-2h4v-4h2v4q0 .825-.587 1.413T19 21zM3 9V5q0-.825.588-1.412T5 3h4v2H5v4zm16 0V5h-4V3h4q.825 0 1.413.588T21 5v4z"
2892
2872
  }, null, -1)
2893
2873
  ]));
2894
2874
  }
2895
- const ia = E({ name: "material-symbols-frame-inspect", render: oa }), ua = {
2875
+ const xa = E({ name: "material-symbols-frame-inspect", render: _a }), Ca = {
2896
2876
  viewBox: "0 0 24 24",
2897
2877
  width: "1.2em",
2898
2878
  height: "1.2em"
2899
2879
  };
2900
- function ca(t, s) {
2901
- return u(), b("svg", ua, s[0] || (s[0] = [
2902
- y("path", {
2880
+ function ka(t, s) {
2881
+ return i(), y("svg", Ca, s[0] || (s[0] = [
2882
+ b("path", {
2903
2883
  fill: "currentColor",
2904
2884
  d: "M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V5q0-.425.288-.712T19 4t.713.288T20 5v5q0 .425-.288.713T19 11h-5q-.425 0-.712-.288T13 10t.288-.712T14 9h3.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12t1.75 4.25T12 18q1.7 0 3.113-.862t2.187-2.313q.2-.35.563-.487t.737-.013q.4.125.575.525t-.025.75q-1.025 2-2.925 3.2T12 20"
2905
2885
  }, null, -1)
2906
2886
  ]));
2907
2887
  }
2908
- const da = E({ name: "material-symbols-refresh-rounded", render: ca }), pa = { class: "grid grow place-items-center" }, ma = { class: "flex flex-col items-center p-8" }, fa = { class: "mt-0 mb-0 text-center text-4xl font-medium text-red-600" }, ha = { class: "mt-4 grid grid-cols-1 gap-2 sm:grid-cols-2 [&_button]:justify-start sm:[&_button]:size-32 sm:[&_button]:flex-col sm:[&_button]:justify-center [&_svg]:size-6 sm:[&_svg]:size-8" }, ga = /* @__PURE__ */ g({
2888
+ const Sa = E({ name: "material-symbols-refresh-rounded", render: ka }), Ta = { class: "grid grow place-items-center" }, Ma = { class: "flex flex-col items-center p-8" }, Ha = { class: "mt-0 mb-0 text-center text-4xl font-medium text-red-600" }, Va = { class: "mt-4 grid grid-cols-1 gap-2 sm:grid-cols-2 [&_button]:justify-start sm:[&_button]:size-32 sm:[&_button]:flex-col sm:[&_button]:justify-center [&_svg]:size-6 sm:[&_svg]:size-8" }, Ea = /* @__PURE__ */ h({
2909
2889
  __name: "StartupCrash",
2910
2890
  setup(t) {
2911
2891
  async function s() {
2912
- await z.confirm(
2913
- S("startupCrash.purgeConfirmTitle", "Delete everything?"),
2914
- S(
2892
+ await P.confirm(
2893
+ k("startupCrash.purgeConfirmTitle", "Delete everything?"),
2894
+ k(
2915
2895
  "startupCrash.purgeConfirmMessage",
2916
2896
  `If the problem persists, one drastic solution may be to wipe the storage in this device to start from scratch. However, keep in mind that **all the data that you haven't synchronized will be deleted forever**.
2917
2897
 
@@ -2919,61 +2899,61 @@ Do you still want to proceed?`
2919
2899
  ),
2920
2900
  {
2921
2901
  acceptVariant: "danger",
2922
- acceptText: S("startupCrash.purgeConfirmAccept", "Purge device")
2902
+ acceptText: k("startupCrash.purgeConfirmAccept", "Purge device")
2923
2903
  }
2924
- ) && (await et.purge(), await A.reload());
2904
+ ) && (await ht.purge(), await A.reload());
2925
2905
  }
2926
2906
  return (e, r) => {
2927
- const n = zt("i-majesticons-exclamation");
2928
- return u(), b("div", pa, [
2929
- y("div", ma, [
2930
- p(n, { class: "size-20 text-red-600" }),
2931
- y("h1", fa, x(e.$td("startupCrash.title", "Oops, something went wrong!")), 1),
2932
- p(P, {
2907
+ const n = Wt("i-majesticons-exclamation");
2908
+ return i(), y("div", Ta, [
2909
+ b("div", Ma, [
2910
+ d(n, { class: "size-20 text-red-600" }),
2911
+ b("h1", Ha, x(e.$td("startupCrash.title", "Oops, something went wrong!")), 1),
2912
+ d(z, {
2933
2913
  text: e.$td(
2934
2914
  "startupCrash.message",
2935
2915
  "There was a problem starting the application, but here's some things you can do:"
2936
2916
  ),
2937
2917
  class: "mt-4 text-center"
2938
2918
  }, null, 8, ["text"]),
2939
- y("div", ha, [
2940
- p(q, {
2919
+ b("div", Va, [
2920
+ d(R, {
2941
2921
  variant: "danger",
2942
2922
  onClick: r[0] || (r[0] = (a) => e.$app.reload())
2943
2923
  }, {
2944
- default: f(() => [
2945
- p(o(da)),
2946
- I(" " + x(e.$td("startupCrash.reload", "Try again")), 1)
2924
+ default: m(() => [
2925
+ d(l(Sa)),
2926
+ L(" " + x(e.$td("startupCrash.reload", "Try again")), 1)
2947
2927
  ]),
2948
2928
  _: 1
2949
2929
  }),
2950
- p(q, {
2930
+ d(R, {
2951
2931
  variant: "danger",
2952
2932
  onClick: r[1] || (r[1] = (a) => e.$errors.inspect(e.$errors.startupErrors))
2953
2933
  }, {
2954
- default: f(() => [
2955
- p(o(sa)),
2956
- I(" " + x(e.$td("startupCrash.inspect", "View error details")), 1)
2934
+ default: m(() => [
2935
+ d(l(va)),
2936
+ L(" " + x(e.$td("startupCrash.inspect", "View error details")), 1)
2957
2937
  ]),
2958
2938
  _: 1
2959
2939
  }),
2960
- p(q, {
2940
+ d(R, {
2961
2941
  variant: "danger",
2962
2942
  onClick: r[2] || (r[2] = (a) => s())
2963
2943
  }, {
2964
- default: f(() => [
2965
- p(o(aa)),
2966
- I(" " + x(e.$td("startupCrash.purge", "Purge device")), 1)
2944
+ default: m(() => [
2945
+ d(l(wa)),
2946
+ L(" " + x(e.$td("startupCrash.purge", "Purge device")), 1)
2967
2947
  ]),
2968
2948
  _: 1
2969
2949
  }),
2970
- p(q, {
2950
+ d(R, {
2971
2951
  variant: "danger",
2972
2952
  onClick: r[3] || (r[3] = (a) => e.$errors.debug = !e.$errors.debug)
2973
2953
  }, {
2974
- default: f(() => [
2975
- p(o(ia)),
2976
- I(" " + x(e.$td("startupCrash.debug", "Toggle debugging")), 1)
2954
+ default: m(() => [
2955
+ d(l(xa)),
2956
+ L(" " + x(e.$td("startupCrash.debug", "Toggle debugging")), 1)
2977
2957
  ]),
2978
2958
  _: 1
2979
2959
  })
@@ -2982,23 +2962,23 @@ Do you still want to proceed?`
2982
2962
  ]);
2983
2963
  };
2984
2964
  }
2985
- }), Ct = /* @__PURE__ */ g({
2965
+ }), zt = /* @__PURE__ */ h({
2986
2966
  __name: "HeadlessToastAction",
2987
2967
  props: {
2988
2968
  action: {}
2989
2969
  },
2990
2970
  setup(t) {
2991
- return (s, e) => (u(), h(W(s.action.dismiss ? o(ks) : "button"), {
2971
+ return (s, e) => (i(), f(Y(s.action.dismiss ? l(Ds) : "button"), {
2992
2972
  type: "button",
2993
2973
  onClick: s.action.click
2994
2974
  }, {
2995
- default: f(() => [
2996
- I(x(s.action.label), 1)
2975
+ default: m(() => [
2976
+ L(x(s.action.label), 1)
2997
2977
  ]),
2998
2978
  _: 1
2999
2979
  }, 8, ["onClick"]));
3000
2980
  }
3001
- }), va = { key: 0 }, ba = /* @__PURE__ */ g({
2981
+ }), La = { key: 0 }, Ra = /* @__PURE__ */ h({
3002
2982
  __name: "HeadlessToast",
3003
2983
  props: {
3004
2984
  message: {},
@@ -3006,11 +2986,11 @@ Do you still want to proceed?`
3006
2986
  variant: {}
3007
2987
  },
3008
2988
  setup(t) {
3009
- return (s, e) => (u(), h(o(Ss), null, {
3010
- default: f(() => [
3011
- w(s.$slots, "default", {}, () => [
3012
- s.message ? (u(), b("span", va, x(s.message), 1)) : T("", !0),
3013
- (u(!0), b(D, null, F(s.actions, (r, n) => (u(), h(Ct, {
2989
+ return (s, e) => (i(), f(l(js), null, {
2990
+ default: m(() => [
2991
+ $(s.$slots, "default", {}, () => [
2992
+ s.message ? (i(), y("span", La, x(s.message), 1)) : M("", !0),
2993
+ (i(!0), y(D, null, U(s.actions, (r, n) => (i(), f(zt, {
3014
2994
  key: n,
3015
2995
  action: r
3016
2996
  }, null, 8, ["action"]))), 128))
@@ -3019,7 +2999,7 @@ Do you still want to proceed?`
3019
2999
  _: 3
3020
3000
  }));
3021
3001
  }
3022
- }), ya = /* @__PURE__ */ g({
3002
+ }), za = /* @__PURE__ */ h({
3023
3003
  __name: "Toast",
3024
3004
  props: {
3025
3005
  message: {},
@@ -3028,14 +3008,15 @@ Do you still want to proceed?`
3028
3008
  class: {}
3029
3009
  },
3030
3010
  setup(t, { expose: s }) {
3031
- const e = c(() => lt(
3011
+ const e = c(() => dt(
3032
3012
  { baseClasses: t.class, variant: t.variant },
3033
3013
  {
3034
3014
  baseClasses: "flex items-center gap-2 rounded-md p-2 ring-1 shadow-lg border-gray-200",
3035
3015
  variants: {
3036
3016
  variant: {
3037
3017
  secondary: "bg-gray-900 text-white ring-black",
3038
- danger: "bg-red-50 text-red-900 ring-red-100"
3018
+ danger: "bg-red-50 text-red-900 ring-red-100",
3019
+ warning: "bg-yellow-50 text-yellow-900 ring-yellow-100"
3039
3020
  }
3040
3021
  },
3041
3022
  defaultVariants: {
@@ -3043,134 +3024,122 @@ Do you still want to proceed?`
3043
3024
  }
3044
3025
  }
3045
3026
  ));
3046
- return s(), (r, n) => (u(), h(ba, {
3047
- class: k(e.value)
3027
+ return s(), (r, n) => (i(), f(Ra, {
3028
+ class: C(e.value)
3048
3029
  }, {
3049
- default: f(() => [
3050
- r.message ? (u(), h(P, {
3030
+ default: m(() => [
3031
+ r.message ? (i(), f(z, {
3051
3032
  key: 0,
3052
3033
  text: r.message,
3053
3034
  inline: ""
3054
- }, null, 8, ["text"])) : T("", !0),
3055
- (u(!0), b(D, null, F(r.actions, (a, i) => (u(), h(q, {
3056
- key: i,
3035
+ }, null, 8, ["text"])) : M("", !0),
3036
+ (i(!0), y(D, null, U(r.actions, (a, u) => (i(), f(R, {
3037
+ key: u,
3057
3038
  action: a,
3058
3039
  variant: r.variant,
3059
- as: Ct
3040
+ as: zt
3060
3041
  }, null, 8, ["action", "variant"]))), 128))
3061
3042
  ]),
3062
3043
  _: 1
3063
3044
  }, 8, ["class"]));
3064
3045
  }
3065
- }), wa = { $ui: z }, $a = {
3046
+ }), Ia = { $ui: P }, qa = {
3066
3047
  async install(t, s) {
3067
3048
  const e = {
3068
- "alert-modal": en,
3069
- "confirm-modal": on,
3070
- "error-report-modal": Rn,
3071
- "loading-modal": On,
3072
- "prompt-modal": Gn,
3073
- "startup-crash": ga,
3074
- toast: ya,
3049
+ "alert-modal": gn,
3050
+ "confirm-modal": xn,
3051
+ "error-report-modal": Xn,
3052
+ "loading-modal": aa,
3053
+ "prompt-modal": fa,
3054
+ "startup-crash": Ea,
3055
+ toast: za,
3075
3056
  ...s.components
3076
3057
  };
3077
3058
  for (const [r, n] of Object.entries(e))
3078
- z.registerComponent(r, n);
3079
- await $e(t, wa);
3059
+ P.registerComponent(r, n);
3060
+ await ke(t, Ia);
3080
3061
  }
3081
3062
  };
3082
- async function _a(t, s = {}) {
3063
+ async function Aa(t, s = {}) {
3083
3064
  var r;
3084
- const e = [Br, Ks, jr, Sr, Xs, $a, ...s.plugins ?? []];
3085
- A.instance = t, await Bs(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await R.emit("application-ready");
3065
+ const e = [sn, yr, tn, Br, xr, qa, ...s.plugins ?? []];
3066
+ A.instance = t, await tr(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await F.emit("application-ready");
3086
3067
  }
3087
- async function Vl(t, s = {}) {
3068
+ async function Kl(t, s = {}) {
3088
3069
  var r;
3089
- const e = Rt(t);
3090
- J() && (window.$aerogel = e), await _a(e, s), e.mount("#app"), (r = e._container) == null || r.classList.remove("loading"), await R.emit("application-mounted");
3070
+ const e = Kt(t);
3071
+ J() && (window.$aerogel = e), await Aa(e, s), e.mount("#app"), (r = e._container) == null || r.classList.remove("loading"), await F.emit("application-mounted");
3091
3072
  }
3092
- const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3093
- __name: "AppModals",
3094
- setup(t) {
3095
- const s = c(() => z.modals[0] ?? null);
3096
- return (e, r) => s.value ? (u(), b("aside", xa, [
3097
- p(yt, {
3098
- "child-index": 1,
3099
- modal: s.value
3100
- }, null, 8, ["modal"])
3101
- ])) : T("", !0);
3102
- }
3103
- }), ka = /* @__PURE__ */ g({
3073
+ const Pa = /* @__PURE__ */ h({
3104
3074
  __name: "AppToasts",
3105
3075
  setup(t) {
3106
- return (s, e) => (u(), h(o(Ts), null, {
3107
- default: f(() => [
3108
- (u(!0), b(D, null, F(s.$ui.toasts, (r) => (u(), h(W(r.component), H({
3076
+ return (s, e) => (i(), f(l(Bs), null, {
3077
+ default: m(() => [
3078
+ (i(!0), y(D, null, U(s.$ui.toasts, (r) => (i(), f(Y(r.component), V({
3109
3079
  id: r.id,
3110
- key: r.id,
3111
- ref_for: !0
3112
- }, r.properties), null, 16, ["id"]))), 128)),
3113
- p(o(Ms), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
3080
+ key: r.id
3081
+ }, { ref_for: !0 }, r.properties), null, 16, ["id"]))), 128)),
3082
+ d(l(Fs), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
3114
3083
  ]),
3115
3084
  _: 1
3116
3085
  }));
3117
3086
  }
3118
- }), Sa = /* @__PURE__ */ g({
3087
+ }), Da = /* @__PURE__ */ h({
3119
3088
  __name: "AppOverlays",
3120
3089
  setup(t) {
3121
- return (s, e) => (u(), b(D, null, [
3122
- p(Ca),
3123
- p(ka)
3090
+ return (s, e) => (i(), y(D, null, [
3091
+ d(l(vs), { nested: "" }),
3092
+ d(Pa)
3124
3093
  ], 64));
3125
3094
  }
3126
- }), Ta = { class: "flex min-h-full flex-col text-base leading-tight font-normal text-gray-900 antialiased" }, Ll = /* @__PURE__ */ g({
3095
+ }), ja = { class: "flex min-h-full flex-col text-base leading-tight font-normal text-gray-900 antialiased" }, Ql = /* @__PURE__ */ h({
3127
3096
  __name: "AppLayout",
3128
3097
  setup(t) {
3129
- return (s, e) => (u(), b("div", Ta, [
3130
- s.$errors.hasStartupErrors ? w(s.$slots, "startup-crash", { key: 0 }, () => [
3131
- (u(), h(W(s.$ui.requireComponent("startup-crash"))))
3132
- ]) : w(s.$slots, "default", { key: 1 }),
3133
- p(Sa)
3098
+ return (s, e) => (i(), y("div", ja, [
3099
+ s.$errors.hasStartupErrors ? $(s.$slots, "startup-crash", { key: 0 }, () => [
3100
+ (i(), f(Y(s.$ui.requireComponent("startup-crash"))))
3101
+ ]) : $(s.$slots, "default", { key: 1 }),
3102
+ d(Da)
3134
3103
  ]));
3135
3104
  }
3136
- }), Ma = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], Ha = /* @__PURE__ */ g({
3105
+ }), Ba = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], Fa = /* @__PURE__ */ h({
3137
3106
  __name: "HeadlessInputTextArea",
3138
3107
  setup(t) {
3139
- const s = G("$textAreaRef"), e = V(
3108
+ const s = ee("$textAreaRef"), e = I(
3140
3109
  "input",
3141
3110
  "<HeadlessInputTextArea> must be a child of a <HeadlessInput>"
3142
3111
  ), r = c(() => e.name ?? void 0), n = c(() => e.value);
3143
3112
  function a() {
3144
3113
  s.value && e.update(s.value.value);
3145
3114
  }
3146
- return it(e, () => {
3147
- var i;
3148
- return (i = s.value) == null ? void 0 : i.focus();
3149
- }), (i, l) => (u(), b("textarea", {
3150
- id: o(e).id,
3115
+ return pt(e, () => {
3116
+ var u;
3117
+ return (u = s.value) == null ? void 0 : u.focus();
3118
+ }), (u, o) => (i(), y("textarea", {
3119
+ id: l(e).id,
3151
3120
  ref: "$textAreaRef",
3152
3121
  name: r.value,
3153
3122
  value: n.value,
3154
- required: o(e).required ?? void 0,
3155
- "aria-invalid": o(e).errors ? "true" : "false",
3156
- "aria-describedby": o(e).errors ? `${o(e).id}-error` : o(e).description ? `${o(e).id}-description` : void 0,
3123
+ required: l(e).required ?? void 0,
3124
+ "aria-invalid": l(e).errors ? "true" : "false",
3125
+ "aria-describedby": l(e).errors ? `${l(e).id}-error` : l(e).description ? `${l(e).id}-description` : void 0,
3157
3126
  onInput: a
3158
- }, null, 40, Ma));
3127
+ }, null, 40, Ba));
3159
3128
  }
3160
- }), Ea = { class: "group" }, Va = { class: "-ml-2 flex w-[max-content] items-center rounded-lg py-2 pr-3 pl-1 hover:bg-gray-100 focus-visible:outline focus-visible:outline-gray-700" }, La = { class: "pt-2 pl-4" }, Il = /* @__PURE__ */ g({
3129
+ }), Ua = { class: "group" }, Oa = { class: "-ml-2 flex w-[max-content] items-center rounded-lg py-2 pr-3 pl-1 hover:bg-gray-100 focus-visible:outline focus-visible:outline-gray-700" }, Na = { class: "pt-2 pl-4" }, Jl = /* @__PURE__ */ h({
3161
3130
  __name: "AdvancedOptions",
3162
3131
  setup(t) {
3163
- return (s, e) => (u(), b("details", Ea, [
3164
- y("summary", Va, [
3165
- p(o($t), { class: "size-6 transition-transform group-open:rotate-90" }),
3166
- y("span", null, x(s.$td("ui.advancedOptions", "Advanced options")), 1)
3132
+ return (s, e) => (i(), y("details", Ua, [
3133
+ b("summary", Oa, [
3134
+ d(l(Et), { class: "size-6 transition-transform group-open:rotate-90" }),
3135
+ b("span", null, x(s.$td("ui.advancedOptions", "Advanced options")), 1)
3167
3136
  ]),
3168
- y("div", La, [
3169
- w(s.$slots, "default")
3137
+ b("div", Na, [
3138
+ $(s.$slots, "default")
3170
3139
  ])
3171
3140
  ]));
3172
3141
  }
3173
- }), Ia = { class: "flex h-6 items-center" }, ql = /* @__PURE__ */ g({
3142
+ }), Wa = { class: "flex h-6 items-center" }, Zl = /* @__PURE__ */ h({
3174
3143
  inheritAttrs: !1,
3175
3144
  __name: "Checkbox",
3176
3145
  props: {
@@ -3183,53 +3152,53 @@ const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3183
3152
  },
3184
3153
  emits: ["update:modelValue"],
3185
3154
  setup(t) {
3186
- const s = N(t, ["inputClass", "labelClass"]), e = G("$inputRef"), [r, n] = Ie(), a = c(() => M("relative flex items-start", n.value)), i = c(() => {
3187
- var d, v;
3188
- return M(
3155
+ const s = K(t, ["inputClass", "labelClass"]), e = ee("$inputRef"), [r, n] = Ae(), a = c(() => H("relative flex items-start", n.value)), u = c(() => {
3156
+ var p, g;
3157
+ return H(
3189
3158
  "size-4 rounded text-primary-600 not-checked:hover:bg-gray-200 checked:hover:text-primary-500 checked:border-0",
3190
3159
  {
3191
- "border-gray-300 focus:ring-primary-600": !((d = e.value) != null && d.errors),
3192
- "border-red-400 border-2 focus:ring-red-600": (v = e.value) == null ? void 0 : v.errors
3160
+ "border-gray-300 focus:ring-primary-600": !((p = e.value) != null && p.errors),
3161
+ "border-red-400 border-2 focus:ring-red-600": (g = e.value) == null ? void 0 : g.errors
3193
3162
  },
3194
3163
  t.inputClass
3195
3164
  );
3196
- }), l = c(() => M("ml-2 text-sm leading-6", t.labelClass));
3197
- return (d, v) => (u(), h(ze, H({
3165
+ }), o = c(() => H("ml-2 text-sm leading-6", t.labelClass));
3166
+ return (p, g) => (i(), f(je, V({
3198
3167
  ref: "$inputRef",
3199
3168
  class: a.value
3200
3169
  }, s, {
3201
- "onUpdate:modelValue": v[0] || (v[0] = ($) => d.$emit("update:modelValue", $))
3170
+ "onUpdate:modelValue": g[0] || (g[0] = (w) => p.$emit("update:modelValue", w))
3202
3171
  }), {
3203
- default: f(() => [
3204
- y("div", Ia, [
3205
- p(_t, H(o(r), {
3172
+ default: m(() => [
3173
+ b("div", Wa, [
3174
+ d(Lt, V(l(r), {
3206
3175
  type: "checkbox",
3207
- class: i.value
3176
+ class: u.value
3208
3177
  }), null, 16, ["class"])
3209
3178
  ]),
3210
- d.$slots.default ? (u(), b("div", {
3179
+ p.$slots.default ? (i(), y("div", {
3211
3180
  key: 0,
3212
- class: k(l.value)
3181
+ class: C(o.value)
3213
3182
  }, [
3214
- p(fe, { class: "text-gray-900" }, {
3215
- default: f(() => [
3216
- w(d.$slots, "default")
3183
+ d(be, { class: "text-gray-900" }, {
3184
+ default: m(() => [
3185
+ $(p.$slots, "default")
3217
3186
  ]),
3218
3187
  _: 3
3219
3188
  }),
3220
- p(he, { class: "text-red-600" })
3221
- ], 2)) : d.label ? (u(), b("div", {
3189
+ d(ye, { class: "text-red-600" })
3190
+ ], 2)) : p.label ? (i(), y("div", {
3222
3191
  key: 1,
3223
- class: k(l.value)
3192
+ class: C(o.value)
3224
3193
  }, [
3225
- p(fe, { class: "text-gray-900" }),
3226
- p(he, { class: "text-red-600" })
3227
- ], 2)) : T("", !0)
3194
+ d(be, { class: "text-gray-900" }),
3195
+ d(ye, { class: "text-red-600" })
3196
+ ], 2)) : M("", !0)
3228
3197
  ]),
3229
3198
  _: 3
3230
3199
  }, 16, ["class"]));
3231
3200
  }
3232
- }), qa = /* @__PURE__ */ g({
3201
+ }), Ka = /* @__PURE__ */ h({
3233
3202
  __name: "DropdownMenuOption",
3234
3203
  props: {
3235
3204
  class: {},
@@ -3238,40 +3207,40 @@ const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3238
3207
  },
3239
3208
  emits: ["select"],
3240
3209
  setup(t) {
3241
- const s = N(t, ["class"]), e = c(() => M(
3210
+ const s = K(t, ["class"]), e = c(() => H(
3242
3211
  "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-gray-900 data-[highlighted]:bg-gray-100",
3243
3212
  t.class
3244
3213
  ));
3245
- return (r, n) => (u(), h(o(Hs), H({ class: e.value }, s, {
3214
+ return (r, n) => (i(), f(l(Us), V({ class: e.value }, s, {
3246
3215
  onSelect: n[0] || (n[0] = (a) => r.$emit("select"))
3247
3216
  }), {
3248
- default: f(() => [
3249
- w(r.$slots, "default")
3217
+ default: m(() => [
3218
+ $(r.$slots, "default")
3250
3219
  ]),
3251
3220
  _: 3
3252
3221
  }, 16, ["class"]));
3253
3222
  }
3254
- }), za = /* @__PURE__ */ g({
3223
+ }), Qa = /* @__PURE__ */ h({
3255
3224
  __name: "DropdownMenuOptions",
3256
3225
  setup(t) {
3257
- const s = V(
3226
+ const s = I(
3258
3227
  "dropdown-menu",
3259
3228
  "<DropdownMenuOptions> must be a child of a <DropdownMenu>"
3260
3229
  );
3261
- return (e, r) => (u(), h(o(Es), {
3230
+ return (e, r) => (i(), f(l(Os), {
3262
3231
  class: "gap-y-0.5 rounded-lg bg-white p-1.5 shadow-lg ring-1 ring-black/5",
3263
- align: o(s).align,
3264
- side: o(s).side
3232
+ align: l(s).align,
3233
+ side: l(s).side
3265
3234
  }, {
3266
- default: f(() => [
3267
- w(e.$slots, "default", {}, () => [
3268
- (u(!0), b(D, null, F(o(s).options, (n, a) => (u(), h(qa, H(
3235
+ default: m(() => [
3236
+ $(e.$slots, "default", {}, () => [
3237
+ (i(!0), y(D, null, U(l(s).options, (n, a) => (i(), f(Ka, V(
3269
3238
  {
3270
3239
  key: a,
3271
- as: n.route || n.href ? at : void 0,
3272
- class: n.class,
3273
- ref_for: !0
3240
+ as: n.route || n.href ? wt : void 0,
3241
+ class: n.class
3274
3242
  },
3243
+ { ref_for: !0 },
3275
3244
  n.route || n.href ? {
3276
3245
  href: n.href,
3277
3246
  route: n.route,
@@ -3279,14 +3248,14 @@ const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3279
3248
  routeQuery: n.routeQuery
3280
3249
  } : {},
3281
3250
  {
3282
- onSelect: (i) => {
3283
- var l;
3284
- return (l = n.click) == null ? void 0 : l.call(n);
3251
+ onSelect: (u) => {
3252
+ var o;
3253
+ return (o = n.click) == null ? void 0 : o.call(n);
3285
3254
  }
3286
3255
  }
3287
3256
  ), {
3288
- default: f(() => [
3289
- I(x(n.label), 1)
3257
+ default: m(() => [
3258
+ L(x(n.label), 1)
3290
3259
  ]),
3291
3260
  _: 2
3292
3261
  }, 1040, ["as", "class", "onSelect"]))), 128))
@@ -3295,7 +3264,7 @@ const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3295
3264
  _: 3
3296
3265
  }, 8, ["align", "side"]));
3297
3266
  }
3298
- }), zl = /* @__PURE__ */ g({
3267
+ }), Xl = /* @__PURE__ */ h({
3299
3268
  __name: "DropdownMenu",
3300
3269
  props: {
3301
3270
  align: {},
@@ -3311,18 +3280,18 @@ const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3311
3280
  return (r = t.options) == null ? void 0 : r.filter(Boolean);
3312
3281
  })
3313
3282
  };
3314
- return le("dropdown-menu", e), s(e), (r, n) => (u(), h(o(Vs), null, {
3315
- default: f(() => [
3316
- p(o(Ls), null, {
3317
- default: f(() => [
3318
- w(r.$slots, "default")
3283
+ return de("dropdown-menu", e), s(e), (r, n) => (i(), f(l(Ns), null, {
3284
+ default: m(() => [
3285
+ d(l(Ws), null, {
3286
+ default: m(() => [
3287
+ $(r.$slots, "default")
3319
3288
  ]),
3320
3289
  _: 3
3321
3290
  }),
3322
- p(o(Is), null, {
3323
- default: f(() => [
3324
- w(r.$slots, "options", {}, () => [
3325
- p(za)
3291
+ d(l(Ks), null, {
3292
+ default: m(() => [
3293
+ $(r.$slots, "options", {}, () => [
3294
+ d(Qa)
3326
3295
  ])
3327
3296
  ]),
3328
3297
  _: 3
@@ -3331,7 +3300,7 @@ const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3331
3300
  _: 3
3332
3301
  }));
3333
3302
  }
3334
- }), Ra = ["aria-hidden"], Pa = ["tabindex", "aria-label", "type"], Rl = /* @__PURE__ */ g({
3303
+ }), Ja = ["aria-hidden"], Za = ["tabindex", "aria-label", "type"], Gl = /* @__PURE__ */ h({
3335
3304
  __name: "EditableContent",
3336
3305
  props: {
3337
3306
  type: { default: "text" },
@@ -3344,106 +3313,106 @@ const xa = { key: 0 }, Ca = /* @__PURE__ */ g({
3344
3313
  },
3345
3314
  emits: ["update", "save"],
3346
3315
  setup(t, { emit: s }) {
3347
- const e = s, r = G("$inputRef"), n = U(null), a = U(t.text), i = c(() => M("inline whitespace-pre", t.contentClass)), l = c(() => M("invisible whitespace-pre", t.contentClass)), d = c(() => M("absolute inset-0 h-full w-full resize-none border-0 bg-transparent p-0 focus:ring-0", t.contentClass));
3348
- function v() {
3316
+ const e = s, r = ee("$inputRef"), n = N(null), a = N(t.text), u = c(() => H("inline whitespace-pre", t.contentClass)), o = c(() => H("invisible whitespace-pre", t.contentClass)), p = c(() => H("absolute inset-0 h-full w-full resize-none border-0 bg-transparent p-0 focus:ring-0", t.contentClass));
3317
+ function g() {
3349
3318
  n.value = t.text;
3350
3319
  }
3351
- function $() {
3320
+ function w() {
3352
3321
  n.value && (t.type !== "number" && a.value.trim().length === 0 && (a.value = n.value, e("update", a.value)), n.value = null, e("save"));
3353
3322
  }
3354
- return Y(() => a.value = t.text), (m, C) => (u(), b("div", {
3355
- class: k(["relative", { "pointer-events-none!": m.disabled && !n.value }])
3323
+ return G(() => a.value = t.text), (v, S) => (i(), y("div", {
3324
+ class: C(["relative", { "pointer-events-none!": v.disabled && !n.value }])
3356
3325
  }, [
3357
- n.value ? (u(), b("span", {
3326
+ n.value ? (i(), y("span", {
3358
3327
  key: 1,
3359
- class: k(l.value)
3360
- }, x(a.value), 3)) : (u(), b("div", {
3328
+ class: C(o.value)
3329
+ }, x(a.value), 3)) : (i(), y("div", {
3361
3330
  key: 0,
3362
- class: k(i.value)
3331
+ class: C(u.value)
3363
3332
  }, [
3364
- w(m.$slots, "default")
3333
+ $(v.$slots, "default")
3365
3334
  ], 2)),
3366
- m.type === "number" ? (u(), b("span", {
3335
+ v.type === "number" ? (i(), y("span", {
3367
3336
  key: 2,
3368
- class: k(["inline-block transition-[width]", n.value ? "w-5" : "w-0"])
3369
- }, null, 2)) : T("", !0),
3370
- y("form", {
3337
+ class: C(["inline-block transition-[width]", n.value ? "w-5" : "w-0"])
3338
+ }, null, 2)) : M("", !0),
3339
+ b("form", {
3371
3340
  class: "w-full",
3372
- "aria-hidden": m.formAriaHidden,
3373
- onSubmit: C[4] || (C[4] = We((L) => {
3374
- var _e;
3375
- return (_e = r.value) == null ? void 0 : _e.blur();
3341
+ "aria-hidden": v.formAriaHidden,
3342
+ onSubmit: S[4] || (S[4] = st((q) => {
3343
+ var pe;
3344
+ return (pe = r.value) == null ? void 0 : pe.blur();
3376
3345
  }, ["prevent"]))
3377
3346
  }, [
3378
- Ke(y("input", {
3347
+ rt(b("input", {
3379
3348
  ref: "$inputRef",
3380
- "onUpdate:modelValue": C[0] || (C[0] = (L) => a.value = L),
3381
- tabindex: m.tabindex ?? void 0,
3382
- "aria-label": m.ariaLabel ?? void 0,
3383
- type: m.type,
3384
- class: k([
3385
- d.value,
3386
- { "opacity-0": !n.value, "appearance-textfield": !n.value && m.type === "number" }
3349
+ "onUpdate:modelValue": S[0] || (S[0] = (q) => a.value = q),
3350
+ tabindex: v.tabindex ?? void 0,
3351
+ "aria-label": v.ariaLabel ?? void 0,
3352
+ type: v.type,
3353
+ class: C([
3354
+ p.value,
3355
+ { "opacity-0": !n.value, "appearance-textfield": !n.value && v.type === "number" }
3387
3356
  ]),
3388
- onKeyup: C[1] || (C[1] = (L) => m.$emit("update", a.value)),
3389
- onFocus: C[2] || (C[2] = (L) => v()),
3390
- onBlur: C[3] || (C[3] = (L) => $())
3391
- }, null, 42, Pa), [
3392
- [Pt, a.value]
3357
+ onKeyup: S[1] || (S[1] = (q) => v.$emit("update", a.value)),
3358
+ onFocus: S[2] || (S[2] = (q) => g()),
3359
+ onBlur: S[3] || (S[3] = (q) => w())
3360
+ }, null, 42, Za), [
3361
+ [Qt, a.value]
3393
3362
  ])
3394
- ], 40, Ra)
3363
+ ], 40, Ja)
3395
3364
  ], 2));
3396
3365
  }
3397
- }), Aa = {
3366
+ }), Xa = {
3398
3367
  viewBox: "0 0 512 512",
3399
3368
  width: "1.2em",
3400
3369
  height: "1.2em"
3401
3370
  };
3402
- function Da(t, s) {
3403
- return u(), b("svg", Aa, s[0] || (s[0] = [
3404
- y("path", {
3371
+ function Ga(t, s) {
3372
+ return i(), y("svg", Xa, s[0] || (s[0] = [
3373
+ b("path", {
3405
3374
  fill: "currentColor",
3406
3375
  d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17m-198.6-1.83a20 20 0 1 1 20-20a20 20 0 0 1-20 20m21.72-201.15l-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7Z"
3407
3376
  }, null, -1)
3408
3377
  ]));
3409
3378
  }
3410
- const ja = E({ name: "ion-warning", render: Da }), Ba = {
3379
+ const Ya = E({ name: "ion-warning", render: Ga }), el = {
3411
3380
  viewBox: "0 0 20 20",
3412
3381
  width: "1.2em",
3413
3382
  height: "1.2em"
3414
3383
  };
3415
- function Fa(t, s) {
3416
- return u(), b("svg", Ba, s[0] || (s[0] = [
3417
- y("path", {
3384
+ function tl(t, s) {
3385
+ return i(), y("svg", el, s[0] || (s[0] = [
3386
+ b("path", {
3418
3387
  fill: "currentColor",
3419
3388
  d: "M.2 10a11 11 0 0 1 19.6 0A11 11 0 0 1 .2 10m9.8 4a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0-2a2 2 0 1 1 0-4a2 2 0 0 1 0 4"
3420
3389
  }, null, -1)
3421
3390
  ]));
3422
3391
  }
3423
- const Ua = E({ name: "zondicons-view-show", render: Fa }), Oa = { class: "font-medium" }, Na = ["datetime"], Wa = /* @__PURE__ */ g({
3392
+ const sl = E({ name: "zondicons-view-show", render: tl }), rl = { class: "font-medium" }, nl = ["datetime"], al = /* @__PURE__ */ h({
3424
3393
  __name: "ErrorLogsModal",
3425
3394
  setup(t) {
3426
- return (s, e) => (u(), h(se, {
3395
+ return (s, e) => (i(), f(re, {
3427
3396
  title: s.$td("errors.report", "Errors ({count})", { count: s.$errors.logs.length })
3428
3397
  }, {
3429
- default: f(() => [
3430
- y("ol", null, [
3431
- (u(!0), b(D, null, F(s.$errors.logs, (r, n) => (u(), b("li", {
3398
+ default: m(() => [
3399
+ b("ol", null, [
3400
+ (i(!0), y(D, null, U(s.$errors.logs, (r, n) => (i(), y("li", {
3432
3401
  key: n,
3433
3402
  class: "mb-2 flex max-w-prose min-w-56 justify-between py-2 last:mb-0"
3434
3403
  }, [
3435
- y("div", null, [
3436
- y("h3", Oa, x(r.report.title), 1),
3437
- y("time", {
3404
+ b("div", null, [
3405
+ b("h3", rl, x(r.report.title), 1),
3406
+ b("time", {
3438
3407
  datetime: r.date.toISOString(),
3439
3408
  class: "text-xs text-gray-700"
3440
- }, x(r.date.toLocaleTimeString()), 9, Na),
3441
- p(P, {
3409
+ }, x(r.date.toLocaleTimeString()), 9, nl),
3410
+ d(z, {
3442
3411
  class: "text-sm text-gray-500",
3443
- text: r.report.description ?? o(bt)(r.report)
3412
+ text: r.report.description ?? l(Ht)(r.report)
3444
3413
  }, null, 8, ["text"])
3445
3414
  ]),
3446
- p(q, {
3415
+ d(R, {
3447
3416
  size: "icon",
3448
3417
  variant: "ghost",
3449
3418
  "aria-label": s.$td("errors.viewDetails", "View details"),
@@ -3451,11 +3420,11 @@ const Ua = E({ name: "zondicons-view-show", render: Fa }), Oa = { class: "font-m
3451
3420
  class: "self-center",
3452
3421
  onClick: (a) => s.$errors.inspect(
3453
3422
  r.report,
3454
- s.$errors.logs.map(({ report: i }) => i)
3423
+ s.$errors.logs.map(({ report: u }) => u)
3455
3424
  )
3456
3425
  }, {
3457
- default: f(() => [
3458
- p(o(Ua), {
3426
+ default: m(() => [
3427
+ d(l(sl), {
3459
3428
  class: "size-4",
3460
3429
  "aria-hidden": "true"
3461
3430
  })
@@ -3468,36 +3437,36 @@ const Ua = E({ name: "zondicons-view-show", render: Fa }), Oa = { class: "font-m
3468
3437
  _: 1
3469
3438
  }, 8, ["title"]));
3470
3439
  }
3471
- }), Pl = /* @__PURE__ */ g({
3440
+ }), Yl = /* @__PURE__ */ h({
3472
3441
  __name: "ErrorLogs",
3473
3442
  setup(t) {
3474
- return (s, e) => s.$errors.logs.length > 0 ? (u(), h(q, {
3443
+ return (s, e) => s.$errors.logs.length > 0 ? (i(), f(R, {
3475
3444
  key: 0,
3476
3445
  size: "icon",
3477
3446
  variant: "ghost",
3478
3447
  title: s.$td("errors.viewLogs", "View error logs"),
3479
3448
  "aria-label": s.$td("errors.viewLogs", "View error logs"),
3480
- onClick: e[0] || (e[0] = (r) => s.$ui.modal(Wa))
3449
+ onClick: e[0] || (e[0] = (r) => s.$ui.modal(al))
3481
3450
  }, {
3482
- default: f(() => [
3483
- p(o(ja), { class: "size-6 text-red-500" })
3451
+ default: m(() => [
3452
+ d(l(Ya), { class: "size-6 text-red-500" })
3484
3453
  ]),
3485
3454
  _: 1
3486
- }, 8, ["title", "aria-label"])) : T("", !0);
3455
+ }, 8, ["title", "aria-label"])) : M("", !0);
3487
3456
  }
3488
- }), Al = /* @__PURE__ */ g({
3457
+ }), ei = /* @__PURE__ */ h({
3489
3458
  __name: "ErrorMessage",
3490
3459
  props: {
3491
3460
  error: {}
3492
3461
  },
3493
3462
  setup(t) {
3494
- const s = c(() => bt(t.error));
3495
- return (e, r) => (u(), h(P, {
3463
+ const s = c(() => Ht(t.error));
3464
+ return (e, r) => (i(), f(z, {
3496
3465
  text: s.value,
3497
3466
  inline: ""
3498
3467
  }, null, 8, ["text"]));
3499
3468
  }
3500
- }), Dl = /* @__PURE__ */ g({
3469
+ }), ti = /* @__PURE__ */ h({
3501
3470
  __name: "Link",
3502
3471
  props: {
3503
3472
  class: {},
@@ -3512,30 +3481,30 @@ const Ua = E({ name: "zondicons-view-show", render: Fa }), Oa = { class: "font-m
3512
3481
  as: {}
3513
3482
  },
3514
3483
  setup(t) {
3515
- return (s, e) => (u(), h(q, H({ variant: "link" }, s.$props), {
3516
- default: f(() => [
3517
- w(s.$slots, "default")
3484
+ return (s, e) => (i(), f(R, V({ variant: "link" }, s.$props), {
3485
+ default: m(() => [
3486
+ $(s.$slots, "default")
3518
3487
  ]),
3519
3488
  _: 3
3520
3489
  }, 16));
3521
3490
  }
3522
- }), jl = /* @__PURE__ */ g({
3491
+ }), si = /* @__PURE__ */ h({
3523
3492
  __name: "SettingsModal",
3524
3493
  setup(t) {
3525
- const s = c(() => Jt(A.settings, "priority", "desc"));
3526
- return (e, r) => (u(), h(se, {
3494
+ const s = c(() => as(A.settings, "priority", "desc"));
3495
+ return (e, r) => (i(), f(re, {
3527
3496
  title: e.$td("settings.title", "Settings")
3528
3497
  }, {
3529
- default: f(() => [
3530
- (u(!0), b(D, null, F(s.value, (n, a) => (u(), h(W(n.component), { key: a }))), 128))
3498
+ default: m(() => [
3499
+ (i(!0), y(D, null, U(s.value, (n, a) => (i(), f(Y(n.component), { key: a }))), 128))
3531
3500
  ]),
3532
3501
  _: 1
3533
3502
  }, 8, ["title"]));
3534
3503
  }
3535
- }), Ka = {
3504
+ }), ll = {
3536
3505
  key: 0,
3537
3506
  class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
3538
- }, Bl = /* @__PURE__ */ g({
3507
+ }, ri = /* @__PURE__ */ h({
3539
3508
  inheritAttrs: !1,
3540
3509
  __name: "TextArea",
3541
3510
  props: {
@@ -3548,47 +3517,47 @@ const Ua = E({ name: "zondicons-view-show", render: Fa }), Oa = { class: "font-m
3548
3517
  },
3549
3518
  emits: ["update:modelValue"],
3550
3519
  setup(t) {
3551
- const s = N(t, ["label", "inputClass", "wrapperClass"]), e = G("$inputRef"), [r, n] = Ie(), a = c(() => M("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), i = c(() => {
3552
- var l, d, v;
3553
- return M(
3520
+ const s = K(t, ["label", "inputClass", "wrapperClass"]), e = ee("$inputRef"), [r, n] = Ae(), a = c(() => H("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), u = c(() => {
3521
+ var o, p, g;
3522
+ return H(
3554
3523
  // eslint-disable-next-line vue/max-len
3555
3524
  "block w-full rounded-md border-0 py-1.5 ring-1 ring-inset focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6",
3556
3525
  {
3557
- "focus:ring-primary-600": !((l = e.value) != null && l.errors),
3558
- "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((d = e.value) != null && d.errors),
3559
- "pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (v = e.value) == null ? void 0 : v.errors
3526
+ "focus:ring-primary-600": !((o = e.value) != null && o.errors),
3527
+ "text-gray-900 shadow-2xs ring-gray-900/10 placeholder:text-gray-400": !((p = e.value) != null && p.errors),
3528
+ "pr-10 text-red-900 ring-red-900/10 placeholder:text-red-300 focus:ring-red-500": (g = e.value) == null ? void 0 : g.errors
3560
3529
  },
3561
3530
  t.inputClass
3562
3531
  );
3563
3532
  });
3564
- return (l, d) => (u(), h(ze, H({
3533
+ return (o, p) => (i(), f(je, V({
3565
3534
  ref: "$inputRef",
3566
- label: l.label,
3567
- class: o(n)
3535
+ label: o.label,
3536
+ class: l(n)
3568
3537
  }, s, {
3569
- "onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
3538
+ "onUpdate:modelValue": p[0] || (p[0] = (g) => o.$emit("update:modelValue", g))
3570
3539
  }), {
3571
- default: f(() => {
3572
- var v;
3540
+ default: m(() => {
3541
+ var g;
3573
3542
  return [
3574
- p(fe, { class: "block text-sm leading-6 font-medium text-gray-900" }),
3575
- y("div", {
3576
- class: k(a.value)
3543
+ d(be, { class: "block text-sm leading-6 font-medium text-gray-900" }),
3544
+ b("div", {
3545
+ class: C(a.value)
3577
3546
  }, [
3578
- p(Ha, H(o(r), { class: i.value }), null, 16, ["class"]),
3579
- (v = e.value) != null && v.errors ? (u(), b("div", Ka, [
3580
- p(o(qe), { class: "size-5 text-red-500" })
3581
- ])) : T("", !0)
3547
+ d(Fa, V(l(r), { class: u.value }), null, 16, ["class"]),
3548
+ (g = e.value) != null && g.errors ? (i(), y("div", ll, [
3549
+ d(l(De), { class: "size-5 text-red-500" })
3550
+ ])) : M("", !0)
3582
3551
  ], 2),
3583
- p(xt, { class: "mt-2 text-sm text-gray-600" }),
3584
- p(he, { class: "mt-2 text-sm text-red-600" })
3552
+ d(Rt, { class: "mt-2 text-sm text-gray-600" }),
3553
+ d(ye, { class: "mt-2 text-sm text-red-600" })
3585
3554
  ];
3586
3555
  }),
3587
3556
  _: 1
3588
3557
  }, 16, ["label", "class"]));
3589
3558
  }
3590
3559
  });
3591
- class Fl {
3560
+ class ni {
3592
3561
  constructor() {
3593
3562
  _(this, "status");
3594
3563
  _(this, "_listeners");
@@ -3596,22 +3565,22 @@ class Fl {
3596
3565
  _(this, "_cancelled");
3597
3566
  _(this, "_started");
3598
3567
  _(this, "_completed");
3599
- this.status = this.getInitialStatus(), this._listeners = new Zt(), this._started = new K(), this._completed = new K();
3568
+ this.status = this.getInitialStatus(), this._listeners = new ls(), this._started = new Q(), this._completed = new Q();
3600
3569
  }
3601
3570
  async start() {
3602
3571
  this.beforeStart(), this._started.resolve();
3603
3572
  try {
3604
3573
  await this.updateProgress(), await this.run(), await this.updateProgress(), this._completed.resolve();
3605
3574
  } catch (s) {
3606
- if (s instanceof Ue)
3575
+ if (s instanceof Ye)
3607
3576
  return;
3608
- throw ee(Xt(s), (e) => {
3577
+ throw te(is(s), (e) => {
3609
3578
  this._completed.reject(e);
3610
3579
  });
3611
3580
  }
3612
3581
  }
3613
3582
  async cancel() {
3614
- this._cancelled = new K(), await this._cancelled;
3583
+ this._cancelled = new Q(), await this._cancelled;
3615
3584
  }
3616
3585
  serialize() {
3617
3586
  return this.serializeStatus(this.status);
@@ -3646,10 +3615,10 @@ class Fl {
3646
3615
  }
3647
3616
  assertNotCancelled() {
3648
3617
  if (this._cancelled)
3649
- throw this._cancelled.resolve(), new Ue();
3618
+ throw this._cancelled.resolve(), new Ye();
3650
3619
  }
3651
3620
  calculateCurrentProgress(s) {
3652
- return s ?? (s = this.status), s.completed ? 1 : s.children ? Yt(
3621
+ return s ?? (s = this.status), s.completed ? 1 : s.children ? os(
3653
3622
  s.children.reduce((e, r) => e + this.calculateCurrentProgress(r), 0) / s.children.length,
3654
3623
  2
3655
3624
  ) : 0;
@@ -3663,147 +3632,155 @@ class Fl {
3663
3632
  return { ...s };
3664
3633
  }
3665
3634
  }
3666
- async function Ul(t) {
3635
+ async function ai(t) {
3667
3636
  await t.start();
3668
3637
  }
3669
3638
  export {
3670
- Il as AdvancedOptions,
3671
- en as AlertModal,
3639
+ Jl as AdvancedOptions,
3640
+ gn as AlertModal,
3672
3641
  A as App,
3673
- Ll as AppLayout,
3674
- Ca as AppModals,
3675
- Sa as AppOverlays,
3676
- js as AppService,
3677
- ka as AppToasts,
3678
- q as Button,
3679
- cl as Cache,
3680
- Qs as CacheService,
3681
- ql as Checkbox,
3682
- on as ConfirmModal,
3683
- zl as DropdownMenu,
3684
- qa as DropdownMenuOption,
3685
- za as DropdownMenuOptions,
3686
- Rl as EditableContent,
3687
- Pl as ErrorLogs,
3688
- Wa as ErrorLogsModal,
3689
- Al as ErrorMessage,
3690
- Rn as ErrorReportModal,
3691
- Tn as ErrorReportModalButtons,
3692
- Mn as ErrorReportModalTitle,
3693
- nt as Errors,
3694
- ll as EventListenerPriorities,
3695
- R as Events,
3696
- As as EventsService,
3697
- wt as Form,
3698
- gr as FormController,
3699
- at as HeadlessButton,
3700
- ze as HeadlessInput,
3701
- xt as HeadlessInputDescription,
3702
- he as HeadlessInputError,
3703
- _t as HeadlessInputInput,
3704
- fe as HeadlessInputLabel,
3705
- Ha as HeadlessInputTextArea,
3706
- Nr as HeadlessModal,
3707
- Wr as HeadlessModalContent,
3708
- Kr as HeadlessModalDescription,
3709
- Qr as HeadlessModalOverlay,
3710
- Jr as HeadlessModalTitle,
3711
- vr as HeadlessSelect,
3712
- Be as HeadlessSelectLabel,
3713
- pt as HeadlessSelectOption,
3714
- mt as HeadlessSelectOptions,
3715
- dt as HeadlessSelectTrigger,
3716
- ct as HeadlessSelectValue,
3717
- Ir as HeadlessSwitch,
3718
- ba as HeadlessToast,
3719
- Jn as Input,
3720
- Fl as Job,
3721
- Ue as JobCancelledError,
3642
+ Ql as AppLayout,
3643
+ Da as AppOverlays,
3644
+ er as AppService,
3645
+ Pa as AppToasts,
3646
+ R as Button,
3647
+ Rl as Cache,
3648
+ wr as CacheService,
3649
+ Zl as Checkbox,
3650
+ xn as ConfirmModal,
3651
+ Xl as DropdownMenu,
3652
+ Ka as DropdownMenuOption,
3653
+ Qa as DropdownMenuOptions,
3654
+ Gl as EditableContent,
3655
+ Yl as ErrorLogs,
3656
+ al as ErrorLogsModal,
3657
+ ei as ErrorMessage,
3658
+ Xn as ErrorReportModal,
3659
+ Fn as ErrorReportModalButtons,
3660
+ Un as ErrorReportModalTitle,
3661
+ yt as Errors,
3662
+ $l as EventListenerPriorities,
3663
+ F as Events,
3664
+ Gs as EventsService,
3665
+ Vt as Form,
3666
+ cr as FormController,
3667
+ wt as HeadlessButton,
3668
+ je as HeadlessInput,
3669
+ Rt as HeadlessInputDescription,
3670
+ ye as HeadlessInputError,
3671
+ Lt as HeadlessInputInput,
3672
+ be as HeadlessInputLabel,
3673
+ Fa as HeadlessInputTextArea,
3674
+ ln as HeadlessModal,
3675
+ on as HeadlessModalContent,
3676
+ un as HeadlessModalDescription,
3677
+ cn as HeadlessModalOverlay,
3678
+ dn as HeadlessModalTitle,
3679
+ Lr as HeadlessSelect,
3680
+ Xe as HeadlessSelectLabel,
3681
+ xt as HeadlessSelectOption,
3682
+ Ct as HeadlessSelectOptions,
3683
+ _t as HeadlessSelectTrigger,
3684
+ $t as HeadlessSelectValue,
3685
+ Qr as HeadlessSwitch,
3686
+ Ra as HeadlessToast,
3687
+ ca as Input,
3688
+ ni as Job,
3689
+ Ye as JobCancelledError,
3722
3690
  Z as Lang,
3723
- me as Layouts,
3724
- Dl as Link,
3725
- On as LoadingModal,
3726
- tt as MOBILE_BREAKPOINT,
3727
- P as Markdown,
3728
- se as Modal,
3729
- yt as ModalContext,
3730
- Fn as ProgressBar,
3731
- Gn as PromptModal,
3732
- $r as Select,
3733
- ft as SelectLabel,
3734
- Fe as SelectOption,
3735
- ht as SelectOptions,
3736
- gt as SelectTrigger,
3737
- we as Service,
3738
- Te as ServiceBootError,
3739
- Vr as Setting,
3740
- jl as SettingsModal,
3741
- ga as StartupCrash,
3742
- et as Storage,
3743
- qr as Switch,
3744
- Bl as TextArea,
3745
- ya as Toast,
3746
- z as UI,
3747
- Gs as UIService,
3748
- fl as __valueType,
3749
- qs as appNamespace,
3750
- wl as booleanInput,
3751
- $e as bootServices,
3752
- Vl as bootstrap,
3753
- _a as bootstrapApplication,
3754
- M as classes,
3755
- vl as computedAsync,
3756
- bl as computedDebounce,
3757
- $l as dateInput,
3758
- ul as defineDirective,
3759
- ml as defineFormValidationRule,
3760
- il as definePlugin,
3761
- ye as defineServiceState,
3762
- Ps as defineServiceStore,
3763
- ol as defineSettings,
3764
- Ul as dispatch,
3765
- _l as enumInput,
3766
- st as getCurrentLayout,
3767
- bt as getErrorMessage,
3768
- ir as getMarkdownRouter,
3769
- Rs as getPiniaStore,
3770
- dr as hasSelectOptionLabel,
3771
- Os as injectOrFail,
3772
- Us as injectReactive,
3773
- V as injectReactiveOrFail,
3774
- Bs as installPlugins,
3775
- Ml as numberInput,
3776
- Hl as objectInput,
3777
- hl as onCleanMounted,
3778
- it as onFormFocus,
3779
- gl as persistent,
3780
- yl as registerErrorHandler,
3781
- ur as renderMarkdown,
3782
- Ge as renderVNode,
3783
- dl as replaceExisting,
3784
- xl as requiredBooleanInput,
3785
- Cl as requiredDateInput,
3786
- kl as requiredEnumInput,
3787
- Sl as requiredNumberInput,
3788
- Tl as requiredObjectInput,
3789
- Zn as requiredStringInput,
3790
- zs as resetPiniaStore,
3791
- cr as safeHtml,
3792
- pl as setMarkdownRouter,
3793
- El as stringInput,
3794
- rt as translate,
3795
- S as translateWithDefault,
3796
- Gr as useAlertModal,
3797
- tn as useConfirmModal,
3798
- Hn as useErrorReportModal,
3799
- ot as useEvent,
3800
- ut as useForm,
3801
- Ie as useInputAttrs,
3802
- Un as useLoadingModal,
3803
- Xn as usePromptModal,
3804
- hr as validate,
3805
- fr as validateType,
3806
- de as validators,
3807
- lt as variantClasses
3691
+ ve as Layouts,
3692
+ ti as Link,
3693
+ aa as LoadingModal,
3694
+ gt as MOBILE_BREAKPOINT,
3695
+ z as Markdown,
3696
+ re as Modal,
3697
+ oi as ModalComponent,
3698
+ ui as ModalsPortal,
3699
+ ra as ProgressBar,
3700
+ fa as PromptModal,
3701
+ qr as Select,
3702
+ kt as SelectLabel,
3703
+ Ge as SelectOption,
3704
+ St as SelectOptions,
3705
+ Tt as SelectTrigger,
3706
+ Ce as Service,
3707
+ Ee as ServiceBootError,
3708
+ Wr as Setting,
3709
+ si as SettingsModal,
3710
+ Ea as StartupCrash,
3711
+ ht as Storage,
3712
+ Jr as Switch,
3713
+ ri as TextArea,
3714
+ za as Toast,
3715
+ P as UI,
3716
+ kr as UIService,
3717
+ Tl as __valueType,
3718
+ br as aerogelDirectives,
3719
+ Qs as appNamespace,
3720
+ ql as booleanInput,
3721
+ ke as bootServices,
3722
+ Kl as bootstrap,
3723
+ Aa as bootstrapApplication,
3724
+ H as classes,
3725
+ ci as closeModal,
3726
+ Vl as computedAsync,
3727
+ El as computedDebounce,
3728
+ di as createModal,
3729
+ Al as dateInput,
3730
+ Cl as defineDirective,
3731
+ Sl as defineFormValidationRule,
3732
+ xl as definePlugin,
3733
+ xe as defineServiceState,
3734
+ Xs as defineServiceStore,
3735
+ _l as defineSettings,
3736
+ ai as dispatch,
3737
+ Pl as enumInput,
3738
+ vt as getCurrentLayout,
3739
+ Ht as getErrorMessage,
3740
+ hr as getMarkdownRouter,
3741
+ Zs as getPiniaStore,
3742
+ Er as hasSelectOptionLabel,
3743
+ pi as injectModal,
3744
+ nr as injectOrFail,
3745
+ rr as injectReactive,
3746
+ I as injectReactiveOrFail,
3747
+ tr as installPlugins,
3748
+ mi as modals,
3749
+ Ol as numberInput,
3750
+ Nl as objectInput,
3751
+ Ml as onCleanMounted,
3752
+ pt as onFormFocus,
3753
+ Hl as persistent,
3754
+ dr as reactiveSet,
3755
+ Il as registerErrorHandler,
3756
+ gr as renderMarkdown,
3757
+ ct as renderVNode,
3758
+ zl as replaceExisting,
3759
+ Dl as requiredBooleanInput,
3760
+ jl as requiredDateInput,
3761
+ Bl as requiredEnumInput,
3762
+ Fl as requiredNumberInput,
3763
+ Ul as requiredObjectInput,
3764
+ da as requiredStringInput,
3765
+ Js as resetPiniaStore,
3766
+ ft as safeHtml,
3767
+ Ll as setMarkdownRouter,
3768
+ fi as showModal,
3769
+ Wl as stringInput,
3770
+ bt as translate,
3771
+ k as translateWithDefault,
3772
+ hn as useAlertModal,
3773
+ vn as useConfirmModal,
3774
+ On as useErrorReportModal,
3775
+ kl as useEvent,
3776
+ mt as useForm,
3777
+ Ae as useInputAttrs,
3778
+ na as useLoadingModal,
3779
+ Pe as useModal,
3780
+ pa as usePromptModal,
3781
+ ur as validate,
3782
+ or as validateType,
3783
+ he as validators,
3784
+ dt as variantClasses
3808
3785
  };
3809
3786
  //# sourceMappingURL=aerogel-core.js.map