@isettingkit/business-rules 2.2.26 → 2.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.es.js +334 -333
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,17 +1,17 @@
1
- import { jsx as i, jsxs as v, Fragment as G } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as v, Fragment as z } from "react/jsx-runtime";
2
2
  import { MdOutlineDelete as wt, MdClear as Xt, MdAdd as et, MdOutlineCreate as dr, MdExpandLess as cr, MdExpandMore as Mt, MdInfo as ur, MdCached as pr, MdOutlineInfo as hr, MdClose as gr, MdOutlineFilterAltOff as fr, MdOutlineFilterAlt as _n, MdChevronRight as pn, MdArrowRight as mr, MdOutlineArrowCircleLeft as br, MdOutlineArrowCircleRight as vr, MdKeyboardArrowUp as yr, MdKeyboardArrowDown as Tr, MdOutlineArrowBack as xr } from "react-icons/md";
3
3
  import { inube as N, Stack as x, Divider as W, Icon as B, Text as L, SkeletonLine as se, useMediaQuery as de, Blanket as Qt, Button as Y, Grid as Se, Toggle as St, Checkbox as Jt, Date as Fe, Box as wr, Tag as qe, Tabs as Gn, SkeletonIcon as Sr, Fieldset as We, OptionList as Cr, Checkpicker as Dr } from "@inubekit/inubekit";
4
4
  import E, { keyframes as Zt, ThemeContext as Er } from "styled-components";
5
- import { ValueDataType as z, ValueHowToSetUp as V, DecisionConditionRender as yt, DecisionConditionRenderNew as hn } from "@isettingkit/input";
6
- import { DecisionViewConditionRenderer as Re, DecisionViewConditionRendererNew as pt } from "@isettingkit/view";
5
+ import { ValueDataType as G, ValueHowToSetUp as V, DecisionConditionRender as yt, DecisionConditionRenderNew as hn } from "@isettingkit/input";
6
+ import { DecisionViewConditionRenderer as Ie, DecisionViewConditionRendererNew as pt } from "@isettingkit/view";
7
7
  import { createPortal as Kt } from "react-dom";
8
8
  import { useFormik as en } from "formik";
9
9
  import { string as ye, mixed as we, object as X, number as me, lazy as Je, date as Le } from "yup";
10
10
  import _, { useState as q, useRef as Ye, useEffect as Ze, useContext as Nr, useMemo as Un } from "react";
11
11
  import { Link as zn, useNavigate as kr, useLocation as Ar } from "react-router-dom";
12
12
  import $r from "axios";
13
- import { franc as Ir } from "franc-min";
14
- const Rr = E.div`
13
+ import { franc as Rr } from "franc-min";
14
+ const Ir = E.div`
15
15
  border-radius: 8px;
16
16
  border: 1px solid
