@wishbone-media/spark 0.18.0 → 0.20.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.
Files changed (31) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +1301 -1028
  3. package/formkit.theme.mjs +4 -4
  4. package/package.json +1 -1
  5. package/src/assets/css/index.css +1 -0
  6. package/src/assets/css/nprogress.css +6 -0
  7. package/src/assets/css/spark-table.css +31 -6
  8. package/src/assets/images/brands/mr-antenna.png +0 -0
  9. package/src/assets/images/brands/mr-group.png +0 -0
  10. package/src/assets/images/brands/mr-gutter-cleaning.png +0 -0
  11. package/src/assets/images/brands/mr-pest-controller.png +0 -0
  12. package/src/components/SparkBrandSelector.vue +9 -9
  13. package/src/components/SparkModalContainer.vue +1 -1
  14. package/src/components/SparkOverlay.vue +1 -1
  15. package/src/components/SparkTable.vue +145 -13
  16. package/src/components/SparkTablePaginationDetails.vue +1 -1
  17. package/src/components/SparkTableToolbar.vue +1 -1
  18. package/src/components/plugins/SparkTableFilterSelect.vue +8 -2
  19. package/src/components/plugins/SparkTableReset.vue +43 -14
  20. package/src/components/plugins/SparkTableSearch.vue +10 -5
  21. package/src/composables/index.js +2 -1
  22. package/src/composables/sparkModalService.js +49 -0
  23. package/src/composables/useSparkTableRouteSync.js +308 -0
  24. package/src/containers/SparkDefaultContainer.vue +11 -1
  25. package/src/plugins/fontawesome.js +5 -0
  26. package/src/stores/app-selector.js +8 -2
  27. package/src/stores/brand-filter.js +1 -1
  28. package/src/stores/navigation.js +1 -0
  29. package/src/utils/sparkTable/renderers/actions.js +27 -2
  30. package/src/utils/sparkTable/renderers/boolean.js +97 -0
  31. package/src/utils/sparkTable/renderers/index.js +3 -0
