@wishbone-media/spark 0.16.1 → 0.18.0

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
@@ -103,20 +103,20 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
103
103
  warning: "farExclamationTriangle",
104
104
  danger: "farCircleXmark",
105
105
  info: "farInfoCircle"
106
- })[s.type]), r = k(() => ({
106
+ })[s.type]), n = k(() => ({
107
107
  success: "text-green-400 hover:bg-green-100",
108
108
  warning: "text-yellow-400 hover:bg-yellow-100",
109
109
  danger: "text-red-400 hover:bg-red-100",
110
110
  info: "text-blue-400 hover:bg-blue-100"
111
111
  })[s.type]);
112
112
  return (o, i) => {
113
- const n = L("font-awesome-icon");
113
+ const r = L("font-awesome-icon");
114
114
  return f(), g("div", {
115
115
  class: _(["rounded-md border p-4", t.value])
116
116
  }, [
117
117
  c("div", Vt, [
118
118
  c("div", Pt, [
119
- v(n, {
119
+ v(r, {
120
120
  icon: y(H)[l.value],
121
121
  class: _(a.value)
122
122
  }, null, 8, ["icon", "class"])
@@ -128,10 +128,10 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
128
128
  c("div", Mt, [
129
129
  c("button", {
130
130
  type: "button",
131
- class: _(["inline-flex rounded-md px-2 py-1.5", r.value]),
131
+ class: _(["inline-flex rounded-md px-2 py-1.5", n.value]),
132
132
  onClick: i[0] || (i[0] = (d) => o.$emit("close"))
133
133
  }, [
134
- v(n, {
134
+ v(r, {
135
135
  icon: y(H).farXmark
136
136
  }, null, 8, ["icon"])
137
137
  ], 2)
@@ -187,11 +187,11 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
187
187
  ], Se = X("sparkAppSelector", () => {
188
188
  const e = z({
189
189
  apps: [...oe]
190
- }), s = (r = {}) => {
191
- if (r.apps && Array.isArray(r.apps)) {
192
- const o = r.apps.filter((i) => {
193
- const n = i.name && i.description && i.icon && i.href;
194
- return n || console.warn("useSparkAppSelectorStore: Invalid app object", i), n;
190
+ }), s = (n = {}) => {
191
+ if (n.apps && Array.isArray(n.apps)) {
192
+ const o = n.apps.filter((i) => {
193
+ const r = i.name && i.description && i.icon && i.href;
194
+ return r || console.warn("useSparkAppSelectorStore: Invalid app object", i), r;
195
195
  });
196
196
  e.apps = o.map((i) => ({
197
197
  name: i.name,
@@ -201,23 +201,23 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
201
201
  }));
202
202
  return;
203
203
  }
204
- if (r.appHrefs && typeof r.appHrefs == "object") {
204
+ if (n.appHrefs && typeof n.appHrefs == "object") {
205
205
  const o = /* @__PURE__ */ new Map();
206
- Object.keys(r.appHrefs).forEach((i) => {
207
- o.set(i.toLowerCase(), r.appHrefs[i]);
206
+ Object.keys(n.appHrefs).forEach((i) => {
207
+ o.set(i.toLowerCase(), n.appHrefs[i]);
208
208
  }), e.apps = oe.map((i) => {
209
- const n = o.get(i.name.toLowerCase());
209
+ const r = o.get(i.name.toLowerCase());
210
210
  return {
211
211
  ...i,
212
- href: n || i.href
212
+ href: r || i.href
213
213
  };
214
214
  });
215
215
  return;
216
216
  }
217
217
  e.apps = [...oe];
218
- }, t = k(() => e.apps), a = (r) => {
219
- if (!r) return null;
220
- const o = r.toLowerCase();
218
+ }, t = k(() => e.apps), a = (n) => {
219
+ if (!n) return null;
220
+ const o = n.toLowerCase();
221
221
  return e.apps.find((i) => i.name.toLowerCase() === o) || null;
222
222
  };
223
223
  return {
@@ -225,8 +225,8 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
225
225
  initialize: s,
226
226
  allApps: t,
227
227
  getAppByName: a,
228
- getAppIcon: (r) => {
229
- const o = a(r);
228
+ getAppIcon: (n) => {
229
+ const o = a(n);
230
230
  return o ? o.icon : "";
231
231
  }
232
232
  };
@@ -266,31 +266,31 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
266
266
  },
267
267
  emits: ["close", "select"],
268
268
  setup(e, { emit: s }) {
269
- const t = s, a = Se(), l = $e(), r = k(() => {
269
+ const t = s, a = Se(), l = $e(), n = k(() => {
270
270
  const i = l.state.app;
271
- return a.state.apps.map((n) => ({
272
- ...n,
273
- current: i && n.name.toLowerCase() === i.toLowerCase()
271
+ return a.state.apps.map((r) => ({
272
+ ...r,
273
+ current: i && r.name.toLowerCase() === i.toLowerCase()
274
274
  }));
275
- }), o = (i, n) => {
275
+ }), o = (i, r) => {
276
276
  t("select", i);
277
277
  };
278
- return (i, n) => {
278
+ return (i, r) => {
279
279
  const d = L("font-awesome-icon");
280
280
  return f(), g("div", Ft, [
281
281
  c("div", At, [
282
282
  c("div", Et, [
283
283
  c("div", zt, [
284
- n[1] || (n[1] = c("div", null, "Mr Group Network", -1)),
284
+ r[1] || (r[1] = c("div", null, "Mr Group Network", -1)),
285
285
  c("div", jt, [
286
286
  v(d, {
287
287
  icon: y(H).farTimes,
288
288
  class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
289
- onClick: n[0] || (n[0] = (m) => t("close"))
289
+ onClick: r[0] || (r[0] = (m) => t("close"))
290
290
  }, null, 8, ["icon"])
291
291
  ])
292
292
  ]),
293
- (f(!0), g(B, null, A(r.value, (m) => (f(), g("a", {
293
+ (f(!0), g(B, null, A(n.value, (m) => (f(), g("a", {
294
294
  key: m.name,
295
295
  href: m.href,
296
296
  target: "_blank",
@@ -311,7 +311,7 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
311
311
  }, null, 8, ["class", "icon"])
312
312
  ])
313
313
  ], 10, It))), 128)),
314
- n[2] || (n[2] = c("div", null, null, -1))
314
+ r[2] || (r[2] = c("div", null, null, -1))
315
315
  ]),
316
316
  c("div", Kt, [
317
317
  i.$slots.bottom || e.bottomSlot ? (f(), g("div", Ut, [
@@ -334,36 +334,36 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
334
334
  () => {
335
335
  const e = z({
336
336
  brands: []
337
- }), s = (r = {}) => {
338
- if (!r.brands || !Array.isArray(r.brands)) {
337
+ }), s = (n = {}) => {
338
+ if (!n.brands || !Array.isArray(n.brands)) {
339
339
  console.warn("useSparkBrandFilterStore: No brands provided to initialize()"), e.brands = [];
340
340
  return;
341
341
  }
342
- const o = r.brands.filter((n) => {
343
- const d = n.id && n.name && n.logo;
344
- return d || console.warn("useSparkBrandFilterStore: Invalid brand object", n), d;
345
- }), i = o.filter((n) => n.current);
346
- i.length === 0 && o.length > 0 ? o[0].current = !0 : i.length > 1 && o.forEach((n) => {
347
- n.current = n === i[0];
348
- }), e.brands = o.map((n) => ({
349
- id: n.id,
350
- name: n.name,
351
- logo: n.logo,
352
- current: n.current || !1
342
+ const o = n.brands.filter((r) => {
343
+ const d = r.id && r.name && r.logo;
344
+ return d || console.warn("useSparkBrandFilterStore: Invalid brand object", r), d;
345
+ }), i = o.filter((r) => r.current);
346
+ i.length === 0 && o.length > 0 ? o[0].current = !0 : i.length > 1 && o.forEach((r) => {
347
+ r.current = r === i[0];
348
+ }), e.brands = o.map((r) => ({
349
+ id: r.id,
350
+ name: r.name,
351
+ logo: r.logo,
352
+ current: r.current || !1
353
353
  }));
354
- }, t = k(() => e.brands.find((r) => r.current) || null), a = k(() => e.brands);
354
+ }, t = k(() => e.brands.find((n) => n.current) || null), a = k(() => e.brands);
355
355
  return {
356
356
  state: e,
357
357
  initialize: s,
358
358
  currentBrand: t,
359
359
  allBrands: a,
360
- toggleBrand: (r) => {
361
- if (!r || !e.brands.includes(r)) {
360
+ toggleBrand: (n) => {
361
+ if (!n || !e.brands.includes(n)) {
362
362
  console.warn("useSparkBrandFilterStore: Invalid brand provided to toggleBrand()");
363
363
  return;
364
364
  }
365
365
  e.brands.forEach((o) => {
366
- o.current = o === r;
366
+ o.current = o === n;
367
367
  });
368
368
  }
369
369
  };
@@ -383,10 +383,10 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
383
383
  __name: "SparkBrandSelector",
384
384
  emits: ["close", "select"],
385
385
  setup(e, { emit: s }) {
386
- const t = s, a = Le(), l = (r) => {
387
- t("select", r);
386
+ const t = s, a = Le(), l = (n) => {
387
+ t("select", n);
388
388
  };
389
- return (r, o) => {
389
+ return (n, o) => {
390
390
  const i = L("font-awesome-icon");
391
391
  return f(), g("div", Xt, [
392
392
  c("div", Jt, [
@@ -397,30 +397,30 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
397
397
  v(i, {
398
398
  icon: y(H).farTimes,
399
399
  class: "size-4 text-gray-400 cursor-pointer",
400
- onClick: o[0] || (o[0] = (n) => t("close"))
400
+ onClick: o[0] || (o[0] = (r) => t("close"))
401
401
  }, null, 8, ["icon"])
402
402
  ])
403
403
  ]),
404
404
  y(a).allBrands.length === 0 ? (f(), g("div", ss, " No brands configured ")) : x("", !0),
405
- (f(!0), g(B, null, A(y(a).allBrands, (n) => (f(), g("div", {
406
- key: n.id,
407
- class: _([n.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
408
- onClick: (d) => l(n)
405
+ (f(!0), g(B, null, A(y(a).allBrands, (r) => (f(), g("div", {
406
+ key: r.id,
407
+ class: _([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
408
+ onClick: (d) => l(r)
409
409
  }, [
410
410
  c("div", os, [
411
411
  c("div", rs, [
412
412
  c("img", {
413
- src: n.logo,
414
- alt: `${n.name} logo`,
413
+ src: r.logo,
414
+ alt: `${r.name} logo`,
415
415
  class: "h-8 w-auto"
416
416
  }, null, 8, ns)
417
417
  ]),
418
418
  c("div", ls, [
419
419
  c("div", is, [
420
- c("div", cs, S(n.name), 1),
421
- n.current ? (f(), g("span", ds, " Current ")) : x("", !0)
420
+ c("div", cs, S(r.name), 1),
421
+ r.current ? (f(), g("span", ds, " Current ")) : x("", !0)
422
422
  ]),
423
- c("div", us, S(n.current ? "Current Brand" : "Change to"), 1)
423
+ c("div", us, S(r.current ? "Current Brand" : "Change to"), 1)
424
424
  ])
425
425
  ])
426
426
  ], 10, as))), 128)),
@@ -455,14 +455,14 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
455
455
  setup(e) {
456
456
  const s = e, t = $(null), a = ge("buttonGroup", null), l = k(() => {
457
457
  if (!a?.isInGroup || !t.value) return null;
458
- const n = a.getButtonIndex(t.value), d = a.getButtonCount();
458
+ const r = a.getButtonIndex(t.value), d = a.getButtonCount();
459
459
  return {
460
- isFirst: n === 0,
461
- isLast: n === d - 1,
462
- index: n,
460
+ isFirst: r === 0,
461
+ isLast: r === d - 1,
462
+ index: r,
463
463
  total: d
464
464
  };
465
- }), r = {
465
+ }), n = {
466
466
  paddingX: /^px-/,
467
467
  paddingY: /^py-/,
468
468
  paddingAll: /^p-/,
@@ -472,74 +472,74 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
472
472
  borderRadius: /^rounded-/,
473
473
  background: /^bg-/,
474
474
  text: /^text-(?!white|black)/
475
- }, o = (n, d) => {
476
- if (!d) return n;
477
- const m = n.split(" ").filter(Boolean), u = d.split(" ").filter(Boolean);
475
+ }, o = (r, d) => {
476
+ if (!d) return r;
477
+ const m = r.split(" ").filter(Boolean), u = d.split(" ").filter(Boolean);
478
478
  return [...m.filter((h) => !u.some((b) => {
479
- const N = Object.entries(r).find(
479
+ const N = Object.entries(n).find(
480
480
  ([R, J]) => J.test(h)
481
- )?.[0], C = Object.entries(r).find(
481
+ )?.[0], C = Object.entries(n).find(
482
482
  ([R, J]) => J.test(b)
483
483
  )?.[0];
484
484
  return N && N === C;
485
485
  })), ...u].join(" ");
486
486
  }, i = k(() => {
487
- let n = "", d = "";
487
+ let r = "", d = "";
488
488
  switch (s.size) {
489
489
  case "xs":
490
- n += " px-2 py-1 text-xs", d = "sm";
490
+ r += " px-2 py-1 text-xs", d = "sm";
491
491
  break;
492
492
  case "sm":
493
- n += " px-2 py-1 text-sm", d = "sm";
493
+ r += " px-2 py-1 text-sm", d = "sm";
494
494
  break;
495
495
  case "md":
496
- n += " px-2.5 py-1.5 text-sm", d = "md";
496
+ r += " px-2.5 py-1.5 text-sm", d = "md";
497
497
  break;
498
498
  case "lg":
499
- n += " px-3 py-2 text-sm", d = "md";
499
+ r += " px-3 py-2 text-sm", d = "md";
500
500
  break;
501
501
  case "xl":
502
- n += " px-3.5 py-2.5 min-h-[42px] text-sm", d = "md";
502
+ r += " px-3.5 py-2.5 min-h-[42px] text-sm", d = "md";
503
503
  break;
504
504
  }
505
505
  if (a?.isInGroup && l.value) {
506
506
  const { isFirst: m, isLast: u } = l.value;
507
- 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";
507
+ 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";
508
508
  } else
509
- n += ` shadow-xs rounded-${d}`;
509
+ r += ` shadow-xs rounded-${d}`;
510
510
  switch (s.variant) {
511
511
  case "primary":
512
- n += " bg-primary-600 hover:bg-primary-500 text-white";
512
+ r += " bg-primary-600 hover:bg-primary-500 text-white";
513
513
  break;
514
514
  case "secondary":
515
- n += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
515
+ r += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
516
516
  break;
517
517
  case "success":
518
- n += " bg-green-600 hover:bg-green-500 text-white";
518
+ r += " bg-green-600 hover:bg-green-500 text-white";
519
519
  break;
520
520
  case "warning":
521
- n += " bg-amber-600 hover:bg-amber-500 text-white";
521
+ r += " bg-amber-600 hover:bg-amber-500 text-white";
522
522
  break;
523
523
  case "danger":
524
- n += " bg-red-600 hover:bg-red-500 text-white";
524
+ r += " bg-red-600 hover:bg-red-500 text-white";
525
525
  break;
526
526
  case "info":
527
- n += " bg-cyan-600 hover:bg-cyan-500 text-white";
527
+ r += " bg-cyan-600 hover:bg-cyan-500 text-white";
528
528
  break;
529
529
  default:
530
- n += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
530
+ r += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
531
531
  }
532
- return n = o(n, s.buttonClass), n;
532
+ return r = o(r, s.buttonClass), r;
533
533
  });
534
- return (n, d) => (f(), g("button", {
534
+ return (r, d) => (f(), g("button", {
535
535
  type: "button",
536
536
  ref_key: "buttonRef",
537
537
  ref: t,
538
538
  class: _(i.value),
539
539
  disabled: e.disabled,
540
- onClick: d[0] || (d[0] = (m) => n.$emit("click"))
540
+ onClick: d[0] || (d[0] = (m) => r.$emit("click"))
541
541
  }, [
542
- T(n.$slots, "default")
542
+ T(r.$slots, "default")
543
543
  ], 10, fs));
544
544
  }
545
545
  }, ms = {
@@ -550,7 +550,7 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
550
550
  isInGroup: !0,
551
551
  getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
552
552
  getButtonCount: () => s.value?.children.length || 0
553
- }), (l, r) => (f(), g("div", {
553
+ }), (l, n) => (f(), g("div", {
554
554
  class: "inline-flex rounded-md shadow-xs",
555
555
  ref_key: "groupRef",
556
556
  ref: s
@@ -735,7 +735,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
735
735
  success: "farCheckCircle",
736
736
  warning: "farExclamationTriangle",
737
737
  danger: "farCircleXmark"
738
- }, r = k(() => s.icon || l[s.type]), o = k(() => ({
738
+ }, n = k(() => s.icon || l[s.type]), o = k(() => ({
739
739
  info: "bg-blue-100",
740
740
  success: "bg-green-100",
741
741
  warning: "bg-yellow-100",
@@ -746,20 +746,20 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
746
746
  warning: "text-yellow-400",
747
747
  danger: "text-red-400"
748
748
  })[s.type]);
749
- return (n, d) => {
749
+ return (r, d) => {
750
750
  const m = L("font-awesome-icon");
751
751
  return f(), g("div", _s, [
752
- r.value ? (f(), g("div", {
752
+ n.value ? (f(), g("div", {
753
753
  key: 0,
754
754
  class: _(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
755
755
  }, [
756
756
  v(m, {
757
- icon: y(H)[r.value],
757
+ icon: y(H)[n.value],
758
758
  class: _(["h-5 w-5", i.value])
759
759
  }, null, 8, ["icon", "class"])
760
760
  ], 2)) : x("", !0),
761
761
  c("div", {
762
- class: _(["text-center", { "mt-3 sm:mt-5": r.value }])
762
+ class: _(["text-center", { "mt-3 sm:mt-5": n.value }])
763
763
  }, [
764
764
  e.title ? (f(), g("h3", ws, S(e.title), 1)) : x("", !0),
765
765
  e.message ? (f(), g("div", {
@@ -773,7 +773,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
773
773
  (f(!0), g(B, null, A(t.value, (u, p) => (f(), V(y(F), {
774
774
  key: p,
775
775
  variant: u.variant,
776
- onClick: (h) => n.$emit(u.event, u)
776
+ onClick: (h) => r.$emit(u.event, u)
777
777
  }, {
778
778
  default: w(() => [
779
779
  P(S(u.text), 1)
@@ -799,7 +799,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
799
799
  },
800
800
  emits: ["close"],
801
801
  setup(e, { emit: s }) {
802
- const t = $(null), a = e, l = s, r = () => {
802
+ const t = $(null), a = e, l = s, n = () => {
803
803
  a.overlayInstance.close(), l("close");
804
804
  };
805
805
  return (o, i) => (f(), V(y(ke), {
@@ -810,7 +810,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
810
810
  v(y(_e), {
811
811
  initialFocus: t.value,
812
812
  class: "relative z-200",
813
- onClose: r
813
+ onClose: n
814
814
  }, {
815
815
  default: w(() => [
816
816
  v(y(te), {
@@ -874,11 +874,11 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
874
874
  return;
875
875
  const l = document.createElement("span");
876
876
  l.classList.add("spark-table-head-sorting"), l.innerHTML = ee({ prefix: "fad", iconName: "sort" }).html + ee({ prefix: "fad", iconName: "sort-up" }).html + ee({ prefix: "fad", iconName: "sort-down" }).html, a.appendChild(l), a.addEventListener("click", async () => {
877
- const r = t.params.orderBy, o = t.params.sortedBy;
878
- return r === e && o === "asc" ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
877
+ const n = t.params.orderBy, o = t.params.sortedBy;
878
+ return n === e && o === "asc" ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
879
879
  orderBy: e,
880
880
  sortedBy: "desc"
881
- })) : r === e ? (a.classList.remove("desc"), await t.methods.clearParams(["orderBy", "sortedBy"])) : (a.classList.add("asc"), t.methods.applyParams({
881
+ })) : n === e ? (a.classList.remove("desc"), await t.methods.clearParams(["orderBy", "sortedBy"])) : (a.classList.add("asc"), t.methods.applyParams({
882
882
  orderBy: e,
883
883
  sortedBy: "asc"
884
884
  }));
@@ -888,16 +888,16 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
888
888
  return;
889
889
  const a = document.createElement("div"), l = document.createElement("input");
890
890
  l.type = "text", l.placeholder = "Filter...", a.className = "spark-table-head-filter", a.appendChild(l);
891
- const r = Ce(async (o, i) => {
892
- const n = i.target.value, d = `filter[${o}]`;
893
- if (n)
894
- return t.params[d] && t.params[d] === n ? void 0 : t.methods.applyParams({
891
+ const n = Ce(async (o, i) => {
892
+ const r = i.target.value, d = `filter[${o}]`;
893
+ if (r)
894
+ return t.params[d] && t.params[d] === r ? void 0 : t.methods.applyParams({
895
895
  page: 1,
896
- [d]: n
896
+ [d]: r
897
897
  });
898
898
  await t.methods.removeParam(d);
899
899
  }, 200);
900
- l.addEventListener("keyup", (o) => r(e, o)), s.appendChild(a);
900
+ l.addEventListener("keyup", (o) => n(e, o)), s.appendChild(a);
901
901
  }, Hs = (e, s, t) => {
902
902
  e.classList.add("spark-table-head"), t && t.columnSort && e.classList.add("can-sort"), t && t.columnFilter && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
903
903
  const l = e.querySelector(".colHeader");
@@ -908,8 +908,8 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
908
908
  if (e < 0)
909
909
  return;
910
910
  let a = 2;
911
- const l = t.methods.colToProp(e), r = t.methods.getSettingsForProp(l);
912
- s.childElementCount === 1 && ((!r || !r.columnSort) && a--, (!r || !r.columnFilter) && a--, r && r.columnSort && $s(l, s, t), r && r.columnFilter && Ls(l, s, t)), (s.childElementCount === a || a === 0) && Hs(s, l, r);
911
+ const l = t.methods.colToProp(e), n = t.methods.getSettingsForProp(l);
912
+ s.childElementCount === 1 && ((!n || !n.columnSort) && a--, (!n || !n.columnFilter) && a--, n && n.columnSort && $s(l, s, t), n && n.columnFilter && Ls(l, s, t)), (s.childElementCount === a || a === 0) && Hs(s, l, n);
913
913
  }, Vs = (e) => {
914
914
  if (!e.hotInstance || !e.hotInstance.rootElement)
915
915
  return;
@@ -917,10 +917,10 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
917
917
  a.forEach((l) => {
918
918
  l.classList.remove("asc", "desc");
919
919
  }), s && t && a.forEach((l) => {
920
- const r = l.closest("th"), o = Array.from(r.parentElement.children).indexOf(r);
920
+ const n = l.closest("th"), o = Array.from(n.parentElement.children).indexOf(n);
921
921
  e.methods.colToProp(o) === s && l.classList.add(t);
922
922
  });
923
- }, Ps = (e) => (s, t, a, l, r, o, i) => {
923
+ }, Ps = (e) => (s, t, a, l, n, o, i) => {
924
924
  t.innerHTML = "", t.classList.add("spark-table-cell-actions");
925
925
  const d = (i.rendererConfig || {}).actions || [];
926
926
  if (d.length === 0)
@@ -956,7 +956,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
956
956
  purple: "bg-purple-100 text-purple-800",
957
957
  pink: "bg-pink-100 text-pink-800",
958
958
  indigo: "bg-indigo-100 text-indigo-800"
959
- }, Rs = (e) => (s, t, a, l, r, o, i) => {
959
+ }, Rs = (e) => (s, t, a, l, n, o, i) => {
960
960
  if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !o)
961
961
  return;
962
962
  const d = (i.rendererConfig || {}).colorMap || {}, m = d[o] || d[o?.toLowerCase()] || "gray", u = de[m] || de.gray, p = document.createElement("span");
@@ -971,32 +971,32 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
971
971
  "capitalize",
972
972
  ...u.split(" ")
973
973
  ), p.textContent = o, t.appendChild(p);
974
- }, Bs = (e) => (s, t, a, l, r, o, i) => {
974
+ }, Bs = (e) => (s, t, a, l, n, o, i) => {
975
975
  if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !o)
976
976
  return;
977
- const n = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a));
977
+ const r = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a));
978
978
  let m = o;
979
- 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));
979
+ r.href && (typeof r.href == "function" ? m = r.href(d) : r.href === "email" ? m = `mailto:${o}` : r.href === "tel" ? m = `tel:${o}` : typeof r.href == "string" && (m = d[r.href] || o));
980
980
  const u = document.createElement("a");
981
- 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) => {
981
+ u.href = m, u.textContent = o, 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) => {
982
982
  p.stopPropagation();
983
983
  }), t.appendChild(u);
984
984
  }, ue = {
985
985
  sm: "h-6 w-6",
986
986
  md: "h-8 w-8",
987
987
  lg: "h-12 w-12"
988
- }, Ms = (e) => (s, t, a, l, r, o, i) => {
988
+ }, Ms = (e) => (s, t, a, l, n, o, i) => {
989
989
  if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !o)
990
990
  return;
991
- const n = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a)), m = n.size || "md", u = ue[m] || ue.md, p = n.rounded !== !1;
992
- let h = n.alt || "";
993
- typeof n.alt == "string" && d[n.alt] && (h = d[n.alt]);
991
+ const r = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a)), m = r.size || "md", u = ue[m] || ue.md, p = r.rounded !== !1;
992
+ let h = r.alt || "";
993
+ typeof r.alt == "string" && d[r.alt] && (h = d[r.alt]);
994
994
  const b = document.createElement("img");
995
995
  b.src = o, b.alt = h, b.classList.add(...u.split(" "), "object-cover"), p ? b.classList.add("rounded-full") : b.classList.add("rounded"), t.appendChild(b);
996
- }, Fs = (e) => (s, t, a, l, r, o, i) => {
996
+ }, Fs = (e) => (s, t, a, l, n, o, i) => {
997
997
  if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !o)
998
998
  return;
999
- const n = i.rendererConfig || {}, d = n.format || "short", m = n.locale || "en-US";
999
+ const r = i.rendererConfig || {}, d = r.format || "short", m = r.locale || "en-US";
1000
1000
  let u = o;
1001
1001
  try {
1002
1002
  const h = new Date(o);
@@ -1012,15 +1012,15 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1012
1012
  p.textContent = u, t.appendChild(p);
1013
1013
  };
1014
1014
  function As(e) {
1015
- 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;
1016
- 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" : ""}`;
1015
+ const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60), n = Math.floor(l / 60), o = Math.floor(n / 24), i = Math.floor(o / 30), r = Math.floor(o / 365), d = t > 0;
1016
+ return a < 60 ? d ? "just now" : "in a moment" : l < 60 ? d ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : n < 24 ? d ? `${n} hour${n > 1 ? "s" : ""} ago` : `in ${n} hour${n > 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 ? `${r} year${r > 1 ? "s" : ""} ago` : `in ${r} year${r > 1 ? "s" : ""}`;
1017
1017
  }
1018
1018
  const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1019
- St(e, (t, a, l, r, o, i, n) => {
1020
- $t.apply(null, [t, a, l, r, o, i, n]), s(t, a, l, r, o, i, n);
1019
+ St(e, (t, a, l, n, o, i, r) => {
1020
+ $t.apply(null, [t, a, l, n, o, i, r]), s(t, a, l, n, o, i, r);
1021
1021
  }), Es.set(e, s);
1022
1022
  }, zs = (e) => {
1023
- D("spark.actions", Ps(e)), D("spark.badge", Rs()), D("spark.link", Bs()), D("spark.image", Ms()), D("spark.date", Fs()), D("style.capitalize", (s, t, a, l, r, o) => {
1023
+ D("spark.actions", Ps(e)), D("spark.badge", Rs()), D("spark.link", Bs()), D("spark.image", Ms()), D("spark.date", Fs()), D("style.capitalize", (s, t, a, l, n, o) => {
1024
1024
  if (!o || o.length === 0) {
1025
1025
  t.innerText = "";
1026
1026
  return;
@@ -1072,15 +1072,15 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1072
1072
  emits: ["paginate"],
1073
1073
  setup(e, { emit: s }) {
1074
1074
  const t = e, a = s, l = (m) => {
1075
- r(t.sparkTable.params.page + m);
1076
- }, r = (m) => {
1075
+ n(t.sparkTable.params.page + m);
1076
+ }, n = (m) => {
1077
1077
  m < 1 || m > t.sparkTable.response.meta.last_page || a("paginate", {
1078
1078
  page: m
1079
1079
  });
1080
1080
  }, o = k(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = k(() => t.sparkTable.computed.ready ? ht(
1081
1081
  Math.floor((o.value - 1) / 10) * 10 + 1,
1082
1082
  o.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : o.value + 1
1083
- ) : []), n = k(
1083
+ ) : []), r = k(
1084
1084
  () => t.sparkTable.params.page < q(t.sparkTable.response.meta, "last_page", 1)
1085
1085
  ), d = k(() => t.sparkTable.params.page > 1);
1086
1086
  return (m, u) => {
@@ -1107,10 +1107,10 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1107
1107
  "relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
1108
1108
  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"
1109
1109
  ]),
1110
- onClick: (b) => r(h)
1110
+ onClick: (b) => n(h)
1111
1111
  }, S(h), 11, Ys))), 128)),
1112
1112
  c("a", {
1113
- 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"]),
1113
+ 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"]),
1114
1114
  onClick: u[1] || (u[1] = j((h) => l(1), ["prevent"])),
1115
1115
  href: "#"
1116
1116
  }, [
@@ -1144,23 +1144,23 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1144
1144
  const t = e, a = s, l = k(() => t.sparkTable.options.perPages.map((o) => ({
1145
1145
  label: String(o),
1146
1146
  value: o
1147
- }))), r = (o) => {
1147
+ }))), n = (o) => {
1148
1148
  a("paginate", {
1149
1149
  page: 1,
1150
1150
  limit: parseInt(o)
1151
1151
  });
1152
1152
  };
1153
1153
  return (o, i) => {
1154
- const n = L("FormKit");
1154
+ const r = L("FormKit");
1155
1155
  return f(), g("div", Js, [
1156
- v(n, {
1156
+ v(r, {
1157
1157
  "model-value": e.sparkTable.params.limit,
1158
1158
  type: "select",
1159
1159
  options: l.value,
1160
1160
  "outer-class": "!mb-0",
1161
1161
  "wrapper-class": "!mb-0",
1162
1162
  "input-class": "!py-2",
1163
- onInput: r
1163
+ onInput: n
1164
1164
  }, null, 8, ["model-value", "options"])
1165
1165
  ]);
1166
1166
  };
@@ -1176,14 +1176,14 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1176
1176
  },
1177
1177
  setup(e) {
1178
1178
  const s = e, t = ve(), a = k(() => !!t.default), l = k(() => {
1179
- const r = "spark-table-toolbar flex flex-wrap items-center gap-x-5 px-5 w-full";
1180
- return s.position === "footer" ? `${r} spark-table-toolbar-footer justify-between` : `${r} spark-table-toolbar-header gap-y-5 py-5`;
1179
+ const n = "spark-table-toolbar flex flex-wrap items-center gap-x-5 px-5 w-full";
1180
+ return s.position === "footer" ? `${n} spark-table-toolbar-footer justify-between` : `${n} spark-table-toolbar-header gap-y-5 py-5`;
1181
1181
  });
1182
- return (r, o) => a.value ? (f(), g("div", {
1182
+ return (n, o) => a.value ? (f(), g("div", {
1183
1183
  key: 0,
1184
1184
  class: _(l.value)
1185
1185
  }, [
1186
- T(r.$slots, "default")
1186
+ T(n.$slots, "default")
1187
1187
  ], 2)) : x("", !0);
1188
1188
  }
1189
1189
  }, ta = { class: "spark-table-search" }, sa = {
@@ -1205,31 +1205,33 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1205
1205
  }
1206
1206
  },
1207
1207
  setup(e) {
1208
- const s = e, t = $("");
1209
- s.sparkTable.params[s.config.param] && (t.value = s.sparkTable.params[s.config.param]);
1210
- const a = Ce((r) => {
1211
- r ? s.sparkTable.methods.applyParams({
1208
+ const s = e, t = $(""), a = s.config.param || "search";
1209
+ s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
1210
+ [a]: s.config.initialValue
1211
+ }));
1212
+ const l = Ce((o) => {
1213
+ o ? s.sparkTable.methods.applyParams({
1212
1214
  page: 1,
1213
- [s.config.param]: r
1214
- }) : s.sparkTable.methods.removeParam(s.config.param);
1215
+ [a]: o
1216
+ }) : s.sparkTable.methods.removeParam(a);
1215
1217
  }, s.config.debounce || 300);
1216
- E(t, (r) => {
1217
- a(r);
1218
+ E(t, (o) => {
1219
+ l(o);
1218
1220
  });
1219
- const l = s.config.placeholder || "Search...";
1221
+ const n = s.config.placeholder || "Search...";
1220
1222
  return E(
1221
- () => s.sparkTable.params[s.config.param],
1222
- (r) => {
1223
- !r && t.value && (t.value = "");
1223
+ () => s.sparkTable.params[a],
1224
+ (o) => {
1225
+ !o && t.value && (t.value = "");
1224
1226
  }
1225
- ), (r, o) => {
1226
- const i = L("FormKit");
1227
+ ), (o, i) => {
1228
+ const r = L("FormKit");
1227
1229
  return f(), g("div", ta, [
1228
- v(i, Y({
1230
+ v(r, Y({
1229
1231
  modelValue: t.value,
1230
- "onUpdate:modelValue": o[0] || (o[0] = (n) => t.value = n),
1232
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1231
1233
  type: "text",
1232
- placeholder: y(l),
1234
+ placeholder: y(n),
1233
1235
  "outer-class": "!mb-0",
1234
1236
  "wrapper-class": "!mb-0",
1235
1237
  "input-class": "!w-64 !pr-8"
@@ -1237,7 +1239,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1237
1239
  ]);
1238
1240
  };
1239
1241
  }
1240
- }, aa = /* @__PURE__ */ O(sa, [["__scopeId", "data-v-1dde9add"]]), oa = { class: "spark-table-filter-select" }, ra = {
1242
+ }, aa = /* @__PURE__ */ O(sa, [["__scopeId", "data-v-781e7d17"]]), oa = { class: "spark-table-filter-select" }, ra = {
1241
1243
  __name: "SparkTableFilterSelect",
1242
1244
  props: {
1243
1245
  /** SparkTable instance object */
@@ -1254,8 +1256,10 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1254
1256
  },
1255
1257
  setup(e) {
1256
1258
  const s = e, t = $(""), a = s.config.param || `filter[${s.config.key}]`;
1257
- s.sparkTable.params[a] && (t.value = s.sparkTable.params[a]);
1258
- const l = s.config.label || null, r = k(() => [
1259
+ s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue !== void 0 && s.config.initialValue !== null && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
1260
+ [a]: s.config.initialValue
1261
+ }));
1262
+ const l = s.config.label || null, n = k(() => [
1259
1263
  { label: s.config.placeholder || "All", value: "" },
1260
1264
  ...s.config.options
1261
1265
  ]);
@@ -1270,14 +1274,14 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1270
1274
  !o && t.value && (t.value = "");
1271
1275
  }
1272
1276
  ), (o, i) => {
1273
- const n = L("FormKit");
1277
+ const r = L("FormKit");
1274
1278
  return f(), g("div", oa, [
1275
- v(n, Y({
1279
+ v(r, Y({
1276
1280
  modelValue: t.value,
1277
1281
  "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1278
1282
  type: "select",
1279
1283
  label: y(l),
1280
- options: r.value,
1284
+ options: n.value,
1281
1285
  placeholder: e.config.placeholder || "All",
1282
1286
  "outer-class": "!mb-0",
1283
1287
  "wrapper-class": "!mb-0"
@@ -1285,7 +1289,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1285
1289
  ]);
1286
1290
  };
1287
1291
  }
1288
- }, na = /* @__PURE__ */ O(ra, [["__scopeId", "data-v-2d4b75c0"]]), la = { class: "spark-table-filter-buttons" }, ia = {
1292
+ }, na = /* @__PURE__ */ O(ra, [["__scopeId", "data-v-8840f892"]]), la = { class: "spark-table-filter-buttons" }, ia = {
1289
1293
  key: 0,
1290
1294
  class: "spark-table-filter-buttons-label"
1291
1295
  }, ca = {
@@ -1305,8 +1309,10 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1305
1309
  },
1306
1310
  setup(e) {
1307
1311
  const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1308
- s.sparkTable.params[l] !== void 0 && (t.value = s.sparkTable.params[l]);
1309
- const r = (i) => i == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === i, o = (i) => {
1312
+ s.sparkTable.params[l] !== void 0 ? t.value = s.sparkTable.params[l] : s.config.initialValue !== void 0 && (t.value = s.config.initialValue, s.config.initialValue !== null && s.sparkTable.methods.applyParams({
1313
+ [l]: s.config.initialValue
1314
+ }));
1315
+ const n = (i) => i == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === i, o = (i) => {
1310
1316
  t.value = i, i == null || i === "" ? s.sparkTable.methods.removeParam(l) : s.sparkTable.methods.applyParams({
1311
1317
  page: 1,
1312
1318
  [l]: i
@@ -1317,14 +1323,14 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1317
1323
  (i) => {
1318
1324
  (i == null || i === "") && t.value ? t.value = null : i !== t.value && (t.value = i);
1319
1325
  }
1320
- ), (i, n) => (f(), g("div", la, [
1326
+ ), (i, r) => (f(), g("div", la, [
1321
1327
  y(a) ? (f(), g("span", ia, S(y(a)), 1)) : x("", !0),
1322
1328
  v(ms, { class: "isolate" }, {
1323
1329
  default: w(() => [
1324
1330
  (f(!0), g(B, null, A(e.config.options, (d) => (f(), V(F, {
1325
1331
  key: d.value,
1326
1332
  size: "xl",
1327
- variant: r(d.value) ? "primary" : "secondary",
1333
+ variant: n(d.value) ? "primary" : "secondary",
1328
1334
  onClick: (m) => o(d.value)
1329
1335
  }, {
1330
1336
  default: w(() => [
@@ -1337,7 +1343,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1337
1343
  })
1338
1344
  ]));
1339
1345
  }
1340
- }, da = /* @__PURE__ */ O(ca, [["__scopeId", "data-v-6de993cd"]]), ua = { class: "spark-table-date-picker" }, pa = {
1346
+ }, da = /* @__PURE__ */ O(ca, [["__scopeId", "data-v-0fcd0cce"]]), ua = { class: "spark-table-date-picker" }, pa = {
1341
1347
  __name: "SparkTableDatePicker",
1342
1348
  props: {
1343
1349
  /** SparkTable instance object */
@@ -1353,8 +1359,10 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1353
1359
  }
1354
1360
  },
1355
1361
  setup(e) {
1356
- const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, r = $(`${l}-0`);
1357
- return t.value = s.sparkTable.params[l] || null, E(t, (o) => {
1362
+ const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = $(`${l}-0`);
1363
+ return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
1364
+ [l]: s.config.initialValue
1365
+ })) : t.value = null, E(t, (o) => {
1358
1366
  o ? s.sparkTable.methods.applyParams({
1359
1367
  page: 1,
1360
1368
  [l]: o
@@ -1364,15 +1372,15 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1364
1372
  (o) => {
1365
1373
  if ((o == null || o === "") && t.value) {
1366
1374
  t.value = null;
1367
- const i = parseInt(r.value.split("-").pop()) || 0;
1368
- r.value = `${l}-${i + 1}`;
1375
+ const i = parseInt(n.value.split("-").pop()) || 0;
1376
+ n.value = `${l}-${i + 1}`;
1369
1377
  } else o && o !== t.value && (t.value = o);
1370
1378
  }
1371
1379
  ), (o, i) => {
1372
- const n = L("FormKit");
1380
+ const r = L("FormKit");
1373
1381
  return f(), g("div", ua, [
1374
- (f(), V(n, Y({
1375
- key: r.value,
1382
+ (f(), V(r, Y({
1383
+ key: n.value,
1376
1384
  modelValue: t.value,
1377
1385
  "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1378
1386
  type: "datepicker",
@@ -1388,7 +1396,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1388
1396
  ]);
1389
1397
  };
1390
1398
  }
1391
- }, fa = /* @__PURE__ */ O(pa, [["__scopeId", "data-v-f10ddb60"]]), ma = { class: "spark-table-reset" }, ga = { key: 1 }, ha = {
1399
+ }, fa = /* @__PURE__ */ O(pa, [["__scopeId", "data-v-44ef9cb8"]]), ma = { class: "spark-table-reset" }, ga = { key: 1 }, ha = {
1392
1400
  __name: "SparkTableReset",
1393
1401
  props: {
1394
1402
  /** SparkTable instance object */
@@ -1410,21 +1418,21 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1410
1418
  if (i.type === "search")
1411
1419
  i.param && l.push(i.param);
1412
1420
  else if (i.type === "filterSelect" || i.type === "filterButtons") {
1413
- const n = i.param || `filter[${i.key}]`;
1414
- l.push(n);
1421
+ const r = i.param || `filter[${i.key}]`;
1422
+ l.push(r);
1415
1423
  } else if (i.type === "datePicker") {
1416
- const n = i.param || `filter[${i.key}]`;
1417
- l.push(n);
1424
+ const r = i.param || `filter[${i.key}]`;
1425
+ l.push(r);
1418
1426
  }
1419
1427
  }
1420
1428
  });
1421
- const r = l.filter(
1429
+ const n = l.filter(
1422
1430
  (o) => s.sparkTable.params[o] !== void 0 && s.sparkTable.params[o] !== null && s.sparkTable.params[o] !== ""
1423
1431
  );
1424
- r.length !== 0 && s.sparkTable.methods.clearParams(r);
1432
+ n.length !== 0 && s.sparkTable.methods.clearParams(n);
1425
1433
  };
1426
1434
  return (a, l) => {
1427
- const r = L("font-awesome-icon");
1435
+ const n = L("font-awesome-icon");
1428
1436
  return f(), g("div", ma, [
1429
1437
  v(F, {
1430
1438
  onClick: t,
@@ -1432,7 +1440,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1432
1440
  size: "xl"
1433
1441
  }, {
1434
1442
  default: w(() => [
1435
- e.config.icon ? (f(), V(r, {
1443
+ e.config.icon ? (f(), V(n, {
1436
1444
  key: 0,
1437
1445
  icon: ["far", e.config.icon],
1438
1446
  class: _({ "mr-1.5": e.config.label })
@@ -1472,7 +1480,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1472
1480
  dataTransformer: {
1473
1481
  type: Function,
1474
1482
  default: (e, s) => ({
1475
- data: q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((r) => a[r])) : e.data.data,
1483
+ data: q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((n) => a[n])) : e.data.data,
1476
1484
  meta: {
1477
1485
  last_page: e.data.last_page,
1478
1486
  from: e.data.from,
@@ -1517,7 +1525,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1517
1525
  setup(e, { expose: s, emit: t }) {
1518
1526
  const a = e;
1519
1527
  Ct(), Q(xt), Q(kt), Q(_t), q(a, "settings.nestedHeaders") && Q(wt);
1520
- const l = t, r = ge("axios"), o = $(null), i = $(!1), n = $(null), d = {
1528
+ const l = t, n = ge("axios"), o = $(null), i = $(!1), r = $(null), d = {
1521
1529
  search: aa,
1522
1530
  filterSelect: na,
1523
1531
  filterButtons: da,
@@ -1544,13 +1552,13 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1544
1552
  },
1545
1553
  loadTable: async (p) => {
1546
1554
  if (!(!o.value || !o.value.hotInstance)) {
1547
- i.value = !0, n.value = null, l("loading", !0), ae.start(), u.hotInstance = o.value.hotInstance;
1555
+ i.value = !0, r.value = null, l("loading", !0), ae.start(), u.hotInstance = o.value.hotInstance;
1548
1556
  try {
1549
1557
  if (a.dataProvider) {
1550
1558
  const b = await a.dataProvider(u.computed.params);
1551
1559
  u.response = a.dataTransformer(b, a);
1552
1560
  } else if (a.url) {
1553
- const b = await r.get(a.url, {
1561
+ const b = await n.get(a.url, {
1554
1562
  params: u.computed.params
1555
1563
  });
1556
1564
  u.response = a.dataTransformer(b, a);
@@ -1563,7 +1571,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1563
1571
  meta: u.response.meta
1564
1572
  }), p && typeof p == "function" && p();
1565
1573
  } catch (h) {
1566
- n.value = h, l("error", h), console.error("Error loading table data:", h);
1574
+ r.value = h, l("error", h), console.error("Error loading table data:", h);
1567
1575
  } finally {
1568
1576
  i.value = !1, l("loading", !1), ae.done();
1569
1577
  }
@@ -1633,7 +1641,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1633
1641
  clearParams: (p) => u.methods.clearParams(p),
1634
1642
  applyParams: (p) => u.methods.applyParams(p),
1635
1643
  loading: i,
1636
- error: n,
1644
+ error: r,
1637
1645
  sparkTable: u,
1638
1646
  table: o
1639
1647
  }), (p, h) => (f(), g("div", va, [
@@ -1651,7 +1659,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1651
1659
  T(p.$slots, "header", {
1652
1660
  sparkTable: u,
1653
1661
  loading: i.value,
1654
- error: n.value
1662
+ error: r.value
1655
1663
  })
1656
1664
  ]),
1657
1665
  _: 3
@@ -1680,7 +1688,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1680
1688
  T(p.$slots, "footer", {
1681
1689
  sparkTable: u,
1682
1690
  loading: i.value,
1683
- error: n.value
1691
+ error: r.value
1684
1692
  })
1685
1693
  ])
1686
1694
  ]),
@@ -1701,8 +1709,8 @@ function me() {
1701
1709
  e.isVisible = !1, e.content = null, e.props = {}, e.eventHandlers = {};
1702
1710
  }, a = () => {
1703
1711
  e.isVisible = !0;
1704
- }, l = (o, i = {}, n = {}) => {
1705
- e.content = he(o), e.props = i, e.eventHandlers = n;
1712
+ }, l = (o, i = {}, r = {}) => {
1713
+ e.content = he(o), e.props = i, e.eventHandlers = r;
1706
1714
  };
1707
1715
  return {
1708
1716
  state: e,
@@ -1710,8 +1718,8 @@ function me() {
1710
1718
  close: t,
1711
1719
  open: a,
1712
1720
  setContent: l,
1713
- show: (o, i = {}, n = {}) => {
1714
- o && l(o, i, n), a();
1721
+ show: (o, i = {}, r = {}) => {
1722
+ o && l(o, i, r), a();
1715
1723
  }
1716
1724
  };
1717
1725
  }
@@ -1780,7 +1788,7 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
1780
1788
  },
1781
1789
  emits: ["overlayClose"],
1782
1790
  setup(e, { emit: s }) {
1783
- const t = e, a = s, l = ve(), r = Le(), o = Se(), i = k(() => o.getAppIcon(t.appStore.state.app)), n = () => {
1791
+ const t = e, a = s, l = ve(), n = Le(), o = Se(), i = k(() => o.getAppIcon(t.appStore.state.app)), r = () => {
1784
1792
  const p = {};
1785
1793
  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(Yt, p, {
1786
1794
  select: (h) => {
@@ -1793,7 +1801,7 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
1793
1801
  {},
1794
1802
  {
1795
1803
  select: (p) => {
1796
- r.toggleBrand(p), Z.closeLeft();
1804
+ n.toggleBrand(p), Z.closeLeft();
1797
1805
  }
1798
1806
  }
1799
1807
  );
@@ -1916,9 +1924,9 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
1916
1924
  class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
1917
1925
  onClick: d
1918
1926
  }, [
1919
- y(r).currentBrand ? (f(), g("img", {
1927
+ y(n).currentBrand ? (f(), g("img", {
1920
1928
  key: 0,
1921
- src: y(r).currentBrand.logo,
1929
+ src: y(n).currentBrand.logo,
1922
1930
  alt: "",
1923
1931
  class: "h-[30px] w-auto"
1924
1932
  }, null, 8, za)) : x("", !0)
@@ -1930,7 +1938,7 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
1930
1938
  key: 0,
1931
1939
  class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
1932
1940
  type: "button",
1933
- onClick: n
1941
+ onClick: r
1934
1942
  }, [
1935
1943
  v(b, {
1936
1944
  icon: y(H).farGripDotsVertical,
@@ -1975,12 +1983,12 @@ const wr = /* @__PURE__ */ O(Oa, [["render", Da]]), Za = (e) => {
1975
1983
  maxAge: a = 31536e3,
1976
1984
  // 365 days in seconds
1977
1985
  domain: l = He(),
1978
- secure: r = !0,
1986
+ secure: n = !0,
1979
1987
  sameSite: o = "Lax",
1980
1988
  path: i = "/"
1981
1989
  } = t;
1982
- let n = `${e}=${s}; max-age=${a}; path=${i}; samesite=${o}`;
1983
- l && (n += `; domain=${l}`), r && (n += "; secure"), document.cookie = n;
1990
+ let r = `${e}=${s}; max-age=${a}; path=${i}; samesite=${o}`;
1991
+ l && (r += `; domain=${l}`), n && (r += "; secure"), document.cookie = r;
1984
1992
  }, Ga = (e, s = {}) => {
1985
1993
  const { domain: t = He(), path: a = "/" } = s;
1986
1994
  let l = `${e}=; max-age=0; path=${a}`;
@@ -2049,7 +2057,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2049
2057
  qa(re, d), e.token = d;
2050
2058
  }, a = () => {
2051
2059
  Ga(re), e.token = null;
2052
- }, l = () => Za(re), r = async (d) => {
2060
+ }, l = () => Za(re), n = async (d) => {
2053
2061
  const m = await K.post(e.endpoints.login, d), u = m.headers.authorization;
2054
2062
  return t(u), e.user = m.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(m.data), m.data;
2055
2063
  }, o = async () => {
@@ -2084,14 +2092,14 @@ const re = "bolt-next-token", M = X("auth", () => {
2084
2092
  } finally {
2085
2093
  e.ready = !0;
2086
2094
  }
2087
- }, n = k(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2095
+ }, r = k(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2088
2096
  return {
2089
2097
  state: e,
2090
2098
  initialize: s,
2091
- login: r,
2099
+ login: n,
2092
2100
  logout: o,
2093
2101
  fetchUser: i,
2094
- check: n,
2102
+ check: r,
2095
2103
  setTokenCookie: t,
2096
2104
  clearTokenCookie: a,
2097
2105
  getTokenCookie: l
@@ -2123,7 +2131,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2123
2131
  }
2124
2132
  },
2125
2133
  setup(e) {
2126
- const s = I(), t = se(), a = $e(), l = M(), r = e, o = $(!1), i = $(""), n = async (d) => {
2134
+ const s = I(), t = se(), a = $e(), l = M(), n = e, o = $(!1), i = $(""), r = async (d) => {
2127
2135
  o.value = !0, i.value = "";
2128
2136
  try {
2129
2137
  await l.login(d);
@@ -2135,7 +2143,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2135
2143
  }
2136
2144
  await s.push(m);
2137
2145
  } else
2138
- await s.push(r.defaultRedirect);
2146
+ await s.push(n.defaultRedirect);
2139
2147
  } catch (m) {
2140
2148
  i.value = m.response?.data?.message || m.message || "Login failed. Please try again.";
2141
2149
  } finally {
@@ -2146,9 +2154,9 @@ const re = "bolt-next-token", M = X("auth", () => {
2146
2154
  const u = L("FormKit"), p = L("router-link");
2147
2155
  return f(), g("div", Wa, [
2148
2156
  c("div", Ya, [
2149
- r.logo ? (f(), g("img", {
2157
+ n.logo ? (f(), g("img", {
2150
2158
  key: 0,
2151
- src: r.logo,
2159
+ src: n.logo,
2152
2160
  alt: "Logo",
2153
2161
  class: "h-[23px] w-auto"
2154
2162
  }, null, 8, Xa)) : (f(), g("svg", Ja, [...m[0] || (m[0] = [
@@ -2177,7 +2185,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2177
2185
  ]),
2178
2186
  v(u, {
2179
2187
  type: "form",
2180
- onSubmit: n,
2188
+ onSubmit: r,
2181
2189
  actions: !1
2182
2190
  }, {
2183
2191
  default: w(() => [
@@ -2202,7 +2210,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2202
2210
  c("div", so, [
2203
2211
  m[3] || (m[3] = c("span", null, null, -1)),
2204
2212
  v(p, {
2205
- to: r.forgotPasswordRoute,
2213
+ to: n.forgotPasswordRoute,
2206
2214
  class: "text-sm text-primary-600 font-semibold"
2207
2215
  }, {
2208
2216
  default: w(() => [...m[2] || (m[2] = [
@@ -2242,9 +2250,9 @@ const re = "bolt-next-token", M = X("auth", () => {
2242
2250
  const s = I(), t = se(), a = M(), l = e;
2243
2251
  return be(async () => {
2244
2252
  await a.logout();
2245
- const r = t.query.redirect;
2246
- r && r.startsWith("http") ? window.location.href = r : await s.push(r || l.defaultRedirect);
2247
- }), (r, o) => null;
2253
+ const n = t.query.redirect;
2254
+ n && n.startsWith("http") ? window.location.href = n : await s.push(n || l.defaultRedirect);
2255
+ }), (n, o) => null;
2248
2256
  }
2249
2257
  }, io = { class: "h-full grid place-content-center relative" }, co = { class: "absolute top-8 left-8" }, uo = ["src"], po = {
2250
2258
  key: 1,
@@ -2272,17 +2280,17 @@ const re = "bolt-next-token", M = X("auth", () => {
2272
2280
  }
2273
2281
  },
2274
2282
  setup(e) {
2275
- const s = M(), t = e, a = $(!1), l = $(""), r = $(""), o = async ({ email: i }) => {
2276
- a.value = !0, l.value = "", r.value = "";
2283
+ const s = M(), t = e, a = $(!1), l = $(""), n = $(""), o = async ({ email: i }) => {
2284
+ a.value = !0, l.value = "", n.value = "";
2277
2285
  try {
2278
- await K.post(s.state.endpoints.passwordEmail, { email: i }), r.value = "Password reset link sent! Check your email.";
2279
- } catch (n) {
2280
- l.value = n.response?.data?.message || "Failed to send reset link.";
2286
+ await K.post(s.state.endpoints.passwordEmail, { email: i }), n.value = "Password reset link sent! Check your email.";
2287
+ } catch (r) {
2288
+ l.value = r.response?.data?.message || "Failed to send reset link.";
2281
2289
  } finally {
2282
2290
  a.value = !1;
2283
2291
  }
2284
2292
  };
2285
- return (i, n) => {
2293
+ return (i, r) => {
2286
2294
  const d = L("FormKit"), m = L("router-link");
2287
2295
  return f(), g("div", io, [
2288
2296
  c("div", co, [
@@ -2291,7 +2299,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2291
2299
  src: t.logo,
2292
2300
  alt: "Logo",
2293
2301
  class: "h-[23px] w-auto"
2294
- }, null, 8, uo)) : (f(), g("svg", po, [...n[0] || (n[0] = [
2302
+ }, null, 8, uo)) : (f(), g("svg", po, [...r[0] || (r[0] = [
2295
2303
  c("path", {
2296
2304
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2297
2305
  fill: "#1C64F2"
@@ -2311,7 +2319,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2311
2319
  ])]))
2312
2320
  ]),
2313
2321
  c("div", fo, [
2314
- n[2] || (n[2] = c("div", { class: "mb-7" }, [
2322
+ r[2] || (r[2] = c("div", { class: "mb-7" }, [
2315
2323
  c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
2316
2324
  c("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
2317
2325
  ], -1)),
@@ -2330,7 +2338,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2330
2338
  "outer-class": "max-w-full"
2331
2339
  }),
2332
2340
  l.value ? (f(), g("div", mo, S(l.value), 1)) : x("", !0),
2333
- r.value ? (f(), g("div", go, S(r.value), 1)) : x("", !0),
2341
+ n.value ? (f(), g("div", go, S(n.value), 1)) : x("", !0),
2334
2342
  v(y(F), {
2335
2343
  type: "submit",
2336
2344
  size: "xl",
@@ -2346,7 +2354,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2346
2354
  to: t.loginRoute,
2347
2355
  class: "text-sm text-center text-primary-600 font-semibold block"
2348
2356
  }, {
2349
- default: w(() => [...n[1] || (n[1] = [
2357
+ default: w(() => [...r[1] || (r[1] = [
2350
2358
  P(" Back to login ", -1)
2351
2359
  ])]),
2352
2360
  _: 1
@@ -2381,22 +2389,22 @@ const re = "bolt-next-token", M = X("auth", () => {
2381
2389
  }
2382
2390
  },
2383
2391
  setup(e) {
2384
- const s = I(), t = se(), a = M(), l = e, r = $(!1), o = $(""), i = async ({ password: n, password_confirmation: d }) => {
2385
- r.value = !0, o.value = "";
2392
+ const s = I(), t = se(), a = M(), l = e, n = $(!1), o = $(""), i = async ({ password: r, password_confirmation: d }) => {
2393
+ n.value = !0, o.value = "";
2386
2394
  try {
2387
2395
  await K.post(a.state.endpoints.passwordReset, {
2388
2396
  email: t.query.email,
2389
2397
  token: t.query.token,
2390
- password: n,
2398
+ password: r,
2391
2399
  password_confirmation: d
2392
2400
  }), await s.push(l.loginRoute);
2393
2401
  } catch (m) {
2394
2402
  o.value = m.response?.data?.message || "Failed to reset password.";
2395
2403
  } finally {
2396
- r.value = !1;
2404
+ n.value = !1;
2397
2405
  }
2398
2406
  };
2399
- return (n, d) => {
2407
+ return (r, d) => {
2400
2408
  const m = L("FormKit");
2401
2409
  return f(), g("div", bo, [
2402
2410
  c("div", xo, [
@@ -2455,11 +2463,11 @@ const re = "bolt-next-token", M = X("auth", () => {
2455
2463
  v(y(F), {
2456
2464
  type: "submit",
2457
2465
  size: "xl",
2458
- disabled: r.value,
2466
+ disabled: n.value,
2459
2467
  "button-class": "w-full mb-2"
2460
2468
  }, {
2461
2469
  default: w(() => [
2462
- r.value ? (f(), g("span", $o, "Resetting...")) : (f(), g("span", So, "Reset password"))
2470
+ n.value ? (f(), g("span", $o, "Resetting...")) : (f(), g("span", So, "Reset password"))
2463
2471
  ]),
2464
2472
  _: 1
2465
2473
  }, 8, ["disabled"])
@@ -2493,14 +2501,14 @@ const re = "bolt-next-token", M = X("auth", () => {
2493
2501
  const s = I(), t = e, a = () => {
2494
2502
  s.push(t.homeRoute);
2495
2503
  };
2496
- return (l, r) => (f(), g("div", Ho, [
2504
+ return (l, n) => (f(), g("div", Ho, [
2497
2505
  c("div", To, [
2498
2506
  t.logo ? (f(), g("img", {
2499
2507
  key: 0,
2500
2508
  src: t.logo,
2501
2509
  alt: "Logo",
2502
2510
  class: "h-[23px] w-auto"
2503
- }, null, 8, Vo)) : (f(), g("svg", Po, [...r[0] || (r[0] = [
2511
+ }, null, 8, Vo)) : (f(), g("svg", Po, [...n[0] || (n[0] = [
2504
2512
  c("path", {
2505
2513
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2506
2514
  fill: "#1C64F2"
@@ -2520,7 +2528,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2520
2528
  ])]))
2521
2529
  ]),
2522
2530
  c("div", Ro, [
2523
- r[2] || (r[2] = c("div", null, [
2531
+ n[2] || (n[2] = c("div", null, [
2524
2532
  c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
2525
2533
  c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
2526
2534
  c("p", { class: "text-gray-600" }, [
@@ -2534,7 +2542,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2534
2542
  onClick: a,
2535
2543
  size: "lg"
2536
2544
  }, {
2537
- default: w(() => [...r[1] || (r[1] = [
2545
+ default: w(() => [...n[1] || (n[1] = [
2538
2546
  P(" Go to Home ", -1)
2539
2547
  ])]),
2540
2548
  _: 1
@@ -2566,14 +2574,14 @@ const re = "bolt-next-token", M = X("auth", () => {
2566
2574
  const s = I(), t = e, a = () => {
2567
2575
  s.push(t.homeRoute);
2568
2576
  };
2569
- return (l, r) => (f(), g("div", Fo, [
2577
+ return (l, n) => (f(), g("div", Fo, [
2570
2578
  c("div", Ao, [
2571
2579
  t.logo ? (f(), g("img", {
2572
2580
  key: 0,
2573
2581
  src: t.logo,
2574
2582
  alt: "Logo",
2575
2583
  class: "h-[23px] w-auto"
2576
- }, null, 8, Eo)) : (f(), g("svg", zo, [...r[0] || (r[0] = [
2584
+ }, null, 8, Eo)) : (f(), g("svg", zo, [...n[0] || (n[0] = [
2577
2585
  c("path", {
2578
2586
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2579
2587
  fill: "#1C64F2"
@@ -2593,7 +2601,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2593
2601
  ])]))
2594
2602
  ]),
2595
2603
  c("div", jo, [
2596
- r[2] || (r[2] = c("div", null, [
2604
+ n[2] || (n[2] = c("div", null, [
2597
2605
  c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
2598
2606
  c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
2599
2607
  c("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
@@ -2603,7 +2611,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2603
2611
  onClick: a,
2604
2612
  size: "lg"
2605
2613
  }, {
2606
- default: w(() => [...r[1] || (r[1] = [
2614
+ default: w(() => [...n[1] || (n[1] = [
2607
2615
  P(" Go to Home ", -1)
2608
2616
  ])]),
2609
2617
  _: 1
@@ -2647,14 +2655,14 @@ const re = "bolt-next-token", M = X("auth", () => {
2647
2655
  const s = I(), t = e, a = () => {
2648
2656
  s.push(t.homeRoute);
2649
2657
  };
2650
- return (l, r) => (f(), g("div", No, [
2658
+ return (l, n) => (f(), g("div", No, [
2651
2659
  c("div", Do, [
2652
2660
  t.logo ? (f(), g("img", {
2653
2661
  key: 0,
2654
2662
  src: t.logo,
2655
2663
  alt: "Logo",
2656
2664
  class: "h-[23px] w-auto"
2657
- }, null, 8, Zo)) : (f(), g("svg", qo, [...r[0] || (r[0] = [
2665
+ }, null, 8, Zo)) : (f(), g("svg", qo, [...n[0] || (n[0] = [
2658
2666
  c("path", {
2659
2667
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2660
2668
  fill: "#1C64F2"
@@ -2684,7 +2692,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2684
2692
  onClick: a,
2685
2693
  size: "lg"
2686
2694
  }, {
2687
- default: w(() => [...r[1] || (r[1] = [
2695
+ default: w(() => [...n[1] || (n[1] = [
2688
2696
  P(" Go to Home ", -1)
2689
2697
  ])]),
2690
2698
  _: 1
@@ -2700,7 +2708,7 @@ function $r(e = {}) {
2700
2708
  logoutPath: t = "/logout",
2701
2709
  forgotPasswordPath: a = "/forgot-password",
2702
2710
  resetPasswordPath: l = "/password/reset",
2703
- logo: r = "",
2711
+ logo: n = "",
2704
2712
  defaultRedirect: o = "/dashboard"
2705
2713
  } = e;
2706
2714
  return [
@@ -2708,7 +2716,7 @@ function $r(e = {}) {
2708
2716
  path: s,
2709
2717
  name: "login",
2710
2718
  component: no,
2711
- props: { logo: r, defaultRedirect: o },
2719
+ props: { logo: n, defaultRedirect: o },
2712
2720
  meta: { auth: !1 }
2713
2721
  },
2714
2722
  {
@@ -2722,32 +2730,32 @@ function $r(e = {}) {
2722
2730
  path: a,
2723
2731
  name: "forgot-password",
2724
2732
  component: vo,
2725
- props: { logo: r, loginRoute: s },
2733
+ props: { logo: n, loginRoute: s },
2726
2734
  meta: { auth: !1 }
2727
2735
  },
2728
2736
  {
2729
2737
  path: l,
2730
2738
  name: "password-reset",
2731
2739
  component: Lo,
2732
- props: { logo: r, loginRoute: s },
2740
+ props: { logo: n, loginRoute: s },
2733
2741
  meta: { auth: !1 }
2734
2742
  }
2735
2743
  ];
2736
2744
  }
2737
2745
  function Lr(e, s = {}) {
2738
2746
  const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
2739
- e.beforeEach(async (a, l, r) => {
2747
+ e.beforeEach(async (a, l, n) => {
2740
2748
  const o = M();
2741
- o.state.ready || await o.fetchUser(), Xo(a, r, o, t);
2749
+ o.state.ready || await o.fetchUser(), Xo(a, n, o, t);
2742
2750
  });
2743
2751
  }
2744
2752
  function Xo(e, s, t, a) {
2745
- const l = e.meta.auth !== !1, r = t.check;
2753
+ const l = e.meta.auth !== !1, n = t.check;
2746
2754
  if (t.state.overrideToken && e.path === "/logout") {
2747
2755
  s({ path: a });
2748
2756
  return;
2749
2757
  }
2750
- if (!r) {
2758
+ if (!n) {
2751
2759
  if (!l) {
2752
2760
  if (e.path === "/logout") {
2753
2761
  s({ path: t.state.routes.auth });
@@ -2767,7 +2775,7 @@ function Xo(e, s, t, a) {
2767
2775
  });
2768
2776
  return;
2769
2777
  }
2770
- if (r) {
2778
+ if (n) {
2771
2779
  if (!l && e.path === t.state.routes.auth) {
2772
2780
  s({ path: a });
2773
2781
  return;
@@ -2879,7 +2887,7 @@ const Br = X("sparkNav", () => {
2879
2887
  }
2880
2888
  }
2881
2889
  return null;
2882
- }, r = async (d) => {
2890
+ }, n = async (d) => {
2883
2891
  if (d) {
2884
2892
  const m = l(e.menu, d);
2885
2893
  if (m && typeof m.action == "function") {
@@ -2892,7 +2900,7 @@ const Br = X("sparkNav", () => {
2892
2900
  e.collapsed = !e.collapsed;
2893
2901
  }, i = () => {
2894
2902
  e.hidden = !e.hidden;
2895
- }, n = () => {
2903
+ }, r = () => {
2896
2904
  const d = t.name || t.path.replace("/", "");
2897
2905
  if (d) {
2898
2906
  const m = (u) => {
@@ -2906,16 +2914,16 @@ const Br = X("sparkNav", () => {
2906
2914
  return E(
2907
2915
  () => t.path,
2908
2916
  () => {
2909
- n();
2917
+ r();
2910
2918
  },
2911
2919
  { immediate: !0 }
2912
2920
  ), {
2913
2921
  state: e,
2914
2922
  initialize: a,
2915
- goto: r,
2923
+ goto: n,
2916
2924
  toggleCollapsed: o,
2917
2925
  toggleHidden: i,
2918
- syncWithRoute: n
2926
+ syncWithRoute: r
2919
2927
  };
2920
2928
  });
2921
2929
  export {