@bahmni/services 0.0.1-dev.193 → 0.0.1-dev.197

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,5 +1,5 @@
1
1
  import { initReactI18next as oi } from "react-i18next";
2
- import { useTranslation as uv } from "react-i18next";
2
+ import { useTranslation as fv } from "react-i18next";
3
3
  import { useRef as wn, useCallback as Yr, useEffect as En } from "react";
4
4
  function ra(e, t) {
5
5
  return function() {
@@ -1797,22 +1797,22 @@ ce.getAdapter = Ea.getAdapter;
1797
1797
  ce.HttpStatusCode = Rn;
1798
1798
  ce.default = ce;
1799
1799
  const {
1800
- Axios: Em,
1801
- AxiosError: bm,
1802
- CanceledError: _m,
1803
- isCancel: Sm,
1804
- CancelToken: Rm,
1805
- VERSION: Tm,
1806
- all: Om,
1807
- Cancel: Am,
1808
- isAxiosError: Nm,
1809
- spread: $m,
1810
- toFormData: Pm,
1811
- AxiosHeaders: Im,
1812
- HttpStatusCode: Dm,
1813
- formToJSON: Cm,
1814
- getAdapter: Lm,
1815
- mergeConfig: km
1800
+ Axios: Sm,
1801
+ AxiosError: Rm,
1802
+ CanceledError: Tm,
1803
+ isCancel: Om,
1804
+ CancelToken: Am,
1805
+ VERSION: Nm,
1806
+ all: $m,
1807
+ Cancel: Pm,
1808
+ isAxiosError: Im,
1809
+ spread: Dm,
1810
+ toFormData: Cm,
1811
+ AxiosHeaders: Lm,
1812
+ HttpStatusCode: km,
1813
+ formToJSON: xm,
1814
+ getAdapter: Um,
1815
+ mergeConfig: qm
1816
1816
  } = ce, kc = (e) => typeof e == "object" && e !== null && "resourceType" in e && e.resourceType === "OperationOutcome", xc = (e) => {
1817
1817
  if (!e.issue || !Array.isArray(e.issue))
1818
1818
  return null;
@@ -2017,17 +2017,17 @@ qe.interceptors.response.use(
2017
2017
  return r.startsWith("ERROR_") || /^[A-Z_]+$/.test(r) ? Promise.reject(new Error(r)) : Promise.reject(`${t}: ${r}`);
2018
2018
  }
2019
2019
  );
2020
- const z = async (e) => (await qe.get(e)).data, Me = async (e, t) => (await qe.post(e, t)).data, xm = async (e, t) => (await qe.put(e, t)).data, Um = async (e, t) => (await qe.patch(e, t)).data, qm = async (e) => (await qe.delete(e)).data, Y = (e) => typeof e == "string", ft = () => {
2020
+ const z = async (e) => (await qe.get(e)).data, Me = async (e, t) => (await qe.post(e, t)).data, Mm = async (e, t) => (await qe.put(e, t)).data, jm = async (e, t) => (await qe.patch(e, t)).data, Jc = async (e) => (await qe.delete(e)).data, Y = (e) => typeof e == "string", ft = () => {
2021
2021
  let e, t;
2022
2022
  const r = new Promise((n, s) => {
2023
2023
  e = n, t = s;
2024
2024
  });
2025
2025
  return r.resolve = e, r.reject = t, r;
2026
- }, fs = (e) => e == null ? "" : "" + e, Jc = (e, t, r) => {
2026
+ }, fs = (e) => e == null ? "" : "" + e, Qc = (e, t, r) => {
2027
2027
  e.forEach((n) => {
2028
2028
  t[n] && (r[n] = t[n]);
2029
2029
  });
2030
- }, Qc = /###/g, hs = (e) => e && e.indexOf("###") > -1 ? e.replace(Qc, ".") : e, ps = (e) => !e || Y(e), wt = (e, t, r) => {
2030
+ }, Xc = /###/g, hs = (e) => e && e.indexOf("###") > -1 ? e.replace(Xc, ".") : e, ps = (e) => !e || Y(e), wt = (e, t, r) => {
2031
2031
  const n = Y(t) ? t.split(".") : t;
2032
2032
  let s = 0;
2033
2033
  for (; s < n.length - 1; ) {
@@ -2052,7 +2052,7 @@ const z = async (e) => (await qe.get(e)).data, Me = async (e, t) => (await qe.po
2052
2052
  for (; i.obj === void 0 && a.length; )
2053
2053
  o = `${a[a.length - 1]}.${o}`, a = a.slice(0, a.length - 1), i = wt(e, a, Object), i?.obj && typeof i.obj[`${i.k}.${o}`] < "u" && (i.obj = void 0);
2054
2054
  i.obj[`${i.k}.${o}`] = r;
2055
- }, Xc = (e, t, r, n) => {
2055
+ }, Zc = (e, t, r, n) => {
2056
2056
  const {
2057
2057
  obj: s,
2058
2058
  k: o
@@ -2065,7 +2065,7 @@ const z = async (e) => (await qe.get(e)).data, Me = async (e, t) => (await qe.po
2065
2065
  } = wt(e, t);
2066
2066
  if (r && Object.prototype.hasOwnProperty.call(r, n))
2067
2067
  return r[n];
2068
- }, Zc = (e, t, r) => {
2068
+ }, eu = (e, t, r) => {
2069
2069
  const n = Tr(e, r);
2070
2070
  return n !== void 0 ? n : Tr(t, r);
2071
2071
  }, Ta = (e, t, r) => {
@@ -2073,7 +2073,7 @@ const z = async (e) => (await qe.get(e)).data, Me = async (e, t) => (await qe.po
2073
2073
  n !== "__proto__" && n !== "constructor" && (n in e ? Y(e[n]) || e[n] instanceof String || Y(t[n]) || t[n] instanceof String ? r && (e[n] = t[n]) : Ta(e[n], t[n], r) : e[n] = t[n]);
2074
2074
  return e;
2075
2075
  }, We = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
2076
- var eu = {
2076
+ var tu = {
2077
2077
  "&": "&amp;",
2078
2078
  "<": "&lt;",
2079
2079
  ">": "&gt;",
@@ -2081,8 +2081,8 @@ var eu = {
2081
2081
  "'": "&#39;",
2082
2082
  "/": "&#x2F;"
2083
2083
  };
2084
- const tu = (e) => Y(e) ? e.replace(/[&<>"'\/]/g, (t) => eu[t]) : e;
2085
- class ru {
2084
+ const ru = (e) => Y(e) ? e.replace(/[&<>"'\/]/g, (t) => tu[t]) : e;
2085
+ class nu {
2086
2086
  constructor(t) {
2087
2087
  this.capacity = t, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
2088
2088
  }
@@ -2094,11 +2094,11 @@ class ru {
2094
2094
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(t, n), this.regExpQueue.push(t), n;
2095
2095
  }
2096
2096
  }
2097
- const nu = [" ", ",", "?", "!", ";"], su = new ru(20), ou = (e, t, r) => {
2097
+ const su = [" ", ",", "?", "!", ";"], ou = new nu(20), au = (e, t, r) => {
2098
2098
  t = t || "", r = r || "";
2099
- const n = nu.filter((a) => t.indexOf(a) < 0 && r.indexOf(a) < 0);
2099
+ const n = su.filter((a) => t.indexOf(a) < 0 && r.indexOf(a) < 0);
2100
2100
  if (n.length === 0) return !0;
2101
- const s = su.getRegExp(`(${n.map((a) => a === "?" ? "\\?" : a).join("|")})`);
2101
+ const s = ou.getRegExp(`(${n.map((a) => a === "?" ? "\\?" : a).join("|")})`);
2102
2102
  let o = !s.test(e);
2103
2103
  if (!o) {
2104
2104
  const a = e.indexOf(r);
@@ -2126,7 +2126,7 @@ const nu = [" ", ",", "?", "!", ";"], su = new ru(20), ou = (e, t, r) => {
2126
2126
  s = a;
2127
2127
  }
2128
2128
  return s;
2129
- }, Or = (e) => e?.replace("_", "-"), au = {
2129
+ }, Or = (e) => e?.replace("_", "-"), iu = {
2130
2130
  type: "logger",
2131
2131
  log(e) {
2132
2132
  this.output("log", e);
@@ -2148,7 +2148,7 @@ class Ar {
2148
2148
  }
2149
2149
  init(t) {
2150
2150
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2151
- this.prefix = r.prefix || "i18next:", this.logger = t || au, this.options = r, this.debug = r.debug;
2151
+ this.prefix = r.prefix || "i18next:", this.logger = t || iu, this.options = r, this.debug = r.debug;
2152
2152
  }
2153
2153
  log() {
2154
2154
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
@@ -2306,7 +2306,7 @@ const ys = {}, vs = (e) => !Y(e) && typeof e != "boolean" && typeof e != "number
2306
2306
  class Nr extends Ur {
2307
2307
  constructor(t) {
2308
2308
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2309
- super(), Jc(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = r, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Ie.create("translator");
2309
+ super(), Qc(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = r, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Ie.create("translator");
2310
2310
  }
2311
2311
  changeLanguage(t) {
2312
2312
  t && (this.language = t);
@@ -2322,7 +2322,7 @@ class Nr extends Ur {
2322
2322
  n === void 0 && (n = ":");
2323
2323
  const s = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator;
2324
2324
  let o = r.ns || this.options.defaultNS || [];
2325
- const a = n && t.indexOf(n) > -1, i = !this.options.userDefinedKeySeparator && !r.keySeparator && !this.options.userDefinedNsSeparator && !r.nsSeparator && !ou(t, n, s);
2325
+ const a = n && t.indexOf(n) > -1, i = !this.options.userDefinedKeySeparator && !r.keySeparator && !this.options.userDefinedNsSeparator && !r.nsSeparator && !au(t, n, s);
2326
2326
  if (a && !i) {
2327
2327
  const c = t.match(this.interpolator.nestingRegexp);
2328
2328
  if (c && c.length > 0)
@@ -2628,7 +2628,7 @@ const Es = {
2628
2628
  pluralCategories: ["one", "other"]
2629
2629
  })
2630
2630
  };
2631
- class iu {
2631
+ class cu {
2632
2632
  constructor(t) {
2633
2633
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2634
2634
  this.languageUtils = t, this.options = r, this.logger = Ie.create("pluralResolver"), this.pluralRulesCache = {};
@@ -2680,10 +2680,10 @@ class iu {
2680
2680
  }
2681
2681
  }
2682
2682
  const _s = function(e, t, r) {
2683
- let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = Zc(e, t, r);
2683
+ let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = eu(e, t, r);
2684
2684
  return !o && s && Y(r) && (o = On(e, r, n), o === void 0 && (o = On(t, r, n))), o;
2685
2685
  }, tn = (e) => e.replace(/\$/g, "$$$$");
2686
- class cu {
2686
+ class uu {
2687
2687
  constructor() {
2688
2688
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2689
2689
  this.logger = Ie.create("interpolator"), this.options = t, this.format = t?.interpolation?.format || ((r) => r), this.init(t);
@@ -2712,7 +2712,7 @@ class cu {
2712
2712
  maxReplaces: h,
2713
2713
  alwaysFormat: u
2714
2714
  } = t.interpolation;
2715
- this.escape = r !== void 0 ? r : tu, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? We(o) : a || "{{", this.suffix = i ? We(i) : c || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : m || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = y ? We(y) : S || We("$t("), this.nestingSuffix = v ? We(v) : g || We(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces = h || 1e3, this.alwaysFormat = u !== void 0 ? u : !1, this.resetRegExp();
2715
+ this.escape = r !== void 0 ? r : ru, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? We(o) : a || "{{", this.suffix = i ? We(i) : c || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : m || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = y ? We(y) : S || We("$t("), this.nestingSuffix = v ? We(v) : g || We(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces = h || 1e3, this.alwaysFormat = u !== void 0 ? u : !1, this.resetRegExp();
2716
2716
  }
2717
2717
  reset() {
2718
2718
  this.options && this.init(this.options);
@@ -2807,7 +2807,7 @@ class cu {
2807
2807
  return t;
2808
2808
  }
2809
2809
  }
2810
- const uu = (e) => {
2810
+ const lu = (e) => {
2811
2811
  let t = e.toLowerCase().trim();
2812
2812
  const r = {};
2813
2813
  if (e.indexOf("(") > -1) {
@@ -2838,7 +2838,7 @@ const uu = (e) => {
2838
2838
  return i || (i = e(Or(n), s), t[a] = i), i(r);
2839
2839
  };
2840
2840
  };
2841
- class lu {
2841
+ class du {
2842
2842
  constructor() {
2843
2843
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2844
2844
  this.logger = Ie.create("formatter"), this.options = t, this.formats = {
@@ -2898,7 +2898,7 @@ class lu {
2898
2898
  const {
2899
2899
  formatName: d,
2900
2900
  formatOptions: l
2901
- } = uu(c);
2901
+ } = lu(c);
2902
2902
  if (this.formats[d]) {
2903
2903
  let m = i;
2904
2904
  try {
@@ -2918,10 +2918,10 @@ class lu {
2918
2918
  }, t);
2919
2919
  }
2920
2920
  }
2921
- const du = (e, t) => {
2921
+ const fu = (e, t) => {
2922
2922
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
2923
2923
  };
2924
- class fu extends Ur {
2924
+ class hu extends Ur {
2925
2925
  constructor(t, r, n) {
2926
2926
  let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2927
2927
  super(), this.backend = t, this.store = r, this.services = n, this.languageUtils = n.languageUtils, this.options = s, this.logger = Ie.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, s.backend, s);
@@ -2954,7 +2954,7 @@ class fu extends Ur {
2954
2954
  }), this.state[t] = r ? -1 : 2, r && n && (this.state[t] = 0);
2955
2955
  const i = {};
2956
2956
  this.queue.forEach((c) => {
2957
- Xc(c.loaded, [o], a), du(c, t), r && c.errors.push(r), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((d) => {
2957
+ Zc(c.loaded, [o], a), fu(c, t), r && c.errors.push(r), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((d) => {
2958
2958
  i[d] || (i[d] = {});
2959
2959
  const l = c.loaded[d];
2960
2960
  l.length && l.forEach((m) => {
@@ -3113,7 +3113,7 @@ const Ss = () => ({
3113
3113
  skipOnVariables: !0
3114
3114
  }
3115
3115
  }), Rs = (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 = () => {
3116
- }, hu = (e) => {
3116
+ }, pu = (e) => {
3117
3117
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((r) => {
3118
3118
  typeof e[r] == "function" && (e[r] = e[r].bind(e));
3119
3119
  });
@@ -3123,7 +3123,7 @@ class _t extends Ur {
3123
3123
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
3124
3124
  if (super(), this.options = Rs(t), this.services = {}, this.logger = Ie, this.modules = {
3125
3125
  external: []
3126
- }, hu(this), r && !this.isInitialized && !t.isClone) {
3126
+ }, pu(this), r && !this.isInitialized && !t.isClone) {
3127
3127
  if (!this.options.initAsync)
3128
3128
  return this.init(t, r), this;
3129
3129
  setTimeout(() => {
@@ -3148,16 +3148,16 @@ class _t extends Ur {
3148
3148
  if (!this.options.isClone) {
3149
3149
  this.modules.logger ? Ie.init(o(this.modules.logger), this.options) : Ie.init(null, this.options);
3150
3150
  let l;
3151
- this.modules.formatter ? l = this.modules.formatter : l = lu;
3151
+ this.modules.formatter ? l = this.modules.formatter : l = du;
3152
3152
  const m = new ws(this.options);
3153
3153
  this.store = new gs(this.options.resources, this.options);
3154
3154
  const y = this.services;
3155
- y.logger = Ie, y.resourceStore = this.store, y.languageUtils = m, y.pluralResolver = new iu(m, {
3155
+ y.logger = Ie, y.resourceStore = this.store, y.languageUtils = m, y.pluralResolver = new cu(m, {
3156
3156
  prepend: this.options.pluralSeparator,
3157
3157
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
3158
- }), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (y.formatter = o(l), y.formatter.init(y, this.options), this.options.interpolation.format = y.formatter.format.bind(y.formatter)), y.interpolator = new cu(this.options), y.utils = {
3158
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (y.formatter = o(l), y.formatter.init(y, this.options), this.options.interpolation.format = y.formatter.format.bind(y.formatter)), y.interpolator = new uu(this.options), y.utils = {
3159
3159
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
3160
- }, y.backendConnector = new fu(o(this.modules.backend), y.resourceStore, y, this.options), y.backendConnector.on("*", function(S) {
3160
+ }, y.backendConnector = new hu(o(this.modules.backend), y.resourceStore, y, this.options), y.backendConnector.on("*", function(S) {
3161
3161
  for (var v = arguments.length, g = new Array(v > 1 ? v - 1 : 0), f = 1; f < v; f++)
3162
3162
  g[f - 1] = arguments[f];
3163
3163
  t.emit(S, ...g);
@@ -3384,20 +3384,20 @@ ue.hasLoadedNamespace;
3384
3384
  ue.loadNamespaces;
3385
3385
  ue.loadLanguages;
3386
3386
  const {
3387
- slice: pu,
3388
- forEach: mu
3387
+ slice: mu,
3388
+ forEach: gu
3389
3389
  } = [];
3390
- function gu(e) {
3391
- return mu.call(pu.call(arguments, 1), (t) => {
3390
+ function yu(e) {
3391
+ return gu.call(mu.call(arguments, 1), (t) => {
3392
3392
  if (t)
3393
3393
  for (const r in t)
3394
3394
  e[r] === void 0 && (e[r] = t[r]);
3395
3395
  }), e;
3396
3396
  }
3397
- function yu(e) {
3397
+ function vu(e) {
3398
3398
  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));
3399
3399
  }
3400
- const Ts = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vu = function(e, t) {
3400
+ const Ts = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, wu = function(e, t) {
3401
3401
  const n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
3402
3402
  path: "/"
3403
3403
  }, s = encodeURIComponent(t);
@@ -3446,7 +3446,7 @@ const Ts = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vu = function(e, t) {
3446
3446
  path: "/",
3447
3447
  sameSite: "strict"
3448
3448
  };
3449
- r && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + r * 60 * 1e3)), n && (s.domain = n), document.cookie = vu(e, t, s);
3449
+ r && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + r * 60 * 1e3)), n && (s.domain = n), document.cookie = wu(e, t, s);
3450
3450
  },
3451
3451
  read(e) {
3452
3452
  const t = `${e}=`, r = document.cookie.split(";");
@@ -3461,7 +3461,7 @@ const Ts = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vu = function(e, t) {
3461
3461
  this.create(e, "", -1, t);
3462
3462
  }
3463
3463
  };
3464
- var wu = {
3464
+ var Eu = {
3465
3465
  name: "cookie",
3466
3466
  // Deconstruct the options object and extract the lookupCookie property
3467
3467
  lookup(e) {
@@ -3481,7 +3481,7 @@ var wu = {
3481
3481
  } = t;
3482
3482
  r && typeof document < "u" && Os.create(r, e, n, s, o);
3483
3483
  }
3484
- }, Eu = {
3484
+ }, bu = {
3485
3485
  name: "querystring",
3486
3486
  // Deconstruct the options object and extract the lookupQuerystring property
3487
3487
  lookup(e) {
@@ -3501,7 +3501,7 @@ var wu = {
3501
3501
  }
3502
3502
  return r;
3503
3503
  }
3504
- }, bu = {
3504
+ }, _u = {
3505
3505
  name: "hash",
3506
3506
  // Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
3507
3507
  lookup(e) {
@@ -3545,7 +3545,7 @@ const As = () => {
3545
3545
  }
3546
3546
  return Qe;
3547
3547
  };
3548
- var _u = {
3548
+ var Su = {
3549
3549
  name: "localStorage",
3550
3550
  // Deconstruct the options object and extract the lookupLocalStorage property
3551
3551
  lookup(e) {
@@ -3576,7 +3576,7 @@ const Ns = () => {
3576
3576
  }
3577
3577
  return Xe;
3578
3578
  };
3579
- var Su = {
3579
+ var Ru = {
3580
3580
  name: "sessionStorage",
3581
3581
  lookup(e) {
3582
3582
  let {
@@ -3591,7 +3591,7 @@ var Su = {
3591
3591
  } = t;
3592
3592
  r && Ns() && window.sessionStorage.setItem(r, e);
3593
3593
  }
3594
- }, Ru = {
3594
+ }, Tu = {
3595
3595
  name: "navigator",
3596
3596
  lookup(e) {
3597
3597
  const t = [];
@@ -3608,7 +3608,7 @@ var Su = {
3608
3608
  }
3609
3609
  return t.length > 0 ? t : void 0;
3610
3610
  }
3611
- }, Tu = {
3611
+ }, Ou = {
3612
3612
  name: "htmlTag",
3613
3613
  // Deconstruct the options object and extract the htmlTag property
3614
3614
  lookup(e) {
@@ -3618,7 +3618,7 @@ var Su = {
3618
3618
  const n = t || (typeof document < "u" ? document.documentElement : null);
3619
3619
  return n && typeof n.getAttribute == "function" && (r = n.getAttribute("lang")), r;
3620
3620
  }
3621
- }, Ou = {
3621
+ }, Au = {
3622
3622
  name: "path",
3623
3623
  // Deconstruct the options object and extract the lookupFromPathIndex property
3624
3624
  lookup(e) {
@@ -3629,7 +3629,7 @@ var Su = {
3629
3629
  const r = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
3630
3630
  return Array.isArray(r) ? r[typeof t == "number" ? t : 0]?.replace("/", "") : void 0;
3631
3631
  }
3632
- }, Au = {
3632
+ }, Nu = {
3633
3633
  name: "subdomain",
3634
3634
  lookup(e) {
3635
3635
  let {
@@ -3647,7 +3647,7 @@ try {
3647
3647
  }
3648
3648
  const Na = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
3649
3649
  Aa || Na.splice(1, 1);
3650
- const Nu = () => ({
3650
+ const $u = () => ({
3651
3651
  order: Na,
3652
3652
  lookupQuerystring: "lng",
3653
3653
  lookupCookie: "i18next",
@@ -3669,7 +3669,7 @@ class $a {
3669
3669
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
3670
3670
  languageUtils: {}
3671
3671
  }, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3672
- this.services = t, this.options = gu(r, this.options || {}, Nu()), 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(wu), this.addDetector(Eu), this.addDetector(_u), this.addDetector(Su), this.addDetector(Ru), this.addDetector(Tu), this.addDetector(Ou), this.addDetector(Au), this.addDetector(bu);
3672
+ this.services = t, this.options = yu(r, this.options || {}, $u()), 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(Eu), this.addDetector(bu), this.addDetector(Su), this.addDetector(Ru), this.addDetector(Tu), this.addDetector(Ou), this.addDetector(Au), this.addDetector(Nu), this.addDetector(_u);
3673
3673
  }
3674
3674
  addDetector(t) {
3675
3675
  return this.detectors[t.name] = t, this;
@@ -3681,7 +3681,7 @@ class $a {
3681
3681
  let s = this.detectors[n].lookup(this.options);
3682
3682
  s && typeof s == "string" && (s = [s]), s && (r = r.concat(s));
3683
3683
  }
3684
- }), r = r.filter((n) => n != null && !yu(n)).map((n) => this.options.convertDetectedLanguage(n)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? r : r.length > 0 ? r[0] : null;
3684
+ }), r = r.filter((n) => n != null && !vu(n)).map((n) => this.options.convertDetectedLanguage(n)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? r : r.length > 0 ? r[0] : null;
3685
3685
  }
3686
3686
  cacheUserLanguage(t) {
3687
3687
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
@@ -3691,7 +3691,7 @@ class $a {
3691
3691
  }
3692
3692
  }
3693
3693
  $a.type = "languageDetector";
3694
- const $u = process.env.PUBLIC_URL ?? "/", le = "/openmrs/ws/fhir2/R4", Z = "/openmrs/ws/rest/v1", Pu = "/openmrs/ws/rest/v2", Iu = "bahmni.user", Mm = "/bahmni/home/index.html", Du = Z + "/session", Cu = "en", Pa = "NG_TRANSLATE_LANG_KEY", Lu = (e, t) => $u + `${e}/locales/locale_${t}.json`, ku = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(Pa) ?? Cu, $s = async (e) => {
3694
+ const Pu = process.env.PUBLIC_URL ?? "/", le = "/openmrs/ws/fhir2/R4", Z = "/openmrs/ws/rest/v1", Iu = "/openmrs/ws/rest/v2", Du = "bahmni.user", Fm = "/bahmni/home/index.html", Cu = Z + "/session", Lu = "en", Pa = "NG_TRANSLATE_LANG_KEY", ku = (e, t) => Pu + `${e}/locales/locale_${t}.json`, xu = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(Pa) ?? Lu, $s = async (e) => {
3695
3695
  try {
3696
3696
  const t = await z(e);
3697
3697
  return t || (console.error(`Invalid response from ${e}`), {});
@@ -3701,24 +3701,24 @@ const $u = process.env.PUBLIC_URL ?? "/", le = "/openmrs/ws/fhir2/R4", Z = "/ope
3701
3701
  }, Ps = async (e, t) => {
3702
3702
  let r = {}, n = {};
3703
3703
  return r = await $s(
3704
- Lu(e, t)
3705
- ), n = await $s(
3706
3704
  ku(e, t)
3705
+ ), n = await $s(
3706
+ xu(e, t)
3707
3707
  ), {
3708
3708
  ...r,
3709
3709
  ...n
3710
3710
  };
3711
- }, xu = async (e, t) => {
3711
+ }, Uu = async (e, t) => {
3712
3712
  const r = {};
3713
3713
  return r[e] = {
3714
3714
  [t]: await Ps(t, e)
3715
3715
  }, e !== "en" && (r.en = {
3716
3716
  [t]: await Ps(t, "en")
3717
3717
  }), r;
3718
- }, jm = (e, t) => {
3718
+ }, Vm = (e, t) => {
3719
3719
  const r = e.toUpperCase(), n = t.toUpperCase().replace(/\s+/g, "_").replace(/[^A-Z0-9_]/g, "");
3720
3720
  return `${r}_${n}`;
3721
- }, Uu = (e, t) => {
3721
+ }, qu = (e, t) => {
3722
3722
  const r = {
3723
3723
  labels: {},
3724
3724
  concepts: {}
@@ -3732,8 +3732,8 @@ const $u = process.env.PUBLIC_URL ?? "/", le = "/openmrs/ws/fhir2/R4", Z = "/ope
3732
3732
  labels: n.labels ?? {},
3733
3733
  concepts: n.concepts ?? {}
3734
3734
  };
3735
- }, Fm = async (e) => {
3736
- const t = qr(), r = await xu(t, e);
3735
+ }, Hm = async (e) => {
3736
+ const t = qr(), r = await Uu(t, e);
3737
3737
  return await ue.use($a).use(oi).init({
3738
3738
  fallbackLng: "en",
3739
3739
  ns: [e],
@@ -3751,7 +3751,7 @@ const $u = process.env.PUBLIC_URL ?? "/", le = "/openmrs/ws/fhir2/R4", Z = "/ope
3751
3751
  }
3752
3752
  }), ue;
3753
3753
  };
3754
- function Vm() {
3754
+ function Bm() {
3755
3755
  const e = wn(null), t = wn(null), r = Yr(async () => {
3756
3756
  t.current && (t.current.getTracks().forEach((a) => a.stop()), t.current = null);
3757
3757
  const o = await navigator.mediaDevices.getUserMedia({
@@ -3774,11 +3774,11 @@ function Vm() {
3774
3774
  }, []);
3775
3775
  return En(() => () => n(), [n]), { videoRef: e, start: r, stop: n, capture: s };
3776
3776
  }
3777
- const qu = "bahmni.enableAuditLog", Ia = (e) => `${Z}/bahmnicore/sql/globalproperty?property=${e}`, Hm = async (e, t, r) => {
3777
+ const Mu = "bahmni.enableAuditLog", Ia = (e) => `${Z}/bahmnicore/sql/globalproperty?property=${e}`, zm = async (e, t, r) => {
3778
3778
  const { exact: n = !0, refetchActiveNow: s = !0 } = r ?? {};
3779
3779
  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" });
3780
- }, Bm = () => Math.random().toString(36).substring(2, 9);
3781
- function zm(e, t = " -") {
3780
+ }, Gm = () => Math.random().toString(36).substring(2, 9);
3781
+ function Km(e, t = " -") {
3782
3782
  return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
3783
3783
  }
3784
3784
  function Da(e) {
@@ -3790,7 +3790,7 @@ function Da(e) {
3790
3790
  }
3791
3791
  return "";
3792
3792
  }
3793
- const Gm = (e) => !e || e.trim().length === 0, Km = (e, t) => {
3793
+ const Ym = (e) => !e || e.trim().length === 0, Wm = (e, t) => {
3794
3794
  if (!e || !t || t.length === 0)
3795
3795
  return 999;
3796
3796
  const r = t.findIndex(
@@ -3798,7 +3798,7 @@ const Gm = (e) => !e || e.trim().length === 0, Km = (e, t) => {
3798
3798
  );
3799
3799
  return r === -1 ? 999 : r;
3800
3800
  };
3801
- function Ym(e, t) {
3801
+ function Jm(e, t) {
3802
3802
  if (!e || e.length === 0)
3803
3803
  return [];
3804
3804
  const r = /* @__PURE__ */ new Map();
@@ -3810,7 +3810,7 @@ function Ym(e, t) {
3810
3810
  items: s
3811
3811
  }));
3812
3812
  }
3813
- function Wm(e, t, r) {
3813
+ function Qm(e, t, r) {
3814
3814
  if (!e || e.length === 0)
3815
3815
  return [];
3816
3816
  const n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
@@ -3824,27 +3824,27 @@ function Wm(e, t, r) {
3824
3824
  return !i && !c;
3825
3825
  });
3826
3826
  }
3827
- function Mu(e) {
3827
+ function ju(e) {
3828
3828
  const t = /\+/g, r = /([^&=]+)=?([^&]*)/g, n = (i) => decodeURIComponent(i.replace(t, " ")), s = e ?? window.location.search.substring(1), o = {};
3829
3829
  let a;
3830
3830
  for (; (a = r.exec(s)) !== null; )
3831
3831
  o[n(a[1])] = n(a[2]);
3832
3832
  return o;
3833
3833
  }
3834
- function Jm(e, t, r) {
3834
+ function Xm(e, t, r) {
3835
3835
  const n = /{{([^}]*)}}/g, s = e.match(n);
3836
3836
  let o = e;
3837
- const a = r ?? !1, i = a ? Mu() : {};
3837
+ const a = r ?? !1, i = a ? ju() : {};
3838
3838
  return s && s.forEach((c) => {
3839
3839
  const d = c.replace("{{", "").replace("}}", "");
3840
3840
  let l = t[d];
3841
3841
  !l && a && (l = i[d] || ""), o = o.replace(c, l);
3842
3842
  }), o.trim();
3843
3843
  }
3844
- const ju = (e) => new Promise((t, r) => {
3844
+ const Fu = (e) => new Promise((t, r) => {
3845
3845
  const n = new FileReader();
3846
3846
  n.onloadend = () => t(n.result), n.onerror = r, n.readAsDataURL(e);
3847
- }), Qm = (e) => {
3847
+ }), Zm = (e) => {
3848
3848
  if (typeof e == "number" && !isNaN(e))
3849
3849
  return "number";
3850
3850
  if (typeof e != "string")
@@ -3852,29 +3852,29 @@ const ju = (e) => new Promise((t, r) => {
3852
3852
  const t = e.toLowerCase();
3853
3853
  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";
3854
3854
  };
3855
- function Xm(e) {
3855
+ function eg(e) {
3856
3856
  return e.replace(/[\s-]+/g, "_").replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toUpperCase();
3857
3857
  }
3858
- function Zm(e) {
3858
+ function tg(e) {
3859
3859
  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()) : "";
3860
3860
  }
3861
- const Fu = (e) => Z + `/user?username=${e}&v=custom:(username,uuid)`, Vu = "bahmni.user.location", Hu = (e) => Z + `/bahmni/app/setting?module=${e}`, Bu = "default_dateFormat";
3862
- async function eg() {
3863
- const e = Da(Iu);
3861
+ const Vu = (e) => Z + `/user?username=${e}&v=custom:(username,uuid)`, Hu = "bahmni.user.location", Bu = (e) => Z + `/bahmni/app/setting?module=${e}`, zu = "default_dateFormat";
3862
+ async function rg() {
3863
+ const e = Da(Du);
3864
3864
  if (!e)
3865
3865
  return null;
3866
3866
  try {
3867
3867
  const t = decodeURIComponent(e).replace(
3868
3868
  /^"(.*)"$/,
3869
3869
  "$1"
3870
- ), r = await z(Fu(t));
3870
+ ), r = await z(Vu(t));
3871
3871
  return !r.results || r.results.length === 0 ? null : r.results[0];
3872
3872
  } catch {
3873
3873
  throw new Error(ue.t("ERROR_FETCHING_USER_DETAILS"));
3874
3874
  }
3875
3875
  }
3876
3876
  const xn = () => {
3877
- const e = Da(Vu) ?? null;
3877
+ const e = Da(Hu) ?? null;
3878
3878
  if (!e)
3879
3879
  throw new Error(ue.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
3880
3880
  const t = JSON.parse(
@@ -3883,8 +3883,8 @@ const xn = () => {
3883
3883
  if (!t.name || !t.uuid)
3884
3884
  throw new Error(ue.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
3885
3885
  return t;
3886
- }, tg = async () => (await z(Hu("commons"))).find(
3887
- (r) => r.property === Bu
3886
+ }, ng = async () => (await z(Bu("commons"))).find(
3887
+ (r) => r.property === zu
3888
3888
  )?.value ?? null, Un = {
3889
3889
  person: {
3890
3890
  searchParam: "customAttribute",
@@ -3896,14 +3896,14 @@ const xn = () => {
3896
3896
  searchFieldParam: "addressFieldName",
3897
3897
  resultParam: "addressSearchResultsConfig"
3898
3898
  }
3899
- }, zu = (e, t) => {
3899
+ }, Gu = (e, t) => {
3900
3900
  t.forEach((r) => {
3901
3901
  const n = Un[r.type];
3902
3902
  n && r.fields.forEach((s) => {
3903
3903
  e.append(n.resultParam, s);
3904
3904
  });
3905
3905
  });
3906
- }, Gu = (e) => le + `/Patient/${e}`, Ku = (e, t, r) => {
3906
+ }, Ku = (e) => le + `/Patient/${e}`, Yu = (e, t, r) => {
3907
3907
  const n = new URLSearchParams({
3908
3908
  filterOnAllIdentifiers: "false",
3909
3909
  identifier: e,
@@ -3918,7 +3918,7 @@ const xn = () => {
3918
3918
  n.append(o.searchFieldParam, a), n.append(o.resultParam, a);
3919
3919
  });
3920
3920
  }), `${Z}/bahmni/search/patient/lucene?${n.toString()}`;
3921
- }, Yu = (e, t, r, n, s) => {
3921
+ }, Wu = (e, t, r, n, s) => {
3922
3922
  const o = e.trim(), a = new URLSearchParams({
3923
3923
  loginLocationUuid: s,
3924
3924
  startIndex: "0",
@@ -3927,60 +3927,60 @@ const xn = () => {
3927
3927
  }), i = Un[t];
3928
3928
  return i && (a.set(i.searchParam, o), r.forEach((c) => {
3929
3929
  a.append(i.searchFieldParam, c);
3930
- })), zu(a, n), Z + `/bahmni/search/patient?${a.toString()}`;
3931
- }, Ca = Z + "/idgen/identifiertype", Wu = (e) => Z + `/bahmni/app/setting?module=${e}`, Ju = "bahmni.primaryIdentifierType", Qu = Z + "/bahmnicore/patientprofile", Xu = (e) => Z + `/bahmnicore/patientprofile/${e}`, Zu = (e) => Z + `/patientprofile/${e}?v=full`, el = (e, t, r = 20, n) => {
3930
+ })), Gu(a, n), Z + `/bahmni/search/patient?${a.toString()}`;
3931
+ }, Ca = Z + "/idgen/identifiertype", Ju = (e) => Z + `/bahmni/app/setting?module=${e}`, Qu = "bahmni.primaryIdentifierType", Xu = Z + "/bahmnicore/patientprofile", Zu = (e) => Z + `/bahmnicore/patientprofile/${e}`, el = (e) => Z + `/patientprofile/${e}?v=full`, tl = (e, t, r = 20, n) => {
3932
3932
  let s = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${e}&limit=${r}&searchString=${encodeURIComponent(t)}`;
3933
3933
  return n && (s += `&parent=${n}`), s;
3934
- }, tl = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", rl = Z + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", nl = 20, sl = 2, rg = 120, ng = 50, sg = 15, ol = /^[a-f0-9-]{36}$/i, al = (e) => Pu + `/patientImage?patientUuid=${e}`, il = Z + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", cl = async (e) => {
3934
+ }, rl = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", nl = Z + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", sl = 20, ol = 2, sg = 120, og = 50, ag = 15, al = /^[a-f0-9-]{36}$/i, il = (e) => Iu + `/patientImage?patientUuid=${e}`, cl = Z + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", ul = async (e) => {
3935
3935
  if (!e || e.trim() === "")
3936
3936
  throw new Error("Invalid patient UUID: UUID cannot be empty");
3937
- if (!ol.test(e))
3937
+ if (!al.test(e))
3938
3938
  throw new Error(`Invalid patient UUID format: ${e}`);
3939
- return z(Gu(e));
3940
- }, ul = (e) => !e.extension || !Array.isArray(e.extension) ? [] : e.extension.flatMap((t) => t.extension && Array.isArray(t.extension) ? t.extension.filter((r) => r.valueString).map((r) => r.valueString) : []), ll = (e) => {
3939
+ return z(Ku(e));
3940
+ }, ll = (e) => !e.extension || !Array.isArray(e.extension) ? [] : e.extension.flatMap((t) => t.extension && Array.isArray(t.extension) ? t.extension.filter((r) => r.valueString).map((r) => r.valueString) : []), dl = (e) => {
3941
3941
  if (!e.name || e.name.length === 0)
3942
3942
  return null;
3943
3943
  const t = e.name[0], r = t.given?.join(" ") ?? "", n = t.family ?? "";
3944
3944
  return !r && !n ? null : `${r} ${n}`.trim();
3945
- }, dl = (e) => {
3945
+ }, fl = (e) => {
3946
3946
  if (!e) return null;
3947
3947
  const t = [
3948
3948
  ...e.line ?? [],
3949
3949
  // Standard address lines
3950
- ...ul(e)
3950
+ ...ll(e)
3951
3951
  // Extracted address extensions
3952
3952
  ], r = e.city ?? "", n = e.state ?? "", s = e.postalCode ?? "", o = t.filter(Boolean);
3953
3953
  return r && o.push(r), n && s ? o.push(`${n} ${s}`) : n ? o.push(n) : s && o.push(s), o.length > 0 ? o.join(", ").trim() : null;
3954
- }, fl = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, hl = (e) => {
3955
- const t = e.address && e.address.length > 0 ? dl(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? fl(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
3954
+ }, hl = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, pl = (e) => {
3955
+ const t = e.address && e.address.length > 0 ? fl(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? hl(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
3956
3956
  return n.length > 0 && n.forEach((o) => {
3957
3957
  !o.type?.text || !o.value || s.set(o.type.text, o.value);
3958
3958
  }), {
3959
3959
  id: e.id ?? "",
3960
- fullName: ll(e),
3960
+ fullName: dl(e),
3961
3961
  gender: e.gender ?? null,
3962
3962
  birthDate: e.birthDate ?? null,
3963
3963
  formattedAddress: t,
3964
3964
  formattedContact: r,
3965
3965
  identifiers: s
3966
3966
  };
3967
- }, og = async (e) => {
3968
- const t = await cl(e);
3969
- return hl(t);
3970
- }, ag = async (e) => {
3971
- const t = await fetch(al(e));
3967
+ }, ig = async (e) => {
3968
+ const t = await ul(e);
3969
+ return pl(t);
3970
+ }, cg = async (e) => {
3971
+ const t = await fetch(il(e));
3972
3972
  if (!t.ok) return null;
3973
3973
  const r = await t.blob();
3974
- return await ju(r);
3975
- }, ig = async (e, t) => {
3974
+ return await Fu(r);
3975
+ }, ug = async (e, t) => {
3976
3976
  const r = xn();
3977
3977
  return await z(
3978
- Ku(e, r.uuid, t)
3978
+ Yu(e, r.uuid, t)
3979
3979
  );
3980
- }, cg = async (e, t, r, n, s) => {
3980
+ }, lg = async (e, t, r, n, s) => {
3981
3981
  const o = xn();
3982
3982
  return await z(
3983
- Yu(
3983
+ Wu(
3984
3984
  e,
3985
3985
  t,
3986
3986
  r,
@@ -3988,12 +3988,12 @@ const xn = () => {
3988
3988
  o.uuid
3989
3989
  )
3990
3990
  );
3991
- }, ug = async () => z(Ca), pl = async () => (await z(Wu("core"))).find(
3992
- (r) => r.property === Ju
3993
- )?.value ?? null, lg = async () => {
3991
+ }, dg = async () => z(Ca), ml = async () => (await z(Ju("core"))).find(
3992
+ (r) => r.property === Qu
3993
+ )?.value ?? null, fg = async () => {
3994
3994
  const [e, t] = await Promise.all([
3995
3995
  z(Ca),
3996
- pl()
3996
+ ml()
3997
3997
  ]), r = [], n = /* @__PURE__ */ new Map();
3998
3998
  if (!t)
3999
3999
  return { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: null };
@@ -4007,25 +4007,25 @@ const xn = () => {
4007
4007
  sourcesByPrefix: n,
4008
4008
  primaryIdentifierTypeUuid: t
4009
4009
  }) : { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: t };
4010
- }, dg = async (e) => Me(Qu, e), fg = async (e, t) => Me(
4011
- Xu(e),
4010
+ }, hg = async (e) => Me(Xu, e), pg = async (e, t) => Me(
4011
+ Zu(e),
4012
4012
  t
4013
- ), hg = async () => z(Ia("mrs.genders")), pg = async (e, t, r = nl, n) => {
4014
- if (!t || t.length < sl)
4013
+ ), mg = async () => z(Ia("mrs.genders")), gg = async (e, t, r = sl, n) => {
4014
+ if (!t || t.length < ol)
4015
4015
  return [];
4016
4016
  try {
4017
4017
  return await z(
4018
- el(e, t, r, n)
4018
+ tl(e, t, r, n)
4019
4019
  );
4020
4020
  } catch (s) {
4021
4021
  throw new Error(
4022
4022
  `Failed to fetch address hierarchy for field "${e}": ${s instanceof Error ? s.message : "Unknown error"}`
4023
4023
  );
4024
4024
  }
4025
- }, mg = async () => z(tl), gg = async (e) => z(Zu(e)), yg = async () => {
4025
+ }, yg = async () => z(rl), vg = async (e) => z(el(e)), wg = async () => {
4026
4026
  try {
4027
4027
  return (await z(
4028
- rl
4028
+ nl
4029
4029
  )).results.map((t) => ({
4030
4030
  uuid: t.uuid,
4031
4031
  aIsToB: t.aIsToB,
@@ -4036,12 +4036,12 @@ const xn = () => {
4036
4036
  `Failed to fetch relationship types: ${e instanceof Error ? e.message : "Unknown error"}`
4037
4037
  );
4038
4038
  }
4039
- }, vg = async () => z(il);
4040
- var ml = /* @__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))(ml || {}), gl = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(gl || {});
4041
- const wg = (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", Eg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", bg = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", _g = (e) => e === "java.lang.Integer" || e === "java.lang.Float", Sg = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", Rg = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", yl = (e) => {
4039
+ }, Eg = async () => z(cl);
4040
+ var gl = /* @__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))(gl || {}), yl = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(yl || {});
4041
+ const bg = (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", _g = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", Sg = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", Rg = (e) => e === "java.lang.Integer" || e === "java.lang.Float", Tg = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", Og = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", vl = (e) => {
4042
4042
  const t = new CustomEvent("bahmni-audit-log", { detail: e });
4043
4043
  window.dispatchEvent(t);
4044
- }, vl = (e) => {
4044
+ }, wl = (e) => {
4045
4045
  const t = (r) => {
4046
4046
  e(r.detail);
4047
4047
  };
@@ -4089,26 +4089,26 @@ const wg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype
4089
4089
  eventType: "VIEWED_RADIOLOGY_RESULTS",
4090
4090
  message: "VIEWED_RADIOLOGY_RESULTS_MESSAGE"
4091
4091
  }
4092
- }, wl = Z + "/auditlog", El = {
4092
+ }, El = Z + "/auditlog", bl = {
4093
4093
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
4094
- }, bl = () => Z + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", _l = Z + "/visit", Sl = (e) => Z + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, Rl = (e) => Z + `/bahmnicore/visitLocation/${e}`, Tg = async () => z(bl()), Tl = async (e) => z(Sl(e)), Ol = async (e) => z(Rl(e)), Al = async (e) => Me(_l, e), Og = async (e) => {
4095
- const t = await Tl(e);
4094
+ }, _l = () => Z + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Sl = Z + "/visit", Rl = (e) => Z + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, Tl = (e) => Z + `/bahmnicore/visitLocation/${e}`, Ag = async () => z(_l()), Ol = async (e) => z(Rl(e)), Al = async (e) => z(Tl(e)), Nl = async (e) => Me(Sl, e), Ng = async (e) => {
4095
+ const t = await Ol(e);
4096
4096
  return t?.results && t.results.length > 0;
4097
- }, Ag = async (e, t) => {
4098
- const r = await Ol(
4097
+ }, $g = async (e, t) => {
4098
+ const r = await Al(
4099
4099
  xn().uuid
4100
4100
  ), n = {
4101
4101
  patient: e,
4102
4102
  visitType: t.uuid,
4103
4103
  location: r.uuid
4104
- }, s = await Al(n);
4105
- return yl({
4104
+ }, s = await Nl(n);
4105
+ return vl({
4106
4106
  eventType: An.OPEN_VISIT.eventType,
4107
4107
  patientUuid: e,
4108
4108
  messageParams: { visitType: t.name },
4109
4109
  module: An.OPEN_VISIT.module
4110
4110
  }), s;
4111
- }, La = 6048e5, Nl = 864e5, qn = 6e4, ka = 36e5, Is = /* @__PURE__ */ Symbol.for("constructDateFrom");
4111
+ }, La = 6048e5, $l = 864e5, qn = 6e4, ka = 36e5, Is = /* @__PURE__ */ Symbol.for("constructDateFrom");
4112
4112
  function Oe(e, t) {
4113
4113
  return typeof e == "function" ? e(t) : e && typeof e == "object" && Is in e ? e[Is](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
4114
4114
  }
@@ -4133,9 +4133,9 @@ function Mr(e, t, r) {
4133
4133
  s
4134
4134
  ), n);
4135
4135
  }
4136
- let $l = {};
4136
+ let Pl = {};
4137
4137
  function jr() {
4138
- return $l;
4138
+ return Pl;
4139
4139
  }
4140
4140
  function St(e, t) {
4141
4141
  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;
@@ -4183,13 +4183,13 @@ function qa(e, t, r) {
4183
4183
  e,
4184
4184
  t
4185
4185
  ), o = Cs(n), a = Cs(s), i = +o - Ds(o), c = +a - Ds(a);
4186
- return Math.round((i - c) / Nl);
4186
+ return Math.round((i - c) / $l);
4187
4187
  }
4188
- function Pl(e, t) {
4188
+ function Il(e, t) {
4189
4189
  const r = Ua(e, t), n = Oe(e, 0);
4190
4190
  return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0), $r(n);
4191
4191
  }
4192
- function Il(e, t, r) {
4192
+ function Dl(e, t, r) {
4193
4193
  const n = de(e, r?.in);
4194
4194
  return n.setTime(n.getTime() + t * qn), n;
4195
4195
  }
@@ -4200,13 +4200,13 @@ function Et(e, t) {
4200
4200
  const r = +de(e) - +de(t);
4201
4201
  return r < 0 ? -1 : r > 0 ? 1 : r;
4202
4202
  }
4203
- function Dl(e) {
4203
+ function Cl(e) {
4204
4204
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
4205
4205
  }
4206
4206
  function $t(e) {
4207
- return !(!Dl(e) && typeof e != "number" || isNaN(+de(e)));
4207
+ return !(!Cl(e) && typeof e != "number" || isNaN(+de(e)));
4208
4208
  }
4209
- function Cl(e, t, r) {
4209
+ function Ll(e, t, r) {
4210
4210
  const [n, s] = ut(
4211
4211
  r?.in,
4212
4212
  e,
@@ -4214,7 +4214,7 @@ function Cl(e, t, r) {
4214
4214
  ), o = n.getFullYear() - s.getFullYear(), a = n.getMonth() - s.getMonth();
4215
4215
  return o * 12 + a;
4216
4216
  }
4217
- function Ll(e, t, r) {
4217
+ function kl(e, t, r) {
4218
4218
  const [n, s] = ut(
4219
4219
  r?.in,
4220
4220
  e,
@@ -4238,17 +4238,17 @@ function Ls(e, t) {
4238
4238
  const r = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
4239
4239
  return r < 0 ? -1 : r > 0 ? 1 : r;
4240
4240
  }
4241
- function kl(e, t) {
4241
+ function xl(e, t) {
4242
4242
  const r = de(e, t?.in);
4243
4243
  return r.setHours(23, 59, 59, 999), r;
4244
4244
  }
4245
- function xl(e, t) {
4245
+ function Ul(e, t) {
4246
4246
  const r = de(e, t?.in), n = r.getMonth();
4247
4247
  return r.setFullYear(r.getFullYear(), n + 1, 0), r.setHours(23, 59, 59, 999), r;
4248
4248
  }
4249
- function Ul(e, t) {
4249
+ function ql(e, t) {
4250
4250
  const r = de(e, t?.in);
4251
- return +kl(r, t) == +xl(r, t);
4251
+ return +xl(r, t) == +Ul(r, t);
4252
4252
  }
4253
4253
  function jn(e, t, r) {
4254
4254
  const [n, s, o] = ut(
@@ -4257,12 +4257,12 @@ function jn(e, t, r) {
4257
4257
  e,
4258
4258
  t
4259
4259
  ), a = Et(s, o), i = Math.abs(
4260
- Cl(s, o)
4260
+ Ll(s, o)
4261
4261
  );
4262
4262
  if (i < 1) return 0;
4263
4263
  s.getMonth() === 1 && s.getDate() > 27 && s.setDate(30), s.setMonth(s.getMonth() - a * i);
4264
4264
  let c = Et(s, o) === -a;
4265
- Ul(n) && i === 1 && Et(n, o) === 1 && (c = !1);
4265
+ ql(n) && i === 1 && Et(n, o) === 1 && (c = !1);
4266
4266
  const d = a * (i - +c);
4267
4267
  return d === 0 ? 0 : d;
4268
4268
  }
@@ -4271,16 +4271,16 @@ function Fn(e, t, r) {
4271
4271
  r?.in,
4272
4272
  e,
4273
4273
  t
4274
- ), o = Et(n, s), a = Math.abs(Ll(n, s));
4274
+ ), o = Et(n, s), a = Math.abs(kl(n, s));
4275
4275
  n.setFullYear(1584), s.setFullYear(1584);
4276
4276
  const i = Et(n, s) === -o, c = o * (a - +i);
4277
4277
  return c === 0 ? 0 : c;
4278
4278
  }
4279
- function ql(e, t) {
4279
+ function Ml(e, t) {
4280
4280
  const r = de(e, t?.in);
4281
4281
  return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
4282
4282
  }
4283
- const Ml = {
4283
+ const jl = {
4284
4284
  lessThanXSeconds: {
4285
4285
  one: "less than a second",
4286
4286
  other: "less than {{count}} seconds"
@@ -4342,9 +4342,9 @@ const Ml = {
4342
4342
  one: "almost 1 year",
4343
4343
  other: "almost {{count}} years"
4344
4344
  }
4345
- }, jl = (e, t, r) => {
4345
+ }, Fl = (e, t, r) => {
4346
4346
  let n;
4347
- const s = Ml[e];
4347
+ const s = jl[e];
4348
4348
  return typeof s == "string" ? n = s : t === 1 ? n = s.one : n = s.other.replace("{{count}}", t.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
4349
4349
  };
4350
4350
  function rn(e) {
@@ -4353,42 +4353,42 @@ function rn(e) {
4353
4353
  return e.formats[r] || e.formats[e.defaultWidth];
4354
4354
  };
4355
4355
  }
4356
- const Fl = {
4356
+ const Vl = {
4357
4357
  full: "EEEE, MMMM do, y",
4358
4358
  long: "MMMM do, y",
4359
4359
  medium: "MMM d, y",
4360
4360
  short: "MM/dd/yyyy"
4361
- }, Vl = {
4361
+ }, Hl = {
4362
4362
  full: "h:mm:ss a zzzz",
4363
4363
  long: "h:mm:ss a z",
4364
4364
  medium: "h:mm:ss a",
4365
4365
  short: "h:mm a"
4366
- }, Hl = {
4366
+ }, Bl = {
4367
4367
  full: "{{date}} 'at' {{time}}",
4368
4368
  long: "{{date}} 'at' {{time}}",
4369
4369
  medium: "{{date}}, {{time}}",
4370
4370
  short: "{{date}}, {{time}}"
4371
- }, Bl = {
4371
+ }, zl = {
4372
4372
  date: rn({
4373
- formats: Fl,
4373
+ formats: Vl,
4374
4374
  defaultWidth: "full"
4375
4375
  }),
4376
4376
  time: rn({
4377
- formats: Vl,
4377
+ formats: Hl,
4378
4378
  defaultWidth: "full"
4379
4379
  }),
4380
4380
  dateTime: rn({
4381
- formats: Hl,
4381
+ formats: Bl,
4382
4382
  defaultWidth: "full"
4383
4383
  })
4384
- }, zl = {
4384
+ }, Gl = {
4385
4385
  lastWeek: "'last' eeee 'at' p",
4386
4386
  yesterday: "'yesterday at' p",
4387
4387
  today: "'today at' p",
4388
4388
  tomorrow: "'tomorrow at' p",
4389
4389
  nextWeek: "eeee 'at' p",
4390
4390
  other: "P"
4391
- }, Gl = (e, t, r, n) => zl[e];
4391
+ }, Kl = (e, t, r, n) => Gl[e];
4392
4392
  function ht(e) {
4393
4393
  return (t, r) => {
4394
4394
  const n = r?.context ? String(r.context) : "standalone";
@@ -4404,15 +4404,15 @@ function ht(e) {
4404
4404
  return s[o];
4405
4405
  };
4406
4406
  }
4407
- const Kl = {
4407
+ const Yl = {
4408
4408
  narrow: ["B", "A"],
4409
4409
  abbreviated: ["BC", "AD"],
4410
4410
  wide: ["Before Christ", "Anno Domini"]
4411
- }, Yl = {
4411
+ }, Wl = {
4412
4412
  narrow: ["1", "2", "3", "4"],
4413
4413
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
4414
4414
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
4415
- }, Wl = {
4415
+ }, Jl = {
4416
4416
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
4417
4417
  abbreviated: [
4418
4418
  "Jan",
@@ -4442,7 +4442,7 @@ const Kl = {
4442
4442
  "November",
4443
4443
  "December"
4444
4444
  ]
4445
- }, Jl = {
4445
+ }, Ql = {
4446
4446
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
4447
4447
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
4448
4448
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -4455,7 +4455,7 @@ const Kl = {
4455
4455
  "Friday",
4456
4456
  "Saturday"
4457
4457
  ]
4458
- }, Ql = {
4458
+ }, Xl = {
4459
4459
  narrow: {
4460
4460
  am: "a",
4461
4461
  pm: "p",
@@ -4486,7 +4486,7 @@ const Kl = {
4486
4486
  evening: "evening",
4487
4487
  night: "night"
4488
4488
  }
4489
- }, Xl = {
4489
+ }, Zl = {
4490
4490
  narrow: {
4491
4491
  am: "a",
4492
4492
  pm: "p",
@@ -4517,7 +4517,7 @@ const Kl = {
4517
4517
  evening: "in the evening",
4518
4518
  night: "at night"
4519
4519
  }
4520
- }, Zl = (e, t) => {
4520
+ }, ed = (e, t) => {
4521
4521
  const r = Number(e), n = r % 100;
4522
4522
  if (n > 20 || n < 10)
4523
4523
  switch (n % 10) {
@@ -4529,29 +4529,29 @@ const Kl = {
4529
4529
  return r + "rd";
4530
4530
  }
4531
4531
  return r + "th";
4532
- }, ed = {
4533
- ordinalNumber: Zl,
4532
+ }, td = {
4533
+ ordinalNumber: ed,
4534
4534
  era: ht({
4535
- values: Kl,
4535
+ values: Yl,
4536
4536
  defaultWidth: "wide"
4537
4537
  }),
4538
4538
  quarter: ht({
4539
- values: Yl,
4539
+ values: Wl,
4540
4540
  defaultWidth: "wide",
4541
4541
  argumentCallback: (e) => e - 1
4542
4542
  }),
4543
4543
  month: ht({
4544
- values: Wl,
4544
+ values: Jl,
4545
4545
  defaultWidth: "wide"
4546
4546
  }),
4547
4547
  day: ht({
4548
- values: Jl,
4548
+ values: Ql,
4549
4549
  defaultWidth: "wide"
4550
4550
  }),
4551
4551
  dayPeriod: ht({
4552
- values: Ql,
4552
+ values: Xl,
4553
4553
  defaultWidth: "wide",
4554
- formattingValues: Xl,
4554
+ formattingValues: Zl,
4555
4555
  defaultFormattingWidth: "wide"
4556
4556
  })
4557
4557
  };
@@ -4560,9 +4560,9 @@ function pt(e) {
4560
4560
  const n = r.width, s = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], o = t.match(s);
4561
4561
  if (!o)
4562
4562
  return null;
4563
- const a = o[0], i = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(i) ? rd(i, (m) => m.test(a)) : (
4563
+ const a = o[0], i = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(i) ? nd(i, (m) => m.test(a)) : (
4564
4564
  // [TODO] -- I challenge you to fix the type
4565
- td(i, (m) => m.test(a))
4565
+ rd(i, (m) => m.test(a))
4566
4566
  );
4567
4567
  let d;
4568
4568
  d = e.valueCallback ? e.valueCallback(c) : c, d = r.valueCallback ? (
@@ -4573,17 +4573,17 @@ function pt(e) {
4573
4573
  return { value: d, rest: l };
4574
4574
  };
4575
4575
  }
4576
- function td(e, t) {
4576
+ function rd(e, t) {
4577
4577
  for (const r in e)
4578
4578
  if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
4579
4579
  return r;
4580
4580
  }
4581
- function rd(e, t) {
4581
+ function nd(e, t) {
4582
4582
  for (let r = 0; r < e.length; r++)
4583
4583
  if (t(e[r]))
4584
4584
  return r;
4585
4585
  }
4586
- function nd(e) {
4586
+ function sd(e) {
4587
4587
  return (t, r = {}) => {
4588
4588
  const n = t.match(e.matchPattern);
4589
4589
  if (!n) return null;
@@ -4595,23 +4595,23 @@ function nd(e) {
4595
4595
  return { value: a, rest: i };
4596
4596
  };
4597
4597
  }
4598
- const sd = /^(\d+)(th|st|nd|rd)?/i, od = /\d+/i, ad = {
4598
+ const od = /^(\d+)(th|st|nd|rd)?/i, ad = /\d+/i, id = {
4599
4599
  narrow: /^(b|a)/i,
4600
4600
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
4601
4601
  wide: /^(before christ|before common era|anno domini|common era)/i
4602
- }, id = {
4603
- any: [/^b/i, /^(a|c)/i]
4604
4602
  }, cd = {
4603
+ any: [/^b/i, /^(a|c)/i]
4604
+ }, ud = {
4605
4605
  narrow: /^[1234]/i,
4606
4606
  abbreviated: /^q[1234]/i,
4607
4607
  wide: /^[1234](th|st|nd|rd)? quarter/i
4608
- }, ud = {
4609
- any: [/1/i, /2/i, /3/i, /4/i]
4610
4608
  }, ld = {
4609
+ any: [/1/i, /2/i, /3/i, /4/i]
4610
+ }, dd = {
4611
4611
  narrow: /^[jfmasond]/i,
4612
4612
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
4613
4613
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
4614
- }, dd = {
4614
+ }, fd = {
4615
4615
  narrow: [
4616
4616
  /^j/i,
4617
4617
  /^f/i,
@@ -4640,18 +4640,18 @@ const sd = /^(\d+)(th|st|nd|rd)?/i, od = /\d+/i, ad = {
4640
4640
  /^n/i,
4641
4641
  /^d/i
4642
4642
  ]
4643
- }, fd = {
4643
+ }, hd = {
4644
4644
  narrow: /^[smtwf]/i,
4645
4645
  short: /^(su|mo|tu|we|th|fr|sa)/i,
4646
4646
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
4647
4647
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
4648
- }, hd = {
4648
+ }, pd = {
4649
4649
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
4650
4650
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
4651
- }, pd = {
4651
+ }, md = {
4652
4652
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
4653
4653
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
4654
- }, md = {
4654
+ }, gd = {
4655
4655
  any: {
4656
4656
  am: /^a/i,
4657
4657
  pm: /^p/i,
@@ -4662,61 +4662,61 @@ const sd = /^(\d+)(th|st|nd|rd)?/i, od = /\d+/i, ad = {
4662
4662
  evening: /evening/i,
4663
4663
  night: /night/i
4664
4664
  }
4665
- }, gd = {
4666
- ordinalNumber: nd({
4667
- matchPattern: sd,
4668
- parsePattern: od,
4665
+ }, yd = {
4666
+ ordinalNumber: sd({
4667
+ matchPattern: od,
4668
+ parsePattern: ad,
4669
4669
  valueCallback: (e) => parseInt(e, 10)
4670
4670
  }),
4671
4671
  era: pt({
4672
- matchPatterns: ad,
4672
+ matchPatterns: id,
4673
4673
  defaultMatchWidth: "wide",
4674
- parsePatterns: id,
4674
+ parsePatterns: cd,
4675
4675
  defaultParseWidth: "any"
4676
4676
  }),
4677
4677
  quarter: pt({
4678
- matchPatterns: cd,
4678
+ matchPatterns: ud,
4679
4679
  defaultMatchWidth: "wide",
4680
- parsePatterns: ud,
4680
+ parsePatterns: ld,
4681
4681
  defaultParseWidth: "any",
4682
4682
  valueCallback: (e) => e + 1
4683
4683
  }),
4684
4684
  month: pt({
4685
- matchPatterns: ld,
4685
+ matchPatterns: dd,
4686
4686
  defaultMatchWidth: "wide",
4687
- parsePatterns: dd,
4687
+ parsePatterns: fd,
4688
4688
  defaultParseWidth: "any"
4689
4689
  }),
4690
4690
  day: pt({
4691
- matchPatterns: fd,
4691
+ matchPatterns: hd,
4692
4692
  defaultMatchWidth: "wide",
4693
- parsePatterns: hd,
4693
+ parsePatterns: pd,
4694
4694
  defaultParseWidth: "any"
4695
4695
  }),
4696
4696
  dayPeriod: pt({
4697
- matchPatterns: pd,
4697
+ matchPatterns: md,
4698
4698
  defaultMatchWidth: "any",
4699
- parsePatterns: md,
4699
+ parsePatterns: gd,
4700
4700
  defaultParseWidth: "any"
4701
4701
  })
4702
- }, yd = {
4702
+ }, vd = {
4703
4703
  code: "en-US",
4704
- formatDistance: jl,
4705
- formatLong: Bl,
4706
- formatRelative: Gl,
4707
- localize: ed,
4708
- match: gd,
4704
+ formatDistance: Fl,
4705
+ formatLong: zl,
4706
+ formatRelative: Kl,
4707
+ localize: td,
4708
+ match: yd,
4709
4709
  options: {
4710
4710
  weekStartsOn: 0,
4711
4711
  firstWeekContainsDate: 1
4712
4712
  }
4713
4713
  };
4714
- function vd(e, t) {
4714
+ function wd(e, t) {
4715
4715
  const r = de(e, t?.in);
4716
- return qa(r, ql(r)) + 1;
4716
+ return qa(r, Ml(r)) + 1;
4717
4717
  }
4718
- function wd(e, t) {
4719
- const r = de(e, t?.in), n = +$r(r) - +Pl(r);
4718
+ function Ed(e, t) {
4719
+ const r = de(e, t?.in), n = +$r(r) - +Il(r);
4720
4720
  return Math.round(n / La) + 1;
4721
4721
  }
4722
4722
  function Ma(e, t) {
@@ -4727,12 +4727,12 @@ function Ma(e, t) {
4727
4727
  const d = St(c, t);
4728
4728
  return +r >= +i ? n + 1 : +r >= +d ? n : n - 1;
4729
4729
  }
4730
- function Ed(e, t) {
4730
+ function bd(e, t) {
4731
4731
  const r = jr(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = Ma(e, t), o = Oe(t?.in || e, 0);
4732
4732
  return o.setFullYear(s, 0, n), o.setHours(0, 0, 0, 0), St(o, t);
4733
4733
  }
4734
- function bd(e, t) {
4735
- const r = de(e, t?.in), n = +St(r, t) - +Ed(r, t);
4734
+ function _d(e, t) {
4735
+ const r = de(e, t?.in), n = +St(r, t) - +bd(r, t);
4736
4736
  return Math.round(n / La) + 1;
4737
4737
  }
4738
4738
  function ae(e, t) {
@@ -4972,12 +4972,12 @@ const xe = {
4972
4972
  },
4973
4973
  // Local week of year
4974
4974
  w: function(e, t, r, n) {
4975
- const s = bd(e, n);
4975
+ const s = _d(e, n);
4976
4976
  return t === "wo" ? r.ordinalNumber(s, { unit: "week" }) : ae(s, t.length);
4977
4977
  },
4978
4978
  // ISO week of year
4979
4979
  I: function(e, t, r) {
4980
- const n = wd(e);
4980
+ const n = Ed(e);
4981
4981
  return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : ae(n, t.length);
4982
4982
  },
4983
4983
  // Day of the month
@@ -4986,7 +4986,7 @@ const xe = {
4986
4986
  },
4987
4987
  // Day of year
4988
4988
  D: function(e, t, r) {
4989
- const n = vd(e);
4989
+ const n = wd(e);
4990
4990
  return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : ae(n, t.length);
4991
4991
  },
4992
4992
  // Day of week
@@ -5352,7 +5352,7 @@ const qs = (e, t) => {
5352
5352
  default:
5353
5353
  return t.time({ width: "full" });
5354
5354
  }
5355
- }, _d = (e, t) => {
5355
+ }, Sd = (e, t) => {
5356
5356
  const r = e.match(/(P+)(p+)?/) || [], n = r[1], s = r[2];
5357
5357
  if (!s)
5358
5358
  return qs(e, t);
@@ -5372,45 +5372,45 @@ const qs = (e, t) => {
5372
5372
  break;
5373
5373
  }
5374
5374
  return o.replace("{{date}}", qs(n, t)).replace("{{time}}", ja(s, t));
5375
- }, Sd = {
5375
+ }, Rd = {
5376
5376
  p: ja,
5377
- P: _d
5378
- }, Rd = /^D+$/, Td = /^Y+$/, Od = ["D", "DD", "YY", "YYYY"];
5379
- function Ad(e) {
5380
- return Rd.test(e);
5381
- }
5377
+ P: Sd
5378
+ }, Td = /^D+$/, Od = /^Y+$/, Ad = ["D", "DD", "YY", "YYYY"];
5382
5379
  function Nd(e) {
5383
5380
  return Td.test(e);
5384
5381
  }
5385
- function $d(e, t, r) {
5386
- const n = Pd(e, t, r);
5387
- if (console.warn(n), Od.includes(e)) throw new RangeError(n);
5382
+ function $d(e) {
5383
+ return Od.test(e);
5388
5384
  }
5389
5385
  function Pd(e, t, r) {
5386
+ const n = Id(e, t, r);
5387
+ if (console.warn(n), Ad.includes(e)) throw new RangeError(n);
5388
+ }
5389
+ function Id(e, t, r) {
5390
5390
  const n = e[0] === "Y" ? "years" : "days of the month";
5391
5391
  return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
5392
5392
  }
5393
- const Id = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Dd = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Cd = /^'([^]*?)'?$/, Ld = /''/g, kd = /[a-zA-Z]/;
5394
- function xd(e, t, r) {
5395
- const n = jr(), s = n.locale ?? yd, o = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = de(e, r?.in);
5393
+ const Dd = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Cd = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ld = /^'([^]*?)'?$/, kd = /''/g, xd = /[a-zA-Z]/;
5394
+ function Ud(e, t, r) {
5395
+ const n = jr(), s = n.locale ?? vd, o = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = de(e, r?.in);
5396
5396
  if (!$t(i))
5397
5397
  throw new RangeError("Invalid time value");
5398
- let c = t.match(Dd).map((l) => {
5398
+ let c = t.match(Cd).map((l) => {
5399
5399
  const m = l[0];
5400
5400
  if (m === "p" || m === "P") {
5401
- const y = Sd[m];
5401
+ const y = Rd[m];
5402
5402
  return y(l, s.formatLong);
5403
5403
  }
5404
5404
  return l;
5405
- }).join("").match(Id).map((l) => {
5405
+ }).join("").match(Dd).map((l) => {
5406
5406
  if (l === "''")
5407
5407
  return { isToken: !1, value: "'" };
5408
5408
  const m = l[0];
5409
5409
  if (m === "'")
5410
- return { isToken: !1, value: Ud(l) };
5410
+ return { isToken: !1, value: qd(l) };
5411
5411
  if (ks[m])
5412
5412
  return { isToken: !0, value: l };
5413
- if (m.match(kd))
5413
+ if (m.match(xd))
5414
5414
  throw new RangeError(
5415
5415
  "Format string contains an unescaped latin alphabet character `" + m + "`"
5416
5416
  );
@@ -5425,32 +5425,32 @@ function xd(e, t, r) {
5425
5425
  return c.map((l) => {
5426
5426
  if (!l.isToken) return l.value;
5427
5427
  const m = l.value;
5428
- (Nd(m) || Ad(m)) && $d(m, t, String(e));
5428
+ ($d(m) || Nd(m)) && Pd(m, t, String(e));
5429
5429
  const y = ks[m[0]];
5430
5430
  return y(i, m, s.localize, d);
5431
5431
  }).join("");
5432
5432
  }
5433
- function Ud(e) {
5434
- const t = e.match(Cd);
5435
- return t ? t[1].replace(Ld, "'") : e;
5433
+ function qd(e) {
5434
+ const t = e.match(Ld);
5435
+ return t ? t[1].replace(kd, "'") : e;
5436
5436
  }
5437
- function qd(e, t, r) {
5437
+ function Md(e, t, r) {
5438
5438
  return xa(e, -t, r);
5439
5439
  }
5440
5440
  function Vn(e, t) {
5441
- const r = () => Oe(t?.in, NaN), s = Vd(e);
5441
+ const r = () => Oe(t?.in, NaN), s = Hd(e);
5442
5442
  let o;
5443
5443
  if (s.date) {
5444
- const d = Hd(s.date, 2);
5445
- o = Bd(d.restDateString, d.year);
5444
+ const d = Bd(s.date, 2);
5445
+ o = zd(d.restDateString, d.year);
5446
5446
  }
5447
5447
  if (!o || isNaN(+o)) return r();
5448
5448
  const a = +o;
5449
5449
  let i = 0, c;
5450
- if (s.time && (i = zd(s.time), isNaN(i)))
5450
+ if (s.time && (i = Gd(s.time), isNaN(i)))
5451
5451
  return r();
5452
5452
  if (s.timezone) {
5453
- if (c = Gd(s.timezone), isNaN(c)) return r();
5453
+ if (c = Kd(s.timezone), isNaN(c)) return r();
5454
5454
  } else {
5455
5455
  const d = new Date(a + i), l = de(0, t?.in);
5456
5456
  return l.setFullYear(
@@ -5470,8 +5470,8 @@ const Ct = {
5470
5470
  dateTimeDelimiter: /[T ]/,
5471
5471
  timeZoneDelimiter: /[Z ]/i,
5472
5472
  timezone: /([Z+-].*)$/
5473
- }, Md = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, jd = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Fd = /^([+-])(\d{2})(?::?(\d{2}))?$/;
5474
- function Vd(e) {
5473
+ }, jd = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Fd = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Vd = /^([+-])(\d{2})(?::?(\d{2}))?$/;
5474
+ function Hd(e) {
5475
5475
  const t = {}, r = e.split(Ct.dateTimeDelimiter);
5476
5476
  let n;
5477
5477
  if (r.length > 2)
@@ -5485,7 +5485,7 @@ function Vd(e) {
5485
5485
  }
5486
5486
  return t;
5487
5487
  }
5488
- function Hd(e, t) {
5488
+ function Bd(e, t) {
5489
5489
  const r = new RegExp(
5490
5490
  "^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
5491
5491
  ), n = e.match(r);
@@ -5496,72 +5496,72 @@ function Hd(e, t) {
5496
5496
  restDateString: e.slice((n[1] || n[2]).length)
5497
5497
  };
5498
5498
  }
5499
- function Bd(e, t) {
5499
+ function zd(e, t) {
5500
5500
  if (t === null) return /* @__PURE__ */ new Date(NaN);
5501
- const r = e.match(Md);
5501
+ const r = e.match(jd);
5502
5502
  if (!r) return /* @__PURE__ */ new Date(NaN);
5503
5503
  const n = !!r[4], s = mt(r[1]), o = mt(r[2]) - 1, a = mt(r[3]), i = mt(r[4]), c = mt(r[5]) - 1;
5504
5504
  if (n)
5505
- return Qd(t, i, c) ? Kd(t, i, c) : /* @__PURE__ */ new Date(NaN);
5505
+ return Xd(t, i, c) ? Yd(t, i, c) : /* @__PURE__ */ new Date(NaN);
5506
5506
  {
5507
5507
  const d = /* @__PURE__ */ new Date(0);
5508
- return !Wd(t, o, a) || !Jd(t, s) ? /* @__PURE__ */ new Date(NaN) : (d.setUTCFullYear(t, o, Math.max(s, a)), d);
5508
+ return !Jd(t, o, a) || !Qd(t, s) ? /* @__PURE__ */ new Date(NaN) : (d.setUTCFullYear(t, o, Math.max(s, a)), d);
5509
5509
  }
5510
5510
  }
5511
5511
  function mt(e) {
5512
5512
  return e ? parseInt(e) : 1;
5513
5513
  }
5514
- function zd(e) {
5515
- const t = e.match(jd);
5514
+ function Gd(e) {
5515
+ const t = e.match(Fd);
5516
5516
  if (!t) return NaN;
5517
5517
  const r = nn(t[1]), n = nn(t[2]), s = nn(t[3]);
5518
- return Xd(r, n, s) ? r * ka + n * qn + s * 1e3 : NaN;
5518
+ return Zd(r, n, s) ? r * ka + n * qn + s * 1e3 : NaN;
5519
5519
  }
5520
5520
  function nn(e) {
5521
5521
  return e && parseFloat(e.replace(",", ".")) || 0;
5522
5522
  }
5523
- function Gd(e) {
5523
+ function Kd(e) {
5524
5524
  if (e === "Z") return 0;
5525
- const t = e.match(Fd);
5525
+ const t = e.match(Vd);
5526
5526
  if (!t) return 0;
5527
5527
  const r = t[1] === "+" ? -1 : 1, n = parseInt(t[2]), s = t[3] && parseInt(t[3]) || 0;
5528
- return Zd(n, s) ? r * (n * ka + s * qn) : NaN;
5528
+ return ef(n, s) ? r * (n * ka + s * qn) : NaN;
5529
5529
  }
5530
- function Kd(e, t, r) {
5530
+ function Yd(e, t, r) {
5531
5531
  const n = /* @__PURE__ */ new Date(0);
5532
5532
  n.setUTCFullYear(e, 0, 4);
5533
5533
  const s = n.getUTCDay() || 7, o = (t - 1) * 7 + r + 1 - s;
5534
5534
  return n.setUTCDate(n.getUTCDate() + o), n;
5535
5535
  }
5536
- const Yd = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
5536
+ const Wd = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
5537
5537
  function Fa(e) {
5538
5538
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
5539
5539
  }
5540
- function Wd(e, t, r) {
5541
- return t >= 0 && t <= 11 && r >= 1 && r <= (Yd[t] || (Fa(e) ? 29 : 28));
5540
+ function Jd(e, t, r) {
5541
+ return t >= 0 && t <= 11 && r >= 1 && r <= (Wd[t] || (Fa(e) ? 29 : 28));
5542
5542
  }
5543
- function Jd(e, t) {
5543
+ function Qd(e, t) {
5544
5544
  return t >= 1 && t <= (Fa(e) ? 366 : 365);
5545
5545
  }
5546
- function Qd(e, t, r) {
5546
+ function Xd(e, t, r) {
5547
5547
  return t >= 1 && t <= 53 && r >= 0 && r <= 6;
5548
5548
  }
5549
- function Xd(e, t, r) {
5549
+ function Zd(e, t, r) {
5550
5550
  return e === 24 ? t === 0 && r === 0 : r >= 0 && r < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
5551
5551
  }
5552
- function Zd(e, t) {
5552
+ function ef(e, t) {
5553
5553
  return t >= 0 && t <= 59;
5554
5554
  }
5555
- function ef(e, t, r) {
5556
- return Mr(e, -t, r);
5557
- }
5558
5555
  function tf(e, t, r) {
5559
- return Il(e, -1, r);
5556
+ return Mr(e, -t, r);
5560
5557
  }
5561
5558
  function rf(e, t, r) {
5559
+ return Dl(e, -1, r);
5560
+ }
5561
+ function nf(e, t, r) {
5562
5562
  return Mn(e, -t, r);
5563
5563
  }
5564
- const Ng = {
5564
+ const Pg = {
5565
5565
  PROPOSED: "proposed",
5566
5566
  PENDING: "pending",
5567
5567
  BOOKED: "booked",
@@ -5572,34 +5572,36 @@ const Ng = {
5572
5572
  CHECKED_IN: "checked-in",
5573
5573
  WAITLIST: "waitlist",
5574
5574
  ENTERED_IN_ERROR: "entered-in-error"
5575
- }, nf = Z + "/appointments/search", Va = Z + "/appointments", $g = "http://fhir.bahmni.org/code-system/appointments", sf = (e) => `${Va}/${e}`, Ha = (e, t, r) => {
5576
- const n = t === "upcoming", s = n ? "ge" : "le", o = n ? "date" : "-date", a = n ? (/* @__PURE__ */ new Date()).toISOString() : tf(/* @__PURE__ */ new Date()).toISOString();
5575
+ }, sf = Z + "/appointments/search", Va = Z + "/appointments", Ig = "http://fhir.bahmni.org/code-system/appointments", of = (e) => `${Va}/${e}`, Ha = (e, t, r) => {
5576
+ const n = t === "upcoming", s = n ? "ge" : "le", o = n ? "date" : "-date", a = n ? (/* @__PURE__ */ new Date()).toISOString() : rf(/* @__PURE__ */ new Date()).toISOString();
5577
5577
  let i = `${le}/Appointment?patient=${e}&date=${s}${a}&_sort=${o}`;
5578
5578
  return r !== void 0 && r > 0 && (i += `&_count=${r}`), i;
5579
- }, of = (e) => Ha(e, "upcoming"), af = (e, t) => Ha(e, "past", t), cf = (e) => `${Va}/${e}/status-change`, uf = Z + "/appointmentService/all/full", Pg = async (e) => await Me(nf, e);
5580
- async function Ig(e) {
5581
- return await z(of(e));
5579
+ }, af = (e) => Ha(e, "upcoming"), cf = (e, t) => Ha(e, "past", t), uf = (e) => `${Va}/${e}/status-change`, lf = Z + "/appointmentService/all/full", df = (e) => `${Z}/appointmentService?uuid=${e}`, Dg = async (e) => await Me(sf, e);
5580
+ async function Cg(e) {
5581
+ return await z(af(e));
5582
5582
  }
5583
- async function Dg(e, t) {
5583
+ async function Lg(e, t) {
5584
5584
  return await z(
5585
- af(e, t)
5585
+ cf(e, t)
5586
5586
  );
5587
5587
  }
5588
- const Cg = async (e, t, r) => await Me(cf(e), {
5588
+ const kg = async (e, t, r) => await Me(uf(e), {
5589
5589
  toStatus: t,
5590
5590
  onDate: r
5591
5591
  });
5592
- async function Lg(e) {
5593
- return await z(sf(e));
5592
+ async function xg(e) {
5593
+ return await z(of(e));
5594
5594
  }
5595
- const kg = async () => await z(uf), lf = "dd/MM/yyyy", df = "default_dateFormat", ff = "P", Te = {
5595
+ const Ug = async () => await z(lf), qg = async (e) => {
5596
+ await Jc(df(e));
5597
+ }, ff = "dd/MM/yyyy", hf = "default_dateFormat", pf = "P", mf = "h:mm a", Te = {
5596
5598
  PARSE_ERROR: "DATE_ERROR_PARSE",
5597
5599
  FORMAT_ERROR: "DATE_ERROR_FORMAT",
5598
5600
  EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
5599
5601
  INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
5600
5602
  NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
5601
5603
  };
5602
- function xg(e) {
5604
+ function Mg(e) {
5603
5605
  if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e))
5604
5606
  return null;
5605
5607
  const t = Vn(e);
@@ -5627,7 +5629,7 @@ function Ba(e, t) {
5627
5629
  }
5628
5630
  };
5629
5631
  }
5630
- function hf(e, t, r) {
5632
+ function gf(e, t, r) {
5631
5633
  if (e == null)
5632
5634
  return {
5633
5635
  formattedResult: "",
@@ -5653,34 +5655,34 @@ function hf(e, t, r) {
5653
5655
  title: r(Te.PARSE_ERROR),
5654
5656
  message: r(Te.INVALID_FORMAT)
5655
5657
  }
5656
- } : { formattedResult: xd(n, t) };
5658
+ } : { formattedResult: Ud(n, t) };
5657
5659
  }
5658
- function Ug(e, t, r = !1, n) {
5660
+ function jg(e, t, r = !1, n) {
5659
5661
  const s = t ?? ((a) => a);
5660
5662
  let o;
5661
5663
  try {
5662
- o = n ?? localStorage.getItem(df) ?? ff;
5664
+ o = n ?? localStorage.getItem(hf) ?? pf;
5663
5665
  } catch {
5664
- o = lf;
5666
+ o = ff;
5665
5667
  }
5666
- return r && !n && (o = `${o} h:mm a`), hf(e, o, s);
5668
+ return r && !n && (o = `${o} ${mf}`), gf(e, o, s);
5667
5669
  }
5668
- function qg(e, t, r) {
5670
+ function Fg(e, t, r) {
5669
5671
  if (!e || !$t(e) || t === null || t === void 0 || !r || typeof t != "number")
5670
5672
  return;
5671
5673
  const n = new Date(e);
5672
5674
  switch (r) {
5673
5675
  case "days":
5674
- return qd(n, t);
5676
+ return Md(n, t);
5675
5677
  case "months":
5676
- return ef(n, t);
5678
+ return tf(n, t);
5677
5679
  case "years":
5678
- return rf(n, t);
5680
+ return nf(n, t);
5679
5681
  default:
5680
5682
  return;
5681
5683
  }
5682
5684
  }
5683
- function Mg(e, t) {
5685
+ function Vg(e, t) {
5684
5686
  if (e == null)
5685
5687
  return {
5686
5688
  formattedResult: "",
@@ -5732,11 +5734,11 @@ function Mg(e, t) {
5732
5734
  }
5733
5735
  return { formattedResult: c };
5734
5736
  }
5735
- const jg = () => {
5737
+ const Hg = () => {
5736
5738
  const e = /* @__PURE__ */ new Date();
5737
5739
  return e.setHours(0, 0, 0, 0), e;
5738
5740
  };
5739
- function Fg(e, t) {
5741
+ function Bg(e, t) {
5740
5742
  const r = typeof e == "string" ? Vn(e) : new Date(e), n = /* @__PURE__ */ new Date(), s = Fn(n, r), o = Mn(r, s), a = jn(n, o), i = Mr(o, a), c = Nn(n, i), d = {
5741
5743
  years: "YEARS",
5742
5744
  months: "MONTHS",
@@ -5762,7 +5764,7 @@ function Fg(e, t) {
5762
5764
  return `${v}${h}`;
5763
5765
  }).join(" ");
5764
5766
  }
5765
- const pf = {
5767
+ const yf = {
5766
5768
  d: 1,
5767
5769
  wk: 7,
5768
5770
  mo: 30,
@@ -5770,14 +5772,14 @@ const pf = {
5770
5772
  h: 1 / 24,
5771
5773
  min: 1 / 1440,
5772
5774
  s: 1 / 86400
5773
- }, Vg = (e, t, r) => {
5775
+ }, zg = (e, t, r) => {
5774
5776
  const n = typeof e == "string" ? new Date(e) : e;
5775
5777
  if (isNaN(n.getTime()))
5776
5778
  throw new Error(`Invalid date: ${e}`);
5777
- const s = pf[r] ?? 1, o = t * s;
5779
+ const s = yf[r] ?? 1, o = t * s;
5778
5780
  return xa(n, o);
5779
- }, Hg = (e, t, r, n) => e <= n && r <= t;
5780
- function Bg(e, t, r = !1) {
5781
+ }, Gg = (e, t, r, n) => e <= n && r <= t;
5782
+ function Kg(e, t, r = !1) {
5781
5783
  return !e || !Array.isArray(e) ? [] : e.sort((n, s) => {
5782
5784
  const o = new Date(n[t]), a = new Date(s[t]);
5783
5785
  if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
@@ -5787,7 +5789,7 @@ function Bg(e, t, r = !1) {
5787
5789
  return r ? i : -i;
5788
5790
  });
5789
5791
  }
5790
- const mf = () => {
5792
+ const vf = () => {
5791
5793
  let e = null;
5792
5794
  return {
5793
5795
  // Method to register the callback
@@ -5816,34 +5818,34 @@ const mf = () => {
5816
5818
  );
5817
5819
  }
5818
5820
  };
5819
- }, zg = mf(), gf = (e) => le + `/ValueSet/${e}/$expand`, yf = (e) => le + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, vf = (e, t, r) => Z + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, wf = (e) => Z + `/concept/${e}`, Ef = (e) => `${Z}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, bf = "SHORT", _f = "FULLY_SPECIFIED", Gg = async (e, t = 20) => {
5820
- const r = qr(), n = vf(e, t, r);
5821
+ }, Yg = vf(), wf = (e) => le + `/ValueSet/${e}/$expand`, Ef = (e) => le + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, bf = (e, t, r) => Z + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, _f = (e) => Z + `/concept/${e}`, Sf = (e) => `${Z}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, Rf = "SHORT", Tf = "FULLY_SPECIFIED", Wg = async (e, t = 20) => {
5822
+ const r = qr(), n = bf(e, t, r);
5821
5823
  return z(n);
5822
5824
  }, br = async (e) => {
5823
- const t = gf(e);
5825
+ const t = wf(e);
5824
5826
  return z(t);
5825
- }, Sf = async (e) => {
5826
- const t = `${yf(e)}`;
5827
+ }, Of = async (e) => {
5828
+ const t = `${Ef(e)}`;
5827
5829
  return z(t);
5828
5830
  };
5829
- async function Kg(e) {
5830
- return await z(wf(e));
5831
+ async function Jg(e) {
5832
+ return await z(_f(e));
5831
5833
  }
5832
- async function Yg(e) {
5833
- const t = Ef(e), r = await z(t);
5834
+ async function Qg(e) {
5835
+ const t = Sf(e), r = await z(t);
5834
5836
  return !r.results || r.results.length === 0 ? null : r.results[0];
5835
5837
  }
5836
- function Rf(e) {
5838
+ function Af(e) {
5837
5839
  if (!e?.length) return null;
5838
5840
  let t = null;
5839
5841
  for (const r of e) {
5840
- if (r.conceptNameType === bf)
5842
+ if (r.conceptNameType === Rf)
5841
5843
  return r.name;
5842
- r.conceptNameType === _f && (t = r.name);
5844
+ r.conceptNameType === Tf && (t = r.name);
5843
5845
  }
5844
5846
  return t ?? e[0].name ?? null;
5845
5847
  }
5846
- const Tf = (e) => le + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_lastUpdated`, et = {
5848
+ const Nf = (e) => le + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_lastUpdated`, et = {
5847
5849
  FOOD: {
5848
5850
  code: "162553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
5849
5851
  display: "food"
@@ -5856,16 +5858,16 @@ const Tf = (e) => le + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
5856
5858
  code: "162554AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
5857
5859
  display: "environment"
5858
5860
  }
5859
- }, Of = {
5861
+ }, $f = {
5860
5862
  code: "162555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
5861
- }, Af = (e) => e.filter((t) => t.inactive !== !0), Nf = (e, t) => ({
5863
+ }, Pf = (e) => e.filter((t) => t.inactive !== !0), If = (e, t) => ({
5862
5864
  uuid: e.code ?? "",
5863
5865
  display: e.display ?? "",
5864
5866
  type: t
5865
5867
  }), sn = (e, t) => {
5866
5868
  const r = e.expansion?.contains ?? [];
5867
- return Af(r).map((s) => Nf(s, t));
5868
- }, Wg = async (e, t, r) => {
5869
+ return Pf(r).map((s) => If(s, t));
5870
+ }, Xg = async (e, t, r) => {
5869
5871
  const n = e ?? et.MEDICATION.code, s = t ?? et.FOOD.code, o = r ?? et.ENVIRONMENT.code, [a, i, c] = await Promise.all([
5870
5872
  br(n),
5871
5873
  br(s),
@@ -5885,19 +5887,19 @@ const Tf = (e) => le + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
5885
5887
  et.ENVIRONMENT.display
5886
5888
  )
5887
5889
  ];
5888
- }, Jg = async (e) => {
5889
- const t = e ?? Of.code;
5890
+ }, Zg = async (e) => {
5891
+ const t = e ?? $f.code;
5890
5892
  return (await br(t)).compose?.include[0]?.concept ?? [];
5891
5893
  };
5892
- async function $f(e) {
5893
- return await z(`${Tf(e)}`);
5894
+ async function Df(e) {
5895
+ return await z(`${Nf(e)}`);
5894
5896
  }
5895
- async function Pf(e) {
5896
- return (await $f(e)).entry?.map(
5897
+ async function Cf(e) {
5898
+ return (await Df(e)).entry?.map(
5897
5899
  (r) => r.resource
5898
5900
  ) ?? [];
5899
5901
  }
5900
- function If(e) {
5902
+ function Lf(e) {
5901
5903
  return e.map((t) => {
5902
5904
  const r = t.clinicalStatus?.coding?.[0]?.display ?? "Unknown", n = t.reaction?.[0]?.severity ?? "Unknown";
5903
5905
  return {
@@ -5919,22 +5921,22 @@ function If(e) {
5919
5921
  };
5920
5922
  });
5921
5923
  }
5922
- async function Qg(e) {
5923
- const t = await Pf(e);
5924
- return If(t);
5924
+ async function ey(e) {
5925
+ const t = await Cf(e);
5926
+ return Lf(t);
5925
5927
  }
5926
- var Df = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(Df || {}), Cf = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(Cf || {});
5927
- const Xg = "http://fhir.openmrs.org/code-system/encounter-type", Lf = "problem-list-item", Zg = "http://terminology.hl7.org/CodeSystem/condition-ver-status", kf = "encounter-diagnosis", ey = "http://terminology.hl7.org/CodeSystem/condition-clinical", ty = "http://terminology.hl7.org/CodeSystem/condition-category", ry = "http://fhir.bahmni.org/ext/lab-order-concept-type", ny = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", sy = "http://fhir.bahmni.org/ext/observation/form-namespace-path", oy = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", ay = "Numeric", iy = "Complex", cy = "final", uy = "Observation", ly = /^\d{4}-\d{2}-\d{2}/, xf = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, dy = {
5928
+ var kf = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(kf || {}), xf = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(xf || {});
5929
+ const ty = "http://fhir.openmrs.org/code-system/encounter-type", Uf = "problem-list-item", ry = "http://terminology.hl7.org/CodeSystem/condition-ver-status", qf = "encounter-diagnosis", ny = "http://terminology.hl7.org/CodeSystem/condition-clinical", sy = "http://terminology.hl7.org/CodeSystem/condition-category", oy = "http://fhir.bahmni.org/ext/lab-order-concept-type", ay = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", iy = "http://fhir.bahmni.org/ext/observation/form-namespace-path", cy = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", uy = "Numeric", ly = "Complex", dy = "final", fy = "Observation", hy = /^\d{4}-\d{2}-\d{2}/, Mf = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, py = {
5928
5930
  ABNORMAL: { code: "A", display: "Abnormal" },
5929
5931
  NORMAL: { code: "N", display: "Normal" }
5930
- }, Uf = (e) => le + `/Condition?category=${Lf}&patient=${e}&_count=100&_sort=-_lastUpdated`;
5931
- async function qf(e) {
5932
- return await z(`${Uf(e)}`);
5932
+ }, jf = (e) => le + `/Condition?category=${Uf}&patient=${e}&_count=100&_sort=-_lastUpdated`;
5933
+ async function Ff(e) {
5934
+ return await z(`${jf(e)}`);
5933
5935
  }
5934
- async function fy(e) {
5935
- return (await qf(e)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
5936
+ async function my(e) {
5937
+ return (await Ff(e)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
5936
5938
  }
5937
- const Mf = (e) => le + `/Condition?category=${kf}&patient=${e}&_count=100&_sort=-_lastUpdated`, on = [
5939
+ const Vf = (e) => le + `/Condition?category=${qf}&patient=${e}&_count=100&_sort=-_lastUpdated`, on = [
5938
5940
  {
5939
5941
  code: "confirmed",
5940
5942
  display: "CERTAINITY_CONFIRMED",
@@ -5945,26 +5947,26 @@ const Mf = (e) => le + `/Condition?category=${kf}&patient=${e}&_count=100&_sort=
5945
5947
  display: "CERTAINITY_PROVISIONAL",
5946
5948
  system: "http://terminology.hl7.org/CodeSystem/condition-ver-status"
5947
5949
  }
5948
- ], jf = "confirmed", Ff = "provisional";
5949
- async function Vf(e) {
5950
- const t = Mf(e);
5950
+ ], Hf = "confirmed", Bf = "provisional";
5951
+ async function zf(e) {
5952
+ const t = Vf(e);
5951
5953
  return await z(t);
5952
5954
  }
5953
- const Hf = (e) => {
5955
+ const Gf = (e) => {
5954
5956
  switch (e.verificationStatus?.coding?.[0]?.code) {
5955
- case jf:
5957
+ case Hf:
5956
5958
  return on[0];
5957
- case Ff:
5959
+ case Bf:
5958
5960
  return on[1];
5959
5961
  default:
5960
5962
  return on[1];
5961
5963
  }
5962
- }, Bf = (e) => !!(e.id && e.code && e.recordedDate);
5963
- function zf(e) {
5964
+ }, Kf = (e) => !!(e.id && e.code && e.recordedDate);
5965
+ function Yf(e) {
5964
5966
  return (e.entry?.filter((r) => r.resource?.resourceType === "Condition").map((r) => r.resource) ?? []).map((r) => {
5965
- if (!Bf(r))
5967
+ if (!Kf(r))
5966
5968
  throw new Error("Incomplete diagnosis data");
5967
- const n = Hf(r), s = r.recordedDate;
5969
+ const n = Gf(r), s = r.recordedDate;
5968
5970
  return {
5969
5971
  id: r.id,
5970
5972
  display: r.code?.text ?? "",
@@ -5974,7 +5976,7 @@ function zf(e) {
5974
5976
  };
5975
5977
  });
5976
5978
  }
5977
- function Gf(e) {
5979
+ function Wf(e) {
5978
5980
  const t = /* @__PURE__ */ new Map();
5979
5981
  for (const r of e) {
5980
5982
  const n = r.display.toLowerCase().trim(), s = t.get(n);
@@ -5987,9 +5989,9 @@ function Gf(e) {
5987
5989
  }
5988
5990
  return Array.from(t.values());
5989
5991
  }
5990
- async function hy(e) {
5991
- const t = await Vf(e), r = zf(t);
5992
- return Gf(r);
5992
+ async function gy(e) {
5993
+ const t = await zf(e), r = Yf(t);
5994
+ return Wf(r);
5993
5995
  }
5994
5996
  var ke = /* @__PURE__ */ ((e) => (e.Active = "active", e.OnHold = "on-hold", e.Completed = "completed", e.Stopped = "stopped", e.Cancelled = "cancelled", e.EnteredInError = "entered-in-error", e.Draft = "draft", e.Unknown = "unknown", e))(ke || {});
5995
5997
  const bt = {
@@ -6000,13 +6002,13 @@ const bt = {
6000
6002
  // Trade-off: Larger payload but avoids redundant API calls
6001
6003
  // Use only when medication details are needed immediately
6002
6004
  INCLUDE_MEDICATION: "_include=MedicationRequest:medication"
6003
- }, Kf = (e, t, r) => {
6005
+ }, Jf = (e, t, r) => {
6004
6006
  let s = `${le + "/MedicationRequest?" + bt.SORT + "&" + bt.COUNT}&patient=${e}`;
6005
6007
  return t && (s += `&code=${t}`), r && (s += `&encounter=${r}`), s;
6006
- }, Yf = (e, t, r) => {
6008
+ }, Qf = (e, t, r) => {
6007
6009
  let s = `${le + "/MedicationRequest?" + bt.SORT + "&" + bt.COUNT + "&" + bt.INCLUDE_MEDICATION}&patient=${e}`;
6008
6010
  return t && (s += `&code=${t}`), r && (s += `&encounter=${r}`), s;
6009
- }, Wf = Z + "/bahmnicore/config/drugOrders", Jf = (e, t) => le + `/Medication?name=${encodeURIComponent(e)}&_count=${t}&_sort=-_lastUpdated`, Qf = le + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", Xf = (e) => {
6011
+ }, Xf = Z + "/bahmnicore/config/drugOrders", Zf = (e, t) => le + `/Medication?name=${encodeURIComponent(e)}&_count=${t}&_sort=-_lastUpdated`, eh = le + "/Medication?code=http://hl7.org/fhir/sid/cvx|&_count=100", th = (e) => {
6010
6012
  switch (e.status) {
6011
6013
  case "active":
6012
6014
  return ke.Active;
@@ -6026,36 +6028,36 @@ const bt = {
6026
6028
  return ke.Unknown;
6027
6029
  }
6028
6030
  };
6029
- async function Zf(e, t, r, n = !1) {
6031
+ async function rh(e, t, r, n = !1) {
6030
6032
  let s;
6031
6033
  r && r.length > 0 && (s = r.join(","));
6032
6034
  let o;
6033
6035
  t && t.length > 0 && (o = t.join(","));
6034
- const i = (n ? Yf : Kf)(e, o, s);
6036
+ const i = (n ? Qf : Jf)(e, o, s);
6035
6037
  return await z(i);
6036
6038
  }
6037
- function eh(e) {
6039
+ function nh(e) {
6038
6040
  const t = e?.[0]?.doseAndRate?.[0]?.doseQuantity;
6039
6041
  return {
6040
6042
  value: t?.value ?? 0,
6041
6043
  unit: t?.unit ?? ""
6042
6044
  };
6043
6045
  }
6044
- function th(e) {
6046
+ function sh(e) {
6045
6047
  return e?.[0]?.timing?.code?.coding?.[0]?.display ?? "";
6046
6048
  }
6047
- function rh(e) {
6049
+ function oh(e) {
6048
6050
  const t = e?.[0]?.route;
6049
6051
  return t && Array.isArray(t.coding) && t.coding[0]?.display ? t.coding[0].display : "";
6050
6052
  }
6051
- function nh(e) {
6053
+ function ah(e) {
6052
6054
  const t = e?.[0]?.timing?.repeat, r = t?.durationUnit;
6053
6055
  return {
6054
6056
  duration: t?.duration ?? 0,
6055
6057
  durationUnit: r ?? ""
6056
6058
  };
6057
6059
  }
6058
- function sh(e) {
6060
+ function ih(e) {
6059
6061
  try {
6060
6062
  const t = e?.[0]?.text;
6061
6063
  return t ? JSON.parse(t).additionalInstructions ?? "" : "";
@@ -6063,7 +6065,7 @@ function sh(e) {
6063
6065
  return "";
6064
6066
  }
6065
6067
  }
6066
- function oh(e) {
6068
+ function ch(e) {
6067
6069
  try {
6068
6070
  const t = e?.[0]?.text;
6069
6071
  return t ? JSON.parse(t).instructions ?? "" : "";
@@ -6071,17 +6073,17 @@ function oh(e) {
6071
6073
  return "";
6072
6074
  }
6073
6075
  }
6074
- function ah(e) {
6076
+ function uh(e) {
6075
6077
  const t = e?.quantity;
6076
6078
  return {
6077
6079
  value: t?.value ?? 0,
6078
6080
  unit: t?.unit ?? ""
6079
6081
  };
6080
6082
  }
6081
- function ih(e) {
6083
+ function lh(e) {
6082
6084
  return !e || e.length === 0 ? "" : e.map((t) => t.text).filter(Boolean).join(" ");
6083
6085
  }
6084
- function ch(e, t, r) {
6086
+ function dh(e, t, r) {
6085
6087
  if (e?.display)
6086
6088
  return e.display;
6087
6089
  if (e?.reference) {
@@ -6097,7 +6099,7 @@ function ch(e, t, r) {
6097
6099
  );
6098
6100
  return n?.code?.text ? n.code.text : e?.reference ? e.reference : "Medication";
6099
6101
  }
6100
- function uh(e, t, r) {
6102
+ function fh(e, t, r) {
6101
6103
  if (e?.reference) {
6102
6104
  const s = e.reference.split("/").pop();
6103
6105
  if (s) {
@@ -6111,7 +6113,7 @@ function uh(e, t, r) {
6111
6113
  );
6112
6114
  return n?.form ? n.form.text ?? n.form.coding?.[0]?.display ?? "" : "";
6113
6115
  }
6114
- function lh(e) {
6116
+ function hh(e) {
6115
6117
  const t = e.entry?.filter((n) => {
6116
6118
  const s = n.resource;
6117
6119
  return s?.resourceType === "MedicationRequest" && !!s?.id;
@@ -6120,11 +6122,11 @@ function lh(e) {
6120
6122
  const s = n.resource;
6121
6123
  s.resourceType === "Medication" && r.set(s.id, s);
6122
6124
  }), t.map((n) => {
6123
- const s = n.medicationReference, o = n.requester, a = Xf(n), i = ch(
6125
+ const s = n.medicationReference, o = n.requester, a = th(n), i = dh(
6124
6126
  s,
6125
6127
  n,
6126
6128
  r
6127
- ), c = uh(
6129
+ ), c = fh(
6128
6130
  s,
6129
6131
  n,
6130
6132
  r
@@ -6132,55 +6134,55 @@ function lh(e) {
6132
6134
  return {
6133
6135
  id: n.id,
6134
6136
  name: i,
6135
- dose: eh(n.dosageInstruction),
6137
+ dose: nh(n.dosageInstruction),
6136
6138
  asNeeded: n.dosageInstruction?.[0]?.asNeededBoolean ?? !1,
6137
- frequency: th(n.dosageInstruction),
6138
- route: rh(n.dosageInstruction),
6139
- duration: nh(n.dosageInstruction),
6139
+ frequency: sh(n.dosageInstruction),
6140
+ route: oh(n.dosageInstruction),
6141
+ duration: ah(n.dosageInstruction),
6140
6142
  status: a,
6141
6143
  priority: n.priority ?? "",
6142
6144
  isImmediate: Ms(n),
6143
- quantity: ah(n.dispenseRequest),
6145
+ quantity: uh(n.dispenseRequest),
6144
6146
  startDate: Ms(n) ? n.authoredOn : n.dosageInstruction?.[0]?.timing?.event?.[0] ?? "",
6145
6147
  orderDate: n.authoredOn,
6146
6148
  orderedBy: o?.display ?? "Unknown",
6147
- instructions: oh(n.dosageInstruction),
6148
- additionalInstructions: sh(
6149
+ instructions: ch(n.dosageInstruction),
6150
+ additionalInstructions: ih(
6149
6151
  n.dosageInstruction
6150
6152
  ),
6151
- note: ih(n.note),
6153
+ note: lh(n.note),
6152
6154
  doseForm: c
6153
6155
  };
6154
6156
  });
6155
6157
  }
6156
6158
  const Ms = (e) => e.priority === "stat" || e.dosageInstruction?.[0]?.timing?.code?.text === "Immediately" || !1;
6157
- async function py(e, t, r, n = !1) {
6158
- const s = await Zf(
6159
+ async function yy(e, t, r, n = !1) {
6160
+ const s = await rh(
6159
6161
  e,
6160
6162
  t,
6161
6163
  r,
6162
6164
  n
6163
6165
  );
6164
- return lh(s);
6166
+ return hh(s);
6165
6167
  }
6166
- async function my() {
6168
+ async function vy() {
6167
6169
  return await z(
6168
- Wf
6170
+ Xf
6169
6171
  );
6170
6172
  }
6171
- async function gy(e, t = 20) {
6173
+ async function wy(e, t = 20) {
6172
6174
  return await z(
6173
- Jf(e, t)
6175
+ Zf(e, t)
6174
6176
  );
6175
6177
  }
6176
- async function yy() {
6177
- return await z(Qf);
6178
+ async function Ey() {
6179
+ return await z(eh);
6178
6180
  }
6179
- const dh = 200, fh = (e, t, r, n, s) => {
6180
- let a = `${le + `/ServiceRequest?_count=${dh}&_sort=-_lastUpdated`}&category=${e}&patient=${t}`;
6181
+ const ph = 200, mh = (e, t, r, n, s) => {
6182
+ let a = `${le + `/ServiceRequest?_count=${ph}&_sort=-_lastUpdated`}&category=${e}&patient=${t}`;
6181
6183
  return s && (a += `&_revinclude=${s}`), r ? a += `&encounter=${r}` : n && (a += `&numberOfVisits=${n}`), a;
6182
6184
  };
6183
- function hh(e) {
6185
+ function gh(e) {
6184
6186
  if (!e || e.length === 0)
6185
6187
  return [];
6186
6188
  const t = /* @__PURE__ */ new Set();
@@ -6196,7 +6198,7 @@ async function Pt(e, t, r, n, s) {
6196
6198
  let o;
6197
6199
  r && r.length > 0 && (o = r.join(","));
6198
6200
  const a = await z(
6199
- fh(
6201
+ mh(
6200
6202
  e,
6201
6203
  t,
6202
6204
  o,
@@ -6204,9 +6206,9 @@ async function Pt(e, t, r, n, s) {
6204
6206
  s
6205
6207
  )
6206
6208
  );
6207
- return a.entry && (a.entry = hh(a.entry), a.total = a.entry.length), a;
6209
+ return a.entry && (a.entry = gh(a.entry), a.total = a.entry.length), a;
6208
6210
  }
6209
- async function vy(e, t, r, n) {
6211
+ async function by(e, t, r, n) {
6210
6212
  return await Pt(
6211
6213
  t,
6212
6214
  e,
@@ -6214,7 +6216,7 @@ async function vy(e, t, r, n) {
6214
6216
  n
6215
6217
  );
6216
6218
  }
6217
- async function wy(e, t, r, n) {
6219
+ async function _y(e, t, r, n) {
6218
6220
  return await Pt(
6219
6221
  t,
6220
6222
  e,
@@ -6223,7 +6225,7 @@ async function wy(e, t, r, n) {
6223
6225
  "ImagingStudy:basedon"
6224
6226
  );
6225
6227
  }
6226
- async function Ey(e, t, r, n) {
6228
+ async function Sy(e, t, r, n) {
6227
6229
  return (await Pt(
6228
6230
  t,
6229
6231
  e,
@@ -6231,7 +6233,7 @@ async function Ey(e, t, r, n) {
6231
6233
  n
6232
6234
  )).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
6233
6235
  }
6234
- async function by(e, t, r, n) {
6236
+ async function Ry(e, t, r, n) {
6235
6237
  return await Pt(
6236
6238
  t,
6237
6239
  e,
@@ -6239,36 +6241,36 @@ async function by(e, t, r, n) {
6239
6241
  n
6240
6242
  );
6241
6243
  }
6242
- const ph = (e, t) => {
6244
+ const yh = (e, t) => {
6243
6245
  const r = `${le}/DiagnosticReport?patient=${e}`;
6244
6246
  return t ? `${r}&based-on=${t}` : r;
6245
- }, mh = (e) => `${le}/DiagnosticReport/${e}/$fetch-bundle`, gh = (e) => `${le}/DiagnosticReport/${e}/$update-bundle`;
6246
- async function _y(e, t = []) {
6247
- const r = t.length > 0 ? t.join(",") : void 0, n = ph(e, r);
6247
+ }, vh = (e) => `${le}/DiagnosticReport/${e}/$fetch-bundle`, wh = (e) => `${le}/DiagnosticReport/${e}/$update-bundle`;
6248
+ async function Ty(e, t = []) {
6249
+ const r = t.length > 0 ? t.join(",") : void 0, n = yh(e, r);
6248
6250
  return await z(n);
6249
6251
  }
6250
- async function Sy(e) {
6251
- const t = mh(e);
6252
+ async function Oy(e) {
6253
+ const t = vh(e);
6252
6254
  return await z(t);
6253
6255
  }
6254
- async function Ry(e, t) {
6255
- const r = gh(e);
6256
+ async function Ay(e, t) {
6257
+ const r = wh(e);
6256
6258
  return await Me(r, t);
6257
6259
  }
6258
- const Ty = [
6260
+ const Ny = [
6259
6261
  "preliminary",
6260
6262
  "final",
6261
6263
  "amended",
6262
6264
  "corrected",
6263
6265
  "appended"
6264
- ], Oy = [
6266
+ ], $y = [
6265
6267
  "registered",
6266
6268
  "unknown",
6267
6269
  "partial"
6268
- ], yh = "All Orderables", vh = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", wh = "LabSet", Eh = "http://fhir.bahmni.org/ext/ValueSet/concept-class", Ay = ["orderTypes"], bh = async () => await Sf(yh), Hn = async () => await z(vh), _h = (e) => {
6270
+ ], Eh = "All Orderables", bh = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", _h = "LabSet", Sh = "http://fhir.bahmni.org/ext/ValueSet/concept-class", Py = ["orderTypes"], Rh = async () => await Of(Eh), Hn = async () => await z(bh), Th = (e) => {
6269
6271
  let t = e.display ?? "Unknown investigation";
6270
- return za(e) === wh && (t += ` (${ue.t("INVESTIGATION_PANEL")})`), t;
6271
- }, Sh = (e) => {
6272
+ return za(e) === _h && (t += ` (${ue.t("INVESTIGATION_PANEL")})`), t;
6273
+ }, Oh = (e) => {
6272
6274
  const t = /* @__PURE__ */ new Map();
6273
6275
  return e.results.forEach((r) => {
6274
6276
  r.conceptClasses.forEach((n) => {
@@ -6277,10 +6279,10 @@ const Ty = [
6277
6279
  }), t;
6278
6280
  }, za = (e) => {
6279
6281
  const t = e.extension?.find(
6280
- (r) => r.url === Eh
6282
+ (r) => r.url === Sh
6281
6283
  );
6282
6284
  return t ? t.valueString ?? "" : "";
6283
- }, Rh = (e, t) => {
6285
+ }, Ah = (e, t) => {
6284
6286
  const r = [];
6285
6287
  return !e.expansion?.contains || e.expansion.contains.length === 0 || t.size === 0 || e.expansion.contains.forEach((n) => {
6286
6288
  n.contains?.forEach((s) => {
@@ -6290,19 +6292,19 @@ const Ty = [
6290
6292
  return;
6291
6293
  r.filter((d) => d.code === o.code && d.categoryCode === i.uuid).length > 0 || r.push({
6292
6294
  code: o.code ?? "",
6293
- display: _h(o),
6295
+ display: Th(o),
6294
6296
  category: i.display,
6295
6297
  categoryCode: i.uuid
6296
6298
  });
6297
6299
  });
6298
6300
  });
6299
6301
  }), r;
6300
- }, Ny = async () => {
6301
- const e = await bh(), t = await Hn();
6302
- return Rh(e, Sh(t));
6303
- }, $y = async (e) => e ? (await Hn()).results.find(
6302
+ }, Iy = async () => {
6303
+ const e = await Rh(), t = await Hn();
6304
+ return Ah(e, Oh(t));
6305
+ }, Dy = async (e) => e ? (await Hn()).results.find(
6304
6306
  (n) => n.display.toLowerCase() === e.toLowerCase()
6305
- )?.uuid : void 0, Py = async () => (await Hn()).results.map((t) => t.display), Iy = async (e, t, r) => {
6307
+ )?.uuid : void 0, Cy = async () => (await Hn()).results.map((t) => t.display), Ly = async (e, t, r) => {
6306
6308
  const n = [];
6307
6309
  for (const s of e) {
6308
6310
  const o = s.uuid;
@@ -6322,7 +6324,7 @@ const Ty = [
6322
6324
  }
6323
6325
  return n;
6324
6326
  };
6325
- function Th(e) {
6327
+ function Nh(e) {
6326
6328
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6327
6329
  }
6328
6330
  var Lt = { exports: {} }, an = {}, De = {}, Fe = {}, cn = {}, un = {}, ln = {}, js;
@@ -7386,7 +7388,7 @@ function Fr() {
7386
7388
  })(cn)), cn;
7387
7389
  }
7388
7390
  var Ks;
7389
- function Oh() {
7391
+ function $h() {
7390
7392
  if (Ks) return Fe;
7391
7393
  Ks = 1, Object.defineProperty(Fe, "__esModule", { value: !0 }), Fe.boolOrEmptySchema = Fe.topBoolOrEmptySchema = void 0;
7392
7394
  const e = Fr(), t = X(), r = je(), n = {
@@ -7611,7 +7613,7 @@ function Ir() {
7611
7613
  return me;
7612
7614
  }
7613
7615
  var gt = {}, Qs;
7614
- function Ah() {
7616
+ function Ph() {
7615
7617
  if (Qs) return gt;
7616
7618
  Qs = 1, Object.defineProperty(gt, "__esModule", { value: !0 }), gt.assignDefaults = void 0;
7617
7619
  const e = X(), t = te();
@@ -7747,7 +7749,7 @@ function Pe() {
7747
7749
  return oe.validateUnion = h, oe;
7748
7750
  }
7749
7751
  var Zs;
7750
- function Nh() {
7752
+ function Ih() {
7751
7753
  if (Zs) return Ne;
7752
7754
  Zs = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.validateKeywordUsage = Ne.validSchemaType = Ne.funcKeywordCode = Ne.macroKeywordCode = void 0;
7753
7755
  const e = X(), t = je(), r = Pe(), n = Fr();
@@ -7836,7 +7838,7 @@ function Nh() {
7836
7838
  return Ne.validateKeywordUsage = m, Ne;
7837
7839
  }
7838
7840
  var Le = {}, eo;
7839
- function $h() {
7841
+ function Dh() {
7840
7842
  if (eo) return Le;
7841
7843
  eo = 1, Object.defineProperty(Le, "__esModule", { value: !0 }), Le.extendSubschemaMode = Le.extendSubschemaData = Le.getSubschema = void 0;
7842
7844
  const e = X(), t = te();
@@ -7920,7 +7922,7 @@ function Ya() {
7920
7922
  }), fn;
7921
7923
  }
7922
7924
  var hn = { exports: {} }, ro;
7923
- function Ph() {
7925
+ function Ch() {
7924
7926
  if (ro) return hn.exports;
7925
7927
  ro = 1;
7926
7928
  var e = hn.exports = function(n, s, o) {
@@ -7998,7 +8000,7 @@ var no;
7998
8000
  function Vr() {
7999
8001
  if (no) return ye;
8000
8002
  no = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.getSchemaRefs = ye.resolveUrl = ye.normalizeId = ye._getFullPath = ye.getFullPath = ye.inlineRef = void 0;
8001
- const e = te(), t = Ya(), r = Ph(), n = /* @__PURE__ */ new Set([
8003
+ const e = te(), t = Ya(), r = Ch(), n = /* @__PURE__ */ new Set([
8002
8004
  "type",
8003
8005
  "format",
8004
8006
  "pattern",
@@ -8107,7 +8109,7 @@ var so;
8107
8109
  function Hr() {
8108
8110
  if (so) return De;
8109
8111
  so = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.getData = De.KeywordCxt = De.validateFunctionCode = void 0;
8110
- const e = Oh(), t = Ir(), r = Ka(), n = Ir(), s = Ah(), o = Nh(), a = $h(), i = X(), c = je(), d = Vr(), l = te(), m = Fr();
8112
+ const e = $h(), t = Ir(), r = Ka(), n = Ir(), s = Ph(), o = Ih(), a = Dh(), i = X(), c = je(), d = Vr(), l = te(), m = Fr();
8111
8113
  function y(O) {
8112
8114
  if (_(O) && (R(O), E(O))) {
8113
8115
  f(O);
@@ -8597,16 +8599,16 @@ function zn() {
8597
8599
  }
8598
8600
  return _e;
8599
8601
  }
8600
- const Ih = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", Dh = "Meta-schema for $data reference (JSON AnySchema extension proposal)", Ch = "object", Lh = ["$data"], kh = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, xh = !1, Uh = {
8601
- $id: Ih,
8602
- description: Dh,
8603
- type: Ch,
8604
- required: Lh,
8605
- properties: kh,
8606
- additionalProperties: xh
8602
+ const Lh = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", kh = "Meta-schema for $data reference (JSON AnySchema extension proposal)", xh = "object", Uh = ["$data"], qh = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, Mh = !1, jh = {
8603
+ $id: Lh,
8604
+ description: kh,
8605
+ type: xh,
8606
+ required: Uh,
8607
+ properties: qh,
8608
+ additionalProperties: Mh
8607
8609
  };
8608
8610
  var qt = {}, yt = { exports: {} }, pn, co;
8609
- function qh() {
8611
+ function Fh() {
8610
8612
  return co || (co = 1, pn = {
8611
8613
  HEX: {
8612
8614
  0: 0,
@@ -8635,10 +8637,10 @@ function qh() {
8635
8637
  }), pn;
8636
8638
  }
8637
8639
  var mn, uo;
8638
- function Mh() {
8640
+ function Vh() {
8639
8641
  if (uo) return mn;
8640
8642
  uo = 1;
8641
- const { HEX: e } = qh(), t = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;
8643
+ const { HEX: e } = Fh(), t = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;
8642
8644
  function r(g) {
8643
8645
  if (i(g, ".") < 3)
8644
8646
  return { host: g, isIPV4: !1 };
@@ -8770,7 +8772,7 @@ function Mh() {
8770
8772
  }, mn;
8771
8773
  }
8772
8774
  var gn, lo;
8773
- function jh() {
8775
+ function Hh() {
8774
8776
  if (lo) return gn;
8775
8777
  lo = 1;
8776
8778
  const e = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu, t = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -8862,10 +8864,10 @@ function jh() {
8862
8864
  return gn = h, gn;
8863
8865
  }
8864
8866
  var fo;
8865
- function Fh() {
8867
+ function Bh() {
8866
8868
  if (fo) return yt.exports;
8867
8869
  fo = 1;
8868
- const { normalizeIPv6: e, normalizeIPv4: t, removeDotSegments: r, recomposeAuthority: n, normalizeComponentEncoding: s } = Mh(), o = jh();
8870
+ const { normalizeIPv6: e, normalizeIPv4: t, removeDotSegments: r, recomposeAuthority: n, normalizeComponentEncoding: s } = Vh(), o = Hh();
8869
8871
  function a(f, h) {
8870
8872
  return typeof f == "string" ? f = l(v(f, h), h) : typeof f == "object" && (f = v(l(f, h), h)), f;
8871
8873
  }
@@ -8961,14 +8963,14 @@ function Fh() {
8961
8963
  return yt.exports = g, yt.exports.default = g, yt.exports.fastUri = g, yt.exports;
8962
8964
  }
8963
8965
  var ho;
8964
- function Vh() {
8966
+ function zh() {
8965
8967
  if (ho) return qt;
8966
8968
  ho = 1, Object.defineProperty(qt, "__esModule", { value: !0 });
8967
- const e = Fh();
8969
+ const e = Bh();
8968
8970
  return e.code = 'require("ajv/dist/runtime/uri").default', qt.default = e, qt;
8969
8971
  }
8970
8972
  var po;
8971
- function Hh() {
8973
+ function Gh() {
8972
8974
  return po || (po = 1, (function(e) {
8973
8975
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
8974
8976
  var t = Hr();
@@ -8989,7 +8991,7 @@ function Hh() {
8989
8991
  } }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
8990
8992
  return r.CodeGen;
8991
8993
  } });
8992
- const n = Bn(), s = Br(), o = Ga(), a = zn(), i = X(), c = Vr(), d = Ir(), l = te(), m = Uh, y = Vh(), S = (x, A) => new RegExp(x, A);
8994
+ const n = Bn(), s = Br(), o = Ga(), a = zn(), i = X(), c = Vr(), d = Ir(), l = te(), m = jh, y = zh(), S = (x, A) => new RegExp(x, A);
8993
8995
  S.code = "new RegExp";
8994
8996
  const v = ["removeAdditional", "useDefaults", "coerceTypes"], g = /* @__PURE__ */ new Set([
8995
8997
  "validate",
@@ -9411,7 +9413,7 @@ function Hh() {
9411
9413
  })(an)), an;
9412
9414
  }
9413
9415
  var Mt = {}, jt = {}, Ft = {}, mo;
9414
- function Bh() {
9416
+ function Kh() {
9415
9417
  if (mo) return Ft;
9416
9418
  mo = 1, Object.defineProperty(Ft, "__esModule", { value: !0 });
9417
9419
  const e = {
@@ -9423,7 +9425,7 @@ function Bh() {
9423
9425
  return Ft.default = e, Ft;
9424
9426
  }
9425
9427
  var Ue = {}, go;
9426
- function zh() {
9428
+ function Yh() {
9427
9429
  if (go) return Ue;
9428
9430
  go = 1, Object.defineProperty(Ue, "__esModule", { value: !0 }), Ue.callRef = Ue.getValidate = void 0;
9429
9431
  const e = Br(), t = Pe(), r = X(), n = je(), s = zn(), o = te(), a = {
@@ -9510,10 +9512,10 @@ function zh() {
9510
9512
  return Ue.callRef = c, Ue.default = a, Ue;
9511
9513
  }
9512
9514
  var yo;
9513
- function Gh() {
9515
+ function Wh() {
9514
9516
  if (yo) return jt;
9515
9517
  yo = 1, Object.defineProperty(jt, "__esModule", { value: !0 });
9516
- const e = Bh(), t = zh(), r = [
9518
+ const e = Kh(), t = Yh(), r = [
9517
9519
  "$schema",
9518
9520
  "$id",
9519
9521
  "$defs",
@@ -9526,7 +9528,7 @@ function Gh() {
9526
9528
  return jt.default = r, jt;
9527
9529
  }
9528
9530
  var Vt = {}, Ht = {}, vo;
9529
- function Kh() {
9531
+ function Jh() {
9530
9532
  if (vo) return Ht;
9531
9533
  vo = 1, Object.defineProperty(Ht, "__esModule", { value: !0 });
9532
9534
  const e = X(), t = e.operators, r = {
@@ -9551,7 +9553,7 @@ function Kh() {
9551
9553
  return Ht.default = s, Ht;
9552
9554
  }
9553
9555
  var Bt = {}, wo;
9554
- function Yh() {
9556
+ function Qh() {
9555
9557
  if (wo) return Bt;
9556
9558
  wo = 1, Object.defineProperty(Bt, "__esModule", { value: !0 });
9557
9559
  const e = X(), r = {
@@ -9571,7 +9573,7 @@ function Yh() {
9571
9573
  return Bt.default = r, Bt;
9572
9574
  }
9573
9575
  var zt = {}, Gt = {}, Eo;
9574
- function Wh() {
9576
+ function Xh() {
9575
9577
  if (Eo) return Gt;
9576
9578
  Eo = 1, Object.defineProperty(Gt, "__esModule", { value: !0 });
9577
9579
  function e(t) {
@@ -9584,10 +9586,10 @@ function Wh() {
9584
9586
  return Gt.default = e, e.code = 'require("ajv/dist/runtime/ucs2length").default', Gt;
9585
9587
  }
9586
9588
  var bo;
9587
- function Jh() {
9589
+ function Zh() {
9588
9590
  if (bo) return zt;
9589
9591
  bo = 1, Object.defineProperty(zt, "__esModule", { value: !0 });
9590
- const e = X(), t = te(), r = Wh(), s = {
9592
+ const e = X(), t = te(), r = Xh(), s = {
9591
9593
  keyword: ["maxLength", "minLength"],
9592
9594
  type: "string",
9593
9595
  schemaType: "number",
@@ -9607,7 +9609,7 @@ function Jh() {
9607
9609
  return zt.default = s, zt;
9608
9610
  }
9609
9611
  var Kt = {}, _o;
9610
- function Qh() {
9612
+ function ep() {
9611
9613
  if (_o) return Kt;
9612
9614
  _o = 1, Object.defineProperty(Kt, "__esModule", { value: !0 });
9613
9615
  const e = Pe(), t = X(), n = {
@@ -9627,7 +9629,7 @@ function Qh() {
9627
9629
  return Kt.default = n, Kt;
9628
9630
  }
9629
9631
  var Yt = {}, So;
9630
- function Xh() {
9632
+ function tp() {
9631
9633
  if (So) return Yt;
9632
9634
  So = 1, Object.defineProperty(Yt, "__esModule", { value: !0 });
9633
9635
  const e = X(), r = {
@@ -9650,7 +9652,7 @@ function Xh() {
9650
9652
  return Yt.default = r, Yt;
9651
9653
  }
9652
9654
  var Wt = {}, Ro;
9653
- function Zh() {
9655
+ function rp() {
9654
9656
  if (Ro) return Wt;
9655
9657
  Ro = 1, Object.defineProperty(Wt, "__esModule", { value: !0 });
9656
9658
  const e = Pe(), t = X(), r = te(), s = {
@@ -9707,7 +9709,7 @@ function Zh() {
9707
9709
  return Wt.default = s, Wt;
9708
9710
  }
9709
9711
  var Jt = {}, To;
9710
- function ep() {
9712
+ function np() {
9711
9713
  if (To) return Jt;
9712
9714
  To = 1, Object.defineProperty(Jt, "__esModule", { value: !0 });
9713
9715
  const e = X(), r = {
@@ -9737,7 +9739,7 @@ function Gn() {
9737
9739
  return e.code = 'require("ajv/dist/runtime/equal").default', Xt.default = e, Xt;
9738
9740
  }
9739
9741
  var Ao;
9740
- function tp() {
9742
+ function sp() {
9741
9743
  if (Ao) return Qt;
9742
9744
  Ao = 1, Object.defineProperty(Qt, "__esModule", { value: !0 });
9743
9745
  const e = Ir(), t = X(), r = te(), n = Gn(), o = {
@@ -9781,7 +9783,7 @@ function tp() {
9781
9783
  return Qt.default = o, Qt;
9782
9784
  }
9783
9785
  var Zt = {}, No;
9784
- function rp() {
9786
+ function op() {
9785
9787
  if (No) return Zt;
9786
9788
  No = 1, Object.defineProperty(Zt, "__esModule", { value: !0 });
9787
9789
  const e = X(), t = te(), r = Gn(), s = {
@@ -9799,7 +9801,7 @@ function rp() {
9799
9801
  return Zt.default = s, Zt;
9800
9802
  }
9801
9803
  var er = {}, $o;
9802
- function np() {
9804
+ function ap() {
9803
9805
  if ($o) return er;
9804
9806
  $o = 1, Object.defineProperty(er, "__esModule", { value: !0 });
9805
9807
  const e = X(), t = te(), r = Gn(), s = {
@@ -9839,10 +9841,10 @@ function np() {
9839
9841
  return er.default = s, er;
9840
9842
  }
9841
9843
  var Po;
9842
- function sp() {
9844
+ function ip() {
9843
9845
  if (Po) return Vt;
9844
9846
  Po = 1, Object.defineProperty(Vt, "__esModule", { value: !0 });
9845
- const e = Kh(), t = Yh(), r = Jh(), n = Qh(), s = Xh(), o = Zh(), a = ep(), i = tp(), c = rp(), d = np(), l = [
9847
+ const e = Jh(), t = Qh(), r = Zh(), n = ep(), s = tp(), o = rp(), a = np(), i = sp(), c = op(), d = ap(), l = [
9846
9848
  // number
9847
9849
  e.default,
9848
9850
  t.default,
@@ -9941,7 +9943,7 @@ function Ja() {
9941
9943
  return rt.validateTuple = s, rt.default = n, rt;
9942
9944
  }
9943
9945
  var Co;
9944
- function op() {
9946
+ function cp() {
9945
9947
  if (Co) return rr;
9946
9948
  Co = 1, Object.defineProperty(rr, "__esModule", { value: !0 });
9947
9949
  const e = Ja(), t = {
@@ -9954,7 +9956,7 @@ function op() {
9954
9956
  return rr.default = t, rr;
9955
9957
  }
9956
9958
  var nr = {}, Lo;
9957
- function ap() {
9959
+ function up() {
9958
9960
  if (Lo) return nr;
9959
9961
  Lo = 1, Object.defineProperty(nr, "__esModule", { value: !0 });
9960
9962
  const e = X(), t = te(), r = Pe(), n = Wa(), o = {
@@ -9974,7 +9976,7 @@ function ap() {
9974
9976
  return nr.default = o, nr;
9975
9977
  }
9976
9978
  var sr = {}, ko;
9977
- function ip() {
9979
+ function lp() {
9978
9980
  if (ko) return sr;
9979
9981
  ko = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
9980
9982
  const e = X(), t = te(), n = {
@@ -10031,7 +10033,7 @@ function ip() {
10031
10033
  return sr.default = n, sr;
10032
10034
  }
10033
10035
  var yn = {}, xo;
10034
- function cp() {
10036
+ function dp() {
10035
10037
  return xo || (xo = 1, (function(e) {
10036
10038
  Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
10037
10039
  const t = X(), r = te(), n = Pe();
@@ -10104,7 +10106,7 @@ function cp() {
10104
10106
  })(yn)), yn;
10105
10107
  }
10106
10108
  var or = {}, Uo;
10107
- function up() {
10109
+ function fp() {
10108
10110
  if (Uo) return or;
10109
10111
  Uo = 1, Object.defineProperty(or, "__esModule", { value: !0 });
10110
10112
  const e = X(), t = te(), n = {
@@ -10207,7 +10209,7 @@ function Qa() {
10207
10209
  return ar.default = o, ar;
10208
10210
  }
10209
10211
  var ir = {}, Mo;
10210
- function lp() {
10212
+ function hp() {
10211
10213
  if (Mo) return ir;
10212
10214
  Mo = 1, Object.defineProperty(ir, "__esModule", { value: !0 });
10213
10215
  const e = Hr(), t = Pe(), r = te(), n = Qa(), s = {
@@ -10242,7 +10244,7 @@ function lp() {
10242
10244
  return ir.default = s, ir;
10243
10245
  }
10244
10246
  var cr = {}, jo;
10245
- function dp() {
10247
+ function pp() {
10246
10248
  if (jo) return cr;
10247
10249
  jo = 1, Object.defineProperty(cr, "__esModule", { value: !0 });
10248
10250
  const e = Pe(), t = X(), r = te(), n = te(), s = {
@@ -10283,7 +10285,7 @@ function dp() {
10283
10285
  return cr.default = s, cr;
10284
10286
  }
10285
10287
  var ur = {}, Fo;
10286
- function fp() {
10288
+ function mp() {
10287
10289
  if (Fo) return ur;
10288
10290
  Fo = 1, Object.defineProperty(ur, "__esModule", { value: !0 });
10289
10291
  const e = te(), t = {
@@ -10309,7 +10311,7 @@ function fp() {
10309
10311
  return ur.default = t, ur;
10310
10312
  }
10311
10313
  var lr = {}, Vo;
10312
- function hp() {
10314
+ function gp() {
10313
10315
  if (Vo) return lr;
10314
10316
  Vo = 1, Object.defineProperty(lr, "__esModule", { value: !0 });
10315
10317
  const t = {
@@ -10322,7 +10324,7 @@ function hp() {
10322
10324
  return lr.default = t, lr;
10323
10325
  }
10324
10326
  var dr = {}, Ho;
10325
- function pp() {
10327
+ function yp() {
10326
10328
  if (Ho) return dr;
10327
10329
  Ho = 1, Object.defineProperty(dr, "__esModule", { value: !0 });
10328
10330
  const e = X(), t = te(), n = {
@@ -10358,7 +10360,7 @@ function pp() {
10358
10360
  return dr.default = n, dr;
10359
10361
  }
10360
10362
  var fr = {}, Bo;
10361
- function mp() {
10363
+ function vp() {
10362
10364
  if (Bo) return fr;
10363
10365
  Bo = 1, Object.defineProperty(fr, "__esModule", { value: !0 });
10364
10366
  const e = te(), t = {
@@ -10380,7 +10382,7 @@ function mp() {
10380
10382
  return fr.default = t, fr;
10381
10383
  }
10382
10384
  var hr = {}, zo;
10383
- function gp() {
10385
+ function wp() {
10384
10386
  if (zo) return hr;
10385
10387
  zo = 1, Object.defineProperty(hr, "__esModule", { value: !0 });
10386
10388
  const e = X(), t = te(), n = {
@@ -10427,7 +10429,7 @@ function gp() {
10427
10429
  return hr.default = n, hr;
10428
10430
  }
10429
10431
  var pr = {}, Go;
10430
- function yp() {
10432
+ function Ep() {
10431
10433
  if (Go) return pr;
10432
10434
  Go = 1, Object.defineProperty(pr, "__esModule", { value: !0 });
10433
10435
  const e = te(), t = {
@@ -10440,10 +10442,10 @@ function yp() {
10440
10442
  return pr.default = t, pr;
10441
10443
  }
10442
10444
  var Ko;
10443
- function vp() {
10445
+ function bp() {
10444
10446
  if (Ko) return tr;
10445
10447
  Ko = 1, Object.defineProperty(tr, "__esModule", { value: !0 });
10446
- const e = Wa(), t = op(), r = Ja(), n = ap(), s = ip(), o = cp(), a = up(), i = Qa(), c = lp(), d = dp(), l = fp(), m = hp(), y = pp(), S = mp(), v = gp(), g = yp();
10448
+ const e = Wa(), t = cp(), r = Ja(), n = up(), s = lp(), o = dp(), a = fp(), i = Qa(), c = hp(), d = pp(), l = mp(), m = gp(), y = yp(), S = vp(), v = wp(), g = Ep();
10447
10449
  function f(h = !1) {
10448
10450
  const u = [
10449
10451
  // any
@@ -10465,7 +10467,7 @@ function vp() {
10465
10467
  return tr.default = f, tr;
10466
10468
  }
10467
10469
  var mr = {}, gr = {}, Yo;
10468
- function wp() {
10470
+ function _p() {
10469
10471
  if (Yo) return gr;
10470
10472
  Yo = 1, Object.defineProperty(gr, "__esModule", { value: !0 });
10471
10473
  const e = X(), r = {
@@ -10534,14 +10536,14 @@ function wp() {
10534
10536
  return gr.default = r, gr;
10535
10537
  }
10536
10538
  var Wo;
10537
- function Ep() {
10539
+ function Sp() {
10538
10540
  if (Wo) return mr;
10539
10541
  Wo = 1, Object.defineProperty(mr, "__esModule", { value: !0 });
10540
- const t = [wp().default];
10542
+ const t = [_p().default];
10541
10543
  return mr.default = t, mr;
10542
10544
  }
10543
10545
  var He = {}, Jo;
10544
- function bp() {
10546
+ function Rp() {
10545
10547
  return Jo || (Jo = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.contentVocabulary = He.metadataVocabulary = void 0, He.metadataVocabulary = [
10546
10548
  "title",
10547
10549
  "description",
@@ -10557,10 +10559,10 @@ function bp() {
10557
10559
  ]), He;
10558
10560
  }
10559
10561
  var Qo;
10560
- function _p() {
10562
+ function Tp() {
10561
10563
  if (Qo) return Mt;
10562
10564
  Qo = 1, Object.defineProperty(Mt, "__esModule", { value: !0 });
10563
- const e = Gh(), t = sp(), r = vp(), n = Ep(), s = bp(), o = [
10565
+ const e = Wh(), t = ip(), r = bp(), n = Sp(), s = Rp(), o = [
10564
10566
  e.default,
10565
10567
  t.default,
10566
10568
  (0, r.default)(),
@@ -10571,7 +10573,7 @@ function _p() {
10571
10573
  return Mt.default = o, Mt;
10572
10574
  }
10573
10575
  var yr = {}, vt = {}, Xo;
10574
- function Sp() {
10576
+ function Op() {
10575
10577
  if (Xo) return vt;
10576
10578
  Xo = 1, Object.defineProperty(vt, "__esModule", { value: !0 }), vt.DiscrError = void 0;
10577
10579
  var e;
@@ -10580,10 +10582,10 @@ function Sp() {
10580
10582
  })(e || (vt.DiscrError = e = {})), vt;
10581
10583
  }
10582
10584
  var Zo;
10583
- function Rp() {
10585
+ function Ap() {
10584
10586
  if (Zo) return yr;
10585
10587
  Zo = 1, Object.defineProperty(yr, "__esModule", { value: !0 });
10586
- const e = X(), t = Sp(), r = zn(), n = Br(), s = te(), a = {
10588
+ const e = X(), t = Op(), r = zn(), n = Br(), s = te(), a = {
10587
10589
  keyword: "discriminator",
10588
10590
  type: "object",
10589
10591
  schemaType: "object",
@@ -10656,20 +10658,20 @@ function Rp() {
10656
10658
  };
10657
10659
  return yr.default = a, yr;
10658
10660
  }
10659
- const Tp = "http://json-schema.org/draft-07/schema#", Op = "http://json-schema.org/draft-07/schema#", Ap = "Core schema meta-schema", Np = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, $p = ["object", "boolean"], Pp = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, Ip = {
10660
- $schema: Tp,
10661
- $id: Op,
10662
- title: Ap,
10663
- definitions: Np,
10664
- type: $p,
10665
- properties: Pp,
10661
+ const Np = "http://json-schema.org/draft-07/schema#", $p = "http://json-schema.org/draft-07/schema#", Pp = "Core schema meta-schema", Ip = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, Dp = ["object", "boolean"], Cp = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, Lp = {
10662
+ $schema: Np,
10663
+ $id: $p,
10664
+ title: Pp,
10665
+ definitions: Ip,
10666
+ type: Dp,
10667
+ properties: Cp,
10666
10668
  default: !0
10667
10669
  };
10668
10670
  var ea;
10669
- function Dp() {
10671
+ function kp() {
10670
10672
  return ea || (ea = 1, (function(e, t) {
10671
10673
  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;
10672
- const r = Hh(), n = _p(), s = Rp(), o = Ip, a = ["/properties"], i = "http://json-schema.org/draft-07/schema";
10674
+ const r = Gh(), n = Tp(), s = Ap(), o = Lp, a = ["/properties"], i = "http://json-schema.org/draft-07/schema";
10673
10675
  class c extends r.default {
10674
10676
  _addVocabularies() {
10675
10677
  super._addVocabularies(), n.default.forEach((v) => this.addVocabulary(v)), this.opts.discriminator && this.addKeyword(s.default);
@@ -10713,86 +10715,86 @@ function Dp() {
10713
10715
  } });
10714
10716
  })(Lt, Lt.exports)), Lt.exports;
10715
10717
  }
10716
- var Cp = Dp();
10717
- const Lp = /* @__PURE__ */ Th(Cp), ta = {
10718
+ var xp = kp();
10719
+ const Up = /* @__PURE__ */ Nh(xp), ta = {
10718
10720
  CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
10719
10721
  VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
10720
- }, Dy = async (e, t) => {
10721
- const r = await kp(e);
10722
+ }, ky = async (e, t) => {
10723
+ const r = await qp(e);
10722
10724
  if (!r)
10723
10725
  throw new Error(ta.CONFIG_NOT_FOUND);
10724
- if (!await xp(r, t))
10726
+ if (!await Mp(r, t))
10725
10727
  throw new Error(ta.VALIDATION_FAILED);
10726
10728
  return r;
10727
- }, kp = async (e) => await z(e), xp = async (e, t) => new Lp().compile(t)(e), Up = (e) => Z + `/form/${e}?v=custom:(resources:(value))`, qp = (e) => {
10729
+ }, qp = async (e) => await z(e), Mp = async (e, t) => new Up().compile(t)(e), jp = (e) => Z + `/form/${e}?v=custom:(resources:(value))`, Fp = (e) => {
10728
10730
  const t = Z + "/bahmniie/form/latestPublishedForms";
10729
10731
  return e ? t + `?episodeUuid=${e}` : t;
10730
- }, Cy = (e) => Z + `/user/${e}?v=full`, Mp = (e, t, r, n) => Z + `/bahmniie/form/translations?formName=${encodeURIComponent(e)}&formUuid=${t}&formVersion=${r}&locale=${n}`, _r = "Bahmni", jp = (e, t, r) => {
10732
+ }, xy = (e) => Z + `/user/${e}?v=full`, Vp = (e, t, r, n) => Z + `/bahmniie/form/translations?formName=${encodeURIComponent(e)}&formUuid=${t}&formVersion=${r}&locale=${n}`, _r = "Bahmni", Hp = (e, t, r) => {
10731
10733
  let s = Z + "/bahmnicore/patient/" + e + "/forms";
10732
10734
  return r ? s += `?patientProgramUuid=${r}` : t && (s += `?numberOfVisits=${t}`), s;
10733
- }, Fp = (e, t) => {
10735
+ }, Bp = (e, t) => {
10734
10736
  const r = t.join(",");
10735
10737
  return `${le}/Observation?patient=${e}&code=${r}&_include=Observation:has-member&_sort=-_lastUpdated`;
10736
- }, Vp = (e, t) => {
10738
+ }, zp = (e, t) => {
10737
10739
  const r = t.join(",");
10738
10740
  return `${le}/Observation?patient=${e}&code=${r}&_include=Observation:has-member&_include=Observation:encounter&_sort=-_lastUpdated`;
10739
10741
  };
10740
- async function Hp(e, t) {
10741
- const r = Fp(e, t);
10742
+ async function Gp(e, t) {
10743
+ const r = Bp(e, t);
10742
10744
  return await z(r);
10743
10745
  }
10744
- async function Ly(e, t) {
10745
- const r = Vp(e, t);
10746
+ async function Uy(e, t) {
10747
+ const r = zp(e, t);
10746
10748
  return await z(r);
10747
10749
  }
10748
- async function ky(e, t) {
10749
- return (await Hp(e, t)).entry?.filter((s) => s.resource?.resourceType === "Observation").map((s) => s.resource) ?? [];
10750
+ async function qy(e, t) {
10751
+ return (await Gp(e, t)).entry?.filter((s) => s.resource?.resourceType === "Observation").map((s) => s.resource) ?? [];
10750
10752
  }
10751
- const Bp = (e) => Z + `/provider?user=${e}&v=custom:(uuid,display,person)`;
10752
- async function xy(e) {
10753
+ const Kp = (e) => Z + `/provider?user=${e}&v=custom:(uuid,display,person)`;
10754
+ async function My(e) {
10753
10755
  const t = await z(
10754
- Bp(e)
10756
+ Kp(e)
10755
10757
  );
10756
10758
  return !t.results || t.results.length === 0 ? null : t.results[0];
10757
10759
  }
10758
- const zp = (e) => le + `/Encounter?subject:Patient=${e}&_tag=visit`, Gp = (e) => `${le}/Observation/$fetch-all?encounter=${e}`;
10759
- async function Kp(e) {
10760
- return await z(zp(e));
10760
+ const Yp = (e) => le + `/Encounter?subject:Patient=${e}&_tag=visit`, Wp = (e) => `${le}/Observation/$fetch-all?encounter=${e}`;
10761
+ async function Jp(e) {
10762
+ return await z(Yp(e));
10761
10763
  }
10762
- async function Yp(e) {
10763
- return (await Kp(e)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
10764
+ async function Qp(e) {
10765
+ return (await Jp(e)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
10764
10766
  }
10765
- async function Wp(e) {
10766
- return (await Yp(e)).find((r) => !r.period?.end) ?? null;
10767
+ async function Xp(e) {
10768
+ return (await Qp(e)).find((r) => !r.period?.end) ?? null;
10767
10769
  }
10768
- async function Uy(e) {
10770
+ async function jy(e) {
10769
10771
  return await z(
10770
- Gp(e)
10772
+ Wp(e)
10771
10773
  );
10772
10774
  }
10773
- const qy = (e, t) => e?.length === 0 ? !1 : t?.length === 0, Jp = le + "/Encounter", Qp = Z + "/systemsetting/bahmni.encountersession.duration", Xp = "d34fe3ab-5e07-11ef-8f7c-0242ac120002";
10774
- async function Zp(e) {
10775
+ const Fy = (e, t) => e?.length === 0 ? !1 : t?.length === 0, Zp = le + "/Encounter", em = Z + "/systemsetting/bahmni.encountersession.duration", tm = "d34fe3ab-5e07-11ef-8f7c-0242ac120002";
10776
+ async function rm(e) {
10775
10777
  const t = new URLSearchParams();
10776
10778
  Object.entries(e).forEach(([s, o]) => {
10777
10779
  o && t.append(s, o);
10778
10780
  });
10779
- const r = `${Jp}?${t.toString()}`;
10781
+ const r = `${Zp}?${t.toString()}`;
10780
10782
  return (await z(r)).entry?.map((s) => s.resource).filter((s) => s !== void 0) ?? [];
10781
10783
  }
10782
- async function em() {
10784
+ async function nm() {
10783
10785
  try {
10784
10786
  const e = await z(
10785
- Qp
10787
+ em
10786
10788
  ), t = Number(e.value);
10787
10789
  return !isNaN(t) && t > 0 ? t : 60;
10788
10790
  } catch {
10789
10791
  return 30;
10790
10792
  }
10791
10793
  }
10792
- async function tm(e, t) {
10794
+ async function sm(e, t) {
10793
10795
  if (!e.length) return null;
10794
10796
  try {
10795
- const r = await Wp(t);
10797
+ const r = await Xp(t);
10796
10798
  return r ? e.find((n) => {
10797
10799
  const s = n.partOf?.reference?.split("/")[1];
10798
10800
  return r.id === s;
@@ -10801,25 +10803,25 @@ async function tm(e, t) {
10801
10803
  return null;
10802
10804
  }
10803
10805
  }
10804
- async function My(e, t, r) {
10806
+ async function Vy(e, t, r) {
10805
10807
  try {
10806
10808
  if (!e) return null;
10807
- const n = r ?? await em(), o = `ge${new Date(Date.now() - n * 60 * 1e3).toISOString()}`, a = {
10809
+ const n = r ?? await nm(), o = `ge${new Date(Date.now() - n * 60 * 1e3).toISOString()}`, a = {
10808
10810
  patient: e,
10809
10811
  _tag: "encounter",
10810
10812
  _lastUpdated: o,
10811
- type: Xp
10813
+ type: tm
10812
10814
  };
10813
10815
  t && (a.participant = t);
10814
- const i = await Zp(a);
10815
- return i.length === 0 ? null : await tm(i, e);
10816
+ const i = await rm(a);
10817
+ return i.length === 0 ? null : await sm(i, e);
10816
10818
  } catch {
10817
10819
  return null;
10818
10820
  }
10819
10821
  }
10820
- const rm = (e) => le + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${e}`;
10821
- async function jy(e) {
10822
- const t = e.join(","), r = await z(rm(t));
10822
+ const om = (e) => le + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${e}`;
10823
+ async function Hy(e) {
10824
+ const t = e.join(","), r = await z(om(t));
10823
10825
  if (r.total === 0)
10824
10826
  throw new Error(
10825
10827
  "No episode of care found for the provided UUIDs: " + e.join(", ")
@@ -10831,19 +10833,19 @@ async function jy(e) {
10831
10833
  c && s.add(c);
10832
10834
  }), { visitUuids: Array.from(s), encounterUuids: o };
10833
10835
  }
10834
- const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10836
+ const vn = /* @__PURE__ */ new Map(), am = async (e) => {
10835
10837
  if (vn.has(e))
10836
10838
  return vn.get(e) ?? null;
10837
10839
  const t = await z(Ia(e)), r = t ? String(t) : null;
10838
10840
  return vn.set(e, r), r;
10839
- }, sm = async () => await nm(qu) === "true", om = async (e, t, r, n = nt.CLINICAL) => {
10840
- if (!await sm())
10841
+ }, im = async () => await am(Mu) === "true", cm = async (e, t, r, n = nt.CLINICAL) => {
10842
+ if (!await im())
10841
10843
  return { logged: !1 };
10842
10844
  const o = An[t];
10843
10845
  if (!o)
10844
10846
  return {
10845
10847
  logged: !1,
10846
- error: ue.t(El.UNKNOWN_EVENT_TYPE, {
10848
+ error: ue.t(bl.UNKNOWN_EVENT_TYPE, {
10847
10849
  eventType: t
10848
10850
  })
10849
10851
  };
@@ -10853,22 +10855,22 @@ const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10853
10855
  message: r ? `${o.message}~${JSON.stringify(r)}` : o.message,
10854
10856
  module: n
10855
10857
  };
10856
- return await Me(wl, a), { logged: !0 };
10857
- }, Fy = () => vl(async (t) => {
10858
- await om(
10858
+ return await Me(El, a), { logged: !0 };
10859
+ }, By = () => wl(async (t) => {
10860
+ await cm(
10859
10861
  t.patientUuid,
10860
10862
  t.eventType,
10861
10863
  t.messageParams,
10862
10864
  t.module
10863
10865
  );
10864
- }), Vy = async () => {
10866
+ }), zy = async () => {
10865
10867
  try {
10866
- return (await z(Du)).user.privileges;
10868
+ return (await z(Cu)).user.privileges;
10867
10869
  } catch (e) {
10868
10870
  const { message: t } = Rr(e);
10869
10871
  throw new Error(t);
10870
10872
  }
10871
- }, Hy = (e, t) => {
10873
+ }, Gy = (e, t) => {
10872
10874
  if (!e || e.length === 0)
10873
10875
  return !1;
10874
10876
  if (!t || t.length === 0)
@@ -10877,17 +10879,17 @@ const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10877
10879
  return e.some(
10878
10880
  (n) => r.includes(n.name)
10879
10881
  );
10880
- }, am = async (e) => {
10882
+ }, um = async (e) => {
10881
10883
  let t;
10882
10884
  e && e.length > 0 && (t = e.join(","));
10883
- const r = await fetch(qp(t));
10885
+ const r = await fetch(Fp(t));
10884
10886
  if (!r.ok)
10885
10887
  throw new Error(
10886
10888
  `HTTP error! status for latestPublishedForms: ${r.status}`
10887
10889
  );
10888
10890
  const n = await r.json();
10889
10891
  return Array.isArray(n) ? n : [];
10890
- }, im = (e, t) => {
10892
+ }, lm = (e, t) => {
10891
10893
  const r = JSON.parse(e.nameTranslation);
10892
10894
  if (Array.isArray(r) && r.length > 0) {
10893
10895
  const n = r.find(
@@ -10897,8 +10899,8 @@ const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10897
10899
  return n.display;
10898
10900
  }
10899
10901
  return e.name;
10900
- }, cm = (e, t) => {
10901
- const r = im(e, t);
10902
+ }, dm = (e, t) => {
10903
+ const r = lm(e, t);
10902
10904
  return {
10903
10905
  uuid: e.uuid,
10904
10906
  name: r,
@@ -10908,13 +10910,13 @@ const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10908
10910
  editable: n.editable
10909
10911
  }))
10910
10912
  };
10911
- }, By = async (e) => {
10912
- const t = await am(e), r = qr();
10913
+ }, Ky = async (e) => {
10914
+ const t = await um(e), r = qr();
10913
10915
  return t.map(
10914
- (n) => cm(n, r)
10916
+ (n) => dm(n, r)
10915
10917
  );
10916
- }, zy = async (e) => {
10917
- const t = await fetch(Up(e));
10918
+ }, Yy = async (e) => {
10919
+ const t = await fetch(jp(e));
10918
10920
  if (!t.ok)
10919
10921
  throw new Error(
10920
10922
  `Failed to fetch form metadata for ${e}: ${t.status}`
@@ -10925,7 +10927,7 @@ const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10925
10927
  const n = JSON.parse(r.resources[0].value), s = qr(), o = r.name ?? n.name, a = r.uuid ?? n.uuid, i = r.version ?? n.version ?? "1", c = r.published ?? !1;
10926
10928
  let d = { labels: {}, concepts: {} };
10927
10929
  if (n && typeof n == "object" && "translationsUrl" in n && typeof n.translationsUrl == "string") {
10928
- const l = Mp(
10930
+ const l = Vp(
10929
10931
  o,
10930
10932
  a,
10931
10933
  i,
@@ -10933,7 +10935,7 @@ const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10933
10935
  ), m = await fetch(l);
10934
10936
  if (m.ok) {
10935
10937
  const y = await m.json();
10936
- d = Uu(
10938
+ d = qu(
10937
10939
  y,
10938
10940
  s
10939
10941
  );
@@ -10947,10 +10949,10 @@ const vn = /* @__PURE__ */ new Map(), nm = async (e) => {
10947
10949
  schema: n,
10948
10950
  translations: d
10949
10951
  };
10950
- }, Gy = async (e, t, r) => {
10952
+ }, Wy = async (e, t, r) => {
10951
10953
  let n;
10952
10954
  t && t.length > 0 && (n = t.join(","));
10953
- const s = jp(e, r, n), o = await z(s);
10955
+ const s = Hp(e, r, n), o = await z(s);
10954
10956
  return Array.isArray(o) ? o : [];
10955
10957
  };
10956
10958
  function Xa(e) {
@@ -10992,7 +10994,7 @@ function ei(e, t) {
10992
10994
  };
10993
10995
  return n(r.controls);
10994
10996
  }
10995
- function Ky(e, t) {
10997
+ function Jy(e, t) {
10996
10998
  if (!e.controls || e.controls.length === 0)
10997
10999
  return [];
10998
11000
  const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
@@ -11037,7 +11039,7 @@ function Ky(e, t) {
11037
11039
  s.interpretation && (a.interpretation = s.interpretation), s.comment && (a.comment = s.comment), r.push(a);
11038
11040
  }), r;
11039
11041
  }
11040
- function Yy(e, t) {
11042
+ function Qy(e, t) {
11041
11043
  if (!e || e.length === 0)
11042
11044
  return {
11043
11045
  controls: [],
@@ -11053,7 +11055,7 @@ function Yy(e, t) {
11053
11055
  ), o.type = "multiselect";
11054
11056
  } else {
11055
11057
  let o = n.value;
11056
- if (typeof n.value == "string" && xf.test(n.value)) {
11058
+ if (typeof n.value == "string" && Mf.test(n.value)) {
11057
11059
  const i = new Date(n.value);
11058
11060
  isNaN(i.getTime()) || (o = i);
11059
11061
  }
@@ -11070,7 +11072,7 @@ function Yy(e, t) {
11070
11072
  metadata: { formMetadata: t }
11071
11073
  };
11072
11074
  }
11073
- function Wy(e) {
11075
+ function Xy(e) {
11074
11076
  const t = (n) => {
11075
11077
  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 = {
11076
11078
  concept: {
@@ -11090,11 +11092,11 @@ function Wy(e) {
11090
11092
  };
11091
11093
  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);
11092
11094
  }
11093
- function Jy(e) {
11095
+ function Zy(e) {
11094
11096
  if (!(!e || typeof e != "object"))
11095
11097
  return "toJS" in e && typeof e.toJS == "function" ? e.toJS() : e;
11096
11098
  }
11097
- function Qy(e, t) {
11099
+ function ev(e, t) {
11098
11100
  !e || !Array.isArray(e.children) || e.children.forEach((r) => {
11099
11101
  r && typeof r == "object" && ti(
11100
11102
  r,
@@ -11124,7 +11126,7 @@ function ti(e, t) {
11124
11126
  );
11125
11127
  });
11126
11128
  }
11127
- const um = Z + "/bahmnicore/diseaseSummaryData?", Xy = async (e, t, r, n) => {
11129
+ const fm = Z + "/bahmnicore/diseaseSummaryData?", tv = async (e, t, r, n) => {
11128
11130
  const s = new URLSearchParams({
11129
11131
  groupBy: n,
11130
11132
  latestCount: t.toString(),
@@ -11133,9 +11135,9 @@ const um = Z + "/bahmnicore/diseaseSummaryData?", Xy = async (e, t, r, n) => {
11133
11135
  r.forEach((a) => {
11134
11136
  s.append("obsConcepts", a);
11135
11137
  });
11136
- const o = um + s.toString();
11138
+ const o = fm + s.toString();
11137
11139
  return z(o);
11138
- }, ri = "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)", lm = (e) => `${Z}/bahmniprogramenrollment?patient=${e}&v=${ri}`, ni = (e) => `${Z}/bahmniprogramenrollment/${e}`, dm = (e) => `${ni(e)}?v=${ri}`, Zy = async (e) => await z(lm(e)), ev = async (e) => await z(dm(e)), tv = async (e, t) => {
11140
+ }, ri = "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)", hm = (e) => `${Z}/bahmniprogramenrollment?patient=${e}&v=${ri}`, ni = (e) => `${Z}/bahmniprogramenrollment/${e}`, pm = (e) => `${ni(e)}?v=${ri}`, rv = async (e) => await z(hm(e)), nv = async (e) => await z(pm(e)), sv = async (e, t) => {
11139
11141
  const r = {
11140
11142
  uuid: e,
11141
11143
  states: [
@@ -11149,7 +11151,7 @@ const um = Z + "/bahmnicore/diseaseSummaryData?", Xy = async (e, t, r, n) => {
11149
11151
  r
11150
11152
  );
11151
11153
  };
11152
- function rv(e) {
11154
+ function ov(e) {
11153
11155
  if (e.states.length === 0)
11154
11156
  return null;
11155
11157
  let t;
@@ -11163,9 +11165,9 @@ function rv(e) {
11163
11165
  t = n[n.length - 1];
11164
11166
  } else
11165
11167
  t = e.states.find((r) => r.endDate === null);
11166
- return t ? Rf(t.state.concept.names) ?? t.state.concept.display : null;
11168
+ return t ? Af(t.state.concept.names) ?? t.state.concept.display : null;
11167
11169
  }
11168
- function nv(e, t) {
11170
+ function av(e, t) {
11169
11171
  if (t.length === 0)
11170
11172
  return {};
11171
11173
  const r = {};
@@ -11177,12 +11179,12 @@ function nv(e, t) {
11177
11179
  }
11178
11180
  return r;
11179
11181
  }
11180
- const $n = "consultation:saved", sv = (e) => {
11182
+ const $n = "consultation:saved", iv = (e) => {
11181
11183
  const t = new CustomEvent($n, {
11182
11184
  detail: e
11183
11185
  });
11184
11186
  window.dispatchEvent(t);
11185
- }, ov = (e, t = []) => {
11187
+ }, cv = (e, t = []) => {
11186
11188
  const r = wn(e);
11187
11189
  En(() => {
11188
11190
  r.current = e;
@@ -11195,7 +11197,7 @@ const $n = "consultation:saved", sv = (e) => {
11195
11197
  window.removeEventListener($n, n);
11196
11198
  };
11197
11199
  }, t);
11198
- }, fm = (e, t) => {
11200
+ }, mm = (e, t) => {
11199
11201
  const r = `${le}/DocumentReference?patient=${e}&_sort=-date&_count=100`;
11200
11202
  if (t && t.length > 0) {
11201
11203
  const n = t.join(",");
@@ -11203,7 +11205,7 @@ const $n = "consultation:saved", sv = (e) => {
11203
11205
  }
11204
11206
  return r;
11205
11207
  };
11206
- function hm(e) {
11208
+ function gm(e) {
11207
11209
  return e.filter((t) => t.resource?.resourceType === "DocumentReference").map((t) => {
11208
11210
  const r = t.resource, n = r.masterIdentifier?.value ?? r.id ?? "", s = (r.content ?? []).map((a) => a.attachment).filter((a) => !!a).map((a) => ({ url: a.url ?? "", contentType: a.contentType })), o = s[0];
11209
11211
  return {
@@ -11218,185 +11220,187 @@ function hm(e) {
11218
11220
  };
11219
11221
  });
11220
11222
  }
11221
- async function pm(e, t) {
11222
- const r = fm(e, t);
11223
+ async function ym(e, t) {
11224
+ const r = mm(e, t);
11223
11225
  return z(r);
11224
11226
  }
11225
- async function av(e, t) {
11226
- const n = ((await pm(e, t)).entry ?? []).filter(
11227
+ async function uv(e, t) {
11228
+ const n = ((await ym(e, t)).entry ?? []).filter(
11227
11229
  (s) => !!s.resource
11228
11230
  );
11229
- return hm(n);
11231
+ return gm(n);
11230
11232
  }
11231
11233
  export {
11232
- $g as APPOINTMENT_IDENTIFIER_SYSTEM,
11233
- Ng as APPOINTMENT_STATUSES,
11234
+ Ig as APPOINTMENT_IDENTIFIER_SYSTEM,
11235
+ Pg as APPOINTMENT_STATUSES,
11234
11236
  An as AUDIT_LOG_EVENT_DETAILS,
11235
- Cf as AllergySeverity,
11236
- Df as AllergyStatus,
11237
- ml as AttributeFormat,
11238
- gl as AttributeInputType,
11239
- Mm as BAHMNI_HOME_PATH,
11240
- iy as CONCEPT_DATATYPE_COMPLEX,
11241
- ay as CONCEPT_DATATYPE_NUMERIC,
11237
+ xf as AllergySeverity,
11238
+ kf as AllergyStatus,
11239
+ gl as AttributeFormat,
11240
+ yl as AttributeInputType,
11241
+ Fm as BAHMNI_HOME_PATH,
11242
+ ly as CONCEPT_DATATYPE_COMPLEX,
11243
+ uy as CONCEPT_DATATYPE_NUMERIC,
11242
11244
  $n as CONSULTATION_SAVED_EVENT,
11243
- xf as DATETIME_REGEX_PATTERN,
11244
- ly as DATE_REGEX_PATTERN,
11245
- lf as DEFAULT_DATE_FORMAT,
11246
- df as DEFAULT_DATE_FORMAT_STORAGE_KEY,
11247
- pf as DURATION_UNIT_TO_DAYS,
11248
- Xg as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
11249
- ry as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
11250
- sy as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
11251
- ny as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
11252
- cy as FHIR_OBSERVATION_STATUS_FINAL,
11253
- oy as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
11254
- uy as FHIR_RESOURCE_TYPE_OBSERVATION,
11255
- ty as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
11256
- Lf as HL7_CONDITION_CATEGORY_CONDITION_CODE,
11257
- kf as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
11258
- ey as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
11259
- Zg as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
11260
- dy as INTERPRETATION_TO_CODE,
11261
- ng as MAX_NAME_LENGTH,
11262
- rg as MAX_PATIENT_AGE_YEARS,
11263
- sg as MAX_PHONE_NUMBER_LENGTH,
11245
+ Mf as DATETIME_REGEX_PATTERN,
11246
+ hy as DATE_REGEX_PATTERN,
11247
+ ff as DEFAULT_DATE_FORMAT,
11248
+ hf as DEFAULT_DATE_FORMAT_STORAGE_KEY,
11249
+ mf as DEFAULT_TIME_FORMAT,
11250
+ yf as DURATION_UNIT_TO_DAYS,
11251
+ ty as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
11252
+ oy as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
11253
+ iy as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
11254
+ ay as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
11255
+ dy as FHIR_OBSERVATION_STATUS_FINAL,
11256
+ cy as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
11257
+ fy as FHIR_RESOURCE_TYPE_OBSERVATION,
11258
+ sy as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
11259
+ Uf as HL7_CONDITION_CATEGORY_CONDITION_CODE,
11260
+ qf as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
11261
+ ny as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
11262
+ ry as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
11263
+ py as INTERPRETATION_TO_CODE,
11264
+ og as MAX_NAME_LENGTH,
11265
+ sg as MAX_PATIENT_AGE_YEARS,
11266
+ ag as MAX_PHONE_NUMBER_LENGTH,
11264
11267
  ke as MedicationStatus,
11265
11268
  le as OPENMRS_FHIR_R4,
11266
11269
  Z as OPENMRS_REST_V1,
11267
- Ay as ORDER_TYPE_QUERY_KEY,
11268
- Oy as PENDING_REPORT_STATUSES,
11269
- Ty as PROCESSED_REPORT_STATUSES,
11270
- Cy as USER_PINNED_PREFERENCE_URL,
11271
- xg as calculateAge,
11272
- Vg as calculateEndDate,
11273
- qg as calculateOnsetDate,
11274
- Xm as camelToScreamingSnakeCase,
11275
- zm as capitalize,
11276
- Og as checkIfActiveVisitExists,
11277
- Jy as convertImmutableToPlainObject,
11278
- Zm as convertToSentenceCase,
11279
- dg as createPatient,
11280
- Ag as createVisitForPatient,
11281
- qm as del,
11282
- yl as dispatchAuditEvent,
11283
- sv as dispatchConsultationSaved,
11284
- Hg as doDateRangesOverlap,
11285
- nv as extractAttributes,
11286
- Qy as extractNotesFromFormData,
11287
- Wg as fetchAndFormatAllergenConcepts,
11288
- zy as fetchFormMetadata,
11289
- my as fetchMedicationOrdersMetadata,
11290
- By as fetchObservationForms,
11291
- Jg as fetchReactionConcepts,
11292
- Wm as filterReplacementEntries,
11293
- My as findActiveEncounterInSession,
11294
- Mg as formatDateDistance,
11295
- Ug as formatDateTime,
11296
- Jm as formatUrl,
11297
- Bm as generateId,
11270
+ Py as ORDER_TYPE_QUERY_KEY,
11271
+ $y as PENDING_REPORT_STATUSES,
11272
+ Ny as PROCESSED_REPORT_STATUSES,
11273
+ xy as USER_PINNED_PREFERENCE_URL,
11274
+ Mg as calculateAge,
11275
+ zg as calculateEndDate,
11276
+ Fg as calculateOnsetDate,
11277
+ eg as camelToScreamingSnakeCase,
11278
+ Km as capitalize,
11279
+ Ng as checkIfActiveVisitExists,
11280
+ Zy as convertImmutableToPlainObject,
11281
+ tg as convertToSentenceCase,
11282
+ hg as createPatient,
11283
+ $g as createVisitForPatient,
11284
+ Jc as del,
11285
+ qg as deleteAppointmentService,
11286
+ vl as dispatchAuditEvent,
11287
+ iv as dispatchConsultationSaved,
11288
+ Gg as doDateRangesOverlap,
11289
+ av as extractAttributes,
11290
+ ev as extractNotesFromFormData,
11291
+ Xg as fetchAndFormatAllergenConcepts,
11292
+ Yy as fetchFormMetadata,
11293
+ vy as fetchMedicationOrdersMetadata,
11294
+ Ky as fetchObservationForms,
11295
+ Zg as fetchReactionConcepts,
11296
+ Qm as filterReplacementEntries,
11297
+ Vy as findActiveEncounterInSession,
11298
+ Vg as formatDateDistance,
11299
+ jg as formatDateTime,
11300
+ Xm as formatUrl,
11301
+ Gm as generateId,
11298
11302
  z as get,
11299
- Wp as getActiveVisit,
11300
- Tl as getActiveVisitByPatient,
11301
- pg as getAddressHierarchyEntries,
11302
- kg as getAllAppointmentServices,
11303
- Pf as getAllergies,
11304
- Lg as getAppointmentById,
11305
- $y as getCategoryUuidFromOrderTypes,
11306
- Kg as getConceptById,
11307
- fy as getConditions,
11308
- Dy as getConfig,
11303
+ Xp as getActiveVisit,
11304
+ Ol as getActiveVisitByPatient,
11305
+ gg as getAddressHierarchyEntries,
11306
+ Ug as getAllAppointmentServices,
11307
+ Cf as getAllergies,
11308
+ xg as getAppointmentById,
11309
+ Dy as getCategoryUuidFromOrderTypes,
11310
+ Jg as getConceptById,
11311
+ my as getConditions,
11312
+ ky as getConfig,
11309
11313
  Da as getCookieByName,
11310
- xy as getCurrentProvider,
11311
- rv as getCurrentStateName,
11312
- eg as getCurrentUser,
11313
- Vy as getCurrentUserPrivileges,
11314
- tg as getDefaultDateFormat,
11315
- Sy as getDiagnosticReportBundle,
11316
- _y as getDiagnosticReports,
11317
- pm as getDocumentReferences,
11318
- jy as getEncountersAndVisitsForEOC,
11319
- Iy as getExistingServiceRequestsForAllCategories,
11320
- Ny as getFlattenedInvestigations,
11321
- Fg as getFormattedAge,
11322
- Qg as getFormattedAllergies,
11323
- av as getFormattedDocumentReferences,
11314
+ My as getCurrentProvider,
11315
+ ov as getCurrentStateName,
11316
+ rg as getCurrentUser,
11317
+ zy as getCurrentUserPrivileges,
11318
+ ng as getDefaultDateFormat,
11319
+ Oy as getDiagnosticReportBundle,
11320
+ Ty as getDiagnosticReports,
11321
+ ym as getDocumentReferences,
11322
+ Hy as getEncountersAndVisitsForEOC,
11323
+ Ly as getExistingServiceRequestsForAllCategories,
11324
+ Iy as getFlattenedInvestigations,
11325
+ Bg as getFormattedAge,
11326
+ ey as getFormattedAllergies,
11327
+ uv as getFormattedDocumentReferences,
11324
11328
  Rr as getFormattedError,
11325
- og as getFormattedPatientById,
11326
- hg as getGenders,
11327
- lg as getIdentifierData,
11328
- ug as getIdentifierTypes,
11329
- wg as getInputTypeForFormat,
11330
- by as getLabInvestigationsBundle,
11331
- Uy as getObservationsBundleByEncounterUuid,
11332
- Py as getOrderTypeNames,
11329
+ ig as getFormattedPatientById,
11330
+ mg as getGenders,
11331
+ fg as getIdentifierData,
11332
+ dg as getIdentifierTypes,
11333
+ bg as getInputTypeForFormat,
11334
+ Ry as getLabInvestigationsBundle,
11335
+ jy as getObservationsBundleByEncounterUuid,
11336
+ Cy as getOrderTypeNames,
11333
11337
  Hn as getOrderTypes,
11334
- mg as getOrderedAddressHierarchyLevels,
11335
- Dg as getPastAppointments,
11336
- cl as getPatientById,
11337
- hy as getPatientDiagnoses,
11338
- Gy as getPatientFormData,
11339
- ag as getPatientImageAsDataUrl,
11340
- Zf as getPatientMedicationBundle,
11341
- py as getPatientMedications,
11342
- ky as getPatientObservations,
11343
- Hp as getPatientObservationsBundle,
11344
- Ly as getPatientObservationsWithEncounterBundle,
11345
- gg as getPatientProfile,
11346
- Zy as getPatientPrograms,
11347
- vy as getPatientRadiologyInvestigationBundle,
11348
- wy as getPatientRadiologyInvestigationBundleWithImagingStudy,
11349
- Ey as getPatientRadiologyInvestigations,
11350
- vg as getPersonAttributeTypes,
11351
- pl as getPrimaryIdentifierType,
11352
- Km as getPriorityByOrder,
11353
- ev as getProgramByUUID,
11354
- yg as getRelationshipTypes,
11338
+ yg as getOrderedAddressHierarchyLevels,
11339
+ Lg as getPastAppointments,
11340
+ ul as getPatientById,
11341
+ gy as getPatientDiagnoses,
11342
+ Wy as getPatientFormData,
11343
+ cg as getPatientImageAsDataUrl,
11344
+ rh as getPatientMedicationBundle,
11345
+ yy as getPatientMedications,
11346
+ qy as getPatientObservations,
11347
+ Gp as getPatientObservationsBundle,
11348
+ Uy as getPatientObservationsWithEncounterBundle,
11349
+ vg as getPatientProfile,
11350
+ rv as getPatientPrograms,
11351
+ by as getPatientRadiologyInvestigationBundle,
11352
+ _y as getPatientRadiologyInvestigationBundleWithImagingStudy,
11353
+ Sy as getPatientRadiologyInvestigations,
11354
+ Eg as getPersonAttributeTypes,
11355
+ ml as getPrimaryIdentifierType,
11356
+ Wm as getPriorityByOrder,
11357
+ nv as getProgramByUUID,
11358
+ wg as getRelationshipTypes,
11355
11359
  Pt as getServiceRequests,
11356
- jg as getTodayDate,
11357
- Ig as getUpcomingAppointments,
11360
+ Hg as getTodayDate,
11361
+ Cg as getUpcomingAppointments,
11358
11362
  xn as getUserLoginLocation,
11359
11363
  qr as getUserPreferredLocale,
11360
- yy as getVaccinations,
11361
- Qm as getValueType,
11362
- Tg as getVisitTypes,
11363
- Xy as getVitalFlowSheetData,
11364
- Ym as groupByDate,
11365
- Hy as hasPrivilege,
11366
- Fm as initAppI18n,
11367
- Fy as initializeAuditListener,
11368
- Eg as isBooleanFormat,
11369
- bg as isConceptFormat,
11370
- Sg as isDateFormat,
11371
- _g as isNumberFormat,
11372
- Gm as isStringEmpty,
11373
- Rg as isTextFormat,
11374
- om as logAuditEvent,
11375
- jm as normalizeTranslationKey,
11376
- zg as notificationService,
11377
- Mu as parseQueryParams,
11378
- Um as patch,
11364
+ Ey as getVaccinations,
11365
+ Zm as getValueType,
11366
+ Ag as getVisitTypes,
11367
+ tv as getVitalFlowSheetData,
11368
+ Jm as groupByDate,
11369
+ Gy as hasPrivilege,
11370
+ Hm as initAppI18n,
11371
+ By as initializeAuditListener,
11372
+ _g as isBooleanFormat,
11373
+ Sg as isConceptFormat,
11374
+ Tg as isDateFormat,
11375
+ Rg as isNumberFormat,
11376
+ Ym as isStringEmpty,
11377
+ Og as isTextFormat,
11378
+ cm as logAuditEvent,
11379
+ Vm as normalizeTranslationKey,
11380
+ Yg as notificationService,
11381
+ ju as parseQueryParams,
11382
+ jm as patch,
11379
11383
  Me as post,
11380
- xm as put,
11381
- Hm as refreshQueries,
11382
- Pg as searchAppointmentsByAttribute,
11383
- Yg as searchConceptByName,
11384
- Gg as searchConcepts,
11384
+ Mm as put,
11385
+ zm as refreshQueries,
11386
+ Dg as searchAppointmentsByAttribute,
11387
+ Qg as searchConceptByName,
11388
+ Wg as searchConcepts,
11385
11389
  br as searchFHIRConcepts,
11386
- Sf as searchFHIRConceptsByName,
11387
- gy as searchMedications,
11388
- cg as searchPatientByCustomAttribute,
11389
- ig as searchPatientByNameOrId,
11390
- qy as shouldEnableEncounterFilter,
11391
- Bg as sortByDate,
11392
- Wy as transformContainerObservationsToForm2Observations,
11393
- Ky as transformFormDataToObservations,
11394
- Yy as transformObservationsToFormData,
11395
- Cg as updateAppointmentStatus,
11396
- Ry as updateDiagnosticReportBundle,
11397
- fg as updatePatient,
11398
- tv as updateProgramState,
11399
- Vm as useCamera,
11400
- ov as useSubscribeConsultationSaved,
11401
- uv as useTranslation
11390
+ Of as searchFHIRConceptsByName,
11391
+ wy as searchMedications,
11392
+ lg as searchPatientByCustomAttribute,
11393
+ ug as searchPatientByNameOrId,
11394
+ Fy as shouldEnableEncounterFilter,
11395
+ Kg as sortByDate,
11396
+ Xy as transformContainerObservationsToForm2Observations,
11397
+ Jy as transformFormDataToObservations,
11398
+ Qy as transformObservationsToFormData,
11399
+ kg as updateAppointmentStatus,
11400
+ Ay as updateDiagnosticReportBundle,
11401
+ pg as updatePatient,
11402
+ sv as updateProgramState,
11403
+ Bm as useCamera,
11404
+ cv as useSubscribeConsultationSaved,
11405
+ fv as useTranslation
11402
11406
  };