@illinois-grad/grad-vue 2.2.0 → 2.3.1

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