17
17
  ${({ theme: e }) => {
@@ -48,9 +48,9 @@ E.div`
48
48
  `;
49
49
  const tt = (e) => {
50
50
  const { children: t, controls: n = !0, handleDelete: r, id: o } = e;
51
- return /* @__PURE__ */ i(Rr, { children: /* @__PURE__ */ v(x, { direction: "column", gap: "16px", padding: "12px 16px", children: [
51
+ return /* @__PURE__ */ i(Ir, { children: /* @__PURE__ */ v(x, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
52
  t,
53
- n && /* @__PURE__ */ v(G, { children: [
53
+ n && /* @__PURE__ */ v(z, { children: [
54
54
  /* @__PURE__ */ i(W, {}),
55
55
  /* @__PURE__ */ i(x, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
56
56
  B,
@@ -69,15 +69,15 @@ const tt = (e) => {
69
69
  }, Or = (e) => e.value, Fr = (e) => e.value, Lr = (e) => e.value, Mr = (e) => ({
70
70
  from: e.from ?? "",
71
71
  to: e.to ?? ""
72
- }), jr = (e) => e.value, Vr = (e) => e.value, Pr = (e) => e.value;
73
- var R = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(R || {});
72
+ }), jr = (e) => e.value, Pr = (e) => e.value, Vr = (e) => e.value;
73
+ var O = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(O || {});
74
74
  const _r = {
75
- [R.LIST_OF_VALUES]: Fr,
76
- [R.LIST_OF_VALUES_MULTI]: Lr,
77
- [R.RANGE]: Mr,
78
- [R.GREATER_THAN]: jr,
79
- [R.LESS_THAN]: Vr,
80
- [R.EQUAL]: Pr
75
+ [O.LIST_OF_VALUES]: Fr,
76
+ [O.LIST_OF_VALUES_MULTI]: Lr,
77
+ [O.RANGE]: Mr,
78
+ [O.GREATER_THAN]: jr,
79
+ [O.LESS_THAN]: Pr,
80
+ [O.EQUAL]: Vr
81
81
  }, Xe = (e) => {
82
82
  const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = _r[e == null ? void 0 : e.howToSetTheDecision] || Or;
83
83
  return n && r(t) || t || void 0;
@@ -122,7 +122,7 @@ const _r = {
122
122
  } = e;
123
123
  return a ? /* @__PURE__ */ v(x, { direction: "column", gap: "12px", children: [
124
124
  /* @__PURE__ */ i(x, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
125
- Re,
125
+ Ie,
126
126
  {
127
127
  element: o,
128
128
  valueData: Xe(
@@ -152,7 +152,7 @@ const _r = {
152
152
  }
153
153
  ),
154
154
  s.length > 0 && s.map((p) => /* @__PURE__ */ i(gn, { children: /* @__PURE__ */ i(x, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
155
- Re,
155
+ Ie,
156
156
  {
157
157
  element: { ...p, value: p.value },
158
158
  valueData: Xe(
@@ -161,8 +161,8 @@ const _r = {
161
161
  }
162
162
  ) }) }, p.conditionName)),
163
163
  s.length > 0 && /* @__PURE__ */ i(W, { dashed: !0 }),
164
- u && /* @__PURE__ */ i(G, { children: r && /* @__PURE__ */ i(
165
- Re,
164
+ u && /* @__PURE__ */ i(z, { children: r && /* @__PURE__ */ i(
165
+ Ie,
166
166
  {
167
167
  element: r.element,
168
168
  valueData: r.valueData,
@@ -212,7 +212,7 @@ const _r = {
212
212
  labelName: r == null ? void 0 : r.terms,
213
213
  value: String(t.effectiveFrom),
214
214
  howToSetTheDecision: V.RANGE,
215
- decisionDataType: z.DATE
215
+ decisionDataType: G.DATE
216
216
  },
217
217
  valueData: Xe({
218
218
  labelName: r == null ? void 0 : r.terms,
@@ -221,20 +221,20 @@ const _r = {
221
221
  to: String(t.validUntil)
222
222
  },
223
223
  howToSetTheDecision: V.RANGE,
224
- decisionDataType: z.DATE
224
+ decisionDataType: G.DATE
225
225
  })
226
226
  } : o && !a ? {
227
227
  element: {
228
228
  labelName: r == null ? void 0 : r.terms,
229
229
  value: String(t.effectiveFrom),
230
230
  howToSetTheDecision: V.EQUAL,
231
- decisionDataType: z.DATE
231
+ decisionDataType: G.DATE
232
232
  },
233
233
  valueData: Xe({
234
234
  labelName: r == null ? void 0 : r.terms,
235
235
  value: String(t.effectiveFrom),
236
236
  howToSetTheDecision: V.EQUAL,
237
- decisionDataType: z.DATE
237
+ decisionDataType: G.DATE
238
238
  })
239
239
  } : null, u = t ? {
240
240
  labelName: t.labelName || "",
@@ -504,7 +504,7 @@ const Bn = E.div`
504
504
  handleSubmitForm: g,
505
505
  handleDelete: h,
506
506
  terms: f = !0
507
- } = e, m = de("(max-width: 681px)"), y = de("(max-width: 400px)"), { renderedCards: w, shouldRenderAddCard: S } = Jr({
507
+ } = e, b = de("(max-width: 681px)"), y = de("(max-width: 400px)"), { renderedCards: w, shouldRenderAddCard: S } = Jr({
508
508
  controls: t,
509
509
  customTitleContentAddCard: n,
510
510
  decisions: o,
@@ -513,18 +513,18 @@ const Bn = E.div`
513
513
  handleDelete: h,
514
514
  textValues: a
515
515
  }), C = (o == null ? void 0 : o.length) === 0 && !s;
516
- return /* @__PURE__ */ v(G, { children: [
516
+ return /* @__PURE__ */ v(z, { children: [
517
517
  /* @__PURE__ */ i(Br, { children: /* @__PURE__ */ i(qr, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ v(
518
518
  x,
519
519
  {
520
520
  direction: "column",
521
521
  gap: "28px",
522
522
  width: "100%",
523
- height: m ? "auto" : "435px",
523
+ height: b ? "auto" : "435px",
524
524
  justifyContent: "center",
525
525
  alignItems: "center",
526
526
  children: [
527
- /* @__PURE__ */ i(L, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
527
+ /* @__PURE__ */ i(L, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(z, { children: [
528
528
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
529
529
  /* @__PURE__ */ v(
530
530
  L,
@@ -564,7 +564,7 @@ const Bn = E.div`
564
564
  autoRows: "1fr",
565
565
  justifyItems: "center",
566
566
  padding: "6px",
567
- height: m ? "auto" : "484px",
567
+ height: b ? "auto" : "484px",
568
568
  children: [
569
569
  w,
570
570
  S && jt({
@@ -753,12 +753,12 @@ const no = E.div`
753
753
  from: e.from ?? "",
754
754
  to: e.to ?? ""
755
755
  }), co = (e) => e.value, uo = (e) => e.value, po = (e) => e.value, ho = {
756
- [R.LIST_OF_VALUES]: io,
757
- [R.LIST_OF_VALUES_MULTI]: lo,
758
- [R.RANGE]: so,
759
- [R.GREATER_THAN]: co,
760
- [R.LESS_THAN]: uo,
761
- [R.EQUAL]: po
756
+ [O.LIST_OF_VALUES]: io,
757
+ [O.LIST_OF_VALUES_MULTI]: lo,
758
+ [O.RANGE]: so,
759
+ [O.GREATER_THAN]: co,
760
+ [O.LESS_THAN]: uo,
761
+ [O.EQUAL]: po
762
762
  }, Qe = (e) => {
763
763
  const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = ho[e == null ? void 0 : e.howToSetTheDecision] || ao;
764
764
  return n && r(t) || t || void 0;
@@ -803,7 +803,7 @@ const no = E.div`
803
803
  } = e;
804
804
  return a ? /* @__PURE__ */ v(x, { direction: "column", gap: "12px", children: [
805
805
  /* @__PURE__ */ i(x, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
806
- Re,
806
+ Ie,
807
807
  {
808
808
  element: o,
809
809
  valueData: Qe(
@@ -833,7 +833,7 @@ const no = E.div`
833
833
  }
834
834
  ),
835
835
  s.length > 0 && s.map((p) => /* @__PURE__ */ i(mn, { children: /* @__PURE__ */ i(x, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
836
- Re,
836
+ Ie,
837
837
  {
838
838
  element: { ...p, value: p.value },
839
839
  valueData: Qe(
@@ -842,8 +842,8 @@ const no = E.div`
842
842
  }
843
843
  ) }) }, p.conditionName)),
844
844
  s.length > 0 && /* @__PURE__ */ i(W, { dashed: !0 }),
845
- u && /* @__PURE__ */ i(G, { children: r && /* @__PURE__ */ i(
846
- Re,
845
+ u && /* @__PURE__ */ i(z, { children: r && /* @__PURE__ */ i(
846
+ Ie,
847
847
  {
848
848
  element: r.element,
849
849
  valueData: r.valueData,
@@ -895,7 +895,7 @@ const no = E.div`
895
895
  labelName: r == null ? void 0 : r.terms,
896
896
  value: String(t.effectiveFrom),
897
897
  howToSetTheDecision: V.RANGE,
898
- decisionDataType: z.DATE
898
+ decisionDataType: G.DATE
899
899
  },
900
900
  valueData: Qe({
901
901
  labelName: r == null ? void 0 : r.terms,
@@ -904,20 +904,20 @@ const no = E.div`
904
904
  to: String(t.validUntil)
905
905
  },
906
906
  howToSetTheDecision: V.RANGE,
907
- decisionDataType: z.DATE
907
+ decisionDataType: G.DATE
908
908
  })
909
909
  } : o && !a ? {
910
910
  element: {
911
911
  labelName: r == null ? void 0 : r.terms,
912
912
  value: String(t.effectiveFrom),
913
913
  howToSetTheDecision: V.EQUAL,
914
- decisionDataType: z.DATE
914
+ decisionDataType: G.DATE
915
915
  },
916
916
  valueData: Qe({
917
917
  labelName: r == null ? void 0 : r.terms,
918
918
  value: String(t.effectiveFrom),
919
919
  howToSetTheDecision: V.EQUAL,
920
- decisionDataType: z.DATE
920
+ decisionDataType: G.DATE
921
921
  })
922
922
  } : null, u = t ? {
923
923
  labelName: t.labelName || "",
@@ -978,7 +978,7 @@ const yo = (e) => {
978
978
  const { children: t, controls: n = !0, handleDelete: r, id: o } = e;
979
979
  return /* @__PURE__ */ i(vo, { children: /* @__PURE__ */ v(x, { direction: "column", gap: "16px", padding: "12px 16px", children: [
980
980
  t,
981
- n && /* @__PURE__ */ v(G, { children: [
981
+ n && /* @__PURE__ */ v(z, { children: [
982
982
  /* @__PURE__ */ i(W, {}),
983
983
  /* @__PURE__ */ i(x, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
984
984
  B,
@@ -1051,7 +1051,7 @@ const yo = (e) => {
1051
1051
  loading: oo,
1052
1052
  decision: To,
1053
1053
  add: xo
1054
- }, Vt = (e) => {
1054
+ }, Pt = (e) => {
1055
1055
  const { type: t } = e, n = wo[t];
1056
1056
  return n ? n(e) : null;
1057
1057
  }, So = (e) => ({
@@ -1095,19 +1095,19 @@ const yo = (e) => {
1095
1095
  }),
1096
1096
  value: { from: t, to: n }
1097
1097
  };
1098
- }, $t = (e, t) => t === z.PERCENTAGE ? {
1098
+ }, $t = (e, t) => t === G.PERCENTAGE ? {
1099
1099
  schema: me().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
1100
1100
  value: e
1101
1101
  } : {
1102
1102
  schema: ye().required("Requerido"),
1103
1103
  value: e
1104
1104
  }, No = {
1105
- [R.LIST_OF_VALUES]: Co,
1106
- [R.LIST_OF_VALUES_MULTI]: Do,
1107
- [R.RANGE]: Eo,
1108
- [R.GREATER_THAN]: $t,
1109
- [R.LESS_THAN]: $t,
1110
- [R.EQUAL]: $t
1105
+ [O.LIST_OF_VALUES]: Co,
1106
+ [O.LIST_OF_VALUES_MULTI]: Do,
1107
+ [O.RANGE]: Eo,
1108
+ [O.GREATER_THAN]: $t,
1109
+ [O.LESS_THAN]: $t,
1110
+ [O.EQUAL]: $t
1111
1111
  }, ko = (e) => No[e] || So;
1112
1112
  var nn = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(nn || {});
1113
1113
  const bt = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Ao = (e, t) => {
@@ -1137,7 +1137,7 @@ function $o({
1137
1137
  var d, g;
1138
1138
  const r = ((d = e.conditionGroups[0]) == null ? void 0 : d.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((h, f) => (bt(f.value) && (h[f.conditionName] = f.value), h), {}), a = Object.keys(o).length > 0, c = {
1139
1139
  ruleName: e.ruleName || "",
1140
- decisionDataType: e.decisionDataType || z.ALPHABETICAL,
1140
+ decisionDataType: e.decisionDataType || G.ALPHABETICAL,
1141
1141
  howToSetTheDecision: e.howToSetTheDecision || "",
1142
1142
  value: e.value ?? "",
1143
1143
  effectiveFrom: e.effectiveFrom || "",
@@ -1164,7 +1164,7 @@ function $o({
1164
1164
  };
1165
1165
  n.terms && (l.effectiveFrom = Le().required("La fecha de inicio es requerida"), l.validUntil = Le().when(
1166
1166
  "checkClosed",
1167
- (h, f, { parent: m }) => (m == null ? void 0 : m.checkClosed) ? f.required("La fecha de finalización es requerida").test(
1167
+ (h, f, { parent: b }) => (b == null ? void 0 : b.checkClosed) ? f.required("La fecha de finalización es requerida").test(
1168
1168
  "is-after-startDate",
1169
1169
  "La fecha de finalización debe ser mayor o igual a la fecha de inicio",
1170
1170
  function(w) {
@@ -1180,7 +1180,7 @@ function $o({
1180
1180
  validateOnBlur: !0,
1181
1181
  onSubmit: (h) => {
1182
1182
  var w;
1183
- const f = ((w = e.conditionGroups) == null ? void 0 : w.ConditionGroupId) ?? "group-primary", m = h.toggleNone ? [] : Ao(h, r), y = {
1183
+ const f = ((w = e.conditionGroups) == null ? void 0 : w.ConditionGroupId) ?? "group-primary", b = h.toggleNone ? [] : Ao(h, r), y = {
1184
1184
  ...e,
1185
1185
  ruleName: h.ruleName,
1186
1186
  decisionDataType: h.decisionDataType,
@@ -1190,7 +1190,7 @@ function $o({
1190
1190
  validUntil: h.validUntil,
1191
1191
  conditionGroups: {
1192
1192
  ConditionGroupId: f,
1193
- conditionsThatEstablishesTheDecision: m
1193
+ conditionsThatEstablishesTheDecision: b
1194
1194
  }
1195
1195
  };
1196
1196
  t(y);
@@ -1212,7 +1212,7 @@ function $o({
1212
1212
  });
1213
1213
  } };
1214
1214
  }
1215
- const Io = E.div`
1215
+ const Ro = E.div`
1216
1216
  & > div {
1217
1217
  border-radius: 8px;
1218
1218
  border: 1px solid
@@ -1221,7 +1221,7 @@ const Io = E.div`
1221
1221
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || N.palette.neutral.N30;
1222
1222
  }};
1223
1223
  }
1224
- `, Ro = E.div`
1224
+ `, Io = E.div`
1225
1225
  width: 100%;
1226
1226
  height: 100%;
1227
1227
  overflow-y: auto;
@@ -1248,7 +1248,7 @@ const Io = E.div`
1248
1248
  name: c,
1249
1249
  valueToggle: u = ""
1250
1250
  } = e, [l, s] = q(t);
1251
- return /* @__PURE__ */ v(G, { children: [
1251
+ return /* @__PURE__ */ v(z, { children: [
1252
1252
  /* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(
1253
1253
  St,
1254
1254
  {
@@ -1263,7 +1263,7 @@ const Io = E.div`
1263
1263
  children: /* @__PURE__ */ i(L, { size: "medium", type: "label", weight: "bold", as: "span", children: a })
1264
1264
  }
1265
1265
  ) }),
1266
- l && /* @__PURE__ */ i(G, { children: n })
1266
+ l && /* @__PURE__ */ i(z, { children: n })
1267
1267
  ] });
1268
1268
  }, Fo = (e) => {
1269
1269
  const {
@@ -1280,14 +1280,14 @@ const Io = E.div`
1280
1280
  messageEnd: d = "",
1281
1281
  statusStart: g = "pending",
1282
1282
  statusEnd: h = "pending"
1283
- } = e, [f, m] = q(c), [y, w] = q(l), [S, C] = q(s), k = ({ target: M }) => {
1284
- m(M.checked), r && r(M.checked);
1283
+ } = e, [f, b] = q(c), [y, w] = q(l), [S, C] = q(s), k = ({ target: M }) => {
1284
+ b(M.checked), r && r(M.checked);
1285
1285
  }, D = (M) => {
1286
1286
  w(M.target.value), t(M);
1287
1287
  }, $ = (M) => {
1288
1288
  C(M.target.value), n(M);
1289
1289
  }, j = de("(max-width: 400px)");
1290
- return /* @__PURE__ */ v(G, { children: [
1290
+ return /* @__PURE__ */ v(z, { children: [
1291
1291
  /* @__PURE__ */ v(x, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1292
1292
  /* @__PURE__ */ i(
1293
1293
  L,
@@ -1376,7 +1376,7 @@ const Io = E.div`
1376
1376
  isDecision: !0
1377
1377
  }),
1378
1378
  /* @__PURE__ */ i(W, { dashed: !0 }),
1379
- /* @__PURE__ */ i(Io, { children: /* @__PURE__ */ i(Ro, { children: /* @__PURE__ */ v(
1379
+ /* @__PURE__ */ i(Ro, { children: /* @__PURE__ */ i(Io, { children: /* @__PURE__ */ v(
1380
1380
  x,
1381
1381
  {
1382
1382
  direction: "column",
@@ -1426,7 +1426,7 @@ const Io = E.div`
1426
1426
  ]
1427
1427
  }
1428
1428
  ) }) }),
1429
- n.terms && /* @__PURE__ */ v(G, { children: [
1429
+ n.terms && /* @__PURE__ */ v(z, { children: [
1430
1430
  /* @__PURE__ */ i(W, { dashed: !0 }),
1431
1431
  /* @__PURE__ */ i(
1432
1432
  Fo,
@@ -1468,7 +1468,7 @@ const Io = E.div`
1468
1468
  decisionDataType: t.decisionDataType,
1469
1469
  listOfPossibleValues: t.listOfPossibleValues
1470
1470
  }, l = ((f = (h = t.conditionGroups[0]) == null ? void 0 : h.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
1471
- (m) => !m.hidden
1471
+ (b) => !b.hidden
1472
1472
  )) || [], s = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, p = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, d = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
1473
1473
  return /* @__PURE__ */ i(
1474
1474
  Lo,
@@ -1480,20 +1480,20 @@ const Io = E.div`
1480
1480
  visibleConditions: l,
1481
1481
  normalizedDecision: u,
1482
1482
  handleToggleNoneChange: c,
1483
- handleConditionToggleChange: (m, y) => (w) => {
1483
+ handleConditionToggleChange: (b, y) => (w) => {
1484
1484
  if (!w)
1485
1485
  a.setFieldValue(
1486
- `conditionsThatEstablishesTheDecision.${m}`,
1486
+ `conditionsThatEstablishesTheDecision.${b}`,
1487
1487
  void 0
1488
1488
  ), a.setFieldTouched(
1489
- `conditionsThatEstablishesTheDecision.${m}`,
1489
+ `conditionsThatEstablishesTheDecision.${b}`,
1490
1490
  !1,
1491
1491
  !1
1492
1492
  ), Object.keys(a.touched).filter((C) => C.startsWith("conditionsThatEstablishesTheDecision.")).some((C) => a.touched[C] === !0) || c(!0);
1493
1493
  else {
1494
1494
  const S = y ? [] : "";
1495
1495
  c(!1), a.setFieldValue(
1496
- `conditionsThatEstablishesTheDecision.${m}`,
1496
+ `conditionsThatEstablishesTheDecision.${b}`,
1497
1497
  S
1498
1498
  );
1499
1499
  }
@@ -1513,7 +1513,7 @@ const Io = E.div`
1513
1513
  handleDelete: c,
1514
1514
  textValues: u
1515
1515
  } = e, l = o ? Array.from({ length: 3 }).map(
1516
- (p, d) => Vt({
1516
+ (p, d) => Pt({
1517
1517
  type: "loading",
1518
1518
  index: d,
1519
1519
  controls: t,
@@ -1524,7 +1524,7 @@ const Io = E.div`
1524
1524
  textValues: u
1525
1525
  })
1526
1526
  ) : r == null ? void 0 : r.map(
1527
- (p, d) => Vt({
1527
+ (p, d) => Pt({
1528
1528
  index: d,
1529
1529
  type: "decision",
1530
1530
  decision: p,
@@ -1553,7 +1553,7 @@ const Io = E.div`
1553
1553
  handleSubmitForm: g,
1554
1554
  handleDelete: h,
1555
1555
  terms: f = !0
1556
- } = e, m = de("(max-width: 681px)"), y = de("(max-width: 400px)"), { renderedCards: w, shouldRenderAddCard: S } = jo({
1556
+ } = e, b = de("(max-width: 681px)"), y = de("(max-width: 400px)"), { renderedCards: w, shouldRenderAddCard: S } = jo({
1557
1557
  controls: t,
1558
1558
  customTitleContentAddCard: n,
1559
1559
  decisions: o,
@@ -1562,18 +1562,18 @@ const Io = E.div`
1562
1562
  handleDelete: h,
1563
1563
  textValues: a
1564
1564
  }), C = (o == null ? void 0 : o.length) === 0 && !s;
1565
- return /* @__PURE__ */ v(G, { children: [
1565
+ return /* @__PURE__ */ v(z, { children: [
1566
1566
  /* @__PURE__ */ i(no, { children: /* @__PURE__ */ i(ro, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ v(
1567
1567
  x,
1568
1568
  {
1569
1569
  direction: "column",
1570
1570
  gap: "28px",
1571
1571
  width: "100%",
1572
- height: m ? "auto" : "435px",
1572
+ height: b ? "auto" : "435px",
1573
1573
  justifyContent: "center",
1574
1574
  alignItems: "center",
1575
1575
  children: [
1576
- /* @__PURE__ */ i(L, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
1576
+ /* @__PURE__ */ i(L, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(z, { children: [
1577
1577
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
1578
1578
  /* @__PURE__ */ v(
1579
1579
  L,
@@ -1613,10 +1613,10 @@ const Io = E.div`
1613
1613
  autoRows: "1fr",
1614
1614
  justifyItems: "center",
1615
1615
  padding: "6px",
1616
- height: m ? "auto" : "484px",
1616
+ height: b ? "auto" : "484px",
1617
1617
  children: [
1618
1618
  w,
1619
- S && Vt({
1619
+ S && Pt({
1620
1620
  type: "add",
1621
1621
  index: o == null ? void 0 : o.length,
1622
1622
  controls: t,
@@ -1654,17 +1654,17 @@ const Io = E.div`
1654
1654
  }, qn = (e) => {
1655
1655
  const { children: t } = e;
1656
1656
  return /* @__PURE__ */ i(wr, { width: "100%", children: t });
1657
- }, Vo = (e) => e.value, Po = (e) => e.value, _o = (e) => e.value, Go = (e) => ({
1657
+ }, Po = (e) => e.value, Vo = (e) => e.value, _o = (e) => e.value, Go = (e) => ({
1658
1658
  from: e.from ?? "",
1659
1659
  to: e.to ?? ""
1660
1660
  }), Uo = (e) => e.value, zo = (e) => e.value, Ho = (e) => e.value, Bo = {
1661
- [R.LIST_OF_VALUES]: Po,
1662
- [R.LIST_OF_VALUES_MULTI]: _o,
1663
- [R.RANGE]: Go,
1664
- [R.GREATER_THAN]: Uo,
1665
- [R.LESS_THAN]: zo,
1666
- [R.EQUAL]: Ho
1667
- }, Ie = (e) => {
1661
+ [O.LIST_OF_VALUES]: Vo,
1662
+ [O.LIST_OF_VALUES_MULTI]: _o,
1663
+ [O.RANGE]: Go,
1664
+ [O.GREATER_THAN]: Uo,
1665
+ [O.LESS_THAN]: zo,
1666
+ [O.EQUAL]: Ho
1667
+ }, Re = (e) => {
1668
1668
  const t = e == null ? void 0 : e.value;
1669
1669
  if (typeof t == "string" && t.includes(" a ")) {
1670
1670
  const n = [
@@ -1681,7 +1681,7 @@ const Io = E.div`
1681
1681
  }
1682
1682
  return t;
1683
1683
  }
1684
- return typeof t == "object" && t !== null && !Array.isArray(t) ? "from" in t && "to" in t ? t : (Bo[e == null ? void 0 : e.howToSetTheDecision] || Vo)(t) : t || void 0;
1684
+ return typeof t == "object" && t !== null && !Array.isArray(t) ? "from" in t && "to" in t ? t : (Bo[e == null ? void 0 : e.howToSetTheDecision] || Po)(t) : t || void 0;
1685
1685
  }, qo = E.div`
1686
1686
  display: flex;
1687
1687
  justify-content: ${({ $justifyContent: e }) => e};
@@ -1721,7 +1721,7 @@ const Io = E.div`
1721
1721
  borderRadius: g,
1722
1722
  border: h,
1723
1723
  margin: f = "0px",
1724
- padding: m = "0px",
1724
+ padding: b = "0px",
1725
1725
  boxSizing: y,
1726
1726
  scroll: w = !1
1727
1727
  } = e;
@@ -1740,7 +1740,7 @@ const Io = E.div`
1740
1740
  $background: d,
1741
1741
  $border: h,
1742
1742
  $margin: f,
1743
- $padding: m,
1743
+ $padding: b,
1744
1744
  $borderRadius: g,
1745
1745
  $boxSizing: y,
1746
1746
  $scroll: w,
@@ -1808,7 +1808,7 @@ const Qo = (e) => {
1808
1808
  effectiveFromRenderer: g,
1809
1809
  validUntilRenderer: h,
1810
1810
  onEdit: f,
1811
- onDelete: m,
1811
+ onDelete: b,
1812
1812
  tabs: y,
1813
1813
  selectedTab: w,
1814
1814
  onTabChange: S,
@@ -1837,7 +1837,7 @@ const Qo = (e) => {
1837
1837
  pt,
1838
1838
  {
1839
1839
  element: o,
1840
- valueData: Ie(
1840
+ valueData: Re(
1841
1841
  o
1842
1842
  ),
1843
1843
  type: "decision",
@@ -1846,7 +1846,7 @@ const Qo = (e) => {
1846
1846
  ) })
1847
1847
  ] }),
1848
1848
  /* @__PURE__ */ v(x, { gap: "12px", children: [
1849
- t && /* @__PURE__ */ v(G, { children: [
1849
+ t && /* @__PURE__ */ v(z, { children: [
1850
1850
  /* @__PURE__ */ i(
1851
1851
  B,
1852
1852
  {
@@ -1867,7 +1867,7 @@ const Qo = (e) => {
1867
1867
  size: "24px",
1868
1868
  cursorHover: !0,
1869
1869
  onClick: ($) => {
1870
- $.stopPropagation(), m == null || m();
1870
+ $.stopPropagation(), b == null || b();
1871
1871
  }
1872
1872
  }
1873
1873
  )
@@ -1886,7 +1886,7 @@ const Qo = (e) => {
1886
1886
  },
1887
1887
  r.ruleName
1888
1888
  ) }),
1889
- l && /* @__PURE__ */ v(G, { children: [
1889
+ l && /* @__PURE__ */ v(z, { children: [
1890
1890
  /* @__PURE__ */ i(W, { dashed: !0 }),
1891
1891
  k ? /* @__PURE__ */ i(
1892
1892
  Gn,
@@ -1929,7 +1929,7 @@ const Qo = (e) => {
1929
1929
  value: $.value,
1930
1930
  howToSetTheCondition: $.howToSetTheCondition === le.LIST_OF_VALUES ? le.LIST_OF_VALUES_MULTI : $.howToSetTheCondition
1931
1931
  },
1932
- valueData: Ie(
1932
+ valueData: Re(
1933
1933
  $
1934
1934
  ),
1935
1935
  editionMode: D
@@ -2021,22 +2021,22 @@ const Qo = (e) => {
2021
2021
  Year: { label: "en años", labelView: "años" },
2022
2022
  Month: { label: "en meses", labelView: "meses" },
2023
2023
  Day: { label: "en días", labelView: "días" }
2024
- }, Pt = (e, t, n = !1) => {
2024
+ }, Vt = (e, t, n = !1) => {
2025
2025
  const r = Jo[t ?? ""];
2026
2026
  return r ? n ? `${e} ${r.labelView}` : `${e} ${r.label}` : e;
2027
2027
  }, yn = (e, t) => {
2028
2028
  if (e == null) return "";
2029
2029
  const n = Array.isArray(e) ? e.join(", ") : typeof e == "object" && e !== null ? JSON.stringify(e) : String(e ?? "");
2030
2030
  switch (t) {
2031
- case R.LESS_THAN:
2031
+ case O.LESS_THAN:
2032
2032
  return `Menor a ${n}`;
2033
- case R.GREATER_THAN:
2033
+ case O.GREATER_THAN:
2034
2034
  return `Mayor a ${n}`;
2035
- case R.LIST_OF_VALUES:
2035
+ case O.LIST_OF_VALUES:
2036
2036
  return e;
2037
- case R.LIST_OF_VALUES_MULTI:
2037
+ case O.LIST_OF_VALUES_MULTI:
2038
2038
  return e;
2039
- case R.RANGE:
2039
+ case O.RANGE:
2040
2040
  return e;
2041
2041
  default:
2042
2042
  return String(n);
@@ -2101,57 +2101,58 @@ const Qo = (e) => {
2101
2101
  editionMode: d = "versioned"
2102
2102
  } = e, h = _.useMemo(() => {
2103
2103
  if (!n) return null;
2104
- const { howToSetTheDecision: A, decisionDataType: F, value: O } = n;
2105
- if (!(A === V.RANGE && F === z.PERCENTAGE && O && typeof O == "object" && !Array.isArray(O) && "from" in O && "to" in O))
2104
+ const { howToSetTheDecision: A, decisionDataType: F, value: R } = n;
2105
+ if (!(A === V.RANGE && F === G.PERCENTAGE && R && typeof R == "object" && !Array.isArray(R) && "from" in R && "to" in R))
2106
2106
  return n;
2107
- const { from: U, to: P } = O, ue = String(U).trim(), te = String(P).trim();
2107
+ const { from: U, to: P } = R, ue = String(U).trim(), te = String(P).trim();
2108
2108
  return {
2109
2109
  ...n,
2110
2110
  i18nValue: `De ${ue}% a ${te}%`
2111
2111
  };
2112
- }, [n]) ?? n, f = !!(h != null && h.effectiveFrom), m = !!(h != null && h.validUntil), y = f ? {
2112
+ }, [n]) ?? n, f = !!(h != null && h.effectiveFrom), b = !!(h != null && h.validUntil), y = f ? {
2113
2113
  element: {
2114
2114
  labelName: o == null ? void 0 : o.effectiveFrom,
2115
2115
  value: ht(h.effectiveFrom),
2116
2116
  howToSetTheDecision: V.EQUAL,
2117
- decisionDataType: z.DATE
2117
+ decisionDataType: G.DATE
2118
2118
  },
2119
- valueData: Ie({
2119
+ valueData: Re({
2120
2120
  labelName: o == null ? void 0 : o.effectiveFrom,
2121
2121
  value: ht(h.effectiveFrom),
2122
2122
  howToSetTheDecision: V.EQUAL,
2123
- decisionDataType: z.DATE
2123
+ decisionDataType: G.DATE
2124
2124
  })
2125
- } : null, w = m ? {
2125
+ } : null, w = b ? {
2126
2126
  element: {
2127
2127
  labelName: o == null ? void 0 : o.validUntil,
2128
2128
  value: ht(h.validUntil),
2129
2129
  howToSetTheDecision: V.EQUAL,
2130
- decisionDataType: z.DATE
2130
+ decisionDataType: G.DATE
2131
2131
  },
2132
- valueData: Ie({
2132
+ valueData: Re({
2133
2133
  labelName: o == null ? void 0 : o.validUntil,
2134
2134
  value: ht(h.validUntil),
2135
2135
  howToSetTheDecision: V.EQUAL,
2136
- decisionDataType: z.DATE
2136
+ decisionDataType: G.DATE
2137
2137
  })
2138
2138
  } : null, S = (h == null ? void 0 : h.howToSetTheDecision) || V.EQUAL, C = S === V.RANGE && h && h.value && typeof h.value == "object" && "from" in h.value && "to" in h.value && h.value.from === h.value.to, k = S === V.LIST_OF_VALUES || S === V.LIST_OF_VALUES_MULTI, D = h && (k ? Ko(h).list : (() => {
2139
2139
  const A = h.i18nValue;
2140
2140
  if (C) {
2141
- const { from: O } = h.value;
2142
- return `Del ${Ie({
2141
+ const { from: m } = h.value, U = Re({
2143
2142
  ...h,
2144
2143
  howToSetTheDecision: V.EQUAL,
2145
- value: O
2146
- })}%`.trim();
2144
+ value: m
2145
+ }), P = h.decisionDataType === G.PERCENTAGE ? "%" : "";
2146
+ return `Del ${U}${P}`.trim();
2147
2147
  }
2148
- const F = Ie(
2148
+ const F = Re(
2149
2149
  h
2150
2150
  );
2151
- return A ?? F;
2151
+ let R = A ?? F;
2152
+ return (h == null ? void 0 : h.decisionDataType) === G.PERCENTAGE && typeof R == "string" && !R.includes("%") && (R = `${R}%`), (h == null ? void 0 : h.decisionDataType) === G.PERCENTAGE && typeof R == "number" && (R = `${R}%`), R;
2152
2153
  })()), $ = h ? {
2153
2154
  labelName: t && h.labelName || "",
2154
- decisionDataType: h.decisionDataType || z.ALPHABETICAL,
2155
+ decisionDataType: h.decisionDataType || G.ALPHABETICAL,
2155
2156
  value: D,
2156
2157
  howToSetTheDecision: h.i18nValue || C ? V.EQUAL : S,
2157
2158
  validUntil: h.validUntil
@@ -2159,78 +2160,78 @@ const Qo = (e) => {
2159
2160
  () => h ? xe(h) : {},
2160
2161
  [h]
2161
2162
  ), M = ((Ue = (Ge = h == null ? void 0 : h.conditionGroups) == null ? void 0 : Ge.map((A) => A == null ? void 0 : A.ConditionGroupId)) == null ? void 0 : Ue.filter(Boolean)) || Object.keys(j), J = M[0] || "group-primary", re = _.useMemo(() => {
2162
- const A = {}, F = j[J] || [], O = j["group-primary"] || [];
2163
- A["group-primary"] = J === "group-primary" ? O : [...F, ...O];
2164
- for (const b of M)
2165
- !b || b === J || b !== "group-primary" && j[b] && (A[b] = j[b]);
2166
- for (const b of Object.keys(j))
2167
- b === "group-primary" || b === J || b in A || (A[b] = j[b]);
2163
+ const A = {}, F = j[J] || [], R = j["group-primary"] || [];
2164
+ A["group-primary"] = J === "group-primary" ? R : [...F, ...R];
2165
+ for (const m of M)
2166
+ !m || m === J || m !== "group-primary" && j[m] && (A[m] = j[m]);
2167
+ for (const m of Object.keys(j))
2168
+ m === "group-primary" || m === J || m in A || (A[m] = j[m]);
2168
2169
  return A;
2169
2170
  }, [j, J, M]), be = _.useMemo(() => {
2170
2171
  const A = {};
2171
2172
  return Object.keys(re).forEach((F) => {
2172
- const O = re[F];
2173
- O && Array.isArray(O) ? A[F] = O.map((b) => {
2174
- let U = b.labelName;
2175
- b.timeUnit && b.labelName && (U = Pt(b.labelName, b.timeUnit));
2176
- let P = b.value;
2177
- if ((b == null ? void 0 : b.howToSetTheCondition) === V.RANGE && (b == null ? void 0 : b.conditionDataType) === z.PERCENTAGE && (b == null ? void 0 : b.value) && typeof b.value == "object" && !Array.isArray(b.value) && "from" in b.value && "to" in b.value) {
2178
- const { from: ne, to: oe } = b.value, H = String(ne).trim(), Z = String(oe).trim();
2173
+ const R = re[F];
2174
+ R && Array.isArray(R) ? A[F] = R.map((m) => {
2175
+ let U = m.labelName;
2176
+ m.timeUnit && m.labelName && (U = Vt(m.labelName, m.timeUnit));
2177
+ let P = m.value;
2178
+ if ((m == null ? void 0 : m.howToSetTheCondition) === V.RANGE && (m == null ? void 0 : m.conditionDataType) === G.PERCENTAGE && (m == null ? void 0 : m.value) && typeof m.value == "object" && !Array.isArray(m.value) && "from" in m.value && "to" in m.value) {
2179
+ const { from: ne, to: oe } = m.value, H = String(ne).trim(), Z = String(oe).trim();
2179
2180
  return P = `De ${H}% a ${Z}%`, {
2180
- ...b,
2181
+ ...m,
2181
2182
  labelName: U,
2182
2183
  value: P,
2183
2184
  howToSetTheCondition: V.EQUAL
2184
2185
  };
2185
2186
  }
2186
- if ((b == null ? void 0 : b.howToSetTheCondition) === V.GREATER_THAN && (b == null ? void 0 : b.conditionDataType) === z.PERCENTAGE && (b == null ? void 0 : b.value) !== void 0 && (b == null ? void 0 : b.value) !== null && (b == null ? void 0 : b.value) !== "") {
2187
- const ne = b.value;
2187
+ if ((m == null ? void 0 : m.howToSetTheCondition) === V.GREATER_THAN && (m == null ? void 0 : m.conditionDataType) === G.PERCENTAGE && (m == null ? void 0 : m.value) !== void 0 && (m == null ? void 0 : m.value) !== null && (m == null ? void 0 : m.value) !== "") {
2188
+ const ne = m.value;
2188
2189
  return P = `Mayor a ${String(ne).trim()}%`, {
2189
- ...b,
2190
+ ...m,
2190
2191
  labelName: U,
2191
2192
  value: P,
2192
2193
  howToSetTheCondition: V.EQUAL
2193
2194
  };
2194
2195
  }
2195
- if ((b == null ? void 0 : b.howToSetTheCondition) === V.LESS_THAN && (b == null ? void 0 : b.conditionDataType) === z.PERCENTAGE && (b == null ? void 0 : b.value) !== void 0 && (b == null ? void 0 : b.value) !== null && (b == null ? void 0 : b.value) !== "") {
2196
- const ne = b.value;
2196
+ if ((m == null ? void 0 : m.howToSetTheCondition) === V.LESS_THAN && (m == null ? void 0 : m.conditionDataType) === G.PERCENTAGE && (m == null ? void 0 : m.value) !== void 0 && (m == null ? void 0 : m.value) !== null && (m == null ? void 0 : m.value) !== "") {
2197
+ const ne = m.value;
2197
2198
  return P = `Menor a ${String(ne).trim()}%`, {
2198
- ...b,
2199
+ ...m,
2199
2200
  labelName: U,
2200
2201
  value: P,
2201
2202
  howToSetTheCondition: V.EQUAL
2202
2203
  };
2203
2204
  }
2204
- return (b == null ? void 0 : b.howToSetTheCondition) !== void 0 && (b == null ? void 0 : b.howToSetTheCondition) !== null && (b == null ? void 0 : b.value) !== void 0 && (b == null ? void 0 : b.value) !== null && (b == null ? void 0 : b.value) !== "" && (b.i18nValue ? P = yn(
2205
- b.i18nValue,
2206
- b.i18nValue ? V.EQUAL : b.howToSetTheCondition
2205
+ return (m == null ? void 0 : m.howToSetTheCondition) !== void 0 && (m == null ? void 0 : m.howToSetTheCondition) !== null && (m == null ? void 0 : m.value) !== void 0 && (m == null ? void 0 : m.value) !== null && (m == null ? void 0 : m.value) !== "" && (m.i18nValue ? P = yn(
2206
+ m.i18nValue,
2207
+ m.i18nValue ? V.EQUAL : m.howToSetTheCondition
2207
2208
  ) : P = yn(
2208
- b.value,
2209
- b.howToSetTheCondition
2210
- )), {
2211
- ...b,
2209
+ m.value,
2210
+ m.howToSetTheCondition
2211
+ )), (m == null ? void 0 : m.conditionDataType) === G.PERCENTAGE && typeof P == "string" && !P.includes("%") && (P = `${P}%`), {
2212
+ ...m,
2212
2213
  labelName: U,
2213
2214
  value: P,
2214
- howToSetTheCondition: b.i18nValue ? V.EQUAL : b.howToSetTheCondition
2215
+ howToSetTheCondition: m.i18nValue ? V.EQUAL : m.howToSetTheCondition
2215
2216
  };
2216
- }) : A[F] = O;
2217
+ }) : A[F] = R;
2217
2218
  }), A;
2218
2219
  }, [re]), $e = Wn(
2219
2220
  be,
2220
2221
  (A) => !A.hidden
2221
- ), Ve = _.useMemo(() => {
2222
+ ), Pe = _.useMemo(() => {
2222
2223
  const A = Object.entries($e).map(
2223
- ([O, b]) => [O, b.filter(Zo)]
2224
+ ([R, m]) => [R, m.filter(Zo)]
2224
2225
  ), F = {};
2225
- for (const [O, b] of A)
2226
- b.length > 0 && (F[O] = b);
2226
+ for (const [R, m] of A)
2227
+ m.length > 0 && (F[R] = m);
2227
2228
  return F;
2228
- }, [$e]), Pe = _.useMemo(() => {
2229
- const A = Object.keys(Ve);
2229
+ }, [$e]), Ve = _.useMemo(() => {
2230
+ const A = Object.keys(Pe);
2230
2231
  return A.includes("group-primary") ? ["group-primary", ...A.filter((F) => F !== "group-primary")] : A;
2231
- }, [Ve]), rt = {};
2232
+ }, [Pe]), rt = {};
2232
2233
  let ot = 1;
2233
- const at = Pe.map((A) => {
2234
+ const at = Ve.map((A) => {
2234
2235
  const F = A === "group-primary" ? "mainCondition" : `alternateCondition-${ot++}`;
2235
2236
  return rt[F] = A, {
2236
2237
  id: F,
@@ -2239,7 +2240,7 @@ const Qo = (e) => {
2239
2240
  };
2240
2241
  }), [it, lt] = _.useState(
2241
2242
  ((I = at[0]) == null ? void 0 : I.id) ?? "mainCondition"
2242
- ), kt = (A) => lt(A), st = rt[it] ?? Pe[0] ?? "group-primary", dt = Ve[st] ?? [], _e = Pe.length > 1, sn = Array.from({ length: 5 }), dn = !!(!r && h && o && $), cn = dt.length < 2 ? "start" : "space-between", un = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
2243
+ ), kt = (A) => lt(A), st = rt[it] ?? Ve[0] ?? "group-primary", dt = Pe[st] ?? [], _e = Ve.length > 1, sn = Array.from({ length: 5 }), dn = !!(!r && h && o && $), cn = dt.length < 2 ? "start" : "space-between", un = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
2243
2244
  return /* @__PURE__ */ i(
2244
2245
  Qo,
2245
2246
  {
@@ -2254,7 +2255,7 @@ const Qo = (e) => {
2254
2255
  isOpen: c,
2255
2256
  onToggle: u,
2256
2257
  hasEffectiveFrom: f,
2257
- hasValidUntil: m,
2258
+ hasValidUntil: b,
2258
2259
  effectiveFromRenderer: y,
2259
2260
  validUntilRenderer: w,
2260
2261
  onEdit: l,
@@ -2456,9 +2457,9 @@ const ta = E.div`
2456
2457
  toggleAt: p,
2457
2458
  editionMode: d
2458
2459
  } = e, g = a ? Array.from({ length: 3 }).map(
2459
- (f, m) => Ut({
2460
+ (f, b) => Ut({
2460
2461
  type: "loading",
2461
- index: m,
2462
+ index: b,
2462
2463
  controls: n,
2463
2464
  customTitleContentAddCard: r,
2464
2465
  loading: a,
@@ -2468,7 +2469,7 @@ const ta = E.div`
2468
2469
  editionMode: d
2469
2470
  })
2470
2471
  ) : o == null ? void 0 : o.map(
2471
- (f, m) => Ut({
2472
+ (f, b) => Ut({
2472
2473
  cardTitle: t,
2473
2474
  type: "decision",
2474
2475
  decision: f,
@@ -2478,9 +2479,9 @@ const ta = E.div`
2478
2479
  handleOpenModal: c,
2479
2480
  handleDelete: u,
2480
2481
  textValues: l,
2481
- index: m,
2482
- isOpen: s ? s(m) : !1,
2483
- onToggle: p ? () => p(m) : void 0,
2482
+ index: b,
2483
+ isOpen: s ? s(b) : !1,
2484
+ onToggle: p ? () => p(b) : void 0,
2484
2485
  editionMode: d
2485
2486
  })
2486
2487
  ), h = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !a && n;
@@ -2598,7 +2599,7 @@ const ta = E.div`
2598
2599
  }),
2599
2600
  value: { from: t, to: n }
2600
2601
  };
2601
- }, wn = (e) => e && typeof e == "object" && !Array.isArray(e) && "value" in e && e.value !== "" && e.value != null, It = (e, t) => {
2602
+ }, wn = (e) => e && typeof e == "object" && !Array.isArray(e) && "value" in e && e.value !== "" && e.value != null, Rt = (e, t) => {
2602
2603
  if (wn(e))
2603
2604
  return {
2604
2605
  schema: we().test(
@@ -2610,7 +2611,7 @@ const ta = E.div`
2610
2611
  };
2611
2612
  if (e && typeof e == "object" && "from" in e && "to" in e) {
2612
2613
  const n = e;
2613
- return t === z.PERCENTAGE ? {
2614
+ return t === G.PERCENTAGE ? {
2614
2615
  schema: X({
2615
2616
  from: me().required("El campo desde es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2616
2617
  to: me().required("El campo hasta es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100")
@@ -2624,7 +2625,7 @@ const ta = E.div`
2624
2625
  value: n
2625
2626
  };
2626
2627
  }
2627
- return t === z.PERCENTAGE ? {
2628
+ return t === G.PERCENTAGE ? {
2628
2629
  schema: me().required("El campo porcentaje es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2629
2630
  value: e
2630
2631
  } : {
@@ -2632,12 +2633,12 @@ const ta = E.div`
2632
2633
  value: e
2633
2634
  };
2634
2635
  }, ya = {
2635
- [R.LIST_OF_VALUES]: ga,
2636
- [R.LIST_OF_VALUES_MULTI]: fa,
2637
- [R.RANGE]: va,
2638
- [R.GREATER_THAN]: It,
2639
- [R.LESS_THAN]: It,
2640
- [R.EQUAL]: It
2636
+ [O.LIST_OF_VALUES]: ga,
2637
+ [O.LIST_OF_VALUES_MULTI]: fa,
2638
+ [O.RANGE]: va,
2639
+ [O.GREATER_THAN]: Rt,
2640
+ [O.LESS_THAN]: Rt,
2641
+ [O.EQUAL]: Rt
2641
2642
  }, Sn = (e) => ya[e] || ha, Cn = (e) => {
2642
2643
  var t;
2643
2644
  return Array.isArray((t = e == null ? void 0 : e.listOfPossibleValues) == null ? void 0 : t.list) && e.listOfPossibleValues.list.length > 0;
@@ -2669,17 +2670,17 @@ function xa({
2669
2670
  ), a = Object.fromEntries(
2670
2671
  Object.entries(r).map(([g, h]) => {
2671
2672
  const f = {};
2672
- return h.forEach((m) => {
2673
- const y = m.conditionName, w = m.value !== void 0 && m.value !== null && m.value !== "", S = m.howToSetTheCondition === le.LIST_OF_VALUES_MULTI ? [] : "";
2673
+ return h.forEach((b) => {
2674
+ const y = b.conditionName, w = b.value !== void 0 && b.value !== null && b.value !== "", S = b.howToSetTheCondition === le.LIST_OF_VALUES_MULTI ? [] : "";
2674
2675
  f[y] = {
2675
- ...m,
2676
- value: w ? m.value : S
2676
+ ...b,
2677
+ value: w ? b.value : S
2677
2678
  };
2678
2679
  }), [g, f];
2679
2680
  })
2680
2681
  ), c = Object.entries(r).map(
2681
2682
  ([g, h]) => {
2682
- const f = a[g] || {}, m = h.map((y) => {
2683
+ const f = a[g] || {}, b = h.map((y) => {
2683
2684
  const w = y.conditionName, S = f[w], C = S && typeof S == "object" && "value" in S ? S.value : y.value;
2684
2685
  return {
2685
2686
  ...y,
@@ -2688,12 +2689,12 @@ function xa({
2688
2689
  });
2689
2690
  return {
2690
2691
  ConditionGroupId: g,
2691
- conditionsThatEstablishesTheDecision: m
2692
+ conditionsThatEstablishesTheDecision: b
2692
2693
  };
2693
2694
  }
2694
2695
  ), u = {
2695
2696
  ruleName: e.ruleName || "",
2696
- decisionDataType: e.decisionDataType || z.ALPHABETICAL,
2697
+ decisionDataType: e.decisionDataType || G.ALPHABETICAL,
2697
2698
  howToSetTheDecision: e.howToSetTheDecision || "",
2698
2699
  value: e.value || "",
2699
2700
  effectiveFrom: e.effectiveFrom || "",
@@ -2768,16 +2769,16 @@ function xa({
2768
2769
  validateOnBlur: !0,
2769
2770
  onSubmit: (g) => {
2770
2771
  const h = Object.fromEntries(
2771
- Object.entries(r).map(([m, y]) => {
2772
+ Object.entries(r).map(([b, y]) => {
2772
2773
  var C;
2773
- const w = ((C = g.conditionsThatEstablishesTheDecision) == null ? void 0 : C[m]) || {}, S = y.map((k) => {
2774
+ const w = ((C = g.conditionsThatEstablishesTheDecision) == null ? void 0 : C[b]) || {}, S = y.map((k) => {
2774
2775
  const D = k.conditionName, $ = w[D], j = Ht($);
2775
2776
  return {
2776
2777
  ...k,
2777
2778
  value: j
2778
2779
  };
2779
2780
  }).filter((k) => Dn(k.value));
2780
- return [m, S];
2781
+ return [b, S];
2781
2782
  })
2782
2783
  ), f = {
2783
2784
  ...e,
@@ -2793,13 +2794,13 @@ function xa({
2793
2794
  }
2794
2795
  }), { formik: l, handleToggleNoneChange: (g) => {
2795
2796
  l.setFieldValue("toggleNone", g), o().forEach(({ group: h, cond: f }) => {
2796
- const m = `conditionsThatEstablishesTheDecision.${h}.${f.conditionName}`;
2797
+ const b = `conditionsThatEstablishesTheDecision.${h}.${f.conditionName}`;
2797
2798
  if (g)
2798
- l.setFieldValue(m, void 0);
2799
+ l.setFieldValue(b, void 0);
2799
2800
  else {
2800
2801
  const y = f.howToSetTheCondition === le.LIST_OF_VALUES_MULTI ? [] : "";
2801
2802
  l.setFieldValue(
2802
- m,
2803
+ b,
2803
2804
  {
2804
2805
  ...f,
2805
2806
  value: y
@@ -2863,8 +2864,8 @@ const wa = E.div`
2863
2864
  messageEnd: d = "",
2864
2865
  statusStart: g = "pending",
2865
2866
  statusEnd: h = "pending"
2866
- } = e, [f, m] = q(c), [y, w] = q(l), [S, C] = q(s), k = ({ target: M }) => {
2867
- m(M.checked), r && r(M.checked);
2867
+ } = e, [f, b] = q(c), [y, w] = q(l), [S, C] = q(s), k = ({ target: M }) => {
2868
+ b(M.checked), r && r(M.checked);
2868
2869
  }, D = (M) => {
2869
2870
  w(M.target.value), t(M);
2870
2871
  }, $ = (M) => {
@@ -2938,12 +2939,12 @@ const wa = E.div`
2938
2939
  termStartStatus: g,
2939
2940
  textValues: h,
2940
2941
  portalId: f,
2941
- showRedefineConfirm: m,
2942
+ showRedefineConfirm: b,
2942
2943
  onOpenRedefineConfirm: y,
2943
2944
  onCloseRedefineConfirm: w,
2944
2945
  onConfirmRedefine: S
2945
2946
  } = e;
2946
- return /* @__PURE__ */ v(G, { children: [
2947
+ return /* @__PURE__ */ v(z, { children: [
2947
2948
  /* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ v(x, { direction: "column", gap: "24px", width: "100%", children: [
2948
2949
  /* @__PURE__ */ i(We, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ v(
2949
2950
  x,
@@ -3043,7 +3044,7 @@ const wa = E.div`
3043
3044
  /* @__PURE__ */ i(Y, { type: "submit", children: h.confirm })
3044
3045
  ] })
3045
3046
  ] }) }),
3046
- m && f && /* @__PURE__ */ i(
3047
+ b && f && /* @__PURE__ */ i(
3047
3048
  Hn,
3048
3049
  {
3049
3050
  portalId: f,
@@ -3080,7 +3081,7 @@ function ka(e) {
3080
3081
  return e.replace(/\s+/g, " ").trim();
3081
3082
  }
3082
3083
  function Aa(e) {
3083
- const t = $a(e).toLowerCase(), n = /\b(s|es)\b/.test(Ia(e).toLowerCase()) && !t.endsWith("és");
3084
+ const t = $a(e).toLowerCase(), n = /\b(s|es)\b/.test(Ra(e).toLowerCase()) && !t.endsWith("és");
3084
3085
  return ({
3085
3086
  mano: "f",
3086
3087
  día: "m",
@@ -3092,32 +3093,32 @@ function Aa(e) {
3092
3093
  antigüedad: "f",
3093
3094
  antiguedad: "f",
3094
3095
  puntaje: "m"
3095
- }[t] ?? Ra(t)) === "f" ? n ? "las" : "la" : n ? "los" : "el";
3096
+ }[t] ?? Ia(t)) === "f" ? n ? "las" : "la" : n ? "los" : "el";
3096
3097
  }
3097
3098
  function $a(e) {
3098
3099
  return (e.toLowerCase().split(
3099
3100
  /\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
3100
3101
  )[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
3101
3102
  }
3102
- function Ia(e) {
3103
+ function Ra(e) {
3103
3104
  const t = e.trim().split(/\s+/);
3104
3105
  return t[t.length - 1] || "";
3105
3106
  }
3106
- function Ra(e) {
3107
+ function Ia(e) {
3107
3108
  return /(?:dad|tad|tud|umbre|ción|sión|ie|sis|itis)$/.test(e) || e.endsWith("ez") || e.endsWith("eza") ? "f" : /(?:aje|or|án|ambre)$/.test(e) ? "m" : e.endsWith("a") ? "f" : "m";
3108
3109
  }
3109
3110
  function Oa(e) {
3110
3111
  switch (e) {
3111
- case R.EQUAL:
3112
+ case O.EQUAL:
3112
3113
  return "sea";
3113
- case R.GREATER_THAN:
3114
+ case O.GREATER_THAN:
3114
3115
  return "sea mayor a";
3115
- case R.LESS_THAN:
3116
+ case O.LESS_THAN:
3116
3117
  return "sea menor a";
3117
- case R.RANGE:
3118
+ case O.RANGE:
3118
3119
  return "esté entre";
3119
- case R.LIST_OF_VALUES:
3120
- case R.LIST_OF_VALUES_MULTI:
3120
+ case O.LIST_OF_VALUES:
3121
+ case O.LIST_OF_VALUES_MULTI:
3121
3122
  return "esté en";
3122
3123
  default:
3123
3124
  return "sea";
@@ -3177,13 +3178,13 @@ const ze = (e) => {
3177
3178
  }), p = u ?? t, d = xe(p), g = xe(t), h = Wn(
3178
3179
  g,
3179
3180
  (I) => !I.hidden
3180
- ), f = Object.keys(h), m = f.includes("group-primary") && f.length > 0 ? "group-primary" : f[0], y = m != null ? [
3181
- ...f.filter((I) => I === m),
3182
- ...f.filter((I) => I !== m)
3181
+ ), f = Object.keys(h), b = f.includes("group-primary") && f.length > 0 ? "group-primary" : f[0], y = b != null ? [
3182
+ ...f.filter((I) => I === b),
3183
+ ...f.filter((I) => I !== b)
3183
3184
  ] : [], w = {};
3184
3185
  let S = 1;
3185
3186
  const C = y.map((I) => {
3186
- const A = I === m, F = A ? "mainCondition" : `alternateCondition-${S++}`;
3187
+ const A = I === b, F = A ? "mainCondition" : `alternateCondition-${S++}`;
3187
3188
  return w[F] = I, {
3188
3189
  id: F,
3189
3190
  label: A ? "Condición principal" : Gt(I, Number(F.split("-").at(-1))),
@@ -3191,10 +3192,10 @@ const ze = (e) => {
3191
3192
  };
3192
3193
  }), [k, D] = _.useState(
3193
3194
  ((Ge = C[0]) == null ? void 0 : Ge.id) ?? "mainCondition"
3194
- ), $ = (I) => D(I), j = w[k] ?? m ?? "group-primary";
3195
+ ), $ = (I) => D(I), j = w[k] ?? b ?? "group-primary";
3195
3196
  _.useEffect(() => {
3196
- var b;
3197
- const I = (b = l.values) == null ? void 0 : b.conditionsThatEstablishesTheDecision;
3197
+ var m;
3198
+ const I = (m = l.values) == null ? void 0 : m.conditionsThatEstablishesTheDecision;
3198
3199
  let A = !1;
3199
3200
  if (I && typeof I == "object" && (A = Object.values(I).some(
3200
3201
  (U) => U && typeof U == "object" && Object.keys(U).length > 0
@@ -3202,7 +3203,7 @@ const ze = (e) => {
3202
3203
  const F = xe(t);
3203
3204
  if (!F || Object.keys(F).length === 0)
3204
3205
  return;
3205
- const O = Object.fromEntries(
3206
+ const R = Object.fromEntries(
3206
3207
  Object.entries(F).map(([U, P]) => {
3207
3208
  const ue = Object.fromEntries(
3208
3209
  P.map((te) => {
@@ -3215,7 +3216,7 @@ const ze = (e) => {
3215
3216
  );
3216
3217
  l.setFieldValue(
3217
3218
  "conditionsThatEstablishesTheDecision",
3218
- O,
3219
+ R,
3219
3220
  !1
3220
3221
  );
3221
3222
  }, [t]), _.useEffect(() => {
@@ -3240,52 +3241,52 @@ const ze = (e) => {
3240
3241
  conditionsThatEstablishesTheDecision: ne
3241
3242
  };
3242
3243
  }
3243
- ), O = l.values.conditionGroups, b = JSON.stringify(F), U = JSON.stringify(O ?? []);
3244
- b !== U && l.setFieldValue("conditionGroups", F, !1);
3244
+ ), R = l.values.conditionGroups, m = JSON.stringify(F), U = JSON.stringify(R ?? []);
3245
+ m !== U && l.setFieldValue("conditionGroups", F, !1);
3245
3246
  }, [(Ue = l.values) == null ? void 0 : Ue.conditionsThatEstablishesTheDecision, p]);
3246
3247
  const M = _.useMemo(() => {
3247
- const I = Object.keys(h), F = (m != null ? [
3248
- ...I.filter((O) => O === m),
3249
- ...I.filter((O) => O !== m)
3250
- ] : I).map((O) => {
3251
- const U = (h[O] ?? []).map((P, ue) => {
3248
+ const I = Object.keys(h), F = (b != null ? [
3249
+ ...I.filter((R) => R === b),
3250
+ ...I.filter((R) => R !== b)
3251
+ ] : I).map((R) => {
3252
+ const U = (h[R] ?? []).map((P, ue) => {
3252
3253
  const te = ue === 0, fe = ze(P.howToSetTheCondition), ne = Da({
3253
3254
  label: P.labelName || "",
3254
3255
  howToSet: fe,
3255
3256
  isFirst: te
3256
- }), oe = P.timeUnit ? Pt("", P.timeUnit, !0).trim() : "", H = `${O}.${P.conditionName}`, Z = Fa(
3257
+ }), oe = P.timeUnit ? Vt("", P.timeUnit, !0).trim() : "", H = `${R}.${P.conditionName}`, Z = Fa(
3257
3258
  l.values,
3258
- O,
3259
+ R,
3259
3260
  P.conditionName
3260
3261
  ), At = La(
3261
3262
  l.values,
3262
- O,
3263
+ R,
3263
3264
  P.conditionName
3264
3265
  ), ct = Z !== void 0 ? Z : At, ut = ct !== void 0 ? ct : He(fe);
3265
3266
  return {
3266
3267
  ...P,
3267
3268
  __originalConditionName: P.conditionName,
3268
- __groupKey: O,
3269
+ __groupKey: R,
3269
3270
  __howToSet: fe,
3270
3271
  __scopedName: H,
3271
3272
  conditionName: P.conditionName,
3272
- groupKey: O,
3273
+ groupKey: R,
3273
3274
  labelName: ne,
3274
3275
  __unitAfterInput: oe,
3275
3276
  value: ut
3276
3277
  };
3277
3278
  });
3278
- return [O, U];
3279
+ return [R, U];
3279
3280
  });
3280
3281
  return Object.fromEntries(F);
3281
- }, [h, l.values, m]), J = M[j] ?? [], re = M[m ?? "group-primary"] ?? [], be = {
3282
+ }, [h, l.values, b]), J = M[j] ?? [], re = M[b ?? "group-primary"] ?? [], be = {
3282
3283
  decisionDataType: t.decisionDataType,
3283
3284
  howToSetTheCondition: t.howToSetTheDecision,
3284
3285
  labelName: t.labelName,
3285
3286
  listOfPossibleValues: t.listOfPossibleValues,
3286
3287
  ruleName: t.ruleName,
3287
- timeUnit: t.timeUnit ? Pt("", t.timeUnit, !0).trim() : ""
3288
- }, $e = l.submitCount > 0 || !!l.touched.effectiveFrom, Ve = l.submitCount > 0 || !!l.touched.validUntil, Pe = $e ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, rt = Ve ? l.errors.validUntil ? "invalid" : "valid" : void 0, ot = _.useMemo(() => {
3288
+ timeUnit: t.timeUnit ? Vt("", t.timeUnit, !0).trim() : ""
3289
+ }, $e = l.submitCount > 0 || !!l.touched.effectiveFrom, Pe = l.submitCount > 0 || !!l.touched.validUntil, Ve = $e ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, rt = Pe ? l.errors.validUntil ? "invalid" : "valid" : void 0, ot = _.useMemo(() => {
3289
3290
  const I = l.errors.conditionsThatEstablishesTheDecision;
3290
3291
  if (!I) return;
3291
3292
  if (typeof I == "string") return I;
@@ -3293,14 +3294,14 @@ const ze = (e) => {
3293
3294
  if (F) {
3294
3295
  if (typeof F == "string") return F;
3295
3296
  if (Array.isArray(F))
3296
- for (const O of F) {
3297
- const b = A(O);
3298
- if (b) return b;
3297
+ for (const R of F) {
3298
+ const m = A(R);
3299
+ if (m) return m;
3299
3300
  }
3300
3301
  else if (typeof F == "object")
3301
- for (const O of Object.values(F)) {
3302
- const b = A(O);
3303
- if (b) return b;
3302
+ for (const R of Object.values(F)) {
3303
+ const m = A(R);
3304
+ if (m) return m;
3304
3305
  }
3305
3306
  }
3306
3307
  };
@@ -3310,8 +3311,8 @@ const ze = (e) => {
3310
3311
  return He(A);
3311
3312
  }, lt = (I, A, F) => {
3312
3313
  var P, ue, te, fe, ne;
3313
- const O = `conditionsThatEstablishesTheDecision.${I}.${A}`, b = (te = (ue = (P = l.values) == null ? void 0 : P.conditionsThatEstablishesTheDecision) == null ? void 0 : ue[I]) == null ? void 0 : te[A];
3314
- b && typeof b == "object" && !Array.isArray(b) ? l.setFieldValue(`${O}.value`, F, !1) : l.setFieldValue(O, F, !1);
3314
+ const R = `conditionsThatEstablishesTheDecision.${I}.${A}`, m = (te = (ue = (P = l.values) == null ? void 0 : P.conditionsThatEstablishesTheDecision) == null ? void 0 : ue[I]) == null ? void 0 : te[A];
3315
+ m && typeof m == "object" && !Array.isArray(m) ? l.setFieldValue(`${R}.value`, F, !1) : l.setFieldValue(R, F, !1);
3315
3316
  const U = (fe = l.values) == null ? void 0 : fe.conditionGroups;
3316
3317
  if (Array.isArray(U)) {
3317
3318
  const oe = U.findIndex((H) => (H == null ? void 0 : H.ConditionGroupId) === I);
@@ -3326,16 +3327,16 @@ const ze = (e) => {
3326
3327
  }
3327
3328
  }
3328
3329
  }, kt = (I) => {
3329
- const [A, ...F] = I.split("."), O = F.join("."), b = Object.values(d).flat().find((P) => P.conditionName === O), U = it(b || {});
3330
- lt(A, O, U), l.setFieldTouched(
3331
- `conditionsThatEstablishesTheDecision.${A}.${O}`,
3330
+ const [A, ...F] = I.split("."), R = F.join("."), m = Object.values(d).flat().find((P) => P.conditionName === R), U = it(m || {});
3331
+ lt(A, R, U), l.setFieldTouched(
3332
+ `conditionsThatEstablishesTheDecision.${A}.${R}`,
3332
3333
  !1,
3333
3334
  !1
3334
3335
  );
3335
3336
  }, st = () => {
3336
3337
  (d[j] ?? []).forEach((A) => {
3337
- const F = ze(A == null ? void 0 : A.howToSetTheCondition), O = He(F);
3338
- lt(j, A.conditionName, O);
3338
+ const F = ze(A == null ? void 0 : A.howToSetTheCondition), R = He(F);
3339
+ lt(j, A.conditionName, R);
3339
3340
  });
3340
3341
  }, [dt, _e] = _.useState(!1);
3341
3342
  return /* @__PURE__ */ i(
@@ -3356,7 +3357,7 @@ const ze = (e) => {
3356
3357
  showConditionsError: at,
3357
3358
  tabs: C,
3358
3359
  termEndStatus: rt,
3359
- termStartStatus: Pe,
3360
+ termStartStatus: Ve,
3360
3361
  textValues: r,
3361
3362
  visibleConditions: re,
3362
3363
  visibleConditionsByGroup: M,
@@ -3390,7 +3391,7 @@ const ze = (e) => {
3390
3391
  handleOpenModal: g,
3391
3392
  handleCloseModal: h,
3392
3393
  handleSubmitForm: f,
3393
- handleDelete: m,
3394
+ handleDelete: b,
3394
3395
  terms: y = !0,
3395
3396
  onRemoveCondition: w,
3396
3397
  onRestoreConditions: S,
@@ -3403,13 +3404,13 @@ const ze = (e) => {
3403
3404
  decisions: a,
3404
3405
  loading: d,
3405
3406
  handleOpenModal: g,
3406
- handleDelete: m,
3407
+ handleDelete: b,
3407
3408
  textValues: c,
3408
3409
  isOpenFor: (be) => D === be,
3409
3410
  toggleAt: (be) => $(($e) => $e === be ? null : be),
3410
3411
  editionMode: l
3411
3412
  }), re = (a == null ? void 0 : a.length) === 0 && !d;
3412
- return /* @__PURE__ */ v(G, { children: [
3413
+ return /* @__PURE__ */ v(z, { children: [
3413
3414
  /* @__PURE__ */ i(ra, { children: /* @__PURE__ */ i(oa, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "16px", padding: "6px", children: k && (re ? /* @__PURE__ */ i(We, { legend: "Decisiones", children: /* @__PURE__ */ v(
3414
3415
  x,
3415
3416
  {
@@ -3437,7 +3438,7 @@ const ze = (e) => {
3437
3438
  children: "Sin decisiones"
3438
3439
  }
3439
3440
  ),
3440
- /* @__PURE__ */ i(L, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ v(G, { children: [
3441
+ /* @__PURE__ */ i(L, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ v(z, { children: [
3441
3442
  "Aun no tienes decisiones definidas, para empezar haz clic en",
3442
3443
  r || ' "Agregar decisión"'
3443
3444
  ] }) })
@@ -3465,7 +3466,7 @@ const ze = (e) => {
3465
3466
  customMessageEmptyDecisions: o,
3466
3467
  loading: d,
3467
3468
  handleOpenModal: g,
3468
- handleDelete: m,
3469
+ handleDelete: b,
3469
3470
  textValues: c,
3470
3471
  shouldRenderEmptyMessage: k,
3471
3472
  terms: y,
@@ -3501,7 +3502,7 @@ const ze = (e) => {
3501
3502
  border: {
3502
3503
  color: N.palette.neutral.N40
3503
3504
  }
3504
- }, Va = E.div`
3505
+ }, Pa = E.div`
3505
3506
  border-width: 1px;
3506
3507
  border-style: solid;
3507
3508
  border-color: ${({ theme: e }) => {
@@ -3515,7 +3516,7 @@ const ze = (e) => {
3515
3516
  height: ${({ $height: e }) => e};
3516
3517
  box-sizing: border-box;
3517
3518
  `;
3518
- function Pa(e) {
3519
+ function Va(e) {
3519
3520
  const {
3520
3521
  children: t,
3521
3522
  padding: n = "16px",
@@ -3525,7 +3526,7 @@ function Pa(e) {
3525
3526
  height: c
3526
3527
  } = e;
3527
3528
  return /* @__PURE__ */ i(
3528
- Va,
3529
+ Pa,
3529
3530
  {
3530
3531
  $padding: n,
3531
3532
  $margin: r,
@@ -3544,12 +3545,12 @@ const _a = (e, t) => {
3544
3545
  var C;
3545
3546
  const h = s.clientWidth, f = Array.from(
3546
3547
  p.querySelectorAll('[data-filter-tag="true"]')
3547
- ), m = 48;
3548
+ ), b = 48;
3548
3549
  let y = 0;
3549
3550
  const w = [], S = [];
3550
3551
  for (let k = 0; k < t.length; k++) {
3551
3552
  const D = ((C = f[k]) == null ? void 0 : C.offsetWidth) ?? 0;
3552
- y + D + m <= h ? (w.push(t[k]), y += D) : S.push(t[k]);
3553
+ y + D + b <= h ? (w.push(t[k]), y += D) : S.push(t[k]);
3553
3554
  }
3554
3555
  r(w), a(S), u(S.length > 0);
3555
3556
  }, g = new ResizeObserver(() => {
@@ -3632,8 +3633,8 @@ const Ga = E.div`
3632
3633
  }};
3633
3634
  }
3634
3635
  `, Ba = (e) => {
3635
- var g, h, f, m, y, w;
3636
- const { id: t, label: n, leadingIcon: r, onClose: o } = e, [a, c] = q(!1), u = () => c(!0), l = () => c(!1), s = Nr(Er), p = ((f = (h = (g = s == null ? void 0 : s.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Bt.option.appearance.hover, d = ((w = (y = (m = s == null ? void 0 : s.input) == null ? void 0 : m.option) == null ? void 0 : y.appearance) == null ? void 0 : w.regular) ?? Bt.option.appearance.regular;
3636
+ var g, h, f, b, y, w;
3637
+ const { id: t, label: n, leadingIcon: r, onClose: o } = e, [a, c] = q(!1), u = () => c(!0), l = () => c(!1), s = Nr(Er), p = ((f = (h = (g = s == null ? void 0 : s.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Bt.option.appearance.hover, d = ((w = (y = (b = s == null ? void 0 : s.input) == null ? void 0 : b.option) == null ? void 0 : y.appearance) == null ? void 0 : w.regular) ?? Bt.option.appearance.regular;
3637
3638
  return /* @__PURE__ */ i(
3638
3639
  Ha,
3639
3640
  {
@@ -3698,14 +3699,14 @@ const Ga = E.div`
3698
3699
  hidden: d,
3699
3700
  showOverflowIndicator: g,
3700
3701
  measurementRef: h
3701
- } = _a(u, t), [f, m] = q(!1), y = (D) => {
3702
- D.stopPropagation(), m(($) => !$);
3702
+ } = _a(u, t), [f, b] = q(!1), y = (D) => {
3703
+ D.stopPropagation(), b(($) => !$);
3703
3704
  };
3704
3705
  Ze(() => {
3705
3706
  const D = ($) => {
3706
3707
  var J, re;
3707
3708
  const j = $.target;
3708
- !((J = l.current) != null && J.contains(j)) && !((re = s.current) != null && re.contains(j)) && m(!1);
3709
+ !((J = l.current) != null && J.contains(j)) && !((re = s.current) != null && re.contains(j)) && b(!1);
3709
3710
  };
3710
3711
  return f && window.addEventListener("mousedown", D), () => window.removeEventListener("mousedown", D);
3711
3712
  }, [f]);
@@ -3716,9 +3717,9 @@ const Ga = E.div`
3716
3717
  icon: D.icon
3717
3718
  })), k = (D) => {
3718
3719
  var $, j;
3719
- (j = ($ = d.find((M) => M.label === D)) == null ? void 0 : $.onClose) == null || j.call($), m(!1);
3720
+ (j = ($ = d.find((M) => M.label === D)) == null ? void 0 : $.onClose) == null || j.call($), b(!1);
3720
3721
  };
3721
- return /* @__PURE__ */ v(Pa, { borderRadius: "8px", width: "100%", children: [
3722
+ return /* @__PURE__ */ v(Va, { borderRadius: "8px", width: "100%", children: [
3722
3723
  /* @__PURE__ */ i(Ua, { ref: h, children: t.map((D) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
3723
3724
  qe,
3724
3725
  {
@@ -3743,7 +3744,7 @@ const Ga = E.div`
3743
3744
  alignItems: "center",
3744
3745
  padding: "0px 8px",
3745
3746
  border: !0,
3746
- children: w ? /* @__PURE__ */ i(L, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(G, { children: [
3747
+ children: w ? /* @__PURE__ */ i(L, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(z, { children: [
3747
3748
  p.map((D) => /* @__PURE__ */ i(
3748
3749
  qe,
3749
3750
  {
@@ -3783,7 +3784,7 @@ const Ga = E.div`
3783
3784
  leadingIcon: D.icon,
3784
3785
  onClose: () => {
3785
3786
  var $;
3786
- ($ = D.onClose) == null || $.call(D), m(!1);
3787
+ ($ = D.onClose) == null || $.call(D), b(!1);
3787
3788
  }
3788
3789
  },
3789
3790
  D.label
@@ -3822,7 +3823,7 @@ const Ga = E.div`
3822
3823
  }, bs = (e) => {
3823
3824
  const { appliedFilters: t, fields: n, onChange: r, noFiltersLabel: o } = e, a = de("(max-width: 768px)"), c = !t || t.length === 0;
3824
3825
  return /* @__PURE__ */ v(x, { direction: "column", gap: "16px", children: [
3825
- a && /* @__PURE__ */ v(G, { children: [
3826
+ a && /* @__PURE__ */ v(z, { children: [
3826
3827
  /* @__PURE__ */ v(x, { gap: "6px", width: "100%", alignItems: "center", children: [
3827
3828
  /* @__PURE__ */ i(B, { appearance: "gray", icon: /* @__PURE__ */ i(_n, {}) }),
3828
3829
  /* @__PURE__ */ i(
@@ -3984,19 +3985,19 @@ const Ga = E.div`
3984
3985
  }),
3985
3986
  value: { from: t, to: n }
3986
3987
  };
3987
- }, Rt = (e, t) => t === z.PERCENTAGE ? {
3988
+ }, It = (e, t) => t === G.PERCENTAGE ? {
3988
3989
  schema: me().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
3989
3990
  value: e
3990
3991
  } : {
3991
3992
  schema: ye().required("Requerido"),
3992
3993
  value: e
3993
3994
  }, Ja = {
3994
- [R.LIST_OF_VALUES]: Ya,
3995
- [R.LIST_OF_VALUES_MULTI]: Xa,
3996
- [R.RANGE]: Qa,
3997
- [R.GREATER_THAN]: Rt,
3998
- [R.LESS_THAN]: Rt,
3999
- [R.EQUAL]: Rt
3995
+ [O.LIST_OF_VALUES]: Ya,
3996
+ [O.LIST_OF_VALUES_MULTI]: Xa,
3997
+ [O.RANGE]: Qa,
3998
+ [O.GREATER_THAN]: It,
3999
+ [O.LESS_THAN]: It,
4000
+ [O.EQUAL]: It
4000
4001
  }, En = (e) => Ja[e] || Wa;
4001
4002
  function Za({
4002
4003
  decision: e,
@@ -4005,7 +4006,7 @@ function Za({
4005
4006
  }) {
4006
4007
  const r = {
4007
4008
  ruleName: e.ruleName || "",
4008
- decisionDataType: e.decisionDataType || z.ALPHABETICAL,
4009
+ decisionDataType: e.decisionDataType || G.ALPHABETICAL,
4009
4010
  howToSetTheDecision: e.howToSetTheDecision || "",
4010
4011
  value: e.value || "",
4011
4012
  effectiveFrom: e.effectiveFrom || "",
@@ -4129,7 +4130,7 @@ function Za({
4129
4130
  void 0
4130
4131
  );
4131
4132
  else {
4132
- const d = p.howToSetTheCondition === R.LIST_OF_VALUES_MULTI ? [] : "";
4133
+ const d = p.howToSetTheCondition === O.LIST_OF_VALUES_MULTI ? [] : "";
4133
4134
  o.setFieldValue(
4134
4135
  `conditionsThatEstablishesTheDecision.${p.conditionName}`,
4135
4136
  d
@@ -4178,7 +4179,7 @@ const Ka = E.div`
4178
4179
  };
4179
4180
  return Ze(() => {
4180
4181
  s(t);
4181
- }, [t]), /* @__PURE__ */ v(G, { children: [
4182
+ }, [t]), /* @__PURE__ */ v(z, { children: [
4182
4183
  /* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(
4183
4184
  St,
4184
4185
  {
@@ -4191,7 +4192,7 @@ const Ka = E.div`
4191
4192
  children: /* @__PURE__ */ i(L, { size: "medium", type: "label", weight: "bold", children: a })
4192
4193
  }
4193
4194
  ) }),
4194
- l && /* @__PURE__ */ i(G, { children: n })
4195
+ l && /* @__PURE__ */ i(z, { children: n })
4195
4196
  ] });
4196
4197
  }, ni = (e) => {
4197
4198
  const {
@@ -4208,14 +4209,14 @@ const Ka = E.div`
4208
4209
  messageEnd: d = "",
4209
4210
  statusStart: g = "pending",
4210
4211
  statusEnd: h = "pending"
4211
- } = e, [f, m] = q(c), [y, w] = q(l), [S, C] = q(s), k = ({ target: M }) => {
4212
- m(M.checked), r && r(M.checked);
4212
+ } = e, [f, b] = q(c), [y, w] = q(l), [S, C] = q(s), k = ({ target: M }) => {
4213
+ b(M.checked), r && r(M.checked);
4213
4214
  }, D = (M) => {
4214
4215
  w(M.target.value), t(M);
4215
4216
  }, $ = (M) => {
4216
4217
  C(M.target.value), n(M);
4217
4218
  }, j = de("(max-width: 400px)");
4218
- return /* @__PURE__ */ v(G, { children: [
4219
+ return /* @__PURE__ */ v(z, { children: [
4219
4220
  /* @__PURE__ */ v(x, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
4220
4221
  /* @__PURE__ */ i(
4221
4222
  L,
@@ -4342,7 +4343,7 @@ const Ka = E.div`
4342
4343
  checked: !t.values.toggleNone && t.values.conditionsThatEstablishesTheDecision[d.conditionName] !== void 0,
4343
4344
  handleToggleChange: (g) => u(
4344
4345
  d.conditionName,
4345
- d.howToSetTheCondition === R.LIST_OF_VALUES_MULTI
4346
+ d.howToSetTheCondition === O.LIST_OF_VALUES_MULTI
4346
4347
  )(g.target.checked),
4347
4348
  children: yt({ condition: d, formik: t })
4348
4349
  },
@@ -4351,7 +4352,7 @@ const Ka = E.div`
4351
4352
  ]
4352
4353
  }
4353
4354
  ) }) }),
4354
- n.terms && /* @__PURE__ */ v(G, { children: [
4355
+ n.terms && /* @__PURE__ */ v(z, { children: [
4355
4356
  /* @__PURE__ */ i(W, { dashed: !0 }),
4356
4357
  /* @__PURE__ */ i(
4357
4358
  ni,
@@ -4405,7 +4406,7 @@ const Ka = E.div`
4405
4406
  visibleConditions: l,
4406
4407
  normalizedDecision: u,
4407
4408
  handleToggleNoneChange: c,
4408
- handleConditionToggleChange: (f, m) => (y) => {
4409
+ handleConditionToggleChange: (f, b) => (y) => {
4409
4410
  if (!y)
4410
4411
  a.setFieldValue(
4411
4412
  `conditionsThatEstablishesTheDecision.${f}`,
@@ -4416,7 +4417,7 @@ const Ka = E.div`
4416
4417
  !1
4417
4418
  );
4418
4419
  else {
4419
- const w = m ? [] : "";
4420
+ const w = b ? [] : "";
4420
4421
  a.setFieldValue(
4421
4422
  `conditionsThatEstablishesTheDecision.${f}`,
4422
4423
  w
@@ -4562,7 +4563,7 @@ const Ka = E.div`
4562
4563
  l && !await l(w, S) || s(w);
4563
4564
  },
4564
4565
  [s, l]
4565
- ), f = t || u ? "primary" : "dark", m = t || u ? "bold" : "normal", y = _.useId();
4566
+ ), f = t || u ? "primary" : "dark", b = t || u ? "bold" : "normal", y = _.useId();
4566
4567
  return /* @__PURE__ */ i(ai, { $active: t, children: /* @__PURE__ */ v(he, { border: !0, borderRadius: "8px", width: "100%", children: [
4567
4568
  /* @__PURE__ */ i(
4568
4569
  di,
@@ -4602,7 +4603,7 @@ const Ka = E.div`
4602
4603
  cursorHover: !0,
4603
4604
  size: "small",
4604
4605
  type: "title",
4605
- weight: m,
4606
+ weight: b,
4606
4607
  children: o
4607
4608
  }
4608
4609
  ) })
@@ -4639,7 +4640,7 @@ const Ka = E.div`
4639
4640
  cursorHover: !0,
4640
4641
  size: "small",
4641
4642
  type: "title",
4642
- weight: m,
4643
+ weight: b,
4643
4644
  onClick: r,
4644
4645
  children: o
4645
4646
  }
@@ -4943,7 +4944,7 @@ function Si({
4943
4944
  draggedNodes: Mi,
4944
4945
  dragstartClasses: _i,
4945
4946
  handleNodeKeydown: Ui,
4946
- handleDragstart: Vi,
4947
+ handleDragstart: Pi,
4947
4948
  handleNodeDragover: Ki,
4948
4949
  handleParentDragover: el,
4949
4950
  handleNodeDrop: Hi,
@@ -4957,7 +4958,7 @@ function Si({
4957
4958
  handleNodePointerover: zi,
4958
4959
  handleParentPointerover: tl,
4959
4960
  handleParentScroll: ji,
4960
- handleNodePointerdown: Pi,
4961
+ handleNodePointerdown: Vi,
4961
4962
  handleNodeDragenter: rl,
4962
4963
  handleNodeDragleave: ol,
4963
4964
  handleParentDrop: Ni,
@@ -4969,8 +4970,8 @@ function Si({
4969
4970
  setupNode: Ai,
4970
4971
  setupNodeRemap: or,
4971
4972
  reapplyDragClasses: $i,
4972
- tearDownNode: Ri,
4973
- tearDownNodeRemap: Ii,
4973
+ tearDownNode: Ii,
4974
+ tearDownNodeRemap: Ri,
4974
4975
  remapFinished: Fi,
4975
4976
  threshold: {
4976
4977
  horizontal: 0,
@@ -5231,14 +5232,14 @@ function $i(e, t) {
5231
5232
  const n = ce(T) ? t.config.synthDropZoneClass : t.config.dropZoneClass;
5232
5233
  T.draggedNode.el === e && Oe([e], n, !0);
5233
5234
  }
5234
- function Ii(e) {
5235
+ function Ri(e) {
5235
5236
  var t;
5236
5237
  (t = e.parent.data.config.plugins) == null || t.forEach((n) => {
5237
5238
  var r, o;
5238
5239
  (o = (r = n(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
5239
5240
  });
5240
5241
  }
5241
- function Ri(e) {
5242
+ function Ii(e) {
5242
5243
  var t, n, r, o, a;
5243
5244
  (t = e.parent.data.config.plugins) == null || t.forEach((c) => {
5244
5245
  var u, l;
@@ -5361,7 +5362,7 @@ function ji(e) {
5361
5362
  T.preventEnter = !1, T.emit("scrollEnded", T);
5362
5363
  }, 100)));
5363
5364
  }
5364
- function Vi(e, t) {
5365
+ function Pi(e, t) {
5365
5366
  const n = e.targetData.parent.data.config;
5366
5367
  if (!n.nativeDrag || !Li(e) || !ar({
5367
5368
  x: e.e.clientX,
@@ -5393,7 +5394,7 @@ function Vi(e, t) {
5393
5394
  n.onDragstart(a);
5394
5395
  }
5395
5396
  }
5396
- function Pi(e, t) {
5397
+ function Vi(e, t) {
5397
5398
  var u, l;
5398
5399
  if (Ne(e.e), t.pointerDown = {
5399
5400
  parent: e.targetData.parent,
@@ -5604,7 +5605,7 @@ function Yi(e, t) {
5604
5605
  function Xi(e) {
5605
5606
  var p, d, g, h, f;
5606
5607
  e.draggedNode && (e.draggedNode.el.draggable = !0);
5607
- const t = e.draggedNodes.map((m) => m.el), n = e.initialParent.data, r = ce(e), o = (p = Q.get(e.initialParent.el)) == null ? void 0 : p.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, c = (d = n == null ? void 0 : n.config) == null ? void 0 : d.longPressClass, u = r ? (g = n == null ? void 0 : n.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = n == null ? void 0 : n.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
5608
+ const t = e.draggedNodes.map((b) => b.el), n = e.initialParent.data, r = ce(e), o = (p = Q.get(e.initialParent.el)) == null ? void 0 : p.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, c = (d = n == null ? void 0 : n.config) == null ? void 0 : d.longPressClass, u = r ? (g = n == null ? void 0 : n.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = n == null ? void 0 : n.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
5608
5609
  ce(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Wt(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
5609
5610
  De(t, a), De(t, c), De(t, u);
5610
5611
  }), ke(e.draggedNodes, e.currentParent, e), Ae(e.currentParent, void 0, e);
@@ -5629,7 +5630,7 @@ function Qi(e, t) {
5629
5630
  ), ee(t) && n.handleEnd(t);
5630
5631
  }
5631
5632
  function Ji(e, t, n, r, o, a) {
5632
- var f, m;
5633
+ var f, b;
5633
5634
  const c = t.data.config;
5634
5635
  let u, l;
5635
5636
  const s = [
@@ -5697,7 +5698,7 @@ function Ji(e, t, n, r, o, a) {
5697
5698
  synthDragScrolling: !1,
5698
5699
  synthDragging: !0,
5699
5700
  rootScrollWidth: (f = document.scrollingElement) == null ? void 0 : f.scrollWidth,
5700
- rootScrollHeight: (m = document.scrollingElement) == null ? void 0 : m.scrollHeight
5701
+ rootScrollHeight: (b = document.scrollingElement) == null ? void 0 : b.scrollHeight
5701
5702
  };
5702
5703
  return tr({
5703
5704
  ...nr(
@@ -5959,7 +5960,7 @@ function De(e, t) {
5959
5960
  function $n(e, t, n, r, o) {
5960
5961
  const c = o.axis === "x", u = e === document.scrollingElement, l = c ? "scrollLeft" : "scrollTop", s = c ? "clientWidth" : "clientHeight", p = c ? "offsetWidth" : "offsetHeight", d = c ? "scrollWidth" : "scrollHeight", g = c ? t.clientX : t.clientY, h = c ? r.left : r.top, f = c ? n.overflowX : n.overflowY;
5961
5962
  if (u) {
5962
- const m = e[l], y = e[s], w = m > 0, S = m + y < (c ? o.state.rootScrollWidth || 0 : e[d]);
5963
+ const b = e[l], y = e[s], w = b > 0, S = b + y < (c ? o.state.rootScrollWidth || 0 : e[d]);
5963
5964
  return c ? {
5964
5965
  left: w && g < y * 0.075,
5965
5966
  right: S && g > y * (1 - 0.075)
@@ -5969,7 +5970,7 @@ function $n(e, t, n, r, o) {
5969
5970
  };
5970
5971
  }
5971
5972
  if ((f === "auto" || f === "scroll") && e !== document.body && e !== document.documentElement) {
5972
- const m = e[d], y = e[p], w = e[l], S = w > 0, C = w < m - y;
5973
+ const b = e[d], y = e[p], w = e[l], S = w > 0, C = w < b - y;
5973
5974
  return c ? {
5974
5975
  left: S && g < h + y * 0.075,
5975
5976
  right: C && g > h + y * (1 - 0.075)
@@ -5991,8 +5992,8 @@ function ll(e, t, n, r) {
5991
5992
  n[l] !== void 0 && (cancelAnimationFrame(n[l]), n[l] = void 0);
5992
5993
  return;
5993
5994
  }
5994
- const p = o ? "scrollLeft" : "scrollTop", d = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", h = e[p], f = e[d], m = e[g];
5995
- if (!(a > 0 ? h + f < m : h > 0)) {
5995
+ const p = o ? "scrollLeft" : "scrollTop", d = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", h = e[p], f = e[d], b = e[g];
5996
+ if (!(a > 0 ? h + f < b : h > 0)) {
5996
5997
  n[l] = void 0, n[u] = void 0;
5997
5998
  return;
5998
5999
  }
@@ -6000,7 +6001,7 @@ function ll(e, t, n, r) {
6000
6001
  };
6001
6002
  n[l] = requestAnimationFrame(s);
6002
6003
  }
6003
- function In(e, t, n) {
6004
+ function Rn(e, t, n) {
6004
6005
  const r = e.getBoundingClientRect();
6005
6006
  return t >= r.left && t <= r.right && n >= r.top && n <= r.bottom;
6006
6007
  }
@@ -6019,7 +6020,7 @@ function Et(e, t, n) {
6019
6020
  }), g = $n(l, t, s, p, { axis: "y" });
6020
6021
  (d.left || d.right) && (n.lastScrollContainerX = l, c("x", d.right ? "positive" : "negative", l)), (g.up || g.down) && (n.lastScrollContainerY = l, c("y", g.down ? "positive" : "negative", l));
6021
6022
  };
6022
- if (n.lastScrollContainerX && In(n.lastScrollContainerX, r, o) && u(n.lastScrollContainerX), !a && n.lastScrollContainerY && In(n.lastScrollContainerY, r, o) && u(n.lastScrollContainerY), !a) {
6023
+ if (n.lastScrollContainerX && Rn(n.lastScrollContainerX, r, o) && u(n.lastScrollContainerX), !a && n.lastScrollContainerY && Rn(n.lastScrollContainerY, r, o) && u(n.lastScrollContainerY), !a) {
6023
6024
  let l = document.elementFromPoint(r, o);
6024
6025
  for (; l && !(a && n.lastScrollContainerX && n.lastScrollContainerY); )
6025
6026
  l instanceof HTMLElement && u(l), l = l.parentElement;
@@ -6104,7 +6105,7 @@ function hl(e, t) {
6104
6105
  xt.set(n, t), Si({ parent: n, getValues: ul, setValues: pl, config: e });
6105
6106
  };
6106
6107
  }
6107
- function Rn(e) {
6108
+ function In(e) {
6108
6109
  rn && (Array.isArray(e) || (e = [e]), e.forEach((t) => {
6109
6110
  const { parent: n, state: r, ...o } = t;
6110
6111
  cl(n, hl(o, r));
@@ -6113,10 +6114,10 @@ function Rn(e) {
6113
6114
  function gl(e, t = {}) {
6114
6115
  const n = Ye(null), [r, o] = q(e);
6115
6116
  function a(c = {}) {
6116
- Rn({ parent: n, state: [r, o], ...c });
6117
+ In({ parent: n, state: [r, o], ...c });
6117
6118
  }
6118
6119
  return Ze(() => {
6119
- Rn({ parent: n, state: [r, o], ...t });
6120
+ In({ parent: n, state: [r, o], ...t });
6120
6121
  }, [r]), Ze(() => () => {
6121
6122
  n.current && rr(n.current);
6122
6123
  }, []), [n, r, o, a];
@@ -6159,7 +6160,7 @@ const On = {
6159
6160
  locked: l = !1
6160
6161
  } = e, s = _.useRef(null), p = l ? [s, a] : gl(a, { group: r }), [d, g] = p, [h, f] = _.useState(
6161
6162
  null
6162
- ), m = _.useRef(a);
6163
+ ), b = _.useRef(a);
6163
6164
  _.useEffect(() => {
6164
6165
  if (l) return;
6165
6166
  const k = (D) => {
@@ -6188,7 +6189,7 @@ const On = {
6188
6189
  };
6189
6190
  }, [S, l]), _.useEffect(() => {
6190
6191
  if (l) return;
6191
- const k = m.current;
6192
+ const k = b.current;
6192
6193
  if (g.length !== k.length && g.length === k.length + 1) {
6193
6194
  const D = new Set(k), $ = g.find((j) => !D.has(j)) || null;
6194
6195
  if ($) {
@@ -6196,7 +6197,7 @@ const On = {
6196
6197
  u == null || u({ item: $, from: j, to: n });
6197
6198
  }
6198
6199
  }
6199
- m.current = g;
6200
+ b.current = g;
6200
6201
  }, [g, n, u, l]);
6201
6202
  const C = g.length === 0;
6202
6203
  return /* @__PURE__ */ i(
@@ -6396,7 +6397,7 @@ const On = {
6396
6397
  const t = Date.now(), n = Ln.get(e) || 0;
6397
6398
  return t - n < wl ? !0 : (Ln.set(e, t), !1);
6398
6399
  }, Cl = (e) => {
6399
- const t = Ir(e);
6400
+ const t = Rr(e);
6400
6401
  return {
6401
6402
  spa: "es",
6402
6403
  eng: "en",
@@ -6461,7 +6462,7 @@ function on(e, t) {
6461
6462
  const kl = {
6462
6463
  1: "1fr",
6463
6464
  2: "1fr 1fr"
6464
- }, Al = (e, t) => t ? "1fr" : kl[e.length] || `repeat(${Math.ceil(e.length / 2)}, 1fr)`, $l = (e, t) => !t && e.length <= 2 ? "1fr" : t ? `repeat(${Math.ceil(e.length)}, 1fr)` : `repeat(${Math.ceil(e.length / 2)}, 1fr)`, Il = E.div`
6465
+ }, Al = (e, t) => t ? "1fr" : kl[e.length] || `repeat(${Math.ceil(e.length / 2)}, 1fr)`, $l = (e, t) => !t && e.length <= 2 ? "1fr" : t ? `repeat(${Math.ceil(e.length)}, 1fr)` : `repeat(${Math.ceil(e.length / 2)}, 1fr)`, Rl = E.div`
6465
6466
  display: flex;
6466
6467
  align-items: center;
6467
6468
  padding: 0px 4px 0px 2px;
@@ -6474,9 +6475,9 @@ const kl = {
6474
6475
  cursor: pointer;
6475
6476
  `;
6476
6477
  var ge = /* @__PURE__ */ ((e) => (e.DANGER = "danger", e.DARK = "dark", e.GRAY = "gray", e.HELP = "help", e.LIGHT = "light", e.PRIMARY = "primary", e.SUCCESS = "success", e.WARNING = "warning", e))(ge || {});
6477
- const Rl = (e) => {
6478
+ const Il = (e) => {
6478
6479
  const { onClick: t, icon: n, value: r } = e;
6479
- return /* @__PURE__ */ v(Il, { onClick: t, children: [
6480
+ return /* @__PURE__ */ v(Rl, { onClick: t, children: [
6480
6481
  n && /* @__PURE__ */ i(
6481
6482
  x,
6482
6483
  {
@@ -6508,7 +6509,7 @@ function Fl(e) {
6508
6509
  }
6509
6510
  const Ll = (e) => {
6510
6511
  const { withTag: t, children: n, isMobile: r, direction: o, value: a } = e, c = r ? "small" : "medium", u = o === "column" ? "start" : "end";
6511
- if (t) return /* @__PURE__ */ i(G, { children: n });
6512
+ if (t) return /* @__PURE__ */ i(z, { children: n });
6512
6513
  let l;
6513
6514
  if (Fl(a))
6514
6515
  l = a;
@@ -6647,7 +6648,7 @@ const Ll = (e) => {
6647
6648
  padding: g = "0px",
6648
6649
  backgroundColor: h = ge.LIGHT,
6649
6650
  boxSizing: f,
6650
- borderColor: m = ge.LIGHT,
6651
+ borderColor: b = ge.LIGHT,
6651
6652
  overflowY: y,
6652
6653
  overflowX: w,
6653
6654
  boxShadow: S,
@@ -6671,7 +6672,7 @@ const Ll = (e) => {
6671
6672
  $padding: g,
6672
6673
  $backgroundColor: h,
6673
6674
  $boxSizing: f,
6674
- $borderColor: m,
6675
+ $borderColor: b,
6675
6676
  $borderRadius: s,
6676
6677
  $overflowY: y,
6677
6678
  $overflowX: w,
@@ -6731,13 +6732,13 @@ const Ll = (e) => {
6731
6732
  alignItems: "center",
6732
6733
  justifyContent: c === "column" ? "flex-start" : "flex-end",
6733
6734
  children: r ? /* @__PURE__ */ i(
6734
- Rl,
6735
+ Il,
6735
6736
  {
6736
6737
  icon: o,
6737
6738
  value: a,
6738
6739
  onClick: u
6739
6740
  }
6740
- ) : /* @__PURE__ */ i(G, { children: /* @__PURE__ */ i(
6741
+ ) : /* @__PURE__ */ i(z, { children: /* @__PURE__ */ i(
6741
6742
  Ll,
6742
6743
  {
6743
6744
  withTag: l ?? !1,
@@ -6758,7 +6759,7 @@ const Ll = (e) => {
6758
6759
  function jl(e) {
6759
6760
  return e === "" || e === null || e === void 0 ? !0 : Array.isArray(e) ? e.length === 0 : !1;
6760
6761
  }
6761
- function Vl(e) {
6762
+ function Pl(e) {
6762
6763
  const { ctx: t, node: n } = e, r = n.layout ?? {}, o = on(n.entries, t.data);
6763
6764
  if (!o || o.length === 0) return null;
6764
6765
  const a = /* @__PURE__ */ i(
@@ -6797,7 +6798,7 @@ function Vl(e) {
6797
6798
  }
6798
6799
  ) : a;
6799
6800
  }
6800
- function Pl(e) {
6801
+ function Vl(e) {
6801
6802
  const { ctx: t, node: n, renderNode: r } = e, { children: o } = n;
6802
6803
  return /* @__PURE__ */ i(x, { direction: "column", width: "100%", gap: "16px", children: o.map((a) => r(a, t)) });
6803
6804
  }
@@ -6866,8 +6867,8 @@ function zl(e, t) {
6866
6867
  for (const [h, f] of g) {
6867
6868
  if (!ve(f) && !Array.isArray(f) && u(f))
6868
6869
  continue;
6869
- const m = n.has(h) ? p : Ul(p, h);
6870
- ve(f) || Array.isArray(f) ? l(f, m, d + 1) : c(m || h, f);
6870
+ const b = n.has(h) ? p : Ul(p, h);
6871
+ ve(f) || Array.isArray(f) ? l(f, b, d + 1) : c(b || h, f);
6871
6872
  }
6872
6873
  return;
6873
6874
  }
@@ -6960,15 +6961,15 @@ function ql(e) {
6960
6961
  function Wl(e) {
6961
6962
  return {
6962
6963
  attributesGrid: (t, n) => /* @__PURE__ */ i(ql, { ctx: n, node: t }),
6963
- entriesGrid: (t, n) => /* @__PURE__ */ i(Vl, { ctx: n, node: t }),
6964
- group: (t, n) => /* @__PURE__ */ i(Pl, { ctx: n, node: t, renderNode: e }),
6964
+ entriesGrid: (t, n) => /* @__PURE__ */ i(Pl, { ctx: n, node: t }),
6965
+ group: (t, n) => /* @__PURE__ */ i(Vl, { ctx: n, node: t, renderNode: e }),
6965
6966
  json: (t, n) => /* @__PURE__ */ i(Hl, { ctx: n, node: t })
6966
6967
  };
6967
6968
  }
6968
6969
  function Yl(e, t) {
6969
6970
  return e.when ? e.when(t) : !0;
6970
6971
  }
6971
- function Vn(e, t, n) {
6972
+ function Pn(e, t, n) {
6972
6973
  if (!Yl(e, t.data)) return null;
6973
6974
  if (!n)
6974
6975
  return /* @__PURE__ */ i(Yt, { value: e }, e.id);
@@ -7024,7 +7025,7 @@ const Xl = E.div`
7024
7025
  }
7025
7026
  )
7026
7027
  ] }),
7027
- o && /* @__PURE__ */ v(G, { children: [
7028
+ o && /* @__PURE__ */ v(z, { children: [
7028
7029
  /* @__PURE__ */ i(W, { dashed: !0 }),
7029
7030
  r
7030
7031
  ] })
@@ -7034,7 +7035,7 @@ function ie(e) {
7034
7035
  const t = e.replace(/([A-Z])/g, " $1").trim();
7035
7036
  return t.charAt(0).toUpperCase() + t.slice(1);
7036
7037
  }
7037
- function Pn(e, t) {
7038
+ function Vn(e, t) {
7038
7039
  return Object.keys(t).map((r) => ({
7039
7040
  id: `${e}.${r}`,
7040
7041
  label: ie(r),
@@ -7143,8 +7144,8 @@ function Zl(e) {
7143
7144
  id: `${o}[${p}].${h}`,
7144
7145
  label: ie(h),
7145
7146
  value: (f) => {
7146
- var m, y;
7147
- return (y = (m = f == null ? void 0 : f[o]) == null ? void 0 : m[p]) == null ? void 0 : y[h];
7147
+ var b, y;
7148
+ return (y = (b = f == null ? void 0 : f[o]) == null ? void 0 : b[p]) == null ? void 0 : y[h];
7148
7149
  },
7149
7150
  render: (f) => pe(f)
7150
7151
  }))
@@ -7198,12 +7199,12 @@ function Zl(e) {
7198
7199
  variant: "lightCard",
7199
7200
  columns: { mobile: "1fr", desktop: "repeat(2, 1fr)" }
7200
7201
  },
7201
- items: f.map((m) => ({
7202
- id: `${o}.values[${g}].${m}`,
7203
- label: ie(m),
7202
+ items: f.map((b) => ({
7203
+ id: `${o}.values[${g}].${b}`,
7204
+ label: ie(b),
7204
7205
  value: (y) => {
7205
7206
  var w, S, C;
7206
- return (C = (S = (w = y == null ? void 0 : y[o]) == null ? void 0 : w.values) == null ? void 0 : S[g]) == null ? void 0 : C[m];
7207
+ return (C = (S = (w = y == null ? void 0 : y[o]) == null ? void 0 : w.values) == null ? void 0 : S[g]) == null ? void 0 : C[b];
7207
7208
  },
7208
7209
  render: (y) => pe(y)
7209
7210
  }))
@@ -7242,7 +7243,7 @@ function Zl(e) {
7242
7243
  var p;
7243
7244
  return !!((p = s == null ? void 0 : s[o]) != null && p.values);
7244
7245
  },
7245
- items: Pn(
7246
+ items: Vn(
7246
7247
  `${o}.values`,
7247
7248
  l
7248
7249
  )
@@ -7287,7 +7288,7 @@ function Zl(e) {
7287
7288
  variant: "none"
7288
7289
  },
7289
7290
  when: (l) => !!(l != null && l[o]),
7290
- items: Pn(o, u)
7291
+ items: Vn(o, u)
7291
7292
  }
7292
7293
  ]
7293
7294
  };
@@ -7296,9 +7297,9 @@ function Zl(e) {
7296
7297
  function Kl(e, t) {
7297
7298
  return Un(() => t ?? Zl(e), [t, e]);
7298
7299
  }
7299
- function Is(e) {
7300
- const { data: t, isMobile: n, isTablet: r, onBackStep: o, schema: a } = e, c = Kl(t, a), u = { data: t, isMobile: n, isTablet: r }, l = Un(() => Wl(Vn), []), s = c.steps.map((p) => {
7301
- const d = p.nodes.map((g) => Vn(g, u, l)).filter((g) => g != null && g !== !1);
7300
+ function Rs(e) {
7301
+ const { data: t, isMobile: n, isTablet: r, onBackStep: o, schema: a } = e, c = Kl(t, a), u = { data: t, isMobile: n, isTablet: r }, l = Un(() => Wl(Pn), []), s = c.steps.map((p) => {
7302
+ const d = p.nodes.map((g) => Pn(g, u, l)).filter((g) => g != null && g !== !1);
7302
7303
  return {
7303
7304
  ...p,
7304
7305
  renderedNodes: d
@@ -7346,7 +7347,7 @@ export {
7346
7347
  Hn as ModalRules,
7347
7348
  oi as RulesForm,
7348
7349
  Es as SendButton,
7349
- Is as Verification,
7350
+ Rs as Verification,
7350
7351
  Da as buildEsConditionSentence,
7351
7352
  qa as convertRangeToString,
7352
7353
  Wn as filterByGroup,