@bahmni/services 0.0.1-dev.212 → 0.0.1-dev.214

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { initReactI18next as pi } from "react-i18next";
2
- import { useTranslation as Dv } from "react-i18next";
2
+ import { useTranslation as Uv } from "react-i18next";
3
3
  import { useRef as bn, useCallback as Wr, useEffect as _n } from "react";
4
4
  function aa(e, t) {
5
5
  return function() {
6
6
  return e.apply(t, arguments);
7
7
  };
8
8
  }
9
- const { toString: hi } = Object.prototype, { getPrototypeOf: Cn } = Object, { iterator: Cr, toStringTag: ia } = Symbol, Dr = /* @__PURE__ */ ((e) => (t) => {
9
+ const { toString: hi } = Object.prototype, { getPrototypeOf: Dn } = Object, { iterator: Dr, toStringTag: ia } = Symbol, Cr = /* @__PURE__ */ ((e) => (t) => {
10
10
  const r = hi.call(t);
11
11
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), $e = (e) => (e = e.toLowerCase(), (t) => Dr(t) === e), Lr = (e) => (t) => typeof t === e, { isArray: ct } = Array, ot = Lr("undefined");
12
+ })(/* @__PURE__ */ Object.create(null)), $e = (e) => (e = e.toLowerCase(), (t) => Cr(t) === e), Lr = (e) => (t) => typeof t === e, { isArray: ct } = Array, ot = Lr("undefined");
13
13
  function Rt(e) {
14
14
  return e !== null && !ot(e) && e.constructor !== null && !ot(e.constructor) && Ee(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
15
  }
@@ -19,10 +19,10 @@ function mi(e) {
19
19
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ca(e.buffer), t;
20
20
  }
21
21
  const gi = Lr("string"), Ee = Lr("function"), ua = Lr("number"), Tt = (e) => e !== null && typeof e == "object", yi = (e) => e === !0 || e === !1, vr = (e) => {
22
- if (Dr(e) !== "object")
22
+ if (Cr(e) !== "object")
23
23
  return !1;
24
- const t = Cn(e);
25
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ia in e) && !(Cr in e);
24
+ const t = Dn(e);
25
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ia in e) && !(Dr in e);
26
26
  }, vi = (e) => {
27
27
  if (!Tt(e) || Rt(e))
28
28
  return !1;
@@ -37,14 +37,14 @@ function Oi() {
37
37
  }
38
38
  const Xn = Oi(), Zn = typeof Xn.FormData < "u" ? Xn.FormData : void 0, Ai = (e) => {
39
39
  let t;
40
- return e && (Zn && e instanceof Zn || Ee(e.append) && ((t = Dr(e)) === "formdata" || // detect form-data instance
40
+ return e && (Zn && e instanceof Zn || Ee(e.append) && ((t = Cr(e)) === "formdata" || // detect form-data instance
41
41
  t === "object" && Ee(e.toString) && e.toString() === "[object FormData]"));
42
- }, Ni = $e("URLSearchParams"), [$i, Pi, Ii, Ci] = [
42
+ }, Ni = $e("URLSearchParams"), [$i, Pi, Ii, Di] = [
43
43
  "ReadableStream",
44
44
  "Request",
45
45
  "Response",
46
46
  "Headers"
47
- ].map($e), Di = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
47
+ ].map($e), Ci = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
48
48
  function Ot(e, t, { allOwnKeys: r = !1 } = {}) {
49
49
  if (e === null || typeof e > "u")
50
50
  return;
@@ -116,7 +116,7 @@ const Li = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
116
116
  do {
117
117
  for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
118
118
  a = s[o], (!n || n(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
119
- e = r !== !1 && Cn(e);
119
+ e = r !== !1 && Dn(e);
120
120
  } while (e && (!r || r(e, t)) && e !== Object.prototype);
121
121
  return t;
122
122
  }, qi = (e, t, r) => {
@@ -132,8 +132,8 @@ const Li = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
132
132
  for (; t-- > 0; )
133
133
  r[t] = e[t];
134
134
  return r;
135
- }, ji = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Cn(Uint8Array)), Fi = (e, t) => {
136
- const n = (e && e[Cr]).call(e);
135
+ }, Fi = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Dn(Uint8Array)), ji = (e, t) => {
136
+ const n = (e && e[Dr]).call(e);
137
137
  let s;
138
138
  for (; (s = n.next()) && !s.done; ) {
139
139
  const o = s.value;
@@ -178,7 +178,7 @@ const Li = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
178
178
  }, Yi = () => {
179
179
  }, Wi = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
180
180
  function Ji(e) {
181
- return !!(e && Ee(e.append) && e[ia] === "FormData" && e[Cr]);
181
+ return !!(e && Ee(e.append) && e[ia] === "FormData" && e[Dr]);
182
182
  }
183
183
  const Qi = (e) => {
184
184
  const t = new Array(10), r = (n, s) => {
@@ -207,7 +207,7 @@ const Qi = (e) => {
207
207
  !1
208
208
  ), (s) => {
209
209
  n.push(s), ze.postMessage(r, "*");
210
- }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ee(ze.postMessage)), ec = typeof queueMicrotask < "u" ? queueMicrotask.bind(ze) : typeof process < "u" && process.nextTick || pa, tc = (e) => e != null && Ee(e[Cr]), I = {
210
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ee(ze.postMessage)), ec = typeof queueMicrotask < "u" ? queueMicrotask.bind(ze) : typeof process < "u" && process.nextTick || pa, tc = (e) => e != null && Ee(e[Dr]), I = {
211
211
  isArray: ct,
212
212
  isArrayBuffer: ca,
213
213
  isBuffer: Rt,
@@ -222,7 +222,7 @@ const Qi = (e) => {
222
222
  isReadableStream: $i,
223
223
  isRequest: Pi,
224
224
  isResponse: Ii,
225
- isHeaders: Ci,
225
+ isHeaders: Di,
226
226
  isUndefined: ot,
227
227
  isDate: wi,
228
228
  isFile: Ei,
@@ -233,20 +233,20 @@ const Qi = (e) => {
233
233
  isFunction: Ee,
234
234
  isStream: Ti,
235
235
  isURLSearchParams: Ni,
236
- isTypedArray: ji,
236
+ isTypedArray: Fi,
237
237
  isFileList: Ri,
238
238
  forEach: Ot,
239
239
  merge: Sn,
240
240
  extend: Li,
241
- trim: Di,
241
+ trim: Ci,
242
242
  stripBOM: ki,
243
243
  inherits: xi,
244
244
  toFlatObject: Ui,
245
- kindOf: Dr,
245
+ kindOf: Cr,
246
246
  kindOfTest: $e,
247
247
  endsWith: qi,
248
248
  toArray: Mi,
249
- forEachEntry: Fi,
249
+ forEachEntry: ji,
250
250
  matchAll: Vi,
251
251
  isHTMLForm: Hi,
252
252
  hasOwnProperty: es,
@@ -421,10 +421,10 @@ function ts(e) {
421
421
  return t[n];
422
422
  });
423
423
  }
424
- function Dn(e, t) {
424
+ function Cn(e, t) {
425
425
  this._pairs = [], e && kr(e, this, t);
426
426
  }
427
- const ga = Dn.prototype;
427
+ const ga = Cn.prototype;
428
428
  ga.append = function(t, r) {
429
429
  this._pairs.push([t, r]);
430
430
  };
@@ -446,7 +446,7 @@ function ya(e, t, r) {
446
446
  serialize: r
447
447
  } : r, o = s && s.serialize;
448
448
  let a;
449
- if (o ? a = o(t, s) : a = I.isURLSearchParams(t) ? t.toString() : new Dn(t, s).toString(n), a) {
449
+ if (o ? a = o(t, s) : a = I.isURLSearchParams(t) ? t.toString() : new Cn(t, s).toString(n), a) {
450
450
  const i = e.indexOf("#");
451
451
  i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
452
452
  }
@@ -512,7 +512,7 @@ const Ln = {
512
512
  forcedJSONParsing: !0,
513
513
  clarifyTimeoutError: !1,
514
514
  legacyInterceptorReqResOrdering: !0
515
- }, ac = typeof URLSearchParams < "u" ? URLSearchParams : Dn, ic = typeof FormData < "u" ? FormData : null, cc = typeof Blob < "u" ? Blob : null, uc = {
515
+ }, ac = typeof URLSearchParams < "u" ? URLSearchParams : Cn, ic = typeof FormData < "u" ? FormData : null, cc = typeof Blob < "u" ? Blob : null, uc = {
516
516
  isBrowser: !0,
517
517
  classes: {
518
518
  URLSearchParams: ac,
@@ -1010,12 +1010,12 @@ const Sr = (e, t, r = 3) => {
1010
1010
  function Ic(e) {
1011
1011
  return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1012
1012
  }
1013
- function Cc(e, t) {
1013
+ function Dc(e, t) {
1014
1014
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1015
1015
  }
1016
1016
  function _a(e, t, r) {
1017
1017
  let n = !Ic(t);
1018
- return e && (n || r == !1) ? Cc(e, t) : t;
1018
+ return e && (n || r == !1) ? Dc(e, t) : t;
1019
1019
  }
1020
1020
  const as = (e) => e instanceof be ? { ...e } : e;
1021
1021
  function Ke(e, t) {
@@ -1110,7 +1110,7 @@ const Sa = (e) => {
1110
1110
  c && a.set(s, c);
1111
1111
  }
1112
1112
  return t;
1113
- }, Dc = typeof XMLHttpRequest < "u", Lc = Dc && function(e) {
1113
+ }, Cc = typeof XMLHttpRequest < "u", Lc = Cc && function(e) {
1114
1114
  return new Promise(function(r, n) {
1115
1115
  const s = Sa(e);
1116
1116
  let o = s.data;
@@ -1274,7 +1274,7 @@ const Sa = (e) => {
1274
1274
  } catch {
1275
1275
  return !1;
1276
1276
  }
1277
- }, jc = (e) => {
1277
+ }, Fc = (e) => {
1278
1278
  e = I.merge.call(
1279
1279
  {
1280
1280
  skipUndefined: !0
@@ -1344,12 +1344,12 @@ const Sa = (e) => {
1344
1344
  fetchOptions: M
1345
1345
  } = Sa(y), q = t || fetch;
1346
1346
  R = R ? (R + "").toLowerCase() : "text";
1347
- let j = kc(
1347
+ let F = kc(
1348
1348
  [u, h && h.toAbortSignal()],
1349
1349
  E
1350
1350
  ), H = null;
1351
- const G = j && j.unsubscribe && (() => {
1352
- j.unsubscribe();
1351
+ const G = F && F.unsubscribe && (() => {
1352
+ F.unsubscribe();
1353
1353
  });
1354
1354
  let re;
1355
1355
  try {
@@ -1358,8 +1358,8 @@ const Sa = (e) => {
1358
1358
  method: "POST",
1359
1359
  body: p,
1360
1360
  duplex: "half"
1361
- }), D;
1362
- if (I.isFormData(p) && (D = A.headers.get("content-type")) && N.setContentType(D), A.body) {
1361
+ }), C;
1362
+ if (I.isFormData(p) && (C = A.headers.get("content-type")) && N.setContentType(C), A.body) {
1363
1363
  const [P, w] = ss(
1364
1364
  re,
1365
1365
  Sr(os(b))
@@ -1370,7 +1370,7 @@ const Sa = (e) => {
1370
1370
  I.isString(k) || (k = k ? "include" : "omit");
1371
1371
  const ne = o && "credentials" in r.prototype, fe = {
1372
1372
  ...M,
1373
- signal: j,
1373
+ signal: F,
1374
1374
  method: f.toUpperCase(),
1375
1375
  headers: N.normalize().toJSON(),
1376
1376
  body: p,
@@ -1385,8 +1385,8 @@ const Sa = (e) => {
1385
1385
  ["status", "statusText", "headers"].forEach((T) => {
1386
1386
  A[T] = J[T];
1387
1387
  });
1388
- const D = I.toFiniteNumber(J.headers.get("content-length")), [P, w] = _ && ss(
1389
- D,
1388
+ const C = I.toFiniteNumber(J.headers.get("content-length")), [P, w] = _ && ss(
1389
+ C,
1390
1390
  Sr(os(_), !0)
1391
1391
  ) || [];
1392
1392
  J = new n(
@@ -1401,8 +1401,8 @@ const Sa = (e) => {
1401
1401
  J,
1402
1402
  y
1403
1403
  );
1404
- return !ie && G && G(), await new Promise((A, D) => {
1405
- ba(A, D, {
1404
+ return !ie && G && G(), await new Promise((A, C) => {
1405
+ ba(A, C, {
1406
1406
  data: x,
1407
1407
  headers: be.from(J.headers),
1408
1408
  status: J.status,
@@ -1426,12 +1426,12 @@ const Sa = (e) => {
1426
1426
  ) : K.from(ne, ne && ne.code, y, H, ne && ne.response);
1427
1427
  }
1428
1428
  };
1429
- }, Fc = /* @__PURE__ */ new Map(), Ra = (e) => {
1429
+ }, jc = /* @__PURE__ */ new Map(), Ra = (e) => {
1430
1430
  let t = e && e.env || {};
1431
1431
  const { fetch: r, Request: n, Response: s } = t, o = [n, s, r];
1432
- let a = o.length, i = a, c, d, l = Fc;
1432
+ let a = o.length, i = a, c, d, l = jc;
1433
1433
  for (; i--; )
1434
- c = o[i], d = l.get(c), d === void 0 && l.set(c, d = i ? /* @__PURE__ */ new Map() : jc(t)), l = d;
1434
+ c = o[i], d = l.get(c), d === void 0 && l.set(c, d = i ? /* @__PURE__ */ new Map() : Fc(t)), l = d;
1435
1435
  return d;
1436
1436
  };
1437
1437
  Ra();
@@ -1896,22 +1896,22 @@ ue.getAdapter = Ta.getAdapter;
1896
1896
  ue.HttpStatusCode = On;
1897
1897
  ue.default = ue;
1898
1898
  const {
1899
- Axios: Um,
1900
- AxiosError: qm,
1901
- CanceledError: Mm,
1902
- isCancel: jm,
1903
- CancelToken: Fm,
1904
- VERSION: Vm,
1905
- all: Hm,
1906
- Cancel: Bm,
1907
- isAxiosError: zm,
1908
- spread: Gm,
1909
- toFormData: Km,
1910
- AxiosHeaders: Ym,
1911
- HttpStatusCode: Wm,
1912
- formToJSON: Jm,
1913
- getAdapter: Qm,
1914
- mergeConfig: Xm
1899
+ Axios: Fm,
1900
+ AxiosError: jm,
1901
+ CanceledError: Vm,
1902
+ isCancel: Hm,
1903
+ CancelToken: Bm,
1904
+ VERSION: zm,
1905
+ all: Gm,
1906
+ Cancel: Km,
1907
+ isAxiosError: Ym,
1908
+ spread: Wm,
1909
+ toFormData: Jm,
1910
+ AxiosHeaders: Qm,
1911
+ HttpStatusCode: Xm,
1912
+ formToJSON: Zm,
1913
+ getAdapter: eg,
1914
+ mergeConfig: tg
1915
1915
  } = ue, Yc = (e) => typeof e == "object" && e !== null && "resourceType" in e && e.resourceType === "OperationOutcome", Wc = (e) => {
1916
1916
  if (!e.issue || !Array.isArray(e.issue))
1917
1917
  return null;
@@ -2088,9 +2088,9 @@ const An = (e) => {
2088
2088
  return t;
2089
2089
  }
2090
2090
  return e;
2091
- }, iu = (e) => e.includes("/openmrs/ws"), cu = (e) => e.url ?? e.baseURL ?? "", qe = ue.create();
2092
- qe.defaults.headers.common["Content-Type"] = "application/json";
2093
- qe.interceptors.request.use(
2091
+ }, iu = (e) => e.includes("/openmrs/ws"), cu = (e) => e.url ?? e.baseURL ?? "", Me = ue.create();
2092
+ Me.defaults.headers.common["Content-Type"] = "application/json";
2093
+ Me.interceptors.request.use(
2094
2094
  function(e) {
2095
2095
  return e;
2096
2096
  },
@@ -2099,7 +2099,7 @@ qe.interceptors.request.use(
2099
2099
  return Promise.reject(`${t}: ${r}`);
2100
2100
  }
2101
2101
  );
2102
- qe.interceptors.response.use(
2102
+ Me.interceptors.response.use(
2103
2103
  function(e) {
2104
2104
  try {
2105
2105
  const t = cu(e.config);
@@ -2116,7 +2116,7 @@ qe.interceptors.response.use(
2116
2116
  return r.startsWith("ERROR_") || /^[A-Z_]+$/.test(r) ? Promise.reject(new Error(r)) : Promise.reject(`${t}: ${r}`);
2117
2117
  }
2118
2118
  );
2119
- const V = async (e) => (await qe.get(e)).data, Me = async (e, t) => (await qe.post(e, t)).data, Zm = async (e, t) => (await qe.put(e, t)).data, eg = async (e, t) => (await qe.patch(e, t)).data, uu = async (e) => (await qe.delete(e)).data, Y = (e) => typeof e == "string", ft = () => {
2119
+ const V = async (e) => (await Me.get(e)).data, xe = async (e, t) => (await Me.post(e, t)).data, rg = async (e, t) => (await Me.put(e, t)).data, ng = async (e, t) => (await Me.patch(e, t)).data, uu = async (e) => (await Me.delete(e)).data, Y = (e) => typeof e == "string", ft = () => {
2120
2120
  let e, t;
2121
2121
  const r = new Promise((n, s) => {
2122
2122
  e = n, t = s;
@@ -2485,30 +2485,30 @@ class Nr extends Ur {
2485
2485
  return s ? (m.res = q, m.usedParams = this.getUsedParamsDetails(r), m) : q;
2486
2486
  }
2487
2487
  if (o) {
2488
- const q = Array.isArray(N), j = q ? [] : {}, H = q ? y : S;
2488
+ const q = Array.isArray(N), F = q ? [] : {}, H = q ? y : S;
2489
2489
  for (const G in N)
2490
2490
  if (Object.prototype.hasOwnProperty.call(N, G)) {
2491
2491
  const re = `${H}${o}${G}`;
2492
- h && !v ? j[G] = this.translate(re, {
2492
+ h && !v ? F[G] = this.translate(re, {
2493
2493
  ...r,
2494
2494
  defaultValue: _s(R) ? R[G] : void 0,
2495
2495
  joinArrays: !1,
2496
2496
  ns: i
2497
- }) : j[G] = this.translate(re, {
2497
+ }) : F[G] = this.translate(re, {
2498
2498
  ...r,
2499
2499
  joinArrays: !1,
2500
2500
  ns: i
2501
- }), j[G] === re && (j[G] = N[G]);
2501
+ }), F[G] === re && (F[G] = N[G]);
2502
2502
  }
2503
- v = j;
2503
+ v = F;
2504
2504
  }
2505
2505
  } else if (p && Y(f) && Array.isArray(v))
2506
2506
  v = v.join(f), v && (v = this.extendTranslation(v, t, r, n));
2507
2507
  else {
2508
- let q = !1, j = !1;
2509
- !this.isValidLookup(v) && h && (q = !0, v = R), this.isValidLookup(v) || (j = !0, v = a);
2510
- const G = (r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && j ? void 0 : v, re = h && R !== v && this.options.updateMissing;
2511
- if (j || q || re) {
2508
+ let q = !1, F = !1;
2509
+ !this.isValidLookup(v) && h && (q = !0, v = R), this.isValidLookup(v) || (F = !0, v = a);
2510
+ const G = (r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && F ? void 0 : v, re = h && R !== v && this.options.updateMissing;
2511
+ if (F || q || re) {
2512
2512
  if (this.logger.log(re ? "updateKey" : "missingKey", d, c, a, re ? R : v), o) {
2513
2513
  const ie = this.resolve(a, {
2514
2514
  ...r,
@@ -2523,8 +2523,8 @@ class Nr extends Ur {
2523
2523
  ne.push(fe[ie]);
2524
2524
  else this.options.saveMissingTo === "all" ? ne = this.languageUtils.toResolveHierarchy(r.lng || this.language) : ne.push(r.lng || this.language);
2525
2525
  const J = (ie, x, A) => {
2526
- const D = h && A !== v ? A : G;
2527
- this.options.missingKeyHandler ? this.options.missingKeyHandler(ie, c, x, D, re, r) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(ie, c, x, D, re, r), this.emit("missingKey", ie, c, x, v);
2526
+ const C = h && A !== v ? A : G;
2527
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(ie, c, x, C, re, r) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(ie, c, x, C, re, r), this.emit("missingKey", ie, c, x, v);
2528
2528
  };
2529
2529
  this.options.saveMissing && (this.options.saveMissingPlurals && u ? ne.forEach((ie) => {
2530
2530
  const x = this.pluralResolver.getSuffixes(ie, r);
@@ -2533,7 +2533,7 @@ class Nr extends Ur {
2533
2533
  });
2534
2534
  }) : J(ne, a, R));
2535
2535
  }
2536
- v = this.extendTranslation(v, t, r, m, n), j && v === a && this.options.appendNamespaceToMissingKey && (v = `${c}:${a}`), (j || q) && this.options.parseMissingKeyHandler && (v = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${a}` : a, q ? v : void 0));
2536
+ v = this.extendTranslation(v, t, r, m, n), F && v === a && this.options.appendNamespaceToMissingKey && (v = `${c}:${a}`), (F || q) && this.options.parseMissingKeyHandler && (v = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${a}` : a, q ? v : void 0));
2537
2537
  }
2538
2538
  return s ? (m.res = v, m.usedParams = this.getUsedParamsDetails(r), m) : v;
2539
2539
  }
@@ -3211,7 +3211,7 @@ const As = () => ({
3211
3211
  maxReplaces: 1e3,
3212
3212
  skipOnVariables: !0
3213
3213
  }
3214
- }), Ns = (e) => (Y(e.ns) && (e.ns = [e.ns]), Y(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Y(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Ct = () => {
3214
+ }), Ns = (e) => (Y(e.ns) && (e.ns = [e.ns]), Y(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Y(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Dt = () => {
3215
3215
  }, Au = (e) => {
3216
3216
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((r) => {
3217
3217
  typeof e[r] == "function" && (e[r] = e[r].bind(e));
@@ -3268,7 +3268,7 @@ class _t extends Ur {
3268
3268
  S.init && S.init(this);
3269
3269
  });
3270
3270
  }
3271
- if (this.format = this.options.interpolation.format, n || (n = Ct), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3271
+ if (this.format = this.options.interpolation.format, n || (n = Dt), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3272
3272
  const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3273
3273
  l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
3274
3274
  }
@@ -3291,7 +3291,7 @@ class _t extends Ur {
3291
3291
  return this.options.resources || !this.options.initAsync ? d() : setTimeout(d, 0), c;
3292
3292
  }
3293
3293
  loadResources(t) {
3294
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ct;
3294
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Dt;
3295
3295
  const s = Y(t) ? t : this.language;
3296
3296
  if (typeof t == "function" && (n = t), !this.options.resources || this.options.partialBundledLanguages) {
3297
3297
  if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
@@ -3309,7 +3309,7 @@ class _t extends Ur {
3309
3309
  }
3310
3310
  reloadResources(t, r, n) {
3311
3311
  const s = ft();
3312
- return typeof t == "function" && (n = t, t = void 0), typeof r == "function" && (n = r, r = void 0), t || (t = this.languages), r || (r = this.options.ns), n || (n = Ct), this.services.backendConnector.reload(t, r, (o) => {
3312
+ return typeof t == "function" && (n = t, t = void 0), typeof r == "function" && (n = r, r = void 0), t || (t = this.languages), r || (r = this.options.ns), n || (n = Dt), this.services.backendConnector.reload(t, r, (o) => {
3313
3313
  s.resolve(), n(o);
3314
3314
  }), s;
3315
3315
  }
@@ -3426,7 +3426,7 @@ class _t extends Ur {
3426
3426
  return new _t(t, r);
3427
3427
  }
3428
3428
  cloneInstance() {
3429
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ct;
3429
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Dt;
3430
3430
  const n = t.forkResourceStore;
3431
3431
  n && delete t.forkResourceStore;
3432
3432
  const s = {
@@ -3496,7 +3496,7 @@ function Pu(e) {
3496
3496
  function Iu(e) {
3497
3497
  return typeof e != "string" ? !1 : [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i].some((r) => r.test(e));
3498
3498
  }
3499
- const $s = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Cu = function(e, t) {
3499
+ const $s = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Du = function(e, t) {
3500
3500
  const n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
3501
3501
  path: "/"
3502
3502
  }, s = encodeURIComponent(t);
@@ -3545,7 +3545,7 @@ const $s = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Cu = function(e, t) {
3545
3545
  path: "/",
3546
3546
  sameSite: "strict"
3547
3547
  };
3548
- r && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + r * 60 * 1e3)), n && (s.domain = n), document.cookie = Cu(e, t, s);
3548
+ r && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + r * 60 * 1e3)), n && (s.domain = n), document.cookie = Du(e, t, s);
3549
3549
  },
3550
3550
  read(e) {
3551
3551
  const t = `${e}=`, r = document.cookie.split(";");
@@ -3560,7 +3560,7 @@ const $s = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Cu = function(e, t) {
3560
3560
  this.create(e, "", -1, t);
3561
3561
  }
3562
3562
  };
3563
- var Du = {
3563
+ var Cu = {
3564
3564
  name: "cookie",
3565
3565
  // Deconstruct the options object and extract the lookupCookie property
3566
3566
  lookup(e) {
@@ -3663,7 +3663,7 @@ var xu = {
3663
3663
  }
3664
3664
  };
3665
3665
  let Xe = null;
3666
- const Cs = () => {
3666
+ const Ds = () => {
3667
3667
  if (Xe !== null) return Xe;
3668
3668
  try {
3669
3669
  if (Xe = typeof window < "u" && window.sessionStorage !== null, !Xe)
@@ -3681,14 +3681,14 @@ var Uu = {
3681
3681
  let {
3682
3682
  lookupSessionStorage: t
3683
3683
  } = e;
3684
- if (t && Cs())
3684
+ if (t && Ds())
3685
3685
  return window.sessionStorage.getItem(t) || void 0;
3686
3686
  },
3687
3687
  cacheUserLanguage(e, t) {
3688
3688
  let {
3689
3689
  lookupSessionStorage: r
3690
3690
  } = t;
3691
- r && Cs() && window.sessionStorage.setItem(r, e);
3691
+ r && Ds() && window.sessionStorage.setItem(r, e);
3692
3692
  }
3693
3693
  }, qu = {
3694
3694
  name: "navigator",
@@ -3717,7 +3717,7 @@ var Uu = {
3717
3717
  const n = t || (typeof document < "u" ? document.documentElement : null);
3718
3718
  return n && typeof n.getAttribute == "function" && (r = n.getAttribute("lang")), r;
3719
3719
  }
3720
- }, ju = {
3720
+ }, Fu = {
3721
3721
  name: "path",
3722
3722
  // Deconstruct the options object and extract the lookupFromPathIndex property
3723
3723
  lookup(e) {
@@ -3728,7 +3728,7 @@ var Uu = {
3728
3728
  const r = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
3729
3729
  return Array.isArray(r) ? r[typeof t == "number" ? t : 0]?.replace("/", "") : void 0;
3730
3730
  }
3731
- }, Fu = {
3731
+ }, ju = {
3732
3732
  name: "subdomain",
3733
3733
  lookup(e) {
3734
3734
  let {
@@ -3739,15 +3739,15 @@ var Uu = {
3739
3739
  return n[r];
3740
3740
  }
3741
3741
  };
3742
- let Ca = !1;
3742
+ let Da = !1;
3743
3743
  try {
3744
- document.cookie, Ca = !0;
3744
+ document.cookie, Da = !0;
3745
3745
  } catch {
3746
3746
  }
3747
- const Da = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
3748
- Ca || Da.splice(1, 1);
3747
+ const Ca = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
3748
+ Da || Ca.splice(1, 1);
3749
3749
  const Vu = () => ({
3750
- order: Da,
3750
+ order: Ca,
3751
3751
  lookupQuerystring: "lng",
3752
3752
  lookupCookie: "i18next",
3753
3753
  lookupLocalStorage: "i18nextLng",
@@ -3768,7 +3768,7 @@ class La {
3768
3768
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
3769
3769
  languageUtils: {}
3770
3770
  }, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3771
- this.services = t, this.options = Pu(r, this.options || {}, Vu()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (s) => s.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(Du), this.addDetector(Lu), this.addDetector(xu), this.addDetector(Uu), this.addDetector(qu), this.addDetector(Mu), this.addDetector(ju), this.addDetector(Fu), this.addDetector(ku);
3771
+ this.services = t, this.options = Pu(r, this.options || {}, Vu()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (s) => s.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(Cu), this.addDetector(Lu), this.addDetector(xu), this.addDetector(Uu), this.addDetector(qu), this.addDetector(Mu), this.addDetector(Fu), this.addDetector(ju), this.addDetector(ku);
3772
3772
  }
3773
3773
  addDetector(t) {
3774
3774
  return this.detectors[t.name] = t, this;
@@ -3790,7 +3790,7 @@ class La {
3790
3790
  }
3791
3791
  }
3792
3792
  La.type = "languageDetector";
3793
- const Hu = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", Z = "/openmrs/ws/rest/v1", Bu = "/openmrs/ws/rest/v2", zu = "bahmni.user", tg = "/bahmni/home/index.html", Gu = Z + "/session", Ku = "en", ka = "NG_TRANSLATE_LANG_KEY", Yu = (e, t) => Hu + `${e}/locales/locale_${t}.json`, Wu = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(ka) ?? Ku, Ds = async (e) => {
3793
+ const Hu = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", X = "/openmrs/ws/rest/v1", Bu = "/openmrs/ws/rest/v2", zu = "bahmni.user", sg = "/bahmni/home/index.html", Gu = X + "/session", Ku = "en", ka = "NG_TRANSLATE_LANG_KEY", Yu = (e, t) => Hu + `${e}/locales/locale_${t}.json`, Wu = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(ka) ?? Ku, Cs = async (e) => {
3794
3794
  try {
3795
3795
  const t = await V(e);
3796
3796
  return t || (console.error(`Invalid response from ${e}`), {});
@@ -3799,9 +3799,9 @@ const Hu = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", Z = "/ope
3799
3799
  }
3800
3800
  }, Ls = async (e, t) => {
3801
3801
  let r = {}, n = {};
3802
- return r = await Ds(
3802
+ return r = await Cs(
3803
3803
  Yu(e, t)
3804
- ), n = await Ds(
3804
+ ), n = await Cs(
3805
3805
  Wu(e, t)
3806
3806
  ), {
3807
3807
  ...r,
@@ -3814,7 +3814,7 @@ const Hu = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", Z = "/ope
3814
3814
  }, e !== "en" && (r.en = {
3815
3815
  [t]: await Ls(t, "en")
3816
3816
  }), r;
3817
- }, rg = (e, t) => {
3817
+ }, og = (e, t) => {
3818
3818
  const r = e.toUpperCase(), n = t.toUpperCase().replace(/\s+/g, "_").replace(/[^A-Z0-9_]/g, "");
3819
3819
  return `${r}_${n}`;
3820
3820
  }, Qu = (e, t) => {
@@ -3831,7 +3831,7 @@ const Hu = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", Z = "/ope
3831
3831
  labels: n.labels ?? {},
3832
3832
  concepts: n.concepts ?? {}
3833
3833
  };
3834
- }, ng = async (e) => {
3834
+ }, ag = async (e) => {
3835
3835
  const t = qr(), r = await Ju(t, e);
3836
3836
  return await le.use(La).use(pi).init({
3837
3837
  fallbackLng: "en",
@@ -3850,7 +3850,7 @@ const Hu = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", Z = "/ope
3850
3850
  }
3851
3851
  }), le;
3852
3852
  };
3853
- function sg() {
3853
+ function ig() {
3854
3854
  const e = bn(null), t = bn(null), r = Wr(async () => {
3855
3855
  t.current && (t.current.getTracks().forEach((a) => a.stop()), t.current = null);
3856
3856
  const o = await navigator.mediaDevices.getUserMedia({
@@ -3873,10 +3873,10 @@ function sg() {
3873
3873
  }, []);
3874
3874
  return _n(() => () => n(), [n]), { videoRef: e, start: r, stop: n, capture: s };
3875
3875
  }
3876
- const Xu = "bahmni.enableAuditLog", xa = (e) => `${Z}/bahmnicore/sql/globalproperty?property=${e}`, og = async (e, t, r) => {
3876
+ const Xu = "bahmni.enableAuditLog", xa = (e) => `${X}/bahmnicore/sql/globalproperty?property=${e}`, cg = async (e, t, r) => {
3877
3877
  const { exact: n = !0, refetchActiveNow: s = !0 } = r ?? {};
3878
3878
  await e.cancelQueries({ queryKey: t, exact: n }), await e.removeQueries({ queryKey: t, exact: n }), await e.invalidateQueries({ queryKey: t, exact: n }), s && await e.refetchQueries({ queryKey: t, exact: n, type: "active" });
3879
- }, ag = () => Math.random().toString(36).substring(2, 9), ig = () => {
3879
+ }, ug = () => Math.random().toString(36).substring(2, 9), lg = () => {
3880
3880
  if (typeof globalThis < "u" && globalThis.crypto?.randomUUID)
3881
3881
  return globalThis.crypto.randomUUID();
3882
3882
  const e = globalThis.crypto || globalThis.msCrypto;
@@ -3888,7 +3888,7 @@ const Xu = "bahmni.enableAuditLog", xa = (e) => `${Z}/bahmnicore/sql/globalprope
3888
3888
  "Crypto API (crypto.randomUUID or crypto.getRandomValues) is not available. UUID generation requires cryptographically secure random number generation."
3889
3889
  );
3890
3890
  };
3891
- function cg(e, t = " -") {
3891
+ function dg(e, t = " -") {
3892
3892
  return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
3893
3893
  }
3894
3894
  function Ua(e) {
@@ -3900,7 +3900,7 @@ function Ua(e) {
3900
3900
  }
3901
3901
  return "";
3902
3902
  }
3903
- const ug = (e) => !e || e.trim().length === 0, lg = (e, t) => {
3903
+ const fg = (e) => !e || e.trim().length === 0, pg = (e, t) => {
3904
3904
  if (!e || !t || t.length === 0)
3905
3905
  return 999;
3906
3906
  const r = t.findIndex(
@@ -3908,7 +3908,7 @@ const ug = (e) => !e || e.trim().length === 0, lg = (e, t) => {
3908
3908
  );
3909
3909
  return r === -1 ? 999 : r;
3910
3910
  };
3911
- function dg(e, t) {
3911
+ function hg(e, t) {
3912
3912
  if (!e || e.length === 0)
3913
3913
  return [];
3914
3914
  const r = /* @__PURE__ */ new Map();
@@ -3920,7 +3920,7 @@ function dg(e, t) {
3920
3920
  items: s
3921
3921
  }));
3922
3922
  }
3923
- function fg(e, t, r) {
3923
+ function mg(e, t, r) {
3924
3924
  if (!e || e.length === 0)
3925
3925
  return [];
3926
3926
  const n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
@@ -3941,7 +3941,7 @@ function Zu(e) {
3941
3941
  o[n(a[1])] = n(a[2]);
3942
3942
  return o;
3943
3943
  }
3944
- function pg(e, t, r) {
3944
+ function gg(e, t, r) {
3945
3945
  const n = /{{([^}]*)}}/g, s = e.match(n);
3946
3946
  let o = e;
3947
3947
  const a = r ?? !1, i = a ? Zu() : {};
@@ -3954,7 +3954,7 @@ function pg(e, t, r) {
3954
3954
  const el = (e) => new Promise((t, r) => {
3955
3955
  const n = new FileReader();
3956
3956
  n.onloadend = () => t(n.result), n.onerror = r, n.readAsDataURL(e);
3957
- }), hg = (e) => {
3957
+ }), yg = (e) => {
3958
3958
  if (typeof e == "number" && !isNaN(e))
3959
3959
  return "number";
3960
3960
  if (typeof e != "string")
@@ -3962,14 +3962,14 @@ const el = (e) => new Promise((t, r) => {
3962
3962
  const t = e.toLowerCase();
3963
3963
  return t.endsWith(".pdf") ? "PDF" : [".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].some((s) => t.endsWith(s)) ? "Image" : [".mp4", ".ogg", ".webm", ".mkv", ".flv"].some((s) => t.endsWith(s)) ? "Video" : typeof e == "string" ? "string" : "object";
3964
3964
  };
3965
- function mg(e) {
3965
+ function vg(e) {
3966
3966
  return e.replace(/[\s-]+/g, "_").replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toUpperCase();
3967
3967
  }
3968
- function gg(e) {
3968
+ function wg(e) {
3969
3969
  return e ? e.replaceAll(/[_-]/g, " ").replaceAll(/([a-z])([A-Z])/g, "$1 $2").replaceAll(/([A-Z])([A-Z][a-z])/g, "$1 $2").replaceAll(/([a-z])(\d)/gi, "$1 $2").replaceAll(/(\d)([a-z])/gi, "$1 $2").replaceAll(/\s+/g, " ").trim().toLowerCase().replace(/^./, (t) => t.toUpperCase()) : "";
3970
3970
  }
3971
- const tl = (e) => Z + `/user?username=${e}&v=custom:(username,uuid)`, rl = "bahmni.user.location", nl = (e) => Z + `/bahmni/app/setting?module=${e}`, sl = "default_dateFormat";
3972
- async function yg() {
3971
+ const tl = (e) => X + `/user?username=${e}&v=custom:(username,uuid)`, rl = "bahmni.user.location", nl = (e) => X + `/bahmni/app/setting?module=${e}`, sl = "default_dateFormat";
3972
+ async function Eg() {
3973
3973
  const e = Ua(zu);
3974
3974
  if (!e)
3975
3975
  return null;
@@ -3993,7 +3993,7 @@ const qn = () => {
3993
3993
  if (!t.uuid)
3994
3994
  throw new Error(le.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
3995
3995
  return t;
3996
- }, vg = async () => (await V(nl("commons"))).find(
3996
+ }, bg = async () => (await V(nl("commons"))).find(
3997
3997
  (r) => r.property === sl
3998
3998
  )?.value ?? null, Mn = {
3999
3999
  person: {
@@ -4027,7 +4027,7 @@ const qn = () => {
4027
4027
  o && s.fields.forEach((a) => {
4028
4028
  n.append(o.searchFieldParam, a), n.append(o.resultParam, a);
4029
4029
  });
4030
- }), `${Z}/bahmni/search/patient/lucene?${n.toString()}`;
4030
+ }), `${X}/bahmni/search/patient/lucene?${n.toString()}`;
4031
4031
  }, cl = (e, t, r, n, s) => {
4032
4032
  const o = e.trim(), a = new URLSearchParams({
4033
4033
  loginLocationUuid: s,
@@ -4037,11 +4037,11 @@ const qn = () => {
4037
4037
  }), i = Mn[t];
4038
4038
  return i && (a.set(i.searchParam, o), r.forEach((c) => {
4039
4039
  a.append(i.searchFieldParam, c);
4040
- })), ol(a, n), Z + `/bahmni/search/patient?${a.toString()}`;
4041
- }, qa = Z + "/idgen/identifiertype", ul = (e) => Z + `/bahmni/app/setting?module=${e}`, ll = "bahmni.primaryIdentifierType", dl = Z + "/bahmnicore/patientprofile", fl = (e) => Z + `/bahmnicore/patientprofile/${e}`, pl = (e) => Z + `/patientprofile/${e}?v=full`, hl = (e, t, r = 20, n) => {
4040
+ })), ol(a, n), X + `/bahmni/search/patient?${a.toString()}`;
4041
+ }, qa = X + "/idgen/identifiertype", ul = (e) => X + `/bahmni/app/setting?module=${e}`, ll = "bahmni.primaryIdentifierType", dl = X + "/bahmnicore/patientprofile", fl = (e) => X + `/bahmnicore/patientprofile/${e}`, pl = (e) => X + `/patientprofile/${e}?v=full`, hl = (e, t, r = 20, n) => {
4042
4042
  let s = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${e}&limit=${r}&searchString=${encodeURIComponent(t)}`;
4043
4043
  return n && (s += `&parent=${n}`), s;
4044
- }, ml = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", gl = Z + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", yl = 20, vl = 2, wg = 120, Eg = 50, bg = 15, wl = /^[a-f0-9-]{36}$/i, El = (e) => Bu + `/patientImage?patientUuid=${e}`, bl = Z + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", _l = async (e) => {
4044
+ }, ml = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", gl = X + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", yl = 20, vl = 2, _g = 120, Sg = 50, Rg = 15, wl = /^[a-f0-9-]{36}$/i, El = (e) => Bu + `/patientImage?patientUuid=${e}`, bl = X + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", _l = async (e) => {
4045
4045
  if (!e || e.trim() === "")
4046
4046
  throw new Error("Invalid patient UUID: UUID cannot be empty");
4047
4047
  if (!wl.test(e))
@@ -4074,20 +4074,20 @@ const qn = () => {
4074
4074
  formattedContact: r,
4075
4075
  identifiers: s
4076
4076
  };
4077
- }, _g = async (e) => {
4077
+ }, Tg = async (e) => {
4078
4078
  const t = await _l(e);
4079
4079
  return Al(t);
4080
- }, Sg = async (e) => {
4080
+ }, Og = async (e) => {
4081
4081
  const t = await fetch(El(e));
4082
4082
  if (!t.ok) return null;
4083
4083
  const r = await t.blob();
4084
4084
  return await el(r);
4085
- }, Rg = async (e, t) => {
4085
+ }, Ag = async (e, t) => {
4086
4086
  const r = qn();
4087
4087
  return await V(
4088
4088
  il(e, r.uuid, t)
4089
4089
  );
4090
- }, Tg = async (e, t, r, n, s) => {
4090
+ }, Ng = async (e, t, r, n, s) => {
4091
4091
  const o = qn();
4092
4092
  return await V(
4093
4093
  cl(
@@ -4098,9 +4098,9 @@ const qn = () => {
4098
4098
  o.uuid
4099
4099
  )
4100
4100
  );
4101
- }, Og = async () => V(qa), Nl = async () => (await V(ul("core"))).find(
4101
+ }, $g = async () => V(qa), Nl = async () => (await V(ul("core"))).find(
4102
4102
  (r) => r.property === ll
4103
- )?.value ?? null, Ag = async () => {
4103
+ )?.value ?? null, Pg = async () => {
4104
4104
  const [e, t] = await Promise.all([
4105
4105
  V(qa),
4106
4106
  Nl()
@@ -4117,10 +4117,10 @@ const qn = () => {
4117
4117
  sourcesByPrefix: n,
4118
4118
  primaryIdentifierTypeUuid: t
4119
4119
  }) : { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: t };
4120
- }, Ng = async (e) => Me(dl, e), $g = async (e, t) => Me(
4120
+ }, Ig = async (e) => xe(dl, e), Dg = async (e, t) => xe(
4121
4121
  fl(e),
4122
4122
  t
4123
- ), Pg = async () => V(xa("mrs.genders")), Ig = async (e, t, r = yl, n) => {
4123
+ ), Cg = async () => V(xa("mrs.genders")), Lg = async (e, t, r = yl, n) => {
4124
4124
  if (!t || t.length < vl)
4125
4125
  return [];
4126
4126
  try {
@@ -4132,7 +4132,7 @@ const qn = () => {
4132
4132
  `Failed to fetch address hierarchy for field "${e}": ${s instanceof Error ? s.message : "Unknown error"}`
4133
4133
  );
4134
4134
  }
4135
- }, Cg = async () => V(ml), Dg = async (e) => V(pl(e)), Lg = async () => {
4135
+ }, kg = async () => V(ml), xg = async (e) => V(pl(e)), Ug = async () => {
4136
4136
  try {
4137
4137
  return (await V(
4138
4138
  gl
@@ -4146,12 +4146,12 @@ const qn = () => {
4146
4146
  `Failed to fetch relationship types: ${e instanceof Error ? e.message : "Unknown error"}`
4147
4147
  );
4148
4148
  }
4149
- }, kg = async () => V(bl);
4149
+ }, qg = async () => V(bl);
4150
4150
  var $l = /* @__PURE__ */ ((e) => (e.BOOLEAN = "java.lang.Boolean", e.BOOLEAN_DATATYPE = "org.openmrs.customdatatype.datatype.BooleanDatatype", e.CONCEPT = "org.openmrs.Concept", e.CODED_CONCEPT = "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype", e.CONCEPT_DATATYPE = "org.openmrs.customdatatype.datatype.ConceptDatatype", e.STRING = "java.lang.String", e.FREE_TEXT = "org.openmrs.customdatatype.datatype.FreeTextDatatype", e.REGEX_VALIDATED_TEXT = "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", e.INTEGER = "java.lang.Integer", e.FLOAT = "java.lang.Float", e.ATTRIBUTABLE_DATE = "org.openmrs.util.AttributableDate", e.DATE_DATATYPE = "org.openmrs.customdatatype.datatype.DateDatatype", e))($l || {}), Pl = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(Pl || {});
4151
- const xg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", Ug = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", qg = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", Mg = (e) => e === "java.lang.Integer" || e === "java.lang.Float", jg = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", Fg = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", Il = (e) => {
4151
+ const Mg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", Fg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", jg = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", Vg = (e) => e === "java.lang.Integer" || e === "java.lang.Float", Hg = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", Bg = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", Il = (e) => {
4152
4152
  const t = new CustomEvent("bahmni-audit-log", { detail: e });
4153
4153
  window.dispatchEvent(t);
4154
- }, Cl = (e) => {
4154
+ }, Dl = (e) => {
4155
4155
  const t = (r) => {
4156
4156
  e(r.detail);
4157
4157
  };
@@ -4199,33 +4199,33 @@ const xg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype
4199
4199
  eventType: "VIEWED_RADIOLOGY_RESULTS",
4200
4200
  message: "VIEWED_RADIOLOGY_RESULTS_MESSAGE"
4201
4201
  }
4202
- }, Dl = Z + "/auditlog", Ll = {
4202
+ }, Cl = X + "/auditlog", Ll = {
4203
4203
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
4204
- }, kl = () => Z + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", xl = Z + "/visit", Ul = (e) => Z + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, ql = (e) => Z + `/bahmnicore/visitLocation/${e}`, Vg = async () => V(kl()), Ml = async (e) => V(Ul(e)), jl = async (e) => V(ql(e)), Fl = async (e) => Me(xl, e), Hg = async (e) => {
4204
+ }, kl = () => X + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", xl = X + "/visit", Ul = (e) => X + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, ql = (e) => X + `/bahmnicore/visitLocation/${e}`, zg = async () => V(kl()), Ml = async (e) => V(Ul(e)), Fl = async (e) => V(ql(e)), jl = async (e) => xe(xl, e), Gg = async (e) => {
4205
4205
  const t = await Ml(e);
4206
4206
  return t?.results && t.results.length > 0;
4207
- }, Bg = async (e, t) => {
4208
- const r = await jl(
4207
+ }, Kg = async (e, t) => {
4208
+ const r = await Fl(
4209
4209
  qn().uuid
4210
4210
  ), n = {
4211
4211
  patient: e,
4212
4212
  visitType: t.uuid,
4213
4213
  location: r.uuid
4214
- }, s = await Fl(n);
4214
+ }, s = await jl(n);
4215
4215
  return Il({
4216
4216
  eventType: $n.OPEN_VISIT.eventType,
4217
4217
  patientUuid: e,
4218
4218
  messageParams: { visitType: t.name },
4219
4219
  module: $n.OPEN_VISIT.module
4220
4220
  }), s;
4221
- }, Ma = 6048e5, Vl = 864e5, jn = 6e4, ja = 36e5, ks = /* @__PURE__ */ Symbol.for("constructDateFrom");
4221
+ }, Ma = 6048e5, Vl = 864e5, Fn = 6e4, Fa = 36e5, ks = /* @__PURE__ */ Symbol.for("constructDateFrom");
4222
4222
  function Oe(e, t) {
4223
4223
  return typeof e == "function" ? e(t) : e && typeof e == "object" && ks in e ? e[ks](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
4224
4224
  }
4225
4225
  function de(e, t) {
4226
4226
  return Oe(t || e, e);
4227
4227
  }
4228
- function Fa(e, t, r) {
4228
+ function ja(e, t, r) {
4229
4229
  const n = de(e, r?.in);
4230
4230
  return isNaN(t) ? Oe(e, NaN) : (t && n.setDate(n.getDate() + t), n);
4231
4231
  }
@@ -4244,11 +4244,11 @@ function Mr(e, t, r) {
4244
4244
  ), n);
4245
4245
  }
4246
4246
  let Hl = {};
4247
- function jr() {
4247
+ function Fr() {
4248
4248
  return Hl;
4249
4249
  }
4250
4250
  function St(e, t) {
4251
- const r = jr(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = de(e, t?.in), o = s.getDay(), a = (o < n ? 7 : 0) + o - n;
4251
+ const r = Fr(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = de(e, t?.in), o = s.getDay(), a = (o < n ? 7 : 0) + o - n;
4252
4252
  return s.setDate(s.getDate() - a), s.setHours(0, 0, 0, 0), s;
4253
4253
  }
4254
4254
  function $r(e, t) {
@@ -4301,9 +4301,9 @@ function Bl(e, t) {
4301
4301
  }
4302
4302
  function zl(e, t, r) {
4303
4303
  const n = de(e, r?.in);
4304
- return n.setTime(n.getTime() + t * jn), n;
4304
+ return n.setTime(n.getTime() + t * Fn), n;
4305
4305
  }
4306
- function Fn(e, t, r) {
4306
+ function jn(e, t, r) {
4307
4307
  return Mr(e, t * 12, r);
4308
4308
  }
4309
4309
  function Et(e, t) {
@@ -4821,16 +4821,16 @@ const vd = /^(\d+)(th|st|nd|rd)?/i, wd = /\d+/i, Ed = {
4821
4821
  firstWeekContainsDate: 1
4822
4822
  }
4823
4823
  };
4824
- function Cd(e, t) {
4824
+ function Dd(e, t) {
4825
4825
  const r = de(e, t?.in);
4826
4826
  return Ha(r, Xl(r)) + 1;
4827
4827
  }
4828
- function Dd(e, t) {
4828
+ function Cd(e, t) {
4829
4829
  const r = de(e, t?.in), n = +$r(r) - +Bl(r);
4830
4830
  return Math.round(n / Ma) + 1;
4831
4831
  }
4832
4832
  function Ba(e, t) {
4833
- const r = de(e, t?.in), n = r.getFullYear(), s = jr(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, a = Oe(t?.in || e, 0);
4833
+ const r = de(e, t?.in), n = r.getFullYear(), s = Fr(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, a = Oe(t?.in || e, 0);
4834
4834
  a.setFullYear(n + 1, 0, o), a.setHours(0, 0, 0, 0);
4835
4835
  const i = St(a, t), c = Oe(t?.in || e, 0);
4836
4836
  c.setFullYear(n, 0, o), c.setHours(0, 0, 0, 0);
@@ -4838,7 +4838,7 @@ function Ba(e, t) {
4838
4838
  return +r >= +i ? n + 1 : +r >= +d ? n : n - 1;
4839
4839
  }
4840
4840
  function Ld(e, t) {
4841
- const r = jr(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = Ba(e, t), o = Oe(t?.in || e, 0);
4841
+ const r = Fr(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = Ba(e, t), o = Oe(t?.in || e, 0);
4842
4842
  return o.setFullYear(s, 0, n), o.setHours(0, 0, 0, 0), St(o, t);
4843
4843
  }
4844
4844
  function kd(e, t) {
@@ -4849,7 +4849,7 @@ function ae(e, t) {
4849
4849
  const r = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
4850
4850
  return r + n;
4851
4851
  }
4852
- const xe = {
4852
+ const Ue = {
4853
4853
  // Year
4854
4854
  y(e, t) {
4855
4855
  const r = e.getFullYear(), n = r > 0 ? r : 1 - r;
@@ -4932,7 +4932,7 @@ const xe = {
4932
4932
  const n = e.getFullYear(), s = n > 0 ? n : 1 - n;
4933
4933
  return r.ordinalNumber(s, { unit: "year" });
4934
4934
  }
4935
- return xe.y(e, t);
4935
+ return Ue.y(e, t);
4936
4936
  },
4937
4937
  // Local week-numbering year
4938
4938
  Y: function(e, t, r, n) {
@@ -5031,7 +5031,7 @@ const xe = {
5031
5031
  switch (t) {
5032
5032
  case "M":
5033
5033
  case "MM":
5034
- return xe.M(e, t);
5034
+ return Ue.M(e, t);
5035
5035
  // 1st, 2nd, ..., 12th
5036
5036
  case "Mo":
5037
5037
  return r.ordinalNumber(n + 1, { unit: "month" });
@@ -5087,16 +5087,16 @@ const xe = {
5087
5087
  },
5088
5088
  // ISO week of year
5089
5089
  I: function(e, t, r) {
5090
- const n = Dd(e);
5090
+ const n = Cd(e);
5091
5091
  return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : ae(n, t.length);
5092
5092
  },
5093
5093
  // Day of the month
5094
5094
  d: function(e, t, r) {
5095
- return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) : xe.d(e, t);
5095
+ return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) : Ue.d(e, t);
5096
5096
  },
5097
5097
  // Day of year
5098
5098
  D: function(e, t, r) {
5099
- const n = Cd(e);
5099
+ const n = Dd(e);
5100
5100
  return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : ae(n, t.length);
5101
5101
  },
5102
5102
  // Day of week
@@ -5327,11 +5327,11 @@ const xe = {
5327
5327
  let n = e.getHours() % 12;
5328
5328
  return n === 0 && (n = 12), r.ordinalNumber(n, { unit: "hour" });
5329
5329
  }
5330
- return xe.h(e, t);
5330
+ return Ue.h(e, t);
5331
5331
  },
5332
5332
  // Hour [0-23]
5333
5333
  H: function(e, t, r) {
5334
- return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) : xe.H(e, t);
5334
+ return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) : Ue.H(e, t);
5335
5335
  },
5336
5336
  // Hour [0-11]
5337
5337
  K: function(e, t, r) {
@@ -5345,15 +5345,15 @@ const xe = {
5345
5345
  },
5346
5346
  // Minute
5347
5347
  m: function(e, t, r) {
5348
- return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) : xe.m(e, t);
5348
+ return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) : Ue.m(e, t);
5349
5349
  },
5350
5350
  // Second
5351
5351
  s: function(e, t, r) {
5352
- return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) : xe.s(e, t);
5352
+ return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) : Ue.s(e, t);
5353
5353
  },
5354
5354
  // Fraction of second
5355
5355
  S: function(e, t) {
5356
- return xe.S(e, t);
5356
+ return Ue.S(e, t);
5357
5357
  },
5358
5358
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
5359
5359
  X: function(e, t, r) {
@@ -5363,7 +5363,7 @@ const xe = {
5363
5363
  switch (t) {
5364
5364
  // Hours and optional minutes
5365
5365
  case "X":
5366
- return Fs(n);
5366
+ return js(n);
5367
5367
  // Hours, minutes and optional seconds without `:` delimiter
5368
5368
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
5369
5369
  // so this token always has the same output as `XX`
@@ -5381,7 +5381,7 @@ const xe = {
5381
5381
  switch (t) {
5382
5382
  // Hours and optional minutes
5383
5383
  case "x":
5384
- return Fs(n);
5384
+ return js(n);
5385
5385
  // Hours, minutes and optional seconds without `:` delimiter
5386
5386
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
5387
5387
  // so this token always has the same output as `xx`
@@ -5401,7 +5401,7 @@ const xe = {
5401
5401
  case "O":
5402
5402
  case "OO":
5403
5403
  case "OOO":
5404
- return "GMT" + js(n, ":");
5404
+ return "GMT" + Fs(n, ":");
5405
5405
  default:
5406
5406
  return "GMT" + Be(n, ":");
5407
5407
  }
@@ -5414,7 +5414,7 @@ const xe = {
5414
5414
  case "z":
5415
5415
  case "zz":
5416
5416
  case "zzz":
5417
- return "GMT" + js(n, ":");
5417
+ return "GMT" + Fs(n, ":");
5418
5418
  default:
5419
5419
  return "GMT" + Be(n, ":");
5420
5420
  }
@@ -5429,11 +5429,11 @@ const xe = {
5429
5429
  return ae(+e, t.length);
5430
5430
  }
5431
5431
  };
5432
- function js(e, t = "") {
5432
+ function Fs(e, t = "") {
5433
5433
  const r = e > 0 ? "-" : "+", n = Math.abs(e), s = Math.trunc(n / 60), o = n % 60;
5434
5434
  return o === 0 ? r + String(s) : r + String(s) + t + ae(o, 2);
5435
5435
  }
5436
- function Fs(e, t) {
5436
+ function js(e, t) {
5437
5437
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + ae(Math.abs(e) / 60, 2) : Be(e, t);
5438
5438
  }
5439
5439
  function Be(e, t = "") {
@@ -5485,8 +5485,8 @@ const Vs = (e, t) => {
5485
5485
  }, Ud = {
5486
5486
  p: za,
5487
5487
  P: xd
5488
- }, qd = /^D+$/, Md = /^Y+$/, jd = ["D", "DD", "YY", "YYYY"];
5489
- function Fd(e) {
5488
+ }, qd = /^D+$/, Md = /^Y+$/, Fd = ["D", "DD", "YY", "YYYY"];
5489
+ function jd(e) {
5490
5490
  return qd.test(e);
5491
5491
  }
5492
5492
  function Vd(e) {
@@ -5494,7 +5494,7 @@ function Vd(e) {
5494
5494
  }
5495
5495
  function Hd(e, t, r) {
5496
5496
  const n = Bd(e, t, r);
5497
- if (console.warn(n), jd.includes(e)) throw new RangeError(n);
5497
+ if (console.warn(n), Fd.includes(e)) throw new RangeError(n);
5498
5498
  }
5499
5499
  function Bd(e, t, r) {
5500
5500
  const n = e[0] === "Y" ? "years" : "days of the month";
@@ -5502,7 +5502,7 @@ function Bd(e, t, r) {
5502
5502
  }
5503
5503
  const zd = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Gd = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Kd = /^'([^]*?)'?$/, Yd = /''/g, Wd = /[a-zA-Z]/;
5504
5504
  function Jd(e, t, r) {
5505
- const n = jr(), s = n.locale ?? Id, o = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = de(e, r?.in);
5505
+ const n = Fr(), s = n.locale ?? Id, o = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = de(e, r?.in);
5506
5506
  if (!$t(i))
5507
5507
  throw new RangeError("Invalid time value");
5508
5508
  let c = t.match(Gd).map((l) => {
@@ -5535,7 +5535,7 @@ function Jd(e, t, r) {
5535
5535
  return c.map((l) => {
5536
5536
  if (!l.isToken) return l.value;
5537
5537
  const m = l.value;
5538
- (Vd(m) || Fd(m)) && Hd(m, t, String(e));
5538
+ (Vd(m) || jd(m)) && Hd(m, t, String(e));
5539
5539
  const v = Ms[m[0]];
5540
5540
  return v(i, m, s.localize, d);
5541
5541
  }).join("");
@@ -5545,7 +5545,7 @@ function Qd(e) {
5545
5545
  return t ? t[1].replace(Yd, "'") : e;
5546
5546
  }
5547
5547
  function Xd(e, t, r) {
5548
- return Fa(e, -t, r);
5548
+ return ja(e, -t, r);
5549
5549
  }
5550
5550
  function Bn(e, t) {
5551
5551
  const r = () => Oe(t?.in, NaN), s = rf(e);
@@ -5576,21 +5576,21 @@ function Bn(e, t) {
5576
5576
  }
5577
5577
  return de(a + i + c, t?.in);
5578
5578
  }
5579
- const Dt = {
5579
+ const Ct = {
5580
5580
  dateTimeDelimiter: /[T ]/,
5581
5581
  timeZoneDelimiter: /[Z ]/i,
5582
5582
  timezone: /([Z+-].*)$/
5583
5583
  }, Zd = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, ef = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, tf = /^([+-])(\d{2})(?::?(\d{2}))?$/;
5584
5584
  function rf(e) {
5585
- const t = {}, r = e.split(Dt.dateTimeDelimiter);
5585
+ const t = {}, r = e.split(Ct.dateTimeDelimiter);
5586
5586
  let n;
5587
5587
  if (r.length > 2)
5588
5588
  return t;
5589
- if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], Dt.timeZoneDelimiter.test(t.date) && (t.date = e.split(Dt.timeZoneDelimiter)[0], n = e.substr(
5589
+ if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], Ct.timeZoneDelimiter.test(t.date) && (t.date = e.split(Ct.timeZoneDelimiter)[0], n = e.substr(
5590
5590
  t.date.length,
5591
5591
  e.length
5592
5592
  ))), n) {
5593
- const s = Dt.timezone.exec(n);
5593
+ const s = Ct.timezone.exec(n);
5594
5594
  s ? (t.time = n.replace(s[1], ""), t.timezone = s[1]) : t.time = n;
5595
5595
  }
5596
5596
  return t;
@@ -5625,7 +5625,7 @@ function of(e) {
5625
5625
  const t = e.match(ef);
5626
5626
  if (!t) return NaN;
5627
5627
  const r = on(t[1]), n = on(t[2]), s = on(t[3]);
5628
- return pf(r, n, s) ? r * ja + n * jn + s * 1e3 : NaN;
5628
+ return pf(r, n, s) ? r * Fa + n * Fn + s * 1e3 : NaN;
5629
5629
  }
5630
5630
  function on(e) {
5631
5631
  return e && parseFloat(e.replace(",", ".")) || 0;
@@ -5635,7 +5635,7 @@ function af(e) {
5635
5635
  const t = e.match(tf);
5636
5636
  if (!t) return 0;
5637
5637
  const r = t[1] === "+" ? -1 : 1, n = parseInt(t[2]), s = t[3] && parseInt(t[3]) || 0;
5638
- return hf(n, s) ? r * (n * ja + s * jn) : NaN;
5638
+ return hf(n, s) ? r * (n * Fa + s * Fn) : NaN;
5639
5639
  }
5640
5640
  function cf(e, t, r) {
5641
5641
  const n = /* @__PURE__ */ new Date(0);
@@ -5669,9 +5669,9 @@ function gf(e, t, r) {
5669
5669
  return zl(e, -1, r);
5670
5670
  }
5671
5671
  function yf(e, t, r) {
5672
- return Fn(e, -t, r);
5672
+ return jn(e, -t, r);
5673
5673
  }
5674
- const zg = {
5674
+ const Yg = {
5675
5675
  PROPOSED: "proposed",
5676
5676
  PENDING: "pending",
5677
5677
  BOOKED: "booked",
@@ -5682,36 +5682,36 @@ const zg = {
5682
5682
  CHECKED_IN: "checked-in",
5683
5683
  WAITLIST: "waitlist",
5684
5684
  ENTERED_IN_ERROR: "entered-in-error"
5685
- }, vf = Z + "/appointments/search", Ka = Z + "/appointments", Gg = "http://fhir.bahmni.org/code-system/appointments", wf = (e) => `${Ka}/${e}`, Fr = (e, t, r, n) => {
5685
+ }, vf = X + "/appointments/search", Ka = X + "/appointments", Wg = "http://fhir.bahmni.org/code-system/appointments", wf = (e) => `${Ka}/${e}`, jr = (e, t, r, n) => {
5686
5686
  const s = t === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : gf(/* @__PURE__ */ new Date()).toISOString();
5687
5687
  let c = `${ce}/Appointment?patient=${e}&date=${o}${i}&_sort=${a}`;
5688
5688
  return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
5689
- }, Ef = (e) => Fr(e, "upcoming"), bf = (e, t) => Fr(e, "past", t), _f = (e) => `${Ka}/${e}/status-change`, Sf = Z + "/appointmentService/all/full", Rf = (e) => `${Z}/appointmentService?uuid=${e}`, Tf = (e, t = 10, r = 0) => Fr(e, "upcoming", t, r), Of = (e, t = 10, r = 0) => Fr(e, "past", t, r), Kg = async (e) => await Me(vf, e);
5690
- async function Yg(e) {
5689
+ }, Ef = (e) => jr(e, "upcoming"), bf = (e, t) => jr(e, "past", t), _f = (e) => `${Ka}/${e}/status-change`, Sf = X + "/appointmentService/all/full", Rf = (e) => `${X}/appointmentService?uuid=${e}`, Tf = (e, t = 10, r = 0) => jr(e, "upcoming", t, r), Of = (e, t = 10, r = 0) => jr(e, "past", t, r), Jg = async (e) => await xe(vf, e);
5690
+ async function Qg(e) {
5691
5691
  return await V(Ef(e));
5692
5692
  }
5693
- async function Wg(e, t) {
5693
+ async function Xg(e, t) {
5694
5694
  return await V(
5695
5695
  bf(e, t)
5696
5696
  );
5697
5697
  }
5698
- const Jg = async (e, t, r) => await Me(_f(e), {
5698
+ const Zg = async (e, t, r) => await xe(_f(e), {
5699
5699
  toStatus: t,
5700
5700
  onDate: r
5701
5701
  });
5702
- async function Qg(e) {
5702
+ async function ey(e) {
5703
5703
  return await V(wf(e));
5704
5704
  }
5705
- const Xg = async () => await V(Sf), Zg = async (e) => {
5705
+ const ty = async () => await V(Sf), ry = async (e) => {
5706
5706
  await uu(Rf(e));
5707
5707
  };
5708
- async function ey(e, t = 10, r = 1) {
5708
+ async function ny(e, t = 10, r = 1) {
5709
5709
  const n = (r - 1) * t, s = await V(
5710
5710
  Tf(e, t, n)
5711
5711
  );
5712
5712
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
5713
5713
  }
5714
- async function ty(e, t = 10, r = 1) {
5714
+ async function sy(e, t = 10, r = 1) {
5715
5715
  const n = (r - 1) * t, s = await V(
5716
5716
  Of(e, t, n)
5717
5717
  );
@@ -5724,14 +5724,14 @@ const Af = "dd/MM/yyyy", Nf = "default_dateFormat", $f = "P", Pf = "h:mm a", Te
5724
5724
  INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
5725
5725
  NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
5726
5726
  };
5727
- function ry(e) {
5727
+ function oy(e) {
5728
5728
  if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e))
5729
5729
  return null;
5730
5730
  const t = Bn(e);
5731
5731
  if (!$t(t)) return null;
5732
5732
  const r = /* @__PURE__ */ new Date();
5733
5733
  if (t > r) return null;
5734
- const n = Hn(r, t), s = Fn(t, n), o = Vn(r, s), a = Mr(s, o), i = Pn(r, a);
5734
+ const n = Hn(r, t), s = jn(t, n), o = Vn(r, s), a = Mr(s, o), i = Pn(r, a);
5735
5735
  return { years: n, months: o, days: i };
5736
5736
  }
5737
5737
  function Ya(e, t) {
@@ -5780,7 +5780,7 @@ function If(e, t, r) {
5780
5780
  }
5781
5781
  } : { formattedResult: Jd(n, t) };
5782
5782
  }
5783
- function ny(e, t, r = !1, n) {
5783
+ function ay(e, t, r = !1, n) {
5784
5784
  const s = t ?? ((a) => a);
5785
5785
  let o;
5786
5786
  try {
@@ -5790,7 +5790,7 @@ function ny(e, t, r = !1, n) {
5790
5790
  }
5791
5791
  return r && !n && (o = `${o} ${Pf}`), If(e, o, s);
5792
5792
  }
5793
- function sy(e, t, r) {
5793
+ function iy(e, t, r) {
5794
5794
  if (!e || !$t(e) || t === null || t === void 0 || !r || typeof t != "number")
5795
5795
  return;
5796
5796
  const n = new Date(e);
@@ -5805,7 +5805,7 @@ function sy(e, t, r) {
5805
5805
  return;
5806
5806
  }
5807
5807
  }
5808
- function oy(e, t) {
5808
+ function cy(e, t) {
5809
5809
  if (e == null)
5810
5810
  return {
5811
5811
  formattedResult: "",
@@ -5857,12 +5857,12 @@ function oy(e, t) {
5857
5857
  }
5858
5858
  return { formattedResult: c };
5859
5859
  }
5860
- const ay = () => {
5860
+ const uy = () => {
5861
5861
  const e = /* @__PURE__ */ new Date();
5862
5862
  return e.setHours(0, 0, 0, 0), e;
5863
5863
  };
5864
- function iy(e, t) {
5865
- const r = typeof e == "string" ? Bn(e) : new Date(e), n = /* @__PURE__ */ new Date(), s = Hn(n, r), o = Fn(r, s), a = Vn(n, o), i = Mr(o, a), c = Pn(n, i), d = {
5864
+ function ly(e, t) {
5865
+ const r = typeof e == "string" ? Bn(e) : new Date(e), n = /* @__PURE__ */ new Date(), s = Hn(n, r), o = jn(r, s), a = Vn(n, o), i = Mr(o, a), c = Pn(n, i), d = {
5866
5866
  years: "YEARS",
5867
5867
  months: "MONTHS",
5868
5868
  days: "DAYS"
@@ -5887,7 +5887,7 @@ function iy(e, t) {
5887
5887
  return `${y}${p}`;
5888
5888
  }).join(" ");
5889
5889
  }
5890
- const Cf = {
5890
+ const Df = {
5891
5891
  d: 1,
5892
5892
  wk: 7,
5893
5893
  mo: 30,
@@ -5895,14 +5895,14 @@ const Cf = {
5895
5895
  h: 1 / 24,
5896
5896
  min: 1 / 1440,
5897
5897
  s: 1 / 86400
5898
- }, cy = (e, t, r) => {
5898
+ }, dy = (e, t, r) => {
5899
5899
  const n = typeof e == "string" ? new Date(e) : e;
5900
5900
  if (isNaN(n.getTime()))
5901
5901
  throw new Error(`Invalid date: ${e}`);
5902
- const s = Cf[r] ?? 1, o = t * s;
5903
- return Fa(n, o);
5904
- }, uy = (e, t, r, n) => e <= n && r <= t;
5905
- function ly(e, t, r = !1) {
5902
+ const s = Df[r] ?? 1, o = t * s;
5903
+ return ja(n, o);
5904
+ }, fy = (e, t, r, n) => e <= n && r <= t;
5905
+ function py(e, t, r = !1) {
5906
5906
  return !e || !Array.isArray(e) ? [] : e.sort((n, s) => {
5907
5907
  const o = new Date(n[t]), a = new Date(s[t]);
5908
5908
  if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
@@ -5912,7 +5912,7 @@ function ly(e, t, r = !1) {
5912
5912
  return r ? i : -i;
5913
5913
  });
5914
5914
  }
5915
- const Df = () => {
5915
+ const Cf = () => {
5916
5916
  let e = null;
5917
5917
  return {
5918
5918
  // Method to register the callback
@@ -5941,20 +5941,20 @@ const Df = () => {
5941
5941
  );
5942
5942
  }
5943
5943
  };
5944
- }, dy = Df(), Lf = (e) => ce + `/ValueSet/${e}/$expand`, kf = (e) => ce + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, xf = (e, t, r) => Z + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Uf = (e) => Z + `/concept/${e}`, qf = (e) => `${Z}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, Mf = "SHORT", jf = "FULLY_SPECIFIED", fy = async (e, t = 20) => {
5944
+ }, hy = Cf(), Lf = (e) => ce + `/ValueSet/${e}/$expand`, kf = (e) => ce + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, xf = (e, t, r) => X + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Uf = (e) => X + `/concept/${e}`, qf = (e) => `${X}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, Mf = "SHORT", Ff = "FULLY_SPECIFIED", my = async (e, t = 20) => {
5945
5945
  const r = qr(), n = xf(e, t, r);
5946
5946
  return V(n);
5947
5947
  }, br = async (e) => {
5948
5948
  const t = Lf(e);
5949
5949
  return V(t);
5950
- }, Ff = async (e) => {
5950
+ }, jf = async (e) => {
5951
5951
  const t = `${kf(e)}`;
5952
5952
  return V(t);
5953
5953
  };
5954
- async function py(e) {
5954
+ async function gy(e) {
5955
5955
  return await V(Uf(e));
5956
5956
  }
5957
- async function hy(e) {
5957
+ async function yy(e) {
5958
5958
  const t = qf(e), r = await V(t);
5959
5959
  return !r.results || r.results.length === 0 ? null : r.results[0];
5960
5960
  }
@@ -5964,7 +5964,7 @@ function Vf(e) {
5964
5964
  for (const r of e) {
5965
5965
  if (r.conceptNameType === Mf)
5966
5966
  return r.name;
5967
- r.conceptNameType === jf && (t = r.name);
5967
+ r.conceptNameType === Ff && (t = r.name);
5968
5968
  }
5969
5969
  return t ?? e[0].name ?? null;
5970
5970
  }
@@ -5990,7 +5990,7 @@ const Hf = (e) => ce + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
5990
5990
  }), an = (e, t) => {
5991
5991
  const r = e.expansion?.contains ?? [];
5992
5992
  return zf(r).map((s) => Gf(s, t));
5993
- }, my = async (e, t, r) => {
5993
+ }, vy = async (e, t, r) => {
5994
5994
  const n = e ?? et.MEDICATION.code, s = t ?? et.FOOD.code, o = r ?? et.ENVIRONMENT.code, [a, i, c] = await Promise.all([
5995
5995
  br(n),
5996
5996
  br(s),
@@ -6010,7 +6010,7 @@ const Hf = (e) => ce + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6010
6010
  et.ENVIRONMENT.display
6011
6011
  )
6012
6012
  ];
6013
- }, gy = async (e) => {
6013
+ }, wy = async (e) => {
6014
6014
  const t = e ?? Bf.code;
6015
6015
  return (await br(t)).compose?.include[0]?.concept ?? [];
6016
6016
  };
@@ -6044,22 +6044,22 @@ function Wf(e) {
6044
6044
  };
6045
6045
  });
6046
6046
  }
6047
- async function yy(e) {
6047
+ async function Ey(e) {
6048
6048
  const t = await Yf(e);
6049
6049
  return Wf(t);
6050
6050
  }
6051
6051
  var Jf = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(Jf || {}), Qf = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(Qf || {});
6052
- const vy = "http://fhir.openmrs.org/code-system/encounter-type", Wa = "problem-list-item", wy = "http://terminology.hl7.org/CodeSystem/condition-ver-status", Ja = "encounter-diagnosis", Ey = "http://terminology.hl7.org/CodeSystem/condition-clinical", by = "http://terminology.hl7.org/CodeSystem/condition-category", _y = "http://fhir.bahmni.org/ext/lab-order-concept-type", Sy = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", Ry = "http://fhir.bahmni.org/ext/observation/form-namespace-path", Ty = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", Oy = "Numeric", Ay = "Complex", Ny = "final", $y = "Observation", Py = /^\d{4}-\d{2}-\d{2}/, Xf = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, Iy = {
6052
+ const by = "http://fhir.openmrs.org/code-system/encounter-type", Wa = "problem-list-item", _y = "http://terminology.hl7.org/CodeSystem/condition-ver-status", Ja = "encounter-diagnosis", Sy = "http://terminology.hl7.org/CodeSystem/condition-clinical", Ry = "http://terminology.hl7.org/CodeSystem/condition-category", Ty = "http://fhir.bahmni.org/ext/lab-order-concept-type", Oy = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", Ay = "http://fhir.bahmni.org/ext/observation/form-namespace-path", Ny = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", $y = "Numeric", Py = "Complex", Iy = "final", Dy = "Observation", Cy = /^\d{4}-\d{2}-\d{2}/, Xf = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, Ly = {
6053
6053
  ABNORMAL: { code: "A", display: "Abnormal" },
6054
6054
  NORMAL: { code: "N", display: "Normal" }
6055
6055
  }, Zf = (e) => ce + `/Condition?category=${Wa}&patient=${e}&_count=100&_sort=-_lastUpdated`, ep = (e, t = 10, r = 0) => ce + `/Condition?category=${Wa}&patient=${e}&_count=${t}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
6056
6056
  async function tp(e) {
6057
6057
  return await V(`${Zf(e)}`);
6058
6058
  }
6059
- async function Cy(e) {
6059
+ async function ky(e) {
6060
6060
  return (await tp(e)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
6061
6061
  }
6062
- async function Dy(e, t = 10, r = 1) {
6062
+ async function xy(e, t = 10, r = 1) {
6063
6063
  const n = (r - 1) * t, s = await V(
6064
6064
  ep(e, t, n)
6065
6065
  );
@@ -6125,11 +6125,11 @@ function lp(e) {
6125
6125
  }
6126
6126
  return Array.from(t.values());
6127
6127
  }
6128
- async function Ly(e) {
6128
+ async function Uy(e) {
6129
6129
  const t = await ap(e), r = Qa(t);
6130
6130
  return lp(r);
6131
6131
  }
6132
- async function ky(e, t = 10, r = 1) {
6132
+ async function qy(e, t = 10, r = 1) {
6133
6133
  const n = (r - 1) * t, s = await ip(
6134
6134
  e,
6135
6135
  t,
@@ -6155,7 +6155,7 @@ const bt = {
6155
6155
  }, fp = (e, t, r) => {
6156
6156
  let s = `${ce + "/MedicationRequest?" + bt.SORT + "&" + bt.COUNT + "&" + bt.INCLUDE_MEDICATION}&patient=${e}`;
6157
6157
  return t && (s += `&code=${t}`), r && (s += `&encounter=${r}`), s;
6158
- }, pp = Z + "/bahmnicore/config/drugOrders", hp = (e, t) => ce + `/Medication?name=${encodeURIComponent(e)}&_count=${t}&_sort=-_lastUpdated`, mp = ce + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", gp = (e) => {
6158
+ }, pp = X + "/bahmnicore/config/drugOrders", hp = (e, t) => ce + `/Medication?name=${encodeURIComponent(e)}&_count=${t}&_sort=-_lastUpdated`, mp = ce + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", gp = (e) => {
6159
6159
  switch (e.status) {
6160
6160
  case "active":
6161
6161
  return ke.Active;
@@ -6303,7 +6303,7 @@ function Np(e) {
6303
6303
  });
6304
6304
  }
6305
6305
  const Hs = (e) => e.priority === "stat" || e.dosageInstruction?.[0]?.timing?.code?.text === "Immediately" || !1;
6306
- async function xy(e, t, r, n = !1) {
6306
+ async function My(e, t, r, n = !1) {
6307
6307
  const s = await yp(
6308
6308
  e,
6309
6309
  t,
@@ -6312,17 +6312,17 @@ async function xy(e, t, r, n = !1) {
6312
6312
  );
6313
6313
  return Np(s);
6314
6314
  }
6315
- async function Uy() {
6315
+ async function Fy() {
6316
6316
  return await V(
6317
6317
  pp
6318
6318
  );
6319
6319
  }
6320
- async function qy(e, t = 20) {
6320
+ async function jy(e, t = 20) {
6321
6321
  return await V(
6322
6322
  hp(e, t)
6323
6323
  );
6324
6324
  }
6325
- async function My() {
6325
+ async function Vy() {
6326
6326
  return await V(mp);
6327
6327
  }
6328
6328
  const $p = 200, Pp = (e, t, r, n, s) => {
@@ -6355,7 +6355,7 @@ async function Pt(e, t, r, n, s) {
6355
6355
  );
6356
6356
  return a.entry && (a.entry = Ip(a.entry), a.total = a.entry.length), a;
6357
6357
  }
6358
- async function jy(e, t, r, n) {
6358
+ async function Hy(e, t, r, n) {
6359
6359
  return await Pt(
6360
6360
  t,
6361
6361
  e,
@@ -6363,7 +6363,7 @@ async function jy(e, t, r, n) {
6363
6363
  n
6364
6364
  );
6365
6365
  }
6366
- async function Fy(e, t, r, n) {
6366
+ async function By(e, t, r, n) {
6367
6367
  return await Pt(
6368
6368
  t,
6369
6369
  e,
@@ -6372,7 +6372,7 @@ async function Fy(e, t, r, n) {
6372
6372
  "ImagingStudy:basedon"
6373
6373
  );
6374
6374
  }
6375
- async function Vy(e, t, r, n) {
6375
+ async function zy(e, t, r, n) {
6376
6376
  return (await Pt(
6377
6377
  t,
6378
6378
  e,
@@ -6380,7 +6380,7 @@ async function Vy(e, t, r, n) {
6380
6380
  n
6381
6381
  )).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
6382
6382
  }
6383
- async function Hy(e, t, r, n) {
6383
+ async function Gy(e, t, r, n) {
6384
6384
  return await Pt(
6385
6385
  t,
6386
6386
  e,
@@ -6388,36 +6388,36 @@ async function Hy(e, t, r, n) {
6388
6388
  n
6389
6389
  );
6390
6390
  }
6391
- const Cp = (e, t) => {
6391
+ const Dp = (e, t) => {
6392
6392
  const r = `${ce}/DiagnosticReport?patient=${e}`;
6393
6393
  return t ? `${r}&based-on=${t}` : r;
6394
- }, Dp = (e) => `${ce}/DiagnosticReport/${e}/$fetch-bundle`, Lp = (e) => `${ce}/DiagnosticReport/${e}/$update-bundle`;
6395
- async function By(e, t = []) {
6396
- const r = t.length > 0 ? t.join(",") : void 0, n = Cp(e, r);
6394
+ }, Cp = (e) => `${ce}/DiagnosticReport/${e}/$fetch-bundle`, Lp = (e) => `${ce}/DiagnosticReport/${e}/$update-bundle`;
6395
+ async function Ky(e, t = []) {
6396
+ const r = t.length > 0 ? t.join(",") : void 0, n = Dp(e, r);
6397
6397
  return await V(n);
6398
6398
  }
6399
- async function zy(e) {
6400
- const t = Dp(e);
6399
+ async function Yy(e) {
6400
+ const t = Cp(e);
6401
6401
  return await V(t);
6402
6402
  }
6403
- async function Gy(e, t) {
6403
+ async function Wy(e, t) {
6404
6404
  const r = Lp(e);
6405
- return await Me(r, t);
6405
+ return await xe(r, t);
6406
6406
  }
6407
- const Ky = [
6407
+ const Jy = [
6408
6408
  "preliminary",
6409
6409
  "final",
6410
6410
  "amended",
6411
6411
  "corrected",
6412
6412
  "appended"
6413
- ], Yy = [
6413
+ ], Qy = [
6414
6414
  "registered",
6415
6415
  "unknown",
6416
6416
  "partial"
6417
- ], kp = "All Orderables", xp = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", Up = "LabSet", qp = "http://fhir.bahmni.org/ext/ValueSet/concept-class", Wy = ["orderTypes"], Mp = async () => await Ff(kp), zn = async () => await V(xp), jp = (e) => {
6417
+ ], kp = "All Orderables", xp = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", Up = "LabSet", qp = "http://fhir.bahmni.org/ext/ValueSet/concept-class", Xy = ["orderTypes"], Mp = async () => await jf(kp), zn = async () => await V(xp), Fp = (e) => {
6418
6418
  let t = e.display ?? "Unknown investigation";
6419
6419
  return Xa(e) === Up && (t += ` (${le.t("INVESTIGATION_PANEL")})`), t;
6420
- }, Fp = (e) => {
6420
+ }, jp = (e) => {
6421
6421
  const t = /* @__PURE__ */ new Map();
6422
6422
  return e.results.forEach((r) => {
6423
6423
  r.conceptClasses.forEach((n) => {
@@ -6439,19 +6439,19 @@ const Ky = [
6439
6439
  return;
6440
6440
  r.filter((d) => d.code === o.code && d.categoryCode === i.uuid).length > 0 || r.push({
6441
6441
  code: o.code ?? "",
6442
- display: jp(o),
6442
+ display: Fp(o),
6443
6443
  category: i.display,
6444
6444
  categoryCode: i.uuid
6445
6445
  });
6446
6446
  });
6447
6447
  });
6448
6448
  }), r;
6449
- }, Jy = async () => {
6449
+ }, Zy = async () => {
6450
6450
  const e = await Mp(), t = await zn();
6451
- return Vp(e, Fp(t));
6452
- }, Qy = async (e) => e ? (await zn()).results.find(
6451
+ return Vp(e, jp(t));
6452
+ }, ev = async (e) => e ? (await zn()).results.find(
6453
6453
  (n) => n.display.toLowerCase() === e.toLowerCase()
6454
- )?.uuid : void 0, Xy = async () => (await zn()).results.map((t) => t.display), Zy = async (e, t, r) => {
6454
+ )?.uuid : void 0, tv = async () => (await zn()).results.map((t) => t.display), rv = async (e, t, r) => {
6455
6455
  const n = [];
6456
6456
  for (const s of e) {
6457
6457
  const o = s.uuid;
@@ -6474,7 +6474,7 @@ const Ky = [
6474
6474
  function Hp(e) {
6475
6475
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6476
6476
  }
6477
- var Lt = { exports: {} }, un = {}, Ce = {}, Fe = {}, ln = {}, dn = {}, fn = {}, Bs;
6477
+ var Lt = { exports: {} }, un = {}, De = {}, je = {}, ln = {}, dn = {}, fn = {}, Bs;
6478
6478
  function Pr() {
6479
6479
  return Bs || (Bs = 1, (function(e) {
6480
6480
  Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
@@ -6721,7 +6721,7 @@ function Gs() {
6721
6721
  })(pn)), pn;
6722
6722
  }
6723
6723
  var Ks;
6724
- function X() {
6724
+ function Z() {
6725
6725
  return Ks || (Ks = 1, (function(e) {
6726
6726
  Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
6727
6727
  const t = Pr(), r = Gs();
@@ -6773,12 +6773,12 @@ function X() {
6773
6773
  }
6774
6774
  }
6775
6775
  class a extends o {
6776
- constructor(w, T, C) {
6777
- super(), this.varKind = w, this.name = T, this.rhs = C;
6776
+ constructor(w, T, D) {
6777
+ super(), this.varKind = w, this.name = T, this.rhs = D;
6778
6778
  }
6779
6779
  render({ es5: w, _n: T }) {
6780
- const C = w ? r.varKinds.var : this.varKind, F = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
6781
- return `${C} ${this.name}${F};` + T;
6780
+ const D = w ? r.varKinds.var : this.varKind, j = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
6781
+ return `${D} ${this.name}${j};` + T;
6782
6782
  }
6783
6783
  optimizeNames(w, T) {
6784
6784
  if (w[this.name.str])
@@ -6789,8 +6789,8 @@ function X() {
6789
6789
  }
6790
6790
  }
6791
6791
  class i extends o {
6792
- constructor(w, T, C) {
6793
- super(), this.lhs = w, this.rhs = T, this.sideEffects = C;
6792
+ constructor(w, T, D) {
6793
+ super(), this.lhs = w, this.rhs = T, this.sideEffects = D;
6794
6794
  }
6795
6795
  render({ _n: w }) {
6796
6796
  return `${this.lhs} = ${this.rhs};` + w;
@@ -6805,8 +6805,8 @@ function X() {
6805
6805
  }
6806
6806
  }
6807
6807
  class c extends i {
6808
- constructor(w, T, C, F) {
6809
- super(w, C, F), this.op = T;
6808
+ constructor(w, T, D, j) {
6809
+ super(w, D, j), this.op = T;
6810
6810
  }
6811
6811
  render({ _n: w }) {
6812
6812
  return `${this.lhs} ${this.op}= ${this.rhs};` + w;
@@ -6861,28 +6861,28 @@ function X() {
6861
6861
  super(), this.nodes = w;
6862
6862
  }
6863
6863
  render(w) {
6864
- return this.nodes.reduce((T, C) => T + C.render(w), "");
6864
+ return this.nodes.reduce((T, D) => T + D.render(w), "");
6865
6865
  }
6866
6866
  optimizeNodes() {
6867
6867
  const { nodes: w } = this;
6868
6868
  let T = w.length;
6869
6869
  for (; T--; ) {
6870
- const C = w[T].optimizeNodes();
6871
- Array.isArray(C) ? w.splice(T, 1, ...C) : C ? w[T] = C : w.splice(T, 1);
6870
+ const D = w[T].optimizeNodes();
6871
+ Array.isArray(D) ? w.splice(T, 1, ...D) : D ? w[T] = D : w.splice(T, 1);
6872
6872
  }
6873
6873
  return w.length > 0 ? this : void 0;
6874
6874
  }
6875
6875
  optimizeNames(w, T) {
6876
- const { nodes: C } = this;
6877
- let F = C.length;
6878
- for (; F--; ) {
6879
- const z = C[F];
6880
- z.optimizeNames(w, T) || (re(w, z.names), C.splice(F, 1));
6876
+ const { nodes: D } = this;
6877
+ let j = D.length;
6878
+ for (; j--; ) {
6879
+ const z = D[j];
6880
+ z.optimizeNames(w, T) || (re(w, z.names), D.splice(j, 1));
6881
6881
  }
6882
- return C.length > 0 ? this : void 0;
6882
+ return D.length > 0 ? this : void 0;
6883
6883
  }
6884
6884
  get names() {
6885
- return this.nodes.reduce((w, T) => j(w, T.names), {});
6885
+ return this.nodes.reduce((w, T) => F(w, T.names), {});
6886
6886
  }
6887
6887
  }
6888
6888
  class y extends S {
@@ -6910,8 +6910,8 @@ function X() {
6910
6910
  return this.nodes;
6911
6911
  let T = this.else;
6912
6912
  if (T) {
6913
- const C = T.optimizeNodes();
6914
- T = this.else = Array.isArray(C) ? new f(C) : C;
6913
+ const D = T.optimizeNodes();
6914
+ T = this.else = Array.isArray(D) ? new f(D) : D;
6915
6915
  }
6916
6916
  if (T)
6917
6917
  return w === !1 ? T instanceof p ? T : T.nodes : this.nodes.length ? this : new p(ne(w), T instanceof p ? [T] : T.nodes);
@@ -6919,13 +6919,13 @@ function X() {
6919
6919
  return this;
6920
6920
  }
6921
6921
  optimizeNames(w, T) {
6922
- var C;
6923
- if (this.else = (C = this.else) === null || C === void 0 ? void 0 : C.optimizeNames(w, T), !!(super.optimizeNames(w, T) || this.else))
6922
+ var D;
6923
+ if (this.else = (D = this.else) === null || D === void 0 ? void 0 : D.optimizeNames(w, T), !!(super.optimizeNames(w, T) || this.else))
6924
6924
  return this.condition = G(this.condition, w, T), this;
6925
6925
  }
6926
6926
  get names() {
6927
6927
  const w = super.names;
6928
- return H(w, this.condition), this.else && j(w, this.else.names), w;
6928
+ return H(w, this.condition), this.else && F(w, this.else.names), w;
6929
6929
  }
6930
6930
  }
6931
6931
  p.kind = "if";
@@ -6944,16 +6944,16 @@ function X() {
6944
6944
  return this.iteration = G(this.iteration, w, T), this;
6945
6945
  }
6946
6946
  get names() {
6947
- return j(super.names, this.iteration.names);
6947
+ return F(super.names, this.iteration.names);
6948
6948
  }
6949
6949
  }
6950
6950
  class E extends u {
6951
- constructor(w, T, C, F) {
6952
- super(), this.varKind = w, this.name = T, this.from = C, this.to = F;
6951
+ constructor(w, T, D, j) {
6952
+ super(), this.varKind = w, this.name = T, this.from = D, this.to = j;
6953
6953
  }
6954
6954
  render(w) {
6955
- const T = w.es5 ? r.varKinds.var : this.varKind, { name: C, from: F, to: z } = this;
6956
- return `for(${T} ${C}=${F}; ${C}<${z}; ${C}++)` + super.render(w);
6955
+ const T = w.es5 ? r.varKinds.var : this.varKind, { name: D, from: j, to: z } = this;
6956
+ return `for(${T} ${D}=${j}; ${D}<${z}; ${D}++)` + super.render(w);
6957
6957
  }
6958
6958
  get names() {
6959
6959
  const w = H(super.names, this.from);
@@ -6961,8 +6961,8 @@ function X() {
6961
6961
  }
6962
6962
  }
6963
6963
  class _ extends u {
6964
- constructor(w, T, C, F) {
6965
- super(), this.loop = w, this.varKind = T, this.name = C, this.iterable = F;
6964
+ constructor(w, T, D, j) {
6965
+ super(), this.loop = w, this.varKind = T, this.name = D, this.iterable = j;
6966
6966
  }
6967
6967
  render(w) {
6968
6968
  return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(w);
@@ -6972,12 +6972,12 @@ function X() {
6972
6972
  return this.iterable = G(this.iterable, w, T), this;
6973
6973
  }
6974
6974
  get names() {
6975
- return j(super.names, this.iterable.names);
6975
+ return F(super.names, this.iterable.names);
6976
6976
  }
6977
6977
  }
6978
6978
  class b extends y {
6979
- constructor(w, T, C) {
6980
- super(), this.name = w, this.args = T, this.async = C;
6979
+ constructor(w, T, D) {
6980
+ super(), this.name = w, this.args = T, this.async = D;
6981
6981
  }
6982
6982
  render(w) {
6983
6983
  return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(w);
@@ -7000,12 +7000,12 @@ function X() {
7000
7000
  return super.optimizeNodes(), (w = this.catch) === null || w === void 0 || w.optimizeNodes(), (T = this.finally) === null || T === void 0 || T.optimizeNodes(), this;
7001
7001
  }
7002
7002
  optimizeNames(w, T) {
7003
- var C, F;
7004
- return super.optimizeNames(w, T), (C = this.catch) === null || C === void 0 || C.optimizeNames(w, T), (F = this.finally) === null || F === void 0 || F.optimizeNames(w, T), this;
7003
+ var D, j;
7004
+ return super.optimizeNames(w, T), (D = this.catch) === null || D === void 0 || D.optimizeNames(w, T), (j = this.finally) === null || j === void 0 || j.optimizeNames(w, T), this;
7005
7005
  }
7006
7006
  get names() {
7007
7007
  const w = super.names;
7008
- return this.catch && j(w, this.catch.names), this.finally && j(w, this.finally.names), w;
7008
+ return this.catch && F(w, this.catch.names), this.finally && F(w, this.finally.names), w;
7009
7009
  }
7010
7010
  }
7011
7011
  class k extends y {
@@ -7041,8 +7041,8 @@ function X() {
7041
7041
  }
7042
7042
  // reserves unique name in the external scope and assigns value to it
7043
7043
  scopeValue(w, T) {
7044
- const C = this._extScope.value(w, T);
7045
- return (this._values[C.prefix] || (this._values[C.prefix] = /* @__PURE__ */ new Set())).add(C), C;
7044
+ const D = this._extScope.value(w, T);
7045
+ return (this._values[D.prefix] || (this._values[D.prefix] = /* @__PURE__ */ new Set())).add(D), D;
7046
7046
  }
7047
7047
  getScopeValue(w, T) {
7048
7048
  return this._extScope.getValue(w, T);
@@ -7055,25 +7055,25 @@ function X() {
7055
7055
  scopeCode() {
7056
7056
  return this._extScope.scopeCode(this._values);
7057
7057
  }
7058
- _def(w, T, C, F) {
7058
+ _def(w, T, D, j) {
7059
7059
  const z = this._scope.toName(T);
7060
- return C !== void 0 && F && (this._constants[z.str] = C), this._leafNode(new a(w, z, C)), z;
7060
+ return D !== void 0 && j && (this._constants[z.str] = D), this._leafNode(new a(w, z, D)), z;
7061
7061
  }
7062
7062
  // `const` declaration (`var` in es5 mode)
7063
- const(w, T, C) {
7064
- return this._def(r.varKinds.const, w, T, C);
7063
+ const(w, T, D) {
7064
+ return this._def(r.varKinds.const, w, T, D);
7065
7065
  }
7066
7066
  // `let` declaration with optional assignment (`var` in es5 mode)
7067
- let(w, T, C) {
7068
- return this._def(r.varKinds.let, w, T, C);
7067
+ let(w, T, D) {
7068
+ return this._def(r.varKinds.let, w, T, D);
7069
7069
  }
7070
7070
  // `var` declaration with optional assignment
7071
- var(w, T, C) {
7072
- return this._def(r.varKinds.var, w, T, C);
7071
+ var(w, T, D) {
7072
+ return this._def(r.varKinds.var, w, T, D);
7073
7073
  }
7074
7074
  // assignment code
7075
- assign(w, T, C) {
7076
- return this._leafNode(new i(w, T, C));
7075
+ assign(w, T, D) {
7076
+ return this._leafNode(new i(w, T, D));
7077
7077
  }
7078
7078
  // `+=` code
7079
7079
  add(w, T) {
@@ -7086,17 +7086,17 @@ function X() {
7086
7086
  // returns code for object literal for the passed argument list of key-value pairs
7087
7087
  object(...w) {
7088
7088
  const T = ["{"];
7089
- for (const [C, F] of w)
7090
- T.length > 1 && T.push(","), T.push(C), (C !== F || this.opts.es5) && (T.push(":"), (0, t.addCodeArg)(T, F));
7089
+ for (const [D, j] of w)
7090
+ T.length > 1 && T.push(","), T.push(D), (D !== j || this.opts.es5) && (T.push(":"), (0, t.addCodeArg)(T, j));
7091
7091
  return T.push("}"), new t._Code(T);
7092
7092
  }
7093
7093
  // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
7094
- if(w, T, C) {
7095
- if (this._blockNode(new p(w)), T && C)
7096
- this.code(T).else().code(C).endIf();
7094
+ if(w, T, D) {
7095
+ if (this._blockNode(new p(w)), T && D)
7096
+ this.code(T).else().code(D).endIf();
7097
7097
  else if (T)
7098
7098
  this.code(T).endIf();
7099
- else if (C)
7099
+ else if (D)
7100
7100
  throw new Error('CodeGen: "else" body without "then" body');
7101
7101
  return this;
7102
7102
  }
@@ -7120,28 +7120,28 @@ function X() {
7120
7120
  return this._for(new h(w), T);
7121
7121
  }
7122
7122
  // `for` statement for a range of values
7123
- forRange(w, T, C, F, z = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
7123
+ forRange(w, T, D, j, z = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
7124
7124
  const se = this._scope.toName(w);
7125
- return this._for(new E(z, se, T, C), () => F(se));
7125
+ return this._for(new E(z, se, T, D), () => j(se));
7126
7126
  }
7127
7127
  // `for-of` statement (in es5 mode replace with a normal for loop)
7128
- forOf(w, T, C, F = r.varKinds.const) {
7128
+ forOf(w, T, D, j = r.varKinds.const) {
7129
7129
  const z = this._scope.toName(w);
7130
7130
  if (this.opts.es5) {
7131
7131
  const se = T instanceof t.Name ? T : this.var("_arr", T);
7132
7132
  return this.forRange("_i", 0, (0, t._)`${se}.length`, (ee) => {
7133
- this.var(z, (0, t._)`${se}[${ee}]`), C(z);
7133
+ this.var(z, (0, t._)`${se}[${ee}]`), D(z);
7134
7134
  });
7135
7135
  }
7136
- return this._for(new _("of", F, z, T), () => C(z));
7136
+ return this._for(new _("of", j, z, T), () => D(z));
7137
7137
  }
7138
7138
  // `for-in` statement.
7139
7139
  // With option `ownProperties` replaced with a `for-of` loop for object keys
7140
- forIn(w, T, C, F = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
7140
+ forIn(w, T, D, j = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
7141
7141
  if (this.opts.ownProperties)
7142
- return this.forOf(w, (0, t._)`Object.keys(${T})`, C);
7142
+ return this.forOf(w, (0, t._)`Object.keys(${T})`, D);
7143
7143
  const z = this._scope.toName(w);
7144
- return this._for(new _("in", F, z, T), () => C(z));
7144
+ return this._for(new _("in", j, z, T), () => D(z));
7145
7145
  }
7146
7146
  // end `for` loop
7147
7147
  endFor() {
@@ -7163,15 +7163,15 @@ function X() {
7163
7163
  return this._endBlockNode(R);
7164
7164
  }
7165
7165
  // `try` statement
7166
- try(w, T, C) {
7167
- if (!T && !C)
7166
+ try(w, T, D) {
7167
+ if (!T && !D)
7168
7168
  throw new Error('CodeGen: "try" without "catch" and "finally"');
7169
- const F = new N();
7170
- if (this._blockNode(F), this.code(w), T) {
7169
+ const j = new N();
7170
+ if (this._blockNode(j), this.code(w), T) {
7171
7171
  const z = this.name("e");
7172
- this._currNode = F.catch = new k(z), T(z);
7172
+ this._currNode = j.catch = new k(z), T(z);
7173
7173
  }
7174
- return C && (this._currNode = F.finally = new M(), this.code(C)), this._endBlockNode(k, M);
7174
+ return D && (this._currNode = j.finally = new M(), this.code(D)), this._endBlockNode(k, M);
7175
7175
  }
7176
7176
  // `throw` statement
7177
7177
  throw(w) {
@@ -7186,14 +7186,14 @@ function X() {
7186
7186
  const T = this._blockStarts.pop();
7187
7187
  if (T === void 0)
7188
7188
  throw new Error("CodeGen: not in self-balancing block");
7189
- const C = this._nodes.length - T;
7190
- if (C < 0 || w !== void 0 && C !== w)
7191
- throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${w} expected`);
7189
+ const D = this._nodes.length - T;
7190
+ if (D < 0 || w !== void 0 && D !== w)
7191
+ throw new Error(`CodeGen: wrong number of nodes: ${D} vs ${w} expected`);
7192
7192
  return this._nodes.length = T, this;
7193
7193
  }
7194
7194
  // `function` heading (or definition if funcBody is passed)
7195
- func(w, T = t.nil, C, F) {
7196
- return this._blockNode(new b(w, T, C)), F && this.code(F).endFunc(), this;
7195
+ func(w, T = t.nil, D, j) {
7196
+ return this._blockNode(new b(w, T, D)), j && this.code(j).endFunc(), this;
7197
7197
  }
7198
7198
  // end function definition
7199
7199
  endFunc() {
@@ -7210,8 +7210,8 @@ function X() {
7210
7210
  this._currNode.nodes.push(w), this._nodes.push(w);
7211
7211
  }
7212
7212
  _endBlockNode(w, T) {
7213
- const C = this._currNode;
7214
- if (C instanceof w || T && C instanceof T)
7213
+ const D = this._currNode;
7214
+ if (D instanceof w || T && D instanceof T)
7215
7215
  return this._nodes.pop(), this;
7216
7216
  throw new Error(`CodeGen: not in block "${T ? `${w.kind}/${T.kind}` : w.kind}"`);
7217
7217
  }
@@ -7234,25 +7234,25 @@ function X() {
7234
7234
  }
7235
7235
  }
7236
7236
  e.CodeGen = q;
7237
- function j(P, w) {
7237
+ function F(P, w) {
7238
7238
  for (const T in w)
7239
7239
  P[T] = (P[T] || 0) + (w[T] || 0);
7240
7240
  return P;
7241
7241
  }
7242
7242
  function H(P, w) {
7243
- return w instanceof t._CodeOrName ? j(P, w.names) : P;
7243
+ return w instanceof t._CodeOrName ? F(P, w.names) : P;
7244
7244
  }
7245
7245
  function G(P, w, T) {
7246
7246
  if (P instanceof t.Name)
7247
- return C(P);
7248
- if (!F(P))
7247
+ return D(P);
7248
+ if (!j(P))
7249
7249
  return P;
7250
- return new t._Code(P._items.reduce((z, se) => (se instanceof t.Name && (se = C(se)), se instanceof t._Code ? z.push(...se._items) : z.push(se), z), []));
7251
- function C(z) {
7250
+ return new t._Code(P._items.reduce((z, se) => (se instanceof t.Name && (se = D(se)), se instanceof t._Code ? z.push(...se._items) : z.push(se), z), []));
7251
+ function D(z) {
7252
7252
  const se = T[z.str];
7253
7253
  return se === void 0 || w[z.str] !== 1 ? z : (delete w[z.str], se);
7254
7254
  }
7255
- function F(z) {
7255
+ function j(z) {
7256
7256
  return z instanceof t._Code && z._items.some((se) => se instanceof t.Name && w[se.str] === 1 && T[se.str] !== void 0);
7257
7257
  }
7258
7258
  }
@@ -7261,7 +7261,7 @@ function X() {
7261
7261
  P[T] = (P[T] || 0) - (w[T] || 0);
7262
7262
  }
7263
7263
  function ne(P) {
7264
- return typeof P == "boolean" || typeof P == "number" || P === null ? !P : (0, t._)`!${D(P)}`;
7264
+ return typeof P == "boolean" || typeof P == "number" || P === null ? !P : (0, t._)`!${C(P)}`;
7265
7265
  }
7266
7266
  e.not = ne;
7267
7267
  const fe = A(e.operators.AND);
@@ -7275,9 +7275,9 @@ function X() {
7275
7275
  }
7276
7276
  e.or = x;
7277
7277
  function A(P) {
7278
- return (w, T) => w === t.nil ? T : T === t.nil ? w : (0, t._)`${D(w)} ${P} ${D(T)}`;
7278
+ return (w, T) => w === t.nil ? T : T === t.nil ? w : (0, t._)`${C(w)} ${P} ${C(T)}`;
7279
7279
  }
7280
- function D(P) {
7280
+ function C(P) {
7281
7281
  return P instanceof t.Name ? P : (0, t._)`(${P})`;
7282
7282
  }
7283
7283
  })(dn)), dn;
@@ -7286,7 +7286,7 @@ var W = {}, Ys;
7286
7286
  function te() {
7287
7287
  if (Ys) return W;
7288
7288
  Ys = 1, Object.defineProperty(W, "__esModule", { value: !0 }), W.checkStrictMode = W.getErrorPath = W.Type = W.useFunc = W.setEvaluated = W.evaluatedPropsToName = W.mergeEvaluated = W.eachItem = W.unescapeJsonPointer = W.escapeJsonPointer = W.escapeFragment = W.unescapeFragment = W.schemaRefOrVal = W.schemaHasRulesButRef = W.schemaHasRules = W.checkUnknownRules = W.alwaysValidSchema = W.toHash = void 0;
7289
- const e = X(), t = Pr();
7289
+ const e = Z(), t = Pr();
7290
7290
  function r(_) {
7291
7291
  const b = {};
7292
7292
  for (const R of _)
@@ -7360,9 +7360,9 @@ function te() {
7360
7360
  }
7361
7361
  W.eachItem = v;
7362
7362
  function S({ mergeNames: _, mergeToName: b, mergeValues: R, resultToName: N }) {
7363
- return (k, M, q, j) => {
7363
+ return (k, M, q, F) => {
7364
7364
  const H = q === void 0 ? M : q instanceof e.Name ? (M instanceof e.Name ? _(k, M, q) : b(k, M, q), q) : M instanceof e.Name ? (b(k, q, M), M) : R(M, q);
7365
- return j === e.Name && !(H instanceof e.Name) ? N(k, H) : H;
7365
+ return F === e.Name && !(H instanceof e.Name) ? N(k, H) : H;
7366
7366
  };
7367
7367
  }
7368
7368
  W.mergeEvaluated = {
@@ -7424,10 +7424,10 @@ function te() {
7424
7424
  return W.checkStrictMode = E, W;
7425
7425
  }
7426
7426
  var kt = {}, Ws;
7427
- function je() {
7427
+ function Fe() {
7428
7428
  if (Ws) return kt;
7429
7429
  Ws = 1, Object.defineProperty(kt, "__esModule", { value: !0 });
7430
- const e = X(), t = {
7430
+ const e = Z(), t = {
7431
7431
  // validation function arguments
7432
7432
  data: new e.Name("data"),
7433
7433
  // data passed to validation function
@@ -7462,7 +7462,7 @@ var Js;
7462
7462
  function Vr() {
7463
7463
  return Js || (Js = 1, (function(e) {
7464
7464
  Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
7465
- const t = X(), r = te(), n = je();
7465
+ const t = Z(), r = te(), n = Fe();
7466
7466
  e.keywordError = {
7467
7467
  message: ({ keyword: f }) => (0, t.str)`must pass "${f}" keyword validation`
7468
7468
  }, e.keyword$DataError = {
@@ -7536,21 +7536,21 @@ function Vr() {
7536
7536
  }
7537
7537
  var Qs;
7538
7538
  function Bp() {
7539
- if (Qs) return Fe;
7540
- Qs = 1, Object.defineProperty(Fe, "__esModule", { value: !0 }), Fe.boolOrEmptySchema = Fe.topBoolOrEmptySchema = void 0;
7541
- const e = Vr(), t = X(), r = je(), n = {
7539
+ if (Qs) return je;
7540
+ Qs = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.boolOrEmptySchema = je.topBoolOrEmptySchema = void 0;
7541
+ const e = Vr(), t = Z(), r = Fe(), n = {
7542
7542
  message: "boolean schema is false"
7543
7543
  };
7544
7544
  function s(i) {
7545
7545
  const { gen: c, schema: d, validateName: l } = i;
7546
7546
  d === !1 ? a(i, !1) : typeof d == "object" && d.$async === !0 ? c.return(r.default.data) : (c.assign((0, t._)`${l}.errors`, null), c.return(!0));
7547
7547
  }
7548
- Fe.topBoolOrEmptySchema = s;
7548
+ je.topBoolOrEmptySchema = s;
7549
7549
  function o(i, c) {
7550
7550
  const { gen: d, schema: l } = i;
7551
7551
  l === !1 ? (d.var(c, !1), a(i)) : d.var(c, !0);
7552
7552
  }
7553
- Fe.boolOrEmptySchema = o;
7553
+ je.boolOrEmptySchema = o;
7554
7554
  function a(i, c) {
7555
7555
  const { gen: d, data: l } = i, m = {
7556
7556
  gen: d,
@@ -7564,7 +7564,7 @@ function Bp() {
7564
7564
  };
7565
7565
  (0, e.reportError)(m, n, void 0, c);
7566
7566
  }
7567
- return Fe;
7567
+ return je;
7568
7568
  }
7569
7569
  var me = {}, Ve = {}, Xs;
7570
7570
  function Za() {
@@ -7592,30 +7592,30 @@ function Za() {
7592
7592
  }
7593
7593
  return Ve.getRules = n, Ve;
7594
7594
  }
7595
- var De = {}, Zs;
7595
+ var Ce = {}, Zs;
7596
7596
  function ei() {
7597
- if (Zs) return De;
7598
- Zs = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.shouldUseRule = De.shouldUseGroup = De.schemaHasRulesForType = void 0;
7597
+ if (Zs) return Ce;
7598
+ Zs = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.shouldUseRule = Ce.shouldUseGroup = Ce.schemaHasRulesForType = void 0;
7599
7599
  function e({ schema: n, self: s }, o) {
7600
7600
  const a = s.RULES.types[o];
7601
7601
  return a && a !== !0 && t(n, a);
7602
7602
  }
7603
- De.schemaHasRulesForType = e;
7603
+ Ce.schemaHasRulesForType = e;
7604
7604
  function t(n, s) {
7605
7605
  return s.rules.some((o) => r(n, o));
7606
7606
  }
7607
- De.shouldUseGroup = t;
7607
+ Ce.shouldUseGroup = t;
7608
7608
  function r(n, s) {
7609
7609
  var o;
7610
7610
  return n[s.keyword] !== void 0 || ((o = s.definition.implements) === null || o === void 0 ? void 0 : o.some((a) => n[a] !== void 0));
7611
7611
  }
7612
- return De.shouldUseRule = r, De;
7612
+ return Ce.shouldUseRule = r, Ce;
7613
7613
  }
7614
7614
  var eo;
7615
7615
  function Ir() {
7616
7616
  if (eo) return me;
7617
7617
  eo = 1, Object.defineProperty(me, "__esModule", { value: !0 }), me.reportTypeError = me.checkDataTypes = me.checkDataType = me.coerceAndCheckDataType = me.getJSONTypes = me.getSchemaTypes = me.DataType = void 0;
7618
- const e = Za(), t = ei(), r = Vr(), n = X(), s = te();
7618
+ const e = Za(), t = ei(), r = Vr(), n = Z(), s = te();
7619
7619
  var o;
7620
7620
  (function(u) {
7621
7621
  u[u.Correct = 0] = "Correct", u[u.Wrong = 1] = "Wrong";
@@ -7763,7 +7763,7 @@ var gt = {}, to;
7763
7763
  function zp() {
7764
7764
  if (to) return gt;
7765
7765
  to = 1, Object.defineProperty(gt, "__esModule", { value: !0 }), gt.assignDefaults = void 0;
7766
- const e = X(), t = te();
7766
+ const e = Z(), t = te();
7767
7767
  function r(s, o) {
7768
7768
  const { properties: a, items: i } = s.schema;
7769
7769
  if (o === "object" && a)
@@ -7790,7 +7790,7 @@ var Ne = {}, oe = {}, ro;
7790
7790
  function Pe() {
7791
7791
  if (ro) return oe;
7792
7792
  ro = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.validateUnion = oe.validateArray = oe.usePattern = oe.callValidateCode = oe.schemaProperties = oe.allSchemaProperties = oe.noPropertyInData = oe.propertyInData = oe.isOwnProperty = oe.hasPropFunc = oe.reportMissingProp = oe.checkMissingProp = oe.checkReportMissingProp = void 0;
7793
- const e = X(), t = te(), r = je(), n = te();
7793
+ const e = Z(), t = te(), r = Fe(), n = te();
7794
7794
  function s(u, h) {
7795
7795
  const { gen: E, data: _, it: b } = u;
7796
7796
  E.if(l(E, _, h, b.opts.ownProperties), () => {
@@ -7837,14 +7837,14 @@ function Pe() {
7837
7837
  }
7838
7838
  oe.schemaProperties = v;
7839
7839
  function S({ schemaCode: u, data: h, it: { gen: E, topSchemaRef: _, schemaPath: b, errorPath: R }, it: N }, k, M, q) {
7840
- const j = q ? (0, e._)`${u}, ${h}, ${_}${b}` : h, H = [
7840
+ const F = q ? (0, e._)`${u}, ${h}, ${_}${b}` : h, H = [
7841
7841
  [r.default.instancePath, (0, e.strConcat)(r.default.instancePath, R)],
7842
7842
  [r.default.parentData, N.parentData],
7843
7843
  [r.default.parentDataProperty, N.parentDataProperty],
7844
7844
  [r.default.rootData, r.default.rootData]
7845
7845
  ];
7846
7846
  N.opts.dynamicRef && H.push([r.default.dynamicAnchors, r.default.dynamicAnchors]);
7847
- const G = (0, e._)`${j}, ${E.object(...H)}`;
7847
+ const G = (0, e._)`${F}, ${E.object(...H)}`;
7848
7848
  return M !== e.nil ? (0, e._)`${k}.call(${M}, ${G})` : (0, e._)`${k}(${G})`;
7849
7849
  }
7850
7850
  oe.callValidateCode = S;
@@ -7885,12 +7885,12 @@ function Pe() {
7885
7885
  return;
7886
7886
  const N = h.let("valid", !1), k = h.name("_valid");
7887
7887
  h.block(() => E.forEach((M, q) => {
7888
- const j = u.subschema({
7888
+ const F = u.subschema({
7889
7889
  keyword: _,
7890
7890
  schemaProp: q,
7891
7891
  compositeRule: !0
7892
7892
  }, k);
7893
- h.assign(N, (0, e._)`${N} || ${k}`), u.mergeValidEvaluated(j, k) || h.if((0, e.not)(N));
7893
+ h.assign(N, (0, e._)`${N} || ${k}`), u.mergeValidEvaluated(F, k) || h.if((0, e.not)(N));
7894
7894
  })), u.result(N, () => u.reset(), () => u.error(!0));
7895
7895
  }
7896
7896
  return oe.validateUnion = p, oe;
@@ -7899,7 +7899,7 @@ var no;
7899
7899
  function Gp() {
7900
7900
  if (no) return Ne;
7901
7901
  no = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.validateKeywordUsage = Ne.validSchemaType = Ne.funcKeywordCode = Ne.macroKeywordCode = void 0;
7902
- const e = X(), t = je(), r = Pe(), n = Vr();
7902
+ const e = Z(), t = Fe(), r = Pe(), n = Vr();
7903
7903
  function s(v, S) {
7904
7904
  const { gen: y, keyword: g, schema: f, parentSchema: p, it: u } = v, h = S.macro.call(u.self, f, p, u), E = d(y, g, h);
7905
7905
  u.opts.validateSchema !== !1 && u.self.validateSchema(h, !0);
@@ -7921,10 +7921,10 @@ function Gp() {
7921
7921
  v.block$data(R, N), v.ok((y = S.valid) !== null && y !== void 0 ? y : R);
7922
7922
  function N() {
7923
7923
  if (S.errors === !1)
7924
- q(), S.modifying && a(v), j(() => v.error());
7924
+ q(), S.modifying && a(v), F(() => v.error());
7925
7925
  else {
7926
7926
  const H = S.async ? k() : M();
7927
- S.modifying && a(v), j(() => i(v, H));
7927
+ S.modifying && a(v), F(() => i(v, H));
7928
7928
  }
7929
7929
  }
7930
7930
  function k() {
@@ -7939,7 +7939,7 @@ function Gp() {
7939
7939
  const G = E.opts.passContext ? t.default.this : t.default.self, re = !("compile" in S && !h || S.schema === !1);
7940
7940
  g.assign(R, (0, e._)`${H}${(0, r.callValidateCode)(v, b, G, re)}`, S.modifying);
7941
7941
  }
7942
- function j(H) {
7942
+ function F(H) {
7943
7943
  var G;
7944
7944
  g.if((0, e.not)((G = S.valid) !== null && G !== void 0 ? G : R), H);
7945
7945
  }
@@ -7988,7 +7988,7 @@ var Le = {}, so;
7988
7988
  function Kp() {
7989
7989
  if (so) return Le;
7990
7990
  so = 1, Object.defineProperty(Le, "__esModule", { value: !0 }), Le.extendSubschemaMode = Le.extendSubschemaData = Le.getSubschema = void 0;
7991
- const e = X(), t = te();
7991
+ const e = Z(), t = te();
7992
7992
  function r(o, { keyword: a, schemaProp: i, schema: c, schemaPath: d, errSchemaPath: l, topSchemaRef: m }) {
7993
7993
  if (a !== void 0 && c !== void 0)
7994
7994
  throw new Error('both "keyword" and "schema" passed, only one allowed');
@@ -8220,7 +8220,7 @@ function Hr() {
8220
8220
  if (typeof g == "boolean")
8221
8221
  return {};
8222
8222
  const { schemaId: p, uriResolver: u } = this.opts, h = m(g[p] || f), E = { "": h }, _ = c(u, h, !1), b = {}, R = /* @__PURE__ */ new Set();
8223
- return r(g, { allKeys: !0 }, (M, q, j, H) => {
8223
+ return r(g, { allKeys: !0 }, (M, q, F, H) => {
8224
8224
  if (H === void 0)
8225
8225
  return;
8226
8226
  const G = _ + q;
@@ -8242,9 +8242,9 @@ function Hr() {
8242
8242
  }
8243
8243
  }
8244
8244
  }), b;
8245
- function N(M, q, j) {
8245
+ function N(M, q, F) {
8246
8246
  if (q !== void 0 && !t(M, q))
8247
- throw k(j);
8247
+ throw k(F);
8248
8248
  }
8249
8249
  function k(M) {
8250
8250
  return new Error(`reference "${M}" resolves to more than one schema`);
@@ -8254,9 +8254,9 @@ function Hr() {
8254
8254
  }
8255
8255
  var co;
8256
8256
  function Br() {
8257
- if (co) return Ce;
8258
- co = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.getData = Ce.KeywordCxt = Ce.validateFunctionCode = void 0;
8259
- const e = Bp(), t = Ir(), r = ei(), n = Ir(), s = zp(), o = Gp(), a = Kp(), i = X(), c = je(), d = Hr(), l = te(), m = Vr();
8257
+ if (co) return De;
8258
+ co = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.getData = De.KeywordCxt = De.validateFunctionCode = void 0;
8259
+ const e = Bp(), t = Ir(), r = ei(), n = Ir(), s = zp(), o = Gp(), a = Kp(), i = Z(), c = Fe(), d = Hr(), l = te(), m = Vr();
8260
8260
  function v(O) {
8261
8261
  if (_(O) && (R(O), E(O))) {
8262
8262
  f(O);
@@ -8264,7 +8264,7 @@ function Br() {
8264
8264
  }
8265
8265
  S(O, () => (0, e.topBoolOrEmptySchema)(O));
8266
8266
  }
8267
- Ce.validateFunctionCode = v;
8267
+ De.validateFunctionCode = v;
8268
8268
  function S({ gen: O, validateName: $, schema: L, schemaEnv: U, opts: B }, Q) {
8269
8269
  B.code.es5 ? O.func($, (0, i._)`${c.default.data}, ${c.default.valCxt}`, U.$async, () => {
8270
8270
  O.code((0, i._)`"use strict"; ${u(L, B)}`), g(O, B), O.code(Q);
@@ -8314,7 +8314,7 @@ function Br() {
8314
8314
  }
8315
8315
  function b(O, $) {
8316
8316
  const { schema: L, gen: U, opts: B } = O;
8317
- B.$comment && L.$comment && H(O), q(O), j(O);
8317
+ B.$comment && L.$comment && H(O), q(O), F(O);
8318
8318
  const Q = U.const("_errs", c.default.errors);
8319
8319
  N(O, Q), U.var($, (0, i._)`${Q} === ${c.default.errors}`);
8320
8320
  }
@@ -8339,7 +8339,7 @@ function Br() {
8339
8339
  const $ = O.schema[O.opts.schemaId];
8340
8340
  $ && (O.baseId = (0, d.resolveUrl)(O.opts.uriResolver, O.baseId, $));
8341
8341
  }
8342
- function j(O) {
8342
+ function F(O) {
8343
8343
  if (O.schema.$async && !O.schemaEnv.$async)
8344
8344
  throw new Error("async schema in sync schema");
8345
8345
  }
@@ -8362,7 +8362,7 @@ function Br() {
8362
8362
  function ne(O, $, L, U) {
8363
8363
  const { gen: B, schema: Q, data: pe, allErrors: Ae, opts: ve, self: we } = O, { RULES: he } = we;
8364
8364
  if (Q.$ref && (ve.ignoreKeywordsWithRef || !(0, l.schemaHasRulesButRef)(Q, he))) {
8365
- B.block(() => F(O, "$ref", he.all.$ref.definition));
8365
+ B.block(() => j(O, "$ref", he.all.$ref.definition));
8366
8366
  return;
8367
8367
  }
8368
8368
  ve.jtd || J(O, $), B.block(() => {
@@ -8378,7 +8378,7 @@ function Br() {
8378
8378
  const { gen: L, schema: U, opts: { useDefaults: B } } = O;
8379
8379
  B && (0, s.assignDefaults)(O, $.type), L.block(() => {
8380
8380
  for (const Q of $.rules)
8381
- (0, r.shouldUseRule)(U, Q) && F(O, Q.keyword, Q.definition, $.type);
8381
+ (0, r.shouldUseRule)(U, Q) && j(O, Q.keyword, Q.definition, $.type);
8382
8382
  });
8383
8383
  }
8384
8384
  function J(O, $) {
@@ -8404,11 +8404,11 @@ function Br() {
8404
8404
  const B = L[U];
8405
8405
  if (typeof B == "object" && (0, r.shouldUseRule)(O.schema, B)) {
8406
8406
  const { type: Q } = B.definition;
8407
- Q.length && !Q.some((pe) => D($, pe)) && T(O, `missing type "${Q.join(",")}" for keyword "${U}"`);
8407
+ Q.length && !Q.some((pe) => C($, pe)) && T(O, `missing type "${Q.join(",")}" for keyword "${U}"`);
8408
8408
  }
8409
8409
  }
8410
8410
  }
8411
- function D(O, $) {
8411
+ function C(O, $) {
8412
8412
  return O.includes($) || $ === "number" && O.includes("integer");
8413
8413
  }
8414
8414
  function P(O, $) {
@@ -8424,7 +8424,7 @@ function Br() {
8424
8424
  const L = O.schemaEnv.baseId + O.errSchemaPath;
8425
8425
  $ += ` at "${L}" (strictTypes)`, (0, l.checkStrictMode)(O, $, O.opts.strictTypes);
8426
8426
  }
8427
- class C {
8427
+ class D {
8428
8428
  constructor($, L, U) {
8429
8429
  if ((0, o.validateKeywordUsage)($, L, U), this.gen = $.gen, this.allErrors = $.allErrors, this.keyword = U, this.data = $.data, this.schema = $.schema[U], this.$data = L.$data && $.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, l.schemaRefOrVal)($, this.schema, U, this.$data), this.schemaType = L.schemaType, this.parentSchema = $.schema, this.params = {}, this.it = $, this.def = L, this.$data)
8430
8430
  this.schemaCode = $.gen.const("vSchema", ee(this.$data, $));
@@ -8525,9 +8525,9 @@ function Br() {
8525
8525
  return B.if(L, () => this.mergeEvaluated($, i.Name)), !0;
8526
8526
  }
8527
8527
  }
8528
- Ce.KeywordCxt = C;
8529
- function F(O, $, L, U) {
8530
- const B = new C(O, L, $);
8528
+ De.KeywordCxt = D;
8529
+ function j(O, $, L, U) {
8530
+ const B = new D(O, L, $);
8531
8531
  "code" in L ? L.code(B, U) : B.$data && L.validate ? (0, o.funcKeywordCode)(B, L) : "macro" in L ? (0, o.macroKeywordCode)(B, L) : (L.compile || L.validate) && (0, o.funcKeywordCode)(B, L);
8532
8532
  }
8533
8533
  const z = /^\/(?:[^~]|~0|~1)*$/, se = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
@@ -8563,7 +8563,7 @@ function Br() {
8563
8563
  return `Cannot access ${we} ${he} levels up, current level is ${$}`;
8564
8564
  }
8565
8565
  }
8566
- return Ce.getData = ee, Ce;
8566
+ return De.getData = ee, De;
8567
8567
  }
8568
8568
  var xt = {}, uo;
8569
8569
  function Gn() {
@@ -8592,7 +8592,7 @@ var _e = {}, fo;
8592
8592
  function Kn() {
8593
8593
  if (fo) return _e;
8594
8594
  fo = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.resolveSchema = _e.getCompilingSchema = _e.resolveRef = _e.compileSchema = _e.SchemaEnv = void 0;
8595
- const e = X(), t = Gn(), r = je(), n = Hr(), s = te(), o = Br();
8595
+ const e = Z(), t = Gn(), r = Fe(), n = Hr(), s = te(), o = Br();
8596
8596
  class a {
8597
8597
  constructor(p) {
8598
8598
  var u;
@@ -9124,7 +9124,7 @@ function ih() {
9124
9124
  Object.defineProperty(e, "KeywordCxt", { enumerable: !0, get: function() {
9125
9125
  return t.KeywordCxt;
9126
9126
  } });
9127
- var r = X();
9127
+ var r = Z();
9128
9128
  Object.defineProperty(e, "_", { enumerable: !0, get: function() {
9129
9129
  return r._;
9130
9130
  } }), Object.defineProperty(e, "str", { enumerable: !0, get: function() {
@@ -9138,7 +9138,7 @@ function ih() {
9138
9138
  } }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
9139
9139
  return r.CodeGen;
9140
9140
  } });
9141
- const n = Gn(), s = zr(), o = Za(), a = Kn(), i = X(), c = Hr(), d = Ir(), l = te(), m = th, v = ah(), S = (x, A) => new RegExp(x, A);
9141
+ const n = Gn(), s = zr(), o = Za(), a = Kn(), i = Z(), c = Hr(), d = Ir(), l = te(), m = th, v = ah(), S = (x, A) => new RegExp(x, A);
9142
9142
  S.code = "new RegExp";
9143
9143
  const y = ["removeAdditional", "useDefaults", "coerceTypes"], g = /* @__PURE__ */ new Set([
9144
9144
  "validate",
@@ -9176,11 +9176,11 @@ function ih() {
9176
9176
  unicode: '"minLength"/"maxLength" account for unicode characters by default.'
9177
9177
  }, u = 200;
9178
9178
  function h(x) {
9179
- var A, D, P, w, T, C, F, z, se, ee, O, $, L, U, B, Q, pe, Ae, ve, we, he, Ye, Se, Gr, Kr;
9180
- const lt = x.strict, Yr = (A = x.code) === null || A === void 0 ? void 0 : A.optimize, Jn = Yr === !0 || Yr === void 0 ? 1 : Yr || 0, Qn = (P = (D = x.code) === null || D === void 0 ? void 0 : D.regExp) !== null && P !== void 0 ? P : S, fi = (w = x.uriResolver) !== null && w !== void 0 ? w : v.default;
9179
+ var A, C, P, w, T, D, j, z, se, ee, O, $, L, U, B, Q, pe, Ae, ve, we, he, Ye, Se, Gr, Kr;
9180
+ const lt = x.strict, Yr = (A = x.code) === null || A === void 0 ? void 0 : A.optimize, Jn = Yr === !0 || Yr === void 0 ? 1 : Yr || 0, Qn = (P = (C = x.code) === null || C === void 0 ? void 0 : C.regExp) !== null && P !== void 0 ? P : S, fi = (w = x.uriResolver) !== null && w !== void 0 ? w : v.default;
9181
9181
  return {
9182
- strictSchema: (C = (T = x.strictSchema) !== null && T !== void 0 ? T : lt) !== null && C !== void 0 ? C : !0,
9183
- strictNumbers: (z = (F = x.strictNumbers) !== null && F !== void 0 ? F : lt) !== null && z !== void 0 ? z : !0,
9182
+ strictSchema: (D = (T = x.strictSchema) !== null && T !== void 0 ? T : lt) !== null && D !== void 0 ? D : !0,
9183
+ strictNumbers: (z = (j = x.strictNumbers) !== null && j !== void 0 ? j : lt) !== null && z !== void 0 ? z : !0,
9184
9184
  strictTypes: (ee = (se = x.strictTypes) !== null && se !== void 0 ? se : lt) !== null && ee !== void 0 ? ee : "log",
9185
9185
  strictTuples: ($ = (O = x.strictTuples) !== null && O !== void 0 ? O : lt) !== null && $ !== void 0 ? $ : "log",
9186
9186
  strictRequired: (U = (L = x.strictRequired) !== null && L !== void 0 ? L : lt) !== null && U !== void 0 ? U : !1,
@@ -9202,8 +9202,8 @@ function ih() {
9202
9202
  class E {
9203
9203
  constructor(A = {}) {
9204
9204
  this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), A = this.opts = { ...A, ...h(A) };
9205
- const { es5: D, lines: P } = this.opts.code;
9206
- this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: D, lines: P }), this.logger = j(A.logger);
9205
+ const { es5: C, lines: P } = this.opts.code;
9206
+ this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: C, lines: P }), this.logger = F(A.logger);
9207
9207
  const w = A.validateFormats;
9208
9208
  A.validateFormats = !1, this.RULES = (0, o.getRules)(), _.call(this, f, A, "NOT SUPPORTED"), _.call(this, p, A, "DEPRECATED", "warn"), this._metaOpts = M.call(this), A.formats && N.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), A.keywords && k.call(this, A.keywords), typeof A.meta == "object" && this.addMetaSchema(A.meta), R.call(this), A.validateFormats = w;
9209
9209
  }
@@ -9211,57 +9211,57 @@ function ih() {
9211
9211
  this.addKeyword("$async");
9212
9212
  }
9213
9213
  _addDefaultMetaSchema() {
9214
- const { $data: A, meta: D, schemaId: P } = this.opts;
9214
+ const { $data: A, meta: C, schemaId: P } = this.opts;
9215
9215
  let w = m;
9216
- P === "id" && (w = { ...m }, w.id = w.$id, delete w.$id), D && A && this.addMetaSchema(w, w[P], !1);
9216
+ P === "id" && (w = { ...m }, w.id = w.$id, delete w.$id), C && A && this.addMetaSchema(w, w[P], !1);
9217
9217
  }
9218
9218
  defaultMeta() {
9219
- const { meta: A, schemaId: D } = this.opts;
9220
- return this.opts.defaultMeta = typeof A == "object" ? A[D] || A : void 0;
9219
+ const { meta: A, schemaId: C } = this.opts;
9220
+ return this.opts.defaultMeta = typeof A == "object" ? A[C] || A : void 0;
9221
9221
  }
9222
- validate(A, D) {
9222
+ validate(A, C) {
9223
9223
  let P;
9224
9224
  if (typeof A == "string") {
9225
9225
  if (P = this.getSchema(A), !P)
9226
9226
  throw new Error(`no schema with key or ref "${A}"`);
9227
9227
  } else
9228
9228
  P = this.compile(A);
9229
- const w = P(D);
9229
+ const w = P(C);
9230
9230
  return "$async" in P || (this.errors = P.errors), w;
9231
9231
  }
9232
- compile(A, D) {
9233
- const P = this._addSchema(A, D);
9232
+ compile(A, C) {
9233
+ const P = this._addSchema(A, C);
9234
9234
  return P.validate || this._compileSchemaEnv(P);
9235
9235
  }
9236
- compileAsync(A, D) {
9236
+ compileAsync(A, C) {
9237
9237
  if (typeof this.opts.loadSchema != "function")
9238
9238
  throw new Error("options.loadSchema should be a function");
9239
9239
  const { loadSchema: P } = this.opts;
9240
- return w.call(this, A, D);
9240
+ return w.call(this, A, C);
9241
9241
  async function w(ee, O) {
9242
9242
  await T.call(this, ee.$schema);
9243
9243
  const $ = this._addSchema(ee, O);
9244
- return $.validate || C.call(this, $);
9244
+ return $.validate || D.call(this, $);
9245
9245
  }
9246
9246
  async function T(ee) {
9247
9247
  ee && !this.getSchema(ee) && await w.call(this, { $ref: ee }, !0);
9248
9248
  }
9249
- async function C(ee) {
9249
+ async function D(ee) {
9250
9250
  try {
9251
9251
  return this._compileSchemaEnv(ee);
9252
9252
  } catch (O) {
9253
9253
  if (!(O instanceof s.default))
9254
9254
  throw O;
9255
- return F.call(this, O), await z.call(this, O.missingSchema), C.call(this, ee);
9255
+ return j.call(this, O), await z.call(this, O.missingSchema), D.call(this, ee);
9256
9256
  }
9257
9257
  }
9258
- function F({ missingSchema: ee, missingRef: O }) {
9258
+ function j({ missingSchema: ee, missingRef: O }) {
9259
9259
  if (this.refs[ee])
9260
9260
  throw new Error(`AnySchema ${ee} is loaded but ${O} cannot be resolved`);
9261
9261
  }
9262
9262
  async function z(ee) {
9263
9263
  const O = await se.call(this, ee);
9264
- this.refs[ee] || await T.call(this, O.$schema), this.refs[ee] || this.addSchema(O, ee, D);
9264
+ this.refs[ee] || await T.call(this, O.$schema), this.refs[ee] || this.addSchema(O, ee, C);
9265
9265
  }
9266
9266
  async function se(ee) {
9267
9267
  const O = this._loading[ee];
@@ -9275,27 +9275,27 @@ function ih() {
9275
9275
  }
9276
9276
  }
9277
9277
  // Adds schema to the instance
9278
- addSchema(A, D, P, w = this.opts.validateSchema) {
9278
+ addSchema(A, C, P, w = this.opts.validateSchema) {
9279
9279
  if (Array.isArray(A)) {
9280
- for (const C of A)
9281
- this.addSchema(C, void 0, P, w);
9280
+ for (const D of A)
9281
+ this.addSchema(D, void 0, P, w);
9282
9282
  return this;
9283
9283
  }
9284
9284
  let T;
9285
9285
  if (typeof A == "object") {
9286
- const { schemaId: C } = this.opts;
9287
- if (T = A[C], T !== void 0 && typeof T != "string")
9288
- throw new Error(`schema ${C} must be string`);
9286
+ const { schemaId: D } = this.opts;
9287
+ if (T = A[D], T !== void 0 && typeof T != "string")
9288
+ throw new Error(`schema ${D} must be string`);
9289
9289
  }
9290
- return D = (0, c.normalizeId)(D || T), this._checkUnique(D), this.schemas[D] = this._addSchema(A, P, D, w, !0), this;
9290
+ return C = (0, c.normalizeId)(C || T), this._checkUnique(C), this.schemas[C] = this._addSchema(A, P, C, w, !0), this;
9291
9291
  }
9292
9292
  // Add schema that will be used to validate other schemas
9293
9293
  // options in META_IGNORE_OPTIONS are alway set to false
9294
- addMetaSchema(A, D, P = this.opts.validateSchema) {
9295
- return this.addSchema(A, D, !0, P), this;
9294
+ addMetaSchema(A, C, P = this.opts.validateSchema) {
9295
+ return this.addSchema(A, C, !0, P), this;
9296
9296
  }
9297
9297
  // Validate schema against its meta-schema
9298
- validateSchema(A, D) {
9298
+ validateSchema(A, C) {
9299
9299
  if (typeof A == "boolean")
9300
9300
  return !0;
9301
9301
  let P;
@@ -9304,7 +9304,7 @@ function ih() {
9304
9304
  if (P = P || this.opts.defaultMeta || this.defaultMeta(), !P)
9305
9305
  return this.logger.warn("meta-schema not available"), this.errors = null, !0;
9306
9306
  const w = this.validate(P, A);
9307
- if (!w && D) {
9307
+ if (!w && C) {
9308
9308
  const T = "schema is invalid: " + this.errorsText();
9309
9309
  if (this.opts.validateSchema === "log")
9310
9310
  this.logger.error(T);
@@ -9316,16 +9316,16 @@ function ih() {
9316
9316
  // Get compiled schema by `key` or `ref`.
9317
9317
  // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
9318
9318
  getSchema(A) {
9319
- let D;
9320
- for (; typeof (D = b.call(this, A)) == "string"; )
9321
- A = D;
9322
- if (D === void 0) {
9319
+ let C;
9320
+ for (; typeof (C = b.call(this, A)) == "string"; )
9321
+ A = C;
9322
+ if (C === void 0) {
9323
9323
  const { schemaId: P } = this.opts, w = new a.SchemaEnv({ schema: {}, schemaId: P });
9324
- if (D = a.resolveSchema.call(this, w, A), !D)
9324
+ if (C = a.resolveSchema.call(this, w, A), !C)
9325
9325
  return;
9326
- this.refs[A] = D;
9326
+ this.refs[A] = C;
9327
9327
  }
9328
- return D.validate || this._compileSchemaEnv(D);
9328
+ return C.validate || this._compileSchemaEnv(C);
9329
9329
  }
9330
9330
  // Remove cached schema(s).
9331
9331
  // If no parameter is passed all schemas but meta-schemas are removed.
@@ -9338,12 +9338,12 @@ function ih() {
9338
9338
  case "undefined":
9339
9339
  return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this;
9340
9340
  case "string": {
9341
- const D = b.call(this, A);
9342
- return typeof D == "object" && this._cache.delete(D.schema), delete this.schemas[A], delete this.refs[A], this;
9341
+ const C = b.call(this, A);
9342
+ return typeof C == "object" && this._cache.delete(C.schema), delete this.schemas[A], delete this.refs[A], this;
9343
9343
  }
9344
9344
  case "object": {
9345
- const D = A;
9346
- this._cache.delete(D);
9345
+ const C = A;
9346
+ this._cache.delete(C);
9347
9347
  let P = A[this.opts.schemaId];
9348
9348
  return P && (P = (0, c.normalizeId)(P), delete this.schemas[P], delete this.refs[P]), this;
9349
9349
  }
@@ -9353,79 +9353,79 @@ function ih() {
9353
9353
  }
9354
9354
  // add "vocabulary" - a collection of keywords
9355
9355
  addVocabulary(A) {
9356
- for (const D of A)
9357
- this.addKeyword(D);
9356
+ for (const C of A)
9357
+ this.addKeyword(C);
9358
9358
  return this;
9359
9359
  }
9360
- addKeyword(A, D) {
9360
+ addKeyword(A, C) {
9361
9361
  let P;
9362
9362
  if (typeof A == "string")
9363
- P = A, typeof D == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), D.keyword = P);
9364
- else if (typeof A == "object" && D === void 0) {
9365
- if (D = A, P = D.keyword, Array.isArray(P) && !P.length)
9363
+ P = A, typeof C == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), C.keyword = P);
9364
+ else if (typeof A == "object" && C === void 0) {
9365
+ if (C = A, P = C.keyword, Array.isArray(P) && !P.length)
9366
9366
  throw new Error("addKeywords: keyword must be string or non-empty array");
9367
9367
  } else
9368
9368
  throw new Error("invalid addKeywords parameters");
9369
- if (G.call(this, P, D), !D)
9369
+ if (G.call(this, P, C), !C)
9370
9370
  return (0, l.eachItem)(P, (T) => re.call(this, T)), this;
9371
- fe.call(this, D);
9371
+ fe.call(this, C);
9372
9372
  const w = {
9373
- ...D,
9374
- type: (0, d.getJSONTypes)(D.type),
9375
- schemaType: (0, d.getJSONTypes)(D.schemaType)
9373
+ ...C,
9374
+ type: (0, d.getJSONTypes)(C.type),
9375
+ schemaType: (0, d.getJSONTypes)(C.schemaType)
9376
9376
  };
9377
- return (0, l.eachItem)(P, w.type.length === 0 ? (T) => re.call(this, T, w) : (T) => w.type.forEach((C) => re.call(this, T, w, C))), this;
9377
+ return (0, l.eachItem)(P, w.type.length === 0 ? (T) => re.call(this, T, w) : (T) => w.type.forEach((D) => re.call(this, T, w, D))), this;
9378
9378
  }
9379
9379
  getKeyword(A) {
9380
- const D = this.RULES.all[A];
9381
- return typeof D == "object" ? D.definition : !!D;
9380
+ const C = this.RULES.all[A];
9381
+ return typeof C == "object" ? C.definition : !!C;
9382
9382
  }
9383
9383
  // Remove keyword
9384
9384
  removeKeyword(A) {
9385
- const { RULES: D } = this;
9386
- delete D.keywords[A], delete D.all[A];
9387
- for (const P of D.rules) {
9385
+ const { RULES: C } = this;
9386
+ delete C.keywords[A], delete C.all[A];
9387
+ for (const P of C.rules) {
9388
9388
  const w = P.rules.findIndex((T) => T.keyword === A);
9389
9389
  w >= 0 && P.rules.splice(w, 1);
9390
9390
  }
9391
9391
  return this;
9392
9392
  }
9393
9393
  // Add format
9394
- addFormat(A, D) {
9395
- return typeof D == "string" && (D = new RegExp(D)), this.formats[A] = D, this;
9394
+ addFormat(A, C) {
9395
+ return typeof C == "string" && (C = new RegExp(C)), this.formats[A] = C, this;
9396
9396
  }
9397
- errorsText(A = this.errors, { separator: D = ", ", dataVar: P = "data" } = {}) {
9398
- return !A || A.length === 0 ? "No errors" : A.map((w) => `${P}${w.instancePath} ${w.message}`).reduce((w, T) => w + D + T);
9397
+ errorsText(A = this.errors, { separator: C = ", ", dataVar: P = "data" } = {}) {
9398
+ return !A || A.length === 0 ? "No errors" : A.map((w) => `${P}${w.instancePath} ${w.message}`).reduce((w, T) => w + C + T);
9399
9399
  }
9400
- $dataMetaSchema(A, D) {
9400
+ $dataMetaSchema(A, C) {
9401
9401
  const P = this.RULES.all;
9402
9402
  A = JSON.parse(JSON.stringify(A));
9403
- for (const w of D) {
9403
+ for (const w of C) {
9404
9404
  const T = w.split("/").slice(1);
9405
- let C = A;
9406
- for (const F of T)
9407
- C = C[F];
9408
- for (const F in P) {
9409
- const z = P[F];
9405
+ let D = A;
9406
+ for (const j of T)
9407
+ D = D[j];
9408
+ for (const j in P) {
9409
+ const z = P[j];
9410
9410
  if (typeof z != "object")
9411
9411
  continue;
9412
- const { $data: se } = z.definition, ee = C[F];
9413
- se && ee && (C[F] = ie(ee));
9412
+ const { $data: se } = z.definition, ee = D[j];
9413
+ se && ee && (D[j] = ie(ee));
9414
9414
  }
9415
9415
  }
9416
9416
  return A;
9417
9417
  }
9418
- _removeAllSchemas(A, D) {
9418
+ _removeAllSchemas(A, C) {
9419
9419
  for (const P in A) {
9420
9420
  const w = A[P];
9421
- (!D || D.test(P)) && (typeof w == "string" ? delete A[P] : w && !w.meta && (this._cache.delete(w.schema), delete A[P]));
9421
+ (!C || C.test(P)) && (typeof w == "string" ? delete A[P] : w && !w.meta && (this._cache.delete(w.schema), delete A[P]));
9422
9422
  }
9423
9423
  }
9424
- _addSchema(A, D, P, w = this.opts.validateSchema, T = this.opts.addUsedSchema) {
9425
- let C;
9426
- const { schemaId: F } = this.opts;
9424
+ _addSchema(A, C, P, w = this.opts.validateSchema, T = this.opts.addUsedSchema) {
9425
+ let D;
9426
+ const { schemaId: j } = this.opts;
9427
9427
  if (typeof A == "object")
9428
- C = A[F];
9428
+ D = A[j];
9429
9429
  else {
9430
9430
  if (this.opts.jtd)
9431
9431
  throw new Error("schema must be object");
@@ -9435,9 +9435,9 @@ function ih() {
9435
9435
  let z = this._cache.get(A);
9436
9436
  if (z !== void 0)
9437
9437
  return z;
9438
- P = (0, c.normalizeId)(C || P);
9438
+ P = (0, c.normalizeId)(D || P);
9439
9439
  const se = c.getSchemaRefs.call(this, A, P);
9440
- return z = new a.SchemaEnv({ schema: A, schemaId: F, meta: D, baseId: P, localRefs: se }), this._cache.set(z.schema, z), T && !P.startsWith("#") && (P && this._checkUnique(P), this.refs[P] = z), w && this.validateSchema(A, !0), z;
9440
+ return z = new a.SchemaEnv({ schema: A, schemaId: j, meta: C, baseId: P, localRefs: se }), this._cache.set(z.schema, z), T && !P.startsWith("#") && (P && this._checkUnique(P), this.refs[P] = z), w && this.validateSchema(A, !0), z;
9441
9441
  }
9442
9442
  _checkUnique(A) {
9443
9443
  if (this.schemas[A] || this.refs[A])
@@ -9449,20 +9449,20 @@ function ih() {
9449
9449
  return A.validate;
9450
9450
  }
9451
9451
  _compileMetaSchema(A) {
9452
- const D = this.opts;
9452
+ const C = this.opts;
9453
9453
  this.opts = this._metaOpts;
9454
9454
  try {
9455
9455
  a.compileSchema.call(this, A);
9456
9456
  } finally {
9457
- this.opts = D;
9457
+ this.opts = C;
9458
9458
  }
9459
9459
  }
9460
9460
  }
9461
9461
  E.ValidationError = n.default, E.MissingRefError = s.default, e.default = E;
9462
- function _(x, A, D, P = "error") {
9462
+ function _(x, A, C, P = "error") {
9463
9463
  for (const w in x) {
9464
9464
  const T = w;
9465
- T in A && this.logger[P](`${D}: option ${w}. ${x[T]}`);
9465
+ T in A && this.logger[P](`${C}: option ${w}. ${x[T]}`);
9466
9466
  }
9467
9467
  }
9468
9468
  function b(x) {
@@ -9490,8 +9490,8 @@ function ih() {
9490
9490
  }
9491
9491
  this.logger.warn("keywords option as map is deprecated, pass array");
9492
9492
  for (const A in x) {
9493
- const D = x[A];
9494
- D.keyword || (D.keyword = A), this.addKeyword(D);
9493
+ const C = x[A];
9494
+ C.keyword || (C.keyword = A), this.addKeyword(C);
9495
9495
  }
9496
9496
  }
9497
9497
  function M() {
@@ -9504,7 +9504,7 @@ function ih() {
9504
9504
  }, warn() {
9505
9505
  }, error() {
9506
9506
  } };
9507
- function j(x) {
9507
+ function F(x) {
9508
9508
  if (x === !1)
9509
9509
  return q;
9510
9510
  if (x === void 0)
@@ -9515,25 +9515,25 @@ function ih() {
9515
9515
  }
9516
9516
  const H = /^[a-z_$][a-z0-9_$:-]*$/i;
9517
9517
  function G(x, A) {
9518
- const { RULES: D } = this;
9518
+ const { RULES: C } = this;
9519
9519
  if ((0, l.eachItem)(x, (P) => {
9520
- if (D.keywords[P])
9520
+ if (C.keywords[P])
9521
9521
  throw new Error(`Keyword ${P} is already defined`);
9522
9522
  if (!H.test(P))
9523
9523
  throw new Error(`Keyword ${P} has invalid name`);
9524
9524
  }), !!A && A.$data && !("code" in A || "validate" in A))
9525
9525
  throw new Error('$data keyword must have "code" or "validate" function');
9526
9526
  }
9527
- function re(x, A, D) {
9527
+ function re(x, A, C) {
9528
9528
  var P;
9529
9529
  const w = A?.post;
9530
- if (D && w)
9530
+ if (C && w)
9531
9531
  throw new Error('keyword with "post" flag cannot have "type"');
9532
9532
  const { RULES: T } = this;
9533
- let C = w ? T.post : T.rules.find(({ type: z }) => z === D);
9534
- if (C || (C = { type: D, rules: [] }, T.rules.push(C)), T.keywords[x] = !0, !A)
9533
+ let D = w ? T.post : T.rules.find(({ type: z }) => z === C);
9534
+ if (D || (D = { type: C, rules: [] }, T.rules.push(D)), T.keywords[x] = !0, !A)
9535
9535
  return;
9536
- const F = {
9536
+ const j = {
9537
9537
  keyword: x,
9538
9538
  definition: {
9539
9539
  ...A,
@@ -9541,11 +9541,11 @@ function ih() {
9541
9541
  schemaType: (0, d.getJSONTypes)(A.schemaType)
9542
9542
  }
9543
9543
  };
9544
- A.before ? ne.call(this, C, F, A.before) : C.rules.push(F), T.all[x] = F, (P = A.implements) === null || P === void 0 || P.forEach((z) => this.addKeyword(z));
9544
+ A.before ? ne.call(this, D, j, A.before) : D.rules.push(j), T.all[x] = j, (P = A.implements) === null || P === void 0 || P.forEach((z) => this.addKeyword(z));
9545
9545
  }
9546
- function ne(x, A, D) {
9547
- const P = x.rules.findIndex((w) => w.keyword === D);
9548
- P >= 0 ? x.rules.splice(P, 0, A) : (x.rules.push(A), this.logger.warn(`rule ${D} is not defined`));
9546
+ function ne(x, A, C) {
9547
+ const P = x.rules.findIndex((w) => w.keyword === C);
9548
+ P >= 0 ? x.rules.splice(P, 0, A) : (x.rules.push(A), this.logger.warn(`rule ${C} is not defined`));
9549
9549
  }
9550
9550
  function fe(x) {
9551
9551
  let { metaSchema: A } = x;
@@ -9559,23 +9559,23 @@ function ih() {
9559
9559
  }
9560
9560
  })(un)), un;
9561
9561
  }
9562
- var Mt = {}, jt = {}, Ft = {}, wo;
9562
+ var Mt = {}, Ft = {}, jt = {}, wo;
9563
9563
  function ch() {
9564
- if (wo) return Ft;
9565
- wo = 1, Object.defineProperty(Ft, "__esModule", { value: !0 });
9564
+ if (wo) return jt;
9565
+ wo = 1, Object.defineProperty(jt, "__esModule", { value: !0 });
9566
9566
  const e = {
9567
9567
  keyword: "id",
9568
9568
  code() {
9569
9569
  throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
9570
9570
  }
9571
9571
  };
9572
- return Ft.default = e, Ft;
9572
+ return jt.default = e, jt;
9573
9573
  }
9574
- var Ue = {}, Eo;
9574
+ var qe = {}, Eo;
9575
9575
  function uh() {
9576
- if (Eo) return Ue;
9577
- Eo = 1, Object.defineProperty(Ue, "__esModule", { value: !0 }), Ue.callRef = Ue.getValidate = void 0;
9578
- const e = zr(), t = Pe(), r = X(), n = je(), s = Kn(), o = te(), a = {
9576
+ if (Eo) return qe;
9577
+ Eo = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.callRef = qe.getValidate = void 0;
9578
+ const e = zr(), t = Pe(), r = Z(), n = Fe(), s = Kn(), o = te(), a = {
9579
9579
  keyword: "$ref",
9580
9580
  schemaType: "string",
9581
9581
  code(d) {
@@ -9614,7 +9614,7 @@ function uh() {
9614
9614
  const { gen: m } = d;
9615
9615
  return l.validate ? m.scopeValue("validate", { ref: l.validate }) : (0, r._)`${m.scopeValue("wrapper", { ref: l })}.validate`;
9616
9616
  }
9617
- Ue.getValidate = i;
9617
+ qe.getValidate = i;
9618
9618
  function c(d, l, m, v) {
9619
9619
  const { gen: S, it: y } = d, { allErrors: g, schemaEnv: f, opts: p } = y, u = p.passContext ? n.default.this : r.nil;
9620
9620
  v ? h() : E();
@@ -9656,12 +9656,12 @@ function uh() {
9656
9656
  }
9657
9657
  }
9658
9658
  }
9659
- return Ue.callRef = c, Ue.default = a, Ue;
9659
+ return qe.callRef = c, qe.default = a, qe;
9660
9660
  }
9661
9661
  var bo;
9662
9662
  function lh() {
9663
- if (bo) return jt;
9664
- bo = 1, Object.defineProperty(jt, "__esModule", { value: !0 });
9663
+ if (bo) return Ft;
9664
+ bo = 1, Object.defineProperty(Ft, "__esModule", { value: !0 });
9665
9665
  const e = ch(), t = uh(), r = [
9666
9666
  "$schema",
9667
9667
  "$id",
@@ -9672,13 +9672,13 @@ function lh() {
9672
9672
  e.default,
9673
9673
  t.default
9674
9674
  ];
9675
- return jt.default = r, jt;
9675
+ return Ft.default = r, Ft;
9676
9676
  }
9677
9677
  var Vt = {}, Ht = {}, _o;
9678
9678
  function dh() {
9679
9679
  if (_o) return Ht;
9680
9680
  _o = 1, Object.defineProperty(Ht, "__esModule", { value: !0 });
9681
- const e = X(), t = e.operators, r = {
9681
+ const e = Z(), t = e.operators, r = {
9682
9682
  maximum: { okStr: "<=", ok: t.LTE, fail: t.GT },
9683
9683
  minimum: { okStr: ">=", ok: t.GTE, fail: t.LT },
9684
9684
  exclusiveMaximum: { okStr: "<", ok: t.LT, fail: t.GTE },
@@ -9703,7 +9703,7 @@ var Bt = {}, So;
9703
9703
  function fh() {
9704
9704
  if (So) return Bt;
9705
9705
  So = 1, Object.defineProperty(Bt, "__esModule", { value: !0 });
9706
- const e = X(), r = {
9706
+ const e = Z(), r = {
9707
9707
  keyword: "multipleOf",
9708
9708
  type: "number",
9709
9709
  schemaType: "number",
@@ -9736,7 +9736,7 @@ var To;
9736
9736
  function hh() {
9737
9737
  if (To) return zt;
9738
9738
  To = 1, Object.defineProperty(zt, "__esModule", { value: !0 });
9739
- const e = X(), t = te(), r = ph(), s = {
9739
+ const e = Z(), t = te(), r = ph(), s = {
9740
9740
  keyword: ["maxLength", "minLength"],
9741
9741
  type: "string",
9742
9742
  schemaType: "number",
@@ -9759,7 +9759,7 @@ var Kt = {}, Oo;
9759
9759
  function mh() {
9760
9760
  if (Oo) return Kt;
9761
9761
  Oo = 1, Object.defineProperty(Kt, "__esModule", { value: !0 });
9762
- const e = Pe(), t = X(), n = {
9762
+ const e = Pe(), t = Z(), n = {
9763
9763
  keyword: "pattern",
9764
9764
  type: "string",
9765
9765
  schemaType: "string",
@@ -9779,7 +9779,7 @@ var Yt = {}, Ao;
9779
9779
  function gh() {
9780
9780
  if (Ao) return Yt;
9781
9781
  Ao = 1, Object.defineProperty(Yt, "__esModule", { value: !0 });
9782
- const e = X(), r = {
9782
+ const e = Z(), r = {
9783
9783
  keyword: ["maxProperties", "minProperties"],
9784
9784
  type: "object",
9785
9785
  schemaType: "number",
@@ -9802,7 +9802,7 @@ var Wt = {}, No;
9802
9802
  function yh() {
9803
9803
  if (No) return Wt;
9804
9804
  No = 1, Object.defineProperty(Wt, "__esModule", { value: !0 });
9805
- const e = Pe(), t = X(), r = te(), s = {
9805
+ const e = Pe(), t = Z(), r = te(), s = {
9806
9806
  keyword: "required",
9807
9807
  type: "object",
9808
9808
  schemaType: "array",
@@ -9859,7 +9859,7 @@ var Jt = {}, $o;
9859
9859
  function vh() {
9860
9860
  if ($o) return Jt;
9861
9861
  $o = 1, Object.defineProperty(Jt, "__esModule", { value: !0 });
9862
- const e = X(), r = {
9862
+ const e = Z(), r = {
9863
9863
  keyword: ["maxItems", "minItems"],
9864
9864
  type: "array",
9865
9865
  schemaType: "number",
@@ -9889,7 +9889,7 @@ var Io;
9889
9889
  function wh() {
9890
9890
  if (Io) return Qt;
9891
9891
  Io = 1, Object.defineProperty(Qt, "__esModule", { value: !0 });
9892
- const e = Ir(), t = X(), r = te(), n = Yn(), o = {
9892
+ const e = Ir(), t = Z(), r = te(), n = Yn(), o = {
9893
9893
  keyword: "uniqueItems",
9894
9894
  type: "array",
9895
9895
  schemaType: "boolean",
@@ -9929,11 +9929,11 @@ function wh() {
9929
9929
  };
9930
9930
  return Qt.default = o, Qt;
9931
9931
  }
9932
- var Zt = {}, Co;
9932
+ var Zt = {}, Do;
9933
9933
  function Eh() {
9934
- if (Co) return Zt;
9935
- Co = 1, Object.defineProperty(Zt, "__esModule", { value: !0 });
9936
- const e = X(), t = te(), r = Yn(), s = {
9934
+ if (Do) return Zt;
9935
+ Do = 1, Object.defineProperty(Zt, "__esModule", { value: !0 });
9936
+ const e = Z(), t = te(), r = Yn(), s = {
9937
9937
  keyword: "const",
9938
9938
  $data: !0,
9939
9939
  error: {
@@ -9947,11 +9947,11 @@ function Eh() {
9947
9947
  };
9948
9948
  return Zt.default = s, Zt;
9949
9949
  }
9950
- var er = {}, Do;
9950
+ var er = {}, Co;
9951
9951
  function bh() {
9952
- if (Do) return er;
9953
- Do = 1, Object.defineProperty(er, "__esModule", { value: !0 });
9954
- const e = X(), t = te(), r = Yn(), s = {
9952
+ if (Co) return er;
9953
+ Co = 1, Object.defineProperty(er, "__esModule", { value: !0 });
9954
+ const e = Z(), t = te(), r = Yn(), s = {
9955
9955
  keyword: "enum",
9956
9956
  schemaType: "array",
9957
9957
  $data: !0,
@@ -10016,7 +10016,7 @@ var tr = {}, tt = {}, ko;
10016
10016
  function ri() {
10017
10017
  if (ko) return tt;
10018
10018
  ko = 1, Object.defineProperty(tt, "__esModule", { value: !0 }), tt.validateAdditionalItems = void 0;
10019
- const e = X(), t = te(), n = {
10019
+ const e = Z(), t = te(), n = {
10020
10020
  keyword: "additionalItems",
10021
10021
  type: "array",
10022
10022
  schemaType: ["boolean", "object"],
@@ -10056,7 +10056,7 @@ var rr = {}, rt = {}, xo;
10056
10056
  function ni() {
10057
10057
  if (xo) return rt;
10058
10058
  xo = 1, Object.defineProperty(rt, "__esModule", { value: !0 }), rt.validateTuple = void 0;
10059
- const e = X(), t = te(), r = Pe(), n = {
10059
+ const e = Z(), t = te(), r = Pe(), n = {
10060
10060
  keyword: "items",
10061
10061
  type: "array",
10062
10062
  schemaType: ["object", "array", "boolean"],
@@ -10106,7 +10106,7 @@ var nr = {}, qo;
10106
10106
  function Rh() {
10107
10107
  if (qo) return nr;
10108
10108
  qo = 1, Object.defineProperty(nr, "__esModule", { value: !0 });
10109
- const e = X(), t = te(), r = Pe(), n = ri(), o = {
10109
+ const e = Z(), t = te(), r = Pe(), n = ri(), o = {
10110
10110
  keyword: "items",
10111
10111
  type: "array",
10112
10112
  schemaType: ["object", "boolean"],
@@ -10126,7 +10126,7 @@ var sr = {}, Mo;
10126
10126
  function Th() {
10127
10127
  if (Mo) return sr;
10128
10128
  Mo = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
10129
- const e = X(), t = te(), n = {
10129
+ const e = Z(), t = te(), n = {
10130
10130
  keyword: "contains",
10131
10131
  type: "array",
10132
10132
  schemaType: ["object", "boolean"],
@@ -10179,11 +10179,11 @@ function Th() {
10179
10179
  };
10180
10180
  return sr.default = n, sr;
10181
10181
  }
10182
- var wn = {}, jo;
10182
+ var wn = {}, Fo;
10183
10183
  function Oh() {
10184
- return jo || (jo = 1, (function(e) {
10184
+ return Fo || (Fo = 1, (function(e) {
10185
10185
  Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
10186
- const t = X(), r = te(), n = Pe();
10186
+ const t = Z(), r = te(), n = Pe();
10187
10187
  e.error = {
10188
10188
  message: ({ params: { property: c, depsCount: d, deps: l } }) => {
10189
10189
  const m = d === 1 ? "property" : "properties";
@@ -10252,11 +10252,11 @@ function Oh() {
10252
10252
  e.validateSchemaDeps = i, e.default = s;
10253
10253
  })(wn)), wn;
10254
10254
  }
10255
- var or = {}, Fo;
10255
+ var or = {}, jo;
10256
10256
  function Ah() {
10257
- if (Fo) return or;
10258
- Fo = 1, Object.defineProperty(or, "__esModule", { value: !0 });
10259
- const e = X(), t = te(), n = {
10257
+ if (jo) return or;
10258
+ jo = 1, Object.defineProperty(or, "__esModule", { value: !0 });
10259
+ const e = Z(), t = te(), n = {
10260
10260
  keyword: "propertyNames",
10261
10261
  type: "object",
10262
10262
  schemaType: ["object", "boolean"],
@@ -10288,7 +10288,7 @@ var ar = {}, Vo;
10288
10288
  function si() {
10289
10289
  if (Vo) return ar;
10290
10290
  Vo = 1, Object.defineProperty(ar, "__esModule", { value: !0 });
10291
- const e = Pe(), t = X(), r = je(), n = te(), o = {
10291
+ const e = Pe(), t = Z(), r = Fe(), n = te(), o = {
10292
10292
  keyword: "additionalProperties",
10293
10293
  type: ["object"],
10294
10294
  schemaType: ["boolean", "object"],
@@ -10394,7 +10394,7 @@ var cr = {}, Bo;
10394
10394
  function $h() {
10395
10395
  if (Bo) return cr;
10396
10396
  Bo = 1, Object.defineProperty(cr, "__esModule", { value: !0 });
10397
- const e = Pe(), t = X(), r = te(), n = te(), s = {
10397
+ const e = Pe(), t = Z(), r = te(), n = te(), s = {
10398
10398
  keyword: "patternProperties",
10399
10399
  type: "object",
10400
10400
  schemaType: "object",
@@ -10471,10 +10471,10 @@ function Ih() {
10471
10471
  return lr.default = t, lr;
10472
10472
  }
10473
10473
  var dr = {}, Ko;
10474
- function Ch() {
10474
+ function Dh() {
10475
10475
  if (Ko) return dr;
10476
10476
  Ko = 1, Object.defineProperty(dr, "__esModule", { value: !0 });
10477
- const e = X(), t = te(), n = {
10477
+ const e = Z(), t = te(), n = {
10478
10478
  keyword: "oneOf",
10479
10479
  schemaType: "array",
10480
10480
  trackErrors: !0,
@@ -10507,7 +10507,7 @@ function Ch() {
10507
10507
  return dr.default = n, dr;
10508
10508
  }
10509
10509
  var fr = {}, Yo;
10510
- function Dh() {
10510
+ function Ch() {
10511
10511
  if (Yo) return fr;
10512
10512
  Yo = 1, Object.defineProperty(fr, "__esModule", { value: !0 });
10513
10513
  const e = te(), t = {
@@ -10532,7 +10532,7 @@ var pr = {}, Wo;
10532
10532
  function Lh() {
10533
10533
  if (Wo) return pr;
10534
10534
  Wo = 1, Object.defineProperty(pr, "__esModule", { value: !0 });
10535
- const e = X(), t = te(), n = {
10535
+ const e = Z(), t = te(), n = {
10536
10536
  keyword: "if",
10537
10537
  schemaType: ["object", "boolean"],
10538
10538
  trackErrors: !0,
@@ -10592,7 +10592,7 @@ var Qo;
10592
10592
  function xh() {
10593
10593
  if (Qo) return tr;
10594
10594
  Qo = 1, Object.defineProperty(tr, "__esModule", { value: !0 });
10595
- const e = ri(), t = Sh(), r = ni(), n = Rh(), s = Th(), o = Oh(), a = Ah(), i = si(), c = Nh(), d = $h(), l = Ph(), m = Ih(), v = Ch(), S = Dh(), y = Lh(), g = kh();
10595
+ const e = ri(), t = Sh(), r = ni(), n = Rh(), s = Th(), o = Oh(), a = Ah(), i = si(), c = Nh(), d = $h(), l = Ph(), m = Ih(), v = Dh(), S = Ch(), y = Lh(), g = kh();
10596
10596
  function f(p = !1) {
10597
10597
  const u = [
10598
10598
  // any
@@ -10617,7 +10617,7 @@ var mr = {}, gr = {}, Xo;
10617
10617
  function Uh() {
10618
10618
  if (Xo) return gr;
10619
10619
  Xo = 1, Object.defineProperty(gr, "__esModule", { value: !0 });
10620
- const e = X(), r = {
10620
+ const e = Z(), r = {
10621
10621
  keyword: "format",
10622
10622
  type: ["number", "string"],
10623
10623
  schemaType: "string",
@@ -10706,7 +10706,7 @@ function Mh() {
10706
10706
  ]), He;
10707
10707
  }
10708
10708
  var ta;
10709
- function jh() {
10709
+ function Fh() {
10710
10710
  if (ta) return Mt;
10711
10711
  ta = 1, Object.defineProperty(Mt, "__esModule", { value: !0 });
10712
10712
  const e = lh(), t = _h(), r = xh(), n = qh(), s = Mh(), o = [
@@ -10720,7 +10720,7 @@ function jh() {
10720
10720
  return Mt.default = o, Mt;
10721
10721
  }
10722
10722
  var yr = {}, vt = {}, ra;
10723
- function Fh() {
10723
+ function jh() {
10724
10724
  if (ra) return vt;
10725
10725
  ra = 1, Object.defineProperty(vt, "__esModule", { value: !0 }), vt.DiscrError = void 0;
10726
10726
  var e;
@@ -10732,7 +10732,7 @@ var na;
10732
10732
  function Vh() {
10733
10733
  if (na) return yr;
10734
10734
  na = 1, Object.defineProperty(yr, "__esModule", { value: !0 });
10735
- const e = X(), t = Fh(), r = Kn(), n = zr(), s = te(), a = {
10735
+ const e = Z(), t = jh(), r = Kn(), n = zr(), s = te(), a = {
10736
10736
  keyword: "discriminator",
10737
10737
  type: "object",
10738
10738
  schemaType: "object",
@@ -10769,16 +10769,16 @@ function Vh() {
10769
10769
  const _ = {}, b = N(m);
10770
10770
  let R = !0;
10771
10771
  for (let q = 0; q < S.length; q++) {
10772
- let j = S[q];
10773
- if (j?.$ref && !(0, s.schemaHasRulesButRef)(j, v.self.RULES)) {
10774
- const G = j.$ref;
10775
- if (j = r.resolveRef.call(v.self, v.schemaEnv.root, v.baseId, G), j instanceof r.SchemaEnv && (j = j.schema), j === void 0)
10772
+ let F = S[q];
10773
+ if (F?.$ref && !(0, s.schemaHasRulesButRef)(F, v.self.RULES)) {
10774
+ const G = F.$ref;
10775
+ if (F = r.resolveRef.call(v.self, v.schemaEnv.root, v.baseId, G), F instanceof r.SchemaEnv && (F = F.schema), F === void 0)
10776
10776
  throw new n.default(v.opts.uriResolver, v.baseId, G);
10777
10777
  }
10778
- const H = (E = j?.properties) === null || E === void 0 ? void 0 : E[y];
10778
+ const H = (E = F?.properties) === null || E === void 0 ? void 0 : E[y];
10779
10779
  if (typeof H != "object")
10780
10780
  throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);
10781
- R = R && (b || N(j)), k(H, q);
10781
+ R = R && (b || N(F)), k(H, q);
10782
10782
  }
10783
10783
  if (!R)
10784
10784
  throw new Error(`discriminator: "${y}" must be required`);
@@ -10786,19 +10786,19 @@ function Vh() {
10786
10786
  function N({ required: q }) {
10787
10787
  return Array.isArray(q) && q.includes(y);
10788
10788
  }
10789
- function k(q, j) {
10789
+ function k(q, F) {
10790
10790
  if (q.const)
10791
- M(q.const, j);
10791
+ M(q.const, F);
10792
10792
  else if (q.enum)
10793
10793
  for (const H of q.enum)
10794
- M(H, j);
10794
+ M(H, F);
10795
10795
  else
10796
10796
  throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`);
10797
10797
  }
10798
- function M(q, j) {
10798
+ function M(q, F) {
10799
10799
  if (typeof q != "string" || q in _)
10800
10800
  throw new Error(`discriminator: "${y}" values must be unique strings`);
10801
- _[q] = j;
10801
+ _[q] = F;
10802
10802
  }
10803
10803
  }
10804
10804
  }
@@ -10818,7 +10818,7 @@ var sa;
10818
10818
  function Jh() {
10819
10819
  return sa || (sa = 1, (function(e, t) {
10820
10820
  Object.defineProperty(t, "__esModule", { value: !0 }), t.MissingRefError = t.ValidationError = t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = t.Ajv = void 0;
10821
- const r = ih(), n = jh(), s = Vh(), o = Wh, a = ["/properties"], i = "http://json-schema.org/draft-07/schema";
10821
+ const r = ih(), n = Fh(), s = Vh(), o = Wh, a = ["/properties"], i = "http://json-schema.org/draft-07/schema";
10822
10822
  class c extends r.default {
10823
10823
  _addVocabularies() {
10824
10824
  super._addVocabularies(), n.default.forEach((y) => this.addVocabulary(y)), this.opts.discriminator && this.addKeyword(s.default);
@@ -10838,7 +10838,7 @@ function Jh() {
10838
10838
  Object.defineProperty(t, "KeywordCxt", { enumerable: !0, get: function() {
10839
10839
  return d.KeywordCxt;
10840
10840
  } });
10841
- var l = X();
10841
+ var l = Z();
10842
10842
  Object.defineProperty(t, "_", { enumerable: !0, get: function() {
10843
10843
  return l._;
10844
10844
  } }), Object.defineProperty(t, "str", { enumerable: !0, get: function() {
@@ -10866,18 +10866,18 @@ var Qh = Jh();
10866
10866
  const Xh = /* @__PURE__ */ Hp(Qh), oa = {
10867
10867
  CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
10868
10868
  VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
10869
- }, ev = async (e, t) => {
10869
+ }, nv = async (e, t) => {
10870
10870
  const r = await Zh(e);
10871
10871
  if (!r)
10872
10872
  throw new Error(oa.CONFIG_NOT_FOUND);
10873
10873
  if (!await em(r, t))
10874
10874
  throw new Error(oa.VALIDATION_FAILED);
10875
10875
  return r;
10876
- }, Zh = async (e) => await V(e), em = async (e, t) => new Xh().compile(t)(e), tm = (e) => Z + `/form/${e}?v=custom:(resources:(value))`, rm = (e) => {
10877
- const t = Z + "/bahmniie/form/latestPublishedForms";
10876
+ }, Zh = async (e) => await V(e), em = async (e, t) => new Xh().compile(t)(e), tm = (e) => X + `/form/${e}?v=custom:(resources:(value))`, rm = (e) => {
10877
+ const t = X + "/bahmniie/form/latestPublishedForms";
10878
10878
  return e ? t + `?episodeUuid=${e}` : t;
10879
- }, tv = (e) => Z + `/user/${e}?v=full`, nm = (e, t, r, n) => Z + `/bahmniie/form/translations?formName=${encodeURIComponent(e)}&formUuid=${t}&formVersion=${r}&locale=${n}`, _r = "Bahmni", sm = (e, t, r) => {
10880
- let s = Z + "/bahmnicore/patient/" + e + "/forms";
10879
+ }, sv = (e) => X + `/user/${e}?v=full`, nm = (e, t, r, n) => X + `/bahmniie/form/translations?formName=${encodeURIComponent(e)}&formUuid=${t}&formVersion=${r}&locale=${n}`, _r = "Bahmni", sm = (e, t, r) => {
10880
+ let s = X + "/bahmnicore/patient/" + e + "/forms";
10881
10881
  return r ? s += `?patientProgramUuid=${r}` : t && (s += `?numberOfVisits=${t}`), s;
10882
10882
  }, om = (e, t) => {
10883
10883
  const r = t.join(",");
@@ -10890,15 +10890,15 @@ async function im(e, t) {
10890
10890
  const r = om(e, t);
10891
10891
  return await V(r);
10892
10892
  }
10893
- async function rv(e, t) {
10893
+ async function ov(e, t) {
10894
10894
  const r = am(e, t);
10895
10895
  return await V(r);
10896
10896
  }
10897
- async function nv(e, t) {
10897
+ async function av(e, t) {
10898
10898
  return (await im(e, t)).entry?.filter((s) => s.resource?.resourceType === "Observation").map((s) => s.resource) ?? [];
10899
10899
  }
10900
- const cm = (e) => Z + `/provider?user=${e}&v=custom:(uuid,display,person)`;
10901
- async function sv(e) {
10900
+ const cm = (e) => X + `/provider?user=${e}&v=custom:(uuid,display,person)`;
10901
+ async function iv(e) {
10902
10902
  const t = await V(
10903
10903
  cm(e)
10904
10904
  );
@@ -10914,12 +10914,12 @@ async function fm(e) {
10914
10914
  async function pm(e) {
10915
10915
  return (await fm(e)).find((r) => !r.period?.end) ?? null;
10916
10916
  }
10917
- async function ov(e) {
10917
+ async function cv(e) {
10918
10918
  return await V(
10919
10919
  lm(e)
10920
10920
  );
10921
10921
  }
10922
- const av = (e, t) => e?.length === 0 ? !1 : t?.length === 0, hm = ce + "/Encounter", mm = Z + "/systemsetting/bahmni.encountersession.duration", gm = "d34fe3ab-5e07-11ef-8f7c-0242ac120002";
10922
+ const uv = (e, t) => e?.length === 0 ? !1 : t?.length === 0, hm = ce + "/Encounter", mm = X + "/systemsetting/bahmni.encountersession.duration", gm = "d34fe3ab-5e07-11ef-8f7c-0242ac120002";
10923
10923
  async function ym(e) {
10924
10924
  const t = new URLSearchParams();
10925
10925
  Object.entries(e).forEach(([s, o]) => {
@@ -10950,7 +10950,7 @@ async function wm(e, t) {
10950
10950
  return null;
10951
10951
  }
10952
10952
  }
10953
- async function iv(e, t, r) {
10953
+ async function lv(e, t, r) {
10954
10954
  try {
10955
10955
  if (!e) return null;
10956
10956
  const n = r ?? await vm(), o = `ge${new Date(Date.now() - n * 60 * 1e3).toISOString()}`, a = {
@@ -10967,7 +10967,7 @@ async function iv(e, t, r) {
10967
10967
  }
10968
10968
  }
10969
10969
  const Em = (e) => ce + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${e}`;
10970
- async function cv(e) {
10970
+ async function dv(e) {
10971
10971
  const t = e.join(","), r = await V(Em(t));
10972
10972
  if (r.total === 0)
10973
10973
  throw new Error(
@@ -11002,22 +11002,22 @@ const En = /* @__PURE__ */ new Map(), bm = async (e) => {
11002
11002
  message: r ? `${o.message}~${JSON.stringify(r)}` : o.message,
11003
11003
  module: n
11004
11004
  };
11005
- return await Me(Dl, a), { logged: !0 };
11006
- }, uv = () => Cl(async (t) => {
11005
+ return await xe(Cl, a), { logged: !0 };
11006
+ }, fv = () => Dl(async (t) => {
11007
11007
  await Sm(
11008
11008
  t.patientUuid,
11009
11009
  t.eventType,
11010
11010
  t.messageParams,
11011
11011
  t.module
11012
11012
  );
11013
- }), lv = async () => {
11013
+ }), pv = async () => {
11014
11014
  try {
11015
11015
  return (await V(Gu)).user.privileges;
11016
11016
  } catch (e) {
11017
11017
  const { message: t } = Rr(e);
11018
11018
  throw new Error(t);
11019
11019
  }
11020
- }, dv = (e, t) => {
11020
+ }, hv = (e, t) => {
11021
11021
  if (!e || e.length === 0)
11022
11022
  return !1;
11023
11023
  if (!t || t.length === 0)
@@ -11057,12 +11057,12 @@ const En = /* @__PURE__ */ new Map(), bm = async (e) => {
11057
11057
  editable: n.editable
11058
11058
  }))
11059
11059
  };
11060
- }, fv = async (e) => {
11060
+ }, mv = async (e) => {
11061
11061
  const t = await Rm(e), r = qr();
11062
11062
  return t.map(
11063
11063
  (n) => Om(n, r)
11064
11064
  );
11065
- }, pv = async (e) => {
11065
+ }, gv = async (e) => {
11066
11066
  const t = await fetch(tm(e));
11067
11067
  if (!t.ok)
11068
11068
  throw new Error(
@@ -11096,7 +11096,7 @@ const En = /* @__PURE__ */ new Map(), bm = async (e) => {
11096
11096
  schema: n,
11097
11097
  translations: d
11098
11098
  };
11099
- }, hv = async (e, t, r) => {
11099
+ }, yv = async (e, t, r) => {
11100
11100
  let n;
11101
11101
  t && t.length > 0 && (n = t.join(","));
11102
11102
  const s = sm(e, r, n), o = await V(s);
@@ -11141,7 +11141,7 @@ function ii(e, t) {
11141
11141
  };
11142
11142
  return n(r.controls);
11143
11143
  }
11144
- function mv(e, t) {
11144
+ function vv(e, t) {
11145
11145
  if (!e.controls || e.controls.length === 0)
11146
11146
  return [];
11147
11147
  const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
@@ -11186,7 +11186,7 @@ function mv(e, t) {
11186
11186
  s.interpretation && (a.interpretation = s.interpretation), s.comment && (a.comment = s.comment), r.push(a);
11187
11187
  }), r;
11188
11188
  }
11189
- function gv(e, t) {
11189
+ function wv(e, t) {
11190
11190
  if (!e || e.length === 0)
11191
11191
  return {
11192
11192
  controls: [],
@@ -11219,7 +11219,7 @@ function gv(e, t) {
11219
11219
  metadata: { formMetadata: t }
11220
11220
  };
11221
11221
  }
11222
- function yv(e) {
11222
+ function Ev(e) {
11223
11223
  const t = (n) => {
11224
11224
  const s = (d) => d == null ? null : typeof d == "string" || typeof d == "number" || typeof d == "boolean" || typeof d == "object" ? d : null, o = n.concept, a = typeof o == "object" && o !== null && "uuid" in o ? o.uuid : o, i = typeof o == "object" && o !== null && "datatype" in o ? o.datatype : void 0, c = {
11225
11225
  concept: {
@@ -11239,11 +11239,11 @@ function yv(e) {
11239
11239
  };
11240
11240
  return (e?.filter((n) => n.uuid && n.voided ? !0 : !(!n.uuid && n.voided || n.value && typeof n.value == "string" && n.value.endsWith("voided"))) ?? []).map(t);
11241
11241
  }
11242
- function vv(e) {
11242
+ function bv(e) {
11243
11243
  if (!(!e || typeof e != "object"))
11244
11244
  return "toJS" in e && typeof e.toJS == "function" ? e.toJS() : e;
11245
11245
  }
11246
- function wv(e, t) {
11246
+ function _v(e, t) {
11247
11247
  !e || !Array.isArray(e.children) || e.children.forEach((r) => {
11248
11248
  r && typeof r == "object" && ci(
11249
11249
  r,
@@ -11273,7 +11273,7 @@ function ci(e, t) {
11273
11273
  );
11274
11274
  });
11275
11275
  }
11276
- const Am = Z + "/bahmnicore/diseaseSummaryData?", Ev = async (e, t, r, n) => {
11276
+ const Am = X + "/bahmnicore/diseaseSummaryData?", Sv = async (e, t, r, n) => {
11277
11277
  const s = new URLSearchParams({
11278
11278
  groupBy: n,
11279
11279
  latestCount: t.toString(),
@@ -11284,7 +11284,7 @@ const Am = Z + "/bahmnicore/diseaseSummaryData?", Ev = async (e, t, r, n) => {
11284
11284
  });
11285
11285
  const o = Am + s.toString();
11286
11286
  return V(o);
11287
- }, Wn = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", Nm = (e) => `${Z}/bahmniprogramenrollment?patient=${e}&v=${Wn}`, $m = (e, t = 15, r = 0) => `${Z}/bahmniprogramenrollment?patient=${e}&v=${Wn}&limit=${t}&startIndex=${r}&totalCount=true`, ui = (e) => `${Z}/bahmniprogramenrollment/${e}`, Pm = (e) => `${ui(e)}?v=${Wn}`, bv = async (e) => await V(Nm(e)), _v = async (e, t = 15, r = 1) => {
11287
+ }, Wn = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", Nm = (e) => `${X}/bahmniprogramenrollment?patient=${e}&v=${Wn}`, $m = (e, t = 15, r = 0) => `${X}/bahmniprogramenrollment?patient=${e}&v=${Wn}&limit=${t}&startIndex=${r}&totalCount=true`, ui = (e) => `${X}/bahmniprogramenrollment/${e}`, Pm = (e) => `${ui(e)}?v=${Wn}`, Rv = async (e) => await V(Nm(e)), Tv = async (e, t = 15, r = 1) => {
11288
11288
  const n = (r - 1) * t, s = await V(
11289
11289
  $m(e, t, n)
11290
11290
  );
@@ -11292,7 +11292,7 @@ const Am = Z + "/bahmnicore/diseaseSummaryData?", Ev = async (e, t, r, n) => {
11292
11292
  programs: s.results,
11293
11293
  total: s.totalCount
11294
11294
  };
11295
- }, Sv = async (e) => await V(Pm(e)), Rv = async (e, t) => {
11295
+ }, Ov = async (e) => await V(Pm(e)), Av = async (e, t) => {
11296
11296
  const r = {
11297
11297
  uuid: e,
11298
11298
  states: [
@@ -11301,12 +11301,12 @@ const Am = Z + "/bahmnicore/diseaseSummaryData?", Ev = async (e, t, r, n) => {
11301
11301
  }
11302
11302
  ]
11303
11303
  };
11304
- return await Me(
11304
+ return await xe(
11305
11305
  ui(e),
11306
11306
  r
11307
11307
  );
11308
11308
  };
11309
- function Tv(e) {
11309
+ function Nv(e) {
11310
11310
  if (e.states.length === 0)
11311
11311
  return null;
11312
11312
  let t;
@@ -11322,7 +11322,7 @@ function Tv(e) {
11322
11322
  t = e.states.find((r) => r.endDate === null);
11323
11323
  return t ? Vf(t.state.concept.names) ?? t.state.concept.display : null;
11324
11324
  }
11325
- function Ov(e, t) {
11325
+ function $v(e, t) {
11326
11326
  if (t.length === 0)
11327
11327
  return {};
11328
11328
  const r = {};
@@ -11334,12 +11334,12 @@ function Ov(e, t) {
11334
11334
  }
11335
11335
  return r;
11336
11336
  }
11337
- const In = "consultation:saved", Av = (e) => {
11337
+ const In = "consultation:saved", Pv = (e) => {
11338
11338
  const t = new CustomEvent(In, {
11339
11339
  detail: e
11340
11340
  });
11341
11341
  window.dispatchEvent(t);
11342
- }, Nv = (e, t = []) => {
11342
+ }, Iv = (e, t = []) => {
11343
11343
  const r = bn(e);
11344
11344
  _n(() => {
11345
11345
  r.current = e;
@@ -11353,7 +11353,7 @@ const In = "consultation:saved", Av = (e) => {
11353
11353
  };
11354
11354
  }, t);
11355
11355
  }, li = (e, t, r = 100, n = 0) => {
11356
- const s = `${ce}/DocumentReference?patient=${e}&_sort=-date&_count=${r}&_getpagesoffset=${n}`;
11356
+ const s = `${ce}/DocumentReference?patient=${e}&_sort=-_lastUpdated&_count=${r}&_getpagesoffset=${n}`;
11357
11357
  return t && t.length > 0 ? `${s}&encounter=${t.join(",")}` : s;
11358
11358
  };
11359
11359
  function di(e) {
@@ -11375,13 +11375,13 @@ async function Im(e, t) {
11375
11375
  const r = li(e, t);
11376
11376
  return V(r);
11377
11377
  }
11378
- async function $v(e, t) {
11378
+ async function Dv(e, t) {
11379
11379
  const n = ((await Im(e, t)).entry ?? []).filter(
11380
11380
  (s) => !!s.resource
11381
11381
  );
11382
11382
  return di(n);
11383
11383
  }
11384
- async function Pv(e, t, r = 10, n = 1) {
11384
+ async function Cv(e, t, r = 10, n = 1) {
11385
11385
  const s = (n - 1) * r, o = li(
11386
11386
  e,
11387
11387
  t,
@@ -11395,184 +11395,222 @@ async function Pv(e, t, r = 10, n = 1) {
11395
11395
  total: a.total ?? i.length
11396
11396
  };
11397
11397
  }
11398
+ const Dm = X + "/bahmnicore/visitDocument/uploadDocument", Cm = "application";
11399
+ async function Lm(e) {
11400
+ return new Promise((t, r) => {
11401
+ const n = new FileReader();
11402
+ n.onload = () => {
11403
+ const s = n.result.split(",")[1];
11404
+ if (!s) {
11405
+ r(new Error("File is empty or could not be read"));
11406
+ return;
11407
+ }
11408
+ const o = e.name;
11409
+ let a = o, i = "";
11410
+ const c = o.lastIndexOf(".");
11411
+ c !== -1 && (a = o.substring(0, c), i = o.substring(c + 1).toLowerCase());
11412
+ const d = e.type ? e.type.split("/")[0] : Cm;
11413
+ t({
11414
+ content: s,
11415
+ fileName: a,
11416
+ fileType: d,
11417
+ format: i
11418
+ });
11419
+ }, n.onerror = () => {
11420
+ r(n.error ?? new Error("Failed to read file"));
11421
+ }, n.readAsDataURL(e);
11422
+ });
11423
+ }
11424
+ async function Lv(e, t, r) {
11425
+ const n = await Lm(e), s = {
11426
+ content: n.content,
11427
+ encounterTypeName: t,
11428
+ fileName: n.fileName,
11429
+ fileType: n.fileType,
11430
+ format: n.format,
11431
+ patientUuid: r
11432
+ };
11433
+ return xe(Dm, s);
11434
+ }
11398
11435
  export {
11399
- Gg as APPOINTMENT_IDENTIFIER_SYSTEM,
11400
- zg as APPOINTMENT_STATUSES,
11436
+ Wg as APPOINTMENT_IDENTIFIER_SYSTEM,
11437
+ Yg as APPOINTMENT_STATUSES,
11401
11438
  $n as AUDIT_LOG_EVENT_DETAILS,
11402
11439
  Qf as AllergySeverity,
11403
11440
  Jf as AllergyStatus,
11404
11441
  $l as AttributeFormat,
11405
11442
  Pl as AttributeInputType,
11406
- tg as BAHMNI_HOME_PATH,
11407
- Ay as CONCEPT_DATATYPE_COMPLEX,
11408
- Oy as CONCEPT_DATATYPE_NUMERIC,
11443
+ sg as BAHMNI_HOME_PATH,
11444
+ Py as CONCEPT_DATATYPE_COMPLEX,
11445
+ $y as CONCEPT_DATATYPE_NUMERIC,
11409
11446
  In as CONSULTATION_SAVED_EVENT,
11410
11447
  Xf as DATETIME_REGEX_PATTERN,
11411
- Py as DATE_REGEX_PATTERN,
11448
+ Cy as DATE_REGEX_PATTERN,
11412
11449
  Af as DEFAULT_DATE_FORMAT,
11413
11450
  Nf as DEFAULT_DATE_FORMAT_STORAGE_KEY,
11414
11451
  Pf as DEFAULT_TIME_FORMAT,
11415
- Cf as DURATION_UNIT_TO_DAYS,
11416
- vy as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
11417
- _y as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
11418
- Ry as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
11419
- Sy as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
11420
- Ny as FHIR_OBSERVATION_STATUS_FINAL,
11421
- Ty as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
11422
- $y as FHIR_RESOURCE_TYPE_OBSERVATION,
11423
- by as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
11452
+ Df as DURATION_UNIT_TO_DAYS,
11453
+ by as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
11454
+ Ty as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
11455
+ Ay as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
11456
+ Oy as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
11457
+ Iy as FHIR_OBSERVATION_STATUS_FINAL,
11458
+ Ny as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
11459
+ Dy as FHIR_RESOURCE_TYPE_OBSERVATION,
11460
+ Ry as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
11424
11461
  Wa as HL7_CONDITION_CATEGORY_CONDITION_CODE,
11425
11462
  Ja as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
11426
- Ey as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
11427
- wy as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
11428
- Iy as INTERPRETATION_TO_CODE,
11429
- Eg as MAX_NAME_LENGTH,
11430
- wg as MAX_PATIENT_AGE_YEARS,
11431
- bg as MAX_PHONE_NUMBER_LENGTH,
11463
+ Sy as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
11464
+ _y as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
11465
+ Ly as INTERPRETATION_TO_CODE,
11466
+ Sg as MAX_NAME_LENGTH,
11467
+ _g as MAX_PATIENT_AGE_YEARS,
11468
+ Rg as MAX_PHONE_NUMBER_LENGTH,
11432
11469
  ke as MedicationStatus,
11433
11470
  ce as OPENMRS_FHIR_R4,
11434
- Z as OPENMRS_REST_V1,
11435
- Wy as ORDER_TYPE_QUERY_KEY,
11436
- Yy as PENDING_REPORT_STATUSES,
11437
- Ky as PROCESSED_REPORT_STATUSES,
11438
- tv as USER_PINNED_PREFERENCE_URL,
11439
- ry as calculateAge,
11440
- cy as calculateEndDate,
11441
- sy as calculateOnsetDate,
11442
- mg as camelToScreamingSnakeCase,
11443
- cg as capitalize,
11444
- Hg as checkIfActiveVisitExists,
11445
- vv as convertImmutableToPlainObject,
11446
- gg as convertToSentenceCase,
11447
- Ng as createPatient,
11448
- Bg as createVisitForPatient,
11471
+ X as OPENMRS_REST_V1,
11472
+ Xy as ORDER_TYPE_QUERY_KEY,
11473
+ Qy as PENDING_REPORT_STATUSES,
11474
+ Jy as PROCESSED_REPORT_STATUSES,
11475
+ sv as USER_PINNED_PREFERENCE_URL,
11476
+ oy as calculateAge,
11477
+ dy as calculateEndDate,
11478
+ iy as calculateOnsetDate,
11479
+ vg as camelToScreamingSnakeCase,
11480
+ dg as capitalize,
11481
+ Gg as checkIfActiveVisitExists,
11482
+ bv as convertImmutableToPlainObject,
11483
+ wg as convertToSentenceCase,
11484
+ Ig as createPatient,
11485
+ Kg as createVisitForPatient,
11449
11486
  uu as del,
11450
- Zg as deleteAppointmentService,
11487
+ ry as deleteAppointmentService,
11451
11488
  Il as dispatchAuditEvent,
11452
- Av as dispatchConsultationSaved,
11453
- uy as doDateRangesOverlap,
11454
- Ov as extractAttributes,
11455
- wv as extractNotesFromFormData,
11456
- my as fetchAndFormatAllergenConcepts,
11457
- pv as fetchFormMetadata,
11458
- Uy as fetchMedicationOrdersMetadata,
11459
- fv as fetchObservationForms,
11460
- gy as fetchReactionConcepts,
11461
- fg as filterReplacementEntries,
11462
- iv as findActiveEncounterInSession,
11463
- oy as formatDateDistance,
11464
- ny as formatDateTime,
11465
- pg as formatUrl,
11466
- ag as generateId,
11467
- ig as generateUUID,
11489
+ Pv as dispatchConsultationSaved,
11490
+ fy as doDateRangesOverlap,
11491
+ $v as extractAttributes,
11492
+ _v as extractNotesFromFormData,
11493
+ vy as fetchAndFormatAllergenConcepts,
11494
+ gv as fetchFormMetadata,
11495
+ Fy as fetchMedicationOrdersMetadata,
11496
+ mv as fetchObservationForms,
11497
+ wy as fetchReactionConcepts,
11498
+ mg as filterReplacementEntries,
11499
+ lv as findActiveEncounterInSession,
11500
+ cy as formatDateDistance,
11501
+ ay as formatDateTime,
11502
+ gg as formatUrl,
11503
+ ug as generateId,
11504
+ lg as generateUUID,
11468
11505
  V as get,
11469
11506
  pm as getActiveVisit,
11470
11507
  Ml as getActiveVisitByPatient,
11471
- Ig as getAddressHierarchyEntries,
11472
- Xg as getAllAppointmentServices,
11508
+ Lg as getAddressHierarchyEntries,
11509
+ ty as getAllAppointmentServices,
11473
11510
  Yf as getAllergies,
11474
- Qg as getAppointmentById,
11475
- Qy as getCategoryUuidFromOrderTypes,
11476
- py as getConceptById,
11477
- Dy as getConditionPage,
11478
- Cy as getConditions,
11479
- ev as getConfig,
11511
+ ey as getAppointmentById,
11512
+ ev as getCategoryUuidFromOrderTypes,
11513
+ gy as getConceptById,
11514
+ xy as getConditionPage,
11515
+ ky as getConditions,
11516
+ nv as getConfig,
11480
11517
  Ua as getCookieByName,
11481
- sv as getCurrentProvider,
11482
- Tv as getCurrentStateName,
11483
- yg as getCurrentUser,
11484
- lv as getCurrentUserPrivileges,
11485
- vg as getDefaultDateFormat,
11486
- ky as getDiagnosesPage,
11487
- zy as getDiagnosticReportBundle,
11488
- By as getDiagnosticReports,
11489
- Pv as getDocumentReferencePage,
11518
+ iv as getCurrentProvider,
11519
+ Nv as getCurrentStateName,
11520
+ Eg as getCurrentUser,
11521
+ pv as getCurrentUserPrivileges,
11522
+ bg as getDefaultDateFormat,
11523
+ qy as getDiagnosesPage,
11524
+ Yy as getDiagnosticReportBundle,
11525
+ Ky as getDiagnosticReports,
11526
+ Cv as getDocumentReferencePage,
11490
11527
  Im as getDocumentReferences,
11491
- cv as getEncountersAndVisitsForEOC,
11492
- Zy as getExistingServiceRequestsForAllCategories,
11493
- Jy as getFlattenedInvestigations,
11494
- iy as getFormattedAge,
11495
- yy as getFormattedAllergies,
11496
- $v as getFormattedDocumentReferences,
11528
+ dv as getEncountersAndVisitsForEOC,
11529
+ rv as getExistingServiceRequestsForAllCategories,
11530
+ Zy as getFlattenedInvestigations,
11531
+ ly as getFormattedAge,
11532
+ Ey as getFormattedAllergies,
11533
+ Dv as getFormattedDocumentReferences,
11497
11534
  Rr as getFormattedError,
11498
- _g as getFormattedPatientById,
11499
- Pg as getGenders,
11500
- Ag as getIdentifierData,
11501
- Og as getIdentifierTypes,
11502
- xg as getInputTypeForFormat,
11503
- Hy as getLabInvestigationsBundle,
11504
- ov as getObservationsBundleByEncounterUuid,
11505
- Xy as getOrderTypeNames,
11535
+ Tg as getFormattedPatientById,
11536
+ Cg as getGenders,
11537
+ Pg as getIdentifierData,
11538
+ $g as getIdentifierTypes,
11539
+ Mg as getInputTypeForFormat,
11540
+ Gy as getLabInvestigationsBundle,
11541
+ cv as getObservationsBundleByEncounterUuid,
11542
+ tv as getOrderTypeNames,
11506
11543
  zn as getOrderTypes,
11507
- Cg as getOrderedAddressHierarchyLevels,
11508
- Wg as getPastAppointments,
11509
- ty as getPastAppointmentsPage,
11544
+ kg as getOrderedAddressHierarchyLevels,
11545
+ Xg as getPastAppointments,
11546
+ sy as getPastAppointmentsPage,
11510
11547
  _l as getPatientById,
11511
- Ly as getPatientDiagnoses,
11512
- hv as getPatientFormData,
11513
- Sg as getPatientImageAsDataUrl,
11548
+ Uy as getPatientDiagnoses,
11549
+ yv as getPatientFormData,
11550
+ Og as getPatientImageAsDataUrl,
11514
11551
  yp as getPatientMedicationBundle,
11515
- xy as getPatientMedications,
11516
- nv as getPatientObservations,
11552
+ My as getPatientMedications,
11553
+ av as getPatientObservations,
11517
11554
  im as getPatientObservationsBundle,
11518
- rv as getPatientObservationsWithEncounterBundle,
11519
- Dg as getPatientProfile,
11520
- bv as getPatientPrograms,
11521
- _v as getPatientProgramsPage,
11522
- jy as getPatientRadiologyInvestigationBundle,
11523
- Fy as getPatientRadiologyInvestigationBundleWithImagingStudy,
11524
- Vy as getPatientRadiologyInvestigations,
11525
- kg as getPersonAttributeTypes,
11555
+ ov as getPatientObservationsWithEncounterBundle,
11556
+ xg as getPatientProfile,
11557
+ Rv as getPatientPrograms,
11558
+ Tv as getPatientProgramsPage,
11559
+ Hy as getPatientRadiologyInvestigationBundle,
11560
+ By as getPatientRadiologyInvestigationBundleWithImagingStudy,
11561
+ zy as getPatientRadiologyInvestigations,
11562
+ qg as getPersonAttributeTypes,
11526
11563
  Nl as getPrimaryIdentifierType,
11527
- lg as getPriorityByOrder,
11528
- Sv as getProgramByUUID,
11529
- Lg as getRelationshipTypes,
11564
+ pg as getPriorityByOrder,
11565
+ Ov as getProgramByUUID,
11566
+ Ug as getRelationshipTypes,
11530
11567
  Pt as getServiceRequests,
11531
- ay as getTodayDate,
11532
- Yg as getUpcomingAppointments,
11533
- ey as getUpcomingAppointmentsPage,
11568
+ uy as getTodayDate,
11569
+ Qg as getUpcomingAppointments,
11570
+ ny as getUpcomingAppointmentsPage,
11534
11571
  qn as getUserLoginLocation,
11535
11572
  qr as getUserPreferredLocale,
11536
- My as getVaccinations,
11537
- hg as getValueType,
11538
- Vg as getVisitTypes,
11539
- Ev as getVitalFlowSheetData,
11540
- dg as groupByDate,
11541
- dv as hasPrivilege,
11542
- ng as initAppI18n,
11543
- uv as initializeAuditListener,
11544
- Ug as isBooleanFormat,
11545
- qg as isConceptFormat,
11546
- jg as isDateFormat,
11547
- Mg as isNumberFormat,
11548
- ug as isStringEmpty,
11549
- Fg as isTextFormat,
11573
+ Vy as getVaccinations,
11574
+ yg as getValueType,
11575
+ zg as getVisitTypes,
11576
+ Sv as getVitalFlowSheetData,
11577
+ hg as groupByDate,
11578
+ hv as hasPrivilege,
11579
+ ag as initAppI18n,
11580
+ fv as initializeAuditListener,
11581
+ Fg as isBooleanFormat,
11582
+ jg as isConceptFormat,
11583
+ Hg as isDateFormat,
11584
+ Vg as isNumberFormat,
11585
+ fg as isStringEmpty,
11586
+ Bg as isTextFormat,
11550
11587
  Sm as logAuditEvent,
11551
- rg as normalizeTranslationKey,
11552
- dy as notificationService,
11588
+ og as normalizeTranslationKey,
11589
+ hy as notificationService,
11553
11590
  Zu as parseQueryParams,
11554
- eg as patch,
11555
- Me as post,
11556
- Zm as put,
11557
- og as refreshQueries,
11558
- Kg as searchAppointmentsByAttribute,
11559
- hy as searchConceptByName,
11560
- fy as searchConcepts,
11591
+ ng as patch,
11592
+ xe as post,
11593
+ rg as put,
11594
+ cg as refreshQueries,
11595
+ Jg as searchAppointmentsByAttribute,
11596
+ yy as searchConceptByName,
11597
+ my as searchConcepts,
11561
11598
  br as searchFHIRConcepts,
11562
- Ff as searchFHIRConceptsByName,
11563
- qy as searchMedications,
11564
- Tg as searchPatientByCustomAttribute,
11565
- Rg as searchPatientByNameOrId,
11566
- av as shouldEnableEncounterFilter,
11567
- ly as sortByDate,
11568
- yv as transformContainerObservationsToForm2Observations,
11569
- mv as transformFormDataToObservations,
11570
- gv as transformObservationsToFormData,
11571
- Jg as updateAppointmentStatus,
11572
- Gy as updateDiagnosticReportBundle,
11573
- $g as updatePatient,
11574
- Rv as updateProgramState,
11575
- sg as useCamera,
11576
- Nv as useSubscribeConsultationSaved,
11577
- Dv as useTranslation
11599
+ jf as searchFHIRConceptsByName,
11600
+ jy as searchMedications,
11601
+ Ng as searchPatientByCustomAttribute,
11602
+ Ag as searchPatientByNameOrId,
11603
+ uv as shouldEnableEncounterFilter,
11604
+ py as sortByDate,
11605
+ Ev as transformContainerObservationsToForm2Observations,
11606
+ vv as transformFormDataToObservations,
11607
+ wv as transformObservationsToFormData,
11608
+ Zg as updateAppointmentStatus,
11609
+ Wy as updateDiagnosticReportBundle,
11610
+ Dg as updatePatient,
11611
+ Av as updateProgramState,
11612
+ Lv as uploadDocument,
11613
+ ig as useCamera,
11614
+ Iv as useSubscribeConsultationSaved,
11615
+ Uv as useTranslation
11578
11616
  };