@aerogel/core 0.0.0-next.8ae083000611b11799d37033e9a5250d0d07c324 → 0.0.0-next.8bd66d5f5e264650120ea3cc37519f2409c6cc39

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