@realtek/core-theme 0.0.309 → 0.0.311

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.
@@ -4915,10 +4915,14 @@ function ic(e, t) {
4915
4915
  let r = [...e];
4916
4916
  return r[r.length - 1] = n[0], r;
4917
4917
  }
4918
- function ac(e) {
4918
+ function ac(e, t, n) {
4919
+ let r = e?.getFieldValue?.(ic(t, n));
4920
+ return r != null && r !== "" ? r : e?.getFieldValue?.(n);
4921
+ }
4922
+ function oc(e) {
4919
4923
  return String(e ?? "").split(",").map((e) => e.trim()).filter(Boolean);
4920
4924
  }
4921
- function oc(e, t) {
4925
+ function sc(e, t) {
4922
4926
  for (let n of e ?? []) {
4923
4927
  let e = t(n);
4924
4928
  if (e == null || e === "") continue;
@@ -4930,14 +4934,14 @@ function oc(e, t) {
4930
4934
  }
4931
4935
  return null;
4932
4936
  }
4933
- function sc({ input: e, compareFields: t, readValue: n }) {
4937
+ function cc({ input: e, compareFields: t, readValue: n }) {
4934
4938
  let r = {
4935
4939
  ok: !0,
4936
4940
  field: null,
4937
4941
  maximum: null
4938
4942
  };
4939
4943
  if (e == null || e === "") return r;
4940
- let i = oc(t, n);
4944
+ let i = sc(t, n);
4941
4945
  if (!i) return r;
4942
4946
  let a = Number(e);
4943
4947
  return Number.isFinite(a) ? {
@@ -4948,39 +4952,39 @@ function sc({ input: e, compareFields: t, readValue: n }) {
4948
4952
  }
4949
4953
  //#endregion
4950
4954
  //#region src/components/form/contextPrefill.js
4951
- var cc = { candidates: ["applicantId"] };
4952
- function lc(e) {
4955
+ var lc = { candidates: ["applicantId"] };
4956
+ function uc(e) {
4953
4957
  let t = String(e ?? "").trim();
4954
4958
  if (!t) return [];
4955
4959
  let n = t.endsWith("s") ? t.slice(0, -1) : t;
4956
4960
  return [...new Set([
4957
4961
  `${n}Id`,
4958
4962
  `${t}Id`,
4959
- ...cc[t] ?? []
4963
+ ...lc[t] ?? []
4960
4964
  ])];
4961
4965
  }
4962
- function uc(e, t) {
4966
+ function dc(e, t) {
4963
4967
  if (!t) return "";
4964
4968
  let n = (e) => e && typeof e == "object" ? e.id ?? e.value ?? "" : e ?? "";
4965
- for (let r of lc(e)) {
4969
+ for (let r of uc(e)) {
4966
4970
  let e = String(n(t[r]) || "");
4967
4971
  if (e) return e;
4968
4972
  }
4969
4973
  return "";
4970
4974
  }
4971
- function dc(e, t) {
4975
+ function fc(e, t) {
4972
4976
  let n = /* @__PURE__ */ new Set();
4973
4977
  return (e ?? []).forEach((e) => (e.fields ?? []).forEach((e) => {
4974
4978
  e?.prefillFromModule && n.add(t(e.prefillFromModule));
4975
4979
  })), [...n];
4976
4980
  }
4977
- function fc(e) {
4981
+ function pc(e) {
4978
4982
  return e?.payloadMode === "skip";
4979
4983
  }
4980
- function pc(e) {
4984
+ function mc(e) {
4981
4985
  return Array.isArray(e) ? e : Array.isArray(e?.groups) ? e.groups : Array.isArray(e?.data) ? e.data : Array.isArray(e?.data?.groups) ? e.data.groups : [];
4982
4986
  }
4983
- function mc(e) {
4987
+ function hc(e) {
4984
4988
  let t = {};
4985
4989
  return (e ?? []).forEach((e) => {
4986
4990
  e?.addRow || (e?.fields ?? []).forEach((e) => {
@@ -4988,7 +4992,7 @@ function mc(e) {
4988
4992
  });
4989
4993
  }), t;
4990
4994
  }
4991
- function hc(e, t) {
4995
+ function gc(e, t) {
4992
4996
  if (!(!e || !t)) for (let n of [
4993
4997
  t.prefillFrom,
4994
4998
  t.field,
@@ -5001,62 +5005,65 @@ function hc(e, t) {
5001
5005
  }
5002
5006
  //#endregion
5003
5007
  //#region src/components/form/ValidationOverrideCheckbox.jsx
5004
- function gc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
5008
+ function _c({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
5005
5009
  let a = Vi(t), o = b.useWatch(n, e);
5006
5010
  if (!a) return null;
5007
- let s = () => {
5011
+ let s = a.label || "Allow beyond the limit", c = () => {
5008
5012
  setTimeout(() => {
5009
5013
  e?.validateFields?.([r]).catch(() => {});
5010
5014
  });
5011
- }, c = /* @__PURE__ */ C(y, {
5012
- className: "v1-override-checkbox",
5013
- checked: !!o,
5014
- disabled: i,
5015
- onChange: async (r) => {
5016
- if (!r.target.checked) {
5017
- e.setFieldValue(n, !1), s();
5018
- return;
5019
- }
5020
- let i = await Ga(Ji(t));
5021
- e.setFieldValue(n, !!i), s();
5022
- },
5023
- children: a.label || "Allow beyond the limit"
5015
+ }, l = async (r) => {
5016
+ if (!r.target.checked) {
5017
+ e.setFieldValue(n, !1), c();
5018
+ return;
5019
+ }
5020
+ let i = await Ga(Ji(t));
5021
+ e.setFieldValue(n, !!i), c();
5022
+ }, u = a.help ? `${s} — ${a.help}` : s;
5023
+ return /* @__PURE__ */ C(x, {
5024
+ title: u,
5025
+ children: /* @__PURE__ */ C("span", {
5026
+ className: "v1-override-wrap",
5027
+ children: /* @__PURE__ */ C(y, {
5028
+ className: "v1-override-checkbox",
5029
+ checked: !!o,
5030
+ disabled: i,
5031
+ onChange: l,
5032
+ "aria-label": u
5033
+ })
5034
+ })
5024
5035
  });
5025
- return a.help ? /* @__PURE__ */ C(x, {
5026
- title: a.help,
5027
- children: c
5028
- }) : c;
5029
5036
  }
5030
5037
  //#endregion
5031
5038
  //#region src/components/form/prefillWhenRules.js
5032
- var _c = (e) => String(e ?? "");
5033
- function vc(e) {
5039
+ var vc = (e) => String(e ?? "");
5040
+ function yc(e) {
5034
5041
  let t = /* @__PURE__ */ new Set(), n = [];
5035
5042
  return (Array.isArray(e) ? e : []).forEach((e) => {
5036
5043
  let r = e?.field;
5037
5044
  !r || t.has(r) || (t.add(r), n.push(r));
5038
5045
  }), n;
5039
5046
  }
5040
- function yc(e, t, n, r) {
5041
- return vc(e).map((e) => ({
5047
+ function bc(e, t, n, r) {
5048
+ return yc(e).map((e) => ({
5042
5049
  field: e,
5043
5050
  path: n(t, e, r)
5044
5051
  }));
5045
5052
  }
5046
- function bc(e, t = {}) {
5047
- return !e || !e.field ? !1 : _c(t[e.field]) === _c(e.value);
5053
+ function xc(e, t = {}) {
5054
+ return !e || !e.field ? !1 : vc(t[e.field]) === vc(e.value);
5048
5055
  }
5049
- function xc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
5050
- let o = (Array.isArray(e) ? e : []).find((e) => bc(e, t));
5056
+ function Sc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
5057
+ let o = (Array.isArray(e) ? e : []).find((e) => xc(e, t));
5051
5058
  return o ? o.clearValue ? a ? { action: "none" } : { action: "clear" } : {
5052
5059
  action: "set",
5053
5060
  value: o.setValue
5054
- } : i && r !== void 0 && _c(n) === _c(r) ? { action: "clear" } : { action: "none" };
5061
+ } : i && r !== void 0 && vc(n) === vc(r) ? { action: "clear" } : { action: "none" };
5055
5062
  }
5056
5063
  //#endregion
5057
5064
  //#region src/components/form/optionConstraints.js
5058
5065
  var Q = (e) => String(e ?? "").trim().toLowerCase();
5059
- function Sc(e) {
5066
+ function Cc(e) {
5060
5067
  let t = Array.isArray(e) ? e : [e], n = [];
5061
5068
  return t.forEach((e) => {
5062
5069
  if (!(e == null || e === "")) {
@@ -5076,38 +5083,38 @@ function Sc(e) {
5076
5083
  }
5077
5084
  }), n;
5078
5085
  }
5079
- function Cc(e = [], t) {
5080
- let n = Sc(t);
5086
+ function wc(e = [], t) {
5087
+ let n = Cc(t);
5081
5088
  if (!n.length || !Array.isArray(e) || e.length === 0) return e;
5082
5089
  let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(Q(e.value)) || r.has(Q(e.label)) : r.has(Q(e)));
5083
5090
  return i.length > 0 ? i : e;
5084
5091
  }
5085
- function wc(e) {
5092
+ function Tc(e) {
5086
5093
  let t = [];
5087
5094
  return [e?.setValue, e?.setValueLabel].forEach((e) => {
5088
5095
  e == null || e === "" || t.push(Q(e));
5089
5096
  }), t;
5090
5097
  }
5091
- function Tc(e, t = {}) {
5098
+ function Ec(e, t = {}) {
5092
5099
  let n = Array.isArray(e) ? e : [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
5093
5100
  return n.forEach((e) => {
5094
5101
  if (!e || e.clearValue) return;
5095
- let n = wc(e);
5102
+ let n = Tc(e);
5096
5103
  if (!n.length) return;
5097
- let a = bc(e, t) ? i : r;
5104
+ let a = xc(e, t) ? i : r;
5098
5105
  n.forEach((e) => a.add(e));
5099
5106
  }), i.forEach((e) => r.delete(e)), [...r];
5100
5107
  }
5101
- function Ec(e = [], t, n) {
5102
- let r = Tc(t, n);
5108
+ function Dc(e = [], t, n) {
5109
+ let r = Ec(t, n);
5103
5110
  if (!r.length || !Array.isArray(e) || e.length === 0) return e;
5104
5111
  let i = new Set(r);
5105
5112
  return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(Q(e.value)) || i.has(Q(e.label))) : !i.has(Q(e)));
5106
5113
  }
5107
5114
  //#endregion
5108
5115
  //#region src/components/form/optionRowFilters.js
5109
- var Dc = 64;
5110
- function Oc(e) {
5116
+ var Oc = 64;
5117
+ function kc(e) {
5111
5118
  if (String(e ?? "").trim() !== "currentUserId") return "";
5112
5119
  try {
5113
5120
  return typeof localStorage > "u" ? "" : String(localStorage.getItem("userId") ?? "").trim();
@@ -5115,34 +5122,34 @@ function Oc(e) {
5115
5122
  return "";
5116
5123
  }
5117
5124
  }
5118
- var kc = (e) => String(e ?? "").trim().toLowerCase(), Ac = (e) => e != null && String(e).trim() !== "";
5119
- function jc(e) {
5125
+ var Ac = (e) => String(e ?? "").trim().toLowerCase(), jc = (e) => e != null && String(e).trim() !== "";
5126
+ function Mc(e) {
5120
5127
  let t = Array.isArray(e) ? e : String(e ?? "").split(",");
5121
- return new Set(t.map(kc).filter((e) => e !== ""));
5128
+ return new Set(t.map(Ac).filter((e) => e !== ""));
5122
5129
  }
5123
- function Mc(e, t) {
5124
- return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => Ac(e?.extraData?.[t]));
5130
+ function Nc(e, t) {
5131
+ return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => jc(e?.extraData?.[t]));
5125
5132
  }
5126
- function Nc(e, t, n) {
5133
+ function Pc(e, t, n) {
5127
5134
  let r = e?.extraData?.[t];
5128
- if (!Ac(n)) return r === !0;
5129
- let i = jc(n);
5130
- return i.size === 0 ? r === !0 : i.has(kc(r));
5135
+ if (!jc(n)) return r === !0;
5136
+ let i = Mc(n);
5137
+ return i.size === 0 ? r === !0 : i.has(Ac(r));
5131
5138
  }
5132
- function Pc(e, t) {
5139
+ function Fc(e, t) {
5133
5140
  let n = /* @__PURE__ */ new Map();
5134
5141
  return (Array.isArray(e) ? e : []).forEach((e) => {
5135
- let r = kc(e?.value);
5136
- r && n.set(r, kc(e?.extraData?.[t]));
5142
+ let r = Ac(e?.value);
5143
+ r && n.set(r, Ac(e?.extraData?.[t]));
5137
5144
  }), n;
5138
5145
  }
5139
- function Fc(e, t, n) {
5140
- let r = kc(n);
5146
+ function Ic(e, t, n) {
5147
+ let r = Ac(n);
5141
5148
  if (!r) return !1;
5142
- let i = /* @__PURE__ */ new Set(), a = kc(e);
5149
+ let i = /* @__PURE__ */ new Set(), a = Ac(e);
5143
5150
  if (!a) return !1;
5144
5151
  i.add(a);
5145
- for (let e = 0; e < Dc; e += 1) {
5152
+ for (let e = 0; e < Oc; e += 1) {
5146
5153
  let e = t.get(a);
5147
5154
  if (!e) return !1;
5148
5155
  if (e === r) return !0;
@@ -5151,57 +5158,57 @@ function Fc(e, t, n) {
5151
5158
  }
5152
5159
  return !1;
5153
5160
  }
5154
- function Ic(e = {}) {
5161
+ function Lc(e = {}) {
5155
5162
  let t = [], n = (e) => {
5156
5163
  let n = String(e ?? "").trim();
5157
5164
  n && !t.includes(n) && t.push(n);
5158
5165
  };
5159
5166
  return (Array.isArray(e.extraFields) ? e.extraFields : []).forEach(n), n(e.optionsRequireExtraField), n(e.optionsHierarchyParentField), t;
5160
5167
  }
5161
- function Lc(e, t = {}, n = {}) {
5168
+ function Rc(e, t = {}, n = {}) {
5162
5169
  if (!Array.isArray(e) || e.length === 0) return e;
5163
5170
  let r = n.source ? `[${n.source}]` : "[optionRowFilters]", i = t.field ?? t.label ?? "(unnamed field)", a = typeof n.warn == "function" ? n.warn : (e) => {
5164
5171
  typeof console < "u" && console.warn(e);
5165
5172
  }, o = e, s = String(t.optionsRequireExtraField ?? "").trim();
5166
- s && (Mc(o, s) ? o = o.filter((e) => Nc(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
5173
+ s && (Nc(o, s) ? o = o.filter((e) => Pc(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
5167
5174
  let c = String(t.optionsHierarchyParentField ?? "").trim();
5168
5175
  if (c) {
5169
- let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = Oc(n);
5176
+ let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = kc(n);
5170
5177
  if (!s) a(`${r} "${i}": hierarchy filter SKIPPED — identity "${n}" could not be resolved (no signed-in user id available). Showing the list unrestricted by reporting line.`);
5171
- else if (!Mc(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
5178
+ else if (!Nc(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
5172
5179
  else {
5173
- let t = Pc(e, c);
5174
- o = o.filter((e) => Fc(e?.value, t, s));
5180
+ let t = Fc(e, c);
5181
+ o = o.filter((e) => Ic(e?.value, t, s));
5175
5182
  }
5176
5183
  }
5177
5184
  return o;
5178
5185
  }
5179
5186
  //#endregion
5180
5187
  //#region src/components/form/fieldTooltip.js
5181
- var Rc = (e) => e == null || String(e).trim() === "", zc = (e) => e === !0 || e === 1 || e === "1" || e === "true";
5182
- function Bc(e) {
5183
- return Rc(e?.tooltip) ? zc(e?.infoEnabled) && !Rc(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
5188
+ var zc = (e) => e == null || String(e).trim() === "", Bc = (e) => e === !0 || e === 1 || e === "1" || e === "true";
5189
+ function Vc(e) {
5190
+ return zc(e?.tooltip) ? Bc(e?.infoEnabled) && !zc(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
5184
5191
  }
5185
5192
  //#endregion
5186
5193
  //#region src/utils/roleAllowsAction.js
5187
- function Vc(e) {
5188
- return e == null ? !0 : typeof e == "object" ? Vc(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
5194
+ function Hc(e) {
5195
+ return e == null ? !0 : typeof e == "object" ? Hc(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
5189
5196
  }
5190
- function Hc(e, t) {
5197
+ function Uc(e, t) {
5191
5198
  if (!e) return !0;
5192
5199
  try {
5193
5200
  let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split(".");
5194
- return Vc((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
5201
+ return Hc((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
5195
5202
  } catch {
5196
5203
  return !0;
5197
5204
  }
5198
5205
  }
5199
5206
  //#endregion
5200
5207
  //#region src/utils/afterSubmitNav.js
5201
- function Uc(e) {
5208
+ function Wc(e) {
5202
5209
  return (e ?? []).filter((e) => e?.afterSubmit?.mode).sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.afterSubmit ?? null;
5203
5210
  }
5204
- function Wc(e, t, n) {
5211
+ function Gc(e, t, n) {
5205
5212
  let r = String(e ?? "").trim();
5206
5213
  return !r || !r.startsWith("/") || r.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(r) ? null : r.replace(/:([A-Za-z_][\w]*)/g, (e, r) => {
5207
5214
  let i = r === "id" ? t : n?.[r];
@@ -5210,50 +5217,50 @@ function Wc(e, t, n) {
5210
5217
  }
5211
5218
  //#endregion
5212
5219
  //#region src/utils/backNav.js
5213
- function Gc(e = typeof window < "u" ? window : void 0) {
5220
+ function Kc(e = typeof window < "u" ? window : void 0) {
5214
5221
  let t = e?.history?.state?.idx;
5215
5222
  return typeof t == "number" && t > 0;
5216
5223
  }
5217
- function Kc({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
5218
- return t && e ? { path: e } : Gc(r) ? { back: !0 } : e ? { path: e } : { path: n };
5224
+ function qc({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
5225
+ return t && e ? { path: e } : Kc(r) ? { back: !0 } : e ? { path: e } : { path: n };
5219
5226
  }
5220
- function qc(e, t = {}) {
5221
- let n = Kc(t);
5227
+ function Jc(e, t = {}) {
5228
+ let n = qc(t);
5222
5229
  return n.back ? e(-1) : e(n.path), n;
5223
5230
  }
5224
5231
  //#endregion
5225
5232
  //#region src/components/form/educationRules.js
5226
- var Jc = (e) => e == null ? "" : String(e).trim();
5227
- function Yc(e, t) {
5233
+ var Yc = (e) => e == null ? "" : String(e).trim();
5234
+ function Xc(e, t) {
5228
5235
  let n = e?.regionRules;
5229
5236
  if (!n || typeof n != "object") return e ?? {};
5230
- let r = Jc(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5237
+ let r = Yc(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5231
5238
  return !i || typeof i != "object" ? e ?? {} : {
5232
5239
  ...e,
5233
5240
  ...i
5234
5241
  };
5235
5242
  }
5236
- function Xc(e) {
5237
- return e?.allowInProgress !== !1;
5238
- }
5239
5243
  function Zc(e) {
5240
- return Xc(e) ? "" : el(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
5244
+ return e?.allowInProgress !== !1;
5241
5245
  }
5242
5246
  function Qc(e) {
5243
- return Xc(e) ? "allow" : Jc(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
5247
+ return Zc(e) ? "" : tl(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
5244
5248
  }
5245
5249
  function $c(e) {
5246
- return Qc(e) === "block";
5250
+ return Zc(e) ? "allow" : Yc(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
5247
5251
  }
5248
5252
  function el(e) {
5249
- return Qc(e) === "warn";
5253
+ return $c(e) === "block";
5250
5254
  }
5251
5255
  function tl(e) {
5252
- if (!$c(e)) return null;
5253
- let t = Zc(e);
5256
+ return $c(e) === "warn";
5257
+ }
5258
+ function nl(e) {
5259
+ if (!el(e)) return null;
5260
+ let t = Qc(e);
5254
5261
  return { validator: (e, n) => n === !0 ? Promise.reject(Error(t)) : Promise.resolve() };
5255
5262
  }
5256
- function nl(e, t = {}) {
5263
+ function rl(e, t = {}) {
5257
5264
  let n = t.tieBreak ?? "endDate", r = t.field ?? "startDate";
5258
5265
  for (let t of [n, r]) {
5259
5266
  let n = e?.[t];
@@ -5263,50 +5270,50 @@ function nl(e, t = {}) {
5263
5270
  }
5264
5271
  return null;
5265
5272
  }
5266
- function rl(e, t = {}) {
5273
+ function il(e, t = {}) {
5267
5274
  let n = t.inProgressField ?? "currentStudyingHere";
5268
5275
  return !!e?.[n];
5269
5276
  }
5270
- function il(e = [], t = {}) {
5277
+ function al(e = [], t = {}) {
5271
5278
  let n = (t.direction ?? "desc") === "desc";
5272
5279
  return e.map((e, n) => ({
5273
5280
  index: n,
5274
- key: nl(e, t),
5275
- ongoing: t.inProgressFirst !== !1 && rl(e, t)
5281
+ key: rl(e, t),
5282
+ ongoing: t.inProgressFirst !== !1 && il(e, t)
5276
5283
  })).slice().sort((e, t) => e.ongoing === t.ongoing ? e.key === null && t.key === null ? e.index - t.index : e.key === null ? 1 : t.key === null ? -1 : e.key === t.key ? e.index - t.index : n ? t.key - e.key : e.key - t.key : e.ongoing ? -1 : 1).map((e) => e.index);
5277
5284
  }
5278
- function al(e, t, n = {}) {
5285
+ function ol(e, t, n = {}) {
5279
5286
  if (!Array.isArray(e) || e.length < 2 || t == null || t < 0 || t >= e.length) return null;
5280
- let r = il(e, n).indexOf(t);
5287
+ let r = al(e, n).indexOf(t);
5281
5288
  return r === -1 || r === t ? null : {
5282
5289
  from: t,
5283
5290
  to: r,
5284
- reason: rl(e[t], n) ? "inProgress" : "outOfOrder"
5291
+ reason: il(e[t], n) ? "inProgress" : "outOfOrder"
5285
5292
  };
5286
5293
  }
5287
- var ol = Object.freeze({
5294
+ var sl = Object.freeze({
5288
5295
  inProgress: "You’ve marked this one as still ongoing, so it’s the most recent. Shall we move it to the top? This list reads best newest first.",
5289
5296
  outOfOrder: "These dates make this the most recent one. Shall we move it to the top? This list reads best newest first.",
5290
5297
  ok: "Yes, move it up",
5291
5298
  keep: "No, leave it here"
5292
5299
  });
5293
- function sl(e, t = {}) {
5300
+ function cl(e, t = {}) {
5294
5301
  let n = {
5295
- ...ol,
5302
+ ...sl,
5296
5303
  ...t.messages ?? {}
5297
5304
  };
5298
5305
  return n[e] ?? n.outOfOrder;
5299
5306
  }
5300
- function cl(e, t = {}) {
5301
- let n = t.levelField ?? "qualification", r = Jc(e?.[n]);
5307
+ function ll(e, t = {}) {
5308
+ let n = t.levelField ?? "qualification", r = Yc(e?.[n]);
5302
5309
  if (!r) return null;
5303
5310
  let i = t.levels ?? {}, a = i[r] ?? i[r.toLowerCase()] ?? i[r.toUpperCase()];
5304
- return Number.isFinite(Number(a)) ? Number(a) : ll(r, t);
5311
+ return Number.isFinite(Number(a)) ? Number(a) : ul(r, t);
5305
5312
  }
5306
- function ll(e, t) {
5313
+ function ul(e, t) {
5307
5314
  let n = Array.isArray(t?.levelPatterns) ? t.levelPatterns : [], r = e.toLowerCase();
5308
5315
  for (let e of n) {
5309
- let t = Jc(e?.match);
5316
+ let t = Yc(e?.match);
5310
5317
  if (!t) continue;
5311
5318
  let n;
5312
5319
  try {
@@ -5318,14 +5325,14 @@ function ll(e, t) {
5318
5325
  }
5319
5326
  return null;
5320
5327
  }
5321
- function ul(e, t = {}) {
5322
- return Jc((t?.levelLabels ?? {})[e]) || Jc(e);
5328
+ function dl(e, t = {}) {
5329
+ return Yc((t?.levelLabels ?? {})[e]) || Yc(e);
5323
5330
  }
5324
- function dl(e = [], t = {}) {
5331
+ function fl(e = [], t = {}) {
5325
5332
  if (!t || t.requireBelow === !1) return [];
5326
5333
  let n = t.levels ?? {}, r = t.requiredLevels ?? [];
5327
5334
  if (!r.length) return [];
5328
- let i = e.map((e) => cl(e, t)).filter((e) => e !== null);
5335
+ let i = e.map((e) => ll(e, t)).filter((e) => e !== null);
5329
5336
  if (!i.length) return [];
5330
5337
  let a = Math.max(...i), o = [];
5331
5338
  return r.forEach((e) => {
@@ -5333,43 +5340,43 @@ function dl(e = [], t = {}) {
5333
5340
  Number.isFinite(r) && (r >= a || i.includes(r) || o.push(t));
5334
5341
  }), o;
5335
5342
  }
5336
- function fl(e, t = {}) {
5337
- let n = dl(e, t);
5343
+ function pl(e, t = {}) {
5344
+ let n = fl(e, t);
5338
5345
  if (!n.length) return "";
5339
- let r = n.map((e) => ul(e, t)).join(", ");
5346
+ let r = n.map((e) => dl(e, t)).join(", ");
5340
5347
  return (t.message || "You’ve added a higher qualification but not the {missing} below it. Please add that too.").replace("{missing}", r);
5341
5348
  }
5342
- async function pl({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5349
+ async function ml({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5343
5350
  let a = e?.orderBy;
5344
5351
  if (!a || a.confirmMove === !1 || typeof r != "function") return !1;
5345
- let o = al(t, n, a);
5352
+ let o = ol(t, n, a);
5346
5353
  if (!o) return !1;
5347
5354
  let s = {
5348
- ...ol,
5355
+ ...sl,
5349
5356
  ...a.messages ?? {}
5350
5357
  };
5351
5358
  return await i({
5352
5359
  reason: o.reason,
5353
5360
  title: o.reason === "inProgress" ? "This looks like the most recent one" : "These dates make this the most recent one",
5354
- body: sl(o.reason, a),
5361
+ body: cl(o.reason, a),
5355
5362
  okText: s.ok,
5356
5363
  cancelText: s.keep,
5357
5364
  from: o.from,
5358
5365
  to: o.to
5359
5366
  }) ? (r(o.from, o.to), !0) : !1;
5360
5367
  }
5361
- function ml(e, t) {
5362
- let n = Yc(e, t), r = n?.orderBy?.inProgressField;
5368
+ function hl(e, t) {
5369
+ let n = Xc(e, t), r = n?.orderBy?.inProgressField;
5363
5370
  return r ? {
5364
5371
  name: n.name,
5365
5372
  label: n.label ?? n.name,
5366
5373
  rowsKey: n.payloadKey || n.name,
5367
5374
  inProgressField: r,
5368
- severity: Qc(n),
5369
- message: Zc(n)
5375
+ severity: $c(n),
5376
+ message: Qc(n)
5370
5377
  } : null;
5371
5378
  }
5372
- function hl(e = [], t, n) {
5379
+ function gl(e = [], t, n) {
5373
5380
  if (!n) return {
5374
5381
  severity: "allow",
5375
5382
  message: "",
@@ -5377,8 +5384,8 @@ function hl(e = [], t, n) {
5377
5384
  };
5378
5385
  let r = null;
5379
5386
  for (let i of e) {
5380
- let e = ml(i, t);
5381
- if (!(!e || e.severity === "allow") && gl(n, e.rowsKey).some((t) => rl(t, e))) {
5387
+ let e = hl(i, t);
5388
+ if (!(!e || e.severity === "allow") && _l(n, e.rowsKey).some((t) => il(t, e))) {
5382
5389
  if (e.severity === "block") return {
5383
5390
  severity: "block",
5384
5391
  message: e.message,
@@ -5397,23 +5404,23 @@ function hl(e = [], t, n) {
5397
5404
  group: null
5398
5405
  };
5399
5406
  }
5400
- function gl(e, t) {
5407
+ function _l(e, t) {
5401
5408
  let n = e?.[t];
5402
5409
  return Array.isArray(n) ? n : Array.isArray(n?.rows) ? n.rows : [];
5403
5410
  }
5404
- function _l(e) {
5411
+ function vl(e) {
5405
5412
  return String(e?.severity ?? "").toLowerCase() === "block" ? "block" : "warn";
5406
5413
  }
5407
- function vl(e = [], t = {}) {
5414
+ function yl(e = [], t = {}) {
5408
5415
  let n = null;
5409
5416
  for (let r of e) {
5410
5417
  let e = r?.levelRule;
5411
5418
  if (!e) continue;
5412
- let i = yl(t, r);
5419
+ let i = bl(t, r);
5413
5420
  if (!i.length) continue;
5414
- let a = fl(i, e);
5421
+ let a = pl(i, e);
5415
5422
  if (a) {
5416
- if (_l(e) === "block") return {
5423
+ if (vl(e) === "block") return {
5417
5424
  severity: "block",
5418
5425
  message: a,
5419
5426
  group: r
@@ -5431,7 +5438,7 @@ function vl(e = [], t = {}) {
5431
5438
  group: null
5432
5439
  };
5433
5440
  }
5434
- function yl(e, t) {
5441
+ function bl(e, t) {
5435
5442
  for (let n of [t?.name, t?.payloadKey]) {
5436
5443
  if (!n) continue;
5437
5444
  let t = e?.[n];
@@ -5441,10 +5448,10 @@ function yl(e, t) {
5441
5448
  }
5442
5449
  //#endregion
5443
5450
  //#region src/components/form/clearGroupOnChange.js
5444
- function bl(e, t) {
5451
+ function xl(e, t) {
5445
5452
  return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), t] : [t];
5446
5453
  }
5447
- function xl(e, t) {
5454
+ function Sl(e, t) {
5448
5455
  let n = e?.field, r = [];
5449
5456
  e?.clearGroupOnChange && (t instanceof Set ? [...t] : t ?? []).forEach((e) => {
5450
5457
  e && e !== n && r.push(e);
@@ -5454,24 +5461,24 @@ function xl(e, t) {
5454
5461
  e && e !== n && r.push(e);
5455
5462
  }) : typeof i == "string" && i.trim() && i.trim() !== n && r.push(i.trim()), [...new Set(r)];
5456
5463
  }
5457
- function Sl(e, t, n, r) {
5458
- let i = xl(t, r).map((e) => bl(n, e));
5464
+ function Cl(e, t, n, r) {
5465
+ let i = Sl(t, r).map((e) => xl(n, e));
5459
5466
  return i.forEach((t) => e.setFieldValue(t, null)), i;
5460
5467
  }
5461
5468
  //#endregion
5462
5469
  //#region src/components/form/resolveStoredOptions.js
5463
- function Cl(e) {
5470
+ function wl(e) {
5464
5471
  return (Array.isArray(e) ? e : [e]).map((e) => e && typeof e == "object" ? e.value ?? e.key ?? e.id : e).filter((e) => e != null && e !== "");
5465
5472
  }
5466
- function wl(e, t = []) {
5473
+ function Tl(e, t = []) {
5467
5474
  let n = new Set((t ?? []).map((e) => String(e?.value))), r = [];
5468
- for (let t of Cl(e)) {
5475
+ for (let t of wl(e)) {
5469
5476
  let e = String(t);
5470
5477
  !n.has(e) && !r.includes(e) && r.push(e);
5471
5478
  }
5472
5479
  return r;
5473
5480
  }
5474
- async function Tl(e, r) {
5481
+ async function El(e, r) {
5475
5482
  if (!e?.lookupCollection || !r?.length) return [];
5476
5483
  let i = new URLSearchParams({
5477
5484
  collection: e.lookupCollection,
@@ -5483,7 +5490,7 @@ async function Tl(e, r) {
5483
5490
  let a = await t(n, `/admin/lookup-dropdown-values?${i}`), o = a?.data ?? a ?? [];
5484
5491
  return Array.isArray(o) ? o : [];
5485
5492
  }
5486
- function El(e = [], t = []) {
5493
+ function Dl(e = [], t = []) {
5487
5494
  if (!t.length) return e;
5488
5495
  let n = new Set((e ?? []).map((e) => String(e?.value))), r = t.filter((e) => !n.has(String(e?.value))).map((e) => ({
5489
5496
  ...e,
@@ -5493,8 +5500,8 @@ function El(e = [], t = []) {
5493
5500
  }
5494
5501
  //#endregion
5495
5502
  //#region src/components/form/dateRules.js
5496
- var Dl = (e) => e == null || e === "";
5497
- function Ol(e) {
5503
+ var Ol = (e) => e == null || e === "";
5504
+ function kl(e) {
5498
5505
  if (!e) return null;
5499
5506
  if (typeof e.valueOf == "function") {
5500
5507
  let t = e.valueOf();
@@ -5508,12 +5515,12 @@ function $(e) {
5508
5515
  let t = T(e);
5509
5516
  return t.isValid() ? t.startOf("day").valueOf() : null;
5510
5517
  }
5511
- function kl(e) {
5518
+ function Al(e) {
5512
5519
  if (!e) return null;
5513
5520
  let t = T(e);
5514
5521
  return t.isValid() ? t.hour() * 60 + t.minute() : null;
5515
5522
  }
5516
- var Al = {
5523
+ var jl = {
5517
5524
  d: "day",
5518
5525
  day: "day",
5519
5526
  days: "day",
@@ -5529,13 +5536,13 @@ var Al = {
5529
5536
  year: "year",
5530
5537
  years: "year"
5531
5538
  };
5532
- function jl(e) {
5539
+ function Ml(e) {
5533
5540
  if (e == null || e === "") return null;
5534
5541
  if (typeof e == "object" && !Array.isArray(e)) {
5535
5542
  let t = Number(e.value ?? e.count ?? e.amount);
5536
5543
  return !Number.isFinite(t) || t <= 0 ? null : {
5537
5544
  value: t,
5538
- unit: Al[String(e.unit ?? "month").toLowerCase()] ?? "month"
5545
+ unit: jl[String(e.unit ?? "month").toLowerCase()] ?? "month"
5539
5546
  };
5540
5547
  }
5541
5548
  let t = String(e).trim().toLowerCase();
@@ -5545,49 +5552,49 @@ function jl(e) {
5545
5552
  let r = Number(n[1]);
5546
5553
  return !Number.isFinite(r) || r <= 0 ? null : {
5547
5554
  value: r,
5548
- unit: Al[n[2]] ?? "month"
5555
+ unit: jl[n[2]] ?? "month"
5549
5556
  };
5550
5557
  }
5551
- function Ml(e, t) {
5558
+ function Nl(e, t) {
5552
5559
  let n = e?.minGapFrom ?? e?.gapFrom;
5553
5560
  if (n && typeof t == "function") {
5554
- let e = jl(t(n));
5561
+ let e = Ml(t(n));
5555
5562
  if (e) return e;
5556
5563
  }
5557
- return jl(e?.minGap);
5564
+ return Ml(e?.minGap);
5558
5565
  }
5559
- function Nl(e, t, n, r) {
5566
+ function Pl(e, t, n, r) {
5560
5567
  if (t === null) return null;
5561
- let i = Ml(n, r), a = T(t);
5568
+ let i = Nl(n, r), a = T(t);
5562
5569
  return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
5563
5570
  }
5564
- function Pl(e, t, n, r, i) {
5571
+ function Fl(e, t, n, r, i) {
5565
5572
  if (t === null || n === null) return !1;
5566
- let a = Nl(e, n, r, i);
5573
+ let a = Pl(e, n, r, i);
5567
5574
  if (a === null) return !1;
5568
- let o = !!r?.strict && !Ml(r, i);
5575
+ let o = !!r?.strict && !Nl(r, i);
5569
5576
  return e === "dateAfterField" ? o ? t <= a : t < a : o ? t >= a : t > a;
5570
5577
  }
5571
- function Fl(e, t, n, r) {
5578
+ function Il(e, t, n, r) {
5572
5579
  if (n?.message) return n.message;
5573
- let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Ml(n, r);
5580
+ let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Nl(n, r);
5574
5581
  if (a) {
5575
5582
  let n = a.value === 1 ? a.unit : `${a.unit}s`;
5576
5583
  return e === "dateAfterField" ? `${t} must be at least ${a.value} ${n} after ${i}` : `${t} must be at least ${a.value} ${n} before ${i}`;
5577
5584
  }
5578
5585
  return n?.strict ? e === "dateAfterField" ? `${t} must be after ${i}` : `${t} must be before ${i}` : e === "dateAfterField" ? `${t} must be on or after ${i}` : `${t} must be on or before ${i}`;
5579
5586
  }
5580
- function Il({ type: e, label: t, rule: n, readSibling: r }) {
5587
+ function Ll({ type: e, label: t, rule: n, readSibling: r }) {
5581
5588
  return { validator: async (i, a) => {
5582
5589
  let o = n?.value ?? n?.compareField ?? n?.field;
5583
- if (!o || Dl(a)) return Promise.resolve();
5590
+ if (!o || Ol(a)) return Promise.resolve();
5584
5591
  let s = r(o);
5585
- if (Dl(s)) return Promise.resolve();
5592
+ if (Ol(s)) return Promise.resolve();
5586
5593
  let c = $(a), l = $(s);
5587
- return c === null || l === null ? Promise.resolve() : Pl(e, c, l, n, r) ? Promise.reject(Error(Fl(e, t, n, r))) : Promise.resolve();
5594
+ return c === null || l === null ? Promise.resolve() : Fl(e, c, l, n, r) ? Promise.reject(Error(Il(e, t, n, r))) : Promise.resolve();
5588
5595
  } };
5589
5596
  }
5590
- function Ll(e, t, { rows: n, rowIndex: r } = {}) {
5597
+ function Rl(e, t, { rows: n, rowIndex: r } = {}) {
5591
5598
  if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
5592
5599
  let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
5593
5600
  if (o) {
@@ -5601,11 +5608,11 @@ function Ll(e, t, { rows: n, rowIndex: r } = {}) {
5601
5608
  }
5602
5609
  return !1;
5603
5610
  }
5604
- function Rl(e, t = "above") {
5611
+ function zl(e, t = "above") {
5605
5612
  let n = e?.messages ?? {};
5606
5613
  return t === "below" ? n.below || "This starts before the entry below it finished. Entries are listed newest first, so they cannot overlap." : n.above || "This overlaps the entry above it. Entries are listed newest first, so this one must finish before that one started.";
5607
5614
  }
5608
- function zl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = qn }) {
5615
+ function Bl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = qn }) {
5609
5616
  let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
5610
5617
  for (let e of a) {
5611
5618
  let n = typeof e == "string" ? { type: e } : e, r = n?.type;
@@ -5619,16 +5626,16 @@ function zl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = qn }) {
5619
5626
  o.push((i) => {
5620
5627
  if (!i) return !1;
5621
5628
  let a = t(e);
5622
- return Dl(a) ? !1 : Pl(r, $(i), $(a), n, t);
5629
+ return Ol(a) ? !1 : Fl(r, $(i), $(a), n, t);
5623
5630
  });
5624
5631
  }
5625
5632
  }
5626
- return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? Ll($(t), e.rowHierarchy, {
5633
+ return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? Rl($(t), e.rowHierarchy, {
5627
5634
  rows: n,
5628
5635
  rowIndex: r
5629
5636
  }) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
5630
5637
  }
5631
- function Bl(e, t = qn) {
5638
+ function Vl(e, t = qn) {
5632
5639
  let n = e?.validations ?? e?.validation ?? e?.rules ?? [];
5633
5640
  for (let e of n) {
5634
5641
  let n = typeof e == "string" ? { type: e } : e;
@@ -5636,44 +5643,44 @@ function Bl(e, t = qn) {
5636
5643
  if (n?.type === "noFutureDate" || n?.type === "noPastDate") return t();
5637
5644
  }
5638
5645
  }
5639
- function Vl({ field: e, rows: t, rowIndex: n }) {
5646
+ function Hl({ field: e, rows: t, rowIndex: n }) {
5640
5647
  let r = e?.rowHierarchy;
5641
5648
  return { validator: async (e, i) => {
5642
- if (!r || Dl(i) || !Array.isArray(t) || n == null) return Promise.resolve();
5649
+ if (!r || Ol(i) || !Array.isArray(t) || n == null) return Promise.resolve();
5643
5650
  let a = $(i);
5644
- if (a === null || !Ll(a, r, {
5651
+ if (a === null || !Rl(a, r, {
5645
5652
  rows: t,
5646
5653
  rowIndex: n
5647
5654
  })) return Promise.resolve();
5648
5655
  let o = r.startField ?? "startDate", s = t[n - 1], c = s ? $(s[o]) : null, l = c !== null && a >= c ? "above" : "below";
5649
- return Promise.reject(Error(Rl(r, l)));
5656
+ return Promise.reject(Error(zl(r, l)));
5650
5657
  } };
5651
5658
  }
5652
5659
  //#endregion
5653
5660
  //#region src/utils/submitMessages.js
5654
- function Hl(e) {
5661
+ function Ul(e) {
5655
5662
  return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
5656
5663
  }
5657
- function Ul(e) {
5664
+ function Wl(e) {
5658
5665
  let t = String(e ?? "").trim();
5659
5666
  return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
5660
5667
  }
5661
- function Wl(e, t) {
5662
- return String(e).replaceAll("${module}", Ul(t)).replaceAll("${moduleName}", Ul(t));
5668
+ function Gl(e, t) {
5669
+ return String(e).replaceAll("${module}", Wl(t)).replaceAll("${moduleName}", Wl(t));
5663
5670
  }
5664
- function Gl(e, t, n) {
5665
- let r = Hl(e);
5671
+ function Kl(e, t, n) {
5672
+ let r = Ul(e);
5666
5673
  if (r?.suppress) return null;
5667
5674
  let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
5668
- return i && String(i).trim() ? Wl(i, t) : n === "edit" ? `${Ul(t)} has Updated successfully` : `${Ul(t)} has added successfully`;
5675
+ return i && String(i).trim() ? Gl(i, t) : n === "edit" ? `${Wl(t)} has Updated successfully` : `${Wl(t)} has added successfully`;
5669
5676
  }
5670
- function Kl(e, t, n, r) {
5671
- let i = Hl(e), a = n === "edit" ? i?.editError : i?.addError;
5672
- return a && String(a).trim() ? Wl(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${Ul(t)}` : `Failed to create ${Ul(t)}`;
5677
+ function ql(e, t, n, r) {
5678
+ let i = Ul(e), a = n === "edit" ? i?.editError : i?.addError;
5679
+ return a && String(a).trim() ? Gl(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${Wl(t)}` : `Failed to create ${Wl(t)}`;
5673
5680
  }
5674
5681
  //#endregion
5675
5682
  //#region src/utils/scrollToFirstFormError.js
5676
- function ql({ errorFields: e } = {}, t, { root: n = document } = {}) {
5683
+ function Jl({ errorFields: e } = {}, t, { root: n = document } = {}) {
5677
5684
  if (!e?.length) return;
5678
5685
  let r = e[0]?.name;
5679
5686
  setTimeout(() => {
@@ -5698,10 +5705,10 @@ function ql({ errorFields: e } = {}, t, { root: n = document } = {}) {
5698
5705
  }
5699
5706
  //#endregion
5700
5707
  //#region src/components/form/conditionalFieldLabel.js
5701
- function Jl(e) {
5708
+ function Yl(e) {
5702
5709
  return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
5703
5710
  }
5704
- function Yl(e, t) {
5711
+ function Xl(e, t) {
5705
5712
  if (!e?.field) return !1;
5706
5713
  switch (e.operator ?? "eq") {
5707
5714
  case "eq": return String(t ?? "") === String(e.value ?? "");
@@ -5709,38 +5716,38 @@ function Yl(e, t) {
5709
5716
  case "truthy": return t != null && t !== "" && t !== !1;
5710
5717
  case "falsy": return t == null || t === "" || t === !1;
5711
5718
  case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
5712
- case "in": return Jl(e.value).includes(String(t ?? ""));
5713
- case "notIn": return !Jl(e.value).includes(String(t ?? ""));
5719
+ case "in": return Yl(e.value).includes(String(t ?? ""));
5720
+ case "notIn": return !Yl(e.value).includes(String(t ?? ""));
5714
5721
  default: return !1;
5715
5722
  }
5716
5723
  }
5717
- function Xl(e, t, n = !1) {
5724
+ function Zl(e, t, n = !1) {
5718
5725
  let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
5719
- return Yl(i, t) && i?.label ? i.label : r;
5726
+ return Xl(i, t) && i?.label ? i.label : r;
5720
5727
  }
5721
- function Zl(e) {
5728
+ function Ql(e) {
5722
5729
  return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
5723
5730
  }
5724
- function Ql(e, t) {
5725
- let n = Zl(e);
5731
+ function $l(e, t) {
5732
+ let n = Ql(e);
5726
5733
  if (!n.length) return !0;
5727
- let r = n.map((e) => Yl(e, t(e.field)));
5734
+ let r = n.map((e) => Xl(e, t(e.field)));
5728
5735
  return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
5729
5736
  }
5730
- function $l(e) {
5737
+ function eu(e) {
5731
5738
  let t = e?.colWhen;
5732
5739
  return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
5733
5740
  }
5734
- function eu(e, t, n) {
5735
- for (let t of $l(e)) if (Yl(t, n(t))) return Number(t.col);
5741
+ function tu(e, t, n) {
5742
+ for (let t of eu(e)) if (Xl(t, n(t))) return Number(t.col);
5736
5743
  return t;
5737
5744
  }
5738
- function tu(e, t) {
5745
+ function nu(e, t) {
5739
5746
  return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
5740
5747
  }
5741
5748
  //#endregion
5742
5749
  //#region src/components/Breadcrumb.jsx
5743
- function nu({ items: e = [] }) {
5750
+ function ru({ items: e = [] }) {
5744
5751
  return /* @__PURE__ */ C(_, { items: e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(yr, {
5745
5752
  variant: "body",
5746
5753
  weight: "medium",
@@ -5756,6 +5763,6 @@ function nu({ items: e = [] }) {
5756
5763
  }) })) });
5757
5764
  }
5758
5765
  //#endregion
5759
- export { ic as $, Sn as $n, nn as $r, Vi as $t, Yc as A, F as An, cn as Ar, ro as At, Ec as B, Ln as Bn, Pt as Br, Ha as Bt, ml as C, xr as Cn, Kt as Cr, Ko as Ct, hl as D, qn as Dn, $t as Dr, Do as Dt, Zc as E, I as En, Ct as Er, Oo as Et, Hc as F, Pn as Fn, Tt as Fr, Za as Ft, dc as G, bn as Gn, ze as Gr, Ma as Gt, yc as H, rt as Hn, Tn as Hr, J as Ht, Bc as I, Hn as In, Qe as Ir, to as It, mc as J, jn as Jn, gt as Jr, q as Jt, uc as K, pn as Kn, nt as Kr, ua as Kt, Lc as L, Vn as Ln, Vt as Lr, Ga as Lt, Uc as M, Jn as Mn, Re as Mr, io as Mt, Wc as N, nr as Nn, We as Nr, ho as Nt, vl as O, Yn as On, en as Or, xo as Ot, Vc as P, Xn as Pn, tn as Pr, vo as Pt, ac as Q, pt as Qn, He as Qr, ya as Qt, Ic as R, P as Rn, M as Rr, Ka as Rt, tl as S, Vr as Sn, ct as Sr, qo as St, $c as T, L as Tn, vt as Tr, Go as Tt, xc as U, wt as Un, Ft as Ur, Na as Ut, vc as V, Bn as Vn, gn as Vr, Ua as Vt, gc as W, $e as Wn, Yt as Wr, za as Wt, hc as X, En as Xn, lt as Xr, Ra as Xt, fc as Y, Xt as Yn, ot as Yr, Ea as Yt, sc as Z, tt as Zn, bt as Zr, ba as Zt, kl as _, Xr as _n, ht as _r, vs as _t, Xl as a, xn as ai, yi as an, Ve as ar, Is as at, wl as b, Ur as bn, yn as br, Zo as bt, Zl as c, Mn as ci, ui as cn, Ze as cr, Ms as ct, Gl as d, _n as di, di as dn, Dt as dr, bs as dt, Be as ei, Gi as en, xt as er, rc as et, zl as f, Dn as fi, fi as fn, At as fr, ys as ft, Ol as g, rn as gi, ri as gn, Ue as gr, ls as gt, Bl as h, qt as hi, ii as hn, an as hr, rs as ht, Yl as i, et as ii, xi as in, Qt as ir, Rs as it, qc as j, ar as jn, An as jr, no as jt, pl as k, Qn as kn, fn as kr, Y as kt, ql as l, Zt as li, li as ln, Xe as lr, ws as lt, Vl as m, Ut as mi, oi as mn, sn as mr, fs as mt, $l as n, Gt as ni, Li as nn, dn as nr, tc as nt, Ql as o, mn as oi, vi as on, On as or, Ps as ot, Il as p, jt as pi, si as pn, Wt as pr, ps as pt, pc as q, ln as qn, ft as qr, H as qt, tu as r, St as ri, bi as rn, Nn as rr, $s as rt, eu as s, un as si, gi as sn, Jt as sr, js as st, nu as t, Ht as ti, qi as tn, hn as tr, nc as tt, Kl as u, Rt as ui, _i as un, dt as ur, Es as ut, Tl as v, Zr as vn, _t as vr, Yo as vt, Xc as w, yr as wn, yt as wr, Wo as wt, Sl as x, Hr as xn, at as xr, Jo as xt, El as y, Qr as yn, on as yr, Qo as yt, Cc as z, Un as zn, Nt as zr, Va as zt };
5766
+ export { ac as $, pt as $n, He as $r, ya as $t, Xc as A, Qn as An, fn as Ar, Y as At, Dc as B, Un as Bn, Nt as Br, Va as Bt, hl as C, Vr as Cn, ct as Cr, qo as Ct, gl as D, I as Dn, Ct as Dr, Oo as Dt, Qc as E, L as En, vt as Er, Go as Et, Uc as F, Xn as Fn, tn as Fr, vo as Ft, fc as G, $e as Gn, Yt as Gr, za as Gt, bc as H, Bn as Hn, gn as Hr, Ua as Ht, Vc as I, Pn as In, Tt as Ir, Za as It, hc as J, ln as Jn, ft as Jr, H as Jt, dc as K, bn as Kn, ze as Kr, Ma as Kt, Rc as L, Hn as Ln, Qe as Lr, to as Lt, Wc as M, ar as Mn, An as Mr, no as Mt, Gc as N, Jn as Nn, Re as Nr, io as Nt, yl as O, qn as On, $t as Or, Do as Ot, Hc as P, nr as Pn, We as Pr, ho as Pt, oc as Q, tt as Qn, bt as Qr, ba as Qt, Lc as R, Vn as Rn, Vt as Rr, Ga as Rt, nl as S, Hr as Sn, at as Sr, Jo as St, el as T, yr as Tn, yt as Tr, Wo as Tt, Sc as U, rt as Un, Tn as Ur, J as Ut, yc as V, Ln as Vn, Pt as Vr, Ha as Vt, _c as W, wt as Wn, Ft as Wr, Na as Wt, gc as X, Xt as Xn, ot as Xr, Ea as Xt, pc as Y, jn as Yn, gt as Yr, q as Yt, cc as Z, En as Zn, lt as Zr, Ra as Zt, Al as _, rn as _i, ri as _n, Ue as _r, ls as _t, Zl as a, et as ai, xi as an, Qt as ar, Rs as at, Tl as b, Qr as bn, on as br, Qo as bt, Ql as c, un as ci, gi as cn, Jt as cr, js as ct, Kl as d, Rt as di, _i as dn, dt as dr, Es as dt, nn as ei, Vi as en, Sn as er, ic as et, Bl as f, _n as fi, di as fn, Dt as fr, bs as ft, kl as g, qt as gi, ii as gn, an as gr, rs as gt, Vl as h, Ut as hi, oi as hn, sn as hr, fs as ht, Xl as i, St as ii, bi as in, Nn as ir, $s as it, Jc as j, F as jn, cn as jr, ro as jt, ml as k, Yn as kn, en as kr, xo as kt, Jl as l, Mn as li, ui as ln, Ze as lr, Ms as lt, Hl as m, jt as mi, si as mn, Wt as mr, ps as mt, eu as n, Ht as ni, qi as nn, hn as nr, nc as nt, $l as o, xn as oi, yi as on, Ve as or, Is as ot, Ll as p, Dn as pi, fi as pn, At as pr, ys as pt, mc as q, pn as qn, nt as qr, ua as qt, nu as r, Gt as ri, Li as rn, dn as rr, tc as rt, tu as s, mn as si, vi as sn, On as sr, Ps as st, ru as t, Be as ti, Gi as tn, xt as tr, rc as tt, ql as u, Zt as ui, li as un, Xe as ur, ws as ut, El as v, Xr as vn, ht as vr, vs as vt, Zc as w, xr as wn, Kt as wr, Ko as wt, Cl as x, Ur as xn, yn as xr, Zo as xt, Dl as y, Zr as yn, _t as yr, Yo as yt, wc as z, P as zn, M as zr, Ka as zt };
5760
5767
 
5761
- //# sourceMappingURL=Breadcrumb-CYzqfTvW.js.map
5768
+ //# sourceMappingURL=Breadcrumb-BQ3prySs.js.map