@argusoft/medplat-core 1.0.26 → 1.0.27

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 (63) 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/FileSaver.min-CN9EpL2h.js.map +1 -1
  18. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js → ImmunizationConfigurationsList-DdSZicTP.js} +72 -73
  19. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js.map → ImmunizationConfigurationsList-DdSZicTP.js.map} +1 -1
  20. package/dist/ImmunizationSkeleton-D2tdv5k-.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-CaBAOhji.js.map +1 -0
  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-AY1EUDLI.js.map +1 -0
  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/OtherTypeEventConfigModal-BeG1GrUi.js.map +1 -1
  34. package/dist/{QueryBuilder-DI0wCJbz.js → QueryBuilder-z7eqfd7D.js} +117 -119
  35. package/dist/QueryBuilder-z7eqfd7D.js.map +1 -0
  36. package/dist/{QueryManagement-CRykYGum.js → QueryManagement-BIhEDKuA.js} +114 -114
  37. package/dist/QueryManagement-BIhEDKuA.js.map +1 -0
  38. package/dist/{RoleManagement-BIiW9uTq.js → RoleManagement-BPl2cE27.js} +99 -99
  39. package/dist/RoleManagement-BPl2cE27.js.map +1 -0
  40. package/dist/{SubMenu-CM_4wNCR.js → SubMenu-DYxAPH2Z.js} +34 -34
  41. package/dist/SubMenu-DYxAPH2Z.js.map +1 -0
  42. package/dist/{UserList-2gGuDgNa.js → UserList-Bc8gYxRL.js} +397 -400
  43. package/dist/UserList-Bc8gYxRL.js.map +1 -0
  44. package/dist/{WidgetList-B7X8Awkg.js → WidgetList-Dw_FmbbE.js} +26 -26
  45. package/dist/WidgetList-Dw_FmbbE.js.map +1 -0
  46. package/dist/i18next-CTOWN_jH.js.map +1 -1
  47. package/dist/index.css +1 -1
  48. package/dist/index.js +10 -10
  49. package/dist/xlsx.min-D1LFqt_b.js.map +1 -1
  50. package/package.json +1 -1
  51. package/dist/AccessRights-CupmTG3T.js.map +0 -1
  52. package/dist/EventConfigurations-lPcZGpLi.js.map +0 -1
  53. package/dist/FeatureMenu-DUZL32RI.js.map +0 -1
  54. package/dist/ManageNotification-CSl02Wq7.js.map +0 -1
  55. package/dist/ManageTranslation-D9IScGhk.js.map +0 -1
  56. package/dist/ManageUser-AB3_Vfp_.js.map +0 -1
  57. package/dist/NotificationList-D1U1LYnz.js.map +0 -1
  58. package/dist/QueryBuilder-DI0wCJbz.js.map +0 -1
  59. package/dist/QueryManagement-CRykYGum.js.map +0 -1
  60. package/dist/RoleManagement-BIiW9uTq.js.map +0 -1
  61. package/dist/SubMenu-CM_4wNCR.js.map +0 -1
  62. package/dist/UserList-2gGuDgNa.js.map +0 -1
  63. package/dist/WidgetList-B7X8Awkg.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { jsx as i, jsxs as $, Fragment as de } from "react/jsx-runtime";
2
- import Ga, { useState as U, useRef as We, useEffect as Me, useCallback as ja, Suspense as xa, lazy as Ta } from "react";
1
+ import { jsx as i, jsxs as G, Fragment as de } from "react/jsx-runtime";
2
+ import Ga, { useState as U, useRef as We, useEffect as Se, useCallback as ja, Suspense as xa, lazy as Sa } from "react";
3
3
  import { g as Ya, c as Da, d as qa, e as _a, f as Ha, v as ba, h as Ia, i as Za, j as Ka, u as Wa, k as Ja } from "./Users-CsJ08Kjm.js";
4
- import { showToast as ve } from "@/common/toaster/toaster";
5
- import { FormItem as G } from "@/views/custom-components/FormItem.jsx";
4
+ import { showToast as fe } from "@/common/toaster/toaster";
5
+ import { FormItem as Y } from "@/views/custom-components/FormItem.jsx";
6
6
  import { getAssignedFeatures as Xa } from "@/utils/feature";
7
7
  import Qa from "@/views/custom-components/CustomAutoComplete";
8
8
  import ya from "@/views/custom-components/CustomConfirmationModal";
@@ -10,9 +10,9 @@ import Je from "@/views/custom-components/CustomDropdown";
10
10
  import se from "@/views/custom-components/CustomTextField";
11
11
  import { faEyeSlash as Va, faEye as ei } from "@fortawesome/free-solid-svg-icons";
12
12
  import { FontAwesomeIcon as Na } from "@fortawesome/react-fontawesome";
13
- import { InputAdornment as ai, IconButton as ii, Box as ca, Card as ka, Typography as ze, CardHeader as ri, Button as Xe, CardContent as ni, FormControl as da, RadioGroup as ma, FormControlLabel as me, Radio as ue, FormLabel as si, Divider as fa, Chip as oi } from "@mui/material";
13
+ import { InputAdornment as ai, IconButton as ii, Box as ca, Card as ka, Typography as we, CardHeader as ri, Button as Xe, CardContent as ni, FormControl as da, RadioGroup as ma, FormControlLabel as me, Radio as ue, FormLabel as si, Divider as fa, Chip as oi } from "@mui/material";
14
14
  import ti from "@/views/custom-components/CustomTextField.jsx";
15
- import je from "prop-types";
15
+ import ze from "prop-types";
16
16
  import { yupResolver as li } from "@hookform/resolvers/yup";
17
17
  import Qe from "dayjs";
18
18
  import x from "@mui/material/Grid2";
@@ -20,72 +20,72 @@ import { useForm as ci, FormProvider as di, Controller as ua } from "react-hook-
20
20
  import { g as mi } from "./_commonjsHelpers-B4e78b8K.js";
21
21
  import { useNavigate as ui, useParams as hi } from "react-router";
22
22
  import gi from "@/hooks/useTrackEvent";
23
- import * as I from "yup";
23
+ import * as _ from "yup";
24
24
  import Aa from "@/views/custom-components/CustomDatePicker";
25
25
  import { useTranslateProvider as pi } from "@/common/languageTranslator/TranslationContext";
26
26
  import { M as bi } from "./UserListSkeleton-BMKANCtW.js";
27
27
  import { execute as he } from "@/common/services/GlobalApis";
28
- import B from "@/common/services/util/GeneralUtil";
28
+ import E from "@/common/services/util/GeneralUtil";
29
29
  import './ManageUser.css';const va = ({
30
30
  control: ce,
31
- showPassword: we,
31
+ showPassword: ve,
32
32
  togglePasswordVisibility: te,
33
- label: Ie,
34
- name: xe,
35
- errors: Ne,
33
+ label: _e,
34
+ name: je,
35
+ errors: Ie,
36
36
  onChange: oe,
37
37
  dataTestId: ge,
38
- rules: Ae = null,
38
+ rules: Ne = null,
39
39
  ...ne
40
40
  }) => /* @__PURE__ */ i(
41
41
  ti,
42
42
  {
43
43
  control: ce,
44
- id: xe,
45
- name: xe,
46
- rules: Ae,
47
- errors: Ne,
48
- label: Ie || "",
49
- type: we ? "text" : "password",
44
+ id: je,
45
+ name: je,
46
+ rules: Ne,
47
+ errors: Ie,
48
+ label: _e || "",
49
+ type: ve ? "text" : "password",
50
50
  dataTestId: ge,
51
51
  onChange: oe,
52
52
  ...ne,
53
- endAdornment: te && /* @__PURE__ */ i(ai, { position: "end", children: /* @__PURE__ */ i(ii, { onClick: te, children: we ? /* @__PURE__ */ i(Na, { icon: Va, size: "xs", "data-testid": `${ge}-visibility-off-button` }) : /* @__PURE__ */ i(Na, { icon: ei, size: "xs", "data-testid": `${ge}-visibility-on-button` }) }) })
53
+ endAdornment: te && /* @__PURE__ */ i(ai, { position: "end", children: /* @__PURE__ */ i(ii, { onClick: te, children: ve ? /* @__PURE__ */ i(Na, { icon: Va, size: "xs", "data-testid": `${ge}-visibility-off-button` }) : /* @__PURE__ */ i(Na, { icon: ei, size: "xs", "data-testid": `${ge}-visibility-on-button` }) }) })
54
54
  }
55
55
  );
56
56
  va.propTypes = {
57
- control: je.any,
58
- showPassword: je.any,
59
- togglePasswordVisibility: je.any,
60
- label: je.any,
61
- name: je.any,
62
- errors: je.any,
63
- onChange: je.any,
64
- dataTestId: je.any,
65
- rules: je.any
57
+ control: ze.any,
58
+ showPassword: ze.any,
59
+ togglePasswordVisibility: ze.any,
60
+ label: ze.any,
61
+ name: ze.any,
62
+ errors: ze.any,
63
+ onChange: ze.any,
64
+ dataTestId: ze.any,
65
+ rules: ze.any
66
66
  };
