@isettingkit/business-rules 1.0.15 → 1.0.17

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 +224 -185
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,18 +1,22 @@
1
- import { jsx as a, jsxs as h, Fragment as D } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as u, Fragment as D } from "react/jsx-runtime";
2
2
  import { MdOutlineDelete as fe, MdClear as ne, MdAdd as ae, MdOutlineFilterAltOff as ie, MdOutlineFilterAlt as oe } from "react-icons/md";
3
- import { inube as w, Stack as p, Divider as S, Icon as M, Text as y, SkeletonLine as $, useMediaQuery as A, Blanket as re, Button as N, Grid as le, Box as ye, Tag as se, Checkpicker as xe, Toggle as de, Checkbox as we, Date as Q } from "@inubekit/inubekit";
4
- import f, { keyframes as ve } from "styled-components";
3
+ import { inube as w, Stack as p, Divider as S, Icon as M, Text as y, SkeletonLine as F, useMediaQuery as $, Blanket as re, Button as N, Grid as le, Tag as se, Checkpicker as ye, Toggle as de, Checkbox as xe, Date as Q } from "@inubekit/inubekit";
4
+ import f, { keyframes as we } from "styled-components";
5
5
  import { ValueDataType as k, ValueHowToSetUp as O, DecisionConditionRender as Y } from "@isettingkit/input";
6
6
  import { DecisionViewConditionRenderer as U } from "@isettingkit/view";
7
7
  import { createPortal as ce } from "react-dom";
8
- import { useFormik as Ce } from "formik";
8
+ import { useFormik as ve } from "formik";
9
9
  import { string as H, mixed as he, object as V, number as q, lazy as K, date as W } from "yup";
10
- import { useState as z, useEffect as Se } from "react";
11
- import De from "axios";
12
- import { franc as Ee } from "franc-min";
13
- const Ne = f.div`
10
+ import { useState as z, useEffect as Ce } from "react";
11
+ import Se from "axios";
12
+ import { franc as De } from "franc-min";
13
+ const Ee = f.div`
14
14
  border-radius: 8px;
15
- border: 1px solid ${w.palette.neutral.N30};
15
+ border: 1px solid
16
+ ${({ theme: e }) => {
17
+ var t, n;
18
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || w.palette.neutral.N30;
19
+ }};
16
20
  box-sizing: border-box;
17
21
  display: flex;
18
22
  flex-direction: column;
@@ -43,9 +47,9 @@ f.div`
43
47
  `;