package/dist/index.js CHANGED
@@ -1,83 +1,85 @@
1
- import { computed as k, resolveComponent as L, createElementBlock as g, openBlock as f, normalizeClass as _, createElementVNode as c, createVNode as v, unref as y, renderSlot as T, reactive as z, Fragment as B, renderList as A, 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 ve, watch as E, onMounted as be, h as le } from "vue";
2
- import { library as xe, icon as ee } from "@fortawesome/fontawesome-svg-core";
3
- import { FontAwesomeIcon as Pe } from "@fortawesome/vue-fontawesome";
4
- import { faUndo as Re, faEye as Be, faSignOut as Me, faXmark as Fe, faTrash as Ae, faTimes as Ee, faStreetView as ze, faSortUp as je, faSortDown as Ie, faSort as Oe, 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";
5
- import { defineStore as X } from "pinia";
6
- import { TransitionRoot as ke, Dialog as _e, TransitionChild as te, DialogPanel as we } from "@headlessui/vue";
7
- import ae from "nprogress";
8
- import { range as ht, get as q, find as yt, has as vt } from "lodash";
9
- import { HotTable as bt } from "@handsontable/vue3";
1
+ import { computed as C, resolveComponent as B, createElementBlock as g, openBlock as f, normalizeClass as T, createElementVNode as d, createVNode as v, unref as y, renderSlot as M, reactive as Z, Fragment as z, renderList as q, createCommentVNode as $, toDisplayString as H, createBlock as F, resolveDynamicComponent as ae, ref as R, inject as _e, provide as Ae, withCtx as L, createTextVNode as A, markRaw as Ce, mergeProps as oe, toHandlers as Se, watch as j, onMounted as pe, withModifiers as G, useSlots as $e, onUnmounted as je, h as me } from "vue";
2
+ import { library as Te, icon as se } from "@fortawesome/fontawesome-svg-core";
3
+ import { FontAwesomeIcon as Oe } from "@fortawesome/vue-fontawesome";
4
+ import { faCloudDownload as ze, faBolt as Ie, faUndo as Ne, faEye as De, faSignOut as qe, faXmark as Ze, faTrash as Ke, faTimes as Ue, faStreetView as Ge, faSortUp as We, faSortDown as Ye, faSort as Xe, faScaleBalanced as Je, faSatelliteDish as Qe, faLayerPlus as et, faLaptopMobile as tt, faInfoCircle as st, faGripDotsVertical as at, faGearComplex as ot, faFlag as rt, faFaceSmileWink as nt, faFaceSmileRelaxed as lt, faExclamationTriangle as it, faEllipsisVertical as ct, faEllipsis as dt, faEdit as ut, faComments as pt, faCircleXmark as ft, faCircleUser as mt, faChevronUp as gt, faChevronRight as ht, faChevronLeft as yt, faChevronDown as bt, faCheckCircle as vt, faCheck as xt, faBullhorn as kt, faBellRing as wt, faBarsSort as _t, faArrowRightToLine as Ct, faArrowLeftToLine as St } from "@fortawesome/pro-regular-svg-icons";
5
+ import { defineStore as re } from "pinia";
6
+ import { TransitionRoot as Le, Dialog as He, TransitionChild as le, DialogPanel as Pe } from "@headlessui/vue";
7
+ import ie from "nprogress";
8
+ import { range as $t, get as D, find as Tt, has as Lt } from "lodash";
9
+ import { HotTable as Ht } from "@handsontable/vue3";
10
10
  import "handsontable/styles/handsontable.css";
11
11
  import "handsontable/styles/ht-theme-classic.css";
12
- import { registerPlugin as Q, AutoColumnSize as xt, CopyPaste as kt, StretchColumns as _t, NestedHeaders as wt } from "handsontable/plugins";
13
- import { registerAllCellTypes as Ct } from "handsontable/cellTypes";
14
- import { useDebounceFn as Ce, watchDebounced as ie } from "@vueuse/core";
15
- import { registerRenderer as St, baseRenderer as $t } from "handsontable/renderers";
16
- import K from "axios";
17
- import { useRouter as I, useRoute as se } from "vue-router";
18
- var Lt = {
12
+ import { registerPlugin as ne, AutoColumnSize as Pt, CopyPaste as Vt, StretchColumns as Rt, NestedHeaders as Bt } from "handsontable/plugins";
13
+ import { registerAllCellTypes as Et } from "handsontable/cellTypes";
14
+ import { useDebounceFn as Ve, watchDebounced as ge } from "@vueuse/core";
15
+ import { registerRenderer as Mt, baseRenderer as Ft } from "handsontable/renderers";
16
+ import { useRouter as K, useRoute as te } from "vue-router";
17
+ import ee from "axios";
18
+ var At = {
19
19
  prefix: "fad",
20
20
  iconName: "sort-up",
21
21
  icon: [384, 512, ["sort-asc"], "f0de", ["", "M32 224c-12.9 0-24.6-7.8-29.6-19.8S.2 178.5 9.4 169.4l160-160c12.5-12.5 32.8-12.5 45.3 0l160 160c9.2 9.2 11.9 22.9 6.9 34.9S364.9 224 352 224L32 224z"]]
22
- }, Ht = {
22
+ }, jt = {
23
23
  prefix: "fad",
24
24
  iconName: "sort",
25
25
  icon: [384, 512, ["unsorted"], "f0dc", ["M2.4 307.8c-5 12-2.2 25.7 6.9 34.9l160 160c12.5 12.5 32.8 12.5 45.3 0l160-160c9.2-9.2 11.9-22.9 6.9-34.9S364.9 288 352 288L32 288c-12.9 0-24.6 7.8-29.6 19.8z", "M32 224c-12.9 0-24.6-7.8-29.6-19.8S.2 178.5 9.4 169.4l160-160c12.5-12.5 32.8-12.5 45.3 0l160 160c9.2 9.2 11.9 22.9 6.9 34.9S364.9 224 352 224L32 224z"]]
26
- }, Tt = {
26
+ }, Ot = {
27
27
  prefix: "fad",
28
28
  iconName: "sort-down",
29
29
  icon: [384, 512, ["sort-desc"], "f0dd", ["", "M32 288c-12.9 0-24.6 7.8-29.6 19.8S.2 333.5 9.4 342.6l160 160c12.5 12.5 32.8 12.5 45.3 0l160-160c9.2-9.2 11.9-22.9 6.9-34.9S364.9 288 352 288L32 288z"]]
30
30
  };
31
- const H = {
32
- farArrowLeftToLine: gt,
33
- farArrowRightToLine: mt,
34
- farBarsSort: ft,
35
- farBellRing: pt,
36
- farBullhorn: ut,
37
- farCheck: dt,
38
- farCheckCircle: ct,
39
- farChevronDown: it,
40
- farChevronLeft: lt,
41
- farChevronRight: nt,
42
- farChevronUp: rt,
43
- farCircleUser: ot,
44
- farCircleXmark: at,
45
- farComments: st,
46
- farEdit: tt,
47
- farEllipsis: et,
48
- farEllipsisVertical: Qe,
49
- farExclamationTriangle: Je,
50
- farFaceSmileRelaxed: Xe,
51
- farFaceSmileWink: Ye,
52
- farFlag: We,
53
- farGearComplex: Ue,
54
- farGripDotsVertical: Ke,
55
- farInfoCircle: Ge,
56
- farLaptopMobile: qe,
57
- farLayerPlus: Ze,
58
- farSatelliteDish: De,
59
- farScaleBalanced: Ne,
60
- farSort: Oe,
61
- farSortDown: Ie,
62
- farSortUp: je,
63
- farStreetView: ze,
64
- farTimes: Ee,
65
- farTrash: Ae,
66
- farXmark: Fe,
67
- farSignOut: Me,
68
- farEye: Be,
69
- farUndo: Re,
70
- fadSort: Ht,
71
- fadSortDown: Tt,
72
- fadSortUp: Lt
31
+ const E = {
32
+ farArrowLeftToLine: St,
33
+ farArrowRightToLine: Ct,
34
+ farBarsSort: _t,
35
+ farBellRing: wt,
36
+ farBullhorn: kt,
37
+ farCheck: xt,
38
+ farCheckCircle: vt,
39
+ farChevronDown: bt,
40
+ farChevronLeft: yt,
41
+ farChevronRight: ht,
42
+ farChevronUp: gt,
43
+ farCircleUser: mt,
44
+ farCircleXmark: ft,
45
+ farComments: pt,
46
+ farEdit: ut,
47
+ farEllipsis: dt,
48
+ farEllipsisVertical: ct,
49
+ farExclamationTriangle: it,
50
+ farFaceSmileRelaxed: lt,
51
+ farFaceSmileWink: nt,
52
+ farFlag: rt,
53
+ farGearComplex: ot,
54
+ farGripDotsVertical: at,
55
+ farInfoCircle: st,
56
+ farLaptopMobile: tt,
57
+ farLayerPlus: et,
58
+ farSatelliteDish: Qe,
59
+ farScaleBalanced: Je,
60
+ farSort: Xe,
61
+ farSortDown: Ye,
62
+ farSortUp: We,
63
+ farStreetView: Ge,
64
+ farTimes: Ue,
65
+ farTrash: Ke,
66
+ farXmark: Ze,
67
+ farSignOut: qe,
68
+ farEye: De,
69
+ farUndo: Ne,
70
+ farBolt: Ie,
71
+ farCloudDownload: ze,
72
+ fadSort: jt,
73
+ fadSortDown: Ot,
74
+ fadSortUp: At
73
75
  };
74
- function hr(e) {
75
- Object.assign(H, e), xe.add(...Object.values(e));
76
+ function Vr(e) {
77
+ Object.assign(E, e), Te.add(...Object.values(e));
76
78
  }
77
- function yr(e) {
78
- xe.add(...Object.values(H)), e.component("FontAwesomeIcon", Pe);
79
+ function Rr(e) {
80
+ Te.add(...Object.values(E)), e.component("FontAwesomeIcon", Oe);
79
81
  }
80
- const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }, Rt = { class: "ml-3" }, Bt = { class: "ml-auto pl-3 pt-1 self-start" }, Mt = { class: "-mx-1.5 -my-1.5" }, vr = {
82
+ const zt = { class: "flex items-center" }, It = { class: "shrink-0 self-start" }, Nt = { class: "ml-3" }, Dt = { class: "ml-auto pl-3 pt-1 self-start" }, qt = { class: "-mx-1.5 -my-1.5" }, Br = {
81
83
  __name: "SparkAlert",
82
84
  props: {
83
85
  type: {
@@ -88,51 +90,51 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
88
90
  },
89
91
  emits: ["close"],
90
92
  setup(e) {
91
- const s = e, t = k(() => ({
93
+ const s = e, t = C(() => ({
92
94
  success: "bg-green-50 border-green-200 text-green-700",
93
95
  warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
94
96
  danger: "bg-red-50 border-red-200 text-red-700",
95
97
  info: "bg-blue-50 border-blue-200 text-blue-700"
96
- })[s.type]), a = k(() => ({
98
+ })[s.type]), a = C(() => ({
97
99
  success: "text-green-400",
98
100
  warning: "text-yellow-400",
99
101
  danger: "text-red-400",
100
102
  info: "text-blue-400"
101
- })[s.type]), l = k(() => ({
103
+ })[s.type]), l = C(() => ({
102
104
  success: "farCheckCircle",
103
105
  warning: "farExclamationTriangle",
104
106
  danger: "farCircleXmark",
105
107
  info: "farInfoCircle"
106
- })[s.type]), n = k(() => ({
108
+ })[s.type]), n = C(() => ({
107
109
  success: "text-green-400 hover:bg-green-100",
108
110
  warning: "text-yellow-400 hover:bg-yellow-100",
109
111
  danger: "text-red-400 hover:bg-red-100",
110
112
  info: "text-blue-400 hover:bg-blue-100"
111
113
  })[s.type]);
112
114
  return (o, i) => {
113
- const r = L("font-awesome-icon");
115
+ const r = B("font-awesome-icon");
114
116
  return f(), g("div", {
115
- class: _(["rounded-md border p-4", t.value])
117
+ class: T(["rounded-md border p-4", t.value])
116
118
  }, [
117
- c("div", Vt, [
118
- c("div", Pt, [
119
+ d("div", zt, [
120
+ d("div", It, [
119
121
  v(r, {
120
- icon: y(H)[l.value],
121
- class: _(a.value)
122
+ icon: y(E)[l.value],
123
+ class: T(a.value)
122
124
  }, null, 8, ["icon", "class"])
123
125
  ]),
124
- c("div", Rt, [
125
- T(o.$slots, "default")
126
+ d("div", Nt, [
127
+ M(o.$slots, "default")
126
128
  ]),
127
- c("div", Bt, [
128
- c("div", Mt, [
129
- c("button", {
129
+ d("div", Dt, [
130
+ d("div", qt, [
131
+ d("button", {
130
132
  type: "button",
131
- class: _(["inline-flex rounded-md px-2 py-1.5", n.value]),
132
- onClick: i[0] || (i[0] = (d) => o.$emit("close"))
133
+ class: T(["inline-flex rounded-md px-2 py-1.5", n.value]),
134
+ onClick: i[0] || (i[0] = (c) => o.$emit("close"))
133
135
  }, [
134
136
  v(r, {
135
- icon: y(H).farXmark
137
+ icon: y(E).farXmark
136
138
  }, null, 8, ["icon"])
137
139
  ], 2)
138
140
  ])
@@ -141,7 +143,13 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
141
143
  ], 2);
142
144
  };
143
145
  }
144
- }, oe = [
146
+ }, ce = [
147
+ {
148
+ name: "Bolt",
149
+ description: "Job management",
150
+ href: "https://bolt-next.letsbolt.io",
151
+ icon: "farBolt"
152
+ },
145
153
  {
146
154
  name: "3CX",
147
155
  description: "VOIP Phone",
@@ -174,19 +182,19 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
174
182
  },
175
183
  {
176
184
  name: "ReVuze",
177
- description: "Get Customer feedback",
185
+ description: "Get customer feedback",
178
186
  href: "https://revuze-next.letsbolt.io",
179
187
  icon: "farComments"
180
188
  },
181
189
  {
182
190
  name: "Tabula",
183
- description: "Admin interface",
191
+ description: "Admin interface template",
184
192
  href: "https://tabula.letsbolt.io",
185
193
  icon: "farCompass"
186
194
  }
187
- ], Se = X("sparkAppSelector", () => {
188
- const e = z({
189
- apps: [...oe]
195
+ ], Re = re("sparkAppSelector", () => {
196
+ const e = Z({
197
+ apps: [...ce]
190
198
  }), s = (n = {}) => {
191
199
  if (n.apps && Array.isArray(n.apps)) {
192
200
  const o = n.apps.filter((i) => {
@@ -205,7 +213,7 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
205
213
  const o = /* @__PURE__ */ new Map();
206
214
  Object.keys(n.appHrefs).forEach((i) => {
207
215
  o.set(i.toLowerCase(), n.appHrefs[i]);
208
- }), e.apps = oe.map((i) => {
216
+ }), e.apps = ce.map((i) => {
209
217
  const r = o.get(i.name.toLowerCase());
210
218
  return {
211
219
  ...i,
@@ -214,8 +222,8 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
214
222
  });
215
223
  return;
216
224
  }
217
- e.apps = [...oe];
218
- }, t = k(() => e.apps), a = (n) => {
225
+ e.apps = [...ce];
226
+ }, t = C(() => e.apps), a = (n) => {
219
227
  if (!n) return null;
220
228
  const o = n.toLowerCase();
221
229
  return e.apps.find((i) => i.name.toLowerCase() === o) || null;
@@ -230,8 +238,8 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
230
238
  return o ? o.icon : "";
231
239
  }
232
240
  };
233
- }), $e = X("sparkApp", () => {
234
- const e = z({
241
+ }), Be = re("sparkApp", () => {
242
+ const e = Z({
235
243
  app: "",
236
244
  homeRoute: "dashboard",
237
245
  showBrandSelector: !0,
@@ -243,16 +251,16 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
243
251
  e.app = t.app || "", e.homeRoute = t.homeRoute ?? "dashboard", e.showBrandSelector = t.showBrandSelector ?? !0, e.showAppSelector = t.showAppSelector ?? !0;
244
252
  }
245
253
  };
246
- }), Ft = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, At = { class: "flex flex-1 flex-col" }, Et = { class: "divide-y divide-gray-200" }, zt = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, jt = { class: "ml-auto flex items-center" }, It = ["href", "onClick"], Ot = { class: "gap-y-1" }, Nt = { class: "text-base text-gray-800 flex items-center" }, Dt = { class: "font-medium" }, Zt = {
254
+ }), Zt = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Kt = { class: "flex flex-1 flex-col" }, Ut = { class: "divide-y divide-gray-200" }, Gt = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Wt = { class: "ml-auto flex items-center" }, Yt = ["href", "onClick"], Xt = { class: "gap-y-1" }, Jt = { class: "text-base text-gray-800 flex items-center" }, Qt = { class: "font-medium" }, es = {
247
255
  key: 0,
248
256
  class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
249
- }, qt = { class: "text-sm text-gray-500" }, Gt = { class: "ml-auto flex items-center" }, Kt = { class: "mt-auto" }, Ut = {
257
+ }, ts = { class: "text-sm text-gray-500" }, ss = { class: "ml-auto flex items-center" }, as = { class: "mt-auto" }, os = {
250
258
  key: 0,
251
259
  class: "p-6"
252
- }, Wt = {
260
+ }, rs = {
253
261
  key: 1,
254
262
  class: "bg-gray-50 p-6"
255
- }, Yt = {
263
+ }, ns = {
256
264
  __name: "SparkAppSelector",
257
265
  props: {
258
266
  bottomSlot: {
@@ -266,7 +274,7 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
266
274
  },
267
275
  emits: ["close", "select"],
268
276
  setup(e, { emit: s }) {
269
- const t = s, a = Se(), l = $e(), n = k(() => {
277
+ const t = s, a = Re(), l = Be(), n = C(() => {
270
278
  const i = l.state.app;
271
279
  return a.state.apps.map((r) => ({
272
280
  ...r,
@@ -276,63 +284,63 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
276
284
  t("select", i);
277
285
  };
278
286
  return (i, r) => {
279
- const d = L("font-awesome-icon");
280
- return f(), g("div", Ft, [
281
- c("div", At, [
282
- c("div", Et, [
283
- c("div", zt, [
284
- r[1] || (r[1] = c("div", null, "Mr Group Network", -1)),
285
- c("div", jt, [
286
- v(d, {
287
- icon: y(H).farTimes,
287
+ const c = B("font-awesome-icon");
288
+ return f(), g("div", Zt, [
289
+ d("div", Kt, [
290
+ d("div", Ut, [
291
+ d("div", Gt, [
292
+ r[1] || (r[1] = d("div", null, "Mr Group Network", -1)),
293
+ d("div", Wt, [
294
+ v(c, {
295
+ icon: y(E).farTimes,
288
296
  class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
289
- onClick: r[0] || (r[0] = (m) => t("close"))
297
+ onClick: r[0] || (r[0] = (p) => t("close"))
290
298
  }, null, 8, ["icon"])
291
299
  ])
292
300
  ]),
293
- (f(!0), g(B, null, A(n.value, (m) => (f(), g("a", {
294
- key: m.name,
295
- href: m.href,
301
+ (f(!0), g(z, null, q(n.value, (p) => (f(), g("a", {
302
+ key: p.name,
303
+ href: p.href,
296
304
  target: "_blank",
297
- class: _([m.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
298
- onClick: (u) => m.current ? u.preventDefault() : o(m)
305
+ class: T([p.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
306
+ onClick: (u) => p.current ? u.preventDefault() : o(p)
299
307
  }, [
300
- c("div", Ot, [
301
- c("div", Nt, [
302
- c("div", Dt, S(m.name), 1),
303
- m.current ? (f(), g("span", Zt, " Active ")) : x("", !0)
308
+ d("div", Xt, [
309
+ d("div", Jt, [
310
+ d("div", Qt, H(p.name), 1),
311
+ p.current ? (f(), g("span", es, " Active ")) : $("", !0)
304
312
  ]),
305
- c("div", qt, S(m.description), 1)
313
+ d("div", ts, H(p.description), 1)
306
314
  ]),
307
- c("div", Gt, [
308
- v(d, {
309
- class: _([m.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
310
- icon: y(H)[m.icon]
315
+ d("div", ss, [
316
+ v(c, {
317
+ class: T([p.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
318
+ icon: y(E)[p.icon]
311
319
  }, null, 8, ["class", "icon"])
312
320
  ])
313
- ], 10, It))), 128)),
314
- r[2] || (r[2] = c("div", null, null, -1))
321
+ ], 10, Yt))), 128)),
322
+ r[2] || (r[2] = d("div", null, null, -1))
315
323
  ]),
316
- c("div", Kt, [
317
- i.$slots.bottom || e.bottomSlot ? (f(), g("div", Ut, [
318
- T(i.$slots, "bottom", {}, () => [
319
- e.bottomSlot ? (f(), V(W(e.bottomSlot), { key: 0 })) : x("", !0)
324
+ d("div", as, [
325
+ i.$slots.bottom || e.bottomSlot ? (f(), g("div", os, [
326
+ M(i.$slots, "bottom", {}, () => [
327
+ e.bottomSlot ? (f(), F(ae(e.bottomSlot), { key: 0 })) : $("", !0)
320
328
  ])
321
- ])) : x("", !0),
322
- i.$slots.footer || e.footerSlot ? (f(), g("div", Wt, [
323
- T(i.$slots, "footer", {}, () => [
324
- e.footerSlot ? (f(), V(W(e.footerSlot), { key: 0 })) : x("", !0)
329
+ ])) : $("", !0),
330
+ i.$slots.footer || e.footerSlot ? (f(), g("div", rs, [
331
+ M(i.$slots, "footer", {}, () => [
332
+ e.footerSlot ? (f(), F(ae(e.footerSlot), { key: 0 })) : $("", !0)
325
333
  ])
326
- ])) : x("", !0)
334
+ ])) : $("", !0)
327
335
  ])
328
336
  ])
329
337
  ]);
330
338
  };
331
339
  }
332
- }, Le = X(
340
+ }, Ee = re(
333
341
  "brandFilter",
334
342
  () => {
335
- const e = z({
343
+ const e = Z({
336
344
  brands: []
337
345
  }), s = (n = {}) => {
338
346
  if (!n.brands || !Array.isArray(n.brands)) {
@@ -340,8 +348,8 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
340
348
  return;
341
349
  }
342
350
  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;
351
+ const c = r.name && r.logo;
352
+ return c || console.warn("useSparkBrandFilterStore: Invalid brand object", r), c;
345
353
  }), i = o.filter((r) => r.current);
346
354
  i.length === 0 && o.length > 0 ? o[0].current = !0 : i.length > 1 && o.forEach((r) => {
347
355
  r.current = r === i[0];
@@ -351,7 +359,7 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
351
359
  logo: r.logo,
352
360
  current: r.current || !1
353
361
  }));
354
- }, t = k(() => e.brands.find((n) => n.current) || null), a = k(() => e.brands);
362
+ }, t = C(() => e.brands.find((n) => n.current) || null), a = C(() => e.brands);
355
363
  return {
356
364
  state: e,
357
365
  initialize: s,
@@ -373,65 +381,65 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
373
381
  paths: ["state.brands"]
374
382
  }
375
383
  }
376
- ), Xt = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Jt = { class: "flex flex-1 flex-col" }, Qt = { class: "divide-y divide-gray-200" }, es = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, ts = { class: "ml-auto flex items-center" }, ss = {
384
+ ), ls = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, is = { class: "flex flex-1 flex-col" }, cs = { class: "divide-y divide-gray-200" }, ds = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, us = { class: "ml-auto flex items-center" }, ps = {
377
385
  key: 0,
378
386
  class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
379
- }, as = ["onClick"], os = { class: "gap-y-1 flex" }, rs = { class: "flex items-center mr-4" }, ns = ["src", "alt"], ls = { class: "ml-auto flex flex-col" }, is = { class: "text-base text-gray-800 flex items-center" }, cs = { class: "font-medium" }, ds = {
387
+ }, fs = ["onClick"], ms = { class: "w-full gap-y-1 flex justify-between" }, gs = { class: "flex flex-col" }, hs = { class: "flex items-center" }, ys = { class: "font-medium text-base text-gray-900" }, bs = {
380
388
  key: 0,
381
- class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
382
- }, us = { class: "text-sm text-gray-500" }, ps = {
389
+ class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-800 ml-1"
390
+ }, vs = { class: "text-sm text-gray-500 font-normal" }, xs = { class: "flex items-center" }, ks = ["src", "alt"], ws = {
383
391
  __name: "SparkBrandSelector",
384
392
  emits: ["close", "select"],
385
393
  setup(e, { emit: s }) {
386
- const t = s, a = Le(), l = (n) => {
394
+ const t = s, a = Ee(), l = (n) => {
387
395
  t("select", n);
388
396
  };
389
397
  return (n, o) => {
390
- const i = L("font-awesome-icon");
391
- return f(), g("div", Xt, [
392
- c("div", Jt, [
393
- c("div", Qt, [
394
- c("div", es, [
395
- o[1] || (o[1] = c("div", null, "Filter by Brand", -1)),
396
- c("div", ts, [
398
+ const i = B("font-awesome-icon");
399
+ return f(), g("div", ls, [
400
+ d("div", is, [
401
+ d("div", cs, [
402
+ d("div", ds, [
403
+ o[1] || (o[1] = d("div", null, "Filter by Brand", -1)),
404
+ d("div", us, [
397
405
  v(i, {
398
- icon: y(H).farTimes,
406
+ icon: y(E).farTimes,
399
407
  class: "size-4 text-gray-400 cursor-pointer",
400
408
  onClick: o[0] || (o[0] = (r) => t("close"))
401
409
  }, null, 8, ["icon"])
402
410
  ])
403
411
  ]),
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, (r) => (f(), g("div", {
412
+ y(a).allBrands.length === 0 ? (f(), g("div", ps, " No brands configured ")) : $("", !0),
413
+ (f(!0), g(z, null, q(y(a).allBrands, (r) => (f(), g("div", {
406
414
  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)
415
+ class: T([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
416
+ onClick: (c) => l(r)
409
417
  }, [
410
- c("div", os, [
411
- c("div", rs, [
412
- c("img", {
418
+ d("div", ms, [
419
+ d("div", gs, [
420
+ d("div", hs, [
421
+ d("div", ys, H(r.name), 1),
422
+ r.current ? (f(), g("span", bs, " Current ")) : $("", !0)
423
+ ]),
424
+ d("div", vs, H(r.current ? "Current Brand" : "Change to"), 1)
425
+ ]),
426
+ d("div", xs, [
427
+ d("img", {
413
428
  src: r.logo,
414
429
  alt: `${r.name} logo`,
415
430
  class: "h-8 w-auto"
416
- }, null, 8, ns)
417
- ]),
418
- c("div", ls, [
419
- c("div", is, [
420
- c("div", cs, S(r.name), 1),
421
- r.current ? (f(), g("span", ds, " Current ")) : x("", !0)
422
- ]),
423
- c("div", us, S(r.current ? "Current Brand" : "Change to"), 1)
431
+ }, null, 8, ks)
424
432
  ])
425
433
  ])
426
- ], 10, as))), 128)),
427
- o[2] || (o[2] = c("div", null, null, -1))
434
+ ], 10, fs))), 128)),
435
+ o[2] || (o[2] = d("div", null, null, -1))
428
436
  ]),
429
- o[3] || (o[3] = c("div", { class: "mt-auto" }, null, -1))
437
+ o[3] || (o[3] = d("div", { class: "mt-auto" }, null, -1))
430
438
  ])
431
439
  ]);
432
440
  };
433
441
  }
434
- }, fs = ["disabled"], F = {
442
+ }, _s = ["disabled"], N = {
435
443
  __name: "SparkButton",
436
444
  props: {
437
445
  size: {
@@ -453,14 +461,14 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
453
461
  }
454
462
  },
455
463
  setup(e) {
456
- const s = e, t = $(null), a = ge("buttonGroup", null), l = k(() => {
464
+ const s = e, t = R(null), a = _e("buttonGroup", null), l = C(() => {
457
465
  if (!a?.isInGroup || !t.value) return null;
458
- const r = a.getButtonIndex(t.value), d = a.getButtonCount();
466
+ const r = a.getButtonIndex(t.value), c = a.getButtonCount();
459
467
  return {
460
468
  isFirst: r === 0,
461
- isLast: r === d - 1,
469
+ isLast: r === c - 1,
462
470
  index: r,
463
- total: d
471
+ total: c
464
472
  };
465
473
  }), n = {
466
474
  paddingX: /^px-/,
@@ -472,41 +480,41 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
472
480
  borderRadius: /^rounded-/,
473
481
  background: /^bg-/,
474
482
  text: /^text-(?!white|black)/
475
- }, o = (r, d) => {
476
- if (!d) return r;
477
- const m = r.split(" ").filter(Boolean), u = d.split(" ").filter(Boolean);
478
- return [...m.filter((h) => !u.some((b) => {
479
- const N = Object.entries(n).find(
480
- ([R, J]) => J.test(h)
481
- )?.[0], C = Object.entries(n).find(
482
- ([R, J]) => J.test(b)
483
+ }, o = (r, c) => {
484
+ if (!c) return r;
485
+ const p = r.split(" ").filter(Boolean), u = c.split(" ").filter(Boolean);
486
+ return [...p.filter((_) => !u.some((w) => {
487
+ const m = Object.entries(n).find(
488
+ ([P, k]) => k.test(_)
489
+ )?.[0], x = Object.entries(n).find(
490
+ ([P, k]) => k.test(w)
483
491
  )?.[0];
484
- return N && N === C;
492
+ return m && m === x;
485
493
  })), ...u].join(" ");
486
- }, i = k(() => {
487
- let r = "", d = "";
494
+ }, i = C(() => {
495
+ let r = "", c = "";
488
496
  switch (s.size) {
489
497
  case "xs":
490
- r += " px-2 py-1 text-xs", d = "sm";
498
+ r += " px-2 py-1 text-xs", c = "sm";
491
499
  break;
492
500
  case "sm":
493
- r += " px-2 py-1 text-sm", d = "sm";
501
+ r += " px-2 py-1 text-sm", c = "sm";
494
502
  break;
495
503
  case "md":
496
- r += " px-2.5 py-1.5 text-sm", d = "md";
504
+ r += " px-2.5 py-1.5 text-sm", c = "md";
497
505
  break;
498
506
  case "lg":
499
- r += " px-3 py-2 text-sm", d = "md";
507
+ r += " px-3 py-2 text-sm", c = "md";
500
508
  break;
501
509
  case "xl":
502
- r += " px-3.5 py-2.5 min-h-[42px] text-sm", d = "md";
510
+ r += " px-3.5 py-2.5 min-h-[42px] text-sm", c = "md";
503
511
  break;
504
512
  }
505
513
  if (a?.isInGroup && l.value) {
506
- const { isFirst: m, isLast: u } = l.value;
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";
514
+ const { isFirst: p, isLast: u } = l.value;
515
+ r += " relative inline-flex items-center focus:z-10", p && u ? r += ` rounded-${c}` : p ? r += ` rounded-l-${c} rounded-r-none` : u ? r += ` rounded-r-${c} rounded-l-none -ml-px` : r += " rounded-none -ml-px";
508
516
  } else
509
- r += ` shadow-xs rounded-${d}`;
517
+ r += ` shadow-xs rounded-${c}`;
510
518
  switch (s.variant) {
511
519
  case "primary":
512
520
  r += " bg-primary-600 hover:bg-primary-500 text-white";
@@ -531,22 +539,22 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
531
539
  }
532
540
  return r = o(r, s.buttonClass), r;
533
541
  });
534
- return (r, d) => (f(), g("button", {
542
+ return (r, c) => (f(), g("button", {
535
543
  type: "button",
536
544
  ref_key: "buttonRef",
537
545
  ref: t,
538
- class: _(i.value),
546
+ class: T(i.value),
539
547
  disabled: e.disabled,
540
- onClick: d[0] || (d[0] = (m) => r.$emit("click"))
548
+ onClick: c[0] || (c[0] = (p) => r.$emit("click"))
541
549
  }, [
542
- T(r.$slots, "default")
543
- ], 10, fs));
550
+ M(r.$slots, "default")
551
+ ], 10, _s));
544
552
  }
545
- }, ms = {
553
+ }, Cs = {
546
554
  __name: "SparkButtonGroup",
547
555
  setup(e) {
548
- const s = $(null);
549
- return Ve("buttonGroup", {
556
+ const s = R(null);
557
+ return Ae("buttonGroup", {
550
558
  isInGroup: !0,
551
559
  getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
552
560
  getButtonCount: () => s.value?.children.length || 0
@@ -555,16 +563,16 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
555
563
  ref_key: "groupRef",
556
564
  ref: s
557
565
  }, [
558
- T(l.$slots, "default")
566
+ M(l.$slots, "default")
559
567
  ], 512));
560
568
  }
561
- }, gs = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, hs = {
569
+ }, Ss = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, $s = {
562
570
  key: 0,
563
571
  class: "p-5"
564
- }, ys = {
572
+ }, Ts = {
565
573
  key: 1,
566
574
  class: "p-5"
567
- }, br = {
575
+ }, Er = {
568
576
  __name: "SparkCard",
569
577
  props: {
570
578
  padded: {
@@ -578,98 +586,24 @@ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }
578
586
  },
579
587
  setup(e) {
580
588
  const s = e;
581
- return (t, a) => (f(), g("div", gs, [
582
- t.$slots.header ? (f(), g("div", hs, [
583
- T(t.$slots, "header")
584
- ])) : x("", !0),
585
- c("div", {
586
- class: _([s.padded ? s.paddedClass : ""])
589
+ return (t, a) => (f(), g("div", Ss, [
590
+ t.$slots.header ? (f(), g("div", $s, [
591
+ M(t.$slots, "header")
592
+ ])) : $("", !0),
593
+ d("div", {
594
+ class: T([s.padded ? s.paddedClass : ""])
587
595
  }, [
588
- T(t.$slots, "default")
596
+ M(t.$slots, "default")
589
597
  ], 2),
590
- t.$slots.footer ? (f(), g("div", ys, [
591
- T(t.$slots, "footer")
592
- ])) : x("", !0)
598
+ t.$slots.footer ? (f(), g("div", Ts, [
599
+ M(t.$slots, "footer")
600
+ ])) : $("", !0)
593
601
  ]));
594
602
  }
595
- };
596
- class vs {
597
- constructor() {
598
- this.state = z({
599
- isVisible: !1,
600
- content: null,
601
- props: {},
602
- eventHandlers: {}
603
- });
604
- }
605
- show = (s, t = {}, a = {}) => {
606
- this.state.content = he(s), this.state.props = t, this.state.eventHandlers = a, this.state.isVisible = !0;
607
- };
608
- hide = () => {
609
- this.state.isVisible = !1, this.state.eventHandlers = {};
610
- };
611
- }
612
- const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, xs = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, ks = {
613
- __name: "SparkModalContainer",
614
- setup(e) {
615
- return (s, t) => (f(), V(y(ke), {
616
- as: "template",
617
- show: y(U).state.isVisible
618
- }, {
619
- default: w(() => [
620
- v(y(_e), {
621
- class: "relative z-200",
622
- onClose: y(U).hide
623
- }, {
624
- default: w(() => [
625
- v(y(te), {
626
- as: "template",
627
- enter: "ease-out duration-300",
628
- "enter-from": "opacity-0",
629
- "enter-to": "opacity-100",
630
- leave: "ease-in duration-200",
631
- "leave-from": "opacity-100",
632
- "leave-to": "opacity-0"
633
- }, {
634
- default: w(() => [...t[0] || (t[0] = [
635
- c("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
636
- ])]),
637
- _: 1
638
- }),
639
- c("div", bs, [
640
- c("div", xs, [
641
- v(y(te), {
642
- as: "template",
643
- enter: "ease-out duration-300",
644
- "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
645
- "enter-to": "opacity-100 translate-y-0 sm:scale-100",
646
- leave: "ease-in duration-200",
647
- "leave-from": "opacity-100 translate-y-0 sm:scale-100",
648
- "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
649
- }, {
650
- default: w(() => [
651
- v(y(we), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
652
- default: w(() => [
653
- (f(), V(W(y(U).state.content), Y(y(U).state.props, ye(y(U).state.eventHandlers)), null, 16))
654
- ]),
655
- _: 1
656
- })
657
- ]),
658
- _: 1
659
- })
660
- ])
661
- ])
662
- ]),
663
- _: 1
664
- }, 8, ["onClose"])
665
- ]),
666
- _: 1
667
- }, 8, ["show"]));
668
- }
669
- }, _s = { class: "px-4 pt-5 pb-4 sm:p-6" }, ws = {
603
+ }, Ls = { class: "px-4 pt-5 pb-4 sm:p-6" }, Hs = {
670
604
  key: 0,
671
605
  class: "text-lg font-medium text-gray-900"
672
- }, xr = {
606
+ }, Ps = {
673
607
  __name: "SparkModalDialog",
674
608
  props: {
675
609
  title: {
@@ -719,7 +653,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
719
653
  "input"
720
654
  ],
721
655
  setup(e) {
722
- const s = e, t = k(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons), a = k(() => {
656
+ const s = e, t = C(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons), a = C(() => {
723
657
  switch (t.value.length) {
724
658
  case 1:
725
659
  return "sm:grid sm:grid-flow-row-dense";
@@ -735,48 +669,48 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
735
669
  success: "farCheckCircle",
736
670
  warning: "farExclamationTriangle",
737
671
  danger: "farCircleXmark"
738
- }, n = k(() => s.icon || l[s.type]), o = k(() => ({
672
+ }, n = C(() => s.icon || l[s.type]), o = C(() => ({
739
673
  info: "bg-blue-100",
740
674
  success: "bg-green-100",
741
675
  warning: "bg-yellow-100",
742
676
  danger: "bg-red-100"
743
- })[s.type]), i = k(() => ({
677
+ })[s.type]), i = C(() => ({
744
678
  info: "text-blue-400",
745
679
  success: "text-green-400",
746
680
  warning: "text-yellow-400",
747
681
  danger: "text-red-400"
748
682
  })[s.type]);
749
- return (r, d) => {
750
- const m = L("font-awesome-icon");
751
- return f(), g("div", _s, [
683
+ return (r, c) => {
684
+ const p = B("font-awesome-icon");
685
+ return f(), g("div", Ls, [
752
686
  n.value ? (f(), g("div", {
753
687
  key: 0,
754
- class: _(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
688
+ class: T(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
755
689
  }, [
756
- v(m, {
757
- icon: y(H)[n.value],
758
- class: _(["h-5 w-5", i.value])
690
+ v(p, {
691
+ icon: y(E)[n.value],
692
+ class: T(["h-5 w-5", i.value])
759
693
  }, null, 8, ["icon", "class"])
760
- ], 2)) : x("", !0),
761
- c("div", {
762
- class: _(["text-center", { "mt-3 sm:mt-5": n.value }])
694
+ ], 2)) : $("", !0),
695
+ d("div", {
696
+ class: T(["text-center", { "mt-3 sm:mt-5": n.value }])
763
697
  }, [
764
- e.title ? (f(), g("h3", ws, S(e.title), 1)) : x("", !0),
698
+ e.title ? (f(), g("h3", Hs, H(e.title), 1)) : $("", !0),
765
699
  e.message ? (f(), g("div", {
766
700
  key: 1,
767
- class: _([{ "mt-2": e.title }, "text-sm text-gray-500"])
768
- }, S(e.message), 3)) : x("", !0)
701
+ class: T([{ "mt-2": e.title }, "text-sm text-gray-500"])
702
+ }, H(e.message), 3)) : $("", !0)
769
703
  ], 2),
770
- c("div", {
771
- class: _(["mt-5 sm:mt-6", a.value])
704
+ d("div", {
705
+ class: T(["mt-5 sm:mt-6", a.value])
772
706
  }, [
773
- (f(!0), g(B, null, A(t.value, (u, p) => (f(), V(y(F), {
774
- key: p,
707
+ (f(!0), g(z, null, q(t.value, (u, h) => (f(), F(y(N), {
708
+ key: h,
775
709
  variant: u.variant,
776
- onClick: (h) => r.$emit(u.event, u)
710
+ onClick: (_) => r.$emit(u.event, u)
777
711
  }, {
778
- default: w(() => [
779
- P(S(u.text), 1)
712
+ default: L(() => [
713
+ A(H(u.text), 1)
780
714
  ]),
781
715
  _: 2
782
716
  }, 1032, ["variant", "onClick"]))), 128))
@@ -784,7 +718,123 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
784
718
  ]);
785
719
  };
786
720
  }
787
- }, Cs = { class: "fixed inset-0 flex" }, ce = {
721
+ };
722
+ class Vs {
723
+ constructor() {
724
+ this.state = Z({
725
+ isVisible: !1,
726
+ content: null,
727
+ props: {},
728
+ eventHandlers: {}
729
+ });
730
+ }
731
+ show = (s, t = {}, a = {}) => {
732
+ this.state.content = Ce(s), this.state.props = t, this.state.eventHandlers = a, this.state.isVisible = !0;
733
+ };
734
+ hide = () => {
735
+ this.state.isVisible = !1, this.state.eventHandlers = {};
736
+ };
737
+ /**
738
+ * Show a confirmation dialog and return a Promise
739
+ *
740
+ * @param {Object} options - Confirmation options
741
+ * @param {string} [options.title='Confirm'] - Dialog title
742
+ * @param {string} [options.message='Are you sure?'] - Dialog message
743
+ * @param {string} [options.type='warning'] - Dialog type (info, success, warning, danger)
744
+ * @param {string} [options.confirmText='Confirm'] - Confirm button text
745
+ * @param {string} [options.cancelText='Cancel'] - Cancel button text
746
+ * @param {string} [options.confirmVariant='primary'] - Confirm button variant
747
+ * @returns {Promise<boolean>} - Resolves to true if confirmed, false if cancelled
748
+ */
749
+ confirm = (s = {}) => new Promise((t) => {
750
+ const {
751
+ title: a = "Confirm",
752
+ message: l = "Are you sure?",
753
+ type: n = "warning",
754
+ confirmText: o = "Confirm",
755
+ cancelText: i = "Cancel",
756
+ confirmVariant: r = "primary"
757
+ } = s;
758
+ this.show(
759
+ Ps,
760
+ {
761
+ title: a,
762
+ message: l,
763
+ type: n,
764
+ buttons: [
765
+ { text: o, variant: r, event: "confirm" },
766
+ { text: i, variant: "secondary", event: "cancel" }
767
+ ]
768
+ },
769
+ {
770
+ confirm: () => {
771
+ this.hide(), t(!0);
772
+ },
773
+ cancel: () => {
774
+ this.hide(), t(!1);
775
+ }
776
+ }
777
+ );
778
+ });
779
+ }
780
+ const J = new Vs(), Rs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, Bs = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Es = {
781
+ __name: "SparkModalContainer",
782
+ setup(e) {
783
+ return (s, t) => (f(), F(y(Le), {
784
+ as: "template",
785
+ show: y(J).state.isVisible
786
+ }, {
787
+ default: L(() => [
788
+ v(y(He), {
789
+ class: "relative z-1000",
790
+ onClose: y(J).hide
791
+ }, {
792
+ default: L(() => [
793
+ v(y(le), {
794
+ as: "template",
795
+ enter: "ease-out duration-300",
796
+ "enter-from": "opacity-0",
797
+ "enter-to": "opacity-100",
798
+ leave: "ease-in duration-200",
799
+ "leave-from": "opacity-100",
800
+ "leave-to": "opacity-0"
801
+ }, {
802
+ default: L(() => [...t[0] || (t[0] = [
803
+ d("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
804
+ ])]),
805
+ _: 1
806
+ }),
807
+ d("div", Rs, [
808
+ d("div", Bs, [
809
+ v(y(le), {
810
+ as: "template",
811
+ enter: "ease-out duration-300",
812
+ "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
813
+ "enter-to": "opacity-100 translate-y-0 sm:scale-100",
814
+ leave: "ease-in duration-200",
815
+ "leave-from": "opacity-100 translate-y-0 sm:scale-100",
816
+ "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
817
+ }, {
818
+ default: L(() => [
819
+ v(y(Pe), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
820
+ default: L(() => [
821
+ (f(), F(ae(y(J).state.content), oe(y(J).state.props, Se(y(J).state.eventHandlers)), null, 16))
822
+ ]),
823
+ _: 1
824
+ })
825
+ ]),
826
+ _: 1
827
+ })
828
+ ])
829
+ ])
830
+ ]),
831
+ _: 1
832
+ }, 8, ["onClose"])
833
+ ]),
834
+ _: 1
835
+ }, 8, ["show"]));
836
+ }
837
+ }, Ms = { class: "fixed inset-0 flex" }, he = {
788
838
  __name: "SparkOverlay",
789
839
  props: {
790
840
  position: {
@@ -799,21 +849,21 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
799
849
  },
800
850
  emits: ["close"],
801
851
  setup(e, { emit: s }) {
802
- const t = $(null), a = e, l = s, n = () => {
852
+ const t = R(null), a = e, l = s, n = () => {
803
853
  a.overlayInstance.close(), l("close");
804
854
  };
805
- return (o, i) => (f(), V(y(ke), {
855
+ return (o, i) => (f(), F(y(Le), {
806
856
  show: e.overlayInstance.state.isVisible,
807
857
  as: "template"
808
858
  }, {
809
- default: w(() => [
810
- v(y(_e), {
859
+ default: L(() => [
860
+ v(y(He), {
811
861
  initialFocus: t.value,
812
- class: "relative z-200",
862
+ class: "relative z-1000",
813
863
  onClose: n
814
864
  }, {
815
- default: w(() => [
816
- v(y(te), {
865
+ default: L(() => [
866
+ v(y(le), {
817
867
  as: "template",
818
868
  enter: "transition-opacity ease-linear duration-150",
819
869
  "enter-from": "opacity-0",
@@ -822,13 +872,13 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
822
872
  "leave-from": "opacity-100",
823
873
  "leave-to": "opacity-0"
824
874
  }, {
825
- default: w(() => [...i[0] || (i[0] = [
826
- c("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
875
+ default: L(() => [...i[0] || (i[0] = [
876
+ d("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
827
877
  ])]),
828
878
  _: 1
829
879
  }),
830
- c("div", Cs, [
831
- v(y(te), {
880
+ d("div", Ms, [
881
+ v(y(le), {
832
882
  as: "template",
833
883
  enter: "transition ease-in-out duration-150 transform",
834
884
  "enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
@@ -837,17 +887,17 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
837
887
  "leave-from": "translate-x-0 opacity-100",
838
888
  "leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
839
889
  }, {
840
- default: w(() => [
841
- v(y(we), {
890
+ default: L(() => [
891
+ v(y(Pe), {
842
892
  ref_key: "panelRef",
843
893
  ref: t,
844
- class: _([
894
+ class: T([
845
895
  "flex w-[400px] py-2.5",
846
896
  e.position === "left" ? "relative left-[10px]" : "absolute right-[10px] h-full"
847
897
  ])
848
898
  }, {
849
- default: w(() => [
850
- (f(), V(W(e.overlayInstance.state.content), Y(e.overlayInstance.state.props, ye(e.overlayInstance.state.eventHandlers)), null, 16))
899
+ default: L(() => [
900
+ (f(), F(ae(e.overlayInstance.state.content), oe(e.overlayInstance.state.props, Se(e.overlayInstance.state.eventHandlers)), null, 16))
851
901
  ]),
852
902
  _: 1
853
903
  }, 8, ["class"])
@@ -862,18 +912,18 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
862
912
  _: 1
863
913
  }, 8, ["show"]));
864
914
  }
865
- }, Ss = (e) => {
915
+ }, Fs = (e) => {
866
916
  if (e.includes(".")) {
867
917
  const s = e.split(".");
868
918
  e = s[s.length - 1];
869
919
  }
870
920
  return e.replace(/_/g, " ");
871
- }, $s = (e, s, t) => {
921
+ }, As = (e, s, t) => {
872
922
  const a = s.querySelector(".relative");
873
923
  if (!a || a.querySelector(".spark-table-head-sorting"))
874
924
  return;
875
925
  const l = document.createElement("span");
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 () => {
926
+ l.classList.add("spark-table-head-sorting"), l.innerHTML = se({ prefix: "fad", iconName: "sort" }).html + se({ prefix: "fad", iconName: "sort-up" }).html + se({ prefix: "fad", iconName: "sort-down" }).html, a.appendChild(l), a.addEventListener("click", async () => {
877
927
  const n = t.params.orderBy, o = t.params.sortedBy;
878
928
  return n === e && o === "asc" ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
879
929
  orderBy: e,
@@ -883,34 +933,34 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
883
933
  sortedBy: "asc"
884
934
  }));
885
935
  });
886
- }, Ls = (e, s, t) => {
936
+ }, js = (e, s, t) => {
887
937
  if (s.querySelector(".spark-table-head-filter"))
888
938
  return;
889
939
  const a = document.createElement("div"), l = document.createElement("input");
890
940
  l.type = "text", l.placeholder = "Filter...", a.className = "spark-table-head-filter", a.appendChild(l);
891
- const n = Ce(async (o, i) => {
892
- const r = i.target.value, d = `filter[${o}]`;
941
+ const n = Ve(async (o, i) => {
942
+ const r = i.target.value, c = `filter[${o}]`;
893
943
  if (r)
894
- return t.params[d] && t.params[d] === r ? void 0 : t.methods.applyParams({
944
+ return t.params[c] && t.params[c] === r ? void 0 : t.methods.applyParams({
895
945
  page: 1,
896
- [d]: r
946
+ [c]: r
897
947
  });
898
- await t.methods.removeParam(d);
948
+ await t.methods.removeParam(c);
899
949
  }, 200);
900
950
  l.addEventListener("keyup", (o) => n(e, o)), s.appendChild(a);
901
- }, Hs = (e, s, t) => {
951
+ }, Os = (e, s, t) => {
902
952
  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
953
  const l = e.querySelector(".colHeader");
904
- l.classList.add("spark-table-head-title"), l.innerHTML = Ss(s);
905
- }, Ts = (e, s, t) => {
954
+ l.classList.add("spark-table-head-title"), l.innerHTML = Fs(s);
955
+ }, zs = (e, s, t) => {
906
956
  if (typeof e != "number")
907
957
  return e;
908
958
  if (e < 0)
909
959
  return;
910
960
  let a = 2;
911
961
  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
- }, Vs = (e) => {
962
+ s.childElementCount === 1 && ((!n || !n.columnSort) && a--, (!n || !n.columnFilter) && a--, n && n.columnSort && As(l, s, t), n && n.columnFilter && js(l, s, t)), (s.childElementCount === a || a === 0) && Os(s, l, n);
963
+ }, Is = (e) => {
914
964
  if (!e.hotInstance || !e.hotInstance.rootElement)
915
965
  return;
916
966
  const s = e.params.orderBy, t = e.params.sortedBy, a = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
@@ -920,34 +970,41 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
920
970
  const n = l.closest("th"), o = Array.from(n.parentElement.children).indexOf(n);
921
971
  e.methods.colToProp(o) === s && l.classList.add(t);
922
972
  });
923
- }, Ps = (e) => (s, t, a, l, n, o, i) => {
973
+ }, Ns = (e) => (s, t, a, l, n, o, i) => {
924
974
  t.innerHTML = "", t.classList.add("spark-table-cell-actions");
925
- const d = (i.rendererConfig || {}).actions || [];
926
- if (d.length === 0)
975
+ const c = (i.rendererConfig || {}).actions || [];
976
+ if (c.length === 0)
927
977
  return;
928
- const m = s.getSourceDataAtRow(s.toPhysicalRow(a)), u = document.createElement("div");
929
- u.classList.add("flex", "items-center", "gap-2"), d.forEach((p) => {
930
- if (p.condition && typeof p.condition == "function" && !p.condition(m))
978
+ const p = s.getSourceDataAtRow(s.toPhysicalRow(a)), u = document.createElement("div");
979
+ u.classList.add("flex", "items-center", "gap-2"), c.forEach((h) => {
980
+ if (h.condition && typeof h.condition == "function" && !h.condition(p))
931
981
  return;
932
- const h = document.createElement("button");
933
- if (h.type = "button", h.classList.add("spark-table-action-button"), p.icon) {
934
- const b = document.createElement("span");
935
- b.innerHTML = ee({ prefix: "far", iconName: p.icon }).html, b.classList.add("size-4"), h.appendChild(b);
982
+ const _ = document.createElement("button");
983
+ if (_.type = "button", _.classList.add("spark-table-action-button"), h.icon) {
984
+ const w = document.createElement("span");
985
+ w.innerHTML = se({ prefix: "far", iconName: h.icon }).html, w.classList.add("size-4"), _.appendChild(w);
936
986
  }
937
- if (p.label) {
938
- const b = document.createElement("span");
939
- b.textContent = p.label, h.appendChild(b);
987
+ if (h.label) {
988
+ const w = document.createElement("span");
989
+ w.textContent = h.label, _.appendChild(w);
940
990
  }
941
- h.addEventListener("click", (b) => {
942
- if (b.preventDefault(), b.stopPropagation(), p.confirm) {
943
- const N = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
944
- if (!window.confirm(N))
991
+ _.addEventListener("click", async (w) => {
992
+ if (w.preventDefault(), w.stopPropagation(), h.confirm) {
993
+ const m = typeof h.confirm == "string" ? h.confirm : `Are you sure you want to ${h.label?.toLowerCase() || "perform this action"}?`;
994
+ if (!await J.confirm({
995
+ title: h.confirmTitle,
996
+ message: m,
997
+ type: h.confirmType,
998
+ confirmText: h.confirmText,
999
+ cancelText: h.cancelText,
1000
+ confirmVariant: h.confirmVariant
1001
+ }))
945
1002
  return;
946
1003
  }
947
- p.event && e.methods.fireEvent(p.event, m), p.handler && typeof p.handler == "function" && p.handler(m);
948
- }), u.appendChild(h);
1004
+ h.event && e.methods.fireEvent(h.event, p), h.handler && typeof h.handler == "function" && h.handler(p);
1005
+ }), u.appendChild(_);
949
1006
  }), t.appendChild(u);
950
- }, de = {
1007
+ }, ye = {
951
1008
  green: "bg-green-100 text-green-800",
952
1009
  red: "bg-red-100 text-red-800",
953
1010
  yellow: "bg-yellow-100 text-yellow-800",
@@ -956,11 +1013,11 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
956
1013
  purple: "bg-purple-100 text-purple-800",
957
1014
  pink: "bg-pink-100 text-pink-800",
958
1015
  indigo: "bg-indigo-100 text-indigo-800"
959
- }, Rs = (e) => (s, t, a, l, n, o, i) => {
1016
+ }, Ds = (e) => (s, t, a, l, n, o, i) => {
960
1017
  if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !o)
961
1018
  return;
962
- const d = (i.rendererConfig || {}).colorMap || {}, m = d[o] || d[o?.toLowerCase()] || "gray", u = de[m] || de.gray, p = document.createElement("span");
963
- p.classList.add(
1019
+ const c = (i.rendererConfig || {}).colorMap || {}, p = c[o] || c[o?.toLowerCase()] || "gray", u = ye[p] || ye.gray, h = document.createElement("span");
1020
+ h.classList.add(
964
1021
  "inline-flex",
965
1022
  "items-center",
966
1023
  "px-2.5",
@@ -970,57 +1027,91 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
970
1027
  "font-medium",
971
1028
  "capitalize",
972
1029
  ...u.split(" ")
973
- ), p.textContent = o, t.appendChild(p);
974
- }, Bs = (e) => (s, t, a, l, n, o, i) => {
1030
+ ), h.textContent = o, t.appendChild(h);
1031
+ }, be = {
1032
+ green: { bg: "bg-green-100", text: "text-green-500" },
1033
+ red: { bg: "bg-red-100", text: "text-red-500" },
1034
+ yellow: { bg: "bg-yellow-100", text: "text-yellow-500" },
1035
+ blue: { bg: "bg-blue-100", text: "text-blue-500" },
1036
+ gray: { bg: "bg-gray-100", text: "text-gray-500" },
1037
+ purple: { bg: "bg-purple-100", text: "text-purple-500" }
1038
+ }, qs = (e) => {
1039
+ if (e == null || e === "")
1040
+ return !1;
1041
+ if (typeof e == "boolean")
1042
+ return e;
1043
+ if (typeof e == "number")
1044
+ return e === 1;
1045
+ if (typeof e == "string") {
1046
+ const s = e.toLowerCase().trim();
1047
+ return s === "1" || s === "yes" || s === "true";
1048
+ }
1049
+ return !1;
1050
+ }, Zs = (e) => (s, t, a, l, n, o, i) => {
1051
+ t.innerHTML = "", t.classList.add("spark-table-cell-boolean");
1052
+ const r = i.rendererConfig || {}, c = qs(o), p = c ? r.trueIcon || "check" : r.falseIcon || "xmark", u = c ? r.trueColor || "green" : r.falseColor || "red", h = r.size || 32, _ = r.iconPrefix || "far", w = be[u] || be.gray, m = document.createElement("div");
1053
+ m.classList.add(
1054
+ "inline-flex",
1055
+ "items-center",
1056
+ "justify-center",
1057
+ "rounded-full",
1058
+ w.bg,
1059
+ w.text
1060
+ ), m.style.width = `${h}px`, m.style.height = `${h}px`;
1061
+ const x = document.createElement("span");
1062
+ x.innerHTML = se({ prefix: _, iconName: p }).html, x.classList.add("flex", "items-center", "justify-center");
1063
+ const P = Math.round(h * 0.5);
1064
+ x.style.fontSize = `${P}px`, m.appendChild(x), t.appendChild(m);
1065
+ }, Ks = (e) => (s, t, a, l, n, o, i) => {
975
1066
  if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !o)
976
1067
  return;
977
- const r = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a));
978
- let m = 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));
1068
+ const r = i.rendererConfig || {}, c = s.getSourceDataAtRow(s.toPhysicalRow(a));
1069
+ let p = o;
1070
+ r.href && (typeof r.href == "function" ? p = r.href(c) : r.href === "email" ? p = `mailto:${o}` : r.href === "tel" ? p = `tel:${o}` : typeof r.href == "string" && (p = c[r.href] || o));
980
1071
  const u = document.createElement("a");
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
- p.stopPropagation();
1072
+ u.href = p, 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", (h) => {
1073
+ h.stopPropagation();
983
1074
  }), t.appendChild(u);
984
- }, ue = {
1075
+ }, ve = {
985
1076
  sm: "h-6 w-6",
986
1077
  md: "h-8 w-8",
987
1078
  lg: "h-12 w-12"
988
- }, Ms = (e) => (s, t, a, l, n, o, i) => {
1079
+ }, Us = (e) => (s, t, a, l, n, o, i) => {
989
1080
  if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !o)
990
1081
  return;
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
- const b = document.createElement("img");
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, n, o, i) => {
1082
+ const r = i.rendererConfig || {}, c = s.getSourceDataAtRow(s.toPhysicalRow(a)), p = r.size || "md", u = ve[p] || ve.md, h = r.rounded !== !1;
1083
+ let _ = r.alt || "";
1084
+ typeof r.alt == "string" && c[r.alt] && (_ = c[r.alt]);
1085
+ const w = document.createElement("img");
1086
+ w.src = o, w.alt = _, w.classList.add(...u.split(" "), "object-cover"), h ? w.classList.add("rounded-full") : w.classList.add("rounded"), t.appendChild(w);
1087
+ }, Gs = (e) => (s, t, a, l, n, o, i) => {
997
1088
  if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !o)
998
1089
  return;
999
- const r = i.rendererConfig || {}, d = r.format || "short", m = r.locale || "en-US";
1090
+ const r = i.rendererConfig || {}, c = r.format || "short", p = r.locale || "en-US";
1000
1091
  let u = o;
1001
1092
  try {
1002
- const h = new Date(o);
1003
- isNaN(h.getTime()) ? u = o : typeof d == "function" ? u = d(h) : d === "short" ? u = h.toLocaleDateString(m) : d === "long" ? u = h.toLocaleDateString(m, {
1093
+ const _ = new Date(o);
1094
+ isNaN(_.getTime()) ? u = o : typeof c == "function" ? u = c(_) : c === "short" ? u = _.toLocaleDateString(p) : c === "long" ? u = _.toLocaleDateString(p, {
1004
1095
  year: "numeric",
1005
1096
  month: "long",
1006
1097
  day: "numeric"
1007
- }) : d === "relative" ? u = As(h) : d === "datetime" ? u = h.toLocaleString(m) : u = h.toLocaleDateString(m);
1008
- } catch (h) {
1009
- console.error("Error formatting date:", h), u = o;
1098
+ }) : c === "relative" ? u = Ws(_) : c === "datetime" ? u = _.toLocaleString(p) : u = _.toLocaleDateString(p);
1099
+ } catch (_) {
1100
+ console.error("Error formatting date:", _), u = o;
1010
1101
  }
1011
- const p = document.createElement("span");
1012
- p.textContent = u, t.appendChild(p);
1102
+ const h = document.createElement("span");
1103
+ h.textContent = u, t.appendChild(h);
1013
1104
  };
1014
- function As(e) {
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" : ""}`;
1105
+ function Ws(e) {
1106
+ 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), c = t > 0;
1107
+ return a < 60 ? c ? "just now" : "in a moment" : l < 60 ? c ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : n < 24 ? c ? `${n} hour${n > 1 ? "s" : ""} ago` : `in ${n} hour${n > 1 ? "s" : ""}` : o < 30 ? c ? `${o} day${o > 1 ? "s" : ""} ago` : `in ${o} day${o > 1 ? "s" : ""}` : i < 12 ? c ? `${i} month${i > 1 ? "s" : ""} ago` : `in ${i} month${i > 1 ? "s" : ""}` : c ? `${r} year${r > 1 ? "s" : ""} ago` : `in ${r} year${r > 1 ? "s" : ""}`;
1017
1108
  }
1018
- const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
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
- }), Es.set(e, s);
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, n, o) => {
1109
+ const Ys = /* @__PURE__ */ new Map(), U = (e, s) => {
1110
+ Mt(e, (t, a, l, n, o, i, r) => {
1111
+ Ft.apply(null, [t, a, l, n, o, i, r]), s(t, a, l, n, o, i, r);
1112
+ }), Ys.set(e, s);
1113
+ }, Xs = (e) => {
1114
+ U("spark.actions", Ns(e)), U("spark.badge", Ds()), U("spark.boolean", Zs()), U("spark.link", Ks()), U("spark.image", Us()), U("spark.date", Gs()), U("style.capitalize", (s, t, a, l, n, o) => {
1024
1115
  if (!o || o.length === 0) {
1025
1116
  t.innerText = "";
1026
1117
  return;
@@ -1028,8 +1119,118 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1028
1119
  const i = document.createElement("span");
1029
1120
  i.innerHTML = o, i.classList.add("capitalize"), t.replaceChildren(i);
1030
1121
  });
1031
- }, js = () => {
1032
- }, Is = { class: "flex items-center gap-4 px-4 py-3" }, Os = { class: "shrink-0" }, Ns = { class: "text-sm text-gray-700" }, Ds = { class: "font-medium" }, Zs = { class: "font-medium" }, qs = { class: "font-medium" }, Gs = {
1122
+ }, Js = () => {
1123
+ }, Qs = (e, s = {}) => {
1124
+ const t = K(), a = te(), l = s.namespace, n = l === null, o = s.syncToRoute !== !1, i = s.persistToStorage === !0, r = s.restoreOnMount !== !1, c = s.storageTTL || 7, p = n ? `spark-table:${a.path}` : `spark-table:${l}`, u = (b, S = "") => {
1125
+ const V = {};
1126
+ return Object.keys(b).forEach((O) => {
1127
+ const Y = b[O], fe = S ? `${S}[${O}]` : O;
1128
+ Y != null && (typeof Y == "object" && !Array.isArray(Y) ? Object.assign(V, u(Y, fe)) : V[fe] = String(Y));
1129
+ }), V;
1130
+ }, h = () => {
1131
+ if (i)
1132
+ try {
1133
+ const b = {
1134
+ params: e.params,
1135
+ timestamp: Date.now()
1136
+ };
1137
+ localStorage.setItem(p, JSON.stringify(b));
1138
+ } catch (b) {
1139
+ console.warn("Failed to save table state to localStorage:", b);
1140
+ }
1141
+ }, _ = () => {
1142
+ if (!i) return null;
1143
+ try {
1144
+ const b = localStorage.getItem(p);
1145
+ if (!b) return null;
1146
+ const S = JSON.parse(b);
1147
+ if (c > 0) {
1148
+ const V = Date.now() - S.timestamp, O = c * 24 * 60 * 60 * 1e3;
1149
+ if (V > O)
1150
+ return localStorage.removeItem(p), null;
1151
+ }
1152
+ return S.params;
1153
+ } catch (b) {
1154
+ return console.warn("Failed to load table state from localStorage:", b), null;
1155
+ }
1156
+ }, w = () => {
1157
+ try {
1158
+ localStorage.removeItem(p);
1159
+ } catch (b) {
1160
+ console.warn("Failed to clear table state from localStorage:", b);
1161
+ }
1162
+ }, m = () => {
1163
+ if (!o) return;
1164
+ const b = { ...a.query };
1165
+ if (n) {
1166
+ Object.keys(b).forEach((V) => {
1167
+ x(V) && delete b[V];
1168
+ });
1169
+ const S = u(e.params);
1170
+ Object.assign(b, S);
1171
+ } else {
1172
+ Object.keys(b).forEach((V) => {
1173
+ (V.startsWith(`${l}[`) || V === l) && delete b[V];
1174
+ });
1175
+ const S = u(e.params, l);
1176
+ Object.assign(b, S);
1177
+ }
1178
+ t.replace({ query: b });
1179
+ }, x = (b) => !!(["page", "limit", "search", "orderBy", "sortedBy"].includes(b) || b.includes("[")), P = (b, S) => {
1180
+ if (["page", "limit"].includes(b) && S !== null && S !== void 0) {
1181
+ const O = parseInt(S, 10);
1182
+ return isNaN(O) ? S : O;
1183
+ }
1184
+ return S;
1185
+ }, k = () => {
1186
+ if (n)
1187
+ Object.keys(a.query).forEach((b) => {
1188
+ x(b) && (e.params[b] = P(b, a.query[b]));
1189
+ });
1190
+ else {
1191
+ const b = `${l}[`;
1192
+ Object.keys(a.query).forEach((S) => {
1193
+ if (S.startsWith(b)) {
1194
+ const V = S.slice(b.length, -1);
1195
+ e.params[V] = P(V, a.query[S]);
1196
+ }
1197
+ });
1198
+ }
1199
+ };
1200
+ return j(
1201
+ () => e.params,
1202
+ () => {
1203
+ o && m(), i && h();
1204
+ },
1205
+ { deep: !0 }
1206
+ ), r && pe(() => {
1207
+ let b = !1;
1208
+ if (o) {
1209
+ let S = !1;
1210
+ if (n)
1211
+ S = Object.keys(a.query).some((V) => x(V));
1212
+ else {
1213
+ const V = `${l}[`;
1214
+ S = Object.keys(a.query).some(
1215
+ (O) => O.startsWith(V)
1216
+ );
1217
+ }
1218
+ S && (b = !0, k());
1219
+ }
1220
+ if (!b && i) {
1221
+ const S = _();
1222
+ S && Object.keys(S).length > 0 && (Object.keys(S).forEach((V) => {
1223
+ S[V] = P(V, S[V]);
1224
+ }), Object.assign(e.params, S));
1225
+ }
1226
+ }), {
1227
+ syncToRoute: m,
1228
+ restoreFromRoute: k,
1229
+ saveToStorage: h,
1230
+ loadFromStorage: _,
1231
+ clearStorage: w
1232
+ };
1233
+ }, ea = { class: "flex items-center gap-4 py-3" }, ta = { class: "shrink-0" }, sa = { class: "text-sm text-gray-700" }, aa = { class: "font-medium" }, oa = { class: "font-medium" }, ra = { class: "font-medium" }, na = {
1033
1234
  __name: "SparkTablePaginationDetails",
1034
1235
  props: {
1035
1236
  sparkTable: {
@@ -1040,28 +1241,28 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1040
1241
  setup(e) {
1041
1242
  const s = e;
1042
1243
  return (t, a) => (f(), g("div", null, [
1043
- c("div", Is, [
1044
- c("div", Os, [
1045
- c("div", Ns, [
1046
- a[0] || (a[0] = P(" Showing ", -1)),
1047
- c("span", Ds, S(s.sparkTable.response.meta.from), 1),
1048
- a[1] || (a[1] = P(" to ", -1)),
1049
- c("span", Zs, S(s.sparkTable.response.meta.to), 1),
1050
- a[2] || (a[2] = P(" of ", -1)),
1051
- c("span", qs, S(s.sparkTable.response.meta.total), 1),
1052
- a[3] || (a[3] = P(" results ", -1))
1244
+ d("div", ea, [
1245
+ d("div", ta, [
1246
+ d("div", sa, [
1247
+ a[0] || (a[0] = A(" Showing ", -1)),
1248
+ d("span", aa, H(s.sparkTable.response.meta.from), 1),
1249
+ a[1] || (a[1] = A(" to ", -1)),
1250
+ d("span", oa, H(s.sparkTable.response.meta.to), 1),
1251
+ a[2] || (a[2] = A(" of ", -1)),
1252
+ d("span", ra, H(s.sparkTable.response.meta.total), 1),
1253
+ a[3] || (a[3] = A(" results ", -1))
1053
1254
  ])
1054
1255
  ])
1055
1256
  ])
1056
1257
  ]));
1057
1258
  }
1058
- }, Ks = { class: "flex items-center gap-4 px-4 py-3" }, Us = {
1259
+ }, la = { class: "flex items-center gap-4 px-4 py-3" }, ia = {
1059
1260
  key: 0,
1060
1261
  class: "shrink-0 ml-auto"
1061
- }, Ws = {
1262
+ }, ca = {
1062
1263
  class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
1063
1264
  "aria-label": "Pagination"
1064
- }, Ys = ["onClick"], Xs = {
1265
+ }, da = ["onClick"], ua = {
1065
1266
  __name: "SparkTablePaginationPaging",
1066
1267
  props: {
1067
1268
  sparkTable: {
@@ -1071,67 +1272,67 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1071
1272
  },
1072
1273
  emits: ["paginate"],
1073
1274
  setup(e, { emit: s }) {
1074
- const t = e, a = s, l = (m) => {
1075
- n(t.sparkTable.params.page + m);
1076
- }, n = (m) => {
1077
- m < 1 || m > t.sparkTable.response.meta.last_page || a("paginate", {
1078
- page: m
1275
+ const t = e, a = s, l = (p) => {
1276
+ n(t.sparkTable.params.page + p);
1277
+ }, n = (p) => {
1278
+ p < 1 || p > t.sparkTable.response.meta.last_page || a("paginate", {
1279
+ page: p
1079
1280
  });
1080
- }, o = k(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = k(() => t.sparkTable.computed.ready ? ht(
1281
+ }, o = C(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = C(() => t.sparkTable.computed.ready ? $t(
1081
1282
  Math.floor((o.value - 1) / 10) * 10 + 1,
1082
1283
  o.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : o.value + 1
1083
- ) : []), r = k(
1084
- () => t.sparkTable.params.page < q(t.sparkTable.response.meta, "last_page", 1)
1085
- ), d = k(() => t.sparkTable.params.page > 1);
1086
- return (m, u) => {
1087
- const p = L("font-awesome-icon");
1284
+ ) : []), r = C(
1285
+ () => t.sparkTable.params.page < D(t.sparkTable.response.meta, "last_page", 1)
1286
+ ), c = C(() => t.sparkTable.params.page > 1);
1287
+ return (p, u) => {
1288
+ const h = B("font-awesome-icon");
1088
1289
  return f(), g("div", null, [
1089
- c("div", Ks, [
1090
- i.value.length > 1 ? (f(), g("div", Us, [
1091
- c("div", null, [
1092
- c("nav", Ws, [
1093
- c("a", {
1094
- class: _([d.value ? "" : "disabled", "relative inline-flex items-center rounded-l-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"]),
1290
+ d("div", la, [
1291
+ i.value.length > 1 ? (f(), g("div", ia, [
1292
+ d("div", null, [
1293
+ d("nav", ca, [
1294
+ d("a", {
1295
+ class: T([c.value ? "" : "disabled", "relative inline-flex items-center rounded-l-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"]),
1095
1296
  href: "#",
1096
- onClick: u[0] || (u[0] = j((h) => l(-1), ["prevent"]))
1297
+ onClick: u[0] || (u[0] = G((_) => l(-1), ["prevent"]))
1097
1298
  }, [
1098
- v(p, {
1099
- icon: y(H).farChevronLeft,
1299
+ v(h, {
1300
+ icon: y(E).farChevronLeft,
1100
1301
  class: "size-5"
1101
1302
  }, null, 8, ["icon"])
1102
1303
  ], 2),
1103
- (f(!0), g(B, null, A(i.value, (h) => (f(), g("a", {
1104
- key: `page-${h}`,
1304
+ (f(!0), g(z, null, q(i.value, (_) => (f(), g("a", {
1305
+ key: `page-${_}`,
1105
1306
  href: "#",
1106
- class: _([
1307
+ class: T([
1107
1308
  "relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
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"
1309
+ e.sparkTable.params.page === _ ? "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
1310
  ]),
1110
- onClick: (b) => n(h)
1111
- }, S(h), 11, Ys))), 128)),
1112
- c("a", {
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
- onClick: u[1] || (u[1] = j((h) => l(1), ["prevent"])),
1311
+ onClick: (w) => n(_)
1312
+ }, H(_), 11, da))), 128)),
1313
+ d("a", {
1314
+ class: T([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"]),
1315
+ onClick: u[1] || (u[1] = G((_) => l(1), ["prevent"])),
1115
1316
  href: "#"
1116
1317
  }, [
1117
- v(p, {
1118
- icon: y(H).farChevronRight,
1318
+ v(h, {
1319
+ icon: y(E).farChevronRight,
1119
1320
  class: "size-5"
1120
1321
  }, null, 8, ["icon"])
1121
1322
  ], 2)
1122
1323
  ])
1123
1324
  ])
1124
- ])) : x("", !0)
1325
+ ])) : $("", !0)
1125
1326
  ])
1126
1327
  ]);
1127
1328
  };
1128
1329
  }
1129
- }, O = (e, s) => {
1330
+ }, W = (e, s) => {
1130
1331
  const t = e.__vccOpts || e;
1131
1332
  for (const [a, l] of s)
1132
1333
  t[a] = l;
1133
1334
  return t;
1134
- }, Js = { class: "spark-table-pagination-per-page" }, Qs = {
1335
+ }, pa = { class: "spark-table-pagination-per-page" }, fa = {
1135
1336
  __name: "SparkTablePaginationPerPage",
1136
1337
  props: {
1137
1338
  sparkTable: {
@@ -1141,7 +1342,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1141
1342
  },
1142
1343
  emits: ["paginate"],
1143
1344
  setup(e, { emit: s }) {
1144
- const t = e, a = s, l = k(() => t.sparkTable.options.perPages.map((o) => ({
1345
+ const t = e, a = s, l = C(() => t.sparkTable.options.perPages.map((o) => ({
1145
1346
  label: String(o),
1146
1347
  value: o
1147
1348
  }))), n = (o) => {
@@ -1151,8 +1352,8 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1151
1352
  });
1152
1353
  };
1153
1354
  return (o, i) => {
1154
- const r = L("FormKit");
1155
- return f(), g("div", Js, [
1355
+ const r = B("FormKit");
1356
+ return f(), g("div", pa, [
1156
1357
  v(r, {
1157
1358
  "model-value": e.sparkTable.params.limit,
1158
1359
  type: "select",
@@ -1165,7 +1366,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1165
1366
  ]);
1166
1367
  };
1167
1368
  }
1168
- }, ea = /* @__PURE__ */ O(Qs, [["__scopeId", "data-v-9ef8544b"]]), pe = {
1369
+ }, ma = /* @__PURE__ */ W(fa, [["__scopeId", "data-v-9ef8544b"]]), xe = {
1169
1370
  __name: "SparkTableToolbar",
1170
1371
  props: {
1171
1372
  position: {
@@ -1175,18 +1376,18 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1175
1376
  }
1176
1377
  },
1177
1378
  setup(e) {
1178
- const s = e, t = ve(), a = k(() => !!t.default), l = k(() => {
1179
- const n = "spark-table-toolbar flex flex-wrap items-center gap-x-5 px-5 w-full";
1379
+ const s = e, t = $e(), a = C(() => !!t.default), l = C(() => {
1380
+ const n = "spark-table-toolbar flex flex-wrap items-center gap-x-5 w-full";
1180
1381
  return s.position === "footer" ? `${n} spark-table-toolbar-footer justify-between` : `${n} spark-table-toolbar-header gap-y-5 py-5`;
1181
1382
  });
1182
1383
  return (n, o) => a.value ? (f(), g("div", {
1183
1384
  key: 0,
1184
- class: _(l.value)
1385
+ class: T(l.value)
1185
1386
  }, [
1186
- T(n.$slots, "default")
1187
- ], 2)) : x("", !0);
1387
+ M(n.$slots, "default")
1388
+ ], 2)) : $("", !0);
1188
1389
  }
1189
- }, ta = { class: "spark-table-search" }, sa = {
1390
+ }, ga = { class: "spark-table-search" }, ha = {
1190
1391
  __name: "SparkTableSearch",
1191
1392
  props: {
1192
1393
  /** SparkTable instance object */
@@ -1200,46 +1401,47 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1200
1401
  default: () => ({
1201
1402
  placeholder: "Search...",
1202
1403
  param: "search",
1203
- debounce: 300
1404
+ debounce: 400
1204
1405
  })
1205
1406
  }
1206
1407
  },
1207
1408
  setup(e) {
1208
- const s = e, t = $(""), a = s.config.param || "search";
1409
+ const s = e, t = R(""), a = s.config.param || "search";
1209
1410
  s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
1210
1411
  [a]: s.config.initialValue
1211
1412
  }));
1212
- const l = Ce((o) => {
1413
+ const l = Ve((o) => {
1213
1414
  o ? s.sparkTable.methods.applyParams({
1214
1415
  page: 1,
1215
1416
  [a]: o
1216
1417
  }) : s.sparkTable.methods.removeParam(a);
1217
1418
  }, s.config.debounce || 300);
1218
- E(t, (o) => {
1419
+ j(t, (o) => {
1219
1420
  l(o);
1220
1421
  });
1221
1422
  const n = s.config.placeholder || "Search...";
1222
- return E(
1423
+ return j(
1223
1424
  () => s.sparkTable.params[a],
1224
1425
  (o) => {
1225
- !o && t.value && (t.value = "");
1426
+ o && o !== t.value ? t.value = o : !o && t.value && (t.value = "");
1226
1427
  }
1227
1428
  ), (o, i) => {
1228
- const r = L("FormKit");
1229
- return f(), g("div", ta, [
1230
- v(r, Y({
1429
+ const r = B("FormKit");
1430
+ return f(), g("div", ga, [
1431
+ v(r, oe({
1231
1432
  modelValue: t.value,
1232
- "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1433
+ "onUpdate:modelValue": i[0] || (i[0] = (c) => t.value = c),
1233
1434
  type: "text",
1234
1435
  placeholder: y(n),
1436
+ suffixIcon: "search",
1235
1437
  "outer-class": "!mb-0",
1236
1438
  "wrapper-class": "!mb-0",
1237
- "input-class": "!w-64 !pr-8"
1439
+ "input-class": "!w-44 !pr-8"
1238
1440
  }, s.config.formkitProps || {}), null, 16, ["modelValue", "placeholder"])
1239
1441
  ]);
1240
1442
  };
1241
1443
  }
1242
- }, aa = /* @__PURE__ */ O(sa, [["__scopeId", "data-v-781e7d17"]]), oa = { class: "spark-table-filter-select" }, ra = {
1444
+ }, ya = /* @__PURE__ */ W(ha, [["__scopeId", "data-v-976170dc"]]), ba = { class: "spark-table-filter-select" }, va = {
1243
1445
  __name: "SparkTableFilterSelect",
1244
1446
  props: {
1245
1447
  /** SparkTable instance object */
@@ -1255,30 +1457,30 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1255
1457
  }
1256
1458
  },
1257
1459
  setup(e) {
1258
- const s = e, t = $(""), a = s.config.param || `filter[${s.config.key}]`;
1460
+ const s = e, t = R(""), a = s.config.param || `filter[${s.config.key}]`;
1259
1461
  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
1462
  [a]: s.config.initialValue
1261
1463
  }));
1262
- const l = s.config.label || null, n = k(() => [
1464
+ const l = s.config.label || null, n = C(() => [
1263
1465
  { label: s.config.placeholder || "All", value: "" },
1264
1466
  ...s.config.options
1265
1467
  ]);
1266
- return E(t, (o) => {
1468
+ return j(t, (o) => {
1267
1469
  o ? s.sparkTable.methods.applyParams({
1268
1470
  page: 1,
1269
1471
  [a]: o
1270
1472
  }) : s.sparkTable.methods.removeParam(a);
1271
- }), E(
1473
+ }), j(
1272
1474
  () => s.sparkTable.params[a],
1273
1475
  (o) => {
1274
- !o && t.value && (t.value = "");
1476
+ o != null && o !== "" ? t.value !== o && (t.value = o) : t.value && (t.value = "");
1275
1477
  }
1276
1478
  ), (o, i) => {
1277
- const r = L("FormKit");
1278
- return f(), g("div", oa, [
1279
- v(r, Y({
1479
+ const r = B("FormKit");
1480
+ return f(), g("div", ba, [
1481
+ v(r, oe({
1280
1482
  modelValue: t.value,
1281
- "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1483
+ "onUpdate:modelValue": i[0] || (i[0] = (c) => t.value = c),
1282
1484
  type: "select",
1283
1485
  label: y(l),
1284
1486
  options: n.value,
@@ -1289,10 +1491,10 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1289
1491
  ]);
1290
1492
  };
1291
1493
  }
1292
- }, na = /* @__PURE__ */ O(ra, [["__scopeId", "data-v-8840f892"]]), la = { class: "spark-table-filter-buttons" }, ia = {
1494
+ }, xa = /* @__PURE__ */ W(va, [["__scopeId", "data-v-642dbc69"]]), ka = { class: "spark-table-filter-buttons" }, wa = {
1293
1495
  key: 0,
1294
1496
  class: "spark-table-filter-buttons-label"
1295
- }, ca = {
1497
+ }, _a = {
1296
1498
  __name: "SparkTableFilterButtons",
1297
1499
  props: {
1298
1500
  /** SparkTable instance object */
@@ -1308,7 +1510,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1308
1510
  }
1309
1511
  },
1310
1512
  setup(e) {
1311
- const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1513
+ const s = e, t = R(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1312
1514
  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
1515
  [l]: s.config.initialValue
1314
1516
  }));
@@ -1318,23 +1520,23 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1318
1520
  [l]: i
1319
1521
  });
1320
1522
  };
1321
- return E(
1523
+ return j(
1322
1524
  () => s.sparkTable.params[l],
1323
1525
  (i) => {
1324
1526
  (i == null || i === "") && t.value ? t.value = null : i !== t.value && (t.value = i);
1325
1527
  }
1326
- ), (i, r) => (f(), g("div", la, [
1327
- y(a) ? (f(), g("span", ia, S(y(a)), 1)) : x("", !0),
1328
- v(ms, { class: "isolate" }, {
1329
- default: w(() => [
1330
- (f(!0), g(B, null, A(e.config.options, (d) => (f(), V(F, {
1331
- key: d.value,
1528
+ ), (i, r) => (f(), g("div", ka, [
1529
+ y(a) ? (f(), g("span", wa, H(y(a)), 1)) : $("", !0),
1530
+ v(Cs, { class: "isolate" }, {
1531
+ default: L(() => [
1532
+ (f(!0), g(z, null, q(e.config.options, (c) => (f(), F(N, {
1533
+ key: c.value,
1332
1534
  size: "xl",
1333
- variant: n(d.value) ? "primary" : "secondary",
1334
- onClick: (m) => o(d.value)
1535
+ variant: n(c.value) ? "primary" : "secondary",
1536
+ onClick: (p) => o(c.value)
1335
1537
  }, {
1336
- default: w(() => [
1337
- P(S(d.label), 1)
1538
+ default: L(() => [
1539
+ A(H(c.label), 1)
1338
1540
  ]),
1339
1541
  _: 2
1340
1542
  }, 1032, ["variant", "onClick"]))), 128))
@@ -1343,7 +1545,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1343
1545
  })
1344
1546
  ]));
1345
1547
  }
1346
- }, da = /* @__PURE__ */ O(ca, [["__scopeId", "data-v-0fcd0cce"]]), ua = { class: "spark-table-date-picker" }, pa = {
1548
+ }, Ca = /* @__PURE__ */ W(_a, [["__scopeId", "data-v-0fcd0cce"]]), Sa = { class: "spark-table-date-picker" }, $a = {
1347
1549
  __name: "SparkTableDatePicker",
1348
1550
  props: {
1349
1551
  /** SparkTable instance object */
@@ -1359,15 +1561,15 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1359
1561
  }
1360
1562
  },
1361
1563
  setup(e) {
1362
- const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = $(`${l}-0`);
1564
+ const s = e, t = R(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = R(`${l}-0`);
1363
1565
  return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
1364
1566
  [l]: s.config.initialValue
1365
- })) : t.value = null, E(t, (o) => {
1567
+ })) : t.value = null, j(t, (o) => {
1366
1568
  o ? s.sparkTable.methods.applyParams({
1367
1569
  page: 1,
1368
1570
  [l]: o
1369
1571
  }) : s.sparkTable.methods.removeParam(l);
1370
- }), E(
1572
+ }), j(
1371
1573
  () => s.sparkTable.params[l],
1372
1574
  (o) => {
1373
1575
  if ((o == null || o === "") && t.value) {
@@ -1377,12 +1579,12 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1377
1579
  } else o && o !== t.value && (t.value = o);
1378
1580
  }
1379
1581
  ), (o, i) => {
1380
- const r = L("FormKit");
1381
- return f(), g("div", ua, [
1382
- (f(), V(r, Y({
1582
+ const r = B("FormKit");
1583
+ return f(), g("div", Sa, [
1584
+ (f(), F(r, oe({
1383
1585
  key: n.value,
1384
1586
  modelValue: t.value,
1385
- "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1587
+ "onUpdate:modelValue": i[0] || (i[0] = (c) => t.value = c),
1386
1588
  type: "datepicker",
1387
1589
  "picker-only": "",
1388
1590
  label: y(a),
@@ -1396,7 +1598,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1396
1598
  ]);
1397
1599
  };
1398
1600
  }
1399
- }, fa = /* @__PURE__ */ O(pa, [["__scopeId", "data-v-44ef9cb8"]]), ma = { class: "spark-table-reset" }, ga = { key: 1 }, ha = {
1601
+ }, Ta = /* @__PURE__ */ W($a, [["__scopeId", "data-v-44ef9cb8"]]), La = { class: "spark-table-reset" }, Ha = { key: 1 }, Pa = {
1400
1602
  __name: "SparkTableReset",
1401
1603
  props: {
1402
1604
  /** SparkTable instance object */
@@ -1412,53 +1614,57 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1412
1614
  },
1413
1615
  setup(e) {
1414
1616
  const s = e, t = () => {
1415
- const a = s.sparkTable.plugins || {}, l = [];
1416
- Object.entries(a).forEach(([o, i]) => {
1417
- if (!(!i || !i.enabled || i.type === "reset")) {
1418
- if (i.type === "search")
1419
- i.param && l.push(i.param);
1420
- else if (i.type === "filterSelect" || i.type === "filterButtons") {
1421
- const r = i.param || `filter[${i.key}]`;
1422
- l.push(r);
1423
- } else if (i.type === "datePicker") {
1424
- const r = i.param || `filter[${i.key}]`;
1425
- l.push(r);
1426
- }
1427
- }
1617
+ const a = s.sparkTable.plugins || {}, l = [], n = {};
1618
+ Object.entries(a).forEach(([c, p]) => {
1619
+ if (!p || p.type === "reset" || !(typeof p.enabled == "function" ? p.enabled(s.sparkTable.params) : p.enabled))
1620
+ return;
1621
+ let h = null;
1622
+ p.type === "search" ? h = p.param || "search" : p.type === "filterSelect" || p.type === "filterButtons" ? h = p.param || `filter[${p.key}]` : p.type === "datePicker" && (h = p.param || `filter[${p.key}]`), h && (p.initialValue !== void 0 && p.initialValue !== null ? n[h] = p.initialValue : l.push(h));
1428
1623
  });
1429
- const n = l.filter(
1430
- (o) => s.sparkTable.params[o] !== void 0 && s.sparkTable.params[o] !== null && s.sparkTable.params[o] !== ""
1624
+ const o = l.filter(
1625
+ (c) => s.sparkTable.params[c] !== void 0 && s.sparkTable.params[c] !== null && s.sparkTable.params[c] !== ""
1626
+ ), i = Object.entries(n).filter(
1627
+ ([c, p]) => s.sparkTable.params[c] !== p
1431
1628
  );
1432
- n.length !== 0 && s.sparkTable.methods.clearParams(n);
1629
+ if (o.length === 0 && i.length === 0)
1630
+ return;
1631
+ o.forEach((c) => {
1632
+ delete s.sparkTable.params[c];
1633
+ });
1634
+ const r = Object.fromEntries(i);
1635
+ s.sparkTable.methods.applyParams({ ...r, page: 1 });
1433
1636
  };
1434
1637
  return (a, l) => {
1435
- const n = L("font-awesome-icon");
1436
- return f(), g("div", ma, [
1437
- v(F, {
1638
+ const n = B("font-awesome-icon");
1639
+ return f(), g("div", La, [
1640
+ v(N, {
1438
1641
  onClick: t,
1439
1642
  variant: "secondary",
1440
1643
  size: "xl"
1441
1644
  }, {
1442
- default: w(() => [
1443
- e.config.icon ? (f(), V(n, {
1645
+ default: L(() => [
1646
+ e.config.icon ? (f(), F(n, {
1444
1647
  key: 0,
1445
1648
  icon: ["far", e.config.icon],
1446
- class: _({ "mr-1.5": e.config.label })
1447
- }, null, 8, ["icon", "class"])) : x("", !0),
1448
- e.config.label ? (f(), g("span", ga, S(e.config.label), 1)) : x("", !0)
1649
+ class: T({ "mr-1.5": e.config.label })
1650
+ }, null, 8, ["icon", "class"])) : $("", !0),
1651
+ e.config.label ? (f(), g("span", Ha, H(e.config.label), 1)) : $("", !0)
1449
1652
  ]),
1450
1653
  _: 1
1451
1654
  })
1452
1655
  ]);
1453
1656
  };
1454
1657
  }
1455
- }, ya = /* @__PURE__ */ O(ha, [["__scopeId", "data-v-cbbeeb45"]]), va = { class: "spark-table" }, ba = { class: "flex items-center gap-x-3" }, ne = {
1456
- perPages: [100, 200, 500],
1457
- limit: 100
1458
- }, xa = {
1658
+ }, Va = /* @__PURE__ */ W(Pa, [["__scopeId", "data-v-45343158"]]), Ra = { class: "spark-table" }, Ba = {
1659
+ key: 1,
1660
+ class: "pt-5"
1661
+ }, Ea = { class: "flex items-center gap-x-3" }, ue = {
1662
+ perPages: [15, 30, 50, 100, 200, 500],
1663
+ limit: 15
1664
+ }, Ma = {
1459
1665
  page: 1,
1460
- limit: ne.limit
1461
- }, fe = {
1666
+ limit: ue.limit
1667
+ }, ke = {
1462
1668
  colHeaders: !0,
1463
1669
  filters: !1,
1464
1670
  stretchH: "all",
@@ -1468,7 +1674,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1468
1674
  tableClassName: "spark-table-table",
1469
1675
  readOnlyCellClassName: "read-only",
1470
1676
  licenseKey: "non-commercial-and-evaluation"
1471
- }, kr = {
1677
+ }, Mr = {
1472
1678
  __name: "SparkTable",
1473
1679
  props: {
1474
1680
  url: {
@@ -1480,7 +1686,7 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1480
1686
  dataTransformer: {
1481
1687
  type: Function,
1482
1688
  default: (e, s) => ({
1483
- data: q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((n) => a[n])) : e.data.data,
1689
+ data: D(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((n) => a[n])) : e.data.data,
1484
1690
  meta: {
1485
1691
  last_page: e.data.last_page,
1486
1692
  from: e.data.from,
@@ -1492,30 +1698,39 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1492
1698
  params: {
1493
1699
  type: Object,
1494
1700
  default() {
1495
- return xa;
1701
+ return Ma;
1496
1702
  }
1497
1703
  },
1498
1704
  options: {
1499
1705
  type: Object,
1500
1706
  default() {
1501
- return ne;
1707
+ return ue;
1502
1708
  }
1503
1709
  },
1504
1710
  settings: {
1505
1711
  type: Object,
1506
1712
  default() {
1507
- return fe;
1713
+ return ke;
1508
1714
  }
1509
1715
  },
1510
1716
  plugins: {
1511
1717
  type: Object,
1512
1718
  default: () => ({})
1719
+ },
1720
+ syncToRoute: {
1721
+ type: [Boolean, String],
1722
+ default: !1
1723
+ },
1724
+ persistToStorage: {
1725
+ type: Boolean,
1726
+ default: !1
1513
1727
  }
1514
1728
  },
1515
1729
  emits: [
1516
1730
  "viewRow",
1517
1731
  "editRow",
1518
1732
  "deleteRow",
1733
+ "downloadRow",
1519
1734
  "ready",
1520
1735
  "loading",
1521
1736
  "load",
@@ -1524,16 +1739,18 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1524
1739
  ],
1525
1740
  setup(e, { expose: s, emit: t }) {
1526
1741
  const a = e;
1527
- Ct(), Q(xt), Q(kt), Q(_t), q(a, "settings.nestedHeaders") && Q(wt);
1528
- const l = t, n = ge("axios"), o = $(null), i = $(!1), r = $(null), d = {
1529
- search: aa,
1530
- filterSelect: na,
1531
- filterButtons: da,
1532
- datePicker: fa,
1533
- reset: ya
1534
- }, m = k(() => Object.entries(a.plugins).filter(([p, h]) => h && h.enabled).map(([p, h]) => ({ name: p, config: h }))), u = z({
1742
+ Et(), ne(Pt), ne(Vt), ne(Rt), D(a, "settings.nestedHeaders") && ne(Bt);
1743
+ const l = t, n = _e("axios"), o = R(null), i = R(!1), r = R(null);
1744
+ let c = !1;
1745
+ const p = {
1746
+ search: ya,
1747
+ filterSelect: xa,
1748
+ filterButtons: Ca,
1749
+ datePicker: Ta,
1750
+ reset: Va
1751
+ }, u = Z({
1535
1752
  hotInstance: null,
1536
- url: a.url,
1753
+ url: C(() => a.url),
1537
1754
  plugins: a.plugins,
1538
1755
  response: {},
1539
1756
  params: {
@@ -1541,151 +1758,206 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1541
1758
  limit: a.options.limit
1542
1759
  },
1543
1760
  methods: {
1544
- applyParams: (p) => {
1545
- p && (u.params = {
1761
+ applyParams: (m) => {
1762
+ m && (u.params = {
1546
1763
  ...u.params,
1547
- ...p
1764
+ ...m
1548
1765
  }, l("page-change", u.params));
1549
1766
  },
1550
- removeParam: async (p) => {
1551
- u.params[p] && (delete u.params[p], await u.methods.loadTable());
1767
+ removeParam: async (m) => {
1768
+ u.params[m] && (delete u.params[m], await u.methods.loadTable());
1552
1769
  },
1553
- loadTable: async (p) => {
1770
+ loadTable: async (m) => {
1554
1771
  if (!(!o.value || !o.value.hotInstance)) {
1555
- i.value = !0, r.value = null, l("loading", !0), ae.start(), u.hotInstance = o.value.hotInstance;
1772
+ i.value = !0, r.value = null, l("loading", !0), ie.start(), u.hotInstance = o.value.hotInstance;
1556
1773
  try {
1557
1774
  if (a.dataProvider) {
1558
- const b = await a.dataProvider(u.computed.params);
1559
- u.response = a.dataTransformer(b, a);
1775
+ const k = await a.dataProvider(u.computed.params);
1776
+ u.response = a.dataTransformer(k, a);
1560
1777
  } else if (a.url) {
1561
- const b = await n.get(a.url, {
1778
+ const k = await n.get(a.url, {
1562
1779
  params: u.computed.params
1563
1780
  });
1564
- u.response = a.dataTransformer(b, a);
1781
+ u.response = a.dataTransformer(k, a);
1565
1782
  } else {
1566
- console.error("No data provider or URL provided"), i.value = !1, l("loading", !1), ae.done();
1783
+ console.error("No data provider or URL provided"), i.value = !1, l("loading", !1), ie.done();
1567
1784
  return;
1568
1785
  }
1569
- u.hotInstance.updateData(u.response.data), u.options.callback && typeof u.options.callback == "function" && await u.options.callback(), u.hotInstance.getPlugin("autoColumnSize").recalculateAllColumnsWidth(), l("load", {
1786
+ if (c) return;
1787
+ u.hotInstance.updateData(u.response.data), u.options.callback && typeof u.options.callback == "function" && await u.options.callback();
1788
+ const x = u.hotInstance.getPlugin("autoColumnSize");
1789
+ D(a.settings, "columns", []).forEach((k, b) => {
1790
+ k.width || x.calculateColumnsWidth(b, b, !0);
1791
+ }), l("load", {
1570
1792
  data: u.response.data,
1571
1793
  meta: u.response.meta
1572
- }), p && typeof p == "function" && p();
1573
- } catch (h) {
1574
- r.value = h, l("error", h), console.error("Error loading table data:", h);
1794
+ }), m && typeof m == "function" && m();
1795
+ } catch (x) {
1796
+ r.value = x, l("error", x), console.error("Error loading table data:", x);
1575
1797
  } finally {
1576
- i.value = !1, l("loading", !1), ae.done();
1798
+ i.value = !1, l("loading", !1), ie.done();
1577
1799
  }
1578
1800
  }
1579
1801
  },
1580
1802
  // can't use sparkTable.hotInstance here because the ref isn't ready
1581
- colToProp: (p) => o.value.hotInstance.colToProp(p),
1582
- fireEvent: (p, h) => {
1583
- l(p, h);
1803
+ colToProp: (m) => o.value.hotInstance.colToProp(m),
1804
+ fireEvent: (m, x) => {
1805
+ l(m, x);
1584
1806
  },
1585
- getSettingsForProp: (p) => yt(q(u.tableSettings, "columns"), { data: p }),
1807
+ getSettingsForProp: (m) => Tt(D(u.tableSettings, "columns"), { data: m }),
1586
1808
  // Helper methods for easier param access
1587
1809
  getParams: () => u.computed.params,
1588
- getParam: (p) => u.computed.params[p],
1589
- setParam: (p, h) => {
1590
- u.methods.applyParams({ [p]: h });
1810
+ getParam: (m) => u.computed.params[m],
1811
+ setParam: (m, x) => {
1812
+ u.methods.applyParams({ [m]: x });
1591
1813
  },
1592
- clearParam: (p) => u.methods.removeParam(p),
1593
- clearParams: (p) => {
1594
- (Array.isArray(p) ? p : [p]).forEach((b) => {
1595
- u.params[b] !== void 0 && delete u.params[b];
1814
+ clearParam: (m) => u.methods.removeParam(m),
1815
+ clearParams: (m) => {
1816
+ (Array.isArray(m) ? m : [m]).forEach((P) => {
1817
+ u.params[P] !== void 0 && delete u.params[P];
1596
1818
  }), u.methods.applyParams({ page: 1 });
1597
1819
  }
1598
1820
  },
1599
1821
  computed: {
1600
- params: k(() => ({
1822
+ params: C(() => ({
1601
1823
  ...a.params,
1602
1824
  ...u.params
1603
1825
  })),
1604
- ready: k(() => vt(u, "response.meta.last_page"))
1826
+ ready: C(() => Lt(u, "response.meta.last_page"))
1605
1827
  },
1606
- options: k(() => ({
1607
- ...ne,
1828
+ options: C(() => ({
1829
+ ...ue,
1608
1830
  ...a.options
1609
1831
  })),
1610
- tableSettings: k(() => ({
1611
- ...fe,
1612
- nestedHeaders: q(a.settings, "nestedHeaders", []),
1613
- ...!q(a.settings, "nestedHeaders") && {
1614
- afterGetColHeader: (p, h) => Ts(p, h, u)
1832
+ tableSettings: C(() => ({
1833
+ ...ke,
1834
+ nestedHeaders: D(a.settings, "nestedHeaders", []),
1835
+ ...!D(a.settings, "nestedHeaders") && {
1836
+ afterGetColHeader: (m, x) => zs(m, x, u)
1837
+ },
1838
+ afterChange: (m, x) => Js(),
1839
+ afterRender: () => Is(u),
1840
+ /**
1841
+ * Prevent columns with explicit width from being stretched
1842
+ * This hook fires BEFORE stretchH is applied, allowing us to cap specific columns
1843
+ * while letting others stretch normally
1844
+ */
1845
+ beforeStretchingColumnWidth: (m, x) => {
1846
+ const k = D(a.settings, "columns", [])[x];
1847
+ return k && k.width !== void 0 ? k.width : m;
1615
1848
  },
1616
- afterChange: (p, h) => js(),
1617
- afterRender: () => Vs(u),
1618
1849
  ...a.settings
1619
1850
  }))
1620
- });
1621
- return ie(
1851
+ }), h = (m) => {
1852
+ if (!m) return null;
1853
+ switch (m.type) {
1854
+ case "search":
1855
+ return m.param || "search";
1856
+ case "filterSelect":
1857
+ case "filterButtons":
1858
+ case "datePicker":
1859
+ return m.param || `filter[${m.key}]`;
1860
+ default:
1861
+ return null;
1862
+ }
1863
+ }, _ = (m) => m ? typeof m.enabled == "function" ? m.enabled(u.params) : m.enabled : !1, w = C(() => Object.entries(a.plugins).filter(([m, x]) => _(x)).map(([m, x]) => ({ name: m, config: x })));
1864
+ if (j(
1865
+ () => ({ ...u.params }),
1866
+ () => {
1867
+ const m = [];
1868
+ Object.values(a.plugins).forEach((x) => {
1869
+ const P = h(x);
1870
+ if (!P) return;
1871
+ const k = _(x), b = u.params[P] !== void 0;
1872
+ !k && b && m.push(P);
1873
+ }), m.length > 0 && m.forEach((x) => {
1874
+ delete u.params[x];
1875
+ });
1876
+ },
1877
+ { deep: !0, flush: "sync" }
1878
+ ), a.syncToRoute || a.persistToStorage) {
1879
+ const m = typeof a.syncToRoute == "string";
1880
+ Qs(u, {
1881
+ namespace: m ? a.syncToRoute : null,
1882
+ syncToRoute: !!a.syncToRoute,
1883
+ persistToStorage: a.persistToStorage
1884
+ });
1885
+ }
1886
+ return ge(
1622
1887
  () => a.params,
1623
1888
  async () => {
1624
1889
  u.params.page = 1, await u.methods.loadTable();
1625
1890
  },
1626
1891
  { debounce: 50, maxWait: 1e3 }
1627
- ), ie(
1892
+ ), ge(
1628
1893
  () => u.params,
1629
1894
  async () => {
1630
1895
  await u.methods.loadTable();
1631
1896
  },
1632
1897
  { debounce: 50, maxWait: 1e3 }
1633
- ), be(async () => {
1898
+ ), j(
1899
+ () => a.url,
1900
+ async (m, x) => {
1901
+ m !== x && (u.params.page = 1, await u.methods.loadTable());
1902
+ }
1903
+ ), pe(async () => {
1634
1904
  await u.methods.loadTable(), l("ready");
1635
- }), zs(u), s({
1905
+ }), je(() => {
1906
+ c = !0;
1907
+ }), Xs(u), s({
1636
1908
  refresh: () => u.methods.loadTable(),
1637
1909
  getParams: () => u.methods.getParams(),
1638
- getParam: (p) => u.methods.getParam(p),
1639
- setParam: (p, h) => u.methods.setParam(p, h),
1640
- clearParam: (p) => u.methods.clearParam(p),
1641
- clearParams: (p) => u.methods.clearParams(p),
1642
- applyParams: (p) => u.methods.applyParams(p),
1910
+ getParam: (m) => u.methods.getParam(m),
1911
+ setParam: (m, x) => u.methods.setParam(m, x),
1912
+ clearParam: (m) => u.methods.clearParam(m),
1913
+ clearParams: (m) => u.methods.clearParams(m),
1914
+ applyParams: (m) => u.methods.applyParams(m),
1643
1915
  loading: i,
1644
1916
  error: r,
1645
1917
  sparkTable: u,
1646
1918
  table: o
1647
- }), (p, h) => (f(), g("div", va, [
1648
- u.computed.ready ? (f(), V(pe, {
1919
+ }), (m, x) => (f(), g("div", Ra, [
1920
+ u.computed.ready && w.value && w.value.length ? (f(), F(xe, {
1649
1921
  key: 0,
1650
1922
  position: "header"
1651
1923
  }, {
1652
- default: w(() => [
1653
- (f(!0), g(B, null, A(m.value, (b) => (f(), V(W(d[b.config.type]), {
1654
- key: b.name,
1655
- class: _(b.config.align ? `self-${b.config.align}` : ""),
1924
+ default: L(() => [
1925
+ (f(!0), g(z, null, q(w.value, (P) => (f(), F(ae(p[P.config.type]), {
1926
+ key: P.name,
1927
+ class: T(P.config.align ? `self-${P.config.align}` : ""),
1656
1928
  "spark-table": u,
1657
- config: b.config
1929
+ config: P.config
1658
1930
  }, null, 8, ["class", "spark-table", "config"]))), 128)),
1659
- T(p.$slots, "header", {
1931
+ M(m.$slots, "header", {
1660
1932
  sparkTable: u,
1661
1933
  loading: i.value,
1662
1934
  error: r.value
1663
1935
  })
1664
1936
  ]),
1665
1937
  _: 3
1666
- })) : x("", !0),
1667
- v(y(bt), {
1938
+ })) : (f(), g("div", Ba)),
1939
+ v(y(Ht), {
1668
1940
  "theme-name": "ht-theme-classic",
1669
1941
  ref_key: "table",
1670
1942
  ref: o,
1671
1943
  settings: u.tableSettings
1672
1944
  }, null, 8, ["settings"]),
1673
- u.computed.ready ? (f(), V(pe, {
1674
- key: 1,
1945
+ u.computed.ready ? (f(), F(xe, {
1946
+ key: 2,
1675
1947
  position: "footer"
1676
1948
  }, {
1677
- default: w(() => [
1678
- v(Gs, { "spark-table": u }, null, 8, ["spark-table"]),
1679
- c("div", ba, [
1680
- v(Xs, {
1949
+ default: L(() => [
1950
+ v(na, { "spark-table": u }, null, 8, ["spark-table"]),
1951
+ d("div", Ea, [
1952
+ v(ua, {
1681
1953
  "spark-table": u,
1682
1954
  onPaginate: u.methods.applyParams
1683
1955
  }, null, 8, ["spark-table", "onPaginate"]),
1684
- v(ea, {
1956
+ v(ma, {
1685
1957
  "spark-table": u,
1686
1958
  onPaginate: u.methods.applyParams
1687
1959
  }, null, 8, ["spark-table", "onPaginate"]),
1688
- T(p.$slots, "footer", {
1960
+ M(m.$slots, "footer", {
1689
1961
  sparkTable: u,
1690
1962
  loading: i.value,
1691
1963
  error: r.value
@@ -1693,12 +1965,12 @@ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1693
1965
  ])
1694
1966
  ]),
1695
1967
  _: 3
1696
- })) : x("", !0)
1968
+ })) : $("", !0)
1697
1969
  ]));
1698
1970
  }
1699
1971
  };
1700
- function me() {
1701
- const e = z({
1972
+ function we() {
1973
+ const e = Z({
1702
1974
  isVisible: !1,
1703
1975
  content: null,
1704
1976
  props: {},
@@ -1710,7 +1982,7 @@ function me() {
1710
1982
  }, a = () => {
1711
1983
  e.isVisible = !0;
1712
1984
  }, l = (o, i = {}, r = {}) => {
1713
- e.content = he(o), e.props = i, e.eventHandlers = r;
1985
+ e.content = Ce(o), e.props = i, e.eventHandlers = r;
1714
1986
  };
1715
1987
  return {
1716
1988
  state: e,
@@ -1723,9 +1995,9 @@ function me() {
1723
1995
  }
1724
1996
  };
1725
1997
  }
1726
- class ka {
1998
+ class Fa {
1727
1999
  constructor() {
1728
- this.left = me(), this.right = me();
2000
+ this.left = we(), this.right = we();
1729
2001
  }
1730
2002
  showLeft = (s, t = {}, a = {}) => {
1731
2003
  const l = {
@@ -1755,22 +2027,22 @@ class ka {
1755
2027
  this.left.close(), this.right.close();
1756
2028
  };
1757
2029
  }
1758
- const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa = { class: "flex flex-1 flex-col" }, Ca = {
2030
+ const X = new Fa(), Aa = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ja = { class: "flex flex-1 flex-col" }, Oa = {
1759
2031
  class: "flex flex-1 flex-col gap-y-7",
1760
2032
  role: "list"
1761
- }, Sa = { class: "flex flex-1 flex-col" }, $a = {
2033
+ }, za = { class: "flex flex-1 flex-col" }, Ia = {
1762
2034
  role: "list",
1763
2035
  class: "flex flex-1 flex-col"
1764
- }, La = { class: "flex items-center pb-8" }, Ha = ["href", "onClick"], Ta = {
2036
+ }, Na = { class: "flex items-center pb-8" }, Da = ["href", "onClick"], qa = {
1765
2037
  key: 2,
1766
2038
  class: "w-full flex justify-center"
1767
- }, Va = {
2039
+ }, Za = {
1768
2040
  key: 0,
1769
2041
  class: "mt-[5px] flex flex-col gap-[5px]"
1770
- }, Pa = ["href", "onClick"], Ra = {
2042
+ }, Ka = ["href", "onClick"], Ua = {
1771
2043
  key: 1,
1772
2044
  class: "text-[13px]"
1773
- }, Ba = { class: "mt-auto" }, Ma = { class: "p-[10px] flex-shrink-0" }, Fa = { class: "flex flex-1 items-center gap-x-6" }, Aa = { class: "relative flex flex-1 items-center gap-4" }, Ea = { class: "cursor-pointer" }, za = ["src"], ja = { class: "ml-auto" }, Ia = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, _r = {
2045
+ }, Ga = { class: "mt-auto" }, Wa = { class: "p-[10px] flex-shrink-0" }, Ya = { class: "flex flex-1 items-center gap-x-6" }, Xa = { class: "relative flex flex-1 items-center gap-4" }, Ja = { class: "cursor-pointer" }, Qa = ["src"], eo = { class: "ml-auto" }, to = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Fr = {
1774
2046
  __name: "SparkDefaultContainer",
1775
2047
  props: {
1776
2048
  appStore: {
@@ -1788,113 +2060,113 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
1788
2060
  },
1789
2061
  emits: ["overlayClose"],
1790
2062
  setup(e, { emit: s }) {
1791
- const t = e, a = s, l = ve(), n = Le(), o = Se(), i = k(() => o.getAppIcon(t.appStore.state.app)), r = () => {
1792
- const p = {};
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, {
1794
- select: (h) => {
1795
- Z.closeRight();
2063
+ const t = e, a = s, l = $e(), n = te(), o = Ee(), i = Re(), r = C(() => i.getAppIcon(t.appStore.state.app)), c = C(() => n.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), p = () => {
2064
+ const w = {};
2065
+ l["app-selector-bottom"] ? w.bottomSlot = () => me("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (w.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? w.footerSlot = () => me("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (w.footerSlot = t.appSelectorSlots.footerSlot), X.showRight(ns, w, {
2066
+ select: (m) => {
2067
+ X.closeRight();
1796
2068
  }
1797
2069
  });
1798
- }, d = () => {
1799
- Z.showLeft(
1800
- ps,
2070
+ }, u = () => {
2071
+ X.showLeft(
2072
+ ws,
1801
2073
  {},
1802
2074
  {
1803
- select: (p) => {
1804
- n.toggleBrand(p), Z.closeLeft();
2075
+ select: (w) => {
2076
+ o.toggleBrand(w), X.closeLeft();
1805
2077
  }
1806
2078
  }
1807
2079
  );
1808
- }, 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]"]);
1809
- return (p, h) => {
1810
- const b = L("font-awesome-icon"), N = L("router-view");
1811
- return f(), g(B, null, [
1812
- c("div", {
1813
- class: _([m.value, "fixed inset-y-0 flex transition-all z-100"])
2080
+ }, h = C(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), _ = C(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
2081
+ return (w, m) => {
2082
+ const x = B("font-awesome-icon"), P = B("router-view");
2083
+ return f(), g(z, null, [
2084
+ d("div", {
2085
+ class: T([h.value, "fixed inset-y-0 flex transition-all z-100"])
1814
2086
  }, [
1815
- c("div", _a, [
1816
- c("nav", wa, [
1817
- c("ul", Ca, [
1818
- c("li", Sa, [
1819
- c("ul", $a, [
1820
- c("li", La, [
1821
- c("a", {
2087
+ d("div", Aa, [
2088
+ d("nav", ja, [
2089
+ d("ul", Oa, [
2090
+ d("li", za, [
2091
+ d("ul", Ia, [
2092
+ d("li", Na, [
2093
+ d("a", {
1822
2094
  class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
1823
- onClick: h[0] || (h[0] = j((C) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
2095
+ onClick: m[0] || (m[0] = G((k) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
1824
2096
  }, [
1825
- v(b, {
1826
- icon: y(H)[i.value],
2097
+ v(x, {
2098
+ icon: y(E)[r.value],
1827
2099
  class: "size-5"
1828
2100
  }, null, 8, ["icon"])
1829
2101
  ]),
1830
- e.mainNavStore.state.collapsed ? x("", !0) : (f(), g("a", {
2102
+ e.mainNavStore.state.collapsed ? $("", !0) : (f(), g("a", {
1831
2103
  key: 0,
1832
- onClick: h[1] || (h[1] = j((C) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
2104
+ onClick: m[1] || (m[1] = G((k) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
1833
2105
  class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
1834
- }, S(e.appStore.state.app), 1))
2106
+ }, H(e.appStore.state.app), 1))
1835
2107
  ]),
1836
- (f(!0), g(B, null, A(e.mainNavStore.state.menu, (C) => (f(), g("li", {
1837
- key: C.name,
1838
- class: _({
1839
- "mt-[10px]": C.children,
1840
- "mt-auto": C.footerSection
2108
+ (f(!0), g(z, null, q(e.mainNavStore.state.menu, (k) => (f(), g("li", {
2109
+ key: k.name,
2110
+ class: T({
2111
+ "mt-[10px]": k.children,
2112
+ "mt-auto": k.footerSection
1841
2113
  })
1842
2114
  }, [
1843
- c("a", {
1844
- class: _([{
1845
- "bg-gray-100": C.current,
1846
- "hover:bg-gray-100": C?.href
2115
+ d("a", {
2116
+ class: T([{
2117
+ "bg-gray-100": k.current,
2118
+ "hover:bg-gray-100": k?.href
1847
2119
  }, "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
1848
- href: C?.href,
1849
- onClick: j((R) => e.mainNavStore.goto(C.href), ["prevent"])
2120
+ href: k?.href,
2121
+ onClick: G((b) => e.mainNavStore.goto(k.href), ["prevent"])
1850
2122
  }, [
1851
- C.icon ? (f(), V(b, {
2123
+ k.icon ? (f(), F(x, {
1852
2124
  key: 0,
1853
- icon: y(H)[C.icon],
1854
- class: _([[(C.current, "text-gray-400")], "size-4"])
1855
- }, null, 8, ["icon", "class"])) : x("", !0),
1856
- e.mainNavStore.state.collapsed ? C?.children ? (f(), g("div", Ta, [...h[6] || (h[6] = [
1857
- c("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
1858
- ])])) : x("", !0) : (f(), g("span", {
2125
+ icon: y(E)[k.icon],
2126
+ class: T([[(k.current, "text-gray-400")], "size-4"])
2127
+ }, null, 8, ["icon", "class"])) : $("", !0),
2128
+ e.mainNavStore.state.collapsed ? k?.children ? (f(), g("div", qa, [...m[6] || (m[6] = [
2129
+ d("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
2130
+ ])])) : $("", !0) : (f(), g("span", {
1859
2131
  key: 1,
1860
- class: _({
1861
- "text-[11px]": C?.children,
1862
- "text-[13px]": !C?.children,
1863
- "font-semibold": C?.children,
1864
- "text-gray-500": C?.children
2132
+ class: T({
2133
+ "text-[11px]": k?.children,
2134
+ "text-[13px]": !k?.children,
2135
+ "font-semibold": k?.children,
2136
+ "text-gray-500": k?.children
1865
2137
  })
1866
- }, S(C.name), 3))
1867
- ], 10, Ha),
1868
- C.children ? (f(), g("ul", Va, [
1869
- (f(!0), g(B, null, A(C.children, (R) => (f(), g("li", {
1870
- key: R.name
2138
+ }, H(k.name), 3))
2139
+ ], 10, Da),
2140
+ k.children ? (f(), g("ul", Za, [
2141
+ (f(!0), g(z, null, q(k.children, (b) => (f(), g("li", {
2142
+ key: b.name
1871
2143
  }, [
1872
- c("a", {
1873
- class: _([[R.current ? "bg-gray-100" : "", "hover:bg-gray-100"], "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
1874
- href: R.href,
1875
- onClick: j((J) => e.mainNavStore.goto(R.href), ["prevent"])
2144
+ d("a", {
2145
+ class: T([[b.current ? "bg-gray-100" : "", "hover:bg-gray-100"], "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
2146
+ href: b.href,
2147
+ onClick: G((S) => e.mainNavStore.goto(b.href), ["prevent"])
1876
2148
  }, [
1877
- R.icon ? (f(), V(b, {
2149
+ b.icon ? (f(), F(x, {
1878
2150
  key: 0,
1879
- icon: y(H)[R.icon],
1880
- class: _([[(R.current, "text-gray-400")], "size-4"])
1881
- }, null, 8, ["icon", "class"])) : x("", !0),
1882
- e.mainNavStore.state.collapsed ? x("", !0) : (f(), g("span", Ra, S(R.name), 1))
1883
- ], 10, Pa)
2151
+ icon: y(E)[b.icon],
2152
+ class: T([[(b.current, "text-gray-400")], "size-4"])
2153
+ }, null, 8, ["icon", "class"])) : $("", !0),
2154
+ e.mainNavStore.state.collapsed ? $("", !0) : (f(), g("span", Ua, H(b.name), 1))
2155
+ ], 10, Ka)
1884
2156
  ]))), 128))
1885
- ])) : x("", !0)
2157
+ ])) : $("", !0)
1886
2158
  ], 2))), 128))
1887
2159
  ])
1888
2160
  ]),
1889
- c("li", Ba, [
1890
- T(p.$slots, "sidebar-footer"),
1891
- c("a", {
2161
+ d("li", Ga, [
2162
+ M(w.$slots, "sidebar-footer"),
2163
+ d("a", {
1892
2164
  class: "font-medium grid place-content-center gap-x-3 rounded-md h-10 p-2.5 text-gray-800 text-[13px] hover:bg-gray-100 transition-all duration-300 ease-in-out",
1893
2165
  href: "#",
1894
- onClick: h[2] || (h[2] = j((C) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
2166
+ onClick: m[2] || (m[2] = G((k) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
1895
2167
  }, [
1896
- v(b, {
1897
- icon: y(H)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
2168
+ v(x, {
2169
+ icon: y(E)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
1898
2170
  class: "class-5"
1899
2171
  }, null, 8, ["icon"])
1900
2172
  ])
@@ -1903,109 +2175,109 @@ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa =
1903
2175
  ])
1904
2176
  ])
1905
2177
  ], 2),
1906
- c("div", {
1907
- class: _([u.value, "h-full transition-all flex flex-col"])
2178
+ d("div", {
2179
+ class: T([_.value, "h-full transition-all flex flex-col"])
1908
2180
  }, [
1909
- c("div", Ma, [
1910
- c("div", Fa, [
1911
- c("div", Aa, [
1912
- T(p.$slots, "header-left", {}, () => [
1913
- c("div", Ea, [
1914
- v(b, {
1915
- icon: y(H).farBarsSort,
2181
+ d("div", Wa, [
2182
+ d("div", Ya, [
2183
+ d("div", Xa, [
2184
+ M(w.$slots, "header-left", {}, () => [
2185
+ d("div", Ja, [
2186
+ v(x, {
2187
+ icon: y(E).farBarsSort,
1916
2188
  class: "size-5",
1917
- onClick: h[3] || (h[3] = (C) => e.mainNavStore.toggleHidden())
2189
+ onClick: m[3] || (m[3] = (k) => e.mainNavStore.toggleHidden())
1918
2190
  }, null, 8, ["icon"])
1919
2191
  ])
1920
2192
  ]),
1921
- T(p.$slots, "header-center", {}, () => [
1922
- e.appStore.state.showBrandSelector ? (f(), g("div", {
2193
+ M(w.$slots, "header-center", {}, () => [
2194
+ c.value ? (f(), g("div", {
1923
2195
  key: 0,
1924
2196
  class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
1925
- onClick: d
2197
+ onClick: u
1926
2198
  }, [
1927
- y(n).currentBrand ? (f(), g("img", {
2199
+ y(o).currentBrand ? (f(), g("img", {
1928
2200
  key: 0,
1929
- src: y(n).currentBrand.logo,
2201
+ src: y(o).currentBrand.logo,
1930
2202
  alt: "",
1931
2203
  class: "h-[30px] w-auto"
1932
- }, null, 8, za)) : x("", !0)
1933
- ])) : x("", !0)
2204
+ }, null, 8, Qa)) : $("", !0)
2205
+ ])) : $("", !0)
1934
2206
  ]),
1935
- c("div", ja, [
1936
- T(p.$slots, "header-right", {}, () => [
2207
+ d("div", eo, [
2208
+ M(w.$slots, "header-right", {}, () => [
1937
2209
  e.appStore.state.showAppSelector ? (f(), g("button", {
1938
2210
  key: 0,
1939
2211
  class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
1940
2212
  type: "button",
1941
- onClick: r
2213
+ onClick: p
1942
2214
  }, [
1943
- v(b, {
1944
- icon: y(H).farGripDotsVertical,
2215
+ v(x, {
2216
+ icon: y(E).farGripDotsVertical,
1945
2217
  class: "size-4 text-gray-400"
1946
2218
  }, null, 8, ["icon"])
1947
- ])) : x("", !0)
2219
+ ])) : $("", !0)
1948
2220
  ])
1949
2221
  ])
1950
2222
  ])
1951
2223
  ])
1952
2224
  ]),
1953
- c("main", Ia, [
1954
- v(N)
2225
+ d("main", to, [
2226
+ v(P)
1955
2227
  ])
1956
2228
  ], 2),
1957
- v(y(ce), {
2229
+ v(y(he), {
1958
2230
  position: "left",
1959
- "overlay-instance": y(Z).left,
1960
- onClose: h[4] || (h[4] = (C) => a("overlayClose", "left"))
2231
+ "overlay-instance": y(X).left,
2232
+ onClose: m[4] || (m[4] = (k) => a("overlayClose", "left"))
1961
2233
  }, null, 8, ["overlay-instance"]),
1962
- v(y(ce), {
2234
+ v(y(he), {
1963
2235
  position: "right",
1964
- "overlay-instance": y(Z).right,
1965
- onClose: h[5] || (h[5] = (C) => a("overlayClose", "right"))
2236
+ "overlay-instance": y(X).right,
2237
+ onClose: m[5] || (m[5] = (k) => a("overlayClose", "right"))
1966
2238
  }, null, 8, ["overlay-instance"]),
1967
- v(y(ks))
2239
+ v(y(Es))
1968
2240
  ], 64);
1969
2241
  };
1970
2242
  }
1971
- }, Oa = {}, Na = { class: "h-full" };
1972
- function Da(e, s) {
1973
- const t = L("router-view");
1974
- return f(), g("main", Na, [
2243
+ }, so = {}, ao = { class: "h-full" };
2244
+ function oo(e, s) {
2245
+ const t = B("router-view");
2246
+ return f(), g("main", ao, [
1975
2247
  v(t)
1976
2248
  ]);
1977
2249
  }
1978
- const wr = /* @__PURE__ */ O(Oa, [["render", Da]]), Za = (e) => {
2250
+ const Ar = /* @__PURE__ */ W(so, [["render", oo]]), ro = (e) => {
1979
2251
  const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
1980
2252
  return s ? s[2] : null;
1981
- }, qa = (e, s, t = {}) => {
2253
+ }, no = (e, s, t = {}) => {
1982
2254
  const {
1983
2255
  maxAge: a = 31536e3,
1984
2256
  // 365 days in seconds
1985
- domain: l = He(),
2257
+ domain: l = Me(),
1986
2258
  secure: n = !0,
1987
2259
  sameSite: o = "Lax",
1988
2260
  path: i = "/"
1989
2261
  } = t;
1990
2262
  let r = `${e}=${s}; max-age=${a}; path=${i}; samesite=${o}`;
1991
2263
  l && (r += `; domain=${l}`), n && (r += "; secure"), document.cookie = r;
1992
- }, Ga = (e, s = {}) => {
1993
- const { domain: t = He(), path: a = "/" } = s;
2264
+ }, lo = (e, s = {}) => {
2265
+ const { domain: t = Me(), path: a = "/" } = s;
1994
2266
  let l = `${e}=; max-age=0; path=${a}`;
1995
2267
  t && (l += `; domain=${t}`), document.cookie = l;
1996
- }, He = () => {
2268
+ }, Me = () => {
1997
2269
  const e = window.location.hostname;
1998
2270
  return e === "localhost" ? "localhost" : e.endsWith(".test") || e.endsWith(".io") ? "." + e.split(".").slice(-2).join(".") : e.endsWith(".com.au") ? "." + e.split(".").slice(-3).join(".") : e;
1999
- }, Te = [];
2000
- function Ka(e) {
2001
- Te.push(e);
2271
+ }, Fe = [];
2272
+ function io(e) {
2273
+ Fe.push(e);
2002
2274
  }
2003
- function Ua() {
2004
- Te.forEach((e) => e());
2275
+ function co() {
2276
+ Fe.forEach((e) => e());
2005
2277
  }
2006
- function Cr(e) {
2278
+ function jr(e) {
2007
2279
  let s = !1;
2008
- return Ka(() => {
2280
+ return io(() => {
2009
2281
  s = !1;
2010
2282
  }), {
2011
2283
  bootstrapApp: async () => {
@@ -2018,8 +2290,8 @@ function Cr(e) {
2018
2290
  }
2019
2291
  };
2020
2292
  }
2021
- const re = "bolt-next-token", M = X("auth", () => {
2022
- const e = z({
2293
+ const de = "bolt-next-token", I = re("auth", () => {
2294
+ const e = Z({
2023
2295
  user: null,
2024
2296
  token: null,
2025
2297
  ready: !1,
@@ -2051,18 +2323,18 @@ const re = "bolt-next-token", M = X("auth", () => {
2051
2323
  onLogoutSuccess: null,
2052
2324
  onLogoutError: null
2053
2325
  }
2054
- }), s = (d = {}) => {
2055
- d.endpoints && Object.assign(e.endpoints, d.endpoints), d.routes && Object.assign(e.routes, d.routes), d.devCredentials && Object.assign(e.devCredentials, d.devCredentials), d.callbacks && Object.assign(e.callbacks, d.callbacks), d.overrideToken && (e.overrideToken = d.overrideToken);
2056
- }, t = (d) => {
2057
- qa(re, d), e.token = d;
2326
+ }), s = (c = {}) => {
2327
+ c.endpoints && Object.assign(e.endpoints, c.endpoints), c.routes && Object.assign(e.routes, c.routes), c.devCredentials && Object.assign(e.devCredentials, c.devCredentials), c.callbacks && Object.assign(e.callbacks, c.callbacks), c.overrideToken && (e.overrideToken = c.overrideToken);
2328
+ }, t = (c) => {
2329
+ no(de, c), e.token = c;
2058
2330
  }, a = () => {
2059
- Ga(re), e.token = null;
2060
- }, l = () => Za(re), n = async (d) => {
2061
- const m = await K.post(e.endpoints.login, d), u = m.headers.authorization;
2062
- return t(u), e.user = m.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(m.data), m.data;
2331
+ lo(de), e.token = null;
2332
+ }, l = () => ro(de), n = async (c) => {
2333
+ const p = await ee.post(e.endpoints.login, c), u = p.headers.authorization;
2334
+ return t(u), e.user = p.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(p.data), p.data;
2063
2335
  }, o = async () => {
2064
2336
  try {
2065
- await K.post(
2337
+ await ee.post(
2066
2338
  e.endpoints.logout,
2067
2339
  {},
2068
2340
  {
@@ -2071,28 +2343,28 @@ const re = "bolt-next-token", M = X("auth", () => {
2071
2343
  }
2072
2344
  }
2073
2345
  ), e.callbacks.onLogoutSuccess && await e.callbacks.onLogoutSuccess();
2074
- } catch (d) {
2075
- throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(d), d;
2346
+ } catch (c) {
2347
+ throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(c), c;
2076
2348
  } finally {
2077
- a(), e.user = null, Ua();
2349
+ a(), e.user = null, co();
2078
2350
  }
2079
2351
  }, i = async () => {
2080
- const d = e.overrideToken || l();
2081
- if (!d)
2352
+ const c = e.overrideToken || l();
2353
+ if (!c)
2082
2354
  return e.ready = !0, null;
2083
2355
  try {
2084
- const { data: m } = await K.get(e.endpoints.fetch, {
2356
+ const { data: p } = await ee.get(e.endpoints.fetch, {
2085
2357
  headers: {
2086
- Authorization: `Bearer ${d}`
2358
+ Authorization: `Bearer ${c}`
2087
2359
  }
2088
2360
  });
2089
- e.user = m, e.overrideToken || (e.token = d);
2361
+ e.user = p, e.overrideToken || (e.token = c);
2090
2362
  } catch {
2091
2363
  e.overrideToken || a();
2092
2364
  } finally {
2093
2365
  e.ready = !0;
2094
2366
  }
2095
- }, r = k(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2367
+ }, r = C(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2096
2368
  return {
2097
2369
  state: e,
2098
2370
  initialize: s,
@@ -2104,17 +2376,17 @@ const re = "bolt-next-token", M = X("auth", () => {
2104
2376
  clearTokenCookie: a,
2105
2377
  getTokenCookie: l
2106
2378
  };
2107
- }), Wa = { class: "h-full grid place-content-center relative" }, Ya = { class: "absolute top-8 left-8" }, Xa = ["src"], Ja = {
2379
+ }), uo = { class: "h-full grid place-content-center relative" }, po = { class: "absolute top-8 left-8" }, fo = ["src"], mo = {
2108
2380
  key: 1,
2109
2381
  width: "59",
2110
2382
  height: "23",
2111
2383
  viewBox: "0 0 59 23",
2112
2384
  fill: "none",
2113
2385
  xmlns: "http://www.w3.org/2000/svg"
2114
- }, Qa = { class: "max-w-sm grid gap-y-1 -mt-8" }, eo = { class: "mb-7" }, to = { class: "text-gray-600" }, so = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, ao = {
2386
+ }, go = { class: "max-w-sm grid gap-y-1 -mt-8" }, ho = { class: "mb-7" }, yo = { class: "text-gray-600" }, bo = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, vo = {
2115
2387
  key: 0,
2116
2388
  class: "text-red-600 text-sm mb-2"
2117
- }, oo = { key: 0 }, ro = { key: 1 }, no = {
2389
+ }, xo = { key: 0 }, ko = { key: 1 }, wo = {
2118
2390
  __name: "SparkLoginView",
2119
2391
  props: {
2120
2392
  logo: {
@@ -2131,64 +2403,64 @@ const re = "bolt-next-token", M = X("auth", () => {
2131
2403
  }
2132
2404
  },
2133
2405
  setup(e) {
2134
- const s = I(), t = se(), a = $e(), l = M(), n = e, o = $(!1), i = $(""), r = async (d) => {
2406
+ const s = K(), t = te(), a = Be(), l = I(), n = e, o = R(!1), i = R(""), r = async (c) => {
2135
2407
  o.value = !0, i.value = "";
2136
2408
  try {
2137
- await l.login(d);
2138
- const m = t.query.redirect;
2139
- if (m) {
2140
- if (m.startsWith("http")) {
2141
- window.location.href = m;
2409
+ await l.login(c);
2410
+ const p = t.query.redirect;
2411
+ if (p) {
2412
+ if (p.startsWith("http")) {
2413
+ window.location.href = p;
2142
2414
  return;
2143
2415
  }
2144
- await s.push(m);
2416
+ await s.push(p);
2145
2417
  } else
2146
2418
  await s.push(n.defaultRedirect);
2147
- } catch (m) {
2148
- i.value = m.response?.data?.message || m.message || "Login failed. Please try again.";
2419
+ } catch (p) {
2420
+ i.value = p.response?.data?.message || p.message || "Login failed. Please try again.";
2149
2421
  } finally {
2150
2422
  o.value = !1;
2151
2423
  }
2152
2424
  };
2153
- return (d, m) => {
2154
- const u = L("FormKit"), p = L("router-link");
2155
- return f(), g("div", Wa, [
2156
- c("div", Ya, [
2425
+ return (c, p) => {
2426
+ const u = B("FormKit"), h = B("router-link");
2427
+ return f(), g("div", uo, [
2428
+ d("div", po, [
2157
2429
  n.logo ? (f(), g("img", {
2158
2430
  key: 0,
2159
2431
  src: n.logo,
2160
2432
  alt: "Logo",
2161
2433
  class: "h-[23px] w-auto"
2162
- }, null, 8, Xa)) : (f(), g("svg", Ja, [...m[0] || (m[0] = [
2163
- c("path", {
2434
+ }, null, 8, fo)) : (f(), g("svg", mo, [...p[0] || (p[0] = [
2435
+ d("path", {
2164
2436
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2165
2437
  fill: "#1C64F2"
2166
2438
  }, null, -1),
2167
- c("path", {
2439
+ d("path", {
2168
2440
  d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
2169
2441
  fill: "#1C64F2"
2170
2442
  }, null, -1),
2171
- c("path", {
2443
+ d("path", {
2172
2444
  d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
2173
2445
  fill: "#1C64F2"
2174
2446
  }, null, -1),
2175
- c("path", {
2447
+ d("path", {
2176
2448
  d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
2177
2449
  fill: "#1C64F2"
2178
2450
  }, null, -1)
2179
2451
  ])]))
2180
2452
  ]),
2181
- c("div", Qa, [
2182
- c("div", eo, [
2183
- m[1] || (m[1] = c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
2184
- c("p", to, " Welcome back" + S(y(a).state.app ? ` to ${y(a).state.app}` : "") + "! Please enter your details. ", 1)
2453
+ d("div", go, [
2454
+ d("div", ho, [
2455
+ p[1] || (p[1] = d("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
2456
+ d("p", yo, " Welcome back" + H(y(a).state.app ? ` to ${y(a).state.app}` : "") + "! Please enter your details. ", 1)
2185
2457
  ]),
2186
2458
  v(u, {
2187
2459
  type: "form",
2188
2460
  onSubmit: r,
2189
2461
  actions: !1
2190
2462
  }, {
2191
- default: w(() => [
2463
+ default: L(() => [
2192
2464
  v(u, {
2193
2465
  label: "Email",
2194
2466
  name: "email",
@@ -2207,27 +2479,27 @@ const re = "bolt-next-token", M = X("auth", () => {
2207
2479
  "outer-class": "max-w-full",
2208
2480
  value: y(l).state.devCredentials.password
2209
2481
  }, null, 8, ["value"]),
2210
- c("div", so, [
2211
- m[3] || (m[3] = c("span", null, null, -1)),
2212
- v(p, {
2482
+ d("div", bo, [
2483
+ p[3] || (p[3] = d("span", null, null, -1)),
2484
+ v(h, {
2213
2485
  to: n.forgotPasswordRoute,
2214
2486
  class: "text-sm text-primary-600 font-semibold"
2215
2487
  }, {
2216
- default: w(() => [...m[2] || (m[2] = [
2217
- P(" Forgot password ", -1)
2488
+ default: L(() => [...p[2] || (p[2] = [
2489
+ A(" Forgot password ", -1)
2218
2490
  ])]),
2219
2491
  _: 1
2220
2492
  }, 8, ["to"])
2221
2493
  ]),
2222
- i.value ? (f(), g("div", ao, S(i.value), 1)) : x("", !0),
2223
- v(y(F), {
2494
+ i.value ? (f(), g("div", vo, H(i.value), 1)) : $("", !0),
2495
+ v(y(N), {
2224
2496
  type: "submit",
2225
2497
  size: "xl",
2226
2498
  disabled: o.value,
2227
2499
  "button-class": "w-full mb-2"
2228
2500
  }, {
2229
- default: w(() => [
2230
- o.value ? (f(), g("span", ro, "Signing in...")) : (f(), g("span", oo, "Sign in"))
2501
+ default: L(() => [
2502
+ o.value ? (f(), g("span", ko, "Signing in...")) : (f(), g("span", xo, "Sign in"))
2231
2503
  ]),
2232
2504
  _: 1
2233
2505
  }, 8, ["disabled"])
@@ -2238,7 +2510,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2238
2510
  ]);
2239
2511
  };
2240
2512
  }
2241
- }, lo = {
2513
+ }, _o = {
2242
2514
  __name: "SparkLogoutView",
2243
2515
  props: {
2244
2516
  defaultRedirect: {
@@ -2247,27 +2519,27 @@ const re = "bolt-next-token", M = X("auth", () => {
2247
2519
  }
2248
2520
  },
2249
2521
  setup(e) {
2250
- const s = I(), t = se(), a = M(), l = e;
2251
- return be(async () => {
2522
+ const s = K(), t = te(), a = I(), l = e;
2523
+ return pe(async () => {
2252
2524
  await a.logout();
2253
2525
  const n = t.query.redirect;
2254
2526
  n && n.startsWith("http") ? window.location.href = n : await s.push(n || l.defaultRedirect);
2255
2527
  }), (n, o) => null;
2256
2528
  }
2257
- }, io = { class: "h-full grid place-content-center relative" }, co = { class: "absolute top-8 left-8" }, uo = ["src"], po = {
2529
+ }, Co = { class: "h-full grid place-content-center relative" }, So = { class: "absolute top-8 left-8" }, $o = ["src"], To = {
2258
2530
  key: 1,
2259
2531
  width: "59",
2260
2532
  height: "23",
2261
2533
  viewBox: "0 0 59 23",
2262
2534
  fill: "none",
2263
2535
  xmlns: "http://www.w3.org/2000/svg"
2264
- }, fo = { class: "max-w-sm grid gap-y-1 -mt-8" }, mo = {
2536
+ }, Lo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Ho = {
2265
2537
  key: 0,
2266
2538
  class: "text-red-600 text-sm mb-2"
2267
- }, go = {
2539
+ }, Po = {
2268
2540
  key: 1,
2269
2541
  class: "text-green-600 text-sm mb-2"
2270
- }, ho = { key: 0 }, yo = { key: 1 }, vo = {
2542
+ }, Vo = { key: 0 }, Ro = { key: 1 }, Bo = {
2271
2543
  __name: "SparkForgotPasswordView",
2272
2544
  props: {
2273
2545
  logo: {
@@ -2280,10 +2552,10 @@ const re = "bolt-next-token", M = X("auth", () => {
2280
2552
  }
2281
2553
  },
2282
2554
  setup(e) {
2283
- const s = M(), t = e, a = $(!1), l = $(""), n = $(""), o = async ({ email: i }) => {
2555
+ const s = I(), t = e, a = R(!1), l = R(""), n = R(""), o = async ({ email: i }) => {
2284
2556
  a.value = !0, l.value = "", n.value = "";
2285
2557
  try {
2286
- await K.post(s.state.endpoints.passwordEmail, { email: i }), n.value = "Password reset link sent! Check your email.";
2558
+ await ee.post(s.state.endpoints.passwordEmail, { email: i }), n.value = "Password reset link sent! Check your email.";
2287
2559
  } catch (r) {
2288
2560
  l.value = r.response?.data?.message || "Failed to send reset link.";
2289
2561
  } finally {
@@ -2291,45 +2563,45 @@ const re = "bolt-next-token", M = X("auth", () => {
2291
2563
  }
2292
2564
  };
2293
2565
  return (i, r) => {
2294
- const d = L("FormKit"), m = L("router-link");
2295
- return f(), g("div", io, [
2296
- c("div", co, [
2566
+ const c = B("FormKit"), p = B("router-link");
2567
+ return f(), g("div", Co, [
2568
+ d("div", So, [
2297
2569
  t.logo ? (f(), g("img", {
2298
2570
  key: 0,
2299
2571
  src: t.logo,
2300
2572
  alt: "Logo",
2301
2573
  class: "h-[23px] w-auto"
2302
- }, null, 8, uo)) : (f(), g("svg", po, [...r[0] || (r[0] = [
2303
- c("path", {
2574
+ }, null, 8, $o)) : (f(), g("svg", To, [...r[0] || (r[0] = [
2575
+ d("path", {
2304
2576
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2305
2577
  fill: "#1C64F2"
2306
2578
  }, null, -1),
2307
- c("path", {
2579
+ d("path", {
2308
2580
  d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
2309
2581
  fill: "#1C64F2"
2310
2582
  }, null, -1),
2311
- c("path", {
2583
+ d("path", {
2312
2584
  d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
2313
2585
  fill: "#1C64F2"
2314
2586
  }, null, -1),
2315
- c("path", {
2587
+ d("path", {
2316
2588
  d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
2317
2589
  fill: "#1C64F2"
2318
2590
  }, null, -1)
2319
2591
  ])]))
2320
2592
  ]),
2321
- c("div", fo, [
2322
- r[2] || (r[2] = c("div", { class: "mb-7" }, [
2323
- c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
2324
- c("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
2593
+ d("div", Lo, [
2594
+ r[2] || (r[2] = d("div", { class: "mb-7" }, [
2595
+ d("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
2596
+ d("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
2325
2597
  ], -1)),
2326
- v(d, {
2598
+ v(c, {
2327
2599
  type: "form",
2328
2600
  onSubmit: o,
2329
2601
  actions: !1
2330
2602
  }, {
2331
- default: w(() => [
2332
- v(d, {
2603
+ default: L(() => [
2604
+ v(c, {
2333
2605
  label: "Email",
2334
2606
  name: "email",
2335
2607
  placeholder: "Enter your email",
@@ -2337,25 +2609,25 @@ const re = "bolt-next-token", M = X("auth", () => {
2337
2609
  validation: "required|email",
2338
2610
  "outer-class": "max-w-full"
2339
2611
  }),
2340
- l.value ? (f(), g("div", mo, S(l.value), 1)) : x("", !0),
2341
- n.value ? (f(), g("div", go, S(n.value), 1)) : x("", !0),
2342
- v(y(F), {
2612
+ l.value ? (f(), g("div", Ho, H(l.value), 1)) : $("", !0),
2613
+ n.value ? (f(), g("div", Po, H(n.value), 1)) : $("", !0),
2614
+ v(y(N), {
2343
2615
  type: "submit",
2344
2616
  size: "xl",
2345
2617
  disabled: a.value,
2346
2618
  "button-class": "w-full mb-2"
2347
2619
  }, {
2348
- default: w(() => [
2349
- a.value ? (f(), g("span", yo, "Sending...")) : (f(), g("span", ho, "Send reset link"))
2620
+ default: L(() => [
2621
+ a.value ? (f(), g("span", Ro, "Sending...")) : (f(), g("span", Vo, "Send reset link"))
2350
2622
  ]),
2351
2623
  _: 1
2352
2624
  }, 8, ["disabled"]),
2353
- v(m, {
2625
+ v(p, {
2354
2626
  to: t.loginRoute,
2355
2627
  class: "text-sm text-center text-primary-600 font-semibold block"
2356
2628
  }, {
2357
- default: w(() => [...r[1] || (r[1] = [
2358
- P(" Back to login ", -1)
2629
+ default: L(() => [...r[1] || (r[1] = [
2630
+ A(" Back to login ", -1)
2359
2631
  ])]),
2360
2632
  _: 1
2361
2633
  }, 8, ["to"])
@@ -2366,17 +2638,17 @@ const re = "bolt-next-token", M = X("auth", () => {
2366
2638
  ]);
2367
2639
  };
2368
2640
  }
2369
- }, bo = { class: "h-full grid place-content-center relative" }, xo = { class: "absolute top-8 left-8" }, ko = ["src"], _o = {
2641
+ }, Eo = { class: "h-full grid place-content-center relative" }, Mo = { class: "absolute top-8 left-8" }, Fo = ["src"], Ao = {
2370
2642
  key: 1,
2371
2643
  width: "59",
2372
2644
  height: "23",
2373
2645
  viewBox: "0 0 59 23",
2374
2646
  fill: "none",
2375
2647
  xmlns: "http://www.w3.org/2000/svg"
2376
- }, wo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Co = {
2648
+ }, jo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Oo = {
2377
2649
  key: 0,
2378
2650
  class: "text-red-600 text-sm mb-2"
2379
- }, So = { key: 0 }, $o = { key: 1 }, Lo = {
2651
+ }, zo = { key: 0 }, Io = { key: 1 }, No = {
2380
2652
  __name: "SparkResetPasswordView",
2381
2653
  props: {
2382
2654
  logo: {
@@ -2389,61 +2661,61 @@ const re = "bolt-next-token", M = X("auth", () => {
2389
2661
  }
2390
2662
  },
2391
2663
  setup(e) {
2392
- const s = I(), t = se(), a = M(), l = e, n = $(!1), o = $(""), i = async ({ password: r, password_confirmation: d }) => {
2664
+ const s = K(), t = te(), a = I(), l = e, n = R(!1), o = R(""), i = async ({ password: r, password_confirmation: c }) => {
2393
2665
  n.value = !0, o.value = "";
2394
2666
  try {
2395
- await K.post(a.state.endpoints.passwordReset, {
2667
+ await ee.post(a.state.endpoints.passwordReset, {
2396
2668
  email: t.query.email,
2397
2669
  token: t.query.token,
2398
2670
  password: r,
2399
- password_confirmation: d
2671
+ password_confirmation: c
2400
2672
  }), await s.push(l.loginRoute);
2401
- } catch (m) {
2402
- o.value = m.response?.data?.message || "Failed to reset password.";
2673
+ } catch (p) {
2674
+ o.value = p.response?.data?.message || "Failed to reset password.";
2403
2675
  } finally {
2404
2676
  n.value = !1;
2405
2677
  }
2406
2678
  };
2407
- return (r, d) => {
2408
- const m = L("FormKit");
2409
- return f(), g("div", bo, [
2410
- c("div", xo, [
2679
+ return (r, c) => {
2680
+ const p = B("FormKit");
2681
+ return f(), g("div", Eo, [
2682
+ d("div", Mo, [
2411
2683
  l.logo ? (f(), g("img", {
2412
2684
  key: 0,
2413
2685
  src: l.logo,
2414
2686
  alt: "Logo",
2415
2687
  class: "h-[23px] w-auto"
2416
- }, null, 8, ko)) : (f(), g("svg", _o, [...d[0] || (d[0] = [
2417
- c("path", {
2688
+ }, null, 8, Fo)) : (f(), g("svg", Ao, [...c[0] || (c[0] = [
2689
+ d("path", {
2418
2690
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2419
2691
  fill: "#1C64F2"
2420
2692
  }, null, -1),
2421
- c("path", {
2693
+ d("path", {
2422
2694
  d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
2423
2695
  fill: "#1C64F2"
2424
2696
  }, null, -1),
2425
- c("path", {
2697
+ d("path", {
2426
2698
  d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
2427
2699
  fill: "#1C64F2"
2428
2700
  }, null, -1),
2429
- c("path", {
2701
+ d("path", {
2430
2702
  d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
2431
2703
  fill: "#1C64F2"
2432
2704
  }, null, -1)
2433
2705
  ])]))
2434
2706
  ]),
2435
- c("div", wo, [
2436
- d[1] || (d[1] = c("div", { class: "mb-7" }, [
2437
- c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
2438
- c("p", { class: "text-gray-600" }, " Enter your new password below. ")
2707
+ d("div", jo, [
2708
+ c[1] || (c[1] = d("div", { class: "mb-7" }, [
2709
+ d("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
2710
+ d("p", { class: "text-gray-600" }, " Enter your new password below. ")
2439
2711
  ], -1)),
2440
- v(m, {
2712
+ v(p, {
2441
2713
  type: "form",
2442
2714
  onSubmit: i,
2443
2715
  actions: !1
2444
2716
  }, {
2445
- default: w(() => [
2446
- v(m, {
2717
+ default: L(() => [
2718
+ v(p, {
2447
2719
  label: "New Password",
2448
2720
  name: "password",
2449
2721
  placeholder: "••••••••",
@@ -2451,7 +2723,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2451
2723
  validation: "required|length:8",
2452
2724
  "outer-class": "max-w-full"
2453
2725
  }),
2454
- v(m, {
2726
+ v(p, {
2455
2727
  label: "Confirm Password",
2456
2728
  name: "password_confirmation",
2457
2729
  placeholder: "••••••••",
@@ -2459,15 +2731,15 @@ const re = "bolt-next-token", M = X("auth", () => {
2459
2731
  validation: "required|confirm:password",
2460
2732
  "outer-class": "max-w-full"
2461
2733
  }),
2462
- o.value ? (f(), g("div", Co, S(o.value), 1)) : x("", !0),
2463
- v(y(F), {
2734
+ o.value ? (f(), g("div", Oo, H(o.value), 1)) : $("", !0),
2735
+ v(y(N), {
2464
2736
  type: "submit",
2465
2737
  size: "xl",
2466
2738
  disabled: n.value,
2467
2739
  "button-class": "w-full mb-2"
2468
2740
  }, {
2469
- default: w(() => [
2470
- n.value ? (f(), g("span", $o, "Resetting...")) : (f(), g("span", So, "Reset password"))
2741
+ default: L(() => [
2742
+ n.value ? (f(), g("span", Io, "Resetting...")) : (f(), g("span", zo, "Reset password"))
2471
2743
  ]),
2472
2744
  _: 1
2473
2745
  }, 8, ["disabled"])
@@ -2478,14 +2750,14 @@ const re = "bolt-next-token", M = X("auth", () => {
2478
2750
  ]);
2479
2751
  };
2480
2752
  }
2481
- }, Ho = { class: "h-full grid place-content-center relative" }, To = { class: "absolute top-8 left-8" }, Vo = ["src"], Po = {
2753
+ }, Do = { class: "h-full grid place-content-center relative" }, qo = { class: "absolute top-8 left-8" }, Zo = ["src"], Ko = {
2482
2754
  key: 1,
2483
2755
  width: "59",
2484
2756
  height: "23",
2485
2757
  viewBox: "0 0 59 23",
2486
2758
  fill: "none",
2487
2759
  xmlns: "http://www.w3.org/2000/svg"
2488
- }, Ro = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Bo = { class: "flex gap-4 justify-center" }, Mo = {
2760
+ }, Uo = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Go = { class: "flex gap-4 justify-center" }, Wo = {
2489
2761
  __name: "SparkError403View",
2490
2762
  props: {
2491
2763
  logo: {
@@ -2498,52 +2770,52 @@ const re = "bolt-next-token", M = X("auth", () => {
2498
2770
  }
2499
2771
  },
2500
2772
  setup(e) {
2501
- const s = I(), t = e, a = () => {
2773
+ const s = K(), t = e, a = () => {
2502
2774
  s.push(t.homeRoute);
2503
2775
  };
2504
- return (l, n) => (f(), g("div", Ho, [
2505
- c("div", To, [
2776
+ return (l, n) => (f(), g("div", Do, [
2777
+ d("div", qo, [
2506
2778
  t.logo ? (f(), g("img", {
2507
2779
  key: 0,
2508
2780
  src: t.logo,
2509
2781
  alt: "Logo",
2510
2782
  class: "h-[23px] w-auto"
2511
- }, null, 8, Vo)) : (f(), g("svg", Po, [...n[0] || (n[0] = [
2512
- c("path", {
2783
+ }, null, 8, Zo)) : (f(), g("svg", Ko, [...n[0] || (n[0] = [
2784
+ d("path", {
2513
2785
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2514
2786
  fill: "#1C64F2"
2515
2787
  }, null, -1),
2516
- c("path", {
2788
+ d("path", {
2517
2789
  d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
2518
2790
  fill: "#1C64F2"
2519
2791
  }, null, -1),
2520
- c("path", {
2792
+ d("path", {
2521
2793
  d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
2522
2794
  fill: "#1C64F2"
2523
2795
  }, null, -1),
2524
- c("path", {
2796
+ d("path", {
2525
2797
  d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
2526
2798
  fill: "#1C64F2"
2527
2799
  }, null, -1)
2528
2800
  ])]))
2529
2801
  ]),
2530
- c("div", Ro, [
2531
- n[2] || (n[2] = c("div", null, [
2532
- c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
2533
- c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
2534
- c("p", { class: "text-gray-600" }, [
2535
- P(" You don't have permission to access this resource."),
2536
- c("br"),
2537
- P(" If you believe this is an error, please contact your administrator. ")
2802
+ d("div", Uo, [
2803
+ n[2] || (n[2] = d("div", null, [
2804
+ d("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
2805
+ d("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
2806
+ d("p", { class: "text-gray-600" }, [
2807
+ A(" You don't have permission to access this resource."),
2808
+ d("br"),
2809
+ A(" If you believe this is an error, please contact your administrator. ")
2538
2810
  ])
2539
2811
  ], -1)),
2540
- c("div", Bo, [
2541
- v(y(F), {
2812
+ d("div", Go, [
2813
+ v(y(N), {
2542
2814
  onClick: a,
2543
2815
  size: "lg"
2544
2816
  }, {
2545
- default: w(() => [...n[1] || (n[1] = [
2546
- P(" Go to Home ", -1)
2817
+ default: L(() => [...n[1] || (n[1] = [
2818
+ A(" Go to Home ", -1)
2547
2819
  ])]),
2548
2820
  _: 1
2549
2821
  })
@@ -2551,14 +2823,14 @@ const re = "bolt-next-token", M = X("auth", () => {
2551
2823
  ])
2552
2824
  ]));
2553
2825
  }
2554
- }, Fo = { class: "h-full grid place-content-center relative" }, Ao = { class: "absolute top-8 left-8" }, Eo = ["src"], zo = {
2826
+ }, Yo = { class: "h-full grid place-content-center relative" }, Xo = { class: "absolute top-8 left-8" }, Jo = ["src"], Qo = {
2555
2827
  key: 1,
2556
2828
  width: "59",
2557
2829
  height: "23",
2558
2830
  viewBox: "0 0 59 23",
2559
2831
  fill: "none",
2560
2832
  xmlns: "http://www.w3.org/2000/svg"
2561
- }, jo = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Io = { class: "flex gap-4 justify-center" }, Oo = {
2833
+ }, er = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, tr = { class: "flex gap-4 justify-center" }, sr = {
2562
2834
  __name: "SparkError404View",
2563
2835
  props: {
2564
2836
  logo: {
@@ -2571,48 +2843,48 @@ const re = "bolt-next-token", M = X("auth", () => {
2571
2843
  }
2572
2844
  },
2573
2845
  setup(e) {
2574
- const s = I(), t = e, a = () => {
2846
+ const s = K(), t = e, a = () => {
2575
2847
  s.push(t.homeRoute);
2576
2848
  };
2577
- return (l, n) => (f(), g("div", Fo, [
2578
- c("div", Ao, [
2849
+ return (l, n) => (f(), g("div", Yo, [
2850
+ d("div", Xo, [
2579
2851
  t.logo ? (f(), g("img", {
2580
2852
  key: 0,
2581
2853
  src: t.logo,
2582
2854
  alt: "Logo",
2583
2855
  class: "h-[23px] w-auto"
2584
- }, null, 8, Eo)) : (f(), g("svg", zo, [...n[0] || (n[0] = [
2585
- c("path", {
2856
+ }, null, 8, Jo)) : (f(), g("svg", Qo, [...n[0] || (n[0] = [
2857
+ d("path", {
2586
2858
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2587
2859
  fill: "#1C64F2"
2588
2860
  }, null, -1),
2589
- c("path", {
2861
+ d("path", {
2590
2862
  d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
2591
2863
  fill: "#1C64F2"
2592
2864
  }, null, -1),
2593
- c("path", {
2865
+ d("path", {
2594
2866
  d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
2595
2867
  fill: "#1C64F2"
2596
2868
  }, null, -1),
2597
- c("path", {
2869
+ d("path", {
2598
2870
  d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
2599
2871
  fill: "#1C64F2"
2600
2872
  }, null, -1)
2601
2873
  ])]))
2602
2874
  ]),
2603
- c("div", jo, [
2604
- n[2] || (n[2] = c("div", null, [
2605
- c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
2606
- c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
2607
- c("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
2875
+ d("div", er, [
2876
+ n[2] || (n[2] = d("div", null, [
2877
+ d("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
2878
+ d("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
2879
+ d("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
2608
2880
  ], -1)),
2609
- c("div", Io, [
2610
- v(y(F), {
2881
+ d("div", tr, [
2882
+ v(y(N), {
2611
2883
  onClick: a,
2612
2884
  size: "lg"
2613
2885
  }, {
2614
- default: w(() => [...n[1] || (n[1] = [
2615
- P(" Go to Home ", -1)
2886
+ default: L(() => [...n[1] || (n[1] = [
2887
+ A(" Go to Home ", -1)
2616
2888
  ])]),
2617
2889
  _: 1
2618
2890
  })
@@ -2620,14 +2892,14 @@ const re = "bolt-next-token", M = X("auth", () => {
2620
2892
  ])
2621
2893
  ]));
2622
2894
  }
2623
- }, No = { class: "h-full grid place-content-center relative" }, Do = { class: "absolute top-8 left-8" }, Zo = ["src"], qo = {
2895
+ }, ar = { class: "h-full grid place-content-center relative" }, or = { class: "absolute top-8 left-8" }, rr = ["src"], nr = {
2624
2896
  key: 1,
2625
2897
  width: "59",
2626
2898
  height: "23",
2627
2899
  viewBox: "0 0 59 23",
2628
2900
  fill: "none",
2629
2901
  xmlns: "http://www.w3.org/2000/svg"
2630
- }, Go = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Ko = { class: "text-primary-600 text-7xl font-bold mb-4" }, Uo = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, Wo = { class: "text-gray-600" }, Yo = { class: "flex gap-4 justify-center" }, Sr = {
2902
+ }, lr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, ir = { class: "text-primary-600 text-7xl font-bold mb-4" }, cr = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, dr = { class: "text-gray-600" }, ur = { class: "flex gap-4 justify-center" }, Or = {
2631
2903
  __name: "SparkErrorGeneralView",
2632
2904
  props: {
2633
2905
  logo: {
@@ -2652,48 +2924,48 @@ const re = "bolt-next-token", M = X("auth", () => {
2652
2924
  }
2653
2925
  },
2654
2926
  setup(e) {
2655
- const s = I(), t = e, a = () => {
2927
+ const s = K(), t = e, a = () => {
2656
2928
  s.push(t.homeRoute);
2657
2929
  };
2658
- return (l, n) => (f(), g("div", No, [
2659
- c("div", Do, [
2930
+ return (l, n) => (f(), g("div", ar, [
2931
+ d("div", or, [
2660
2932
  t.logo ? (f(), g("img", {
2661
2933
  key: 0,
2662
2934
  src: t.logo,
2663
2935
  alt: "Logo",
2664
2936
  class: "h-[23px] w-auto"
2665
- }, null, 8, Zo)) : (f(), g("svg", qo, [...n[0] || (n[0] = [
2666
- c("path", {
2937
+ }, null, 8, rr)) : (f(), g("svg", nr, [...n[0] || (n[0] = [
2938
+ d("path", {
2667
2939
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2668
2940
  fill: "#1C64F2"
2669
2941
  }, null, -1),
2670
- c("path", {
2942
+ d("path", {
2671
2943
  d: "M34.5 5.22235H38.228V14.1664H46.5V17.1264H34.5V5.22235Z",
2672
2944
  fill: "#1C64F2"
2673
2945
  }, null, -1),
2674
- c("path", {
2946
+ d("path", {
2675
2947
  d: "M28.3161 0C29.1499 0 29.7522 0.798785 29.5209 1.59757L27.1856 9.77748H30.9046C31.747 9.77748 32.4279 10.4584 32.4279 11.3008C32.4279 11.7504 32.2315 12.1738 31.891 12.4619L20.5989 22.0517C20.3719 22.2438 20.0839 22.3485 19.787 22.3485C18.9533 22.3485 18.351 21.5497 18.5823 20.751L20.9176 12.571H17.1463C16.33 12.571 15.6709 11.9119 15.6709 11.1001C15.6709 10.6679 15.8586 10.262 16.186 9.98263L27.5043 0.301181C27.7312 0.104759 28.0193 0 28.3161 0ZM26.7404 3.71021L18.8311 10.4759H22.3056C22.633 10.4759 22.9429 10.6286 23.1437 10.8905C23.3445 11.1524 23.4056 11.4929 23.3139 11.8072L21.3584 18.6601L29.355 11.8727H25.7976C25.4702 11.8727 25.1603 11.7199 24.9595 11.458C24.7587 11.1961 24.6976 10.8556 24.7893 10.5413L26.7404 3.71021Z",
2676
2948
  fill: "#1C64F2"
2677
2949
  }, null, -1),
2678
- c("path", {
2950
+ d("path", {
2679
2951
  d: "M0 17.1264V5.22235H10.192C13.6 5.22235 14.544 6.53435 14.544 7.94235V8.16635C14.544 9.70235 13.232 10.3264 12.656 10.4864C13.472 10.6944 15.216 11.3984 15.216 13.4784V13.7024C15.216 15.5904 14.144 17.1264 10.288 17.1264H0ZM9.552 7.73435H3.728V9.67035H9.552C10.592 9.67035 10.848 9.19035 10.848 8.71035V8.67835C10.848 8.18235 10.592 7.73435 9.552 7.73435ZM9.872 12.1984H3.728V14.5344H9.872C11.12 14.5344 11.344 13.8464 11.344 13.3664V13.3024C11.344 12.7904 11.104 12.1984 9.872 12.1984Z",
2680
2952
  fill: "#1C64F2"
2681
2953
  }, null, -1)
2682
2954
  ])]))
2683
2955
  ]),
2684
- c("div", Go, [
2685
- c("div", null, [
2686
- c("div", Ko, S(t.errorCode || "Error"), 1),
2687
- c("h1", Uo, S(t.title || "Something went wrong"), 1),
2688
- c("p", Wo, S(t.message || "An unexpected error occurred. Please try again later."), 1)
2956
+ d("div", lr, [
2957
+ d("div", null, [
2958
+ d("div", ir, H(t.errorCode || "Error"), 1),
2959
+ d("h1", cr, H(t.title || "Something went wrong"), 1),
2960
+ d("p", dr, H(t.message || "An unexpected error occurred. Please try again later."), 1)
2689
2961
  ]),
2690
- c("div", Yo, [
2691
- v(y(F), {
2962
+ d("div", ur, [
2963
+ v(y(N), {
2692
2964
  onClick: a,
2693
2965
  size: "lg"
2694
2966
  }, {
2695
- default: w(() => [...n[1] || (n[1] = [
2696
- P(" Go to Home ", -1)
2967
+ default: L(() => [...n[1] || (n[1] = [
2968
+ A(" Go to Home ", -1)
2697
2969
  ])]),
2698
2970
  _: 1
2699
2971
  })
@@ -2702,7 +2974,7 @@ const re = "bolt-next-token", M = X("auth", () => {
2702
2974
  ]));
2703
2975
  }
2704
2976
  };
2705
- function $r(e = {}) {
2977
+ function zr(e = {}) {
2706
2978
  const {
2707
2979
  loginPath: s = "/login",
2708
2980
  logoutPath: t = "/logout",
@@ -2715,41 +2987,41 @@ function $r(e = {}) {
2715
2987
  {
2716
2988
  path: s,
2717
2989
  name: "login",
2718
- component: no,
2990
+ component: wo,
2719
2991
  props: { logo: n, defaultRedirect: o },
2720
2992
  meta: { auth: !1 }
2721
2993
  },
2722
2994
  {
2723
2995
  path: t,
2724
2996
  name: "logout",
2725
- component: lo,
2997
+ component: _o,
2726
2998
  props: { defaultRedirect: s },
2727
2999
  meta: { auth: !1 }
2728
3000
  },
2729
3001
  {
2730
3002
  path: a,
2731
3003
  name: "forgot-password",
2732
- component: vo,
3004
+ component: Bo,
2733
3005
  props: { logo: n, loginRoute: s },
2734
3006
  meta: { auth: !1 }
2735
3007
  },
2736
3008
  {
2737
3009
  path: l,
2738
3010
  name: "password-reset",
2739
- component: Lo,
3011
+ component: No,
2740
3012
  props: { logo: n, loginRoute: s },
2741
3013
  meta: { auth: !1 }
2742
3014
  }
2743
3015
  ];
2744
3016
  }
2745
- function Lr(e, s = {}) {
3017
+ function Ir(e, s = {}) {
2746
3018
  const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
2747
3019
  e.beforeEach(async (a, l, n) => {
2748
- const o = M();
2749
- o.state.ready || await o.fetchUser(), Xo(a, n, o, t);
3020
+ const o = I();
3021
+ o.state.ready || await o.fetchUser(), pr(a, n, o, t);
2750
3022
  });
2751
3023
  }
2752
- function Xo(e, s, t, a) {
3024
+ function pr(e, s, t, a) {
2753
3025
  const l = e.meta.auth !== !1, n = t.check;
2754
3026
  if (t.state.overrideToken && e.path === "/logout") {
2755
3027
  s({ path: a });
@@ -2787,7 +3059,7 @@ function Xo(e, s, t, a) {
2787
3059
  s();
2788
3060
  }
2789
3061
  }
2790
- function Hr(e = {}) {
3062
+ function Nr(e = {}) {
2791
3063
  const {
2792
3064
  forbiddenPath: s = "/error/403",
2793
3065
  logo: t = "",
@@ -2796,12 +3068,12 @@ function Hr(e = {}) {
2796
3068
  return {
2797
3069
  path: s,
2798
3070
  name: "error-403",
2799
- component: Mo,
3071
+ component: Wo,
2800
3072
  props: { logo: t, homeRoute: a },
2801
3073
  meta: { auth: !1 }
2802
3074
  };
2803
3075
  }
2804
- function Tr(e = {}) {
3076
+ function Dr(e = {}) {
2805
3077
  const {
2806
3078
  logo: s = "",
2807
3079
  homeRoute: t = "/dashboard"
@@ -2809,21 +3081,21 @@ function Tr(e = {}) {
2809
3081
  return {
2810
3082
  path: "/:pathMatch(.*)*",
2811
3083
  name: "error-404",
2812
- component: Oo,
3084
+ component: sr,
2813
3085
  props: { logo: s, homeRoute: t },
2814
3086
  meta: { auth: !1 }
2815
3087
  };
2816
3088
  }
2817
- function Vr(e, s) {
3089
+ function qr(e, s) {
2818
3090
  e.beforeResolve(async (t) => {
2819
3091
  if (t.meta.auth !== !1) {
2820
- const a = M();
3092
+ const a = I();
2821
3093
  a.state.ready && a.check && await s();
2822
3094
  }
2823
3095
  });
2824
3096
  }
2825
- function Jo(e = {}) {
2826
- const s = K.create({
3097
+ function fr(e = {}) {
3098
+ const s = ee.create({
2827
3099
  baseURL: e.baseURL || "",
2828
3100
  timeout: e.timeout || 3e4,
2829
3101
  headers: {
@@ -2834,7 +3106,7 @@ function Jo(e = {}) {
2834
3106
  return s.interceptors.request.use(
2835
3107
  (t) => {
2836
3108
  try {
2837
- const a = M();
3109
+ const a = I();
2838
3110
  a.state.overrideToken ? t.headers.Authorization = `Bearer ${a.state.overrideToken}` : a.state.token && (t.headers.Authorization = `Bearer ${a.state.token}`);
2839
3111
  } catch {
2840
3112
  }
@@ -2846,14 +3118,14 @@ function Jo(e = {}) {
2846
3118
  async (t) => {
2847
3119
  if (t.response?.status === 401)
2848
3120
  try {
2849
- const a = M();
3121
+ const a = I();
2850
3122
  await a.logout(), window.location.href = a.state.routes.auth;
2851
3123
  } catch (a) {
2852
3124
  console.error("Error during auto-logout:", a), window.location.href = "/login";
2853
3125
  }
2854
3126
  if (t.response?.status === 403)
2855
3127
  try {
2856
- const a = M();
3128
+ const a = I();
2857
3129
  window.location.href = a.state.routes.forbidden;
2858
3130
  } catch (a) {
2859
3131
  console.error("Error during 403 redirect:", a), window.location.href = "/error/403";
@@ -2862,56 +3134,56 @@ function Jo(e = {}) {
2862
3134
  }
2863
3135
  ), s;
2864
3136
  }
2865
- let G = null;
2866
- function Pr(e, s = {}) {
2867
- return G = Jo(s), e.provide("axios", G), e.config.globalProperties.$axios = G, G;
3137
+ let Q = null;
3138
+ function Zr(e, s = {}) {
3139
+ return Q = fr(s), e.provide("axios", Q), e.config.globalProperties.$axios = Q, Q;
2868
3140
  }
2869
- function Rr() {
2870
- if (!G)
3141
+ function Kr() {
3142
+ if (!Q)
2871
3143
  throw new Error("Axios instance not initialized. Call setupAxios() first.");
2872
- return G;
3144
+ return Q;
2873
3145
  }
2874
- const Br = X("sparkNav", () => {
2875
- const e = z({
3146
+ const Ur = re("sparkNav", () => {
3147
+ const e = Z({
2876
3148
  menu: [],
2877
3149
  collapsed: !1,
2878
3150
  hidden: !1
2879
- }), s = I(), t = se(), a = (d = []) => {
2880
- e.menu = d;
2881
- }, l = (d, m) => {
2882
- for (const u of d) {
2883
- if (u.href === m) return u;
3151
+ }), s = K(), t = te(), a = (c = []) => {
3152
+ e.menu = c, r();
3153
+ }, l = (c, p) => {
3154
+ for (const u of c) {
3155
+ if (u.href === p) return u;
2884
3156
  if (u.children) {
2885
- const p = l(u.children, m);
2886
- if (p) return p;
3157
+ const h = l(u.children, p);
3158
+ if (h) return h;
2887
3159
  }
2888
3160
  }
2889
3161
  return null;
2890
- }, n = async (d) => {
2891
- if (d) {
2892
- const m = l(e.menu, d);
2893
- if (m && typeof m.action == "function") {
2894
- m.action();
3162
+ }, n = async (c) => {
3163
+ if (c) {
3164
+ const p = l(e.menu, c);
3165
+ if (p && typeof p.action == "function") {
3166
+ p.action();
2895
3167
  return;
2896
3168
  }
2897
- await s.push(d);
3169
+ await s.push(c);
2898
3170
  }
2899
3171
  }, o = () => {
2900
3172
  e.collapsed = !e.collapsed;
2901
3173
  }, i = () => {
2902
3174
  e.hidden = !e.hidden;
2903
3175
  }, r = () => {
2904
- const d = t.name || t.path.replace("/", "");
2905
- if (d) {
2906
- const m = (u) => {
2907
- u.forEach((p) => {
2908
- p.current = p.href === d, p.children && m(p.children);
3176
+ const c = t.name || t.path.replace("/", "");
3177
+ if (c) {
3178
+ const p = (u) => {
3179
+ u.forEach((h) => {
3180
+ h.current = h.href === c, h.children && p(h.children);
2909
3181
  });
2910
3182
  };
2911
- m(e.menu);
3183
+ p(e.menu);
2912
3184
  }
2913
3185
  };
2914
- return E(
3186
+ return j(
2915
3187
  () => t.path,
2916
3188
  () => {
2917
3189
  r();
@@ -2927,58 +3199,59 @@ const Br = X("sparkNav", () => {
2927
3199
  };
2928
3200
  });
2929
3201
  export {
2930
- H as Icons,
2931
- vr as SparkAlert,
2932
- Yt as SparkAppSelector,
2933
- ps as SparkBrandSelector,
2934
- F as SparkButton,
2935
- ms as SparkButtonGroup,
2936
- br as SparkCard,
2937
- _r as SparkDefaultContainer,
2938
- Mo as SparkError403View,
2939
- Oo as SparkError404View,
2940
- Sr as SparkErrorGeneralView,
2941
- vo as SparkForgotPasswordView,
2942
- no as SparkLoginView,
2943
- lo as SparkLogoutView,
2944
- ks as SparkModalContainer,
2945
- xr as SparkModalDialog,
2946
- ce as SparkOverlay,
2947
- wr as SparkPublicContainer,
2948
- Lo as SparkResetPasswordView,
2949
- kr as SparkTable,
2950
- fa as SparkTableDatePicker,
2951
- da as SparkTableFilterButtons,
2952
- na as SparkTableFilterSelect,
2953
- Xs as SparkTablePaginationPaging,
2954
- ea as SparkTablePaginationPerPage,
2955
- ya as SparkTableReset,
2956
- aa as SparkTableSearch,
2957
- pe as SparkTableToolbar,
2958
- hr as addIcons,
2959
- Hr as create403Route,
2960
- Tr as create404Route,
2961
- $r as createAuthRoutes,
2962
- Jo as createAxiosInstance,
2963
- Cr as createBootstrapService,
2964
- Ts as customiseHeader,
2965
- Ga as deleteCookie,
2966
- Rr as getAxiosInstance,
2967
- Za as getCookie,
2968
- He as getDomain,
2969
- Ss as renderHeaderTitle,
2970
- qa as setCookie,
2971
- Lr as setupAuthGuards,
2972
- Pr as setupAxios,
2973
- Vr as setupBootstrapGuard,
2974
- yr as setupFontAwesome,
2975
- U as sparkModalService,
2976
- Z as sparkOverlayService,
2977
- js as updateRow,
2978
- Se as useSparkAppSelectorStore,
2979
- $e as useSparkAppStore,
2980
- M as useSparkAuthStore,
2981
- Le as useSparkBrandFilterStore,
2982
- Br as useSparkNavStore,
2983
- me as useSparkOverlay
3202
+ E as Icons,
3203
+ Br as SparkAlert,
3204
+ ns as SparkAppSelector,
3205
+ ws as SparkBrandSelector,
3206
+ N as SparkButton,
3207
+ Cs as SparkButtonGroup,
3208
+ Er as SparkCard,
3209
+ Fr as SparkDefaultContainer,
3210
+ Wo as SparkError403View,
3211
+ sr as SparkError404View,
3212
+ Or as SparkErrorGeneralView,
3213
+ Bo as SparkForgotPasswordView,
3214
+ wo as SparkLoginView,
3215
+ _o as SparkLogoutView,
3216
+ Es as SparkModalContainer,
3217
+ Ps as SparkModalDialog,
3218
+ he as SparkOverlay,
3219
+ Ar as SparkPublicContainer,
3220
+ No as SparkResetPasswordView,
3221
+ Mr as SparkTable,
3222
+ Ta as SparkTableDatePicker,
3223
+ Ca as SparkTableFilterButtons,
3224
+ xa as SparkTableFilterSelect,
3225
+ ua as SparkTablePaginationPaging,
3226
+ ma as SparkTablePaginationPerPage,
3227
+ Va as SparkTableReset,
3228
+ ya as SparkTableSearch,
3229
+ xe as SparkTableToolbar,
3230
+ Vr as addIcons,
3231
+ Nr as create403Route,
3232
+ Dr as create404Route,
3233
+ zr as createAuthRoutes,
3234
+ fr as createAxiosInstance,
3235
+ jr as createBootstrapService,
3236
+ zs as customiseHeader,
3237
+ lo as deleteCookie,
3238
+ Kr as getAxiosInstance,
3239
+ ro as getCookie,
3240
+ Me as getDomain,
3241
+ Fs as renderHeaderTitle,
3242
+ no as setCookie,
3243
+ Ir as setupAuthGuards,
3244
+ Zr as setupAxios,
3245
+ qr as setupBootstrapGuard,
3246
+ Rr as setupFontAwesome,
3247
+ J as sparkModalService,
3248
+ X as sparkOverlayService,
3249
+ Js as updateRow,
3250
+ Re as useSparkAppSelectorStore,
3251
+ Be as useSparkAppStore,
3252
+ I as useSparkAuthStore,
3253
+ Ee as useSparkBrandFilterStore,
3254
+ Ur as useSparkNavStore,
3255
+ we as useSparkOverlay,
3256
+ Qs as useSparkTableRouteSync
2984
3257
  };