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