@aerogel/core 0.1.1-next.b25730fd2850ebabef064973972dabd342d92769 → 0.1.1-next.c3c3c32e9b674ba4ae2d33973d4659e37c863c35

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