@argusoft/medplat-core 1.0.26 → 1.0.28

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 (58) hide show
  1. package/dist/{AccessRights-CupmTG3T.js → AccessRights-CHu27ZOw.js} +220 -217
  2. package/dist/AccessRights-CHu27ZOw.js.map +1 -0
  3. package/dist/{AddEditQueryBuilder-C8ZSkOF0.js → AddEditQueryBuilder-Brdnm6rQ.js} +2 -2
  4. package/dist/{AddEditQueryBuilder-C8ZSkOF0.js.map → AddEditQueryBuilder-Brdnm6rQ.js.map} +1 -1
  5. package/dist/{AddFeatures-CqE3v0BN.js → AddFeatures-C0Z29oSd.js} +2 -2
  6. package/dist/{AddFeatures-CqE3v0BN.js.map → AddFeatures-C0Z29oSd.js.map} +1 -1
  7. package/dist/{AddLabelModal-CB8E8cYG.js → AddLabelModal-DFllBVcd.js} +2 -2
  8. package/dist/{AddLabelModal-CB8E8cYG.js.map → AddLabelModal-DFllBVcd.js.map} +1 -1
  9. package/dist/{AppModal-BKgIwe1h.js → AppModal-CtG2GjD_.js} +2 -2
  10. package/dist/{AppModal-BKgIwe1h.js.map → AppModal-CtG2GjD_.js.map} +1 -1
  11. package/dist/{ChangePasswordModalCore-DTYWRTa-.js → ChangePasswordModalCore-CDxkeIIM.js} +2 -2
  12. package/dist/{ChangePasswordModalCore-DTYWRTa-.js.map → ChangePasswordModalCore-CDxkeIIM.js.map} +1 -1
  13. package/dist/{EventConfigurations-lPcZGpLi.js → EventConfigurations-kNtAj_WM.js} +76 -76
  14. package/dist/EventConfigurations-kNtAj_WM.js.map +1 -0
  15. package/dist/{FeatureMenu-DUZL32RI.js → FeatureMenu-jl7-Tk6y.js} +49 -49
  16. package/dist/FeatureMenu-jl7-Tk6y.js.map +1 -0
  17. package/dist/{ImmunizationConfigurationBase-BevKZx_l.js → ImmunizationConfigurationBase-DZGqwda2.js} +470 -470
  18. package/dist/ImmunizationConfigurationBase-DZGqwda2.js.map +1 -0
  19. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js → ImmunizationConfigurationsList-DdSZicTP.js} +72 -73
  20. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js.map → ImmunizationConfigurationsList-DdSZicTP.js.map} +1 -1
  21. package/dist/{LanguagesModal-CX3oS8rk.js → LanguagesModal-D6VfaGrl.js} +2 -2
  22. package/dist/{LanguagesModal-CX3oS8rk.js.map → LanguagesModal-D6VfaGrl.js.map} +1 -1
  23. package/dist/{ManageNotification-CSl02Wq7.js → ManageNotification-CaBAOhji.js} +2 -2
  24. package/dist/{ManageNotification-CSl02Wq7.js.map → ManageNotification-CaBAOhji.js.map} +1 -1
  25. package/dist/{ManageRole-B9bs_T00.js → ManageRole-CGYfglpo.js} +2 -2
  26. package/dist/{ManageRole-B9bs_T00.js.map → ManageRole-CGYfglpo.js.map} +1 -1
  27. package/dist/{ManageTranslation-D9IScGhk.js → ManageTranslation-B4C9-lWD.js} +74 -74
  28. package/dist/ManageTranslation-B4C9-lWD.js.map +1 -0
  29. package/dist/{ManageUser-AB3_Vfp_.js → ManageUser-AY1EUDLI.js} +600 -601
  30. package/dist/{ManageUser-AB3_Vfp_.js.map → ManageUser-AY1EUDLI.js.map} +1 -1
  31. package/dist/{NotificationList-D1U1LYnz.js → NotificationList-C3Vb_jKU.js} +73 -73
  32. package/dist/NotificationList-C3Vb_jKU.js.map +1 -0
  33. package/dist/{QueryBuilder-DI0wCJbz.js → QueryBuilder-z7eqfd7D.js} +117 -119
  34. package/dist/QueryBuilder-z7eqfd7D.js.map +1 -0
  35. package/dist/{QueryManagement-CRykYGum.js → QueryManagement-BIhEDKuA.js} +114 -114
  36. package/dist/QueryManagement-BIhEDKuA.js.map +1 -0
  37. package/dist/{RoleManagement-BIiW9uTq.js → RoleManagement-BPl2cE27.js} +99 -99
  38. package/dist/RoleManagement-BPl2cE27.js.map +1 -0
  39. package/dist/{SubMenu-CM_4wNCR.js → SubMenu-DYxAPH2Z.js} +34 -34
  40. package/dist/SubMenu-DYxAPH2Z.js.map +1 -0
  41. package/dist/{UserList-2gGuDgNa.js → UserList-Bc8gYxRL.js} +397 -400
  42. package/dist/UserList-Bc8gYxRL.js.map +1 -0
  43. package/dist/{WidgetList-B7X8Awkg.js → WidgetList-Dw_FmbbE.js} +26 -26
  44. package/dist/WidgetList-Dw_FmbbE.js.map +1 -0
  45. package/dist/index.js +11 -11
  46. package/package.json +1 -1
  47. package/dist/AccessRights-CupmTG3T.js.map +0 -1
  48. package/dist/EventConfigurations-lPcZGpLi.js.map +0 -1
  49. package/dist/FeatureMenu-DUZL32RI.js.map +0 -1
  50. package/dist/ImmunizationConfigurationBase-BevKZx_l.js.map +0 -1
  51. package/dist/ManageTranslation-D9IScGhk.js.map +0 -1
  52. package/dist/NotificationList-D1U1LYnz.js.map +0 -1
  53. package/dist/QueryBuilder-DI0wCJbz.js.map +0 -1
  54. package/dist/QueryManagement-CRykYGum.js.map +0 -1
  55. package/dist/RoleManagement-BIiW9uTq.js.map +0 -1
  56. package/dist/SubMenu-CM_4wNCR.js.map +0 -1
  57. package/dist/UserList-2gGuDgNa.js.map +0 -1
  58. package/dist/WidgetList-B7X8Awkg.js.map +0 -1