67
- var ha = {}, Ea;
67
+ var ha = {}, Ca;
68
68
  function yi() {
69
- if (Ea) return ha;
70
- Ea = 1;
69
+ if (Ca) return ha;
70
+ Ca = 1;
71
71
  function ce(e) {
72
72
  return e && typeof e == "object" && "default" in e ? e.default : e;
73
73
  }
74
74
  Object.defineProperty(ha, "__esModule", { value: !0 });
75
- var we = Ga, te = ce(we), Ie = function(e, a) {
76
- return (Ie = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
75
+ var ve = Ga, te = ce(ve), _e = function(e, a) {
76
+ return (_e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
77
77
  r.__proto__ = n;
78
78
  } || function(r, n) {
79
79
  for (var o in n) n.hasOwnProperty(o) && (r[o] = n[o]);
80
80
  })(e, a);
81
81
  };
82
- function xe(e, a) {
82
+ function je(e, a) {
83
83
  function r() {
84
84
  this.constructor = e;
85
85
  }
86
- Ie(e, a), e.prototype = a === null ? Object.create(a) : (r.prototype = a.prototype, new r());
86
+ _e(e, a), e.prototype = a === null ? Object.create(a) : (r.prototype = a.prototype, new r());
87
87
  }
88
- var Ne, oe, ge, Ae, ne, ie, C, pe = function() {
88
+ var Ie, oe, ge, Ne, ne, ie, R, pe = function() {
89
89
  return (pe = Object.assign || function(e) {
90
90
  for (var a, r = 1, n = arguments.length; r < n; r++) for (var o in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, o) && (e[o] = a[o]);
91
91
  return e;
@@ -94,17 +94,17 @@ function yi() {
94
94
  ne = ea, ie = function(e) {
95
95
  var a, r, n, o, t;
96
96
  for (n in a = 0, e) t = e[n], a += (function() {
97
- var l, d, b;
98
- for (b = [], d = 0, l = t.length; d < l; d++) (o = t[d]) && b.push(o);
97
+ var c, d, b;
98
+ for (b = [], d = 0, c = t.length; d < c; d++) (o = t[d]) && b.push(o);
99
99
  return b;
100
100
  })().length;
101
101
  return a /= (function() {
102
- var l;
103
- for (r in l = [], e) e[r], l.push(r);
104
- return l;
102
+ var c;
103
+ for (r in c = [], e) e[r], c.push(r);
104
+ return c;
105
105
  })().length;
106
- }, oe = 1e4, Ae = Ne = 10, ge = 50;
107
- var h, Pe, aa, ia, ra, qe, S, Ee, Oe, na, sa, K, be, Fe = { nCk: function(e, a) {
106
+ }, oe = 1e4, Ne = Ie = 10, ge = 50;
107
+ var h, Me, aa, ia, ra, xe, C, Ae, Be, na, sa, K, be, Oe = { nCk: function(e, a) {
108
108
  var r, n, o, t;
109
109
  if (e < a) return 0;
110
110
  if (a === 0) return 1;
@@ -120,58 +120,58 @@ function yi() {
120
120
  for (a = 1, r = n = 2, o = e; 2 <= o ? n <= o : o <= n; r = 2 <= o ? ++n : --n) a *= r;
121
121
  return a;
122
122
  }, most_guessable_match_sequence: function(e, a, r) {
123
- var n, o, t, l, d, b, u, g, v, y, k, p, f, N, T, O, F, V, W, re, H, Z, J;
123
+ var n, o, t, c, d, b, u, g, w, y, k, p, f, I, S, O, F, V, W, re, D, H, J;
124
124
  for (r == null && (r = !1), k = e.length, y = (function() {
125
- var m, z, A;
126
- for (A = [], m = 0, z = k; 0 <= z ? m < z : z < m; 0 <= z ? ++m : --m) A.push([]);
127
- return A;
125
+ var m, j, N;
126
+ for (N = [], m = 0, j = k; 0 <= j ? m < j : j < m; 0 <= j ? ++m : --m) N.push([]);
127
+ return N;
128
128
  })(), p = 0, d = a.length; p < d; p++) y[(g = a[p]).j].push(g);
129
- for (O = 0, b = y.length; O < b; O++) y[O].sort(function(m, z) {
130
- return m.i - z.i;
129
+ for (O = 0, b = y.length; O < b; O++) y[O].sort(function(m, j) {
130
+ return m.i - j.i;
131
131
  });
132
132
  for (f = { m: (function() {
133
- var m, z, A;
134
- for (z = [], A = 0, m = k; 0 <= m ? A < m : m < A; 0 <= m ? ++A : --A) z.push({});
135
- return z;
133
+ var m, j, N;
134
+ for (j = [], N = 0, m = k; 0 <= m ? N < m : m < N; 0 <= m ? ++N : --N) j.push({});
135
+ return j;
136
136
  })(), pi: (function() {
137
- var m, z, A;
138
- for (z = [], A = 0, m = k; 0 <= m ? A < m : m < A; 0 <= m ? ++A : --A) z.push({});
139
- return z;
137
+ var m, j, N;
138
+ for (j = [], N = 0, m = k; 0 <= m ? N < m : m < N; 0 <= m ? ++N : --N) j.push({});
139
+ return j;
140
140
  })(), g: (function() {
141
- var m, z, A;
142
- for (z = [], A = 0, m = k; 0 <= m ? A < m : m < A; 0 <= m ? ++A : --A) z.push({});
143
- return z;
144
- })() }, J = this, H = function(m, z) {
145
- var A, E, L, P, M, ee;
146
- for (E in P = m.j, M = J.estimate_guesses(m, e), 1 < z && (M *= f.pi[m.i - 1][z - 1]), L = J.factorial(z) * M, r || (L += Math.pow(oe, z - 1)), ee = f.g[P]) if (A = ee[E], !(z < E) && A <= L) return;
147
- return f.g[P][z] = L, f.m[P][z] = m, f.pi[P][z] = M;
141
+ var m, j, N;
142
+ for (j = [], N = 0, m = k; 0 <= m ? N < m : m < N; 0 <= m ? ++N : --N) j.push({});
143
+ return j;
144
+ })() }, J = this, D = function(m, j) {
145
+ var N, A, L, P, M, ee;
146
+ for (A in P = m.j, M = J.estimate_guesses(m, e), 1 < j && (M *= f.pi[m.i - 1][j - 1]), L = J.factorial(j) * M, r || (L += Math.pow(oe, j - 1)), ee = f.g[P]) if (N = ee[A], !(j < A) && N <= L) return;
147
+ return f.g[P][j] = L, f.m[P][j] = m, f.pi[P][j] = M;
148
148
  }, n = function(m) {
149
- var z, A, E, L, P, M;
150
- for (g = v(0, m), H(g, 1), P = [], z = M = 1, L = m; 1 <= L ? M <= L : L <= M; z = 1 <= L ? ++M : --M) g = v(z, m), P.push((function() {
149
+ var j, N, A, L, P, M;
150
+ for (g = w(0, m), D(g, 1), P = [], j = M = 1, L = m; 1 <= L ? M <= L : L <= M; j = 1 <= L ? ++M : --M) g = w(j, m), P.push((function() {
151
151
  var ee, X;
152
- for (A in X = [], ee = f.m[z - 1]) E = ee[A], A = parseInt(A), E.pattern !== "bruteforce" && X.push(H(g, A + 1));
152
+ for (N in X = [], ee = f.m[j - 1]) A = ee[N], N = parseInt(N), A.pattern !== "bruteforce" && X.push(D(g, N + 1));
153
153
  return X;
154
154
  })());
155
155
  return P;
156
- }, v = function(m, z) {
157
- return { pattern: "bruteforce", token: e.slice(m, +z + 1 || 9e9), i: m, j: z };
156
+ }, w = function(m, j) {
157
+ return { pattern: "bruteforce", token: e.slice(m, +j + 1 || 9e9), i: m, j };
158
158
  }, re = function(m) {
159
- var z, A, E, L, P, M, ee;
160
- for (A in M = [], L = m - 1, P = void 0, E = 1 / 0, ee = f.g[L]) (z = ee[A]) < E && (P = A, E = z);
159
+ var j, N, A, L, P, M, ee;
160
+ for (N in M = [], L = m - 1, P = void 0, A = 1 / 0, ee = f.g[L]) (j = ee[N]) < A && (P = N, A = j);
161
161
  for (; 0 <= L; ) g = f.m[L][P], M.unshift(g), L = g.i - 1, P--;
162
162
  return M;
163
163
  }, t = W = 0, F = k; 0 <= F ? W < F : F < W; t = 0 <= F ? ++W : --W) {
164
- for (Z = 0, u = (V = y[t]).length; Z < u; Z++) if (0 < (g = V[Z]).i) for (l in f.m[g.i - 1]) l = parseInt(l), H(g, l + 1);
165
- else H(g, 1);
164
+ for (H = 0, u = (V = y[t]).length; H < u; H++) if (0 < (g = V[H]).i) for (c in f.m[g.i - 1]) c = parseInt(c), D(g, c + 1);
165
+ else D(g, 1);
166
166
  n(t);
167
167
  }
168
- return N = (T = re(k)).length, o = e.length === 0 ? 1 : f.g[k - 1][N], { password: e, guesses: o, guesses_log10: this.log10(o), sequence: T };
168
+ return I = (S = re(k)).length, o = e.length === 0 ? 1 : f.g[k - 1][I], { password: e, guesses: o, guesses_log10: this.log10(o), sequence: S };
169
169
  }, estimate_guesses: function(e, a) {
170
170
  var r, n;
171
- return e.guesses != null || (n = 1, e.token.length < a.length && (n = e.token.length === 1 ? Ae : ge), r = { bruteforce: this.bruteforce_guesses, dictionary: this.dictionary_guesses, spatial: this.spatial_guesses, repeat: this.repeat_guesses, sequence: this.sequence_guesses, regex: this.regex_guesses, date: this.date_guesses }[e.pattern].call(this, e), e.guesses = Math.max(r, n), e.guesses_log10 = this.log10(e.guesses)), e.guesses;
171
+ return e.guesses != null || (n = 1, e.token.length < a.length && (n = e.token.length === 1 ? Ne : ge), r = { bruteforce: this.bruteforce_guesses, dictionary: this.dictionary_guesses, spatial: this.spatial_guesses, repeat: this.repeat_guesses, sequence: this.sequence_guesses, regex: this.regex_guesses, date: this.date_guesses }[e.pattern].call(this, e), e.guesses = Math.max(r, n), e.guesses_log10 = this.log10(e.guesses)), e.guesses;
172
172
  }, bruteforce_guesses: function(e) {
173
173
  var a, r;
174
- return (a = Math.pow(Ne, e.token.length)) === Number.POSITIVE_INFINITY && (a = Number.MAX_VALUE), r = e.token.length === 1 ? Ae + 1 : ge + 1, Math.max(a, r);
174
+ return (a = Math.pow(Ie, e.token.length)) === Number.POSITIVE_INFINITY && (a = Number.MAX_VALUE), r = e.token.length === 1 ? Ne + 1 : ge + 1, Math.max(a, r);
175
175
  }, repeat_guesses: function(e) {
176
176
  return e.base_guesses * e.repeat_count;
177
177
  }, sequence_guesses: function(e) {
@@ -189,18 +189,18 @@ function yi() {
189
189
  return a = 365 * Math.max(Math.abs(e.year - this.REFERENCE_YEAR), this.MIN_YEAR_SPACE), e.separator && (a *= 4), a;
190
190
  }, KEYBOARD_AVERAGE_DEGREE: ie(ne.qwerty), KEYPAD_AVERAGE_DEGREE: ie(ne.keypad), KEYBOARD_STARTING_POSITIONS: (function() {
191
191
  var e, a;
192
- for (C in a = [], e = ne.qwerty) e[C], a.push(C);
192
+ for (R in a = [], e = ne.qwerty) e[R], a.push(R);
193
193
  return a;
194
194
  })().length, KEYPAD_STARTING_POSITIONS: (function() {
195
195
  var e, a;
196
- for (C in a = [], e = ne.keypad) e[C], a.push(C);
196
+ for (R in a = [], e = ne.keypad) e[R], a.push(R);
197
197
  return a;
198
198
  })().length, spatial_guesses: function(e) {
199
- var a, r, n, o, t, l, d, b, u, g, v, y, k, p, f, N, T;
200
- for (o = (g = e.graph) === "qwerty" || g === "dvorak" ? (p = this.KEYBOARD_STARTING_POSITIONS, this.KEYBOARD_AVERAGE_DEGREE) : (p = this.KEYPAD_STARTING_POSITIONS, this.KEYPAD_AVERAGE_DEGREE), t = 0, a = e.token.length, N = e.turns, l = b = 2, v = a; 2 <= v ? b <= v : v <= b; l = 2 <= v ? ++b : --b) for (d = u = 1, y = Math.min(N, l - 1); 1 <= y ? u <= y : y <= u; d = 1 <= y ? ++u : --u) t += this.nCk(l - 1, d - 1) * p * Math.pow(o, d);
199
+ var a, r, n, o, t, c, d, b, u, g, w, y, k, p, f, I, S;
200
+ for (o = (g = e.graph) === "qwerty" || g === "dvorak" ? (p = this.KEYBOARD_STARTING_POSITIONS, this.KEYBOARD_AVERAGE_DEGREE) : (p = this.KEYPAD_STARTING_POSITIONS, this.KEYPAD_AVERAGE_DEGREE), t = 0, a = e.token.length, I = e.turns, c = b = 2, w = a; 2 <= w ? b <= w : w <= b; c = 2 <= w ? ++b : --b) for (d = u = 1, y = Math.min(I, c - 1); 1 <= y ? u <= y : y <= u; d = 1 <= y ? ++u : --u) t += this.nCk(c - 1, d - 1) * p * Math.pow(o, d);
201
201
  if (e.shifted_count) if (r = e.shifted_count, n = e.token.length - e.shifted_count, r === 0 || n == 0) t *= 2;
202
202
  else {
203
- for (f = 0, l = T = 1, k = Math.min(r, n); 1 <= k ? T <= k : k <= T; l = 1 <= k ? ++T : --T) f += this.nCk(r + n, l);
203
+ for (f = 0, c = S = 1, k = Math.min(r, n); 1 <= k ? S <= k : k <= S; c = 1 <= k ? ++S : --S) f += this.nCk(r + n, c);
204
204
  t *= f;
205
205
  }
206
206
  return t;
@@ -208,44 +208,44 @@ function yi() {
208
208
  var a;
209
209
  return e.base_guesses = e.rank, e.uppercase_variations = this.uppercase_variations(e), e.l33t_variations = this.l33t_variations(e), a = e.reversed ? 2 : 1, e.base_guesses * e.uppercase_variations * e.l33t_variations * a;
210
210
  }, START_UPPER: /^[A-Z][^A-Z]+$/, END_UPPER: /^[^A-Z]+[A-Z]$/, ALL_UPPER: /^[^a-z]+$/, ALL_LOWER: /^[^A-Z]+$/, uppercase_variations: function(e) {
211
- var a, r, n, o, t, l, d, b, u, g, v, y;
211
+ var a, r, n, o, t, c, d, b, u, g, w, y;
212
212
  if ((y = e.token).match(this.ALL_LOWER) || y.toLowerCase() === y) return 1;
213
- for (l = 0, t = (b = [this.START_UPPER, this.END_UPPER, this.ALL_UPPER]).length; l < t; l++) if (g = b[l], y.match(g)) return 2;
213
+ for (c = 0, t = (b = [this.START_UPPER, this.END_UPPER, this.ALL_UPPER]).length; c < t; c++) if (g = b[c], y.match(g)) return 2;
214
214
  for (r = (function() {
215
- var k, p, f, N;
216
- for (N = [], p = 0, k = (f = y.split("")).length; p < k; p++) (n = f[p]).match(/[A-Z]/) && N.push(n);
217
- return N;
215
+ var k, p, f, I;
216
+ for (I = [], p = 0, k = (f = y.split("")).length; p < k; p++) (n = f[p]).match(/[A-Z]/) && I.push(n);
217
+ return I;
218
218
  })().length, a = (function() {
219
- var k, p, f, N;
220
- for (N = [], p = 0, k = (f = y.split("")).length; p < k; p++) (n = f[p]).match(/[a-z]/) && N.push(n);
221
- return N;
222
- })().length, v = 0, o = d = 1, u = Math.min(r, a); 1 <= u ? d <= u : u <= d; o = 1 <= u ? ++d : --d) v += this.nCk(r + a, o);
223
- return v;
219
+ var k, p, f, I;
220
+ for (I = [], p = 0, k = (f = y.split("")).length; p < k; p++) (n = f[p]).match(/[a-z]/) && I.push(n);
221
+ return I;
222
+ })().length, w = 0, o = d = 1, u = Math.min(r, a); 1 <= u ? d <= u : u <= d; o = 1 <= u ? ++d : --d) w += this.nCk(r + a, o);
223
+ return w;
224
224
  }, l33t_variations: function(e) {
225
- var a, r, n, o, t, l, d, b, u, g, v, y;
225
+ var a, r, n, o, t, c, d, b, u, g, w, y;
226
226
  if (!e.l33t) return 1;
227
- for (g in y = 1, b = e.sub) if (v = b[g], o = e.token.toLowerCase().split(""), a = (function() {
227
+ for (g in y = 1, b = e.sub) if (w = b[g], o = e.token.toLowerCase().split(""), a = (function() {
228
228
  var k, p, f;
229
229
  for (f = [], p = 0, k = o.length; p < k; p++) (n = o[p]) === g && f.push(n);
230
230
  return f;
231
231
  })().length, r = (function() {
232
232
  var k, p, f;
233
- for (f = [], p = 0, k = o.length; p < k; p++) (n = o[p]) === v && f.push(n);
233
+ for (f = [], p = 0, k = o.length; p < k; p++) (n = o[p]) === w && f.push(n);
234
234
  return f;
235
235
  })().length, a === 0 || r === 0) y *= 2;
236
236
  else {
237
- for (d = 0, t = l = 1, u = Math.min(r, a); 1 <= u ? l <= u : u <= l; t = 1 <= u ? ++l : --l) d += this.nCk(r + a, t);
237
+ for (d = 0, t = c = 1, u = Math.min(r, a); 1 <= u ? c <= u : u <= c; t = 1 <= u ? ++c : --c) d += this.nCk(r + a, t);
238
238
  y *= d;
239
239
  }
240
240
  return y;
241
241
  } };
242
- for (K in Ee = ea, be = Fe, Oe = function(e) {
242
+ for (K in Ae = ea, be = Oe, Be = function(e) {
243
243
  var a, r, n, o;
244
244
  for (o = {}, a = 1, n = 0, r = e.length; n < r; n++) o[e[n]] = a, a += 1;
245
245
  return o;
246
- }, qe = {}, na = Ve) sa = na[K], qe[K] = Oe(sa);
247
- ia = { qwerty: Ee.qwerty, dvorak: Ee.dvorak, keypad: Ee.keypad, mac_keypad: Ee.mac_keypad }, ra = { a: ["4", "@"], b: ["8"], c: ["(", "{", "[", "<"], e: ["3"], g: ["6", "9"], i: ["1", "!", "|"], l: ["1", "|", "7"], o: ["0"], s: ["$", "5"], t: ["+", "7"], x: ["%"], z: ["2"] }, S = { recent_year: /19\d\d|200\d|201\d/g }, h = 2050, Pe = 1e3, aa = { 4: [[1, 2], [2, 3]], 5: [[1, 3], [2, 3]], 6: [[1, 2], [2, 4], [4, 5]], 7: [[1, 3], [2, 3], [4, 5], [4, 6]], 8: [[2, 4], [4, 6]] };
248
- var le, ye, Re, c, oa, ke, Se, Ce = { empty: function(e) {
246
+ }, xe = {}, na = Ve) sa = na[K], xe[K] = Be(sa);
247
+ ia = { qwerty: Ae.qwerty, dvorak: Ae.dvorak, keypad: Ae.keypad, mac_keypad: Ae.mac_keypad }, ra = { a: ["4", "@"], b: ["8"], c: ["(", "{", "[", "<"], e: ["3"], g: ["6", "9"], i: ["1", "!", "|"], l: ["1", "|", "7"], o: ["0"], s: ["$", "5"], t: ["+", "7"], x: ["%"], z: ["2"] }, C = { recent_year: /19\d\d|200\d|201\d/g }, h = 2050, Me = 1e3, aa = { 4: [[1, 2], [2, 3]], 5: [[1, 3], [2, 3]], 6: [[1, 2], [2, 4], [4, 5]], 7: [[1, 3], [2, 3], [4, 5], [4, 6]], 8: [[2, 4], [4, 6]] };
248
+ var le, ye, Pe, l, oa, Fe, Ce, Ee = { empty: function(e) {
249
249
  var a;
250
250
  return (function() {
251
251
  var r;
@@ -257,9 +257,9 @@ function yi() {
257
257
  }, translate: function(e, a) {
258
258
  var r;
259
259
  return (function() {
260
- var n, o, t, l;
261
- for (l = [], o = 0, n = (t = e.split("")).length; o < n; o++) r = t[o], l.push(a[r] || r);
262
- return l;
260
+ var n, o, t, c;
261
+ for (c = [], o = 0, n = (t = e.split("")).length; o < n; o++) r = t[o], c.push(a[r] || r);
262
+ return c;
263
263
  })().join("");
264
264
  }, mod: function(e, a) {
265
265
  return (e % a + a) % a;
@@ -272,64 +272,64 @@ function yi() {
272
272
  for (o = [], t = 0, a = (n = [this.dictionary_match, this.reverse_dictionary_match, this.l33t_match, this.spatial_match, this.repeat_match, this.sequence_match, this.regex_match, this.date_match]).length; t < a; t++) r = n[t], this.extend(o, r.call(this, e));
273
273
  return this.sorted(o);
274
274
  }, dictionary_match: function(e, a) {
275
- var r, n, o, t, l, d, b, u, g, v, y, k, p, f;
276
- for (r in a == null && (a = qe), l = [], t = e.length, u = e.toLowerCase(), a) for (v = a[r], n = d = 0, y = t; 0 <= y ? d < y : y < d; n = 0 <= y ? ++d : --d) for (o = b = k = n, p = t; k <= p ? b < p : p < b; o = k <= p ? ++b : --b) u.slice(n, +o + 1 || 9e9) in v && (g = v[f = u.slice(n, +o + 1 || 9e9)], l.push({ pattern: "dictionary", i: n, j: o, token: e.slice(n, +o + 1 || 9e9), matched_word: f, rank: g, dictionary_name: r, reversed: !1, l33t: !1 }));
277
- return this.sorted(l);
275
+ var r, n, o, t, c, d, b, u, g, w, y, k, p, f;
276
+ for (r in a == null && (a = xe), c = [], t = e.length, u = e.toLowerCase(), a) for (w = a[r], n = d = 0, y = t; 0 <= y ? d < y : y < d; n = 0 <= y ? ++d : --d) for (o = b = k = n, p = t; k <= p ? b < p : p < b; o = k <= p ? ++b : --b) u.slice(n, +o + 1 || 9e9) in w && (g = w[f = u.slice(n, +o + 1 || 9e9)], c.push({ pattern: "dictionary", i: n, j: o, token: e.slice(n, +o + 1 || 9e9), matched_word: f, rank: g, dictionary_name: r, reversed: !1, l33t: !1 }));
277
+ return this.sorted(c);
278
278
  }, reverse_dictionary_match: function(e, a) {
279
- var r, n, o, t, l, d;
280
- for (a == null && (a = qe), d = e.split("").reverse().join(""), t = 0, r = (o = this.dictionary_match(d, a)).length; t < r; t++) (n = o[t]).token = n.token.split("").reverse().join(""), n.reversed = !0, l = [e.length - 1 - n.j, e.length - 1 - n.i], n.i = l[0], n.j = l[1];
279
+ var r, n, o, t, c, d;
280
+ for (a == null && (a = xe), d = e.split("").reverse().join(""), t = 0, r = (o = this.dictionary_match(d, a)).length; t < r; t++) (n = o[t]).token = n.token.split("").reverse().join(""), n.reversed = !0, c = [e.length - 1 - n.j, e.length - 1 - n.i], n.i = c[0], n.j = c[1];
281
281
  return this.sorted(o);
282
282
  }, set_user_input_dictionary: function(e) {
283
- return qe.user_inputs = Oe(e.slice());
283
+ return xe.user_inputs = Be(e.slice());
284
284
  }, relevant_l33t_subtable: function(e, a) {
285
- var r, n, o, t, l, d, b, u, g, v;
286
- for (l = {}, t = 0, n = (d = e.split("")).length; t < n; t++) r = d[t], l[r] = !0;
287
- for (o in v = {}, a) g = a[o], 0 < (b = (function() {
285
+ var r, n, o, t, c, d, b, u, g, w;
286
+ for (c = {}, t = 0, n = (d = e.split("")).length; t < n; t++) r = d[t], c[r] = !0;
287
+ for (o in w = {}, a) g = a[o], 0 < (b = (function() {
288
288
  var y, k, p;
289
- for (p = [], k = 0, y = g.length; k < y; k++) (u = g[k]) in l && p.push(u);
289
+ for (p = [], k = 0, y = g.length; k < y; k++) (u = g[k]) in c && p.push(u);
290
290
  return p;
291
- })()).length && (v[o] = b);
292
- return v;
291
+ })()).length && (w[o] = b);
292
+ return w;
293
293
  }, enumerate_l33t_subs: function(e) {
294
- var a, r, n, o, t, l, d, b, u, g, v, y, k, p, f;
294
+ var a, r, n, o, t, c, d, b, u, g, w, y, k, p, f;
295
295
  for (t = (function() {
296
- var N;
297
- for (o in N = [], e) N.push(o);
298
- return N;
299
- })(), f = [[]], r = function(N) {
300
- var T, O, F, V, W, re, H, Z;
301
- for (O = [], W = {}, re = 0, V = N.length; re < V; re++) H = N[re], (T = (function() {
302
- var J, m, z;
303
- for (z = [], Z = m = 0, J = H.length; m < J; Z = ++m) o = H[Z], z.push([o, Z]);
304
- return z;
296
+ var I;
297
+ for (o in I = [], e) I.push(o);
298
+ return I;
299
+ })(), f = [[]], r = function(I) {
300
+ var S, O, F, V, W, re, D, H;
301
+ for (O = [], W = {}, re = 0, V = I.length; re < V; re++) D = I[re], (S = (function() {
302
+ var J, m, j;
303
+ for (j = [], H = m = 0, J = D.length; m < J; H = ++m) o = D[H], j.push([o, H]);
304
+ return j;
305
305
  })()).sort(), (F = (function() {
306
- var J, m, z;
307
- for (z = [], Z = m = 0, J = T.length; m < J; Z = ++m) o = T[Z], z.push(o + "," + Z);
308
- return z;
309
- })().join("-")) in W || (W[F] = !0, O.push(H));
306
+ var J, m, j;
307
+ for (j = [], H = m = 0, J = S.length; m < J; H = ++m) o = S[H], j.push(o + "," + H);
308
+ return j;
309
+ })().join("-")) in W || (W[F] = !0, O.push(D));
310
310
  return O;
311
- }, (n = function(N) {
312
- var T, O, F, V, W, re, H, Z, J, m, z, A, E, L, P, M;
313
- if (N.length) {
314
- for (O = N[0], E = N.slice(1), H = [], Z = 0, W = (z = e[O]).length; Z < W; Z++) for (V = z[Z], J = 0, re = f.length; J < re; J++) {
315
- for (T = -1, F = m = 0, A = (L = f[J]).length; 0 <= A ? m < A : A < m; F = 0 <= A ? ++m : --m) if (L[F][0] === V) {
316
- T = F;
311
+ }, (n = function(I) {
312
+ var S, O, F, V, W, re, D, H, J, m, j, N, A, L, P, M;
313
+ if (I.length) {
314
+ for (O = I[0], A = I.slice(1), D = [], H = 0, W = (j = e[O]).length; H < W; H++) for (V = j[H], J = 0, re = f.length; J < re; J++) {
315
+ for (S = -1, F = m = 0, N = (L = f[J]).length; 0 <= N ? m < N : N < m; F = 0 <= N ? ++m : --m) if (L[F][0] === V) {
316
+ S = F;
317
317
  break;
318
318
  }
319
- T === -1 ? (M = L.concat([[V, O]]), H.push(M)) : ((P = L.slice(0)).splice(T, 1), P.push([V, O]), H.push(L), H.push(P));
319
+ S === -1 ? (M = L.concat([[V, O]]), D.push(M)) : ((P = L.slice(0)).splice(S, 1), P.push([V, O]), D.push(L), D.push(P));
320
320
  }
321
- return f = r(H), n(E);
321
+ return f = r(D), n(A);
322
322
  }
323
323
  })(t), p = [], u = 0, d = f.length; u < d; u++) {
324
- for (k = {}, g = 0, b = (y = f[u]).length; g < b; g++) l = (v = y[g])[0], a = v[1], k[l] = a;
324
+ for (k = {}, g = 0, b = (y = f[u]).length; g < b; g++) c = (w = y[g])[0], a = w[1], k[c] = a;
325
325
  p.push(k);
326
326
  }
327
327
  return p;
328
328
  }, l33t_match: function(e, a, r) {
329
- var n, o, t, l, d, b, u, g, v, y, k, p, f, N, T, O;
330
- for (a == null && (a = qe), r == null && (r = ra), u = [], g = 0, t = (y = this.enumerate_l33t_subs(this.relevant_l33t_subtable(e, r))).length; g < t && (p = y[g], !this.empty(p)); g++) for (N = this.translate(e, p), v = 0, l = (k = this.dictionary_match(N, a)).length; v < l; v++) if (d = k[v], (T = e.slice(d.i, +d.j + 1 || 9e9)).toLowerCase() !== d.matched_word) {
331
- for (f in b = {}, p) n = p[f], T.indexOf(f) !== -1 && (b[f] = n);
332
- d.l33t = !0, d.token = T, d.sub = b, d.sub_display = (function() {
329
+ var n, o, t, c, d, b, u, g, w, y, k, p, f, I, S, O;
330
+ for (a == null && (a = xe), r == null && (r = ra), u = [], g = 0, t = (y = this.enumerate_l33t_subs(this.relevant_l33t_subtable(e, r))).length; g < t && (p = y[g], !this.empty(p)); g++) for (I = this.translate(e, p), w = 0, c = (k = this.dictionary_match(I, a)).length; w < c; w++) if (d = k[w], (S = e.slice(d.i, +d.j + 1 || 9e9)).toLowerCase() !== d.matched_word) {
331
+ for (f in b = {}, p) n = p[f], S.indexOf(f) !== -1 && (b[f] = n);
332
+ d.l33t = !0, d.token = S, d.sub = b, d.sub_display = (function() {
333
333
  var F;
334
334
  for (o in F = [], b) O = b[o], F.push(o + " -> " + O);
335
335
  return F;
@@ -343,88 +343,88 @@ function yi() {
343
343
  for (n in a == null && (a = ia), o = [], a) r = a[n], this.extend(o, this.spatial_match_helper(e, r, n));
344
344
  return this.sorted(o);
345
345
  }, SHIFTED_RX: /[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/, spatial_match_helper: function(e, a, r) {
346
- var n, o, t, l, d, b, u, g, v, y, k, p, f, N;
347
- for (k = [], u = 0; u < e.length - 1; ) for (g = u + 1, v = null, N = 0, f = r !== "qwerty" && r !== "dvorak" || !this.SHIFTED_RX.exec(e.charAt(u)) ? 0 : 1; ; ) {
348
- if (d = !1, l = b = -1, o = a[e.charAt(g - 1)] || [], g < e.length) {
349
- for (t = e.charAt(g), p = 0, y = o.length; p < y; p++) if (l += 1, (n = o[p]) && n.indexOf(t) !== -1) {
350
- d = !0, b = l, n.indexOf(t) === 1 && (f += 1), v !== b && (N += 1, v = b);
346
+ var n, o, t, c, d, b, u, g, w, y, k, p, f, I;
347
+ for (k = [], u = 0; u < e.length - 1; ) for (g = u + 1, w = null, I = 0, f = r !== "qwerty" && r !== "dvorak" || !this.SHIFTED_RX.exec(e.charAt(u)) ? 0 : 1; ; ) {
348
+ if (d = !1, c = b = -1, o = a[e.charAt(g - 1)] || [], g < e.length) {
349
+ for (t = e.charAt(g), p = 0, y = o.length; p < y; p++) if (c += 1, (n = o[p]) && n.indexOf(t) !== -1) {
350
+ d = !0, b = c, n.indexOf(t) === 1 && (f += 1), w !== b && (I += 1, w = b);
351
351
  break;
352
352
  }
353
353
  }
354
354
  if (!d) {
355
- 2 < g - u && k.push({ pattern: "spatial", i: u, j: g - 1, token: e.slice(u, g), graph: r, turns: N, shifted_count: f }), u = g;
355
+ 2 < g - u && k.push({ pattern: "spatial", i: u, j: g - 1, token: e.slice(u, g), graph: r, turns: I, shifted_count: f }), u = g;
356
356
  break;
357
357
  }
358
358
  g += 1;
359
359
  }
360
360
  return k;
361
361
  }, repeat_match: function(e) {
362
- var a, r, n, o, t, l, d, b, u, g, v, y, k, p, f;
363
- for (p = [], t = /(.+)\1+/g, g = /(.+?)\1+/g, v = /^(.+?)\1+$/, u = 0; u < e.length && (t.lastIndex = g.lastIndex = u, l = t.exec(e), y = g.exec(e), l != null); ) o = l[0].length > y[0].length ? (k = l, v.exec(k[0])[1]) : (k = y)[1], d = (f = [k.index, k.index + k[0].length - 1])[0], b = f[1], n = (a = be.most_guessable_match_sequence(o, this.omnimatch(o))).sequence, r = a.guesses, p.push({ pattern: "repeat", i: d, j: b, token: k[0], base_token: o, base_guesses: r, base_matches: n, repeat_count: k[0].length / o.length }), u = b + 1;
362
+ var a, r, n, o, t, c, d, b, u, g, w, y, k, p, f;
363
+ for (p = [], t = /(.+)\1+/g, g = /(.+?)\1+/g, w = /^(.+?)\1+$/, u = 0; u < e.length && (t.lastIndex = g.lastIndex = u, c = t.exec(e), y = g.exec(e), c != null); ) o = c[0].length > y[0].length ? (k = c, w.exec(k[0])[1]) : (k = y)[1], d = (f = [k.index, k.index + k[0].length - 1])[0], b = f[1], n = (a = be.most_guessable_match_sequence(o, this.omnimatch(o))).sequence, r = a.guesses, p.push({ pattern: "repeat", i: d, j: b, token: k[0], base_token: o, base_guesses: r, base_matches: n, repeat_count: k[0].length / o.length }), u = b + 1;
364
364
  return p;
365
365
  }, MAX_DELTA: 5, sequence_match: function(e) {
366
- var a, r, n, o, t, l, d, b, u, g;
366
+ var a, r, n, o, t, c, d, b, u, g;
367
367
  if (e.length === 1) return [];
368
- for (g = this, u = function(v, y, k) {
369
- var p, f, N, T;
370
- if ((1 < y - v || Math.abs(k) === 1) && 0 < (p = Math.abs(k)) && p <= g.MAX_DELTA) return T = e.slice(v, +y + 1 || 9e9), N = /^[a-z]+$/.test(T) ? (f = "lower", 26) : /^[A-Z]+$/.test(T) ? (f = "upper", 26) : /^\d+$/.test(T) ? (f = "digits", 10) : (f = "unicode", 26), b.push({ pattern: "sequence", i: v, j: y, token: e.slice(v, +y + 1 || 9e9), sequence_name: f, sequence_space: N, ascending: 0 < k });
371
- }, b = [], r = 0, t = null, o = l = 1, d = e.length; 1 <= d ? l < d : d < l; o = 1 <= d ? ++l : --l) a = e.charCodeAt(o) - e.charCodeAt(o - 1), t == null && (t = a), a !== t && (u(r, n = o - 1, t), r = n, t = a);
368
+ for (g = this, u = function(w, y, k) {
369
+ var p, f, I, S;
370
+ if ((1 < y - w || Math.abs(k) === 1) && 0 < (p = Math.abs(k)) && p <= g.MAX_DELTA) return S = e.slice(w, +y + 1 || 9e9), I = /^[a-z]+$/.test(S) ? (f = "lower", 26) : /^[A-Z]+$/.test(S) ? (f = "upper", 26) : /^\d+$/.test(S) ? (f = "digits", 10) : (f = "unicode", 26), b.push({ pattern: "sequence", i: w, j: y, token: e.slice(w, +y + 1 || 9e9), sequence_name: f, sequence_space: I, ascending: 0 < k });
371
+ }, b = [], r = 0, t = null, o = c = 1, d = e.length; 1 <= d ? c < d : d < c; o = 1 <= d ? ++c : --c) a = e.charCodeAt(o) - e.charCodeAt(o - 1), t == null && (t = a), a !== t && (u(r, n = o - 1, t), r = n, t = a);
372
372
  return u(r, e.length - 1, t), b;
373
373
  }, regex_match: function(e, a) {
374
374
  var r, n, o, t;
375
- for (K in a == null && (a = S), r = [], a) for ((n = a[K]).lastIndex = 0; o = n.exec(e); ) t = o[0], r.push({ pattern: "regex", token: t, i: o.index, j: o.index + o[0].length - 1, regex_name: K, regex_match: o });
375
+ for (K in a == null && (a = C), r = [], a) for ((n = a[K]).lastIndex = 0; o = n.exec(e); ) t = o[0], r.push({ pattern: "regex", token: t, i: o.index, j: o.index + o[0].length - 1, regex_name: K, regex_match: o });
376
376
  return this.sorted(r);
377
377
  }, date_match: function(e) {
378
- var a, r, n, o, t, l, d, b, u, g, v, y, k, p, f, N, T, O, F, V, W, re, H, Z, J, m, z, A, E, L, P, M, ee, X;
379
- for (y = [], k = /^\d{4,8}$/, p = /^(\d{1,4})([\s\/\\_.-])(\d{1,2})\2(\d{1,4})$/, l = T = 0, W = e.length - 4; 0 <= W ? T <= W : W <= T; l = 0 <= W ? ++T : --T) for (d = O = re = l + 3, H = l + 7; (re <= H ? O <= H : H <= O) && !(d >= e.length); d = re <= H ? ++O : --O) if (X = e.slice(l, +d + 1 || 9e9), k.exec(X)) {
380
- for (n = [], F = 0, g = (Z = aa[X.length]).length; F < g; F++) b = (J = Z[F])[0], u = J[1], (t = this.map_ints_to_dmy([parseInt(X.slice(0, b)), parseInt(X.slice(b, u)), parseInt(X.slice(u))])) != null && n.push(t);
378
+ var a, r, n, o, t, c, d, b, u, g, w, y, k, p, f, I, S, O, F, V, W, re, D, H, J, m, j, N, A, L, P, M, ee, X;
379
+ for (y = [], k = /^\d{4,8}$/, p = /^(\d{1,4})([\s\/\\_.-])(\d{1,2})\2(\d{1,4})$/, c = S = 0, W = e.length - 4; 0 <= W ? S <= W : W <= S; c = 0 <= W ? ++S : --S) for (d = O = re = c + 3, D = c + 7; (re <= D ? O <= D : D <= O) && !(d >= e.length); d = re <= D ? ++O : --O) if (X = e.slice(c, +d + 1 || 9e9), k.exec(X)) {
380
+ for (n = [], F = 0, g = (H = aa[X.length]).length; F < g; F++) b = (J = H[F])[0], u = J[1], (t = this.map_ints_to_dmy([parseInt(X.slice(0, b)), parseInt(X.slice(b, u)), parseInt(X.slice(u))])) != null && n.push(t);
381
381
  if (0 < n.length) {
382
- for (a = n[0], N = (f = function(_e) {
383
- return Math.abs(_e.year - be.REFERENCE_YEAR);
384
- })(n[0]), V = 0, v = (m = n.slice(1)).length; V < v; V++) (o = f(r = m[V])) < N && (a = (z = [r, o])[0], N = z[1]);
385
- y.push({ pattern: "date", token: X, i: l, j: d, separator: "", year: a.year, month: a.month, day: a.day });
382
+ for (a = n[0], I = (f = function(qe) {
383
+ return Math.abs(qe.year - be.REFERENCE_YEAR);
384
+ })(n[0]), V = 0, w = (m = n.slice(1)).length; V < w; V++) (o = f(r = m[V])) < I && (a = (j = [r, o])[0], I = j[1]);
385
+ y.push({ pattern: "date", token: X, i: c, j: d, separator: "", year: a.year, month: a.month, day: a.day });
386
386
  }
387
387
  }
388
- for (l = M = 0, A = e.length - 6; 0 <= A ? M <= A : A <= M; l = 0 <= A ? ++M : --M) for (d = ee = E = l + 5, L = l + 9; (E <= L ? ee <= L : L <= ee) && !(d >= e.length); d = E <= L ? ++ee : --ee) X = e.slice(l, +d + 1 || 9e9), (P = p.exec(X)) != null && (t = this.map_ints_to_dmy([parseInt(P[1]), parseInt(P[3]), parseInt(P[4])])) != null && y.push({ pattern: "date", token: X, i: l, j: d, separator: P[2], year: t.year, month: t.month, day: t.day });
389
- return this.sorted(y.filter(function(_e) {
390
- var De, la, He, Te;
391
- for (De = !1, Te = 0, la = y.length; Te < la; Te++) if (_e !== (He = y[Te]) && He.i <= _e.i && He.j >= _e.j) {
388
+ for (c = M = 0, N = e.length - 6; 0 <= N ? M <= N : N <= M; c = 0 <= N ? ++M : --M) for (d = ee = A = c + 5, L = c + 9; (A <= L ? ee <= L : L <= ee) && !(d >= e.length); d = A <= L ? ++ee : --ee) X = e.slice(c, +d + 1 || 9e9), (P = p.exec(X)) != null && (t = this.map_ints_to_dmy([parseInt(P[1]), parseInt(P[3]), parseInt(P[4])])) != null && y.push({ pattern: "date", token: X, i: c, j: d, separator: P[2], year: t.year, month: t.month, day: t.day });
389
+ return this.sorted(y.filter(function(qe) {
390
+ var De, la, He, Re;
391
+ for (De = !1, Re = 0, la = y.length; Re < la; Re++) if (qe !== (He = y[Re]) && He.i <= qe.i && He.j >= qe.j) {
392
392
  De = !0;
393
393
  break;
394
394
  }
395
395
  return !De;
396
396
  }));
397
397
  }, map_ints_to_dmy: function(e) {
398
- var a, r, n, o, t, l, d, b, u, g, v, y, k, p, f, N;
398
+ var a, r, n, o, t, c, d, b, u, g, w, y, k, p, f, I;
399
399
  if (!(31 < e[1] || e[1] <= 0)) {
400
- for (l = f = b = d = 0, n = e.length; l < n; l++) {
401
- if (99 < (r = e[l]) && r < Pe || h < r) return;
400
+ for (c = f = b = d = 0, n = e.length; c < n; c++) {
401
+ if (99 < (r = e[c]) && r < Me || h < r) return;
402
402
  31 < r && (b += 1), 12 < r && (d += 1), r <= 0 && (f += 1);
403
403
  }
404
404
  if (!(2 <= b || d === 3 || 2 <= f)) {
405
- for (u = 0, o = (g = [[e[2], e.slice(0, 2)], [e[0], e.slice(1, 3)]]).length; u < o; u++) if (N = (y = g[u])[0], p = y[1], Pe <= N && N <= h) return (a = this.map_ints_to_dm(p)) != null ? { year: N, month: a.month, day: a.day } : void 0;
406
- for (v = 0, t = g.length; v < t; v++) if (N = (k = g[v])[0], p = k[1], (a = this.map_ints_to_dm(p)) != null) return { year: N = this.two_to_four_digit_year(N), month: a.month, day: a.day };
405
+ for (u = 0, o = (g = [[e[2], e.slice(0, 2)], [e[0], e.slice(1, 3)]]).length; u < o; u++) if (I = (y = g[u])[0], p = y[1], Me <= I && I <= h) return (a = this.map_ints_to_dm(p)) != null ? { year: I, month: a.month, day: a.day } : void 0;
406
+ for (w = 0, t = g.length; w < t; w++) if (I = (k = g[w])[0], p = k[1], (a = this.map_ints_to_dm(p)) != null) return { year: I = this.two_to_four_digit_year(I), month: a.month, day: a.day };
407
407
  }
408
408
  }
409
409
  }, map_ints_to_dm: function(e) {
410
- var a, r, n, o, t, l;
411
- for (o = 0, r = (t = [e, e.slice().reverse()]).length; o < r; o++) if (a = (l = t[o])[0], n = l[1], 1 <= a && a <= 31 && 1 <= n && n <= 12) return { day: a, month: n };
410
+ var a, r, n, o, t, c;
411
+ for (o = 0, r = (t = [e, e.slice().reverse()]).length; o < r; o++) if (a = (c = t[o])[0], n = c[1], 1 <= a && a <= 31 && 1 <= n && n <= 12) return { day: a, month: n };
412
412
  }, two_to_four_digit_year: function(e) {
413
413
  return 99 < e ? e : 50 < e ? e + 1900 : e + 2e3;
414
- } }, Le = { estimate_attack_times: function(e) {
414
+ } }, Te = { estimate_attack_times: function(e) {
415
415
  var a, r, n, o;
416
416
  for (n in a = {}, r = { online_throttling_100_per_hour: e / (100 / 3600), online_no_throttling_10_per_second: e / 10, offline_slow_hashing_1e4_per_second: e / 1e4, offline_fast_hashing_1e10_per_second: e / 1e10 }) o = r[n], a[n] = this.display_time(o);
417
417
  return { crack_times_seconds: r, crack_times_display: a, score: this.guesses_to_score(e) };
418
418
  }, guesses_to_score: function(e) {
419
419
  return e < 1005 ? 0 : e < 1000005 ? 1 : e < 100000005 ? 2 : e < 1e10 + 5 ? 3 : 4;
420
420
  }, display_time: function(e) {
421
- var a, r, n, o, t, l;
422
- return 100 * (l = 12 * (o = 2678400)), n = (t = e < 1 ? [null, "less than a second"] : e < 60 ? [a = Math.round(e), a + " second"] : e < 3600 ? [a = Math.round(e / 60), a + " minute"] : e < 86400 ? [a = Math.round(e / 3600), a + " hour"] : e < o ? [a = Math.round(e / 86400), a + " day"] : e < l ? [a = Math.round(e / o), a + " month"] : e < 321408e4 ? [a = Math.round(e / l), a + " year"] : [null, "centuries"])[1], (r = t[0]) != null && r !== 1 && (n += "s"), n;
423
- } }, Ue = le = { default_feedback: { warning: "", suggestions: ["Use a few words, avoid common phrases", "No need for symbols, digits, or uppercase letters"] }, get_feedback: function(e, a) {
424
- var r, n, o, t, l, d;
421
+ var a, r, n, o, t, c;
422
+ return 100 * (c = 12 * (o = 2678400)), n = (t = e < 1 ? [null, "less than a second"] : e < 60 ? [a = Math.round(e), a + " second"] : e < 3600 ? [a = Math.round(e / 60), a + " minute"] : e < 86400 ? [a = Math.round(e / 3600), a + " hour"] : e < o ? [a = Math.round(e / 86400), a + " day"] : e < c ? [a = Math.round(e / o), a + " month"] : e < 321408e4 ? [a = Math.round(e / c), a + " year"] : [null, "centuries"])[1], (r = t[0]) != null && r !== 1 && (n += "s"), n;
423
+ } }, Le = le = { default_feedback: { warning: "", suggestions: ["Use a few words, avoid common phrases", "No need for symbols, digits, or uppercase letters"] }, get_feedback: function(e, a) {
424
+ var r, n, o, t, c, d;
425
425
  if (a.length === 0) return this.default_feedback;
426
426
  if (2 < e) return { warning: "", suggestions: [] };
427
- for (t = a[0], n = 0, o = (d = a.slice(1)).length; n < o; n++) (l = d[n]).token.length > t.token.length && (t = l);
427
+ for (t = a[0], n = 0, o = (d = a.slice(1)).length; n < o; n++) (c = d[n]).token.length > t.token.length && (t = c);
428
428
  return r = "Add another word or two. Uncommon words are better.", (le = this.get_match_feedback(t, a.length === 1)) != null ? (le.suggestions.unshift(r), le.warning == null && (le.warning = "")) : le = { warning: "", suggestions: [r] }, le;
429
429
  }, get_match_feedback: function(e, a) {
430
430
  switch (e.pattern) {
@@ -446,199 +446,198 @@ function yi() {
446
446
  var r, n, o, t;
447
447
  return o = e.dictionary_name === "passwords" ? !a || e.l33t || e.reversed ? e.guesses_log10 <= 4 ? "This is similar to a commonly used password" : void 0 : e.rank <= 10 ? "This is a top-10 common password" : e.rank <= 100 ? "This is a top-100 common password" : "This is a very common password" : e.dictionary_name === "english_wikipedia" ? a ? "A word by itself is easy to guess" : void 0 : (r = e.dictionary_name) === "surnames" || r === "male_names" || r === "female_names" ? a ? "Names and surnames by themselves are easy to guess" : "Common names and surnames are easy to guess" : "", n = [], (t = e.token).match(ye.START_UPPER) ? n.push("Capitalization doesn't help very much") : t.match(ye.ALL_UPPER) && t.toLowerCase() !== t && n.push("All-uppercase is almost as easy to guess as all-lowercase"), e.reversed && 4 <= e.token.length && n.push("Reversed words aren't much harder to guess"), e.l33t && n.push("Predictable substitutions like '@' instead of 'a' don't help very much"), { warning: o, suggestions: n };
448
448
  } };
449
- c = Ce, oa = ye = Fe, Se = Le, Re = Ue, ke = function() {
449
+ l = Ee, oa = ye = Oe, Ce = Te, Pe = Le, Fe = function() {
450
450
  return (/* @__PURE__ */ new Date()).getTime();
451
451
  };
452
452
  var ga = function(e, a) {
453
- var r, n, o, t, l, d, b, u, g, v, y;
454
- for (a == null && (a = []), v = ke(), g = [], o = 0, t = a.length; o < t; o++) (b = typeof (r = a[o])) != "string" && b != "number" && b != "boolean" || g.push(r.toString().toLowerCase());
455
- for (d in c.set_user_input_dictionary(g), l = c.omnimatch(e), (u = oa.most_guessable_match_sequence(e, l)).calc_time = ke() - v, n = Se.estimate_attack_times(u.guesses)) y = n[d], u[d] = y;
456
- return u.feedback = Re.get_feedback(u.score, u.sequence), u;
457
- }, Be = { flexBasis: 0, flexGrow: 1, position: "relative", maxWidth: "100%", width: "100%", height: 2 }, ta = function(e) {
453
+ var r, n, o, t, c, d, b, u, g, w, y;
454
+ for (a == null && (a = []), w = Fe(), g = [], o = 0, t = a.length; o < t; o++) (b = typeof (r = a[o])) != "string" && b != "number" && b != "boolean" || g.push(r.toString().toLowerCase());
455
+ for (d in l.set_user_input_dictionary(g), c = l.omnimatch(e), (u = oa.most_guessable_match_sequence(e, c)).calc_time = Fe() - w, n = Ce.estimate_attack_times(u.guesses)) y = n[d], u[d] = y;
456
+ return u.feedback = Pe.get_feedback(u.score, u.sequence), u;
457
+ }, Ue = { flexBasis: 0, flexGrow: 1, position: "relative", maxWidth: "100%", width: "100%", height: 2 }, ta = function(e) {
458
458
  var a = e.score, r = e.itemNum, n = e.barColors, o = n[0];
459
- return r <= a && (o = n[a]), te.createElement("div", { style: pe(pe({}, Be), { backgroundColor: o }) });
460
- }, fe = { position: "relative" }, pa = { display: "flex", alignItems: "center", margin: "5px 0 0" }, $e = { width: 4 }, Ge = { margin: "5px 0 0", color: "#898792", fontSize: 14, textAlign: "right" }, Ye = (function(e) {
459
+ return r <= a && (o = n[a]), te.createElement("div", { style: pe(pe({}, Ue), { backgroundColor: o }) });
460
+ }, ke = { position: "relative" }, pa = { display: "flex", alignItems: "center", margin: "5px 0 0" }, $e = { width: 4 }, Ge = { margin: "5px 0 0", color: "#898792", fontSize: 14, textAlign: "right" }, Ye = (function(e) {
461
461
  function a() {
462
462
  var r = e !== null && e.apply(this, arguments) || this;
463
463
  return r.state = { score: 0 }, r.setScore = function() {
464
- var n = r.props, o = n.password, t = n.minLength, l = n.userInputs, d = n.onChangeScore, b = null, u = 0, g = {};
465
- o.length >= t && (b = ga(o, l), u = b.score, g = b.feedback), r.setState({ score: u }, function() {
464
+ var n = r.props, o = n.password, t = n.minLength, c = n.userInputs, d = n.onChangeScore, b = null, u = 0, g = {};
465
+ o.length >= t && (b = ga(o, c), u = b.score, g = b.feedback), r.setState({ score: u }, function() {
466
466
  d && d(u, g);
467
467
  });
468
468
  }, r;
469
469
  }
470
- return xe(a, e), a.prototype.componentDidMount = function() {
470
+ return je(a, e), a.prototype.componentDidMount = function() {
471
471
  this.setScore();
472
472
  }, a.prototype.componentDidUpdate = function(r) {
473
473
  var n = this.props.password;
474
474
  r.password !== n && this.setScore();
475
475
  }, a.prototype.render = function() {
476
- var r = this.props, n = r.className, o = r.style, t = r.scoreWordClassName, l = r.scoreWordStyle, d = r.password, b = r.barColors, u = r.scoreWords, g = r.minLength, v = r.shortScoreWord, y = this.state.score, k = d.length >= g ? u[y] : v;
477
- return te.createElement("div", { className: n, style: pe(pe({}, fe), o) }, te.createElement("div", { style: pa }, [1, 2, 3, 4].map(function(p) {
478
- return te.createElement(we.Fragment, { key: "password-strength-bar-item-" + p }, 1 < p && te.createElement("div", { style: $e }), te.createElement(ta, { score: y, itemNum: p, barColors: b }));
479
- })), te.createElement("p", { className: t, style: pe(pe({}, Ge), l) }, k));
476
+ var r = this.props, n = r.className, o = r.style, t = r.scoreWordClassName, c = r.scoreWordStyle, d = r.password, b = r.barColors, u = r.scoreWords, g = r.minLength, w = r.shortScoreWord, y = this.state.score, k = d.length >= g ? u[y] : w;
477
+ return te.createElement("div", { className: n, style: pe(pe({}, ke), o) }, te.createElement("div", { style: pa }, [1, 2, 3, 4].map(function(p) {
478
+ return te.createElement(ve.Fragment, { key: "password-strength-bar-item-" + p }, 1 < p && te.createElement("div", { style: $e }), te.createElement(ta, { score: y, itemNum: p, barColors: b }));
479
+ })), te.createElement("p", { className: t, style: pe(pe({}, Ge), c) }, k));
480
480
  }, a.defaultProps = { className: void 0, style: void 0, scoreWordClassName: void 0, scoreWordStyle: void 0, password: "", userInputs: [], barColors: ["#ddd", "#ef4836", "#f6b44d", "#2b90ef", "#25c281"], scoreWords: ["weak", "weak", "okay", "good", "strong"], minLength: 4, shortScoreWord: "too short", onChangeScore: void 0 }, a;
481
481
  })(te.Component);
482
482
  return ha.default = Ye, ha;
483
483
  }
484
484
  var ki = yi();
485
- const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCore-DTYWRTa-.js")), vi = Sa.default || Sa, wi = Ta(
485
+ const Ea = /* @__PURE__ */ mi(ki), fi = Sa(() => import("./ChangePasswordModalCore-CDxkeIIM.js")), vi = Ea.default || Ea, wi = Sa(
486
486
  () => import("@/views/feature-components/LocationDirective/LocationDirectiveV2")
487
- ), Ca = I.object().shape({
488
- roleId: I.number().transform(
489
- (ce, we) => we === "" ? void 0 : ce
487
+ ), Ra = _.object().shape({
488
+ roleId: _.number().transform(
489
+ (ce, ve) => ve === "" ? void 0 : ce
490
490
  ).typeError("UserRole is required").required("UserRole is required"),
491
- firstName: I.string().required("First Name is required").matches(/^[A-Za-z]+$/, "First name must contain only alphabets."),
492
- lastName: I.string().required("Last Name is required").matches(/^[A-Za-z]+$/, "Last name must contain only alphabets."),
493
- gender: I.string().required("gender is required"),
494
- userName: I.string().required("User Name is required").matches(
491
+ firstName: _.string().required("First Name is required").matches(/^[A-Za-z]+$/, "First name must contain only alphabets."),
492
+ lastName: _.string().required("Last Name is required").matches(/^[A-Za-z]+$/, "Last name must contain only alphabets."),
493
+ gender: _.string().required("gender is required"),
494
+ userName: _.string().required("User Name is required").matches(
495
495
  /^[a-zA-Z0-9_]+$/,
496
496
  "Username must contain only alphanumeric characters and underscores"
497
497
  ),
498
- password: I.string().when("$id", {
498
+ password: _.string().when("$id", {
499
499
  is: !1,
500
500
  then: (ce) => ce.required("Password is required").min(8, "Password must be at least 8 characters long").matches(/[A-Z]/, "Password must contain at least one uppercase letter").matches(
501
501
  /[!@#$%^&*(),.?":{}|<>]/,
502
502
  "Password must contain at least one special character"
503
503
  )
504
504
  }),
505
- confirmPassword: I.string().when("$id", {
505
+ confirmPassword: _.string().when("$id", {
506
506
  is: !1,
507
- then: (ce) => ce.required("Confirm Password is required").oneOf([I.ref("password"), null], "Passwords do not match")
507
+ then: (ce) => ce.required("Confirm Password is required").oneOf([_.ref("password"), null], "Passwords do not match")
508
508
  }),
509
- prefferedLanguage: I.string().required("Preffered Language is required")
509
+ prefferedLanguage: _.string().required("Preffered Language is required")
510
510
  }), zi = () => {
511
- const [ce, we] = U(Ca), te = We(null), Ie = We(!1), xe = gi(), Ne = ui(), { translate: oe } = pi(), [ge, Ae] = U([]), [ne, ie] = U(0), [C, pe] = U(), [Ve, ea] = U([]), [h, Pe] = U({}), [aa, ia] = U(!1), [ra, qe] = U("Add User"), { id: S } = hi(), [Ee, Oe] = U(!1), [na, sa] = U(!1), [K, be] = U([]), [Fe, le] = U([]), [ye, Re] = U([]), [c, oa] = U({}), ke = We(c);
512
- Me(() => {
513
- ke.current = c;
514
- }, [c]);
515
- const [Se, Ce] = U({}), [Le, Ue] = U({}), [ga, Be] = U(10), ta = We(ga), [fe, pa] = U({}), [$e, Ge] = U({}), [Ye, e] = U([]), [a, r] = U([]), [n, o] = U(""), [t, l] = U(!1), [d, b] = U("34px"), [u, g] = U(!1), [v, y] = U(!1), [k, p] = U([]), [f, N] = U([]), T = We(null), [O, F] = U([]), [V, W] = U(null), [re, H] = U(null), Z = (s) => {
516
- const j = s.target.files[0];
517
- if (j) {
518
- H(j);
519
- const q = new FileReader();
520
- q.onloadend = () => {
521
- W(q.result);
522
- }, q.readAsDataURL(j);
511
+ const [ce, ve] = U(Ra), te = We(null), _e = We(!1), je = gi(), Ie = ui(), { translate: oe } = pi(), [ge, Ne] = U([]), [ne, ie] = U(0), [R, pe] = U(), [Ve, ea] = U([]), [h, Me] = U({}), [aa, ia] = U(!1), [ra, xe] = U("Add User"), { id: C } = hi(), [Ae, Be] = U(!1), [na, sa] = U(!1), [K, be] = U([]), [Oe, le] = U([]), [ye, Pe] = U([]), [l, oa] = U(null), Fe = We(l);
512
+ Se(() => {
513
+ Fe.current = l;
514
+ }, [l]);
515
+ const [Ce, Ee] = U({}), [Te, Le] = U({}), [ga, Ue] = U(10), ta = We(ga), [ke, pa] = U({}), [$e, Ge] = U({}), [Ye, e] = U([]), [a, r] = U([]), [n, o] = U(""), [t, c] = U(!1), [d, b] = U("34px"), [u, g] = U(!1), [w, y] = U(!1), [k, p] = U([]), [f, I] = U([]), S = We(null), [O, F] = U([]), [V, W] = U(null), [re, D] = U(null), H = (s) => {
516
+ const z = s.target.files[0];
517
+ if (z) {
518
+ D(z);
519
+ const v = new FileReader();
520
+ v.onloadend = () => {
521
+ W(v.result);
522
+ }, v.readAsDataURL(z);
523
523
  }
524
524
  };
525
- Me(() => {
526
- if (T.current) {
527
- const s = T.current.scrollHeight, j = 100;
528
- s > j ? b(`${j}px`) : s < 37 ? b("37px") : b(`${s}px`);
525
+ Se(() => {
526
+ if (S.current) {
527
+ const s = S.current.scrollHeight, z = 100;
528
+ s > z ? b(`${z}px`) : s < 37 ? b("37px") : b(`${s}px`);
529
529
  }
530
- }, [K]), Me(() => {
531
- var j, q, Y, D;
532
- let s = I.object().shape({});
533
- if (ke.current) {
534
- if ((j = ke.current) != null && j["manage.users.batchNo"] && (s = s.concat(
535
- I.object().shape({
536
- batchNo: I.number().transform(
537
- (w, _) => _ === "" ? void 0 : w
530
+ }, [K]), Se(() => {
531
+ let s = _.object().shape({});
532
+ if (l) {
533
+ if (E.hasCheckRights(l == null ? void 0 : l["manage.users.batchNo"], void 0, !0) && (s = s.concat(
534
+ _.object().shape({
535
+ batchNo: _.number().transform(
536
+ (z, v) => v === "" ? void 0 : z
538
537
  ).typeError("Batch No. must be a number").min(1, "Batch No. cannot be < 1").max(999, "Batch No. cannot have more than 3 digits").notRequired()
539
538
  })
540
- )), (q = ke.current) != null && q["manage.users.dateOfBirth"]) {
541
- const w = I.date().nullable().typeError("Invalid Date Format").max(/* @__PURE__ */ new Date(), "Date of birth cannot be in the future").notRequired();
539
+ )), E.hasCheckRights(l == null ? void 0 : l["manage.users.dateOfBirth"], void 0, !0)) {
540
+ const z = _.date().nullable().typeError("Invalid Date Format").max(/* @__PURE__ */ new Date(), "Date of birth cannot be in the future").notRequired();
542
541
  s = s.concat(
543
- I.object().shape({
544
- dateOfBirth: w
542
+ _.object().shape({
543
+ dateOfBirth: z
545
544
  })
546
545
  );
547
546
  }
548
- (Y = ke.current) != null && Y["manage.users.maritalStatus"] && (s = s.concat(
549
- I.object().shape({
550
- maritalStatus: I.string().required("Marital status is required")
547
+ E.hasCheckRights(l == null ? void 0 : l["manage.users.maritalStatus"], void 0, !0) && (s = s.concat(
548
+ _.object().shape({
549
+ maritalStatus: _.string().required("Marital status is required")
551
550
  })
552
- )), (D = ke.current) != null && D["manage.users.joiningDate"] && (s = s.concat(
553
- I.object().shape({
554
- joiningDate: I.date().nullable().typeError("Invalid Date Format").max(/* @__PURE__ */ new Date(), "Joining date cannot be in the future").test(
551
+ )), E.hasCheckRights(l == null ? void 0 : l["manage.users.joiningDate"], void 0, !0) && (s = s.concat(
552
+ _.object().shape({
553
+ joiningDate: _.date().nullable().typeError("Invalid Date Format").max(/* @__PURE__ */ new Date(), "Joining date cannot be in the future").test(
555
554
  "is-after-dob",
556
555
  "Joining date cannot be before date of birth",
557
- function(w) {
558
- const { dateOfBirth: _ } = this.parent;
559
- return !_ || !w ? !0 : w >= _;
556
+ function(z) {
557
+ const { dateOfBirth: v } = this.parent;
558
+ return !v || !z ? !0 : z >= v;
560
559
  }
561
560
  ).notRequired()
562
561
  })
563
562
  ));
564
563
  }
565
564
  h != null && h.isBankDetailsRequired && (h != null && h.isBankDetailsMandatory) ? s = s.concat(
566
- I.object().shape({
567
- bankName: I.string().required("Bank Name is required"),
568
- bankAccNo: I.string().required("Bank Account Number is required"),
569
- ifscCode: I.string().required("IFSC Code is required").matches(/^[A-Z]{4}0[A-Z0-9]{6}$/, "Enter a valid IFSC code"),
570
- nameAccToBank: I.string().required("Full Name (as per Bank Account) is required")
565
+ _.object().shape({
566
+ bankName: _.string().required("Bank Name is required"),
567
+ bankAccNo: _.string().required("Bank Account Number is required"),
568
+ ifscCode: _.string().required("IFSC Code is required").matches(/^[A-Z]{4}0[A-Z0-9]{6}$/, "Enter a valid IFSC code"),
569
+ nameAccToBank: _.string().required("Full Name (as per Bank Account) is required")
571
570
  })
572
571
  ) : s = s.concat(
573
- I.object().shape({
574
- bankName: I.string().nullable().notRequired(),
575
- bankAccNo: I.string().nullable().notRequired(),
576
- ifscCode: I.string().nullable().notRequired(),
577
- nameAccToBank: I.string().nullable().notRequired()
572
+ _.object().shape({
573
+ bankName: _.string().nullable().notRequired(),
574
+ bankAccNo: _.string().nullable().notRequired(),
575
+ ifscCode: _.string().nullable().notRequired(),
576
+ nameAccToBank: _.string().nullable().notRequired()
578
577
  })
579
578
  ), h && (h != null && h.isContactNumMandatory ? s = s.concat(
580
- I.object().shape({
581
- contactNumber: I.string().required("Phone number is required").matches(
579
+ _.object().shape({
580
+ contactNumber: _.string().required("Phone number is required").matches(
582
581
  /^[6-9]\d{9}$/,
583
582
  "Phone number must be 10 digits starting with 6-9"
584
583
  )
585
584
  })
586
585
  ) : s = s.concat(
587
- I.object().shape({
588
- contactNumber: I.string().nullable().transform((_) => _ === "" ? null : _).matches(/^[6-9]\d{9}$/, {
586
+ _.object().shape({
587
+ contactNumber: _.string().nullable().transform((v) => v === "" ? null : v).matches(/^[6-9]\d{9}$/, {
589
588
  message: "Phone number must be 10 digits starting with 6-9",
590
589
  excludeEmptyString: !0
591
590
  }).notRequired()
592
591
  })
593
592
  ), h != null && h.isEmailMandatory ? s = s.concat(
594
- I.object().shape({
595
- emailId: I.string().matches(
593
+ _.object().shape({
594
+ emailId: _.string().matches(
596
595
  /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
597
596
  "Enter a valid email address"
598
597
  ).required("Email is required")
599
598
  })
600
599
  ) : s = s.concat(
601
- I.object().shape({
602
- emailId: I.string().matches(
600
+ _.object().shape({
601
+ emailId: _.string().matches(
603
602
  /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
604
603
  "Enter a valid email address"
605
- ).nullable().transform((_) => _ === "" ? null : _).notRequired()
604
+ ).nullable().transform((v) => v === "" ? null : v).notRequired()
606
605
  })
607
606
  ), h != null && h.isConvoxIdMandatory && (s = s.concat(
608
- I.object().shape({
609
- convoxId: I.string().required("Convox Id is required")
607
+ _.object().shape({
608
+ convoxId: _.string().required("Convox Id is required")
610
609
  })
611
- )), (h == null ? void 0 : h.isAadharNumMandatory) && !S ? s = s.concat(
612
- I.object().shape({
613
- aadharNumber: I.string().required("Aadhaar number is required").matches(/^\d{12}$/, "Aadhaar number must be 12 digits")
610
+ )), (h == null ? void 0 : h.isAadharNumMandatory) && !C ? s = s.concat(
611
+ _.object().shape({
612
+ aadharNumber: _.string().required("Aadhaar number is required").matches(/^\d{12}$/, "Aadhaar number must be 12 digits")
614
613
  })
615
614
  ) : s = s.concat(
616
- I.object().shape({
617
- aadharNumber: I.string().nullable().transform((_) => _ === "" ? null : _).matches(/^\d{12}$/, {
615
+ _.object().shape({
616
+ aadharNumber: _.string().nullable().transform((v) => v === "" ? null : v).matches(/^\d{12}$/, {
618
617
  message: "Aadhaar number must be 12 digits",
619
618
  excludeEmptyString: !0
620
619
  }).notRequired()
621
620
  })
622
621
  ), h != null && h.isGeolocationMandatory ? s = s.concat(
623
- I.object().shape({
624
- latitude: I.number().typeError("Latitude must be a number").required("Latitude is required").min(-90, "Latitude must be between -90 and 90").max(90, "Latitude must be between -90 and 90"),
625
- longitude: I.number().typeError("Longitude must be a number").required("Longitude is required").min(-180, "Longitude must be between -180 and 180").max(180, "Longitude must be between -180 and 180")
622
+ _.object().shape({
623
+ latitude: _.number().typeError("Latitude must be a number").required("Latitude is required").min(-90, "Latitude must be between -90 and 90").max(90, "Latitude must be between -90 and 90"),
624
+ longitude: _.number().typeError("Longitude must be a number").required("Longitude is required").min(-180, "Longitude must be between -180 and 180").max(180, "Longitude must be between -180 and 180")
626
625
  })
627
626
  ) : s = s.concat(
628
- I.object().shape({
629
- latitude: I.number().transform(
630
- (_, R) => R === "" ? void 0 : _
627
+ _.object().shape({
628
+ latitude: _.number().transform(
629
+ (v, $) => $ === "" ? void 0 : v
631
630
  ).typeError("Latitude must be a number").nullable().min(-90, "Latitude must be between -90 and 90").max(90, "Latitude must be between -90 and 90").notRequired(),
632
- longitude: I.number().transform(
633
- (_, R) => R === "" ? void 0 : _
631
+ longitude: _.number().transform(
632
+ (v, $) => $ === "" ? void 0 : v
634
633
  ).typeError("Longitude must be a number").nullable().min(-180, "Longitude must be between -180 and 180").max(180, "Longitude must be between -180 and 180").notRequired()
635
634
  })
636
- )), we(Ca.concat(s));
637
- }, [c, h, S]);
635
+ )), ve(Ra.concat(s));
636
+ }, [l, h, C]);
638
637
  const J = ci({
639
638
  mode: "onChange",
640
639
  resolver: li(ce),
641
- context: { id: !!S, roleDetails: h },
640
+ context: { id: !!C, roleDetails: h },
642
641
  defaultValues: {
643
642
  infrastructureIds: [],
644
643
  prefferedLanguage: "",
@@ -647,129 +646,129 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
647
646
  }
648
647
  }), {
649
648
  control: m,
650
- setError: z,
651
- handleSubmit: A,
652
- formState: { errors: E },
649
+ setError: j,
650
+ handleSubmit: N,
651
+ formState: { errors: A },
653
652
  getValues: L,
654
653
  setValue: P,
655
654
  watch: M,
656
655
  clearErrors: ee,
657
656
  resetField: X,
658
- trigger: _e
657
+ trigger: qe
659
658
  } = J;
660
- Me(() => {
659
+ Se(() => {
661
660
  let s = te.current;
662
661
  return () => {
663
- xe("conversion_event", {
662
+ je("conversion_event", {
664
663
  form: s,
665
664
  form_name: "Add User",
666
- submit: Ie.current
665
+ submit: _e.current
667
666
  });
668
667
  };
669
668
  }, []);
670
669
  const De = async (s) => {
671
- var j;
670
+ var z;
672
671
  try {
673
672
  if (!s.target.value)
674
673
  return;
675
- const q = parseInt(s.target.value);
676
- e([]), be([]), Re([]);
677
- const { data: Y } = await _a({
678
- role_id: q
674
+ const v = parseInt(s.target.value);
675
+ e([]), be([]), Pe([]);
676
+ const { data: $ } = await _a({
677
+ role_id: v
679
678
  });
680
- if (((j = Y.hierarchy) == null ? void 0 : j.length) > 0) {
681
- const D = Y.hierarchy.map((_) => _.locationType);
682
- e(() => D), g(!0);
683
- const w = Y.hierarchy.map((_) => _.level);
684
- Be(Math.max(...w)), r([]);
679
+ if (((z = $.hierarchy) == null ? void 0 : z.length) > 0) {
680
+ const Z = $.hierarchy.map((T) => T.locationType);
681
+ e(() => Z), g(!0);
682
+ const q = $.hierarchy.map((T) => T.level);
683
+ Ue(Math.max(...q)), r([]);
685
684
  } else
686
- ta.current = 10, Be(10), g(!1), r((C == null ? void 0 : C.addedLocations) || []);
687
- if (Pe(() => {
688
- const D = ge.find((w) => w.id === q);
689
- return D ? {
690
- ...D,
691
- isDoctor: D.name.toLowerCase() === "doctor"
685
+ ta.current = 10, Ue(10), g(!1), r((R == null ? void 0 : R.addedLocations) || []);
686
+ if (Me(() => {
687
+ const Z = ge.find((q) => q.id === v);
688
+ return Z ? {
689
+ ...Z,
690
+ isDoctor: Z.name.toLowerCase() === "doctor"
692
691
  } : null;
693
- }), ee(), Ue({}), Ce({}), X("addedareas"), X("areas"), Y.roles.name.toLowerCase() === "doctor") {
694
- const D = await he({
692
+ }), ee(), Le({}), Ee({}), X("addedareas"), X("areas"), $.roles.name.toLowerCase() === "doctor") {
693
+ const Z = await he({
695
694
  code: "GET_SPECIALIZATION"
696
695
  });
697
- p(D.data.result), y(!0);
696
+ p(Z.data.result), y(!0);
698
697
  } else
699
698
  X("specialization"), y(!1);
700
- } catch (q) {
701
- console.error(q), ve({ type: "error", message: "error selecting role" });
699
+ } catch (v) {
700
+ console.error(v), fe({ type: "error", message: "error selecting role" });
702
701
  }
703
702
  }, la = async (s) => {
704
- const j = Ve.find(
705
- (q) => q.languageKey === s.target.value
703
+ const z = Ve.find(
704
+ (v) => v.languageKey === s.target.value
706
705
  );
707
- j && P("prefferedLanguage", j.languageKey);
706
+ z && P("prefferedLanguage", z.languageKey);
708
707
  }, He = async (s) => {
709
- var j;
708
+ var z;
710
709
  try {
711
- K.length === 0 && (ee("areas"), Ce({})), S && ((j = C == null ? void 0 : C.addedLocations) != null && j.includes(s)) && r((R) => [...R, s]);
712
- const q = ye == null ? void 0 : ye.map(
713
- (_) => _.infraid
714
- ), { data: Y } = await Ka(
715
- [...q],
710
+ K.length === 0 && (ee("areas"), Ee({})), C && ((z = R == null ? void 0 : R.addedLocations) != null && z.includes(s)) && r((B) => [...B, s]);
711
+ const v = ye == null ? void 0 : ye.map(
712
+ (T) => T.infraid
713
+ ), { data: $ } = await Ka(
714
+ [...v],
716
715
  s.locationId
717
716
  );
718
- if (Y.errorcode === 400) {
719
- Ge(Y.message), ie(3);
717
+ if ($.errorcode === 400) {
718
+ Ge($.message), ie(3);
720
719
  return;
721
720
  }
722
- const D = K.filter((_) => _ !== s);
723
- be(D);
724
- const { data: w } = await he({
721
+ const Z = K.filter((T) => T !== s);
722
+ be(Z);
723
+ const { data: q } = await he({
725
724
  code: "retrieve_infra_by_role_location",
726
725
  parameters: {
727
726
  roleId: h == null ? void 0 : h.id,
728
- locationIds: D.map((_) => _.locationId)
727
+ locationIds: Z.map((T) => T.locationId)
729
728
  }
730
729
  });
731
- le(w.result);
732
- } catch (q) {
733
- console.error(q);
730
+ le(q.result);
731
+ } catch (v) {
732
+ console.error(v);
734
733
  }
735
- }, Te = ja(
734
+ }, Re = ja(
736
735
  (s) => {
737
- B.isBahaar || (s === "Mr" ? P("gender", "M") : (s === "Mrs" || s === "Ms") && P("gender", "F"));
736
+ E.isBahaar || (s === "Mr" ? P("gender", "M") : (s === "Mrs" || s === "Ms") && P("gender", "F"));
738
737
  },
739
738
  [P]
740
739
  ), Ma = async (s) => {
741
- var q, Y, D, w, _;
742
- const j = {
743
- ...C,
740
+ var v, $, Z, q, T;
741
+ const z = {
742
+ ...R,
744
743
  // Spread only if needed, else write explicitly too
745
744
  ...s,
746
745
  lastName: (s == null ? void 0 : s.lastName) || "",
747
746
  addedLocations: K,
748
747
  infrastructureIds: ye.map(
749
- (R) => R.infraid
748
+ (B) => B.infraid
750
749
  ),
751
750
  bankNameId: O.length > 0 ? s == null ? void 0 : s.bankName : null,
752
- bankName: O.length > 0 ? ((q = O.find((R) => R.id == (s == null ? void 0 : s.bankName))) == null ? void 0 : q.value) ?? (s == null ? void 0 : s.bankName) : s == null ? void 0 : s.bankName
751
+ bankName: O.length > 0 ? ((v = O.find((B) => B.id == (s == null ? void 0 : s.bankName))) == null ? void 0 : v.value) ?? (s == null ? void 0 : s.bankName) : s == null ? void 0 : s.bankName
753
752
  };
754
- if (a.length > 0 && (j.deletedLocations = a), !K.length && u) {
755
- ve({
753
+ if (a.length > 0 && (z.deletedLocations = a), !K.length && u) {
754
+ fe({
756
755
  message: "Please add atleast one area of intervention",
757
756
  type: "error"
758
757
  });
759
758
  return;
760
759
  }
761
760
  if (h != null && h.isHealthInfraMandatory && !ye.length) {
762
- ve({
761
+ fe({
763
762
  message: "Please add atleast one Health Infrastructure",
764
763
  type: "info"
765
764
  });
766
765
  return;
767
766
  }
768
767
  try {
769
- await Wa(j) && (S ? ve({ message: "User Updated Successfully", type: "success" }) : ve({ message: "User Added Successfully", type: "success" }), h.name.toLowerCase() === "doctor" && (S ? await he({
768
+ await Wa(z) && (C ? fe({ message: "User Updated Successfully", type: "success" }) : fe({ message: "User Added Successfully", type: "success" }), h.name.toLowerCase() === "doctor" && (C ? await he({
770
769
  code: "UPDATE_DOCTOR_DETAILS",
771
770
  parameters: {
772
- userId: parseInt(S),
771
+ userId: parseInt(C),
773
772
  specializationId: parseInt(s == null ? void 0 : s.specialization)
774
773
  // averageDuration: parseInt(formValues?.averageDuration),
775
774
  }
@@ -780,89 +779,89 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
780
779
  specializationId: parseInt(s == null ? void 0 : s.specialization)
781
780
  // averageDuration: parseInt(formValues?.averageDuration),
782
781
  }
783
- }), re && await Ja(s == null ? void 0 : s.userName, re)), Ie.current = !0, Ne("/ui/medplat/manage/users", {
782
+ }), re && await Ja(s == null ? void 0 : s.userName, re)), _e.current = !0, Ie("/ui/medplat/manage/users", {
784
783
  state: {
785
784
  fromManageUser: !0
786
785
  }
787
786
  }));
788
- } catch (R) {
789
- ((D = (Y = R == null ? void 0 : R.response) == null ? void 0 : Y.data) == null ? void 0 : D.errorcode) === 400 ? ve({
790
- message: (_ = (w = R == null ? void 0 : R.response) == null ? void 0 : w.data) == null ? void 0 : _.message,
787
+ } catch (B) {
788
+ ((Z = ($ = B == null ? void 0 : B.response) == null ? void 0 : $.data) == null ? void 0 : Z.errorcode) === 400 ? fe({
789
+ message: (T = (q = B == null ? void 0 : B.response) == null ? void 0 : q.data) == null ? void 0 : T.message,
791
790
  type: "error"
792
- }) : ve({
793
- message: `Something went wrong while ${S ? "Updating" : "Adding"} user`,
791
+ }) : fe({
792
+ message: `Something went wrong while ${C ? "Updating" : "Adding"} user`,
794
793
  type: "error"
795
794
  });
796
795
  }
797
796
  }, Pa = () => {
798
- Ne("/ui/medplat/manage/users", {
797
+ Ie("/ui/medplat/manage/users", {
799
798
  state: {
800
799
  fromManageUser: !0
801
800
  }
802
801
  });
803
- }, Ra = async (s) => {
802
+ }, Ta = async (s) => {
804
803
  try {
805
- const j = s.target.value.toLowerCase();
806
- if (P("userName", j, { shouldValidate: !0 }), (C == null ? void 0 : C.userName) !== j) {
807
- const { data: q } = await Ia({
804
+ const z = s.target.value.toLowerCase();
805
+ if (P("userName", z, { shouldValidate: !0 }), (R == null ? void 0 : R.userName) !== z) {
806
+ const { data: v } = await Ia({
808
807
  action: "checkusername",
809
- username: j
808
+ username: z
810
809
  });
811
- q ? o(`${j} User Name is available`) : z("userName", {
810
+ v ? o(`${z} User Name is available`) : j("userName", {
812
811
  type: "manual",
813
812
  message: "Username already exists"
814
813
  });
815
814
  }
816
815
  return !0;
817
- } catch (j) {
818
- console.error(j);
816
+ } catch (z) {
817
+ console.error(z);
819
818
  }
820
819
  }, La = async (s) => {
821
- var j;
820
+ var z;
822
821
  try {
823
- const q = Number((j = s.target) == null ? void 0 : j.value);
824
- return q && Number(C == null ? void 0 : C.contactNumber) !== q && await Ia({
822
+ const v = Number((z = s.target) == null ? void 0 : z.value);
823
+ return v && Number(R == null ? void 0 : R.contactNumber) !== v && await Ia({
825
824
  action: "checkphone",
826
- phone: q
827
- }).catch((Y) => {
828
- const { data: D, message: w } = Y.response.data;
829
- z("contactNumber", {
825
+ phone: v
826
+ }).catch(($) => {
827
+ const { data: Z, message: q } = $.response.data;
828
+ j("contactNumber", {
830
829
  type: "manual",
831
- message: `${w} ${D}`
830
+ message: `${q} ${Z}`
832
831
  });
833
832
  }), !0;
834
- } catch (q) {
835
- console.error(q);
833
+ } catch (v) {
834
+ console.error(v);
836
835
  }
837
836
  }, Ua = async () => {
838
- var s, j;
837
+ var s, z;
839
838
  try {
840
- xe("button_click", {
839
+ je("button_click", {
841
840
  button_name: "user-form-add-area-button",
842
841
  button_type: "add",
843
842
  button_id: "add-area-button"
844
- }), Ue({}), ee("addedareas");
845
- const q = L("roleId");
846
- if (q) {
847
- if (Ce({}), Ye.length) {
843
+ }), Le({}), ee("addedareas");
844
+ const v = L("roleId");
845
+ if (v) {
846
+ if (Ee({}), Ye.length) {
848
847
  const ae = Ye.includes(
849
- (j = (s = fe == null ? void 0 : fe.finalSelected) == null ? void 0 : s.optionSelected) == null ? void 0 : j.type
848
+ (z = (s = ke == null ? void 0 : ke.finalSelected) == null ? void 0 : s.optionSelected) == null ? void 0 : z.type
850
849
  ), { data: Ze } = await Za(), Ke = Ye.map(
851
850
  (Fa) => Ze.find(($a) => $a.type === Fa).name
852
851
  );
853
852
  if (!ae)
854
- return Ce({
853
+ return Ee({
855
854
  message: `The role you have selected is allowed to add only - ${[...Ke]}`
856
855
  }), null;
857
856
  }
858
- const { name: Y, type: D, id: w } = fe.finalSelected.optionSelected, _ = {
859
- locationId: w,
860
- type: D,
861
- name: Y,
862
- level: fe.finalSelected.level
857
+ const { name: $, type: Z, id: q } = ke.finalSelected.optionSelected, T = {
858
+ locationId: q,
859
+ type: Z,
860
+ name: $,
861
+ level: ke.finalSelected.level
863
862
  };
864
- if (K.find((ae) => ae.locationId === w)) {
865
- Ue({
863
+ if (K.find((ae) => ae.locationId === q)) {
864
+ Le({
866
865
  message: "This area is already added. Please add another Duplicacy of area of intervention found. Kindly add another."
867
866
  });
868
867
  return;
@@ -871,12 +870,12 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
871
870
  if (K.length > 0) {
872
871
  const ae = K.map((Ke) => Ke.locationId), { data: Ze } = await ba({
873
872
  locationIds: ae,
874
- roleId: q,
875
- toBeAdded: w
873
+ roleId: v,
874
+ toBeAdded: q
876
875
  });
877
876
  Q = Ze;
878
877
  } else {
879
- const { data: ae } = await ba({ roleId: q, toBeAdded: w });
878
+ const { data: ae } = await ba({ roleId: v, toBeAdded: q });
880
879
  Q = ae;
881
880
  }
882
881
  if (Q.errorcode === 1 && Q.data) {
@@ -884,8 +883,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
884
883
  Ge(ae), ie(4);
885
884
  return;
886
885
  } else if (Q.errorcode === 1 && !Q.data) {
887
- _.locationFullName = Q.message;
888
- const ae = [...K, { ..._ }];
886
+ T.locationFullName = Q.message;
887
+ const ae = [...K, { ...T }];
889
888
  be(ae);
890
889
  const { data: Ze } = await he({
891
890
  code: "retrieve_infra_by_role_location",
@@ -896,7 +895,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
896
895
  });
897
896
  le(Ze.result);
898
897
  } else if (Q.errorcode === 2 && !Q.data) {
899
- Ue({
898
+ Le({
900
899
  message: "Duplicacy of area of intervention found. Kindly add another."
901
900
  });
902
901
  return;
@@ -907,26 +906,26 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
907
906
  }
908
907
  ie(0);
909
908
  } else
910
- return Ce({
909
+ return Ee({
911
910
  type: "manual",
912
911
  message: "Please select a role to add area of intervention"
913
912
  }), null;
914
- } catch (q) {
915
- console.error(q);
913
+ } catch (v) {
914
+ console.error(v);
916
915
  }
917
916
  }, wa = async () => {
918
- await _e(["password", "confirmPassword"]);
917
+ await qe(["password", "confirmPassword"]);
919
918
  }, Ba = async () => {
920
919
  try {
921
920
  const { data: s } = await he({
922
921
  code: "unlock_user_option",
923
922
  parameters: {
924
- userId: C == null ? void 0 : C.id
923
+ userId: R == null ? void 0 : R.id
925
924
  }
926
925
  });
927
926
  ie(0);
928
- const { data: j } = await qa(S);
929
- pe(j), s.result ? ve({ message: "User Unlocked Successfully", type: "success" }) : ve({
927
+ const { data: z } = await qa(C);
928
+ pe(z), s.result ? fe({ message: "User Unlocked Successfully", type: "success" }) : fe({
930
929
  message: "Facing issue in Unlocking User",
931
930
  type: "error"
932
931
  });
@@ -934,132 +933,132 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
934
933
  console.error(s);
935
934
  }
936
935
  }, za = ja(async () => {
937
- var s, j;
936
+ var s, z;
938
937
  try {
939
- l(!0);
940
- const [q, Y, D] = await Promise.all([
938
+ c(!0);
939
+ const [v, $, Z] = await Promise.all([
941
940
  Ya(),
942
941
  Xa("techo.manage.users"),
943
942
  Da()
944
943
  ]);
945
- Ae(q == null ? void 0 : q.data), oa(JSON.parse(Y == null ? void 0 : Y.data)), ea(D == null ? void 0 : D.data);
944
+ Ne(v == null ? void 0 : v.data), oa(JSON.parse($ == null ? void 0 : $.data)), ea(Z == null ? void 0 : Z.data);
946
945
  try {
947
- if (B.isTecho)
946
+ if (E.isTecho)
948
947
  F([]);
949
948
  else {
950
- const w = await he({
949
+ const q = await he({
951
950
  code: "get_bank_names_for_pbi"
952
951
  });
953
- F(((s = w == null ? void 0 : w.data) == null ? void 0 : s.result) || []);
952
+ F(((s = q == null ? void 0 : q.data) == null ? void 0 : s.result) || []);
954
953
  }
955
954
  } catch {
956
955
  F([]);
957
956
  }
958
- if (S) {
959
- qe("Update User"), e([]), be([]);
960
- const { data: w } = await qa(S);
961
- pe(w), w.addedLocations && be(w.addedLocations);
962
- const { data: _ } = await _a({
963
- role_id: w.roleId
957
+ if (C) {
958
+ xe("Update User"), e([]), be([]);
959
+ const { data: q } = await qa(C);
960
+ pe(q), q.addedLocations && be(q.addedLocations);
961
+ const { data: T } = await _a({
962
+ role_id: q.roleId
964
963
  });
965
- if (((j = _.hierarchy) == null ? void 0 : j.length) > 0) {
966
- const R = _.hierarchy.map(
964
+ if (((z = T.hierarchy) == null ? void 0 : z.length) > 0) {
965
+ const B = T.hierarchy.map(
967
966
  (ae) => ae.locationType
968
967
  );
969
- e(R);
970
- const Q = _.hierarchy.map((ae) => ae.level);
971
- Be(Math.max(...Q));
968
+ e(B);
969
+ const Q = T.hierarchy.map((ae) => ae.level);
970
+ Ue(Math.max(...Q));
972
971
  } else
973
- ta.current = 10, Be(10);
974
- if (Pe(() => {
975
- var R;
976
- return _ != null && _.roles ? {
977
- ..._ == null ? void 0 : _.roles,
978
- isDoctor: ((R = _ == null ? void 0 : _.roles) == null ? void 0 : R.name.toLowerCase()) === "doctor"
972
+ ta.current = 10, Ue(10);
973
+ if (Me(() => {
974
+ var B;
975
+ return T != null && T.roles ? {
976
+ ...T == null ? void 0 : T.roles,
977
+ isDoctor: ((B = T == null ? void 0 : T.roles) == null ? void 0 : B.name.toLowerCase()) === "doctor"
979
978
  } : null;
980
- }), _.roles.name.toLowerCase() === "doctor") {
981
- const R = await he({
979
+ }), T.roles.name.toLowerCase() === "doctor") {
980
+ const B = await he({
982
981
  code: "GET_SPECIALIZATION"
983
982
  });
984
- p(R.data.result), y(!0);
983
+ p(B.data.result), y(!0);
985
984
  } else
986
985
  X("specialization"), y(!1);
987
- if ((w == null ? void 0 : w.addedLocations.length) > 0) {
986
+ if ((q == null ? void 0 : q.addedLocations.length) > 0) {
988
987
  g(!0);
989
- const { data: R } = await he({
988
+ const { data: B } = await he({
990
989
  code: "retrieve_infra_by_role_location",
991
990
  parameters: {
992
- roleId: Number(w == null ? void 0 : w.roleId),
993
- locationIds: w == null ? void 0 : w.addedLocations.map(
991
+ roleId: Number(q == null ? void 0 : q.roleId),
992
+ locationIds: q == null ? void 0 : q.addedLocations.map(
994
993
  (Q) => Q.locationId
995
994
  )
996
995
  }
997
996
  });
998
- le(R.result), Re(
999
- R.result.filter(
1000
- (Q) => w == null ? void 0 : w.infrastructureIds.includes(Q.infraid)
997
+ le(B.result), Pe(
998
+ B.result.filter(
999
+ (Q) => q == null ? void 0 : q.infrastructureIds.includes(Q.infraid)
1001
1000
  )
1002
1001
  );
1003
1002
  }
1004
- ia(!0), Object.keys(w).map(
1005
- (R) => P(R, w == null ? void 0 : w[R])
1006
- ), P("prefferedLanguage", w == null ? void 0 : w.prefferedLanguage), w != null && w.bankNameId && !B.isTecho && P("bankName", w.bankNameId);
1003
+ ia(!0), Object.keys(q).map(
1004
+ (B) => P(B, q == null ? void 0 : q[B])
1005
+ ), P("prefferedLanguage", q == null ? void 0 : q.prefferedLanguage), q != null && q.bankNameId && !E.isTecho && P("bankName", q.bankNameId);
1007
1006
  }
1008
- l(!1);
1009
- } catch (q) {
1010
- console.error("Error loading initial data:", q), ve({
1011
- message: `error : ${q == null ? void 0 : q.message}`,
1007
+ c(!1);
1008
+ } catch (v) {
1009
+ console.error("Error loading initial data:", v), fe({
1010
+ message: `error : ${v == null ? void 0 : v.message}`,
1012
1011
  type: "error"
1013
- }), l((Y) => !Y);
1012
+ }), c(($) => !$);
1014
1013
  }
1015
- }, [S, P]);
1016
- Me(() => {
1014
+ }, [C, P]);
1015
+ Se(() => {
1017
1016
  za();
1018
- }, [za]), Me(() => {
1019
- v && S && Oa();
1020
- }, [v, S]);
1017
+ }, [za]), Se(() => {
1018
+ w && C && Oa();
1019
+ }, [w, C]);
1021
1020
  const Oa = async () => {
1022
1021
  try {
1023
1022
  const s = await he({
1024
1023
  code: "GET_SPECIALIZATION_BY_USERID",
1025
1024
  parameters: {
1026
- id: parseInt(S)
1025
+ id: parseInt(C)
1027
1026
  }
1028
1027
  });
1029
1028
  P("specialization", s.data.result[0].specialization_id);
1030
- const j = await Ha(parseInt(S)), q = new Blob([j], { type: "application/image" }), Y = URL.createObjectURL(q);
1031
- W(Y);
1029
+ const z = await Ha(parseInt(C)), v = new Blob([z], { type: "application/image" }), $ = URL.createObjectURL(v);
1030
+ W($);
1032
1031
  } catch (s) {
1033
1032
  console.error(s);
1034
1033
  }
1035
1034
  };
1036
- return Me(() => {
1037
- const s = M((j, { name: q }) => {
1038
- q === "title" && Te(j.title);
1035
+ return Se(() => {
1036
+ const s = M((z, { name: v }) => {
1037
+ v === "title" && Re(z.title);
1039
1038
  });
1040
1039
  return () => s.unsubscribe();
1041
- }, [M, Te]), S && !(c != null && c["update.manage.users"]) && !t ? /* @__PURE__ */ i(
1040
+ }, [M, Re]), C && l !== null && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users"], void 0, !0) && !t ? /* @__PURE__ */ i(
1042
1041
  ca,
1043
1042
  {
1044
1043
  className: "flex justify-center items-center w-full h-[80vh]",
1045
1044
  "data-testid": "update-user-permission",
1046
- children: /* @__PURE__ */ i(ka, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(ze, { variant: "h5", className: "text-customBlue", children: "You dont have permission to update Users" }) })
1045
+ children: /* @__PURE__ */ i(ka, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(we, { variant: "h5", className: "text-customBlue", children: "You dont have permission to update Users" }) })
1047
1046
  }
1048
- ) : !S && !(c != null && c["create.manage.users"]) && !t ? /* @__PURE__ */ i(
1047
+ ) : !C && l !== null && !E.hasCheckRights(l == null ? void 0 : l["create.manage.users"], void 0, !0) && !t ? /* @__PURE__ */ i(
1049
1048
  ca,
1050
1049
  {
1051
1050
  className: "flex justify-center items-center w-full h-[80vh]",
1052
1051
  "data-testid": "create-user-permission",
1053
- children: /* @__PURE__ */ i(ka, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(ze, { variant: "h5", className: "text-customBlue", children: "You dont have permission to Add Users" }) })
1052
+ children: /* @__PURE__ */ i(ka, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(we, { variant: "h5", className: "text-customBlue", children: "You dont have permission to Add Users" }) })
1054
1053
  }
1055
- ) : /* @__PURE__ */ $(de, { children: [
1054
+ ) : /* @__PURE__ */ G(de, { children: [
1056
1055
  ne === 1 && /* @__PURE__ */ i(xa, { children: /* @__PURE__ */ i(
1057
1056
  fi,
1058
1057
  {
1059
1058
  open: ne === 1,
1060
1059
  onClose: () => ie(0),
1061
- userId: C == null ? void 0 : C.id,
1062
- roleCode: C == null ? void 0 : C.roleCode,
1060
+ userId: R == null ? void 0 : R.id,
1061
+ roleCode: R == null ? void 0 : R.roleCode,
1063
1062
  "data-testid": "change-password-modal"
1064
1063
  }
1065
1064
  ) }),
@@ -1083,25 +1082,25 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1083
1082
  ref: te,
1084
1083
  component: "form",
1085
1084
  onSubmit: (s) => {
1086
- xe("button_click", {
1087
- button_name: S ? "add-user-button" : "update-user-button",
1085
+ je("button_click", {
1086
+ button_name: C ? "add-user-button" : "update-user-button",
1088
1087
  button_type: "submit",
1089
1088
  button_id: "submit-button"
1090
1089
  });
1091
- const j = { ...E };
1092
- if (Object.keys(j).length > 0) {
1090
+ const z = { ...A };
1091
+ if (Object.keys(z).length > 0) {
1093
1092
  s.preventDefault();
1094
1093
  return;
1095
1094
  }
1096
- A(Ma)(s);
1095
+ N(Ma)(s);
1097
1096
  },
1098
1097
  noValidate: !0,
1099
- children: /* @__PURE__ */ $(bi, { isLoading: t, children: [
1098
+ children: /* @__PURE__ */ G(bi, { isLoading: t, children: [
1100
1099
  /* @__PURE__ */ i(x, { item: !0, container: !0, direction: "row", children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ i(
1101
1100
  ri,
1102
1101
  {
1103
1102
  className: "p-2.5 px-5 flex border-b",
1104
- subheader: /* @__PURE__ */ $(
1103
+ subheader: /* @__PURE__ */ G(
1105
1104
  ca,
1106
1105
  {
1107
1106
  display: "flex",
@@ -1109,7 +1108,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1109
1108
  justifyContent: "space-between",
1110
1109
  children: [
1111
1110
  /* @__PURE__ */ i(
1112
- ze,
1111
+ we,
1113
1112
  {
1114
1113
  variant: "body1",
1115
1114
  className: "font-medium text-lg text-customBlue",
@@ -1117,8 +1116,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1117
1116
  children: oe(ra)
1118
1117
  }
1119
1118
  ),
1120
- /* @__PURE__ */ $(x, { item: !0, children: [
1121
- S && (c == null ? void 0 : c["update.manage.users.canUnlockUser"]) && (C == null ? void 0 : C.isLocked) && /* @__PURE__ */ i(
1119
+ /* @__PURE__ */ G(x, { item: !0, children: [
1120
+ C && E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canUnlockUser"], void 0, !0) && (R == null ? void 0 : R.isLocked) && /* @__PURE__ */ i(
1122
1121
  Xe,
1123
1122
  {
1124
1123
  variant: "contained",
@@ -1130,7 +1129,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1130
1129
  children: oe("Unlock User")
1131
1130
  }
1132
1131
  ),
1133
- S && (c == null ? void 0 : c["update.manage.users.changePassword"]) && /* @__PURE__ */ i(
1132
+ C && E.hasCheckRights(l == null ? void 0 : l["update.manage.users.changePassword"], void 0, !0) && /* @__PURE__ */ i(
1134
1133
  Xe,
1135
1134
  {
1136
1135
  variant: "contained",
@@ -1151,7 +1150,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1151
1150
  }
1152
1151
  }
1153
1152
  ) }) }),
1154
- /* @__PURE__ */ i(ni, { children: /* @__PURE__ */ $(x, { container: !0, size: { xs: 12 }, spacing: 2, direction: "row", children: [
1153
+ /* @__PURE__ */ i(ni, { children: /* @__PURE__ */ G(x, { container: !0, size: { xs: 12 }, spacing: 2, direction: "row", children: [
1155
1154
  /* @__PURE__ */ i(
1156
1155
  x,
1157
1156
  {
@@ -1159,9 +1158,9 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1159
1158
  size: {
1160
1159
  xs: 12,
1161
1160
  sm: 12,
1162
- md: u || v ? 6 : 12
1161
+ md: u || w ? 6 : 12
1163
1162
  },
1164
- children: /* @__PURE__ */ $(x, { container: !0, spacing: 2, children: [
1163
+ children: /* @__PURE__ */ G(x, { container: !0, spacing: 2, children: [
1165
1164
  /* @__PURE__ */ i(
1166
1165
  x,
1167
1166
  {
@@ -1169,10 +1168,10 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1169
1168
  size: {
1170
1169
  xs: 12,
1171
1170
  sm: 12,
1172
- md: u || v ? 12 : 6
1171
+ md: u || w ? 12 : 6
1173
1172
  },
1174
- children: /* @__PURE__ */ $(x, { container: !0, spacing: 2, children: [
1175
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "User Role", required: !0, children: /* @__PURE__ */ i(
1173
+ children: /* @__PURE__ */ G(x, { container: !0, spacing: 2, children: [
1174
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "User Role", required: !0, children: /* @__PURE__ */ i(
1176
1175
  Je,
1177
1176
  {
1178
1177
  control: m,
@@ -1184,66 +1183,66 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1184
1183
  onChange: (s) => {
1185
1184
  De(s);
1186
1185
  },
1187
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageRole"]),
1188
- errors: E,
1186
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageRole"]),
1187
+ errors: A,
1189
1188
  dataTestId: "role-dropdown"
1190
1189
  }
1191
1190
  ) }) }),
1192
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "Title", children: /* @__PURE__ */ i(
1191
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Title", children: /* @__PURE__ */ i(
1193
1192
  Je,
1194
1193
  {
1195
1194
  control: m,
1196
1195
  name: "title",
1197
1196
  id: "title",
1198
1197
  options: ["Mr", "Mrs", "Dr", "Ms"],
1199
- disableClearable: !B.isBahaar,
1200
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageUsersBasicInformation"]),
1201
- errors: E,
1198
+ disableClearable: !E.isBahaar,
1199
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageUsersBasicInformation"]),
1200
+ errors: A,
1202
1201
  dataTestId: "title-dropdown"
1203
1202
  }
1204
1203
  ) }) }),
1205
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6, md: 4 }, children: /* @__PURE__ */ i(G, { label: "First Name", required: !0, children: /* @__PURE__ */ i(
1204
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6, md: 4 }, children: /* @__PURE__ */ i(Y, { label: "First Name", required: !0, children: /* @__PURE__ */ i(
1206
1205
  se,
1207
1206
  {
1208
1207
  control: m,
1209
1208
  id: "firstName",
1210
1209
  name: "firstName",
1211
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageUsersBasicInformation"]),
1212
- errors: E,
1210
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageUsersBasicInformation"]),
1211
+ errors: A,
1213
1212
  label: "",
1214
1213
  dataTestId: "first-name-input"
1215
1214
  }
1216
1215
  ) }) }),
1217
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6, md: 4 }, children: /* @__PURE__ */ i(G, { label: "Middle Name", children: /* @__PURE__ */ i(
1216
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6, md: 4 }, children: /* @__PURE__ */ i(Y, { label: "Middle Name", children: /* @__PURE__ */ i(
1218
1217
  se,
1219
1218
  {
1220
1219
  control: m,
1221
1220
  id: "middleName",
1222
1221
  name: "middleName",
1223
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageUsersBasicInformation"]),
1224
- errors: E,
1222
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageUsersBasicInformation"]),
1223
+ errors: A,
1225
1224
  label: "",
1226
1225
  dataTestId: "middle-name-input"
1227
1226
  }
1228
1227
  ) }) }),
1229
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 4 }, children: /* @__PURE__ */ i(G, { label: "Last name", required: !0, children: /* @__PURE__ */ i(
1228
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 4 }, children: /* @__PURE__ */ i(Y, { label: "Last name", required: !0, children: /* @__PURE__ */ i(
1230
1229
  se,
1231
1230
  {
1232
1231
  control: m,
1233
1232
  id: "lastName",
1234
1233
  name: "lastName",
1235
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageUsersBasicInformation"]),
1236
- errors: E,
1234
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageUsersBasicInformation"]),
1235
+ errors: A,
1237
1236
  label: "",
1238
1237
  dataTestId: "last-name-input"
1239
1238
  }
1240
1239
  ) }) }),
1241
- (c == null ? void 0 : c["manage.users.dateOfBirth"]) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "Date Of Birth", children: /* @__PURE__ */ i(
1240
+ E.hasCheckRights(l == null ? void 0 : l["manage.users.dateOfBirth"], void 0, !0) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Date Of Birth", children: /* @__PURE__ */ i(
1242
1241
  Aa,
1243
1242
  {
1244
1243
  control: m,
1245
1244
  name: "dateOfBirth",
1246
- errors: E,
1245
+ errors: A,
1247
1246
  format: "DD/MM/YYYY",
1248
1247
  minDate: Qe("1925-01-01"),
1249
1248
  maxDate: Qe().subtract(15, "year")
@@ -1255,14 +1254,14 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1255
1254
  item: !0,
1256
1255
  size: { xs: 12, sm: 12, md: 6 },
1257
1256
  sx: { paddingLeft: { md: "1rem" } },
1258
- children: /* @__PURE__ */ i(G, { label: "Gender", required: !0, children: /* @__PURE__ */ $(da, { component: "fieldset", margin: "normal", children: [
1257
+ children: /* @__PURE__ */ i(Y, { label: "Gender", required: !0, children: /* @__PURE__ */ G(da, { component: "fieldset", margin: "normal", children: [
1259
1258
  /* @__PURE__ */ i(
1260
1259
  ua,
1261
1260
  {
1262
1261
  name: "gender",
1263
1262
  control: m,
1264
1263
  defaultValue: "M",
1265
- render: ({ field: s }) => /* @__PURE__ */ $(
1264
+ render: ({ field: s }) => /* @__PURE__ */ G(
1266
1265
  ma,
1267
1266
  {
1268
1267
  row: !0,
@@ -1277,7 +1276,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1277
1276
  control: /* @__PURE__ */ i(
1278
1277
  ue,
1279
1278
  {
1280
- disabled: !B.isBahaar && (M("title") === "Mrs" || M("title") === "Ms") || S && B.isTecho && !(c != null && c["update.manage.users.canManageUsersBasicInformation"])
1279
+ disabled: !E.isBahaar && (M("title") === "Mrs" || M("title") === "Ms") || C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageUsersBasicInformation"])
1281
1280
  }
1282
1281
  ),
1283
1282
  label: "Male",
@@ -1296,7 +1295,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1296
1295
  control: /* @__PURE__ */ i(
1297
1296
  ue,
1298
1297
  {
1299
- disabled: !B.isBahaar && M("title") === "Mr" || S && B.isTecho && !(c != null && c["update.manage.users.canManageUsersBasicInformation"])
1298
+ disabled: !E.isBahaar && M("title") === "Mr" || C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageUsersBasicInformation"])
1300
1299
  }
1301
1300
  ),
1302
1301
  label: "Female",
@@ -1308,14 +1307,14 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1308
1307
  "data-testid": "gender-female"
1309
1308
  }
1310
1309
  ),
1311
- B.isBahaar && /* @__PURE__ */ i(
1310
+ E.isBahaar && /* @__PURE__ */ i(
1312
1311
  me,
1313
1312
  {
1314
1313
  value: "O",
1315
1314
  control: /* @__PURE__ */ i(
1316
1315
  ue,
1317
1316
  {
1318
- disabled: !B.isBahaar && M("title") && M("title") !== "Dr" || S && B.isTecho && !(c != null && c["update.manage.users.canManageUsersBasicInformation"])
1317
+ disabled: !E.isBahaar && M("title") && M("title") !== "Dr" || C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageUsersBasicInformation"])
1319
1318
  }
1320
1319
  ),
1321
1320
  label: "Other",
@@ -1332,28 +1331,28 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1332
1331
  )
1333
1332
  }
1334
1333
  ),
1335
- E.gender && /* @__PURE__ */ i(ze, { color: "error", children: E.gender.message })
1334
+ A.gender && /* @__PURE__ */ i(we, { color: "error", children: A.gender.message })
1336
1335
  ] }) })
1337
1336
  }
1338
1337
  ),
1339
- (c == null ? void 0 : c["manage.users.joiningDate"]) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "Joining date", children: /* @__PURE__ */ i(
1338
+ E.hasCheckRights(l == null ? void 0 : l["manage.users.joiningDate"], void 0, !0) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Joining date", children: /* @__PURE__ */ i(
1340
1339
  Aa,
1341
1340
  {
1342
1341
  control: m,
1343
1342
  name: "joiningDate",
1344
- errors: E,
1343
+ errors: A,
1345
1344
  format: "DD/MM/YYYY",
1346
1345
  minDate: M("dateOfBirth") ? Qe(M("dateOfBirth")) : Qe("2000-01-01"),
1347
1346
  maxDate: Qe()
1348
1347
  }
1349
1348
  ) }) }) }),
1350
- (c == null ? void 0 : c["manage.users.batchNo"]) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "Batch No.", children: /* @__PURE__ */ i(
1349
+ E.hasCheckRights(l == null ? void 0 : l["manage.users.batchNo"], void 0, !0) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Batch No.", children: /* @__PURE__ */ i(
1351
1350
  se,
1352
1351
  {
1353
1352
  control: m,
1354
1353
  id: "batchNo",
1355
1354
  name: "batchNo",
1356
- errors: E,
1355
+ errors: A,
1357
1356
  label: "",
1358
1357
  dataTestId: "batchNo-input",
1359
1358
  inputProps: {
@@ -1363,8 +1362,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1363
1362
  }
1364
1363
  }
1365
1364
  ) }) }) }),
1366
- (c == null ? void 0 : c["manage.users.maritalStatus"]) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(
1367
- G,
1365
+ E.hasCheckRights(l == null ? void 0 : l["manage.users.maritalStatus"], void 0, !0) && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(
1366
+ Y,
1368
1367
  {
1369
1368
  label: "Marital Status",
1370
1369
  required: !0,
@@ -1375,7 +1374,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1375
1374
  name: "maritalStatus",
1376
1375
  control: m,
1377
1376
  defaultValue: "Single",
1378
- render: ({ field: s }) => /* @__PURE__ */ $(
1377
+ render: ({ field: s }) => /* @__PURE__ */ G(
1379
1378
  ma,
1380
1379
  {
1381
1380
  row: !0,
@@ -1442,47 +1441,47 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1442
1441
  size: {
1443
1442
  xs: 12,
1444
1443
  sm: 12,
1445
- md: u || v ? 12 : 6
1444
+ md: u || w ? 12 : 6
1446
1445
  },
1447
- children: /* @__PURE__ */ $(x, { container: !0, spacing: 2, children: [
1448
- /* @__PURE__ */ i(G, { label: "Username", required: !0, children: /* @__PURE__ */ i(
1446
+ children: /* @__PURE__ */ G(x, { container: !0, spacing: 2, children: [
1447
+ /* @__PURE__ */ i(Y, { label: "Username", required: !0, children: /* @__PURE__ */ i(
1449
1448
  se,
1450
1449
  {
1451
1450
  control: m,
1452
1451
  id: "userName",
1453
1452
  name: "userName",
1454
- errors: E,
1453
+ errors: A,
1455
1454
  successMessage: n,
1456
1455
  onChange: async (s) => {
1457
- await _e("userName") && Ra(s);
1456
+ await qe("userName") && Ta(s);
1458
1457
  },
1459
- disabled: S && (B.isTecho || B.isEkavach) && !(c != null && c["update.manage.users.userName"]),
1458
+ disabled: C && (E.isTecho || E.isEkavach) && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.userName"], void 0, !0),
1460
1459
  autoComplete: "off",
1461
1460
  dataTestId: "username-input"
1462
1461
  }
1463
1462
  ) }),
1464
- !aa && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ $(
1463
+ !aa && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ G(
1465
1464
  x,
1466
1465
  {
1467
1466
  container: !0,
1468
1467
  spacing: 2,
1469
1468
  className: "flex items-start",
1470
1469
  children: [
1471
- /* @__PURE__ */ $(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: [
1472
- /* @__PURE__ */ i(G, { label: "Password", required: !0, children: /* @__PURE__ */ i(
1470
+ /* @__PURE__ */ G(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: [
1471
+ /* @__PURE__ */ i(Y, { label: "Password", required: !0, children: /* @__PURE__ */ i(
1473
1472
  va,
1474
1473
  {
1475
1474
  control: m,
1476
- showPassword: Ee,
1477
- togglePasswordVisibility: () => Oe((s) => !s),
1475
+ showPassword: Ae,
1476
+ togglePasswordVisibility: () => Be((s) => !s),
1478
1477
  name: "password",
1479
- errors: E,
1478
+ errors: A,
1480
1479
  onChange: wa,
1481
1480
  dataTestId: "password-input",
1482
1481
  autoComplete: "new-password"
1483
1482
  }
1484
1483
  ) }),
1485
- /* @__PURE__ */ i(G, { children: /* @__PURE__ */ i(
1484
+ /* @__PURE__ */ i(Y, { children: /* @__PURE__ */ i(
1486
1485
  vi,
1487
1486
  {
1488
1487
  password: M("password"),
@@ -1490,14 +1489,14 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1490
1489
  }
1491
1490
  ) })
1492
1491
  ] }),
1493
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "Confirm Password", required: !0, children: /* @__PURE__ */ i(
1492
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Confirm Password", required: !0, children: /* @__PURE__ */ i(
1494
1493
  va,
1495
1494
  {
1496
1495
  control: m,
1497
1496
  showPassword: na,
1498
1497
  togglePasswordVisibility: () => sa((s) => !s),
1499
1498
  name: "confirmPassword",
1500
- errors: E,
1499
+ errors: A,
1501
1500
  onChange: wa,
1502
1501
  dataTestId: "confirm-password-input"
1503
1502
  }
@@ -1506,7 +1505,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1506
1505
  }
1507
1506
  ) }) }),
1508
1507
  /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1509
- G,
1508
+ Y,
1510
1509
  {
1511
1510
  label: "Phone number",
1512
1511
  sx: {
@@ -1525,7 +1524,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1525
1524
  maxLength: 10,
1526
1525
  pattern: "^[0-9]{1,10}$"
1527
1526
  },
1528
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManagePhonenumber"]),
1527
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManagePhonenumber"]),
1529
1528
  inputProps: {
1530
1529
  maxLength: 10,
1531
1530
  inputMode: "numeric",
@@ -1538,7 +1537,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1538
1537
  }
1539
1538
  },
1540
1539
  name: "contactNumber",
1541
- errors: E,
1540
+ errors: A,
1542
1541
  label: "",
1543
1542
  onBlur: La,
1544
1543
  dataTestId: "phone-number-input"
@@ -1547,7 +1546,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1547
1546
  }
1548
1547
  ) }),
1549
1548
  (h == null ? void 0 : h.isConvoxIdMandatory) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1550
- G,
1549
+ Y,
1551
1550
  {
1552
1551
  label: "Convox Id",
1553
1552
  required: h == null ? void 0 : h.isConvoxIdMandatory,
@@ -1557,8 +1556,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1557
1556
  control: m,
1558
1557
  id: "convoxId",
1559
1558
  name: "convoxId",
1560
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageConvexID"]),
1561
- errors: E,
1559
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageConvexID"]),
1560
+ errors: A,
1562
1561
  label: "",
1563
1562
  dataTestId: "convox-id-input"
1564
1563
  }
@@ -1566,7 +1565,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1566
1565
  }
1567
1566
  ) }),
1568
1567
  /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1569
- G,
1568
+ Y,
1570
1569
  {
1571
1570
  label: "Email",
1572
1571
  required: h == null ? void 0 : h.isEmailMandatory,
@@ -1577,8 +1576,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1577
1576
  control: m,
1578
1577
  id: "emailId",
1579
1578
  name: "emailId",
1580
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageEmail"]),
1581
- errors: E,
1579
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageEmail"]),
1580
+ errors: A,
1582
1581
  label: "",
1583
1582
  type: "email",
1584
1583
  dataTestId: "email-id-input"
@@ -1587,10 +1586,10 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1587
1586
  }
1588
1587
  ) }),
1589
1588
  /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1590
- G,
1589
+ Y,
1591
1590
  {
1592
1591
  label: "Aadhar Number",
1593
- required: (h == null ? void 0 : h.isAadharNumMandatory) && !S,
1592
+ required: (h == null ? void 0 : h.isAadharNumMandatory) && !C,
1594
1593
  "data-testid": "aadhaar-number-label",
1595
1594
  children: /* @__PURE__ */ i(
1596
1595
  se,
@@ -1598,8 +1597,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1598
1597
  control: m,
1599
1598
  id: "aadharNumber",
1600
1599
  name: "aadharNumber",
1601
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageAadharnumber"]),
1602
- errors: E,
1600
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageAadharnumber"]),
1601
+ errors: A,
1603
1602
  label: "",
1604
1603
  rules: {
1605
1604
  maxLength: 12,
@@ -1621,9 +1620,9 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1621
1620
  )
1622
1621
  }
1623
1622
  ) }),
1624
- (h == null ? void 0 : h.isBankDetailsRequired) && /* @__PURE__ */ $(de, { children: [
1623
+ (h == null ? void 0 : h.isBankDetailsRequired) && /* @__PURE__ */ G(de, { children: [
1625
1624
  /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1626
- G,
1625
+ Y,
1627
1626
  {
1628
1627
  label: "Bank Name",
1629
1628
  required: h == null ? void 0 : h.isBankDetailsMandatory,
@@ -1636,8 +1635,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1636
1635
  options: O,
1637
1636
  displayName: "value",
1638
1637
  optionValue: "id",
1639
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageBankingInformation"]),
1640
- errors: E,
1638
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageBankingInformation"]),
1639
+ errors: A,
1641
1640
  dataTestId: "bank-name-input"
1642
1641
  }
1643
1642
  ) : /* @__PURE__ */ i(
@@ -1646,8 +1645,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1646
1645
  control: m,
1647
1646
  id: "bankName",
1648
1647
  name: "bankName",
1649
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageBankingInformation"]),
1650
- errors: E,
1648
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageBankingInformation"]),
1649
+ errors: A,
1651
1650
  label: "",
1652
1651
  dataTestId: "bank-name-input"
1653
1652
  }
@@ -1655,7 +1654,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1655
1654
  }
1656
1655
  ) }),
1657
1656
  /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1658
- G,
1657
+ Y,
1659
1658
  {
1660
1659
  label: "Bank Account Number",
1661
1660
  required: h == null ? void 0 : h.isBankDetailsMandatory,
@@ -1665,8 +1664,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1665
1664
  control: m,
1666
1665
  id: "bankAccNo",
1667
1666
  name: "bankAccNo",
1668
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageBankingInformation"]),
1669
- errors: E,
1667
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageBankingInformation"]),
1668
+ errors: A,
1670
1669
  label: "",
1671
1670
  inputProps: {
1672
1671
  inputMode: "numeric",
@@ -1684,7 +1683,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1684
1683
  }
1685
1684
  ) }),
1686
1685
  /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1687
- G,
1686
+ Y,
1688
1687
  {
1689
1688
  label: "IFSC Code",
1690
1689
  required: h == null ? void 0 : h.isBankDetailsMandatory,
@@ -1694,8 +1693,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1694
1693
  control: m,
1695
1694
  id: "ifscCode",
1696
1695
  name: "ifscCode",
1697
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageBankingInformation"]),
1698
- errors: E,
1696
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageBankingInformation"]),
1697
+ errors: A,
1699
1698
  label: "",
1700
1699
  dataTestId: "ifsc-code-input"
1701
1700
  }
@@ -1703,7 +1702,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1703
1702
  }
1704
1703
  ) }),
1705
1704
  /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1706
- G,
1705
+ Y,
1707
1706
  {
1708
1707
  label: "Full Name (as per Bank Account)",
1709
1708
  required: h == null ? void 0 : h.isBankDetailsMandatory,
@@ -1713,8 +1712,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1713
1712
  control: m,
1714
1713
  id: "nameAccToBank",
1715
1714
  name: "nameAccToBank",
1716
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManageBankingInformation"]),
1717
- errors: E,
1715
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManageBankingInformation"]),
1716
+ errors: A,
1718
1717
  label: "",
1719
1718
  dataTestId: "name-acc-to-bank-input"
1720
1719
  }
@@ -1722,7 +1721,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1722
1721
  }
1723
1722
  ) })
1724
1723
  ] }),
1725
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "Preferred language", required: !0, children: /* @__PURE__ */ i(
1724
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Preferred language", required: !0, children: /* @__PURE__ */ i(
1726
1725
  Je,
1727
1726
  {
1728
1727
  control: m,
@@ -1731,8 +1730,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1731
1730
  options: Ve,
1732
1731
  displayName: "languageValue",
1733
1732
  optionValue: "languageKey",
1734
- disabled: S && B.isTecho && !(c != null && c["update.manage.users.canManagePreferredLanguage"]),
1735
- errors: E,
1733
+ disabled: C && !E.hasCheckRights(l == null ? void 0 : l["update.manage.users.canManagePreferredLanguage"]),
1734
+ errors: A,
1736
1735
  onChange: (s) => {
1737
1736
  la(s);
1738
1737
  },
@@ -1740,11 +1739,11 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1740
1739
  }
1741
1740
  ) }) }),
1742
1741
  (h == null ? void 0 : h.isGeolocationMandatory) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(
1743
- G,
1742
+ Y,
1744
1743
  {
1745
1744
  label: "Geo Location",
1746
1745
  required: h == null ? void 0 : h.isGeolocationMandatory,
1747
- children: /* @__PURE__ */ $(
1746
+ children: /* @__PURE__ */ G(
1748
1747
  x,
1749
1748
  {
1750
1749
  item: !0,
@@ -1759,7 +1758,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1759
1758
  control: m,
1760
1759
  id: "latitude",
1761
1760
  name: "latitude",
1762
- errors: E,
1761
+ errors: A,
1763
1762
  placeholder: "latitude",
1764
1763
  label: "",
1765
1764
  type: "number",
@@ -1773,7 +1772,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1773
1772
  id: "longitude",
1774
1773
  name: "longitude",
1775
1774
  placeholder: "longitude",
1776
- errors: E,
1775
+ errors: A,
1777
1776
  label: "",
1778
1777
  type: "number",
1779
1778
  dataTestId: "longitude-input"
@@ -1784,14 +1783,14 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1784
1783
  )
1785
1784
  }
1786
1785
  ) }),
1787
- (C == null ? void 0 : C.loginCode) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(G, { label: "Login Code", children: /* @__PURE__ */ i(
1786
+ (R == null ? void 0 : R.loginCode) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Login Code", children: /* @__PURE__ */ i(
1788
1787
  se,
1789
1788
  {
1790
1789
  control: m,
1791
1790
  id: "loginCode",
1792
1791
  name: "loginCode",
1793
- value: C.loginCode,
1794
- errors: E,
1792
+ value: R.loginCode,
1793
+ errors: A,
1795
1794
  InputProps: {
1796
1795
  readOnly: !0
1797
1796
  },
@@ -1799,7 +1798,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1799
1798
  dataTestId: "login-code-input"
1800
1799
  }
1801
1800
  ) }) }),
1802
- (h == null ? void 0 : h.isSmagTrainedMandatory) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ $(da, { component: "fieldset", children: [
1801
+ (h == null ? void 0 : h.isSmagTrainedMandatory) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ G(da, { component: "fieldset", children: [
1803
1802
  /* @__PURE__ */ i(si, { component: "legend", children: oe(
1804
1803
  "Is User SMAG Trained (Safe Motherhood Action Group)"
1805
1804
  ) }),
@@ -1808,8 +1807,8 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1808
1807
  {
1809
1808
  name: "isUserSmagTrained",
1810
1809
  control: m,
1811
- render: ({ field: s, fieldState: j }) => /* @__PURE__ */ $(de, { children: [
1812
- /* @__PURE__ */ $(
1810
+ render: ({ field: s, fieldState: z }) => /* @__PURE__ */ G(de, { children: [
1811
+ /* @__PURE__ */ G(
1813
1812
  ma,
1814
1813
  {
1815
1814
  name: s.name,
@@ -1837,7 +1836,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1837
1836
  ]
1838
1837
  }
1839
1838
  ),
1840
- j.error && /* @__PURE__ */ i("p", { className: "error-helper-text", children: j.error.message || "Please select a value" })
1839
+ z.error && /* @__PURE__ */ i("p", { className: "error-helper-text", children: z.error.message || "Please select a value" })
1841
1840
  ] })
1842
1841
  }
1843
1842
  )
@@ -1848,7 +1847,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1848
1847
  ] })
1849
1848
  }
1850
1849
  ),
1851
- u && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6 }, className: "mx-0", children: /* @__PURE__ */ $(
1850
+ u && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6 }, className: "mx-0", children: /* @__PURE__ */ G(
1852
1851
  x,
1853
1852
  {
1854
1853
  container: !0,
@@ -1856,17 +1855,17 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1856
1855
  spacing: 0,
1857
1856
  className: "h-full",
1858
1857
  children: [
1859
- /* @__PURE__ */ $(x, { children: [
1858
+ /* @__PURE__ */ G(x, { children: [
1860
1859
  /* @__PURE__ */ i(xa, { children: /* @__PURE__ */ i(
1861
1860
  wi,
1862
1861
  {
1863
1862
  requiredUptoLevel: 0,
1864
- selectedLocation: fe,
1863
+ selectedLocation: ke,
1865
1864
  setSelectedLocation: pa,
1866
1865
  templateType: "inline",
1867
1866
  disabled: t,
1868
1867
  locations: f,
1869
- setLocations: N,
1868
+ setLocations: I,
1870
1869
  fetchAccordingToUserAoi: !0
1871
1870
  }
1872
1871
  ) }),
@@ -1890,33 +1889,33 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1890
1889
  open: ne === 4,
1891
1890
  handleClick: async () => {
1892
1891
  try {
1893
- const { name: s, type: j, id: q } = fe.finalSelected.optionSelected, { data: Y } = await ba(
1892
+ const { name: s, type: z, id: v } = ke.finalSelected.optionSelected, { data: $ } = await ba(
1894
1893
  {
1895
1894
  roleId: L("roleId"),
1896
- toBeAdded: q
1895
+ toBeAdded: v
1897
1896
  }
1898
- ), D = {
1899
- locationId: q,
1900
- type: j,
1897
+ ), Z = {
1898
+ locationId: v,
1899
+ type: z,
1901
1900
  name: s,
1902
- level: fe.finalSelected.level,
1903
- locationFullName: Y.message
1904
- }, w = [
1901
+ level: ke.finalSelected.level,
1902
+ locationFullName: $.message
1903
+ }, q = [
1905
1904
  ...K,
1906
- { ...D }
1905
+ { ...Z }
1907
1906
  ];
1908
- be(() => w);
1909
- const { data: _ } = await he({
1907
+ be(() => q);
1908
+ const { data: T } = await he({
1910
1909
  code: "retrieve_infra_by_role_location",
1911
1910
  parameters: {
1912
1911
  roleId: h == null ? void 0 : h.id,
1913
- locationIds: w.map(
1914
- (R) => R.locationId
1912
+ locationIds: q.map(
1913
+ (B) => B.locationId
1915
1914
  )
1916
1915
  }
1917
1916
  });
1918
1917
  le(
1919
- _.result
1918
+ T.result
1920
1919
  ), ie(0);
1921
1920
  } catch (s) {
1922
1921
  console.error(s);
@@ -1928,7 +1927,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1928
1927
  description: $e
1929
1928
  }
1930
1929
  ),
1931
- /* @__PURE__ */ $(x, { item: !0, size: { xs: 12 }, children: [
1930
+ /* @__PURE__ */ G(x, { item: !0, size: { xs: 12 }, children: [
1932
1931
  /* @__PURE__ */ i(
1933
1932
  Xe,
1934
1933
  {
@@ -1941,21 +1940,21 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1941
1940
  children: oe("Add")
1942
1941
  }
1943
1942
  ),
1944
- (Se == null ? void 0 : Se.message) && /* @__PURE__ */ i(
1945
- ze,
1943
+ (Ce == null ? void 0 : Ce.message) && /* @__PURE__ */ i(
1944
+ we,
1946
1945
  {
1947
1946
  color: "error",
1948
1947
  className: "mt-[0.5rem]",
1949
1948
  "data-testid": "areas-error",
1950
- children: Se.message
1949
+ children: Ce.message
1951
1950
  }
1952
1951
  )
1953
1952
  ] })
1954
1953
  ] }),
1955
1954
  /* @__PURE__ */ i(fa, { className: "my-2" }),
1956
- /* @__PURE__ */ i(x, { container: !0, children: /* @__PURE__ */ $(x, { item: !0, size: { xs: 11 }, children: [
1955
+ /* @__PURE__ */ i(x, { container: !0, children: /* @__PURE__ */ G(x, { item: !0, size: { xs: 11 }, children: [
1957
1956
  /* @__PURE__ */ i(
1958
- ze,
1957
+ we,
1959
1958
  {
1960
1959
  className: "mb-3 text-customBlue",
1961
1960
  variant: "h6",
@@ -1966,9 +1965,9 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1966
1965
  /* @__PURE__ */ i(
1967
1966
  ca,
1968
1967
  {
1969
- ref: T,
1970
- className: `flex flex-wrap gap-2 border ${E.addedareas ? "border-red-500" : "border-gray-300"} rounded-4xl p-1.5 pl-3 pr-3 overflow-y-auto cursor-pointer min-h-9 max-h-[${d}] box-border`,
1971
- children: K && K.length > 0 ? K.map((s, j) => /* @__PURE__ */ i(
1968
+ ref: S,
1969
+ className: `flex flex-wrap gap-2 border ${A.addedareas ? "border-red-500" : "border-gray-300"} rounded-4xl p-1.5 pl-3 pr-3 overflow-y-auto cursor-pointer min-h-9 max-h-[${d}] box-border`,
1970
+ children: K && K.length > 0 ? K.map((s, z) => /* @__PURE__ */ i(
1972
1971
  oi,
1973
1972
  {
1974
1973
  label: s == null ? void 0 : s.locationFullName,
@@ -1982,9 +1981,9 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1982
1981
  }
1983
1982
  }
1984
1983
  },
1985
- j
1984
+ z
1986
1985
  )) : /* @__PURE__ */ i(
1987
- ze,
1986
+ we,
1988
1987
  {
1989
1988
  variant: "body2",
1990
1989
  className: "p-1 text-gray-400",
@@ -1993,13 +1992,13 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
1993
1992
  )
1994
1993
  }
1995
1994
  ),
1996
- (Le == null ? void 0 : Le.message) && /* @__PURE__ */ i(ze, { color: "error", className: "mt-[0.5rem]", children: Le.message })
1995
+ (Te == null ? void 0 : Te.message) && /* @__PURE__ */ i(we, { color: "error", className: "mt-[0.5rem]", children: Te.message })
1997
1996
  ] }) }),
1998
- K.length > 0 && Fe.length > 0 && /* @__PURE__ */ $(de, { children: [
1997
+ K.length > 0 && Oe.length > 0 && /* @__PURE__ */ G(de, { children: [
1999
1998
  /* @__PURE__ */ i(fa, { className: "my-2" }),
2000
- /* @__PURE__ */ i(x, { item: !0, container: !0, children: /* @__PURE__ */ $(x, { item: !0, size: { xs: 11 }, children: [
1999
+ /* @__PURE__ */ i(x, { item: !0, container: !0, children: /* @__PURE__ */ G(x, { item: !0, size: { xs: 11 }, children: [
2001
2000
  /* @__PURE__ */ i(
2002
- ze,
2001
+ we,
2003
2002
  {
2004
2003
  variant: "h6",
2005
2004
  "data-testid": "health-infra-header",
@@ -2010,26 +2009,26 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
2010
2009
  /* @__PURE__ */ i(
2011
2010
  Qa,
2012
2011
  {
2013
- options: Fe,
2012
+ options: Oe,
2014
2013
  name: "healthInfrastructures",
2015
2014
  checkEquality: "infraid",
2016
2015
  control: m,
2017
2016
  getOptionLabel: (s) => s == null ? void 0 : s.infrastructurename,
2018
2017
  value: ye,
2019
- onChange: (s, j) => Re(j),
2018
+ onChange: (s, z) => Pe(z),
2020
2019
  dataTestId: "health-infra-select",
2021
2020
  isVirtualized: !0
2022
2021
  }
2023
2022
  )
2024
2023
  ] }) })
2025
2024
  ] }),
2026
- B.isEkavach && M("roleId") != null && [66, 143].includes(Number(M("roleId"))) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ i(G, { label: "Select User Type", children: /* @__PURE__ */ i(da, { component: "fieldset", children: /* @__PURE__ */ i(
2025
+ E.isEkavach && M("roleId") != null && [66, 143].includes(Number(M("roleId"))) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ i(Y, { label: "Select User Type", children: /* @__PURE__ */ i(da, { component: "fieldset", children: /* @__PURE__ */ i(
2027
2026
  ua,
2028
2027
  {
2029
2028
  name: "typeOfUser",
2030
2029
  control: m,
2031
2030
  defaultValue: "",
2032
- render: ({ field: s }) => /* @__PURE__ */ $(
2031
+ render: ({ field: s }) => /* @__PURE__ */ G(
2033
2032
  ma,
2034
2033
  {
2035
2034
  row: !0,
@@ -2086,15 +2085,15 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
2086
2085
  ]
2087
2086
  }
2088
2087
  ) }),
2089
- v && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6 }, className: "mx-0", children: /* @__PURE__ */ i(
2088
+ w && /* @__PURE__ */ i(de, { children: /* @__PURE__ */ i(x, { item: !0, size: { xs: 12, sm: 6 }, className: "mx-0", children: /* @__PURE__ */ i(
2090
2089
  x,
2091
2090
  {
2092
2091
  container: !0,
2093
2092
  direction: "column",
2094
2093
  spacing: 0,
2095
2094
  className: "h-full",
2096
- children: /* @__PURE__ */ $(x, { container: !0, children: [
2097
- /* @__PURE__ */ i(x, { item: !0, size: { xs: 11 }, children: /* @__PURE__ */ i(G, { label: "Specialization", required: !0, children: /* @__PURE__ */ i(
2095
+ children: /* @__PURE__ */ G(x, { container: !0, children: [
2096
+ /* @__PURE__ */ i(x, { item: !0, size: { xs: 11 }, children: /* @__PURE__ */ i(Y, { label: "Specialization", required: !0, children: /* @__PURE__ */ i(
2098
2097
  Je,
2099
2098
  {
2100
2099
  control: m,
@@ -2103,11 +2102,11 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
2103
2102
  options: k,
2104
2103
  displayName: "name",
2105
2104
  optionValue: "id",
2106
- errors: E,
2105
+ errors: A,
2107
2106
  dataTestId: "specialization-dropdown"
2108
2107
  }
2109
2108
  ) }) }),
2110
- (c == null ? void 0 : c["upload.manage.users.doctorSignature"]) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 11 }, children: /* @__PURE__ */ $(G, { label: "Upload Signature", children: [
2109
+ E.hasCheckRights(l == null ? void 0 : l["upload.manage.users.doctorSignature"], void 0, !0) && /* @__PURE__ */ i(x, { item: !0, size: { xs: 11 }, children: /* @__PURE__ */ G(Y, { label: "Upload Signature", children: [
2111
2110
  /* @__PURE__ */ i(
2112
2111
  "input",
2113
2112
  {
@@ -2119,7 +2118,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
2119
2118
  file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0
2120
2119
  file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100`,
2121
2120
  "data-testid": "user-signature-upload",
2122
- onChange: Z
2121
+ onChange: H
2123
2122
  }
2124
2123
  ),
2125
2124
  V && /* @__PURE__ */ i("div", { className: "mt-3 w-full flex justify-center", children: /* @__PURE__ */ i(
@@ -2142,7 +2141,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
2142
2141
  container: !0,
2143
2142
  size: { xs: 12 },
2144
2143
  justifyContent: "flex-end",
2145
- children: /* @__PURE__ */ $(de, { children: [
2144
+ children: /* @__PURE__ */ G(de, { children: [
2146
2145
  /* @__PURE__ */ i(
2147
2146
  Xe,
2148
2147
  {
@@ -2163,7 +2162,7 @@ const Sa = /* @__PURE__ */ mi(ki), fi = Ta(() => import("./ChangePasswordModalCo
2163
2162
  color: "primary",
2164
2163
  type: "submit",
2165
2164
  "data-testid": "submit-button",
2166
- children: S ? ` ${oe("Update")}` : `${oe("Submit")}`
2165
+ children: C ? ` ${oe("Update")}` : `${oe("Submit")}`
2167
2166
  }
2168
2167
  )
2169
2168
  ] })
@@ -2182,4 +2181,4 @@ export {
2182
2181
  Ji as M,
2183
2182
  va as P
2184
2183
  };
2185
- //# sourceMappingURL=ManageUser-AB3_Vfp_.js.map
2184
+ //# sourceMappingURL=ManageUser-AY1EUDLI.js.map