@starasia/admin 4.0.2 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -3,43 +3,43 @@ import { Badges as Ee } from "@starasia/badges";
3
3
  export * from "@starasia/badges";
4
4
  import { Box as f } from "@starasia/box";
5
5
  export * from "@starasia/box";
6
- import { Button as R } from "@starasia/button";
6
+ import { Button as H } from "@starasia/button";
7
7
  export * from "@starasia/button";
8
8
  export * from "@starasia/card";
9
- import { StarasiaDate as Zt } from "@starasia/date";
9
+ import { StarasiaDate as Ut } from "@starasia/date";
10
10
  export * from "@starasia/date";
11
- import { Dialog as Ue, DialogTitle as Fe, DialogBody as qe, DialogFooter as lt } from "@starasia/dialog";
11
+ import { Dialog as Ue, DialogTitle as Fe, DialogBody as qe, DialogFooter as ot } from "@starasia/dialog";
12
12
  export * from "@starasia/dialog";
13
- import { Drawer as $t } from "@starasia/drawer";
13
+ import { Drawer as qt } from "@starasia/drawer";
14
14
  export * from "@starasia/drawer";
15
- import { Dropdown as ot } from "@starasia/dropdown";
15
+ import { Dropdown as ct } from "@starasia/dropdown";
16
16
  export * from "@starasia/dropdown";
17
17
  import { useMediaQuery as ee } from "@starasia/hooks";
18
18
  export * from "@starasia/hooks";
19
19
  import { searchParamsToObject as Ge } from "@starasia/http";
20
20
  export * from "@starasia/http";
21
- import { Input as ct } from "@starasia/input";
21
+ import { Input as at } from "@starasia/input";
22
22
  export * from "@starasia/input";
23
- import { Menu as kt, MenuButton as $e, MenuLists as St, MenuHeading as _t, MenuBody as Ft, MenuFooter as Ut } from "@starasia/menu";
23
+ import { Menu as Lt, MenuButton as $e, MenuLists as Wt, MenuHeading as Gt, MenuBody as Bt, MenuFooter as Jt } from "@starasia/menu";
24
24
  export * from "@starasia/menu";
25
- import { Pagination as qt } from "@starasia/pagination";
25
+ import { Pagination as Qt } from "@starasia/pagination";
26
26
  export * from "@starasia/pagination";
27
27
  export * from "@starasia/storage";
28
- import { Tr as He, Td as we, Table as Et, Thead as Gt, Th as ht, Tbody as Jt } from "@starasia/table";
28
+ import { Tr as Ie, Td as we, Table as At, Thead as Pt, Th as mt, Tbody as Yt } from "@starasia/table";
29
29
  export * from "@starasia/table";
30
30
  export * from "@starasia/tabs";
31
- import { Textarea as Qt } from "@starasia/textarea";
31
+ import { Textarea as Xt } from "@starasia/textarea";
32
32
  export * from "@starasia/textarea";
33
- import { useTheme as Pt, ThemeProvider as ut, useRadius as Yt, useColor as Xt } from "@starasia/theme";
33
+ import { useTheme as Kt, ThemeProvider as yt, useColor as er } from "@starasia/theme";
34
34
  export * from "@starasia/theme";
35
35
  export * from "@starasia/toast";
36
- import { Toggle as Mt } from "@starasia/toggle";
36
+ import { Toggle as Ht } from "@starasia/toggle";
37
37
  export * from "@starasia/toggle";
38
38
  import { Tooltip as ue } from "@starasia/tooltip";
39
39
  export * from "@starasia/tooltip";
40
- import { Checkbox as tt } from "@starasia/checkbox";
40
+ import { Checkbox as rt } from "@starasia/checkbox";
41
41
  export * from "@starasia/checkbox";
42
- import { Radio as Kt } from "@starasia/radio";
42
+ import { Radio as tr } from "@starasia/radio";
43
43
  export * from "@starasia/radio";
44
44
  import { Text as C } from "@starasia/text";
45
45
  export * from "@starasia/text";
@@ -54,12 +54,12 @@ export * from "@starasia/story-record";
54
54
  import { Skeleton as Re } from "@starasia/skeleton";
55
55
  export * from "@starasia/skeleton";
56
56
  export * from "@starasia/progress-stepper";