@@ -1,29 +1,29 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { useState as c, useRef as D, useEffect as T, useMemo as fe, useCallback as pe, Suspense as G, lazy as Y } from "react";
3
- import { useTranslateProvider as ge } from "@/common/languageTranslator/TranslationContext";
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { useState as c, useRef as D, useEffect as I, useMemo as fe, useCallback as pe, Suspense as G, lazy as Y } from "react";
3
+ import { useTranslateProvider as he } from "@/common/languageTranslator/TranslationContext";
4
4
  import { api as M } from "@/common/interceptors/AxiosInterceptor";
5
5
  import E from "@/common/config/implementationConfig";
6
- import { getNotifications as H, getAllRoleList as he } from "@/common/services/GlobalApis";
6
+ import { getNotifications as H, getAllRoleList as ge } from "@/common/services/GlobalApis";
7
7
  import ye from "@/common/syncWithServer/SyncWithServerDialog";
8
- import { showToast as I } from "@/common/toaster/toaster";
8
+ import { showToast as T } from "@/common/toaster/toaster";
9
9
  import be from "@/views/custom-components/CustomConfirmationModal";
10
- import { debounce as xe, Card as Ne, Typography as J, Box as S, FormControlLabel as q, Checkbox as K, TextField as ve, Button as we } from "@mui/material";
11
- import { Grid as A } from "@mui/system";
10
+ import { debounce as xe, Card as Ne, Typography as J, Box as S, FormControlLabel as q, Checkbox as K, TextField as ve, Button as Ce } from "@mui/material";
11
+ import { Grid as k } from "@mui/system";
12
12
  import v from "prop-types";
13
13
  import { useSelector as Z } from "react-redux";
14
14
  import { getUseSkeleton as ee } from "@/store/reducers/SkeletonReducer";
15
- import Ce from "@/hooks/useTrackEvent";
16
- import Te from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
17
- import { faPen as Ie, faBars as Se } from "@fortawesome/free-solid-svg-icons";
15
+ import we from "@/hooks/useTrackEvent";
16
+ import Ie from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
17
+ import { faPen as Te, faBars as Se } from "@fortawesome/free-solid-svg-icons";
18
18
  import { FontAwesomeIcon as X } from "@fortawesome/react-fontawesome";