44
48
  const P = (e) => {
45
49
  const { children: t, controls: n = !0, handleDelete: i, id: o } = e;
46
- return /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ h(p, { direction: "column", gap: "16px", padding: "12px 16px", children: [
50
+ return /* @__PURE__ */ a(Ee, { children: /* @__PURE__ */ u(p, { direction: "column", gap: "16px", padding: "12px 16px", children: [
47
51
  t,
48
- n && /* @__PURE__ */ h(D, { children: [
52
+ n && /* @__PURE__ */ u(D, { children: [
49
53
  /* @__PURE__ */ a(S, {}),
50
54
  /* @__PURE__ */ a(p, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
51
55
  M,
@@ -88,34 +92,34 @@ const P = (e) => {
88
92
  background-color: #ebecf0;
89
93
  border-radius: 8px;
90
94
  }
91
- `, ke = (e) => e.value, Ae = (e) => e.value, Fe = (e) => e.value, $e = (e) => ({
95
+ `, Ne = (e) => e.value, ke = (e) => e.value, $e = (e) => e.value, Ae = (e) => ({
92
96
  from: e.from ?? "",
93
97
  to: e.to ?? ""
94
- }), Ie = (e) => e.value, Re = (e) => e.value, Me = (e) => e.value;
98
+ }), Fe = (e) => e.value, Ie = (e) => e.value, Re = (e) => e.value;
95
99
  var x = /* @__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))(x || {});
96
- const Le = {
97
- [x.LIST_OF_VALUES]: Ae,
98
- [x.LIST_OF_VALUES_MULTI]: Fe,
99
- [x.RANGE]: $e,
100
- [x.GREATER_THAN]: Ie,
101
- [x.LESS_THAN]: Re,
102
- [x.EQUAL]: Me
100
+ const Me = {
101
+ [x.LIST_OF_VALUES]: ke,
102
+ [x.LIST_OF_VALUES_MULTI]: $e,
103
+ [x.RANGE]: Ae,
104
+ [x.GREATER_THAN]: Fe,
105
+ [x.LESS_THAN]: Ie,
106
+ [x.EQUAL]: Re
103
107
  }, R = (e) => {
104
- const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), i = Le[e == null ? void 0 : e.howToSetTheDecision] || ke;
108
+ const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), i = Me[e == null ? void 0 : e.howToSetTheDecision] || Ne;
105
109
  return n && i(t) || t || void 0;
106
- }, Oe = (e) => {
110
+ }, Le = (e) => {
107
111
  const {
108
112
  conditionsAlignment: t,
109
113
  decision: n,
110
114
  decisionDateElement: i,
111
115
  decisionMapper: o,
112
116
  loading: r,
113
- skeleton: u,
117
+ skeleton: h,
114
118
  terms: l,
115
119
  textValues: s,
116
120
  visibleConditions: g
117
121
  } = e;
118
- return r ? /* @__PURE__ */ h(p, { direction: "column", gap: "12px", children: [
122
+ return r ? /* @__PURE__ */ u(p, { direction: "column", gap: "12px", children: [
119
123
  /* @__PURE__ */ a(p, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
120
124
  U,
121
125
  {
@@ -127,7 +131,7 @@ const Le = {
127
131
  }
128
132
  ) }, n.ruleName),
129
133
  /* @__PURE__ */ a(S, { dashed: !0 }),
130
- /* @__PURE__ */ a(X, { children: /* @__PURE__ */ h(
134
+ /* @__PURE__ */ a(X, { children: /* @__PURE__ */ u(
131
135
  p,
132
136
  {
133
137
  direction: "column",
@@ -155,7 +159,7 @@ const Le = {
155
159
  )
156
160
  }
157
161
  ) }) }, c.conditionName)),
158
- l && /* @__PURE__ */ h(D, { children: [
162
+ l && /* @__PURE__ */ u(D, { children: [
159
163
  /* @__PURE__ */ a(S, { dashed: !0 }),
160
164
  i && /* @__PURE__ */ a(
161
165
  U,
@@ -170,14 +174,14 @@ const Le = {
170
174
  ]
171
175
  }
172
176
  ) })
173
- ] }) : /* @__PURE__ */ h(p, { direction: "column", gap: "12px", children: [
174
- /* @__PURE__ */ h(p, { direction: "column", alignItems: "center", gap: "4px", children: [
175
- /* @__PURE__ */ a($, { animated: !0, width: "180px" }),
176
- /* @__PURE__ */ a($, { animated: !0, width: "85px" })
177
+ ] }) : /* @__PURE__ */ u(p, { direction: "column", gap: "12px", children: [
178
+ /* @__PURE__ */ u(p, { direction: "column", alignItems: "center", gap: "4px", children: [
179
+ /* @__PURE__ */ a(F, { animated: !0, width: "180px" }),
180
+ /* @__PURE__ */ a(F, { animated: !0, width: "85px" })
177
181
  ] }, "loading"),
178
- /* @__PURE__ */ h(p, { direction: "column", gap: "12px", alignItems: "center", children: [
182
+ /* @__PURE__ */ u(p, { direction: "column", gap: "12px", alignItems: "center", children: [
179
183
  /* @__PURE__ */ a(S, { dashed: !0 }),
180
- /* @__PURE__ */ a($, { animated: !0, width: "150px" })
184
+ /* @__PURE__ */ a(F, { animated: !0, width: "150px" })
181
185
  ] }),
182
186
  /* @__PURE__ */ a(X, { children: /* @__PURE__ */ a(
183
187
  p,
@@ -186,7 +190,7 @@ const Le = {
186
190
  gap: "12px",
187
191
  justifyContent: "space-between",
188
192
  height: "203px",
189
- children: u.map((c, d) => /* @__PURE__ */ a(J, { children: /* @__PURE__ */ h(
193
+ children: h.map((c, d) => /* @__PURE__ */ a(J, { children: /* @__PURE__ */ u(
190
194
  p,
191
195
  {
192
196
  direction: "column",
@@ -194,8 +198,8 @@ const Le = {
194
198
  alignItems: "start",
195
199
  padding: "8px",
196
200
  children: [
197
- /* @__PURE__ */ a($, { animated: !0, width: "180px" }),
198
- /* @__PURE__ */ a($, { animated: !0, width: "85px" })
201
+ /* @__PURE__ */ a(F, { animated: !0, width: "180px" }),
202
+ /* @__PURE__ */ a(F, { animated: !0, width: "85px" })
199
203
  ]
200
204
  }
201
205
  ) }, `condition-${d}`))
@@ -204,7 +208,7 @@ const Le = {
204
208
  ] });
205
209
  }, ue = (e) => {
206
210
  var b;
207
- const { decision: t, loading: n = !1, textValues: i } = e, o = !!(t != null && t.effectiveFrom), r = !!(t != null && t.validUntil), u = o && r ? {
211
+ const { decision: t, loading: n = !1, textValues: i } = e, o = !!(t != null && t.effectiveFrom), r = !!(t != null && t.validUntil), h = o && r ? {
208
212
  element: {
209
213
  labelName: i == null ? void 0 : i.terms,
210
214
  value: String(t.effectiveFrom),
@@ -242,11 +246,11 @@ const Le = {
242
246
  (T) => !T.hidden
243
247
  )) || [], g = Array.from({ length: 5 }), c = !!(!n && t && i && l), d = s.length < 2 ? "start" : "space-between";
244
248
  return /* @__PURE__ */ a(
245
- Oe,
249
+ Le,
246
250
  {
247
251
  conditionsAlignment: d,
248
252
  decision: t,
249
- decisionDateElement: u,
253
+ decisionDateElement: h,
250
254
  decisionMapper: l,
251
255
  loading: c,
252
256
  skeleton: g,
@@ -255,12 +259,12 @@ const Le = {
255
259
  visibleConditions: s
256
260
  }
257
261
  );
258
- }, Ve = f.div`
262
+ }, Oe = f.div`
259
263
  position: relative;
260
264
  & > div {
261
265
  padding: 24px 16px;
262
266
  }
263
- `, ze = f.div`
267
+ `, Ve = f.div`
264
268
  background-color: ${({ theme: e }) => {
265
269
  var t, n;
266
270
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || w.palette.neutral.N0;
@@ -291,16 +295,16 @@ const Le = {
291
295
  background-color: #ebecf0;
292
296
  border-radius: 8px;
293
297
  }
294
- `, _e = (e) => {
298
+ `, ze = (e) => {
295
299
  const { children: t, portalId: n, onCloseModal: i, title: o } = e, r = document.getElementById(n);
296
300
  if (!r)
297
301
  throw new Error(
298
302
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
299
303
  );
300
- const u = A("(max-width: 400px)");
304
+ const h = $("(max-width: 400px)");
301
305
  return ce(
302
- /* @__PURE__ */ a(Ve, { smallScreen: u, children: /* @__PURE__ */ a(re, { children: /* @__PURE__ */ a(ze, { children: /* @__PURE__ */ h(p, { direction: "column", gap: "24px", children: [
303
- /* @__PURE__ */ a(p, { direction: "column", gap: "24px", children: /* @__PURE__ */ h(p, { alignItems: "center", justifyContent: "space-between", children: [
306
+ /* @__PURE__ */ a(Oe, { smallScreen: h, children: /* @__PURE__ */ a(re, { children: /* @__PURE__ */ a(Ve, { children: /* @__PURE__ */ u(p, { direction: "column", gap: "24px", children: [
307
+ /* @__PURE__ */ a(p, { direction: "column", gap: "24px", children: /* @__PURE__ */ u(p, { alignItems: "center", justifyContent: "space-between", children: [
304
308
  /* @__PURE__ */ a(y, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
305
309
  /* @__PURE__ */ a(ne, { size: "24px", cursor: "pointer", onClick: i })
306
310
  ] }) }),
@@ -308,7 +312,7 @@ const Le = {
308
312
  ] }) }) }) }),
309
313
  r
310
314
  );
311
- }, Ue = ve`
315
+ }, _e = we`
312
316
  from {
313
317
  opacity: 0;
314
318
  transform: translateY(20px);
@@ -342,7 +346,7 @@ f.div`
342
346
  }};
343
347
  }
344
348
  `;
345
- const je = f.div`
349
+ const Ue = f.div`
346
350
  & > div {
347
351
  background-color: ${({ theme: e }) => {
348
352
  var t, n;
@@ -358,14 +362,14 @@ const je = f.div`
358
362
  width: 100%;
359
363
  height: 100%;
360
364
  & > div {
361
- animation: ${Ue} 600ms ease-out;
365
+ animation: ${_e} 600ms ease-out;
362
366
  }
363
- `, qe = f.div`
367
+ `, je = f.div`
364
368
  & > div > div {
365
369
  border-radius: 8px;
366
370
  box-sizing: border-box;
367
371
  }
368
- `, Be = f.div`
372
+ `, qe = f.div`
369
373
  & > div {
370
374
  width: 100%;
371
375
  height: 100%;
@@ -386,7 +390,7 @@ const je = f.div`
386
390
  }
387
391
  }
388
392
  `;
389
- function He(e) {
393
+ function Be(e) {
390
394
  const { index: t, handleOpenModal: n } = e;
391
395
  return /* @__PURE__ */ a(
392
396
  P,
@@ -401,9 +405,9 @@ function He(e) {
401
405
  `loading-card-${t}`
402
406
  );
403
407
  }
404
- function Pe(e) {
408
+ function He(e) {
405
409
  const { decision: t, controls: n, handleOpenModal: i, handleDelete: o, textValues: r } = e;
406
- return t ? /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ h(p, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
410
+ return t ? /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ u(p, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
407
411
  /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
408
412
  /* @__PURE__ */ a(
409
413
  P,
@@ -417,17 +421,17 @@ function Pe(e) {
417
421
  )
418
422
  ] }) }, t.decisionId) : null;
419
423
  }
420
- function Ge(e) {
424
+ function Pe(e) {
421
425
  const {
422
426
  customTitleContentAddCard: t,
423
427
  index: n,
424
428
  handleOpenModal: i,
425
429
  shouldRenderEmptyMessage: o
426
430
  } = e, r = t || "Agregar decisión";
427
- return /* @__PURE__ */ a(pe, { children: o ? null : /* @__PURE__ */ h(p, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
431
+ return /* @__PURE__ */ a(pe, { children: o ? null : /* @__PURE__ */ u(p, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
428
432
  /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
429
433
  /* @__PURE__ */ a(
430
- je,
434
+ Ue,
431
435
  {
432
436
  onClick: () => i ? i() : null,
433
437
  children: /* @__PURE__ */ a(
@@ -438,7 +442,7 @@ function Ge(e) {
438
442
  },
439
443
  handleView: () => i ? i() : null,
440
444
  controls: !1,
441
- children: /* @__PURE__ */ h(p, { direction: "column", gap: "12px", alignItems: "center", children: [
445
+ children: /* @__PURE__ */ u(p, { direction: "column", gap: "12px", alignItems: "center", children: [
442
446
  /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(ae, {}), size: "35px" }),
443
447
  /* @__PURE__ */ a(y, { appearance: "gray", type: "body", size: "large", children: r })
444
448
  ] })
@@ -448,21 +452,21 @@ function Ge(e) {
448
452
  )
449
453
  ] }) }, `add-decision-${n}`);
450
454
  }
451
- const Qe = {
452
- loading: He,
453
- decision: Pe,
454
- add: Ge
455
+ const Ge = {
456
+ loading: Be,
457
+ decision: He,
458
+ add: Pe
455
459
  }, B = (e) => {
456
- const { type: t } = e, n = Qe[t];
460
+ const { type: t } = e, n = Ge[t];
457
461
  return n ? n(e) : null;
458
- }, Ye = (e) => {
462
+ }, Qe = (e) => {
459
463
  const {
460
464
  controls: t,
461
465
  customTitleContentAddCard: n,
462
466
  decisions: i,
463
467
  loading: o,
464
468
  handleOpenModal: r,
465
- handleDelete: u,
469
+ handleDelete: h,
466
470
  textValues: l
467
471
  } = e, s = o ? Array.from({ length: 3 }).map(
468
472
  (c, d) => B({
@@ -472,7 +476,7 @@ const Qe = {
472
476
  customTitleContentAddCard: n,
473
477
  loading: o,
474
478
  handleOpenModal: r,
475
- handleDelete: u,
479
+ handleDelete: h,
476
480
  textValues: l
477
481
  })
478
482
  ) : i == null ? void 0 : i.map(
@@ -483,7 +487,7 @@ const Qe = {
483
487
  customTitleContentAddCard: n,
484
488
  loading: o,
485
489
  handleOpenModal: r,
486
- handleDelete: u,
490
+ handleDelete: h,
487
491
  textValues: l
488
492
  })
489
493
  ), g = ((i == null ? void 0 : i.length) === 0 || i.length < Math.floor(window.innerWidth / 300)) && !o && t;
@@ -495,7 +499,7 @@ const Qe = {
495
499
  customMessageEmptyDecisions: i,
496
500
  decisions: o,
497
501
  textValues: r,
498
- decisionTemplate: u,
502
+ decisionTemplate: h,
499
503
  isModalOpen: l,
500
504
  selectedDecision: s,
501
505
  loading: g,
@@ -504,7 +508,7 @@ const Qe = {
504
508
  handleSubmitForm: b,
505
509
  handleDelete: T,
506
510
  terms: m = !0
507
- } = e, v = A("(max-width: 681px)"), C = A("(max-width: 400px)"), { renderedCards: F, shouldRenderAddCard: _ } = Ye({
511
+ } = e, v = $("(max-width: 681px)"), C = $("(max-width: 400px)"), { renderedCards: A, shouldRenderAddCard: _ } = Qe({
508
512
  controls: t,
509
513
  customTitleContentAddCard: n,
510
514
  decisions: o,
@@ -513,8 +517,8 @@ const Qe = {
513
517
  handleDelete: T,
514
518
  textValues: r
515
519
  }), L = (o == null ? void 0 : o.length) === 0 && !g;
516
- return /* @__PURE__ */ h(D, { children: [
517
- /* @__PURE__ */ a(qe, { children: /* @__PURE__ */ a(Be, { children: /* @__PURE__ */ a(p, { direction: "column", gap: "16px", padding: "6px", children: L ? /* @__PURE__ */ h(
520
+ return /* @__PURE__ */ u(D, { children: [
521
+ /* @__PURE__ */ a(je, { children: /* @__PURE__ */ a(qe, { children: /* @__PURE__ */ a(p, { direction: "column", gap: "16px", padding: "6px", children: L ? /* @__PURE__ */ u(
518
522
  p,
519
523
  {
520
524
  direction: "column",
@@ -524,9 +528,9 @@ const Qe = {
524
528
  justifyContent: "center",
525
529
  alignItems: "center",
526
530
  children: [
527
- /* @__PURE__ */ a(y, { as: "span", type: "label", size: "large", appearance: "gray", children: i || /* @__PURE__ */ h(D, { children: [
531
+ /* @__PURE__ */ a(y, { as: "span", type: "label", size: "large", appearance: "gray", children: i || /* @__PURE__ */ u(D, { children: [
528
532
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
529
- /* @__PURE__ */ h(
533
+ /* @__PURE__ */ u(
530
534
  y,
531
535
  {
532
536
  as: "span",
@@ -553,7 +557,7 @@ const Qe = {
553
557
  )
554
558
  ]
555
559
  }
556
- ) : /* @__PURE__ */ h(
560
+ ) : /* @__PURE__ */ u(
557
561
  le,
558
562
  {
559
563
  templateColumns: C ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
@@ -566,7 +570,7 @@ const Qe = {
566
570
  padding: "6px",
567
571
  height: v ? "auto" : "484px",
568
572
  children: [
569
- F,
573
+ A,
570
574
  _ && B({
571
575
  type: "add",
572
576
  index: o == null ? void 0 : o.length,
@@ -584,15 +588,15 @@ const Qe = {
584
588
  }
585
589
  ) }) }) }),
586
590
  l && /* @__PURE__ */ a(
587
- _e,
591
+ ze,
588
592
  {
589
593
  portalId: "modal-portal",
590
594
  onCloseModal: d,
591
595
  title: s ? "Editar Decisión" : "Nueva decisión",
592
596
  children: /* @__PURE__ */ a(
593
- dt,
597
+ ct,
594
598
  {
595
- decision: s || u,
599
+ decision: s || h,
596
600
  onSubmitEvent: b,
597
601
  textValues: r,
598
602
  onCancel: () => d ? d() : () => {
@@ -602,7 +606,7 @@ const Qe = {
602
606
  }
603
607
  )
604
608
  ] });
605
- }, Ke = f.div`
609
+ }, Ye = f.div`
606
610
  display: flex;
607
611
  justify-content: ${({ justifyContent: e }) => e};
608
612
  align-items: ${({ alignItems: e }) => e};
@@ -632,7 +636,7 @@ const Qe = {
632
636
  direction: i = "column",
633
637
  justifyContent: o,
634
638
  alignItems: r,
635
- alignContent: u,
639
+ alignContent: h,
636
640
  height: l,
637
641
  width: s,
638
642
  gap: g,
@@ -645,12 +649,12 @@ const Qe = {
645
649
  scroll: C = !1
646
650
  } = e;
647
651
  return /* @__PURE__ */ a(
648
- Ke,
652
+ Ye,
649
653
  {
650
654
  direction: i,
651
655
  justifyContent: o,
652
656
  alignItems: r,
653
- alignContent: u,
657
+ alignContent: h,
654
658
  height: l,
655
659
  width: s,
656
660
  wrap: n,
@@ -665,20 +669,55 @@ const Qe = {
665
669
  children: t
666
670
  }
667
671
  );
668
- }, We = f.div`
669
- & > div {
670
- width: 100%;
672
+ }, Ke = {
673
+ border: {
674
+ color: w.palette.neutral.N40
671
675
  }
672
- `, Ft = (e) => {
676
+ }, We = f.div`
677
+ border-width: 1px;
678
+ border-style: solid;
679
+ border-color: ${({ theme: e }) => {
680
+ var t, n;
681
+ return ((n = (t = e == null ? void 0 : e.box) == null ? void 0 : t.border) == null ? void 0 : n.color) || Ke.border.color;
682
+ }};
683
+ border-radius: ${({ $borderRadius: e }) => e};
684
+ margin: ${({ $margin: e }) => e};
685
+ padding: ${({ $padding: e }) => e};
686
+ width: ${({ $width: e }) => e};
687
+ height: ${({ $height: e }) => e};
688
+ box-sizing: border-box;
689
+ `;
690
+ function Je(e) {
691
+ const {
692
+ children: t,
693
+ padding: n = "16px",
694
+ margin: i,
695
+ borderRadius: o = "8px",
696
+ width: r,
697
+ height: h
698
+ } = e;
699
+ return /* @__PURE__ */ a(
700
+ We,
701
+ {
702
+ $padding: n,
703
+ $margin: i,
704
+ $borderRadius: o,
705
+ $width: r,
706
+ $height: h,
707
+ children: t
708
+ }
709
+ );
710
+ }
711
+ const Ft = (e) => {
673
712
  const {
674
713
  appliedFilters: t,
675
714
  onClear: n,
676
715
  onClick: i,
677
716
  noFiltersLabel: o,
678
717
  titleClearFilter: r,
679
- titleFilter: u
718
+ titleFilter: h
680
719
  } = e, l = !t || t.length === 0;
681
- return /* @__PURE__ */ a(We, { children: /* @__PURE__ */ a(ye, { borderRadius: "8px", width: "100%", children: /* @__PURE__ */ h(le, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
720
+ return /* @__PURE__ */ a(Je, { borderRadius: "8px", width: "100%", children: /* @__PURE__ */ u(le, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
682
721
  /* @__PURE__ */ a(
683
722
  ge,
684
723
  {
@@ -722,11 +761,11 @@ const Qe = {
722
761
  iconBefore: /* @__PURE__ */ a(oe, {}),
723
762
  onClick: i,
724
763
  variant: "outlined",
725
- children: u
764
+ children: h
726
765
  }
727
766
  )
728
- ] }) }) });
729
- }, Je = f.div`
767
+ ] }) });
768
+ }, Xe = f.div`
730
769
  display: flex;
731
770
  flex-direction: column;
732
771
  background-color: ${({ theme: e }) => {
@@ -739,34 +778,34 @@ const Qe = {
739
778
  padding: 24px;
740
779
  gap: 24px;
741
780
  box-sizing: border-box;
742
- `, $t = (e) => {
781
+ `, It = (e) => {
743
782
  const {
744
783
  actionButtonLabel: t,
745
784
  cancelButtonLabel: n,
746
785
  children: i,
747
786
  loading: o,
748
787
  onClick: r,
749
- onCloseModal: u,
788
+ onCloseModal: h,
750
789
  portalId: l,
751
790
  title: s
752
- } = e, g = A("(max-width: 768px)"), c = document.getElementById(l);
791
+ } = e, g = $("(max-width: 768px)"), c = document.getElementById(l);
753
792
  if (!c)
754
793
  throw new Error(
755
794
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
756
795
  );
757
796
  return ce(
758
- /* @__PURE__ */ a(re, { children: /* @__PURE__ */ h(Je, { $smallScreen: g, children: [
759
- /* @__PURE__ */ h(p, { direction: "column", gap: "16px", children: [
760
- /* @__PURE__ */ h(p, { alignContent: "center", justifyContent: "space-between", children: [
797
+ /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u(Xe, { $smallScreen: g, children: [
798
+ /* @__PURE__ */ u(p, { direction: "column", gap: "16px", children: [
799
+ /* @__PURE__ */ u(p, { alignContent: "center", justifyContent: "space-between", children: [
761
800
  /* @__PURE__ */ a(y, { appearance: "dark", size: "small", type: "headline", children: s }),
762
- /* @__PURE__ */ h(p, { alignItems: "center", children: [
801
+ /* @__PURE__ */ u(p, { alignItems: "center", children: [
763
802
  /* @__PURE__ */ a(y, { children: "Cerrar" }),
764
803
  /* @__PURE__ */ a(
765
804
  M,
766
805
  {
767
806
  appearance: "dark",
768
807
  icon: /* @__PURE__ */ a(ne, {}),
769
- onClick: u,
808
+ onClick: h,
770
809
  cursorHover: !0
771
810
  }
772
811
  )
@@ -775,12 +814,12 @@ const Qe = {
775
814
  /* @__PURE__ */ a(S, {})
776
815
  ] }),
777
816
  i,
778
- /* @__PURE__ */ h(p, { gap: "20px", justifyContent: "flex-end", children: [
817
+ /* @__PURE__ */ u(p, { gap: "20px", justifyContent: "flex-end", children: [
779
818
  /* @__PURE__ */ a(
780
819
  N,
781
820
  {
782
821
  appearance: "gray",
783
- onClick: u,
822
+ onClick: h,
784
823
  iconBefore: /* @__PURE__ */ a(ie, {}),
785
824
  spacing: "wide",
786
825
  variant: "outlined",
@@ -802,11 +841,11 @@ const Qe = {
802
841
  ] }) }),
803
842
  c
804
843
  );
805
- }, It = (e) => {
806
- const { appliedFilters: t, fields: n, onChange: i, noFiltersLabel: o } = e, r = A("(max-width: 768px)"), u = !t || t.length === 0;
807
- return /* @__PURE__ */ h(p, { direction: "column", gap: "16px", children: [
808
- r && /* @__PURE__ */ h(D, { children: [
809
- /* @__PURE__ */ h(p, { gap: "6px", width: "100%", alignItems: "center", children: [
844
+ }, Rt = (e) => {
845
+ const { appliedFilters: t, fields: n, onChange: i, noFiltersLabel: o } = e, r = $("(max-width: 768px)"), h = !t || t.length === 0;
846
+ return /* @__PURE__ */ u(p, { direction: "column", gap: "16px", children: [
847
+ r && /* @__PURE__ */ u(D, { children: [
848
+ /* @__PURE__ */ u(p, { gap: "6px", width: "100%", alignItems: "center", children: [
810
849
  /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(oe, {}) }),
811
850
  /* @__PURE__ */ a(
812
851
  ge,
@@ -820,7 +859,7 @@ const Qe = {
820
859
  border: !0,
821
860
  width: "100%",
822
861
  height: "32px",
823
- children: u ? /* @__PURE__ */ a(y, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((l) => /* @__PURE__ */ a(
862
+ children: h ? /* @__PURE__ */ a(y, { size: "small", type: "label", appearance: "gray", children: o }) : t == null ? void 0 : t.map((l) => /* @__PURE__ */ a(
824
863
  se,
825
864
  {
826
865
  appearance: "primary",
@@ -837,10 +876,10 @@ const Qe = {
837
876
  ] }),
838
877
  /* @__PURE__ */ a(S, { dashed: !0 })
839
878
  ] }),
840
- n.map((l) => /* @__PURE__ */ h(p, { gap: "6px", alignItems: "center", children: [
879
+ n.map((l) => /* @__PURE__ */ u(p, { gap: "6px", alignItems: "center", children: [
841
880
  /* @__PURE__ */ a(p, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(M, { appearance: "primary", icon: l.icon }) }),
842
881
  /* @__PURE__ */ a(
843
- xe,
882
+ ye,
844
883
  {
845
884
  disabled: l.disabled,
846
885
  invalid: l.invalid,
@@ -858,7 +897,7 @@ const Qe = {
858
897
  )
859
898
  ] }, l.name))
860
899
  ] });
861
- }, Rt = (e) => {
900
+ }, Mt = (e) => {
862
901
  console.log(e);
863
902
  const { dataDecision: t, originalDecision: n } = e, i = {
864
903
  conditionName: t.ruleName || "",
@@ -875,7 +914,7 @@ const Qe = {
875
914
  (o) => o.hidden ? { ...i } : o
876
915
  )
877
916
  };
878
- }, Mt = (e) => {
917
+ }, Lt = (e) => {
879
918
  const { decisions: t } = e;
880
919
  return t == null ? void 0 : t.map((n) => {
881
920
  var o;
@@ -894,14 +933,14 @@ const Qe = {
894
933
  )
895
934
  } : n;
896
935
  });
897
- }, Xe = (e) => ({
936
+ }, Ze = (e) => ({
898
937
  schema: H().required("Required").test(
899
938
  "non-empty",
900
939
  "Value cannot be empty",
901
940
  (t) => t != null && t.trim() !== ""
902
941
  ),
903
942
  value: e
904
- }), Ze = (e) => ({
943
+ }), et = (e) => ({
905
944
  schema: he().test(
906
945
  "isArrayOrString",
907
946
  "Must be an array of strings/numbers or a single string",
@@ -910,7 +949,7 @@ const Qe = {
910
949
  ) : typeof t == "string"
911
950
  ),
912
951
  value: e
913
- }), et = (e) => ({
952
+ }), tt = (e) => ({
914
953
  schema: he().test(
915
954
  "isArrayOrString",
916
955
  "Must be an array of strings/numbers or a single string",
@@ -919,7 +958,7 @@ const Qe = {
919
958
  ) : typeof t == "string"
920
959
  ),
921
960
  value: e
922
- }), tt = (e) => {
961
+ }), nt = (e) => {
923
962
  const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
924
963
  return {
925
964
  schema: V({
@@ -941,15 +980,15 @@ const Qe = {
941
980
  } : {
942
981
  schema: H().required("Required"),
943
982
  value: e
944
- }, nt = {
945
- [x.LIST_OF_VALUES]: Ze,
946
- [x.LIST_OF_VALUES_MULTI]: et,
947
- [x.RANGE]: tt,
983
+ }, at = {
984
+ [x.LIST_OF_VALUES]: et,
985
+ [x.LIST_OF_VALUES_MULTI]: tt,
986
+ [x.RANGE]: nt,
948
987
  [x.GREATER_THAN]: j,
949
988
  [x.LESS_THAN]: j,
950
989
  [x.EQUAL]: j
951
- }, Z = (e) => nt[e] || Xe;
952
- function at({
990
+ }, Z = (e) => at[e] || Ze;
991
+ function it({
953
992
  decision: e,
954
993
  onSubmitEvent: t,
955
994
  textValues: n
@@ -1015,10 +1054,10 @@ function at({
1015
1054
  }
1016
1055
  ) : g.notRequired()
1017
1056
  ));
1018
- const u = V(r);
1019
- return o = Ce({
1057
+ const h = V(r);
1058
+ return o = ve({
1020
1059
  initialValues: i,
1021
- validationSchema: u,
1060
+ validationSchema: h,
1022
1061
  validateOnBlur: !0,
1023
1062
  onSubmit: (s) => {
1024
1063
  var c;
@@ -1058,7 +1097,7 @@ function at({
1058
1097
  });
1059
1098
  } };
1060
1099
  }
1061
- const it = f.div`
1100
+ const ot = f.div`
1062
1101
  & > div {
1063
1102
  border-radius: 8px;
1064
1103
  border: 1px solid
@@ -1067,7 +1106,7 @@ const it = f.div`
1067
1106
  return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || w.palette.neutral.N30;
1068
1107
  }};
1069
1108
  }
1070
- `, ot = f.div`
1109
+ `, rt = f.div`
1071
1110
  width: 100%;
1072
1111
  height: 100%;
1073
1112
  overflow-y: auto;
@@ -1084,27 +1123,27 @@ const it = f.div`
1084
1123
  background-color: #ebecf0;
1085
1124
  border-radius: 8px;
1086
1125
  }
1087
- `, rt = (e) => {
1126
+ `, lt = (e) => {
1088
1127
  const {
1089
1128
  checked: t,
1090
1129
  children: n,
1091
1130
  handleToggleChange: i,
1092
1131
  id: o,
1093
1132
  labelToggle: r,
1094
- name: u,
1133
+ name: h,
1095
1134
  valueToggle: l = ""
1096
1135
  } = e, [s, g] = z(t), c = (d) => {
1097
1136
  g(d.target.checked), i(d);
1098
1137
  };
1099
- return Se(() => {
1138
+ return Ce(() => {
1100
1139
  g(t);
1101
- }, [t]), /* @__PURE__ */ h(D, { children: [
1140
+ }, [t]), /* @__PURE__ */ u(D, { children: [
1102
1141
  /* @__PURE__ */ a(p, { children: /* @__PURE__ */ a(
1103
1142
  de,
1104
1143
  {
1105
1144
  checked: s,
1106
1145
  id: o,
1107
- name: u,
1146
+ name: h,
1108
1147
  onChange: c,
1109
1148
  size: "small",
1110
1149
  value: l,
@@ -1113,14 +1152,14 @@ const it = f.div`
1113
1152
  ) }),
1114
1153
  s && /* @__PURE__ */ a(D, { children: n })
1115
1154
  ] });
1116
- }, lt = (e) => {
1155
+ }, st = (e) => {
1117
1156
  const {
1118
1157
  onHandleStartChange: t,
1119
1158
  onHandleEndChange: n,
1120
1159
  onCheckClosedChange: i,
1121
1160
  labelStart: o,
1122
1161
  labelEnd: r,
1123
- checkedClosed: u = !1,
1162
+ checkedClosed: h = !1,
1124
1163
  required: l = !1,
1125
1164
  valueStart: s = "",
1126
1165
  valueEnd: g = "",
@@ -1128,15 +1167,15 @@ const it = f.div`
1128
1167
  messageEnd: d = "",
1129
1168
  statusStart: b = "pending",
1130
1169
  statusEnd: T = "pending"
1131
- } = e, [m, v] = z(u), [C, F] = z(s), [_, L] = z(g), G = ({ target: E }) => {
1170
+ } = e, [m, v] = z(h), [C, A] = z(s), [_, L] = z(g), G = ({ target: E }) => {
1132
1171
  v(E.checked), i && i(E.checked);
1133
1172
  }, me = (E) => {
1134
- F(E.target.value), t(E);
1173
+ A(E.target.value), t(E);
1135
1174
  }, be = (E) => {
1136
1175
  L(E.target.value), n(E);
1137
- }, Te = A("(max-width: 400px)");
1138
- return /* @__PURE__ */ h(D, { children: [
1139
- /* @__PURE__ */ h(p, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1176
+ }, Te = $("(max-width: 400px)");
1177
+ return /* @__PURE__ */ u(D, { children: [
1178
+ /* @__PURE__ */ u(p, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1140
1179
  /* @__PURE__ */ a(
1141
1180
  y,
1142
1181
  {
@@ -1156,7 +1195,7 @@ const it = f.div`
1156
1195
  wrap: "wrap",
1157
1196
  gap: "4px",
1158
1197
  children: /* @__PURE__ */ a(
1159
- we,
1198
+ xe,
1160
1199
  {
1161
1200
  label: "Cerrada",
1162
1201
  onChange: G,
@@ -1167,7 +1206,7 @@ const it = f.div`
1167
1206
  }
1168
1207
  )
1169
1208
  ] }),
1170
- /* @__PURE__ */ h(
1209
+ /* @__PURE__ */ u(
1171
1210
  p,
1172
1211
  {
1173
1212
  direction: Te ? "column" : "row",
@@ -1204,27 +1243,27 @@ const it = f.div`
1204
1243
  }
1205
1244
  )
1206
1245
  ] });
1207
- }, st = (e) => {
1246
+ }, dt = (e) => {
1208
1247
  const {
1209
1248
  formik: t,
1210
1249
  textValues: n,
1211
1250
  onCancel: i,
1212
1251
  visibleConditions: o,
1213
1252
  normalizedDecision: r,
1214
- handleToggleNoneChange: u,
1253
+ handleToggleNoneChange: h,
1215
1254
  handleConditionToggleChange: l,
1216
1255
  showConditionsError: s,
1217
1256
  termStartStatus: g,
1218
1257
  termEndStatus: c
1219
1258
  } = e;
1220
- return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ h(p, { direction: "column", gap: "24px", children: [
1259
+ return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ u(p, { direction: "column", gap: "24px", children: [
1221
1260
  Y({
1222
1261
  condition: r,
1223
1262
  formik: t,
1224
1263
  isDecision: !0
1225
1264
  }),
1226
1265
  /* @__PURE__ */ a(S, { dashed: !0 }),
1227
- /* @__PURE__ */ a(it, { children: /* @__PURE__ */ a(ot, { children: /* @__PURE__ */ h(
1266
+ /* @__PURE__ */ a(ot, { children: /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ u(
1228
1267
  p,
1229
1268
  {
1230
1269
  direction: "column",
@@ -1232,7 +1271,7 @@ const it = f.div`
1232
1271
  gap: "16px",
1233
1272
  height: "272px",
1234
1273
  children: [
1235
- /* @__PURE__ */ h(
1274
+ /* @__PURE__ */ u(
1236
1275
  p,
1237
1276
  {
1238
1277
  justifyContent: "space-between",
@@ -1244,7 +1283,7 @@ const it = f.div`
1244
1283
  de,
1245
1284
  {
1246
1285
  id: "toggleNone",
1247
- onChange: () => u(!t.values.toggleNone),
1286
+ onChange: () => h(!t.values.toggleNone),
1248
1287
  checked: t.values.toggleNone,
1249
1288
  size: "small",
1250
1289
  children: /* @__PURE__ */ a(y, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
@@ -1254,7 +1293,7 @@ const it = f.div`
1254
1293
  }
1255
1294
  ),
1256
1295
  /* @__PURE__ */ a(p, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((d) => /* @__PURE__ */ a(
1257
- rt,
1296
+ lt,
1258
1297
  {
1259
1298
  id: `toggle-${d.conditionName}`,
1260
1299
  name: `toggle.${d.conditionName}`,
@@ -1271,10 +1310,10 @@ const it = f.div`
1271
1310
  ]
1272
1311
  }
1273
1312
  ) }) }),
1274
- n.terms && /* @__PURE__ */ h(D, { children: [
1313
+ n.terms && /* @__PURE__ */ u(D, { children: [
1275
1314
  /* @__PURE__ */ a(S, { dashed: !0 }),
1276
1315
  /* @__PURE__ */ a(
1277
- lt,
1316
+ st,
1278
1317
  {
1279
1318
  labelStart: n.termStart,
1280
1319
  labelEnd: n.termEnd,
@@ -1295,14 +1334,14 @@ const it = f.div`
1295
1334
  ] }),
1296
1335
  /* @__PURE__ */ a(S, {}),
1297
1336
  s && /* @__PURE__ */ a(y, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
1298
- /* @__PURE__ */ h(p, { direction: "row", justifyContent: "end", gap: "16px", children: [
1337
+ /* @__PURE__ */ u(p, { direction: "row", justifyContent: "end", gap: "16px", children: [
1299
1338
  /* @__PURE__ */ a(N, { appearance: "gray", onClick: i, children: n.cancel }),
1300
1339
  /* @__PURE__ */ a(N, { type: "submit", children: n.confirm })
1301
1340
  ] })
1302
1341
  ] }) });
1303
- }, dt = (e) => {
1342
+ }, ct = (e) => {
1304
1343
  var T;
1305
- const { decision: t, onSubmitEvent: n, textValues: i, onCancel: o } = e, { formik: r, handleToggleNoneChange: u } = at({
1344
+ const { decision: t, onSubmitEvent: n, textValues: i, onCancel: o } = e, { formik: r, handleToggleNoneChange: h } = it({
1306
1345
  decision: t,
1307
1346
  onSubmitEvent: n,
1308
1347
  textValues: i
@@ -1316,7 +1355,7 @@ const it = f.div`
1316
1355
  (m) => !m.hidden
1317
1356
  )) || [], g = !!r.errors.conditionsThatEstablishesTheDecision && r.submitCount > 0, c = r.touched.effectiveFrom ? r.errors.effectiveFrom ? "invalid" : "valid" : void 0, d = r.touched.validUntil ? r.errors.validUntil ? "invalid" : "valid" : void 0;
1318
1357
  return /* @__PURE__ */ a(
1319
- st,
1358
+ dt,
1320
1359
  {
1321
1360
  formik: r,
1322
1361
  onCancel: o,
@@ -1324,7 +1363,7 @@ const it = f.div`
1324
1363
  decision: t,
1325
1364
  visibleConditions: s,
1326
1365
  normalizedDecision: l,
1327
- handleToggleNoneChange: u,
1366
+ handleToggleNoneChange: h,
1328
1367
  handleConditionToggleChange: (m, v) => (C) => {
1329
1368
  if (!C)
1330
1369
  r.setFieldValue(
@@ -1336,10 +1375,10 @@ const it = f.div`
1336
1375
  !1
1337
1376
  );
1338
1377
  else {
1339
- const F = v ? [] : "";
1378
+ const A = v ? [] : "";
1340
1379
  r.setFieldValue(
1341
1380
  `conditionsThatEstablishesTheDecision.${m}`,
1342
- F
1381
+ A
1343
1382
  );
1344
1383
  }
1345
1384
  },
@@ -1348,7 +1387,7 @@ const it = f.div`
1348
1387
  termEndStatus: d
1349
1388
  }
1350
1389
  );
1351
- }, Lt = (e) => {
1390
+ }, Ot = (e) => {
1352
1391
  var o;
1353
1392
  const { decisionTemplate: t } = e, n = { ...t }, i = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1354
1393
  (r) => r.switchPlaces
@@ -1364,7 +1403,7 @@ const it = f.div`
1364
1403
  (r) => r.conditionName === i.conditionName ? { ...r, hidden: !0 } : r
1365
1404
  )
1366
1405
  } : n;
1367
- }, Ot = (e) => {
1406
+ }, Vt = (e) => {
1368
1407
  const { decisions: t } = e;
1369
1408
  return t == null ? void 0 : t.map((n) => {
1370
1409
  var o;
@@ -1383,17 +1422,17 @@ const it = f.div`
1383
1422
  )
1384
1423
  } : n;
1385
1424
  });
1386
- }, I = /* @__PURE__ */ new Map(), ct = (e, t) => I.get(`${t}:${e}`), ht = (e, t, n) => {
1425
+ }, I = /* @__PURE__ */ new Map(), ht = (e, t) => I.get(`${t}:${e}`), ut = (e, t, n) => {
1387
1426
  const i = `${t}:${e}`;
1388
1427
  if (I.set(i, n), I.size > 1e3) {
1389
1428
  const o = I.keys().next().value;
1390
1429
  o !== void 0 && I.delete(o);
1391
1430
  }
1392
- }, ee = /* @__PURE__ */ new Map(), ut = 1e3, pt = (e) => {
1431
+ }, ee = /* @__PURE__ */ new Map(), pt = 1e3, gt = (e) => {
1393
1432
  const t = Date.now(), n = ee.get(e) || 0;
1394
- return t - n < ut ? !0 : (ee.set(e, t), !1);
1395
- }, gt = (e) => {
1396
- const t = Ee(e);
1433
+ return t - n < pt ? !0 : (ee.set(e, t), !1);
1434
+ }, mt = (e) => {
1435
+ const t = De(e);
1397
1436
  return {
1398
1437
  spa: "es",
1399
1438
  eng: "en",
@@ -1402,18 +1441,18 @@ const it = f.div`
1402
1441
  ita: "it",
1403
1442
  por: "pt"
1404
1443
  }[t] || "en";
1405
- }, mt = async (e, t, { url: n, apiKey: i }) => {
1406
- const o = `${t}:${e}`, r = ct(e, t);
1444
+ }, bt = async (e, t, { url: n, apiKey: i }) => {
1445
+ const o = `${t}:${e}`, r = ht(e, t);
1407
1446
  if (r) return r;
1408
- if (pt(o))
1447
+ if (gt(o))
1409
1448
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
1410
- const u = gt(e);
1449
+ const h = mt(e);
1411
1450
  try {
1412
- const { data: l } = await De.post(
1451
+ const { data: l } = await Se.post(
1413
1452
  n,
1414
1453
  {
1415
1454
  q: e,
1416
- source: u,
1455
+ source: h,
1417
1456
  target: t,
1418
1457
  api_key: i
1419
1458
  },
@@ -1423,26 +1462,26 @@ const it = f.div`
1423
1462
  }
1424
1463
  }
1425
1464
  ), s = (l == null ? void 0 : l.translatedText) || e;
1426
- return ht(e, t, s), s;
1465
+ return ut(e, t, s), s;
1427
1466
  } catch (l) {
1428
1467
  return console.warn(`[Translation] Failed for: "${e}"`, l), e;
1429
1468
  }
1430
- }, bt = (e) => typeof e == "string" && e.trim().length > 0, te = async (e, t, n) => {
1469
+ }, Tt = (e) => typeof e == "string" && e.trim().length > 0, te = async (e, t, n) => {
1431
1470
  const i = await Promise.all(
1432
1471
  Object.entries(e).map(async ([o, r]) => {
1433
- if (bt(r)) {
1434
- const u = await mt(r, t, n);
1435
- return [o, u];
1472
+ if (Tt(r)) {
1473
+ const h = await bt(r, t, n);
1474
+ return [o, h];
1436
1475
  } else if (Array.isArray(r)) {
1437
- const u = await Promise.all(
1476
+ const h = await Promise.all(
1438
1477
  r.map(
1439
1478
  async (l) => typeof l == "object" && l !== null ? await te(l, t, n) : l
1440
1479
  )
1441
1480
  );
1442
- return [o, u];
1481
+ return [o, h];
1443
1482
  } else if (typeof r == "object" && r !== null) {
1444
- const u = await te(r, t, n);
1445
- return [o, u];
1483
+ const h = await te(r, t, n);
1484
+ return [o, h];
1446
1485
  } else
1447
1486
  return [o, r];
1448
1487
  })
@@ -1454,14 +1493,14 @@ export {
1454
1493
  ue as BusinessRuleView,
1455
1494
  At as BusinessRules,
1456
1495
  Ft as Filter,
1457
- $t as FilterModal,
1458
- It as FormFilter,
1459
- _e as ModalRules,
1460
- dt as RulesForm,
1461
- Rt as revertSortedDataSampleSwitchPlaces,
1462
- Mt as revertSortedDataSwitchPlaces,
1463
- Lt as sortDisplayDataSampleSwitchPlaces,
1464
- Ot as sortDisplayDataSwitchPlaces,
1496
+ It as FilterModal,
1497
+ Rt as FormFilter,
1498
+ ze as ModalRules,
1499
+ ct as RulesForm,
1500
+ Mt as revertSortedDataSampleSwitchPlaces,
1501
+ Lt as revertSortedDataSwitchPlaces,
1502
+ Ot as sortDisplayDataSampleSwitchPlaces,
1503
+ Vt as sortDisplayDataSwitchPlaces,
1465
1504
  te as translateObject,
1466
- mt as translateText
1505
+ bt as translateText
1467
1506
  };
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "description": "",
12
12
  "private": false,
13
- "version": "1.0.15",
13
+ "version": "1.0.17",
14
14
  "type": "module",
15
15
  "exports": {
16
16
  ".": {