@aerogel/core 0.0.0-next.ea2e864c719d0a4d01b04729a9b681c0e9c85ea7 → 0.0.0-next.ec720bb060627e76b204dc15f6bf955d11a77cbc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aerogel-core.d.ts +33 -2
- package/dist/aerogel-core.js +687 -644
- package/dist/aerogel-core.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/Setting.vue +31 -0
- package/src/components/ui/index.ts +1 -0
- package/src/errors/settings/Debug.vue +7 -14
- package/src/testing/index.ts +4 -0
- package/src/ui/UI.ts +20 -4
package/dist/aerogel-core.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var xt = Object.defineProperty;
|
|
2
2
|
var Ct = (t, s, e) => s in t ? xt(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
3
|
-
var
|
|
4
|
-
import { markRaw as P, Comment as
|
|
5
|
-
import { JSError as
|
|
3
|
+
var $ = (t, s, e) => Ct(t, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
+
import { markRaw as P, Comment as St, Text as kt, Static as Mt, inject as se, reactive as pe, nextTick as qe, 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 J, onUnmounted as fe, ref as B, readonly as he, useAttrs as Fe, onMounted as Et, watch as Ee, toRaw as Ht, watchEffect as Z, createVNode as m, normalizeProps as re, guardReactiveProps as ne, createTextVNode as A, toDisplayString as S, normalizeClass as C, createElementBlock as b, Fragment as j, renderList as F, provide as ae, resolveDynamicComponent as N, useSlots as He, createCommentVNode as M, createElementVNode as y, h as Vt, toRef as Te, useTemplateRef as le, withModifiers as Ue, withDirectives as Oe, vModelCheckbox as Lt, normalizeStyle as It, createApp as Tt, vModelText as Rt } from "vue";
|
|
5
|
+
import { JSError as ge, tap as X, MagicObject as Ne, PromisedValue as W, Storage as U, objectOnly as oe, arrayFrom as We, isEmpty as $e, objectDeepClone as Pt, fail as K, facade as Y, arrayRemove as Ce, getEnv as At, updateLocationQueryParameters as zt, forever as Dt, toString as q, isDevelopment as ee, isTesting as Ve, after as ce, uuid as te, required as jt, isObject as ue, objectWithoutEmpty as Ke, stringMatchAll as Qe, objectWithout as Bt, noop as qt, debounce as Ft, value as Ut, isInstanceOf as Re, stringExcerpt as Ot, arraySorted as Nt, ListenersManager as Wt, toError as Kt, round as Qt } from "@noeldemartin/utils";
|
|
6
6
|
import O from "virtual:aerogel";
|
|
7
7
|
import { createPinia as Jt, setActivePinia as Zt, defineStore as Xt } from "pinia";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
class
|
|
8
|
+
import Yt from "dompurify";
|
|
9
|
+
import { marked as Gt, Renderer as Pe } from "marked";
|
|
10
|
+
import es from "clsx";
|
|
11
|
+
import { cva as ts } from "class-variance-authority";
|
|
12
|
+
import { twMerge as ss } from "tailwind-merge";
|
|
13
|
+
import { Primitive as rs, SelectValue as Ae, SelectTrigger as ns, SelectIcon as as, SelectItem as ls, SelectItemText as os, SelectPortal as is, SelectContent as cs, SelectViewport as us, SelectRoot as ds, Label as ps, useForwardExpose as Le, SwitchRoot as ms, SwitchThumb as fs, DialogRoot as hs, DialogPortal as gs, DialogContent as vs, DialogDescription as bs, DialogOverlay as ys, DialogTitle as ws, ToastClose as $s, ToastRoot as _s, ToastProvider as xs, ToastViewport as Cs, DropdownMenuItem as Ss, DropdownMenuContent as ks, DropdownMenuRoot as Ms, DropdownMenuTrigger as Es, DropdownMenuPortal as Hs } from "reka-ui";
|
|
14
|
+
class Se extends ge {
|
|
15
15
|
constructor(s, e) {
|
|
16
16
|
super(`Service '${s}' failed booting`, { cause: e });
|
|
17
17
|
}
|
|
@@ -31,9 +31,9 @@ function Ls() {
|
|
|
31
31
|
function Is(t, s) {
|
|
32
32
|
return Je(), Xt(t, s)();
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ve(t) {
|
|
35
35
|
var s;
|
|
36
|
-
return s = class extends
|
|
36
|
+
return s = class extends be {
|
|
37
37
|
usesStore() {
|
|
38
38
|
return !0;
|
|
39
39
|
}
|
|
@@ -67,17 +67,17 @@ 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
|
-
},
|
|
70
|
+
}, $(s, "persist", t.persist ?? []), s;
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
let
|
|
72
|
+
var xe;
|
|
73
|
+
let be = (xe = class extends Ne {
|
|
74
74
|
constructor() {
|
|
75
75
|
super();
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
$(this, "_name");
|
|
77
|
+
$(this, "_booted");
|
|
78
|
+
$(this, "_computedStateKeys");
|
|
79
|
+
$(this, "_watchers");
|
|
80
|
+
$(this, "_store");
|
|
81
81
|
const e = this.getComputedStateDefinition();
|
|
82
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() && Is(this._name, {
|
|
83
83
|
state: () => this.getInitialState(),
|
|
@@ -92,7 +92,7 @@ let ve = ($e = class extends Ne {
|
|
|
92
92
|
return super.static(e);
|
|
93
93
|
}
|
|
94
94
|
launch() {
|
|
95
|
-
const e = (r) => this._booted.reject(new
|
|
95
|
+
const e = (r) => this._booted.reject(new Se(this._name, r));
|
|
96
96
|
try {
|
|
97
97
|
this.frameworkBoot().then(() => this.boot()).then(() => this._booted.resolve()).catch(e);
|
|
98
98
|
} catch (r) {
|
|
@@ -120,7 +120,7 @@ let ve = ($e = class extends Ne {
|
|
|
120
120
|
if (!this._store)
|
|
121
121
|
return;
|
|
122
122
|
const r = We(e), n = oe(this._store.$state, r);
|
|
123
|
-
|
|
123
|
+
$e(n) || this.onPersistentStateUpdated(n);
|
|
124
124
|
}
|
|
125
125
|
__get(e) {
|
|
126
126
|
return this.hasState(e) ? this.getState(e) : super.__get(e);
|
|
@@ -130,7 +130,7 @@ let ve = ($e = class extends Ne {
|
|
|
130
130
|
}
|
|
131
131
|
onStateUpdated(e, r) {
|
|
132
132
|
const n = oe(e, this.static("persist"));
|
|
133
|
-
|
|
133
|
+
$e(n) || this.onPersistentStateUpdated(n);
|
|
134
134
|
for (const a in e) {
|
|
135
135
|
const i = this._watchers[a];
|
|
136
136
|
!i || e[a] === r[a] || i.call(this, e[a], r[a]);
|
|
@@ -170,7 +170,7 @@ let ve = ($e = class extends Ne {
|
|
|
170
170
|
async boot() {
|
|
171
171
|
}
|
|
172
172
|
restorePersistedState() {
|
|
173
|
-
if (!(!this.usesStore() ||
|
|
173
|
+
if (!(!this.usesStore() || $e(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));
|
|
@@ -182,16 +182,16 @@ let ve = ($e = class extends Ne {
|
|
|
182
182
|
requireStore() {
|
|
183
183
|
return this._store ? this._store : K(`Failed getting '${this._name}' store`);
|
|
184
184
|
}
|
|
185
|
-
},
|
|
185
|
+
}, $(xe, "persist", []), xe);
|
|
186
186
|
const qa = {
|
|
187
187
|
Low: -256,
|
|
188
188
|
Default: 0,
|
|
189
189
|
High: 256
|
|
190
190
|
};
|
|
191
|
-
class Ts extends
|
|
191
|
+
class Ts extends be {
|
|
192
192
|
constructor() {
|
|
193
193
|
super(...arguments);
|
|
194
|
-
|
|
194
|
+
$(this, "listeners", {});
|
|
195
195
|
}
|
|
196
196
|
async boot() {
|
|
197
197
|
Object.entries(globalThis.__aerogelEvents__ ?? {}).forEach(([e, r]) => (
|
|
@@ -203,7 +203,7 @@ class Ts extends ve {
|
|
|
203
203
|
var a;
|
|
204
204
|
const n = this.listeners[e] ?? { priorities: [], handlers: {} };
|
|
205
205
|
for (const i of n.priorities)
|
|
206
|
-
await Promise.all(((a = n.handlers[i]) == null ? void 0 : a.map((
|
|
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 */
|
|
@@ -215,11 +215,11 @@ class Ts extends ve {
|
|
|
215
215
|
/* eslint-enable max-len */
|
|
216
216
|
once(e, r, n) {
|
|
217
217
|
let a = null;
|
|
218
|
-
const i = typeof r == "function" ? {} : r,
|
|
218
|
+
const i = typeof r == "function" ? {} : r, l = typeof r == "function" ? r : n;
|
|
219
219
|
return X(
|
|
220
220
|
() => a && this.off(e, a),
|
|
221
221
|
(d) => {
|
|
222
|
-
a = (...v) => (d(),
|
|
222
|
+
a = (...v) => (d(), l(...v)), this.registerListener(e, i, l);
|
|
223
223
|
}
|
|
224
224
|
);
|
|
225
225
|
}
|
|
@@ -229,23 +229,23 @@ class Ts extends ve {
|
|
|
229
229
|
if (!n)
|
|
230
230
|
return;
|
|
231
231
|
const a = [...n.priorities];
|
|
232
|
-
for (const
|
|
233
|
-
|
|
232
|
+
for (const l of a)
|
|
233
|
+
Ce(n.handlers[l] ?? [], r), ((i = n.handlers[l]) == null ? void 0 : i.length) === 0 && (delete n.handlers[l], Ce(n.priorities, l));
|
|
234
234
|
n.priorities.length === 0 && delete this.listeners[e];
|
|
235
235
|
}
|
|
236
236
|
registerListener(e, r, n) {
|
|
237
|
-
var d, v,
|
|
237
|
+
var d, v, x;
|
|
238
238
|
const a = r.priority ?? 0;
|
|
239
239
|
e in this.listeners || (this.listeners[e] = { priorities: [], handlers: {} });
|
|
240
|
-
const i = ((d = this.listeners[e]) == null ? void 0 : d.priorities) ?? K(`priorities missing for event '${e}'`),
|
|
241
|
-
i.includes(a) || (i.push(a), i.sort((
|
|
240
|
+
const i = ((d = this.listeners[e]) == null ? void 0 : d.priorities) ?? K(`priorities missing for event '${e}'`), l = ((v = this.listeners[e]) == null ? void 0 : v.handlers) ?? K(`handlers missing for event '${e}'`);
|
|
241
|
+
i.includes(a) || (i.push(a), i.sort((p, _) => _ - p), l[a] = []), (x = l[a]) == null || x.push(n);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
const I =
|
|
244
|
+
const I = Y(Ts);
|
|
245
245
|
function Fa(t) {
|
|
246
246
|
return t;
|
|
247
247
|
}
|
|
248
|
-
const Rs =
|
|
248
|
+
const Rs = ve({
|
|
249
249
|
name: "app",
|
|
250
250
|
initialState: {
|
|
251
251
|
plugins: {},
|
|
@@ -270,9 +270,9 @@ const Rs = ge({
|
|
|
270
270
|
class Ps extends Rs {
|
|
271
271
|
constructor() {
|
|
272
272
|
super(...arguments);
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
$(this, "name", O.name);
|
|
274
|
+
$(this, "ready", new W());
|
|
275
|
+
$(this, "mounted", new W());
|
|
276
276
|
}
|
|
277
277
|
isReady() {
|
|
278
278
|
return this.ready.isResolved();
|
|
@@ -300,7 +300,7 @@ class Ps extends Rs {
|
|
|
300
300
|
I.once("application-ready", () => this.ready.resolve()), I.once("application-mounted", () => this.mounted.resolve());
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
const D =
|
|
303
|
+
const D = Y(Ps);
|
|
304
304
|
function Ua(t) {
|
|
305
305
|
return t;
|
|
306
306
|
}
|
|
@@ -321,7 +321,7 @@ function Oa(t) {
|
|
|
321
321
|
}
|
|
322
322
|
function Ds(t) {
|
|
323
323
|
const s = se(t);
|
|
324
|
-
return s ?
|
|
324
|
+
return s ? pe(s) : void 0;
|
|
325
325
|
}
|
|
326
326
|
function V(t, s) {
|
|
327
327
|
return Ds(t) ?? K(s ?? `Could not resolve '${q(t)}' injection key`);
|
|
@@ -330,7 +330,7 @@ function js(t, s) {
|
|
|
330
330
|
return se(t) ?? K(s ?? `Could not resolve '${q(t)}' injection key`);
|
|
331
331
|
}
|
|
332
332
|
function Ze(t) {
|
|
333
|
-
return typeof t == "string" ? t : t.type ===
|
|
333
|
+
return typeof t == "string" ? t : t.type === St ? "" : t.type === kt || t.type === Mt ? t.children : t.type === "br" ? `
|
|
334
334
|
|
|
335
335
|
` : `<${t.type} ${zs(t)}>${Array.from(t.children).map(Ze).join("")}</${t.type}>`;
|
|
336
336
|
}
|
|
@@ -358,10 +358,10 @@ const _e = /* @__PURE__ */ new WeakMap(), Bs = {
|
|
|
358
358
|
t.directive(r, n);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
class Us extends
|
|
361
|
+
class Us extends be {
|
|
362
362
|
constructor() {
|
|
363
363
|
super(...arguments);
|
|
364
|
-
|
|
364
|
+
$(this, "cache");
|
|
365
365
|
}
|
|
366
366
|
async get(e) {
|
|
367
367
|
return await (await this.open()).match(e) ?? null;
|
|
@@ -379,13 +379,13 @@ class Us extends ve {
|
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
const Na =
|
|
383
|
-
class Os extends
|
|
382
|
+
const Na = Y(Us);
|
|
383
|
+
class Os extends be {
|
|
384
384
|
async purge() {
|
|
385
385
|
await I.emit("purge-storage");
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
-
const Ns =
|
|
388
|
+
const Ns = Y(Os);
|
|
389
389
|
function Wa(t, s) {
|
|
390
390
|
return {
|
|
391
391
|
...t,
|
|
@@ -397,7 +397,7 @@ const Ws = {
|
|
|
397
397
|
$events: I,
|
|
398
398
|
$storage: Ns
|
|
399
399
|
};
|
|
400
|
-
async function
|
|
400
|
+
async function ye(t, s) {
|
|
401
401
|
await Promise.all(
|
|
402
402
|
Object.entries(s).map(async ([e, r]) => {
|
|
403
403
|
await r.launch().catch((n) => {
|
|
@@ -414,33 +414,33 @@ const Ks = {
|
|
|
414
414
|
...Ws,
|
|
415
415
|
...s.services
|
|
416
416
|
};
|
|
417
|
-
t.use(Ls()), (r = s.settings) == null || r.forEach((n) => D.addSetting(n)), await
|
|
417
|
+
t.use(Ls()), (r = s.settings) == null || r.forEach((n) => D.addSetting(n)), await ye(t, e);
|
|
418
418
|
}
|
|
419
|
-
}, Xe = 768,
|
|
419
|
+
}, Xe = 768, me = {
|
|
420
420
|
Mobile: "mobile",
|
|
421
421
|
Desktop: "desktop"
|
|
422
422
|
};
|
|
423
|
-
function
|
|
424
|
-
return globalThis.innerWidth > Xe ?
|
|
423
|
+
function Ye() {
|
|
424
|
+
return globalThis.innerWidth > Xe ? me.Desktop : me.Mobile;
|
|
425
425
|
}
|
|
426
|
-
const Qs =
|
|
426
|
+
const Qs = ve({
|
|
427
427
|
name: "ui",
|
|
428
428
|
initialState: {
|
|
429
429
|
modals: [],
|
|
430
430
|
toasts: [],
|
|
431
|
-
layout:
|
|
431
|
+
layout: Ye()
|
|
432
432
|
},
|
|
433
433
|
computed: {
|
|
434
|
-
desktop: ({ layout: t }) => t ===
|
|
435
|
-
mobile: ({ layout: t }) => t ===
|
|
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
439
|
class Js extends Qs {
|
|
440
440
|
constructor() {
|
|
441
441
|
super(...arguments);
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
$(this, "modalCallbacks", {});
|
|
443
|
+
$(this, "components", {});
|
|
444
444
|
}
|
|
445
445
|
registerComponent(e, r) {
|
|
446
446
|
this.components[e] = r;
|
|
@@ -470,16 +470,16 @@ class Js extends Qs {
|
|
|
470
470
|
title: e,
|
|
471
471
|
message: r,
|
|
472
472
|
required: !!(n != null && n.required)
|
|
473
|
-
},
|
|
474
|
-
(
|
|
475
|
-
[
|
|
476
|
-
...
|
|
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
|
+
(x, [p, { default: _ }]) => ({
|
|
475
|
+
[p]: _ ?? !1,
|
|
476
|
+
...x
|
|
477
477
|
}),
|
|
478
478
|
{}
|
|
479
479
|
);
|
|
480
|
-
for (const [
|
|
481
|
-
if (!(!
|
|
482
|
-
return d && ee() && console.warn(`Confirmed confirm modal was suppressed because required '${
|
|
480
|
+
for (const [x, p] of Object.entries(i.checkboxes ?? {}))
|
|
481
|
+
if (!(!p.required || v[x]))
|
|
482
|
+
return d && ee() && console.warn(`Confirmed confirm modal was suppressed because required '${x}' checkbox was missing`), [!1, v];
|
|
483
483
|
return "checkboxes" in i ? [d, v] : d;
|
|
484
484
|
}
|
|
485
485
|
async prompt(e, r, n) {
|
|
@@ -490,22 +490,35 @@ class Js extends Qs {
|
|
|
490
490
|
title: e,
|
|
491
491
|
message: r,
|
|
492
492
|
...n ?? {}
|
|
493
|
-
},
|
|
494
|
-
return (a && typeof
|
|
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 = (
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
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, ..._ } = e;
|
|
506
|
+
return {
|
|
507
|
+
props: _,
|
|
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 x = await this.modal(this.requireComponent("loading-modal"), d);
|
|
504
517
|
try {
|
|
505
|
-
const
|
|
506
|
-
return await
|
|
518
|
+
const p = await l;
|
|
519
|
+
return await ce({ ms: 500 }), p;
|
|
507
520
|
} finally {
|
|
508
|
-
await this.closeModal(
|
|
521
|
+
await this.closeModal(x.id);
|
|
509
522
|
}
|
|
510
523
|
}
|
|
511
524
|
toast(e, r = {}) {
|
|
@@ -524,8 +537,8 @@ class Js extends Qs {
|
|
|
524
537
|
component: P(e),
|
|
525
538
|
beforeClose: new Promise((d) => a.willClose = d),
|
|
526
539
|
afterClose: new Promise((d) => a.hasClosed = d)
|
|
527
|
-
},
|
|
528
|
-
return this.modalCallbacks[i.id] = a, this.setState({ modals:
|
|
540
|
+
}, l = this.modals.concat(i);
|
|
541
|
+
return this.modalCallbacks[i.id] = a, this.setState({ modals: l }), await qe(), i;
|
|
529
542
|
}
|
|
530
543
|
async modalForm(e, r) {
|
|
531
544
|
return await (await this.modal(e, r)).beforeClose;
|
|
@@ -554,7 +567,7 @@ class Js extends Qs {
|
|
|
554
567
|
watchModalEvents() {
|
|
555
568
|
I.on("modal-will-close", ({ modal: { id: e }, result: r }) => {
|
|
556
569
|
var a, i;
|
|
557
|
-
const n = this.modals.find((
|
|
570
|
+
const n = this.modals.find((l) => e === l.id);
|
|
558
571
|
n && (n.closing = !0), (i = (a = this.modalCallbacks[e]) == null ? void 0 : a.willClose) == null || i.call(a, r);
|
|
559
572
|
}), I.on("modal-has-closed", async ({ modal: { id: e }, result: r }) => {
|
|
560
573
|
await this.removeModal(e, r);
|
|
@@ -565,16 +578,16 @@ class Js extends Qs {
|
|
|
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
|
|
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: ${Xe}px)`).addEventListener("change", () => this.setState({ layout:
|
|
587
|
+
globalThis.matchMedia(`(min-width: ${Xe}px)`).addEventListener("change", () => this.setState({ layout: Ye() }));
|
|
575
588
|
}
|
|
576
589
|
}
|
|
577
|
-
const R =
|
|
590
|
+
const R = Y(Js);
|
|
578
591
|
class Zs {
|
|
579
592
|
constructor(s, e) {
|
|
580
593
|
this.locale = s, this.fallbackLocale = e;
|
|
@@ -601,7 +614,7 @@ class Zs {
|
|
|
601
614
|
return ee() && console.warn("Lang provider is missing"), e;
|
|
602
615
|
}
|
|
603
616
|
}
|
|
604
|
-
const Xs =
|
|
617
|
+
const Xs = ve({
|
|
605
618
|
name: "lang",
|
|
606
619
|
persist: ["locale", "fallbackLocale"],
|
|
607
620
|
initialState: {
|
|
@@ -610,10 +623,10 @@ const Xs = ge({
|
|
|
610
623
|
fallbackLocale: "en"
|
|
611
624
|
}
|
|
612
625
|
});
|
|
613
|
-
class
|
|
626
|
+
class Ys extends Xs {
|
|
614
627
|
constructor() {
|
|
615
628
|
super();
|
|
616
|
-
|
|
629
|
+
$(this, "provider");
|
|
617
630
|
this.provider = new Zs(
|
|
618
631
|
this.getState("locale") ?? this.getBrowserLocale(),
|
|
619
632
|
this.getState("fallbackLocale")
|
|
@@ -642,7 +655,7 @@ class Gs extends Xs {
|
|
|
642
655
|
);
|
|
643
656
|
}
|
|
644
657
|
}
|
|
645
|
-
const Q =
|
|
658
|
+
const Q = Y(Ys), Ge = Q.translate.bind(Q), k = Q.translateWithDefault.bind(Q), Gs = ve({
|
|
646
659
|
name: "errors",
|
|
647
660
|
initialState: {
|
|
648
661
|
logs: [],
|
|
@@ -654,11 +667,11 @@ const Q = G(Gs), Ye = Q.translate.bind(Q), S = Q.translateWithDefault.bind(Q), Y
|
|
|
654
667
|
hasStartupErrors: ({ startupErrors: t }) => t.length > 0
|
|
655
668
|
}
|
|
656
669
|
});
|
|
657
|
-
class er extends
|
|
670
|
+
class er extends Gs {
|
|
658
671
|
constructor() {
|
|
659
672
|
super(...arguments);
|
|
660
|
-
|
|
661
|
-
|
|
673
|
+
$(this, "forceReporting", !1);
|
|
674
|
+
$(this, "enabled", !0);
|
|
662
675
|
}
|
|
663
676
|
enable() {
|
|
664
677
|
this.enabled = !0;
|
|
@@ -668,7 +681,7 @@ class er extends Ys {
|
|
|
668
681
|
}
|
|
669
682
|
async inspect(e, r) {
|
|
670
683
|
if (Array.isArray(e) && e.length === 0) {
|
|
671
|
-
R.alert(
|
|
684
|
+
R.alert(k("errors.inspectEmpty", "Nothing to inspect!"));
|
|
672
685
|
return;
|
|
673
686
|
}
|
|
674
687
|
const n = Array.isArray(e) ? e[0] : this.isErrorReport(e) ? e : await this.createErrorReport(e), a = Array.isArray(e) ? e : r ?? [n];
|
|
@@ -688,12 +701,12 @@ class er extends Ys {
|
|
|
688
701
|
date: /* @__PURE__ */ new Date()
|
|
689
702
|
};
|
|
690
703
|
R.toast(
|
|
691
|
-
r ??
|
|
704
|
+
r ?? k("errors.notice", "Something went wrong, but it's not your fault. Try again!"),
|
|
692
705
|
{
|
|
693
706
|
variant: "danger",
|
|
694
707
|
actions: [
|
|
695
708
|
{
|
|
696
|
-
label:
|
|
709
|
+
label: k("errors.viewDetails", "View details"),
|
|
697
710
|
dismiss: !0,
|
|
698
711
|
click: () => R.modal(R.requireComponent("error-report-modal"), { report: n, reports: [n] })
|
|
699
712
|
}
|
|
@@ -718,27 +731,27 @@ class er extends Ys {
|
|
|
718
731
|
});
|
|
719
732
|
}
|
|
720
733
|
logError(e) {
|
|
721
|
-
console.error(e),
|
|
734
|
+
console.error(e), ue(e) && e.cause && this.logError(e.cause);
|
|
722
735
|
}
|
|
723
736
|
isErrorReport(e) {
|
|
724
|
-
return
|
|
737
|
+
return ue(e) && "title" in e;
|
|
725
738
|
}
|
|
726
739
|
async createErrorReport(e) {
|
|
727
|
-
return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof
|
|
740
|
+
return typeof e == "string" ? { title: e } : e instanceof Error || e instanceof ge ? this.createErrorReportFromError(e) : ue(e) ? Ke({
|
|
728
741
|
title: q(
|
|
729
|
-
e.name ?? e.title ??
|
|
742
|
+
e.name ?? e.title ?? k("errors.unknown", "Unknown Error")
|
|
730
743
|
),
|
|
731
744
|
description: q(
|
|
732
|
-
e.message ?? e.description ??
|
|
745
|
+
e.message ?? e.description ?? k("errors.unknownDescription", "Unknown error object")
|
|
733
746
|
),
|
|
734
747
|
error: e
|
|
735
748
|
}) : {
|
|
736
|
-
title:
|
|
749
|
+
title: k("errors.unknown", "Unknown Error"),
|
|
737
750
|
error: e
|
|
738
751
|
};
|
|
739
752
|
}
|
|
740
753
|
async createStartupErrorReport(e) {
|
|
741
|
-
return e instanceof
|
|
754
|
+
return e instanceof Se ? e.cause instanceof Se ? null : this.createErrorReport(e.cause) : this.createErrorReport(e);
|
|
742
755
|
}
|
|
743
756
|
createErrorReportFromError(e, r = {}) {
|
|
744
757
|
return {
|
|
@@ -750,93 +763,23 @@ class er extends Ys {
|
|
|
750
763
|
};
|
|
751
764
|
}
|
|
752
765
|
}
|
|
753
|
-
const et =
|
|
754
|
-
inheritAttrs: !1,
|
|
755
|
-
__name: "HeadlessSwitch",
|
|
756
|
-
props: {
|
|
757
|
-
name: {},
|
|
758
|
-
label: {},
|
|
759
|
-
description: {},
|
|
760
|
-
modelValue: {},
|
|
761
|
-
class: {},
|
|
762
|
-
labelClass: {},
|
|
763
|
-
inputClass: {},
|
|
764
|
-
thumbClass: {}
|
|
765
|
-
},
|
|
766
|
-
emits: ["update:modelValue"],
|
|
767
|
-
setup(t, { expose: s, emit: e }) {
|
|
768
|
-
const r = e, n = se("form", null), a = u(() => !n || !t.name ? null : n.errors[t.name] ?? null), i = {
|
|
769
|
-
id: `switch-${te()}`,
|
|
770
|
-
name: u(() => t.name),
|
|
771
|
-
label: u(() => t.label),
|
|
772
|
-
description: u(() => t.description),
|
|
773
|
-
value: u(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
|
|
774
|
-
errors: me(a),
|
|
775
|
-
required: u(() => {
|
|
776
|
-
if (!(!t.name || !n))
|
|
777
|
-
return n.getFieldRules(t.name).includes("required");
|
|
778
|
-
}),
|
|
779
|
-
update(o) {
|
|
780
|
-
if (n && t.name) {
|
|
781
|
-
n.setFieldValue(t.name, o);
|
|
782
|
-
return;
|
|
783
|
-
}
|
|
784
|
-
r("update:modelValue", o);
|
|
785
|
-
}
|
|
786
|
-
};
|
|
787
|
-
return s(i), J(() => {
|
|
788
|
-
!t.description && !a.value || console.warn("Errors and description not implemented in <HeadlessSwitch>");
|
|
789
|
-
}), (o, d) => (c(), b("div", {
|
|
790
|
-
class: k(t.class)
|
|
791
|
-
}, [
|
|
792
|
-
o.label ? (c(), b("label", {
|
|
793
|
-
key: 0,
|
|
794
|
-
for: i.id,
|
|
795
|
-
class: k(o.labelClass)
|
|
796
|
-
}, $(o.label), 11, tr)) : M("", !0),
|
|
797
|
-
p(l(Gt), H({
|
|
798
|
-
id: i.id,
|
|
799
|
-
name: o.name,
|
|
800
|
-
"model-value": i.value.value
|
|
801
|
-
}, o.$attrs, {
|
|
802
|
-
class: o.inputClass,
|
|
803
|
-
"onUpdate:modelValue": d[0] || (d[0] = (v) => o.$emit("update:modelValue", v))
|
|
804
|
-
}), {
|
|
805
|
-
default: f(() => [
|
|
806
|
-
p(l(Yt), {
|
|
807
|
-
class: k(o.thumbClass)
|
|
808
|
-
}, null, 8, ["class"])
|
|
809
|
-
]),
|
|
810
|
-
_: 1
|
|
811
|
-
}, 16, ["id", "name", "model-value", "class"])
|
|
812
|
-
], 2));
|
|
813
|
-
}
|
|
814
|
-
}), rr = /* @__PURE__ */ g({
|
|
815
|
-
__name: "Switch",
|
|
816
|
-
setup(t) {
|
|
817
|
-
return (s, e) => (c(), h(sr, {
|
|
818
|
-
class: "flex flex-row items-center gap-1",
|
|
819
|
-
"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",
|
|
820
|
-
"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"
|
|
821
|
-
}));
|
|
822
|
-
}
|
|
823
|
-
});
|
|
766
|
+
const et = Y(er);
|
|
824
767
|
let ie = null;
|
|
825
|
-
function
|
|
826
|
-
return X(new
|
|
768
|
+
function tr() {
|
|
769
|
+
return X(new Pe(), (t) => {
|
|
827
770
|
t.link = function(s) {
|
|
828
|
-
const e =
|
|
771
|
+
const e = Pe.prototype.link.apply(this, [s]);
|
|
829
772
|
return s.href.startsWith("#") ? e : e.replace("<a", '<a target="_blank"');
|
|
830
773
|
};
|
|
831
774
|
});
|
|
832
775
|
}
|
|
833
|
-
function
|
|
776
|
+
function sr(t) {
|
|
834
777
|
const s = Qe(t, /<a[^>]*href="#action:([^"]+)"[^>]*>([^<]+)<\/a>/g);
|
|
835
778
|
for (const [e, r, n] of s)
|
|
836
779
|
t = t.replace(e, `<button type="button" data-markdown-action="${r}">${n}</button>`);
|
|
837
780
|
return t;
|
|
838
781
|
}
|
|
839
|
-
function
|
|
782
|
+
function rr(t) {
|
|
840
783
|
const s = Qe(t, /<a[^>]*href="#route:([^"]+)"[^>]*>([^<]+)<\/a>/g);
|
|
841
784
|
for (const [e, r, n] of s) {
|
|
842
785
|
const a = (ie == null ? void 0 : ie.resolve(r)) ?? r;
|
|
@@ -844,18 +787,18 @@ function lr(t) {
|
|
|
844
787
|
}
|
|
845
788
|
return t;
|
|
846
789
|
}
|
|
847
|
-
function
|
|
790
|
+
function nr() {
|
|
848
791
|
return ie;
|
|
849
792
|
}
|
|
850
793
|
function Ka(t) {
|
|
851
794
|
ie = t;
|
|
852
795
|
}
|
|
853
|
-
function
|
|
854
|
-
let s =
|
|
855
|
-
return s =
|
|
796
|
+
function ar(t) {
|
|
797
|
+
let s = Gt(t, { renderer: tr(), async: !1 });
|
|
798
|
+
return s = lr(s), s = sr(s), s = rr(s), s;
|
|
856
799
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
800
|
+
function lr(t) {
|
|
801
|
+
return Yt.sanitize(t, { ADD_ATTR: ["target"] });
|
|
859
802
|
}
|
|
860
803
|
const tt = /* @__PURE__ */ g({
|
|
861
804
|
__name: "HeadlessButton",
|
|
@@ -888,7 +831,7 @@ const tt = /* @__PURE__ */ g({
|
|
|
888
831
|
as: "button",
|
|
889
832
|
type: t.submit ? "submit" : "button"
|
|
890
833
|
});
|
|
891
|
-
return (e, r) => (c(), h(
|
|
834
|
+
return (e, r) => (c(), h(o(rs), H({
|
|
892
835
|
class: t.class,
|
|
893
836
|
"as-child": e.asChild,
|
|
894
837
|
disabled: e.disabled
|
|
@@ -901,11 +844,11 @@ const tt = /* @__PURE__ */ g({
|
|
|
901
844
|
}
|
|
902
845
|
});
|
|
903
846
|
function st(t, s) {
|
|
904
|
-
const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, i =
|
|
905
|
-
return E(i(r),
|
|
847
|
+
const { baseClasses: e, ...r } = t, { baseClasses: n, ...a } = s, i = ts(n, a);
|
|
848
|
+
return E(i(r), o(e));
|
|
906
849
|
}
|
|
907
850
|
function E(...t) {
|
|
908
|
-
return
|
|
851
|
+
return ss(es(t));
|
|
909
852
|
}
|
|
910
853
|
const z = /* @__PURE__ */ g({
|
|
911
854
|
__name: "Button",
|
|
@@ -923,7 +866,7 @@ const z = /* @__PURE__ */ g({
|
|
|
923
866
|
as: {}
|
|
924
867
|
},
|
|
925
868
|
setup(t) {
|
|
926
|
-
const s =
|
|
869
|
+
const s = J(t, ["class", "size", "variant", "disabled"]), e = u(() => st(
|
|
927
870
|
{ baseClasses: t.class, variant: t.variant, size: t.size, disabled: t.disabled },
|
|
928
871
|
{
|
|
929
872
|
baseClasses: "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
@@ -1029,38 +972,38 @@ const z = /* @__PURE__ */ g({
|
|
|
1029
972
|
}, 16, ["class", "disabled"]));
|
|
1030
973
|
}
|
|
1031
974
|
});
|
|
1032
|
-
function
|
|
975
|
+
function or(t) {
|
|
1033
976
|
return typeof t == "object" && t !== null && "label" in t;
|
|
1034
977
|
}
|
|
1035
978
|
function rt(t, s) {
|
|
1036
979
|
const e = I.on(t, s);
|
|
1037
980
|
fe(() => e());
|
|
1038
981
|
}
|
|
1039
|
-
const
|
|
982
|
+
const ir = {
|
|
1040
983
|
required: (t) => t ? void 0 : "required"
|
|
1041
|
-
},
|
|
984
|
+
}, de = { ...ir };
|
|
1042
985
|
function Qa(t, s) {
|
|
1043
|
-
|
|
986
|
+
de[t] = s;
|
|
1044
987
|
}
|
|
1045
|
-
function
|
|
988
|
+
function cr(t, s) {
|
|
1046
989
|
var r;
|
|
1047
|
-
const e = (r =
|
|
990
|
+
const e = (r = de[s]) == null ? void 0 : r.call(de, t);
|
|
1048
991
|
return e ? We(e) : [];
|
|
1049
992
|
}
|
|
1050
993
|
const Ja = Symbol(), ze = /* @__PURE__ */ new WeakMap();
|
|
1051
|
-
class
|
|
994
|
+
class ur extends Ne {
|
|
1052
995
|
constructor(e) {
|
|
1053
996
|
super();
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
997
|
+
$(this, "errors");
|
|
998
|
+
$(this, "_fields");
|
|
999
|
+
$(this, "_data");
|
|
1000
|
+
$(this, "_submitted");
|
|
1001
|
+
$(this, "_errors");
|
|
1002
|
+
$(this, "_listeners", {});
|
|
1060
1003
|
this._fields = e, this._submitted = B(!1), this._data = this.getInitialData(e), this._errors = this.getInitialErrors(e), ze.set(
|
|
1061
1004
|
this,
|
|
1062
1005
|
u(() => !Object.values(this._errors).some((r) => r !== null))
|
|
1063
|
-
), this.errors =
|
|
1006
|
+
), this.errors = he(this._errors);
|
|
1064
1007
|
}
|
|
1065
1008
|
get valid() {
|
|
1066
1009
|
var e;
|
|
@@ -1104,7 +1047,7 @@ class mr extends Ne {
|
|
|
1104
1047
|
return (n = this._listeners)[e] ?? (n[e] = []), (a = this._listeners[e]) == null || a.push(r), () => this.off(e, r);
|
|
1105
1048
|
}
|
|
1106
1049
|
off(e, r) {
|
|
1107
|
-
|
|
1050
|
+
Ce(this._listeners[e] ?? [], r);
|
|
1108
1051
|
}
|
|
1109
1052
|
async focus(e) {
|
|
1110
1053
|
var r;
|
|
@@ -1121,23 +1064,23 @@ class mr extends Ne {
|
|
|
1121
1064
|
this.setFieldValue(e, r);
|
|
1122
1065
|
}
|
|
1123
1066
|
getFieldErrors(e, r) {
|
|
1124
|
-
var
|
|
1125
|
-
const n = [], a = this._data[e], i = ((
|
|
1067
|
+
var l;
|
|
1068
|
+
const n = [], a = this._data[e], i = ((l = r.rules) == null ? void 0 : l.split("|")) ?? [];
|
|
1126
1069
|
for (const d of i)
|
|
1127
|
-
d !== "required" && a == null || n.push(...
|
|
1070
|
+
d !== "required" && a == null || n.push(...cr(a, d));
|
|
1128
1071
|
return n.length > 0 ? n : null;
|
|
1129
1072
|
}
|
|
1130
1073
|
getInitialData(e) {
|
|
1131
1074
|
if (this.static().isConjuring())
|
|
1132
1075
|
return {};
|
|
1133
1076
|
const r = Object.entries(e).reduce((n, [a, i]) => (n[a] = i.default ?? null, n), {});
|
|
1134
|
-
return
|
|
1077
|
+
return pe(r);
|
|
1135
1078
|
}
|
|
1136
1079
|
getInitialErrors(e) {
|
|
1137
1080
|
if (this.static().isConjuring())
|
|
1138
1081
|
return {};
|
|
1139
1082
|
const r = Object.keys(e).reduce((n, a) => (n[a] = null, n), {});
|
|
1140
|
-
return
|
|
1083
|
+
return pe(r);
|
|
1141
1084
|
}
|
|
1142
1085
|
resetData() {
|
|
1143
1086
|
for (const [e, r] of Object.entries(this._fields))
|
|
@@ -1152,7 +1095,7 @@ function nt(t, s) {
|
|
|
1152
1095
|
fe(() => r == null ? void 0 : r());
|
|
1153
1096
|
}
|
|
1154
1097
|
function at(t) {
|
|
1155
|
-
return new
|
|
1098
|
+
return new ur(t);
|
|
1156
1099
|
}
|
|
1157
1100
|
function lt() {
|
|
1158
1101
|
const t = Fe(), s = u(() => t.class);
|
|
@@ -1163,16 +1106,16 @@ function Za(t) {
|
|
|
1163
1106
|
Et(() => s = t()), fe(() => s());
|
|
1164
1107
|
}
|
|
1165
1108
|
function Xa(t, s) {
|
|
1166
|
-
const e =
|
|
1109
|
+
const e = pe(U.get(t) ?? s);
|
|
1167
1110
|
return Ee(e, () => U.set(t, Ht(e))), e;
|
|
1168
1111
|
}
|
|
1169
|
-
function
|
|
1112
|
+
function Ya(t) {
|
|
1170
1113
|
const s = B(), e = u(t);
|
|
1171
1114
|
return Ee(e, async () => s.value = await e.value, { immediate: !0 }), s;
|
|
1172
1115
|
}
|
|
1173
|
-
function
|
|
1116
|
+
function Ga(t, s) {
|
|
1174
1117
|
const e = s ? t : {}, r = s ?? t, n = B(e.initial ?? null), a = Ft((i) => n.value = i, e.delay ?? 300);
|
|
1175
|
-
return
|
|
1118
|
+
return Z(() => a(r())), n;
|
|
1176
1119
|
}
|
|
1177
1120
|
const ot = /* @__PURE__ */ g({
|
|
1178
1121
|
__name: "HeadlessSelectValue",
|
|
@@ -1181,17 +1124,17 @@ const ot = /* @__PURE__ */ g({
|
|
|
1181
1124
|
"select",
|
|
1182
1125
|
"<HeadlessSelectValue> must be a child of a <HeadlessSelect>"
|
|
1183
1126
|
);
|
|
1184
|
-
return (e, r) => e.$slots.default ? (c(), h(
|
|
1127
|
+
return (e, r) => e.$slots.default ? (c(), h(o(Ae), {
|
|
1185
1128
|
key: 0,
|
|
1186
|
-
placeholder:
|
|
1129
|
+
placeholder: o(s).placeholder
|
|
1187
1130
|
}, {
|
|
1188
1131
|
default: f(() => [
|
|
1189
1132
|
w(e.$slots, "default")
|
|
1190
1133
|
]),
|
|
1191
1134
|
_: 3
|
|
1192
|
-
}, 8, ["placeholder"])) : (c(), h(
|
|
1135
|
+
}, 8, ["placeholder"])) : (c(), h(o(Ae), {
|
|
1193
1136
|
key: 1,
|
|
1194
|
-
placeholder:
|
|
1137
|
+
placeholder: o(s).placeholder
|
|
1195
1138
|
}, null, 8, ["placeholder"]));
|
|
1196
1139
|
}
|
|
1197
1140
|
}), it = /* @__PURE__ */ g({
|
|
@@ -1201,15 +1144,15 @@ const ot = /* @__PURE__ */ g({
|
|
|
1201
1144
|
"select",
|
|
1202
1145
|
"<HeadlessSelectTrigger> must be a child of a <HeadlessSelect>"
|
|
1203
1146
|
);
|
|
1204
|
-
return (e, r) => (c(), h(
|
|
1205
|
-
id:
|
|
1147
|
+
return (e, r) => (c(), h(o(ns), {
|
|
1148
|
+
id: o(s).id
|
|
1206
1149
|
}, {
|
|
1207
1150
|
default: f(() => [
|
|
1208
1151
|
w(e.$slots, "default", {}, () => [
|
|
1209
|
-
|
|
1210
|
-
placeholder:
|
|
1152
|
+
m(ot, {
|
|
1153
|
+
placeholder: o(s).placeholder
|
|
1211
1154
|
}, null, 8, ["placeholder"]),
|
|
1212
|
-
|
|
1155
|
+
m(o(as))
|
|
1213
1156
|
])
|
|
1214
1157
|
]),
|
|
1215
1158
|
_: 3
|
|
@@ -1233,12 +1176,12 @@ const ot = /* @__PURE__ */ g({
|
|
|
1233
1176
|
const r = (n = s.options) == null ? void 0 : n.find((a) => a.value === t.value);
|
|
1234
1177
|
return r ? r.label : q(t.value);
|
|
1235
1178
|
});
|
|
1236
|
-
return (r, n) => (c(), h(
|
|
1179
|
+
return (r, n) => (c(), h(o(ls), re(ne(r.$props)), {
|
|
1237
1180
|
default: f(() => [
|
|
1238
|
-
|
|
1181
|
+
m(o(os), null, {
|
|
1239
1182
|
default: f(() => [
|
|
1240
1183
|
w(r.$slots, "default", {}, () => [
|
|
1241
|
-
A(
|
|
1184
|
+
A(S(e.value), 1)
|
|
1242
1185
|
])
|
|
1243
1186
|
]),
|
|
1244
1187
|
_: 3
|
|
@@ -1258,22 +1201,22 @@ const ot = /* @__PURE__ */ g({
|
|
|
1258
1201
|
"select",
|
|
1259
1202
|
"<HeadlessSelectOptions> must be a child of a <HeadlessSelect>"
|
|
1260
1203
|
), e = u(() => E("min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height)", t.class));
|
|
1261
|
-
return (r, n) => (c(), h(
|
|
1204
|
+
return (r, n) => (c(), h(o(is), null, {
|
|
1262
1205
|
default: f(() => [
|
|
1263
|
-
|
|
1206
|
+
m(o(cs), {
|
|
1264
1207
|
position: "popper",
|
|
1265
|
-
class:
|
|
1266
|
-
align:
|
|
1267
|
-
side:
|
|
1208
|
+
class: C(e.value),
|
|
1209
|
+
align: o(s).align,
|
|
1210
|
+
side: o(s).side,
|
|
1268
1211
|
"side-offset": 4
|
|
1269
1212
|
}, {
|
|
1270
1213
|
default: f(() => [
|
|
1271
|
-
|
|
1272
|
-
class:
|
|
1214
|
+
m(o(us), {
|
|
1215
|
+
class: C(r.innerClass)
|
|
1273
1216
|
}, {
|
|
1274
1217
|
default: f(() => [
|
|
1275
1218
|
w(r.$slots, "default", {}, () => [
|
|
1276
|
-
(c(!0), b(j, null, F(
|
|
1219
|
+
(c(!0), b(j, null, F(o(s).options ?? [], (a) => (c(), h(ct, {
|
|
1277
1220
|
key: a.key,
|
|
1278
1221
|
value: a.value
|
|
1279
1222
|
}, null, 8, ["value"]))), 128))
|
|
@@ -1288,7 +1231,7 @@ const ot = /* @__PURE__ */ g({
|
|
|
1288
1231
|
_: 3
|
|
1289
1232
|
}));
|
|
1290
1233
|
}
|
|
1291
|
-
}),
|
|
1234
|
+
}), dr = /* @__PURE__ */ g({
|
|
1292
1235
|
inheritAttrs: !1,
|
|
1293
1236
|
__name: "HeadlessSelect",
|
|
1294
1237
|
props: {
|
|
@@ -1308,10 +1251,10 @@ const ot = /* @__PURE__ */ g({
|
|
|
1308
1251
|
},
|
|
1309
1252
|
emits: ["update:modelValue"],
|
|
1310
1253
|
setup(t, { expose: s, emit: e }) {
|
|
1311
|
-
const r = e, n = se("form", null), a = u(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue), i = u(() => a.value),
|
|
1254
|
+
const r = e, n = se("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) => ({
|
|
1312
1255
|
key: te(),
|
|
1313
|
-
label: t.renderOption ? t.renderOption(
|
|
1314
|
-
value:
|
|
1256
|
+
label: t.renderOption ? t.renderOption(p) : or(p) ? Ut(p.label) : q(p),
|
|
1257
|
+
value: p
|
|
1315
1258
|
})) : null), v = {
|
|
1316
1259
|
labelClass: t.labelClass,
|
|
1317
1260
|
optionsClass: t.optionsClass,
|
|
@@ -1322,42 +1265,42 @@ const ot = /* @__PURE__ */ g({
|
|
|
1322
1265
|
name: u(() => t.name),
|
|
1323
1266
|
label: u(() => t.label),
|
|
1324
1267
|
description: u(() => t.description),
|
|
1325
|
-
placeholder: u(() => t.placeholder ??
|
|
1268
|
+
placeholder: u(() => t.placeholder ?? k("ui.select", "Select an option")),
|
|
1326
1269
|
options: d,
|
|
1327
1270
|
selectedOption: u(() => {
|
|
1328
|
-
var
|
|
1329
|
-
return (
|
|
1271
|
+
var p;
|
|
1272
|
+
return (p = d.value) == null ? void 0 : p.find((_) => _.value === t.modelValue);
|
|
1330
1273
|
}),
|
|
1331
|
-
errors:
|
|
1274
|
+
errors: he(l),
|
|
1332
1275
|
required: u(() => {
|
|
1333
1276
|
if (!(!t.name || !n))
|
|
1334
1277
|
return n.getFieldRules(t.name).includes("required");
|
|
1335
1278
|
}),
|
|
1336
|
-
update(
|
|
1279
|
+
update(p) {
|
|
1337
1280
|
if (n && t.name) {
|
|
1338
|
-
n.setFieldValue(t.name,
|
|
1281
|
+
n.setFieldValue(t.name, p);
|
|
1339
1282
|
return;
|
|
1340
1283
|
}
|
|
1341
|
-
r("update:modelValue",
|
|
1284
|
+
r("update:modelValue", p);
|
|
1342
1285
|
}
|
|
1343
1286
|
};
|
|
1344
|
-
function
|
|
1345
|
-
v.update(
|
|
1287
|
+
function x(p) {
|
|
1288
|
+
v.update(p);
|
|
1346
1289
|
}
|
|
1347
|
-
return ae("select", v), s(v), (
|
|
1290
|
+
return ae("select", v), s(v), (p, _) => (c(), h(o(ds), {
|
|
1348
1291
|
"model-value": i.value,
|
|
1349
|
-
by:
|
|
1350
|
-
"onUpdate:modelValue":
|
|
1292
|
+
by: p.compareOptions,
|
|
1293
|
+
"onUpdate:modelValue": _[0] || (_[0] = (L) => x(L))
|
|
1351
1294
|
}, {
|
|
1352
1295
|
default: f(({ open: L }) => [
|
|
1353
|
-
(c(), h(N(
|
|
1296
|
+
(c(), h(N(p.as), re(ne(p.$attrs)), {
|
|
1354
1297
|
default: f(() => [
|
|
1355
|
-
w(
|
|
1356
|
-
modelValue:
|
|
1298
|
+
w(p.$slots, "default", {
|
|
1299
|
+
modelValue: p.modelValue,
|
|
1357
1300
|
open: L
|
|
1358
1301
|
}, () => [
|
|
1359
|
-
|
|
1360
|
-
|
|
1302
|
+
m(it),
|
|
1303
|
+
m(ut)
|
|
1361
1304
|
])
|
|
1362
1305
|
]),
|
|
1363
1306
|
_: 2
|
|
@@ -1377,13 +1320,13 @@ const ot = /* @__PURE__ */ g({
|
|
|
1377
1320
|
"select",
|
|
1378
1321
|
"<HeadlessSelectLabel> must be a child of a <HeadlessSelect>"
|
|
1379
1322
|
), e = He(), r = u(() => !!(s.label || e.default));
|
|
1380
|
-
return (n, a) => r.value ? (c(), h(
|
|
1323
|
+
return (n, a) => r.value ? (c(), h(o(ps), H({
|
|
1381
1324
|
key: 0,
|
|
1382
|
-
for:
|
|
1325
|
+
for: o(s).id
|
|
1383
1326
|
}, n.$props), {
|
|
1384
1327
|
default: f(() => [
|
|
1385
1328
|
w(n.$slots, "default", {}, () => [
|
|
1386
|
-
A(
|
|
1329
|
+
A(S(o(s).label), 1)
|
|
1387
1330
|
])
|
|
1388
1331
|
]),
|
|
1389
1332
|
_: 3
|
|
@@ -1398,7 +1341,7 @@ const ot = /* @__PURE__ */ g({
|
|
|
1398
1341
|
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));
|
|
1399
1342
|
return (r, n) => r.$slots.default ? (c(), h(De, {
|
|
1400
1343
|
key: 0,
|
|
1401
|
-
class:
|
|
1344
|
+
class: C(e.value)
|
|
1402
1345
|
}, {
|
|
1403
1346
|
default: f(() => [
|
|
1404
1347
|
w(r.$slots, "default")
|
|
@@ -1406,7 +1349,7 @@ const ot = /* @__PURE__ */ g({
|
|
|
1406
1349
|
_: 3
|
|
1407
1350
|
}, 8, ["class"])) : (c(), h(De, {
|
|
1408
1351
|
key: 1,
|
|
1409
|
-
class:
|
|
1352
|
+
class: C(e.value)
|
|
1410
1353
|
}, null, 8, ["class"]));
|
|
1411
1354
|
}
|
|
1412
1355
|
}), je = /* @__PURE__ */ g({
|
|
@@ -1423,12 +1366,12 @@ const ot = /* @__PURE__ */ g({
|
|
|
1423
1366
|
t.innerClass
|
|
1424
1367
|
));
|
|
1425
1368
|
return (r, n) => (c(), h(ct, {
|
|
1426
|
-
class:
|
|
1369
|
+
class: C(s.value),
|
|
1427
1370
|
value: r.value
|
|
1428
1371
|
}, {
|
|
1429
1372
|
default: f(() => [
|
|
1430
1373
|
y("div", {
|
|
1431
|
-
class:
|
|
1374
|
+
class: C(e.value)
|
|
1432
1375
|
}, [
|
|
1433
1376
|
w(r.$slots, "default")
|
|
1434
1377
|
], 2)
|
|
@@ -1448,31 +1391,31 @@ const ot = /* @__PURE__ */ g({
|
|
|
1448
1391
|
t.class
|
|
1449
1392
|
));
|
|
1450
1393
|
return (r, n) => (c(), h(ut, {
|
|
1451
|
-
class:
|
|
1394
|
+
class: C(e.value)
|
|
1452
1395
|
}, {
|
|
1453
1396
|
default: f(() => {
|
|
1454
1397
|
var a;
|
|
1455
1398
|
return [
|
|
1456
|
-
(a =
|
|
1399
|
+
(a = o(s).options) != null && a.length ? w(r.$slots, "default", { key: 0 }, () => {
|
|
1457
1400
|
var i;
|
|
1458
1401
|
return [
|
|
1459
|
-
(c(!0), b(j, null, F(((i =
|
|
1460
|
-
key:
|
|
1461
|
-
value:
|
|
1402
|
+
(c(!0), b(j, null, F(((i = o(s)) == null ? void 0 : i.options) ?? [], (l) => (c(), h(je, {
|
|
1403
|
+
key: l.key,
|
|
1404
|
+
value: l.value
|
|
1462
1405
|
}, {
|
|
1463
1406
|
default: f(() => [
|
|
1464
|
-
A(
|
|
1407
|
+
A(S(l.label), 1)
|
|
1465
1408
|
]),
|
|
1466
1409
|
_: 2
|
|
1467
1410
|
}, 1032, ["value"]))), 128))
|
|
1468
1411
|
];
|
|
1469
1412
|
}) : w(r.$slots, "default", { key: 1 }, () => [
|
|
1470
|
-
|
|
1413
|
+
m(je, {
|
|
1471
1414
|
disabled: "",
|
|
1472
1415
|
value: null
|
|
1473
1416
|
}, {
|
|
1474
1417
|
default: f(() => [
|
|
1475
|
-
A(
|
|
1418
|
+
A(S(r.$td("ui.selectEmpty", "No options available")), 1)
|
|
1476
1419
|
]),
|
|
1477
1420
|
_: 1
|
|
1478
1421
|
})
|
|
@@ -1482,20 +1425,20 @@ const ot = /* @__PURE__ */ g({
|
|
|
1482
1425
|
_: 3
|
|
1483
1426
|
}, 8, ["class"]));
|
|
1484
1427
|
}
|
|
1485
|
-
}),
|
|
1428
|
+
}), pr = {
|
|
1486
1429
|
viewBox: "0 0 20 20",
|
|
1487
1430
|
width: "1.2em",
|
|
1488
1431
|
height: "1.2em"
|
|
1489
1432
|
};
|
|
1490
|
-
function
|
|
1491
|
-
return c(), b("svg",
|
|
1433
|
+
function mr(t, s) {
|
|
1434
|
+
return c(), b("svg", pr, s[0] || (s[0] = [
|
|
1492
1435
|
y("path", {
|
|
1493
1436
|
fill: "currentColor",
|
|
1494
1437
|
d: "m9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828L5.757 6.586L4.343 8z"
|
|
1495
1438
|
}, null, -1)
|
|
1496
1439
|
]));
|
|
1497
1440
|
}
|
|
1498
|
-
const
|
|
1441
|
+
const fr = P({ name: "zondicons-cheveron-down", render: mr }), mt = /* @__PURE__ */ g({
|
|
1499
1442
|
__name: "SelectTrigger",
|
|
1500
1443
|
props: {
|
|
1501
1444
|
class: {}
|
|
@@ -1508,16 +1451,16 @@ const vr = P({ name: "zondicons-cheveron-down", render: gr }), mt = /* @__PURE__
|
|
|
1508
1451
|
t.class
|
|
1509
1452
|
));
|
|
1510
1453
|
return (r, n) => (c(), h(it, {
|
|
1511
|
-
class:
|
|
1454
|
+
class: C(e.value)
|
|
1512
1455
|
}, {
|
|
1513
1456
|
default: f(() => [
|
|
1514
|
-
|
|
1515
|
-
|
|
1457
|
+
m(ot, { class: "col-start-1 row-start-1 truncate pr-6" }),
|
|
1458
|
+
m(o(fr), { class: "col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4" })
|
|
1516
1459
|
]),
|
|
1517
1460
|
_: 1
|
|
1518
1461
|
}, 8, ["class"]));
|
|
1519
1462
|
}
|
|
1520
|
-
}),
|
|
1463
|
+
}), hr = /* @__PURE__ */ g({
|
|
1521
1464
|
__name: "Select",
|
|
1522
1465
|
props: {
|
|
1523
1466
|
as: {},
|
|
@@ -1537,29 +1480,29 @@ const vr = P({ name: "zondicons-cheveron-down", render: gr }), mt = /* @__PURE__
|
|
|
1537
1480
|
emits: ["update:modelValue"],
|
|
1538
1481
|
setup(t) {
|
|
1539
1482
|
const { forwardRef: s } = Le();
|
|
1540
|
-
return (e, r) => (c(), h(
|
|
1483
|
+
return (e, r) => (c(), h(dr, H({ ref: o(s) }, e.$props, {
|
|
1541
1484
|
"onUpdate:modelValue": r[0] || (r[0] = (n) => e.$emit("update:modelValue", n))
|
|
1542
1485
|
}), {
|
|
1543
1486
|
default: f(() => [
|
|
1544
|
-
|
|
1487
|
+
m(dt),
|
|
1545
1488
|
w(e.$slots, "default", {}, () => [
|
|
1546
|
-
|
|
1547
|
-
|
|
1489
|
+
m(mt),
|
|
1490
|
+
m(pt)
|
|
1548
1491
|
])
|
|
1549
1492
|
]),
|
|
1550
1493
|
_: 3
|
|
1551
1494
|
}, 16));
|
|
1552
1495
|
}
|
|
1553
|
-
}),
|
|
1496
|
+
}), gr = { class: "grow" }, vr = /* @__PURE__ */ g({
|
|
1554
1497
|
__name: "Language",
|
|
1555
1498
|
setup(t) {
|
|
1556
1499
|
const s = Q.getBrowserLocale(), e = u(() => [null, ...Q.locales]);
|
|
1557
1500
|
function r(n) {
|
|
1558
|
-
return (n && O.locales[n]) ??
|
|
1501
|
+
return (n && O.locales[n]) ?? k("settings.localeDefault", "{locale} (default)", {
|
|
1559
1502
|
locale: O.locales[s] ?? s
|
|
1560
1503
|
});
|
|
1561
1504
|
}
|
|
1562
|
-
return (n, a) => (c(), h(
|
|
1505
|
+
return (n, a) => (c(), h(hr, {
|
|
1563
1506
|
modelValue: n.$lang.locale,
|
|
1564
1507
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => n.$lang.locale = i),
|
|
1565
1508
|
class: "flex flex-col items-start md:flex-row",
|
|
@@ -1568,40 +1511,40 @@ const vr = P({ name: "zondicons-cheveron-down", render: gr }), mt = /* @__PURE__
|
|
|
1568
1511
|
"render-option": r
|
|
1569
1512
|
}, {
|
|
1570
1513
|
default: f(() => [
|
|
1571
|
-
y("div",
|
|
1572
|
-
|
|
1514
|
+
y("div", gr, [
|
|
1515
|
+
m(dt, { class: "text-base font-semibold" }, {
|
|
1573
1516
|
default: f(() => [
|
|
1574
|
-
A(
|
|
1517
|
+
A(S(n.$td("settings.locale", "Language")), 1)
|
|
1575
1518
|
]),
|
|
1576
1519
|
_: 1
|
|
1577
1520
|
}),
|
|
1578
|
-
|
|
1521
|
+
m(T, {
|
|
1579
1522
|
"lang-key": "settings.localeDescription",
|
|
1580
1523
|
"lang-default": "Choose the application's language.",
|
|
1581
1524
|
class: "mt-1 text-sm text-gray-500"
|
|
1582
1525
|
})
|
|
1583
1526
|
]),
|
|
1584
|
-
|
|
1527
|
+
m(z, {
|
|
1585
1528
|
variant: "ghost",
|
|
1586
1529
|
as: mt,
|
|
1587
1530
|
class: "grid w-auto outline-none"
|
|
1588
1531
|
}),
|
|
1589
|
-
|
|
1532
|
+
m(pt)
|
|
1590
1533
|
]),
|
|
1591
1534
|
_: 1
|
|
1592
1535
|
}, 8, ["modelValue", "options"]));
|
|
1593
1536
|
}
|
|
1594
|
-
}),
|
|
1537
|
+
}), br = [
|
|
1595
1538
|
{
|
|
1596
1539
|
priority: 100,
|
|
1597
|
-
component:
|
|
1540
|
+
component: vr
|
|
1598
1541
|
}
|
|
1599
|
-
],
|
|
1542
|
+
], yr = { $lang: Q }, wr = {
|
|
1600
1543
|
async install(t) {
|
|
1601
1544
|
var s;
|
|
1602
|
-
(s = t.config.globalProperties).$t ?? (s.$t =
|
|
1545
|
+
(s = t.config.globalProperties).$t ?? (s.$t = Ge), t.config.globalProperties.$td = k, br.forEach((e) => D.addSetting(e)), await ye(t, yr);
|
|
1603
1546
|
}
|
|
1604
|
-
},
|
|
1547
|
+
}, $r = /* @__PURE__ */ g({
|
|
1605
1548
|
__name: "Markdown",
|
|
1606
1549
|
props: {
|
|
1607
1550
|
as: {},
|
|
@@ -1613,66 +1556,164 @@ const vr = P({ name: "zondicons-cheveron-down", render: gr }), mt = /* @__PURE__
|
|
|
1613
1556
|
actions: {}
|
|
1614
1557
|
},
|
|
1615
1558
|
setup(t) {
|
|
1616
|
-
const s = Fe(), e = He(), r = u(() => e.default ? e.default().map(Ze).join("") : t.text ?? (t.langKey && (t.langDefault ?
|
|
1559
|
+
const s = Fe(), e = He(), r = u(() => e.default ? e.default().map(Ze).join("") : t.text ?? (t.langKey && (t.langDefault ? k(t.langKey, t.langDefault, t.langParams ?? {}) : Ge(t.langKey, t.langParams ?? {})))), n = u(() => {
|
|
1617
1560
|
if (!r.value)
|
|
1618
1561
|
return null;
|
|
1619
|
-
let
|
|
1620
|
-
return t.inline && (
|
|
1562
|
+
let l = ar(r.value);
|
|
1563
|
+
return t.inline && (l = l.replace("<p>", "<span>").replace("</p>", "</span>")), l;
|
|
1621
1564
|
}), a = () => Vt(t.as ?? (t.inline ? "span" : "div"), {
|
|
1622
1565
|
innerHTML: n.value,
|
|
1623
1566
|
onClick: i,
|
|
1624
1567
|
...s,
|
|
1625
1568
|
class: `${s.class ?? ""} ${t.inline ? "" : "prose"}`
|
|
1626
1569
|
});
|
|
1627
|
-
async function i(
|
|
1628
|
-
var v,
|
|
1629
|
-
const { target: d } =
|
|
1570
|
+
async function i(l) {
|
|
1571
|
+
var v, x;
|
|
1572
|
+
const { target: d } = l;
|
|
1630
1573
|
if (Re(d, HTMLElement) && d.dataset.markdownAction) {
|
|
1631
|
-
(
|
|
1574
|
+
(x = (v = t.actions) == null ? void 0 : v[d.dataset.markdownAction]) == null || x.call(v);
|
|
1632
1575
|
return;
|
|
1633
1576
|
}
|
|
1634
1577
|
if (Re(d, HTMLAnchorElement) && d.dataset.markdownRoute) {
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1578
|
+
const p = nr();
|
|
1579
|
+
p && (l.preventDefault(), p.visit(d.dataset.markdownRoute));
|
|
1637
1580
|
return;
|
|
1638
1581
|
}
|
|
1639
1582
|
}
|
|
1640
|
-
return (
|
|
1583
|
+
return (l, d) => (c(), h(a));
|
|
1641
1584
|
}
|
|
1642
|
-
}),
|
|
1585
|
+
}), _r = (t, s) => {
|
|
1643
1586
|
const e = t.__vccOpts || t;
|
|
1644
1587
|
for (const [r, n] of s)
|
|
1645
1588
|
e[r] = n;
|
|
1646
1589
|
return e;
|
|
1647
|
-
}, T = /* @__PURE__ */
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
},
|
|
1590
|
+
}, T = /* @__PURE__ */ _r($r, [["__scopeId", "data-v-8b211cfb"]]), xr = { class: "flex-grow" }, Cr = ["id"], Sr = /* @__PURE__ */ g({
|
|
1591
|
+
__name: "Setting",
|
|
1592
|
+
props: {
|
|
1593
|
+
title: {},
|
|
1594
|
+
titleId: {},
|
|
1595
|
+
description: {},
|
|
1596
|
+
class: {},
|
|
1597
|
+
layout: { default: "horizontal" }
|
|
1598
|
+
},
|
|
1599
|
+
setup(t) {
|
|
1600
|
+
const s = u(() => E(t.class, "flex flex-col justify-center gap-1"));
|
|
1601
|
+
return (e, r) => (c(), b("div", {
|
|
1602
|
+
class: C(["mt-4 flex", { "flex-col": e.layout === "vertical" }])
|
|
1603
|
+
}, [
|
|
1604
|
+
y("div", xr, [
|
|
1605
|
+
y("h3", {
|
|
1606
|
+
id: e.titleId,
|
|
1607
|
+
class: "text-base font-semibold"
|
|
1608
|
+
}, S(e.title), 9, Cr),
|
|
1609
|
+
e.description ? (c(), h(T, {
|
|
1610
|
+
key: 0,
|
|
1611
|
+
text: e.description,
|
|
1612
|
+
class: "mt-1 text-sm text-gray-500"
|
|
1613
|
+
}, null, 8, ["text"])) : M("", !0)
|
|
1614
|
+
]),
|
|
1615
|
+
y("div", {
|
|
1616
|
+
class: C(s.value)
|
|
1617
|
+
}, [
|
|
1618
|
+
w(e.$slots, "default")
|
|
1619
|
+
], 2)
|
|
1620
|
+
], 2));
|
|
1621
|
+
}
|
|
1622
|
+
}), kr = ["for"], Mr = /* @__PURE__ */ g({
|
|
1623
|
+
inheritAttrs: !1,
|
|
1624
|
+
__name: "HeadlessSwitch",
|
|
1625
|
+
props: {
|
|
1626
|
+
name: {},
|
|
1627
|
+
label: {},
|
|
1628
|
+
description: {},
|
|
1629
|
+
modelValue: {},
|
|
1630
|
+
class: {},
|
|
1631
|
+
labelClass: {},
|
|
1632
|
+
inputClass: {},
|
|
1633
|
+
thumbClass: {}
|
|
1634
|
+
},
|
|
1635
|
+
emits: ["update:modelValue"],
|
|
1636
|
+
setup(t, { expose: s, emit: e }) {
|
|
1637
|
+
const r = e, n = se("form", null), a = u(() => !n || !t.name ? null : n.errors[t.name] ?? null), i = {
|
|
1638
|
+
id: `switch-${te()}`,
|
|
1639
|
+
name: u(() => t.name),
|
|
1640
|
+
label: u(() => t.label),
|
|
1641
|
+
description: u(() => t.description),
|
|
1642
|
+
value: u(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
|
|
1643
|
+
errors: he(a),
|
|
1644
|
+
required: u(() => {
|
|
1645
|
+
if (!(!t.name || !n))
|
|
1646
|
+
return n.getFieldRules(t.name).includes("required");
|
|
1647
|
+
}),
|
|
1648
|
+
update(l) {
|
|
1649
|
+
if (n && t.name) {
|
|
1650
|
+
n.setFieldValue(t.name, l);
|
|
1651
|
+
return;
|
|
1652
|
+
}
|
|
1653
|
+
r("update:modelValue", l);
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
return s(i), Z(() => {
|
|
1657
|
+
!t.description && !a.value || console.warn("Errors and description not implemented in <HeadlessSwitch>");
|
|
1658
|
+
}), (l, d) => (c(), b("div", {
|
|
1659
|
+
class: C(t.class)
|
|
1660
|
+
}, [
|
|
1661
|
+
l.label ? (c(), b("label", {
|
|
1662
|
+
key: 0,
|
|
1663
|
+
for: i.id,
|
|
1664
|
+
class: C(l.labelClass)
|
|
1665
|
+
}, S(l.label), 11, kr)) : M("", !0),
|
|
1666
|
+
m(o(ms), H({
|
|
1667
|
+
id: i.id,
|
|
1668
|
+
name: l.name,
|
|
1669
|
+
"model-value": i.value.value
|
|
1670
|
+
}, l.$attrs, {
|
|
1671
|
+
class: l.inputClass,
|
|
1672
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
|
|
1673
|
+
}), {
|
|
1674
|
+
default: f(() => [
|
|
1675
|
+
m(o(fs), {
|
|
1676
|
+
class: C(l.thumbClass)
|
|
1677
|
+
}, null, 8, ["class"])
|
|
1678
|
+
]),
|
|
1679
|
+
_: 1
|
|
1680
|
+
}, 16, ["id", "name", "model-value", "class"])
|
|
1681
|
+
], 2));
|
|
1682
|
+
}
|
|
1683
|
+
}), Er = /* @__PURE__ */ g({
|
|
1684
|
+
__name: "Switch",
|
|
1685
|
+
setup(t) {
|
|
1686
|
+
return (s, e) => (c(), h(Mr, {
|
|
1687
|
+
class: "flex flex-row items-center gap-1",
|
|
1688
|
+
"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",
|
|
1689
|
+
"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"
|
|
1690
|
+
}));
|
|
1691
|
+
}
|
|
1692
|
+
}), Hr = /* @__PURE__ */ g({
|
|
1651
1693
|
__name: "Debug",
|
|
1652
1694
|
setup(t) {
|
|
1653
1695
|
let s = null;
|
|
1654
1696
|
const e = B(!1);
|
|
1655
|
-
return
|
|
1697
|
+
return Z(async () => {
|
|
1656
1698
|
if (!e.value) {
|
|
1657
1699
|
s == null || s.destroy();
|
|
1658
1700
|
return;
|
|
1659
1701
|
}
|
|
1660
1702
|
s ?? (s = (await import("eruda")).default), s.init();
|
|
1661
|
-
}), (r, n) => (c(),
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1703
|
+
}), (r, n) => (c(), h(Sr, {
|
|
1704
|
+
"title-id": "debug-setting",
|
|
1705
|
+
title: r.$td("settings.debug", "Debugging"),
|
|
1706
|
+
description: r.$td("settings.debugDescription", "Enable debugging with [Eruda](https://eruda.liriliri.io/).")
|
|
1707
|
+
}, {
|
|
1708
|
+
default: f(() => [
|
|
1709
|
+
m(Er, {
|
|
1710
|
+
modelValue: e.value,
|
|
1711
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => e.value = a),
|
|
1712
|
+
"aria-labelledby": "debug-setting"
|
|
1713
|
+
}, null, 8, ["modelValue"])
|
|
1669
1714
|
]),
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
"onUpdate:modelValue": n[0] || (n[0] = (a) => e.value = a),
|
|
1673
|
-
"aria-labelledby": "debug-setting"
|
|
1674
|
-
}, null, 8, ["modelValue"])
|
|
1675
|
-
]));
|
|
1715
|
+
_: 1
|
|
1716
|
+
}, 8, ["title", "description"]));
|
|
1676
1717
|
}
|
|
1677
1718
|
}), Vr = [
|
|
1678
1719
|
{
|
|
@@ -1689,23 +1730,24 @@ function ht(t) {
|
|
|
1689
1730
|
if (e)
|
|
1690
1731
|
return e;
|
|
1691
1732
|
}
|
|
1692
|
-
return typeof t == "string" ? t : t instanceof Error || t instanceof
|
|
1733
|
+
return typeof t == "string" ? t : t instanceof Error || t instanceof ge ? t.message : ue(t) ? q(t.message ?? t.description ?? "Unknown error object") : k("errors.unknown", "Unknown Error");
|
|
1693
1734
|
}
|
|
1694
|
-
class Be extends
|
|
1735
|
+
class Be extends ge {
|
|
1695
1736
|
}
|
|
1696
1737
|
const Lr = { $errors: et }, Ir = (t) => (et.report(t), !0);
|
|
1697
1738
|
function Tr(t, s = () => !1) {
|
|
1698
1739
|
const e = (r) => s(r) || Ir(r);
|
|
1699
|
-
t.config.errorHandler = e, globalThis.onerror = (r, n, a, i,
|
|
1740
|
+
t.config.errorHandler = e, globalThis.onerror = (r, n, a, i, l) => e(l ?? r), globalThis.onunhandledrejection = (r) => e(r.reason);
|
|
1700
1741
|
}
|
|
1701
1742
|
const Rr = {
|
|
1702
1743
|
async install(t, s) {
|
|
1703
|
-
Tr(t, s.handleError), Vr.forEach((e) => D.addSetting(e)), await
|
|
1744
|
+
Tr(t, s.handleError), Vr.forEach((e) => D.addSetting(e)), await ye(t, Lr);
|
|
1704
1745
|
}
|
|
1705
1746
|
}, Pr = {
|
|
1706
1747
|
async install() {
|
|
1707
1748
|
Ve() && (globalThis.testingRuntime = {
|
|
1708
|
-
on: (...t) => I.on(...t)
|
|
1749
|
+
on: (...t) => I.on(...t),
|
|
1750
|
+
service: (t) => D.service(t)
|
|
1709
1751
|
});
|
|
1710
1752
|
}
|
|
1711
1753
|
}, Ar = {
|
|
@@ -1737,21 +1779,21 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1737
1779
|
);
|
|
1738
1780
|
s({ close: i, $content: e });
|
|
1739
1781
|
const { forwardRef: n } = Le(), a = B(!1);
|
|
1740
|
-
ae("$modalContentRef", e), rt("close-modal", async ({ id:
|
|
1741
|
-
|
|
1782
|
+
ae("$modalContentRef", e), rt("close-modal", async ({ id: l, result: d }) => {
|
|
1783
|
+
l === r.id && await i(d);
|
|
1742
1784
|
});
|
|
1743
|
-
async function i(
|
|
1744
|
-
a.value || (await I.emit("modal-will-close", { modal: r, result:
|
|
1785
|
+
async function i(l) {
|
|
1786
|
+
a.value || (await I.emit("modal-will-close", { modal: r, result: l }), a.value = !0, await I.emit("modal-has-closed", { modal: r, result: l }));
|
|
1745
1787
|
}
|
|
1746
|
-
return (
|
|
1747
|
-
ref:
|
|
1788
|
+
return (l, d) => (c(), h(o(hs), {
|
|
1789
|
+
ref: o(n),
|
|
1748
1790
|
open: "",
|
|
1749
|
-
"onUpdate:open": d[0] || (d[0] = (v) =>
|
|
1791
|
+
"onUpdate:open": d[0] || (d[0] = (v) => l.persistent || i())
|
|
1750
1792
|
}, {
|
|
1751
1793
|
default: f(() => [
|
|
1752
|
-
|
|
1794
|
+
m(o(gs), null, {
|
|
1753
1795
|
default: f(() => [
|
|
1754
|
-
w(
|
|
1796
|
+
w(l.$slots, "default", { close: i })
|
|
1755
1797
|
]),
|
|
1756
1798
|
_: 3
|
|
1757
1799
|
})
|
|
@@ -1769,7 +1811,7 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1769
1811
|
const s = t, e = u(() => {
|
|
1770
1812
|
const r = {};
|
|
1771
1813
|
for (const n in s.modal.properties)
|
|
1772
|
-
r[n] =
|
|
1814
|
+
r[n] = o(s.modal.properties[n]);
|
|
1773
1815
|
return r;
|
|
1774
1816
|
});
|
|
1775
1817
|
return ae("modal", {
|
|
@@ -1784,12 +1826,12 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1784
1826
|
"modal",
|
|
1785
1827
|
"could not obtain modal reference from <HeadlessModalContent>, did you render this component manually? Show it using $ui.modal() instead"
|
|
1786
1828
|
), e = js("$modalContentRef"), r = le("$contentRef"), n = u(() => R.modals[s] ?? null);
|
|
1787
|
-
return
|
|
1829
|
+
return Z(() => e.value = r.value), (a, i) => (c(), h(o(vs), { ref: "$contentRef" }, {
|
|
1788
1830
|
default: f(() => [
|
|
1789
1831
|
w(a.$slots, "default"),
|
|
1790
1832
|
n.value ? (c(), h(gt, {
|
|
1791
1833
|
key: 0,
|
|
1792
|
-
"child-index":
|
|
1834
|
+
"child-index": o(s) + 1,
|
|
1793
1835
|
modal: n.value
|
|
1794
1836
|
}, null, 8, ["child-index", "modal"])) : M("", !0)
|
|
1795
1837
|
]),
|
|
@@ -1803,7 +1845,7 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1803
1845
|
as: {}
|
|
1804
1846
|
},
|
|
1805
1847
|
setup(t) {
|
|
1806
|
-
return (s, e) => (c(), h(
|
|
1848
|
+
return (s, e) => (c(), h(o(bs), re(ne(s.$props)), {
|
|
1807
1849
|
default: f(() => [
|
|
1808
1850
|
w(s.$slots, "default")
|
|
1809
1851
|
]),
|
|
@@ -1818,7 +1860,7 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1818
1860
|
as: {}
|
|
1819
1861
|
},
|
|
1820
1862
|
setup(t) {
|
|
1821
|
-
return (s, e) => (c(), h(
|
|
1863
|
+
return (s, e) => (c(), h(o(ys), re(ne(s.$props)), {
|
|
1822
1864
|
default: f(() => [
|
|
1823
1865
|
w(s.$slots, "default")
|
|
1824
1866
|
]),
|
|
@@ -1832,7 +1874,7 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1832
1874
|
as: {}
|
|
1833
1875
|
},
|
|
1834
1876
|
setup(t) {
|
|
1835
|
-
return (s, e) => (c(), h(
|
|
1877
|
+
return (s, e) => (c(), h(o(ws), re(ne(s.$props)), {
|
|
1836
1878
|
default: f(() => [
|
|
1837
1879
|
w(s.$slots, "default")
|
|
1838
1880
|
]),
|
|
@@ -1842,7 +1884,7 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1842
1884
|
}), Or = {
|
|
1843
1885
|
key: 0,
|
|
1844
1886
|
class: "absolute top-0 right-0 hidden pt-3.5 pr-2.5 sm:block"
|
|
1845
|
-
}, Nr = ["onClick"], Wr = { class: "sr-only" },
|
|
1887
|
+
}, Nr = ["onClick"], Wr = { class: "sr-only" }, G = /* @__PURE__ */ g({
|
|
1846
1888
|
__name: "Modal",
|
|
1847
1889
|
props: {
|
|
1848
1890
|
persistent: { type: Boolean },
|
|
@@ -1855,85 +1897,85 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1855
1897
|
closeHidden: { type: Boolean }
|
|
1856
1898
|
},
|
|
1857
1899
|
setup(t, { expose: s }) {
|
|
1858
|
-
const e =
|
|
1900
|
+
const e = J(t, ["class", "wrapperClass", "title", "titleHidden", "description", "persistent", "closeHidden"]);
|
|
1859
1901
|
s({
|
|
1860
|
-
close: async (
|
|
1861
|
-
var
|
|
1862
|
-
return (
|
|
1902
|
+
close: async (p) => {
|
|
1903
|
+
var _;
|
|
1904
|
+
return (_ = a.value) == null ? void 0 : _.close(p);
|
|
1863
1905
|
},
|
|
1864
1906
|
$content: u(() => {
|
|
1865
|
-
var
|
|
1866
|
-
return (
|
|
1907
|
+
var p;
|
|
1908
|
+
return (p = a.value) == null ? void 0 : p.$content;
|
|
1867
1909
|
})
|
|
1868
1910
|
});
|
|
1869
|
-
const { forwardRef: r, currentRef: n } = Le(), a = n, i = V("modal"),
|
|
1911
|
+
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)), x = u(() => E(
|
|
1870
1912
|
"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",
|
|
1871
1913
|
"overflow-hidden rounded-lg bg-white text-left shadow-xl sm:max-w-lg",
|
|
1872
1914
|
"animate-[fade-in_var(--tw-duration)_ease-in-out,grow_var(--tw-duration)_ease-in-out]",
|
|
1873
1915
|
"transition-[scale,opacity] will-change-[scale,opacity] duration-300",
|
|
1874
1916
|
{
|
|
1875
|
-
"scale-50 opacity-0": !
|
|
1876
|
-
"scale-100 opacity-100":
|
|
1917
|
+
"scale-50 opacity-0": !l.value,
|
|
1918
|
+
"scale-100 opacity-100": l.value
|
|
1877
1919
|
},
|
|
1878
1920
|
t.wrapperClass
|
|
1879
1921
|
));
|
|
1880
|
-
return rt("modal-will-close", async ({ modal: { id:
|
|
1881
|
-
|
|
1882
|
-
}), (
|
|
1883
|
-
ref: (L) =>
|
|
1884
|
-
persistent:
|
|
1922
|
+
return rt("modal-will-close", async ({ modal: { id: p } }) => {
|
|
1923
|
+
p === i.modal.id && await ce({ ms: 300 });
|
|
1924
|
+
}), (p, _) => (c(), h(jr, H(e, {
|
|
1925
|
+
ref: (L) => o(r)(L),
|
|
1926
|
+
persistent: p.persistent
|
|
1885
1927
|
}), {
|
|
1886
1928
|
default: f(({ close: L }) => [
|
|
1887
|
-
|
|
1888
|
-
class:
|
|
1889
|
-
"bg-black/30":
|
|
1890
|
-
"opacity-0":
|
|
1929
|
+
m(Fr, {
|
|
1930
|
+
class: C(["fixed inset-0 animate-[fade-in_var(--tw-duration)_ease-in-out] transition-opacity duration-300 will-change-[opacity]", {
|
|
1931
|
+
"bg-black/30": o(i).childIndex === 1,
|
|
1932
|
+
"opacity-0": o(i).childIndex === 1 && o(i).modal.closing
|
|
1891
1933
|
}])
|
|
1892
1934
|
}, null, 8, ["class"]),
|
|
1893
|
-
|
|
1935
|
+
m(Br, H(d.value, { class: x.value }), {
|
|
1894
1936
|
default: f(() => [
|
|
1895
|
-
!
|
|
1937
|
+
!p.persistent && !p.closeHidden ? (c(), b("div", Or, [
|
|
1896
1938
|
y("button", {
|
|
1897
1939
|
type: "button",
|
|
1898
1940
|
class: "clickable z-10 rounded-full p-2.5 text-gray-400 hover:text-gray-500",
|
|
1899
|
-
onClick: (
|
|
1941
|
+
onClick: (we) => L()
|
|
1900
1942
|
}, [
|
|
1901
|
-
y("span", Wr,
|
|
1902
|
-
|
|
1943
|
+
y("span", Wr, S(p.$td("ui.close", "Close")), 1),
|
|
1944
|
+
m(o(Dr), { class: "size-4" })
|
|
1903
1945
|
], 8, Nr)
|
|
1904
1946
|
])) : M("", !0),
|
|
1905
|
-
|
|
1947
|
+
p.title ? (c(), h(Ur, {
|
|
1906
1948
|
key: 1,
|
|
1907
|
-
class:
|
|
1908
|
-
"sr-only":
|
|
1909
|
-
"pb-0":
|
|
1910
|
-
"pb-2": !
|
|
1949
|
+
class: C(["px-4 pt-5 text-base font-semibold text-gray-900", {
|
|
1950
|
+
"sr-only": p.titleHidden,
|
|
1951
|
+
"pb-0": p.description && !p.descriptionHidden,
|
|
1952
|
+
"pb-2": !p.description || p.descriptionHidden
|
|
1911
1953
|
}])
|
|
1912
1954
|
}, {
|
|
1913
1955
|
default: f(() => [
|
|
1914
|
-
|
|
1915
|
-
text:
|
|
1956
|
+
m(T, {
|
|
1957
|
+
text: p.title,
|
|
1916
1958
|
inline: ""
|
|
1917
1959
|
}, null, 8, ["text"])
|
|
1918
1960
|
]),
|
|
1919
1961
|
_: 1
|
|
1920
1962
|
}, 8, ["class"])) : M("", !0),
|
|
1921
|
-
|
|
1963
|
+
p.description ? (c(), h(qr, {
|
|
1922
1964
|
key: 2,
|
|
1923
|
-
class:
|
|
1965
|
+
class: C(["px-4 pt-1 pb-2", { "sr-only": p.descriptionHidden }])
|
|
1924
1966
|
}, {
|
|
1925
1967
|
default: f(() => [
|
|
1926
|
-
|
|
1927
|
-
text:
|
|
1968
|
+
m(T, {
|
|
1969
|
+
text: p.description,
|
|
1928
1970
|
class: "text-sm leading-6 text-gray-500"
|
|
1929
1971
|
}, null, 8, ["text"])
|
|
1930
1972
|
]),
|
|
1931
1973
|
_: 1
|
|
1932
1974
|
}, 8, ["class"])) : M("", !0),
|
|
1933
1975
|
y("div", {
|
|
1934
|
-
class:
|
|
1976
|
+
class: C(v.value)
|
|
1935
1977
|
}, [
|
|
1936
|
-
w(
|
|
1978
|
+
w(p.$slots, "default", { close: L })
|
|
1937
1979
|
], 2)
|
|
1938
1980
|
]),
|
|
1939
1981
|
_: 2
|
|
@@ -1944,7 +1986,7 @@ const Dr = P({ name: "zondicons-close", render: zr }), jr = /* @__PURE__ */ g({
|
|
|
1944
1986
|
}
|
|
1945
1987
|
});
|
|
1946
1988
|
function Kr(t) {
|
|
1947
|
-
const s = u(() => t.title ??
|
|
1989
|
+
const s = u(() => t.title ?? k("ui.alert", "Alert")), e = u(() => !t.title);
|
|
1948
1990
|
return { renderedTitle: s, titleHidden: e };
|
|
1949
1991
|
}
|
|
1950
1992
|
const Qr = /* @__PURE__ */ g({
|
|
@@ -1955,12 +1997,12 @@ const Qr = /* @__PURE__ */ g({
|
|
|
1955
1997
|
},
|
|
1956
1998
|
setup(t, { expose: s }) {
|
|
1957
1999
|
const e = t, { renderedTitle: r, titleHidden: n } = Kr(e);
|
|
1958
|
-
return s(), (a, i) => (c(), h(
|
|
1959
|
-
title:
|
|
1960
|
-
"title-hidden":
|
|
2000
|
+
return s(), (a, i) => (c(), h(G, {
|
|
2001
|
+
title: o(r),
|
|
2002
|
+
"title-hidden": o(n)
|
|
1961
2003
|
}, {
|
|
1962
2004
|
default: f(() => [
|
|
1963
|
-
|
|
2005
|
+
m(T, { text: a.message }, null, 8, ["text"])
|
|
1964
2006
|
]),
|
|
1965
2007
|
_: 1
|
|
1966
2008
|
}, 8, ["title", "title-hidden"]));
|
|
@@ -1974,13 +2016,13 @@ const Qr = /* @__PURE__ */ g({
|
|
|
1974
2016
|
setup(t, { emit: s }) {
|
|
1975
2017
|
let e;
|
|
1976
2018
|
const r = s;
|
|
1977
|
-
return
|
|
2019
|
+
return Z((n) => {
|
|
1978
2020
|
var a;
|
|
1979
2021
|
e == null || e(), e = (a = t.form) == null ? void 0 : a.on("submit", () => r("submit")), n(() => e == null ? void 0 : e());
|
|
1980
2022
|
}), ae("form", t.form), (n, a) => (c(), b("form", {
|
|
1981
2023
|
onSubmit: a[0] || (a[0] = Ue((i) => {
|
|
1982
|
-
var
|
|
1983
|
-
return (
|
|
2024
|
+
var l;
|
|
2025
|
+
return (l = n.form) == null ? void 0 : l.submit();
|
|
1984
2026
|
}, ["prevent"]))
|
|
1985
2027
|
}, [
|
|
1986
2028
|
w(n.$slots, "default")
|
|
@@ -1990,8 +2032,8 @@ const Qr = /* @__PURE__ */ g({
|
|
|
1990
2032
|
function Jr(t) {
|
|
1991
2033
|
const s = at(
|
|
1992
2034
|
Object.entries(t.checkboxes ?? {}).reduce(
|
|
1993
|
-
(i, [
|
|
1994
|
-
[
|
|
2035
|
+
(i, [l, d]) => ({
|
|
2036
|
+
[l]: {
|
|
1995
2037
|
type: "boolean",
|
|
1996
2038
|
default: d.default,
|
|
1997
2039
|
required: d.required ? "required" : void 0
|
|
@@ -2000,13 +2042,13 @@ function Jr(t) {
|
|
|
2000
2042
|
}),
|
|
2001
2043
|
{}
|
|
2002
2044
|
)
|
|
2003
|
-
), e = u(() => t.title ??
|
|
2045
|
+
), e = u(() => t.title ?? k("ui.confirm", "Confirm")), r = u(() => !t.title), n = u(() => t.acceptText ?? k("ui.accept", "Ok")), a = u(() => t.cancelText ?? k("ui.cancel", "Cancel"));
|
|
2004
2046
|
return { form: s, renderedTitle: e, titleHidden: r, renderedAcceptText: n, renderedCancelText: a };
|
|
2005
2047
|
}
|
|
2006
2048
|
const Zr = {
|
|
2007
2049
|
key: 0,
|
|
2008
2050
|
class: "mt-4 flex flex-col text-sm text-gray-600"
|
|
2009
|
-
}, Xr = { class: "flex items-center" },
|
|
2051
|
+
}, Xr = { class: "flex items-center" }, Yr = ["onUpdate:modelValue", "required"], Gr = { class: "ml-1.5" }, en = { class: "mt-4 flex flex-row-reverse gap-2" }, tn = /* @__PURE__ */ g({
|
|
2010
2052
|
__name: "ConfirmModal",
|
|
2011
2053
|
props: {
|
|
2012
2054
|
title: {},
|
|
@@ -2020,54 +2062,54 @@ const Zr = {
|
|
|
2020
2062
|
required: { type: Boolean }
|
|
2021
2063
|
},
|
|
2022
2064
|
setup(t, { expose: s }) {
|
|
2023
|
-
const e =
|
|
2024
|
-
return s(), (d, v) => (c(), h(
|
|
2025
|
-
title:
|
|
2026
|
-
"title-hidden":
|
|
2065
|
+
const e = J(t, ["cancelVariant"]), { form: r, renderedTitle: n, titleHidden: a, renderedAcceptText: i, renderedCancelText: l } = Jr(e);
|
|
2066
|
+
return s(), (d, v) => (c(), h(G, {
|
|
2067
|
+
title: o(n),
|
|
2068
|
+
"title-hidden": o(a),
|
|
2027
2069
|
persistent: ""
|
|
2028
2070
|
}, {
|
|
2029
|
-
default: f(({ close:
|
|
2030
|
-
|
|
2031
|
-
form:
|
|
2032
|
-
onSubmit: (
|
|
2071
|
+
default: f(({ close: x }) => [
|
|
2072
|
+
m(vt, {
|
|
2073
|
+
form: o(r),
|
|
2074
|
+
onSubmit: (p) => x([!0, o(r).data()])
|
|
2033
2075
|
}, {
|
|
2034
2076
|
default: f(() => [
|
|
2035
|
-
|
|
2077
|
+
m(T, {
|
|
2036
2078
|
text: d.message,
|
|
2037
2079
|
actions: d.actions
|
|
2038
2080
|
}, null, 8, ["text", "actions"]),
|
|
2039
2081
|
d.checkboxes ? (c(), b("ul", Zr, [
|
|
2040
|
-
(c(!0), b(j, null, F(d.checkboxes, (
|
|
2082
|
+
(c(!0), b(j, null, F(d.checkboxes, (p, _) => (c(), b("li", { key: _ }, [
|
|
2041
2083
|
y("label", Xr, [
|
|
2042
2084
|
Oe(y("input", {
|
|
2043
|
-
"onUpdate:modelValue": (L) =>
|
|
2085
|
+
"onUpdate:modelValue": (L) => o(r)[_] = L,
|
|
2044
2086
|
type: "checkbox",
|
|
2045
|
-
required:
|
|
2087
|
+
required: p.required,
|
|
2046
2088
|
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"
|
|
2047
|
-
}, null, 8,
|
|
2048
|
-
[Lt,
|
|
2089
|
+
}, null, 8, Yr), [
|
|
2090
|
+
[Lt, o(r)[_]]
|
|
2049
2091
|
]),
|
|
2050
|
-
y("span",
|
|
2092
|
+
y("span", Gr, S(p.label), 1)
|
|
2051
2093
|
])
|
|
2052
2094
|
]))), 128))
|
|
2053
2095
|
])) : M("", !0),
|
|
2054
2096
|
y("div", en, [
|
|
2055
|
-
|
|
2097
|
+
m(z, {
|
|
2056
2098
|
variant: d.acceptVariant,
|
|
2057
2099
|
submit: ""
|
|
2058
2100
|
}, {
|
|
2059
2101
|
default: f(() => [
|
|
2060
|
-
A(
|
|
2102
|
+
A(S(o(i)), 1)
|
|
2061
2103
|
]),
|
|
2062
2104
|
_: 1
|
|
2063
2105
|
}, 8, ["variant"]),
|
|
2064
2106
|
d.required ? M("", !0) : (c(), h(z, {
|
|
2065
2107
|
key: 0,
|
|
2066
2108
|
variant: d.cancelVariant,
|
|
2067
|
-
onClick: (
|
|
2109
|
+
onClick: (p) => x(!1)
|
|
2068
2110
|
}, {
|
|
2069
2111
|
default: f(() => [
|
|
2070
|
-
A(
|
|
2112
|
+
A(S(o(l)), 1)
|
|
2071
2113
|
]),
|
|
2072
2114
|
_: 2
|
|
2073
2115
|
}, 1032, ["variant", "onClick"]))
|
|
@@ -2157,7 +2199,7 @@ function vn(t, s) {
|
|
|
2157
2199
|
}, null, -1)
|
|
2158
2200
|
]));
|
|
2159
2201
|
}
|
|
2160
|
-
const bn = P({ name: "mdi-github", render: vn }), yn = { class: "flex" }, wn = { class: "sr-only" },
|
|
2202
|
+
const bn = P({ name: "mdi-github", render: vn }), yn = { class: "flex" }, wn = { class: "sr-only" }, $n = /* @__PURE__ */ g({
|
|
2161
2203
|
__name: "ErrorReportModalButtons",
|
|
2162
2204
|
props: {
|
|
2163
2205
|
report: {}
|
|
@@ -2190,7 +2232,7 @@ const bn = P({ name: "mdi-github", render: vn }), yn = { class: "flex" }, wn = {
|
|
|
2190
2232
|
async click() {
|
|
2191
2233
|
await navigator.clipboard.writeText(`${e.value}
|
|
2192
2234
|
|
|
2193
|
-
${s.report.details}`), R.toast(
|
|
2235
|
+
${s.report.details}`), R.toast(k("errors.copiedToClipboard", "Debug information copied to clipboard"));
|
|
2194
2236
|
}
|
|
2195
2237
|
},
|
|
2196
2238
|
{
|
|
@@ -2200,7 +2242,7 @@ ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information
|
|
|
2200
2242
|
click() {
|
|
2201
2243
|
const a = s.report.error ?? s.report;
|
|
2202
2244
|
window.error = a, console.error(a), R.toast(
|
|
2203
|
-
|
|
2245
|
+
k(
|
|
2204
2246
|
"errors.addedToConsole",
|
|
2205
2247
|
"You can now use the **error** variable in the console"
|
|
2206
2248
|
)
|
|
@@ -2218,18 +2260,18 @@ ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information
|
|
|
2218
2260
|
}
|
|
2219
2261
|
));
|
|
2220
2262
|
return (a, i) => (c(), b("div", yn, [
|
|
2221
|
-
(c(!0), b(j, null, F(n.value, (
|
|
2222
|
-
|
|
2263
|
+
(c(!0), b(j, null, F(n.value, (l) => w(a.$slots, "default", H({ ref_for: !0 }, l), () => [
|
|
2264
|
+
m(z, {
|
|
2223
2265
|
size: "icon",
|
|
2224
2266
|
variant: "ghost",
|
|
2225
2267
|
class: "group whitespace-nowrap",
|
|
2226
|
-
href:
|
|
2227
|
-
title: a.$td(`errors.report_${
|
|
2228
|
-
onClick:
|
|
2268
|
+
href: l.url,
|
|
2269
|
+
title: a.$td(`errors.report_${l.id}`, l.description),
|
|
2270
|
+
onClick: l.click
|
|
2229
2271
|
}, {
|
|
2230
2272
|
default: f(() => [
|
|
2231
|
-
y("span", wn,
|
|
2232
|
-
(c(), h(N(
|
|
2273
|
+
y("span", wn, S(a.$td(`errors.report_${l.id}`, l.description)), 1),
|
|
2274
|
+
(c(), h(N(l.iconComponent), {
|
|
2233
2275
|
class: "size-4",
|
|
2234
2276
|
"aria-hidden": "true"
|
|
2235
2277
|
}))
|
|
@@ -2239,7 +2281,7 @@ ${s.report.details}`), R.toast(S("errors.copiedToClipboard", "Debug information
|
|
|
2239
2281
|
])), 256))
|
|
2240
2282
|
]));
|
|
2241
2283
|
}
|
|
2242
|
-
}),
|
|
2284
|
+
}), _n = /* @__PURE__ */ g({
|
|
2243
2285
|
__name: "ErrorReportModalTitle",
|
|
2244
2286
|
props: {
|
|
2245
2287
|
report: {},
|
|
@@ -2258,9 +2300,9 @@ function xn(t) {
|
|
|
2258
2300
|
const s = B(t.reports.includes(t.report) ? t.reports.indexOf(t.report) : 0), e = u(() => t.reports[s.value]), r = u(
|
|
2259
2301
|
() => {
|
|
2260
2302
|
var i;
|
|
2261
|
-
return ((i = e.value.details) == null ? void 0 : i.trim()) ||
|
|
2303
|
+
return ((i = e.value.details) == null ? void 0 : i.trim()) || k("errors.detailsEmpty", "This error is missing a stacktrace.");
|
|
2262
2304
|
}
|
|
2263
|
-
), n =
|
|
2305
|
+
), n = k("errors.previousReport", "Show previous report"), a = k("errors.nextReport", "Show next report");
|
|
2264
2306
|
return {
|
|
2265
2307
|
activeReportIndex: s,
|
|
2266
2308
|
details: r,
|
|
@@ -2269,7 +2311,7 @@ function xn(t) {
|
|
|
2269
2311
|
activeReport: e
|
|
2270
2312
|
};
|
|
2271
2313
|
}
|
|
2272
|
-
const Cn = { class: "px-4 pt-5 pb-4" },
|
|
2314
|
+
const Cn = { class: "px-4 pt-5 pb-4" }, Sn = { class: "flex justify-between gap-4" }, kn = { class: "flex items-center gap-2" }, Mn = {
|
|
2273
2315
|
key: 0,
|
|
2274
2316
|
class: "flex gap-0.5"
|
|
2275
2317
|
}, En = { class: "-mt-2 max-h-[75vh] overflow-auto bg-red-800/10" }, Hn = ["textContent"], Vn = /* @__PURE__ */ g({
|
|
@@ -2279,8 +2321,8 @@ const Cn = { class: "px-4 pt-5 pb-4" }, kn = { class: "flex justify-between gap-
|
|
|
2279
2321
|
reports: {}
|
|
2280
2322
|
},
|
|
2281
2323
|
setup(t, { expose: s }) {
|
|
2282
|
-
const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: i, activeReport:
|
|
2283
|
-
return s(), (d, v) => (c(), h(
|
|
2324
|
+
const e = t, { activeReportIndex: r, details: n, nextReportText: a, previousReportText: i, activeReport: l } = xn(e);
|
|
2325
|
+
return s(), (d, v) => (c(), h(G, {
|
|
2284
2326
|
title: d.$td("errors.report", "Error report"),
|
|
2285
2327
|
"title-hidden": "",
|
|
2286
2328
|
"close-hidden": "",
|
|
@@ -2289,59 +2331,59 @@ const Cn = { class: "px-4 pt-5 pb-4" }, kn = { class: "flex justify-between gap-
|
|
|
2289
2331
|
}, {
|
|
2290
2332
|
default: f(() => [
|
|
2291
2333
|
y("div", Cn, [
|
|
2292
|
-
y("h2",
|
|
2293
|
-
y("div",
|
|
2294
|
-
|
|
2295
|
-
|
|
2334
|
+
y("h2", Sn, [
|
|
2335
|
+
y("div", kn, [
|
|
2336
|
+
m(o(yt), { class: "size-5 text-red-600" }),
|
|
2337
|
+
m(_n, {
|
|
2296
2338
|
class: "text-lg leading-6 font-semibold text-gray-900",
|
|
2297
|
-
report: l
|
|
2298
|
-
"current-report":
|
|
2339
|
+
report: o(l),
|
|
2340
|
+
"current-report": o(r) + 1,
|
|
2299
2341
|
"total-reports": d.reports.length
|
|
2300
2342
|
}, null, 8, ["report", "current-report", "total-reports"]),
|
|
2301
2343
|
d.reports.length > 1 ? (c(), b("span", Mn, [
|
|
2302
|
-
|
|
2344
|
+
m(z, {
|
|
2303
2345
|
size: "icon",
|
|
2304
2346
|
variant: "ghost",
|
|
2305
|
-
disabled:
|
|
2306
|
-
"aria-label":
|
|
2307
|
-
title:
|
|
2308
|
-
onClick: v[0] || (v[0] = (
|
|
2347
|
+
disabled: o(r) === 0,
|
|
2348
|
+
"aria-label": o(i),
|
|
2349
|
+
title: o(i),
|
|
2350
|
+
onClick: v[0] || (v[0] = (x) => r.value--)
|
|
2309
2351
|
}, {
|
|
2310
2352
|
default: f(() => [
|
|
2311
|
-
|
|
2353
|
+
m(o(nn), { class: "size-4" })
|
|
2312
2354
|
]),
|
|
2313
2355
|
_: 1
|
|
2314
2356
|
}, 8, ["disabled", "aria-label", "title"]),
|
|
2315
|
-
|
|
2357
|
+
m(z, {
|
|
2316
2358
|
size: "icon",
|
|
2317
2359
|
variant: "ghost",
|
|
2318
|
-
disabled:
|
|
2319
|
-
"aria-label":
|
|
2320
|
-
title:
|
|
2321
|
-
onClick: v[1] || (v[1] = (
|
|
2360
|
+
disabled: o(r) === d.reports.length - 1,
|
|
2361
|
+
"aria-label": o(a),
|
|
2362
|
+
title: o(a),
|
|
2363
|
+
onClick: v[1] || (v[1] = (x) => r.value++)
|
|
2322
2364
|
}, {
|
|
2323
2365
|
default: f(() => [
|
|
2324
|
-
|
|
2366
|
+
m(o(bt), { class: "size-4" })
|
|
2325
2367
|
]),
|
|
2326
2368
|
_: 1
|
|
2327
2369
|
}, 8, ["disabled", "aria-label", "title"])
|
|
2328
2370
|
])) : M("", !0)
|
|
2329
2371
|
]),
|
|
2330
|
-
|
|
2331
|
-
report: l
|
|
2372
|
+
m($n, {
|
|
2373
|
+
report: o(l),
|
|
2332
2374
|
class: "gap-0.5"
|
|
2333
2375
|
}, null, 8, ["report"])
|
|
2334
2376
|
]),
|
|
2335
|
-
l
|
|
2377
|
+
o(l).description ? (c(), h(T, {
|
|
2336
2378
|
key: 0,
|
|
2337
|
-
text: l
|
|
2379
|
+
text: o(l).description,
|
|
2338
2380
|
class: "text-gray-600"
|
|
2339
2381
|
}, null, 8, ["text"])) : M("", !0)
|
|
2340
2382
|
]),
|
|
2341
2383
|
y("div", En, [
|
|
2342
2384
|
y("pre", {
|
|
2343
2385
|
class: "p-4 text-xs text-red-800",
|
|
2344
|
-
textContent:
|
|
2386
|
+
textContent: S(o(n))
|
|
2345
2387
|
}, null, 8, Hn)
|
|
2346
2388
|
])
|
|
2347
2389
|
]),
|
|
@@ -2392,18 +2434,18 @@ const Tn = P({ name: "svg-spinners-90-ring-with-bg", render: In }), Rn = { class
|
|
|
2392
2434
|
{ immediate: !0 }
|
|
2393
2435
|
), fe(() => s && s()), (a, i) => (c(), b("div", Rn, [
|
|
2394
2436
|
y("div", {
|
|
2395
|
-
class:
|
|
2437
|
+
class: C(r.value),
|
|
2396
2438
|
style: It(`transform:translateX(-${(1 - n.value) * 100}%)`)
|
|
2397
2439
|
}, null, 6),
|
|
2398
|
-
y("span", Pn,
|
|
2440
|
+
y("span", Pn, S(a.$td("ui.progress", "{progress}% complete", {
|
|
2399
2441
|
progress: n.value * 100
|
|
2400
2442
|
})), 1)
|
|
2401
2443
|
]));
|
|
2402
2444
|
}
|
|
2403
2445
|
});
|
|
2404
2446
|
function zn(t) {
|
|
2405
|
-
const s = u(() => t.title ??
|
|
2406
|
-
() => t.message ??
|
|
2447
|
+
const s = u(() => t.title ?? k("ui.loading", "Loading")), e = u(
|
|
2448
|
+
() => t.message ?? k("ui.loadingInProgress", "Loading in progress...")
|
|
2407
2449
|
), r = u(() => typeof t.progress == "number" || !!t.job), n = u(() => !t.title);
|
|
2408
2450
|
return { renderedTitle: s, renderedMessage: e, titleHidden: n, showProgress: r };
|
|
2409
2451
|
}
|
|
@@ -2417,24 +2459,24 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2417
2459
|
},
|
|
2418
2460
|
setup(t, { expose: s }) {
|
|
2419
2461
|
const e = t, { renderedTitle: r, renderedMessage: n, titleHidden: a, showProgress: i } = zn(e);
|
|
2420
|
-
return s(), (
|
|
2462
|
+
return s(), (l, d) => (c(), h(G, {
|
|
2421
2463
|
persistent: "",
|
|
2422
|
-
class:
|
|
2464
|
+
class: C(["flex", { "flex-col-reverse": o(i), "items-center justify-center gap-2": !o(i) }]),
|
|
2423
2465
|
"wrapper-class": "w-auto",
|
|
2424
|
-
title:
|
|
2425
|
-
"title-hidden":
|
|
2466
|
+
title: o(r),
|
|
2467
|
+
"title-hidden": o(a)
|
|
2426
2468
|
}, {
|
|
2427
2469
|
default: f(() => [
|
|
2428
|
-
|
|
2470
|
+
o(i) ? (c(), h(An, {
|
|
2429
2471
|
key: 0,
|
|
2430
|
-
progress:
|
|
2431
|
-
job:
|
|
2472
|
+
progress: l.progress,
|
|
2473
|
+
job: l.job,
|
|
2432
2474
|
class: "min-w-[min(400px,80vw)]"
|
|
2433
|
-
}, null, 8, ["progress", "job"])) : (c(), h(
|
|
2475
|
+
}, null, 8, ["progress", "job"])) : (c(), h(o(Tn), {
|
|
2434
2476
|
key: 1,
|
|
2435
2477
|
class: "text-primary-600 mr-1 size-6"
|
|
2436
2478
|
})),
|
|
2437
|
-
|
|
2479
|
+
m(T, { text: o(n) }, null, 8, ["text"])
|
|
2438
2480
|
]),
|
|
2439
2481
|
_: 1
|
|
2440
2482
|
}, 8, ["title", "title-hidden", "class"]));
|
|
@@ -2456,40 +2498,40 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2456
2498
|
label: u(() => t.label),
|
|
2457
2499
|
description: u(() => t.description),
|
|
2458
2500
|
value: u(() => n && t.name ? n.getFieldValue(t.name) : t.modelValue),
|
|
2459
|
-
errors:
|
|
2501
|
+
errors: he(a),
|
|
2460
2502
|
required: u(() => {
|
|
2461
2503
|
if (!(!t.name || !n))
|
|
2462
2504
|
return n.getFieldRules(t.name).includes("required");
|
|
2463
2505
|
}),
|
|
2464
|
-
update(
|
|
2506
|
+
update(l) {
|
|
2465
2507
|
if (n && t.name) {
|
|
2466
|
-
n.setFieldValue(t.name,
|
|
2508
|
+
n.setFieldValue(t.name, l);
|
|
2467
2509
|
return;
|
|
2468
2510
|
}
|
|
2469
|
-
r("update:modelValue",
|
|
2511
|
+
r("update:modelValue", l);
|
|
2470
2512
|
}
|
|
2471
2513
|
};
|
|
2472
|
-
return ae("input", i), s(i), (
|
|
2514
|
+
return ae("input", i), s(i), (l, d) => (c(), h(N(l.as), null, {
|
|
2473
2515
|
default: f(() => [
|
|
2474
|
-
w(
|
|
2516
|
+
w(l.$slots, "default")
|
|
2475
2517
|
]),
|
|
2476
2518
|
_: 3
|
|
2477
2519
|
}));
|
|
2478
2520
|
}
|
|
2479
|
-
}), jn = ["for"],
|
|
2521
|
+
}), jn = ["for"], ke = /* @__PURE__ */ g({
|
|
2480
2522
|
__name: "HeadlessInputLabel",
|
|
2481
2523
|
setup(t) {
|
|
2482
2524
|
const s = V("input", "<HeadlessInputLabel> must be a child of a <HeadlessInput>"), e = He(), r = u(() => !!(s.label || e.default));
|
|
2483
2525
|
return (n, a) => r.value ? (c(), b("label", {
|
|
2484
2526
|
key: 0,
|
|
2485
|
-
for:
|
|
2527
|
+
for: o(s).id
|
|
2486
2528
|
}, [
|
|
2487
2529
|
w(n.$slots, "default", {}, () => [
|
|
2488
|
-
A(
|
|
2530
|
+
A(S(o(s).label), 1)
|
|
2489
2531
|
])
|
|
2490
2532
|
], 8, jn)) : M("", !0);
|
|
2491
2533
|
}
|
|
2492
|
-
}), Bn = ["id", "name", "type", "checked", "required", "aria-invalid", "aria-describedby"],
|
|
2534
|
+
}), Bn = ["id", "name", "type", "checked", "required", "aria-invalid", "aria-describedby"], $t = /* @__PURE__ */ g({
|
|
2493
2535
|
__name: "HeadlessInputInput",
|
|
2494
2536
|
props: {
|
|
2495
2537
|
type: { default: "text" }
|
|
@@ -2500,9 +2542,9 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2500
2542
|
return !!n.value;
|
|
2501
2543
|
});
|
|
2502
2544
|
function i() {
|
|
2503
|
-
s.value && e.update(
|
|
2545
|
+
s.value && e.update(l());
|
|
2504
2546
|
}
|
|
2505
|
-
function
|
|
2547
|
+
function l() {
|
|
2506
2548
|
if (!s.value)
|
|
2507
2549
|
return null;
|
|
2508
2550
|
switch (t.type) {
|
|
@@ -2517,7 +2559,7 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2517
2559
|
return nt(e, () => {
|
|
2518
2560
|
var d;
|
|
2519
2561
|
return (d = s.value) == null ? void 0 : d.focus();
|
|
2520
|
-
}),
|
|
2562
|
+
}), Z(() => {
|
|
2521
2563
|
if (s.value) {
|
|
2522
2564
|
if (t.type === "date" && n.value instanceof Date) {
|
|
2523
2565
|
s.value.valueAsDate = n.value;
|
|
@@ -2526,14 +2568,14 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2526
2568
|
s.value.value = n.value ?? null;
|
|
2527
2569
|
}
|
|
2528
2570
|
}), (d, v) => (c(), b("input", {
|
|
2529
|
-
id:
|
|
2571
|
+
id: o(e).id,
|
|
2530
2572
|
ref: "$inputRef",
|
|
2531
2573
|
name: r.value,
|
|
2532
2574
|
type: d.type,
|
|
2533
2575
|
checked: a.value,
|
|
2534
|
-
required:
|
|
2535
|
-
"aria-invalid":
|
|
2536
|
-
"aria-describedby":
|
|
2576
|
+
required: o(e).required ?? void 0,
|
|
2577
|
+
"aria-invalid": o(e).errors ? "true" : "false",
|
|
2578
|
+
"aria-describedby": o(e).errors ? `${o(e).id}-error` : o(e).description ? `${o(e).id}-description` : void 0,
|
|
2537
2579
|
onInput: i
|
|
2538
2580
|
}, null, 40, Bn));
|
|
2539
2581
|
}
|
|
@@ -2546,10 +2588,10 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2546
2588
|
"<HeadlessInputDescription> must be a child of a <HeadlessInput>"
|
|
2547
2589
|
), e = u(() => typeof s.description == "string" ? s.description : ""), r = u(() => !!s.description);
|
|
2548
2590
|
return (n, a) => w(n.$slots, "default", {
|
|
2549
|
-
id: `${
|
|
2591
|
+
id: `${o(s).id}-description`
|
|
2550
2592
|
}, () => [
|
|
2551
2593
|
r.value ? (c(), h(T, H({ key: 0 }, n.$attrs, {
|
|
2552
|
-
id: `${
|
|
2594
|
+
id: `${o(s).id}-description`,
|
|
2553
2595
|
text: e.value
|
|
2554
2596
|
}), null, 16, ["id", "text"])) : M("", !0)
|
|
2555
2597
|
]);
|
|
@@ -2557,11 +2599,11 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2557
2599
|
}), Fn = ["id"], Me = /* @__PURE__ */ g({
|
|
2558
2600
|
__name: "HeadlessInputError",
|
|
2559
2601
|
setup(t) {
|
|
2560
|
-
const s = V("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = u(() => s.errors ?
|
|
2602
|
+
const s = V("input", "<HeadlessInputError> must be a child of a <HeadlessInput>"), e = u(() => s.errors ? k(`errors.${s.errors[0]}`, `Error: ${s.errors[0]}`) : null);
|
|
2561
2603
|
return (r, n) => e.value ? (c(), b("p", {
|
|
2562
2604
|
key: 0,
|
|
2563
|
-
id: `${
|
|
2564
|
-
},
|
|
2605
|
+
id: `${o(s).id}-error`
|
|
2606
|
+
}, S(e.value), 9, Fn)) : M("", !0);
|
|
2565
2607
|
}
|
|
2566
2608
|
}), Un = {
|
|
2567
2609
|
key: 0,
|
|
@@ -2579,40 +2621,40 @@ const Dn = /* @__PURE__ */ g({
|
|
|
2579
2621
|
},
|
|
2580
2622
|
emits: ["update:modelValue"],
|
|
2581
2623
|
setup(t) {
|
|
2582
|
-
const s =
|
|
2583
|
-
var
|
|
2624
|
+
const s = J(t, ["label", "inputClass", "wrapperClass"]), e = le("$inputRef"), [r, n] = lt(), a = u(() => E("relative rounded-md shadow-2xs", { "mt-1": t.label }, t.wrapperClass)), i = u(() => {
|
|
2625
|
+
var l, d, v;
|
|
2584
2626
|
return E(
|
|
2585
2627
|
// eslint-disable-next-line vue/max-len
|
|
2586
2628
|
"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",
|
|
2587
2629
|
{
|
|
2588
|
-
"focus:ring-primary-600": !((
|
|
2630
|
+
"focus:ring-primary-600": !((l = e.value) != null && l.errors),
|
|
2589
2631
|
"text-gray-900 shadow-2xs ring-gray-300 placeholder:text-gray-400": !((d = e.value) != null && d.errors),
|
|
2590
2632
|
"pr-10 text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500": (v = e.value) == null ? void 0 : v.errors
|
|
2591
2633
|
},
|
|
2592
2634
|
t.inputClass
|
|
2593
2635
|
);
|
|
2594
2636
|
});
|
|
2595
|
-
return (
|
|
2637
|
+
return (l, d) => (c(), h(wt, H({
|
|
2596
2638
|
ref: "$inputRef",
|
|
2597
|
-
label:
|
|
2598
|
-
class:
|
|
2639
|
+
label: l.label,
|
|
2640
|
+
class: o(n)
|
|
2599
2641
|
}, s, {
|
|
2600
|
-
"onUpdate:modelValue": d[0] || (d[0] = (v) =>
|
|
2642
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => l.$emit("update:modelValue", v))
|
|
2601
2643
|
}), {
|
|
2602
2644
|
default: f(() => {
|
|
2603
2645
|
var v;
|
|
2604
2646
|
return [
|
|
2605
|
-
|
|
2647
|
+
m(ke, { class: "block text-sm leading-6 font-medium text-gray-900" }),
|
|
2606
2648
|
y("div", {
|
|
2607
|
-
class:
|
|
2649
|
+
class: C(a.value)
|
|
2608
2650
|
}, [
|
|
2609
|
-
|
|
2610
|
-
(v =
|
|
2611
|
-
|
|
2651
|
+
m($t, H(o(r), { class: i.value }), null, 16, ["class"]),
|
|
2652
|
+
(v = o(e)) != null && v.errors ? (c(), b("div", Un, [
|
|
2653
|
+
m(o(yt), { class: "size-5 text-red-500" })
|
|
2612
2654
|
])) : M("", !0)
|
|
2613
2655
|
], 2),
|
|
2614
|
-
|
|
2615
|
-
|
|
2656
|
+
m(qn, { class: "mt-2 text-sm text-gray-600" }),
|
|
2657
|
+
m(Me, { class: "mt-2 text-sm text-red-600" })
|
|
2616
2658
|
];
|
|
2617
2659
|
}),
|
|
2618
2660
|
_: 1
|
|
@@ -2692,7 +2734,7 @@ function cl(t, s = {}) {
|
|
|
2692
2734
|
function Wn(t) {
|
|
2693
2735
|
const s = at({
|
|
2694
2736
|
draft: Nn(t.defaultValue ?? "")
|
|
2695
|
-
}), e = u(() => t.title ?? t.message), r = u(() => t.title ? t.message : null), n = u(() => t.acceptText ??
|
|
2737
|
+
}), e = u(() => t.title ?? t.message), r = u(() => t.title ? t.message : null), n = u(() => t.acceptText ?? k("ui.accept", "Ok")), a = u(() => t.cancelText ?? k("ui.cancel", "Cancel"));
|
|
2696
2738
|
return { form: s, renderedTitle: e, renderedMessage: r, renderedAcceptText: n, renderedCancelText: a };
|
|
2697
2739
|
}
|
|
2698
2740
|
const Kn = { class: "mt-4 flex flex-row-reverse gap-2" }, Qn = /* @__PURE__ */ g({
|
|
@@ -2709,43 +2751,43 @@ const Kn = { class: "mt-4 flex flex-row-reverse gap-2" }, Qn = /* @__PURE__ */ g
|
|
|
2709
2751
|
cancelVariant: { default: "secondary" }
|
|
2710
2752
|
},
|
|
2711
2753
|
setup(t, { expose: s }) {
|
|
2712
|
-
const e =
|
|
2713
|
-
return s(), (d, v) => (c(), h(
|
|
2714
|
-
title:
|
|
2754
|
+
const e = J(t, ["cancelVariant"]), { form: r, renderedTitle: n, renderedMessage: a, renderedAcceptText: i, renderedCancelText: l } = Wn(e);
|
|
2755
|
+
return s(), (d, v) => (c(), h(G, {
|
|
2756
|
+
title: o(n),
|
|
2715
2757
|
persistent: ""
|
|
2716
2758
|
}, {
|
|
2717
|
-
default: f(({ close:
|
|
2718
|
-
|
|
2719
|
-
form:
|
|
2720
|
-
onSubmit: (
|
|
2759
|
+
default: f(({ close: x }) => [
|
|
2760
|
+
m(vt, {
|
|
2761
|
+
form: o(r),
|
|
2762
|
+
onSubmit: (p) => x(o(r).draft)
|
|
2721
2763
|
}, {
|
|
2722
2764
|
default: f(() => [
|
|
2723
|
-
|
|
2765
|
+
o(a) ? (c(), h(T, {
|
|
2724
2766
|
key: 0,
|
|
2725
|
-
text:
|
|
2767
|
+
text: o(a)
|
|
2726
2768
|
}, null, 8, ["text"])) : M("", !0),
|
|
2727
|
-
|
|
2769
|
+
m(On, {
|
|
2728
2770
|
name: "draft",
|
|
2729
2771
|
class: "mt-2",
|
|
2730
2772
|
placeholder: d.placeholder,
|
|
2731
2773
|
label: d.label
|
|
2732
2774
|
}, null, 8, ["placeholder", "label"]),
|
|
2733
2775
|
y("div", Kn, [
|
|
2734
|
-
|
|
2776
|
+
m(z, {
|
|
2735
2777
|
variant: d.acceptVariant,
|
|
2736
2778
|
submit: ""
|
|
2737
2779
|
}, {
|
|
2738
2780
|
default: f(() => [
|
|
2739
|
-
A(
|
|
2781
|
+
A(S(o(i)), 1)
|
|
2740
2782
|
]),
|
|
2741
2783
|
_: 1
|
|
2742
2784
|
}, 8, ["variant"]),
|
|
2743
|
-
|
|
2785
|
+
m(z, {
|
|
2744
2786
|
variant: d.cancelVariant,
|
|
2745
|
-
onClick: (
|
|
2787
|
+
onClick: (p) => x()
|
|
2746
2788
|
}, {
|
|
2747
2789
|
default: f(() => [
|
|
2748
|
-
A(
|
|
2790
|
+
A(S(o(l)), 1)
|
|
2749
2791
|
]),
|
|
2750
2792
|
_: 2
|
|
2751
2793
|
}, 1032, ["variant", "onClick"])
|
|
@@ -2757,13 +2799,13 @@ const Kn = { class: "mt-4 flex flex-row-reverse gap-2" }, Qn = /* @__PURE__ */ g
|
|
|
2757
2799
|
_: 1
|
|
2758
2800
|
}, 8, ["title"]));
|
|
2759
2801
|
}
|
|
2760
|
-
}), 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" },
|
|
2802
|
+
}), 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({
|
|
2761
2803
|
__name: "StartupCrash",
|
|
2762
2804
|
setup(t) {
|
|
2763
2805
|
return (s, e) => (c(), b("div", Jn, [
|
|
2764
2806
|
y("div", Zn, [
|
|
2765
|
-
y("h1", Xn,
|
|
2766
|
-
|
|
2807
|
+
y("h1", Xn, S(s.$td("startupCrash.title", "Something went wrong!")), 1),
|
|
2808
|
+
m(T, {
|
|
2767
2809
|
text: s.$td(
|
|
2768
2810
|
"startupCrash.message",
|
|
2769
2811
|
`Something failed trying to start the application.
|
|
@@ -2772,22 +2814,22 @@ Here's some things you can do:`
|
|
|
2772
2814
|
),
|
|
2773
2815
|
class: "mt-4 text-center"
|
|
2774
2816
|
}, null, 8, ["text"]),
|
|
2775
|
-
y("div",
|
|
2776
|
-
|
|
2817
|
+
y("div", Yn, [
|
|
2818
|
+
m(z, {
|
|
2777
2819
|
variant: "danger",
|
|
2778
2820
|
onClick: e[0] || (e[0] = (r) => s.$app.reload())
|
|
2779
2821
|
}, {
|
|
2780
2822
|
default: f(() => [
|
|
2781
|
-
A(
|
|
2823
|
+
A(S(s.$td("startupCrash.reload", "Try again")), 1)
|
|
2782
2824
|
]),
|
|
2783
2825
|
_: 1
|
|
2784
2826
|
}),
|
|
2785
|
-
|
|
2827
|
+
m(z, {
|
|
2786
2828
|
variant: "danger",
|
|
2787
2829
|
onClick: e[1] || (e[1] = (r) => s.$errors.inspect(s.$errors.startupErrors))
|
|
2788
2830
|
}, {
|
|
2789
2831
|
default: f(() => [
|
|
2790
|
-
A(
|
|
2832
|
+
A(S(s.$td("startupCrash.inspect", "View error details")), 1)
|
|
2791
2833
|
]),
|
|
2792
2834
|
_: 1
|
|
2793
2835
|
})
|
|
@@ -2795,18 +2837,18 @@ Here's some things you can do:`
|
|
|
2795
2837
|
])
|
|
2796
2838
|
]));
|
|
2797
2839
|
}
|
|
2798
|
-
}),
|
|
2840
|
+
}), _t = /* @__PURE__ */ g({
|
|
2799
2841
|
__name: "HeadlessToastAction",
|
|
2800
2842
|
props: {
|
|
2801
2843
|
action: {}
|
|
2802
2844
|
},
|
|
2803
2845
|
setup(t) {
|
|
2804
|
-
return (s, e) => (c(), h(N(s.action.dismiss ?
|
|
2846
|
+
return (s, e) => (c(), h(N(s.action.dismiss ? o($s) : "button"), {
|
|
2805
2847
|
type: "button",
|
|
2806
2848
|
onClick: s.action.click
|
|
2807
2849
|
}, {
|
|
2808
2850
|
default: f(() => [
|
|
2809
|
-
A(
|
|
2851
|
+
A(S(s.action.label), 1)
|
|
2810
2852
|
]),
|
|
2811
2853
|
_: 1
|
|
2812
2854
|
}, 8, ["onClick"]));
|
|
@@ -2819,11 +2861,11 @@ Here's some things you can do:`
|
|
|
2819
2861
|
variant: {}
|
|
2820
2862
|
},
|
|
2821
2863
|
setup(t) {
|
|
2822
|
-
return (s, e) => (c(), h(
|
|
2864
|
+
return (s, e) => (c(), h(o(_s), null, {
|
|
2823
2865
|
default: f(() => [
|
|
2824
2866
|
w(s.$slots, "default", {}, () => [
|
|
2825
|
-
s.message ? (c(), b("span", ea,
|
|
2826
|
-
(c(!0), b(j, null, F(s.actions, (r, n) => (c(), h(
|
|
2867
|
+
s.message ? (c(), b("span", ea, S(s.message), 1)) : M("", !0),
|
|
2868
|
+
(c(!0), b(j, null, F(s.actions, (r, n) => (c(), h(_t, {
|
|
2827
2869
|
key: n,
|
|
2828
2870
|
action: r
|
|
2829
2871
|
}, null, 8, ["action"]))), 128))
|
|
@@ -2857,7 +2899,7 @@ Here's some things you can do:`
|
|
|
2857
2899
|
}
|
|
2858
2900
|
));
|
|
2859
2901
|
return s(), (r, n) => (c(), h(ta, {
|
|
2860
|
-
class:
|
|
2902
|
+
class: C(e.value)
|
|
2861
2903
|
}, {
|
|
2862
2904
|
default: f(() => [
|
|
2863
2905
|
r.message ? (c(), h(T, {
|
|
@@ -2869,7 +2911,7 @@ Here's some things you can do:`
|
|
|
2869
2911
|
key: i,
|
|
2870
2912
|
action: a,
|
|
2871
2913
|
variant: r.variant,
|
|
2872
|
-
as:
|
|
2914
|
+
as: _t
|
|
2873
2915
|
}, null, 8, ["action", "variant"]))), 128))
|
|
2874
2916
|
]),
|
|
2875
2917
|
_: 1
|
|
@@ -2883,18 +2925,18 @@ Here's some things you can do:`
|
|
|
2883
2925
|
"error-report-modal": Vn,
|
|
2884
2926
|
"loading-modal": Dn,
|
|
2885
2927
|
"prompt-modal": Qn,
|
|
2886
|
-
"startup-crash":
|
|
2928
|
+
"startup-crash": Gn,
|
|
2887
2929
|
toast: sa,
|
|
2888
2930
|
...s.components
|
|
2889
2931
|
};
|
|
2890
2932
|
for (const [r, n] of Object.entries(e))
|
|
2891
2933
|
R.registerComponent(r, n);
|
|
2892
|
-
await
|
|
2934
|
+
await ye(t, ra);
|
|
2893
2935
|
}
|
|
2894
2936
|
};
|
|
2895
2937
|
async function aa(t, s = {}) {
|
|
2896
2938
|
var r;
|
|
2897
|
-
const e = [Pr, Fs, Rr,
|
|
2939
|
+
const e = [Pr, Fs, Rr, wr, Ks, na, ...s.plugins ?? []];
|
|
2898
2940
|
D.instance = t, await As(e, t, s), await ((r = s.install) == null ? void 0 : r.call(s, t)), await I.emit("application-ready");
|
|
2899
2941
|
}
|
|
2900
2942
|
async function ul(t, s = {}) {
|
|
@@ -2907,7 +2949,7 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
2907
2949
|
setup(t) {
|
|
2908
2950
|
const s = u(() => R.modals[0] ?? null);
|
|
2909
2951
|
return (e, r) => s.value ? (c(), b("aside", la, [
|
|
2910
|
-
|
|
2952
|
+
m(gt, {
|
|
2911
2953
|
"child-index": 1,
|
|
2912
2954
|
modal: s.value
|
|
2913
2955
|
}, null, 8, ["modal"])
|
|
@@ -2916,14 +2958,14 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
2916
2958
|
}), ia = /* @__PURE__ */ g({
|
|
2917
2959
|
__name: "AppToasts",
|
|
2918
2960
|
setup(t) {
|
|
2919
|
-
return (s, e) => (c(), h(
|
|
2961
|
+
return (s, e) => (c(), h(o(xs), null, {
|
|
2920
2962
|
default: f(() => [
|
|
2921
2963
|
(c(!0), b(j, null, F(s.$ui.toasts, (r) => (c(), h(N(r.component), H({
|
|
2922
2964
|
id: r.id,
|
|
2923
2965
|
key: r.id,
|
|
2924
2966
|
ref_for: !0
|
|
2925
2967
|
}, r.properties), null, 16, ["id"]))), 128)),
|
|
2926
|
-
|
|
2968
|
+
m(o(Cs), { class: "fixed right-0 bottom-0 z-50 flex flex-col items-end space-y-4 px-4 py-6 sm:p-6" })
|
|
2927
2969
|
]),
|
|
2928
2970
|
_: 1
|
|
2929
2971
|
}));
|
|
@@ -2932,8 +2974,8 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
2932
2974
|
__name: "AppOverlays",
|
|
2933
2975
|
setup(t) {
|
|
2934
2976
|
return (s, e) => (c(), b(j, null, [
|
|
2935
|
-
|
|
2936
|
-
|
|
2977
|
+
m(oa),
|
|
2978
|
+
m(ia)
|
|
2937
2979
|
], 64));
|
|
2938
2980
|
}
|
|
2939
2981
|
}), ua = { class: "flex min-h-full flex-col text-base leading-tight font-normal text-gray-900 antialiased" }, dl = /* @__PURE__ */ g({
|
|
@@ -2943,7 +2985,7 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
2943
2985
|
s.$errors.hasStartupErrors ? w(s.$slots, "startup-crash", { key: 0 }, () => [
|
|
2944
2986
|
(c(), h(N(s.$ui.requireComponent("startup-crash"))))
|
|
2945
2987
|
]) : w(s.$slots, "default", { key: 1 }),
|
|
2946
|
-
|
|
2988
|
+
m(ca)
|
|
2947
2989
|
]));
|
|
2948
2990
|
}
|
|
2949
2991
|
}), da = ["id", "name", "value", "required", "aria-invalid", "aria-describedby"], pl = /* @__PURE__ */ g({
|
|
@@ -2959,14 +3001,14 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
2959
3001
|
return nt(e, () => {
|
|
2960
3002
|
var i;
|
|
2961
3003
|
return (i = s.value) == null ? void 0 : i.focus();
|
|
2962
|
-
}), (i,
|
|
2963
|
-
id:
|
|
3004
|
+
}), (i, l) => (c(), b("textarea", {
|
|
3005
|
+
id: o(e).id,
|
|
2964
3006
|
ref: "$textAreaRef",
|
|
2965
3007
|
name: r.value,
|
|
2966
3008
|
value: n.value,
|
|
2967
|
-
required:
|
|
2968
|
-
"aria-invalid":
|
|
2969
|
-
"aria-describedby":
|
|
3009
|
+
required: o(e).required ?? void 0,
|
|
3010
|
+
"aria-invalid": o(e).errors ? "true" : "false",
|
|
3011
|
+
"aria-describedby": o(e).errors ? `${o(e).id}-error` : o(e).description ? `${o(e).id}-description` : void 0,
|
|
2970
3012
|
onInput: a
|
|
2971
3013
|
}, null, 40, da));
|
|
2972
3014
|
}
|
|
@@ -2975,8 +3017,8 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
2975
3017
|
setup(t) {
|
|
2976
3018
|
return (s, e) => (c(), b("details", pa, [
|
|
2977
3019
|
y("summary", ma, [
|
|
2978
|
-
|
|
2979
|
-
y("span", null,
|
|
3020
|
+
m(o(bt), { class: "size-6 transition-transform group-open:rotate-90" }),
|
|
3021
|
+
y("span", null, S(s.$td("ui.advancedOptions", "Advanced options")), 1)
|
|
2980
3022
|
]),
|
|
2981
3023
|
y("div", fa, [
|
|
2982
3024
|
w(s.$slots, "default")
|
|
@@ -2996,7 +3038,7 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
2996
3038
|
},
|
|
2997
3039
|
emits: ["update:modelValue"],
|
|
2998
3040
|
setup(t) {
|
|
2999
|
-
const s =
|
|
3041
|
+
const s = J(t, ["inputClass", "labelClass"]), e = le("$inputRef"), [r, n] = lt(), a = u(() => E("relative flex items-start", n.value)), i = u(() => {
|
|
3000
3042
|
var d, v;
|
|
3001
3043
|
return E(
|
|
3002
3044
|
"size-4 rounded text-primary-600 not-checked:hover:bg-gray-200 checked:hover:text-primary-500 checked:border-0",
|
|
@@ -3006,37 +3048,37 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
3006
3048
|
},
|
|
3007
3049
|
t.inputClass
|
|
3008
3050
|
);
|
|
3009
|
-
}),
|
|
3051
|
+
}), l = u(() => E("ml-2 text-sm leading-6", t.labelClass));
|
|
3010
3052
|
return (d, v) => (c(), h(wt, H({
|
|
3011
3053
|
ref: "$inputRef",
|
|
3012
3054
|
class: a.value
|
|
3013
3055
|
}, s, {
|
|
3014
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
3056
|
+
"onUpdate:modelValue": v[0] || (v[0] = (x) => d.$emit("update:modelValue", x))
|
|
3015
3057
|
}), {
|
|
3016
3058
|
default: f(() => [
|
|
3017
3059
|
y("div", ha, [
|
|
3018
|
-
|
|
3060
|
+
m($t, H(o(r), {
|
|
3019
3061
|
type: "checkbox",
|
|
3020
3062
|
class: i.value
|
|
3021
3063
|
}), null, 16, ["class"])
|
|
3022
3064
|
]),
|
|
3023
3065
|
d.$slots.default ? (c(), b("div", {
|
|
3024
3066
|
key: 0,
|
|
3025
|
-
class:
|
|
3067
|
+
class: C(l.value)
|
|
3026
3068
|
}, [
|
|
3027
|
-
|
|
3069
|
+
m(ke, { class: "text-gray-900" }, {
|
|
3028
3070
|
default: f(() => [
|
|
3029
3071
|
w(d.$slots, "default")
|
|
3030
3072
|
]),
|
|
3031
3073
|
_: 3
|
|
3032
3074
|
}),
|
|
3033
|
-
|
|
3075
|
+
m(Me, { class: "text-red-600" })
|
|
3034
3076
|
], 2)) : d.label ? (c(), b("div", {
|
|
3035
3077
|
key: 1,
|
|
3036
|
-
class:
|
|
3078
|
+
class: C(l.value)
|
|
3037
3079
|
}, [
|
|
3038
|
-
|
|
3039
|
-
|
|
3080
|
+
m(ke, { class: "text-gray-900" }),
|
|
3081
|
+
m(Me, { class: "text-red-600" })
|
|
3040
3082
|
], 2)) : M("", !0)
|
|
3041
3083
|
]),
|
|
3042
3084
|
_: 3
|
|
@@ -3051,11 +3093,11 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
3051
3093
|
},
|
|
3052
3094
|
emits: ["select"],
|
|
3053
3095
|
setup(t) {
|
|
3054
|
-
const s =
|
|
3096
|
+
const s = J(t, ["class"]), e = u(() => E(
|
|
3055
3097
|
"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-gray-900 data-[highlighted]:bg-gray-100",
|
|
3056
3098
|
t.class
|
|
3057
3099
|
));
|
|
3058
|
-
return (r, n) => (c(), h(
|
|
3100
|
+
return (r, n) => (c(), h(o(Ss), H({ class: e.value }, s, {
|
|
3059
3101
|
onSelect: n[0] || (n[0] = (a) => r.$emit("select"))
|
|
3060
3102
|
}), {
|
|
3061
3103
|
default: f(() => [
|
|
@@ -3071,14 +3113,14 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
3071
3113
|
"dropdown-menu",
|
|
3072
3114
|
"<DropdownMenuOptions> must be a child of a <DropdownMenu>"
|
|
3073
3115
|
);
|
|
3074
|
-
return (e, r) => (c(), h(
|
|
3116
|
+
return (e, r) => (c(), h(o(ks), {
|
|
3075
3117
|
class: "gap-y-0.5 rounded-lg bg-white p-1.5 shadow-lg ring-1 ring-black/5",
|
|
3076
|
-
align:
|
|
3077
|
-
side:
|
|
3118
|
+
align: o(s).align,
|
|
3119
|
+
side: o(s).side
|
|
3078
3120
|
}, {
|
|
3079
3121
|
default: f(() => [
|
|
3080
3122
|
w(e.$slots, "default", {}, () => [
|
|
3081
|
-
(c(!0), b(j, null, F(
|
|
3123
|
+
(c(!0), b(j, null, F(o(s).options, (n, a) => (c(), h(ga, H(
|
|
3082
3124
|
{
|
|
3083
3125
|
key: a,
|
|
3084
3126
|
as: n.route || n.href ? tt : void 0,
|
|
@@ -3093,13 +3135,13 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
3093
3135
|
} : {},
|
|
3094
3136
|
{
|
|
3095
3137
|
onSelect: (i) => {
|
|
3096
|
-
var
|
|
3097
|
-
return (
|
|
3138
|
+
var l;
|
|
3139
|
+
return (l = n.click) == null ? void 0 : l.call(n);
|
|
3098
3140
|
}
|
|
3099
3141
|
}
|
|
3100
3142
|
), {
|
|
3101
3143
|
default: f(() => [
|
|
3102
|
-
A(
|
|
3144
|
+
A(S(n.label), 1)
|
|
3103
3145
|
]),
|
|
3104
3146
|
_: 2
|
|
3105
3147
|
}, 1040, ["as", "class", "onSelect"]))), 128))
|
|
@@ -3124,18 +3166,18 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
3124
3166
|
return (r = t.options) == null ? void 0 : r.filter(Boolean);
|
|
3125
3167
|
})
|
|
3126
3168
|
};
|
|
3127
|
-
return ae("dropdown-menu", e), s(e), (r, n) => (c(), h(
|
|
3169
|
+
return ae("dropdown-menu", e), s(e), (r, n) => (c(), h(o(Ms), null, {
|
|
3128
3170
|
default: f(() => [
|
|
3129
|
-
|
|
3171
|
+
m(o(Es), null, {
|
|
3130
3172
|
default: f(() => [
|
|
3131
3173
|
w(r.$slots, "default")
|
|
3132
3174
|
]),
|
|
3133
3175
|
_: 3
|
|
3134
3176
|
}),
|
|
3135
|
-
|
|
3177
|
+
m(o(Hs), null, {
|
|
3136
3178
|
default: f(() => [
|
|
3137
3179
|
w(r.$slots, "options", {}, () => [
|
|
3138
|
-
|
|
3180
|
+
m(va)
|
|
3139
3181
|
])
|
|
3140
3182
|
]),
|
|
3141
3183
|
_: 3
|
|
@@ -3157,50 +3199,50 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
3157
3199
|
},
|
|
3158
3200
|
emits: ["update", "save"],
|
|
3159
3201
|
setup(t, { emit: s }) {
|
|
3160
|
-
const e = s, r = le("$inputRef"), n = B(null), a = B(t.text), i = u(() => E("inline whitespace-pre", t.contentClass)),
|
|
3202
|
+
const e = s, r = le("$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));
|
|
3161
3203
|
function v() {
|
|
3162
3204
|
n.value = t.text;
|
|
3163
3205
|
}
|
|
3164
|
-
function
|
|
3206
|
+
function x() {
|
|
3165
3207
|
n.value && (t.type !== "number" && a.value.trim().length === 0 && (a.value = n.value, e("update", a.value)), n.value = null, e("save"));
|
|
3166
3208
|
}
|
|
3167
|
-
return
|
|
3168
|
-
class:
|
|
3209
|
+
return Z(() => a.value = t.text), (p, _) => (c(), b("div", {
|
|
3210
|
+
class: C(["relative", { "pointer-events-none!": p.disabled && !n.value }])
|
|
3169
3211
|
}, [
|
|
3170
3212
|
n.value ? (c(), b("span", {
|
|
3171
3213
|
key: 1,
|
|
3172
|
-
class:
|
|
3173
|
-
},
|
|
3214
|
+
class: C(l.value)
|
|
3215
|
+
}, S(a.value), 3)) : (c(), b("div", {
|
|
3174
3216
|
key: 0,
|
|
3175
|
-
class:
|
|
3217
|
+
class: C(i.value)
|
|
3176
3218
|
}, [
|
|
3177
|
-
w(
|
|
3219
|
+
w(p.$slots, "default")
|
|
3178
3220
|
], 2)),
|
|
3179
|
-
|
|
3221
|
+
p.type === "number" ? (c(), b("span", {
|
|
3180
3222
|
key: 2,
|
|
3181
|
-
class:
|
|
3223
|
+
class: C(["inline-block transition-[width]", n.value ? "w-5" : "w-0"])
|
|
3182
3224
|
}, null, 2)) : M("", !0),
|
|
3183
3225
|
y("form", {
|
|
3184
3226
|
class: "w-full",
|
|
3185
|
-
"aria-hidden":
|
|
3186
|
-
onSubmit:
|
|
3187
|
-
var
|
|
3188
|
-
return (
|
|
3227
|
+
"aria-hidden": p.formAriaHidden,
|
|
3228
|
+
onSubmit: _[4] || (_[4] = Ue((L) => {
|
|
3229
|
+
var we;
|
|
3230
|
+
return (we = o(r)) == null ? void 0 : we.blur();
|
|
3189
3231
|
}, ["prevent"]))
|
|
3190
3232
|
}, [
|
|
3191
3233
|
Oe(y("input", {
|
|
3192
3234
|
ref: "$inputRef",
|
|
3193
|
-
"onUpdate:modelValue":
|
|
3194
|
-
tabindex:
|
|
3195
|
-
"aria-label":
|
|
3196
|
-
type:
|
|
3197
|
-
class:
|
|
3235
|
+
"onUpdate:modelValue": _[0] || (_[0] = (L) => a.value = L),
|
|
3236
|
+
tabindex: p.tabindex ?? void 0,
|
|
3237
|
+
"aria-label": p.ariaLabel ?? void 0,
|
|
3238
|
+
type: p.type,
|
|
3239
|
+
class: C([
|
|
3198
3240
|
d.value,
|
|
3199
|
-
{ "opacity-0": !n.value, "appearance-textfield": !n.value &&
|
|
3241
|
+
{ "opacity-0": !n.value, "appearance-textfield": !n.value && p.type === "number" }
|
|
3200
3242
|
]),
|
|
3201
|
-
onKeyup:
|
|
3202
|
-
onFocus:
|
|
3203
|
-
onBlur:
|
|
3243
|
+
onKeyup: _[1] || (_[1] = (L) => p.$emit("update", a.value)),
|
|
3244
|
+
onFocus: _[2] || (_[2] = (L) => v()),
|
|
3245
|
+
onBlur: _[3] || (_[3] = (L) => x())
|
|
3204
3246
|
}, null, 42, ya), [
|
|
3205
3247
|
[Rt, a.value]
|
|
3206
3248
|
])
|
|
@@ -3212,7 +3254,7 @@ const la = { key: 0 }, oa = /* @__PURE__ */ g({
|
|
|
3212
3254
|
width: "1.2em",
|
|
3213
3255
|
height: "1.2em"
|
|
3214
3256
|
};
|
|
3215
|
-
function
|
|
3257
|
+
function $a(t, s) {
|
|
3216
3258
|
return c(), b("svg", wa, s[0] || (s[0] = [
|
|
3217
3259
|
y("path", {
|
|
3218
3260
|
fill: "currentColor",
|
|
@@ -3220,7 +3262,7 @@ function _a(t, s) {
|
|
|
3220
3262
|
}, null, -1)
|
|
3221
3263
|
]));
|
|
3222
3264
|
}
|
|
3223
|
-
const
|
|
3265
|
+
const _a = P({ name: "ion-warning", render: $a }), xa = {
|
|
3224
3266
|
viewBox: "0 0 20 20",
|
|
3225
3267
|
width: "1.2em",
|
|
3226
3268
|
height: "1.2em"
|
|
@@ -3233,10 +3275,10 @@ function Ca(t, s) {
|
|
|
3233
3275
|
}, null, -1)
|
|
3234
3276
|
]));
|
|
3235
3277
|
}
|
|
3236
|
-
const
|
|
3278
|
+
const Sa = P({ name: "zondicons-view-show", render: Ca }), ka = { class: "font-medium" }, Ma = ["datetime"], Ea = /* @__PURE__ */ g({
|
|
3237
3279
|
__name: "ErrorLogsModal",
|
|
3238
3280
|
setup(t) {
|
|
3239
|
-
return (s, e) => (c(), h(
|
|
3281
|
+
return (s, e) => (c(), h(G, {
|
|
3240
3282
|
title: s.$td("errors.report", "Errors ({count})", { count: s.$errors.logs.length })
|
|
3241
3283
|
}, {
|
|
3242
3284
|
default: f(() => [
|
|
@@ -3246,17 +3288,17 @@ const ka = P({ name: "zondicons-view-show", render: Ca }), Sa = { class: "font-m
|
|
|
3246
3288
|
class: "mb-2 flex max-w-prose min-w-56 justify-between py-2 last:mb-0"
|
|
3247
3289
|
}, [
|
|
3248
3290
|
y("div", null, [
|
|
3249
|
-
y("h3",
|
|
3291
|
+
y("h3", ka, S(r.report.title), 1),
|
|
3250
3292
|
y("time", {
|
|
3251
3293
|
datetime: r.date.toISOString(),
|
|
3252
3294
|
class: "text-xs text-gray-700"
|
|
3253
|
-
},
|
|
3254
|
-
|
|
3295
|
+
}, S(r.date.toLocaleTimeString()), 9, Ma),
|
|
3296
|
+
m(T, {
|
|
3255
3297
|
class: "text-sm text-gray-500",
|
|
3256
|
-
text: r.report.description ??
|
|
3298
|
+
text: r.report.description ?? o(ht)(r.report)
|
|
3257
3299
|
}, null, 8, ["text"])
|
|
3258
3300
|
]),
|
|
3259
|
-
|
|
3301
|
+
m(z, {
|
|
3260
3302
|
size: "icon",
|
|
3261
3303
|
variant: "ghost",
|
|
3262
3304
|
"aria-label": s.$td("errors.viewDetails", "View details"),
|
|
@@ -3268,7 +3310,7 @@ const ka = P({ name: "zondicons-view-show", render: Ca }), Sa = { class: "font-m
|
|
|
3268
3310
|
)
|
|
3269
3311
|
}, {
|
|
3270
3312
|
default: f(() => [
|
|
3271
|
-
|
|
3313
|
+
m(o(Sa), {
|
|
3272
3314
|
class: "size-4",
|
|
3273
3315
|
"aria-hidden": "true"
|
|
3274
3316
|
})
|
|
@@ -3293,7 +3335,7 @@ const ka = P({ name: "zondicons-view-show", render: Ca }), Sa = { class: "font-m
|
|
|
3293
3335
|
onClick: e[0] || (e[0] = (r) => s.$ui.modal(Ea))
|
|
3294
3336
|
}, {
|
|
3295
3337
|
default: f(() => [
|
|
3296
|
-
|
|
3338
|
+
m(o(_a), { class: "size-6 text-red-500" })
|
|
3297
3339
|
]),
|
|
3298
3340
|
_: 1
|
|
3299
3341
|
}, 8, ["title", "aria-label"])) : M("", !0);
|
|
@@ -3336,7 +3378,7 @@ const ka = P({ name: "zondicons-view-show", render: Ca }), Sa = { class: "font-m
|
|
|
3336
3378
|
__name: "SettingsModal",
|
|
3337
3379
|
setup(t) {
|
|
3338
3380
|
const s = u(() => Nt(D.settings, "priority", "desc"));
|
|
3339
|
-
return (e, r) => (c(), h(
|
|
3381
|
+
return (e, r) => (c(), h(G, {
|
|
3340
3382
|
title: e.$td("settings.title", "Settings")
|
|
3341
3383
|
}, {
|
|
3342
3384
|
default: f(() => [
|
|
@@ -3346,14 +3388,14 @@ const ka = P({ name: "zondicons-view-show", render: Ca }), Sa = { class: "font-m
|
|
|
3346
3388
|
}, 8, ["title"]));
|
|
3347
3389
|
}
|
|
3348
3390
|
});
|
|
3349
|
-
class
|
|
3391
|
+
class $l {
|
|
3350
3392
|
constructor() {
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3393
|
+
$(this, "status");
|
|
3394
|
+
$(this, "_listeners");
|
|
3395
|
+
$(this, "_progress");
|
|
3396
|
+
$(this, "_cancelled");
|
|
3397
|
+
$(this, "_started");
|
|
3398
|
+
$(this, "_completed");
|
|
3357
3399
|
this.status = this.getInitialStatus(), this._listeners = new Wt(), this._started = new W(), this._completed = new W();
|
|
3358
3400
|
}
|
|
3359
3401
|
async start() {
|
|
@@ -3421,7 +3463,7 @@ class _l {
|
|
|
3421
3463
|
return { ...s };
|
|
3422
3464
|
}
|
|
3423
3465
|
}
|
|
3424
|
-
async function
|
|
3466
|
+
async function _l(t) {
|
|
3425
3467
|
await t.start();
|
|
3426
3468
|
}
|
|
3427
3469
|
export {
|
|
@@ -3446,82 +3488,83 @@ export {
|
|
|
3446
3488
|
Ea as ErrorLogsModal,
|
|
3447
3489
|
bl as ErrorMessage,
|
|
3448
3490
|
Vn as ErrorReportModal,
|
|
3449
|
-
|
|
3450
|
-
|
|
3491
|
+
$n as ErrorReportModalButtons,
|
|
3492
|
+
_n as ErrorReportModalTitle,
|
|
3451
3493
|
et as Errors,
|
|
3452
3494
|
qa as EventListenerPriorities,
|
|
3453
3495
|
I as Events,
|
|
3454
3496
|
Ts as EventsService,
|
|
3455
3497
|
vt as Form,
|
|
3456
|
-
|
|
3498
|
+
ur as FormController,
|
|
3457
3499
|
tt as HeadlessButton,
|
|
3458
3500
|
wt as HeadlessInput,
|
|
3459
3501
|
qn as HeadlessInputDescription,
|
|
3460
3502
|
Me as HeadlessInputError,
|
|
3461
|
-
|
|
3462
|
-
|
|
3503
|
+
$t as HeadlessInputInput,
|
|
3504
|
+
ke as HeadlessInputLabel,
|
|
3463
3505
|
pl as HeadlessInputTextArea,
|
|
3464
3506
|
jr as HeadlessModal,
|
|
3465
3507
|
Br as HeadlessModalContent,
|
|
3466
3508
|
qr as HeadlessModalDescription,
|
|
3467
3509
|
Fr as HeadlessModalOverlay,
|
|
3468
3510
|
Ur as HeadlessModalTitle,
|
|
3469
|
-
|
|
3511
|
+
dr as HeadlessSelect,
|
|
3470
3512
|
De as HeadlessSelectLabel,
|
|
3471
3513
|
ct as HeadlessSelectOption,
|
|
3472
3514
|
ut as HeadlessSelectOptions,
|
|
3473
3515
|
it as HeadlessSelectTrigger,
|
|
3474
3516
|
ot as HeadlessSelectValue,
|
|
3475
|
-
|
|
3517
|
+
Mr as HeadlessSwitch,
|
|
3476
3518
|
ta as HeadlessToast,
|
|
3477
3519
|
On as Input,
|
|
3478
|
-
|
|
3520
|
+
$l as Job,
|
|
3479
3521
|
Be as JobCancelledError,
|
|
3480
3522
|
Q as Lang,
|
|
3481
|
-
|
|
3523
|
+
me as Layouts,
|
|
3482
3524
|
yl as Link,
|
|
3483
3525
|
Dn as LoadingModal,
|
|
3484
3526
|
Xe as MOBILE_BREAKPOINT,
|
|
3485
3527
|
T as Markdown,
|
|
3486
|
-
|
|
3528
|
+
G as Modal,
|
|
3487
3529
|
gt as ModalContext,
|
|
3488
3530
|
An as ProgressBar,
|
|
3489
3531
|
Qn as PromptModal,
|
|
3490
|
-
|
|
3532
|
+
hr as Select,
|
|
3491
3533
|
dt as SelectLabel,
|
|
3492
3534
|
je as SelectOption,
|
|
3493
3535
|
pt as SelectOptions,
|
|
3494
3536
|
mt as SelectTrigger,
|
|
3495
|
-
|
|
3496
|
-
|
|
3537
|
+
be as Service,
|
|
3538
|
+
Se as ServiceBootError,
|
|
3539
|
+
Sr as Setting,
|
|
3497
3540
|
wl as SettingsModal,
|
|
3498
|
-
|
|
3541
|
+
Gn as StartupCrash,
|
|
3499
3542
|
Ns as Storage,
|
|
3500
|
-
|
|
3543
|
+
Er as Switch,
|
|
3501
3544
|
sa as Toast,
|
|
3502
3545
|
R as UI,
|
|
3503
3546
|
Js as UIService,
|
|
3504
3547
|
Ja as __objectType,
|
|
3505
3548
|
tl as booleanInput,
|
|
3506
|
-
|
|
3549
|
+
ye as bootServices,
|
|
3507
3550
|
ul as bootstrap,
|
|
3508
3551
|
aa as bootstrapApplication,
|
|
3509
3552
|
E as classes,
|
|
3510
|
-
|
|
3511
|
-
|
|
3553
|
+
Ya as computedAsync,
|
|
3554
|
+
Ga as computedDebounce,
|
|
3512
3555
|
sl as dateInput,
|
|
3513
3556
|
Oa as defineDirective,
|
|
3514
3557
|
Qa as defineFormValidationRule,
|
|
3515
3558
|
Ua as definePlugin,
|
|
3516
|
-
|
|
3559
|
+
ve as defineServiceState,
|
|
3517
3560
|
Is as defineServiceStore,
|
|
3518
3561
|
Fa as defineSettings,
|
|
3519
|
-
|
|
3520
|
-
|
|
3562
|
+
_l as dispatch,
|
|
3563
|
+
Ye as getCurrentLayout,
|
|
3521
3564
|
ht as getErrorMessage,
|
|
3522
|
-
|
|
3565
|
+
nr as getMarkdownRouter,
|
|
3523
3566
|
Ls as getPiniaStore,
|
|
3524
|
-
|
|
3567
|
+
or as hasSelectOptionLabel,
|
|
3525
3568
|
js as injectOrFail,
|
|
3526
3569
|
Ds as injectReactive,
|
|
3527
3570
|
V as injectReactiveOrFail,
|
|
@@ -3532,7 +3575,7 @@ export {
|
|
|
3532
3575
|
nt as onFormFocus,
|
|
3533
3576
|
Xa as persistent,
|
|
3534
3577
|
el as registerErrorHandler,
|
|
3535
|
-
|
|
3578
|
+
ar as renderMarkdown,
|
|
3536
3579
|
Ze as renderVNode,
|
|
3537
3580
|
Wa as replaceExisting,
|
|
3538
3581
|
rl as requiredBooleanInput,
|
|
@@ -3541,11 +3584,11 @@ export {
|
|
|
3541
3584
|
ll as requiredObjectInput,
|
|
3542
3585
|
Nn as requiredStringInput,
|
|
3543
3586
|
Vs as resetPiniaStore,
|
|
3544
|
-
|
|
3587
|
+
lr as safeHtml,
|
|
3545
3588
|
Ka as setMarkdownRouter,
|
|
3546
3589
|
cl as stringInput,
|
|
3547
|
-
|
|
3548
|
-
|
|
3590
|
+
Ge as translate,
|
|
3591
|
+
k as translateWithDefault,
|
|
3549
3592
|
Kr as useAlertModal,
|
|
3550
3593
|
Jr as useConfirmModal,
|
|
3551
3594
|
xn as useErrorReportModal,
|
|
@@ -3554,8 +3597,8 @@ export {
|
|
|
3554
3597
|
lt as useInputAttrs,
|
|
3555
3598
|
zn as useLoadingModal,
|
|
3556
3599
|
Wn as usePromptModal,
|
|
3557
|
-
|
|
3558
|
-
|
|
3600
|
+
cr as validate,
|
|
3601
|
+
de as validators,
|
|
3559
3602
|
st as variantClasses
|
|
3560
3603
|
};
|
|
3561
3604
|
//# sourceMappingURL=aerogel-core.js.map
|