@illinois-grad/grad-vue 2.4.0 → 2.4.2

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.
@@ -0,0 +1,3394 @@
1
+ import { defineComponent as T, useSlots as Be, useAttrs as at, computed as S, openBlock as i, createBlock as N, resolveDynamicComponent as se, mergeProps as ae, unref as m, withCtx as U, createElementBlock as f, Fragment as D, createElementVNode as n, renderSlot as F, normalizeClass as O, getCurrentInstance as Ve, resolveComponent as ot, renderList as Z, toDisplayString as _, createTextVNode as j, createCommentVNode as E, useId as Y, ref as M, createVNode as W, inject as be, onMounted as ie, onBeforeUnmount as fe, useModel as q, toRef as $e, mergeModels as H, shallowRef as He, watch as Q, toValue as Me, nextTick as X, useTemplateRef as ge, Teleport as Te, Transition as Ce, normalizeStyle as ve, onBeforeMount as Ze, withModifiers as ce, withDirectives as we, vShow as st, watchEffect as Ke, reactive as nt, toRaw as Ye, vModelCheckbox as Ue, normalizeProps as rt, guardReactiveProps as it, shallowReactive as ut, provide as dt } from "vue";
2
+ import { toArray as ct, unrefElement as ft, tryOnScopeDispose as vt, useFocusWithin as gt, useDebounceFn as mt, useClipboard as bt, useResizeObserver as je } from "@vueuse/core";
3
+ import { createFocusTrap as pt } from "focus-trap";
4
+ const ht = { class: "g-btn--icon" }, yt = { class: "g-btn--label" }, kt = {}, ne = /* @__PURE__ */ T({
5
+ ...kt,
6
+ __name: "GButton",
7
+ props: {
8
+ size: { default: "medium" },
9
+ theme: { default: "primary" },
10
+ outlined: { type: Boolean, default: !1 },
11
+ text: { type: Boolean, default: !1 },
12
+ to: { default: void 0 },
13
+ component: { default: void 0 },
14
+ icon: { default: void 0 }
15
+ },
16
+ emits: [
17
+ "click",
18
+ "focus",
19
+ "blur",
20
+ "keydown",
21
+ "keyup",
22
+ "mousedown",
23
+ "mouseup",
24
+ "mouseenter",
25
+ "mouseleave"
26
+ ],
27
+ setup(e) {
28
+ const l = e, t = Be(), a = at(), o = S(() => [
29
+ "g-btn",
30
+ `g-btn--${l.size}`,
31
+ `g-btn--${l.theme}`,
32
+ {
33
+ "g-btn--outlined": l.outlined,
34
+ "g-btn--text": l.text,
35
+ "g-btn--primary": l.theme === "primary",
36
+ "g-btn--accent": l.theme === "accent",
37
+ "g-btn-has-text": l.text,
38
+ "g-btn-has-icon-class": l.icon,
39
+ "g-btn-has-icon-svg": !!t.icon
40
+ }
41
+ ]);
42
+ return (r, d) => (i(), N(se(l.component ? l.component : "button"), ae(m(a), {
43
+ to: l.to,
44
+ class: o.value,
45
+ type: l.to ? void 0 : "button",
46
+ onClick: d[0] || (d[0] = (c) => r.$emit("click", c)),
47
+ onFocus: d[1] || (d[1] = (c) => r.$emit("focus", c)),
48
+ onBlur: d[2] || (d[2] = (c) => r.$emit("blur", c)),
49
+ onKeydown: d[3] || (d[3] = (c) => r.$emit("keydown", c)),
50
+ onKeyup: d[4] || (d[4] = (c) => r.$emit("keyup", c)),
51
+ onMousedown: d[5] || (d[5] = (c) => r.$emit("mousedown", c)),
52
+ onMouseup: d[6] || (d[6] = (c) => r.$emit("mouseup", c)),
53
+ onMouseenter: d[7] || (d[7] = (c) => r.$emit("mouseenter", c)),
54
+ onMouseleave: d[8] || (d[8] = (c) => r.$emit("mouseleave", c))
55
+ }), {
56
+ default: U(() => [
57
+ e.icon || t.icon ? (i(), f(D, { key: 0 }, [
58
+ n("span", ht, [
59
+ t.icon ? F(r.$slots, "icon", { key: 0 }) : (i(), f("span", {
60
+ key: 1,
61
+ class: O(e.icon + " g-btn--icon-span"),
62
+ "aria-hidden": "true"
63
+ }, null, 2))
64
+ ]),
65
+ n("span", yt, [
66
+ F(r.$slots, "default")
67
+ ])
68
+ ], 64)) : F(r.$slots, "default", { key: 1 })
69
+ ]),
70
+ _: 3
71
+ }, 16, ["to", "class", "type"]));
72
+ }
73
+ }), _t = ["data-tree-item-key", "data-tree-expandable"], wt = ["aria-expanded", "onClick"], $t = {
74
+ key: 1,
75
+ class: "g-tree-menu__row"
76
+ }, Ct = ["aria-expanded", "aria-label", "onClick"], xt = ["aria-expanded", "href"], Lt = {
77
+ key: 2,
78
+ class: "g-tree-menu__row g-tree-menu__row--leaf"
79
+ }, St = ["href"], It = {
80
+ key: 2,
81
+ class: "g-tree-menu__label"
82
+ }, Et = { name: "GTreeMenuList" }, Mt = /* @__PURE__ */ T({
83
+ ...Et,
84
+ props: {
85
+ items: {},
86
+ listType: {},
87
+ expandedItems: {},
88
+ keyPrefix: {}
89
+ },
90
+ emits: ["toggle"],
91
+ setup(e, { emit: l }) {
92
+ const t = e, a = l, o = Ve(), r = S(() => o?.appContext?.components?.RouterLink ?? null);
93
+ function d(u) {
94
+ return `${t.keyPrefix}${u}`;
95
+ }
96
+ function c(u) {
97
+ return t.expandedItems.has(d(u));
98
+ }
99
+ function s(u) {
100
+ a("toggle", d(u));
101
+ }
102
+ return (u, g) => {
103
+ const p = ot("GTreeMenuList", !0);
104
+ return i(), N(se(e.listType), { class: "g-tree-menu__list" }, {
105
+ default: U(() => [
106
+ (i(!0), f(D, null, Z(e.items, (b, k) => (i(), f("li", {
107
+ key: k,
108
+ class: "g-tree-menu__item",
109
+ "data-tree-item-key": d(k),
110
+ "data-tree-expandable": b.children ? "true" : void 0
111
+ }, [
112
+ b.children && !b.href && !b.to ? (i(), f("button", {
113
+ key: 0,
114
+ class: "g-tree-menu__row g-tree-menu__row--toggle",
115
+ "aria-expanded": c(k) ? "true" : "false",
116
+ "data-tree-primary": "",
117
+ onClick: (x) => s(k)
118
+ }, [
119
+ (i(), f("svg", {
120
+ class: O(["g-tree-menu__chevron", { "g-tree-menu__chevron--expanded": c(k) }]),
121
+ role: "none presentation",
122
+ viewBox: "0 0 24 24",
123
+ fill: "none",
124
+ stroke: "currentColor",
125
+ "stroke-width": "2.5",
126
+ "stroke-linecap": "round",
127
+ "stroke-linejoin": "round"
128
+ }, [...g[1] || (g[1] = [
129
+ n("polyline", { points: "9 18 15 12 9 6" }, null, -1)
130
+ ])], 2)),
131
+ n("span", null, _(b.label), 1)
132
+ ], 8, wt)) : b.children ? (i(), f("div", $t, [
133
+ n("button", {
134
+ class: "g-tree-menu__toggle-btn",
135
+ "aria-expanded": c(k) ? "true" : "false",
136
+ "aria-label": `${b.label} sub-menu`,
137
+ onClick: (x) => s(k),
138
+ tabindex: "-1"
139
+ }, [
140
+ (i(), f("svg", {
141
+ class: O(["g-tree-menu__chevron", { "g-tree-menu__chevron--expanded": c(k) }]),
142
+ role: "none presentation",
143
+ viewBox: "0 0 24 24",
144
+ fill: "none",
145
+ stroke: "currentColor",
146
+ "stroke-width": "2.5",
147
+ "stroke-linecap": "round",
148
+ "stroke-linejoin": "round"
149
+ }, [...g[2] || (g[2] = [
150
+ n("polyline", { points: "9 18 15 12 9 6" }, null, -1)
151
+ ])], 2))
152
+ ], 8, Ct),
153
+ b.to && r.value ? (i(), N(se(r.value), {
154
+ key: 0,
155
+ class: "g-tree-menu__link",
156
+ "aria-expanded": c(k) ? "true" : "false",
157
+ to: b.to,
158
+ "data-tree-primary": ""
159
+ }, {
160
+ default: U(() => [
161
+ j(_(b.label), 1)
162
+ ]),
163
+ _: 2
164
+ }, 1032, ["aria-expanded", "to"])) : (i(), f("a", {
165
+ key: 1,
166
+ class: "g-tree-menu__link",
167
+ "aria-expanded": c(k) ? "true" : "false",
168
+ href: b.href,
169
+ "data-tree-primary": ""
170
+ }, _(b.label), 9, xt))
171
+ ])) : (i(), f("div", Lt, [
172
+ b.to && r.value ? (i(), N(se(r.value), {
173
+ key: 0,
174
+ class: "g-tree-menu__link",
175
+ to: b.to,
176
+ "data-tree-primary": ""
177
+ }, {
178
+ default: U(() => [
179
+ g[3] || (g[3] = n("span", { class: "g-tree-menu__spacer" }, null, -1)),
180
+ j(_(b.label), 1)
181
+ ]),
182
+ _: 2
183
+ }, 1032, ["to"])) : b.href ? (i(), f("a", {
184
+ key: 1,
185
+ class: "g-tree-menu__link",
186
+ href: b.href,
187
+ "data-tree-primary": ""
188
+ }, [
189
+ g[4] || (g[4] = n("span", { class: "g-tree-menu__spacer" }, null, -1)),
190
+ j(_(b.label), 1)
191
+ ], 8, St)) : (i(), f("span", It, _(b.label), 1))
192
+ ])),
193
+ b.children && c(k) ? (i(), N(p, {
194
+ key: 3,
195
+ items: b.children,
196
+ "list-type": e.listType,
197
+ "expanded-items": e.expandedItems,
198
+ "key-prefix": d(k) + "-",
199
+ onToggle: g[0] || (g[0] = (x) => a("toggle", x))
200
+ }, null, 8, ["items", "list-type", "expanded-items", "key-prefix"])) : E("", !0)
201
+ ], 8, _t))), 128))
202
+ ]),
203
+ _: 1
204
+ });
205
+ };
206
+ }
207
+ }), G = (e, l) => {
208
+ const t = e.__vccOpts || e;
209
+ for (const [a, o] of l)
210
+ t[a] = o;
211
+ return t;
212
+ }, Bt = /* @__PURE__ */ G(Mt, [["__scopeId", "data-v-bd57ee22"]]), Vt = ["id"], Tt = { class: "g-tree-menu__content" }, At = {}, Gt = /* @__PURE__ */ T({
213
+ ...At,
214
+ __name: "GTreeMenu",
215
+ props: {
216
+ title: {},
217
+ items: {},
218
+ listType: { default: "ul" },
219
+ theme: { default: "light" }
220
+ },
221
+ setup(e) {
222
+ const l = e, t = Y(), a = M(/* @__PURE__ */ new Set());
223
+ function o(s) {
224
+ a.value.has(s) ? a.value.delete(s) : a.value.add(s);
225
+ }
226
+ function r(s) {
227
+ const u = s.lastIndexOf("-");
228
+ return u === -1 ? null : s.substring(0, u);
229
+ }
230
+ function d(s) {
231
+ return Array.from(s.querySelectorAll("[data-tree-primary]"));
232
+ }
233
+ function c(s) {
234
+ const u = s.currentTarget, g = document.activeElement;
235
+ if (!u.contains(g) || !["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"].includes(s.key)) return;
236
+ const b = g.closest("[data-tree-item-key]"), k = b?.dataset.treeItemKey ?? null, x = b?.querySelector("[data-tree-primary]") ?? null, v = d(u), h = x ? v.indexOf(x) : -1;
237
+ switch (s.key) {
238
+ case "ArrowDown": {
239
+ const y = v[h + 1];
240
+ y && y.focus();
241
+ break;
242
+ }
243
+ case "ArrowUp": {
244
+ const y = v[h - 1];
245
+ y && y.focus();
246
+ break;
247
+ }
248
+ case "ArrowRight": {
249
+ if (!k || !(b?.dataset.treeExpandable === "true")) break;
250
+ if (!a.value.has(k))
251
+ o(k);
252
+ else {
253
+ const A = v[h + 1];
254
+ A && A.focus();
255
+ }
256
+ break;
257
+ }
258
+ case "ArrowLeft": {
259
+ if (!k) break;
260
+ if (a.value.has(k))
261
+ o(k), x?.focus();
262
+ else {
263
+ const y = r(k);
264
+ if (y !== null) {
265
+ const w = u.querySelector(
266
+ `[data-tree-item-key="${y}"]`
267
+ )?.querySelector("[data-tree-primary]");
268
+ w && w.focus();
269
+ }
270
+ }
271
+ break;
272
+ }
273
+ case "Home": {
274
+ v.length > 0 && v[0].focus();
275
+ break;
276
+ }
277
+ case "End": {
278
+ v.length > 0 && v[v.length - 1].focus();
279
+ break;
280
+ }
281
+ }
282
+ s.preventDefault();
283
+ }
284
+ return (s, u) => (i(), f("nav", ae({
285
+ class: ["g-tree-menu", `g-tree-menu--${l.theme}`]
286
+ }, {
287
+ "aria-labelledby": e.title ? m(t) : void 0,
288
+ "aria-label": e.title ? void 0 : "Tree Menu"
289
+ }, { onKeydown: c }), [
290
+ e.title ? (i(), f("h2", {
291
+ key: 0,
292
+ id: m(t),
293
+ class: "g-tree-menu__title"
294
+ }, _(e.title), 9, Vt)) : E("", !0),
295
+ u[0] || (u[0] = n("div", { class: "g-tree-menu__divider" }, null, -1)),
296
+ n("div", Tt, [
297
+ W(Bt, {
298
+ items: e.items,
299
+ "list-type": e.listType,
300
+ "expanded-items": a.value,
301
+ "key-prefix": "",
302
+ onToggle: o
303
+ }, null, 8, ["items", "list-type", "expanded-items"])
304
+ ])
305
+ ], 16));
306
+ }
307
+ }), Hs = /* @__PURE__ */ G(Gt, [["__scopeId", "data-v-8d5e1a82"]]);
308
+ function xe(e) {
309
+ const l = be("form", null), t = S(() => {
310
+ const r = [];
311
+ return e.errors && r.push(...e.errors.value.filter(Boolean)), r;
312
+ }), a = S(() => t.value.length > 0), o = e.name;
313
+ return l && o && (ie(() => {
314
+ l.registerField(o, {
315
+ name: o,
316
+ value: e.value,
317
+ errors: t
318
+ });
319
+ }), fe(() => {
320
+ e.name && l.unregisterField(e.name);
321
+ })), {
322
+ displayErrors: t,
323
+ hasErrors: a
324
+ };
325
+ }
326
+ const Ot = ["id"], zt = {}, Dt = /* @__PURE__ */ T({
327
+ ...zt,
328
+ __name: "GFormErrorMessages",
329
+ props: {
330
+ errors: {},
331
+ id: {}
332
+ },
333
+ setup(e) {
334
+ return (l, t) => e.errors.length > 0 ? (i(), f("div", {
335
+ key: 0,
336
+ class: "g-form-error-messages",
337
+ id: e.id,
338
+ role: "alert"
339
+ }, [
340
+ (i(!0), f(D, null, Z(e.errors, (a, o) => (i(), f("div", {
341
+ key: o,
342
+ class: "g-form-error-message"
343
+ }, [
344
+ t[0] || (t[0] = n("svg", {
345
+ class: "g-form-error-icon",
346
+ xmlns: "http://www.w3.org/2000/svg",
347
+ viewBox: "0 0 640 640"
348
+ }, [
349
+ n("path", {
350
+ fill: "currentColor",
351
+ d: "M320 64C334.7 64 348.2 72.1 355.2 85L571.2 485C577.9 497.4 577.6 512.4 570.4 524.5C563.2 536.6 550.1 544 536 544L104 544C89.9 544 76.8 536.6 69.6 524.5C62.4 512.4 62.1 497.4 68.8 485L284.8 85C291.8 72.1 305.3 64 320 64zM320 416C302.3 416 288 430.3 288 448C288 465.7 302.3 480 320 480C337.7 480 352 465.7 352 448C352 430.3 337.7 416 320 416zM320 224C301.8 224 287.3 239.5 288.6 257.7L296 361.7C296.9 374.2 307.4 384 319.9 384C332.5 384 342.9 374.3 343.8 361.7L351.2 257.7C352.5 239.5 338.1 224 319.8 224z"
352
+ })
353
+ ], -1)),
354
+ j(" " + _(a), 1)
355
+ ]))), 128))
356
+ ], 8, Ot)) : E("", !0);
357
+ }
358
+ }), Ae = /* @__PURE__ */ G(Dt, [["__scopeId", "data-v-8d738358"]]), Pt = ["for"], Ft = ["id"], Rt = {
359
+ key: 0,
360
+ class: "g-text-input-prefix"
361
+ }, Ht = ["value", "placeholder", "disabled", "aria-invalid"], Kt = {
362
+ key: 1,
363
+ class: "g-text-input-suffix"
364
+ }, Ut = {}, jt = /* @__PURE__ */ T({
365
+ ...Ut,
366
+ inheritAttrs: !1,
367
+ __name: "GTextInput",
368
+ props: /* @__PURE__ */ H({
369
+ label: { default: void 0 },
370
+ placeholder: { default: "" },
371
+ disabled: { type: Boolean, default: !1 },
372
+ errors: { default: () => [] },
373
+ instructions: { default: "" },
374
+ prefix: { default: "" },
375
+ suffix: { default: "" },
376
+ debounce: { default: 100 },
377
+ name: { default: void 0 }
378
+ }, {
379
+ modelValue: { type: String },
380
+ modelModifiers: {}
381
+ }),
382
+ emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
383
+ setup(e, { emit: l }) {
384
+ const t = e, a = q(e, "modelValue"), o = Y(), { displayErrors: r, hasErrors: d } = xe({
385
+ name: t.name,
386
+ value: a,
387
+ errors: $e(t, "errors")
388
+ }), c = l, s = M(a.value ?? "");
389
+ let u = null;
390
+ function g(v) {
391
+ if (v !== a.value) {
392
+ const h = a.value;
393
+ a.value = v, c("change", {
394
+ was: h,
395
+ to: v
396
+ });
397
+ }
398
+ }
399
+ function p(v) {
400
+ const h = v.target.value;
401
+ s.value = h, u && clearTimeout(u), u = setTimeout(() => {
402
+ g(s.value), u = null;
403
+ }, t.debounce);
404
+ }
405
+ function b(v) {
406
+ u && (clearTimeout(u), u = null), g(v.target.value);
407
+ }
408
+ function k(v) {
409
+ u && (clearTimeout(u), u = null), setTimeout(() => {
410
+ const h = v.target.value;
411
+ g(h);
412
+ }, 0);
413
+ }
414
+ function x(v) {
415
+ (v.key === "PageUp" || v.key === "PageDown") && (u && (clearTimeout(u), u = null), g(v.target.value)), v.key === "Enter" && g(v.target.value);
416
+ }
417
+ return (v, h) => (i(), f("div", {
418
+ class: O(["g-text-input-wrap", { "g-text-input-has-error": m(d) }])
419
+ }, [
420
+ t.label ? (i(), f("label", {
421
+ key: 0,
422
+ for: v.$attrs.id || m(o),
423
+ class: "g-text-input-label"
424
+ }, _(t.label), 9, Pt)) : E("", !0),
425
+ v.$slots.instructions || e.instructions ? (i(), f("div", {
426
+ key: 1,
427
+ id: "instructions-" + m(o),
428
+ class: "g-text-input-instructions"
429
+ }, [
430
+ F(v.$slots, "instructions", {}, () => [
431
+ j(_(e.instructions), 1)
432
+ ], !0)
433
+ ], 8, Ft)) : E("", !0),
434
+ n("div", {
435
+ class: O([{
436
+ "g-text-input-field-wrapper": !0
437
+ }, `g-text-input-field-wrapper--${e.name || "nameless"}`])
438
+ }, [
439
+ t.prefix ? (i(), f("span", Rt, _(t.prefix), 1)) : E("", !0),
440
+ n("input", ae({
441
+ value: a.value,
442
+ placeholder: t.placeholder,
443
+ disabled: t.disabled,
444
+ onInput: p,
445
+ onBlur: b,
446
+ onPaste: k,
447
+ onKeydown: x,
448
+ type: "text",
449
+ class: "g-text-input"
450
+ }, {
451
+ ...v.$attrs,
452
+ id: v.$attrs.id || m(o),
453
+ "aria-describedby": v.$slots.instructions || e.instructions ? "instructions-" + m(o) : void 0,
454
+ "aria-errormessage": m(d) ? "error-message-" + m(o) : void 0
455
+ }, {
456
+ "aria-invalid": m(d) ? "true" : "false"
457
+ }), null, 16, Ht),
458
+ t.suffix ? (i(), f("span", Kt, _(t.suffix), 1)) : E("", !0)
459
+ ], 2),
460
+ W(Ae, {
461
+ errors: m(r),
462
+ id: "error-message-" + m(o)
463
+ }, null, 8, ["errors", "id"])
464
+ ], 2));
465
+ }
466
+ }), Ge = /* @__PURE__ */ G(jt, [["__scopeId", "data-v-71461d61"]]), Qe = 100, Xe = 200, Nt = 102, Oe = M([]), me = M([]), de = M([]);
467
+ function Ne() {
468
+ if (!(typeof document > "u"))
469
+ if (de.value.length > 0) {
470
+ const e = window.innerWidth - document.documentElement.clientWidth;
471
+ document.body.classList.add("g-scroll-lock"), document.body.style.paddingRight = `${e}px`, document.body.style.setProperty("--g-scrollbar-width", `${e}px`);
472
+ } else
473
+ document.body.style.paddingRight = "0", document.body.classList.remove("g-scroll-lock"), document.body.style.removeProperty("--g-scrollbar-width");
474
+ }
475
+ function Le(e, l = !1, t = !1) {
476
+ if (typeof document > "u")
477
+ return {};
478
+ const a = l ? me : Oe;
479
+ function o() {
480
+ a.value.push(e), t && !de.value.includes(e) && (de.value.push(e), Ne());
481
+ }
482
+ function r() {
483
+ const s = a.value.lastIndexOf(e);
484
+ s !== -1 && a.value.splice(s, 1);
485
+ const u = de.value.lastIndexOf(e);
486
+ u !== -1 && (de.value.splice(u, 1), Ne());
487
+ }
488
+ const d = S(() => !l && me.value.length > 0 ? !1 : a.value.length > 0 && a.value[a.value.length - 1] === e), c = S(() => {
489
+ const s = a.value.indexOf(e);
490
+ return s === -1 ? 0 : (l ? Xe : Qe) + s;
491
+ });
492
+ return fe(r), { push: o, pop: r, isTop: d, zIndex: c };
493
+ }
494
+ function qt() {
495
+ if (typeof document > "u")
496
+ return {};
497
+ const e = S(() => me.value.length > 0), l = S(
498
+ () => Oe.value.length > 0 || me.value.length > 0
499
+ ), t = S(() => de.value.length > 0);
500
+ return { hasModal: e, hasOverlay: l, hasScrollLock: t };
501
+ }
502
+ function Wt() {
503
+ let e = 0;
504
+ return Oe.value.forEach((l, t) => {
505
+ e = Math.max(e, Qe + t);
506
+ }), me.value.forEach((l, t) => {
507
+ e = Math.max(e, Xe + t);
508
+ }), e > 0 ? e + 1 : Nt;
509
+ }
510
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
511
+ const Zt = (e) => e != null;
512
+ function Yt(e, l = {}) {
513
+ let t;
514
+ const { immediate: a, ...o } = l, r = He(!1), d = He(!1), c = (p) => t && t.activate(p), s = (p) => t && t.deactivate(p), u = () => {
515
+ t && (t.pause(), d.value = !0);
516
+ }, g = () => {
517
+ t && (t.unpause(), d.value = !1);
518
+ };
519
+ return Q(S(() => ct(Me(e)).map((p) => {
520
+ const b = Me(p);
521
+ return typeof b == "string" ? b : ft(b);
522
+ }).filter(Zt)), (p) => {
523
+ if (p.length)
524
+ if (!t)
525
+ t = pt(p, {
526
+ ...o,
527
+ onActivate() {
528
+ r.value = !0, l.onActivate && l.onActivate();
529
+ },
530
+ onDeactivate() {
531
+ r.value = !1, l.onDeactivate && l.onDeactivate();
532
+ }
533
+ }), a && c();
534
+ else {
535
+ const b = t?.active;
536
+ t?.updateContainerElements(p), !b && a && c();
537
+ }
538
+ }, { flush: "post" }), vt(() => s()), {
539
+ hasFocus: r,
540
+ isPaused: d,
541
+ activate: c,
542
+ deactivate: s,
543
+ pause: u,
544
+ unpause: g
545
+ };
546
+ }
547
+ function ze(e, l, t = !1) {
548
+ const a = M(!1), { activate: o, deactivate: r, pause: d, unpause: c } = Yt(e, {
549
+ immediate: !0,
550
+ clickOutsideDeactivates: t,
551
+ initialFocus: () => {
552
+ if (a.value)
553
+ return !1;
554
+ const s = e.value?.querySelector("[popover-focus]");
555
+ if (s)
556
+ return s;
557
+ const u = e.value?.querySelector("h2");
558
+ if (u)
559
+ return u;
560
+ const g = e.value?.querySelector(
561
+ "[aria-selected='true']"
562
+ );
563
+ if (g)
564
+ return g;
565
+ },
566
+ onPostPause: () => a.value = !0,
567
+ onPostUnpause: () => {
568
+ X(() => {
569
+ a.value = !1;
570
+ }).catch((s) => {
571
+ console.error(s);
572
+ });
573
+ }
574
+ });
575
+ return Q(l, (s) => {
576
+ s ? X(() => {
577
+ c();
578
+ }).catch((u) => {
579
+ console.error(u);
580
+ }) : d();
581
+ }), { activate: o, deactivate: r, pause: d, unpause: c };
582
+ }
583
+ function De(e, l, t, a, o) {
584
+ function r(c) {
585
+ for (const s of e)
586
+ if (s.value?.contains(c.target))
587
+ return;
588
+ a();
589
+ }
590
+ function d(c) {
591
+ c.key === "Escape" && t.value && l.value && (c.preventDefault(), X(a).catch((s) => {
592
+ console.error(s);
593
+ }));
594
+ }
595
+ ie(() => {
596
+ document.addEventListener("mousedown", r), document.addEventListener("keydown", d);
597
+ }), fe(() => {
598
+ document.removeEventListener("mousedown", r), document.removeEventListener("keydown", d), o();
599
+ });
600
+ }
601
+ function Je(e, l, t, a) {
602
+ const o = a?.gap ?? 8, r = a?.margin ?? 16, d = a?.preferAbove ?? !1;
603
+ let c = !1, s = !1, u;
604
+ d ? e.top - l.height - o > t.top + r ? (u = e.top - l.height - o, c = !0) : e.bottom + l.height + o <= t.bottom - r ? u = e.bottom + o : (u = t.top + r, s = !0) : e.bottom + l.height + o > t.bottom - r && e.top - l.height - o > t.top + r ? (u = e.top - l.height - o, c = !0) : e.bottom + l.height + o > t.bottom - r && e.top - l.height - o <= t.top + r ? (u = t.top + r, s = !0) : u = e.bottom + o;
605
+ let g = e.left + (e.width - l.width) / 2;
606
+ g < t.left + r && (g = t.left + r), g + l.width > t.right - r && (g = t.right - l.width - r), g < t.left + r && (g = t.left + r);
607
+ const p = e.left + (e.width - l.width) / 2, b = g - p;
608
+ return { top: u, left: g, xOffset: b, placedAbove: c, overlay: s };
609
+ }
610
+ const Qt = { class: "g-popover-wrap" }, Xt = ["id"], Jt = ["aria-labelledby"], el = {}, tl = /* @__PURE__ */ T({
611
+ ...el,
612
+ __name: "GPopover",
613
+ props: /* @__PURE__ */ H({
614
+ minimal: { type: Boolean, default: !1 }
615
+ }, {
616
+ modelValue: { type: Boolean, default: !1 },
617
+ modelModifiers: {}
618
+ }),
619
+ emits: /* @__PURE__ */ H(["show", "hide"], ["update:modelValue"]),
620
+ setup(e, { emit: l }) {
621
+ const t = e, a = l, o = q(e, "modelValue"), r = ge("triggerRef"), d = ge("popoverRef"), c = Y(), { push: s, pop: u, isTop: g, zIndex: p } = Le(c, !0), { activate: b, deactivate: k } = ze(d, g, !0);
622
+ De([d, r], g, o, x, u), Q(o, (P) => {
623
+ P ? (X(() => {
624
+ X(() => b());
625
+ }), s(), a("show")) : (k(), u(), a("hide"));
626
+ });
627
+ function x() {
628
+ o.value = !1;
629
+ }
630
+ function v() {
631
+ o.value = !o.value;
632
+ }
633
+ const h = M({ top: 0, left: 0 }), y = M({ left: "50%" }), A = M(!1), w = M(!1);
634
+ let I = null;
635
+ function z() {
636
+ if (!r.value || !d.value)
637
+ return;
638
+ const P = r.value.getBoundingClientRect(), J = new DOMRect(0, 0, d.value.offsetWidth, d.value.offsetHeight), R = new DOMRect(0, 0, window.innerWidth, window.innerHeight), { top: te, left: ee, xOffset: oe, placedAbove: $, overlay: V } = Je(P, J, R, {
639
+ gap: t.minimal ? 0 : 8
640
+ });
641
+ h.value = { top: te, left: ee }, y.value = {
642
+ left: `${J.width / 2 - oe}px`,
643
+ top: $ ? "auto" : void 0,
644
+ bottom: $ ? "-8px" : void 0
645
+ }, A.value = $, w.value = V;
646
+ }
647
+ return Q(o, (P) => {
648
+ P ? X(() => {
649
+ z(), window.addEventListener("resize", z), window.addEventListener("scroll", z, { capture: !0 }), d.value && (I && I.disconnect(), I = new ResizeObserver(
650
+ () => z()
651
+ ), I.observe(d.value));
652
+ }) : (window.removeEventListener("resize", z), window.removeEventListener("scroll", z, { capture: !0 }), I && I.disconnect());
653
+ }), fe(() => {
654
+ window.removeEventListener("resize", z), window.removeEventListener("scroll", z, { capture: !0 }), I && I.disconnect();
655
+ }), (P, J) => (i(), f("div", Qt, [
656
+ n("div", {
657
+ ref_key: "triggerRef",
658
+ ref: r,
659
+ class: "g-popover-trigger",
660
+ id: `${m(c)}-trigger`
661
+ }, [
662
+ F(P.$slots, "trigger", { toggle: v }, void 0, !0)
663
+ ], 8, Xt),
664
+ (i(), N(Te, { to: "#modal-root" }, [
665
+ W(Ce, {
666
+ name: "g-popover-expand",
667
+ appear: ""
668
+ }, {
669
+ default: U(() => [
670
+ o.value ? (i(), f("div", {
671
+ key: 0,
672
+ ref_key: "popoverRef",
673
+ ref: d,
674
+ class: O({
675
+ "g-popover": !0,
676
+ "g-popover-above": A.value,
677
+ "g-popover-below": !A.value,
678
+ "g-popover-minimal": e.minimal
679
+ }),
680
+ role: "dialog",
681
+ "aria-modal": "true",
682
+ "aria-labelledby": `${m(c)}-trigger`,
683
+ style: ve({
684
+ top: h.value.top + "px",
685
+ left: h.value.left + "px",
686
+ zIndex: m(p)
687
+ })
688
+ }, [
689
+ !w.value && !e.minimal ? (i(), f("div", {
690
+ key: 0,
691
+ class: O(["g-popover-arrow", { "g-popover-arrow-above": A.value }]),
692
+ style: ve(y.value),
693
+ "aria-hidden": "true"
694
+ }, null, 6)) : E("", !0),
695
+ F(P.$slots, "default", {}, void 0, !0),
696
+ e.minimal ? E("", !0) : (i(), f("button", {
697
+ key: 1,
698
+ class: "g-popover-close",
699
+ type: "button",
700
+ "aria-label": "Close popover",
701
+ onClick: x
702
+ }, [...J[0] || (J[0] = [
703
+ n("svg", {
704
+ class: "g-popover-close-icon",
705
+ xmlns: "http://www.w3.org/2000/svg",
706
+ viewBox: "0 0 51.26 51.26",
707
+ "aria-hidden": "true"
708
+ }, [
709
+ n("path", {
710
+ fill: "currentColor",
711
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
712
+ })
713
+ ], -1)
714
+ ])]))
715
+ ], 14, Jt)) : E("", !0)
716
+ ]),
717
+ _: 3
718
+ })
719
+ ]))
720
+ ]));
721
+ }
722
+ }), Pe = /* @__PURE__ */ G(tl, [["__scopeId", "data-v-42fe584f"]]), ll = ["disabled"], al = { class: "g-select-btn-legend" }, ol = { class: "g-select-btn-row" }, sl = ["id", "name", "value", "checked", "disabled", "onChange"], nl = ["for"], rl = {}, il = /* @__PURE__ */ T({
723
+ ...rl,
724
+ __name: "GSelectButton",
725
+ props: /* @__PURE__ */ H({
726
+ options: {},
727
+ label: {},
728
+ size: { default: "medium" },
729
+ name: { default: void 0 },
730
+ disabled: { type: Boolean, default: !1 },
731
+ errors: { default: () => [] }
732
+ }, {
733
+ modelValue: { default: () => "" },
734
+ modelModifiers: {}
735
+ }),
736
+ emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
737
+ setup(e, { emit: l }) {
738
+ const t = e, a = l, o = q(e, "modelValue"), r = Y(), { displayErrors: d, hasErrors: c } = xe({
739
+ name: t.name,
740
+ value: o,
741
+ errors: $e(t, "errors")
742
+ }), s = S(() => t.options.map((b) => typeof b == "string" ? { label: b, value: b } : b)), u = S(() => [
743
+ "g-select-btn-group",
744
+ `g-select-btn-group--${t.size}`
745
+ ]), g = (b) => [
746
+ "g-select-btn",
747
+ b ? "g-select-btn--selected" : "",
748
+ { "g-select-btn--disabled": t.disabled }
749
+ ];
750
+ function p(b) {
751
+ !t.disabled && b !== o.value && (o.value = b, a("change", b));
752
+ }
753
+ return (b, k) => (i(), f("fieldset", {
754
+ class: O(u.value),
755
+ disabled: t.disabled
756
+ }, [
757
+ n("legend", al, _(t.label), 1),
758
+ n("div", {
759
+ class: O(["g-select-btn-wrapper", { "g-select-btn-has-error": m(c) }])
760
+ }, [
761
+ n("div", ol, [
762
+ (i(!0), f(D, null, Z(s.value, (x, v) => (i(), f(D, {
763
+ key: x.value
764
+ }, [
765
+ n("input", {
766
+ class: "g-select-btn-radio",
767
+ type: "radio",
768
+ id: `${m(r)}-${x.value}`,
769
+ name: t.name || m(r),
770
+ value: x.value,
771
+ checked: x.value === o.value,
772
+ disabled: t.disabled,
773
+ onChange: (h) => p(x.value)
774
+ }, null, 40, sl),
775
+ n("label", {
776
+ for: `${m(r)}-${x.value}`,
777
+ class: O(g(x.value === o.value))
778
+ }, _(x.label), 11, nl)
779
+ ], 64))), 128))
780
+ ]),
781
+ W(Ae, {
782
+ errors: m(d),
783
+ id: "error-message-" + m(r)
784
+ }, null, 8, ["errors", "id"])
785
+ ], 2)
786
+ ], 10, ll));
787
+ }
788
+ }), ul = /* @__PURE__ */ G(il, [["__scopeId", "data-v-f2a878c6"]]), dl = ["width", "height"], cl = ["cx", "cy", "r"], fl = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"], vl = ["cx", "cy", "r"], gl = {}, ml = /* @__PURE__ */ T({
789
+ ...gl,
790
+ __name: "GProgress",
791
+ props: {
792
+ label: { default: "Loading" },
793
+ value: { default: void 0 },
794
+ size: { default: "medium" }
795
+ },
796
+ setup(e) {
797
+ const l = e, t = S(
798
+ () => l.value && l.value >= 1 && l.value <= 100
799
+ ), a = S(() => {
800
+ switch (l.size) {
801
+ case "tiny":
802
+ return 9;
803
+ case "small":
804
+ return 12;
805
+ case "large":
806
+ return 24;
807
+ default:
808
+ return 18;
809
+ }
810
+ }), o = 4, r = S(() => 2 * Math.PI * a.value), d = S(
811
+ () => t.value ? l.value / 100 * r.value : 0
812
+ ), c = S(
813
+ () => t.value ? {
814
+ role: "progressbar",
815
+ "aria-valuenow": l.value,
816
+ "aria-valuemin": 1,
817
+ "aria-valuemax": 100,
818
+ "aria-label": l.label
819
+ } : {
820
+ role: "status",
821
+ "aria-label": l.label
822
+ }
823
+ );
824
+ return (s, u) => (i(), f("span", ae({ class: "g-progress" }, c.value), [
825
+ (i(), f("svg", {
826
+ width: a.value * 2 + o,
827
+ height: a.value * 2 + o,
828
+ class: O([
829
+ "g-progress__svg",
830
+ {
831
+ "g-progress--determinate": t.value,
832
+ "g-progress--indeterminate": !t.value
833
+ }
834
+ ]),
835
+ focusable: "false",
836
+ "aria-hidden": "true"
837
+ }, [
838
+ n("circle", {
839
+ class: "g-progress__track",
840
+ cx: a.value + o / 2,
841
+ cy: a.value + o / 2,
842
+ r: a.value,
843
+ "stroke-width": o,
844
+ fill: "none"
845
+ }, null, 8, cl),
846
+ t.value ? (i(), f("circle", {
847
+ key: 0,
848
+ class: "g-progress__value",
849
+ cx: a.value + o / 2,
850
+ cy: a.value + o / 2,
851
+ r: a.value,
852
+ "stroke-width": o,
853
+ fill: "none",
854
+ "stroke-dasharray": r.value,
855
+ "stroke-dashoffset": r.value - d.value,
856
+ style: { transform: "rotate(-90deg)", "transform-origin": "center" }
857
+ }, null, 8, fl)) : (i(), f("circle", {
858
+ key: 1,
859
+ class: "g-progress__spinner",
860
+ cx: a.value + o / 2,
861
+ cy: a.value + o / 2,
862
+ r: a.value,
863
+ "stroke-width": o,
864
+ fill: "none"
865
+ }, null, 8, vl))
866
+ ], 10, dl))
867
+ ], 16));
868
+ }
869
+ }), bl = /* @__PURE__ */ G(ml, [["__scopeId", "data-v-c010c3b0"]]), pl = ["id", "aria-labelledby", "aria-describedby"], hl = { class: "g-alertdialog-inner" }, yl = ["id"], kl = ["id"], _l = { class: "g-alertdialog-actions" }, wl = {}, $l = /* @__PURE__ */ T({
870
+ ...wl,
871
+ __name: "GAlertDialog",
872
+ props: {
873
+ label: { default: "Confirmation" },
874
+ buttonText: { default: "Continue" },
875
+ buttonColor: { default: "primary" }
876
+ },
877
+ emits: ["cancel", "confirm"],
878
+ setup(e, { emit: l }) {
879
+ const t = e, a = l, o = M(null), r = M(!0), d = Y(), { pop: c, push: s, isTop: u, zIndex: g } = Le(d, !0, !0), { deactivate: p, activate: b } = ze(o, u);
880
+ function k() {
881
+ a("cancel");
882
+ }
883
+ return De([o], u, r, k, c), ie(() => {
884
+ s(), b();
885
+ }), Ze(() => {
886
+ c(), p();
887
+ }), (x, v) => (i(), N(Te, { to: "#modal-root" }, [
888
+ W(Ce, {
889
+ name: "g-fade",
890
+ appear: ""
891
+ }, {
892
+ default: U(() => [
893
+ n("div", {
894
+ id: "alertdialog-" + m(d),
895
+ class: "g-alertdialog",
896
+ role: "alertdialog",
897
+ "aria-modal": "true",
898
+ "aria-labelledby": "alertdialog-label-" + m(d),
899
+ "aria-describedby": "alertdialog-description-" + m(d),
900
+ ref_key: "dialog",
901
+ ref: o,
902
+ style: ve({ zIndex: m(g) })
903
+ }, [
904
+ n("div", hl, [
905
+ n("h2", {
906
+ id: "alertdialog-label-" + m(d),
907
+ class: "g-alertdialog-label"
908
+ }, _(t.label), 9, yl),
909
+ n("div", {
910
+ id: "alertdialog-description-" + m(d),
911
+ class: "g-alertdialog-content"
912
+ }, [
913
+ F(x.$slots, "default", {}, void 0, !0)
914
+ ], 8, kl),
915
+ n("div", _l, [
916
+ W(ne, {
917
+ outlined: "",
918
+ onClick: v[0] || (v[0] = (h) => a("cancel"))
919
+ }, {
920
+ default: U(() => [...v[2] || (v[2] = [
921
+ j("Cancel", -1)
922
+ ])]),
923
+ _: 1
924
+ }),
925
+ W(ne, {
926
+ theme: t.buttonColor,
927
+ onClick: v[1] || (v[1] = (h) => a("confirm"))
928
+ }, {
929
+ default: U(() => [
930
+ j(_(t.buttonText), 1)
931
+ ]),
932
+ _: 1
933
+ }, 8, ["theme"])
934
+ ])
935
+ ])
936
+ ], 12, pl)
937
+ ]),
938
+ _: 3
939
+ })
940
+ ]));
941
+ }
942
+ }), Ks = /* @__PURE__ */ G($l, [["__scopeId", "data-v-144faf08"]]), Cl = ["id"], xl = { class: "g-select-input-wrap" }, Ll = ["id"], Sl = ["value", "placeholder", "disabled", "aria-controls", "aria-expanded", "aria-activedescendant"], Il = ["id", "aria-controls", "aria-expanded", "aria-activedescendant"], El = ["id"], Ml = ["id", "aria-selected", "onClick"], Bl = {
943
+ key: 1,
944
+ "aria-live": "polite",
945
+ class: "g-select-combo-option g-select-option g-select-no-results"
946
+ }, Vl = {}, Tl = /* @__PURE__ */ T({
947
+ ...Vl,
948
+ __name: "GSelect",
949
+ props: /* @__PURE__ */ H({
950
+ options: {},
951
+ label: {},
952
+ hiddenLabel: { type: Boolean },
953
+ placeholder: {},
954
+ disabled: { type: Boolean, default: !1 },
955
+ name: { default: void 0 },
956
+ searchable: { type: Boolean, default: !1 },
957
+ clearButton: { type: Boolean },
958
+ compact: { type: Boolean, default: !1 },
959
+ errors: { default: () => [] }
960
+ }, {
961
+ modelValue: {},
962
+ modelModifiers: {}
963
+ }),
964
+ emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
965
+ setup(e, { emit: l }) {
966
+ const t = e, a = l, o = q(e, "modelValue"), r = Y(), d = M(null), c = M(null), s = M(!1), u = M(0), g = M(!1), p = M(!1), { push: b, pop: k, isTop: x } = Le(r), { displayErrors: v, hasErrors: h } = xe({
967
+ name: t.name,
968
+ value: o,
969
+ errors: $e(t, "errors")
970
+ }), y = M("below"), A = M(null), w = S(() => {
971
+ const L = {};
972
+ return A.value !== null && (L.maxHeight = `${A.value}px`), y.value === "above" ? (L.top = "auto", L.bottom = "100%") : (L.top = "100%", L.bottom = "auto"), L;
973
+ });
974
+ function I() {
975
+ if (!s.value || !d.value)
976
+ return;
977
+ const L = d.value.getBoundingClientRect(), B = window.innerHeight - L.bottom, le = L.top, ue = c.value?.scrollHeight ?? 200, Se = Math.min(200, ue), Ie = 8;
978
+ if (B >= Se) {
979
+ y.value = "below", A.value = Math.max(0, Math.floor(B - Ie));
980
+ return;
981
+ }
982
+ if (B < Se && le > B) {
983
+ y.value = "above", A.value = Math.max(0, Math.floor(le - Ie));
984
+ return;
985
+ }
986
+ y.value = "below", A.value = Math.max(0, Math.floor(B - Ie));
987
+ }
988
+ let z = null;
989
+ function P() {
990
+ if (z)
991
+ return;
992
+ const L = () => {
993
+ I();
994
+ };
995
+ window.addEventListener("resize", L, { passive: !0 }), window.addEventListener("scroll", L, {
996
+ passive: !0,
997
+ capture: !0
998
+ }), z = () => {
999
+ window.removeEventListener("resize", L), window.removeEventListener("scroll", L, !0), z = null;
1000
+ };
1001
+ }
1002
+ function J() {
1003
+ z && z();
1004
+ }
1005
+ const R = S(() => t.options.map((L) => typeof L == "string" ? { label: L, value: L } : L)), te = M(""), ee = S(() => {
1006
+ if (!t.searchable || !s.value || !te.value)
1007
+ return R.value;
1008
+ const L = te.value.toLowerCase();
1009
+ return R.value.filter(
1010
+ (B) => B.label.toLowerCase().includes(L)
1011
+ );
1012
+ }), oe = S(() => ee.value.findIndex((L) => L.value === o.value));
1013
+ Q(
1014
+ () => o.value,
1015
+ (L) => {
1016
+ const B = ee.value.findIndex((le) => le.value === L);
1017
+ B !== -1 && (u.value = B);
1018
+ }
1019
+ ), Q(s, (L) => {
1020
+ L ? b() : k();
1021
+ }), Q(s, (L) => {
1022
+ L ? (P(), X(() => {
1023
+ I();
1024
+ })) : (J(), y.value = "below", A.value = null);
1025
+ });
1026
+ function $() {
1027
+ if (!t.disabled && (s.value = !0, X(() => {
1028
+ I();
1029
+ }), t.searchable)) {
1030
+ te.value = "";
1031
+ const L = ee.value.findIndex(
1032
+ (B) => B.value === o.value
1033
+ );
1034
+ u.value = L !== -1 ? L : 0, X(() => {
1035
+ C.value && C.value.focus();
1036
+ });
1037
+ }
1038
+ }
1039
+ function V() {
1040
+ s.value = !1, t.searchable && (te.value = "");
1041
+ }
1042
+ fe(() => {
1043
+ J();
1044
+ });
1045
+ const C = M(null);
1046
+ function K(L) {
1047
+ if (!t.disabled && t.searchable) {
1048
+ if (p.value) {
1049
+ p.value = !1;
1050
+ return;
1051
+ }
1052
+ $();
1053
+ }
1054
+ }
1055
+ function re(L) {
1056
+ if (!t.searchable) return;
1057
+ s.value || $(), te.value = L.target.value;
1058
+ const B = ee.value.findIndex(
1059
+ (le) => le.value === o.value
1060
+ );
1061
+ u.value = B !== -1 ? B : 0;
1062
+ }
1063
+ function pe(L) {
1064
+ const B = L.relatedTarget;
1065
+ if (g.value) {
1066
+ g.value = !1;
1067
+ return;
1068
+ }
1069
+ B && c.value && c.value.contains(B) || (t.searchable && (te.value = ""), V());
1070
+ }
1071
+ function he(L) {
1072
+ const B = ee.value[L];
1073
+ B && B.value !== o.value && (o.value = B.value, a("change", B.value)), p.value = !0, V(), setTimeout(() => {
1074
+ p.value = !1;
1075
+ }, 100);
1076
+ }
1077
+ function ye() {
1078
+ t.disabled || (s.value ? V() : $());
1079
+ }
1080
+ function ke(L) {
1081
+ if (t.disabled)
1082
+ return;
1083
+ const B = ee.value.length - 1;
1084
+ if (!s.value && ["ArrowDown", "ArrowUp", "Enter", " "].includes(L.key)) {
1085
+ L.preventDefault(), $();
1086
+ return;
1087
+ }
1088
+ switch (L.key) {
1089
+ case "ArrowDown":
1090
+ L.preventDefault(), s.value ? (u.value = Math.min(B, u.value + 1), _e()) : $();
1091
+ break;
1092
+ case "ArrowUp":
1093
+ L.preventDefault(), s.value ? (u.value = Math.max(0, u.value - 1), _e()) : $();
1094
+ break;
1095
+ case "Home":
1096
+ L.preventDefault(), u.value = 0, _e();
1097
+ break;
1098
+ case "End":
1099
+ L.preventDefault(), u.value = B, _e();
1100
+ break;
1101
+ case "Enter":
1102
+ case " ":
1103
+ L.preventDefault(), s.value ? he(u.value) : $();
1104
+ break;
1105
+ case "Escape":
1106
+ x.value && (L.preventDefault(), setTimeout(() => {
1107
+ V();
1108
+ }, 0));
1109
+ break;
1110
+ }
1111
+ }
1112
+ function tt(L) {
1113
+ he(L);
1114
+ }
1115
+ function lt() {
1116
+ g.value = !0;
1117
+ }
1118
+ function _e() {
1119
+ X(() => {
1120
+ const L = document.getElementById(
1121
+ `${r}-option-${u.value}`
1122
+ );
1123
+ L && L.scrollIntoView({ block: "nearest" });
1124
+ });
1125
+ }
1126
+ const Fe = S(() => t.clearButton && o.value !== null && o.value !== void 0 && !t.disabled);
1127
+ function Re() {
1128
+ t.disabled || (o.value = null, a("change", null), t.searchable && (te.value = ""));
1129
+ }
1130
+ return fe(() => {
1131
+ k();
1132
+ }), (L, B) => (i(), f("div", {
1133
+ class: O(["g-select-root g-select-combo", { "g-select-open": s.value, "g-select-compact": e.compact, "g-select-has-error": m(h) }])
1134
+ }, [
1135
+ e.hiddenLabel ? E("", !0) : (i(), f("div", {
1136
+ key: 0,
1137
+ id: m(r) + "-label",
1138
+ class: "g-select-combo-label g-select-label"
1139
+ }, _(t.label), 9, Cl)),
1140
+ n("div", xl, [
1141
+ t.searchable ? (i(), f("div", {
1142
+ key: 0,
1143
+ class: "g-select-combo-input g-select-control",
1144
+ id: m(r)
1145
+ }, [
1146
+ n("input", ae(
1147
+ {
1148
+ ref_key: "comboRef",
1149
+ ref: d,
1150
+ type: "text",
1151
+ name: "comboInput",
1152
+ class: ["g-select-search-input", { "g-select-clearable": e.clearButton }],
1153
+ value: s.value ? te.value : R.value[oe.value] ? R.value[oe.value].label : "",
1154
+ placeholder: s.value ? "" : e.placeholder,
1155
+ disabled: t.disabled,
1156
+ onFocus: K,
1157
+ onInput: re,
1158
+ onKeydown: ke,
1159
+ onBlur: pe,
1160
+ "aria-autocomplete": "list",
1161
+ "aria-controls": m(r) + "-listbox",
1162
+ "aria-expanded": s.value ? "true" : "false",
1163
+ "aria-haspopup": "listbox",
1164
+ "aria-activedescendant": s.value ? m(r) + "-option-" + u.value : void 0
1165
+ },
1166
+ e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": m(r) + "-label" },
1167
+ {
1168
+ role: "combobox",
1169
+ autocomplete: "off"
1170
+ }
1171
+ ), null, 16, Sl),
1172
+ Fe.value ? (i(), f("button", {
1173
+ key: 0,
1174
+ type: "button",
1175
+ class: "g-select-clear-btn",
1176
+ onClick: Re
1177
+ }, [...B[0] || (B[0] = [
1178
+ n("svg", {
1179
+ role: "img",
1180
+ "aria-label": "Clear Selection",
1181
+ xmlns: "http://www.w3.org/2000/svg",
1182
+ viewBox: "0 0 51.26 51.26",
1183
+ width: "1.125em"
1184
+ }, [
1185
+ n("path", {
1186
+ fill: "currentColor",
1187
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
1188
+ })
1189
+ ], -1)
1190
+ ])])) : E("", !0),
1191
+ B[1] || (B[1] = n("svg", {
1192
+ class: "g-select-caret",
1193
+ xmlns: "http://www.w3.org/2000/svg",
1194
+ viewBox: "0 0 51.26 51.26",
1195
+ "aria-hidden": "true",
1196
+ width: "1.125em"
1197
+ }, [
1198
+ n("path", {
1199
+ fill: "currentColor",
1200
+ d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
1201
+ })
1202
+ ], -1))
1203
+ ], 8, Ll)) : (i(), f("div", ae(
1204
+ {
1205
+ key: 1,
1206
+ ref_key: "comboRef",
1207
+ ref: d,
1208
+ id: m(r),
1209
+ class: ["g-select-combo-button g-select-control", { "g-select-clearable": e.clearButton }],
1210
+ role: "combobox",
1211
+ "aria-controls": m(r) + "-listbox",
1212
+ "aria-expanded": s.value ? "true" : "false",
1213
+ "aria-haspopup": "listbox"
1214
+ },
1215
+ e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": m(r) + "-label" },
1216
+ {
1217
+ "aria-activedescendant": s.value ? m(r) + "-option-" + u.value : void 0,
1218
+ tabindex: "0",
1219
+ onClick: ye,
1220
+ onKeydown: ke,
1221
+ onFocus: K,
1222
+ onBlur: pe
1223
+ }
1224
+ ), [
1225
+ j(_(R.value[oe.value] ? R.value[oe.value].label : "") + " ", 1),
1226
+ Fe.value ? (i(), f("button", {
1227
+ key: 0,
1228
+ type: "button",
1229
+ class: "g-select-clear-btn",
1230
+ onClick: ce(Re, ["stop"])
1231
+ }, [...B[2] || (B[2] = [
1232
+ n("svg", {
1233
+ role: "img",
1234
+ "aria-label": "Clear Selection",
1235
+ xmlns: "http://www.w3.org/2000/svg",
1236
+ viewBox: "0 0 51.26 51.26",
1237
+ width: "1.125em"
1238
+ }, [
1239
+ n("path", {
1240
+ fill: "currentColor",
1241
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
1242
+ })
1243
+ ], -1)
1244
+ ])])) : E("", !0),
1245
+ B[3] || (B[3] = n("svg", {
1246
+ class: "g-select-caret",
1247
+ xmlns: "http://www.w3.org/2000/svg",
1248
+ viewBox: "0 0 51.26 51.26",
1249
+ "aria-hidden": "true",
1250
+ width: "1.125em"
1251
+ }, [
1252
+ n("path", {
1253
+ fill: "currentColor",
1254
+ d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
1255
+ })
1256
+ ], -1))
1257
+ ], 16, Il)),
1258
+ we(n("div", ae(
1259
+ {
1260
+ ref_key: "listboxRef",
1261
+ ref: c,
1262
+ class: ["g-select-combo-menu g-select-list", {
1263
+ "g-select-combo-menu--above": y.value === "above"
1264
+ }],
1265
+ style: w.value,
1266
+ role: "listbox",
1267
+ id: m(r) + "-listbox"
1268
+ },
1269
+ e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": m(r) + "-label" },
1270
+ { tabindex: "-1" }
1271
+ ), [
1272
+ ee.value.length > 0 ? (i(!0), f(D, { key: 0 }, Z(ee.value, (le, ue) => (i(), f("div", {
1273
+ key: le.value,
1274
+ id: m(r) + "-option-" + ue,
1275
+ class: O(["g-select-combo-option g-select-option", {
1276
+ "g-select-option-current": ue === u.value,
1277
+ "ilw-theme-blue": le.value === o.value
1278
+ }]),
1279
+ role: "option",
1280
+ "aria-selected": le.value === o.value ? "true" : "false",
1281
+ onMousedown: lt,
1282
+ onClick: (Se) => tt(ue)
1283
+ }, [
1284
+ F(L.$slots, "option", {
1285
+ option: le,
1286
+ selected: le.value === o.value,
1287
+ index: ue
1288
+ }, () => [
1289
+ j(_(le.label), 1)
1290
+ ], !0)
1291
+ ], 42, Ml))), 128)) : (i(), f("div", Bl, " No results found. "))
1292
+ ], 16, El), [
1293
+ [st, s.value]
1294
+ ])
1295
+ ]),
1296
+ W(Ae, {
1297
+ errors: m(v),
1298
+ id: "error-message-" + m(r)
1299
+ }, null, 8, ["errors", "id"])
1300
+ ], 2));
1301
+ }
1302
+ }), et = /* @__PURE__ */ G(Tl, [["__scopeId", "data-v-f2abeeaa"]]), Al = ["aria-label"], Gl = ["placeholder", "value", "aria-expanded", "aria-controls", "aria-activedescendant"], Ol = {
1303
+ key: 0,
1304
+ class: "g-search-dropdown"
1305
+ }, zl = {
1306
+ "aria-live": "polite",
1307
+ class: "g-search-result-count"
1308
+ }, Dl = ["id"], Pl = ["aria-label"], Fl = { class: "g-search-group-label" }, Rl = ["id", "onMousedown", "aria-selected"], Hl = ["id", "onMousedown", "aria-selected"], Kl = {}, Us = /* @__PURE__ */ T({
1309
+ ...Kl,
1310
+ __name: "GSearch",
1311
+ props: /* @__PURE__ */ H({
1312
+ results: {},
1313
+ placeholder: { default: "Search..." },
1314
+ label: { default: "Search" },
1315
+ auto: { type: Boolean, default: !0 },
1316
+ loading: { type: Boolean }
1317
+ }, {
1318
+ modelValue: { default: () => "" },
1319
+ modelModifiers: {}
1320
+ }),
1321
+ emits: /* @__PURE__ */ H(["select", "submit"], ["update:modelValue"]),
1322
+ setup(e, { emit: l }) {
1323
+ const t = q(e, "modelValue"), a = e, o = l, r = M(null), d = M(null), c = M(!0), s = M(-1), u = S(() => Array.isArray(a.results) && a.results.length && "items" in a.results[0] ? a.results.flatMap((I) => I.items) : a.results), g = S(() => u.value.length);
1324
+ function p(I) {
1325
+ const z = I.target.value;
1326
+ t.value = z, a.auto && z.length > 1 && (c.value = !1);
1327
+ }
1328
+ function b() {
1329
+ X(() => {
1330
+ const I = d.value?.querySelector('[aria-selected="true"]');
1331
+ I && I.scrollIntoView({ block: "nearest" });
1332
+ });
1333
+ }
1334
+ const { focused: k } = gt(r);
1335
+ function x(I) {
1336
+ const z = I.altKey;
1337
+ if (I.key === "ArrowDown") {
1338
+ if (!g.value)
1339
+ return;
1340
+ I.preventDefault(), c.value = !1, z || (s.value = (s.value + 1) % g.value, b());
1341
+ } else if (I.key === "ArrowUp") {
1342
+ if (!g.value)
1343
+ return;
1344
+ I.preventDefault(), c.value = !1, s.value = (s.value - 1 + g.value) % g.value, b();
1345
+ } else if (I.key === "Enter")
1346
+ c.value ? (o("submit", t.value), c.value = !1, I.preventDefault()) : v(u.value[s.value]);
1347
+ else if (I.key === "Escape") {
1348
+ if (!g.value)
1349
+ return;
1350
+ I.preventDefault(), y.value || (t.value = ""), c.value = !0, s.value = -1;
1351
+ }
1352
+ ["Backspace", "Delete", "Clear", "Undo"].includes(I.key) && (c.value = !0);
1353
+ }
1354
+ function v(I) {
1355
+ o("select", I), t.value = "", c.value = !0, s.value = -1;
1356
+ }
1357
+ const h = S(() => !!a.loading), y = S(() => k.value && !c.value), A = mt(() => {
1358
+ o("submit", t.value);
1359
+ }, 300);
1360
+ Q(
1361
+ () => t.value,
1362
+ (I) => {
1363
+ I ? a.auto && A() : s.value = -1;
1364
+ }
1365
+ );
1366
+ const w = Y();
1367
+ return (I, z) => (i(), f("div", {
1368
+ class: "g-search",
1369
+ role: "search",
1370
+ "aria-label": a.label
1371
+ }, [
1372
+ n("form", {
1373
+ class: "g-search-form",
1374
+ onSubmit: z[0] || (z[0] = ce((P) => v(null), ["prevent"]))
1375
+ }, [
1376
+ n("input", {
1377
+ ref_key: "inputRef",
1378
+ ref: r,
1379
+ class: "g-search-input",
1380
+ name: "search",
1381
+ type: "search",
1382
+ placeholder: a.placeholder,
1383
+ value: t.value,
1384
+ onInput: p,
1385
+ onKeydown: x,
1386
+ role: "combobox",
1387
+ "aria-expanded": y.value,
1388
+ "aria-autocomplete": "list",
1389
+ "aria-controls": `${m(w)}-list`,
1390
+ "aria-activedescendant": s.value >= 0 ? "g-search-option-" + u.value[s.value].id : void 0
1391
+ }, null, 40, Gl),
1392
+ n("button", {
1393
+ type: "submit",
1394
+ class: "g-search-submit",
1395
+ "aria-label": "Submit search",
1396
+ onKeydown: x
1397
+ }, [
1398
+ h.value ? (i(), N(bl, {
1399
+ key: 0,
1400
+ size: "tiny"
1401
+ })) : E("", !0),
1402
+ z[1] || (z[1] = n("svg", {
1403
+ role: "img",
1404
+ "aria-label": "Search",
1405
+ xmlns: "http://www.w3.org/2000/svg",
1406
+ viewBox: "0 0 51.26 51.26"
1407
+ }, [
1408
+ n("path", {
1409
+ fill: "currentColor",
1410
+ d: "M30 9.76A14.05 14.05 0 1 0 28.3 31l11.3 13a3.34 3.34 0 0 0 4.72-4.72L31.44 27.86A14.05 14.05 0 0 0 30 9.76ZM27.27 27a10.26 10.26 0 1 1 0-14.5 10.25 10.25 0 0 1 0 14.5Z"
1411
+ })
1412
+ ], -1))
1413
+ ], 32)
1414
+ ], 32),
1415
+ y.value ? (i(), f("div", Ol, [
1416
+ n("div", zl, [
1417
+ h.value ? E("", !0) : (i(), f(D, { key: 0 }, [
1418
+ j(_(g.value) + " result" + _(g.value === 1 ? "" : "s"), 1)
1419
+ ], 64))
1420
+ ]),
1421
+ n("div", {
1422
+ role: "listbox",
1423
+ id: `${m(w)}-list`,
1424
+ ref_key: "listboxRef",
1425
+ ref: d,
1426
+ "aria-label": "Search results"
1427
+ }, [
1428
+ g.value > 0 && "items" in a.results[0] ? (i(!0), f(D, { key: 0 }, Z(a.results, (P, J) => (i(), f("div", {
1429
+ key: P.type,
1430
+ class: "g-search-group",
1431
+ role: "group",
1432
+ "aria-label": P.label
1433
+ }, [
1434
+ F(I.$slots, "group", { group: P }, () => [
1435
+ n("div", Fl, _(P.label), 1)
1436
+ ]),
1437
+ (i(!0), f(D, null, Z(P.items, (R, te) => (i(), f("div", {
1438
+ key: R.id,
1439
+ id: "g-search-option-" + R.id,
1440
+ class: O(["g-search-option", {
1441
+ "g-search-option-active": u.value[s.value] && u.value[s.value].id === R.id
1442
+ }]),
1443
+ role: "option",
1444
+ onMousedown: ce((ee) => v(R), ["prevent"]),
1445
+ "aria-selected": u.value[s.value] && u.value[s.value].id === R.id
1446
+ }, [
1447
+ F(I.$slots, "option", { option: R }, () => [
1448
+ j(_(R.title), 1)
1449
+ ])
1450
+ ], 42, Rl))), 128))
1451
+ ], 8, Pl))), 128)) : g.value > 0 ? (i(!0), f(D, { key: 1 }, Z(u.value, (P, J) => (i(), f("div", {
1452
+ key: P.id,
1453
+ id: "g-search-option-" + P.id,
1454
+ class: O(["g-search-option", {
1455
+ "g-search-option-active": s.value === J
1456
+ }]),
1457
+ role: "option",
1458
+ onMousedown: ce((R) => v(P), ["prevent"]),
1459
+ "aria-selected": s.value === J
1460
+ }, [
1461
+ F(I.$slots, "option", { option: P }, () => [
1462
+ j(_(P.title), 1)
1463
+ ])
1464
+ ], 42, Hl))), 128)) : E("", !0)
1465
+ ], 8, Dl)
1466
+ ])) : E("", !0)
1467
+ ], 8, Al));
1468
+ }
1469
+ }), Ul = {
1470
+ class: /* @__PURE__ */ O({
1471
+ "g-app-header": !0
1472
+ })
1473
+ }, jl = { class: "g-app-header__brand" }, Nl = {
1474
+ class: "g-app-header__brand-text",
1475
+ href: "/"
1476
+ }, ql = {
1477
+ key: 0,
1478
+ class: "g-app-header__block-i-container"
1479
+ }, Wl = { class: "g-app-header__title" }, Zl = { class: "g-app-header__app-controls-wrap" }, Yl = {}, Ql = /* @__PURE__ */ T({
1480
+ ...Yl,
1481
+ __name: "GAppHeader",
1482
+ props: {
1483
+ illinois: { type: Boolean, default: !1 },
1484
+ brand: { default: "GRAD" }
1485
+ },
1486
+ setup(e) {
1487
+ return (l, t) => (i(), f("header", Ul, [
1488
+ t[1] || (t[1] = n("div", { class: "g-app-header__background" }, [
1489
+ n("div", { class: "g-app-header__background-pattern" }),
1490
+ n("div", { class: "g-app-header__background-gradient" })
1491
+ ], -1)),
1492
+ n("div", jl, [
1493
+ F(l.$slots, "left", {}, () => [
1494
+ n("a", Nl, _(e.brand), 1)
1495
+ ], !0)
1496
+ ]),
1497
+ e.illinois ? (i(), f("div", ql, [...t[0] || (t[0] = [
1498
+ n("svg", {
1499
+ class: "g-app-header__block-i",
1500
+ role: "img",
1501
+ width: "55",
1502
+ viewBox: "0 0 55 79",
1503
+ xmlns: "http://www.w3.org/2000/svg"
1504
+ }, [
1505
+ n("title", null, "Block I logo"),
1506
+ n("path", {
1507
+ class: "g-app-header__block-i-outline",
1508
+ d: "M54.2 21.1V0H0v21.1h12v36.1H0v21.1h54.2V57.2h-12V21.1z"
1509
+ }),
1510
+ n("path", {
1511
+ class: "g-app-header__block-i-fill",
1512
+ d: "M42.1 18.1h9V3H3v15h9c1.7 0 3 1.3 3 3v36.1c0 1.7-1.3 3-3 3H3v15h48.1v-15h-9c-1.7 0-3-1.3-3-3v-36c0-1.7 1.4-3 3-3z"
1513
+ })
1514
+ ], -1)
1515
+ ])])) : F(l.$slots, "icon", { key: 1 }, void 0, !0),
1516
+ n("div", Wl, [
1517
+ F(l.$slots, "title", {}, void 0, !0)
1518
+ ]),
1519
+ n("div", Zl, [
1520
+ F(l.$slots, "app-controls", { class: "g-app-header__app-controls" }, void 0, !0)
1521
+ ])
1522
+ ]));
1523
+ }
1524
+ }), js = /* @__PURE__ */ G(Ql, [["__scopeId", "data-v-bff91eee"]]), Xl = ["id"], Jl = {}, ea = /* @__PURE__ */ T({
1525
+ ...Jl,
1526
+ __name: "GSidebar",
1527
+ props: {
1528
+ backgroundColor: { default: "" },
1529
+ backgroundImage: { default: "none" },
1530
+ theme: { default: "dark" },
1531
+ topOffset: { default: "" },
1532
+ topOffsetVar: { default: "" },
1533
+ width: { default: "300px" }
1534
+ },
1535
+ setup(e) {
1536
+ const l = e, t = be(
1537
+ "sidebar",
1538
+ // This isn't required, so the default value just avoids compiler warnings
1539
+ () => {
1540
+ },
1541
+ !0
1542
+ ), a = S(() => l.backgroundImage ? l.backgroundImage : l.theme === "light" ? "none" : "url('https://gradcdn.blob.core.windows.net/public/sidebar-bg2.jpg')"), o = S(() => l.backgroundColor ? l.backgroundColor : l.theme === "light" ? "#f9f9f9" : "#030913"), r = S(() => l.topOffsetVar ? `var(${l.topOffsetVar})` : l.topOffset ? l.topOffset : "var(--g-toolbar-height)"), d = Y();
1543
+ function c(s) {
1544
+ s.key === "Escape" && t?.isCollapsible?.value && t?.open?.value && (t.open.value = !1, document.getElementById(`${t.id}-hamburger`)?.focus());
1545
+ }
1546
+ return (s, u) => (i(), f("div", {
1547
+ ref: "sidebar-ref",
1548
+ id: `${m(t)?.id ?? m(d)}-sidebar`,
1549
+ class: O(["g-sidebar", [
1550
+ `g-sidebar__${e.theme}`,
1551
+ {
1552
+ "g-sidebar--collapsible": m(t)?.isCollapsible?.value,
1553
+ "g-sidebar--closed": !m(t)?.open?.value && m(t)?.isCollapsible?.value,
1554
+ "g-sidebar--open": m(t)?.open?.value && m(t)?.isCollapsible?.value
1555
+ }
1556
+ ]]),
1557
+ style: ve({
1558
+ backgroundImage: a.value,
1559
+ backgroundColor: o.value,
1560
+ "--g-sidebar-top-offset": r.value,
1561
+ "--g-sidebar-width": e.width ?? "300px",
1562
+ width: "var(--g-sidebar-width)"
1563
+ }),
1564
+ onKeydown: c
1565
+ }, [
1566
+ F(s.$slots, "default", {}, void 0, !0)
1567
+ ], 46, Xl));
1568
+ }
1569
+ }), Ns = /* @__PURE__ */ G(ea, [["__scopeId", "data-v-73cb863d"]]), ta = ["id"], la = { class: "g-sidebar-menu__list" }, aa = ["href", "aria-current", "onClick"], oa = {}, sa = /* @__PURE__ */ T({
1570
+ ...oa,
1571
+ __name: "GSidebarMenu",
1572
+ props: /* @__PURE__ */ H({
1573
+ title: {},
1574
+ items: {},
1575
+ offset: { default: 70 },
1576
+ spy: { type: Boolean, default: !0 },
1577
+ theme: { default: "light" },
1578
+ compact: { type: Boolean, default: !1 }
1579
+ }, {
1580
+ modelValue: { default: null, type: String },
1581
+ modelModifiers: {}
1582
+ }),
1583
+ emits: ["update:modelValue"],
1584
+ setup(e) {
1585
+ const l = e, t = q(e, "modelValue"), a = S(() => l.spy && t.value ? "#" + t.value : null), o = ge("content");
1586
+ ie(() => {
1587
+ Q(
1588
+ t,
1589
+ () => {
1590
+ X(() => {
1591
+ const u = o.value?.querySelector(
1592
+ ".g-sidebar-menu__is-active"
1593
+ );
1594
+ u && u.scrollIntoView({ block: "nearest" });
1595
+ });
1596
+ },
1597
+ { immediate: !0 }
1598
+ );
1599
+ });
1600
+ const r = Ve(), d = S(() => r?.appContext?.components?.RouterLink ?? null);
1601
+ function c(u, g) {
1602
+ if (!g.href || !g.href.startsWith("#"))
1603
+ return;
1604
+ const p = g.href.slice(1), b = document.getElementById(p)?.querySelector("h2, h3, h4, h5");
1605
+ b && (u.preventDefault(), b.setAttribute("tabindex", "-1"), b.focus(), b.scrollIntoView({ block: "start" }), history.replaceState(null, "", g.href));
1606
+ }
1607
+ const s = Y();
1608
+ return (u, g) => (i(), f("nav", ae({
1609
+ class: ["g-sidebar-menu", [
1610
+ `g-sidebar-menu__${l.theme}`,
1611
+ { "g-sidebar-menu--compact": l.compact }
1612
+ ]]
1613
+ }, {
1614
+ "aria-labelledby": e.title ? m(s) : void 0,
1615
+ "aria-label": e.title ? void 0 : "Sidebar Menu"
1616
+ }), [
1617
+ e.title ? (i(), f("h2", {
1618
+ key: 0,
1619
+ id: m(s),
1620
+ class: "g-sidebar-menu__title"
1621
+ }, _(e.title), 9, ta)) : E("", !0),
1622
+ g[0] || (g[0] = n("div", { class: "g-sidebar-menu__divider" }, null, -1)),
1623
+ n("div", {
1624
+ class: "g-sidebar-menu__content",
1625
+ ref_key: "content",
1626
+ ref: o
1627
+ }, [
1628
+ n("ul", la, [
1629
+ (i(!0), f(D, null, Z(e.items, (p) => (i(), f("li", {
1630
+ key: p.href || p.to,
1631
+ class: "g-sidebar-menu__item",
1632
+ ref_for: !0,
1633
+ ref: "listItems"
1634
+ }, [
1635
+ p.to && d.value ? (i(), N(se(d.value), {
1636
+ key: 0,
1637
+ class: "g-sidebar-menu__link",
1638
+ to: p.to
1639
+ }, {
1640
+ default: U(() => [
1641
+ j(_(p.label), 1)
1642
+ ]),
1643
+ _: 2
1644
+ }, 1032, ["to"])) : (i(), f("a", {
1645
+ key: 1,
1646
+ class: O(["g-sidebar-menu__link", {
1647
+ "g-sidebar-menu__is-active": a.value === (p.href || "")
1648
+ }]),
1649
+ href: p.href || p.to || "#",
1650
+ "aria-current": a.value === (p.href || "") ? "location" : void 0,
1651
+ onClick: (b) => c(b, p)
1652
+ }, _(p.label), 11, aa))
1653
+ ]))), 128))
1654
+ ])
1655
+ ], 512)
1656
+ ], 16));
1657
+ }
1658
+ }), qs = /* @__PURE__ */ G(sa, [["__scopeId", "data-v-e228c589"]]);
1659
+ let na = 1;
1660
+ function ra(e, l) {
1661
+ const t = document.createElement("div");
1662
+ return t.className = "v-gtooltip", t.textContent = e, t.setAttribute("role", "tooltip"), t.setAttribute("id", l), t;
1663
+ }
1664
+ function Ee(e, l) {
1665
+ const t = e.getBoundingClientRect(), a = l.getBoundingClientRect(), o = new DOMRect(0, 0, window.innerWidth, window.innerHeight), { top: r, left: d, placedAbove: c } = Je(t, a, o, {
1666
+ gap: 8,
1667
+ margin: 8,
1668
+ preferAbove: !0
1669
+ }), g = (t.left + t.width / 2 - d) / a.width * 100;
1670
+ l.style.setProperty("--v-gtooltip-arrow-x", `${g}%`), l.classList.remove("v-gtooltip-bottom"), c || l.classList.add("v-gtooltip-bottom"), l.style.left = `${d}px`, l.style.top = `${r}px`, l.style.zIndex = `${Wt()}`, l.style.opacity = "1";
1671
+ }
1672
+ function ia(e) {
1673
+ e.style.opacity = "0";
1674
+ }
1675
+ const ua = {
1676
+ mounted(e, l) {
1677
+ const t = M(null), a = M(!1), o = M(!1), r = M(l.value);
1678
+ let d = null, c = !1, s;
1679
+ e.getAttribute("aria-describedby") ? s = e.getAttribute("aria-describedby") : (s = `v-gtooltip-${++na}`, e.setAttribute("aria-describedby", s));
1680
+ const u = () => {
1681
+ t.value || (t.value = ra(r.value, s), (document.getElementById("modal-root") ?? document.body).appendChild(t.value), d = new ResizeObserver(() => {
1682
+ t.value && (a.value || o.value) && Ee(e, t.value);
1683
+ }), d.observe(t.value));
1684
+ };
1685
+ Ke(() => {
1686
+ t.value && (t.value.textContent = r.value);
1687
+ });
1688
+ const g = () => {
1689
+ t.value && (a.value || o.value) && Ee(e, t.value);
1690
+ };
1691
+ Ke(() => {
1692
+ a.value || o.value ? (u(), t.value && Ee(e, t.value), c || (window.addEventListener("scroll", g, { capture: !0 }), c = !0)) : (c && (window.removeEventListener("scroll", g, { capture: !0 }), c = !1), t.value && (ia(t.value), setTimeout(() => {
1693
+ e.dispatchEvent(new CustomEvent("tooltip-hide"));
1694
+ }, 150)));
1695
+ });
1696
+ const p = () => {
1697
+ a.value = !0;
1698
+ }, b = () => {
1699
+ a.value = !1;
1700
+ }, k = () => {
1701
+ o.value = !0;
1702
+ }, x = () => {
1703
+ o.value = !1;
1704
+ }, v = (h) => {
1705
+ (h.key === "Escape" || h.key === "Esc") && (a.value = !1, o.value = !1);
1706
+ };
1707
+ e.addEventListener("mouseenter", p), e.addEventListener("mouseleave", b), e.addEventListener("focus", k), e.addEventListener("blur", x), e.addEventListener("keydown", v), u(), e._v_gtooltip = {
1708
+ onMouseEnter: p,
1709
+ onMouseLeave: b,
1710
+ onFocus: k,
1711
+ onBlur: x,
1712
+ onKeyDown: v,
1713
+ onScroll: g,
1714
+ tooltip: t,
1715
+ tooltipText: r,
1716
+ isHovered: a,
1717
+ isFocused: o,
1718
+ resizeObserver: d,
1719
+ tooltipId: s
1720
+ };
1721
+ },
1722
+ updated(e, l) {
1723
+ const t = e._v_gtooltip;
1724
+ t && t.tooltipText && (t.tooltipText.value = l.value);
1725
+ },
1726
+ unmounted(e) {
1727
+ const l = e._v_gtooltip;
1728
+ l && l.tooltip && l.tooltip.value && (l.resizeObserver && l.resizeObserver.disconnect(), l.tooltip.value.remove(), l.tooltip.value = null), l && l.onScroll && window.removeEventListener("scroll", l.onScroll, { capture: !0 }), e.removeEventListener("mouseenter", l.onMouseEnter), e.removeEventListener("mouseleave", l.onMouseLeave), e.removeEventListener("focus", l.onFocus), e.removeEventListener("blur", l.onBlur), e.removeEventListener("keydown", l.onKeyDown), e.removeAttribute("aria-describedby");
1729
+ }
1730
+ }, da = { class: "g-clipboard-text" }, ca = {}, fa = /* @__PURE__ */ T({
1731
+ ...ca,
1732
+ __name: "GClipboard",
1733
+ props: {
1734
+ text: {},
1735
+ hideText: { type: Boolean },
1736
+ copyLabel: {}
1737
+ },
1738
+ setup(e) {
1739
+ const l = e, t = ua, { text: a, copy: o, copied: r, isSupported: d } = bt({
1740
+ source: l.text
1741
+ }), c = M(l.copyLabel ?? "Copy to clipboard"), s = () => {
1742
+ d.value ? (o(), c.value = "Copied") : c.value = "Copy not supported";
1743
+ }, u = () => {
1744
+ c.value = l.copyLabel ?? "Copy to clipboard";
1745
+ };
1746
+ return (g, p) => (i(), f("div", da, [
1747
+ e.hideText ? E("", !0) : (i(), f(D, { key: 0 }, [
1748
+ j(_(l.text), 1)
1749
+ ], 64)),
1750
+ we((i(), f("button", {
1751
+ type: "button",
1752
+ "aria-label": "Copy",
1753
+ onClick: s,
1754
+ onTooltipHide: u,
1755
+ class: "g-clipboard-text-button"
1756
+ }, [...p[0] || (p[0] = [
1757
+ n("svg", {
1758
+ class: "g-clipboard-svg",
1759
+ xmlns: "http://www.w3.org/2000/svg",
1760
+ viewBox: "0 0 640 640",
1761
+ height: "1.125rem",
1762
+ role: "none presentation"
1763
+ }, [
1764
+ n("path", {
1765
+ fill: "currentColor",
1766
+ d: "M480 400L288 400C279.2 400 272 392.8 272 384L272 128C272 119.2 279.2 112 288 112L421.5 112C425.7 112 429.8 113.7 432.8 116.7L491.3 175.2C494.3 178.2 496 182.3 496 186.5L496 384C496 392.8 488.8 400 480 400zM288 448L480 448C515.3 448 544 419.3 544 384L544 186.5C544 169.5 537.3 153.2 525.3 141.2L466.7 82.7C454.7 70.7 438.5 64 421.5 64L288 64C252.7 64 224 92.7 224 128L224 384C224 419.3 252.7 448 288 448zM160 192C124.7 192 96 220.7 96 256L96 512C96 547.3 124.7 576 160 576L352 576C387.3 576 416 547.3 416 512L416 496L368 496L368 512C368 520.8 360.8 528 352 528L160 528C151.2 528 144 520.8 144 512L144 256C144 247.2 151.2 240 160 240L176 240L176 192L160 192z"
1767
+ })
1768
+ ], -1)
1769
+ ])], 32)), [
1770
+ [m(t), c.value]
1771
+ ])
1772
+ ]));
1773
+ }
1774
+ }), Ws = /* @__PURE__ */ G(fa, [["__scopeId", "data-v-8c42c870"]]), va = { class: "g-history-scroller-wrapper" }, ga = {
1775
+ key: 0,
1776
+ class: "g-history-shadow g-history-shadow--top",
1777
+ "aria-hidden": "true"
1778
+ }, ma = {
1779
+ key: 1,
1780
+ class: "g-history-shadow g-history-shadow--bottom",
1781
+ "aria-hidden": "true"
1782
+ }, ba = ["role", "aria-label"], pa = {}, ha = /* @__PURE__ */ T({
1783
+ ...pa,
1784
+ __name: "GHistoryScroller",
1785
+ props: {
1786
+ label: {},
1787
+ entries: { default: () => [] }
1788
+ },
1789
+ setup(e) {
1790
+ const l = e, t = M(null), a = M(null), o = M(!0), r = M(!0);
1791
+ async function d({ focusLast: u = !1 } = {}) {
1792
+ if (t.value && (t.value.scrollTop = t.value.scrollHeight), u && a.value) {
1793
+ const g = a.value.querySelectorAll(".g-history-entry");
1794
+ if (g.length > 0) {
1795
+ const p = g[g.length - 1];
1796
+ await X(), p.focus();
1797
+ }
1798
+ }
1799
+ }
1800
+ function c() {
1801
+ if (!t.value) return;
1802
+ const { scrollTop: u, scrollHeight: g, clientHeight: p } = t.value;
1803
+ o.value = u + p >= g - 2, r.value = u <= 2;
1804
+ }
1805
+ ie(() => {
1806
+ X(d);
1807
+ }), je(t, () => {
1808
+ o.value && d();
1809
+ }), je(a, () => {
1810
+ o.value && d();
1811
+ }), Q(
1812
+ () => l.entries,
1813
+ async () => {
1814
+ o.value && (await X(), d());
1815
+ }
1816
+ );
1817
+ const s = S(() => [...l.entries].reverse());
1818
+ return (u, g) => (i(), f("div", va, [
1819
+ r.value ? E("", !0) : (i(), f("div", ga)),
1820
+ o.value ? E("", !0) : (i(), f("div", ma)),
1821
+ n("div", {
1822
+ ref_key: "scrollerRef",
1823
+ ref: t,
1824
+ class: "g-history-scroller",
1825
+ role: e.label ? "log" : void 0,
1826
+ "aria-label": e.label,
1827
+ onScroll: c
1828
+ }, [
1829
+ W(ne, {
1830
+ class: O(["g-scroll-to-bottom-btn", { "scroll-to-bottom-btn--hidden": o.value }]),
1831
+ size: "small",
1832
+ type: "button",
1833
+ onClick: g[0] || (g[0] = () => d({ focusLast: !0 })),
1834
+ "aria-label": "Jump to Latest"
1835
+ }, {
1836
+ default: U(() => [...g[1] || (g[1] = [
1837
+ n("svg", {
1838
+ "aria-hidden": "true",
1839
+ xmlns: "http://www.w3.org/2000/svg",
1840
+ viewBox: "0 0 640 640",
1841
+ height: "1.25rem"
1842
+ }, [
1843
+ n("path", {
1844
+ fill: "currentColor",
1845
+ d: "M303.5 569C312.9 578.4 328.1 578.4 337.4 569L505.4 401C514.8 391.6 514.8 376.4 505.4 367.1C496 357.8 480.8 357.7 471.5 367.1L344.5 494.1L344.5 88C344.5 74.7 333.8 64 320.5 64C307.2 64 296.5 74.7 296.5 88L296.5 494.1L169.5 367.1C160.1 357.7 144.9 357.7 135.6 367.1C126.3 376.5 126.2 391.7 135.6 401L303.6 569z"
1846
+ })
1847
+ ], -1)
1848
+ ])]),
1849
+ _: 1
1850
+ }, 8, ["class"]),
1851
+ n("div", {
1852
+ role: "list",
1853
+ ref_key: "contentRef",
1854
+ ref: a,
1855
+ class: "g-history-list"
1856
+ }, [
1857
+ (i(!0), f(D, null, Z(s.value, (p) => (i(), f("div", {
1858
+ role: "listitem",
1859
+ key: p.id,
1860
+ class: "g-history-entry",
1861
+ tabindex: "-1"
1862
+ }, [
1863
+ F(u.$slots, "default", { entry: p }, void 0, !0)
1864
+ ]))), 128))
1865
+ ], 512)
1866
+ ], 40, ba)
1867
+ ]));
1868
+ }
1869
+ }), Zs = /* @__PURE__ */ G(ha, [["__scopeId", "data-v-dde35ac8"]]), ya = { class: "g-three-way-toggle-wrapper" }, ka = { class: "g-three-way-toggle-control" }, _a = ["id"], wa = ["aria-labelledby", "aria-describedby", "disabled", "aria-invalid", "aria-errormessage"], $a = { key: 0 }, Ca = { key: 1 }, xa = { key: 2 }, La = ["for"], Sa = ["id", "name", "checked", "disabled"], Ia = ["for"], Ea = ["id", "name", "checked", "disabled"], Ma = ["for"], Ba = ["id", "name", "checked", "disabled"], Va = ["id"], Ta = {}, Aa = /* @__PURE__ */ T({
1870
+ ...Ta,
1871
+ __name: "GThreeWayToggle",
1872
+ props: /* @__PURE__ */ H({
1873
+ label: {},
1874
+ describedby: {},
1875
+ error: {},
1876
+ disabled: { type: Boolean }
1877
+ }, {
1878
+ modelValue: { type: [Boolean, null], default: () => null },
1879
+ modelModifiers: {}
1880
+ }),
1881
+ emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
1882
+ setup(e, { emit: l }) {
1883
+ const t = e, a = q(e, "modelValue"), o = l;
1884
+ function r(v) {
1885
+ const h = a.value;
1886
+ a.value = v, v !== h && o("change", {
1887
+ was: h,
1888
+ to: v
1889
+ });
1890
+ }
1891
+ function d(v) {
1892
+ t.disabled || (a.value === v ? r(null) : r(v));
1893
+ }
1894
+ function c(v) {
1895
+ t.disabled || a.value === v && r(null);
1896
+ }
1897
+ const s = Y(), u = S(() => `g-three-way-toggle-${s}`), g = Y(), p = Y(), b = Y(), k = S(() => a.value === !1 ? "g-left" : a.value === !0 ? "g-right" : "g-center");
1898
+ function x(v) {
1899
+ t.disabled || (v.key === "n" || v.key === "N" ? (r(!1), v.preventDefault()) : (v.key === "y" || v.key === "Y") && (r(!0), v.preventDefault()));
1900
+ }
1901
+ return (v, h) => (i(), f("div", ya, [
1902
+ n("div", ka, [
1903
+ n("span", {
1904
+ class: "g-label",
1905
+ id: m(s)
1906
+ }, [
1907
+ F(v.$slots, "label", {}, () => [
1908
+ j(_(e.label), 1)
1909
+ ], !0)
1910
+ ], 8, _a),
1911
+ n("fieldset", {
1912
+ class: O(["g-three-way-toggle", { "g-has-error": e.error }]),
1913
+ role: "radiogroup",
1914
+ "aria-labelledby": m(s),
1915
+ "aria-describedby": e.describedby,
1916
+ disabled: e.disabled,
1917
+ "aria-invalid": e.error ? "true" : void 0,
1918
+ "aria-errormessage": e.error ? m(s) + "-error" : void 0
1919
+ }, [
1920
+ n("div", {
1921
+ class: O(["g-toggle-track", [k.value, { "g-disabled": e.disabled }]])
1922
+ }, [
1923
+ n("span", {
1924
+ class: O(["g-toggle-thumb", k.value]),
1925
+ "aria-hidden": "true"
1926
+ }, [
1927
+ a.value === !1 ? (i(), f("span", $a, "NO")) : a.value === !0 ? (i(), f("span", Ca, "YES")) : (i(), f("span", xa))
1928
+ ], 2),
1929
+ n("label", {
1930
+ for: m(g),
1931
+ class: "g-toggle-option g-left",
1932
+ onClick: h[1] || (h[1] = (y) => c(!1)),
1933
+ onKeydown: x
1934
+ }, [
1935
+ n("input", {
1936
+ type: "radio",
1937
+ id: m(g),
1938
+ name: u.value,
1939
+ checked: a.value === !1,
1940
+ value: "false",
1941
+ disabled: e.disabled,
1942
+ onChange: h[0] || (h[0] = (y) => d(!1))
1943
+ }, null, 40, Sa),
1944
+ h[5] || (h[5] = n("span", { class: "ilw-sr-only" }, "No", -1))
1945
+ ], 40, La),
1946
+ n("label", {
1947
+ for: m(p),
1948
+ class: "g-toggle-option g-center",
1949
+ onKeydown: x
1950
+ }, [
1951
+ n("input", {
1952
+ type: "radio",
1953
+ id: m(p),
1954
+ name: u.value,
1955
+ checked: a.value === null,
1956
+ disabled: e.disabled,
1957
+ onChange: h[2] || (h[2] = (y) => d(null))
1958
+ }, null, 40, Ea),
1959
+ h[6] || (h[6] = n("span", { class: "ilw-sr-only" }, "Unset", -1))
1960
+ ], 40, Ia),
1961
+ n("label", {
1962
+ for: m(b),
1963
+ class: "g-toggle-option g-right",
1964
+ onClick: h[4] || (h[4] = (y) => c(!0)),
1965
+ onKeydown: x
1966
+ }, [
1967
+ n("input", {
1968
+ type: "radio",
1969
+ id: m(b),
1970
+ name: u.value,
1971
+ value: "true",
1972
+ checked: a.value === !0,
1973
+ disabled: e.disabled,
1974
+ onChange: h[3] || (h[3] = (y) => d(!0))
1975
+ }, null, 40, Ba),
1976
+ h[7] || (h[7] = n("span", { class: "ilw-sr-only" }, "Yes", -1))
1977
+ ], 40, Ma)
1978
+ ], 2)
1979
+ ], 10, wa)
1980
+ ]),
1981
+ e.error ? (i(), f("div", {
1982
+ key: 0,
1983
+ id: `${m(s)}-error`,
1984
+ class: "g-form-error",
1985
+ role: "alert",
1986
+ "aria-atomic": "true"
1987
+ }, _(e.error), 9, Va)) : E("", !0)
1988
+ ]));
1989
+ }
1990
+ }), Ys = /* @__PURE__ */ G(Aa, [["__scopeId", "data-v-b5b2babc"]]), Ga = {
1991
+ ref: "tableBodyRef",
1992
+ class: "efficient-table-body"
1993
+ }, Oa = ["aria-rowindex"], za = {
1994
+ key: 0,
1995
+ class: "table-group-checkbox"
1996
+ }, Da = ["colspan"], Pa = ["aria-rowindex", "onMousedown", "onClick"], Fa = ["checked", "onClick", "aria-label", "name"], Ra = ["id"], Ha = {
1997
+ key: 0,
1998
+ class: "editable-cell"
1999
+ }, Ka = {
2000
+ key: 0,
2001
+ class: "cell-prefix"
2002
+ }, Ua = ["value", "onChange", "aria-labelledby", "aria-invalid", "name"], ja = ["value"], Na = ["value", "onInput", "aria-labelledby", "aria-invalid", "aria-errormessage", "name"], qa = {
2003
+ key: 3,
2004
+ class: "cell-suffix"
2005
+ }, Wa = ["id"], Za = {}, Ya = /* @__PURE__ */ T({
2006
+ ...Za,
2007
+ __name: "GTableBody",
2008
+ props: {
2009
+ data: {},
2010
+ groupBy: {},
2011
+ columns: {},
2012
+ groupRender: { type: Function },
2013
+ rowClickable: { type: Boolean },
2014
+ rowClass: { type: Function },
2015
+ startIndex: {},
2016
+ bulkSelectionEnabled: { type: Boolean },
2017
+ selectedRows: {},
2018
+ tableId: {},
2019
+ changeTracker: {}
2020
+ },
2021
+ emits: ["row-click", "toggle-row", "cell-change"],
2022
+ setup(e, { emit: l }) {
2023
+ const t = e, a = l;
2024
+ function o(v, h) {
2025
+ t.bulkSelectionEnabled && v.shiftKey && !v.target.closest("a,button,[tabindex],input") && v.preventDefault();
2026
+ }
2027
+ function r(v, h) {
2028
+ if (!t.rowClickable && !t.bulkSelectionEnabled || v.target.closest("a,button,[tabindex],input"))
2029
+ return;
2030
+ const y = v.target.closest(
2031
+ "tr"
2032
+ );
2033
+ if (y) {
2034
+ if (t.bulkSelectionEnabled)
2035
+ y.querySelector(
2036
+ "input[type=checkbox]"
2037
+ ) && c(h, v.shiftKey);
2038
+ else if (t.rowClickable) {
2039
+ const w = y.querySelector("a[href]")?.getAttribute("href");
2040
+ w && a("row-click", w);
2041
+ }
2042
+ }
2043
+ }
2044
+ function d(v) {
2045
+ return t.selectedRows?.includes(v) ?? !1;
2046
+ }
2047
+ function c(v, h = !1) {
2048
+ a("toggle-row", v, h);
2049
+ }
2050
+ function s(v, h, y) {
2051
+ const w = v.target.value;
2052
+ a("cell-change", { row: h, column: y, value: w });
2053
+ }
2054
+ function u(v, h) {
2055
+ const y = `${t.tableId}-th-${String(h.key)}`;
2056
+ return h.editable?.labelKey ? `${`${t.tableId}-td-${v.key}-${h.editable.labelKey}`} ${y} ` : y;
2057
+ }
2058
+ const g = S(
2059
+ () => {
2060
+ for (const v of t.columns)
2061
+ if (v.editable?.labelKey)
2062
+ return v.editable.labelKey;
2063
+ }
2064
+ );
2065
+ function p(v) {
2066
+ return v.key === g.value;
2067
+ }
2068
+ function b(v, h) {
2069
+ return t.changeTracker ? t.changeTracker.hasChange(v.key, h.key) : !1;
2070
+ }
2071
+ function k(v, h) {
2072
+ return t.changeTracker ? t.changeTracker.hasError(v.key, h.key) : !1;
2073
+ }
2074
+ function x(v, h) {
2075
+ if (t.changeTracker)
2076
+ return t.changeTracker.getError(v.key, h.key);
2077
+ }
2078
+ return (v, h) => (i(), f("tbody", Ga, [
2079
+ (i(!0), f(D, null, Z(e.data, (y, A) => (i(), f(D, {
2080
+ key: y.key
2081
+ }, [
2082
+ e.groupBy && (A === 0 || y[e.groupBy] !== e.data[A - 1][e.groupBy]) ? (i(), f("tr", {
2083
+ key: 0,
2084
+ "aria-rowindex": e.startIndex + A + 2
2085
+ }, [
2086
+ e.bulkSelectionEnabled ? (i(), f("td", za)) : E("", !0),
2087
+ n("td", {
2088
+ colspan: e.columns.length,
2089
+ class: "table-group-row"
2090
+ }, [
2091
+ e.groupRender ? (i(), N(se(e.groupRender(y[e.groupBy], y)), { key: 0 })) : (i(), f(D, { key: 1 }, [
2092
+ j(_(y[e.groupBy]), 1)
2093
+ ], 64))
2094
+ ], 8, Da)
2095
+ ], 8, Oa)) : E("", !0),
2096
+ n("tr", {
2097
+ class: O([
2098
+ "efficient-table-row",
2099
+ {
2100
+ "row-striped": A % 2 === 1,
2101
+ "row-clickable": e.rowClickable || e.bulkSelectionEnabled
2102
+ },
2103
+ e.rowClass ? e.rowClass(y) : void 0
2104
+ ]),
2105
+ "aria-rowindex": e.startIndex + A + 2,
2106
+ onMousedown: (w) => o(w, y.key),
2107
+ onClick: (w) => r(w, y.key)
2108
+ }, [
2109
+ e.bulkSelectionEnabled ? (i(), f("td", {
2110
+ key: 0,
2111
+ class: "td-checkbox",
2112
+ onClick: h[0] || (h[0] = ce(() => {
2113
+ }, ["stop"]))
2114
+ }, [
2115
+ n("input", {
2116
+ type: "checkbox",
2117
+ checked: d(y.key),
2118
+ onClick: (w) => c(y.key, w.shiftKey),
2119
+ "aria-label": `Select row ${y.key}`,
2120
+ name: `row-${y.key}-checkbox`,
2121
+ class: "g-bulk-select-checkbox"
2122
+ }, null, 8, Fa)
2123
+ ])) : E("", !0),
2124
+ (i(!0), f(D, null, Z(e.columns, (w) => (i(), f("td", {
2125
+ key: w.key,
2126
+ id: p(w) ? `${e.tableId}-td-${y.key}-${String(w.key)}` : void 0,
2127
+ class: O([
2128
+ w.editable ? "editable-td" : "",
2129
+ b(y, w) ? "g-cell-changed" : "",
2130
+ k(y, w) ? "g-cell-error" : "",
2131
+ typeof w.tdClass == "function" ? w.tdClass(y) : w.tdClass
2132
+ ])
2133
+ }, [
2134
+ w.editable ? (i(), f("div", Ha, [
2135
+ w.editable.prefix ? (i(), f("span", Ka, _(w.editable.prefix), 1)) : E("", !0),
2136
+ w.editable.type === "select" ? (i(), f("select", {
2137
+ key: 1,
2138
+ value: y[w.key],
2139
+ onChange: (I) => s(I, y, w),
2140
+ "aria-labelledby": u(y, w),
2141
+ "aria-invalid": k(y, w),
2142
+ name: `row-${y.key}-${String(w.key)}-select`,
2143
+ class: "editable-input editable-select"
2144
+ }, [
2145
+ (i(!0), f(D, null, Z(w.editable.options, (I) => (i(), f("option", {
2146
+ key: I.value,
2147
+ value: I.value
2148
+ }, _(I.label), 9, ja))), 128))
2149
+ ], 40, Ua)) : (i(), f("input", ae({
2150
+ key: 2,
2151
+ value: y[w.key]
2152
+ }, { ref_for: !0 }, w.editable.inputAttributes, {
2153
+ onInput: (I) => s(I, y, w),
2154
+ "aria-labelledby": u(y, w),
2155
+ "aria-invalid": k(y, w),
2156
+ "aria-errormessage": k(y, w) ? `${e.tableId}-error-${y.key}-${String(w.key)}` : void 0,
2157
+ name: `row-${y.key}-${String(w.key)}-input`,
2158
+ class: "editable-input",
2159
+ style: {
2160
+ paddingLeft: w.editable.prefix ? "1.5rem" : void 0,
2161
+ paddingRight: w.editable.suffix ? "2rem" : void 0
2162
+ }
2163
+ }), null, 16, Na)),
2164
+ w.editable.suffix ? (i(), f("span", qa, _(w.editable.suffix), 1)) : E("", !0)
2165
+ ])) : w.display ? (i(), N(se(w.display(y)), { key: 1 })) : (i(), f(D, { key: 2 }, [
2166
+ j(_(y[w.key]), 1)
2167
+ ], 64)),
2168
+ k(y, w) ? (i(), f("div", {
2169
+ key: 3,
2170
+ role: "alert",
2171
+ class: "g-cell-error-message",
2172
+ id: `${e.tableId}-error-${y.key}-${String(w.key)}`
2173
+ }, _(x(y, w)), 9, Wa)) : E("", !0)
2174
+ ], 10, Ra))), 128))
2175
+ ], 42, Pa)
2176
+ ], 64))), 128))
2177
+ ], 512));
2178
+ }
2179
+ });
2180
+ function qe(e) {
2181
+ if (!(Array.isArray(e) && e.length === 0) && !(e === null || e === !1 || e === ""))
2182
+ return e;
2183
+ }
2184
+ function Qs(e) {
2185
+ return Object.fromEntries(
2186
+ Object.entries(e).filter(([l, t]) => t && (!Array.isArray(t) || t.length > 0))
2187
+ );
2188
+ }
2189
+ function Xs(e) {
2190
+ if (e != null)
2191
+ return Array.isArray(e) ? e.filter(
2192
+ (l) => l != null
2193
+ ) : [e];
2194
+ }
2195
+ function Js(e) {
2196
+ let l = {};
2197
+ for (let [t, a] of Object.entries(Ye(e)))
2198
+ Array.isArray(a) ? a.length > 0 && (l[t] = a) : a === !0 ? l[t] = "true" : l[t] = a || void 0;
2199
+ return l;
2200
+ }
2201
+ function Qa(e) {
2202
+ const l = {};
2203
+ return Object.keys(e).forEach((t) => {
2204
+ const a = e[t];
2205
+ a != null && a !== "" && a !== !1 && (Array.isArray(a) ? a.length > 0 && (l[t] = a.map((o) => String(o))) : l[t] = String(a));
2206
+ }), l;
2207
+ }
2208
+ function Xa(e, l = {}) {
2209
+ const t = nt(
2210
+ Object.fromEntries(
2211
+ Object.entries(e).map(([c, s]) => [c, s])
2212
+ )
2213
+ ), a = l.syncWith;
2214
+ if (a) {
2215
+ if (a.value) {
2216
+ const c = Me(a);
2217
+ Object.keys(e).forEach((s) => {
2218
+ if (c[s] !== void 0) {
2219
+ const u = c[s];
2220
+ typeof u == "string" && (u.includes(",") ? t[s] = u.split(",") : t[s] = u);
2221
+ }
2222
+ });
2223
+ }
2224
+ Q(
2225
+ t,
2226
+ (c) => {
2227
+ a.value = Qa(c);
2228
+ },
2229
+ { deep: !0 }
2230
+ );
2231
+ }
2232
+ const o = S(() => {
2233
+ for (const c of Object.keys(e))
2234
+ if (qe(t[c]))
2235
+ return !0;
2236
+ return !1;
2237
+ }), r = () => {
2238
+ Object.keys(t).forEach((c) => {
2239
+ t[c] = void 0;
2240
+ });
2241
+ }, d = S(() => {
2242
+ const c = {};
2243
+ for (const s of Object.keys(e))
2244
+ c[s] = !!qe(t[s]);
2245
+ return c;
2246
+ });
2247
+ return {
2248
+ filters: t,
2249
+ isFiltered: o,
2250
+ clearFilters: r,
2251
+ filteredColumns: d
2252
+ };
2253
+ }
2254
+ const Ja = { class: "g-table-outer-wrap" }, eo = {
2255
+ key: 0,
2256
+ class: "g-table-controls"
2257
+ }, to = { class: "g-clear-filters-wrap" }, lo = {
2258
+ key: 0,
2259
+ class: "pagination"
2260
+ }, ao = { class: "g-result-count" }, oo = ["aria-label", "aria-rowcount"], so = { class: "g-table-head" }, no = { "aria-rowindex": "1" }, ro = {
2261
+ key: 0,
2262
+ scope: "col",
2263
+ class: "g-th g-th-checkbox"
2264
+ }, io = ["checked", "indeterminate", "aria-label"], uo = ["id", "aria-sort"], co = { class: "th-inner" }, fo = ["onClick"], vo = {
2265
+ key: 0,
2266
+ class: "sort-indicator"
2267
+ }, go = ["aria-label"], mo = {
2268
+ key: 1,
2269
+ class: "g-column-head"
2270
+ }, bo = ["onClick", "aria-label"], po = { key: 1 }, ho = { class: "g-filter-toggle" }, yo = ["onUpdate:modelValue", "id", "aria-describedby"], ko = ["for"], _o = ["id"], wo = {
2271
+ key: 2,
2272
+ class: "g-multi-select"
2273
+ }, $o = ["onUpdate:modelValue", "id", "value"], Co = ["for"], xo = {
2274
+ key: 1,
2275
+ class: "g-bulk-actions-toolbar"
2276
+ }, Lo = { class: "g-selected-count" }, So = { class: "g-bulk-actions" }, Io = {}, Eo = /* @__PURE__ */ T({
2277
+ ...Io,
2278
+ __name: "GTable",
2279
+ props: /* @__PURE__ */ H({
2280
+ label: {},
2281
+ data: {},
2282
+ columns: {},
2283
+ resultCount: {},
2284
+ groupBy: {},
2285
+ groupRender: {},
2286
+ filtering: {},
2287
+ rowClickable: { type: Boolean },
2288
+ rowClass: {},
2289
+ startIndex: {},
2290
+ bulkSelectionEnabled: { type: Boolean, default: !1 },
2291
+ bulkActions: { default: () => [] },
2292
+ changeTracker: {},
2293
+ showPagination: { type: Boolean, default: !1 }
2294
+ }, {
2295
+ sortField: {},
2296
+ sortFieldModifiers: {},
2297
+ sortOrder: {},
2298
+ sortOrderModifiers: {},
2299
+ filter: {
2300
+ default: () => ({})
2301
+ },
2302
+ filterModifiers: {},
2303
+ selectedRows: {
2304
+ default: () => []
2305
+ },
2306
+ selectedRowsModifiers: {}
2307
+ }),
2308
+ emits: /* @__PURE__ */ H(["row-click", "bulk-action", "cell-change"], ["update:sortField", "update:sortOrder", "update:filter", "update:selectedRows"]),
2309
+ setup(e, { emit: l }) {
2310
+ const t = q(e, "sortField"), a = q(e, "sortOrder"), o = q(e, "filter"), r = q(e, "selectedRows"), d = e, c = l;
2311
+ function s($) {
2312
+ $.sortable && (t.value === $.key ? a.value === 1 ? a.value = -1 : a.value === -1 && (t.value = void 0, a.value = 1) : (t.value = $.key, a.value = 1));
2313
+ }
2314
+ let u = d.filtering;
2315
+ u || (u = Xa({}));
2316
+ const { filters: g, filteredColumns: p, isFiltered: b, clearFilters: k } = u, x = S(() => d.data.map(($) => $.key)), v = S(() => r.value.filter(($) => x.value.includes($))), h = S(() => !d.bulkSelectionEnabled || d.data.length === 0 ? !1 : v.value.length === x.value.length), y = S(() => !d.bulkSelectionEnabled || d.data.length === 0 ? !1 : v.value.length > 0 && v.value.length < x.value.length), A = M(null);
2317
+ function w() {
2318
+ if (h.value)
2319
+ r.value = r.value.filter(
2320
+ ($) => !x.value.includes($)
2321
+ );
2322
+ else {
2323
+ const $ = new Set(r.value);
2324
+ x.value.forEach((V) => $.add(V)), r.value = Array.from($);
2325
+ }
2326
+ }
2327
+ function I($, V = !1) {
2328
+ if (V && A.value) {
2329
+ const C = x.value.indexOf(A.value), K = x.value.indexOf($);
2330
+ if (C !== -1 && K !== -1) {
2331
+ const re = Math.min(C, K), pe = Math.max(C, K), he = x.value.slice(re, pe + 1), ye = new Set(r.value);
2332
+ he.forEach((ke) => ye.add(ke)), r.value = Array.from(ye);
2333
+ }
2334
+ } else
2335
+ r.value.includes($) ? r.value = r.value.filter(
2336
+ (C) => C !== $
2337
+ ) : r.value = [...r.value, $];
2338
+ A.value = $;
2339
+ }
2340
+ function z($) {
2341
+ c("row-click", $);
2342
+ }
2343
+ function P($) {
2344
+ c("bulk-action", $, r.value);
2345
+ }
2346
+ function J($) {
2347
+ let V = $.value;
2348
+ const C = $.column.key, K = Ye($.row[C]);
2349
+ $.column.editable?.inputAttributes?.type === "number" && (V = $.value === "" ? null : Number($.value)), $.row[C] = V;
2350
+ const re = {
2351
+ row: $.row,
2352
+ column: $.column,
2353
+ value: V,
2354
+ previousValue: K
2355
+ };
2356
+ c("cell-change", re);
2357
+ }
2358
+ const R = Y(), te = Be(), ee = S(() => d.showPagination ? !0 : !!te.pagination), oe = S(() => !!(b.value || ee.value));
2359
+ return ie(() => {
2360
+ d.rowClickable && d.bulkSelectionEnabled && console.warn(
2361
+ "GTable: rowClickable and bulkSelectionEnabled cannot be used together. rowClickable will be ignored."
2362
+ );
2363
+ for (const $ of d.columns)
2364
+ if ($.editable && $.display && console.warn(
2365
+ `GTable: Column "${String($.key)}" has both 'editable' and 'display' configured. 'display' will be ignored.`
2366
+ ), $.filter && $.filter.type === "multi-select" && !Array.isArray(o.value[$.key])) {
2367
+ let V = o.value[$.key];
2368
+ o.value[$.key] = V ? [V] : [];
2369
+ }
2370
+ }), Q(
2371
+ () => d.columns,
2372
+ ($) => {
2373
+ for (const V of $)
2374
+ if (V.filter && V.filter.type === "multi-select" && !Array.isArray(o.value[V.key])) {
2375
+ let C = o.value[V.key];
2376
+ o.value[V.key] = C ? [C] : [];
2377
+ }
2378
+ },
2379
+ { immediate: !0 }
2380
+ ), ($, V) => (i(), f("div", Ja, [
2381
+ oe.value ? (i(), f("div", eo, [
2382
+ n("div", to, [
2383
+ m(b) ? (i(), N(ne, {
2384
+ key: 0,
2385
+ outlined: "",
2386
+ size: "small",
2387
+ class: "clear-filters",
2388
+ onClick: m(k)
2389
+ }, {
2390
+ default: U(() => [...V[0] || (V[0] = [
2391
+ n("svg", {
2392
+ xmlns: "http://www.w3.org/2000/svg",
2393
+ viewBox: "0 0 51.26 51.26",
2394
+ height: "1em",
2395
+ "aria-hidden": "true"
2396
+ }, [
2397
+ n("path", {
2398
+ fill: "currentColor",
2399
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
2400
+ })
2401
+ ], -1),
2402
+ n("span", { class: "g-clear-filters-text" }, " Clear Filters ", -1)
2403
+ ])]),
2404
+ _: 1
2405
+ }, 8, ["onClick"])) : E("", !0)
2406
+ ]),
2407
+ ee.value ? (i(), f("div", lo, [
2408
+ F($.$slots, "pagination", {}, void 0, !0)
2409
+ ])) : E("", !0),
2410
+ n("span", ao, _(d.resultCount || e.data.length) + " results", 1)
2411
+ ])) : E("", !0),
2412
+ n("table", {
2413
+ class: "g-table",
2414
+ ref: "tableRef",
2415
+ "aria-label": e.label,
2416
+ "aria-rowcount": d.resultCount || e.data.length
2417
+ }, [
2418
+ n("thead", so, [
2419
+ n("tr", no, [
2420
+ e.bulkSelectionEnabled ? (i(), f("th", ro, [
2421
+ n("input", {
2422
+ type: "checkbox",
2423
+ checked: h.value,
2424
+ indeterminate: y.value,
2425
+ onChange: w,
2426
+ "aria-label": h.value ? "Deselect all rows" : "Select all rows",
2427
+ class: "g-bulk-select-checkbox"
2428
+ }, null, 40, io)
2429
+ ])) : E("", !0),
2430
+ (i(!0), f(D, null, Z(e.columns, (C) => (i(), f("th", {
2431
+ key: C.key,
2432
+ id: `${m(R)}-th-${String(C.key)}`,
2433
+ "aria-sort": t.value === C.key ? a.value === 1 ? "ascending" : "descending" : "none",
2434
+ class: O([
2435
+ "g-th",
2436
+ { sorted: t.value === C.key },
2437
+ { filtered: m(p)[C.key] }
2438
+ ]),
2439
+ scope: "col"
2440
+ }, [
2441
+ n("div", co, [
2442
+ C.sortable ? (i(), f("button", {
2443
+ key: 0,
2444
+ type: "button",
2445
+ class: "g-column-head",
2446
+ onClick: (K) => s(C)
2447
+ }, [
2448
+ j(_(C.label) + " ", 1),
2449
+ t.value === C.key ? (i(), f("span", vo, [
2450
+ (i(), f("svg", {
2451
+ xmlns: "http://www.w3.org/2000/svg",
2452
+ viewBox: "0 0 640 640",
2453
+ height: "1.5em",
2454
+ role: "img",
2455
+ "aria-label": a.value === 1 ? "Sorted ascending" : "Sorted descending",
2456
+ style: ve({
2457
+ transform: `rotate(${a.value === 1 ? 0 : 180}deg)`
2458
+ })
2459
+ }, [...V[1] || (V[1] = [
2460
+ n("path", {
2461
+ fill: "currentColor",
2462
+ d: "M300.3 199.2C312.9 188.9 331.4 189.7 343.1 201.4L471.1 329.4C480.3 338.6 483 352.3 478 364.3C473 376.3 461.4 384 448.5 384L192.5 384C179.6 384 167.9 376.2 162.9 364.2C157.9 352.2 160.7 338.5 169.9 329.4L297.9 201.4L300.3 199.2z"
2463
+ }, null, -1)
2464
+ ])], 12, go))
2465
+ ])) : E("", !0)
2466
+ ], 8, fo)) : (i(), f("span", mo, _(C.label), 1)),
2467
+ C.filter ? (i(), N(Pe, { key: 2 }, {
2468
+ trigger: U(({ toggle: K }) => [
2469
+ n("button", {
2470
+ onClick: ce(K, ["stop"]),
2471
+ "aria-label": m(p)[C.key] ? "Column Filtered" : "Filter Column",
2472
+ class: O(["g-filter-btn", {
2473
+ "g-active": m(p)[C.key]
2474
+ }]),
2475
+ type: "button"
2476
+ }, [...V[2] || (V[2] = [
2477
+ n("svg", {
2478
+ xmlns: "http://www.w3.org/2000/svg",
2479
+ viewBox: "0 0 640 640",
2480
+ height: "1.5em",
2481
+ "aria-hidden": "true"
2482
+ }, [
2483
+ n("path", {
2484
+ fill: "currentColor",
2485
+ d: "M96 128C83.1 128 71.4 135.8 66.4 147.8C61.4 159.8 64.2 173.5 73.4 182.6L256 365.3L256 480C256 488.5 259.4 496.6 265.4 502.6L329.4 566.6C338.6 575.8 352.3 578.5 364.3 573.5C376.3 568.5 384 556.9 384 544L384 365.3L566.6 182.7C575.8 173.5 578.5 159.8 573.5 147.8C568.5 135.8 556.9 128 544 128L96 128z"
2486
+ })
2487
+ ], -1)
2488
+ ])], 10, bo)
2489
+ ]),
2490
+ default: U(() => [
2491
+ C.filter.type === "select" ? (i(), N(et, {
2492
+ key: 0,
2493
+ modelValue: o.value[C.key],
2494
+ "onUpdate:modelValue": (K) => o.value[C.key] = K,
2495
+ options: C.filter.options,
2496
+ class: "g-filter-select",
2497
+ label: "Filter select",
2498
+ searchable: "",
2499
+ "clear-button": ""
2500
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : C.filter.type === "toggle" ? (i(), f("div", po, [
2501
+ n("div", ho, [
2502
+ we(n("input", {
2503
+ type: "checkbox",
2504
+ "onUpdate:modelValue": (K) => o.value[C.key] = K,
2505
+ id: `${m(R)}-filter-${String(C.key)}`,
2506
+ "aria-describedby": C.filter.description ? `${m(R)}-filter-description-${String(C.key)}` : void 0
2507
+ }, null, 8, yo), [
2508
+ [Ue, o.value[C.key]]
2509
+ ]),
2510
+ n("label", {
2511
+ for: `${m(R)}-filter-${String(C.key)}`
2512
+ }, _(C.filter.label), 9, ko),
2513
+ C.filter.description ? (i(), f("span", {
2514
+ key: 0,
2515
+ class: "g-filter-description",
2516
+ id: `${m(R)}-filter-description-${String(C.key)}`
2517
+ }, _(C.filter.description), 9, _o)) : E("", !0)
2518
+ ])
2519
+ ])) : C.filter.type === "multi-select" ? (i(), f("fieldset", wo, [
2520
+ V[4] || (V[4] = n("legend", { class: "g-multi-select-legend" }, " Include values ", -1)),
2521
+ (i(!0), f(D, null, Z(C.filter.options, (K) => (i(), f("div", {
2522
+ key: K.value
2523
+ }, [
2524
+ we(n("input", {
2525
+ type: "checkbox",
2526
+ "onUpdate:modelValue": (re) => o.value[C.key] = re,
2527
+ id: `filter-${String(C.key)}-${K.value}`,
2528
+ value: K.value,
2529
+ name: "filter-multiselect"
2530
+ }, null, 8, $o), [
2531
+ [Ue, o.value[C.key]]
2532
+ ]),
2533
+ n("label", {
2534
+ for: `filter-${String(C.key)}-${K.value}`
2535
+ }, _(K.label), 9, Co)
2536
+ ]))), 128)),
2537
+ o.value[C.key] && o.value[C.key].length ? (i(), N(ne, {
2538
+ key: 0,
2539
+ class: "clear-multiselect-btn",
2540
+ theme: "accent",
2541
+ size: "small",
2542
+ onClick: (K) => o.value[C.key] = []
2543
+ }, {
2544
+ default: U(() => [...V[3] || (V[3] = [
2545
+ j(" Clear ", -1)
2546
+ ])]),
2547
+ _: 1
2548
+ }, 8, ["onClick"])) : E("", !0)
2549
+ ])) : E("", !0)
2550
+ ]),
2551
+ _: 2
2552
+ }, 1024)) : E("", !0)
2553
+ ])
2554
+ ], 10, uo))), 128))
2555
+ ])
2556
+ ]),
2557
+ W(Ya, {
2558
+ data: e.data,
2559
+ columns: e.columns,
2560
+ "group-by": e.groupBy,
2561
+ "group-render": e.groupRender,
2562
+ "row-clickable": e.rowClickable,
2563
+ "row-class": e.rowClass,
2564
+ "start-index": e.startIndex,
2565
+ "bulk-selection-enabled": e.bulkSelectionEnabled,
2566
+ "selected-rows": r.value,
2567
+ "table-id": m(R),
2568
+ "change-tracker": e.changeTracker,
2569
+ onRowClick: z,
2570
+ onToggleRow: I,
2571
+ onCellChange: J
2572
+ }, null, 8, ["data", "columns", "group-by", "group-render", "row-clickable", "row-class", "start-index", "bulk-selection-enabled", "selected-rows", "table-id", "change-tracker"])
2573
+ ], 8, oo),
2574
+ e.bulkSelectionEnabled && r.value.length > 0 ? (i(), f("div", xo, [
2575
+ n("span", Lo, _(r.value.length) + " row" + _(r.value.length === 1 ? "" : "s") + " selected", 1),
2576
+ n("ul", So, [
2577
+ (i(!0), f(D, null, Z(e.bulkActions, (C) => (i(), f("li", {
2578
+ key: C.id
2579
+ }, [
2580
+ W(ne, {
2581
+ theme: C.theme || "accent",
2582
+ onClick: (K) => P(C.id),
2583
+ size: "small"
2584
+ }, {
2585
+ default: U(() => [
2586
+ j(_(C.label) + " " + _(r.value.length) + " row" + _(r.value.length === 1 ? "" : "s"), 1)
2587
+ ]),
2588
+ _: 2
2589
+ }, 1032, ["theme", "onClick"])
2590
+ ]))), 128))
2591
+ ])
2592
+ ])) : E("", !0)
2593
+ ]));
2594
+ }
2595
+ }), en = /* @__PURE__ */ G(Eo, [["__scopeId", "data-v-8ca5e7b3"]]), Mo = {
2596
+ class: "g-pagination",
2597
+ "aria-label": "Pagination"
2598
+ }, Bo = ["disabled"], Vo = ["disabled"], To = { class: "page-range" }, Ao = ["disabled"], Go = ["disabled"], Oo = ["value"], zo = ["value"], Do = {}, Po = /* @__PURE__ */ T({
2599
+ ...Do,
2600
+ __name: "GTablePagination",
2601
+ props: /* @__PURE__ */ H({
2602
+ start: {},
2603
+ pageSize: {},
2604
+ total: {},
2605
+ pageSizes: {}
2606
+ }, {
2607
+ start: {},
2608
+ startModifiers: {},
2609
+ pageSize: {},
2610
+ pageSizeModifiers: {}
2611
+ }),
2612
+ emits: ["update:start", "update:pageSize"],
2613
+ setup(e) {
2614
+ const l = e, t = S(() => Math.max(1, Math.ceil(l.total / l.pageSize))), a = q(e, "start"), o = q(e, "pageSize"), r = S(() => a.value ?? l.start), d = S(() => o.value ?? l.pageSize), c = S(() => l.total === 0 ? 0 : r.value + 1), s = S(() => l.total === 0 ? 0 : Math.min(r.value + d.value, l.total)), u = S(() => Math.floor(r.value / d.value) + 1);
2615
+ function g(b) {
2616
+ b < 1 || b > t.value || (a.value = (b - 1) * d.value);
2617
+ }
2618
+ function p(b) {
2619
+ o.value = parseInt(b.target.value, 10);
2620
+ }
2621
+ return (b, k) => (i(), f("nav", Mo, [
2622
+ n("button", {
2623
+ class: "first-page g-pagination-button",
2624
+ disabled: u.value === 1,
2625
+ onClick: k[0] || (k[0] = (x) => g(1))
2626
+ }, [...k[4] || (k[4] = [
2627
+ n("svg", {
2628
+ role: "img",
2629
+ "aria-label": "First Page",
2630
+ height: "2em",
2631
+ xmlns: "http://www.w3.org/2000/svg",
2632
+ width: "2em",
2633
+ viewBox: "0 0 24 24",
2634
+ fill: "none",
2635
+ stroke: "currentColor",
2636
+ "stroke-width": "2",
2637
+ "stroke-linecap": "round",
2638
+ "stroke-linejoin": "round"
2639
+ }, [
2640
+ n("path", {
2641
+ stroke: "none",
2642
+ d: "M0 0h24v24H0z",
2643
+ fill: "none"
2644
+ }),
2645
+ n("path", { d: "M11 7l-5 5l5 5" }),
2646
+ n("path", { d: "M17 7l-5 5l5 5" })
2647
+ ], -1)
2648
+ ])], 8, Bo),
2649
+ n("button", {
2650
+ class: "prev-page g-pagination-button",
2651
+ disabled: u.value === 1,
2652
+ onClick: k[1] || (k[1] = (x) => g(u.value - 1))
2653
+ }, [...k[5] || (k[5] = [
2654
+ n("svg", {
2655
+ role: "img",
2656
+ "aria-label": "Previous Page",
2657
+ xmlns: "http://www.w3.org/2000/svg",
2658
+ width: "2em",
2659
+ height: "2em",
2660
+ viewBox: "0 0 24 24",
2661
+ fill: "none",
2662
+ stroke: "currentColor",
2663
+ "stroke-width": "2",
2664
+ "stroke-linecap": "round",
2665
+ "stroke-linejoin": "round"
2666
+ }, [
2667
+ n("path", {
2668
+ stroke: "none",
2669
+ d: "M0 0h24v24H0z",
2670
+ fill: "none"
2671
+ }),
2672
+ n("path", { d: "M15 6l-6 6l6 6" })
2673
+ ], -1)
2674
+ ])], 8, Vo),
2675
+ n("span", To, _(c.value) + " to " + _(s.value), 1),
2676
+ n("button", {
2677
+ class: "next-page g-pagination-button",
2678
+ disabled: u.value === t.value,
2679
+ onClick: k[2] || (k[2] = (x) => g(u.value + 1))
2680
+ }, [...k[6] || (k[6] = [
2681
+ n("svg", {
2682
+ role: "img",
2683
+ "aria-label": "Next Page",
2684
+ xmlns: "http://www.w3.org/2000/svg",
2685
+ width: "2em",
2686
+ height: "2em",
2687
+ viewBox: "0 0 24 24",
2688
+ fill: "none",
2689
+ stroke: "currentColor",
2690
+ "stroke-width": "2",
2691
+ "stroke-linecap": "round",
2692
+ "stroke-linejoin": "round"
2693
+ }, [
2694
+ n("path", {
2695
+ stroke: "none",
2696
+ d: "M0 0h24v24H0z",
2697
+ fill: "none"
2698
+ }),
2699
+ n("path", { d: "M9 6l6 6l-6 6" })
2700
+ ], -1)
2701
+ ])], 8, Ao),
2702
+ n("button", {
2703
+ class: "last-page g-pagination-button",
2704
+ disabled: u.value === t.value,
2705
+ onClick: k[3] || (k[3] = (x) => g(t.value))
2706
+ }, [...k[7] || (k[7] = [
2707
+ n("svg", {
2708
+ role: "img",
2709
+ "aria-label": "Last Page",
2710
+ xmlns: "http://www.w3.org/2000/svg",
2711
+ width: "2em",
2712
+ height: "2em",
2713
+ viewBox: "0 0 24 24",
2714
+ fill: "none",
2715
+ stroke: "currentColor",
2716
+ "stroke-width": "2",
2717
+ "stroke-linecap": "round",
2718
+ "stroke-linejoin": "round"
2719
+ }, [
2720
+ n("path", {
2721
+ stroke: "none",
2722
+ d: "M0 0h24v24H0z",
2723
+ fill: "none"
2724
+ }),
2725
+ n("path", { d: "M7 7l5 5l-5 5" }),
2726
+ n("path", { d: "M13 7l5 5l-5 5" })
2727
+ ], -1)
2728
+ ])], 8, Go),
2729
+ n("select", {
2730
+ id: "page-size-select",
2731
+ class: "page-size-select",
2732
+ value: o.value,
2733
+ onChange: p
2734
+ }, [
2735
+ (i(!0), f(D, null, Z(l.pageSizes || [10, 25, 50, 100], (x) => (i(), f("option", {
2736
+ key: x,
2737
+ value: x
2738
+ }, _(x), 9, zo))), 128))
2739
+ ], 40, Oo),
2740
+ k[8] || (k[8] = n("label", {
2741
+ class: "page-size-label",
2742
+ for: "page-size-select"
2743
+ }, "per page", -1))
2744
+ ]));
2745
+ }
2746
+ }), tn = /* @__PURE__ */ G(Po, [["__scopeId", "data-v-d0b070eb"]]), Fo = ["id"], Ro = { class: "g-modal-inner" }, Ho = { class: "g-modal-header" }, Ko = ["id"], Uo = ["id"], jo = {}, No = /* @__PURE__ */ T({
2747
+ ...jo,
2748
+ __name: "GModal",
2749
+ props: {
2750
+ label: {},
2751
+ describedby: { default: void 0 },
2752
+ hiddenLabel: { type: Boolean, default: !1 },
2753
+ size: { default: "medium" },
2754
+ classes: {}
2755
+ },
2756
+ emits: ["close"],
2757
+ setup(e, { emit: l }) {
2758
+ const t = e, a = l, o = ge("dialog"), r = M(!0), d = Y(), { pop: c, push: s, isTop: u, zIndex: g } = Le(d, !0, !0), { deactivate: p, activate: b } = ze(o, u);
2759
+ function k() {
2760
+ a("close");
2761
+ }
2762
+ De([o], u, r, k, c), ie(() => {
2763
+ s(), b();
2764
+ }), Ze(() => {
2765
+ c(), p();
2766
+ });
2767
+ const x = S(() => {
2768
+ let v = [`g-modal--${t.size}`];
2769
+ return t.classes && (v = v.concat(Array.isArray(t.classes) ? t.classes : [t.classes])), v;
2770
+ });
2771
+ return (v, h) => (i(), N(Te, { to: "#modal-root" }, [
2772
+ W(Ce, {
2773
+ name: "g-fade",
2774
+ appear: ""
2775
+ }, {
2776
+ default: U(() => [
2777
+ n("div", ae({
2778
+ id: "modal-" + m(d),
2779
+ class: ["g-modal", x.value],
2780
+ role: "dialog",
2781
+ "aria-modal": "true"
2782
+ }, {
2783
+ "aria-labelledby": e.hiddenLabel ? void 0 : "modal-label-" + m(d),
2784
+ "aria-label": e.hiddenLabel ? e.label : void 0,
2785
+ "aria-describedby": e.describedby ? e.describedby : void 0
2786
+ }, {
2787
+ ref_key: "dialog",
2788
+ ref: o,
2789
+ style: { zIndex: m(g) }
2790
+ }), [
2791
+ n("div", Ro, [
2792
+ n("div", Ho, [
2793
+ e.hiddenLabel ? E("", !0) : (i(), f("h2", {
2794
+ key: 0,
2795
+ id: "modal-label-" + m(d),
2796
+ class: "g-modal-label",
2797
+ tabindex: "-1"
2798
+ }, _(e.label), 9, Ko)),
2799
+ n("button", {
2800
+ class: "g-modal-close",
2801
+ onClick: k,
2802
+ "aria-label": "Close"
2803
+ }, [...h[0] || (h[0] = [
2804
+ n("svg", {
2805
+ viewBox: "0 0 24 24",
2806
+ width: "24",
2807
+ height: "24",
2808
+ "aria-hidden": "true"
2809
+ }, [
2810
+ n("path", {
2811
+ fill: "currentColor",
2812
+ d: "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
2813
+ })
2814
+ ], -1)
2815
+ ])])
2816
+ ]),
2817
+ n("div", {
2818
+ id: "modal-description-" + m(d),
2819
+ class: "g-modal-content"
2820
+ }, [
2821
+ F(v.$slots, "default", {}, void 0, !0)
2822
+ ], 8, Uo)
2823
+ ])
2824
+ ], 16, Fo)
2825
+ ]),
2826
+ _: 3
2827
+ })
2828
+ ]));
2829
+ }
2830
+ }), ln = /* @__PURE__ */ G(No, [["__scopeId", "data-v-a1c9180c"]]), qo = ["id", "aria-expanded", "aria-label", "aria-controls"], Wo = {}, Zo = /* @__PURE__ */ T({
2831
+ ...Wo,
2832
+ __name: "GHamburgerMenu",
2833
+ props: {
2834
+ label: { default: "Main Navigation" }
2835
+ },
2836
+ emits: ["toggle"],
2837
+ setup(e, { emit: l }) {
2838
+ const t = be("sidebar"), a = l;
2839
+ function o() {
2840
+ a("toggle"), t?.toggle();
2841
+ }
2842
+ function r(c) {
2843
+ c.key === "Escape" && t?.open?.value && (t.open.value = !1);
2844
+ }
2845
+ const d = Y();
2846
+ return (c, s) => (i(), f("button", {
2847
+ id: `${m(t)?.id ?? m(d)}-hamburger`,
2848
+ class: O(["g-hamburger-button", {
2849
+ "g-hamburger-button--open": m(t)?.open?.value,
2850
+ "g-hamburger-button--collapsible": m(t)?.isCollapsible?.value
2851
+ }]),
2852
+ onClick: o,
2853
+ onKeydown: r,
2854
+ "aria-expanded": m(t)?.open?.value ? "true" : "false",
2855
+ "aria-label": e.label,
2856
+ "aria-controls": m(t) ? `${m(t).id}-sidebar` : void 0
2857
+ }, [...s[0] || (s[0] = [
2858
+ n("svg", {
2859
+ xmlns: "http://www.w3.org/2000/svg",
2860
+ viewBox: "0 0 51.26 51.26"
2861
+ }, [
2862
+ n("g", { fill: "currentColor" }, [
2863
+ n("path", { d: "M11.6 16.52h28.06a3.24 3.24 0 1 0 0-6.48H11.6a3.24 3.24 0 0 0 0 6.48ZM39.66 22.07H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48ZM39.66 34.1H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48Z" })
2864
+ ])
2865
+ ], -1)
2866
+ ])], 42, qo));
2867
+ }
2868
+ }), an = /* @__PURE__ */ G(Zo, [["__scopeId", "data-v-fccc9f00"]]), Yo = {}, Qo = /* @__PURE__ */ T({
2869
+ ...Yo,
2870
+ __name: "GDetailList",
2871
+ props: {
2872
+ variant: { default: "grid" }
2873
+ },
2874
+ setup(e) {
2875
+ const l = e;
2876
+ return (t, a) => (i(), f("dl", {
2877
+ class: O(["g-detail-list", `g-detail-list--${l.variant}`])
2878
+ }, [
2879
+ F(t.$slots, "default", {}, void 0, !0)
2880
+ ], 2));
2881
+ }
2882
+ }), on = /* @__PURE__ */ G(Qo, [["__scopeId", "data-v-b851df7b"]]), Xo = { class: "g-detail-list-item" }, Jo = { class: "g-detail-list-item__label" }, es = { class: "g-detail-list-item__value" }, sn = /* @__PURE__ */ T({
2883
+ __name: "GDetailListItem",
2884
+ props: {
2885
+ label: {}
2886
+ },
2887
+ setup(e) {
2888
+ return (l, t) => (i(), f("div", Xo, [
2889
+ n("dt", Jo, [
2890
+ F(l.$slots, "label", {}, () => [
2891
+ j(_(e.label), 1)
2892
+ ])
2893
+ ]),
2894
+ n("dd", es, [
2895
+ F(l.$slots, "default")
2896
+ ])
2897
+ ]));
2898
+ }
2899
+ }), ts = {
2900
+ key: 0,
2901
+ class: "g-scroll-lock-overlay"
2902
+ }, ls = {}, nn = /* @__PURE__ */ T({
2903
+ ...ls,
2904
+ __name: "GOverlay",
2905
+ setup(e) {
2906
+ const { hasScrollLock: l } = qt();
2907
+ return (t, a) => (i(), N(Ce, { name: "g-fade" }, {
2908
+ default: U(() => [
2909
+ m(l) ? (i(), f("div", ts)) : E("", !0)
2910
+ ]),
2911
+ _: 1
2912
+ }));
2913
+ }
2914
+ }), as = { class: "popover-content" }, os = { class: "year-dropdown" }, ss = { class: "month-selector" }, ns = {}, rs = /* @__PURE__ */ T({
2915
+ ...ns,
2916
+ __name: "GTermSelectorControl",
2917
+ props: /* @__PURE__ */ H({
2918
+ termYears: { default: () => ["2026"] },
2919
+ termNames: { default: () => ["Spring", "Summer", "Fall"] },
2920
+ yearLabel: { default: "Select Year" },
2921
+ periodLabel: { default: "Term" }
2922
+ }, {
2923
+ modelValue: {
2924
+ default: () => ({ year: "2026", name: "Spring" })
2925
+ },
2926
+ modelModifiers: {}
2927
+ }),
2928
+ emits: ["update:modelValue"],
2929
+ setup(e) {
2930
+ const l = q(e, "modelValue");
2931
+ return (t, a) => (i(), f("div", as, [
2932
+ n("div", os, [
2933
+ W(et, {
2934
+ modelValue: l.value.year,
2935
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => l.value.year = o),
2936
+ options: e.termYears,
2937
+ label: e.yearLabel
2938
+ }, null, 8, ["modelValue", "options", "label"])
2939
+ ]),
2940
+ n("div", ss, [
2941
+ W(ul, {
2942
+ modelValue: l.value.name,
2943
+ "onUpdate:modelValue": a[1] || (a[1] = (o) => l.value.name = o),
2944
+ options: e.termNames,
2945
+ "allow-empty": !1,
2946
+ label: e.periodLabel
2947
+ }, null, 8, ["modelValue", "options", "label"])
2948
+ ])
2949
+ ]));
2950
+ }
2951
+ }), is = /* @__PURE__ */ G(rs, [["__scopeId", "data-v-43c70980"]]), us = { class: "g-term-selector" }, ds = { class: "g-term-label" }, cs = {
2952
+ class: "popover-title",
2953
+ tabindex: "-1"
2954
+ }, fs = {}, vs = /* @__PURE__ */ T({
2955
+ ...fs,
2956
+ __name: "GTermSelector",
2957
+ props: /* @__PURE__ */ H({
2958
+ title: { default: "Period Selection" },
2959
+ yearLabel: {},
2960
+ periodLabel: {},
2961
+ termYears: { default: () => ["2026"] },
2962
+ termNames: { default: () => ["Spring", "Summer", "Fall"] }
2963
+ }, {
2964
+ modelValue: {
2965
+ default: () => ({ year: "2026", name: "Spring" })
2966
+ },
2967
+ modelModifiers: {}
2968
+ }),
2969
+ emits: ["update:modelValue"],
2970
+ setup(e) {
2971
+ const l = q(e, "modelValue");
2972
+ return (t, a) => (i(), f("div", us, [
2973
+ W(Pe, null, {
2974
+ trigger: U(({ toggle: o }) => [
2975
+ W(ne, {
2976
+ class: "g-term-selector-button",
2977
+ theme: "none",
2978
+ outlined: "",
2979
+ onClick: o
2980
+ }, {
2981
+ default: U(() => [
2982
+ a[0] || (a[0] = n("span", { class: "g-calendar-icon" }, [
2983
+ n("svg", {
2984
+ role: "none presentation",
2985
+ xmlns: "http://www.w3.org/2000/svg",
2986
+ viewBox: "0 0 640 640"
2987
+ }, [
2988
+ n("path", { d: "M224 64C206.3 64 192 78.3 192 96L192 128L160 128C124.7 128 96 156.7 96 192L96 240L544 240L544 192C544 156.7 515.3 128 480 128L448 128L448 96C448 78.3 433.7 64 416 64C398.3 64 384 78.3 384 96L384 128L256 128L256 96C256 78.3 241.7 64 224 64zM96 288L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 288L96 288z" })
2989
+ ])
2990
+ ], -1)),
2991
+ n("span", ds, _(l.value?.name) + " " + _(l.value?.year), 1),
2992
+ a[1] || (a[1] = n("span", { class: "g-caret" }, [
2993
+ n("svg", {
2994
+ role: "none presentation",
2995
+ xmlns: "http://www.w3.org/2000/svg",
2996
+ viewBox: "0 0 640 640"
2997
+ }, [
2998
+ n("path", { d: "M300.3 440.8C312.9 451 331.4 450.3 343.1 438.6L471.1 310.6C480.3 301.4 483 287.7 478 275.7C473 263.7 461.4 256 448.5 256L192.5 256C179.6 256 167.9 263.8 162.9 275.8C157.9 287.8 160.7 301.5 169.9 310.6L297.9 438.6L300.3 440.8z" })
2999
+ ])
3000
+ ], -1))
3001
+ ]),
3002
+ _: 1
3003
+ }, 8, ["onClick"])
3004
+ ]),
3005
+ default: U(() => [
3006
+ n("h2", cs, _(e.title), 1),
3007
+ W(is, rt(it(t.$props)), null, 16)
3008
+ ]),
3009
+ _: 1
3010
+ })
3011
+ ]));
3012
+ }
3013
+ }), rn = /* @__PURE__ */ G(vs, [["__scopeId", "data-v-674777ba"]]), gs = { class: "g-user-menu" }, ms = ["aria-label", "aria-expanded", "onClick"], bs = { class: "g-user-menu__popover" }, ps = { class: "g-user-menu__list" }, hs = {}, ys = /* @__PURE__ */ T({
3014
+ ...hs,
3015
+ __name: "GUserMenu",
3016
+ props: {
3017
+ initials: {},
3018
+ email: {},
3019
+ color: { default: "var(--g-surface-700)" },
3020
+ label: { default: "User menu" }
3021
+ },
3022
+ setup(e) {
3023
+ const t = `${Y()}-email`, a = M(!1), o = ge("emailHeading");
3024
+ Ve()?.appContext?.components?.RouterLink;
3025
+ const d = Be();
3026
+ return (c, s) => (i(), f("div", gs, [
3027
+ W(Pe, {
3028
+ modelValue: a.value,
3029
+ "onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
3030
+ minimal: ""
3031
+ }, {
3032
+ trigger: U(({ toggle: u }) => [
3033
+ n("button", {
3034
+ class: "g-user-menu__avatar",
3035
+ style: ve({ backgroundColor: e.color }),
3036
+ "aria-label": e.initials + " - " + e.label,
3037
+ "aria-expanded": a.value,
3038
+ "aria-haspopup": "menu",
3039
+ onClick: u
3040
+ }, _(e.initials), 13, ms)
3041
+ ]),
3042
+ default: U(() => [
3043
+ n("div", bs, [
3044
+ n("h2", {
3045
+ id: t,
3046
+ ref_key: "emailHeading",
3047
+ ref: o,
3048
+ class: "g-user-menu__email",
3049
+ tabindex: "-1"
3050
+ }, _(e.email), 513),
3051
+ n("nav", {
3052
+ class: "g-user-menu__nav",
3053
+ "aria-labelledby": t
3054
+ }, [
3055
+ n("ul", ps, [
3056
+ (i(!0), f(D, null, Z(d.default(), (u, g) => (i(), f("li", { key: g }, [
3057
+ (i(), N(se(u)))
3058
+ ]))), 128))
3059
+ ])
3060
+ ])
3061
+ ])
3062
+ ]),
3063
+ _: 1
3064
+ }, 8, ["modelValue"])
3065
+ ]));
3066
+ }
3067
+ }), un = /* @__PURE__ */ G(ys, [["__scopeId", "data-v-63bcc080"]]), ks = {}, _s = /* @__PURE__ */ T({
3068
+ ...ks,
3069
+ __name: "GCurrencyInput",
3070
+ props: /* @__PURE__ */ H({
3071
+ label: { default: void 0 },
3072
+ placeholder: { default: "" },
3073
+ disabled: { type: Boolean, default: !1 },
3074
+ errors: { default: () => [] },
3075
+ instructions: { default: "" },
3076
+ name: { default: void 0 }
3077
+ }, {
3078
+ modelValue: { type: String },
3079
+ modelModifiers: {}
3080
+ }),
3081
+ emits: ["update:modelValue"],
3082
+ setup(e) {
3083
+ const l = e, t = q(e, "modelValue");
3084
+ return (a, o) => (i(), N(Ge, ae({
3085
+ modelValue: t.value,
3086
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
3087
+ name: l.name,
3088
+ label: l.label,
3089
+ placeholder: l.placeholder,
3090
+ disabled: l.disabled,
3091
+ errors: l.errors,
3092
+ instructions: l.instructions,
3093
+ prefix: "$",
3094
+ type: "number",
3095
+ step: "0.01",
3096
+ min: "0"
3097
+ }, a.$attrs), null, 16, ["modelValue", "name", "label", "placeholder", "disabled", "errors", "instructions"]));
3098
+ }
3099
+ }), dn = /* @__PURE__ */ G(_s, [["__scopeId", "data-v-5b5133d7"]]), ws = {}, $s = /* @__PURE__ */ T({
3100
+ ...ws,
3101
+ __name: "GEmailInput",
3102
+ props: /* @__PURE__ */ H({
3103
+ label: { default: void 0 },
3104
+ placeholder: { default: "" },
3105
+ disabled: { type: Boolean, default: !1 },
3106
+ errors: { default: () => [] },
3107
+ instructions: { default: "" },
3108
+ name: { default: void 0 }
3109
+ }, {
3110
+ modelValue: { type: String },
3111
+ modelModifiers: {}
3112
+ }),
3113
+ emits: ["update:modelValue"],
3114
+ setup(e) {
3115
+ const l = q(e, "modelValue");
3116
+ return (t, a) => (i(), N(Ge, ae({
3117
+ modelValue: l.value,
3118
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => l.value = o),
3119
+ name: e.name,
3120
+ label: e.label,
3121
+ placeholder: e.placeholder,
3122
+ disabled: e.disabled,
3123
+ errors: e.errors,
3124
+ instructions: e.instructions,
3125
+ type: "email"
3126
+ }, t.$attrs), null, 16, ["modelValue", "name", "label", "placeholder", "disabled", "errors", "instructions"]));
3127
+ }
3128
+ }), cn = /* @__PURE__ */ G($s, [["__scopeId", "data-v-6873e4b7"]]), Cs = {}, xs = /* @__PURE__ */ T({
3129
+ ...Cs,
3130
+ __name: "GDateInput",
3131
+ props: /* @__PURE__ */ H({
3132
+ label: { default: void 0 },
3133
+ placeholder: { default: "" },
3134
+ disabled: { type: Boolean, default: !1 },
3135
+ errors: { default: () => [] },
3136
+ instructions: { default: "" },
3137
+ name: { default: void 0 }
3138
+ }, {
3139
+ modelValue: { type: String },
3140
+ modelModifiers: {}
3141
+ }),
3142
+ emits: ["update:modelValue"],
3143
+ setup(e) {
3144
+ const l = e, t = q(e, "modelValue");
3145
+ return (a, o) => (i(), N(Ge, ae({
3146
+ modelValue: t.value,
3147
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
3148
+ name: l.name,
3149
+ label: l.label,
3150
+ placeholder: l.placeholder,
3151
+ disabled: l.disabled,
3152
+ errors: l.errors,
3153
+ instructions: l.instructions,
3154
+ type: "date"
3155
+ }, a.$attrs), null, 16, ["modelValue", "name", "label", "placeholder", "disabled", "errors", "instructions"]));
3156
+ }
3157
+ }), We = /* @__PURE__ */ G(xs, [["__scopeId", "data-v-ce786dcc"]]), Ls = { class: "g-date-range-input" }, Ss = {
3158
+ key: 0,
3159
+ class: "g-date-range-input__label"
3160
+ }, Is = {
3161
+ key: 1,
3162
+ class: "g-date-range-input__instructions"
3163
+ }, Es = { class: "g-date-range-input__fields" }, Ms = {
3164
+ key: 2,
3165
+ class: "g-date-range-input__errors",
3166
+ role: "alert"
3167
+ }, Bs = {}, Vs = /* @__PURE__ */ T({
3168
+ ...Bs,
3169
+ __name: "GDateRangeInput",
3170
+ props: /* @__PURE__ */ H({
3171
+ label: { default: void 0 },
3172
+ startLabel: { default: "Start Date" },
3173
+ endLabel: { default: "End Date" },
3174
+ disabled: { type: Boolean, default: !1 },
3175
+ errors: { default: () => [] },
3176
+ instructions: { default: "" },
3177
+ name: { default: void 0 }
3178
+ }, {
3179
+ modelValue: {
3180
+ default: () => ({ start: null, end: null })
3181
+ },
3182
+ modelModifiers: {}
3183
+ }),
3184
+ emits: ["update:modelValue"],
3185
+ setup(e) {
3186
+ const l = e, t = q(e, "modelValue"), a = M(t.value.start || null), o = M(t.value.end || null), { displayErrors: r } = xe({
3187
+ name: l.name,
3188
+ value: t,
3189
+ errors: $e(l, "errors")
3190
+ });
3191
+ return Q([a, o], () => {
3192
+ t.value = {
3193
+ start: a.value,
3194
+ end: o.value
3195
+ };
3196
+ }), Q(
3197
+ t,
3198
+ (d) => {
3199
+ d.start !== a.value && (a.value = d.start), d.end !== o.value && (o.value = d.end);
3200
+ },
3201
+ { deep: !0 }
3202
+ ), (d, c) => (i(), f("div", Ls, [
3203
+ l.label ? (i(), f("div", Ss, _(l.label), 1)) : E("", !0),
3204
+ l.instructions ? (i(), f("div", Is, _(l.instructions), 1)) : E("", !0),
3205
+ n("div", Es, [
3206
+ W(We, {
3207
+ modelValue: a.value,
3208
+ "onUpdate:modelValue": c[0] || (c[0] = (s) => a.value = s),
3209
+ label: l.startLabel,
3210
+ disabled: l.disabled,
3211
+ class: "g-date-range-input__field"
3212
+ }, null, 8, ["modelValue", "label", "disabled"]),
3213
+ W(We, {
3214
+ modelValue: o.value,
3215
+ "onUpdate:modelValue": c[1] || (c[1] = (s) => o.value = s),
3216
+ label: l.endLabel,
3217
+ disabled: l.disabled,
3218
+ class: "g-date-range-input__field"
3219
+ }, null, 8, ["modelValue", "label", "disabled"])
3220
+ ]),
3221
+ m(r).length > 0 ? (i(), f("div", Ms, [
3222
+ (i(!0), f(D, null, Z(m(r), (s, u) => (i(), f("div", {
3223
+ key: u,
3224
+ class: "g-date-range-input__error"
3225
+ }, _(s), 1))), 128))
3226
+ ])) : E("", !0)
3227
+ ]));
3228
+ }
3229
+ }), fn = /* @__PURE__ */ G(Vs, [["__scopeId", "data-v-3d32594b"]]);
3230
+ function Ts() {
3231
+ const e = ut({}), l = M(!1), t = S(() => {
3232
+ const s = {};
3233
+ return Object.entries(e).forEach(([u, g]) => {
3234
+ g && g.value && (s[u] = g.value.value);
3235
+ }), s;
3236
+ }), a = S(() => {
3237
+ const s = {};
3238
+ return Object.entries(e).forEach(([u, g]) => {
3239
+ const p = g.errors.value;
3240
+ p && p.length > 0 && (s[u] = p);
3241
+ }), s;
3242
+ }), o = S(() => Object.keys(a.value).length > 0);
3243
+ function r(s, u) {
3244
+ e[s] = u;
3245
+ }
3246
+ function d(s) {
3247
+ delete e[s];
3248
+ }
3249
+ async function c(s) {
3250
+ if (!l.value) {
3251
+ l.value = !0;
3252
+ try {
3253
+ await s(t.value);
3254
+ } finally {
3255
+ l.value = !1;
3256
+ }
3257
+ }
3258
+ }
3259
+ return {
3260
+ fields: e,
3261
+ values: t,
3262
+ errors: a,
3263
+ isSubmitting: l,
3264
+ hasErrors: o,
3265
+ registerField: r,
3266
+ unregisterField: d,
3267
+ submit: c
3268
+ };
3269
+ }
3270
+ const As = ["action", "method"], Gs = {}, Os = /* @__PURE__ */ T({
3271
+ ...Gs,
3272
+ __name: "GForm",
3273
+ props: /* @__PURE__ */ H({
3274
+ action: { default: void 0 },
3275
+ method: { default: "post" }
3276
+ }, {
3277
+ modelValue: { default: () => ({}) },
3278
+ modelModifiers: {}
3279
+ }),
3280
+ emits: /* @__PURE__ */ H(["submit"], ["update:modelValue"]),
3281
+ setup(e, { emit: l }) {
3282
+ const t = e, a = q(e, "modelValue"), o = l, r = be("form", null), d = r || Ts();
3283
+ r || dt("form", d), Q(
3284
+ () => d.values.value,
3285
+ (s) => {
3286
+ a.value = { ...s };
3287
+ },
3288
+ { deep: !0 }
3289
+ ), Q(
3290
+ () => a.value,
3291
+ (s) => {
3292
+ s && Object.entries(s).forEach(([u, g]) => {
3293
+ const p = d.fields[u];
3294
+ p && p.value.value !== g && (p.value.value = g);
3295
+ });
3296
+ },
3297
+ { deep: !0, immediate: !0 }
3298
+ );
3299
+ async function c(s) {
3300
+ s.preventDefault(), await d.submit(async (u) => {
3301
+ o("submit", u);
3302
+ });
3303
+ }
3304
+ return (s, u) => (i(), f("form", {
3305
+ onSubmit: c,
3306
+ action: t.action,
3307
+ method: t.method,
3308
+ class: "g-form",
3309
+ novalidate: ""
3310
+ }, [
3311
+ F(s.$slots, "default", {
3312
+ isSubmitting: m(d).isSubmitting.value,
3313
+ hasErrors: m(d).hasErrors.value,
3314
+ values: m(d).values.value,
3315
+ errors: m(d).errors.value
3316
+ }, void 0, !0)
3317
+ ], 40, As));
3318
+ }
3319
+ }), vn = /* @__PURE__ */ G(Os, [["__scopeId", "data-v-29e80182"]]), zs = {}, Ds = /* @__PURE__ */ T({
3320
+ ...zs,
3321
+ __name: "GSubmitButton",
3322
+ props: {
3323
+ disabled: { type: Boolean, default: !1 },
3324
+ loadingText: { default: "Submitting..." },
3325
+ variant: { default: "primary" }
3326
+ },
3327
+ setup(e) {
3328
+ const l = e, t = be("form", null), a = S(() => l.disabled || (t?.isSubmitting.value ?? !1)), o = S(() => t?.isSubmitting.value ?? !1);
3329
+ return (r, d) => (i(), N(ne, {
3330
+ type: "submit",
3331
+ disabled: a.value,
3332
+ variant: l.variant,
3333
+ class: "g-submit-button"
3334
+ }, {
3335
+ default: U(() => [
3336
+ o.value ? (i(), f(D, { key: 0 }, [
3337
+ j(_(l.loadingText), 1)
3338
+ ], 64)) : F(r.$slots, "default", { key: 1 }, () => [
3339
+ d[0] || (d[0] = j("Submit", -1))
3340
+ ], !0)
3341
+ ]),
3342
+ _: 3
3343
+ }, 8, ["disabled", "variant"]));
3344
+ }
3345
+ }), gn = /* @__PURE__ */ G(Ds, [["__scopeId", "data-v-231894ab"]]);
3346
+ export {
3347
+ Ge as A,
3348
+ Ys as B,
3349
+ Hs as C,
3350
+ un as D,
3351
+ Xs as E,
3352
+ Je as F,
3353
+ Ks as G,
3354
+ qe as H,
3355
+ Js as I,
3356
+ Qs as J,
3357
+ Qa as K,
3358
+ Xa as L,
3359
+ Ts as M,
3360
+ xe as N,
3361
+ De as O,
3362
+ ze as P,
3363
+ Le as Q,
3364
+ qt as R,
3365
+ ua as V,
3366
+ ne as _,
3367
+ js as a,
3368
+ Ws as b,
3369
+ dn as c,
3370
+ We as d,
3371
+ fn as e,
3372
+ on as f,
3373
+ sn as g,
3374
+ cn as h,
3375
+ vn as i,
3376
+ an as j,
3377
+ Zs as k,
3378
+ ln as l,
3379
+ nn as m,
3380
+ Pe as n,
3381
+ bl as o,
3382
+ Us as p,
3383
+ et as q,
3384
+ ul as r,
3385
+ Ns as s,
3386
+ qs as t,
3387
+ gn as u,
3388
+ en as v,
3389
+ Ya as w,
3390
+ tn as x,
3391
+ rn as y,
3392
+ is as z
3393
+ };
3394
+ //# sourceMappingURL=main-D8BC78tE.js.map