57
- import { jsx as e, jsxs as d, Fragment as J } from "react/jsx-runtime";
58
- import Lt, { createContext as Wt, useState as B, useContext as Bt, useCallback as Ve, useMemo as De, memo as te, useEffect as U, useRef as le, useLayoutEffect as rt, isValidElement as it, forwardRef as At, Children as er, useImperativeHandle as tr } from "react";
59
- import { useSearchParams as Je, useNavigate as at, useLocation as ze, Outlet as ft, Link as rr, useParams as Rt } from "react-router";
60
- import ir from "react-dom";
61
- import nr from "react-easy-crop";
62
- const lr = {
57
+ import { jsx as e, Fragment as G, jsxs as d } from "react/jsx-runtime";
58
+ import Rt, { createContext as st, useState as M, useContext as Je, useCallback as Me, useMemo as De, memo as te, useEffect as _, useRef as le, useLayoutEffect as it, isValidElement as nt, forwardRef as It, Children as rr, useImperativeHandle as ir } from "react";
59
+ import { useSearchParams as Qe, useNavigate as dt, useLocation as Ve, Outlet as pt, Link as Vt, useParams as zt } from "react-router";
60
+ import nr, { createPortal as lr } from "react-dom";
61
+ import or from "react-easy-crop";
62
+ const cr = {
63
63
  menus: [],
64
64
  menuBottom: void 0,
65
65
  logo: "",
@@ -67,15 +67,15 @@ const lr = {
67
67
  userData: null,
68
68
  setUserData: () => {
69
69
  }
70
- }, Ht = Wt(lr), Vt = () => Bt(Ht), or = (t) => {
71
- const [r, n] = B(
70
+ }, Tt = st(cr), Ot = () => Je(Tt), ar = (t) => {
71
+ const [r, n] = M(
72
72
  (t == null ? void 0 : t.initialUserData) || null
73
73
  );
74
74
  return {
75
75
  userData: r,
76
76
  setUserData: n
77
77
  };
78
- }, zt = Wt({
78
+ }, Nt = st({
79
79
  badges: {},
80
80
  setBadge: () => {
81
81
  },
@@ -83,15 +83,15 @@ const lr = {
83
83
  },
84
84
  clearBadge: () => {
85
85
  }
86
- }), cr = ({ children: t }) => {
87
- const [r, n] = B({}), l = Ve(
86
+ }), sr = ({ children: t }) => {
87
+ const [r, n] = M({}), l = Me(
88
88
  (a) => {
89
89
  n(
90
90
  (h) => typeof a == "function" ? a(h) : a
91
91
  );
92
92
  },
93
93
  []
94
- ), i = Ve(
94
+ ), i = Me(
95
95
  (a, h) => {
96
96
  n((u) => {
97
97
  const g = typeof h == "function" ? h(u[a]) : h;
@@ -99,7 +99,7 @@ const lr = {
99
99
  });
100
100
  },
101
101
  []
102
- ), o = Ve((a) => {
102
+ ), o = Me((a) => {
103
103
  n((h) => {
104
104
  if (!(a in h)) return h;
105
105
  const u = { ...h };
@@ -109,11 +109,11 @@ const lr = {
109
109
  () => ({ badges: r, setBadge: i, setBadges: l, clearBadge: o }),
110
110
  [r, i, l, o]
111
111
  );
112
- return /* @__PURE__ */ e(zt.Provider, { value: s, children: t });
113
- }, ar = () => Bt(zt), Ye = (t, r) => {
112
+ return /* @__PURE__ */ e(Nt.Provider, { value: s, children: t });
113
+ }, dr = () => Je(Nt), Xe = (t, r) => {
114
114
  const n = r !== void 0 ? r : t;
115
115
  return n == null ? null : typeof n == "string" || typeof n == "number" ? { value: n } : n;
116
- }, sr = ({
116
+ }, hr = ({
117
117
  router: t,
118
118
  menus: r = [],
119
119
  menuBottom: n,
@@ -122,9 +122,9 @@ const lr = {
122
122
  initialUserData: o,
123
123
  theme: s
124
124
  }) => {
125
- const a = or({ initialUserData: o }), { theme: h } = Pt();
125
+ const a = ar({ initialUserData: o }), { theme: h } = Kt();
126
126
  return /* @__PURE__ */ e(
127
- Ht.Provider,
127
+ Tt.Provider,
128
128
  {
129
129
  value: {
130
130
  logo: l,
@@ -134,11 +134,11 @@ const lr = {
134
134
  setUserData: a.setUserData,
135
135
  menuBottom: n
136
136
  },
137
- children: /* @__PURE__ */ e(cr, { children: s ? /* @__PURE__ */ e(ut, { value: s, children: t }) : h ? /* @__PURE__ */ e(ut, { value: h, children: t }) : t })
137
+ children: /* @__PURE__ */ e(sr, { children: s ? /* @__PURE__ */ e(yt, { value: s, children: t }) : h ? /* @__PURE__ */ e(yt, { value: h, children: t }) : t })
138
138
  }
139
139
  );
140
- }, sn = te(sr);
141
- function dr({
140
+ }, fn = te(hr);
141
+ function ur({
142
142
  collapsed: t = !1,
143
143
  children: r
144
144
  }) {
@@ -175,39 +175,82 @@ function dr({
175
175
  }
176
176
  );
177
177
  }
178
- const _e = "moduleSwitcherGroupId", nt = "sa-module-switcher-change";
179
- function gt() {
178
+ const ht = st(null);
179
+ function fr({ children: t }) {
180
+ const [r, n] = M(null), [l, i] = M(null), [o, s] = M(null), [a, h] = M(0), u = Me(() => (h((g) => g + 1), () => h((g) => g - 1)), []);
181
+ return /* @__PURE__ */ e(
182
+ ht.Provider,
183
+ {
184
+ value: {
185
+ prependNode: r,
186
+ appendNode: l,
187
+ replaceNode: o,
188
+ setPrependNode: n,
189
+ setAppendNode: i,
190
+ setReplaceNode: s,
191
+ replaceCount: a,
192
+ registerReplace: u
193
+ },
194
+ children: t
195
+ }
196
+ );
197
+ }
198
+ function gr({ children: t }) {
199
+ const r = Je(ht);
200
+ return r ? /* @__PURE__ */ d(G, { children: [
201
+ /* @__PURE__ */ e("div", { ref: r.setPrependNode, style: { display: "contents" } }),
202
+ r.replaceCount > 0 ? /* @__PURE__ */ e("div", { ref: r.setReplaceNode, style: { display: "contents" } }) : t,
203
+ /* @__PURE__ */ e("div", { ref: r.setAppendNode, style: { display: "contents" } })
204
+ ] }) : /* @__PURE__ */ e(G, { children: t });
205
+ }
206
+ function gn({
207
+ children: t,
208
+ mode: r = "append"
209
+ }) {
210
+ const n = Je(ht);
211
+ if (_(() => {
212
+ if (!(r !== "replace" || !n))
213
+ return n.registerReplace();
214
+ }, [r, n]), !n)
215
+ return process.env.NODE_ENV !== "production" && console.warn(
216
+ "[HeaderLeftSlot] used outside AppLayout — content not rendered"
217
+ ), null;
218
+ const l = r === "prepend" ? n.prependNode : r === "replace" ? n.replaceNode : n.appendNode;
219
+ return l ? lr(t, l) : null;
220
+ }
221
+ const _e = "moduleSwitcherGroupId", lt = "sa-module-switcher-change";
222
+ function xt() {
180
223
  if (typeof window > "u") return null;
181
224
  const t = window.localStorage.getItem(_e);
182
225
  if (t === null) return null;
183
226
  const r = Number(t);
184
227
  return Number.isFinite(r) ? r : null;
185
228
  }
186
- function It(t) {
187
- typeof window > "u" || (t === null ? window.localStorage.removeItem(_e) : window.localStorage.setItem(_e, String(t)), window.dispatchEvent(new CustomEvent(nt, { detail: t })));
229
+ function Zt(t) {
230
+ typeof window > "u" || (t === null ? window.localStorage.removeItem(_e) : window.localStorage.setItem(_e, String(t)), window.dispatchEvent(new CustomEvent(lt, { detail: t })));
188
231
  }
189
- function dn() {
190
- It(null);
232
+ function mn() {
233
+ Zt(null);
191
234
  }
192
- function Tt() {
193
- const [t, r] = B(
194
- () => gt()
235
+ function jt() {
236
+ const [t, r] = M(
237
+ () => xt()
195
238
  );
196
- return U(() => {
239
+ return _(() => {
197
240
  const l = () => {
198
- r(gt());
241
+ r(xt());
199
242
  }, i = (o) => {
200
243
  o.key === _e && l();
201
244
  };
202
- return window.addEventListener(nt, l), window.addEventListener("storage", i), () => {
203
- window.removeEventListener(nt, l), window.removeEventListener("storage", i);
245
+ return window.addEventListener(lt, l), window.addEventListener("storage", i), () => {
246
+ window.removeEventListener(lt, l), window.removeEventListener("storage", i);
204
247
  };
205
248
  }, []), { selectedGroupId: t, setSelectedGroupId: (l) => {
206
- It(l), r(l);
249
+ Zt(l), r(l);
207
250
  } };
208
251
  }
209
- let Ze = 0, be = !1;
210
- const mt = () => /* @__PURE__ */ d(
252
+ let je = 0, be = !1;
253
+ const Ct = () => /* @__PURE__ */ d(
211
254
  "svg",
212
255
  {
213
256
  width: "100%",
@@ -224,7 +267,7 @@ const mt = () => /* @__PURE__ */ d(
224
267
  /* @__PURE__ */ e("line", { x1: "6", y1: "1.667", x2: "6", y2: "14.333" })
225
268
  ]
226
269
  }
227
- ), yt = {
270
+ ), Dt = {
228
271
  width: "100%",
229
272
  display: "flex",
230
273
  alignItems: "center",
@@ -241,9 +284,9 @@ const mt = () => /* @__PURE__ */ d(
241
284
  cursor: "pointer",
242
285
  textAlign: "left"
243
286
  };
244
- function hn({
287
+ function yn({
245
288
  children: t,
246
- headerRight: r,
289
+ headerLeftSlot: r,
247
290
  profile: n,
248
291
  isLoadingProfile: l,
249
292
  onLogout: i,
@@ -254,75 +297,75 @@ function hn({
254
297
  profileRole: u,
255
298
  profileMenuButtons: g,
256
299
  profileMenuItems: m,
257
- logoutButton: x
300
+ logoutButton: p
258
301
  }) {
259
302
  var ke, Ne;
260
- const [v] = Je(), A = v.get("embed") === "true", D = Vt(), { badges: T } = ar(), j = at(), Z = ze(), M = !ee("md"), [fe, P] = B(!1), [V, K] = B(!1), [oe, ce] = B(!1), [_, ae] = B(!1), [se, re] = B(/* @__PURE__ */ new Set()), [Y, G] = B(null), { selectedGroupId: z, setSelectedGroupId: I } = Tt(), X = le(null), de = le(null);
261
- U(() => {
303
+ const [v] = Qe(), A = v.get("embed") === "true", D = Ot(), { badges: T } = dr(), Z = dt(), j = Ve(), L = !ee("md"), [fe, P] = M(!1), [I, K] = M(!1), [oe, ce] = M(!1), [U, ae] = M(!1), [se, re] = M(/* @__PURE__ */ new Set()), [Y, J] = M(null), { selectedGroupId: V, setSelectedGroupId: z } = jt(), X = le(null), de = le(null);
304
+ _(() => {
262
305
  const y = X.current;
263
306
  if (!y) return;
264
307
  const S = () => {
265
- be || (Ze = y.scrollTop);
308
+ be || (je = y.scrollTop);
266
309
  };
267
310
  return y.addEventListener("scroll", S), () => y.removeEventListener("scroll", S);
268
311
  }, []);
269
312
  const he = () => {
270
313
  const y = X.current;
271
- y && Ze > 0 && (be = !0, y.scrollTop = Ze, requestAnimationFrame(() => {
314
+ y && je > 0 && (be = !0, y.scrollTop = je, requestAnimationFrame(() => {
272
315
  be = !1;
273
316
  }));
274
317
  };
275
- rt(() => {
318
+ it(() => {
276
319
  be = !0, he();
277
320
  const y = setTimeout(() => {
278
321
  be = !1;
279
322
  }, 300);
280
323
  return () => clearTimeout(y);
281
- }, []), rt(() => {
282
- D.menus.length > 0 && (Ze > 0 ? he() : requestAnimationFrame(() => {
324
+ }, []), it(() => {
325
+ D.menus.length > 0 && (je > 0 ? he() : requestAnimationFrame(() => {
283
326
  var S;
284
327
  const y = (S = X.current) == null ? void 0 : S.querySelector(
285
328
  "[data-menu-active='true']"
286
329
  );
287
330
  y && y.scrollIntoView({ block: "center", behavior: "instant" });
288
331
  }));
289
- }, [D.menus]), U(() => {
332
+ }, [D.menus]), _(() => {
290
333
  be = !0, he();
291
- const y = setTimeout(he, 0), S = setTimeout(he, 50), F = setTimeout(he, 100), p = setTimeout(he, 200), w = setTimeout(() => {
334
+ const y = setTimeout(he, 0), S = setTimeout(he, 50), F = setTimeout(he, 100), x = setTimeout(he, 200), w = setTimeout(() => {
292
335
  be = !1;
293
336
  }, 300);
294
337
  return () => {
295
- clearTimeout(y), clearTimeout(S), clearTimeout(F), clearTimeout(p), clearTimeout(w);
338
+ clearTimeout(y), clearTimeout(S), clearTimeout(F), clearTimeout(x), clearTimeout(w);
296
339
  };
297
- }, [Z.pathname]), U(() => {
340
+ }, [j.pathname]), _(() => {
298
341
  de.current && (de.current.scrollTop = 0);
299
- }, [Z.pathname]), U(() => {
300
- M && ce(!1);
301
- }, [Z.pathname, M]), U(() => {
302
- M && K(!0);
303
- }, [M]);
304
- const Me = () => {
342
+ }, [j.pathname]), _(() => {
343
+ L && ce(!1);
344
+ }, [j.pathname, L]), _(() => {
345
+ L && K(!0);
346
+ }, [L]);
347
+ const Le = () => {
305
348
  P(!0);
306
- }, Ie = () => {
349
+ }, ze = () => {
307
350
  P(!1);
308
- }, Qe = () => {
351
+ }, Pe = () => {
309
352
  P(!1), i();
310
353
  }, Te = (y) => {
311
354
  const S = [y.to];
312
355
  return y.children && S.push(...y.children.map((F) => F.to)), S;
313
- }, Le = [
356
+ }, We = [
314
357
  ...D.menus.flatMap((y) => y.items.flatMap(Te)),
315
358
  ...((ke = D.menuBottom) == null ? void 0 : ke.flatMap(Te)) ?? []
316
359
  ], ie = (y) => {
317
- if (!Z.pathname.startsWith(y)) return !1;
318
- const S = Le.filter((F) => Z.pathname.startsWith(F)).sort((F, p) => p.length - F.length)[0];
360
+ if (!j.pathname.startsWith(y)) return !1;
361
+ const S = We.filter((F) => j.pathname.startsWith(F)).sort((F, x) => x.length - F.length)[0];
319
362
  return y === S;
320
363
  };
321
- U(() => {
364
+ _(() => {
322
365
  var S;
323
366
  const y = (F) => {
324
- var p;
325
- (p = F.children) != null && p.some((w) => Z.pathname.startsWith(w.to)) && re((w) => {
367
+ var x;
368
+ (x = F.children) != null && x.some((w) => j.pathname.startsWith(w.to)) && re((w) => {
326
369
  const b = new Set(w);
327
370
  return b.add(F.id), b;
328
371
  });
@@ -330,73 +373,73 @@ function hn({
330
373
  D.menus.forEach((F) => {
331
374
  F.items.forEach(y);
332
375
  }), (S = D.menuBottom) == null || S.forEach(y);
333
- }, [Z.pathname, D.menus, D.menuBottom]);
376
+ }, [j.pathname, D.menus, D.menuBottom]);
334
377
  const Oe = (y) => {
335
378
  re((S) => {
336
379
  const F = new Set(S);
337
380
  return F.has(y) ? F.delete(y) : F.add(y), F;
338
381
  });
339
382
  };
340
- U(() => {
341
- D.menus.length !== 0 && z !== null && !D.menus.some((y) => y.id === z) && I(null);
342
- }, [D.menus, z, I]);
343
- const We = De(() => {
344
- if (z !== null)
383
+ _(() => {
384
+ D.menus.length !== 0 && V !== null && !D.menus.some((y) => y.id === V) && z(null);
385
+ }, [D.menus, V, z]);
386
+ const Be = De(() => {
387
+ if (V !== null)
345
388
  return D.menus.filter(
346
- (F) => F.id === z || F.parentGroupId === z
389
+ (F) => F.id === V || F.parentGroupId === V
347
390
  );
348
391
  const y = D.menus.filter((F) => F.parentGroupId === void 0), S = D.menus.filter((F) => F.parentGroupId !== void 0).flatMap((F) => F.items);
349
392
  return S.length === 0 ? y : [
350
393
  ...y,
351
394
  { id: 18, name: "Pengaturan", items: S, parentGroupId: void 0 }
352
395
  ];
353
- }, [D.menus, z]);
396
+ }, [D.menus, V]);
354
397
  if (A)
355
- return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: t || /* @__PURE__ */ e(ft, {}) });
356
- const Be = (y) => {
357
- const S = y.children && y.children.length > 0, F = se.has(y.id), p = S ? y.children.some((L) => ie(L.to)) : ie(y.to), w = Ye(y.badge, T[y.id]), b = !!w && V && !M;
358
- return /* @__PURE__ */ d("div", { "data-menu-active": p || void 0, children: [
398
+ return /* @__PURE__ */ e("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)" }, children: t || /* @__PURE__ */ e(pt, {}) });
399
+ const Ae = (y) => {
400
+ const S = y.children && y.children.length > 0, F = se.has(y.id), x = S ? y.children.some((W) => ie(W.to)) : ie(y.to), w = Xe(y.badge, T[y.id]), b = !!w && I && !L;
401
+ return /* @__PURE__ */ d("div", { "data-menu-active": x || void 0, children: [
359
402
  /* @__PURE__ */ d(
360
403
  "button",
361
404
  {
362
- onClick: (L) => {
405
+ onClick: (W) => {
363
406
  if (S)
364
- if (V && !M) {
365
- const H = L.currentTarget.getBoundingClientRect();
366
- G({
407
+ if (I && !L) {
408
+ const R = W.currentTarget.getBoundingClientRect();
409
+ J({
367
410
  item: y,
368
- top: H.top,
369
- left: H.right + 8
411
+ top: R.top,
412
+ left: R.right + 8
370
413
  });
371
414
  } else
372
415
  Oe(y.id);
373
416
  else
374
- j(y.to);
417
+ Z(y.to);
375
418
  },
376
419
  style: {
377
420
  width: "100%",
378
421
  display: "flex",
379
422
  alignItems: "center",
380
- justifyContent: V && !M ? "center" : void 0,
423
+ justifyContent: I && !L ? "center" : void 0,
381
424
  gap: "0.5rem",
382
- paddingLeft: V && !M ? "0" : "0.5rem",
383
- paddingRight: V && !M ? "0" : "0.5rem",
425
+ paddingLeft: I && !L ? "0" : "0.5rem",
426
+ paddingRight: I && !L ? "0" : "0.5rem",
384
427
  paddingTop: "0.25rem",
385
428
  paddingBottom: "0.25rem",
386
429
  height: "2rem",
387
- borderRadius: p ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
430
+ borderRadius: x ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
388
431
  textAlign: "left",
389
- border: p ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent",
390
- backgroundColor: p ? "var(--sa-background-primary, #ffffff)" : "transparent",
432
+ border: x ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent",
433
+ backgroundColor: x ? "var(--sa-background-primary, #ffffff)" : "transparent",
391
434
  color: "var(--sa-text-primary, #292a2e)",
392
435
  cursor: "pointer"
393
436
  },
394
- title: V && !M ? y.title : void 0,
395
- onMouseEnter: (L) => {
396
- p || (L.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
437
+ title: I && !L ? y.title : void 0,
438
+ onMouseEnter: (W) => {
439
+ x || (W.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
397
440
  },
398
- onMouseLeave: (L) => {
399
- p || (L.currentTarget.style.backgroundColor = "transparent");
441
+ onMouseLeave: (W) => {
442
+ x || (W.currentTarget.style.backgroundColor = "transparent");
400
443
  },
401
444
  children: [
402
445
  /* @__PURE__ */ d(
@@ -428,7 +471,7 @@ function hn({
428
471
  ]
429
472
  }
430
473
  ),
431
- (!V || M) && /* @__PURE__ */ d(J, { children: [
474
+ (!I || L) && /* @__PURE__ */ d(G, { children: [
432
475
  /* @__PURE__ */ e(
433
476
  "span",
434
477
  {
@@ -482,9 +525,9 @@ function hn({
482
525
  ]
483
526
  }
484
527
  ),
485
- S && (!V || M) && (() => {
486
- const L = y.children.findIndex(
487
- (H) => ie(H.to)
528
+ S && (!I || L) && (() => {
529
+ const W = y.children.findIndex(
530
+ (R) => ie(R.to)
488
531
  );
489
532
  return /* @__PURE__ */ d(
490
533
  "div",
@@ -515,14 +558,14 @@ function hn({
515
558
  }
516
559
  }
517
560
  ),
518
- L >= 0 && /* @__PURE__ */ e(
561
+ W >= 0 && /* @__PURE__ */ e(
519
562
  "span",
520
563
  {
521
564
  "aria-hidden": "true",
522
565
  style: {
523
566
  position: "absolute",
524
567
  left: 0,
525
- top: `${L * 32}px`,
568
+ top: `${W * 32}px`,
526
569
  width: "1.5px",
527
570
  height: "32px",
528
571
  backgroundColor: "var(--sa-text-primary, #292a2e)",
@@ -532,15 +575,15 @@ function hn({
532
575
  }
533
576
  }
534
577
  ),
535
- y.children.map((H) => {
536
- const ne = Ye(
537
- H.badge,
538
- T[H.id]
578
+ y.children.map((R) => {
579
+ const ne = Xe(
580
+ R.badge,
581
+ T[R.id]
539
582
  );
540
583
  return /* @__PURE__ */ d(
541
584
  "button",
542
585
  {
543
- onClick: () => j(H.to),
586
+ onClick: () => Z(R.to),
544
587
  style: {
545
588
  width: "100%",
546
589
  display: "flex",
@@ -551,24 +594,24 @@ function hn({
551
594
  paddingTop: "0.25rem",
552
595
  paddingBottom: "0.25rem",
553
596
  height: "2rem",
554
- borderRadius: ie(H.to) ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
597
+ borderRadius: ie(R.to) ? "var(--sa-radii-sm, 0.375rem)" : "var(--sa-radii-md, 0.5rem)",
555
598
  textAlign: "left",
556
- backgroundColor: ie(H.to) ? "var(--sa-background-primary, #ffffff)" : "transparent",
557
- color: ie(H.to) ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)",
599
+ backgroundColor: ie(R.to) ? "var(--sa-background-primary, #ffffff)" : "transparent",
600
+ color: ie(R.to) ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)",
558
601
  cursor: "pointer",
559
- border: ie(H.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
602
+ border: ie(R.to) ? "1px solid var(--sa-border-subtle, #0b120e24)" : "1px solid transparent"
560
603
  },
561
604
  onMouseEnter: (ye) => {
562
- ie(H.to) || (ye.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
605
+ ie(R.to) || (ye.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)");
563
606
  },
564
607
  onMouseLeave: (ye) => {
565
- ie(H.to) || (ye.currentTarget.style.backgroundColor = "transparent");
608
+ ie(R.to) || (ye.currentTarget.style.backgroundColor = "transparent");
566
609
  },
567
610
  children: [
568
611
  /* @__PURE__ */ e(
569
612
  k,
570
613
  {
571
- name: H.icon,
614
+ name: R.icon,
572
615
  size: "sm",
573
616
  style: { flexShrink: 0 }
574
617
  }
@@ -585,7 +628,7 @@ function hn({
585
628
  overflow: "hidden",
586
629
  textOverflow: "ellipsis"
587
630
  },
588
- children: H.title
631
+ children: R.title
589
632
  }
590
633
  ),
591
634
  ne && /* @__PURE__ */ e(
@@ -599,7 +642,7 @@ function hn({
599
642
  )
600
643
  ]
601
644
  },
602
- H.id
645
+ R.id
603
646
  );
604
647
  })
605
648
  ]
@@ -608,7 +651,7 @@ function hn({
608
651
  })()
609
652
  ] }, y.id);
610
653
  };
611
- return /* @__PURE__ */ d(J, { children: [
654
+ return /* @__PURE__ */ d(fr, { children: [
612
655
  /* @__PURE__ */ d(
613
656
  "div",
614
657
  {
@@ -617,11 +660,11 @@ function hn({
617
660
  height: "100vh",
618
661
  // backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
619
662
  position: "relative",
620
- "--app-sidebar-width": M ? "0px" : V ? "4.375rem" : "16.375rem",
621
- "--app-footer-zindex": M && oe ? "40" : "999"
663
+ "--app-sidebar-width": L ? "0px" : I ? "4.375rem" : "16.375rem",
664
+ "--app-footer-zindex": L && oe ? "40" : "999"
622
665
  },
623
666
  children: [
624
- M && /* @__PURE__ */ e(
667
+ L && /* @__PURE__ */ e(
625
668
  "div",
626
669
  {
627
670
  style: {
@@ -640,9 +683,9 @@ function hn({
640
683
  "aside",
641
684
  {
642
685
  style: {
643
- width: M ? "16.375rem" : V ? "4.375rem" : "16.375rem",
644
- position: M ? "fixed" : "relative",
645
- ...M && {
686
+ width: L ? "16.375rem" : I ? "4.375rem" : "16.375rem",
687
+ position: L ? "fixed" : "relative",
688
+ ...L && {
646
689
  inset: 0,
647
690
  zIndex: 50,
648
691
  transform: oe ? "translateX(0)" : "translateX(-100%)"
@@ -652,7 +695,7 @@ function hn({
652
695
  display: "flex",
653
696
  flexDirection: "column",
654
697
  transition: "all 0.3s ease-in-out",
655
- flexShrink: M ? void 0 : 0
698
+ flexShrink: L ? void 0 : 0
656
699
  },
657
700
  children: [
658
701
  /* @__PURE__ */ e(
@@ -671,8 +714,8 @@ function hn({
671
714
  position: "relative"
672
715
  },
673
716
  children: (() => {
674
- const y = !M && V && !oe, S = y && _;
675
- return /* @__PURE__ */ d(J, { children: [
717
+ const y = !L && I && !oe, S = y && U;
718
+ return /* @__PURE__ */ d(G, { children: [
676
719
  /* @__PURE__ */ d(
677
720
  "div",
678
721
  {
@@ -699,7 +742,7 @@ function hn({
699
742
  }
700
743
  }
701
744
  ),
702
- (!V || oe) && /* @__PURE__ */ e(
745
+ (!I || oe) && /* @__PURE__ */ e(
703
746
  "span",
704
747
  {
705
748
  style: {
@@ -714,7 +757,7 @@ function hn({
714
757
  ]
715
758
  }
716
759
  ),
717
- !M && !V && /* @__PURE__ */ e(
760
+ !L && !I && /* @__PURE__ */ e(
718
761
  "button",
719
762
  {
720
763
  type: "button",
@@ -733,7 +776,7 @@ function hn({
733
776
  cursor: "pointer",
734
777
  flexShrink: 0
735
778
  },
736
- children: /* @__PURE__ */ e(mt, {})
779
+ children: /* @__PURE__ */ e(Ct, {})
737
780
  }
738
781
  ),
739
782
  y && /* @__PURE__ */ e(
@@ -770,12 +813,12 @@ function hn({
770
813
  height: "1rem",
771
814
  display: "inline-flex"
772
815
  },
773
- children: /* @__PURE__ */ e(mt, {})
816
+ children: /* @__PURE__ */ e(Ct, {})
774
817
  }
775
818
  )
776
819
  }
777
820
  ),
778
- M && /* @__PURE__ */ e(
821
+ L && /* @__PURE__ */ e(
779
822
  "button",
780
823
  {
781
824
  onClick: () => ce(!1),
@@ -813,9 +856,9 @@ function hn({
813
856
  }
814
857
  ),
815
858
  a && /* @__PURE__ */ e(
816
- dr,
859
+ ur,
817
860
  {
818
- collapsed: M ? !1 : V,
861
+ collapsed: L ? !1 : I,
819
862
  children: a
820
863
  }
821
864
  ),
@@ -829,8 +872,8 @@ function hn({
829
872
  paddingTop: "1rem",
830
873
  paddingBottom: "1rem"
831
874
  },
832
- children: We.map((y) => /* @__PURE__ */ d("div", { style: { marginBottom: "1rem" }, children: [
833
- !V || M ? y.name && /* @__PURE__ */ e(
875
+ children: Be.map((y) => /* @__PURE__ */ d("div", { style: { marginBottom: "1rem" }, children: [
876
+ !I || L ? y.name && /* @__PURE__ */ e(
834
877
  "div",
835
878
  {
836
879
  style: {
@@ -873,7 +916,7 @@ function hn({
873
916
  )
874
917
  }
875
918
  ),
876
- /* @__PURE__ */ e("div", { style: { paddingLeft: "1rem", paddingRight: "1rem", display: "flex", flexDirection: "column", gap: "var(--sa-spacing-xs, 0.25rem)" }, children: y.items.map((S) => Be(S)) })
919
+ /* @__PURE__ */ e("div", { style: { paddingLeft: "1rem", paddingRight: "1rem", display: "flex", flexDirection: "column", gap: "var(--sa-spacing-xs, 0.25rem)" }, children: y.items.map((S) => Ae(S)) })
877
920
  ] }, y.id))
878
921
  }
879
922
  ),
@@ -892,7 +935,7 @@ function hn({
892
935
  gap: "var(--sa-spacing-xs, 0.25rem)",
893
936
  flexShrink: 0
894
937
  },
895
- children: D.menuBottom.map((y) => Be(y))
938
+ children: D.menuBottom.map((y) => Ae(y))
896
939
  }
897
940
  )
898
941
  ]
@@ -915,7 +958,7 @@ function hn({
915
958
  },
916
959
  children: [
917
960
  /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "1rem" }, children: [
918
- M && /* @__PURE__ */ e(
961
+ L && /* @__PURE__ */ e(
919
962
  "button",
920
963
  {
921
964
  onClick: () => ce(!0),
@@ -947,11 +990,11 @@ function hn({
947
990
  )
948
991
  }
949
992
  ),
950
- r
993
+ /* @__PURE__ */ e(gr, { children: r })
951
994
  ] }),
952
995
  /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
953
996
  h,
954
- /* @__PURE__ */ d(kt, { position: "bottom-right", children: [
997
+ /* @__PURE__ */ d(Lt, { position: "bottom-right", children: [
955
998
  /* @__PURE__ */ e($e, { children: /* @__PURE__ */ d(
956
999
  "div",
957
1000
  {
@@ -1025,7 +1068,7 @@ function hn({
1025
1068
  }
1026
1069
  ) }),
1027
1070
  /* @__PURE__ */ d(
1028
- St,
1071
+ Wt,
1029
1072
  {
1030
1073
  style: {
1031
1074
  width: "280px",
@@ -1035,7 +1078,7 @@ function hn({
1035
1078
  marginTop: "16px"
1036
1079
  },
1037
1080
  children: [
1038
- /* @__PURE__ */ e(_t, { children: /* @__PURE__ */ d(
1081
+ /* @__PURE__ */ e(Gt, { children: /* @__PURE__ */ d(
1039
1082
  "div",
1040
1083
  {
1041
1084
  style: {
@@ -1115,13 +1158,13 @@ function hn({
1115
1158
  ]
1116
1159
  }
1117
1160
  ) }),
1118
- (g && g.length > 0 || m) && /* @__PURE__ */ d(Ft, { children: [
1161
+ (g && g.length > 0 || m) && /* @__PURE__ */ d(Bt, { children: [
1119
1162
  g == null ? void 0 : g.map((y, S) => /* @__PURE__ */ e($e, { children: /* @__PURE__ */ d(
1120
1163
  "button",
1121
1164
  {
1122
1165
  type: "button",
1123
1166
  onClick: y.onClick,
1124
- style: yt,
1167
+ style: Dt,
1125
1168
  onMouseEnter: (F) => {
1126
1169
  F.currentTarget.style.backgroundColor = "var(--sa-background-neutral, #f0f1f2)";
1127
1170
  },
@@ -1136,13 +1179,13 @@ function hn({
1136
1179
  ) }, `${y.label}-${S}`)),
1137
1180
  m
1138
1181
  ] }),
1139
- x ?? /* @__PURE__ */ e(Ut, { children: /* @__PURE__ */ e($e, { children: /* @__PURE__ */ d(
1182
+ p ?? /* @__PURE__ */ e(Jt, { children: /* @__PURE__ */ e($e, { children: /* @__PURE__ */ d(
1140
1183
  "button",
1141
1184
  {
1142
1185
  type: "button",
1143
- onClick: Me,
1186
+ onClick: Le,
1144
1187
  style: {
1145
- ...yt,
1188
+ ...Dt,
1146
1189
  color: "var(--sa-background-error, #c9184a)",
1147
1190
  fontWeight: 500
1148
1191
  },
@@ -1183,7 +1226,7 @@ function hn({
1183
1226
  flex: 1,
1184
1227
  overflowY: "auto"
1185
1228
  },
1186
- children: t || /* @__PURE__ */ e(ft, {})
1229
+ children: t || /* @__PURE__ */ e(pt, {})
1187
1230
  }
1188
1231
  )
1189
1232
  ] })
@@ -1205,19 +1248,19 @@ function hn({
1205
1248
  children: s
1206
1249
  }
1207
1250
  ),
1208
- /* @__PURE__ */ d(Ue, { isShow: fe, onHide: Ie, children: [
1251
+ /* @__PURE__ */ d(Ue, { isShow: fe, onHide: ze, children: [
1209
1252
  /* @__PURE__ */ e(Fe, { children: "Confirmation Logout" }),
1210
1253
  /* @__PURE__ */ e(qe, { children: "Are you sure you want to end the session and exit the page?" }),
1211
- /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(f, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ d($, { direction: "row", gap: "sm", align: "center", children: [
1212
- /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(R, { secondary: !0, onClick: Ie, children: "Cancel" }) }),
1213
- /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(R, { primary: !0, onClick: Qe, children: "Yes, Sure" }) })
1254
+ /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ e(f, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ d($, { direction: "row", gap: "sm", align: "center", children: [
1255
+ /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(H, { secondary: !0, onClick: ze, children: "Cancel" }) }),
1256
+ /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(H, { primary: !0, onClick: Pe, children: "Yes, Sure" }) })
1214
1257
  ] }) }) })
1215
1258
  ] }),
1216
- Y && /* @__PURE__ */ d(J, { children: [
1259
+ Y && /* @__PURE__ */ d(G, { children: [
1217
1260
  /* @__PURE__ */ e(
1218
1261
  "div",
1219
1262
  {
1220
- onClick: () => G(null),
1263
+ onClick: () => J(null),
1221
1264
  style: {
1222
1265
  position: "fixed",
1223
1266
  inset: 0,
@@ -1263,7 +1306,7 @@ function hn({
1263
1306
  }
1264
1307
  ),
1265
1308
  (Ne = Y.item.children) == null ? void 0 : Ne.map((y) => {
1266
- const S = ie(y.to), F = Ye(
1309
+ const S = ie(y.to), F = Xe(
1267
1310
  y.badge,
1268
1311
  T[y.id]
1269
1312
  );
@@ -1271,7 +1314,7 @@ function hn({
1271
1314
  "button",
1272
1315
  {
1273
1316
  onClick: () => {
1274
- j(y.to), G(null);
1317
+ Z(y.to), J(null);
1275
1318
  },
1276
1319
  style: {
1277
1320
  width: "100%",
@@ -1288,11 +1331,11 @@ function hn({
1288
1331
  fontSize: "0.875rem",
1289
1332
  fontWeight: 500
1290
1333
  },
1291
- onMouseEnter: (p) => {
1292
- S || (p.currentTarget.style.backgroundColor = "var(--sa-color-gray-100, #f8f8f8)");
1334
+ onMouseEnter: (x) => {
1335
+ S || (x.currentTarget.style.backgroundColor = "var(--sa-color-gray-100, #f8f8f8)");
1293
1336
  },
1294
- onMouseLeave: (p) => {
1295
- S || (p.currentTarget.style.backgroundColor = "transparent");
1337
+ onMouseLeave: (x) => {
1338
+ S || (x.currentTarget.style.backgroundColor = "transparent");
1296
1339
  },
1297
1340
  children: [
1298
1341
  y.icon && /* @__PURE__ */ e(
@@ -1324,7 +1367,66 @@ function hn({
1324
1367
  ] })
1325
1368
  ] });
1326
1369
  }
1327
- const Xe = [
1370
+ const mr = ({ children: t, ...r }) => /* @__PURE__ */ e(
1371
+ f,
1372
+ {
1373
+ role: "button",
1374
+ cursor: "pointer",
1375
+ "aria-pressed": "true",
1376
+ display: "inline-block",
1377
+ tabIndex: 0,
1378
+ ...r,
1379
+ children: t
1380
+ }
1381
+ ), ut = te(mr), vt = ({
1382
+ title: t,
1383
+ iconName: r,
1384
+ textColor: n,
1385
+ iconColor: l,
1386
+ hoverTextColor: i,
1387
+ hoverIconColor: o
1388
+ }) => {
1389
+ const [s, a] = M(!1);
1390
+ return /* @__PURE__ */ d(
1391
+ f,
1392
+ {
1393
+ direction: "row",
1394
+ gap: "xs",
1395
+ align: "center",
1396
+ onMouseEnter: () => a(!0),
1397
+ onMouseLeave: () => a(!1),
1398
+ style: { cursor: "pointer" },
1399
+ children: [
1400
+ /* @__PURE__ */ e(
1401
+ k,
1402
+ {
1403
+ name: r || "ChevronLeft",
1404
+ size: "xs",
1405
+ style: {
1406
+ color: s ? o ?? "var(--sa-text-subtle, #8c8f97)" : l ?? "var(--sa-text-subtle, #8c8f97)",
1407
+ transition: "color 0.15s ease"
1408
+ }
1409
+ }
1410
+ ),
1411
+ /* @__PURE__ */ e(
1412
+ C,
1413
+ {
1414
+ variant: "sub-h3",
1415
+ style: {
1416
+ color: s ? i ?? "var(--sa-text-primary, #292a2e)" : n ?? "var(--sa-text-subtle, #8c8f97)",
1417
+ textDecoration: s ? "underline" : "none",
1418
+ transition: "color 0.15s ease"
1419
+ },
1420
+ children: t || "Back"
1421
+ }
1422
+ )
1423
+ ]
1424
+ }
1425
+ );
1426
+ }, pn = (t) => {
1427
+ const { onClick: r, navigateTo: n, ...l } = t;
1428
+ return n ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Vt, { to: n, replace: !0, style: { textDecoration: "none" }, children: /* @__PURE__ */ e(vt, { ...l }) }) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(ut, { onClick: r, children: /* @__PURE__ */ e(vt, { ...l }) }) });
1429
+ }, Ke = [
1328
1430
  // brand (blue)
1329
1431
  {
1330
1432
  icon: "var(--sa-color-brand-400, #3366b7)",
@@ -1368,7 +1470,7 @@ const Xe = [
1368
1470
  activeShadow: "rgba(255, 117, 143, 0.25)"
1369
1471
  }
1370
1472
  ];
1371
- function xt(t, r, n) {
1473
+ function bt(t, r, n) {
1372
1474
  return {
1373
1475
  display: "flex",
1374
1476
  alignItems: "center",
@@ -1384,7 +1486,7 @@ function xt(t, r, n) {
1384
1486
  transition: "box-shadow 0.2s ease, transform 0.2s ease, background-color 0.15s ease, border-color 0.15s ease"
1385
1487
  };
1386
1488
  }
1387
- const pt = {
1489
+ const wt = {
1388
1490
  fontSize: "11px",
1389
1491
  fontWeight: 500,
1390
1492
  textAlign: "center",
@@ -1393,7 +1495,7 @@ const pt = {
1393
1495
  color: "var(--sa-background-primary, #ffffff)",
1394
1496
  lineHeight: "1.3",
1395
1497
  maxWidth: "80px"
1396
- }, Ct = {
1498
+ }, kt = {
1397
1499
  display: "flex",
1398
1500
  flexDirection: "column",
1399
1501
  alignItems: "center",
@@ -1403,16 +1505,16 @@ const pt = {
1403
1505
  cursor: "pointer",
1404
1506
  padding: 0
1405
1507
  };
1406
- function hr({
1508
+ function yr({
1407
1509
  isShow: t,
1408
1510
  onHide: r,
1409
1511
  menus: n,
1410
1512
  selectedGroupId: l,
1411
1513
  onSelect: i
1412
1514
  }) {
1413
- const [o, s] = B(void 0), a = (u) => {
1515
+ const [o, s] = M(void 0), a = (u) => {
1414
1516
  i(u), r();
1415
- }, h = Xe[0];
1517
+ }, h = Ke[0];
1416
1518
  return /* @__PURE__ */ e(
1417
1519
  Ue,
1418
1520
  {
@@ -1439,26 +1541,26 @@ function hr({
1439
1541
  onClick: () => a(null),
1440
1542
  onMouseEnter: () => s("all"),
1441
1543
  onMouseLeave: () => s(void 0),
1442
- style: Ct,
1544
+ style: kt,
1443
1545
  children: [
1444
- /* @__PURE__ */ e("div", { style: xt(l === null, o === "all", h), children: /* @__PURE__ */ e("div", { style: { color: h.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(k, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
1445
- /* @__PURE__ */ e("span", { style: pt, children: "Semua" })
1546
+ /* @__PURE__ */ e("div", { style: bt(l === null, o === "all", h), children: /* @__PURE__ */ e("div", { style: { color: h.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(k, { name: "Grid", size: "lg", style: { width: 32, height: 32 } }) }) }),
1547
+ /* @__PURE__ */ e("span", { style: wt, children: "Semua" })
1446
1548
  ]
1447
1549
  }
1448
1550
  ),
1449
1551
  n.map((u, g) => {
1450
1552
  var D;
1451
- const m = l === u.id, x = o === u.id, v = ((D = u.items[0]) == null ? void 0 : D.icon) ?? "Grid", A = Xe[(g + 1) % Xe.length];
1553
+ const m = l === u.id, p = o === u.id, v = ((D = u.items[0]) == null ? void 0 : D.icon) ?? "Grid", A = Ke[(g + 1) % Ke.length];
1452
1554
  return /* @__PURE__ */ d(
1453
1555
  "button",
1454
1556
  {
1455
1557
  onClick: () => a(u.id),
1456
1558
  onMouseEnter: () => s(u.id),
1457
1559
  onMouseLeave: () => s(void 0),
1458
- style: Ct,
1560
+ style: kt,
1459
1561
  children: [
1460
- /* @__PURE__ */ e("div", { style: xt(m, x, A), children: /* @__PURE__ */ e("div", { style: { color: A.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(k, { name: v, size: "lg", style: { width: 32, height: 32 } }) }) }),
1461
- /* @__PURE__ */ e("span", { style: pt, children: u.name })
1562
+ /* @__PURE__ */ e("div", { style: bt(m, p, A), children: /* @__PURE__ */ e("div", { style: { color: A.icon, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(k, { name: v, size: "lg", style: { width: 32, height: 32 } }) }) }),
1563
+ /* @__PURE__ */ e("span", { style: wt, children: u.name })
1462
1564
  ]
1463
1565
  },
1464
1566
  u.id
@@ -1470,19 +1572,19 @@ function hr({
1470
1572
  }
1471
1573
  );
1472
1574
  }
1473
- function un({
1575
+ function xn({
1474
1576
  onSelect: t,
1475
1577
  "aria-label": r = "Pilih module"
1476
1578
  } = {}) {
1477
- const n = Vt(), l = at(), { selectedGroupId: i, setSelectedGroupId: o } = Tt(), [s, a] = B(!1), h = (u) => {
1579
+ const n = Ot(), l = dt(), { selectedGroupId: i, setSelectedGroupId: o } = jt(), [s, a] = M(!1), h = (u) => {
1478
1580
  var g;
1479
1581
  if (o(u), u !== null) {
1480
- const m = n.menus.find((v) => v.id === u), x = (g = m == null ? void 0 : m.items[0]) == null ? void 0 : g.to;
1481
- x && l(x);
1582
+ const m = n.menus.find((v) => v.id === u), p = (g = m == null ? void 0 : m.items[0]) == null ? void 0 : g.to;
1583
+ p && l(p);
1482
1584
  }
1483
1585
  t == null || t(u);
1484
1586
  };
1485
- return /* @__PURE__ */ d(J, { children: [
1587
+ return /* @__PURE__ */ d(G, { children: [
1486
1588
  /* @__PURE__ */ d("div", { style: { position: "relative" }, children: [
1487
1589
  /* @__PURE__ */ e(
1488
1590
  "button",
@@ -1527,7 +1629,7 @@ function un({
1527
1629
  )
1528
1630
  ] }),
1529
1631
  /* @__PURE__ */ e(
1530
- hr,
1632
+ yr,
1531
1633
  {
1532
1634
  isShow: s,
1533
1635
  onHide: () => a(!1),
@@ -1538,95 +1640,7 @@ function un({
1538
1640
  )
1539
1641
  ] });
1540
1642
  }
1541
- const fn = te(
1542
- ({ children: t, coverImage: r, logo: n }) => {
1543
- const l = ee("md"), i = Yt();
1544
- return /* @__PURE__ */ d(
1545
- f,
1546
- {
1547
- direction: l ? "row" : "column",
1548
- width: "width-screen",
1549
- height: "height-screen",
1550
- children: [
1551
- /* @__PURE__ */ e(
1552
- f,
1553
- {
1554
- direction: "row",
1555
- padding: "spacing-12",
1556
- justify: l ? "flex-start" : "center",
1557
- style: {
1558
- width: "100%",
1559
- maxWidth: "50vw",
1560
- ...r && {
1561
- backgroundImage: `url(${r})`,
1562
- backgroundSize: "cover",
1563
- backgroundPosition: "center",
1564
- backgroundRepeat: "no-repeat"
1565
- },
1566
- ...l ? {} : {
1567
- maxWidth: "100%",
1568
- width: "100%",
1569
- minHeight: "100vh"
1570
- }
1571
- },
1572
- children: /* @__PURE__ */ d(
1573
- f,
1574
- {
1575
- style: { backgroundColor: "var(--sa-background-primary, #ffffff)" },
1576
- width: "width-fit ",
1577
- height: "height-10",
1578
- paddingInline: "sm",
1579
- display: "flex",
1580
- justify: "center",
1581
- align: "center",
1582
- children: [
1583
- n && /* @__PURE__ */ e("img", { width: 150, src: n, alt: "logo" }),
1584
- " "
1585
- ]
1586
- }
1587
- )
1588
- }
1589
- ),
1590
- /* @__PURE__ */ e(
1591
- f,
1592
- {
1593
- display: "flex",
1594
- flex: "1",
1595
- style: {
1596
- backgroundColor: "var(--sa-background-neutral, #f0f1f2)",
1597
- position: "fixed",
1598
- zIndex: 10,
1599
- ...l ? {
1600
- right: 0,
1601
- minHeight: "100vh",
1602
- width: "calc(50vw + 6.125rem)",
1603
- borderTopLeftRadius: i == null ? void 0 : i["2xl"],
1604
- borderBottomLeftRadius: i == null ? void 0 : i["2xl"]
1605
- } : {
1606
- bottom: 0,
1607
- left: 0,
1608
- right: 0,
1609
- minHeight: 300,
1610
- borderTopRightRadius: i == null ? void 0 : i["2xl"],
1611
- borderTopLeftRadius: i == null ? void 0 : i["2xl"]
1612
- }
1613
- },
1614
- children: /* @__PURE__ */ e(
1615
- f,
1616
- {
1617
- direction: "column",
1618
- padding: "spacing-6",
1619
- style: { maxWidth: "414px", margin: "auto" },
1620
- children: t
1621
- }
1622
- )
1623
- }
1624
- )
1625
- ]
1626
- }
1627
- );
1628
- }
1629
- ), ur = (t, r) => {
1643
+ const pr = (t, r) => {
1630
1644
  const n = [];
1631
1645
  if (r === 0)
1632
1646
  return n.push(t), n;
@@ -1635,7 +1649,7 @@ const fn = te(
1635
1649
  n.push(i);
1636
1650
  }
1637
1651
  return n;
1638
- }, fr = te(
1652
+ }, xr = te(
1639
1653
  ({
1640
1654
  value: t,
1641
1655
  label: r,
@@ -1661,14 +1675,14 @@ const fn = te(
1661
1675
  }),
1662
1676
  [i, o]
1663
1677
  ), h = () => typeof r == "string" ? /* @__PURE__ */ e(C, { fontWeight: "medium", color: "text-muted", children: r }) : r, u = () => typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ e(C, { color: "text", fontWeight: "medium", children: t }) : t, g = () => typeof n == "string" || typeof n == "number" ? /* @__PURE__ */ e(C, { fontWeight: "medium", color: "text-muted", children: n }) : n;
1664
- return /* @__PURE__ */ d(He, { children: [
1678
+ return /* @__PURE__ */ d(Ie, { children: [
1665
1679
  /* @__PURE__ */ e(we, { style: s, width: l, children: h() }),
1666
1680
  n ? /* @__PURE__ */ e(we, { style: a, width: 24, children: g() }) : null,
1667
1681
  /* @__PURE__ */ e(we, { style: s, children: u() })
1668
1682
  ] });
1669
1683
  }
1670
- ), gr = te(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(Et, { children: t.map((l, i) => /* @__PURE__ */ e(
1671
- fr,
1684
+ ), Cr = te(({ fields: t, separator: r, labelWidth: n }) => /* @__PURE__ */ e(At, { children: t.map((l, i) => /* @__PURE__ */ e(
1685
+ xr,
1672
1686
  {
1673
1687
  separator: r,
1674
1688
  labelWidth: n,
@@ -1676,7 +1690,7 @@ const fn = te(
1676
1690
  ...l
1677
1691
  },
1678
1692
  `field-group-field-${i}`
1679
- )) })), gn = te(
1693
+ )) })), Cn = te(
1680
1694
  ({
1681
1695
  maxRow: t = 0,
1682
1696
  maxColumn: r = 2,
@@ -1686,7 +1700,7 @@ const fn = te(
1686
1700
  bordered: o = !1
1687
1701
  }) => {
1688
1702
  const s = De(
1689
- () => ur(l, t),
1703
+ () => pr(l, t),
1690
1704
  [l, t]
1691
1705
  ), a = s.length > 2, h = () => {
1692
1706
  switch (r) {
@@ -1722,7 +1736,7 @@ const fn = te(
1722
1736
  width: a ? h() : void 0,
1723
1737
  marginBottom: a ? "lg" : void 0,
1724
1738
  children: /* @__PURE__ */ e(
1725
- gr,
1739
+ Cr,
1726
1740
  {
1727
1741
  labelWidth: i,
1728
1742
  fields: u,
@@ -1735,7 +1749,7 @@ const fn = te(
1735
1749
  }
1736
1750
  );
1737
1751
  }
1738
- ), mn = ({
1752
+ ), Dn = ({
1739
1753
  title: t,
1740
1754
  content: r,
1741
1755
  onHide: n,
@@ -1758,36 +1772,25 @@ const fn = te(
1758
1772
  }, h = () => {
1759
1773
  switch (s) {
1760
1774
  case "info":
1761
- return /* @__PURE__ */ e(R, { primary: !0, onClick: l, children: o });
1775
+ return /* @__PURE__ */ e(H, { primary: !0, onClick: l, children: o });
1762
1776
  case "danger":
1763
- return /* @__PURE__ */ e(R, { danger: !0, onClick: l, children: o });
1777
+ return /* @__PURE__ */ e(H, { danger: !0, onClick: l, children: o });
1764
1778
  case "success":
1765
- return /* @__PURE__ */ e(R, { success: !0, onClick: l, children: o });
1779
+ return /* @__PURE__ */ e(H, { success: !0, onClick: l, children: o });
1766
1780
  default:
1767
- return /* @__PURE__ */ e(R, { primary: !0, onClick: l, children: o });
1781
+ return /* @__PURE__ */ e(H, { primary: !0, onClick: l, children: o });
1768
1782
  }
1769
1783
  };
1770
1784
  return /* @__PURE__ */ d(Ue, { isShow: i, onHide: n, children: [
1771
1785
  a(),
1772
1786
  /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e(C, { children: r }) }),
1773
- /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ d(f, { justify: "flex-end", direction: "row", gap: "sm", children: [
1774
- /* @__PURE__ */ e(R, { secondary: !0, onClick: n, children: "Cancel" }),
1787
+ /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ d(f, { justify: "flex-end", direction: "row", gap: "sm", children: [
1788
+ /* @__PURE__ */ e(H, { secondary: !0, onClick: n, children: "Cancel" }),
1775
1789
  h()
1776
1790
  ] }) })
1777
1791
  ] });
1778
- }, mr = ({ children: t, ...r }) => /* @__PURE__ */ e(
1779
- f,
1780
- {
1781
- role: "button",
1782
- cursor: "pointer",
1783
- "aria-pressed": "true",
1784
- display: "inline-block",
1785
- tabIndex: 0,
1786
- ...r,
1787
- children: t
1788
- }
1789
- ), Ot = te(mr), yr = ({ backButton: t }) => {
1790
- const [r, n] = B(!1), l = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", o = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
1792
+ }, Dr = ({ backButton: t }) => {
1793
+ const [r, n] = M(!1), l = (t == null ? void 0 : t.iconColor) ?? "var(--sa-text-subtle, #8c8f97)", i = (t == null ? void 0 : t.textColor) ?? "var(--sa-text-subtle, #8c8f97)", o = (t == null ? void 0 : t.hoverIconColor) ?? "var(--sa-text-subtle, #8c8f97)", s = (t == null ? void 0 : t.hoverTextColor) ?? "var(--sa-text-primary, #292a2e)";
1791
1794
  return /* @__PURE__ */ d(
1792
1795
  f,
1793
1796
  {
@@ -1824,7 +1827,7 @@ const fn = te(
1824
1827
  ]
1825
1828
  }
1826
1829
  );
1827
- }, xr = ({
1830
+ }, vr = ({
1828
1831
  backButton: t,
1829
1832
  title: r,
1830
1833
  titleTag: n,
@@ -1835,38 +1838,38 @@ const fn = te(
1835
1838
  containerProps: a,
1836
1839
  headerProps: h
1837
1840
  }) => {
1838
- const u = ee("lg"), g = at(), m = ze(), x = t == null ? void 0 : t.show, v = () => {
1841
+ const u = ee("lg"), g = dt(), m = Ve(), p = t == null ? void 0 : t.show, v = () => {
1839
1842
  if (typeof (t == null ? void 0 : t.onClick) == "function") {
1840
1843
  t.onClick();
1841
1844
  return;
1842
1845
  }
1843
1846
  g(-1, { replace: !0 });
1844
- }, A = () => o ? it(o) ? o : /* @__PURE__ */ e(f, { direction: "row", gap: "lg", children: o.map(
1845
- ({ title: Z, icon: Q, buttonProps: M, onClick: fe }, P) => !Z && !Q ? null : /* @__PURE__ */ e(
1846
- R,
1847
+ }, A = () => o ? nt(o) ? o : /* @__PURE__ */ e(f, { direction: "row", gap: "lg", children: o.map(
1848
+ ({ title: j, icon: Q, buttonProps: L, onClick: fe }, P) => !j && !Q ? null : /* @__PURE__ */ e(
1849
+ H,
1847
1850
  {
1848
1851
  fullWidth: !u,
1849
1852
  iconLeft: Q ? /* @__PURE__ */ e(k, { name: Q, size: "md" }) : void 0,
1850
1853
  onClick: fe,
1851
- ...M,
1852
- children: Z
1854
+ ...L,
1855
+ children: j
1853
1856
  },
1854
1857
  `action-${P}`
1855
1858
  )
1856
1859
  ) }) : null, D = () => {
1857
- const Z = /* @__PURE__ */ e(yr, { backButton: t });
1860
+ const j = /* @__PURE__ */ e(Dr, { backButton: t });
1858
1861
  return t != null && t.navigateTo ? /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(
1859
- rr,
1862
+ Vt,
1860
1863
  {
1861
1864
  to: t.navigateTo,
1862
1865
  replace: !0,
1863
1866
  style: { textDecoration: "none" },
1864
- children: Z
1867
+ children: j
1865
1868
  }
1866
- ) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(Ot, { onClick: v, children: Z }) });
1869
+ ) }) : /* @__PURE__ */ e(f, { direction: "row", children: /* @__PURE__ */ e(ut, { onClick: v, children: j }) });
1867
1870
  }, T = () => {
1868
- const Z = !!r, Q = it(o) ? !0 : Array.isArray(o) && o.length > 0;
1869
- return !Z && !Q && !x ? null : /* @__PURE__ */ d(
1871
+ const j = !!r, Q = nt(o) ? !0 : Array.isArray(o) && o.length > 0;
1872
+ return !j && !Q && !p ? null : /* @__PURE__ */ d(
1870
1873
  f,
1871
1874
  {
1872
1875
  gap: "xs",
@@ -1874,8 +1877,8 @@ const fn = te(
1874
1877
  paddingInline: h == null ? void 0 : h.paddingInline,
1875
1878
  ...h,
1876
1879
  children: [
1877
- x && D(),
1878
- (Z || Q) && /* @__PURE__ */ d(
1880
+ p && D(),
1881
+ (j || Q) && /* @__PURE__ */ d(
1879
1882
  f,
1880
1883
  {
1881
1884
  direction: u ? "row" : "column",
@@ -1883,7 +1886,7 @@ const fn = te(
1883
1886
  justify: "space-between",
1884
1887
  align: "center",
1885
1888
  children: [
1886
- Z ? typeof r == "string" ? /* @__PURE__ */ d(f, { direction: "row", gap: "lg", align: "center", children: [
1889
+ j ? typeof r == "string" ? /* @__PURE__ */ d(f, { direction: "row", gap: "lg", align: "center", children: [
1887
1890
  /* @__PURE__ */ e(C, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: r }),
1888
1891
  n && /* @__PURE__ */ e(Ee, { border: !0, size: "lg", text: n, ...s })
1889
1892
  ] }) : r : null,
@@ -1894,7 +1897,7 @@ const fn = te(
1894
1897
  ]
1895
1898
  }
1896
1899
  );
1897
- }, j = () => l;
1900
+ }, Z = () => l;
1898
1901
  return /* @__PURE__ */ d(
1899
1902
  f,
1900
1903
  {
@@ -1908,29 +1911,29 @@ const fn = te(
1908
1911
  },
1909
1912
  children: [
1910
1913
  i && T(),
1911
- j()
1914
+ Z()
1912
1915
  ]
1913
1916
  },
1914
1917
  m.pathname
1915
1918
  );
1916
- }, yn = te(xr), pr = {
1919
+ }, vn = te(vr), br = {
1917
1920
  icon: "Cross",
1918
1921
  title: ""
1919
- }, Cr = "calc(100vw - 16px)", Dt = (t) => t == null ? void 0 : `min(${typeof t == "number" ? `${t}px` : t}, ${Cr})`, Dr = At(
1922
+ }, wr = "calc(100vw - 16px)", St = (t) => t == null ? void 0 : `min(${typeof t == "number" ? `${t}px` : t}, ${wr})`, kr = It(
1920
1923
  ({
1921
1924
  onHide: t,
1922
1925
  show: r,
1923
1926
  withBlur: n = !1,
1924
1927
  style: l,
1925
1928
  children: i,
1926
- closeButton: o = pr,
1929
+ closeButton: o = br,
1927
1930
  width: s,
1928
1931
  minWidth: a = "357px",
1929
1932
  maxWidth: h = "357px"
1930
1933
  }, u) => {
1931
- const g = Dt(s ?? a), m = Dt(s ?? h);
1934
+ const g = St(s ?? a), m = St(s ?? h);
1932
1935
  return /* @__PURE__ */ e(
1933
- $t,
1936
+ qt,
1934
1937
  {
1935
1938
  blur: n,
1936
1939
  isShow: r,
@@ -1971,7 +1974,7 @@ const fn = te(
1971
1974
  }
1972
1975
  );
1973
1976
  }
1974
- ), Nt = te(
1977
+ ), $t = te(
1975
1978
  ({ children: t, borderBottom: r = !0, padding: n = !0 }) => {
1976
1979
  const l = ee("lg");
1977
1980
  return /* @__PURE__ */ e(
@@ -1987,7 +1990,7 @@ const fn = te(
1987
1990
  }
1988
1991
  );
1989
1992
  }
1990
- ), jt = te(
1993
+ ), _t = te(
1991
1994
  ({ children: t, borderTop: r = !0, padding: n = !0 }) => {
1992
1995
  const l = ee("lg");
1993
1996
  return /* @__PURE__ */ e(
@@ -2003,7 +2006,7 @@ const fn = te(
2003
2006
  }
2004
2007
  );
2005
2008
  }
2006
- ), vr = te(
2009
+ ), Sr = te(
2007
2010
  ({ children: t, ...r }) => /* @__PURE__ */ e(
2008
2011
  f,
2009
2012
  {
@@ -2015,7 +2018,7 @@ const fn = te(
2015
2018
  children: t
2016
2019
  }
2017
2020
  )
2018
- ), xn = te(
2021
+ ), bn = te(
2019
2022
  ({
2020
2023
  children: t,
2021
2024
  title: r,
@@ -2030,7 +2033,7 @@ const fn = te(
2030
2033
  footerProps: g = { borderTop: !0 },
2031
2034
  variantTag: m = "info"
2032
2035
  }) => {
2033
- const x = ee("lg"), v = () => n ? /* @__PURE__ */ d(f, { direction: "row", gap: "sm", align: "center", children: [
2036
+ const p = ee("lg"), v = () => n ? /* @__PURE__ */ d(f, { direction: "row", gap: "sm", align: "center", children: [
2034
2037
  /* @__PURE__ */ e(C, { fontWeight: "medium", children: r }),
2035
2038
  /* @__PURE__ */ e(Ee, { border: !0, text: n, variant: m })
2036
2039
  ] }) : /* @__PURE__ */ e(C, { fontWeight: "medium", children: r }), A = () => i || /* @__PURE__ */ d(
@@ -2045,7 +2048,7 @@ const fn = te(
2045
2048
  /* @__PURE__ */ e(
2046
2049
  f,
2047
2050
  {
2048
- style: x ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
2051
+ style: p ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
2049
2052
  ...s,
2050
2053
  children: l ?? null
2051
2054
  }
@@ -2068,17 +2071,17 @@ const fn = te(
2068
2071
  ...(a == null ? void 0 : a.style) ?? {}
2069
2072
  },
2070
2073
  children: [
2071
- i !== null && D ? /* @__PURE__ */ e(Nt, { ...u, children: A() }) : null,
2072
- /* @__PURE__ */ e(vr, { ...h, children: t }),
2073
- o ? /* @__PURE__ */ e(jt, { ...g, children: o }) : null
2074
+ i !== null && D ? /* @__PURE__ */ e($t, { ...u, children: A() }) : null,
2075
+ /* @__PURE__ */ e(Sr, { ...h, children: t }),
2076
+ o ? /* @__PURE__ */ e(_t, { ...g, children: o }) : null
2074
2077
  ]
2075
2078
  }
2076
2079
  );
2077
2080
  }
2078
- ), br = "var(--sa-color-secondary-50, #e6e9fb)", wr = ({ children: t, onClick: r }) => {
2079
- const [n, l] = B("");
2081
+ ), Fr = "var(--sa-color-secondary-50, #e6e9fb)", Er = ({ children: t, onClick: r }) => {
2082
+ const [n, l] = M("");
2080
2083
  return /* @__PURE__ */ e(
2081
- Ot,
2084
+ ut,
2082
2085
  {
2083
2086
  fullWidth: !0,
2084
2087
  height: "height-8",
@@ -2090,14 +2093,14 @@ const fn = te(
2090
2093
  gap: "spacing-1",
2091
2094
  cursor: "pointer",
2092
2095
  onClick: r,
2093
- onMouseEnter: () => l(br),
2096
+ onMouseEnter: () => l(Fr),
2094
2097
  borderRadius: "rounded-md",
2095
2098
  onMouseLeave: () => l(""),
2096
2099
  style: { backgroundColor: n },
2097
2100
  children: t
2098
2101
  }
2099
2102
  );
2100
- }, kr = te(wr), Sr = ({
2103
+ }, Mr = te(Er), Lr = ({
2101
2104
  icon: t,
2102
2105
  items: r = [],
2103
2106
  style: n,
@@ -2116,10 +2119,10 @@ const fn = te(
2116
2119
  }),
2117
2120
  [i]
2118
2121
  );
2119
- return /* @__PURE__ */ d(kt, { position: o, style: n, children: [
2120
- /* @__PURE__ */ e($e, { style: l, children: /* @__PURE__ */ e(R, { size: "sm", secondary: !0, ...s, children: /* @__PURE__ */ e(k, { name: t, ...a }) }) }),
2121
- /* @__PURE__ */ e(St, { style: u, children: r.map((g, m) => h === "outline-button" ? /* @__PURE__ */ e(Ft, { children: /* @__PURE__ */ d(
2122
- R,
2122
+ return /* @__PURE__ */ d(Lt, { position: o, style: n, children: [
2123
+ /* @__PURE__ */ e($e, { style: l, children: /* @__PURE__ */ e(H, { size: "sm", secondary: !0, ...s, children: /* @__PURE__ */ e(k, { name: t, ...a }) }) }),
2124
+ /* @__PURE__ */ e(Wt, { style: u, children: r.map((g, m) => h === "outline-button" ? /* @__PURE__ */ e(Bt, { children: /* @__PURE__ */ d(
2125
+ H,
2123
2126
  {
2124
2127
  size: "sm",
2125
2128
  secondary: !0,
@@ -2132,7 +2135,7 @@ const fn = te(
2132
2135
  ]
2133
2136
  }
2134
2137
  ) }, g.id || m) : /* @__PURE__ */ d(
2135
- kr,
2138
+ Mr,
2136
2139
  {
2137
2140
  onClick: g.onClick,
2138
2141
  ...g.buttonProps,
@@ -2144,21 +2147,21 @@ const fn = te(
2144
2147
  g.id || m
2145
2148
  )) })
2146
2149
  ] });
2147
- }, pn = te(Sr), Fr = (t) => /* @__PURE__ */ e(C, { variant: "h1", children: t.children, ...t.props }), Er = (t) => /* @__PURE__ */ e(C, { variant: "h2", children: t.children, ...t.props }), Mr = (t) => /* @__PURE__ */ e(C, { variant: "h3", children: t.children, ...t.props }), Lr = (t) => /* @__PURE__ */ e(C, { variant: "h4", children: t.children, ...t.props }), Wr = (t) => /* @__PURE__ */ e(C, { variant: "h5", children: t.children, ...t.props }), Br = (t) => /* @__PURE__ */ e(C, { variant: "h6", children: t.children, ...t.props }), Ar = (t) => /* @__PURE__ */ e(C, { variant: "sub-h1", children: t.children, ...t.props }), Rr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h2", children: t.children, ...t.props }), Hr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h3", children: t.children, ...t.props }), Vr = (t) => /* @__PURE__ */ e(C, { variant: "body-1", children: t.children, ...t.props }), zr = (t) => /* @__PURE__ */ e(C, { variant: "body-2", children: t.children, ...t.props }), Ir = (t) => /* @__PURE__ */ e(C, { variant: "body-3", children: t.children, ...t.props }), me = {
2148
- H1: Fr,
2149
- H2: Er,
2150
- H3: Mr,
2151
- H4: Lr,
2152
- H5: Wr,
2153
- H6: Br,
2154
- SubH1: Ar,
2155
- SubH2: Rr,
2156
- SubH3: Hr,
2157
- Body1: Vr,
2158
- Body2: zr,
2159
- Body3: Ir
2160
- }, st = () => {
2161
- const [t, r] = Je(), n = Ge(t.toString()), l = Rt(), i = ze(), o = l.id;
2150
+ }, wn = te(Lr), Wr = (t) => /* @__PURE__ */ e(C, { variant: "h1", children: t.children, ...t.props }), Br = (t) => /* @__PURE__ */ e(C, { variant: "h2", children: t.children, ...t.props }), Ar = (t) => /* @__PURE__ */ e(C, { variant: "h3", children: t.children, ...t.props }), Hr = (t) => /* @__PURE__ */ e(C, { variant: "h4", children: t.children, ...t.props }), Rr = (t) => /* @__PURE__ */ e(C, { variant: "h5", children: t.children, ...t.props }), Ir = (t) => /* @__PURE__ */ e(C, { variant: "h6", children: t.children, ...t.props }), Vr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h1", children: t.children, ...t.props }), zr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h2", children: t.children, ...t.props }), Tr = (t) => /* @__PURE__ */ e(C, { variant: "sub-h3", children: t.children, ...t.props }), Or = (t) => /* @__PURE__ */ e(C, { variant: "body-1", children: t.children, ...t.props }), Nr = (t) => /* @__PURE__ */ e(C, { variant: "body-2", children: t.children, ...t.props }), Zr = (t) => /* @__PURE__ */ e(C, { variant: "body-3", children: t.children, ...t.props }), me = {
2151
+ H1: Wr,
2152
+ H2: Br,
2153
+ H3: Ar,
2154
+ H4: Hr,
2155
+ H5: Rr,
2156
+ H6: Ir,
2157
+ SubH1: Vr,
2158
+ SubH2: zr,
2159
+ SubH3: Tr,
2160
+ Body1: Or,
2161
+ Body2: Nr,
2162
+ Body3: Zr
2163
+ }, ft = () => {
2164
+ const [t, r] = Qe(), n = Ge(t.toString()), l = zt(), i = Ve(), o = l.id;
2162
2165
  return {
2163
2166
  // query params
2164
2167
  setSearchParams: r,
@@ -2175,7 +2178,7 @@ const fn = te(
2175
2178
  id: o,
2176
2179
  hasId: !!o
2177
2180
  };
2178
- }, Tr = (t) => JSON.stringify(t), Or = (t) => JSON.stringify(t), Nr = (t) => JSON.stringify(t), jr = (t) => JSON.stringify(t), Zr = (t) => t, $r = (t) => JSON.stringify(t), vt = ({
2181
+ }, jr = (t) => JSON.stringify(t), $r = (t) => JSON.stringify(t), _r = (t) => JSON.stringify(t), Ur = (t) => JSON.stringify(t), qr = (t) => t, Gr = (t) => JSON.stringify(t), Ft = ({
2179
2182
  value: t,
2180
2183
  name: r,
2181
2184
  type: n,
@@ -2190,23 +2193,23 @@ const fn = te(
2190
2193
  let u;
2191
2194
  switch (n) {
2192
2195
  case "search":
2193
- u = Zr(t);
2196
+ u = qr(t);
2194
2197
  break;
2195
2198
  case "dropdown":
2196
2199
  case "dropdown-multiple":
2197
- u = Tr(t);
2200
+ u = jr(t);
2198
2201
  break;
2199
2202
  case "radio":
2200
- u = Or(t);
2203
+ u = $r(t);
2201
2204
  break;
2202
2205
  case "date-range":
2203
- u = Nr(t);
2206
+ u = _r(t);
2204
2207
  break;
2205
2208
  case "advanced-date-range":
2206
- u = $r(t);
2209
+ u = Gr(t);
2207
2210
  break;
2208
2211
  case "date":
2209
- u = jr(t);
2212
+ u = Ur(t);
2210
2213
  break;
2211
2214
  default:
2212
2215
  u = t;
@@ -2216,10 +2219,10 @@ const fn = te(
2216
2219
  const m = {
2217
2220
  ...o[a] && typeof o[a] == "string" ? JSON.parse(o[a]) : void 0,
2218
2221
  [r]: u
2219
- }, x = { ...o };
2220
- s && typeof s == "string" && delete x[s], delete x[h];
2222
+ }, p = { ...o };
2223
+ s && typeof s == "string" && delete p[s], delete p[h];
2221
2224
  const v = {
2222
- ...x,
2225
+ ...p,
2223
2226
  [a]: JSON.stringify(m)
2224
2227
  }, A = new URLSearchParams(o).toString(), D = new URLSearchParams(
2225
2228
  v
@@ -2229,7 +2232,7 @@ const fn = te(
2229
2232
  i(v);
2230
2233
  }
2231
2234
  }
2232
- }, Ke = ({
2235
+ }, et = ({
2233
2236
  name: t,
2234
2237
  filterKey: r = "filter",
2235
2238
  searchParams: n,
@@ -2237,7 +2240,7 @@ const fn = te(
2237
2240
  }) => {
2238
2241
  const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
2239
2242
  return l === "label" && s ? JSON.parse(s)[0].label : l === "value" && s ? JSON.parse(s)[0].value : s;
2240
- }, Cn = ({
2243
+ }, kn = ({
2241
2244
  name: t,
2242
2245
  filterKey: r = "filter",
2243
2246
  searchParams: n,
@@ -2245,7 +2248,7 @@ const fn = te(
2245
2248
  }) => {
2246
2249
  const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
2247
2250
  return l === "label" && s ? JSON.parse(s).map((a) => a.label) : l === "value" && s ? JSON.parse(s).map((a) => a.value) : l === "array" && s ? JSON.parse(s) : s;
2248
- }, Dn = ({
2251
+ }, Sn = ({
2249
2252
  name: t,
2250
2253
  filterKey: r = "filter",
2251
2254
  searchParams: n,
@@ -2253,10 +2256,10 @@ const fn = te(
2253
2256
  }) => {
2254
2257
  const i = n.get(r) || void 0, o = i && typeof i == "string" ? JSON.parse(i) : void 0, s = o ? o[t] : void 0;
2255
2258
  return l === "id" && s ? JSON.parse(s).id : l === "label" && s ? JSON.parse(s).label : l === "value" && s ? JSON.parse(s).value : s;
2256
- }, _r = (t, r, n) => {
2259
+ }, Jr = (t, r, n) => {
2257
2260
  const l = r.get(n || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0;
2258
2261
  return i ? i[t] : void 0;
2259
- }, vn = ({
2262
+ }, Fn = ({
2260
2263
  name: t,
2261
2264
  filterKey: r = "filter",
2262
2265
  searchParams: n
@@ -2266,52 +2269,52 @@ const fn = te(
2266
2269
  start: o ? JSON.parse(o).from : void 0,
2267
2270
  end: o ? JSON.parse(o).to : void 0
2268
2271
  };
2269
- }, bn = ({
2272
+ }, En = ({
2270
2273
  name: t,
2271
2274
  filterKey: r = "filter",
2272
2275
  searchParams: n
2273
2276
  }) => {
2274
2277
  const l = n.get(r || "filter") || void 0, i = l && typeof l == "string" ? JSON.parse(l) : void 0, o = i ? i[t] : void 0;
2275
2278
  return o ? JSON.parse(o) : void 0;
2276
- }, wn = (t, {
2279
+ }, Mn = (t, {
2277
2280
  filterKey: r = "filter",
2278
2281
  perPageKey: n = "perPage",
2279
2282
  pageKey: l = "page"
2280
2283
  }) => {
2281
2284
  const i = t.get(r) || void 0, o = t.get(n) || void 0, s = t.get(l) || void 0;
2282
2285
  return !!i || !!o || !!s;
2283
- }, Ur = ({
2286
+ }, Qr = ({
2284
2287
  isOpen: t,
2285
2288
  onClose: r,
2286
2289
  filterKey: n,
2287
2290
  pageKey: l,
2288
2291
  filters: i
2289
2292
  }) => {
2290
- const { searchParams: o, setSearchParams: s, searchQueries: a } = st(), [h, u] = B({}), g = () => {
2293
+ const { searchParams: o, setSearchParams: s, searchQueries: a } = ft(), [h, u] = M({}), g = () => {
2291
2294
  o.delete(n || "filter"), s(o);
2292
- }, m = (x, v) => {
2293
- switch (x.type) {
2295
+ }, m = (p, v) => {
2296
+ switch (p.type) {
2294
2297
  case "radio": {
2295
- const { show: A = !0 } = x;
2296
- return A && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: x.title }) }, v);
2298
+ const { show: A = !0 } = p;
2299
+ return A && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: p.title }) }, v);
2297
2300
  }
2298
2301
  case "dropdown": {
2299
- const { show: A = !0 } = x;
2300
- return A && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: x.title }) }, v);
2302
+ const { show: A = !0 } = p;
2303
+ return A && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: p.title }) }, v);
2301
2304
  }
2302
2305
  case "date-range":
2303
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: x.title }) }, v);
2306
+ return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: p.title }) }, v);
2304
2307
  case "date":
2305
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: x.title }) }, v);
2308
+ return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: p.title }) }, v);
2306
2309
  case "dropdown-multiple": {
2307
- const { show: A = !0 } = x;
2308
- return A && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: x.title }) }, v);
2310
+ const { show: A = !0 } = p;
2311
+ return A && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(f, { children: p.title }) }, v);
2309
2312
  }
2310
2313
  default:
2311
2314
  return null;
2312
2315
  }
2313
2316
  };
2314
- return /* @__PURE__ */ e(Dr, { onHide: r, show: t || !1, children: /* @__PURE__ */ d(f, { direction: "column", gap: "md", children: [
2317
+ return /* @__PURE__ */ e(kr, { onHide: r, show: t || !1, children: /* @__PURE__ */ d(f, { direction: "column", gap: "md", children: [
2315
2318
  /* @__PURE__ */ d($, { direction: "row", justify: "space-between", align: "center", children: [
2316
2319
  /* @__PURE__ */ e(f, { children: "Filter" }),
2317
2320
  /* @__PURE__ */ e(
@@ -2323,9 +2326,9 @@ const fn = te(
2323
2326
  }
2324
2327
  )
2325
2328
  ] }),
2326
- i == null ? void 0 : i.map((x, v) => m(x, v))
2329
+ i == null ? void 0 : i.map((p, v) => m(p, v))
2327
2330
  ] }) });
2328
- }, qr = ({
2331
+ }, Pr = ({
2329
2332
  searchKey: t = "q",
2330
2333
  statusKey: r = "status",
2331
2334
  searchPlaceholder: n = "Search",
@@ -2338,30 +2341,30 @@ const fn = te(
2338
2341
  customWidthSearch: u,
2339
2342
  handleOnReset: g,
2340
2343
  filterConfigs: m,
2341
- buttonToggleProps: x,
2344
+ buttonToggleProps: p,
2342
2345
  position: v = "right",
2343
2346
  titleSearchLabel: A = "Work Order",
2344
2347
  withTitleLabels: D = !1
2345
2348
  }) => {
2346
- const j = (x == null ? void 0 : x.isShowLabel) ?? !0, [Z, Q] = B(!1), [M, fe] = B(0), P = () => {
2347
- fe((I) => I + 1);
2348
- }, { searchParams: V, setSearchParams: K, getQueryParam: oe } = st(), ce = Ge(V.toString()), _ = _r(t, V, a) || "", [ae, se] = B(_), re = oe(a), G = !!(re && !(() => {
2349
+ const Z = (p == null ? void 0 : p.isShowLabel) ?? !0, [j, Q] = M(!1), [L, fe] = M(0), P = () => {
2350
+ fe((z) => z + 1);
2351
+ }, { searchParams: I, setSearchParams: K, getQueryParam: oe } = ft(), ce = Ge(I.toString()), U = Jr(t, I, a) || "", [ae, se] = M(U), re = oe(a), J = !!(re && !(() => {
2349
2352
  if (re)
2350
2353
  try {
2351
- const I = JSON.parse(re);
2352
- return Object.keys(I).length === 1 && I[t] === "";
2353
- } catch (I) {
2354
- console.error("Filter parameter is not a valid JSON:", I);
2354
+ const z = JSON.parse(re);
2355
+ return Object.keys(z).length === 1 && z[t] === "";
2356
+ } catch (z) {
2357
+ console.error("Filter parameter is not a valid JSON:", z);
2355
2358
  }
2356
2359
  return !1;
2357
- })()), z = ee("md");
2358
- return U(() => {
2359
- se(_);
2360
- }, [_]), U(() => {
2361
- if (ae === _)
2360
+ })()), V = ee("md");
2361
+ return _(() => {
2362
+ se(U);
2363
+ }, [U]), _(() => {
2364
+ if (ae === U)
2362
2365
  return;
2363
- const I = window.setTimeout(() => {
2364
- vt({
2366
+ const z = window.setTimeout(() => {
2367
+ Ft({
2365
2368
  value: ae,
2366
2369
  name: t,
2367
2370
  type: "search",
@@ -2372,11 +2375,11 @@ const fn = te(
2372
2375
  });
2373
2376
  }, 350);
2374
2377
  return () => {
2375
- window.clearTimeout(I);
2378
+ window.clearTimeout(z);
2376
2379
  };
2377
2380
  }, [
2378
2381
  ae,
2379
- _,
2382
+ U,
2380
2383
  t,
2381
2384
  ce,
2382
2385
  K,
@@ -2387,55 +2390,55 @@ const fn = te(
2387
2390
  {
2388
2391
  gap: "md",
2389
2392
  style: {
2390
- flexDirection: z && v === "left" ? "row" : z && v === "right" ? "row-reverse" : "column"
2393
+ flexDirection: V && v === "left" ? "row" : V && v === "right" ? "row-reverse" : "column"
2391
2394
  },
2392
2395
  align: "flex-end",
2393
2396
  children: [
2394
- G && /* @__PURE__ */ e(f, { justify: "flex-end", children: /* @__PURE__ */ e(
2395
- R,
2397
+ J && /* @__PURE__ */ e(f, { justify: "flex-end", children: /* @__PURE__ */ e(
2398
+ H,
2396
2399
  {
2397
2400
  onClick: () => {
2398
- const I = new URLSearchParams(V);
2399
- I.delete(a), K(I), se(""), P(), g && g();
2401
+ const z = new URLSearchParams(I);
2402
+ z.delete(a), K(z), se(""), P(), g && g();
2400
2403
  },
2401
2404
  variant: "outline",
2402
2405
  tone: "neutral",
2403
2406
  children: /* @__PURE__ */ e(C, { color: "error", fontWeight: "semibold", children: "Reset" })
2404
2407
  }
2405
2408
  ) }),
2406
- i == null ? void 0 : i.map(({ minWidth: I, content: X, title: de, onClickContainer: he }, Me) => /* @__PURE__ */ d(
2409
+ i == null ? void 0 : i.map(({ minWidth: z, content: X, title: de, onClickContainer: he }, Le) => /* @__PURE__ */ d(
2407
2410
  f,
2408
2411
  {
2409
2412
  gap: "sm",
2410
2413
  onClick: he,
2411
2414
  style: {
2412
- minWidth: I
2415
+ minWidth: z
2413
2416
  },
2414
2417
  children: [
2415
2418
  de && /* @__PURE__ */ e(me.SubH3, { children: de }),
2416
2419
  X
2417
2420
  ]
2418
2421
  },
2419
- `extended-filter-${Me}-${M}`
2422
+ `extended-filter-${Le}-${L}`
2420
2423
  )),
2421
2424
  !!(m != null && m.length) && /* @__PURE__ */ e(
2422
- R,
2425
+ H,
2423
2426
  {
2424
- primary: G,
2425
- secondary: !G,
2427
+ primary: J,
2428
+ secondary: !J,
2426
2429
  iconLeft: /* @__PURE__ */ e(
2427
2430
  k,
2428
2431
  {
2429
2432
  size: "sm",
2430
- name: (x == null ? void 0 : x.icon) || "FilterHorizontal",
2433
+ name: (p == null ? void 0 : p.icon) || "FilterHorizontal",
2431
2434
  style: {
2432
2435
  color: re ? "var(--sa-background-brand, #04254f)" : "var(--sa-text-primary, #292a2e)"
2433
2436
  }
2434
2437
  }
2435
2438
  ),
2436
- fullWidth: !z,
2439
+ fullWidth: !V,
2437
2440
  onClick: () => Q(!0),
2438
- children: j ? "Filter" : void 0
2441
+ children: Z ? "Filter" : void 0
2439
2442
  }
2440
2443
  ),
2441
2444
  s && /* @__PURE__ */ d(
@@ -2448,7 +2451,7 @@ const fn = te(
2448
2451
  children: [
2449
2452
  D && /* @__PURE__ */ e(me.SubH3, { children: "Status" }),
2450
2453
  /* @__PURE__ */ e(
2451
- ot,
2454
+ ct,
2452
2455
  {
2453
2456
  dropdownLists: [
2454
2457
  {
@@ -2460,29 +2463,29 @@ const fn = te(
2460
2463
  value: "inactive"
2461
2464
  }
2462
2465
  ],
2463
- defaultValue: Ke({
2466
+ defaultValue: et({
2464
2467
  get: "value",
2465
2468
  name: r,
2466
- searchParams: V,
2469
+ searchParams: I,
2467
2470
  filterKey: a
2468
2471
  }) ? [
2469
2472
  {
2470
- label: Ke({
2473
+ label: et({
2471
2474
  get: "value",
2472
2475
  name: r,
2473
- searchParams: V,
2476
+ searchParams: I,
2474
2477
  filterKey: a
2475
2478
  }) === "active" ? "Active" : "InActive",
2476
- value: Ke({
2479
+ value: et({
2477
2480
  get: "value",
2478
2481
  name: r,
2479
- searchParams: V,
2482
+ searchParams: I,
2480
2483
  filterKey: a
2481
2484
  })
2482
2485
  }
2483
2486
  ] : [],
2484
- onChange: (I) => vt({
2485
- value: I,
2487
+ onChange: (z) => Ft({
2488
+ value: z,
2486
2489
  name: r,
2487
2490
  type: "dropdown",
2488
2491
  searchQueries: ce,
@@ -2491,7 +2494,7 @@ const fn = te(
2491
2494
  }),
2492
2495
  placeholder: D ? "All" : "All Status"
2493
2496
  },
2494
- M
2497
+ L
2495
2498
  )
2496
2499
  ]
2497
2500
  }
@@ -2501,7 +2504,7 @@ const fn = te(
2501
2504
  {
2502
2505
  gap: "sm",
2503
2506
  style: {
2504
- width: u && z ? u : z ? "310px" : ""
2507
+ width: u && V ? u : V ? "310px" : ""
2505
2508
  },
2506
2509
  children: [
2507
2510
  D && /* @__PURE__ */ d(me.SubH3, { children: [
@@ -2509,23 +2512,23 @@ const fn = te(
2509
2512
  A
2510
2513
  ] }),
2511
2514
  /* @__PURE__ */ e(
2512
- ct,
2515
+ at,
2513
2516
  {
2514
2517
  placeholder: n,
2515
2518
  leftIcon: /* @__PURE__ */ e(k, { name: "Search", width: 20, height: 20 }),
2516
- onChange: (I) => se(I.target.value),
2519
+ onChange: (z) => se(z.target.value),
2517
2520
  value: ae,
2518
2521
  fullWidth: !0
2519
2522
  },
2520
- M + 1 + a
2523
+ L + 1 + a
2521
2524
  )
2522
2525
  ]
2523
2526
  }
2524
2527
  ),
2525
2528
  /* @__PURE__ */ e(
2526
- Ur,
2529
+ Qr,
2527
2530
  {
2528
- isOpen: Z,
2531
+ isOpen: j,
2529
2532
  onClose: () => Q(!1),
2530
2533
  filterKey: a,
2531
2534
  filters: m,
@@ -2535,9 +2538,9 @@ const fn = te(
2535
2538
  ]
2536
2539
  }
2537
2540
  );
2538
- }, Gr = ({ children: t, borderRadius: r, height: n }) => {
2539
- const l = le(null), [i, o] = B("100vh");
2540
- return U(() => {
2541
+ }, Yr = ({ children: t, borderRadius: r, height: n }) => {
2542
+ const l = le(null), [i, o] = M("100vh");
2543
+ return _(() => {
2541
2544
  if (n) return;
2542
2545
  const s = () => {
2543
2546
  if (l.current) {
@@ -2563,7 +2566,7 @@ const fn = te(
2563
2566
  children: t
2564
2567
  }
2565
2568
  );
2566
- }, Jr = ({
2569
+ }, Xr = ({
2567
2570
  action: t,
2568
2571
  rightContent: r,
2569
2572
  leftContent: n,
@@ -2571,7 +2574,7 @@ const fn = te(
2571
2574
  advanceFilter: i,
2572
2575
  showFilter: o = !0
2573
2576
  }) => {
2574
- const s = ee("md"), a = o ? /* @__PURE__ */ e(qr, { ...i }) : null;
2577
+ const s = ee("md"), a = o ? /* @__PURE__ */ e(Pr, { ...i }) : null;
2575
2578
  return /* @__PURE__ */ e(
2576
2579
  f,
2577
2580
  {
@@ -2591,14 +2594,14 @@ const fn = te(
2591
2594
  flexDirection: s ? "row" : "column-reverse",
2592
2595
  gap: "16px"
2593
2596
  },
2594
- children: l ? l({ filter: a }) : /* @__PURE__ */ d(J, { children: [
2597
+ children: l ? l({ filter: a }) : /* @__PURE__ */ d(G, { children: [
2595
2598
  /* @__PURE__ */ d(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0 }, children: [
2596
2599
  a,
2597
2600
  n
2598
2601
  ] }),
2599
2602
  /* @__PURE__ */ d(f, { style: { display: "flex", gap: "8px", flexDirection: "row", alignItems: "center", flexShrink: 0 }, children: [
2600
2603
  r,
2601
- t ? it(t) ? t : /* @__PURE__ */ e(
2604
+ t ? nt(t) ? t : /* @__PURE__ */ e(
2602
2605
  f,
2603
2606
  {
2604
2607
  style: {
@@ -2609,12 +2612,12 @@ const fn = te(
2609
2612
  textWrap: "nowrap"
2610
2613
  },
2611
2614
  children: t.map(
2612
- ({ title: u, icon: g, buttonProps: m, onClick: x }, v) => !u && !g ? null : /* @__PURE__ */ e(
2613
- R,
2615
+ ({ title: u, icon: g, buttonProps: m, onClick: p }, v) => !u && !g ? null : /* @__PURE__ */ e(
2616
+ H,
2614
2617
  {
2615
2618
  fullWidth: !s,
2616
2619
  iconLeft: g ? /* @__PURE__ */ e(k, { name: g }) : void 0,
2617
- onClick: x,
2620
+ onClick: p,
2618
2621
  ...m,
2619
2622
  children: u
2620
2623
  },
@@ -2627,7 +2630,7 @@ const fn = te(
2627
2630
  ] })
2628
2631
  }
2629
2632
  );
2630
- }, Qr = ({
2633
+ }, Kr = ({
2631
2634
  totalData: t,
2632
2635
  withMarginBottom: r = !0,
2633
2636
  withMarginTop: n = !0
@@ -2658,7 +2661,7 @@ const fn = te(
2658
2661
  /* @__PURE__ */ e(me.Body1, { children: t || 0 })
2659
2662
  ]
2660
2663
  }
2661
- ), Pr = ({
2664
+ ), ei = ({
2662
2665
  pagination: t,
2663
2666
  pageKey: r = "page",
2664
2667
  perPageKey: n = "perPage",
@@ -2666,7 +2669,7 @@ const fn = te(
2666
2669
  showPagination: i = !0,
2667
2670
  totalData: o
2668
2671
  }) => {
2669
- const { searchQueries: s, setSearchParams: a, searchParams: h } = st(), u = h.get(n), g = (A) => {
2672
+ const { searchQueries: s, setSearchParams: a, searchParams: h } = ft(), u = h.get(n), g = (A) => {
2670
2673
  a({ ...s, [r]: String(A) });
2671
2674
  }, m = (A) => {
2672
2675
  a({
@@ -2674,7 +2677,7 @@ const fn = te(
2674
2677
  [n]: A,
2675
2678
  [r]: "1"
2676
2679
  });
2677
- }, x = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1), v = (t == null ? void 0 : t.rangeEnd) ?? ((t == null ? void 0 : t.totalCurrentPage) !== (t == null ? void 0 : t.perPage) ? t == null ? void 0 : t.totalData : ((t == null ? void 0 : t.currentPage) || 1) * ((t == null ? void 0 : t.totalCurrentPage) || 0));
2680
+ }, p = (t == null ? void 0 : t.rangeStart) ?? (((t == null ? void 0 : t.currentPage) || 0) > 1 ? (((t == null ? void 0 : t.currentPage) || 0) - 1) * ((t == null ? void 0 : t.perPage) || 0) + 1 : 1), v = (t == null ? void 0 : t.rangeEnd) ?? ((t == null ? void 0 : t.totalCurrentPage) !== (t == null ? void 0 : t.perPage) ? t == null ? void 0 : t.totalData : ((t == null ? void 0 : t.currentPage) || 1) * ((t == null ? void 0 : t.totalCurrentPage) || 0));
2678
2681
  return /* @__PURE__ */ e(
2679
2682
  f,
2680
2683
  {
@@ -2691,11 +2694,11 @@ const fn = te(
2691
2694
  borderTop: "1px solid var(--sa-border-subtle, #0b120e24)",
2692
2695
  flexShrink: 0
2693
2696
  },
2694
- children: i ? /* @__PURE__ */ d(J, { children: [
2697
+ children: i ? /* @__PURE__ */ d(G, { children: [
2695
2698
  /* @__PURE__ */ d(f, { style: { display: "flex", flexDirection: "row", gap: "8px", alignItems: "center", textWrap: "nowrap" }, children: [
2696
2699
  /* @__PURE__ */ e(C, { children: "Rows Per Page: " }),
2697
2700
  /* @__PURE__ */ e(
2698
- ot,
2701
+ ct,
2699
2702
  {
2700
2703
  dropdownLists: [
2701
2704
  { label: "5", value: "5" },
@@ -2711,10 +2714,10 @@ const fn = te(
2711
2714
  defaultValue: u ? [{ label: `${u} per row`, value: u }] : [{ label: `${l} per row`, value: `${l}` }]
2712
2715
  }
2713
2716
  ),
2714
- /* @__PURE__ */ e(C, { children: `${x}-${v} of ${(t == null ? void 0 : t.totalData) || 0}` })
2717
+ /* @__PURE__ */ e(C, { children: `${p}-${v} of ${(t == null ? void 0 : t.totalData) || 0}` })
2715
2718
  ] }),
2716
2719
  /* @__PURE__ */ e(
2717
- qt,
2720
+ Qt,
2718
2721
  {
2719
2722
  currentPage: t != null && t.currentPage ? Number(t == null ? void 0 : t.currentPage) : 1,
2720
2723
  totalCount: t != null && t.totalPage ? Number(t == null ? void 0 : t.totalPage) : 1,
@@ -2722,7 +2725,7 @@ const fn = te(
2722
2725
  }
2723
2726
  )
2724
2727
  ] }) : /* @__PURE__ */ e(
2725
- Qr,
2728
+ Kr,
2726
2729
  {
2727
2730
  totalData: o,
2728
2731
  withMarginBottom: !1,
@@ -2731,30 +2734,30 @@ const fn = te(
2731
2734
  )
2732
2735
  }
2733
2736
  );
2734
- }, Yr = ({ filter: t, columnTitle: r }) => {
2735
- const [n, l] = B(!1), i = le(null), o = le(null), s = le(null), [a, h] = B(""), [u, g] = B({ top: 0, left: 0 }), m = t.selectedValues, x = De(() => a ? t.options.filter(
2737
+ }, ti = ({ filter: t, columnTitle: r }) => {
2738
+ const [n, l] = M(!1), i = le(null), o = le(null), s = le(null), [a, h] = M(""), [u, g] = M({ top: 0, left: 0 }), m = t.selectedValues, p = De(() => a ? t.options.filter(
2736
2739
  (D) => D.label.toLowerCase().includes(a.toLowerCase())
2737
2740
  ) : t.options, [t.options, a]);
2738
- U(() => {
2741
+ _(() => {
2739
2742
  if (n && o.current) {
2740
- const D = o.current.getBoundingClientRect(), T = 280, j = {
2743
+ const D = o.current.getBoundingClientRect(), T = 280, Z = {
2741
2744
  top: D.bottom + 8
2742
2745
  };
2743
- t.position === "left" || D.left + T > window.innerWidth ? j.right = window.innerWidth - D.right : j.left = D.left, g(j);
2746
+ t.position === "left" || D.left + T > window.innerWidth ? Z.right = window.innerWidth - D.right : Z.left = D.left, g(Z);
2744
2747
  }
2745
- }, [n, t.position]), U(() => {
2748
+ }, [n, t.position]), _(() => {
2746
2749
  n && s.current ? setTimeout(() => {
2747
2750
  var D;
2748
2751
  return (D = s.current) == null ? void 0 : D.focus();
2749
2752
  }, 50) : h("");
2750
- }, [n]), U(() => {
2753
+ }, [n]), _(() => {
2751
2754
  const D = (T) => {
2752
2755
  i.current && !i.current.contains(T.target) && o.current && !o.current.contains(T.target) && l(!1);
2753
2756
  };
2754
2757
  return n && document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
2755
2758
  }, [n]);
2756
2759
  const v = (D) => {
2757
- const T = m.includes(D) ? m.filter((j) => j !== D) : [...m, D];
2760
+ const T = m.includes(D) ? m.filter((Z) => Z !== D) : [...m, D];
2758
2761
  t.onFilterChange(T);
2759
2762
  }, A = () => t.onFilterChange([]);
2760
2763
  return /* @__PURE__ */ d(f, { style: { position: "relative" }, children: [
@@ -2770,7 +2773,7 @@ const fn = te(
2770
2773
  },
2771
2774
  onClick: (D) => {
2772
2775
  var T;
2773
- D.stopPropagation(), n || (T = t.onOpen) == null || T.call(t), l((j) => !j);
2776
+ D.stopPropagation(), n || (T = t.onOpen) == null || T.call(t), l((Z) => !Z);
2774
2777
  },
2775
2778
  children: /* @__PURE__ */ e(
2776
2779
  k,
@@ -2847,7 +2850,7 @@ const fn = te(
2847
2850
  paddingBottom: "8px"
2848
2851
  },
2849
2852
  children: /* @__PURE__ */ e(
2850
- ct,
2853
+ at,
2851
2854
  {
2852
2855
  ref: s,
2853
2856
  placeholder: `Search ${r.toLowerCase()}...`,
@@ -2903,7 +2906,7 @@ const fn = te(
2903
2906
  )
2904
2907
  ]
2905
2908
  }
2906
- ) : x.length > 0 ? /* @__PURE__ */ e(f, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: x.map((D) => /* @__PURE__ */ d(
2909
+ ) : p.length > 0 ? /* @__PURE__ */ e(f, { style: { gap: "2px", paddingTop: "4px", paddingBottom: "4px" }, children: p.map((D) => /* @__PURE__ */ d(
2907
2910
  f,
2908
2911
  {
2909
2912
  style: {
@@ -2931,7 +2934,7 @@ const fn = te(
2931
2934
  },
2932
2935
  children: [
2933
2936
  /* @__PURE__ */ e(
2934
- tt,
2937
+ rt,
2935
2938
  {
2936
2939
  checked: m.includes(D.value),
2937
2940
  onChange: () => {
@@ -3023,7 +3026,7 @@ const fn = te(
3023
3026
  }
3024
3027
  )
3025
3028
  ] });
3026
- }, Xr = ({
3029
+ }, ri = ({
3027
3030
  direction: t
3028
3031
  }) => {
3029
3032
  const r = "var(--sa-text-primary, #292a2e)", n = "var(--sa-text-subtle, #8c8f97)";
@@ -3063,7 +3066,7 @@ const fn = te(
3063
3066
  ]
3064
3067
  }
3065
3068
  );
3066
- }, Kr = ({ frozen: t }) => /* @__PURE__ */ d(
3069
+ }, ii = ({ frozen: t }) => /* @__PURE__ */ d(
3067
3070
  "svg",
3068
3071
  {
3069
3072
  width: "11",
@@ -3079,7 +3082,7 @@ const fn = te(
3079
3082
  /* @__PURE__ */ e("path", { d: t ? "M7 11V7a5 5 0 0 1 10 0v4" : "M7 11V7a5 5 0 0 1 9.9-1" })
3080
3083
  ]
3081
3084
  }
3082
- ), et = "var(--sa-background-primary, #ffffff)", bt = "var(--sa-background-primary-inverse, #f8f8f8)", ei = ({
3085
+ ), tt = "var(--sa-background-primary, #ffffff)", Et = "var(--sa-background-primary-inverse, #f8f8f8)", ni = ({
3083
3086
  columns: t,
3084
3087
  records: r,
3085
3088
  handleDetail: n,
@@ -3092,112 +3095,112 @@ const fn = te(
3092
3095
  showHeadBorder: u = !1,
3093
3096
  scrollParentRef: g,
3094
3097
  frozenCount: m = 0,
3095
- onFrozenCountChange: x,
3098
+ onFrozenCountChange: p,
3096
3099
  customActions: v,
3097
3100
  actionsOrder: A = ["detail", "update", "delete", "custom"],
3098
3101
  customEmptyState: D,
3099
3102
  enableColumnResize: T = !1,
3100
- defaultColumnWidths: j,
3101
- onColumnWidthsChange: Z,
3103
+ defaultColumnWidths: Z,
3104
+ onColumnWidthsChange: j,
3102
3105
  defaultMinColumnWidth: Q = 60,
3103
- sort: M,
3106
+ sort: L,
3104
3107
  defaultSort: fe,
3105
3108
  onSortChange: P,
3106
- showActionDivider: V = !1
3109
+ showActionDivider: I = !1
3107
3110
  }) => {
3108
- const K = M !== void 0, [oe, ce] = B(
3111
+ const K = L !== void 0, [oe, ce] = M(
3109
3112
  fe ?? null
3110
- ), _ = K ? M ?? null : oe, ae = (p) => {
3111
- if (p.sortKey) return p.sortKey;
3112
- if (typeof p.accessor == "string") return p.accessor;
3113
- }, se = (p) => {
3114
- const w = ae(p);
3113
+ ), U = K ? L ?? null : oe, ae = (x) => {
3114
+ if (x.sortKey) return x.sortKey;
3115
+ if (typeof x.accessor == "string") return x.accessor;
3116
+ }, se = (x) => {
3117
+ const w = ae(x);
3115
3118
  if (!w) return;
3116
3119
  let b;
3117
- !_ || _.key !== w ? b = { key: w, direction: "asc" } : _.direction === "asc" ? b = { key: w, direction: "desc" } : b = null, K || ce(b), P == null || P(b);
3118
- }, Y = [n, l, i].filter((p) => p !== void 0).length, G = !!v, z = !!n || !!l || !!i || G, I = "var(--sa-border-subtle, #0b120e24)", X = `1px solid ${I}`, de = `inset 1px 0 0 ${I}`, he = `inset -1px 0 0 ${I}`, Me = Y === 3 ? G ? "178px" : "140px" : Y === 2 ? G ? "140px" : "102px" : Y === 1 ? G ? "112px" : "74px" : G ? "74px" : "", Ie = (p, w) => {
3119
- if (!w) return p;
3120
- if (typeof w == "function") return w(p);
3121
- if (typeof w == "string") return p[w];
3122
- }, [Qe, Te] = B(!1);
3123
- U(() => {
3120
+ !U || U.key !== w ? b = { key: w, direction: "asc" } : U.direction === "asc" ? b = { key: w, direction: "desc" } : b = null, K || ce(b), P == null || P(b);
3121
+ }, Y = [n, l, i].filter((x) => x !== void 0).length, J = !!v, V = !!n || !!l || !!i || J, z = "var(--sa-border-subtle, #0b120e24)", X = `1px solid ${z}`, de = `inset 1px 0 0 ${z}`, he = `inset -1px 0 0 ${z}`, Le = Y === 3 ? J ? "178px" : "140px" : Y === 2 ? J ? "140px" : "102px" : Y === 1 ? J ? "112px" : "74px" : J ? "74px" : "", ze = (x, w) => {
3122
+ if (!w) return x;
3123
+ if (typeof w == "function") return w(x);
3124
+ if (typeof w == "string") return x[w];
3125
+ }, [Pe, Te] = M(!1);
3126
+ _(() => {
3124
3127
  if (!(g != null && g.current)) return;
3125
- const p = g.current;
3126
- Te(p.scrollHeight > p.clientHeight);
3128
+ const x = g.current;
3129
+ Te(x.scrollHeight > x.clientHeight);
3127
3130
  }, [r, g]);
3128
- const Le = le(null), [ie, Oe] = B([]), [We, Be] = B(
3129
- () => j ?? {}
3131
+ const We = le(null), [ie, Oe] = M([]), [Be, Ae] = M(
3132
+ () => Z ?? {}
3130
3133
  ), ke = le(null);
3131
- rt(() => {
3132
- if (!m || !Le.current) {
3134
+ it(() => {
3135
+ if (!m || !We.current) {
3133
3136
  Oe([]);
3134
3137
  return;
3135
3138
  }
3136
- const p = Array.from(
3137
- Le.current.querySelectorAll("thead tr th")
3139
+ const x = Array.from(
3140
+ We.current.querySelectorAll("thead tr th")
3138
3141
  ), w = [];
3139
3142
  let b = 0;
3140
- p.forEach((L, H) => {
3141
- w[H] = b, H < m && (b += L.offsetWidth);
3143
+ x.forEach((W, R) => {
3144
+ w[R] = b, R < m && (b += W.offsetWidth);
3142
3145
  }), Oe(w);
3143
- }, [m, t, r, We]);
3144
- const Ne = (p) => {
3145
- x && x(p < m ? p : p + 1);
3146
- }, y = (p, w) => {
3147
- const b = We[p];
3146
+ }, [m, t, r, Be]);
3147
+ const Ne = (x) => {
3148
+ p && p(x < m ? x : x + 1);
3149
+ }, y = (x, w) => {
3150
+ const b = Be[x];
3148
3151
  if (b !== void 0) {
3149
- const L = `${b}px`;
3150
- return { width: L, minWidth: L, maxWidth: L };
3152
+ const W = `${b}px`;
3153
+ return { width: W, minWidth: W, maxWidth: W };
3151
3154
  }
3152
3155
  return w ? { width: w } : {};
3153
- }, S = (p) => T && (p.resizable ?? !0), F = (p, w) => {
3154
- p.preventDefault(), p.stopPropagation();
3155
- const b = p.currentTarget.closest("th");
3156
+ }, S = (x) => T && (x.resizable ?? !0), F = (x, w) => {
3157
+ x.preventDefault(), x.stopPropagation();
3158
+ const b = x.currentTarget.closest("th");
3156
3159
  if (!b) return;
3157
- const L = Math.round(b.getBoundingClientRect().width);
3158
- ke.current = { colIndex: w, startX: p.clientX, startWidth: L };
3159
- const H = document.body.style.userSelect, ne = document.body.style.cursor;
3160
+ const W = Math.round(b.getBoundingClientRect().width);
3161
+ ke.current = { colIndex: w, startX: x.clientX, startWidth: W };
3162
+ const R = document.body.style.userSelect, ne = document.body.style.cursor;
3160
3163
  document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
3161
- const ye = (pe) => {
3164
+ const ye = (xe) => {
3162
3165
  var Se;
3163
- const xe = ke.current;
3164
- if (!xe) return;
3165
- const je = ((Se = t[xe.colIndex]) == null ? void 0 : Se.minWidth) ?? Q, Ae = Math.max(je, xe.startWidth + (pe.clientX - xe.startX));
3166
- Be(
3167
- (Pe) => Pe[xe.colIndex] === Ae ? Pe : { ...Pe, [xe.colIndex]: Ae }
3166
+ const pe = ke.current;
3167
+ if (!pe) return;
3168
+ const Ze = ((Se = t[pe.colIndex]) == null ? void 0 : Se.minWidth) ?? Q, He = Math.max(Ze, pe.startWidth + (xe.clientX - pe.startX));
3169
+ Ae(
3170
+ (Ye) => Ye[pe.colIndex] === He ? Ye : { ...Ye, [pe.colIndex]: He }
3168
3171
  );
3169
3172
  }, ve = () => {
3170
- document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", ve), document.body.style.userSelect = H, document.body.style.cursor = ne, ke.current = null, Z && Be((pe) => (Z(pe), pe));
3173
+ document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", ve), document.body.style.userSelect = R, document.body.style.cursor = ne, ke.current = null, j && Ae((xe) => (j(xe), xe));
3171
3174
  };
3172
3175
  document.addEventListener("mousemove", ye), document.addEventListener("mouseup", ve);
3173
3176
  };
3174
- return /* @__PURE__ */ e("div", { ref: Le, children: /* @__PURE__ */ d(Et, { fullWidth: !0, children: [
3177
+ return /* @__PURE__ */ e("div", { ref: We, children: /* @__PURE__ */ d(At, { fullWidth: !0, children: [
3175
3178
  /* @__PURE__ */ e(
3176
- Gt,
3179
+ Pt,
3177
3180
  {
3178
3181
  style: {
3179
3182
  height: "40px",
3180
3183
  whiteSpace: "nowrap"
3181
3184
  },
3182
- children: /* @__PURE__ */ d(He, { children: [
3183
- t.map((p, w) => {
3184
- var je, Ae;
3185
- const b = m > 0 && w < m, L = ie[w] ?? 0, H = S(p), ye = w === t.length - 1 && z && V, ve = ae(p), pe = !!p.sortable && !!ve, xe = pe && (_ == null ? void 0 : _.key) === ve ? _.direction : null;
3185
+ children: /* @__PURE__ */ d(Ie, { children: [
3186
+ t.map((x, w) => {
3187
+ var Ze, He;
3188
+ const b = m > 0 && w < m, W = ie[w] ?? 0, R = S(x), ye = w === t.length - 1 && V && I, ve = ae(x), xe = !!x.sortable && !!ve, pe = xe && (U == null ? void 0 : U.key) === ve ? U.direction : null;
3186
3189
  return /* @__PURE__ */ d(
3187
- ht,
3190
+ mt,
3188
3191
  {
3189
3192
  style: {
3190
3193
  position: "sticky",
3191
3194
  top: 0,
3192
- left: b ? L : void 0,
3195
+ left: b ? W : void 0,
3193
3196
  zIndex: b ? 4 : 2,
3194
3197
  paddingLeft: w === 0 ? "12px" : "",
3195
3198
  borderRight: u && !ye && !b ? X : void 0,
3196
3199
  borderBottom: u ? X : void 0,
3197
3200
  boxShadow: u && b ? he : void 0,
3198
3201
  backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
3199
- textAlign: p.textAlign === "text-right" ? "right" : p.textAlign === "text-center" ? "center" : "left",
3200
- ...y(w, p.width)
3202
+ textAlign: x.textAlign === "text-right" ? "right" : x.textAlign === "text-center" ? "center" : "left",
3203
+ ...y(w, x.width)
3201
3204
  },
3202
3205
  children: [
3203
3206
  /* @__PURE__ */ d(
@@ -3211,12 +3214,12 @@ const fn = te(
3211
3214
  minWidth: 0
3212
3215
  },
3213
3216
  children: [
3214
- pe ? /* @__PURE__ */ d(
3217
+ xe ? /* @__PURE__ */ d(
3215
3218
  "button",
3216
3219
  {
3217
3220
  type: "button",
3218
- onClick: () => se(p),
3219
- title: xe === "asc" ? "Sorted ascending — click to sort descending" : xe === "desc" ? "Sorted descending — click to clear" : "Click to sort ascending",
3221
+ onClick: () => se(x),
3222
+ title: pe === "asc" ? "Sorted ascending — click to sort descending" : pe === "desc" ? "Sorted descending — click to clear" : "Click to sort ascending",
3220
3223
  style: {
3221
3224
  flex: 1,
3222
3225
  minWidth: 0,
@@ -3230,7 +3233,7 @@ const fn = te(
3230
3233
  font: "inherit",
3231
3234
  color: "inherit",
3232
3235
  cursor: "pointer",
3233
- textAlign: p.textAlign === "text-right" ? "right" : p.textAlign === "text-center" ? "center" : "left"
3236
+ textAlign: x.textAlign === "text-right" ? "right" : x.textAlign === "text-center" ? "center" : "left"
3234
3237
  },
3235
3238
  children: [
3236
3239
  /* @__PURE__ */ e(
@@ -3243,10 +3246,10 @@ const fn = te(
3243
3246
  textOverflow: "ellipsis",
3244
3247
  whiteSpace: "nowrap"
3245
3248
  },
3246
- children: p.title || ((je = p.accessor) == null ? void 0 : je.toString())
3249
+ children: x.title || ((Ze = x.accessor) == null ? void 0 : Ze.toString())
3247
3250
  }
3248
3251
  ),
3249
- /* @__PURE__ */ e(Xr, { direction: xe })
3252
+ /* @__PURE__ */ e(ri, { direction: pe })
3250
3253
  ]
3251
3254
  }
3252
3255
  ) : /* @__PURE__ */ e(
@@ -3259,17 +3262,17 @@ const fn = te(
3259
3262
  textOverflow: "ellipsis",
3260
3263
  whiteSpace: "nowrap"
3261
3264
  },
3262
- children: p.title || ((Ae = p.accessor) == null ? void 0 : Ae.toString())
3265
+ children: x.title || ((He = x.accessor) == null ? void 0 : He.toString())
3263
3266
  }
3264
3267
  ),
3265
- p.filter && /* @__PURE__ */ e(
3266
- Yr,
3268
+ x.filter && /* @__PURE__ */ e(
3269
+ ti,
3267
3270
  {
3268
- filter: p.filter,
3269
- columnTitle: p.title
3271
+ filter: x.filter,
3272
+ columnTitle: x.title
3270
3273
  }
3271
3274
  ),
3272
- x && /* @__PURE__ */ e(
3275
+ p && /* @__PURE__ */ e(
3273
3276
  "button",
3274
3277
  {
3275
3278
  onClick: () => Ne(w),
@@ -3286,13 +3289,13 @@ const fn = te(
3286
3289
  opacity: b ? 1 : 0.45,
3287
3290
  transition: "opacity 0.15s"
3288
3291
  },
3289
- children: /* @__PURE__ */ e(Kr, { frozen: b })
3292
+ children: /* @__PURE__ */ e(ii, { frozen: b })
3290
3293
  }
3291
3294
  )
3292
3295
  ]
3293
3296
  }
3294
3297
  ),
3295
- H && /* @__PURE__ */ e(
3298
+ R && /* @__PURE__ */ e(
3296
3299
  "div",
3297
3300
  {
3298
3301
  onMouseDown: (Se) => F(Se, w),
@@ -3318,8 +3321,8 @@ const fn = te(
3318
3321
  `table-head-${w}`
3319
3322
  );
3320
3323
  }),
3321
- z ? /* @__PURE__ */ e(
3322
- ht,
3324
+ V ? /* @__PURE__ */ e(
3325
+ mt,
3323
3326
  {
3324
3327
  style: {
3325
3328
  backgroundColor: "var(--sa-background-primary-inverse, #f8f8f8)",
@@ -3328,42 +3331,42 @@ const fn = te(
3328
3331
  right: 0,
3329
3332
  zIndex: 3,
3330
3333
  borderBottom: u ? X : void 0,
3331
- boxShadow: u && V ? de : void 0
3334
+ boxShadow: u && I ? de : void 0
3332
3335
  }
3333
3336
  }
3334
3337
  ) : null
3335
3338
  ] })
3336
3339
  }
3337
3340
  ),
3338
- /* @__PURE__ */ e(Jt, { children: o ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: /* @__PURE__ */ d(f, { style: { gap: "16px" }, children: [
3341
+ /* @__PURE__ */ e(Yt, { children: o ? /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: /* @__PURE__ */ d(f, { style: { gap: "16px" }, children: [
3339
3342
  /* @__PURE__ */ e(Re, { variant: "list" }),
3340
3343
  /* @__PURE__ */ e(Re, { variant: "list" }),
3341
3344
  /* @__PURE__ */ e(Re, { variant: "list" }),
3342
3345
  /* @__PURE__ */ e(Re, { variant: "list" }),
3343
3346
  /* @__PURE__ */ e(Re, { variant: "list" })
3344
- ] }) }) }) : !(r != null && r.length) && D ? /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: D }) }) : r == null ? void 0 : r.map((p, w) => /* @__PURE__ */ d(
3345
- He,
3347
+ ] }) }) }) : !(r != null && r.length) && D ? /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(we, { colSpan: t.length + 1, children: D }) }) : r == null ? void 0 : r.map((x, w) => /* @__PURE__ */ d(
3348
+ Ie,
3346
3349
  {
3347
3350
  style: {
3348
3351
  transition: "background-color 0.3s ease",
3349
3352
  padding: 0,
3350
- borderBottom: w === r.length - 1 && Qe ? void 0 : "1px solid var(--sa-border-subtle, #0b120e24)"
3353
+ borderBottom: w === r.length - 1 && Pe ? void 0 : "1px solid var(--sa-border-subtle, #0b120e24)"
3351
3354
  },
3352
3355
  onMouseEnter: (b) => {
3353
- const L = b.currentTarget;
3354
- L.style.backgroundColor = bt, Array.from(L.querySelectorAll("td")).forEach((H) => {
3355
- H.style.position === "sticky" && (H.style.backgroundColor = bt);
3356
+ const W = b.currentTarget;
3357
+ W.style.backgroundColor = Et, Array.from(W.querySelectorAll("td")).forEach((R) => {
3358
+ R.style.position === "sticky" && (R.style.backgroundColor = Et);
3356
3359
  });
3357
3360
  },
3358
3361
  onMouseLeave: (b) => {
3359
- const L = b.currentTarget;
3360
- L.style.backgroundColor = "", Array.from(L.querySelectorAll("td")).forEach((H) => {
3361
- H.style.position === "sticky" && (H.style.backgroundColor = et);
3362
+ const W = b.currentTarget;
3363
+ W.style.backgroundColor = "", Array.from(W.querySelectorAll("td")).forEach((R) => {
3364
+ R.style.position === "sticky" && (R.style.backgroundColor = tt);
3362
3365
  });
3363
3366
  },
3364
3367
  children: [
3365
- t.map((b, L) => {
3366
- const H = b.render ? b.render(p, w, r) : Ie(p, b.accessor), ne = m > 0 && L < m, ye = ie[L] ?? 0, ve = We[L] !== void 0, pe = ne && L === m - 1;
3368
+ t.map((b, W) => {
3369
+ const R = b.render ? b.render(x, w, r) : ze(x, b.accessor), ne = m > 0 && W < m, ye = ie[W] ?? 0, ve = Be[W] !== void 0, xe = ne && W === m - 1;
3367
3370
  return /* @__PURE__ */ e(
3368
3371
  we,
3369
3372
  {
@@ -3371,18 +3374,18 @@ const fn = te(
3371
3374
  position: ne ? "sticky" : void 0,
3372
3375
  left: ne ? ye : void 0,
3373
3376
  zIndex: ne ? 1 : void 0,
3374
- backgroundColor: ne ? et : void 0,
3377
+ backgroundColor: ne ? tt : void 0,
3375
3378
  transition: ne ? "background-color 0.3s ease" : void 0,
3376
- paddingLeft: L === 0 ? "12px" : "",
3379
+ paddingLeft: W === 0 ? "12px" : "",
3377
3380
  whiteSpace: "nowrap",
3378
3381
  overflow: ve ? "hidden" : void 0,
3379
3382
  borderLeft: b.showBorderLeft ? X : void 0,
3380
3383
  borderRight: b.showBorderRight ? X : void 0,
3381
- boxShadow: pe ? he : void 0,
3384
+ boxShadow: xe ? he : void 0,
3382
3385
  textAlign: b.textAlign === "text-right" ? "right" : b.textAlign === "text-center" ? "center" : "left",
3383
- ...y(L, b.width)
3386
+ ...y(W, b.width)
3384
3387
  },
3385
- children: typeof H == "string" ? /* @__PURE__ */ e(
3388
+ children: typeof R == "string" ? /* @__PURE__ */ e(
3386
3389
  C,
3387
3390
  {
3388
3391
  style: {
@@ -3391,71 +3394,71 @@ const fn = te(
3391
3394
  textOverflow: "ellipsis",
3392
3395
  textAlign: b.textAlign === "text-right" ? "right" : b.textAlign === "text-center" ? "center" : "left"
3393
3396
  },
3394
- children: H
3397
+ children: R
3395
3398
  }
3396
- ) : H
3399
+ ) : R
3397
3400
  },
3398
- `row-${w}-col-${L}`
3401
+ `row-${w}-col-${W}`
3399
3402
  );
3400
3403
  }),
3401
- z ? /* @__PURE__ */ e(we, { style: {
3402
- width: Me,
3404
+ V ? /* @__PURE__ */ e(we, { style: {
3405
+ width: Le,
3403
3406
  position: "sticky",
3404
3407
  right: 0,
3405
3408
  zIndex: 1,
3406
- backgroundColor: et,
3407
- boxShadow: V ? de : void 0,
3409
+ backgroundColor: tt,
3410
+ boxShadow: I ? de : void 0,
3408
3411
  transition: "background-color 0.3s ease"
3409
3412
  }, children: /* @__PURE__ */ e($, { direction: "row", align: "center", justify: "center", gap: "sm", children: A.map((b) => {
3410
- const L = w === r.length - 1 ? "top" : "bottom";
3411
- return b === "detail" && n && (h == null ? void 0 : h(p)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Detail", position: L, children: /* @__PURE__ */ e(
3412
- R,
3413
+ const W = w === r.length - 1 ? "top" : "bottom";
3414
+ return b === "detail" && n && (h == null ? void 0 : h(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Detail", position: W, children: /* @__PURE__ */ e(
3415
+ H,
3413
3416
  {
3414
3417
  size: "xs",
3415
3418
  variant: "outline",
3416
3419
  tone: "neutral",
3417
- onClick: () => n(p.id, p),
3420
+ onClick: () => n(x.id, x),
3418
3421
  iconLeft: /* @__PURE__ */ e(k, { name: "DocumentClean", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
3419
3422
  }
3420
- ) }, "detail") : b === "update" && l && (a == null ? void 0 : a(p)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Update", position: L, children: /* @__PURE__ */ e(
3421
- R,
3423
+ ) }, "detail") : b === "update" && l && (a == null ? void 0 : a(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Update", position: W, children: /* @__PURE__ */ e(
3424
+ H,
3422
3425
  {
3423
3426
  size: "xs",
3424
3427
  variant: "outline",
3425
3428
  tone: "neutral",
3426
- onClick: () => l(p),
3429
+ onClick: () => l(x),
3427
3430
  iconLeft: /* @__PURE__ */ e(k, { name: "Edit1", size: "sm", style: { color: "var(--sa-text-subtle, #8c8f97)" } })
3428
3431
  }
3429
- ) }, "update") : b === "delete" && i && (s == null ? void 0 : s(p)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Delete", position: L, children: /* @__PURE__ */ e(
3430
- R,
3432
+ ) }, "update") : b === "delete" && i && (s == null ? void 0 : s(x)) !== !1 ? /* @__PURE__ */ e(ue, { label: "Delete", position: W, children: /* @__PURE__ */ e(
3433
+ H,
3431
3434
  {
3432
3435
  size: "xs",
3433
3436
  variant: "outline",
3434
3437
  tone: "neutral",
3435
- onClick: () => i(p.id, p),
3438
+ onClick: () => i(x.id, x),
3436
3439
  iconLeft: /* @__PURE__ */ e(k, { name: "Trash1", size: "sm", style: { color: "var(--sa-color-error-600, #c9184a)" } })
3437
3440
  }
3438
- ) }, "delete") : b === "custom" ? /* @__PURE__ */ e(Lt.Fragment, { children: v == null ? void 0 : v(p) }, "custom") : null;
3441
+ ) }, "delete") : b === "custom" ? /* @__PURE__ */ e(Rt.Fragment, { children: v == null ? void 0 : v(x) }, "custom") : null;
3439
3442
  }) }) }) : null
3440
3443
  ]
3441
3444
  },
3442
- `${p}${w}`
3445
+ `${x}${w}`
3443
3446
  )) })
3444
3447
  ] }) });
3445
- }, ti = ({
3448
+ }, li = ({
3446
3449
  wrapperProps: t,
3447
3450
  dataTableProps: r,
3448
3451
  headerProps: n,
3449
3452
  footerProps: l
3450
3453
  }) => {
3451
3454
  var m;
3452
- const i = le(null), [o, s] = B(
3455
+ const i = le(null), [o, s] = M(
3453
3456
  (r == null ? void 0 : r.defaultFrozenCount) ?? 0
3454
3457
  ), a = (n == null ? void 0 : n.show) ?? !0, h = le(null), u = (m = r == null ? void 0 : r.pagination) == null ? void 0 : m.totalData;
3455
3458
  typeof u == "number" && (h.current = u);
3456
3459
  const g = (l == null ? void 0 : l.showFooter) ?? (u === void 0 ? h.current !== 0 : u !== 0);
3457
- return /* @__PURE__ */ d(Gr, { ...t, children: [
3458
- a && /* @__PURE__ */ e(Jr, { ...n }),
3460
+ return /* @__PURE__ */ d(Yr, { ...t, children: [
3461
+ a && /* @__PURE__ */ e(Xr, { ...n }),
3459
3462
  /* @__PURE__ */ e(
3460
3463
  f,
3461
3464
  {
@@ -3466,7 +3469,7 @@ const fn = te(
3466
3469
  overflowX: "auto"
3467
3470
  },
3468
3471
  children: r ? /* @__PURE__ */ e(
3469
- ei,
3472
+ ni,
3470
3473
  {
3471
3474
  ...r,
3472
3475
  scrollParentRef: i,
@@ -3477,7 +3480,7 @@ const fn = te(
3477
3480
  }
3478
3481
  ),
3479
3482
  g && /* @__PURE__ */ e(
3480
- Pr,
3483
+ ei,
3481
3484
  {
3482
3485
  pagination: r == null ? void 0 : r.pagination,
3483
3486
  pageKey: r == null ? void 0 : r.pageKey,
@@ -3489,21 +3492,21 @@ const fn = te(
3489
3492
  )
3490
3493
  ] });
3491
3494
  };
3492
- function ri(t) {
3495
+ function oi(t) {
3493
3496
  return te(
3494
3497
  t
3495
3498
  );
3496
3499
  }
3497
- const kn = ri(ti), dt = ({
3500
+ const Ln = oi(li), gt = ({
3498
3501
  of: t,
3499
3502
  render: r
3500
- }) => er.toArray(t == null ? void 0 : t.map((n, l, i) => r(n, l, i))), O = ({
3503
+ }) => rr.toArray(t == null ? void 0 : t.map((n, l, i) => r(n, l, i))), O = ({
3501
3504
  condition: t,
3502
3505
  fallback: r,
3503
3506
  children: n,
3504
3507
  loading: l,
3505
3508
  isLoading: i
3506
- }) => /* @__PURE__ */ e(J, { children: i ? l : t ? n : r }), N = (t) => /* @__PURE__ */ e(
3509
+ }) => /* @__PURE__ */ e(G, { children: i ? l : t ? n : r }), N = (t) => /* @__PURE__ */ e(
3507
3510
  C,
3508
3511
  {
3509
3512
  ...t,
@@ -3513,7 +3516,7 @@ const kn = ri(ti), dt = ({
3513
3516
  color: t.color || "gray-700",
3514
3517
  children: t.children
3515
3518
  }
3516
- ), Ce = (t) => /* @__PURE__ */ e(C, { color: "red-600", fontSize: "sm", children: t.message }), ii = ({
3519
+ ), Ce = (t) => /* @__PURE__ */ e(C, { color: "red-600", fontSize: "sm", children: t.message }), ci = ({
3517
3520
  size: t = "md",
3518
3521
  direction: r = "vertical",
3519
3522
  requiredTitle: n = "(Required)",
@@ -3583,7 +3586,7 @@ const kn = ri(ti), dt = ({
3583
3586
  ),
3584
3587
  /* @__PURE__ */ d(f, { gap: "xs", fullWidth: i.inputProps.fullWidth || !1, children: [
3585
3588
  /* @__PURE__ */ e(
3586
- ct,
3589
+ at,
3587
3590
  {
3588
3591
  ref: i.inputRef,
3589
3592
  size: t,
@@ -3598,7 +3601,7 @@ const kn = ri(ti), dt = ({
3598
3601
  ]
3599
3602
  }
3600
3603
  );
3601
- }, ni = ({
3604
+ }, ai = ({
3602
3605
  size: t = "md",
3603
3606
  direction: r = "vertical",
3604
3607
  requiredTitle: n = "(Required)",
@@ -3674,7 +3677,7 @@ const kn = ri(ti), dt = ({
3674
3677
  width: i.inputProps.fullWidth ? "100%" : r === "horizontal" && i.customWidth ? i.customWidth : r === "horizontal" ? "343px" : ""
3675
3678
  },
3676
3679
  children: /* @__PURE__ */ e(
3677
- ot,
3680
+ ct,
3678
3681
  {
3679
3682
  size: t,
3680
3683
  ...i.inputProps,
@@ -3689,9 +3692,9 @@ const kn = ri(ti), dt = ({
3689
3692
  ]
3690
3693
  }
3691
3694
  );
3692
- }, li = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-text-error, #a4133c)" : "var(--sa-text-disable, #181a198f)", oi = (t) => {
3695
+ }, si = (t, r) => typeof t == "string" && t || r === "error" ? "var(--sa-text-error, #a4133c)" : "var(--sa-text-disable, #181a198f)", di = (t) => {
3693
3696
  var a;
3694
- const [r, n] = B(!1), l = (h) => {
3697
+ const [r, n] = M(!1), l = (h) => {
3695
3698
  h.preventDefault(), h.stopPropagation();
3696
3699
  }, i = (h) => {
3697
3700
  h.preventDefault(), h.stopPropagation(), h.dataTransfer && t.handleOnFileChange(h.dataTransfer.files.item(0));
@@ -3716,7 +3719,7 @@ const kn = ri(ti), dt = ({
3716
3719
  paddingBlock: "md",
3717
3720
  borderRadius: "rounded-md",
3718
3721
  style: {
3719
- border: r ? "1px solid var(--sa-text-info, #0073ab)" : `1px solid ${li(t.errorMessage, t.status)}`
3722
+ border: r ? "1px solid var(--sa-text-info, #0073ab)" : `1px solid ${si(t.errorMessage, t.status)}`
3720
3723
  },
3721
3724
  children: [
3722
3725
  /* @__PURE__ */ e(
@@ -3758,17 +3761,17 @@ const kn = ri(ti), dt = ({
3758
3761
  }
3759
3762
  );
3760
3763
  };
3761
- function Sn(t) {
3764
+ function Wn(t) {
3762
3765
  return t.split(" ").map((r) => r[0]).join("").slice(0, 2).toUpperCase();
3763
3766
  }
3764
- const ci = (t) => {
3767
+ const hi = (t) => {
3765
3768
  const r = {
3766
3769
  day: "2-digit",
3767
3770
  month: "short",
3768
3771
  year: "numeric"
3769
3772
  };
3770
3773
  return t.toLocaleDateString("id-ID", r);
3771
- }, Fn = (t) => {
3774
+ }, Bn = (t) => {
3772
3775
  const r = {
3773
3776
  Jan: 0,
3774
3777
  Feb: 1,
@@ -3788,7 +3791,7 @@ const ci = (t) => {
3788
3791
  const l = parseInt(n[0], 10), i = r[n[1]], o = parseInt(n[2], 10);
3789
3792
  return isNaN(l) || isNaN(i) || isNaN(o) ? null : new Date(o, i, l);
3790
3793
  };
3791
- function En(t, r = !0) {
3794
+ function An(t, r = !0) {
3792
3795
  if (!t)
3793
3796
  return "Rp 0";
3794
3797
  const n = typeof t == "number" ? t.toString() : t;
@@ -3803,19 +3806,19 @@ String.prototype.toTitleCase = function() {
3803
3806
  String.prototype.toNumber = function() {
3804
3807
  return Number(this);
3805
3808
  };
3806
- const Mn = (t) => {
3809
+ const Hn = (t) => {
3807
3810
  const r = t.split(" ");
3808
3811
  let n = r[0].charAt(0);
3809
3812
  return r.length > 1 && (n += "" + r[1].charAt(0)), n.toUpperCase();
3810
3813
  };
3811
- function Ln(t) {
3814
+ function Rn(t) {
3812
3815
  const r = typeof t == "string" ? new Date(t) : t;
3813
3816
  if (isNaN(r.getTime()))
3814
3817
  throw new Error("Invalid date format");
3815
3818
  const n = r.getFullYear(), l = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
3816
3819
  return `${n}-${l}-${i}`;
3817
3820
  }
3818
- const ai = "sa-admin", ge = (t) => `var(--${ai}-${t})`, Wn = {
3821
+ const ui = "sa-admin", ge = (t) => `var(--${ui}-${t})`, In = {
3819
3822
  base: {
3820
3823
  borderColor: ge("base-border-color"),
3821
3824
  textColor: ge("base-text-color"),
@@ -3833,22 +3836,22 @@ const ai = "sa-admin", ge = (t) => `var(--${ai}-${t})`, Wn = {
3833
3836
  collapseWidth: ge("sidebar-collapse-width"),
3834
3837
  collapseV2Width: ge("sidebar-v2-collapse-width")
3835
3838
  }
3836
- }, Bn = 24 * 60 * 60 * 1e3, An = (t) => {
3839
+ }, Vn = 24 * 60 * 60 * 1e3, zn = (t) => {
3837
3840
  const r = "14px poppins", l = document.createElement("canvas").getContext("2d");
3838
3841
  l.font = r;
3839
3842
  const i = l.measureText(t).width;
3840
3843
  return Number(Math.ceil(i));
3841
- }, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, di = /--+/, hi = /-$/;
3842
- function Rn(t, r) {
3844
+ }, fi = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, gi = /--+/, mi = /-$/;
3845
+ function Tn(t, r) {
3843
3846
  return JSON.stringify(t) !== JSON.stringify(r);
3844
3847
  }
3845
- function Hn(t) {
3848
+ function On(t) {
3846
3849
  return /^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(t);
3847
3850
  }
3848
- function Vn(t) {
3851
+ function Nn(t) {
3849
3852
  return /^[A-Za-z\s]+$/.test(t);
3850
3853
  }
3851
- const zn = (t) => {
3854
+ const Zn = (t) => {
3852
3855
  const r = /^[0-9]$/, n = [
3853
3856
  "ArrowLeft",
3854
3857
  "ArrowRight",
@@ -3860,7 +3863,7 @@ const zn = (t) => {
3860
3863
  "Tab"
3861
3864
  ];
3862
3865
  (t.ctrlKey || t.metaKey) && (t.key === "a" || t.key === "c" || t.key === "v") || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
3863
- }, In = (t) => {
3866
+ }, jn = (t) => {
3864
3867
  const r = /^[0-9]$/, n = [
3865
3868
  "ArrowLeft",
3866
3869
  "ArrowRight",
@@ -3872,7 +3875,7 @@ const zn = (t) => {
3872
3875
  "Tab"
3873
3876
  ];
3874
3877
  (t.ctrlKey || t.metaKey) && t.key === "v" || r.test(t.key) && !n.includes(t.key) && t.preventDefault();
3875
- }, Tn = (t) => {
3878
+ }, $n = (t) => {
3876
3879
  const r = /^[0-9.]$/, n = [
3877
3880
  "ArrowLeft",
3878
3881
  "ArrowRight",
@@ -3884,11 +3887,11 @@ const zn = (t) => {
3884
3887
  "Tab"
3885
3888
  ];
3886
3889
  (t.ctrlKey || t.metaKey) && t.key === "v" || !r.test(t.key) && !n.includes(t.key) && t.preventDefault();
3887
- }, On = (t) => si.test(t);
3888
- function Nn(t) {
3889
- return !(di.test(t) || hi.test(t));
3890
+ }, _n = (t) => fi.test(t);
3891
+ function Un(t) {
3892
+ return !(gi.test(t) || mi.test(t));
3890
3893
  }
3891
- const jn = (t) => {
3894
+ const qn = (t) => {
3892
3895
  const r = [
3893
3896
  "ArrowLeft",
3894
3897
  "ArrowRight",
@@ -3905,7 +3908,7 @@ const jn = (t) => {
3905
3908
  return;
3906
3909
  const n = t.currentTarget.value;
3907
3910
  /^[0-9]$/.test(t.key) || t.key === "." && !n.includes(".") || t.key === "-" && n.length === 0 && !n.includes("-") || r.includes(t.key) || t.preventDefault();
3908
- }, Zn = (t) => {
3911
+ }, Gn = (t) => {
3909
3912
  const r = document.getElementById(t);
3910
3913
  if (r) {
3911
3914
  const n = r.getBoundingClientRect(), l = window.scrollY + n.top - 80;
@@ -3915,7 +3918,7 @@ const jn = (t) => {
3915
3918
  });
3916
3919
  }
3917
3920
  };
3918
- function ui(t) {
3921
+ function yi(t) {
3919
3922
  const r = t.toLowerCase();
3920
3923
  if (["kb", "mb", "gb"].find((o) => r.endsWith(o)))
3921
3924
  return t;
@@ -3924,11 +3927,11 @@ function ui(t) {
3924
3927
  throw new Error("Invalid size format");
3925
3928
  return i >= 1e6 ? `${(i / 1e6).toFixed(2)}MB` : i >= 1e3 ? `${(i / 1e3).toFixed(2)}KB` : `${i}B`;
3926
3929
  }
3927
- function fi(t) {
3930
+ function pi(t) {
3928
3931
  const r = t.split("/");
3929
3932
  return r[r.length - 1];
3930
3933
  }
3931
- const gi = (t) => {
3934
+ const xi = (t) => {
3932
3935
  var r, n;
3933
3936
  return /* @__PURE__ */ d(
3934
3937
  f,
@@ -3973,11 +3976,11 @@ const gi = (t) => {
3973
3976
  whiteSpace: "nowrap",
3974
3977
  overflow: "hidden"
3975
3978
  },
3976
- children: fi(t.defaultUrl || "") || ((r = t.fileSelected) == null ? void 0 : r.name)
3979
+ children: pi(t.defaultUrl || "") || ((r = t.fileSelected) == null ? void 0 : r.name)
3977
3980
  }
3978
3981
  ),
3979
3982
  !t.defaultUrl && /* @__PURE__ */ d($, { direction: "row", gap: "xs", align: "center", children: [
3980
- /* @__PURE__ */ e(C, { fontSize: "sm", fontWeight: "medium", children: `${ui(
3983
+ /* @__PURE__ */ e(C, { fontSize: "sm", fontWeight: "medium", children: `${yi(
3981
3984
  ((n = t.fileSelected) == null ? void 0 : n.size.toString()) || "100000"
3982
3985
  )}` }),
3983
3986
  /* @__PURE__ */ e(k, { name: "Dot", size: "xs" }),
@@ -3989,14 +3992,14 @@ const gi = (t) => {
3989
3992
  style: {
3990
3993
  textWrap: "nowrap"
3991
3994
  },
3992
- children: t.fileDate ? t.fileDate : ci(/* @__PURE__ */ new Date())
3995
+ children: t.fileDate ? t.fileDate : hi(/* @__PURE__ */ new Date())
3993
3996
  }
3994
3997
  )
3995
3998
  ] })
3996
3999
  ] })
3997
4000
  ] }),
3998
4001
  /* @__PURE__ */ e(
3999
- R,
4002
+ H,
4000
4003
  {
4001
4004
  size: "xs",
4002
4005
  secondary: !0,
@@ -4018,7 +4021,7 @@ const gi = (t) => {
4018
4021
  ]
4019
4022
  }
4020
4023
  );
4021
- }, mi = ({ status: t = "default", ...r }) => {
4024
+ }, Ci = ({ status: t = "default", ...r }) => {
4022
4025
  var o;
4023
4026
  const n = le(null), l = () => {
4024
4027
  if (r.defaultUrl) {
@@ -4027,7 +4030,7 @@ const gi = (t) => {
4027
4030
  }
4028
4031
  n.current && n.current.click();
4029
4032
  }, i = ee("md");
4030
- return /* @__PURE__ */ d(J, { children: [
4033
+ return /* @__PURE__ */ d(G, { children: [
4031
4034
  /* @__PURE__ */ e(
4032
4035
  "input",
4033
4036
  {
@@ -4055,7 +4058,7 @@ const gi = (t) => {
4055
4058
  ...r.containerProps,
4056
4059
  children: [
4057
4060
  (r.fileSelected || r.defaultUrl) && /* @__PURE__ */ e(
4058
- gi,
4061
+ xi,
4059
4062
  {
4060
4063
  fileSelected: r.fileSelected,
4061
4064
  fileDate: r.fileDate,
@@ -4065,7 +4068,7 @@ const gi = (t) => {
4065
4068
  }
4066
4069
  ),
4067
4070
  !r.fileSelected && !r.defaultUrl && /* @__PURE__ */ e(
4068
- oi,
4071
+ di,
4069
4072
  {
4070
4073
  fileSupports: r.fileSupportOption,
4071
4074
  isDesktop: i,
@@ -4080,7 +4083,7 @@ const gi = (t) => {
4080
4083
  ),
4081
4084
  typeof r.errorMessage == "string" && r.errorMessage && /* @__PURE__ */ e(C, { color: "error", fontSize: "xs", children: r.errorMessage })
4082
4085
  ] });
4083
- }, yi = ({
4086
+ }, Di = ({
4084
4087
  size: t = "md",
4085
4088
  direction: r = "vertical",
4086
4089
  requiredTitle: n = "(Required)",
@@ -4150,7 +4153,7 @@ const gi = (t) => {
4150
4153
  ),
4151
4154
  /* @__PURE__ */ d($, { gap: "xs", children: [
4152
4155
  /* @__PURE__ */ e(
4153
- mi,
4156
+ Ci,
4154
4157
  {
4155
4158
  ...i.inputProps,
4156
4159
  status: i.errorMessage ? "error" : "default"
@@ -4161,7 +4164,7 @@ const gi = (t) => {
4161
4164
  ]
4162
4165
  }
4163
4166
  );
4164
- }, xi = ({
4167
+ }, vi = ({
4165
4168
  size: t = "md",
4166
4169
  direction: r = "vertical",
4167
4170
  requiredTitle: n = "(Required)",
@@ -4237,13 +4240,13 @@ const gi = (t) => {
4237
4240
  direction: r === "horizontal-inline" ? "row" : "column",
4238
4241
  align: "flex-start",
4239
4242
  children: /* @__PURE__ */ e(
4240
- dt,
4243
+ gt,
4241
4244
  {
4242
- of: (m = o.checkBoxesList) == null ? void 0 : m.map((x) => ({
4243
- ...x,
4244
- isChecked: o.checkBoxesAreChecked.includes(x.id)
4245
+ of: (m = o.checkBoxesList) == null ? void 0 : m.map((p) => ({
4246
+ ...p,
4247
+ isChecked: o.checkBoxesAreChecked.includes(p.id)
4245
4248
  })),
4246
- render: (x) => x.renderBadge ? /* @__PURE__ */ d(
4249
+ render: (p) => p.renderBadge ? /* @__PURE__ */ d(
4247
4250
  f,
4248
4251
  {
4249
4252
  direction: "row",
@@ -4252,28 +4255,28 @@ const gi = (t) => {
4252
4255
  ...o.badgeContainerProps,
4253
4256
  children: [
4254
4257
  /* @__PURE__ */ e(
4255
- tt,
4258
+ rt,
4256
4259
  {
4257
- name: x.name,
4258
- value: x.id,
4259
- checked: x.isChecked,
4260
- onChange: (v) => o.onChecked(v.target.value, x),
4261
- label: x.name,
4262
- description: x.description
4260
+ name: p.name,
4261
+ value: p.id,
4262
+ checked: p.isChecked,
4263
+ onChange: (v) => o.onChecked(v.target.value, p),
4264
+ label: p.name,
4265
+ description: p.description
4263
4266
  }
4264
4267
  ),
4265
- x.renderBadge
4268
+ p.renderBadge
4266
4269
  ]
4267
4270
  }
4268
4271
  ) : /* @__PURE__ */ e(
4269
- tt,
4272
+ rt,
4270
4273
  {
4271
- name: x.name,
4272
- value: x.id,
4273
- checked: x.isChecked,
4274
- onChange: (v) => o.onChecked(v.target.value, x),
4275
- label: x.name,
4276
- description: x.description
4274
+ name: p.name,
4275
+ value: p.id,
4276
+ checked: p.isChecked,
4277
+ onChange: (v) => o.onChecked(v.target.value, p),
4278
+ label: p.name,
4279
+ description: p.description
4277
4280
  }
4278
4281
  )
4279
4282
  }
@@ -4284,7 +4287,7 @@ const gi = (t) => {
4284
4287
  ]
4285
4288
  }
4286
4289
  );
4287
- }, pi = ({
4290
+ }, bi = ({
4288
4291
  position: t = "vertical",
4289
4292
  size: r = "md",
4290
4293
  fullWidth: n = !1,
@@ -4318,7 +4321,7 @@ const gi = (t) => {
4318
4321
  align: "flex-start",
4319
4322
  flexWrap: "wrap",
4320
4323
  children: /* @__PURE__ */ e(
4321
- dt,
4324
+ gt,
4322
4325
  {
4323
4326
  of: (o = l.radioList) == null ? void 0 : o.map((s) => ({
4324
4327
  ...s,
@@ -4326,17 +4329,17 @@ const gi = (t) => {
4326
4329
  })),
4327
4330
  render: ({ value: s, id: a, isChecked: h, subInput: u, label: g, description: m }) => /* @__PURE__ */ d(f, { gap: "xs", customMaxWidth: i, children: [
4328
4331
  /* @__PURE__ */ e(
4329
- Kt,
4332
+ tr,
4330
4333
  {
4331
4334
  id: `${a.toString()}-${s}`,
4332
4335
  name: l.groupName || g,
4333
4336
  label: g,
4334
4337
  value: s,
4335
4338
  checked: h,
4336
- onChange: (x) => l.onChecked({
4339
+ onChange: (p) => l.onChecked({
4337
4340
  id: a,
4338
- label: x.target.name,
4339
- value: x.target.value
4341
+ label: p.target.name,
4342
+ value: p.target.value
4340
4343
  }),
4341
4344
  disabled: l.disableAll
4342
4345
  },
@@ -4362,7 +4365,7 @@ const gi = (t) => {
4362
4365
  ]
4363
4366
  }
4364
4367
  );
4365
- }, Ci = ({
4368
+ }, wi = ({
4366
4369
  size: t = "md",
4367
4370
  direction: r = "vertical",
4368
4371
  requiredTitle: n = "(Required)",
@@ -4432,7 +4435,7 @@ const gi = (t) => {
4432
4435
  ),
4433
4436
  /* @__PURE__ */ d($, { gap: "xs", children: [
4434
4437
  /* @__PURE__ */ e(
4435
- Qt,
4438
+ Xt,
4436
4439
  {
4437
4440
  ref: i.inputRef,
4438
4441
  size: t,
@@ -4445,7 +4448,7 @@ const gi = (t) => {
4445
4448
  ]
4446
4449
  }
4447
4450
  );
4448
- }, Di = ({
4451
+ }, ki = ({
4449
4452
  size: t = "md",
4450
4453
  direction: r = "vertical",
4451
4454
  requiredTitle: n = "(Required)",
@@ -4515,7 +4518,7 @@ const gi = (t) => {
4515
4518
  }
4516
4519
  ),
4517
4520
  /* @__PURE__ */ e(
4518
- Mt,
4521
+ Ht,
4519
4522
  {
4520
4523
  checked: o.checked,
4521
4524
  onChange: o.onChange,
@@ -4527,15 +4530,15 @@ const gi = (t) => {
4527
4530
  ]
4528
4531
  }
4529
4532
  );
4530
- }, vi = ({
4533
+ }, Si = ({
4531
4534
  variant: t = "primary",
4532
4535
  size: r = "md",
4533
4536
  ...n
4534
4537
  }) => {
4535
- const l = Xt(), i = (s) => {
4536
- var h, u, g, m, x, v;
4538
+ const l = er(), i = (s) => {
4539
+ var h, u, g, m, p, v;
4537
4540
  if (!s) return;
4538
- const a = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (u = (h = l == null ? void 0 : l.computed) == null ? void 0 : h.red) == null ? void 0 : u[600] : t === "secondary-primary" ? (m = (g = l == null ? void 0 : l.computed) == null ? void 0 : g.blue) == null ? void 0 : m[700] : (v = (x = l == null ? void 0 : l.computed) == null ? void 0 : x.gray) == null ? void 0 : v[50];
4541
+ const a = n.disabled ? "var(--sa-text-disable, #181a198f)" : t === "secondary" ? "var(--sa-text-subtle, #8c8f97)" : t === "secondary-danger" ? (u = (h = l == null ? void 0 : l.computed) == null ? void 0 : h.red) == null ? void 0 : u[600] : t === "secondary-primary" ? (m = (g = l == null ? void 0 : l.computed) == null ? void 0 : g.blue) == null ? void 0 : m[700] : (v = (p = l == null ? void 0 : l.computed) == null ? void 0 : p.gray) == null ? void 0 : v[50];
4539
4542
  return /* @__PURE__ */ e(k, { name: s, size: r, style: { color: a } });
4540
4543
  }, o = () => {
4541
4544
  var a, h, u, g;
@@ -4557,7 +4560,7 @@ const gi = (t) => {
4557
4560
  }
4558
4561
  };
4559
4562
  return /* @__PURE__ */ e(
4560
- R,
4563
+ H,
4561
4564
  {
4562
4565
  fullWidth: !0,
4563
4566
  disabled: n.disabled,
@@ -4572,7 +4575,7 @@ const gi = (t) => {
4572
4575
  children: o()
4573
4576
  }
4574
4577
  );
4575
- }, bi = (t) => /* @__PURE__ */ e(
4578
+ }, Fi = (t) => /* @__PURE__ */ e(
4576
4579
  me.H5,
4577
4580
  {
4578
4581
  props: {
@@ -4580,7 +4583,7 @@ const gi = (t) => {
4580
4583
  },
4581
4584
  children: t.title
4582
4585
  }
4583
- ), wi = ({
4586
+ ), Ei = ({
4584
4587
  size: t = "md",
4585
4588
  direction: r = "vertical",
4586
4589
  requiredTitle: n = "(Required)",
@@ -4656,7 +4659,7 @@ const gi = (t) => {
4656
4659
  width: r === "horizontal" && i.customWidth ? i.customWidth : r === "horizontal" ? "343px" : ""
4657
4660
  },
4658
4661
  children: /* @__PURE__ */ e(
4659
- Zt,
4662
+ Ut,
4660
4663
  {
4661
4664
  size: t,
4662
4665
  ...i.inputProps,
@@ -4671,7 +4674,7 @@ const gi = (t) => {
4671
4674
  }
4672
4675
  );
4673
4676
  };
4674
- async function ki(t, r) {
4677
+ async function Mi(t, r) {
4675
4678
  const n = new Image();
4676
4679
  n.src = t, await new Promise((o, s) => {
4677
4680
  n.onload = o, n.onerror = s;
@@ -4698,7 +4701,7 @@ async function ki(t, r) {
4698
4701
  }, "image/png");
4699
4702
  });
4700
4703
  }
4701
- const wt = {
4704
+ const Mt = {
4702
4705
  "1:1": 1,
4703
4706
  "4:3": 4 / 3,
4704
4707
  "16:9": 16 / 9,
@@ -4707,7 +4710,7 @@ const wt = {
4707
4710
  "2:3": 2 / 3,
4708
4711
  "3:2": 3 / 2,
4709
4712
  "32:9": 32 / 9
4710
- }, Si = At(
4713
+ }, Li = It(
4711
4714
  ({
4712
4715
  handleUpload: t,
4713
4716
  urlImage: r,
@@ -4720,49 +4723,49 @@ const wt = {
4720
4723
  maxFileSize: h = 2,
4721
4724
  onError: u
4722
4725
  }, g) => {
4723
- const m = ee("md"), [x, v] = B(!1), [A, D] = B(null), [T, j] = B(!1), [Z, Q] = B({ x: 0, y: 0 }), [M, fe] = B(1), [P, V] = B(null);
4724
- U(() => {
4726
+ const m = ee("md"), [p, v] = M(!1), [A, D] = M(null), [T, Z] = M(!1), [j, Q] = M({ x: 0, y: 0 }), [L, fe] = M(1), [P, I] = M(null);
4727
+ _(() => {
4725
4728
  r === null && i(null);
4726
4729
  }, [r]);
4727
- const K = Ve(
4728
- (z, I) => {
4729
- V(I);
4730
+ const K = Me(
4731
+ (V, z) => {
4732
+ I(z);
4730
4733
  },
4731
4734
  []
4732
- ), oe = (z) => {
4735
+ ), oe = (V) => {
4733
4736
  var de;
4734
- const I = (de = z.target.files) == null ? void 0 : de[0];
4735
- if (!I) return;
4737
+ const z = (de = V.target.files) == null ? void 0 : de[0];
4738
+ if (!z) return;
4736
4739
  const X = new FileReader();
4737
4740
  X.onload = () => {
4738
- D(X.result), j(!0);
4739
- }, X.readAsDataURL(I);
4741
+ D(X.result), Z(!0);
4742
+ }, X.readAsDataURL(z);
4740
4743
  }, ce = async () => {
4741
4744
  if (!(!A || !P))
4742
4745
  try {
4743
- const z = await ki(A, P);
4744
- if (h && z.size > h * 1024 * 1024) {
4746
+ const V = await Mi(A, P);
4747
+ if (h && V.size > h * 1024 * 1024) {
4745
4748
  u == null || u(`Ukuran file maksimal ${h}MB`);
4746
4749
  return;
4747
4750
  }
4748
- t == null || t(z);
4749
- const I = URL.createObjectURL(z);
4750
- i(I, z), j(!1);
4751
+ t == null || t(V);
4752
+ const z = URL.createObjectURL(V);
4753
+ i(z, V), Z(!1);
4751
4754
  } catch {
4752
4755
  u == null || u("Gagal memproses gambar");
4753
4756
  }
4754
- }, _ = le(null), ae = () => {
4755
- _.current && _.current.click();
4757
+ }, U = le(null), ae = () => {
4758
+ U.current && U.current.click();
4756
4759
  };
4757
- tr(g, () => ({
4760
+ ir(g, () => ({
4758
4761
  openFileDialog: () => {
4759
- var z;
4760
- (z = _.current) == null || z.click();
4762
+ var V;
4763
+ (V = U.current) == null || V.click();
4761
4764
  }
4762
4765
  }));
4763
- const se = parseInt(o, 10), re = wt[s];
4764
- let Y, G;
4765
- return re >= 1 ? (G = se, Y = se * re) : (Y = se, G = se / re), /* @__PURE__ */ d(
4766
+ const se = parseInt(o, 10), re = Mt[s];
4767
+ let Y, J;
4768
+ return re >= 1 ? (J = se, Y = se * re) : (Y = se, J = se / re), /* @__PURE__ */ d(
4766
4769
  f,
4767
4770
  {
4768
4771
  display: "flex",
@@ -4777,7 +4780,7 @@ const wt = {
4777
4780
  justify: "center",
4778
4781
  style: {
4779
4782
  width: a != null && a.fullWidth ? "100%" : `${Y}px`,
4780
- height: a != null && a.fullWidth ? "auto" : `${G}px`,
4783
+ height: a != null && a.fullWidth ? "auto" : `${J}px`,
4781
4784
  aspectRatio: re,
4782
4785
  flexShrink: 0
4783
4786
  },
@@ -4827,7 +4830,7 @@ const wt = {
4827
4830
  style: {
4828
4831
  inset: 0,
4829
4832
  backgroundColor: "var(--sa-color-black-alpha-a30, #080f214a)",
4830
- opacity: x ? 1 : 0,
4833
+ opacity: p ? 1 : 0,
4831
4834
  transition: "opacity 0.3s ease-in-out"
4832
4835
  },
4833
4836
  onClick: ae,
@@ -4835,7 +4838,7 @@ const wt = {
4835
4838
  /* @__PURE__ */ e(
4836
4839
  "input",
4837
4840
  {
4838
- ref: _,
4841
+ ref: U,
4839
4842
  type: "file",
4840
4843
  accept: "image/*",
4841
4844
  onChange: oe,
@@ -4891,7 +4894,7 @@ const wt = {
4891
4894
  )
4892
4895
  }
4893
4896
  ),
4894
- T && ir.createPortal(
4897
+ T && nr.createPortal(
4895
4898
  /* @__PURE__ */ e(
4896
4899
  "div",
4897
4900
  {
@@ -4904,7 +4907,7 @@ const wt = {
4904
4907
  justifyContent: "center",
4905
4908
  backgroundColor: "rgba(0,0,0,0.6)"
4906
4909
  },
4907
- onClick: () => j(!1),
4910
+ onClick: () => Z(!1),
4908
4911
  children: /* @__PURE__ */ d(
4909
4912
  "div",
4910
4913
  {
@@ -4917,7 +4920,7 @@ const wt = {
4917
4920
  display: "flex",
4918
4921
  flexDirection: "column"
4919
4922
  },
4920
- onClick: (z) => z.stopPropagation(),
4923
+ onClick: (V) => V.stopPropagation(),
4921
4924
  children: [
4922
4925
  /* @__PURE__ */ e(
4923
4926
  "div",
@@ -4929,12 +4932,12 @@ const wt = {
4929
4932
  backgroundColor: "var(--sa-color-gray-100)"
4930
4933
  },
4931
4934
  children: A && /* @__PURE__ */ e(
4932
- nr,
4935
+ or,
4933
4936
  {
4934
4937
  image: A,
4935
- crop: Z,
4936
- zoom: M,
4937
- aspect: s ? wt[s] : void 0,
4938
+ crop: j,
4939
+ zoom: L,
4940
+ aspect: s ? Mt[s] : void 0,
4938
4941
  onCropChange: Q,
4939
4942
  onZoomChange: fe,
4940
4943
  onCropComplete: K,
@@ -4956,8 +4959,8 @@ const wt = {
4956
4959
  borderTop: "1px solid var(--sa-border-subtle)"
4957
4960
  },
4958
4961
  children: [
4959
- /* @__PURE__ */ e(R, { size: "sm", secondary: !0, onClick: () => j(!1), children: "Cancel" }),
4960
- /* @__PURE__ */ e(R, { size: "sm", primary: !0, onClick: ce, children: "Crop" })
4962
+ /* @__PURE__ */ e(H, { size: "sm", secondary: !0, onClick: () => Z(!1), children: "Cancel" }),
4963
+ /* @__PURE__ */ e(H, { size: "sm", primary: !0, onClick: ce, children: "Crop" })
4961
4964
  ]
4962
4965
  }
4963
4966
  )
@@ -4972,7 +4975,7 @@ const wt = {
4972
4975
  }
4973
4976
  );
4974
4977
  }
4975
- ), Fi = ({
4978
+ ), Wi = ({
4976
4979
  size: t = "md",
4977
4980
  direction: r = "vertical",
4978
4981
  requiredTitle: n = "(Required)",
@@ -5042,13 +5045,13 @@ const wt = {
5042
5045
  }
5043
5046
  ),
5044
5047
  /* @__PURE__ */ d($, { gap: "xs", children: [
5045
- /* @__PURE__ */ e(Si, { ...o.inputProps }),
5048
+ /* @__PURE__ */ e(Li, { ...o.inputProps }),
5046
5049
  !s && o.errorMessage && /* @__PURE__ */ e(Ce, { message: o.errorMessage })
5047
5050
  ] })
5048
5051
  ]
5049
5052
  }
5050
5053
  );
5051
- }, Ei = ({
5054
+ }, Bi = ({
5052
5055
  size: t = "md",
5053
5056
  direction: r = "vertical",
5054
5057
  requiredTitle: n = "(Required)",
@@ -5120,7 +5123,7 @@ const wt = {
5120
5123
  ]
5121
5124
  }
5122
5125
  );
5123
- }, $n = ({
5126
+ }, Jn = ({
5124
5127
  items: t,
5125
5128
  id: r,
5126
5129
  handleOnUpdate: n,
@@ -5129,13 +5132,13 @@ const wt = {
5129
5132
  disabled: o = !1
5130
5133
  }) => {
5131
5134
  var g;
5132
- const [s, a] = B([]);
5133
- U(() => {
5135
+ const [s, a] = M([]);
5136
+ _(() => {
5134
5137
  t && a([...t.map((m) => ({ id: m.id, isActive: m.isActive }))]);
5135
5138
  }, [t]);
5136
- const h = (g = s.find((m) => m.id === r)) == null ? void 0 : g.isActive, u = Ve(() => {
5139
+ const h = (g = s.find((m) => m.id === r)) == null ? void 0 : g.isActive, u = Me(() => {
5137
5140
  a(
5138
- (m) => m.map((x) => x.id === r ? { ...x, isActive: !x.isActive } : x)
5141
+ (m) => m.map((p) => p.id === r ? { ...p, isActive: !p.isActive } : p)
5139
5142
  ), n && n(!h);
5140
5143
  }, [r, n, h]);
5141
5144
  return /* @__PURE__ */ e(
@@ -5147,7 +5150,7 @@ const wt = {
5147
5150
  width: l
5148
5151
  },
5149
5152
  children: i && /* @__PURE__ */ e(
5150
- Mt,
5153
+ Ht,
5151
5154
  {
5152
5155
  disabled: o,
5153
5156
  checked: h,
@@ -5157,26 +5160,26 @@ const wt = {
5157
5160
  )
5158
5161
  }
5159
5162
  );
5160
- }, _n = {
5161
- InputText: ii,
5162
- InputDropdown: ni,
5163
- InputSingleFile: yi,
5164
- CheckBoxOptions: xi,
5165
- RadioOptions: pi,
5166
- InputTextArea: Ci,
5167
- ToggleForm: Di,
5168
- ActionButton: vi,
5169
- FormTitle: bi,
5170
- InputDate: wi,
5171
- InputImgFile: Fi,
5172
- Custom: Ei
5173
- }, Mi = ({ customBottom: t }) => {
5174
- const [r, n] = B(!1), l = () => {
5163
+ }, Qn = {
5164
+ InputText: ci,
5165
+ InputDropdown: ai,
5166
+ InputSingleFile: Di,
5167
+ CheckBoxOptions: vi,
5168
+ RadioOptions: bi,
5169
+ InputTextArea: wi,
5170
+ ToggleForm: ki,
5171
+ ActionButton: Si,
5172
+ FormTitle: Fi,
5173
+ InputDate: Ei,
5174
+ InputImgFile: Wi,
5175
+ Custom: Bi
5176
+ }, Ai = ({ customBottom: t }) => {
5177
+ const [r, n] = M(!1), l = () => {
5175
5178
  window.scrollY > window.screenY ? n(!0) : n(!1);
5176
5179
  }, i = () => {
5177
5180
  window.scrollTo({ top: 0, behavior: "smooth" });
5178
5181
  };
5179
- return U(() => (window.addEventListener("scroll", l), () => {
5182
+ return _(() => (window.addEventListener("scroll", l), () => {
5180
5183
  window.removeEventListener("scroll", l);
5181
5184
  }), []), /* @__PURE__ */ e(
5182
5185
  f,
@@ -5197,7 +5200,7 @@ const wt = {
5197
5200
  transition: "transform 0.2s ease-in-out"
5198
5201
  },
5199
5202
  children: /* @__PURE__ */ e(
5200
- R,
5203
+ H,
5201
5204
  {
5202
5205
  secondary: !0,
5203
5206
  size: "xs",
@@ -5220,7 +5223,7 @@ const wt = {
5220
5223
  )
5221
5224
  }
5222
5225
  );
5223
- }, Un = ({ pageLayout: t, children: r, wrapperProps: n, containerProps: l }) => {
5226
+ }, Pn = ({ pageLayout: t, children: r, wrapperProps: n, containerProps: l }) => {
5224
5227
  const i = ee("md"), o = (l == null ? void 0 : l.customWidth) ?? 264;
5225
5228
  return /* @__PURE__ */ d(
5226
5229
  f,
@@ -5259,7 +5262,7 @@ const wt = {
5259
5262
  ]
5260
5263
  }
5261
5264
  );
5262
- }, qn = ({
5265
+ }, Yn = ({
5263
5266
  children: t,
5264
5267
  withScrollToTopButton: r = !1,
5265
5268
  scrollToTopButtonProps: n,
@@ -5286,7 +5289,7 @@ const wt = {
5286
5289
  borderWidth: "border-t",
5287
5290
  children: [
5288
5291
  r && /* @__PURE__ */ e(
5289
- Mi,
5292
+ Ai,
5290
5293
  {
5291
5294
  ...n,
5292
5295
  customBottom: (n == null ? void 0 : n.customBottom) || "5.7rem"
@@ -5295,13 +5298,13 @@ const wt = {
5295
5298
  t
5296
5299
  ]
5297
5300
  }
5298
- ) }), Gn = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
5299
- dt,
5301
+ ) }), Xn = ({ fields: t }) => /* @__PURE__ */ e(f, { display: "flex", direction: "column", gap: "lg", children: /* @__PURE__ */ e(
5302
+ gt,
5300
5303
  {
5301
5304
  of: t,
5302
- render: (r, n) => /* @__PURE__ */ e(Li, { ...r }, n)
5305
+ render: (r, n) => /* @__PURE__ */ e(Hi, { ...r }, n)
5303
5306
  }
5304
- ) }), Li = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ d(f, { display: "flex", direction: "column", gap: "sm", children: [
5307
+ ) }), Hi = ({ title: t, value: r, icon: n }) => /* @__PURE__ */ d(f, { display: "flex", direction: "column", gap: "sm", children: [
5305
5308
  n ? /* @__PURE__ */ d(f, { display: "flex", direction: "row", align: "center", gap: "xs", children: [
5306
5309
  /* @__PURE__ */ e(k, { name: n, color: "subtle" }),
5307
5310
  /* @__PURE__ */ e(C, { color: "gray-500", variant: "sub-h3", children: t })
@@ -5311,8 +5314,8 @@ const wt = {
5311
5314
  silhouette: "#A7B0AC",
5312
5315
  accent: "#78867F"
5313
5316
  };
5314
- function Wi({ width: t, height: r }) {
5315
- return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ d(
5317
+ function Ri({ width: t, height: r }) {
5318
+ return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
5316
5319
  "svg",
5317
5320
  {
5318
5321
  width: t || "100",
@@ -5454,7 +5457,7 @@ function Wi({ width: t, height: r }) {
5454
5457
  }
5455
5458
  ) });
5456
5459
  }
5457
- const Jn = ({
5460
+ const Kn = ({
5458
5461
  title: t = "create",
5459
5462
  children: r,
5460
5463
  onClickAction: n,
@@ -5469,9 +5472,9 @@ const Jn = ({
5469
5472
  const g = () => {
5470
5473
  switch (l) {
5471
5474
  case "primary":
5472
- return /* @__PURE__ */ e(J, { children: o ? /* @__PURE__ */ e(R, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { primary: !0, onClick: n, children: h || t }) });
5475
+ return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(H, { primary: !0, onClick: n, children: h || t }) });
5473
5476
  case "secondary":
5474
- return /* @__PURE__ */ e(J, { children: o ? /* @__PURE__ */ e(R, { secondary: !0, iconLeft: o, onClick: n, children: i ? /* @__PURE__ */ e(
5477
+ return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { secondary: !0, iconLeft: o, onClick: n, children: i ? /* @__PURE__ */ e(
5475
5478
  C,
5476
5479
  {
5477
5480
  fontFamily: "Poppins",
@@ -5480,11 +5483,11 @@ const Jn = ({
5480
5483
  style: { color: "var(--sa-background-success, #28ac6e)" },
5481
5484
  children: h || t
5482
5485
  }
5483
- ) : t }) : /* @__PURE__ */ e(R, { secondary: !0, onClick: n, children: h || t }) });
5486
+ ) : t }) : /* @__PURE__ */ e(H, { secondary: !0, onClick: n, children: h || t }) });
5484
5487
  case "success":
5485
- return /* @__PURE__ */ e(J, { children: o ? /* @__PURE__ */ e(R, { success: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { success: !0, onClick: n, children: h || t }) });
5488
+ return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { success: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(H, { success: !0, onClick: n, children: h || t }) });
5486
5489
  default:
5487
- return /* @__PURE__ */ e(J, { children: o ? /* @__PURE__ */ e(R, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(R, { primary: !0, onClick: n, children: h || t }) });
5490
+ return /* @__PURE__ */ e(G, { children: o ? /* @__PURE__ */ e(H, { primary: !0, iconLeft: o, onClick: n, children: h || t }) : /* @__PURE__ */ e(H, { primary: !0, onClick: n, children: h || t }) });
5488
5491
  }
5489
5492
  };
5490
5493
  return /* @__PURE__ */ d(
@@ -5499,17 +5502,17 @@ const Jn = ({
5499
5502
  marginBlock: "auto",
5500
5503
  customHeight: a,
5501
5504
  children: [
5502
- u || /* @__PURE__ */ e(Wi, {}),
5503
- /* @__PURE__ */ e(f, { children: r.map((m, x) => /* @__PURE__ */ e(
5505
+ u || /* @__PURE__ */ e(Ri, {}),
5506
+ /* @__PURE__ */ e(f, { children: r.map((m, p) => /* @__PURE__ */ e(
5504
5507
  me.Body1,
5505
5508
  {
5506
5509
  props: {
5507
5510
  align: "center",
5508
5511
  textAlign: "center"
5509
5512
  },
5510
- children: x > 2 ? null : m
5513
+ children: p > 2 ? null : m
5511
5514
  },
5512
- x
5515
+ p
5513
5516
  )) }),
5514
5517
  s ? g() : null
5515
5518
  ]
@@ -5525,8 +5528,8 @@ const Jn = ({
5525
5528
  c000000: "#000000",
5526
5529
  cFFFFFF: "#FFFFFF"
5527
5530
  };
5528
- function Bi({ width: t, height: r }) {
5529
- return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ d(
5531
+ function Ii({ width: t, height: r }) {
5532
+ return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
5530
5533
  "svg",
5531
5534
  {
5532
5535
  width: t,
@@ -5728,7 +5731,7 @@ function Bi({ width: t, height: r }) {
5728
5731
  }
5729
5732
  ) });
5730
5733
  }
5731
- function Qn({ onClick: t }) {
5734
+ function el({ onClick: t }) {
5732
5735
  const r = ee("md");
5733
5736
  return /* @__PURE__ */ d(
5734
5737
  f,
@@ -5740,7 +5743,7 @@ function Qn({ onClick: t }) {
5740
5743
  justify: "center",
5741
5744
  gap: "md",
5742
5745
  children: [
5743
- /* @__PURE__ */ e(Bi, { width: r ? 600 : 300 }),
5746
+ /* @__PURE__ */ e(Ii, { width: r ? 600 : 300 }),
5744
5747
  /* @__PURE__ */ e(
5745
5748
  C,
5746
5749
  {
@@ -5759,12 +5762,12 @@ function Qn({ onClick: t }) {
5759
5762
  children: "Sorry, we couldn't find the page you are looking for"
5760
5763
  }
5761
5764
  ),
5762
- t && /* @__PURE__ */ e(R, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
5765
+ t && /* @__PURE__ */ e(H, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
5763
5766
  ]
5764
5767
  }
5765
5768
  );
5766
5769
  }
5767
- const W = {
5770
+ const B = {
5768
5771
  c46F16B: "#46F16B",
5769
5772
  c48504C: "#48504C",
5770
5773
  c64B5F6: "#64B5F6",
@@ -5785,8 +5788,8 @@ const W = {
5785
5788
  cF4F4F4: "#F4F4F4",
5786
5789
  cFFFFFF: "#FFFFFF"
5787
5790
  };
5788
- function Ai({ width: t, height: r }) {
5789
- return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ d(
5791
+ function Vi({ width: t, height: r }) {
5792
+ return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
5790
5793
  "svg",
5791
5794
  {
5792
5795
  width: t,
@@ -5795,14 +5798,14 @@ function Ai({ width: t, height: r }) {
5795
5798
  fill: "none",
5796
5799
  xmlns: "http://www.w3.org/2000/svg",
5797
5800
  children: [
5798
- /* @__PURE__ */ e("rect", { x: "228", y: "55.5", width: "55", height: "20", fill: W.cD6EBFD }),
5801
+ /* @__PURE__ */ e("rect", { x: "228", y: "55.5", width: "55", height: "20", fill: B.cD6EBFD }),
5799
5802
  /* @__PURE__ */ e(
5800
5803
  "path",
5801
5804
  {
5802
5805
  fillRule: "evenodd",
5803
5806
  clipRule: "evenodd",
5804
5807
  d: "M75 238.124V197.28L163.523 63.5H217.029V194.32H240V238.124H217.029V252.5H169.126V238.124H75ZM125.424 194.32L172.487 119.143V194.32H125.424Z",
5805
- fill: W.cBBDEFB,
5808
+ fill: B.cBBDEFB,
5806
5809
  fillOpacity: "0.6"
5807
5810
  }
5808
5811
  ),
@@ -5811,8 +5814,8 @@ function Ai({ width: t, height: r }) {
5811
5814
  "path",
5812
5815
  {
5813
5816
  d: "M334.5 274.5C381.168 274.5 419 227.266 419 169C419 110.734 381.168 63.5 334.5 63.5C287.832 63.5 250 110.734 250 169C250 227.266 287.832 274.5 334.5 274.5Z",
5814
- fill: W.cEFF3F8,
5815
- stroke: W.c67AEE6,
5817
+ fill: B.cEFF3F8,
5818
+ stroke: B.c67AEE6,
5816
5819
  strokeWidth: "5"
5817
5820
  }
5818
5821
  ),
@@ -5820,68 +5823,68 @@ function Ai({ width: t, height: r }) {
5820
5823
  "path",
5821
5824
  {
5822
5825
  d: "M413 197.5C411.397 211.835 402.919 230.898 389.361 246.49C375.596 262.32 356.651 274.5 334.496 274.5C311.331 274.5 292.389 261.672 278.878 245.52C265.592 229.638 257.606 210.603 256 197.5H413Z",
5823
- fill: W.cD5C7BD
5826
+ fill: B.cD5C7BD
5824
5827
  }
5825
5828
  ),
5826
5829
  /* @__PURE__ */ e(
5827
5830
  "path",
5828
5831
  {
5829
5832
  d: "M278.887 211.766H391.104L392.583 222.856C392.687 223.635 392.08 224.328 391.294 224.328H277.961C277.14 224.328 276.525 223.577 276.686 222.773L278.887 211.766Z",
5830
- fill: W.cCABEB1
5833
+ fill: B.cCABEB1
5831
5834
  }
5832
5835
  ),
5833
5836
  /* @__PURE__ */ e(
5834
5837
  "path",
5835
5838
  {
5836
5839
  d: "M287.68 218.884L289.354 213.022H378.961L381.473 218.884H287.68Z",
5837
- fill: W.cC0B2A2
5840
+ fill: B.cC0B2A2
5838
5841
  }
5839
5842
  ),
5840
5843
  /* @__PURE__ */ e(
5841
5844
  "path",
5842
5845
  {
5843
5846
  d: "M381.944 218.803L381.58 212.266H386.385L386.022 218.803H381.944Z",
5844
- fill: W.c956847,
5845
- stroke: W.c48504C
5847
+ fill: B.c956847,
5848
+ stroke: B.c48504C
5846
5849
  }
5847
5850
  ),
5848
5851
  /* @__PURE__ */ e(
5849
5852
  "path",
5850
5853
  {
5851
5854
  d: "M283.124 218.803L282.768 213.104H287.565L287.209 218.803H283.124Z",
5852
- fill: W.c956847,
5853
- stroke: W.c48504C
5855
+ fill: B.c956847,
5856
+ stroke: B.c48504C
5854
5857
  }
5855
5858
  ),
5856
5859
  /* @__PURE__ */ e(
5857
5860
  "path",
5858
5861
  {
5859
5862
  d: "M285.902 212.103L284.935 186.306H279.606C278.151 186.306 277.004 187.542 277.113 188.993L278.673 209.79C278.77 211.095 279.857 212.103 281.166 212.103H285.902Z",
5860
- fill: W.cC8CEF4,
5861
- stroke: W.c48504C
5863
+ fill: B.cC8CEF4,
5864
+ stroke: B.c48504C
5862
5865
  }
5863
5866
  ),
5864
5867
  /* @__PURE__ */ e(
5865
5868
  "path",
5866
5869
  {
5867
5870
  d: "M383.256 212.103L384.638 186.306H389.556C391.007 186.306 392.153 187.537 392.05 188.984L390.564 209.782C390.471 211.09 389.382 212.103 388.07 212.103H383.256Z",
5868
- fill: W.cC8CEF4,
5869
- stroke: W.c48504C
5871
+ fill: B.cC8CEF4,
5872
+ stroke: B.c48504C
5870
5873
  }
5871
5874
  ),
5872
5875
  /* @__PURE__ */ e(
5873
5876
  "path",
5874
5877
  {
5875
5878
  d: "M284.497 178.155C284.455 176.194 286.034 174.581 287.996 174.581H381.904C383.895 174.581 385.485 176.24 385.401 178.23L384.066 209.59C383.987 211.463 382.445 212.941 380.569 212.941H288.663C286.759 212.941 285.205 211.419 285.164 209.515L284.497 178.155Z",
5876
- fill: W.cC8CEF4,
5877
- stroke: W.c48504C
5879
+ fill: B.cC8CEF4,
5880
+ stroke: B.c48504C
5878
5881
  }
5879
5882
  ),
5880
5883
  /* @__PURE__ */ e(
5881
5884
  "path",
5882
5885
  {
5883
5886
  d: "M284.845 181.524C284.792 179.279 286.598 177.431 288.844 177.431H380.687C382.948 177.431 384.76 179.304 384.684 181.565L383.774 208.737C383.701 210.893 381.933 212.603 379.776 212.603H289.48C287.307 212.603 285.532 210.869 285.481 208.697L284.845 181.524Z",
5884
- fill: W.cBBC3F5
5887
+ fill: B.cBBC3F5
5885
5888
  }
5886
5889
  ),
5887
5890
  /* @__PURE__ */ e(
@@ -5898,7 +5901,7 @@ function Ai({ width: t, height: r }) {
5898
5901
  "path",
5899
5902
  {
5900
5903
  d: "M301 146.5C301 145.395 301.887 144.5 302.98 144.5H367.02C368.114 144.5 369 145.395 369 146.5V160.411H301V146.5Z",
5901
- fill: W.cFFFFFF
5904
+ fill: B.cFFFFFF
5902
5905
  }
5903
5906
  )
5904
5907
  }
@@ -5908,42 +5911,42 @@ function Ai({ width: t, height: r }) {
5908
5911
  "path",
5909
5912
  {
5910
5913
  d: "M301 146.191C301 145.257 301.748 144.5 302.671 144.5H356.701C357.624 144.5 358.372 145.257 358.372 146.191V157.949H301V146.191Z",
5911
- fill: W.cFFFFFF
5914
+ fill: B.cFFFFFF
5912
5915
  }
5913
5916
  ),
5914
5917
  /* @__PURE__ */ e(
5915
5918
  "path",
5916
5919
  {
5917
5920
  d: "M301.336 146.607C301.336 145.673 302.08 144.916 302.999 144.916H367.01C367.929 144.916 368.673 145.673 368.673 146.607V152.523H301.336V146.607Z",
5918
- fill: W.cD6D6D6
5921
+ fill: B.cD6D6D6
5919
5922
  }
5920
5923
  ),
5921
5924
  /* @__PURE__ */ e(
5922
5925
  "path",
5923
5926
  {
5924
5927
  d: "M368.673 152.523H301.336V174.5H368.673V152.523Z",
5925
- fill: W.cF4F4F4
5928
+ fill: B.cF4F4F4
5926
5929
  }
5927
5930
  ),
5928
5931
  /* @__PURE__ */ e(
5929
5932
  "path",
5930
5933
  {
5931
5934
  d: "M307.685 150.417C308.607 150.417 309.356 149.66 309.356 148.726C309.356 147.793 308.607 147.036 307.685 147.036C306.762 147.036 306.014 147.793 306.014 148.726C306.014 149.66 306.762 150.417 307.685 150.417Z",
5932
- fill: W.cEE8080
5935
+ fill: B.cEE8080
5933
5936
  }
5934
5937
  ),
5935
5938
  /* @__PURE__ */ e(
5936
5939
  "path",
5937
5940
  {
5938
5941
  d: "M313.532 150.417C314.455 150.417 315.203 149.66 315.203 148.726C315.203 147.793 314.455 147.036 313.532 147.036C312.609 147.036 311.861 147.793 311.861 148.726C311.861 149.66 312.609 150.417 313.532 150.417Z",
5939
- fill: W.cE5EE80
5942
+ fill: B.cE5EE80
5940
5943
  }
5941
5944
  ),
5942
5945
  /* @__PURE__ */ e(
5943
5946
  "path",
5944
5947
  {
5945
5948
  d: "M318.546 150.417C319.469 150.417 320.217 149.66 320.217 148.726C320.217 147.793 319.469 147.036 318.546 147.036C317.623 147.036 316.875 147.793 316.875 148.726C316.875 149.66 317.623 150.417 318.546 150.417Z",
5946
- fill: W.c46F16B
5949
+ fill: B.c46F16B
5947
5950
  }
5948
5951
  )
5949
5952
  ] }),
@@ -5951,14 +5954,14 @@ function Ai({ width: t, height: r }) {
5951
5954
  "path",
5952
5955
  {
5953
5956
  d: "M301.16 146C301.16 145.172 301.832 144.5 302.66 144.5H367.33C368.159 144.5 368.83 145.172 368.83 146V174.419H301.16V146Z",
5954
- stroke: W.c48504C
5957
+ stroke: B.c48504C
5955
5958
  }
5956
5959
  ),
5957
5960
  /* @__PURE__ */ e(
5958
5961
  "path",
5959
5962
  {
5960
5963
  d: "M395.29 207.579H423.344M354.255 236.889H369.329M327.038 222.234H347.556M350.905 222.234H358.024M288.097 230.19H304.846M253.344 210.091H272.605M278.467 246.938H295.216M297.309 246.938H303.59M337.088 252.801H354.255",
5961
- stroke: W.c86512B,
5964
+ stroke: B.c86512B,
5962
5965
  strokeWidth: "2",
5963
5966
  strokeLinecap: "round"
5964
5967
  }
@@ -5968,21 +5971,21 @@ function Ai({ width: t, height: r }) {
5968
5971
  "path",
5969
5972
  {
5970
5973
  d: "M430.241 125.78C430.987 105.807 437.521 90.4065 449.841 79.5799C462.161 68.7532 478.867 63.3398 499.961 63.3398C513.961 63.3398 525.907 65.7665 535.801 70.6199C545.881 75.4732 553.441 82.0998 558.481 90.4998C563.707 98.8998 566.321 108.327 566.321 118.78C566.321 131.1 563.241 141.18 557.081 149.02C550.921 156.673 543.734 161.9 535.521 164.7V165.82C546.161 169.367 554.561 175.247 560.721 183.46C566.881 191.673 569.961 202.22 569.961 215.1C569.961 226.673 567.254 236.94 561.841 245.9C560.436 248.258 558.849 250.481 557.081 252.569L443.5 252.662C432.5 241 427.721 230.5 427.721 207.82H474.201C474.387 216.033 476.721 222.567 481.201 227.42C485.681 232.087 492.214 234.42 500.801 234.42C508.081 234.42 513.681 232.367 517.601 228.26C521.707 223.967 523.761 218.367 523.761 211.46C523.761 202.5 520.867 196.06 515.081 192.14C509.481 188.033 500.427 185.98 487.921 185.98H478.961V147.06H487.921C497.441 147.06 505.094 145.473 510.881 142.3C516.854 138.94 519.841 133.06 519.841 124.66C519.841 117.94 517.974 112.713 514.241 108.98C510.507 105.247 505.374 103.38 498.841 103.38C491.747 103.38 486.427 105.527 482.881 109.82C479.521 114.113 477.561 119.433 477.001 125.78H430.241Z",
5971
- fill: W.cBBDEFB,
5974
+ fill: B.cBBDEFB,
5972
5975
  fillOpacity: "0.6"
5973
5976
  }
5974
5977
  ),
5975
- /* @__PURE__ */ e("rect", { x: "43", y: "87.5", width: "46", height: "20", fill: W.cD6EBFD }),
5976
- /* @__PURE__ */ e("rect", { x: "29", y: "109.5", width: "46", height: "20", fill: W.cD6EBFD }),
5977
- /* @__PURE__ */ e("rect", { x: "29", y: "65.5", width: "46", height: "20", fill: W.cD6EBFD }),
5978
- /* @__PURE__ */ e("rect", { x: "356", y: "0.5", width: "55", height: "20", fill: W.cD6EBFD }),
5979
- /* @__PURE__ */ e("rect", { x: "572", y: "142.5", width: "55", height: "20", fill: W.cD6EBFD }),
5980
- /* @__PURE__ */ e("rect", { x: "589", y: "120.5", width: "55", height: "20", fill: W.cD6EBFD }),
5978
+ /* @__PURE__ */ e("rect", { x: "43", y: "87.5", width: "46", height: "20", fill: B.cD6EBFD }),
5979
+ /* @__PURE__ */ e("rect", { x: "29", y: "109.5", width: "46", height: "20", fill: B.cD6EBFD }),
5980
+ /* @__PURE__ */ e("rect", { x: "29", y: "65.5", width: "46", height: "20", fill: B.cD6EBFD }),
5981
+ /* @__PURE__ */ e("rect", { x: "356", y: "0.5", width: "55", height: "20", fill: B.cD6EBFD }),
5982
+ /* @__PURE__ */ e("rect", { x: "572", y: "142.5", width: "55", height: "20", fill: B.cD6EBFD }),
5983
+ /* @__PURE__ */ e("rect", { x: "589", y: "120.5", width: "55", height: "20", fill: B.cD6EBFD }),
5981
5984
  /* @__PURE__ */ e(
5982
5985
  "path",
5983
5986
  {
5984
5987
  d: "M3 255.5L651 255.5",
5985
- stroke: W.c64B5F6,
5988
+ stroke: B.c64B5F6,
5986
5989
  strokeWidth: "5",
5987
5990
  strokeLinecap: "round"
5988
5991
  }
@@ -5992,7 +5995,7 @@ function Ai({ width: t, height: r }) {
5992
5995
  {
5993
5996
  width: "179",
5994
5997
  height: "192",
5995
- fill: W.cFFFFFF,
5998
+ fill: B.cFFFFFF,
5996
5999
  transform: "translate(246 60.5)"
5997
6000
  }
5998
6001
  ) }) })
@@ -6000,7 +6003,7 @@ function Ai({ width: t, height: r }) {
6000
6003
  }
6001
6004
  ) });
6002
6005
  }
6003
- function Pn({ onClick: t }) {
6006
+ function tl({ onClick: t }) {
6004
6007
  const r = ee("md");
6005
6008
  return /* @__PURE__ */ d(
6006
6009
  f,
@@ -6012,9 +6015,9 @@ function Pn({ onClick: t }) {
6012
6015
  justify: "center",
6013
6016
  gap: "md",
6014
6017
  children: [
6015
- /* @__PURE__ */ e(Ai, { width: r ? 600 : 300 }),
6018
+ /* @__PURE__ */ e(Vi, { width: r ? 600 : 300 }),
6016
6019
  /* @__PURE__ */ e(C, { fontWeight: "bold", fontSize: r ? "3xl" : "2xl", children: "We Are Sorry ..." }),
6017
- t && /* @__PURE__ */ e(R, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
6020
+ t && /* @__PURE__ */ e(H, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
6018
6021
  ]
6019
6022
  }
6020
6023
  );
@@ -6036,8 +6039,8 @@ const c = {
6036
6039
  cFFE18B: "#FFE18B",
6037
6040
  cFFFFFF: "#FFFFFF"
6038
6041
  };
6039
- function Ri({ width: t, height: r }) {
6040
- return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ d(
6042
+ function zi({ width: t, height: r }) {
6043
+ return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
6041
6044
  "svg",
6042
6045
  {
6043
6046
  width: t,
@@ -6708,7 +6711,7 @@ function Ri({ width: t, height: r }) {
6708
6711
  }
6709
6712
  ) });
6710
6713
  }
6711
- function Yn({ onClick: t }) {
6714
+ function rl({ onClick: t }) {
6712
6715
  const r = ee("md");
6713
6716
  return /* @__PURE__ */ d(
6714
6717
  f,
@@ -6721,7 +6724,7 @@ function Yn({ onClick: t }) {
6721
6724
  gap: "md",
6722
6725
  overflow: "overflow-hidden",
6723
6726
  children: [
6724
- /* @__PURE__ */ e(Ri, { width: r ? 600 : 300 }),
6727
+ /* @__PURE__ */ e(zi, { width: r ? 600 : 300 }),
6725
6728
  /* @__PURE__ */ e(
6726
6729
  C,
6727
6730
  {
@@ -6740,12 +6743,12 @@ function Yn({ onClick: t }) {
6740
6743
  children: "we are trying to fix the problem"
6741
6744
  }
6742
6745
  ),
6743
- t && /* @__PURE__ */ e(R, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
6746
+ t && /* @__PURE__ */ e(H, { size: r ? "md" : "xs", onClick: t, children: "Go Back" })
6744
6747
  ]
6745
6748
  }
6746
6749
  );
6747
6750
  }
6748
- const Xn = (t) => {
6751
+ const il = (t) => {
6749
6752
  var n, l, i, o, s;
6750
6753
  const r = ee("md");
6751
6754
  return /* @__PURE__ */ d(
@@ -6763,7 +6766,7 @@ const Xn = (t) => {
6763
6766
  children: [
6764
6767
  /* @__PURE__ */ e(Fe, { ...t.dialogTitleProps, children: typeof t.title == "string" ? /* @__PURE__ */ e(C, { fontSize: "lg", fontWeight: "medium", children: t.title }) : t.title }),
6765
6768
  /* @__PURE__ */ e(qe, { children: typeof t.description == "string" ? /* @__PURE__ */ e(C, { fontSize: "md", lineHeight: "leading-6", color: "tertiary", children: t.description }) : t.description }),
6766
- /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
6769
+ /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ e(
6767
6770
  f,
6768
6771
  {
6769
6772
  display: "flex",
@@ -6779,7 +6782,7 @@ const Xn = (t) => {
6779
6782
  gap: ((s = t.wrapperConfirmBtnProps) == null ? void 0 : s.gap) || "sm",
6780
6783
  ...t.wrapperConfirmBtnProps,
6781
6784
  children: [
6782
- t.onCancel && /* @__PURE__ */ e(R, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
6785
+ t.onCancel && /* @__PURE__ */ e(H, { secondary: !0, onClick: t.onCancel, size: "md", fullWidth: !0, children: t.titleCancelBtn || "Cancel" }),
6783
6786
  /* @__PURE__ */ e(
6784
6787
  f,
6785
6788
  {
@@ -6788,7 +6791,7 @@ const Xn = (t) => {
6788
6791
  textWrap: "nowrap"
6789
6792
  },
6790
6793
  children: /* @__PURE__ */ e(
6791
- R,
6794
+ H,
6792
6795
  {
6793
6796
  ...t.buttonConfirmProps,
6794
6797
  onClick: t.onConfirm,
@@ -6808,7 +6811,7 @@ const Xn = (t) => {
6808
6811
  },
6809
6812
  t.key
6810
6813
  );
6811
- }, Kn = te(
6814
+ }, nl = te(
6812
6815
  ({
6813
6816
  children: t,
6814
6817
  height: r,
@@ -6822,23 +6825,23 @@ const Xn = (t) => {
6822
6825
  titleTag: u,
6823
6826
  action: g,
6824
6827
  actionContainer: m,
6825
- containerProps: x,
6828
+ containerProps: p,
6826
6829
  bodyProps: v,
6827
6830
  headerProps: A = { borderBottom: !0 },
6828
6831
  footerProps: D = { borderTop: !0 },
6829
6832
  variantTag: T = "info"
6830
6833
  }) => {
6831
- const j = le(null), [Z, Q] = B("100vh");
6832
- U(() => {
6833
- const V = () => {
6834
- if (j.current) {
6835
- const K = j.current.getBoundingClientRect().top;
6834
+ const Z = le(null), [j, Q] = M("100vh");
6835
+ _(() => {
6836
+ const I = () => {
6837
+ if (Z.current) {
6838
+ const K = Z.current.getBoundingClientRect().top;
6836
6839
  Q(`calc(100vh - ${K}px)`);
6837
6840
  }
6838
6841
  };
6839
- return V(), window.addEventListener("resize", V), () => window.removeEventListener("resize", V);
6842
+ return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
6840
6843
  }, []);
6841
- const M = () => u ? /* @__PURE__ */ d(f, { direction: "row", gap: "sm", align: "center", children: [
6844
+ const L = () => u ? /* @__PURE__ */ d(f, { direction: "row", gap: "sm", align: "center", children: [
6842
6845
  /* @__PURE__ */ e(C, { fontWeight: "medium", children: h }),
6843
6846
  /* @__PURE__ */ e(Ee, { border: !0, text: u, variant: T })
6844
6847
  ] }) : /* @__PURE__ */ e(C, { fontWeight: "medium", children: h }), fe = () => s || /* @__PURE__ */ d(
@@ -6849,7 +6852,7 @@ const Xn = (t) => {
6849
6852
  align: "flex-start",
6850
6853
  gap: "md",
6851
6854
  children: [
6852
- /* @__PURE__ */ e(f, { children: h ? M() : null }),
6855
+ /* @__PURE__ */ e(f, { children: h ? L() : null }),
6853
6856
  /* @__PURE__ */ e(f, { ...m, children: g ?? null })
6854
6857
  ]
6855
6858
  }
@@ -6857,7 +6860,7 @@ const Xn = (t) => {
6857
6860
  return /* @__PURE__ */ d(
6858
6861
  f,
6859
6862
  {
6860
- ref: j,
6863
+ ref: Z,
6861
6864
  height: r,
6862
6865
  customMinHeight: n,
6863
6866
  customHeight: l,
@@ -6865,15 +6868,15 @@ const Xn = (t) => {
6865
6868
  paddingInline: i,
6866
6869
  bg: "white",
6867
6870
  direction: "column",
6868
- ...x,
6871
+ ...p,
6869
6872
  style: {
6870
6873
  backgroundColor: "var(--sa-background-primary, #ffffff)",
6871
6874
  display: "flex",
6872
- minHeight: Z,
6873
- ...(x == null ? void 0 : x.style) ?? {}
6875
+ minHeight: j,
6876
+ ...(p == null ? void 0 : p.style) ?? {}
6874
6877
  },
6875
6878
  children: [
6876
- s !== null && P ? /* @__PURE__ */ e(Nt, { ...A, children: fe() }) : null,
6879
+ s !== null && P ? /* @__PURE__ */ e($t, { ...A, children: fe() }) : null,
6877
6880
  /* @__PURE__ */ e(
6878
6881
  f,
6879
6882
  {
@@ -6887,12 +6890,12 @@ const Xn = (t) => {
6887
6890
  children: t
6888
6891
  }
6889
6892
  ),
6890
- a ? /* @__PURE__ */ e(jt, { ...D, children: a }) : null
6893
+ a ? /* @__PURE__ */ e(_t, { ...D, children: a }) : null
6891
6894
  ]
6892
6895
  }
6893
6896
  );
6894
6897
  }
6895
- ), el = Lt.memo(
6898
+ ), ll = Rt.memo(
6896
6899
  ({ value: t, options: r = [], onChange: n, multiple: l }) => {
6897
6900
  const i = (t == null ? void 0 : t.map((a) => a.value)) || [], o = (r == null ? void 0 : r.filter((a) => i.includes(a.value))) || [], s = (a) => {
6898
6901
  const h = [...o];
@@ -6900,7 +6903,7 @@ const Xn = (t) => {
6900
6903
  l ? u = i.includes(a.value) ? h.filter((g) => g.value !== a.value) : [...h, a] : u = [a], n == null || n(u);
6901
6904
  };
6902
6905
  return /* @__PURE__ */ e(f, { direction: "row", gap: "sm", flexWrap: "wrap", children: r == null ? void 0 : r.map((a, h) => /* @__PURE__ */ e(
6903
- R,
6906
+ H,
6904
6907
  {
6905
6908
  ...i.includes(a.value) ? { primary: !0 } : { secondary: !0 },
6906
6909
  onClick: () => s(a),
@@ -6909,8 +6912,8 @@ const Xn = (t) => {
6909
6912
  h
6910
6913
  )) });
6911
6914
  }
6912
- ), tl = (t) => {
6913
- const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [l, i] = Je(), o = Ge(l.toString());
6915
+ ), ol = (t) => {
6916
+ const { defaultTab: r = 0, paramKey: n = "tab" } = t || {}, [l, i] = Qe(), o = Ge(l.toString());
6914
6917
  return {
6915
6918
  activeTab: o[n] ? parseInt(o[n]) : r,
6916
6919
  handleTabChange: (h) => {
@@ -6922,13 +6925,13 @@ const Xn = (t) => {
6922
6925
  searchQueries: o
6923
6926
  };
6924
6927
  };
6925
- function rl({
6928
+ function cl({
6926
6929
  appName: t,
6927
6930
  menuConfig: r,
6928
6931
  formatTitle: n
6929
6932
  }) {
6930
- const l = ze();
6931
- U(() => {
6933
+ const l = Ve();
6934
+ _(() => {
6932
6935
  let i = null, o = null;
6933
6936
  for (const h of r) {
6934
6937
  const u = h.items.find((g) => g.to ? g.to === "/" ? l.pathname === "/" : !!(g.to === l.pathname || l.pathname.startsWith(g.to + "/")) : !1);
@@ -6943,8 +6946,8 @@ function rl({
6943
6946
  document.title = (n || a)(s, t);
6944
6947
  }, [l.pathname]);
6945
6948
  }
6946
- const il = () => {
6947
- const [t, r] = Je(), n = Ge(t.toString()), l = Rt(), i = ze(), o = l.id;
6949
+ const al = () => {
6950
+ const [t, r] = Qe(), n = Ge(t.toString()), l = zt(), i = Ve(), o = l.id;
6948
6951
  return {
6949
6952
  // query params
6950
6953
  setSearchParams: r,
@@ -6962,24 +6965,24 @@ const il = () => {
6962
6965
  hasId: !!o
6963
6966
  };
6964
6967
  };
6965
- function nl(t) {
6968
+ function sl(t) {
6966
6969
  var l, i;
6967
6970
  const r = t.decodedAccessToken;
6968
6971
  return De(() => {
6969
6972
  var h, u;
6970
6973
  const o = ((u = (h = r == null ? void 0 : r.access) == null ? void 0 : h.role) == null ? void 0 : u.code) ?? "", s = Object.keys(t.role).reduce(
6971
6974
  (g, m) => {
6972
- const x = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (v) => v.replace("_", "").toUpperCase())}`;
6973
- return { ...g, [x]: !1 };
6975
+ const p = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (v) => v.replace("_", "").toUpperCase())}`;
6976
+ return { ...g, [p]: !1 };
6974
6977
  },
6975
6978
  {}
6976
6979
  );
6977
6980
  return {
6978
6981
  ...Object.keys(t.role).reduce((g, m) => {
6979
- const x = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (v) => v.replace("_", "").toUpperCase())}`;
6982
+ const p = `is${m.toLowerCase().replace(/(^\w|_\w)/g, (v) => v.replace("_", "").toUpperCase())}`;
6980
6983
  return {
6981
6984
  ...g,
6982
- [x]: o === t.role[m]
6985
+ [p]: o === t.role[m]
6983
6986
  };
6984
6987
  }, s),
6985
6988
  hasRole: (g) => o === t.role[g],
@@ -6988,90 +6991,93 @@ function nl(t) {
6988
6991
  }, [(i = (l = r == null ? void 0 : r.access) == null ? void 0 : l.role) == null ? void 0 : i.code, t]);
6989
6992
  }
6990
6993
  export {
6991
- pn as ActionMenu,
6992
- qr as AdvanceFilterBar,
6993
- sn as App,
6994
- sr as AppComponent,
6995
- Ht as AppContext,
6996
- hn as AppLayout,
6997
- Un as AsideBar,
6998
- fn as AuthLayout,
6999
- Yr as ColumnFilterDropdown,
7000
- Xn as ConfirmationDialog,
7001
- ei as DataTable,
6994
+ wn as ActionMenu,
6995
+ Pr as AdvanceFilterBar,
6996
+ fn as App,
6997
+ hr as AppComponent,
6998
+ Tt as AppContext,
6999
+ yn as AppLayout,
7000
+ Pn as AsideBar,
7001
+ pn as BackButton,
7002
+ ti as ColumnFilterDropdown,
7003
+ il as ConfirmationDialog,
7004
+ ni as DataTable,
7002
7005
  O as DecisionWrapper,
7003
- dt as EachUtils,
7004
- Jn as EmptyStatePage,
7005
- Ur as FilterDrawer,
7006
- qn as FloatingFooter,
7007
- Pn as ForbiddenPage,
7008
- _n as Form,
7009
- Kn as FullSection,
7010
- gn as HorizontalField,
7011
- mi as InputFile,
7012
- Si as InputImage,
7013
- mn as ModalDialog,
7014
- un as ModuleSwitcher,
7015
- hr as ModuleSwitcherModal,
7016
- Qn as NotFoundPage,
7017
- yn as PageLayout,
7018
- Ot as Pressable,
7019
- Dr as RightDrawer,
7020
- Mi as ScrollToTopButton,
7021
- xn as Section,
7022
- jt as SectionFooter,
7023
- Nt as SectionHeader,
7024
- el as SelectButton,
7025
- Yn as ServerErrorPage,
7026
- cr as SidebarBadgesProvider,
7027
- dr as SidebarHeaderSlot,
7028
- Pr as TableFooter,
7029
- Jr as TableHeader,
7030
- kn as TableSection,
7031
- Gr as TableWrapper,
7032
- $n as ToggleStatus,
7006
+ gt as EachUtils,
7007
+ Kn as EmptyStatePage,
7008
+ Qr as FilterDrawer,
7009
+ Yn as FloatingFooter,
7010
+ tl as ForbiddenPage,
7011
+ Qn as Form,
7012
+ nl as FullSection,
7013
+ gn as HeaderLeftSlot,
7014
+ gr as HeaderLeftSlotOutlet,
7015
+ fr as HeaderLeftSlotProvider,
7016
+ Cn as HorizontalField,
7017
+ Ci as InputFile,
7018
+ Li as InputImage,
7019
+ Dn as ModalDialog,
7020
+ xn as ModuleSwitcher,
7021
+ yr as ModuleSwitcherModal,
7022
+ el as NotFoundPage,
7023
+ vn as PageLayout,
7024
+ ut as Pressable,
7025
+ kr as RightDrawer,
7026
+ Ai as ScrollToTopButton,
7027
+ bn as Section,
7028
+ _t as SectionFooter,
7029
+ $t as SectionHeader,
7030
+ ll as SelectButton,
7031
+ rl as ServerErrorPage,
7032
+ sr as SidebarBadgesProvider,
7033
+ ur as SidebarHeaderSlot,
7034
+ ei as TableFooter,
7035
+ Xr as TableHeader,
7036
+ Ln as TableSection,
7037
+ Yr as TableWrapper,
7038
+ Jn as ToggleStatus,
7033
7039
  me as Typography,
7034
- Gn as VerticalField,
7035
- dn as clearModuleSelection,
7036
- Sn as createInitialFromUserName,
7037
- Wn as cssVars,
7038
- Rn as formHasChanged,
7039
- Ln as formatDate,
7040
- ci as formatDateToIndonesian,
7041
- En as formatRupiah,
7042
- bn as getDateFilterValue,
7043
- vn as getDateRangeFilterValue,
7044
- Mn as getInitials,
7045
- Cn as getValueDropdownMultipleFilter,
7046
- Dn as getValueRadioFilter,
7047
- _r as getValueSearch,
7048
- Ke as getValuesFilter,
7049
- vt as handleChangeFilter,
7050
- Zn as handleOnScroll,
7051
- On as isEmail,
7052
- wn as isFilterActive,
7053
- Vn as isOnlyLettersAndSpaces,
7054
- Hn as isPhoneNumber,
7055
- Nn as isSlug,
7056
- Bn as oneDayInMs,
7057
- Fn as parseIndonesianDateToDate,
7058
- jn as preventNonCoordinateInput,
7059
- Tn as preventNonNumberAndDecimalInput,
7060
- zn as preventNonNumberInput,
7061
- In as preventNumberInput,
7062
- Nr as resolveDateRangeValueToString,
7063
- jr as resolveDateValueToString,
7064
- Tr as resolveDropdownValueToString,
7065
- Or as resolveRadioValueToString,
7066
- Ye as resolveSidebarBadge,
7067
- An as textWidth,
7068
- Vt as useApp,
7069
- or as useAppState,
7070
- nl as useAuthRole,
7071
- rl as useDynamicTitle,
7072
- Tt as useModuleSelection,
7073
- st as useRouteInfo,
7074
- il as useRouteParams,
7075
- ar as useSidebarBadges,
7076
- tl as useTabState
7040
+ Xn as VerticalField,
7041
+ mn as clearModuleSelection,
7042
+ Wn as createInitialFromUserName,
7043
+ In as cssVars,
7044
+ Tn as formHasChanged,
7045
+ Rn as formatDate,
7046
+ hi as formatDateToIndonesian,
7047
+ An as formatRupiah,
7048
+ En as getDateFilterValue,
7049
+ Fn as getDateRangeFilterValue,
7050
+ Hn as getInitials,
7051
+ kn as getValueDropdownMultipleFilter,
7052
+ Sn as getValueRadioFilter,
7053
+ Jr as getValueSearch,
7054
+ et as getValuesFilter,
7055
+ Ft as handleChangeFilter,
7056
+ Gn as handleOnScroll,
7057
+ _n as isEmail,
7058
+ Mn as isFilterActive,
7059
+ Nn as isOnlyLettersAndSpaces,
7060
+ On as isPhoneNumber,
7061
+ Un as isSlug,
7062
+ Vn as oneDayInMs,
7063
+ Bn as parseIndonesianDateToDate,
7064
+ qn as preventNonCoordinateInput,
7065
+ $n as preventNonNumberAndDecimalInput,
7066
+ Zn as preventNonNumberInput,
7067
+ jn as preventNumberInput,
7068
+ _r as resolveDateRangeValueToString,
7069
+ Ur as resolveDateValueToString,
7070
+ jr as resolveDropdownValueToString,
7071
+ $r as resolveRadioValueToString,
7072
+ Xe as resolveSidebarBadge,
7073
+ zn as textWidth,
7074
+ Ot as useApp,
7075
+ ar as useAppState,
7076
+ sl as useAuthRole,
7077
+ cl as useDynamicTitle,
7078
+ jt as useModuleSelection,
7079
+ ft as useRouteInfo,
7080
+ al as useRouteParams,
7081
+ dr as useSidebarBadges,
7082
+ ol as useTabState
7077
7083
  };