@argusoft/medplat-core 1.0.22 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/AddMenuConfiguration-m3R8FDhj.js +5570 -0
  2. package/dist/AddMenuConfiguration-m3R8FDhj.js.map +1 -0
  3. package/dist/AddMenuConfiguration.css +1 -1
  4. package/dist/{ChangePasswordModalCore-DotONnMz.js → ChangePasswordModalCore-Czu7OZe6.js} +957 -954
  5. package/dist/ChangePasswordModalCore-Czu7OZe6.js.map +1 -0
  6. package/dist/{ConditionConfig-C3rF2wXU.js → ConditionConfig-BECSbvY2.js} +2 -2
  7. package/dist/{ConditionConfig-C3rF2wXU.js.map → ConditionConfig-BECSbvY2.js.map} +1 -1
  8. package/dist/{EntityManagement-D4nG7wUX.js → EntityManagement-GaYsBTvf.js} +2 -2
  9. package/dist/{EntityManagement-D4nG7wUX.js.map → EntityManagement-GaYsBTvf.js.map} +1 -1
  10. package/dist/FhirRawResourceList-ZZFd7gTX.js +550 -0
  11. package/dist/FhirRawResourceList-ZZFd7gTX.js.map +1 -0
  12. package/dist/FhirServerList-Dkq7Kbes.js +116 -0
  13. package/dist/FhirServerList-Dkq7Kbes.js.map +1 -0
  14. package/dist/FhirServerProfile-CUOwC6Wb.js +253 -0
  15. package/dist/FhirServerProfile-CUOwC6Wb.js.map +1 -0
  16. package/dist/FhirServerWizard-Db6Hm4bQ.js +161 -0
  17. package/dist/FhirServerWizard-Db6Hm4bQ.js.map +1 -0
  18. package/dist/{ImmunizationConfigurationBase-CTBoSuSz.js → ImmunizationConfigurationBase-BevKZx_l.js} +386 -302
  19. package/dist/ImmunizationConfigurationBase-BevKZx_l.js.map +1 -0
  20. package/dist/{ManageEventConfiguration-BntUc_YI.js → ManageEventConfiguration-CBi2KMB1.js} +4 -4
  21. package/dist/{ManageEventConfiguration-BntUc_YI.js.map → ManageEventConfiguration-CBi2KMB1.js.map} +1 -1
  22. package/dist/{ManageUser-Ca1BsI1u.js → ManageUser-BnEPFSPT.js} +219 -219
  23. package/dist/{ManageUser-Ca1BsI1u.js.map → ManageUser-BnEPFSPT.js.map} +1 -1
  24. package/dist/{MobileMenuManagement-CV6QCeos.js → MobileMenuManagement-CVAKyKDa.js} +33 -32
  25. package/dist/MobileMenuManagement-CVAKyKDa.js.map +1 -0
  26. package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js → MobileTypeEventConfigModal-C34AN-IJ.js} +2 -2
  27. package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js.map → MobileTypeEventConfigModal-C34AN-IJ.js.map} +1 -1
  28. package/dist/{OtherTypeEventConfigModal-DiVhWDpG.js → OtherTypeEventConfigModal-BYjMFl0-.js} +93 -93
  29. package/dist/OtherTypeEventConfigModal-BYjMFl0-.js.map +1 -0
  30. package/dist/ServerFormFields-SLghoZ2z.js +136 -0
  31. package/dist/ServerFormFields-SLghoZ2z.js.map +1 -0
  32. package/dist/SyncDialog-BRGpHOE4.js +130 -0
  33. package/dist/SyncDialog-BRGpHOE4.js.map +1 -0
  34. package/dist/{TableList-HGbEN4bv.js → TableList-D6jnIbnz.js} +227 -244
  35. package/dist/TableList-D6jnIbnz.js.map +1 -0
  36. package/dist/{TypeConfiguration-CupQxH9Y.js → TypeConfiguration-Bs5WkIa2.js} +2 -2
  37. package/dist/{TypeConfiguration-CupQxH9Y.js.map → TypeConfiguration-Bs5WkIa2.js.map} +1 -1
  38. package/dist/dashboardLayoutUtils-Bt5HA96J.js +265 -0
  39. package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +1 -0
  40. package/dist/index.css +1 -1
  41. package/dist/index.js +191 -135
  42. package/dist/index.js.map +1 -1
  43. package/dist/permissions-DEWACxJN.js +308 -0
  44. package/dist/permissions-DEWACxJN.js.map +1 -0
  45. package/package.json +1 -1
  46. package/dist/AddMenuConfiguration-DsnY0Rws.js +0 -2237
  47. package/dist/AddMenuConfiguration-DsnY0Rws.js.map +0 -1
  48. package/dist/ChangePasswordModalCore-DotONnMz.js.map +0 -1
  49. package/dist/ImmunizationConfigurationBase-CTBoSuSz.js.map +0 -1
  50. package/dist/MobileMenuManagement-CV6QCeos.js.map +0 -1
  51. package/dist/OtherTypeEventConfigModal-DiVhWDpG.js.map +0 -1
  52. package/dist/TableList-HGbEN4bv.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { jsx as e, jsxs as r, Fragment as Se } from "react/jsx-runtime";
2
2
  import it, { useState as M, useMemo as me, useEffect as Ve, useCallback as ce, useRef as gt, createElement as ar } from "react";
3
3
  import { useDispatch as Re, useSelector as Ne } from "react-redux";
4
- import { Box as a, Typography as T, TextField as ne, InputAdornment as Ie, Tooltip as $e, IconButton as ue, Button as le, Dialog as we, DialogTitle as De, DialogContent as Ae, Autocomplete as ye, DialogActions as Oe, CircularProgress as qe, Chip as je, TableContainer as Xe, Paper as lt, Table as Ye, TableHead as Qe, TableRow as xe, TableCell as B, TableBody as Je, Switch as lr, Popover as or, Select as _e, MenuItem as ge, Checkbox as sr, Collapse as cr } from "@mui/material";
4
+ import { Box as a, Typography as T, TextField as ne, InputAdornment as Ie, Tooltip as $e, IconButton as ue, Button as oe, Dialog as we, DialogTitle as De, DialogContent as Ae, Autocomplete as ye, DialogActions as Oe, CircularProgress as qe, Chip as je, TableContainer as Xe, Paper as ot, Table as Ye, TableHead as Qe, TableRow as xe, TableCell as B, TableBody as Je, Switch as or, Popover as lr, Select as _e, MenuItem as ge, Checkbox as sr, Collapse as cr } from "@mui/material";
5
5
  import { setCurrentView as nt, setVaccines as Mt, setSelectedVaccineIds as At, toggleVaccine as dr, activateSelectedVaccines as ur, setImmunizationConfigLoaded as ft, addCustomVaccine as Bt, setDbTablesMaster as pr, updateBaseDateMasterStatus as hr, upsertBaseDateMasterItem as mr, setFiltersMaster as Vt, updateFilterMasterStatus as gr, upsertFilterMasterItem as fr, setRecipientMaster as qt, upsertRecipientMasterItem as yr, clearValidationErrors as dt, setVaccineStatus as xr, setValidationErrors as br, updateScheduledVaccine as vr, setFeatureRights as Cr, setBaseDatesMaster as Sr } from "@/store/reducers/immunizationSlice";
6
6
  import Ge from "@mui/material/Grid2";
7
7
  import { FontAwesomeIcon as O } from "@fortawesome/react-fontawesome";
8
8
  import b from "prop-types";
9
- import { faSearch as _t, faPlus as We, faInfoCircle as Nr, faArrowRight as bt, faSyringe as Pt, faTimes as ze, faTag as ot, faShieldVirus as Tr, faUser as Ke, faCalendarDay as Pe, faListCheck as Ut, faCheckDouble as Ir, faCode as vt, faDatabase as Ct, faColumns as wr, faArrowLeft as St, faFilter as at, faAlignLeft as Dr, faEdit as Nt, faClockRotateLeft as Et, faMapMarkedAlt as Ar, faExclamationCircle as yt, faTrash as st, faChevronDown as Er, faChevronUp as kr } from "@fortawesome/free-solid-svg-icons";
9
+ import { faSearch as _t, faPlus as We, faInfoCircle as Nr, faArrowRight as bt, faSyringe as Pt, faTimes as ze, faTag as lt, faShieldVirus as Tr, faUser as Ke, faCalendarDay as Pe, faListCheck as Ut, faCheckDouble as Ir, faCode as vt, faDatabase as Ct, faColumns as wr, faArrowLeft as St, faFilter as at, faAlignLeft as Dr, faEdit as Nt, faClockRotateLeft as Et, faMapMarkedAlt as Ar, faExclamationCircle as yt, faTrash as st, faChevronDown as Er, faChevronUp as kr } from "@fortawesome/free-solid-svg-icons";
10
10
  import { showToast as ae } from "@/common/toaster/toaster";
11
- import { ImmunizationUtil as oe } from "./index.js";
11
+ import { ImmunizationUtil as le } from "./index.js";
12
12
  import { getUseSkeleton as Fr } from "@/store/reducers/SkeletonReducer";
13
13
  import He from "@/views/custom-components/CustomSwitch";
14
14
  import kt from "@/views/custom-components/CustomConfirmationModal";
@@ -17,7 +17,7 @@ import { api as $t } from "@/common/interceptors/AxiosInterceptor";
17
17
  import { getAssignedFeatures as Rr } from "@/utils/feature";
18
18
  import './ImmunizationConfigurationBase.css';const Tt = ({
19
19
  title: t,
20
- toolTipText: o,
20
+ toolTipText: l,
21
21
  buttonText: u,
22
22
  icon: i,
23
23
  iconColor: v,
@@ -34,11 +34,11 @@ import './ImmunizationConfigurationBase.css';const Tt = ({
34
34
  style: { color: v }
35
35
  }
36
36
  ) }),
37
- /* @__PURE__ */ e($e, { arrow: !0, placement: "right", title: o, children: /* @__PURE__ */ e(ue, { size: "small", className: "info-btn", children: /* @__PURE__ */ e(O, { icon: Nr }) }) })
37
+ /* @__PURE__ */ e($e, { arrow: !0, placement: "right", title: l, children: /* @__PURE__ */ e(ue, { size: "small", className: "info-btn", children: /* @__PURE__ */ e(O, { icon: Nr }) }) })
38
38
  ] }),
39
39
  /* @__PURE__ */ e(T, { className: "card-title", children: t }),
40
40
  /* @__PURE__ */ e(
41
- le,
41
+ oe,
42
42
  {
43
43
  fullWidth: !0,
44
44
  className: `card-btn ${h ? "primary-btn" : "secondary-btn"}`,
@@ -106,14 +106,14 @@ const Gt = () => {
106
106
  ] }) });
