@wishbone-media/spark 0.15.1 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { computed as k, resolveComponent as $, createElementBlock as g, openBlock as f, normalizeClass as _, createElementVNode as c, createVNode as b, unref as y, renderSlot as T, reactive as z, Fragment as M, renderList as B, createCommentVNode as x, toDisplayString as S, createBlock as V, resolveDynamicComponent as W, ref as L, inject as ge, provide as Ve, markRaw as he, withCtx as w, mergeProps as Y, toHandlers as ye, createTextVNode as P, withModifiers as j, useSlots as be, watch as E, onMounted as ve, h as le } from "vue";
1
+ import { computed as k, resolveComponent as L, createElementBlock as g, openBlock as f, normalizeClass as _, createElementVNode as c, createVNode as b, unref as y, renderSlot as T, reactive as z, Fragment as M, renderList as B, createCommentVNode as x, toDisplayString as S, createBlock as V, resolveDynamicComponent as W, ref as $, inject as ge, provide as Ve, markRaw as he, withCtx as w, mergeProps as Y, toHandlers as ye, createTextVNode as P, withModifiers as j, useSlots as be, watch as E, onMounted as ve, h as le } from "vue";
2
2
  import { library as xe, icon as ee } from "@fortawesome/fontawesome-svg-core";
3
3
  import { FontAwesomeIcon as Pe } from "@fortawesome/vue-fontawesome";
4
4
  import { faUndo as Re, faEye as Me, faSignOut as Fe, faXmark as Ae, faTrash as Be, faTimes as Ee, faStreetView as ze, faSortUp as je, faSortDown as Oe, faSort as Ie, faScaleBalanced as Ne, faSatelliteDish as De, faLayerPlus as Ze, faLaptopMobile as qe, faInfoCircle as Ge, faGripDotsVertical as Ke, faGearComplex as Ue, faFlag as We, faFaceSmileWink as Ye, faFaceSmileRelaxed as Xe, faExclamationTriangle as Je, faEllipsisVertical as Qe, faEllipsis as et, faEdit as tt, faComments as st, faCircleXmark as at, faCircleUser as ot, faChevronUp as rt, faChevronRight as nt, faChevronLeft as lt, faChevronDown as it, faCheckCircle as ct, faCheck as dt, faBullhorn as ut, faBellRing as pt, faBarsSort as ft, faArrowRightToLine as mt, faArrowLeftToLine as gt } from "@fortawesome/pro-regular-svg-icons";
@@ -87,35 +87,35 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
87
87
  warning: "farExclamationTriangle",
88
88
  danger: "farCircleXmark",
89
89
  info: "farInfoCircle"
90
- })[s.type]), o = k(() => ({
90
+ })[s.type]), r = k(() => ({
91
91
  success: "text-green-400 hover:bg-green-100",
92
92
  warning: "text-yellow-400 hover:bg-yellow-100",
93
93
  danger: "text-red-400 hover:bg-red-100",
94
94
  info: "text-blue-400 hover:bg-blue-100"
95
95
  })[s.type]);