19
- import k from "@/common/services/util/GeneralUtil";
20
- import { getAssignedFeatures as Ae } from "@/utils/feature";
21
- const ke = ({ id: s, state: r }) => M.put(
22
- E.api.useQueryParamStyle ? `notificationtype/toggleActive?id=${s}&is_active=${r === "INACTIVE" ? "true" : "false"}` : `notificationtype/${s}?is_active=${r === "INACTIVE" ? "true" : "false"}`
23
- ), Ze = (s) => M.post(E.api.useQueryParamStyle ? "notificationtype/create" : "notificationtype", s), et = (s) => M.post(E.api.useQueryParamStyle ? "notificationtype/update" : "notificationtype", s), te = ({ children: s, isLoading: r }) => !Z(ee) || !r ? s : /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
24
- /* @__PURE__ */ o("div", { className: "flex space-between justify-between m-[0px]", children: [
19
+ import A from "@/common/services/util/GeneralUtil";
20
+ import { getAssignedFeatures as ke } from "@/utils/feature";
21
+ const Ae = ({ id: o, state: r }) => M.put(
22
+ E.api.useQueryParamStyle ? `notificationtype/toggleActive?id=${o}&is_active=${r === "INACTIVE" ? "true" : "false"}` : `notificationtype/${o}?is_active=${r === "INACTIVE" ? "true" : "false"}`
23
+ ), Ze = (o) => M.post(E.api.useQueryParamStyle ? "notificationtype/create" : "notificationtype", o), et = (o) => M.post(E.api.useQueryParamStyle ? "notificationtype/update" : "notificationtype", o), te = ({ children: o, isLoading: r }) => !Z(ee) || !r ? o : /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
24
+ /* @__PURE__ */ s("div", { className: "flex space-between justify-between m-[0px]", children: [
25
25
  /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[130px] h-[40px]" }),
26
- /* @__PURE__ */ o("div", { className: "flex", children: [
26
+ /* @__PURE__ */ s("div", { className: "flex", children: [
27
27
  /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[150px] h-[40px] mx-[5px]" }),
28
28
  /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[100px] h-[40px]" })
29
29
  ] })
@@ -34,33 +34,33 @@ te.propTypes = {
34
34
  children: v.any,
35
35
  isLoading: v.any
36
36
  };
37
- const Me = ({ children: s, isLoading: r }) => !Z(ee) || !r ? s : /* @__PURE__ */ o("div", { className: "flex flex-col w-full md:w-[650px] bg-white ", children: [
37
+ const Me = ({ children: o, isLoading: r }) => !Z(ee) || !r ? o : /* @__PURE__ */ s("div", { className: "flex flex-col w-full md:w-[650px] bg-white ", children: [
38
38
  /* @__PURE__ */ e("div", { className: "px-2 py-2 flex items-center ", children: /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-60 h-10" }) }),
39
39
  /* @__PURE__ */ e("hr", {}),
40
- /* @__PURE__ */ o("div", { className: "flex flex-col w-full space-y-2 p-2", children: [
41
- /* @__PURE__ */ o("div", { className: "flex flex-col space-y-2", children: [
40
+ /* @__PURE__ */ s("div", { className: "flex flex-col w-full space-y-2 p-2", children: [
41
+ /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2", children: [
42
42
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
43
43
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
44
44
  ] }),
45
- /* @__PURE__ */ o("div", { className: "flex flex-col space-y-2 ", children: [
45
+ /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
46
46
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
47
47
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
48
48
  ] }),
49
- /* @__PURE__ */ o("div", { className: "flex flex-col space-y-2 ", children: [
49
+ /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
50
50
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
51
51
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
52
52
  ] }),
53
- /* @__PURE__ */ o("div", { className: "flex flex-col space-y-2 ", children: [
53
+ /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
54
54
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
55
55
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
56
56
  ] }),
57
- /* @__PURE__ */ o("div", { className: "flex flex-col space-y-2 ", children: [
57
+ /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
58
58
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
59
59
  /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
60
60
  ] })
61
61
  ] }),
62
62
  /* @__PURE__ */ e("hr", {}),
63
- /* @__PURE__ */ o("div", { className: "px-2 py-2 w-full flex space-x-3 items-center justify-end ", children: [
63
+ /* @__PURE__ */ s("div", { className: "px-2 py-2 w-full flex space-x-3 items-center justify-end ", children: [
64
64
  /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-20 h-10" }),
65
65
  /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-20 h-10" })
66
66
  ] })
@@ -69,9 +69,9 @@ Me.propTypes = {
69
69
  children: v.any,
70
70
  isLoading: v.any
71
71
  };
72
- const Ee = Y(() => import("./ManageNotification-CSl02Wq7.js")), Oe = Y(() => import("./NotificationFlywayQuery-BY8Zzml_.js"));
72
+ const Ee = Y(() => import("./ManageNotification-CaBAOhji.js")), Oe = Y(() => import("./NotificationFlywayQuery-BY8Zzml_.js"));
73
73
  function Le() {
74
- const s = Ce(), [r, x] = c(""), [w, O] = c([]), [L, g] = c([]), [h, u] = c(""), [n, N] = c({}), [C, ae] = c([]), { translate: m } = ge(), [_, B] = c(null), [F, p] = c(!1), [d, ie] = c({}), oe = [
74
+ const o = we(), [r, x] = c(""), [C, O] = c([]), [L, h] = c([]), [g, u] = c(""), [n, N] = c({}), [w, ae] = c([]), { translate: m } = he(), [_, B] = c(null), [F, p] = c(!1), [d, ie] = c({}), se = [
75
75
  {
76
76
  field: "notificationName",
77
77
  label: "Name",
@@ -100,34 +100,34 @@ function Le() {
100
100
  align: "left"
101
101
  },
102
102
  { field: "Actions", label: "Actions", align: "left" }
103
- ], [se, ne] = c(oe), [y, le] = c(!0), [b, ce] = c(!0), V = D(y), P = D(b);
104
- T(() => {
103
+ ], [oe, ne] = c(se), [y, le] = c(!0), [b, ce] = c(!0), V = D(y), P = D(b);
104
+ I(() => {
105
105
  V.current = y;
106
- }, [y]), T(() => {
106
+ }, [y]), I(() => {
107
107
  P.current = b;
108
108
  }, [b]);
109
109
  const re = async () => {
110
110
  try {
111
- p((i) => !i), await ke({ id: n.id, state: n.state }), u("");
111
+ p((i) => !i), await Ae({ id: n.id, state: n.state }), u("");
112
112
  const { data: t } = await H();
113
- O(t), g(t), I({
113
+ O(t), h(t), T({
114
114
  type: "success",
115
115
  message: `State succesfully changed from ${(n == null ? void 0 : n.state) === "INACTIVE" ? "inactive" : "active"} to ${(n == null ? void 0 : n.state) === "INACTIVE" ? "active" : "inactive"}`
116
116
  }), p((i) => !i);
117
117
  } catch (t) {
118
- I({
118
+ T({
119
119
  type: "error",
120
120
  message: `Error ${t}`
121
121
  }), p((i) => !i);
122
122
  }
123
123
  }, de = fe(() => (t) => {
124
124
  const i = [];
125
- (!k.isTecho || d != null && d["update.manage.notificationlist"]) && i.push({
125
+ A.hasCheckRights(d == null ? void 0 : d["update.manage.notificationlist"]) && i.push({
126
126
  label: "",
127
127
  icon: /* @__PURE__ */ e(
128
128
  X,
129
129
  {
130
- icon: Ie,
130
+ icon: Te,
131
131
  "data-testid": "notificationlist-button-edit"
132
132
  }
133
133
  ),
@@ -136,7 +136,7 @@ function Le() {
136
136
  }
137
137
  });
138
138
  const l = [];
139
- return (!k.isTecho || d != null && d["update.manage.notificationlist"]) && (l.push({
139
+ return A.hasCheckRights(d == null ? void 0 : d["update.manage.notificationlist"]) && (l.push({
140
140
  label: m(
141
141
  t.state === "ACTIVE" ? "Mark as Inactive" : "Mark as Active"
142
142
  ),
@@ -147,7 +147,7 @@ function Le() {
147
147
  label: m("Sync With Server"),
148
148
  onClick: (a) => {
149
149
  if (!a.uuid) {
150
- I({
150
+ T({
151
151
  type: "info",
152
152
  message: "No configuration found. Please open the respective feature item and save it."
153
153
  });
@@ -171,24 +171,24 @@ function Le() {
171
171
  ),
172
172
  menuItems: l
173
173
  }), i;
174
- }, [d, m]), $ = pe(
174
+ }, [d, m]), R = pe(
175
175
  xe((t) => {
176
- const i = w.filter(
176
+ const i = C.filter(
177
177
  (l) => {
178
178
  var a;
179
179
  return ((a = l.notificationName) == null ? void 0 : a.toLowerCase().includes(t)) && l.state === (V.current ? "ACTIVE" : "INACTIVE") && l.notificationType === (P.current ? "MO" : "WEB");
180
180
  }
181
181
  );
182
- s("search_tracking", {
182
+ o("search_tracking", {
183
183
  searchTerm: t,
184
184
  results_count: i.length,
185
185
  search_type: "Page Search"
186
- }), g(i);
186
+ }), h(i);
187
187
  }, 500),
188
- [w, s]
188
+ [C, o]
189
189
  ), ue = (t) => {
190
190
  const i = t.target.value.toLowerCase();
191
- x(i), $(i);
191
+ x(i), R(i);
192
192
  }, me = (t) => {
193
193
  const i = t.sortOrder === "asc" ? "desc" : "asc";
194
194
  ne(
@@ -199,35 +199,35 @@ function Le() {
199
199
  const z = (U = a[t.field]) == null ? void 0 : U.toString().toLowerCase(), Q = (W = f[t.field]) == null ? void 0 : W.toString().toLowerCase();
200
200
  return z < Q ? i === "asc" ? -1 : 1 : z > Q ? i === "asc" ? 1 : -1 : 0;
201
201
  });
202
- g(l);
203
- }, R = async () => {
202
+ h(l);
203
+ }, $ = async () => {
204
204
  try {
205
205
  p((a) => !a);
206
206
  const { data: t } = await H();
207
207
  O(t);
208
208
  const i = t.filter((a) => a.notificationType === "MO" && a.state === "ACTIVE");
209
- if (g(i), !C.length) {
210
- const { data: a } = await he();
209
+ if (h(i), !w.length) {
210
+ const { data: a } = await ge();
211
211
  ae(a);
212
212
  }
213
- const { data: l } = await Ae("techo.manage.notification");
213
+ const { data: l } = await ke("techo.manage.notification");
214
214
  ie(JSON.parse(l)), p((a) => !a), x("");
215
215
  } catch (t) {
216
216
  console.error("error", t), p((i) => !i);
217
217
  }
218
218
  };
219
- T(() => {
220
- R();
219
+ I(() => {
220
+ $();
221
221
  }, []);
222
222
  const j = (t, i) => {
223
223
  const l = i === "status" ? t : y, a = i === "notificationType" ? t : b;
224
- le(l), ce(a), r ? $(r) : g(
225
- w.filter(
224
+ le(l), ce(a), r ? R(r) : h(
225
+ C.filter(
226
226
  (f) => f.state === (l ? "ACTIVE" : "INACTIVE") && f.notificationType === (a ? "MO" : "WEB")
227
227
  )
228
228
  );
229
229
  };
230
- return /* @__PURE__ */ o(
230
+ return /* @__PURE__ */ s(
231
231
  Ne,
232
232
  {
233
233
  variant: "elevation",
@@ -237,28 +237,28 @@ function Le() {
237
237
  /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
238
238
  Ee,
239
239
  {
240
- open: h === 1 || h === 5,
240
+ open: g === 1 || g === 5,
241
241
  handleClose: () => u(""),
242
- data: h === 1 ? n : null,
243
- roleData: C,
244
- setNotifications: R,
242
+ data: g === 1 ? n : null,
243
+ roleData: w,
244
+ setNotifications: $,
245
245
  "data-testid": "notification-list-managenotification-dialog"
246
246
  }
247
247
  ) }),
248
248
  /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
249
249
  Oe,
250
250
  {
251
- open: h === 3,
251
+ open: g === 3,
252
252
  handleClose: () => u(""),
253
253
  data: n,
254
- roleData: C
254
+ roleData: w
255
255
  }
256
256
  ) }),
257
257
  /* @__PURE__ */ e(
258
258
  be,
259
259
  {
260
260
  title: "CONFIRM ACTION",
261
- open: h === 2,
261
+ open: g === 2,
262
262
  description: `Are you sure you want to change the state ${(n == null ? void 0 : n.state) === "INACTIVE" ? "inactive" : "active"} to ${(n == null ? void 0 : n.state) === "INACTIVE" ? "active" : "inactive"}`,
263
263
  handleClick: re,
264
264
  handleClose: () => u(""),
@@ -274,9 +274,9 @@ function Le() {
274
274
  dataTestId: "notification-list-syncwithserverdialog-dialog"
275
275
  }
276
276
  ),
277
- /* @__PURE__ */ o(te, { isLoading: F, children: [
278
- /* @__PURE__ */ o(A, { container: !0, className: "flex justify-between", children: [
279
- /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
277
+ /* @__PURE__ */ s(te, { isLoading: F, children: [
278
+ /* @__PURE__ */ s(k, { container: !0, className: "flex justify-between", children: [
279
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
280
280
  J,
281
281
  {
282
282
  variant: "body2",
@@ -285,8 +285,8 @@ function Le() {
285
285
  children: m("Notification Configuration")
286
286
  }
287
287
  ) }),
288
- /* @__PURE__ */ o(S, { className: "flex flex-col sm:flex-row sm:items-center gap-3 w-full sm:w-auto", children: [
289
- /* @__PURE__ */ o(S, { className: "flex items-center gap-3", children: [
288
+ /* @__PURE__ */ s(S, { className: "flex flex-col sm:flex-row sm:items-center gap-3 w-full sm:w-auto", children: [
289
+ /* @__PURE__ */ s(S, { className: "flex items-center gap-3", children: [
290
290
  /* @__PURE__ */ e(
291
291
  q,
292
292
  {
@@ -326,7 +326,7 @@ function Le() {
326
326
  }
327
327
  )
328
328
  ] }),
329
- /* @__PURE__ */ o(S, { className: "flex items-center gap-3 w-full sm:w-auto", children: [
329
+ /* @__PURE__ */ s(S, { className: "flex items-center gap-3 w-full sm:w-auto", children: [
330
330
  /* @__PURE__ */ e(
331
331
  ve,
332
332
  {
@@ -346,13 +346,13 @@ function Le() {
346
346
  }
347
347
  }
348
348
  ),
349
- (!k.isTecho || (d == null ? void 0 : d["create.manage.notificationlist"])) && /* @__PURE__ */ e(
350
- we,
349
+ A.hasCheckRights(d == null ? void 0 : d["create.manage.notificationlist"]) && /* @__PURE__ */ e(
350
+ Ce,
351
351
  {
352
352
  size: "small",
353
353
  variant: "contained",
354
354
  onClick: () => {
355
- s("button_click", {
355
+ o("button_click", {
356
356
  button_name: "notification-list-add-button",
357
357
  button_type: "navigate",
358
358
  button_id: "notification-list-button-add"
@@ -366,10 +366,10 @@ function Le() {
366
366
  ] })
367
367
  ] })
368
368
  ] }),
369
- /* @__PURE__ */ e(A, { size: { xs: 12 }, children: /* @__PURE__ */ e(
370
- Te,
369
+ /* @__PURE__ */ e(k, { size: { xs: 12 }, children: /* @__PURE__ */ e(
370
+ Ie,
371
371
  {
372
- columns: se,
372
+ columns: oe,
373
373
  actions: de,
374
374
  tableData: L,
375
375
  paginationConfig: {
@@ -400,4 +400,4 @@ export {
400
400
  Ze as c,
401
401
  et as u
402
402
  };
403
- //# sourceMappingURL=NotificationList-D1U1LYnz.js.map
403
+ //# sourceMappingURL=NotificationList-C3Vb_jKU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationList-C3Vb_jKU.js","sources":["../src/services/Notifications.js","../src/views/Notifications/Skeletons/NotificationsSkeletons.jsx","../src/views/Notifications/NotificationList.jsx"],"sourcesContent":["import { api } from \"@/common/interceptors/AxiosInterceptor\";\nimport implementationConfig from \"@/common/config/implementationConfig\";\nexport const toggleActiveState = ({ id, state }) =>\n api.put(\n implementationConfig.api.useQueryParamStyle ? `notificationtype/toggleActive?id=${id}&is_active=${state === \"INACTIVE\" ? \"true\" : \"false\"}` : `notificationtype/${id}?is_active=${state === \"INACTIVE\" ? \"true\" : \"false\"}`\n );\n\nexport const createNotification = (params) =>\n api.post(implementationConfig.api.useQueryParamStyle ? \"notificationtype/create\" : \"notificationtype\", params);\n\nexport const updateNotification = (params) =>\n api.post(implementationConfig.api.useQueryParamStyle ? \"notificationtype/update\" : \"notificationtype\", params);\n","import PropTypes from \"prop-types\";\nimport React from \"react\";\n\nimport { useSelector } from \"react-redux\";\nimport { getUseSkeleton } from \"@/store/reducers/SkeletonReducer\";\n\nexport const NotificationListSkeleton = ({ children, isLoading }) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) {\n return children;\n }\n\n return (\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex space-between justify-between m-[0px]\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[130px] h-[40px]\"></div>\n <div className=\"flex\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[150px] h-[40px] mx-[5px]\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[100px] h-[40px]\"></div>\n </div>\n </div>\n\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-full h-100\"></div>\n </div>\n );\n};\n\nNotificationListSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n\nexport const ManageNotificationSkeleton = ({ children, isLoading }) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) {\n return children;\n }\n\n return (\n <div className=\"flex flex-col w-full md:w-[650px] bg-white \">\n <div className=\"px-2 py-2 flex items-center \">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-60 h-10\"></div>\n </div>\n <hr></hr>\n <div className=\"flex flex-col w-full space-y-2 p-2\">\n <div className=\"flex flex-col space-y-2\">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n </div>\n <hr></hr>\n <div className=\"px-2 py-2 w-full flex space-x-3 items-center justify-end \">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-20 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-20 h-10\"></div>\n </div>\n </div>\n );\n};\n\nManageNotificationSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n","import {\n lazy,\n default as React,\n Suspense,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useTranslateProvider } from \"@/common/languageTranslator/TranslationContext\";\nimport { toggleActiveState } from \"../../services/Notifications\";\nimport { getAllRoleList, getNotifications } from \"@/common/services/GlobalApis\";\nimport SyncWithServerDialog from \"@/common/syncWithServer/SyncWithServerDialog\";\nimport { showToast } from \"@/common/toaster/toaster\";\nimport CustomConfirmationModal from \"@/views/custom-components/CustomConfirmationModal\";\nconst ManageNotification = lazy(() => import(\"./ManageNotification\"));\nconst NotificationFlywayQuery = lazy(() => import(\"./NotificationFlywayQuery\"));\nimport { Box, Button, Card, Checkbox, debounce, FormControlLabel, TextField, Typography } from \"@mui/material\";\nimport { Grid } from \"@mui/system\";\nimport { NotificationListSkeleton } from \"./Skeletons/NotificationsSkeletons\";\nimport useTrackEvent from \"@/hooks/useTrackEvent\";\nimport CustomizedTable from \"@/views/custom-components/CustomizedTable/CustomizedTableV2\";\nimport { faBars, faPen } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport GeneralUtil from \"@/common/services/util/GeneralUtil\";\nimport { getAssignedFeatures } from \"@/utils/feature\";\n\n/**\n *\n * @module NotificationList\n * @returns {JSX.element}\n *\n */\nexport default function NotificationList() {\n const trackEvent = useTrackEvent();\n const [search, setSearch] = useState(\"\");\n const [notifications, setNotifications] = useState([]);\n const [filteredNotifications, setFilteredNotifications] = useState([]);\n const [openModal, setOpenModal] = useState(\"\");\n const [rowData, setRowData] = useState({});\n const [roleData, setRoleData] = useState([]);\n const { translate } = useTranslateProvider();\n const [featureUuid, setFeatureUuid] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const [rights, setRights] = useState({});\n const defaultColumns = [\n {\n field: \"notificationName\",\n label: \"Name\",\n sortable: true,\n sortOrder: \"asc\",\n align: \"left\",\n },\n {\n field: \"code\",\n label: \"Code\",\n sortable: true,\n sortOrder: \"asc\",\n align: \"left\",\n },\n {\n field: \"notificationType\",\n label: \"Type\",\n align: \"left\",\n render: (row) => {\n return <Typography mt={0.5}>{row.notificationType === 'WEB' ? 'WEB' : 'MOBILE'}</Typography>;\n }\n },\n {\n field: \"state\",\n label: \"State\",\n sortable: true,\n sortOrder: \"asc\",\n align: \"left\",\n },\n { field: \"Actions\", label: \"Actions\", align: \"left\" },\n ];\n const [columns, setColumns] = useState(defaultColumns);\n const [isActive, setisActive] = useState(true);\n const [isMobile, setisMobile] = useState(true);\n\n const isActiveRef = useRef(isActive);\n const isMobileRef = useRef(isMobile);\n\n useEffect(() => {\n isActiveRef.current = isActive;\n }, [isActive]);\n\n useEffect(() => {\n isMobileRef.current = isMobile;\n }, [isMobile]);\n\n /**\n * Toggles the active/inactive status of a notification.\n * @async\n * @function toggleActiveStatus\n * @returns {Promise<void>} A promise that resolves when the active status has been toggled and notifications reloaded.\n */\n const toggleActiveStatus = async () => {\n try {\n setIsLoading((cur) => !cur);\n await toggleActiveState({ id: rowData.id, state: rowData.state });\n setOpenModal(\"\");\n const { data } = await getNotifications();\n setNotifications(data);\n setFilteredNotifications(data);\n showToast({\n type: \"success\",\n message: `State succesfully changed from ${rowData?.state === \"INACTIVE\" ? \"inactive\" : \"active\"} to ${rowData?.state === \"INACTIVE\" ? \"active\" : \"inactive\"}`,\n });\n setIsLoading((cur) => !cur);\n } catch (error) {\n showToast({\n type: \"error\",\n message: `Error ${error}`,\n });\n setIsLoading((cur) => !cur);\n }\n };\n\n const actions = useMemo(() => (row) => {\n const list = [];\n\n if (GeneralUtil.hasCheckRights(rights?.['update.manage.notificationlist'])) {\n list.push({\n label: \"\",\n icon: (\n <FontAwesomeIcon\n icon={faPen}\n data-testid=\"notificationlist-button-edit\"\n />\n ),\n onClick: (e) => {\n setOpenModal(1);\n setRowData(e);\n },\n });\n }\n\n const currentMenuItems = [];\n if (GeneralUtil.hasCheckRights(rights?.['update.manage.notificationlist'])) {\n currentMenuItems.push({\n label: translate(\n row.state === \"ACTIVE\" ? \"Mark as Inactive\" : \"Mark as Active\"\n ),\n onClick: (e) => {\n setRowData(e);\n setOpenModal(2);\n },\n });\n currentMenuItems.push({\n label: translate(\"Sync With Server\"),\n onClick: (e) => {\n if (!e.uuid) {\n showToast({\n type: \"info\",\n message: `No configuration found. Please open the respective feature item and save it.`,\n });\n return;\n }\n setOpenModal(4);\n setFeatureUuid(e?.uuid);\n setRowData(e);\n },\n });\n currentMenuItems.push({\n label: translate(\"Show Flyway Query\"),\n onClick: (e) => {\n setOpenModal(3);\n setRowData(e);\n },\n });\n }\n\n if (currentMenuItems.length > 0) {\n list.push({\n label: \"\",\n icon: (\n <FontAwesomeIcon\n icon={faBars}\n data-testid=\"notificationlist-button-menu\"\n />\n ),\n menuItems: currentMenuItems,\n });\n }\n\n return list;\n }, [rights, translate]);\n\n const debouncedFilter = useCallback(\n debounce((searchValue) => {\n const filteredData = notifications.filter(d =>\n d.notificationName?.toLowerCase().includes(searchValue) &&\n d.state === (isActiveRef.current ? 'ACTIVE' : 'INACTIVE') &&\n d.notificationType === (isMobileRef.current ? 'MO' : 'WEB')\n );\n trackEvent(\"search_tracking\", {\n searchTerm: searchValue,\n results_count: filteredData.length,\n search_type: \"Page Search\",\n });\n setFilteredNotifications(filteredData);\n }, 500),\n [notifications, trackEvent]\n );\n\n /**\n * Handles the search input to filter notifications by name.\n * @function handleSearch\n * @param {Object} e - The event object from the input field.\n * @param {string} e.target.value - The current value in the search input field.\n */\n const handleSearch = (e) => {\n const searchValue = e.target.value.toLowerCase();\n setSearch(searchValue);\n debouncedFilter(searchValue);\n };\n\n /**\n * Handles sorting of the notification list based on the specified column.\n * @function handleSort\n */\n const handleSort = (column) => {\n const order = column.sortOrder === \"asc\" ? \"desc\" : \"asc\";\n setColumns((prev) =>\n prev.map((col) => {\n if (col.field === column.field) {\n return { ...col, sortOrder: order };\n }\n return col;\n })\n );\n\n const sortedData = [...filteredNotifications].sort((a, b) => {\n const valA = a[column.field]?.toString().toLowerCase();\n const valB = b[column.field]?.toString().toLowerCase();\n\n if (valA < valB) {\n return order === \"asc\" ? -1 : 1;\n }\n if (valA > valB) {\n return order === \"asc\" ? 1 : -1;\n }\n return 0;\n });\n\n setFilteredNotifications(sortedData);\n };\n\n /**\n * Loads initial data for notifications and roles when the component is mounted or when `openModal` changes.\n * @function useEffect\n * @param {boolean} openModal - The state that controls whether a modal is open. Triggers the hook to reload data when it changes.\n */\n\n const loadInitialData = async () => {\n try {\n setIsLoading((cur) => !cur);\n const { data } = await getNotifications();\n setNotifications(data);\n const filteredData = data.filter(d => d.notificationType === 'MO' && d.state === 'ACTIVE');\n setFilteredNotifications(filteredData);\n if (!roleData.length) {\n const { data: roleData } = await getAllRoleList();\n setRoleData(roleData);\n }\n const { data: assignedFeatures } = await getAssignedFeatures(\"techo.manage.notification\");\n setRights(JSON.parse(assignedFeatures));\n setIsLoading((cur) => !cur);\n setSearch('');\n } catch (error) {\n console.error(\"error\", error);\n setIsLoading((cur) => !cur);\n }\n };\n\n useEffect(() => {\n loadInitialData();\n }, []);\n\n const handleFilter = (value, filterType) => {\n const nextIsActive =\n filterType === 'status' ? value : isActive;\n\n const nextIsMobile =\n filterType === 'notificationType' ? value : isMobile;\n\n setisActive(nextIsActive);\n setisMobile(nextIsMobile);\n\n if (search) {\n debouncedFilter(search);\n } else {\n setFilteredNotifications(\n notifications.filter(d =>\n d.state === (nextIsActive ? 'ACTIVE' : 'INACTIVE') &&\n d.notificationType === (nextIsMobile ? 'MO' : 'WEB')\n )\n );\n }\n };\n\n return (\n <Card\n variant=\"elevation\"\n container\n className=\"mt-6 p-3 flex flex-col space-y-3 shadow-xl\"\n >\n <Suspense>\n <ManageNotification\n open={openModal === 1 || openModal === 5}\n handleClose={() => setOpenModal(\"\")}\n data={openModal === 1 ? rowData : null}\n roleData={roleData}\n setNotifications={loadInitialData}\n data-testid=\"notification-list-managenotification-dialog\"\n />\n </Suspense>\n <Suspense>\n <NotificationFlywayQuery\n open={openModal === 3}\n handleClose={() => setOpenModal(\"\")}\n data={rowData}\n roleData={roleData}\n />\n </Suspense>\n <CustomConfirmationModal\n title={\"CONFIRM ACTION\"}\n open={openModal === 2}\n description={`Are you sure you want to change the state ${rowData?.state === \"INACTIVE\" ? \"inactive\" : \"active\"} to ${rowData?.state === \"INACTIVE\" ? \"active\" : \"inactive\"}`}\n handleClick={toggleActiveStatus}\n handleClose={() => setOpenModal(\"\")}\n dataTestId=\"notification-list-customconfirmationmodal-dialog\"\n />\n <SyncWithServerDialog\n isOpen={Boolean(featureUuid)}\n handleClose={() => setFeatureUuid(() => null)}\n featureUUID={featureUuid}\n dataTestId=\"notification-list-syncwithserverdialog-dialog\"\n />\n <NotificationListSkeleton isLoading={isLoading}>\n <Grid container className=\"flex justify-between\">\n <Grid>\n <Typography\n variant=\"body2\"\n className=\"font-bold font-sans text-lg text-customBlue uppercase\"\n data-testid=\"notification-list-typography-title\"\n >\n {translate(\"Notification Configuration\")}\n </Typography>\n </Grid>\n <Box className=\"flex flex-col sm:flex-row sm:items-center gap-3 w-full sm:w-auto\">\n <Box className=\"flex items-center gap-3\">\n <FormControlLabel\n control={\n <Checkbox\n checked={isActive}\n onChange={(e) =>\n handleFilter(e.target.checked, 'status')\n }\n data-testid=\"notifications-checkbox-include-active\"\n />\n }\n label={translate(\"Active\")}\n slotProps={{\n typography: {\n className: \"custom-label\",\n },\n }}\n />\n <FormControlLabel\n control={\n <Checkbox\n checked={isMobile}\n onChange={(e) =>\n handleFilter(e.target.checked, 'notificationType')\n }\n data-testid=\"notifications-checkbox-include-mobile\"\n />\n }\n label={translate(\"Mobile\")}\n slotProps={{\n typography: {\n className: \"custom-label\",\n },\n }}\n />\n </Box>\n <Box className=\"flex items-center gap-3 w-full sm:w-auto\">\n <TextField\n id=\"searchQuery\"\n placeholder=\"Search Text\"\n size=\"small\"\n onChange={handleSearch}\n className=\"m-0 p-0 bg-white\"\n value={search}\n data-testid=\"notification-list-textfield-search\"\n sx={{\n \"& .MuiInputBase-root\": {\n height: \"2.4em\",\n width: { xs: \"100%\", sm: \"190px\" },\n },\n flex: { xs: 1, sm: 1 }\n }}\n />\n {GeneralUtil.hasCheckRights(rights?.['create.manage.notificationlist']) && (\n <Button\n size=\"small\"\n variant=\"contained\"\n onClick={() => {\n trackEvent(\"button_click\", {\n button_name: \"notification-list-add-button\",\n button_type: \"navigate\",\n button_id: \"notification-list-button-add\",\n });\n setOpenModal(5);\n }}\n data-testid=\"notification-list-button-add\"\n sx={{ whiteSpace: 'nowrap' }}\n >\n {translate(\"Add\")}\n </Button>\n )}\n </Box>\n </Box>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <CustomizedTable\n columns={columns}\n actions={actions}\n tableData={filteredNotifications}\n paginationConfig={{\n pagination: false,\n }}\n styleConfig={{\n tableStyle: {\n maxHeight: 40,\n },\n }}\n handleSort={handleSort}\n isLoading={isLoading}\n dataTestId=\"notification-list-customizedtable\"\n />\n </Grid>\n </NotificationListSkeleton>\n </Card>\n );\n}\n"],"names":["toggleActiveState","id","state","api","implementationConfig","createNotification","params","updateNotification","NotificationListSkeleton","children","isLoading","useSelector","getUseSkeleton","jsxs","jsx","PropTypes","ManageNotificationSkeleton","ManageNotification","lazy","NotificationFlywayQuery","NotificationList","trackEvent","useTrackEvent","search","setSearch","useState","notifications","setNotifications","filteredNotifications","setFilteredNotifications","openModal","setOpenModal","rowData","setRowData","roleData","setRoleData","translate","useTranslateProvider","featureUuid","setFeatureUuid","setIsLoading","rights","setRights","defaultColumns","row","Typography","columns","setColumns","isActive","setisActive","isMobile","setisMobile","isActiveRef","useRef","isMobileRef","useEffect","toggleActiveStatus","cur","data","getNotifications","showToast","error","actions","useMemo","list","GeneralUtil","FontAwesomeIcon","faPen","e","currentMenuItems","faBars","debouncedFilter","useCallback","debounce","searchValue","filteredData","_a","d","handleSearch","handleSort","column","order","prev","col","sortedData","b","valA","valB","_b","loadInitialData","getAllRoleList","assignedFeatures","getAssignedFeatures","handleFilter","value","filterType","nextIsActive","nextIsMobile","Card","Suspense","CustomConfirmationModal","SyncWithServerDialog","Grid","Box","FormControlLabel","Checkbox","TextField","Button","CustomizedTable"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,KAAoB,CAAC,EAAE,IAAAC,GAAI,OAAAC,EAAK,MAC3CC,EAAI;AAAA,EACFC,EAAqB,IAAI,qBAAqB,oCAAoCH,CAAE,cAAcC,MAAU,aAAa,SAAS,OAAO,KAAK,oBAAoBD,CAAE,cAAcC,MAAU,aAAa,SAAS,OAAO;AAC7N,GAEaG,KAAqB,CAACC,MACjCH,EAAI,KAAKC,EAAqB,IAAI,qBAAqB,4BAA4B,oBAAoBE,CAAM,GAElGC,KAAqB,CAACD,MACjCH,EAAI,KAAKC,EAAqB,IAAI,qBAAqB,4BAA4B,oBAAoBE,CAAM,GCLlGE,KAA2B,CAAC,EAAE,UAAAC,GAAU,WAAAC,QAE/C,CADgBC,EAAYC,EAAc,KAI1C,CAACF,IACID,IAIP,gBAAAI,EAAC,OAAA,EAAI,WAAU,uBACb,UAAA;AAAA,EAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,8CACb,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,0DAAA,CAA0D;AAAA,IACzE,gBAAAD,EAAC,OAAA,EAAI,WAAU,QACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,mEAAA,CAAmE;AAAA,MAClF,gBAAAA,EAAC,OAAA,EAAI,WAAU,0DAAA,CAA0D;AAAA,IAAA,EAAA,CAC3E;AAAA,EAAA,GACF;AAAA,EAEA,gBAAAA,EAAC,OAAA,EAAI,WAAU,oDAAA,CAAoD;AAAA,GACrE;AAIJN,GAAyB,YAAY;AAAA,EACnC,UAAUO,EAAU;AAAA,EACpB,WAAWA,EAAU;AACvB;AAEO,MAAMC,KAA6B,CAAC,EAAE,UAAAP,GAAU,WAAAC,QAEjD,CADgBC,EAAY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