107
107
  }, xt = ({
108
108
  vaccine: t = {},
109
- selected: o = !1,
109
+ selected: l = !1,
110
110
  onClick: u = () => {
111
111
  },
112
112
  isCustom: i = !1
113
113
  }) => /* @__PURE__ */ r(
114
114
  a,
115
115
  {
116
- className: `vaccine-card ${o ? "selected" : ""} ${i ? "custom-vaccine" : ""}`,
116
+ className: `vaccine-card ${l ? "selected" : ""} ${i ? "custom-vaccine" : ""}`,
117
117
  onClick: u,
118
118
  children: [
119
119
  /* @__PURE__ */ e(a, { className: "icon-container", children: /* @__PURE__ */ e(O, { icon: i ? We : Pt }) }),
@@ -133,7 +133,7 @@ xt.propTypes = {
133
133
  onClick: b.func,
134
134
  isCustom: b.bool
135
135
  };
136
- const It = ({ open: t, onClose: o, onAdd: u, isFromSummary: i }) => {
136
+ const It = ({ open: t, onClose: l, onAdd: u, isFromSummary: i }) => {
137
137
  const [v, C] = M(""), [h, S] = M(""), [I, g] = M(""), [p, U] = M(null), [F, E] = M({
138
138
  vaccineName: !1,
139
139
  disease: !1,
@@ -177,9 +177,9 @@ const It = ({ open: t, onClose: o, onAdd: u, isFromSummary: i }) => {
177
177
  return H.find(
178
178
  (P) => String(P.code || "").trim().toLowerCase() === f
179
179
  ) || null;
180
- }, [H, p]), l = v.trim() !== "" && h.trim() !== "" && !!I && !!p, y = async () => {
180
+ }, [H, p]), o = v.trim() !== "" && h.trim() !== "" && !!I && !!p, y = async () => {
181
181
  var f, P, J, re;
182
- if (l) {
182
+ if (o) {
183
183
  const N = v.trim().toUpperCase().replace(/\s+/g, "");
184
184
  if (Y.some(
185
185
  (k) => String((k == null ? void 0 : k.vaccine_code) || (k == null ? void 0 : k.name) || (k == null ? void 0 : k.vaccine_name) || "").toUpperCase().replace(/\s+/g, "") === N
@@ -196,12 +196,12 @@ const It = ({ open: t, onClose: o, onAdd: u, isFromSummary: i }) => {
196
196
  target_prevention: h,
197
197
  baseDateCode: p,
198
198
  recipientType: I
199
- }, V = await oe.addImmunization(k);
199
+ }, V = await le.addImmunization(k);
200
200
  if (V.data) {
201
201
  const Z = ((P = (f = V.data) == null ? void 0 : f.result) == null ? void 0 : P[0]) || V.data, w = (Z == null ? void 0 : Z.id) || ((J = V.data) == null ? void 0 : J.id) || ((re = V.data) == null ? void 0 : re.sequence);
202
202
  if (i)
203
203
  try {
204
- await oe.updateVaccineStatus({
204
+ await le.updateVaccineStatus({
205
205
  parameters: {
206
206
  vaccineId: w,
207
207
  status: !0
@@ -218,7 +218,7 @@ const It = ({ open: t, onClose: o, onAdd: u, isFromSummary: i }) => {
218
218
  isActive: !!i,
219
219
  ...Z && typeof Z == "object" ? Z : {},
220
220
  id: w || void 0
221
- }), G(), o();
221
+ }), G(), l();
222
222
  }
223
223
  } catch (k) {
224
224
  console.error("Error adding immunization:", k), ae({ message: "Failed to add vaccine", type: "error" });
@@ -238,7 +238,7 @@ const It = ({ open: t, onClose: o, onAdd: u, isFromSummary: i }) => {
238
238
  baseDate: !1
239
239
  });
240
240
  }, L = () => {
241
- G(), o();
241
+ G(), l();
242
242
  };
243
243
  return /* @__PURE__ */ r(
244
244
  we,
@@ -287,7 +287,7 @@ const It = ({ open: t, onClose: o, onAdd: u, isFromSummary: i }) => {
287
287
  className: "custom-textfield",
288
288
  slotProps: {
289
289
  input: {
290
- startAdornment: /* @__PURE__ */ e(Ie, { position: "start", children: /* @__PURE__ */ e(O, { icon: ot, className: "input-icon" }) })
290
+ startAdornment: /* @__PURE__ */ e(Ie, { position: "start", children: /* @__PURE__ */ e(O, { icon: lt, className: "input-icon" }) })
291
291
  }
292
292
  }
293
293
  }
@@ -395,12 +395,12 @@ const It = ({ open: t, onClose: o, onAdd: u, isFromSummary: i }) => {
395
395
  ] })
396
396
  ] }),
397
397
  /* @__PURE__ */ e(Oe, { className: "dialog-actions", children: /* @__PURE__ */ e(
398
- le,
398
+ oe,
399
399
  {
400
400
  onClick: y,
401
401
  className: "add-btn",
402
402
  fullWidth: !0,
403
- disabled: !l,
403
+ disabled: !o,
404
404
  children: i ? "Add to List" : "Add to Schedule"
405
405
  }
406
406
  ) })
@@ -414,7 +414,7 @@ It.propTypes = {
414
414
  onAdd: b.func.isRequired,
415
415
  isFromSummary: b.bool
416
416
  };
417
- const Kt = ({ children: t, isLoading: o }) => !Ne(Fr) || !o ? t : /* @__PURE__ */ e(
417
+ const Kt = ({ children: t, isLoading: l }) => !Ne(Fr) || !l ? t : /* @__PURE__ */ e(
418
418
  a,
419
419
  {
420
420
  sx: {
@@ -448,18 +448,18 @@ Kt.propTypes = {
448
448
  isLoading: b.bool
449
449
  };
450
450
  const Or = () => {
451
- const t = Re(), { vaccines: o, selectedVaccineIds: u, isConfigLoaded: i } = Ne(
451
+ const t = Re(), { vaccines: l, selectedVaccineIds: u, isConfigLoaded: i } = Ne(
452
452
  (y) => y.immunization
453
453
  ), [v, C] = M(""), [h, S] = M(!1), [I, g] = M(!1), [p, U] = M(!1);
454
454
  Ve(() => {
455
- (!o || o.length === 0) && (async () => {
455
+ (!l || l.length === 0) && (async () => {
456
456
  var G;
457
457
  try {
458
458
  g(!0);
459
- const L = await oe.getVaccines();
459
+ const L = await le.getVaccines();
460
460
  if ((G = L == null ? void 0 : L.data) != null && G.result) {
461
461
  const f = L.data.result.map(
462
- oe.mapImmunizationVaccineConfig
462
+ le.mapImmunizationVaccineConfig
463
463
  );
464
464
  t(Mt(f));
465
465
  }
@@ -469,8 +469,8 @@ const Or = () => {
469
469
  g(!1);
470
470
  }
471
471
  })();
472
- }, [t, o]);
473
- const F = (!i || I || p) && (!o || o.length === 0), E = (y) => {
472
+ }, [t, l]);
473
+ const F = (!i || I || p) && (!l || l.length === 0), E = (y) => {
474
474
  t(dr(y));
475
475
  }, Y = (y) => {
476
476
  t(Bt(y));
@@ -489,7 +489,7 @@ const Or = () => {
489
489
  }
490
490
  }, K = async () => {
491
491
  try {
492
- U(!0), await oe.updateImmunizationConfigurationInitiation();
492
+ U(!0), await le.updateImmunizationConfigurationInitiation();
493
493
  } catch (L) {
494
494
  ae({
495
495
  message: (L == null ? void 0 : L.message) || "Failed to update vaccine initiation state",
@@ -498,18 +498,18 @@ const Or = () => {
498
498
  return;
499
499
  }
500
500
  const y = [], G = [];
501
- o == null || o.forEach((L) => {
501
+ l == null || l.forEach((L) => {
502
502
  if (!L) return;
503
503
  const f = u.includes(L.id), P = !!L.isActive;
504
504
  f !== P && (f ? y.push(L.id) : G.push(L.id));
505
505
  });
506
506
  try {
507
- y.length && await oe.updateVaccineStatusFromArray({
507
+ y.length && await le.updateVaccineStatusFromArray({
508
508
  parameters: {
509
509
  vaccineIds: y.join(","),
510
510
  status: !0
511
511
  }
512
- }), G.length && await oe.updateVaccineStatusFromArray({
512
+ }), G.length && await le.updateVaccineStatusFromArray({
513
513
  parameters: {
514
514
  vaccineIds: G.join(","),
515
515
  status: !1
@@ -523,9 +523,9 @@ const Or = () => {
523
523
  } finally {
524
524
  U(!1);
525
525
  }
526
- }, q = o || [], Q = u || [], H = q.filter(
526
+ }, q = l || [], Q = u || [], H = q.filter(
527
527
  (y) => y && (y.name || "").toLowerCase().includes(v.toLowerCase())
528
- ), te = H.filter((y) => y && y.id).map((y) => y.id), l = te.length > 0 && te.every((y) => Q.includes(y));
528
+ ), te = H.filter((y) => y && y.id).map((y) => y.id), o = te.length > 0 && te.every((y) => Q.includes(y));
529
529
  return /* @__PURE__ */ r(a, { className: "immunization-schedule-config", children: [
530
530
  /* @__PURE__ */ r(a, { className: "content-wrapper", children: [
531
531
  /* @__PURE__ */ e(a, { sx: { mb: 1 } }),
@@ -564,7 +564,7 @@ const Or = () => {
564
564
  ] }),
565
565
  /* @__PURE__ */ r(a, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
566
566
  /* @__PURE__ */ e(
567
- le,
567
+ oe,
568
568
  {
569
569
  variant: "outlined",
570
570
  onClick: $,
@@ -586,7 +586,7 @@ const Or = () => {
586
586
  borderColor: "var(--color-primary)"
587
587
  }
588
588
  },
589
- children: l ? "Unselect All" : "Add All"
589
+ children: o ? "Unselect All" : "Add All"
590
590
  }
591
591
  ),
592
592
  /* @__PURE__ */ e(a, { className: "search-box", children: /* @__PURE__ */ e(
@@ -632,7 +632,7 @@ const Or = () => {
632
632
  " vaccines selected"
633
633
  ] }),
634
634
  /* @__PURE__ */ e(
635
- le,
635
+ oe,
636
636
  {
637
637
  className: "select-btn",
638
638
  disabled: u.length === 0 || F || p,
@@ -691,13 +691,13 @@ const Or = () => {
691
691
  return {};
692
692
  }
693
693
  }, Mr = (t) => {
694
- const o = String(t || "").toLowerCase();
694
+ const l = String(t || "").toLowerCase();
695
695
  return Wr.some(
696
- (u) => o.includes(u)
696
+ (u) => l.includes(u)
697
697
  );
698
698
  }, wt = ({
699
699
  open: t,
700
- onClose: o,
700
+ onClose: l,
701
701
  startInAddMode: u = !1,
702
702
  onSaved: i
703
703
  }) => {
@@ -705,7 +705,7 @@ const Or = () => {
705
705
  open: !1,
706
706
  bdName: "",
707
707
  usedIn: []
708
- }), [q, Q] = M(""), [H, te] = M(""), [l, y] = M(""), [G, L] = M("");
708
+ }), [q, Q] = M(""), [H, te] = M(""), [o, y] = M(""), [G, L] = M("");
709
709
  Ve(() => {
710
710
  t && (p(!!u), P(), f());
711
711
  }, [t, u]);
@@ -714,7 +714,7 @@ const Or = () => {
714
714
  if (!((I == null ? void 0 : I.length) > 0))
715
715
  try {
716
716
  F(!0);
717
- const D = await oe.getAllTablesAndColumns();
717
+ const D = await le.getAllTablesAndColumns();
718
718
  (w = D == null ? void 0 : D.data) != null && w.result && v(pr(D.data.result));
719
719
  } catch (D) {
720
720
  console.error("Failed to fetch tables", D);
@@ -724,10 +724,10 @@ const Or = () => {
724
724
  }, P = () => {
725
725
  Q(""), te(""), y(""), L("");
726
726
  }, J = me(() => {
727
- if (!l) return [];
728
- const w = I.find((d) => d.tableName === l), D = Lr(w == null ? void 0 : w.columnInfo);
727
+ if (!o) return [];
728
+ const w = I.find((d) => d.tableName === o), D = Lr(w == null ? void 0 : w.columnInfo);
729
729
  return Object.entries(D).filter(([, d]) => Mr(d)).map(([d]) => d).sort((d, x) => d.localeCompare(x));
730
- }, [l, I]), re = me(() => [...I || []].sort(
730
+ }, [o, I]), re = me(() => [...I || []].sort(
731
731
  (w, D) => w.tableName.localeCompare(D.tableName)
732
732
  ), [I]), N = me(
733
733
  () => (C == null ? void 0 : C.map((w) => {
@@ -735,17 +735,17 @@ const Or = () => {
735
735
  return (D = w.code) == null ? void 0 : D.toLowerCase();
736
736
  })) || [],
737
737
  [C]
738
- ), z = !!H && N.includes(H.trim().toLowerCase()), k = q.trim() && H.trim() && !z && l && G && !E, V = async () => {
738
+ ), z = !!H && N.includes(H.trim().toLowerCase()), k = q.trim() && H.trim() && !z && o && G && !E, V = async () => {
739
739
  var w, D, d;
740
740
  try {
741
741
  Y(!0);
742
742
  const x = {
743
743
  name: q.trim(),
744
744
  code: H.trim(),
745
- rel_table: l,
745
+ rel_table: o,
746
746
  rel_column: G,
747
747
  is_active: !0
748
- }, m = await oe.saveBaseDate(x);
748
+ }, m = await le.saveBaseDate(x);
749
749
  if (((w = m == null ? void 0 : m.data) == null ? void 0 : w.success) !== !1) {
750
750
  ae({ message: "Base Date added successfully", type: "success" });
751
751
  const W = ((d = (D = m == null ? void 0 : m.data) == null ? void 0 : D.result) == null ? void 0 : d[0]) || {
@@ -755,7 +755,7 @@ const Or = () => {
755
755
  rel_column: x.rel_column,
756
756
  is_active: x.is_active
757
757
  };
758
- v(mr(W)), i == null || i(W), P(), u ? o() : p(!1);
758
+ v(mr(W)), i == null || i(W), P(), u ? l() : p(!1);
759
759
  } else
760
760
  throw new Error("Failed to save base date");
761
761
  } catch (x) {
@@ -788,7 +788,7 @@ const Or = () => {
788
788
  const x = {
789
789
  code: w.code,
790
790
  is_active: D
791
- }, m = await oe.updateBaseDate(x);
791
+ }, m = await le.updateBaseDate(x);
792
792
  if (((d = m == null ? void 0 : m.data) == null ? void 0 : d.success) !== !1)
793
793
  ae({
794
794
  message: `Base Date ${D ? "activated" : "deactivated"} successfully`,
@@ -812,7 +812,7 @@ const Or = () => {
812
812
  we,
813
813
  {
814
814
  open: t,
815
- onClose: o,
815
+ onClose: l,
816
816
  maxWidth: "md",
817
817
  fullWidth: !0,
818
818
  className: "add-custom-vaccine-dialog",
@@ -842,7 +842,7 @@ const Or = () => {
842
842
  ue,
843
843
  {
844
844
  "aria-label": "close",
845
- onClick: o,
845
+ onClick: l,
846
846
  className: "close-button",
847
847
  size: "small",
848
848
  children: /* @__PURE__ */ e(O, { icon: ze })
@@ -883,7 +883,7 @@ const Or = () => {
883
883
  /* @__PURE__ */ e(
884
884
  O,
885
885
  {
886
- icon: ot,
886
+ icon: lt,
887
887
  style: { marginRight: 6, opacity: 0.6 }
888
888
  }
889
889
  ),
@@ -962,11 +962,11 @@ const Or = () => {
962
962
  fullWidth: !0,
963
963
  options: re,
964
964
  value: re.find(
965
- (w) => w.tableName === l
965
+ (w) => w.tableName === o
966
966
  ) || null,
967
967
  onChange: (w, D) => {
968
968
  const d = (D == null ? void 0 : D.tableName) || "";
969
- y(d), d !== l && L("");
969
+ y(d), d !== o && L("");
970
970
  },
971
971
  getOptionLabel: (w) => (w == null ? void 0 : w.tableName) || "",
972
972
  isOptionEqualToValue: (w, D) => (w == null ? void 0 : w.tableName) === (D == null ? void 0 : D.tableName),
@@ -1000,15 +1000,15 @@ const Or = () => {
1000
1000
  fullWidth: !0,
1001
1001
  options: J,
1002
1002
  value: G || null,
1003
- disabled: !l,
1003
+ disabled: !o,
1004
1004
  onChange: (w, D) => L(D || ""),
1005
- noOptionsText: l ? "No date-type columns available" : "Select a table first",
1005
+ noOptionsText: o ? "No date-type columns available" : "Select a table first",
1006
1006
  renderInput: (w) => /* @__PURE__ */ e(
1007
1007
  ne,
1008
1008
  {
1009
1009
  ...w,
1010
- label: l ? "Select Column" : "Select a table first",
1011
- placeholder: l ? "Search date-type column" : "Select a table first",
1010
+ label: o ? "Select Column" : "Select a table first",
1011
+ placeholder: o ? "Search date-type column" : "Select a table first",
1012
1012
  sx: et
1013
1013
  }
1014
1014
  )
@@ -1021,7 +1021,7 @@ const Or = () => {
1021
1021
  ) : (C == null ? void 0 : C.length) > 0 ? /* @__PURE__ */ e(
1022
1022
  Xe,
1023
1023
  {
1024
- component: lt,
1024
+ component: ot,
1025
1025
  elevation: 0,
1026
1026
  sx: {
1027
1027
  border: "1.5px solid var(--color-gray4)",
@@ -1150,10 +1150,10 @@ const Or = () => {
1150
1150
  },
1151
1151
  children: [
1152
1152
  /* @__PURE__ */ e(
1153
- le,
1153
+ oe,
1154
1154
  {
1155
1155
  onClick: () => {
1156
- P(), u ? o() : p(!1);
1156
+ P(), u ? l() : p(!1);
1157
1157
  },
1158
1158
  className: "cancel-btn",
1159
1159
  startIcon: /* @__PURE__ */ e(O, { icon: St, style: { fontSize: 11 } }),
@@ -1161,7 +1161,7 @@ const Or = () => {
1161
1161
  }
1162
1162
  ),
1163
1163
  /* @__PURE__ */ e(
1164
- le,
1164
+ oe,
1165
1165
  {
1166
1166
  onClick: V,
1167
1167
  className: "add-btn",
@@ -1172,7 +1172,7 @@ const Or = () => {
1172
1172
  ]
1173
1173
  }
1174
1174
  ) : /* @__PURE__ */ e(
1175
- le,
1175
+ oe,
1176
1176
  {
1177
1177
  onClick: () => p(!0),
1178
1178
  className: "add-btn",
@@ -1302,7 +1302,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1302
1302
  fontSize: "13px",
1303
1303
  "&.Mui-focused": { color: "var(--color-text)" }
1304
1304
  }
1305
- }, Ht = ({ open: t, onClose: o }) => {
1305
+ }, Ht = ({ open: t, onClose: l }) => {
1306
1306
  const u = Re(), {
1307
1307
  filtersMaster: i = [],
1308
1308
  vaccines: v,
@@ -1311,7 +1311,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1311
1311
  open: !1,
1312
1312
  filterName: "",
1313
1313
  usedIn: []
1314
- }), [K, q] = M(""), [Q, H] = M(""), [te, l] = M(""), [y, G] = M("");
1314
+ }), [K, q] = M(""), [Q, H] = M(""), [te, o] = M(""), [y, G] = M("");
1315
1315
  Ve(() => {
1316
1316
  t && (S(!1), g(null), f(), L());
1317
1317
  }, [t]);
@@ -1320,7 +1320,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1320
1320
  if (!(!d && (i == null ? void 0 : i.length) > 0))
1321
1321
  try {
1322
1322
  U(!0);
1323
- const m = await oe.getFilters();
1323
+ const m = await le.getFilters();
1324
1324
  (x = m == null ? void 0 : m.data) != null && x.result && u(Vt(m.data.result));
1325
1325
  } catch (m) {
1326
1326
  console.error("Failed to fetch filters", m);
@@ -1328,9 +1328,9 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1328
1328
  U(!1);
1329
1329
  }
1330
1330
  }, f = () => {
1331
- q(""), H(""), l(""), G(""), g(null);
1331
+ q(""), H(""), o(""), G(""), g(null);
1332
1332
  }, P = (d) => {
1333
- g(d), q(d.name || ""), H(d.code || ""), l(d.description || ""), G(d.query || ""), S(!0);
1333
+ g(d), q(d.name || ""), H(d.code || ""), o(d.description || ""), G(d.query || ""), S(!0);
1334
1334
  }, J = me(
1335
1335
  () => (i == null ? void 0 : i.map((d) => {
1336
1336
  var x;
@@ -1358,7 +1358,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1358
1358
  // Preserve status when editing
1359
1359
  };
1360
1360
  let j;
1361
- if (I ? j = await oe.updateFilter(W) : j = await oe.addFilter(W), ((d = j == null ? void 0 : j.data) == null ? void 0 : d.success) !== !1) {
1361
+ if (I ? j = await le.updateFilter(W) : j = await le.addFilter(W), ((d = j == null ? void 0 : j.data) == null ? void 0 : d.success) !== !1) {
1362
1362
  ae({
1363
1363
  message: `Filter ${I ? "updated" : "added"} successfully`,
1364
1364
  type: "success"
@@ -1403,7 +1403,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1403
1403
  ...d,
1404
1404
  // Send all old info, but toggled
1405
1405
  is_active: x
1406
- }, j = await oe.updateFilter(W);
1406
+ }, j = await le.updateFilter(W);
1407
1407
  if (((m = j == null ? void 0 : j.data) == null ? void 0 : m.success) !== !1)
1408
1408
  ae({
1409
1409
  message: `Filter ${x ? "activated" : "deactivated"} successfully`,
@@ -1427,7 +1427,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1427
1427
  we,
1428
1428
  {
1429
1429
  open: t,
1430
- onClose: o,
1430
+ onClose: l,
1431
1431
  maxWidth: "md",
1432
1432
  fullWidth: !0,
1433
1433
  className: "add-custom-vaccine-dialog",
@@ -1457,7 +1457,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1457
1457
  ue,
1458
1458
  {
1459
1459
  "aria-label": "close",
1460
- onClick: o,
1460
+ onClick: l,
1461
1461
  className: "close-button",
1462
1462
  size: "small",
1463
1463
  children: /* @__PURE__ */ e(O, { icon: ze })
@@ -1499,7 +1499,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1499
1499
  /* @__PURE__ */ e(
1500
1500
  O,
1501
1501
  {
1502
- icon: ot,
1502
+ icon: lt,
1503
1503
  style: { marginRight: 6, opacity: 0.6 }
1504
1504
  }
1505
1505
  ),
@@ -1583,7 +1583,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1583
1583
  multiline: !0,
1584
1584
  rows: 2,
1585
1585
  value: te,
1586
- onChange: (d) => l(d.target.value),
1586
+ onChange: (d) => o(d.target.value),
1587
1587
  placeholder: "Describe the purpose of this filter...",
1588
1588
  sx: tt
1589
1589
  }
@@ -1643,7 +1643,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1643
1643
  ) : (i == null ? void 0 : i.length) > 0 ? /* @__PURE__ */ e(
1644
1644
  Xe,
1645
1645
  {
1646
- component: lt,
1646
+ component: ot,
1647
1647
  elevation: 0,
1648
1648
  sx: {
1649
1649
  border: "1.5px solid var(--color-gray4)",
@@ -1796,7 +1796,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1796
1796
  },
1797
1797
  children: [
1798
1798
  /* @__PURE__ */ e(
1799
- le,
1799
+ oe,
1800
1800
  {
1801
1801
  onClick: () => {
1802
1802
  S(!1), f();
@@ -1807,7 +1807,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1807
1807
  }
1808
1808
  ),
1809
1809
  /* @__PURE__ */ e(
1810
- le,
1810
+ oe,
1811
1811
  {
1812
1812
  onClick: w,
1813
1813
  className: "add-btn",
@@ -1818,7 +1818,7 @@ const ut = "#resourceId#", Br = /#(\w+)#/g, Be = {
1818
1818
  ]
1819
1819
  }
1820
1820
  ) : /* @__PURE__ */ e(
1821
- le,
1821
+ oe,
1822
1822
  {
1823
1823
  onClick: () => S(!0),
1824
1824
  className: "add-btn",
@@ -1947,25 +1947,25 @@ const pt = {
1947
1947
  "&.Mui-focused": { color: "var(--color-text)" }
1948
1948
  }
1949
1949
  }, Ue = (t) => (t == null ? void 0 : t.trim().toLowerCase()) || "", Vr = (t) => {
1950
- const o = t.trim().replace(/,$/, ""), u = o.match(/\s+as\s+([a-zA-Z0-9_"]+)$/i);
1950
+ const l = t.trim().replace(/,$/, ""), u = l.match(/\s+as\s+([a-zA-Z0-9_"]+)$/i);
1951
1951
  if (u)
1952
1952
  return u[1].replace(/"/g, "");
1953
- const i = o.match(/\s+([a-zA-Z_][a-zA-Z0-9_]*)$/);
1954
- return i && !/[)\]]$/.test(o.slice(0, o.lastIndexOf(i[0]))) ? i[1] : (o.split(".").pop() || o).replace(/["'`]/g, "").trim();
1953
+ const i = l.match(/\s+([a-zA-Z_][a-zA-Z0-9_]*)$/);
1954
+ return i && !/[)\]]$/.test(l.slice(0, l.lastIndexOf(i[0]))) ? i[1] : (l.split(".").pop() || l).replace(/["'`]/g, "").trim();
1955
1955
  }, qr = (t) => {
1956
- const o = [];
1956
+ const l = [];
1957
1957
  let u = "", i = 0;
1958
1958
  for (const v of t) {
1959
1959
  if (v === "(" && (i += 1), v === ")" && (i = Math.max(0, i - 1)), v === "," && i === 0) {
1960
- u.trim() && o.push(u.trim()), u = "";
1960
+ u.trim() && l.push(u.trim()), u = "";
1961
1961
  continue;
1962
1962
  }
1963
1963
  u += v;
1964
1964
  }
1965
- return u.trim() && o.push(u.trim()), o;
1965
+ return u.trim() && l.push(u.trim()), l;
1966
1966
  }, _r = (t) => {
1967
- const o = t.match(/select\s+([\s\S]+?)\s+from\s/i);
1968
- return o != null && o[1] ? qr(o[1]).map(Vr).filter(Boolean).filter((u, i, v) => v.indexOf(u) === i) : [];
1967
+ const l = t.match(/select\s+([\s\S]+?)\s+from\s/i);
1968
+ return l != null && l[1] ? qr(l[1]).map(Vr).filter(Boolean).filter((u, i, v) => v.indexOf(u) === i) : [];
1969
1969
  }, Ft = (t) => {
1970
1970
  if (!t) return {};
1971
1971
  if (typeof t == "object") return t;
@@ -1974,10 +1974,10 @@ const pt = {
1974
1974
  } catch {
1975
1975
  return {};
1976
1976
  }
1977
- }, jt = ({ open: t, onClose: o }) => {
1977
+ }, jt = ({ open: t, onClose: l }) => {
1978
1978
  const u = Re(), { recipientMaster: i = [], baseDateMaster: v = [] } = Ne(
1979
1979
  (n) => n.immunization
1980
- ), [C, h] = M(!1), [S, I] = M(null), [g, p] = M(!1), [U, F] = M(!1), [E, Y] = M(!1), [$, K] = M(""), [q, Q] = M(""), [H, te] = M(""), [l, y] = M(!1), [G, L] = M([]), [f, P] = M([]), [J, re] = M(""), [N, z] = M(""), [k, V] = M(""), [Z, w] = M(!1), [D, d] = M([]), [x, m] = M({});
1980
+ ), [C, h] = M(!1), [S, I] = M(null), [g, p] = M(!1), [U, F] = M(!1), [E, Y] = M(!1), [$, K] = M(""), [q, Q] = M(""), [H, te] = M(""), [o, y] = M(!1), [G, L] = M([]), [f, P] = M([]), [J, re] = M(""), [N, z] = M(""), [k, V] = M(""), [Z, w] = M(!1), [D, d] = M([]), [x, m] = M({});
1981
1981
  Ve(() => {
1982
1982
  t && (h(!1), I(null), j(), W());
1983
1983
  }, [t]);
@@ -1986,7 +1986,7 @@ const pt = {
1986
1986
  if (!(!n && i.length > 0))
1987
1987
  try {
1988
1988
  p(!0);
1989
- const R = await oe.getRecipients();
1989
+ const R = await le.getRecipients();
1990
1990
  (c = R == null ? void 0 : R.data) != null && c.result && u(qt(R.data.result));
1991
1991
  } catch (R) {
1992
1992
  console.error(R), ae({
@@ -2000,7 +2000,7 @@ const pt = {
2000
2000
  K(""), Q(""), te(""), y(!1), L([]), P([]), re(""), z(""), V(""), I(null), w(!1), d([]), m({});
2001
2001
  }, X = () => {
2002
2002
  const n = {};
2003
- return $.trim() || (n.name = "Name is required"), pe ? !S && he && (n.code = "This code already exists") : n.code = "Code is required", H.trim() ? ke && (n.query = ke) : n.query = "Query is required", f.length || (n.fetchTypeKeys = "At least one fetch type key is required"), N.trim() || (n.historyKey = "History key is required"), k.trim() || (n.excludeVaccineKey = "Exclude vaccine key is required"), l && !J.trim() && (n.locationKey = "Location key is required"), be && (n.duplicateColumnUsage = be), n;
2003
+ return $.trim() || (n.name = "Name is required"), pe ? !S && he && (n.code = "This code already exists") : n.code = "Code is required", H.trim() ? ke && (n.query = ke) : n.query = "Query is required", f.length || (n.fetchTypeKeys = "At least one fetch type key is required"), N.trim() || (n.historyKey = "History key is required"), k.trim() || (n.excludeVaccineKey = "Exclude vaccine key is required"), o && !J.trim() && (n.locationKey = "Location key is required"), be && (n.duplicateColumnUsage = be), n;
2004
2004
  }, se = me(
2005
2005
  () => i.map((n) => {
2006
2006
  var c;
@@ -2042,7 +2042,7 @@ const pt = {
2042
2042
  ...f,
2043
2043
  N,
2044
2044
  k,
2045
- l ? J : ""
2045
+ o ? J : ""
2046
2046
  ].map((_) => Ue(_)).filter(Boolean)
2047
2047
  );
2048
2048
  return c.forEach((_) => R.delete(_)), Ee.filter((_) => {
@@ -2052,7 +2052,7 @@ const pt = {
2052
2052
  },
2053
2053
  [
2054
2054
  f,
2055
- l,
2055
+ o,
2056
2056
  N,
2057
2057
  k,
2058
2058
  J,
@@ -2121,16 +2121,16 @@ const pt = {
2121
2121
  code: (S == null ? void 0 : S.code) || pe,
2122
2122
  config: JSON.stringify({
2123
2123
  allowedBaseDates: G,
2124
- geographicalApplicability: l,
2124
+ geographicalApplicability: o,
2125
2125
  query: H.trim(),
2126
2126
  fetchTypeKeys: f,
2127
- locationKey: l ? J : "",
2127
+ locationKey: o ? J : "",
2128
2128
  historyKey: N,
2129
2129
  excludeVaccineKey: k
2130
2130
  })
2131
2131
  };
2132
2132
  F(!0);
2133
- const de = S ? await oe.updateRecipient(ee) : await oe.saveRecipient(ee);
2133
+ const de = S ? await le.updateRecipient(ee) : await le.saveRecipient(ee);
2134
2134
  if (((n = de == null ? void 0 : de.data) == null ? void 0 : n.success) === !1)
2135
2135
  throw new Error("Failed to save recipient");
2136
2136
  const ve = ((R = (c = de == null ? void 0 : de.data) == null ? void 0 : c.result) == null ? void 0 : R[0]) || {
@@ -2157,7 +2157,7 @@ const pt = {
2157
2157
  we,
2158
2158
  {
2159
2159
  open: t,
2160
- onClose: o,
2160
+ onClose: l,
2161
2161
  maxWidth: "md",
2162
2162
  fullWidth: !0,
2163
2163
  className: "add-custom-vaccine-dialog",
@@ -2187,7 +2187,7 @@ const pt = {
2187
2187
  ue,
2188
2188
  {
2189
2189
  "aria-label": "close",
2190
- onClick: o,
2190
+ onClick: l,
2191
2191
  className: "close-button",
2192
2192
  size: "small",
2193
2193
  children: /* @__PURE__ */ e(O, { icon: ze })
@@ -2225,16 +2225,30 @@ const pt = {
2225
2225
  children: [
2226
2226
  /* @__PURE__ */ r(a, { sx: { display: "flex", gap: 2 }, children: [
2227
2227
  /* @__PURE__ */ r(a, { className: "input-group", sx: { flex: 1 }, children: [
2228
- /* @__PURE__ */ r(T, { className: "input-label", sx: { mb: 0.8 }, children: [
2229
- /* @__PURE__ */ e(
2230
- O,
2231
- {
2232
- icon: ot,
2233
- style: { marginRight: 6, opacity: 0.6 }
2234
- }
2235
- ),
2236
- "Name"
2237
- ] }),
2228
+ /* @__PURE__ */ r(
2229
+ T,
2230
+ {
2231
+ className: "input-label",
2232
+ sx: {
2233
+ mb: 0.8,
2234
+ "&::after": {
2235
+ content: '" *"',
2236
+ color: "#333",
2237
+ fontWeight: "bold"
2238
+ }
2239
+ },
2240
+ children: [
2241
+ /* @__PURE__ */ e(
2242
+ O,
2243
+ {
2244
+ icon: lt,
2245
+ style: { marginRight: 6, opacity: 0.6 }
2246
+ }
2247
+ ),
2248
+ "Name"
2249
+ ]
2250
+ }
2251
+ ),
2238
2252
  /* @__PURE__ */ e(
2239
2253
  ne,
2240
2254
  {
@@ -2256,16 +2270,30 @@ const pt = {
2256
2270
  )
2257
2271
  ] }),
2258
2272
  /* @__PURE__ */ r(a, { className: "input-group", sx: { flex: 1 }, children: [
2259
- /* @__PURE__ */ r(T, { className: "input-label", sx: { mb: 0.5 }, children: [
2260
- /* @__PURE__ */ e(
2261
- O,
2262
- {
2263
- icon: vt,
2264
- style: { marginRight: 6, opacity: 0.6 }
2265
- }
2266
- ),
2267
- "Code"
2268
- ] }),
2273
+ /* @__PURE__ */ r(
2274
+ T,
2275
+ {
2276
+ className: "input-label",
2277
+ sx: {
2278
+ mb: 0.5,
2279
+ "&::after": {
2280
+ content: '" *"',
2281
+ color: "#333",
2282
+ fontWeight: "bold"
2283
+ }
2284
+ },
2285
+ children: [
2286
+ /* @__PURE__ */ e(
2287
+ O,
2288
+ {
2289
+ icon: vt,
2290
+ style: { marginRight: 6, opacity: 0.6 }
2291
+ }
2292
+ ),
2293
+ "Code"
2294
+ ]
2295
+ }
2296
+ ),
2269
2297
  /* @__PURE__ */ e(
2270
2298
  ne,
2271
2299
  {
@@ -2285,16 +2313,30 @@ const pt = {
2285
2313
  ] })
2286
2314
  ] }),
2287
2315
  /* @__PURE__ */ r(a, { className: "input-group", children: [
2288
- /* @__PURE__ */ r(T, { className: "input-label", sx: { mb: 0.8 }, children: [
2289
- /* @__PURE__ */ e(
2290
- O,
2291
- {
2292
- icon: Ct,
2293
- style: { marginRight: 6, opacity: 0.6 }
2294
- }
2295
- ),
2296
- "Query"
2297
- ] }),
2316
+ /* @__PURE__ */ r(
2317
+ T,
2318
+ {
2319
+ className: "input-label",
2320
+ sx: {
2321
+ mb: 0.8,
2322
+ "&::after": {
2323
+ content: '" *"',
2324
+ color: "#333",
2325
+ fontWeight: "bold"
2326
+ }
2327
+ },
2328
+ children: [
2329
+ /* @__PURE__ */ e(
2330
+ O,
2331
+ {
2332
+ icon: Ct,
2333
+ style: { marginRight: 6, opacity: 0.6 }
2334
+ }
2335
+ ),
2336
+ "Query"
2337
+ ]
2338
+ }
2339
+ ),
2298
2340
  /* @__PURE__ */ e(
2299
2341
  a,
2300
2342
  {
@@ -2362,7 +2404,7 @@ const pt = {
2362
2404
  /* @__PURE__ */ e(
2363
2405
  He,
2364
2406
  {
2365
- checked: l,
2407
+ checked: o,
2366
2408
  onChange: (n) => {
2367
2409
  const c = n.target.checked;
2368
2410
  y(c), c || re("");
@@ -2374,16 +2416,30 @@ const pt = {
2374
2416
  ),
2375
2417
  /* @__PURE__ */ r(a, { sx: { display: "flex", gap: 2, flexWrap: "wrap" }, children: [
2376
2418
  /* @__PURE__ */ r(a, { className: "input-group", sx: { flex: 1, minWidth: 250 }, children: [
2377
- /* @__PURE__ */ r(T, { className: "input-label", sx: { mb: 0.8 }, children: [
2378
- /* @__PURE__ */ e(
2379
- O,
2380
- {
2381
- icon: Ut,
2382
- style: { marginRight: 6, opacity: 0.6 }
2383
- }
2384
- ),
2385
- "Fetch Type Keys"
2386
- ] }),
2419
+ /* @__PURE__ */ r(
2420
+ T,
2421
+ {
2422
+ className: "input-label",
2423
+ sx: {
2424
+ mb: 0.8,
2425
+ "&::after": {
2426
+ content: '" *"',
2427
+ color: "#333",
2428
+ fontWeight: "bold"
2429
+ }
2430
+ },
2431
+ children: [
2432
+ /* @__PURE__ */ e(
2433
+ O,
2434
+ {
2435
+ icon: Ut,
2436
+ style: { marginRight: 6, opacity: 0.6 }
2437
+ }
2438
+ ),
2439
+ "Fetch Type Keys"
2440
+ ]
2441
+ }
2442
+ ),
2387
2443
  /* @__PURE__ */ e(
2388
2444
  ye,
2389
2445
  {
@@ -2427,16 +2483,30 @@ const pt = {
2427
2483
  )
2428
2484
  ] }),
2429
2485
  /* @__PURE__ */ r(a, { className: "input-group", sx: { flex: 1, minWidth: 250 }, children: [
2430
- /* @__PURE__ */ r(T, { className: "input-label", sx: { mb: 0.8 }, children: [
2431
- /* @__PURE__ */ e(
2432
- O,
2433
- {
2434
- icon: Et,
2435
- style: { marginRight: 6, opacity: 0.6 }
2436
- }
2437
- ),
2438
- "History Key"
2439
- ] }),
2486
+ /* @__PURE__ */ r(
2487
+ T,
2488
+ {
2489
+ className: "input-label",
2490
+ sx: {
2491
+ mb: 0.8,
2492
+ "&::after": {
2493
+ content: '" *"',
2494
+ color: "#333",
2495
+ fontWeight: "bold"
2496
+ }
2497
+ },
2498
+ children: [
2499
+ /* @__PURE__ */ e(
2500
+ O,
2501
+ {
2502
+ icon: Et,
2503
+ style: { marginRight: 6, opacity: 0.6 }
2504
+ }
2505
+ ),
2506
+ "History Key"
2507
+ ]
2508
+ }
2509
+ ),
2440
2510
  /* @__PURE__ */ e(
2441
2511
  ye,
2442
2512
  {
@@ -2473,16 +2543,30 @@ const pt = {
2473
2543
  )
2474
2544
  ] }),
2475
2545
  /* @__PURE__ */ r(a, { className: "input-group", sx: { flex: 1, minWidth: 250 }, children: [
2476
- /* @__PURE__ */ r(T, { className: "input-label", sx: { mb: 0.8 }, children: [
2477
- /* @__PURE__ */ e(
2478
- O,
2479
- {
2480
- icon: Et,
2481
- style: { marginRight: 6, opacity: 0.6 }
2482
- }
2483
- ),
2484
- "Exclude Vaccine Key"
2485
- ] }),
2546
+ /* @__PURE__ */ r(
2547
+ T,
2548
+ {
2549
+ className: "input-label",
2550
+ sx: {
2551
+ mb: 0.8,
2552
+ "&::after": {
2553
+ content: '" *"',
2554
+ color: "#333",
2555
+ fontWeight: "bold"
2556
+ }
2557
+ },
2558
+ children: [
2559
+ /* @__PURE__ */ e(
2560
+ O,
2561
+ {
2562
+ icon: Et,
2563
+ style: { marginRight: 6, opacity: 0.6 }
2564
+ }
2565
+ ),
2566
+ "Exclude Vaccine Key"
2567
+ ]
2568
+ }
2569
+ ),
2486
2570
  /* @__PURE__ */ e(
2487
2571
  ye,
2488
2572
  {
@@ -2519,7 +2603,7 @@ const pt = {
2519
2603
  )
2520
2604
  ] })
2521
2605
  ] }),
2522
- l && /* @__PURE__ */ r(a, { className: "input-group", children: [
2606
+ o && /* @__PURE__ */ r(a, { className: "input-group", children: [
2523
2607
  /* @__PURE__ */ r(T, { className: "input-label", sx: { mb: 0.8 }, children: [
2524
2608
  /* @__PURE__ */ e(
2525
2609
  O,
@@ -2598,7 +2682,7 @@ const pt = {
2598
2682
  "Allowed Base Dates"
2599
2683
  ] }),
2600
2684
  /* @__PURE__ */ e(
2601
- le,
2685
+ oe,
2602
2686
  {
2603
2687
  variant: "text",
2604
2688
  size: "small",
@@ -2648,7 +2732,7 @@ const pt = {
2648
2732
  ) : i.length > 0 ? /* @__PURE__ */ e(
2649
2733
  Xe,
2650
2734
  {
2651
- component: lt,
2735
+ component: ot,
2652
2736
  elevation: 0,
2653
2737
  sx: {
2654
2738
  border: "1.5px solid var(--color-gray4)",
@@ -2771,7 +2855,7 @@ const pt = {
2771
2855
  },
2772
2856
  children: [
2773
2857
  /* @__PURE__ */ e(
2774
- le,
2858
+ oe,
2775
2859
  {
2776
2860
  onClick: () => {
2777
2861
  j(), h(!1);
@@ -2788,7 +2872,7 @@ const pt = {
2788
2872
  }
2789
2873
  ),
2790
2874
  /* @__PURE__ */ e(
2791
- le,
2875
+ oe,
2792
2876
  {
2793
2877
  onClick: s,
2794
2878
  className: "add-btn",
@@ -2799,7 +2883,7 @@ const pt = {
2799
2883
  ]
2800
2884
  }
2801
2885
  ) : /* @__PURE__ */ e(
2802
- le,
2886
+ oe,
2803
2887
  {
2804
2888
  onClick: () => h(!0),
2805
2889
  className: "add-btn",
@@ -2830,12 +2914,12 @@ jt.propTypes = {
2830
2914
  open: b.bool.isRequired,
2831
2915
  onClose: b.func.isRequired
2832
2916
  };
2833
- const Xt = ({ value: t, onChange: o }) => /* @__PURE__ */ r(
2917
+ const Xt = ({ value: t, onChange: l }) => /* @__PURE__ */ r(
2834
2918
  _e,
2835
2919
  {
2836
2920
  size: "small",
2837
2921
  value: t,
2838
- onChange: o,
2922
+ onChange: l,
2839
2923
  sx: {
2840
2924
  fontSize: "12px",
2841
2925
  height: "32px",
@@ -2864,13 +2948,13 @@ const Xt = ({ value: t, onChange: o }) => /* @__PURE__ */ r(
2864
2948
  /* @__PURE__ */ e(ge, { value: "years", sx: { fontSize: "12px" }, children: "years" })
2865
2949
  ]
2866
2950
  }
2867
- ), Pr = (t) => !t || typeof t == "string" && t.toLowerCase() === "birth" ? 0 : parseInt(t) || 0, ht = (t, o) => {
2951
+ ), Pr = (t) => !t || typeof t == "string" && t.toLowerCase() === "birth" ? 0 : parseInt(t) || 0, ht = (t, l) => {
2868
2952
  if (!t || typeof t == "string" && t.toLowerCase() === "birth") return 0;
2869
2953
  const u = parseInt(t) || 0;
2870
- return o === "weeks" ? u * 7 : o === "months" ? u * 30 : o === "years" ? u * 365 : u;
2954
+ return l === "weeks" ? u * 7 : l === "months" ? u * 30 : l === "years" ? u * 365 : u;
2871
2955
  }, rt = ({
2872
2956
  defaultValue: t,
2873
- error: o,
2957
+ error: l,
2874
2958
  onFieldUpdate: u,
2875
2959
  unit: i = "days",
2876
2960
  onUnitChange: v
@@ -2884,7 +2968,7 @@ const Xt = ({ value: t, onChange: o }) => /* @__PURE__ */ r(
2884
2968
  const g = Math.max(0, parseInt(I) || 0);
2885
2969
  u(`${g} ${i}`);
2886
2970
  };
2887
- return /* @__PURE__ */ r(a, { sx: { position: "relative", mb: o ? 3.5 : 0 }, children: [
2971
+ return /* @__PURE__ */ r(a, { sx: { position: "relative", mb: l ? 3.5 : 0 }, children: [
2888
2972
  /* @__PURE__ */ r(a, { sx: { display: "flex", gap: 0.5, alignItems: "center" }, children: [
2889
2973
  /* @__PURE__ */ e(
2890
2974
  ne,
@@ -2894,7 +2978,7 @@ const Xt = ({ value: t, onChange: o }) => /* @__PURE__ */ r(
2894
2978
  value: C.toString(),
2895
2979
  onChange: h,
2896
2980
  inputProps: { min: 0 },
2897
- className: `dose-input duration-qty ${o ? "error-input" : ""}`,
2981
+ className: `dose-input duration-qty ${l ? "error-input" : ""}`,
2898
2982
  sx: {
2899
2983
  flex: 1,
2900
2984
  minWidth: "70px",
@@ -2918,14 +3002,14 @@ const Xt = ({ value: t, onChange: o }) => /* @__PURE__ */ r(
2918
3002
  }
2919
3003
  )
2920
3004
  ] }),
2921
- o && /* @__PURE__ */ r(
3005
+ l && /* @__PURE__ */ r(
2922
3006
  a,
2923
3007
  {
2924
3008
  className: "error-msg",
2925
3009
  sx: { position: "absolute", top: "100%", mt: 1, left: 0 },
2926
3010
  children: [
2927
3011
  /* @__PURE__ */ e(O, { icon: yt }),
2928
- o
3012
+ l
2929
3013
  ]
2930
3014
  }
2931
3015
  )
@@ -2940,7 +3024,7 @@ rt.propTypes = {
2940
3024
  };
2941
3025
  const Yt = ({
2942
3026
  doses: t = [],
2943
- doseType: o = "FIXED",
3027
+ doseType: l = "FIXED",
2944
3028
  doseCount: u = 0,
2945
3029
  durationUnits: i,
2946
3030
  onDurationUnitsUpdate: v = () => {
@@ -2961,7 +3045,7 @@ const Yt = ({
2961
3045
  index: null,
2962
3046
  value: "",
2963
3047
  anchorEl: null
2964
- }), E = o === "FIXED", Y = {
3048
+ }), E = l === "FIXED", Y = {
2965
3049
  px: E ? 2.5 : 0.5,
2966
3050
  minWidth: E ? 180 : 118,
2967
3051
  width: E ? 180 : 118
@@ -2972,7 +3056,7 @@ const Yt = ({
2972
3056
  };
2973
3057
  let K = [];
2974
3058
  u > 0 && (E ? K = t && typeof t == "object" && !Array.isArray(t) ? [t] : Array.isArray(t) && t.length > 0 ? [t[0]] : [] : K = (Array.isArray(t) ? t : []).slice(0, u));
2975
- const q = (l, y, G) => {
3059
+ const q = (o, y, G) => {
2976
3060
  let L = G;
2977
3061
  if (y === "interval" && (L = G === "" ? "" : Math.max(0, parseInt(G) || 0)), E) {
2978
3062
  const f = {
@@ -2983,13 +3067,13 @@ const Yt = ({
2983
3067
  } else {
2984
3068
  const f = Array.isArray(t) ? t : [], P = f.map((J, re) => {
2985
3069
  let N = { ...J };
2986
- return y === "isBooster" ? G && re >= l ? N.isBooster = !0 : !G && re <= l && (N.isBooster = !1, delete N.alias) : re === l && (y === "alias" && !L ? delete N.alias : N[y] = L), re === f.length - 1 && (N.interval = 0), N;
3070
+ return y === "isBooster" ? G && re >= o ? N.isBooster = !0 : !G && re <= o && (N.isBooster = !1, delete N.alias) : re === o && (y === "alias" && !L ? delete N.alias : N[y] = L), re === f.length - 1 && (N.interval = 0), N;
2987
3071
  });
2988
3072
  C(P);
2989
3073
  }
2990
- }, Q = (l, y, G) => {
3074
+ }, Q = (o, y, G) => {
2991
3075
  const f = (Array.isArray(t) ? t : []).map((P, J) => {
2992
- if (J !== l) return P;
3076
+ if (J !== o) return P;
2993
3077
  const N = { ...P.units || {
2994
3078
  eligibleFrom: "days",
2995
3079
  eligibleTo: "days",
@@ -3021,7 +3105,7 @@ const Yt = ({
3021
3105
  anchorEl: null
3022
3106
  }));
3023
3107
  }, te = () => {
3024
- C(K.filter((l, y) => y !== I.index)), g({ open: !1, index: null });
3108
+ C(K.filter((o, y) => y !== I.index)), g({ open: !1, index: null });
3025
3109
  };
3026
3110
  return /* @__PURE__ */ r(a, { className: "left-panel", children: [
3027
3111
  /* @__PURE__ */ r(
@@ -3049,7 +3133,7 @@ const Yt = ({
3049
3133
  children: /* @__PURE__ */ e(
3050
3134
  a,
3051
3135
  {
3052
- className: `toggle-option ${o === "FIXED" ? "active" : ""}`,
3136
+ className: `toggle-option ${l === "FIXED" ? "active" : ""}`,
3053
3137
  onClick: () => h("FIXED"),
3054
3138
  children: "Fixed"
3055
3139
  }
@@ -3065,7 +3149,7 @@ const Yt = ({
3065
3149
  children: /* @__PURE__ */ e(
3066
3150
  a,
3067
3151
  {
3068
- className: `toggle-option ${o === "FLEXIBLE" ? "active" : ""}`,
3152
+ className: `toggle-option ${l === "FLEXIBLE" ? "active" : ""}`,
3069
3153
  onClick: () => h("FLEXIBLE"),
3070
3154
  children: "Flexible"
3071
3155
  }
@@ -3133,21 +3217,21 @@ const Yt = ({
3133
3217
  )
3134
3218
  ] })
3135
3219
  ] }) }),
3136
- /* @__PURE__ */ e(Je, { children: K && K.length > 0 ? K.map((l, y) => {
3220
+ /* @__PURE__ */ e(Je, { children: K && K.length > 0 ? K.map((o, y) => {
3137
3221
  var w, D, d, x, m, W, j;
3138
3222
  const G = S[y] || {}, L = G.eligibleFrom;
3139
3223
  let f = G.eligibleTo;
3140
3224
  const P = G.interval;
3141
3225
  let J = G.overdue;
3142
- const re = E ? p.eligibleFrom || "days" : ((w = l == null ? void 0 : l.units) == null ? void 0 : w.eligibleFrom) || "days", N = E ? p.eligibleTo || "days" : ((D = l == null ? void 0 : l.units) == null ? void 0 : D.eligibleTo) || "days", z = ((d = l == null ? void 0 : l.units) == null ? void 0 : d.overdue) || "days", k = ht(l == null ? void 0 : l.eligibleFrom, re), V = ht(l == null ? void 0 : l.eligibleTo, N), Z = ht(l == null ? void 0 : l.overdue, z);
3143
- return !f && V > 0 && V <= k && (f = "Must be strictly greater than Eligible From"), !J && (l == null ? void 0 : l.overdue) !== void 0 && (l == null ? void 0 : l.overdue) !== null && (l == null ? void 0 : l.overdue) !== "" && (Z < k || Z > V) && (J = "Must be between Eligible From and Eligible To"), /* @__PURE__ */ r(xe, { children: [
3226
+ const re = E ? p.eligibleFrom || "days" : ((w = o == null ? void 0 : o.units) == null ? void 0 : w.eligibleFrom) || "days", N = E ? p.eligibleTo || "days" : ((D = o == null ? void 0 : o.units) == null ? void 0 : D.eligibleTo) || "days", z = ((d = o == null ? void 0 : o.units) == null ? void 0 : d.overdue) || "days", k = ht(o == null ? void 0 : o.eligibleFrom, re), V = ht(o == null ? void 0 : o.eligibleTo, N), Z = ht(o == null ? void 0 : o.overdue, z);
3227
+ return !f && V > 0 && V <= k && (f = "Must be strictly greater than Eligible From"), !J && (o == null ? void 0 : o.overdue) !== void 0 && (o == null ? void 0 : o.overdue) !== null && (o == null ? void 0 : o.overdue) !== "" && (Z < k || Z > V) && (J = "Must be between Eligible From and Eligible To"), /* @__PURE__ */ r(xe, { children: [
3144
3228
  /* @__PURE__ */ e(B, { sx: $, children: y + 1 }),
3145
3229
  /* @__PURE__ */ e(B, { sx: Y, children: /* @__PURE__ */ e(
3146
3230
  rt,
3147
3231
  {
3148
- defaultValue: l == null ? void 0 : l.eligibleFrom,
3149
- error: L || (l == null ? void 0 : l.error),
3150
- unit: E ? p.eligibleFrom || "days" : ((x = l == null ? void 0 : l.units) == null ? void 0 : x.eligibleFrom) || "days",
3232
+ defaultValue: o == null ? void 0 : o.eligibleFrom,
3233
+ error: L || (o == null ? void 0 : o.error),
3234
+ unit: E ? p.eligibleFrom || "days" : ((x = o == null ? void 0 : o.units) == null ? void 0 : x.eligibleFrom) || "days",
3151
3235
  onUnitChange: (X) => E ? v({
3152
3236
  ...p,
3153
3237
  eligibleFrom: X
@@ -3158,9 +3242,9 @@ const Yt = ({
3158
3242
  /* @__PURE__ */ e(B, { sx: Y, children: /* @__PURE__ */ e(
3159
3243
  rt,
3160
3244
  {
3161
- defaultValue: l == null ? void 0 : l.eligibleTo,
3245
+ defaultValue: o == null ? void 0 : o.eligibleTo,
3162
3246
  error: f,
3163
- unit: E ? p.eligibleTo || "days" : ((m = l == null ? void 0 : l.units) == null ? void 0 : m.eligibleTo) || "days",
3247
+ unit: E ? p.eligibleTo || "days" : ((m = o == null ? void 0 : o.units) == null ? void 0 : m.eligibleTo) || "days",
3164
3248
  onUnitChange: (X) => E ? v({
3165
3249
  ...p,
3166
3250
  eligibleTo: X
@@ -3197,7 +3281,7 @@ const Yt = ({
3197
3281
  {
3198
3282
  size: "small",
3199
3283
  type: "number",
3200
- value: String((l == null ? void 0 : l.interval) ?? 0),
3284
+ value: String((o == null ? void 0 : o.interval) ?? 0),
3201
3285
  inputProps: { min: 0 },
3202
3286
  onChange: (X) => q(
3203
3287
  y,
@@ -3224,7 +3308,7 @@ const Yt = ({
3224
3308
  /* @__PURE__ */ e(
3225
3309
  Xt,
3226
3310
  {
3227
- value: E ? p.interval || "days" : ((W = l == null ? void 0 : l.units) == null ? void 0 : W.interval) || "days",
3311
+ value: E ? p.interval || "days" : ((W = o == null ? void 0 : o.units) == null ? void 0 : W.interval) || "days",
3228
3312
  onChange: (X) => E ? v({
3229
3313
  ...p,
3230
3314
  interval: X.target.value
@@ -3260,9 +3344,9 @@ const Yt = ({
3260
3344
  !E && /* @__PURE__ */ e(B, { sx: Y, children: /* @__PURE__ */ e(
3261
3345
  rt,
3262
3346
  {
3263
- defaultValue: l == null ? void 0 : l.overdue,
3347
+ defaultValue: o == null ? void 0 : o.overdue,
3264
3348
  error: J,
3265
- unit: ((j = l == null ? void 0 : l.units) == null ? void 0 : j.overdue) || "days",
3349
+ unit: ((j = o == null ? void 0 : o.units) == null ? void 0 : j.overdue) || "days",
3266
3350
  onUnitChange: (X) => Q(y, "overdue", X),
3267
3351
  onFieldUpdate: (X) => q(y, "overdue", X)
3268
3352
  }
@@ -3280,10 +3364,10 @@ const Yt = ({
3280
3364
  },
3281
3365
  children: [
3282
3366
  /* @__PURE__ */ e(
3283
- lr,
3367
+ or,
3284
3368
  {
3285
3369
  size: "small",
3286
- checked: !!(l != null && l.isBooster),
3370
+ checked: !!(o != null && o.isBooster),
3287
3371
  onChange: (X) => q(
3288
3372
  y,
3289
3373
  "isBooster",
@@ -3291,7 +3375,7 @@ const Yt = ({
3291
3375
  )
3292
3376
  }
3293
3377
  ),
3294
- (l == null ? void 0 : l.isBooster) && /* @__PURE__ */ e(
3378
+ (o == null ? void 0 : o.isBooster) && /* @__PURE__ */ e(
3295
3379
  $e,
3296
3380
  {
3297
3381
  title: "Add booster alias",
@@ -3304,19 +3388,19 @@ const Yt = ({
3304
3388
  sx: {
3305
3389
  width: 20,
3306
3390
  height: 20,
3307
- bgcolor: l != null && l.alias ? "#e8f5ee" : "#f5f7fa",
3308
- color: l != null && l.alias ? "#11b666" : "#657584",
3391
+ bgcolor: o != null && o.alias ? "#e8f5ee" : "#f5f7fa",
3392
+ color: o != null && o.alias ? "#11b666" : "#657584",
3309
3393
  border: "1px solid",
3310
- borderColor: l != null && l.alias ? "#b7e4cb" : "#d9e0e7",
3394
+ borderColor: o != null && o.alias ? "#b7e4cb" : "#d9e0e7",
3311
3395
  boxShadow: "0 1px 2px rgba(57, 77, 97, 0.12)",
3312
3396
  "&:hover": {
3313
- bgcolor: l != null && l.alias ? "#d9efe4" : "#edf1f5"
3397
+ bgcolor: o != null && o.alias ? "#d9efe4" : "#edf1f5"
3314
3398
  }
3315
3399
  },
3316
3400
  onClick: (X) => F({
3317
3401
  open: !0,
3318
3402
  index: y,
3319
- value: (l == null ? void 0 : l.alias) || "",
3403
+ value: (o == null ? void 0 : o.alias) || "",
3320
3404
  anchorEl: X.currentTarget
3321
3405
  }),
3322
3406
  children: /* @__PURE__ */ e(O, { icon: We, fontSize: 9 })
@@ -3341,7 +3425,7 @@ const Yt = ({
3341
3425
  children: /* @__PURE__ */ e(O, { icon: st })
3342
3426
  }
3343
3427
  ) })
3344
- ] }, l.id || y);
3428
+ ] }, o.id || y);
3345
3429
  }) : /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e(
3346
3430
  B,
3347
3431
  {
@@ -3364,7 +3448,7 @@ const Yt = ({
3364
3448
  }
3365
3449
  ),
3366
3450
  /* @__PURE__ */ r(
3367
- or,
3451
+ lr,
3368
3452
  {
3369
3453
  open: U.open,
3370
3454
  anchorEl: U.anchorEl,
@@ -3421,9 +3505,9 @@ const Yt = ({
3421
3505
  size: "small",
3422
3506
  label: "Alias",
3423
3507
  value: U.value,
3424
- onChange: (l) => F((y) => ({
3508
+ onChange: (o) => F((y) => ({
3425
3509
  ...y,
3426
- value: l.target.value
3510
+ value: o.target.value
3427
3511
  }))
3428
3512
  }
3429
3513
  )
@@ -3434,7 +3518,7 @@ const Yt = ({
3434
3518
  sx: { display: "flex", justifyContent: "flex-end", gap: 1, mt: 1.5 },
3435
3519
  children: [
3436
3520
  /* @__PURE__ */ e(
3437
- le,
3521
+ oe,
3438
3522
  {
3439
3523
  onClick: () => F({
3440
3524
  open: !1,
@@ -3452,7 +3536,7 @@ const Yt = ({
3452
3536
  }
3453
3537
  ),
3454
3538
  /* @__PURE__ */ e(
3455
- le,
3539
+ oe,
3456
3540
  {
3457
3541
  variant: "contained",
3458
3542
  onClick: H,
@@ -3491,7 +3575,7 @@ const Yt = ({
3491
3575
  ) }),
3492
3576
  /* @__PURE__ */ r(Oe, { sx: { p: 2 }, children: [
3493
3577
  /* @__PURE__ */ e(
3494
- le,
3578
+ oe,
3495
3579
  {
3496
3580
  onClick: () => g({ open: !1, index: null }),
3497
3581
  sx: { color: "var(--color-gray1)", fontWeight: 700 },
@@ -3499,7 +3583,7 @@ const Yt = ({
3499
3583
  }
3500
3584
  ),
3501
3585
  /* @__PURE__ */ e(
3502
- le,
3586
+ oe,
3503
3587
  {
3504
3588
  variant: "contained",
3505
3589
  color: "error",
@@ -3549,9 +3633,9 @@ Yt.propTypes = {
3549
3633
  onDoseTypeChange: b.func.isRequired,
3550
3634
  errors: b.array
3551
3635
  };
3552
- const mt = async (t, o, u, i) => {
3636
+ const mt = async (t, l, u, i) => {
3553
3637
  const v = Array.isArray(t) ? t : [t], C = {
3554
- level: o,
3638
+ level: l,
3555
3639
  fetchAccordingToUserAOI: u,
3556
3640
  languagePreference: i
3557
3641
  };
@@ -3561,7 +3645,7 @@ const mt = async (t, o, u, i) => {
3561
3645
  } catch (h) {
3562
3646
  console.error(h), ae({ type: "error", message: "Can not fetch next level locations" });
3563
3647
  }
3564
- }, zt = (t, o) => $t.get("/location/locationtypes", { params: t, ...o }), Qt = ({ regions: t = [], onUpdate: o }) => {
3648
+ }, zt = (t, l) => $t.get("/location/locationtypes", { params: t, ...l }), Qt = ({ regions: t = [], onUpdate: l }) => {
3565
3649
  var re;
3566
3650
  const { userWithToken: u } = Ne(
3567
3651
  (N) => N.Authenticate
@@ -3655,11 +3739,11 @@ const mt = async (t, o, u, i) => {
3655
3739
  } finally {
3656
3740
  I((V) => ({ ...V, [k]: !1 }));
3657
3741
  }
3658
- }, l = gt(null);
3742
+ }, o = gt(null);
3659
3743
  it.useEffect(() => {
3660
- i && l.current && setTimeout(() => {
3661
- l.current.scrollTo({
3662
- top: l.current.scrollHeight,
3744
+ i && o.current && setTimeout(() => {
3745
+ o.current.scrollTo({
3746
+ top: o.current.scrollHeight,
3663
3747
  behavior: "smooth"
3664
3748
  });
3665
3749
  }, 100);
@@ -3766,7 +3850,7 @@ const mt = async (t, o, u, i) => {
3766
3850
  fullPath: w,
3767
3851
  selectionMap: { ...E }
3768
3852
  };
3769
- o([...d, x]), L();
3853
+ l([...d, x]), L();
3770
3854
  }, P = (N) => async (z) => {
3771
3855
  const k = String(N.id || N.name), V = String(z.target.value);
3772
3856
  if (!V) return;
@@ -3888,7 +3972,7 @@ const mt = async (t, o, u, i) => {
3888
3972
  {
3889
3973
  className: "delete",
3890
3974
  size: "small",
3891
- onClick: () => o(t.filter((k, V) => V !== z)),
3975
+ onClick: () => l(t.filter((k, V) => V !== z)),
3892
3976
  children: /* @__PURE__ */ e(O, { icon: st })
3893
3977
  }
3894
3978
  )
@@ -3937,12 +4021,12 @@ const mt = async (t, o, u, i) => {
3937
4021
  ]
3938
4022
  }
3939
4023
  ),
3940
- /* @__PURE__ */ r(Ae, { ref: l, sx: { mt: 0.5, py: 1 }, children: [
4024
+ /* @__PURE__ */ r(Ae, { ref: o, sx: { mt: 0.5, py: 1 }, children: [
3941
4025
  g.map((N, z) => J(N, z)),
3942
4026
  C && g.length === 0 && /* @__PURE__ */ e(a, { sx: { display: "flex", justifyContent: "center", p: 3 }, children: /* @__PURE__ */ e(qe, { size: 24 }) })
3943
4027
  ] }),
3944
4028
  /* @__PURE__ */ e(Oe, { sx: { p: 2, pt: 0.5 }, children: /* @__PURE__ */ e(
3945
- le,
4029
+ oe,
3946
4030
  {
3947
4031
  variant: "contained",
3948
4032
  fullWidth: !0,
@@ -3990,7 +4074,7 @@ const Rt = {
3990
4074
  }
3991
4075
  }, Jt = ({
3992
4076
  dependencies: t = [],
3993
- onUpdate: o,
4077
+ onUpdate: l,
3994
4078
  vaccineOptions: u = [],
3995
4079
  errors: i = []
3996
4080
  }) => {
@@ -4002,12 +4086,12 @@ const Rt = {
4002
4086
  minGap: 0,
4003
4087
  maxGap: 0
4004
4088
  };
4005
- o([...t, S]);
4089
+ l([...t, S]);
4006
4090
  }, C = (S) => {
4007
- o(t.filter((I, g) => g !== S));
4091
+ l(t.filter((I, g) => g !== S));
4008
4092
  }, h = (S, I, g) => {
4009
4093
  const p = t.map((U, F) => F === S ? I === "requirement" ? { ...U, [I]: g, minGap: 0, maxGap: 0 } : { ...U, [I]: g } : U);
4010
- o(p);
4094
+ l(p);
4011
4095
  };
4012
4096
  return /* @__PURE__ */ e(a, { className: "dependency-section", children: /* @__PURE__ */ r(a, { className: "side-card dependency-item", sx: { overflow: "visible" }, children: [
4013
4097
  /* @__PURE__ */ r(a, { className: "card-header", children: [
@@ -4243,7 +4327,7 @@ Jt.propTypes = {
4243
4327
  };
4244
4328
  const Zt = ({
4245
4329
  vaccineId: t,
4246
- currentDoses: o,
4330
+ currentDoses: l,
4247
4331
  currentDoseDetails: u,
4248
4332
  maxDoses: i,
4249
4333
  onChange: v
@@ -4287,7 +4371,7 @@ const Zt = ({
4287
4371
  _e,
4288
4372
  {
4289
4373
  size: "small",
4290
- value: o,
4374
+ value: l,
4291
4375
  onChange: S,
4292
4376
  sx: { minWidth: 80, bgcolor: "var(--color-background2)" },
4293
4377
  MenuProps: {
@@ -4310,7 +4394,7 @@ const Zt = ({
4310
4394
  )
4311
4395
  }
4312
4396
  ),
4313
- /* @__PURE__ */ e("span", { children: o > 1 ? "Doses" : "Dose" })
4397
+ /* @__PURE__ */ e("span", { children: l > 1 ? "Doses" : "Dose" })
4314
4398
  ] }),
4315
4399
  /* @__PURE__ */ r(
4316
4400
  we,
@@ -4380,7 +4464,7 @@ const Zt = ({
4380
4464
  ] }),
4381
4465
  /* @__PURE__ */ r(Oe, { sx: { p: 2 }, children: [
4382
4466
  /* @__PURE__ */ e(
4383
- le,
4467
+ oe,
4384
4468
  {
4385
4469
  onClick: () => h({ ...C, open: !1 }),
4386
4470
  sx: { color: "var(--color-gray1)", fontWeight: 700 },
@@ -4388,7 +4472,7 @@ const Zt = ({
4388
4472
  }
4389
4473
  ),
4390
4474
  /* @__PURE__ */ e(
4391
- le,
4475
+ oe,
4392
4476
  {
4393
4477
  variant: "contained",
4394
4478
  color: "error",
@@ -4413,7 +4497,7 @@ Zt.propTypes = {
4413
4497
  maxDoses: b.number.isRequired,
4414
4498
  onChange: b.func.isRequired
4415
4499
  };
4416
- const er = ({ filters: t = [], onUpdate: o }) => {
4500
+ const er = ({ filters: t = [], onUpdate: l }) => {
4417
4501
  const { filtersMaster: u = [] } = Ne((h) => h.immunization), i = u.filter((h) => h.is_active), v = i.filter(
4418
4502
  (h) => t.some(
4419
4503
  (S) => (typeof S == "string" ? S : S.code) === h.code
@@ -4446,7 +4530,7 @@ const er = ({ filters: t = [], onUpdate: o }) => {
4446
4530
  getOptionLabel: (h) => h.name || h.code || "",
4447
4531
  value: v,
4448
4532
  onChange: (h, S) => {
4449
- o(S.map((I) => I.code));
4533
+ l(S.map((I) => I.code));
4450
4534
  },
4451
4535
  renderOption: (h, S, { selected: I }) => /* @__PURE__ */ r("li", { ...h, style: { fontSize: "13px", padding: "8px 12px" }, children: [
4452
4536
  /* @__PURE__ */ e(
@@ -4528,18 +4612,18 @@ const Ur = ["CVX", "MVX", "SNOMED-CT"], Ot = {
4528
4612
  color: "var(--color-text)",
4529
4613
  fontWeight: "bold"
4530
4614
  }
4531
- }, tr = ({ codeSets: t = [], onUpdate: o, errors: u = [] }) => {
4615
+ }, tr = ({ codeSets: t = [], onUpdate: l, errors: u = [] }) => {
4532
4616
  const i = () => {
4533
4617
  const h = {
4534
4618
  type: "",
4535
4619
  value: ""
4536
4620
  };
4537
- o([...t, h]);
4621
+ l([...t, h]);
4538
4622
  }, v = (h) => {
4539
- o(t.filter((S, I) => I !== h));
4623
+ l(t.filter((S, I) => I !== h));
4540
4624
  }, C = (h, S, I) => {
4541
4625
  const g = t.map((p, U) => U === h ? { ...p, [S]: I } : p);
4542
- o(g);
4626
+ l(g);
4543
4627
  };
4544
4628
  return /* @__PURE__ */ e(a, { className: "dependency-section", sx: { mt: 2 }, children: /* @__PURE__ */ r(a, { className: "side-card dependency-item", sx: { overflow: "visible" }, children: [
4545
4629
  /* @__PURE__ */ r(a, { className: "card-header", children: [
@@ -4693,10 +4777,10 @@ tr.propTypes = {
4693
4777
  };
4694
4778
  const rr = ({
4695
4779
  vaccineId: t,
4696
- vaccines: o,
4780
+ vaccines: l,
4697
4781
  scheduledVaccines: u
4698
4782
  }) => {
4699
- const i = o.find((S) => S.id === t), v = u.find((S) => S.id === t), C = (i == null ? void 0 : i.doseType) || "FIXED", h = v ? { ...v } : {
4783
+ const i = l.find((S) => S.id === t), v = u.find((S) => S.id === t), C = (i == null ? void 0 : i.doseType) || "FIXED", h = v ? { ...v } : {
4700
4784
  id: (i == null ? void 0 : i.id) || t,
4701
4785
  name: (i == null ? void 0 : i.name) || "N.A.",
4702
4786
  doses: (i == null ? void 0 : i.doses) || 0,
@@ -4720,7 +4804,7 @@ const rr = ({
4720
4804
  eligibleTo: "days",
4721
4805
  interval: "days"
4722
4806
  },
4723
- eligibility: oe.calculateOverallEligibility(
4807
+ eligibility: le.calculateOverallEligibility(
4724
4808
  h == null ? void 0 : h.doseDetails,
4725
4809
  h == null ? void 0 : h.doseType,
4726
4810
  h == null ? void 0 : h.doses
@@ -4728,11 +4812,11 @@ const rr = ({
4728
4812
  };
4729
4813
  }, $r = ({
4730
4814
  vaccines: t,
4731
- editedVaccines: o,
4815
+ editedVaccines: l,
4732
4816
  scheduledVaccines: u,
4733
4817
  showInactive: i
4734
4818
  }) => t.map(
4735
- (v) => o[v.id] || rr({
4819
+ (v) => l[v.id] || rr({
4736
4820
  vaccineId: v.id,
4737
4821
  vaccines: t,
4738
4822
  scheduledVaccines: u
@@ -4742,9 +4826,9 @@ const rr = ({
4742
4826
  return Number(C.isActive) - Number(v.isActive);
4743
4827
  const h = v.name || "", S = C.name || "";
4744
4828
  return h.localeCompare(S);
4745
- }), Gr = (t, o) => {
4829
+ }), Gr = (t, l) => {
4746
4830
  const u = t.find(
4747
- (v) => v.code === o
4831
+ (v) => v.code === l
4748
4832
  ), i = u == null ? void 0 : u.config;
4749
4833
  if (!i) return [];
4750
4834
  if (typeof i == "object")
@@ -4754,7 +4838,7 @@ const rr = ({
4754
4838
  } catch {
4755
4839
  return [];
4756
4840
  }
4757
- }, Wt = (t) => !t || typeof t == "string" && t.toLowerCase() === "birth" ? 0 : Number.parseInt(t) || 0, Kr = (t, o, u, i = {}) => {
4841
+ }, Wt = (t) => !t || typeof t == "string" && t.toLowerCase() === "birth" ? 0 : Number.parseInt(t) || 0, Kr = (t, l, u, i = {}) => {
4758
4842
  if (u === 0) return null;
4759
4843
  const v = [], C = Array.isArray(t) ? t : [t], h = i.eligibleFrom || "days", S = i.eligibleTo || "days", I = i.interval || "days", g = (p, U) => {
4760
4844
  if (!p || typeof p == "string" && p.toLowerCase() === "birth") return 0;
@@ -4764,77 +4848,77 @@ const rr = ({
4764
4848
  return C.forEach((p, U) => {
4765
4849
  const F = p.units || {}, E = F.eligibleFrom || h, Y = F.eligibleTo || S, $ = F.interval || I, K = {}, q = g(p.eligibleFrom, E), Q = g(p.eligibleTo, Y);
4766
4850
  (p.eligibleFrom === void 0 || p.eligibleFrom === null || p.eligibleFrom === "") && U !== 0 && (K.eligibleFrom = "Eligible From is required"), (p.eligibleTo === void 0 || p.eligibleTo === null || p.eligibleTo === "" || g(p.eligibleTo, Y) === 0) && (K.eligibleTo = "Eligible To is required");
4767
- const H = o === "FLEXIBLE" && U === C.length - 1;
4768
- if (o === "FIXED" && u > 1 || !H && o === "FLEXIBLE") {
4769
- const l = Number.parseInt(p.interval) || 0, y = g(p.interval, $);
4770
- p.interval === void 0 || p.interval === null || p.interval === "" || l === 0 || p.interval === "0 days" ? K.interval = "Interval is required" : o === "FIXED" && u > 1 && (u - 1) * y > Q - q && (K.interval = `Number of doses not possible in the window. Total interval exceeds available window (${Q - q} days).`);
4851
+ const H = l === "FLEXIBLE" && U === C.length - 1;
4852
+ if (l === "FIXED" && u > 1 || !H && l === "FLEXIBLE") {
4853
+ const o = Number.parseInt(p.interval) || 0, y = g(p.interval, $);
4854
+ p.interval === void 0 || p.interval === null || p.interval === "" || o === 0 || p.interval === "0 days" ? K.interval = "Interval is required" : l === "FIXED" && u > 1 && (u - 1) * y > Q - q && (K.interval = `Number of doses not possible in the window. Total interval exceeds available window (${Q - q} days).`);
4771
4855
  }
4772
- if (Q <= q && p.eligibleFrom && p.eligibleTo && (K.eligibleTo = "Must be strictly greater than ELIGIBLE FROM"), o === "FLEXIBLE") {
4773
- const l = F.overdue || "days", y = g(p.overdue, l);
4856
+ if (Q <= q && p.eligibleFrom && p.eligibleTo && (K.eligibleTo = "Must be strictly greater than ELIGIBLE FROM"), l === "FLEXIBLE") {
4857
+ const o = F.overdue || "days", y = g(p.overdue, o);
4774
4858
  p.overdue === void 0 || p.overdue === null || p.overdue === "" ? K.overdue = "Overdue is required" : (y < q || y > Q) && (K.overdue = "Must be between ELIGIBLE FROM and ELIGIBLE TO");
4775
4859
  }
4776
- if (U > 0 && o === "FLEXIBLE") {
4777
- const l = C[U - 1], y = l.units || {}, G = y.eligibleFrom || h, L = y.interval || I, f = g(l.eligibleFrom, G), P = g(l.interval, L);
4778
- q < f + P && (K.eligibleFrom = "Must be greater than previous ELIGIBLE FROM and INTERVAL"), l.isBooster && !p.isBooster && (K.isBooster = "A regular dose cannot follow a booster dose");
4860
+ if (U > 0 && l === "FLEXIBLE") {
4861
+ const o = C[U - 1], y = o.units || {}, G = y.eligibleFrom || h, L = y.interval || I, f = g(o.eligibleFrom, G), P = g(o.interval, L);
4862
+ q < f + P && (K.eligibleFrom = "Must be greater than previous ELIGIBLE FROM and INTERVAL"), o.isBooster && !p.isBooster && (K.isBooster = "A regular dose cannot follow a booster dose");
4779
4863
  }
4780
4864
  Object.keys(K).length > 0 && (v[U] = K);
4781
4865
  }), v.length > 0 ? v : null;
4782
4866
  }, Hr = (t) => {
4783
- const o = [], u = /* @__PURE__ */ new Set();
4867
+ const l = [], u = /* @__PURE__ */ new Set();
4784
4868
  return t.forEach((i, v) => {
4785
4869
  const C = {};
4786
4870
  i.vaccine ? (u.has(i.vaccine) && (C.vaccine = "This vaccine is already added as a dependency"), u.add(i.vaccine)) : C.vaccine = "Vaccine selection is required";
4787
4871
  const h = i.minGap === "" || i.minGap === null || i.minGap === void 0, S = i.maxGap === "" || i.maxGap === null || i.maxGap === void 0, I = Wt(i.minGap), g = Wt(i.maxGap);
4788
- i.requirement === "Should be given" || i.requirement === "Optional" ? (h ? C.minGap = "Gap cannot be empty" : I <= 0 && (C.minGap = "Must be greater than 0"), !h && !S && I > 0 && g > 0 && g <= I && (C.maxGap = "Max gap must be greater than Min Gap")) : (!h && I < 0 && (C.minGap = "Gap cannot be negative"), !S && g < 0 && (C.maxGap = "Gap cannot be negative")), Object.keys(C).length > 0 && (o[v] = C);
4789
- }), o.some((i) => i && Object.keys(i).length > 0) ? o : null;
4872
+ i.requirement === "Should be given" || i.requirement === "Optional" ? (h ? C.minGap = "Gap cannot be empty" : I <= 0 && (C.minGap = "Must be greater than 0"), !h && !S && I > 0 && g > 0 && g <= I && (C.maxGap = "Max gap must be greater than Min Gap")) : (!h && I < 0 && (C.minGap = "Gap cannot be negative"), !S && g < 0 && (C.maxGap = "Gap cannot be negative")), Object.keys(C).length > 0 && (l[v] = C);
4873
+ }), l.some((i) => i && Object.keys(i).length > 0) ? l : null;
4790
4874
  }, jr = (t) => {
4791
- const o = [], u = /* @__PURE__ */ new Set();
4875
+ const l = [], u = /* @__PURE__ */ new Set();
4792
4876
  return (t || []).forEach((i, v) => {
4793
4877
  const C = {};
4794
- i.type ? (u.has(i.type) && (C.type = "This type is already added"), u.add(i.type)) : C.type = "Type is required", (!i.value || i.value.trim() === "") && (C.value = "Value is required"), Object.keys(C).length > 0 && (o[v] = C);
4795
- }), o.some((i) => i && Object.keys(i).length > 0) ? o : null;
4878
+ i.type ? (u.has(i.type) && (C.type = "This type is already added"), u.add(i.type)) : C.type = "Type is required", (!i.value || i.value.trim() === "") && (C.value = "Value is required"), Object.keys(C).length > 0 && (l[v] = C);
4879
+ }), l.some((i) => i && Object.keys(i).length > 0) ? l : null;
4796
4880
  }, Xr = (t) => {
4797
- const o = {};
4798
- (!t.name || t.name.trim() === "") && (o.name = "Vaccine Name is required"), t.recipientType || (o.recipientType = "Recipient Type is required"), t.baseDateCode || (o.baseDateCode = "Base Date is required"), (!t.doses || t.doses === 0) && (o.doses = "At least one dose is required");
4881
+ const l = {};
4882
+ (!t.name || t.name.trim() === "") && (l.name = "Vaccine Name is required"), t.recipientType || (l.recipientType = "Recipient Type is required"), t.baseDateCode || (l.baseDateCode = "Base Date is required"), (!t.doses || t.doses === 0) && (l.doses = "At least one dose is required");
4799
4883
  const u = Kr(
4800
4884
  t.doseDetails,
4801
4885
  t.doseType,
4802
4886
  t.doses,
4803
4887
  t.durationUnits
4804
4888
  );
4805
- u && (o.doseDetails = u);
4889
+ u && (l.doseDetails = u);
4806
4890
  const i = Hr(t.dependencies || []);
4807
- i && (o.dependencies = i);
4891
+ i && (l.dependencies = i);
4808
4892
  const v = jr(t.codeSets || []);
4809
- return v && (o.codeSets = v), Object.keys(o).length > 0 ? o : null;
4893
+ return v && (l.codeSets = v), Object.keys(l).length > 0 ? l : null;
4810
4894
  }, Yr = 10, Lt = (t) => {
4811
4895
  if (!t) return "N.A.";
4812
- const o = t.trim();
4813
- if (o === "N.A." || o === "null days" || o === "")
4896
+ const l = t.trim();
4897
+ if (l === "N.A." || l === "null days" || l === "")
4814
4898
  return "N.A.";
4815
- const u = o.match(/^(\d+)\s*(days?|weeks?|months?|years?)$/i);
4899
+ const u = l.match(/^(\d+)\s*(days?|weeks?|months?|years?)$/i);
4816
4900
  if (u) {
4817
4901
  const i = parseInt(u[1]), v = u[2].toLowerCase();
4818
4902
  return i === 0 ? "From Start" : v.startsWith("year") ? `${i} ${i === 1 ? "Year" : "Years"}` : v.startsWith("month") ? `${i} ${i === 1 ? "Month" : "Months"}` : v.startsWith("week") ? `${i} ${i === 1 ? "Week" : "Weeks"}` : `${i} ${i === 1 ? "Day" : "Days"}`;
4819
4903
  }
4820
4904
  }, Qr = (t) => {
4821
4905
  var g, p, U, F, E, Y;
4822
- const o = ($) => !$ || typeof $ == "string" && $.toLowerCase() === "birth" ? 0 : Number.parseInt($) || 0, u = (() => {
4906
+ const l = ($) => !$ || typeof $ == "string" && $.toLowerCase() === "birth" ? 0 : Number.parseInt($) || 0, u = (() => {
4823
4907
  if (t.doseType === "FIXED") return "[]";
4824
4908
  let $ = 0, K = 0;
4825
4909
  return JSON.stringify(
4826
4910
  (t.doseDetails || []).map((q, Q, H) => {
4827
- var l, y, G, L;
4911
+ var o, y, G, L;
4828
4912
  let te;
4829
4913
  return q.isBooster ? (K++, te = `B${K}`) : ($++, te = $), {
4830
4914
  dose: te,
4831
4915
  is_booster: !!q.isBooster,
4832
4916
  ...q.isBooster && q.alias ? { alias: q.alias.trim() } : {},
4833
- eligible_from: o(q.eligibleFrom),
4834
- eligible_to: o(q.eligibleTo),
4835
- overdue: o(q.overdue),
4917
+ eligible_from: l(q.eligibleFrom),
4918
+ eligible_to: l(q.eligibleTo),
4919
+ overdue: l(q.overdue),
4836
4920
  min_gap: Q === H.length - 1 ? 0 : Number.parseInt(q.interval) || 0,
4837
- eligible_from_unit: ((l = q.units) == null ? void 0 : l.eligibleFrom) || "days",
4921
+ eligible_from_unit: ((o = q.units) == null ? void 0 : o.eligibleFrom) || "days",
4838
4922
  eligible_to_unit: ((y = q.units) == null ? void 0 : y.eligibleTo) || "days",
4839
4923
  interval_unit: ((G = q.units) == null ? void 0 : G.interval) || "days",
4840
4924
  overdue_unit: ((L = q.units) == null ? void 0 : L.overdue) || "days"
@@ -4874,13 +4958,13 @@ const rr = ({
4874
4958
  dose: u,
4875
4959
  doseType: t.doseType,
4876
4960
  status: t.isActive,
4877
- fixedEligibleFrom: t.doseType === "FIXED" ? o(
4961
+ fixedEligibleFrom: t.doseType === "FIXED" ? l(
4878
4962
  Array.isArray(t.doseDetails) ? (g = t.doseDetails[0]) == null ? void 0 : g.eligibleFrom : (p = t.doseDetails) == null ? void 0 : p.eligibleFrom
4879
4963
  ) : null,
4880
- fixedEligibleTo: t.doseType === "FIXED" ? o(
4964
+ fixedEligibleTo: t.doseType === "FIXED" ? l(
4881
4965
  Array.isArray(t.doseDetails) ? (U = t.doseDetails[0]) == null ? void 0 : U.eligibleTo : (F = t.doseDetails) == null ? void 0 : F.eligibleTo
4882
4966
  ) : null,
4883
- fixedInterval: t.doseType === "FIXED" && t.doses > 1 ? o(
4967
+ fixedInterval: t.doseType === "FIXED" && t.doses > 1 ? l(
4884
4968
  Array.isArray(t.doseDetails) ? (E = t.doseDetails[0]) == null ? void 0 : E.interval : (Y = t.doseDetails) == null ? void 0 : Y.interval
4885
4969
  ) : t.doseType === "FIXED" ? 0 : null,
4886
4970
  location: i,
@@ -4895,13 +4979,13 @@ const rr = ({
4895
4979
  }, Jr = () => {
4896
4980
  var Ze;
4897
4981
  const t = Re(), {
4898
- scheduledVaccines: o,
4982
+ scheduledVaccines: l,
4899
4983
  vaccines: u,
4900
4984
  validationErrors: i,
4901
4985
  featureRights: v,
4902
4986
  recipientMaster: C,
4903
4987
  baseDateMaster: h
4904
- } = Ne((s) => s.immunization), [S, I] = M(null), [g, p] = M(!1), [U, F] = M(!1), [E, Y] = M(!1), [$, K] = M(!1), [q, Q] = M(!1), [H, te] = M({}), l = v == null ? void 0 : v["update.admin.immunizationConfiguration.filter"], y = v == null ? void 0 : v["update.admin.immunizationConfiguration.recipient"], [G, L] = M({
4988
+ } = Ne((s) => s.immunization), [S, I] = M(null), [g, p] = M(!1), [U, F] = M(!1), [E, Y] = M(!1), [$, K] = M(!1), [q, Q] = M(!1), [H, te] = M({}), o = v == null ? void 0 : v["update.admin.immunizationConfiguration.filter"], y = v == null ? void 0 : v["update.admin.immunizationConfiguration.recipient"], [G, L] = M({
4905
4989
  open: !1,
4906
4990
  vaccineId: null,
4907
4991
  newStatus: null
@@ -4919,9 +5003,9 @@ const rr = ({
4919
5003
  (s) => rr({
4920
5004
  vaccineId: s,
4921
5005
  vaccines: u,
4922
- scheduledVaccines: o
5006
+ scheduledVaccines: l
4923
5007
  }),
4924
- [u, o]
5008
+ [u, l]
4925
5009
  ), N = ce(
4926
5010
  (s, n, c = !0) => {
4927
5011
  te((R) => {
@@ -4941,7 +5025,7 @@ const rr = ({
4941
5025
  ..._,
4942
5026
  doses: n,
4943
5027
  doseDetails: ee,
4944
- eligibility: oe.calculateOverallEligibility(
5028
+ eligibility: le.calculateOverallEligibility(
4945
5029
  ee,
4946
5030
  R,
4947
5031
  n
@@ -4958,7 +5042,7 @@ const rr = ({
4958
5042
  ...R,
4959
5043
  doses: _,
4960
5044
  doseDetails: n,
4961
- eligibility: oe.calculateOverallEligibility(
5045
+ eligibility: le.calculateOverallEligibility(
4962
5046
  n,
4963
5047
  c,
4964
5048
  _
@@ -5036,7 +5120,7 @@ const rr = ({
5036
5120
  ...c,
5037
5121
  doseType: n,
5038
5122
  doseDetails: R,
5039
- eligibility: oe.calculateOverallEligibility(
5123
+ eligibility: le.calculateOverallEligibility(
5040
5124
  R,
5041
5125
  n,
5042
5126
  c.doses
@@ -5064,7 +5148,7 @@ const rr = ({
5064
5148
  }, [f, d]), W = ce(async () => {
5065
5149
  const { vaccineId: s, newStatus: n } = G;
5066
5150
  try {
5067
- await oe.updateVaccineStatus({
5151
+ await le.updateVaccineStatus({
5068
5152
  parameters: {
5069
5153
  vaccineId: s,
5070
5154
  status: n
@@ -5165,7 +5249,7 @@ const rr = ({
5165
5249
  }, fe = (s) => {
5166
5250
  t(Bt({ ...s, isActive: !0 })), F(!1);
5167
5251
  }, ke = async (s) => {
5168
- const n = H[s] || o.find((c) => c.id === s) || re(s);
5252
+ const n = H[s] || l.find((c) => c.id === s) || re(s);
5169
5253
  if (n) {
5170
5254
  const c = Xr(n);
5171
5255
  if (c) {
@@ -5177,7 +5261,7 @@ const rr = ({
5177
5261
  }
5178
5262
  const R = Qr(n);
5179
5263
  try {
5180
- await oe.updateImmunization(R), t(vr(n)), t(dt(s)), ae({
5264
+ await le.updateImmunization(R), t(vr(n)), t(dt(s)), ae({
5181
5265
  message: "Vaccine details updated successfully!",
5182
5266
  type: "success"
5183
5267
  }), te((_) => {
@@ -5195,9 +5279,9 @@ const rr = ({
5195
5279
  }, ct = me(() => $r({
5196
5280
  vaccines: u,
5197
5281
  editedVaccines: H,
5198
- scheduledVaccines: o,
5282
+ scheduledVaccines: l,
5199
5283
  showInactive: g
5200
- }), [u, H, o, g]);
5284
+ }), [u, H, l, g]);
5201
5285
  return /* @__PURE__ */ r(a, { className: "immunization-summary", children: [
5202
5286
  /* @__PURE__ */ r(a, { className: "header-section", children: [
5203
5287
  /* @__PURE__ */ r(a, { className: "title-group", children: [
@@ -5240,7 +5324,7 @@ const rr = ({
5240
5324
  }
5241
5325
  ),
5242
5326
  y && /* @__PURE__ */ e(
5243
- le,
5327
+ oe,
5244
5328
  {
5245
5329
  variant: "contained",
5246
5330
  startIcon: /* @__PURE__ */ e(O, { icon: Ke }),
@@ -5259,7 +5343,7 @@ const rr = ({
5259
5343
  }
5260
5344
  ),
5261
5345
  y && /* @__PURE__ */ e(
5262
- le,
5346
+ oe,
5263
5347
  {
5264
5348
  variant: "contained",
5265
5349
  startIcon: /* @__PURE__ */ e(O, { icon: Pe }),
@@ -5277,8 +5361,8 @@ const rr = ({
5277
5361
  children: "Configure Base Date"
5278
5362
  }
5279
5363
  ),
5280
- l && /* @__PURE__ */ e(
5281
- le,
5364
+ o && /* @__PURE__ */ e(
5365
+ oe,
5282
5366
  {
5283
5367
  variant: "contained",
5284
5368
  startIcon: /* @__PURE__ */ e(O, { icon: at }),
@@ -5297,7 +5381,7 @@ const rr = ({
5297
5381
  }
5298
5382
  ),
5299
5383
  /* @__PURE__ */ e(
5300
- le,
5384
+ oe,
5301
5385
  {
5302
5386
  variant: "contained",
5303
5387
  startIcon: /* @__PURE__ */ e(O, { icon: We }),
@@ -5317,7 +5401,7 @@ const rr = ({
5317
5401
  )
5318
5402
  ] })
5319
5403
  ] }),
5320
- /* @__PURE__ */ e(Xe, { component: lt, className: "table-container", children: /* @__PURE__ */ r(Ye, { stickyHeader: !0, children: [
5404
+ /* @__PURE__ */ e(Xe, { component: ot, className: "table-container", children: /* @__PURE__ */ r(Ye, { stickyHeader: !0, children: [
5321
5405
  /* @__PURE__ */ e(Qe, { children: /* @__PURE__ */ r(xe, { children: [
5322
5406
  /* @__PURE__ */ e(B, { className: "header-cell", children: "SR. NO." }),
5323
5407
  /* @__PURE__ */ e(B, { className: "header-cell", children: "VACCINE NAME" }),
@@ -5677,7 +5761,7 @@ const rr = ({
5677
5761
  ] }),
5678
5762
  /* @__PURE__ */ r(a, { className: "expansion-footer", children: [
5679
5763
  /* @__PURE__ */ e(
5680
- le,
5764
+ oe,
5681
5765
  {
5682
5766
  variant: "outlined",
5683
5767
  className: "discard-btn",
@@ -5686,7 +5770,7 @@ const rr = ({
5686
5770
  }
5687
5771
  ),
5688
5772
  /* @__PURE__ */ e(
5689
- le,
5773
+ oe,
5690
5774
  {
5691
5775
  variant: "contained",
5692
5776
  className: "save-btn",
@@ -5768,7 +5852,7 @@ const rr = ({
5768
5852
  "schedule-config": Or,
5769
5853
  summary: Jr
5770
5854
  }, yi = () => {
5771
- const t = Re(), { currentViewId: o, isConfigLoaded: u } = Ne(
5855
+ const t = Re(), { currentViewId: l, isConfigLoaded: u } = Ne(
5772
5856
  (S) => S.immunization
5773
5857
  ), [i, v] = M(!u), C = gt(!1);
5774
5858
  Ve(() => {
@@ -5783,7 +5867,7 @@ const rr = ({
5783
5867
  try {
5784
5868
  v(!0);
5785
5869
  const [F, E] = await Promise.allSettled([
5786
- oe.checkImmunizationConfigurationInitiation({}),
5870
+ le.checkImmunizationConfigurationInitiation({}),
5787
5871
  Rr("techo.manage.immunizationConfiguration")
5788
5872
  ]);
5789
5873
  (E == null ? void 0 : E.status) === "fulfilled" && t(
@@ -5796,12 +5880,12 @@ const rr = ({
5796
5880
  t(nt("schedule-config")), t(ft(!0));
5797
5881
  return;
5798
5882
  }
5799
- const K = await oe.getImmunizationReferenceData();
5883
+ const K = await le.getImmunizationReferenceData();
5800
5884
  if (K) {
5801
- const q = (K == null ? void 0 : K.data) || [], Q = q[0], H = q[1], te = q[2], l = q[3];
5802
- if (Q != null && Q.result && t(Sr(Q.result)), H != null && H.result && t(Vt(H.result)), l != null && l.result && t(qt(l.result)), te != null && te.result) {
5885
+ const q = (K == null ? void 0 : K.data) || [], Q = q[0], H = q[1], te = q[2], o = q[3];
5886
+ if (Q != null && Q.result && t(Sr(Q.result)), H != null && H.result && t(Vt(H.result)), o != null && o.result && t(qt(o.result)), te != null && te.result) {
5803
5887
  const y = te.result.map(
5804
- oe.mapImmunizationVaccineConfig
5888
+ le.mapImmunizationVaccineConfig
5805
5889
  );
5806
5890
  t(Mt(y));
5807
5891
  }
@@ -5817,10 +5901,10 @@ const rr = ({
5817
5901
  }
5818
5902
  })();
5819
5903
  }, [t, u]);
5820
- const h = Zr[o] || Gt;
5904
+ const h = Zr[l] || Gt;
5821
5905
  return i && !u ? /* @__PURE__ */ e(a, { className: "flex justify-center items-center w-full h-[60vh]", children: /* @__PURE__ */ e(qe, { color: "primary" }) }) : /* @__PURE__ */ e("div", { className: "immunization-configuration-base-wrapper", children: /* @__PURE__ */ e(h, {}) });
5822
5906
  };
5823
5907
  export {
5824
5908
  yi as default
5825
5909
  };
5826
- //# sourceMappingURL=ImmunizationConfigurationBase-CTBoSuSz.js.map
5910
+ //# sourceMappingURL=ImmunizationConfigurationBase-BevKZx_l.js.map