96
- return (n, i) => {
97
- const r = $("font-awesome-icon");
96
+ return (o, i) => {
97
+ const n = L("font-awesome-icon");
98
98
  return f(), g("div", {
99
99
  class: _(["rounded-md border p-4", t.value])
100
100
  }, [
101
101
  c("div", Lt, [
102
102
  c("div", Ht, [
103
- b(r, {
103
+ b(n, {
104
104
  icon: y(H)[l.value],
105
105
  class: _(a.value)
106
106
  }, null, 8, ["icon", "class"])
107
107
  ]),
108
108
  c("div", Tt, [
109
- T(n.$slots, "default")
109
+ T(o.$slots, "default")
110
110
  ]),
111
111
  c("div", Vt, [
112
112
  c("div", Pt, [
113
113
  c("button", {
114
114
  type: "button",
115
- class: _(["inline-flex rounded-md px-2 py-1.5", o.value]),
116
- onClick: i[0] || (i[0] = (d) => n.$emit("close"))
115
+ class: _(["inline-flex rounded-md px-2 py-1.5", r.value]),
116
+ onClick: i[0] || (i[0] = (d) => o.$emit("close"))
117
117
  }, [
118
- b(r, {
118
+ b(n, {
119
119
  icon: y(H).farXmark
120
120
  }, null, 8, ["icon"])
121
121
  ], 2)
@@ -171,13 +171,13 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
171
171
  ], Se = X("sparkAppSelector", () => {
172
172
  const e = z({
173
173
  apps: [...oe]
174
- }), s = (o = {}) => {
175
- if (o.apps && Array.isArray(o.apps)) {
176
- const n = o.apps.filter((i) => {
177
- const r = i.name && i.description && i.icon && i.href;
178
- return r || console.warn("useSparkAppSelectorStore: Invalid app object", i), r;
174
+ }), s = (r = {}) => {
175
+ if (r.apps && Array.isArray(r.apps)) {
176
+ const o = r.apps.filter((i) => {
177
+ const n = i.name && i.description && i.icon && i.href;
178
+ return n || console.warn("useSparkAppSelectorStore: Invalid app object", i), n;
179
179
  });
180
- e.apps = n.map((i) => ({
180
+ e.apps = o.map((i) => ({
181
181
  name: i.name,
182
182
  description: i.description,
183
183
  icon: i.icon,
@@ -185,33 +185,33 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
185
185
  }));
186
186
  return;
187
187
  }
188
- if (o.appHrefs && typeof o.appHrefs == "object") {
189
- const n = /* @__PURE__ */ new Map();
190
- Object.keys(o.appHrefs).forEach((i) => {
191
- n.set(i.toLowerCase(), o.appHrefs[i]);
188
+ if (r.appHrefs && typeof r.appHrefs == "object") {
189
+ const o = /* @__PURE__ */ new Map();
190
+ Object.keys(r.appHrefs).forEach((i) => {
191
+ o.set(i.toLowerCase(), r.appHrefs[i]);
192
192
  }), e.apps = oe.map((i) => {
193
- const r = n.get(i.name.toLowerCase());
193
+ const n = o.get(i.name.toLowerCase());
194
194
  return {
195
195
  ...i,
196
- href: r || i.href
196
+ href: n || i.href
197
197
  };
198
198
  });
199
199
  return;
200
200
  }
201
201
  e.apps = [...oe];
202
- }, t = k(() => e.apps), a = (o) => {
203
- if (!o) return null;
204
- const n = o.toLowerCase();
205
- return e.apps.find((i) => i.name.toLowerCase() === n) || null;
202
+ }, t = k(() => e.apps), a = (r) => {
203
+ if (!r) return null;
204
+ const o = r.toLowerCase();
205
+ return e.apps.find((i) => i.name.toLowerCase() === o) || null;
206
206
  };
207
207
  return {
208
208
  state: e,
209
209
  initialize: s,
210
210
  allApps: t,
211
211
  getAppByName: a,
212
- getAppIcon: (o) => {
213
- const n = a(o);
214
- return n ? n.icon : "";
212
+ getAppIcon: (r) => {
213
+ const o = a(r);
214
+ return o ? o.icon : "";
215
215
  }
216
216
  };
217
217
  }), $e = X("sparkApp", () => {
@@ -250,36 +250,36 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
250
250
  },
251
251
  emits: ["close", "select"],
252
252
  setup(e, { emit: s }) {
253
- const t = s, a = Se(), l = $e(), o = k(() => {
253
+ const t = s, a = Se(), l = $e(), r = k(() => {
254
254
  const i = l.state.app;
255
- return a.state.apps.map((r) => ({
256
- ...r,
257
- current: i && r.name.toLowerCase() === i.toLowerCase()
255
+ return a.state.apps.map((n) => ({
256
+ ...n,
257
+ current: i && n.name.toLowerCase() === i.toLowerCase()
258
258
  }));
259
- }), n = (i, r) => {
259
+ }), o = (i, n) => {
260
260
  t("select", i);
261
261
  };
262
- return (i, r) => {
263
- const d = $("font-awesome-icon");
262
+ return (i, n) => {
263
+ const d = L("font-awesome-icon");
264
264
  return f(), g("div", Rt, [
265
265
  c("div", Mt, [
266
266
  c("div", Ft, [
267
267
  c("div", At, [
268
- r[1] || (r[1] = c("div", null, "Mr Group Network", -1)),
268
+ n[1] || (n[1] = c("div", null, "Mr Group Network", -1)),
269
269
  c("div", Bt, [
270
270
  b(d, {
271
271
  icon: y(H).farTimes,
272
272
  class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
273
- onClick: r[0] || (r[0] = (m) => t("close"))
273
+ onClick: n[0] || (n[0] = (m) => t("close"))
274
274
  }, null, 8, ["icon"])
275
275
  ])
276
276
  ]),
277
- (f(!0), g(M, null, B(o.value, (m) => (f(), g("a", {
277
+ (f(!0), g(M, null, B(r.value, (m) => (f(), g("a", {
278
278
  key: m.name,
279
279
  href: m.href,
280
280
  target: "_blank",
281
281
  class: _([m.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
282
- onClick: (u) => m.current ? u.preventDefault() : n(m)
282
+ onClick: (u) => m.current ? u.preventDefault() : o(m)
283
283
  }, [
284
284
  c("div", zt, [
285
285
  c("div", jt, [
@@ -295,7 +295,7 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
295
295
  }, null, 8, ["class", "icon"])
296
296
  ])
297
297
  ], 10, Et))), 128)),
298
- r[2] || (r[2] = c("div", null, null, -1))
298
+ n[2] || (n[2] = c("div", null, null, -1))
299
299
  ]),
300
300
  c("div", Zt, [
301
301
  i.$slots.bottom || e.bottomSlot ? (f(), g("div", qt, [
@@ -318,36 +318,36 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
318
318
  () => {
319
319
  const e = z({
320
320
  brands: []
321
- }), s = (o = {}) => {
322
- if (!o.brands || !Array.isArray(o.brands)) {
321
+ }), s = (r = {}) => {
322
+ if (!r.brands || !Array.isArray(r.brands)) {
323
323
  console.warn("useSparkBrandFilterStore: No brands provided to initialize()"), e.brands = [];
324
324
  return;
325
325
  }
326
- const n = o.brands.filter((r) => {
327
- const d = r.id && r.name && r.logo;
328
- return d || console.warn("useSparkBrandFilterStore: Invalid brand object", r), d;
329
- }), i = n.filter((r) => r.current);
330
- i.length === 0 && n.length > 0 ? n[0].current = !0 : i.length > 1 && n.forEach((r) => {
331
- r.current = r === i[0];
332
- }), e.brands = n.map((r) => ({
333
- id: r.id,
334
- name: r.name,
335
- logo: r.logo,
336
- current: r.current || !1
326
+ const o = r.brands.filter((n) => {
327
+ const d = n.id && n.name && n.logo;
328
+ return d || console.warn("useSparkBrandFilterStore: Invalid brand object", n), d;
329
+ }), i = o.filter((n) => n.current);
330
+ i.length === 0 && o.length > 0 ? o[0].current = !0 : i.length > 1 && o.forEach((n) => {
331
+ n.current = n === i[0];
332
+ }), e.brands = o.map((n) => ({
333
+ id: n.id,
334
+ name: n.name,
335
+ logo: n.logo,
336
+ current: n.current || !1
337
337
  }));
338
- }, t = k(() => e.brands.find((o) => o.current) || null), a = k(() => e.brands);
338
+ }, t = k(() => e.brands.find((r) => r.current) || null), a = k(() => e.brands);
339
339
  return {
340
340
  state: e,
341
341
  initialize: s,
342
342
  currentBrand: t,
343
343
  allBrands: a,
344
- toggleBrand: (o) => {
345
- if (!o || !e.brands.includes(o)) {
344
+ toggleBrand: (r) => {
345
+ if (!r || !e.brands.includes(r)) {
346
346
  console.warn("useSparkBrandFilterStore: Invalid brand provided to toggleBrand()");
347
347
  return;
348
348
  }
349
- e.brands.forEach((n) => {
350
- n.current = n === o;
349
+ e.brands.forEach((o) => {
350
+ o.current = o === r;
351
351
  });
352
352
  }
353
353
  };
@@ -367,50 +367,50 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
367
367
  __name: "SparkBrandSelector",
368
368
  emits: ["close", "select"],
369
369
  setup(e, { emit: s }) {
370
- const t = s, a = Le(), l = (o) => {
371
- t("select", o);
370
+ const t = s, a = Le(), l = (r) => {
371
+ t("select", r);
372
372
  };
373
- return (o, n) => {
374
- const i = $("font-awesome-icon");
373
+ return (r, o) => {
374
+ const i = L("font-awesome-icon");
375
375
  return f(), g("div", Ut, [
376
376
  c("div", Wt, [
377
377
  c("div", Yt, [
378
378
  c("div", Xt, [
379
- n[1] || (n[1] = c("div", null, "Filter by Brand", -1)),
379
+ o[1] || (o[1] = c("div", null, "Filter by Brand", -1)),
380
380
  c("div", Jt, [
381
381
  b(i, {
382
382
  icon: y(H).farTimes,
383
383
  class: "size-4 text-gray-400 cursor-pointer",
384
- onClick: n[0] || (n[0] = (r) => t("close"))
384
+ onClick: o[0] || (o[0] = (n) => t("close"))
385
385
  }, null, 8, ["icon"])
386
386
  ])
387
387
  ]),
388
388
  y(a).allBrands.length === 0 ? (f(), g("div", Qt, " No brands configured ")) : x("", !0),
389
- (f(!0), g(M, null, B(y(a).allBrands, (r) => (f(), g("div", {
390
- key: r.id,
391
- class: _([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
392
- onClick: (d) => l(r)
389
+ (f(!0), g(M, null, B(y(a).allBrands, (n) => (f(), g("div", {
390
+ key: n.id,
391
+ class: _([n.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
392
+ onClick: (d) => l(n)
393
393
  }, [
394
394
  c("div", ts, [
395
395
  c("div", ss, [
396
396
  c("img", {
397
- src: r.logo,
398
- alt: `${r.name} logo`,
397
+ src: n.logo,
398
+ alt: `${n.name} logo`,
399
399
  class: "h-8 w-auto"
400
400
  }, null, 8, as)
401
401
  ]),
402
402
  c("div", os, [
403
403
  c("div", rs, [
404
- c("div", ns, S(r.name), 1),
405
- r.current ? (f(), g("span", ls, " Current ")) : x("", !0)
404
+ c("div", ns, S(n.name), 1),
405
+ n.current ? (f(), g("span", ls, " Current ")) : x("", !0)
406
406
  ]),
407
- c("div", is, S(r.current ? "Current Brand" : "Change to"), 1)
407
+ c("div", is, S(n.current ? "Current Brand" : "Change to"), 1)
408
408
  ])
409
409
  ])
410
410
  ], 10, es))), 128)),
411
- n[2] || (n[2] = c("div", null, null, -1))
411
+ o[2] || (o[2] = c("div", null, null, -1))
412
412
  ]),
413
- n[3] || (n[3] = c("div", { class: "mt-auto" }, null, -1))
413
+ o[3] || (o[3] = c("div", { class: "mt-auto" }, null, -1))
414
414
  ])
415
415
  ]);
416
416
  };
@@ -437,16 +437,16 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
437
437
  }
438
438
  },
439
439
  setup(e) {
440
- const s = e, t = L(null), a = ge("buttonGroup", null), l = k(() => {
440
+ const s = e, t = $(null), a = ge("buttonGroup", null), l = k(() => {
441
441
  if (!a?.isInGroup || !t.value) return null;
442
- const r = a.getButtonIndex(t.value), d = a.getButtonCount();
442
+ const n = a.getButtonIndex(t.value), d = a.getButtonCount();
443
443
  return {
444
- isFirst: r === 0,
445
- isLast: r === d - 1,
446
- index: r,
444
+ isFirst: n === 0,
445
+ isLast: n === d - 1,
446
+ index: n,
447
447
  total: d
448
448
  };
449
- }), o = {
449
+ }), r = {
450
450
  paddingX: /^px-/,
451
451
  paddingY: /^py-/,
452
452
  paddingAll: /^p-/,
@@ -456,85 +456,85 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
456
456
  borderRadius: /^rounded-/,
457
457
  background: /^bg-/,
458
458
  text: /^text-(?!white|black)/
459
- }, n = (r, d) => {
460
- if (!d) return r;
461
- const m = r.split(" ").filter(Boolean), u = d.split(" ").filter(Boolean);
459
+ }, o = (n, d) => {
460
+ if (!d) return n;
461
+ const m = n.split(" ").filter(Boolean), u = d.split(" ").filter(Boolean);
462
462
  return [...m.filter((h) => !u.some((v) => {
463
- const N = Object.entries(o).find(
463
+ const N = Object.entries(r).find(
464
464
  ([R, J]) => J.test(h)
465
- )?.[0], C = Object.entries(o).find(
465
+ )?.[0], C = Object.entries(r).find(
466
466
  ([R, J]) => J.test(v)
467
467
  )?.[0];
468
468
  return N && N === C;
469
469
  })), ...u].join(" ");
470
470
  }, i = k(() => {
471
- let r = "", d = "";
471
+ let n = "", d = "";
472
472
  switch (s.size) {
473
473
  case "xs":
474
- r += " px-2 py-1 text-xs", d = "sm";
474
+ n += " px-2 py-1 text-xs", d = "sm";
475
475
  break;
476
476
  case "sm":
477
- r += " px-2 py-1 text-sm", d = "sm";
477
+ n += " px-2 py-1 text-sm", d = "sm";
478
478
  break;
479
479
  case "md":
480
- r += " px-2.5 py-1.5 text-sm", d = "md";
480
+ n += " px-2.5 py-1.5 text-sm", d = "md";
481
481
  break;
482
482
  case "lg":
483
- r += " px-3 py-2 text-sm", d = "md";
483
+ n += " px-3 py-2 text-sm", d = "md";
484
484
  break;
485
485
  case "xl":
486
- r += " px-3.5 py-2.5 min-h-[42px] text-sm", d = "md";
486
+ n += " px-3.5 py-2.5 min-h-[42px] text-sm", d = "md";
487
487
  break;
488
488
  }
489
489
  if (a?.isInGroup && l.value) {
490
490
  const { isFirst: m, isLast: u } = l.value;
491
- r += " relative inline-flex items-center focus:z-10", m && u ? r += ` rounded-${d}` : m ? r += ` rounded-l-${d} rounded-r-none` : u ? r += ` rounded-r-${d} rounded-l-none -ml-px` : r += " rounded-none -ml-px";
491
+ n += " relative inline-flex items-center focus:z-10", m && u ? n += ` rounded-${d}` : m ? n += ` rounded-l-${d} rounded-r-none` : u ? n += ` rounded-r-${d} rounded-l-none -ml-px` : n += " rounded-none -ml-px";
492
492
  } else
493
- r += ` shadow-xs rounded-${d}`;
493
+ n += ` shadow-xs rounded-${d}`;
494
494
  switch (s.variant) {
495
495
  case "primary":
496
- r += " bg-primary-600 hover:bg-primary-500 text-white";
496
+ n += " bg-primary-600 hover:bg-primary-500 text-white";
497
497
  break;
498
498
  case "secondary":
499
- r += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
499
+ n += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
500
500
  break;
501
501
  case "success":
502
- r += " bg-green-600 hover:bg-green-500 text-white";
502
+ n += " bg-green-600 hover:bg-green-500 text-white";
503
503
  break;
504
504
  case "warning":
505
- r += " bg-amber-600 hover:bg-amber-500 text-white";
505
+ n += " bg-amber-600 hover:bg-amber-500 text-white";
506
506
  break;
507
507
  case "danger":
508
- r += " bg-red-600 hover:bg-red-500 text-white";
508
+ n += " bg-red-600 hover:bg-red-500 text-white";
509
509
  break;
510
510
  case "info":
511
- r += " bg-cyan-600 hover:bg-cyan-500 text-white";
511
+ n += " bg-cyan-600 hover:bg-cyan-500 text-white";
512
512
  break;
513
513
  default:
514
- r += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
514
+ n += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
515
515
  }
516
- return r = n(r, s.buttonClass), r;
516
+ return n = o(n, s.buttonClass), n;
517
517
  });
518
- return (r, d) => (f(), g("button", {
518
+ return (n, d) => (f(), g("button", {
519
519
  type: "button",
520
520
  ref_key: "buttonRef",
521
521
  ref: t,
522
522
  class: _(i.value),
523
523
  disabled: e.disabled,
524
- onClick: d[0] || (d[0] = (m) => r.$emit("click"))
524
+ onClick: d[0] || (d[0] = (m) => n.$emit("click"))
525
525
  }, [
526
- T(r.$slots, "default")
526
+ T(n.$slots, "default")
527
527
  ], 10, ds));
528
528
  }
529
529
  }, us = {
530
530
  __name: "SparkButtonGroup",
531
531
  setup(e) {
532
- const s = L(null);
532
+ const s = $(null);
533
533
  return Ve("buttonGroup", {
534
534
  isInGroup: !0,
535
535
  getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
536
536
  getButtonCount: () => s.value?.children.length || 0
537
- }), (l, o) => (f(), g("div", {
537
+ }), (l, r) => (f(), g("div", {
538
538
  class: "inline-flex rounded-md shadow-xs",
539
539
  ref_key: "groupRef",
540
540
  ref: s
@@ -719,7 +719,7 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
719
719
  success: "farCheckCircle",
720
720
  warning: "farExclamationTriangle",
721
721
  danger: "farCircleXmark"
722
- }, o = k(() => s.icon || l[s.type]), n = k(() => ({
722
+ }, r = k(() => s.icon || l[s.type]), o = k(() => ({
723
723
  info: "bg-blue-100",
724
724
  success: "bg-green-100",
725
725
  warning: "bg-yellow-100",
@@ -730,20 +730,20 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
730
730
  warning: "text-yellow-400",
731
731
  danger: "text-red-400"
732
732
  })[s.type]);
733
- return (r, d) => {
734
- const m = $("font-awesome-icon");
733
+ return (n, d) => {
734
+ const m = L("font-awesome-icon");
735
735
  return f(), g("div", vs, [
736
- o.value ? (f(), g("div", {
736
+ r.value ? (f(), g("div", {
737
737
  key: 0,
738
- class: _(["mx-auto flex size-12 items-center justify-center rounded-full", n.value])
738
+ class: _(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
739
739
  }, [
740
740
  b(m, {
741
- icon: y(H)[o.value],
741
+ icon: y(H)[r.value],
742
742
  class: _(["h-5 w-5", i.value])
743
743
  }, null, 8, ["icon", "class"])
744
744
  ], 2)) : x("", !0),
745
745
  c("div", {
746
- class: _(["text-center", { "mt-3 sm:mt-5": o.value }])
746
+ class: _(["text-center", { "mt-3 sm:mt-5": r.value }])
747
747
  }, [
748
748
  e.title ? (f(), g("h3", xs, S(e.title), 1)) : x("", !0),
749
749
  e.message ? (f(), g("div", {
@@ -757,7 +757,7 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
757
757
  (f(!0), g(M, null, B(t.value, (u, p) => (f(), V(y(A), {
758
758
  key: p,
759
759
  variant: u.variant,
760
- onClick: (h) => r.$emit(u.event, u)
760
+ onClick: (h) => n.$emit(u.event, u)
761
761
  }, {
762
762
  default: w(() => [
763
763
  P(S(u.text), 1)
@@ -783,10 +783,10 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
783
783
  },
784
784
  emits: ["close"],
785
785
  setup(e, { emit: s }) {
786
- const t = L(null), a = e, l = s, o = () => {
786
+ const t = $(null), a = e, l = s, r = () => {
787
787
  a.overlayInstance.close(), l("close");
788
788
  };
789
- return (n, i) => (f(), V(y(ke), {
789
+ return (o, i) => (f(), V(y(ke), {
790
790
  show: e.overlayInstance.state.isVisible,
791
791
  as: "template"
792
792
  }, {
@@ -794,7 +794,7 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
794
794
  b(y(_e), {
795
795
  initialFocus: t.value,
796
796
  class: "relative z-200",
797
- onClose: o
797
+ onClose: r
798
798
  }, {
799
799
  default: w(() => [
800
800
  b(y(te), {
@@ -858,10 +858,10 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
858
858
  return;
859
859
  const l = document.createElement("span");
860
860
  l.classList.add("spark-table-head-sorting"), l.innerHTML = ee({ prefix: "far", iconName: "sort" }).html + ee({ prefix: "far", iconName: "sort-up" }).html + ee({ prefix: "far", iconName: "sort-down" }).html, a.appendChild(l), a.addEventListener("click", async () => {
861
- const o = t.params.sort;
862
- return o === e ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
861
+ const r = t.params.sort;
862
+ return r === e ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
863
863
  sort: `-${e}`
864
- })) : o === `-${e}` ? (a.classList.remove("desc"), await t.methods.removeParam("sort")) : (a.classList.add("asc"), t.methods.applyParams({
864
+ })) : r === `-${e}` ? (a.classList.remove("desc"), await t.methods.removeParam("sort")) : (a.classList.add("asc"), t.methods.applyParams({
865
865
  sort: e
866
866
  }));
867
867
  });
@@ -870,16 +870,16 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
870
870
  return;
871
871
  const a = document.createElement("div"), l = document.createElement("input");
872
872
  l.type = "text", l.placeholder = "Filter...", a.className = "spark-table-head-filter", a.appendChild(l);
873
- const o = Ce(async (n, i) => {
874
- const r = i.target.value, d = `filter[${n}]`;
875
- if (r)
876
- return t.params[d] && t.params[d] === r ? void 0 : t.methods.applyParams({
873
+ const r = Ce(async (o, i) => {
874
+ const n = i.target.value, d = `filter[${o}]`;
875
+ if (n)
876
+ return t.params[d] && t.params[d] === n ? void 0 : t.methods.applyParams({
877
877
  page: 1,
878
- [d]: r
878
+ [d]: n
879
879
  });
880
880
  await t.methods.removeParam(d);
881
881
  }, 200);
882
- l.addEventListener("keyup", (n) => o(e, n)), s.appendChild(a);
882
+ l.addEventListener("keyup", (o) => r(e, o)), s.appendChild(a);
883
883
  }, Ss = (e, s, t) => {
884
884
  e.classList.add("spark-table-head"), (!t || !t.hideSort) && e.classList.add("can-sort"), (!t || !t.hideFilter) && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
885
885
  const l = e.querySelector(".colHeader");
@@ -890,9 +890,9 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
890
890
  if (e < 0)
891
891
  return;
892
892
  let a = 2;
893
- const l = t.methods.colToProp(e), o = t.methods.getSettingsForProp(l);
894
- s.childElementCount === 1 && (o && o.hideSort && a--, o && o.hideFilter && a--, (!o || !o.hideSort) && ws(l, s, t), (!o || !o.hideFilter) && Cs(l, s, t)), (s.childElementCount === a || a === 0) && Ss(s, l, o);
895
- }, Ls = (e) => (s, t, a, l, o, n, i) => {
893
+ const l = t.methods.colToProp(e), r = t.methods.getSettingsForProp(l);
894
+ s.childElementCount === 1 && (r && r.hideSort && a--, r && r.hideFilter && a--, (!r || !r.hideSort) && ws(l, s, t), (!r || !r.hideFilter) && Cs(l, s, t)), (s.childElementCount === a || a === 0) && Ss(s, l, r);
895
+ }, Ls = (e) => (s, t, a, l, r, o, i) => {
896
896
  t.innerHTML = "", t.classList.add("spark-table-cell-actions");
897
897
  const d = (i.rendererConfig || {}).actions || [];
898
898
  if (d.length === 0)
@@ -928,10 +928,10 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
928
928
  purple: "bg-purple-100 text-purple-800",
929
929
  pink: "bg-pink-100 text-pink-800",
930
930
  indigo: "bg-indigo-100 text-indigo-800"
931
- }, Hs = (e) => (s, t, a, l, o, n, i) => {
932
- if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !n)
931
+ }, Hs = (e) => (s, t, a, l, r, o, i) => {
932
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !o)
933
933
  return;
934
- const d = (i.rendererConfig || {}).colorMap || {}, m = d[n] || d[n?.toLowerCase()] || "gray", u = de[m] || de.gray, p = document.createElement("span");
934
+ const d = (i.rendererConfig || {}).colorMap || {}, m = d[o] || d[o?.toLowerCase()] || "gray", u = de[m] || de.gray, p = document.createElement("span");
935
935
  p.classList.add(
936
936
  "inline-flex",
937
937
  "items-center",
@@ -942,63 +942,63 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
942
942
  "font-medium",
943
943
  "capitalize",
944
944
  ...u.split(" ")
945
- ), p.textContent = n, t.appendChild(p);
946
- }, Ts = (e) => (s, t, a, l, o, n, i) => {
947
- if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !n)
945
+ ), p.textContent = o, t.appendChild(p);
946
+ }, Ts = (e) => (s, t, a, l, r, o, i) => {
947
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !o)
948
948
  return;
949
- const r = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a));
950
- let m = n;
951
- r.href && (typeof r.href == "function" ? m = r.href(d) : r.href === "email" ? m = `mailto:${n}` : r.href === "tel" ? m = `tel:${n}` : typeof r.href == "string" && (m = d[r.href] || n));
949
+ const n = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a));
950
+ let m = o;
951
+ n.href && (typeof n.href == "function" ? m = n.href(d) : n.href === "email" ? m = `mailto:${o}` : n.href === "tel" ? m = `tel:${o}` : typeof n.href == "string" && (m = d[n.href] || o));
952
952
  const u = document.createElement("a");
953
- u.href = m, u.textContent = n, u.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), r.target && (u.target = r.target), r.rel && (u.rel = r.rel), u.addEventListener("click", (p) => {
953
+ u.href = m, u.textContent = o, u.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), n.target && (u.target = n.target), n.rel && (u.rel = n.rel), u.addEventListener("click", (p) => {
954
954
  p.stopPropagation();
955
955
  }), t.appendChild(u);
956
956
  }, ue = {
957
957
  sm: "h-6 w-6",
958
958
  md: "h-8 w-8",
959
959
  lg: "h-12 w-12"
960
- }, Vs = (e) => (s, t, a, l, o, n, i) => {
961
- if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !n)
960
+ }, Vs = (e) => (s, t, a, l, r, o, i) => {
961
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !o)
962
962
  return;
963
- const r = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a)), m = r.size || "md", u = ue[m] || ue.md, p = r.rounded !== !1;
964
- let h = r.alt || "";
965
- typeof r.alt == "string" && d[r.alt] && (h = d[r.alt]);
963
+ const n = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a)), m = n.size || "md", u = ue[m] || ue.md, p = n.rounded !== !1;
964
+ let h = n.alt || "";
965
+ typeof n.alt == "string" && d[n.alt] && (h = d[n.alt]);
966
966
  const v = document.createElement("img");
967
- v.src = n, v.alt = h, v.classList.add(...u.split(" "), "object-cover"), p ? v.classList.add("rounded-full") : v.classList.add("rounded"), t.appendChild(v);
968
- }, Ps = (e) => (s, t, a, l, o, n, i) => {
969
- if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !n)
967
+ v.src = o, v.alt = h, v.classList.add(...u.split(" "), "object-cover"), p ? v.classList.add("rounded-full") : v.classList.add("rounded"), t.appendChild(v);
968
+ }, Ps = (e) => (s, t, a, l, r, o, i) => {
969
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !o)
970
970
  return;
971
- const r = i.rendererConfig || {}, d = r.format || "short", m = r.locale || "en-US";
972
- let u = n;
971
+ const n = i.rendererConfig || {}, d = n.format || "short", m = n.locale || "en-US";
972
+ let u = o;
973
973
  try {
974
- const h = new Date(n);
975
- isNaN(h.getTime()) ? u = n : typeof d == "function" ? u = d(h) : d === "short" ? u = h.toLocaleDateString(m) : d === "long" ? u = h.toLocaleDateString(m, {
974
+ const h = new Date(o);
975
+ isNaN(h.getTime()) ? u = o : typeof d == "function" ? u = d(h) : d === "short" ? u = h.toLocaleDateString(m) : d === "long" ? u = h.toLocaleDateString(m, {
976
976
  year: "numeric",
977
977
  month: "long",
978
978
  day: "numeric"
979
979
  }) : d === "relative" ? u = Rs(h) : d === "datetime" ? u = h.toLocaleString(m) : u = h.toLocaleDateString(m);
980
980
  } catch (h) {
981
- console.error("Error formatting date:", h), u = n;
981
+ console.error("Error formatting date:", h), u = o;
982
982
  }
983
983
  const p = document.createElement("span");
984
984
  p.textContent = u, t.appendChild(p);
985
985
  };
986
986
  function Rs(e) {
987
- const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60), o = Math.floor(l / 60), n = Math.floor(o / 24), i = Math.floor(n / 30), r = Math.floor(n / 365), d = t > 0;
988
- return a < 60 ? d ? "just now" : "in a moment" : l < 60 ? d ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : o < 24 ? d ? `${o} hour${o > 1 ? "s" : ""} ago` : `in ${o} hour${o > 1 ? "s" : ""}` : n < 30 ? d ? `${n} day${n > 1 ? "s" : ""} ago` : `in ${n} day${n > 1 ? "s" : ""}` : i < 12 ? d ? `${i} month${i > 1 ? "s" : ""} ago` : `in ${i} month${i > 1 ? "s" : ""}` : d ? `${r} year${r > 1 ? "s" : ""} ago` : `in ${r} year${r > 1 ? "s" : ""}`;
987
+ const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60), r = Math.floor(l / 60), o = Math.floor(r / 24), i = Math.floor(o / 30), n = Math.floor(o / 365), d = t > 0;
988
+ return a < 60 ? d ? "just now" : "in a moment" : l < 60 ? d ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : r < 24 ? d ? `${r} hour${r > 1 ? "s" : ""} ago` : `in ${r} hour${r > 1 ? "s" : ""}` : o < 30 ? d ? `${o} day${o > 1 ? "s" : ""} ago` : `in ${o} day${o > 1 ? "s" : ""}` : i < 12 ? d ? `${i} month${i > 1 ? "s" : ""} ago` : `in ${i} month${i > 1 ? "s" : ""}` : d ? `${n} year${n > 1 ? "s" : ""} ago` : `in ${n} year${n > 1 ? "s" : ""}`;
989
989
  }
990
990
  const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
991
- St(e, (t, a, l, o, n, i, r) => {
992
- $t.apply(null, [t, a, l, o, n, i, r]), s(t, a, l, o, n, i, r);
991
+ St(e, (t, a, l, r, o, i, n) => {
992
+ $t.apply(null, [t, a, l, r, o, i, n]), s(t, a, l, r, o, i, n);
993
993
  }), Ms.set(e, s);
994
994
  }, Fs = (e) => {
995
- D("spark.actions", Ls(e)), D("spark.badge", Hs()), D("spark.link", Ts()), D("spark.image", Vs()), D("spark.date", Ps()), D("style.capitalize", (s, t, a, l, o, n) => {
996
- if (!n || n.length === 0) {
995
+ D("spark.actions", Ls(e)), D("spark.badge", Hs()), D("spark.link", Ts()), D("spark.image", Vs()), D("spark.date", Ps()), D("style.capitalize", (s, t, a, l, r, o) => {
996
+ if (!o || o.length === 0) {
997
997
  t.innerText = "";
998
998
  return;
999
999
  }
1000
1000
  const i = document.createElement("span");
1001
- i.innerHTML = n, i.classList.add("capitalize"), t.replaceChildren(i);
1001
+ i.innerHTML = o, i.classList.add("capitalize"), t.replaceChildren(i);
1002
1002
  });
1003
1003
  }, As = () => {
1004
1004
  }, Bs = { class: "flex items-center gap-4 px-4 py-3" }, Es = { class: "shrink-0" }, zs = { class: "text-sm text-gray-700" }, js = { class: "font-medium" }, Os = { class: "font-medium" }, Is = { class: "font-medium" }, Ns = {
@@ -1044,19 +1044,19 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1044
1044
  emits: ["paginate"],
1045
1045
  setup(e, { emit: s }) {
1046
1046
  const t = e, a = s, l = (m) => {
1047
- o(t.sparkTable.params.page + m);
1048
- }, o = (m) => {
1047
+ r(t.sparkTable.params.page + m);
1048
+ }, r = (m) => {
1049
1049
  m < 1 || m > t.sparkTable.response.meta.last_page || a("paginate", {
1050
1050
  page: m
1051
1051
  });
1052
- }, n = k(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = k(() => t.sparkTable.computed.ready ? ht(
1053
- Math.floor((n.value - 1) / 10) * 10 + 1,
1054
- n.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : n.value + 1
1055
- ) : []), r = k(
1052
+ }, o = k(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = k(() => t.sparkTable.computed.ready ? ht(
1053
+ Math.floor((o.value - 1) / 10) * 10 + 1,
1054
+ o.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : o.value + 1
1055
+ ) : []), n = k(
1056
1056
  () => t.sparkTable.params.page < q(t.sparkTable.response.meta, "last_page", 1)
1057
1057
  ), d = k(() => t.sparkTable.params.page > 1);
1058
1058
  return (m, u) => {
1059
- const p = $("font-awesome-icon");
1059
+ const p = L("font-awesome-icon");
1060
1060
  return f(), g("div", null, [
1061
1061
  c("div", Ds, [
1062
1062
  i.value.length > 1 ? (f(), g("div", Zs, [
@@ -1079,10 +1079,10 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1079
1079
  "relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
1080
1080
  e.sparkTable.params.page === h ? "z-10 text-white bg-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 hover:bg-primary-600" : "text-gray-900 hover:bg-gray-50 ring-gray-300 focus:z-20 focus:outline-offset-0"
1081
1081
  ]),
1082
- onClick: (v) => o(h)
1082
+ onClick: (v) => r(h)
1083
1083
  }, S(h), 11, Gs))), 128)),
1084
1084
  c("a", {
1085
- class: _([r.value ? "" : "disabled", "relative inline-flex items-center rounded-r-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
1085
+ class: _([n.value ? "" : "disabled", "relative inline-flex items-center rounded-r-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
1086
1086
  onClick: u[1] || (u[1] = j((h) => l(1), ["prevent"])),
1087
1087
  href: "#"
1088
1088
  }, [
@@ -1113,26 +1113,26 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1113
1113
  },
1114
1114
  emits: ["paginate"],
1115
1115
  setup(e, { emit: s }) {
1116
- const t = e, a = s, l = k(() => t.sparkTable.options.perPages.map((n) => ({
1117
- label: String(n),
1118
- value: n
1119
- }))), o = (n) => {
1116
+ const t = e, a = s, l = k(() => t.sparkTable.options.perPages.map((o) => ({
1117
+ label: String(o),
1118
+ value: o
1119
+ }))), r = (o) => {
1120
1120
  a("paginate", {
1121
1121
  page: 1,
1122
- limit: parseInt(n)
1122
+ limit: parseInt(o)
1123
1123
  });
1124
1124
  };
1125
- return (n, i) => {
1126
- const r = $("FormKit");
1125
+ return (o, i) => {
1126
+ const n = L("FormKit");
1127
1127
  return f(), g("div", Us, [
1128
- b(r, {
1128
+ b(n, {
1129
1129
  "model-value": e.sparkTable.params.limit,
1130
1130
  type: "select",
1131
1131
  options: l.value,
1132
1132
  "outer-class": "!mb-0",
1133
1133
  "wrapper-class": "!mb-0",
1134
1134
  "input-class": "!py-2",
1135
- onInput: o
1135
+ onInput: r
1136
1136
  }, null, 8, ["model-value", "options"])
1137
1137
  ]);
1138
1138
  };
@@ -1148,14 +1148,14 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1148
1148
  },
1149
1149
  setup(e) {
1150
1150
  const s = e, t = be(), a = k(() => !!t.default), l = k(() => {
1151
- const o = "spark-table-toolbar flex flex-wrap items-center gap-x-5 px-5 w-full";
1152
- return s.position === "footer" ? `${o} spark-table-toolbar-footer justify-between` : `${o} spark-table-toolbar-header gap-y-5 py-5`;
1151
+ const r = "spark-table-toolbar flex flex-wrap items-center gap-x-5 px-5 w-full";
1152
+ return s.position === "footer" ? `${r} spark-table-toolbar-footer justify-between` : `${r} spark-table-toolbar-header gap-y-5 py-5`;
1153
1153
  });
1154
- return (o, n) => a.value ? (f(), g("div", {
1154
+ return (r, o) => a.value ? (f(), g("div", {
1155
1155
  key: 0,
1156
1156
  class: _(l.value)
1157
1157
  }, [
1158
- T(o.$slots, "default")
1158
+ T(r.$slots, "default")
1159
1159
  ], 2)) : x("", !0);
1160
1160
  }
1161
1161
  }, Xs = { class: "spark-table-search" }, Js = {
@@ -1177,29 +1177,29 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1177
1177
  }
1178
1178
  },
1179
1179
  setup(e) {
1180
- const s = e, t = L("");
1180
+ const s = e, t = $("");
1181
1181
  s.sparkTable.params[s.config.param] && (t.value = s.sparkTable.params[s.config.param]);
1182
- const a = Ce((o) => {
1183
- o ? s.sparkTable.methods.applyParams({
1182
+ const a = Ce((r) => {
1183
+ r ? s.sparkTable.methods.applyParams({
1184
1184
  page: 1,
1185
- [s.config.param]: o
1185
+ [s.config.param]: r
1186
1186
  }) : s.sparkTable.methods.removeParam(s.config.param);
1187
1187
  }, s.config.debounce || 300);
1188
- E(t, (o) => {
1189
- a(o);
1188
+ E(t, (r) => {
1189
+ a(r);
1190
1190
  });
1191
1191
  const l = s.config.placeholder || "Search...";
1192
1192
  return E(
1193
1193
  () => s.sparkTable.params[s.config.param],
1194
- (o) => {
1195
- !o && t.value && (t.value = "");
1194
+ (r) => {
1195
+ !r && t.value && (t.value = "");
1196
1196
  }
1197
- ), (o, n) => {
1198
- const i = $("FormKit");
1197
+ ), (r, o) => {
1198
+ const i = L("FormKit");
1199
1199
  return f(), g("div", Xs, [
1200
1200
  b(i, Y({
1201
1201
  modelValue: t.value,
1202
- "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
1202
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => t.value = n),
1203
1203
  type: "text",
1204
1204
  placeholder: y(l),
1205
1205
  "outer-class": "!mb-0",
@@ -1225,31 +1225,31 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1225
1225
  }
1226
1226
  },
1227
1227
  setup(e) {
1228
- const s = e, t = L(""), a = s.config.param || `filter[${s.config.key}]`;
1228
+ const s = e, t = $(""), a = s.config.param || `filter[${s.config.key}]`;
1229
1229
  s.sparkTable.params[a] && (t.value = s.sparkTable.params[a]);
1230
- const l = s.config.label || null, o = k(() => [
1230
+ const l = s.config.label || null, r = k(() => [
1231
1231
  { label: s.config.placeholder || "All", value: "" },
1232
1232
  ...s.config.options
1233
1233
  ]);
1234
- return E(t, (n) => {
1235
- n ? s.sparkTable.methods.applyParams({
1234
+ return E(t, (o) => {
1235
+ o ? s.sparkTable.methods.applyParams({
1236
1236
  page: 1,
1237
- [a]: n
1237
+ [a]: o
1238
1238
  }) : s.sparkTable.methods.removeParam(a);
1239
1239
  }), E(
1240
1240
  () => s.sparkTable.params[a],
1241
- (n) => {
1242
- !n && t.value && (t.value = "");
1241
+ (o) => {
1242
+ !o && t.value && (t.value = "");
1243
1243
  }
1244
- ), (n, i) => {
1245
- const r = $("FormKit");
1244
+ ), (o, i) => {
1245
+ const n = L("FormKit");
1246
1246
  return f(), g("div", ea, [
1247
- b(r, Y({
1247
+ b(n, Y({
1248
1248
  modelValue: t.value,
1249
1249
  "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1250
1250
  type: "select",
1251
1251
  label: y(l),
1252
- options: o.value,
1252
+ options: r.value,
1253
1253
  placeholder: e.config.placeholder || "All",
1254
1254
  "outer-class": "!mb-0",
1255
1255
  "wrapper-class": "!mb-0"
@@ -1276,9 +1276,9 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1276
1276
  }
1277
1277
  },
1278
1278
  setup(e) {
1279
- const s = e, t = L(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1279
+ const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1280
1280
  s.sparkTable.params[l] !== void 0 && (t.value = s.sparkTable.params[l]);
1281
- const o = (i) => i == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === i, n = (i) => {
1281
+ const r = (i) => i == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === i, o = (i) => {
1282
1282
  t.value = i, i == null || i === "" ? s.sparkTable.methods.removeParam(l) : s.sparkTable.methods.applyParams({
1283
1283
  page: 1,
1284
1284
  [l]: i
@@ -1289,15 +1289,15 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1289
1289
  (i) => {
1290
1290
  (i == null || i === "") && t.value ? t.value = null : i !== t.value && (t.value = i);
1291
1291
  }
1292
- ), (i, r) => (f(), g("div", aa, [
1292
+ ), (i, n) => (f(), g("div", aa, [
1293
1293
  y(a) ? (f(), g("span", oa, S(y(a)), 1)) : x("", !0),
1294
1294
  b(us, { class: "isolate" }, {
1295
1295
  default: w(() => [
1296
1296
  (f(!0), g(M, null, B(e.config.options, (d) => (f(), V(A, {
1297
1297
  key: d.value,
1298
1298
  size: "xl",
1299
- variant: o(d.value) ? "primary" : "secondary",
1300
- onClick: (m) => n(d.value)
1299
+ variant: r(d.value) ? "primary" : "secondary",
1300
+ onClick: (m) => o(d.value)
1301
1301
  }, {
1302
1302
  default: w(() => [
1303
1303
  P(S(d.label), 1)
@@ -1325,7 +1325,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1325
1325
  }
1326
1326
  },
1327
1327
  setup(e) {
1328
- const s = e, t = L(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1328
+ const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, r = $(`${l}-0`);
1329
1329
  return t.value = s.sparkTable.params[l] || null, E(t, (o) => {
1330
1330
  o ? s.sparkTable.methods.applyParams({
1331
1331
  page: 1,
@@ -1334,15 +1334,21 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1334
1334
  }), E(
1335
1335
  () => s.sparkTable.params[l],
1336
1336
  (o) => {
1337
- !o && t.value && (t.value = null);
1337
+ if ((o == null || o === "") && t.value) {
1338
+ t.value = null;
1339
+ const i = parseInt(r.value.split("-").pop()) || 0;
1340
+ r.value = `${l}-${i + 1}`;
1341
+ } else o && o !== t.value && (t.value = o);
1338
1342
  }
1339
- ), (o, n) => {
1340
- const i = $("FormKit");
1343
+ ), (o, i) => {
1344
+ const n = L("FormKit");
1341
1345
  return f(), g("div", la, [
1342
- b(i, Y({
1346
+ (f(), V(n, Y({
1347
+ key: r.value,
1343
1348
  modelValue: t.value,
1344
- "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
1349
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1345
1350
  type: "datepicker",
1351
+ "picker-only": "",
1346
1352
  label: y(a),
1347
1353
  placeholder: e.config.placeholder || "Select date",
1348
1354
  overlay: !0,
@@ -1350,11 +1356,11 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1350
1356
  format: "YYYY-MM-DD",
1351
1357
  "outer-class": "!mb-0",
1352
1358
  "wrapper-class": "!mb-0"
1353
- }, e.config.formkitProps || {}), null, 16, ["modelValue", "label", "placeholder"])
1359
+ }, e.config.formkitProps || {}), null, 16, ["modelValue", "label", "placeholder"]))
1354
1360
  ]);
1355
1361
  };
1356
1362
  }
1357
- }, ca = /* @__PURE__ */ I(ia, [["__scopeId", "data-v-265417b0"]]), da = { class: "spark-table-reset" }, ua = { key: 1 }, pa = {
1363
+ }, ca = /* @__PURE__ */ I(ia, [["__scopeId", "data-v-f10ddb60"]]), da = { class: "spark-table-reset" }, ua = { key: 1 }, pa = {
1358
1364
  __name: "SparkTableReset",
1359
1365
  props: {
1360
1366
  /** SparkTable instance object */
@@ -1371,26 +1377,26 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1371
1377
  setup(e) {
1372
1378
  const s = e, t = () => {
1373
1379
  const a = s.sparkTable.plugins || {}, l = [];
1374
- Object.entries(a).forEach(([n, i]) => {
1380
+ Object.entries(a).forEach(([o, i]) => {
1375
1381
  if (!(!i || !i.enabled || i.type === "reset")) {
1376
1382
  if (i.type === "search")
1377
1383
  i.param && l.push(i.param);
1378
1384
  else if (i.type === "filterSelect" || i.type === "filterButtons") {
1379
- const r = i.param || `filter[${i.key}]`;
1380
- l.push(r);
1385
+ const n = i.param || `filter[${i.key}]`;
1386
+ l.push(n);
1381
1387
  } else if (i.type === "datePicker") {
1382
- const r = i.param || `filter[${i.key}]`;
1383
- l.push(r);
1388
+ const n = i.param || `filter[${i.key}]`;
1389
+ l.push(n);
1384
1390
  }
1385
1391
  }
1386
1392
  });
1387
- const o = l.filter(
1388
- (n) => s.sparkTable.params[n] !== void 0 && s.sparkTable.params[n] !== null && s.sparkTable.params[n] !== ""
1393
+ const r = l.filter(
1394
+ (o) => s.sparkTable.params[o] !== void 0 && s.sparkTable.params[o] !== null && s.sparkTable.params[o] !== ""
1389
1395
  );
1390
- o.length !== 0 && s.sparkTable.methods.clearParams(o);
1396
+ r.length !== 0 && s.sparkTable.methods.clearParams(r);
1391
1397
  };
1392
1398
  return (a, l) => {
1393
- const o = $("font-awesome-icon");
1399
+ const r = L("font-awesome-icon");
1394
1400
  return f(), g("div", da, [
1395
1401
  b(A, {
1396
1402
  onClick: t,
@@ -1398,7 +1404,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1398
1404
  size: "xl"
1399
1405
  }, {
1400
1406
  default: w(() => [
1401
- e.config.icon ? (f(), V(o, {
1407
+ e.config.icon ? (f(), V(r, {
1402
1408
  key: 0,
1403
1409
  icon: ["far", e.config.icon],
1404
1410
  class: _({ "mr-1.5": e.config.label })
@@ -1438,7 +1444,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1438
1444
  dataTransformer: {
1439
1445
  type: Function,
1440
1446
  default: (e, s) => ({
1441
- data: q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((o) => a[o])) : e.data.data,
1447
+ data: q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((r) => a[r])) : e.data.data,
1442
1448
  meta: {
1443
1449
  last_page: e.data.last_page,
1444
1450
  from: e.data.from,
@@ -1483,7 +1489,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1483
1489
  setup(e, { expose: s, emit: t }) {
1484
1490
  const a = e;
1485
1491
  Ct(), Q(xt), Q(kt), Q(_t), q(a, "settings.nestedHeaders") && Q(wt);
1486
- const l = t, o = ge("axios"), n = L(null), i = L(!1), r = L(null), d = {
1492
+ const l = t, r = ge("axios"), o = $(null), i = $(!1), n = $(null), d = {
1487
1493
  search: Qs,
1488
1494
  filterSelect: sa,
1489
1495
  filterButtons: na,
@@ -1509,14 +1515,14 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1509
1515
  u.params[p] && (delete u.params[p], await u.methods.loadTable());
1510
1516
  },
1511
1517
  loadTable: async (p) => {
1512
- if (!(!n.value || !n.value.hotInstance)) {
1513
- i.value = !0, r.value = null, l("loading", !0), ae.start(), u.hotInstance = n.value.hotInstance;
1518
+ if (!(!o.value || !o.value.hotInstance)) {
1519
+ i.value = !0, n.value = null, l("loading", !0), ae.start(), u.hotInstance = o.value.hotInstance;
1514
1520
  try {
1515
1521
  if (a.dataProvider) {
1516
1522
  const v = await a.dataProvider(u.computed.params);
1517
1523
  u.response = a.dataTransformer(v, a);
1518
1524
  } else if (a.url) {
1519
- const v = await o.get(a.url, {
1525
+ const v = await r.get(a.url, {
1520
1526
  params: u.computed.params
1521
1527
  });
1522
1528
  u.response = a.dataTransformer(v, a);
@@ -1529,14 +1535,14 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1529
1535
  meta: u.response.meta
1530
1536
  }), p && typeof p == "function" && p();
1531
1537
  } catch (h) {
1532
- r.value = h, l("error", h), console.error("Error loading table data:", h);
1538
+ n.value = h, l("error", h), console.error("Error loading table data:", h);
1533
1539
  } finally {
1534
1540
  i.value = !1, l("loading", !1), ae.done();
1535
1541
  }
1536
1542
  }
1537
1543
  },
1538
1544
  // can't use sparkTable.hotInstance here because the ref isn't ready
1539
- colToProp: (p) => n.value.hotInstance.colToProp(p),
1545
+ colToProp: (p) => o.value.hotInstance.colToProp(p),
1540
1546
  fireEvent: (p, h) => {
1541
1547
  l(p, h);
1542
1548
  },
@@ -1598,9 +1604,9 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1598
1604
  clearParams: (p) => u.methods.clearParams(p),
1599
1605
  applyParams: (p) => u.methods.applyParams(p),
1600
1606
  loading: i,
1601
- error: r,
1607
+ error: n,
1602
1608
  sparkTable: u,
1603
- table: n
1609
+ table: o
1604
1610
  }), (p, h) => (f(), g("div", ma, [
1605
1611
  u.computed.ready ? (f(), V(pe, {
1606
1612
  key: 0,
@@ -1616,7 +1622,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1616
1622
  T(p.$slots, "header", {
1617
1623
  sparkTable: u,
1618
1624
  loading: i.value,
1619
- error: r.value
1625
+ error: n.value
1620
1626
  })
1621
1627
  ]),
1622
1628
  _: 3
@@ -1624,7 +1630,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1624
1630
  b(y(vt), {
1625
1631
  "theme-name": "ht-theme-classic",
1626
1632
  ref_key: "table",
1627
- ref: n,
1633
+ ref: o,
1628
1634
  settings: u.tableSettings
1629
1635
  }, null, 8, ["settings"]),
1630
1636
  u.computed.ready ? (f(), V(pe, {
@@ -1645,7 +1651,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1645
1651
  T(p.$slots, "footer", {
1646
1652
  sparkTable: u,
1647
1653
  loading: i.value,
1648
- error: r.value
1654
+ error: n.value
1649
1655
  })
1650
1656
  ])
1651
1657
  ]),
@@ -1666,8 +1672,8 @@ function me() {
1666
1672
  e.isVisible = !1, e.content = null, e.props = {}, e.eventHandlers = {};
1667
1673
  }, a = () => {
1668
1674
  e.isVisible = !0;
1669
- }, l = (n, i = {}, r = {}) => {
1670
- e.content = he(n), e.props = i, e.eventHandlers = r;
1675
+ }, l = (o, i = {}, n = {}) => {
1676
+ e.content = he(o), e.props = i, e.eventHandlers = n;
1671
1677
  };
1672
1678
  return {
1673
1679
  state: e,
@@ -1675,8 +1681,8 @@ function me() {
1675
1681
  close: t,
1676
1682
  open: a,
1677
1683
  setContent: l,
1678
- show: (n, i = {}, r = {}) => {
1679
- n && l(n, i, r), a();
1684
+ show: (o, i = {}, n = {}) => {
1685
+ o && l(o, i, n), a();
1680
1686
  }
1681
1687
  };
1682
1688
  }
@@ -1745,7 +1751,7 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1745
1751
  },
1746
1752
  emits: ["overlayClose"],
1747
1753
  setup(e, { emit: s }) {
1748
- const t = e, a = s, l = be(), o = Le(), n = Se(), i = k(() => n.getAppIcon(t.appStore.state.app)), r = () => {
1754
+ const t = e, a = s, l = be(), r = Le(), o = Se(), i = k(() => o.getAppIcon(t.appStore.state.app)), n = () => {
1749
1755
  const p = {};
1750
1756
  l["app-selector-bottom"] ? p.bottomSlot = () => le("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (p.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? p.footerSlot = () => le("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (p.footerSlot = t.appSelectorSlots.footerSlot), Z.showRight(Kt, p, {
1751
1757
  select: (h) => {
@@ -1758,13 +1764,13 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1758
1764
  {},
1759
1765
  {
1760
1766
  select: (p) => {
1761
- o.toggleBrand(p), Z.closeLeft();
1767
+ r.toggleBrand(p), Z.closeLeft();
1762
1768
  }
1763
1769
  }
1764
1770
  );
1765
1771
  }, m = k(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), u = k(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
1766
1772
  return (p, h) => {
1767
- const v = $("font-awesome-icon"), N = $("router-view");
1773
+ const v = L("font-awesome-icon"), N = L("router-view");
1768
1774
  return f(), g(M, null, [
1769
1775
  c("div", {
1770
1776
  class: _([m.value, "fixed inset-y-0 flex transition-all z-100"])
@@ -1881,9 +1887,9 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1881
1887
  class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
1882
1888
  onClick: d
1883
1889
  }, [
1884
- y(o).currentBrand ? (f(), g("img", {
1890
+ y(r).currentBrand ? (f(), g("img", {
1885
1891
  key: 0,
1886
- src: y(o).currentBrand.logo,
1892
+ src: y(r).currentBrand.logo,
1887
1893
  alt: "",
1888
1894
  class: "h-[30px] w-auto"
1889
1895
  }, null, 8, Fa)) : x("", !0)
@@ -1895,7 +1901,7 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1895
1901
  key: 0,
1896
1902
  class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
1897
1903
  type: "button",
1898
- onClick: r
1904
+ onClick: n
1899
1905
  }, [
1900
1906
  b(v, {
1901
1907
  icon: y(H).farGripDotsVertical,
@@ -1927,7 +1933,7 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1927
1933
  }
1928
1934
  }, Ea = {}, za = { class: "h-full" };
1929
1935
  function ja(e, s) {
1930
- const t = $("router-view");
1936
+ const t = L("router-view");
1931
1937
  return f(), g("main", za, [
1932
1938
  b(t)
1933
1939
  ]);
@@ -1940,12 +1946,12 @@ const vr = /* @__PURE__ */ I(Ea, [["render", ja]]), Oa = (e) => {
1940
1946
  maxAge: a = 31536e3,
1941
1947
  // 365 days in seconds
1942
1948
  domain: l = He(),
1943
- secure: o = !0,
1944
- sameSite: n = "Lax",
1949
+ secure: r = !0,
1950
+ sameSite: o = "Lax",
1945
1951
  path: i = "/"
1946
1952
  } = t;
1947
- let r = `${e}=${s}; max-age=${a}; path=${i}; samesite=${n}`;
1948
- l && (r += `; domain=${l}`), o && (r += "; secure"), document.cookie = r;
1953
+ let n = `${e}=${s}; max-age=${a}; path=${i}; samesite=${o}`;
1954
+ l && (n += `; domain=${l}`), r && (n += "; secure"), document.cookie = n;
1949
1955
  }, Na = (e, s = {}) => {
1950
1956
  const { domain: t = He(), path: a = "/" } = s;
1951
1957
  let l = `${e}=; max-age=0; path=${a}`;
@@ -2014,10 +2020,10 @@ const re = "bolt-next-token", F = X("auth", () => {
2014
2020
  Ia(re, d), e.token = d;
2015
2021
  }, a = () => {
2016
2022
  Na(re), e.token = null;
2017
- }, l = () => Oa(re), o = async (d) => {
2023
+ }, l = () => Oa(re), r = async (d) => {
2018
2024
  const m = await K.post(e.endpoints.login, d), u = m.headers.authorization;
2019
2025
  return t(u), e.user = m.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(m.data), m.data;
2020
- }, n = async () => {
2026
+ }, o = async () => {
2021
2027
  try {
2022
2028
  await K.post(
2023
2029
  e.endpoints.logout,
@@ -2049,14 +2055,14 @@ const re = "bolt-next-token", F = X("auth", () => {
2049
2055
  } finally {
2050
2056
  e.ready = !0;
2051
2057
  }
2052
- }, r = k(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2058
+ }, n = k(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2053
2059
  return {
2054
2060
  state: e,
2055
2061
  initialize: s,
2056
- login: o,
2057
- logout: n,
2062
+ login: r,
2063
+ logout: o,
2058
2064
  fetchUser: i,
2059
- check: r,
2065
+ check: n,
2060
2066
  setTokenCookie: t,
2061
2067
  clearTokenCookie: a,
2062
2068
  getTokenCookie: l
@@ -2088,8 +2094,8 @@ const re = "bolt-next-token", F = X("auth", () => {
2088
2094
  }
2089
2095
  },
2090
2096
  setup(e) {
2091
- const s = O(), t = se(), a = $e(), l = F(), o = e, n = L(!1), i = L(""), r = async (d) => {
2092
- n.value = !0, i.value = "";
2097
+ const s = O(), t = se(), a = $e(), l = F(), r = e, o = $(!1), i = $(""), n = async (d) => {
2098
+ o.value = !0, i.value = "";
2093
2099
  try {
2094
2100
  await l.login(d);
2095
2101
  const m = t.query.redirect;
@@ -2100,20 +2106,20 @@ const re = "bolt-next-token", F = X("auth", () => {
2100
2106
  }
2101
2107
  await s.push(m);
2102
2108
  } else
2103
- await s.push(o.defaultRedirect);
2109
+ await s.push(r.defaultRedirect);
2104
2110
  } catch (m) {
2105
2111
  i.value = m.response?.data?.message || m.message || "Login failed. Please try again.";
2106
2112
  } finally {
2107
- n.value = !1;
2113
+ o.value = !1;
2108
2114
  }
2109
2115
  };
2110
2116
  return (d, m) => {
2111
- const u = $("FormKit"), p = $("router-link");
2117
+ const u = L("FormKit"), p = L("router-link");
2112
2118
  return f(), g("div", qa, [
2113
2119
  c("div", Ga, [
2114
- o.logo ? (f(), g("img", {
2120
+ r.logo ? (f(), g("img", {
2115
2121
  key: 0,
2116
- src: o.logo,
2122
+ src: r.logo,
2117
2123
  alt: "Logo",
2118
2124
  class: "h-[23px] w-auto"
2119
2125
  }, null, 8, Ka)) : (f(), g("svg", Ua, [...m[0] || (m[0] = [
@@ -2142,7 +2148,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2142
2148
  ]),
2143
2149
  b(u, {
2144
2150
  type: "form",
2145
- onSubmit: r,
2151
+ onSubmit: n,
2146
2152
  actions: !1
2147
2153
  }, {
2148
2154
  default: w(() => [
@@ -2167,7 +2173,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2167
2173
  c("div", Ja, [
2168
2174
  m[3] || (m[3] = c("span", null, null, -1)),
2169
2175
  b(p, {
2170
- to: o.forgotPasswordRoute,
2176
+ to: r.forgotPasswordRoute,
2171
2177
  class: "text-sm text-primary-600 font-semibold"
2172
2178
  }, {
2173
2179
  default: w(() => [...m[2] || (m[2] = [
@@ -2180,11 +2186,11 @@ const re = "bolt-next-token", F = X("auth", () => {
2180
2186
  b(y(A), {
2181
2187
  type: "submit",
2182
2188
  size: "xl",
2183
- disabled: n.value,
2189
+ disabled: o.value,
2184
2190
  "button-class": "w-full mb-2"
2185
2191
  }, {
2186
2192
  default: w(() => [
2187
- n.value ? (f(), g("span", to, "Signing in...")) : (f(), g("span", eo, "Sign in"))
2193
+ o.value ? (f(), g("span", to, "Signing in...")) : (f(), g("span", eo, "Sign in"))
2188
2194
  ]),
2189
2195
  _: 1
2190
2196
  }, 8, ["disabled"])
@@ -2207,9 +2213,9 @@ const re = "bolt-next-token", F = X("auth", () => {
2207
2213
  const s = O(), t = se(), a = F(), l = e;
2208
2214
  return ve(async () => {
2209
2215
  await a.logout();
2210
- const o = t.query.redirect;
2211
- o && o.startsWith("http") ? window.location.href = o : await s.push(o || l.defaultRedirect);
2212
- }), (o, n) => null;
2216
+ const r = t.query.redirect;
2217
+ r && r.startsWith("http") ? window.location.href = r : await s.push(r || l.defaultRedirect);
2218
+ }), (r, o) => null;
2213
2219
  }
2214
2220
  }, oo = { class: "h-full grid place-content-center relative" }, ro = { class: "absolute top-8 left-8" }, no = ["src"], lo = {
2215
2221
  key: 1,
@@ -2237,18 +2243,18 @@ const re = "bolt-next-token", F = X("auth", () => {
2237
2243
  }
2238
2244
  },
2239
2245
  setup(e) {
2240
- const s = F(), t = e, a = L(!1), l = L(""), o = L(""), n = async ({ email: i }) => {
2241
- a.value = !0, l.value = "", o.value = "";
2246
+ const s = F(), t = e, a = $(!1), l = $(""), r = $(""), o = async ({ email: i }) => {
2247
+ a.value = !0, l.value = "", r.value = "";
2242
2248
  try {
2243
- await K.post(s.state.endpoints.passwordEmail, { email: i }), o.value = "Password reset link sent! Check your email.";
2244
- } catch (r) {
2245
- l.value = r.response?.data?.message || "Failed to send reset link.";
2249
+ await K.post(s.state.endpoints.passwordEmail, { email: i }), r.value = "Password reset link sent! Check your email.";
2250
+ } catch (n) {
2251
+ l.value = n.response?.data?.message || "Failed to send reset link.";
2246
2252
  } finally {
2247
2253
  a.value = !1;
2248
2254
  }
2249
2255
  };
2250
- return (i, r) => {
2251
- const d = $("FormKit"), m = $("router-link");
2256
+ return (i, n) => {
2257
+ const d = L("FormKit"), m = L("router-link");
2252
2258
  return f(), g("div", oo, [
2253
2259
  c("div", ro, [
2254
2260
  t.logo ? (f(), g("img", {
@@ -2256,7 +2262,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2256
2262
  src: t.logo,
2257
2263
  alt: "Logo",
2258
2264
  class: "h-[23px] w-auto"
2259
- }, null, 8, no)) : (f(), g("svg", lo, [...r[0] || (r[0] = [
2265
+ }, null, 8, no)) : (f(), g("svg", lo, [...n[0] || (n[0] = [
2260
2266
  c("path", {
2261
2267
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2262
2268
  fill: "#1C64F2"
@@ -2276,13 +2282,13 @@ const re = "bolt-next-token", F = X("auth", () => {
2276
2282
  ])]))
2277
2283
  ]),
2278
2284
  c("div", io, [
2279
- r[2] || (r[2] = c("div", { class: "mb-7" }, [
2285
+ n[2] || (n[2] = c("div", { class: "mb-7" }, [
2280
2286
  c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
2281
2287
  c("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
2282
2288
  ], -1)),
2283
2289
  b(d, {
2284
2290
  type: "form",
2285
- onSubmit: n,
2291
+ onSubmit: o,
2286
2292
  actions: !1
2287
2293
  }, {
2288
2294
  default: w(() => [
@@ -2295,7 +2301,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2295
2301
  "outer-class": "max-w-full"
2296
2302
  }),
2297
2303
  l.value ? (f(), g("div", co, S(l.value), 1)) : x("", !0),
2298
- o.value ? (f(), g("div", uo, S(o.value), 1)) : x("", !0),
2304
+ r.value ? (f(), g("div", uo, S(r.value), 1)) : x("", !0),
2299
2305
  b(y(A), {
2300
2306
  type: "submit",
2301
2307
  size: "xl",
@@ -2311,7 +2317,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2311
2317
  to: t.loginRoute,
2312
2318
  class: "text-sm text-center text-primary-600 font-semibold block"
2313
2319
  }, {
2314
- default: w(() => [...r[1] || (r[1] = [
2320
+ default: w(() => [...n[1] || (n[1] = [
2315
2321
  P(" Back to login ", -1)
2316
2322
  ])]),
2317
2323
  _: 1
@@ -2346,23 +2352,23 @@ const re = "bolt-next-token", F = X("auth", () => {
2346
2352
  }
2347
2353
  },
2348
2354
  setup(e) {
2349
- const s = O(), t = se(), a = F(), l = e, o = L(!1), n = L(""), i = async ({ password: r, password_confirmation: d }) => {
2350
- o.value = !0, n.value = "";
2355
+ const s = O(), t = se(), a = F(), l = e, r = $(!1), o = $(""), i = async ({ password: n, password_confirmation: d }) => {
2356
+ r.value = !0, o.value = "";
2351
2357
  try {
2352
2358
  await K.post(a.state.endpoints.passwordReset, {
2353
2359
  email: t.query.email,
2354
2360
  token: t.query.token,
2355
- password: r,
2361
+ password: n,
2356
2362
  password_confirmation: d
2357
2363
  }), await s.push(l.loginRoute);
2358
2364
  } catch (m) {
2359
- n.value = m.response?.data?.message || "Failed to reset password.";
2365
+ o.value = m.response?.data?.message || "Failed to reset password.";
2360
2366
  } finally {
2361
- o.value = !1;
2367
+ r.value = !1;
2362
2368
  }
2363
2369
  };
2364
- return (r, d) => {
2365
- const m = $("FormKit");
2370
+ return (n, d) => {
2371
+ const m = L("FormKit");
2366
2372
  return f(), g("div", go, [
2367
2373
  c("div", ho, [
2368
2374
  l.logo ? (f(), g("img", {
@@ -2416,15 +2422,15 @@ const re = "bolt-next-token", F = X("auth", () => {
2416
2422
  validation: "required|confirm:password",
2417
2423
  "outer-class": "max-w-full"
2418
2424
  }),
2419
- n.value ? (f(), g("div", xo, S(n.value), 1)) : x("", !0),
2425
+ o.value ? (f(), g("div", xo, S(o.value), 1)) : x("", !0),
2420
2426
  b(y(A), {
2421
2427
  type: "submit",
2422
2428
  size: "xl",
2423
- disabled: o.value,
2429
+ disabled: r.value,
2424
2430
  "button-class": "w-full mb-2"
2425
2431
  }, {
2426
2432
  default: w(() => [
2427
- o.value ? (f(), g("span", _o, "Resetting...")) : (f(), g("span", ko, "Reset password"))
2433
+ r.value ? (f(), g("span", _o, "Resetting...")) : (f(), g("span", ko, "Reset password"))
2428
2434
  ]),
2429
2435
  _: 1
2430
2436
  }, 8, ["disabled"])
@@ -2458,14 +2464,14 @@ const re = "bolt-next-token", F = X("auth", () => {
2458
2464
  const s = O(), t = e, a = () => {
2459
2465
  s.push(t.homeRoute);
2460
2466
  };
2461
- return (l, o) => (f(), g("div", Co, [
2467
+ return (l, r) => (f(), g("div", Co, [
2462
2468
  c("div", So, [
2463
2469
  t.logo ? (f(), g("img", {
2464
2470
  key: 0,
2465
2471
  src: t.logo,
2466
2472
  alt: "Logo",
2467
2473
  class: "h-[23px] w-auto"
2468
- }, null, 8, $o)) : (f(), g("svg", Lo, [...o[0] || (o[0] = [
2474
+ }, null, 8, $o)) : (f(), g("svg", Lo, [...r[0] || (r[0] = [
2469
2475
  c("path", {
2470
2476
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2471
2477
  fill: "#1C64F2"
@@ -2485,7 +2491,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2485
2491
  ])]))
2486
2492
  ]),
2487
2493
  c("div", Ho, [
2488
- o[2] || (o[2] = c("div", null, [
2494
+ r[2] || (r[2] = c("div", null, [
2489
2495
  c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
2490
2496
  c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
2491
2497
  c("p", { class: "text-gray-600" }, [
@@ -2499,7 +2505,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2499
2505
  onClick: a,
2500
2506
  size: "lg"
2501
2507
  }, {
2502
- default: w(() => [...o[1] || (o[1] = [
2508
+ default: w(() => [...r[1] || (r[1] = [
2503
2509
  P(" Go to Home ", -1)
2504
2510
  ])]),
2505
2511
  _: 1
@@ -2531,14 +2537,14 @@ const re = "bolt-next-token", F = X("auth", () => {
2531
2537
  const s = O(), t = e, a = () => {
2532
2538
  s.push(t.homeRoute);
2533
2539
  };
2534
- return (l, o) => (f(), g("div", Po, [
2540
+ return (l, r) => (f(), g("div", Po, [
2535
2541
  c("div", Ro, [
2536
2542
  t.logo ? (f(), g("img", {
2537
2543
  key: 0,
2538
2544
  src: t.logo,
2539
2545
  alt: "Logo",
2540
2546
  class: "h-[23px] w-auto"
2541
- }, null, 8, Mo)) : (f(), g("svg", Fo, [...o[0] || (o[0] = [
2547
+ }, null, 8, Mo)) : (f(), g("svg", Fo, [...r[0] || (r[0] = [
2542
2548
  c("path", {
2543
2549
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2544
2550
  fill: "#1C64F2"
@@ -2558,7 +2564,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2558
2564
  ])]))
2559
2565
  ]),
2560
2566
  c("div", Ao, [
2561
- o[2] || (o[2] = c("div", null, [
2567
+ r[2] || (r[2] = c("div", null, [
2562
2568
  c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
2563
2569
  c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
2564
2570
  c("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
@@ -2568,7 +2574,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2568
2574
  onClick: a,
2569
2575
  size: "lg"
2570
2576
  }, {
2571
- default: w(() => [...o[1] || (o[1] = [
2577
+ default: w(() => [...r[1] || (r[1] = [
2572
2578
  P(" Go to Home ", -1)
2573
2579
  ])]),
2574
2580
  _: 1
@@ -2612,14 +2618,14 @@ const re = "bolt-next-token", F = X("auth", () => {
2612
2618
  const s = O(), t = e, a = () => {
2613
2619
  s.push(t.homeRoute);
2614
2620
  };
2615
- return (l, o) => (f(), g("div", zo, [
2621
+ return (l, r) => (f(), g("div", zo, [
2616
2622
  c("div", jo, [
2617
2623
  t.logo ? (f(), g("img", {
2618
2624
  key: 0,
2619
2625
  src: t.logo,
2620
2626
  alt: "Logo",
2621
2627
  class: "h-[23px] w-auto"
2622
- }, null, 8, Oo)) : (f(), g("svg", Io, [...o[0] || (o[0] = [
2628
+ }, null, 8, Oo)) : (f(), g("svg", Io, [...r[0] || (r[0] = [
2623
2629
  c("path", {
2624
2630
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2625
2631
  fill: "#1C64F2"
@@ -2649,7 +2655,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2649
2655
  onClick: a,
2650
2656
  size: "lg"
2651
2657
  }, {
2652
- default: w(() => [...o[1] || (o[1] = [
2658
+ default: w(() => [...r[1] || (r[1] = [
2653
2659
  P(" Go to Home ", -1)
2654
2660
  ])]),
2655
2661
  _: 1
@@ -2665,15 +2671,15 @@ function _r(e = {}) {
2665
2671
  logoutPath: t = "/logout",
2666
2672
  forgotPasswordPath: a = "/forgot-password",
2667
2673
  resetPasswordPath: l = "/password/reset",
2668
- logo: o = "",
2669
- defaultRedirect: n = "/dashboard"
2674
+ logo: r = "",
2675
+ defaultRedirect: o = "/dashboard"
2670
2676
  } = e;
2671
2677
  return [
2672
2678
  {
2673
2679
  path: s,
2674
2680
  name: "login",
2675
2681
  component: so,
2676
- props: { logo: o, defaultRedirect: n },
2682
+ props: { logo: r, defaultRedirect: o },
2677
2683
  meta: { auth: !1 }
2678
2684
  },
2679
2685
  {
@@ -2687,32 +2693,32 @@ function _r(e = {}) {
2687
2693
  path: a,
2688
2694
  name: "forgot-password",
2689
2695
  component: mo,
2690
- props: { logo: o, loginRoute: s },
2696
+ props: { logo: r, loginRoute: s },
2691
2697
  meta: { auth: !1 }
2692
2698
  },
2693
2699
  {
2694
2700
  path: l,
2695
2701
  name: "password-reset",
2696
2702
  component: wo,
2697
- props: { logo: o, loginRoute: s },
2703
+ props: { logo: r, loginRoute: s },
2698
2704
  meta: { auth: !1 }
2699
2705
  }
2700
2706
  ];
2701
2707
  }
2702
2708
  function wr(e, s = {}) {
2703
2709
  const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
2704
- e.beforeEach(async (a, l, o) => {
2705
- const n = F();
2706
- n.state.ready || await n.fetchUser(), Ko(a, o, n, t);
2710
+ e.beforeEach(async (a, l, r) => {
2711
+ const o = F();
2712
+ o.state.ready || await o.fetchUser(), Ko(a, r, o, t);
2707
2713
  });
2708
2714
  }
2709
2715
  function Ko(e, s, t, a) {
2710
- const l = e.meta.auth !== !1, o = t.check;
2716
+ const l = e.meta.auth !== !1, r = t.check;
2711
2717
  if (t.state.overrideToken && e.path === "/logout") {
2712
2718
  s({ path: a });
2713
2719
  return;
2714
2720
  }
2715
- if (!o) {
2721
+ if (!r) {
2716
2722
  if (!l) {
2717
2723
  if (e.path === "/logout") {
2718
2724
  s({ path: t.state.routes.auth });
@@ -2721,18 +2727,18 @@ function Ko(e, s, t, a) {
2721
2727
  s();
2722
2728
  return;
2723
2729
  }
2724
- let n = e.fullPath;
2725
- if (n === "/" || n === "" || n === a) {
2730
+ let o = e.fullPath;
2731
+ if (o === "/" || o === "" || o === a) {
2726
2732
  s({ path: t.state.routes.auth });
2727
2733
  return;
2728
2734
  }
2729
- n.includes("%") && (n = decodeURIComponent(n)), s({
2735
+ o.includes("%") && (o = decodeURIComponent(o)), s({
2730
2736
  path: t.state.routes.auth,
2731
- query: { redirect: n }
2737
+ query: { redirect: o }
2732
2738
  });
2733
2739
  return;
2734
2740
  }
2735
- if (o) {
2741
+ if (r) {
2736
2742
  if (!l && e.path === t.state.routes.auth) {
2737
2743
  s({ path: a });
2738
2744
  return;
@@ -2844,7 +2850,7 @@ const Tr = X("sparkNav", () => {
2844
2850
  }
2845
2851
  }
2846
2852
  return null;
2847
- }, o = async (d) => {
2853
+ }, r = async (d) => {
2848
2854
  if (d) {
2849
2855
  const m = l(e.menu, d);
2850
2856
  if (m && typeof m.action == "function") {
@@ -2853,11 +2859,11 @@ const Tr = X("sparkNav", () => {
2853
2859
  }
2854
2860
  await s.push(d);
2855
2861
  }
2856
- }, n = () => {
2862
+ }, o = () => {
2857
2863
  e.collapsed = !e.collapsed;
2858
2864
  }, i = () => {
2859
2865
  e.hidden = !e.hidden;
2860
- }, r = () => {
2866
+ }, n = () => {
2861
2867
  const d = t.name || t.path.replace("/", "");
2862
2868
  if (d) {
2863
2869
  const m = (u) => {
@@ -2871,16 +2877,16 @@ const Tr = X("sparkNav", () => {
2871
2877
  return E(
2872
2878
  () => t.path,
2873
2879
  () => {
2874
- r();
2880
+ n();
2875
2881
  },
2876
2882
  { immediate: !0 }
2877
2883
  ), {
2878
2884
  state: e,
2879
2885
  initialize: a,
2880
- goto: o,
2881
- toggleCollapsed: n,
2886
+ goto: r,
2887
+ toggleCollapsed: o,
2882
2888
  toggleHidden: i,
2883
- syncWithRoute: r
2889
+ syncWithRoute: n
2884
2890
  };
2885
2891
  });
2886
2892
  export {