@isettingkit/business-rules 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,16 +1,16 @@
1
- import { jsx as a, jsxs as u, Fragment as E } from "react/jsx-runtime";
2
- import { MdOutlineDelete as he, MdClear as Z, MdAdd as ee, MdOutlineFilterAltOff as ue, MdOutlineFilterAlt as pe } from "react-icons/md";
3
- import { inube as v, Stack as h, Divider as D, Icon as O, Text as y, SkeletonLine as A, useMediaQuery as I, Blanket as te, Button as N, Grid as ne, Box as ge, Tag as me, Checkpicker as be, Toggle as ie, Checkbox as Te, Date as G } from "@inubekit/inubekit";
4
- import f, { keyframes as fe } from "styled-components";
5
- import { ValueDataType as k, ValueHowToSetUp as L, DecisionConditionRender as Q } from "@isettingkit/input";
6
- import { DecisionViewConditionRenderer as _ } from "@isettingkit/view";
7
- import { createPortal as ae } from "react-dom";
8
- import { useFormik as xe } from "formik";
9
- import { string as B, mixed as oe, object as M, number as q, lazy as Y, date as W } from "yup";
10
- import { useState as V, useEffect as ye } from "react";
11
- const ve = f.div`
1
+ import { jsx as h, jsxs as E, Fragment as q } from "react/jsx-runtime";
2
+ import { MdOutlineDelete as $t, MdClear as st, MdAdd as at, MdOutlineFilterAltOff as qt, MdOutlineFilterAlt as Mt } from "react-icons/md";
3
+ import { inube as U, Stack as T, Divider as $, Icon as ue, Text as k, SkeletonLine as G, useMediaQuery as Y, Blanket as lt, Button as z, Grid as ct, Box as Ht, Tag as zt, Checkpicker as Vt, Toggle as dt, Checkbox as Jt, Date as je } from "@inubekit/inubekit";
4
+ import D, { keyframes as Wt } from "styled-components";
5
+ import { ValueDataType as J, ValueHowToSetUp as re, DecisionConditionRender as Ie } from "@isettingkit/input";
6
+ import { DecisionViewConditionRenderer as we } from "@isettingkit/view";
7
+ import { createPortal as ut } from "react-dom";
8
+ import { useFormik as Kt } from "formik";
9
+ import { string as Fe, mixed as ft, object as oe, number as Ce, lazy as $e, date as qe } from "yup";
10
+ import { useState as ie, useEffect as Gt } from "react";
11
+ const Xt = D.div`
12
12
  border-radius: 8px;
13
- border: 1px solid ${v.palette.neutral.N30};
13
+ border: 1px solid ${U.palette.neutral.N30};
14
14
  box-sizing: border-box;
15
15
  display: flex;
16
16
  flex-direction: column;
@@ -20,7 +20,7 @@ const ve = f.div`
20
20
  height: 100%;
21
21
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
22
22
  `;
23
- f.div`
23
+ D.div`
24
24
  width: 100%;
25
25
  height: 100%;
26
26
  overflow-y: auto;
@@ -39,36 +39,36 @@ f.div`
39
39
  border-radius: 8px;
40
40
  }
41
41
  `;
42
- const H = (t) => {
43
- const { children: e, controls: n = !0, handleDelete: i, id: o } = t;
44
- return /* @__PURE__ */ a(ve, { children: /* @__PURE__ */ u(h, { direction: "column", gap: "16px", padding: "12px 16px", children: [
45
- e,
46
- n && /* @__PURE__ */ u(E, { children: [
47
- /* @__PURE__ */ a(D, {}),
48
- /* @__PURE__ */ a(h, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
49
- O,
42
+ const _e = (e) => {
43
+ const { children: t, controls: n = !0, handleDelete: r, id: o } = e;
44
+ return /* @__PURE__ */ h(Xt, { children: /* @__PURE__ */ E(T, { direction: "column", gap: "16px", padding: "12px 16px", children: [
45
+ t,
46
+ n && /* @__PURE__ */ E(q, { children: [
47
+ /* @__PURE__ */ h($, {}),
48
+ /* @__PURE__ */ h(T, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ h(
49
+ ue,
50
50
  {
51
51
  cursorHover: !0,
52
52
  appearance: "danger",
53
53
  size: "24px",
54
- icon: /* @__PURE__ */ a(he, {}),
54
+ icon: /* @__PURE__ */ h($t, {}),
55
55
  onClick: () => {
56
- i(o);
56
+ r(o);
57
57
  }
58
58
  }
59
59
  ) })
60
60
  ] })
61
61
  ] }) });
62
- }, J = f.div`
62
+ }, Me = D.div`
63
63
  & > div {
64
64
  border-radius: 8px;
65
65
  border: 1px solid
66
- ${({ theme: t }) => {
67
- var e, n;
68
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N30) || v.palette.neutral.N30;
66
+ ${({ theme: e }) => {
67
+ var t, n;
68
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || U.palette.neutral.N30;
69
69
  }};
70
70
  }
71
- `, K = f.div`
71
+ `, He = D.div`
72
72
  width: 100%;
73
73
  height: 100%;
74
74
  overflow-y: auto;
@@ -86,184 +86,186 @@ const H = (t) => {
86
86
  background-color: #ebecf0;
87
87
  border-radius: 8px;
88
88
  }
89
- `, Ce = (t) => t.value, we = (t) => t.value, Se = (t) => t.value, De = (t) => ({
90
- from: t.from ?? "",
91
- to: t.to ?? ""
92
- }), Ee = (t) => t.value, Ne = (t) => t.value, ke = (t) => t.value;
93
- var x = /* @__PURE__ */ ((t) => (t.EQUAL = "EqualTo", t.GREATER_THAN = "GreaterThan", t.LESS_THAN = "LessThan", t.LIST_OF_VALUES = "ListOfValues", t.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", t.RANGE = "Range", t))(x || {});
94
- const Fe = {
95
- [x.LIST_OF_VALUES]: we,
96
- [x.LIST_OF_VALUES_MULTI]: Se,
97
- [x.RANGE]: De,
98
- [x.GREATER_THAN]: Ee,
99
- [x.LESS_THAN]: Ne,
100
- [x.EQUAL]: ke
101
- }, $ = (t) => {
102
- const e = t == null ? void 0 : t.value, n = typeof e == "object" && e !== null && !Array.isArray(e), i = Fe[t == null ? void 0 : t.howToSetTheDecision] || Ce;
103
- return n && i(e) || e || void 0;
104
- }, Ae = (t) => {
89
+ `, Qt = (e) => e.value, Zt = (e) => e.value, Yt = (e) => e.value, en = (e) => ({
90
+ from: e.from ?? "",
91
+ to: e.to ?? ""
92
+ }), tn = (e) => e.value, nn = (e) => e.value, rn = (e) => e.value;
93
+ 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 || {});
94
+ const on = {
95
+ [O.LIST_OF_VALUES]: Zt,
96
+ [O.LIST_OF_VALUES_MULTI]: Yt,
97
+ [O.RANGE]: en,
98
+ [O.GREATER_THAN]: tn,
99
+ [O.LESS_THAN]: nn,
100
+ [O.EQUAL]: rn
101
+ }, Z = (e) => {
102
+ const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = on[e == null ? void 0 : e.howToSetTheDecision] || Qt;
103
+ return n && r(t) || t || void 0;
104
+ }, sn = (e) => {
105
105
  const {
106
- loading: e,
107
- textValues: n,
108
- decision: i,
106
+ conditionsAlignment: t,
107
+ decision: n,
108
+ decisionDateElement: r,
109
109
  decisionMapper: o,
110
- visibleConditions: r,
111
- decisionDateElement: p,
112
- skeleton: g,
113
- terms: s
114
- } = t;
115
- return e ? /* @__PURE__ */ u(h, { direction: "column", gap: "12px", children: [
116
- /* @__PURE__ */ a(h, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
117
- _,
110
+ loading: i,
111
+ skeleton: s,
112
+ terms: l,
113
+ textValues: u,
114
+ visibleConditions: d
115
+ } = e;
116
+ return i ? /* @__PURE__ */ E(T, { direction: "column", gap: "12px", children: [
117
+ /* @__PURE__ */ h(T, { direction: "column", alignItems: "center", children: /* @__PURE__ */ h(
118
+ we,
118
119
  {
119
120
  element: o,
120
- valueData: $(
121
+ valueData: Z(
121
122
  o
122
123
  ),
123
124
  type: "decision"
124
125
  }
125
- ) }, i.ruleName),
126
- /* @__PURE__ */ a(D, { dashed: !0 }),
127
- /* @__PURE__ */ a(K, { children: /* @__PURE__ */ u(
128
- h,
126
+ ) }, n.ruleName),
127
+ /* @__PURE__ */ h($, { dashed: !0 }),
128
+ /* @__PURE__ */ h(He, { children: /* @__PURE__ */ E(
129
+ T,
129
130
  {
130
131
  direction: "column",
131
132
  gap: "12px",
132
- justifyContent: "space-between",
133
+ justifyContent: t,
133
134
  height: "203px",
134
135
  children: [
135
- /* @__PURE__ */ a(
136
- y,
136
+ /* @__PURE__ */ h(
137
+ k,
137
138
  {
138
139
  type: "label",
139
140
  size: "large",
140
141
  appearance: "dark",
141
142
  weight: "bold",
142
143
  textAlign: "center",
143
- children: n.factsThatConditionIt
144
+ children: u.factsThatConditionIt
144
145
  }
145
146
  ),
146
- r.map((d) => /* @__PURE__ */ a(J, { children: /* @__PURE__ */ a(h, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
147
- _,
147
+ d.map((c) => /* @__PURE__ */ h(Me, { children: /* @__PURE__ */ h(T, { direction: "column", padding: "8px", children: /* @__PURE__ */ h(
148
+ we,
148
149
  {
149
- element: { ...d, value: d.value },
150
- valueData: $(
151
- d
150
+ element: { ...c, value: c.value },
151
+ valueData: Z(
152
+ c
152
153
  )
153
154
  }
154
- ) }) }, d.conditionName)),
155
- s && /* @__PURE__ */ u(E, { children: [
156
- /* @__PURE__ */ a(D, { dashed: !0 }),
157
- p && /* @__PURE__ */ a(
158
- _,
155
+ ) }) }, c.conditionName)),
156
+ l && /* @__PURE__ */ E(q, { children: [
157
+ /* @__PURE__ */ h($, { dashed: !0 }),
158
+ r && /* @__PURE__ */ h(
159
+ we,
159
160
  {
160
- element: p.element,
161
- valueData: p.valueData,
161
+ element: r.element,
162
+ valueData: r.valueData,
162
163
  type: "decision"
163
164
  },
164
- n.terms
165
+ u.terms
165
166
  )
166
167
  ] })
167
168
  ]
168
169
  }
169
170
  ) })
170
- ] }) : /* @__PURE__ */ u(h, { direction: "column", gap: "12px", children: [
171
- /* @__PURE__ */ u(h, { direction: "column", alignItems: "center", gap: "4px", children: [
172
- /* @__PURE__ */ a(A, { animated: !0, width: "180px" }),
173
- /* @__PURE__ */ a(A, { animated: !0, width: "85px" })
171
+ ] }) : /* @__PURE__ */ E(T, { direction: "column", gap: "12px", children: [
172
+ /* @__PURE__ */ E(T, { direction: "column", alignItems: "center", gap: "4px", children: [
173
+ /* @__PURE__ */ h(G, { animated: !0, width: "180px" }),
174
+ /* @__PURE__ */ h(G, { animated: !0, width: "85px" })
174
175
  ] }, "loading"),
175
- /* @__PURE__ */ u(h, { direction: "column", gap: "12px", alignItems: "center", children: [
176
- /* @__PURE__ */ a(D, { dashed: !0 }),
177
- /* @__PURE__ */ a(A, { animated: !0, width: "150px" })
176
+ /* @__PURE__ */ E(T, { direction: "column", gap: "12px", alignItems: "center", children: [
177
+ /* @__PURE__ */ h($, { dashed: !0 }),
178
+ /* @__PURE__ */ h(G, { animated: !0, width: "150px" })
178
179
  ] }),
179
- /* @__PURE__ */ a(K, { children: /* @__PURE__ */ a(
180
- h,
180
+ /* @__PURE__ */ h(He, { children: /* @__PURE__ */ h(
181
+ T,
181
182
  {
182
183
  direction: "column",
183
184
  gap: "12px",
184
185
  justifyContent: "space-between",
185
186
  height: "203px",
186
- children: g.map((d, c) => /* @__PURE__ */ a(J, { children: /* @__PURE__ */ u(
187
- h,
187
+ children: s.map((c, f) => /* @__PURE__ */ h(Me, { children: /* @__PURE__ */ E(
188
+ T,
188
189
  {
189
190
  direction: "column",
190
191
  gap: "12px",
191
192
  alignItems: "start",
192
193
  padding: "8px",
193
194
  children: [
194
- /* @__PURE__ */ a(A, { animated: !0, width: "180px" }),
195
- /* @__PURE__ */ a(A, { animated: !0, width: "85px" })
195
+ /* @__PURE__ */ h(G, { animated: !0, width: "180px" }),
196
+ /* @__PURE__ */ h(G, { animated: !0, width: "85px" })
196
197
  ]
197
198
  }
198
- ) }, `condition-${c}`))
199
+ ) }, `condition-${f}`))
199
200
  }
200
201
  ) })
201
202
  ] });
202
- }, re = (t) => {
203
- var l;
204
- const { decision: e, loading: n = !1, textValues: i } = t, o = !!(e != null && e.effectiveFrom), r = !!(e != null && e.validUntil), p = o && r ? {
203
+ }, ht = (e) => {
204
+ var b;
205
+ const { decision: t, loading: n = !1, textValues: r } = e, o = !!(t != null && t.effectiveFrom), i = !!(t != null && t.validUntil), s = o && i ? {
205
206
  element: {
206
- labelName: i == null ? void 0 : i.terms,
207
- value: String(e.effectiveFrom),
208
- howToSetTheDecision: L.RANGE,
209
- decisionDataType: k.DATE
207
+ labelName: r == null ? void 0 : r.terms,
208
+ value: String(t.effectiveFrom),
209
+ howToSetTheDecision: re.RANGE,
210
+ decisionDataType: J.DATE
210
211
  },
211
- valueData: $({
212
- labelName: i == null ? void 0 : i.terms,
212
+ valueData: Z({
213
+ labelName: r == null ? void 0 : r.terms,
213
214
  value: {
214
- from: String(e.effectiveFrom),
215
- to: String(e.validUntil)
215
+ from: String(t.effectiveFrom),
216
+ to: String(t.validUntil)
216
217
  },
217
- howToSetTheDecision: L.RANGE,
218
- decisionDataType: k.DATE
218
+ howToSetTheDecision: re.RANGE,
219
+ decisionDataType: J.DATE
219
220
  })
220
- } : o && !r ? {
221
+ } : o && !i ? {
221
222
  element: {
222
- labelName: i == null ? void 0 : i.terms,
223
- value: String(e.effectiveFrom),
224
- howToSetTheDecision: L.EQUAL,
225
- decisionDataType: k.DATE
223
+ labelName: r == null ? void 0 : r.terms,
224
+ value: String(t.effectiveFrom),
225
+ howToSetTheDecision: re.EQUAL,
226
+ decisionDataType: J.DATE
226
227
  },
227
- valueData: $({
228
- labelName: i == null ? void 0 : i.terms,
229
- value: String(e.effectiveFrom),
230
- howToSetTheDecision: L.EQUAL,
231
- decisionDataType: k.DATE
228
+ valueData: Z({
229
+ labelName: r == null ? void 0 : r.terms,
230
+ value: String(t.effectiveFrom),
231
+ howToSetTheDecision: re.EQUAL,
232
+ decisionDataType: J.DATE
232
233
  })
233
- } : null, g = e ? {
234
- labelName: e.labelName || "",
235
- decisionDataType: e.decisionDataType || "alphabetical",
236
- value: $(e),
237
- howToSetTheDecision: e.howToSetTheDecision || "EqualTo"
238
- } : null, s = ((l = e == null ? void 0 : e.conditionsThatEstablishesTheDecision) == null ? void 0 : l.filter(
239
- (b) => !b.hidden
240
- )) || [], d = Array.from({ length: 5 });
241
- return /* @__PURE__ */ a(
242
- Ae,
234
+ } : null, l = t ? {
235
+ labelName: t.labelName || "",
236
+ decisionDataType: t.decisionDataType || "alphabetical",
237
+ value: Z(t),
238
+ howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
239
+ } : null, u = ((b = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : b.filter(
240
+ (w) => !w.hidden
241
+ )) || [], d = Array.from({ length: 5 }), c = !!(!n && t && r && l), f = u.length < 2 ? "start" : "space-between";
242
+ return /* @__PURE__ */ h(
243
+ sn,
243
244
  {
244
- loading: !!(!n && e && i && g),
245
- textValues: i,
246
- decision: e,
247
- decisionMapper: g,
248
- visibleConditions: s,
249
- decisionDateElement: p,
245
+ conditionsAlignment: f,
246
+ decision: t,
247
+ decisionDateElement: s,
248
+ decisionMapper: l,
249
+ loading: c,
250
250
  skeleton: d,
251
- terms: !!(i != null && i.terms)
251
+ terms: !!(r != null && r.terms),
252
+ textValues: r,
253
+ visibleConditions: u
252
254
  }
253
255
  );
254
- }, $e = f.div`
256
+ }, an = D.div`
255
257
  position: relative;
256
258
  & > div {
257
259
  padding: 24px 16px;
258
260
  }
259
- `, Ie = f.div`
260
- background-color: ${({ theme: t }) => {
261
- var e, n;
262
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N0) || v.palette.neutral.N0;
261
+ `, ln = D.div`
262
+ background-color: ${({ theme: e }) => {
263
+ var t, n;
264
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || U.palette.neutral.N0;
263
265
  }};
264
266
  max-width: 450px;
265
267
  max-height: 90vh;
266
- overflow-y: ${({ smallScreen: t }) => t ? "hidden" : "auto"};
268
+ overflow-y: ${({ smallScreen: e }) => e ? "hidden" : "auto"};
267
269
  border-radius: 8px;
268
270
  transition: overflow-y 0.3s ease-in-out;
269
271
  & > div {
@@ -287,24 +289,24 @@ const Fe = {
287
289
  background-color: #ebecf0;
288
290
  border-radius: 8px;
289
291
  }
290
- `, Re = (t) => {
291
- const { children: e, portalId: n, onCloseModal: i, title: o } = t, r = document.getElementById(n);
292
- if (!r)
292
+ `, cn = (e) => {
293
+ const { children: t, portalId: n, onCloseModal: r, title: o } = e, i = document.getElementById(n);
294
+ if (!i)
293
295
  throw new Error(
294
296
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
295
297
  );
296
- const p = I("(max-width: 400px)");
297
- return ae(
298
- /* @__PURE__ */ a($e, { smallScreen: p, children: /* @__PURE__ */ a(te, { children: /* @__PURE__ */ a(Ie, { children: /* @__PURE__ */ u(h, { direction: "column", gap: "24px", children: [
299
- /* @__PURE__ */ a(h, { direction: "column", gap: "24px", children: /* @__PURE__ */ u(h, { alignItems: "center", justifyContent: "space-between", children: [
300
- /* @__PURE__ */ a(y, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
301
- /* @__PURE__ */ a(Z, { size: "24px", cursor: "pointer", onClick: i })
298
+ const s = Y("(max-width: 400px)");
299
+ return ut(
300
+ /* @__PURE__ */ h(an, { smallScreen: s, children: /* @__PURE__ */ h(lt, { children: /* @__PURE__ */ h(ln, { children: /* @__PURE__ */ E(T, { direction: "column", gap: "24px", children: [
301
+ /* @__PURE__ */ h(T, { direction: "column", gap: "24px", children: /* @__PURE__ */ E(T, { alignItems: "center", justifyContent: "space-between", children: [
302
+ /* @__PURE__ */ h(k, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
303
+ /* @__PURE__ */ h(st, { size: "24px", cursor: "pointer", onClick: r })
302
304
  ] }) }),
303
- e
305
+ t
304
306
  ] }) }) }) }),
305
- r
307
+ i
306
308
  );
307
- }, Le = fe`
309
+ }, dn = Wt`
308
310
  from {
309
311
  opacity: 0;
310
312
  transform: translateY(20px);
@@ -314,12 +316,12 @@ const Fe = {
314
316
  transform: translateY(0);
315
317
  }
316
318
  `;
317
- f.div`
319
+ D.div`
318
320
  border-radius: 8px;
319
321
  border: 1px solid
320
- ${({ theme: t }) => {
321
- var e, n;
322
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N30) || v.palette.neutral.N30;
322
+ ${({ theme: e }) => {
323
+ var t, n;
324
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || U.palette.neutral.N30;
323
325
  }};
324
326
  box-sizing: border-box;
325
327
  display: flex;
@@ -328,21 +330,21 @@ f.div`
328
330
  height: 100%;
329
331
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
330
332
  `;
331
- f.div`
333
+ D.div`
332
334
  & > div {
333
335
  border-radius: 8px;
334
336
  border: 1px solid
335
- ${({ theme: t }) => {
336
- var e, n;
337
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N30) || v.palette.neutral.N30;
337
+ ${({ theme: e }) => {
338
+ var t, n;
339
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || U.palette.neutral.N30;
338
340
  }};
339
341
  }
340
342
  `;
341
- const Me = f.div`
343
+ const un = D.div`
342
344
  & > div {
343
- background-color: ${({ theme: t }) => {
344
- var e, n;
345
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N10) || v.palette.neutral.N10;
345
+ background-color: ${({ theme: e }) => {
346
+ var t, n;
347
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N10) || U.palette.neutral.N10;
346
348
  }};
347
349
  justify-content: center;
348
350
  }
@@ -350,18 +352,18 @@ const Me = f.div`
350
352
  width: 100%;
351
353
  height: 100%;
352
354
  padding-bottom: 12px;
353
- `, le = f.div`
355
+ `, pt = D.div`
354
356
  width: 100%;
355
357
  height: 100%;
356
358
  & > div {
357
- animation: ${Le} 600ms ease-out;
359
+ animation: ${dn} 600ms ease-out;
358
360
  }
359
- `, Ve = f.div`
361
+ `, fn = D.div`
360
362
  & > div > div {
361
363
  border-radius: 8px;
362
364
  box-sizing: border-box;
363
365
  }
364
- `, Oe = f.div`
366
+ `, hn = D.div`
365
367
  & > div {
366
368
  width: 100%;
367
369
  height: 100%;
@@ -382,61 +384,61 @@ const Me = f.div`
382
384
  }
383
385
  }
384
386
  `;
385
- function Ue(t) {
386
- const { index: e, handleOpenModal: n } = t;
387
- return /* @__PURE__ */ a(
388
- H,
387
+ function pn(e) {
388
+ const { index: t, handleOpenModal: n } = e;
389
+ return /* @__PURE__ */ h(
390
+ _e,
389
391
  {
390
- id: `loading-card-${e}`,
392
+ id: `loading-card-${t}`,
391
393
  handleDelete: () => {
392
394
  },
393
395
  handleView: () => n ? n() : null,
394
396
  controls: !1,
395
- children: /* @__PURE__ */ a(re, { loading: !0 })
397
+ children: /* @__PURE__ */ h(ht, { loading: !0 })
396
398
  },
397
- `loading-card-${e}`
399
+ `loading-card-${t}`
398
400
  );
399
401
  }
400
- function _e(t) {
401
- const { decision: e, controls: n, handleOpenModal: i, handleDelete: o, textValues: r } = t;
402
- return e ? /* @__PURE__ */ a(le, { children: /* @__PURE__ */ u(h, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
403
- /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: e.decisionId }),
404
- /* @__PURE__ */ a(
405
- H,
402
+ function mn(e) {
403
+ const { decision: t, controls: n, handleOpenModal: r, handleDelete: o, textValues: i } = e;
404
+ return t ? /* @__PURE__ */ h(pt, { children: /* @__PURE__ */ E(T, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
405
+ /* @__PURE__ */ h(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
406
+ /* @__PURE__ */ h(
407
+ _e,
406
408
  {
407
- id: e.decisionId,
408
- handleDelete: () => o ? o(e.decisionId) : null,
409
- handleView: () => i ? i(e) : null,
409
+ id: t.decisionId,
410
+ handleDelete: () => o ? o(t.decisionId) : null,
411
+ handleView: () => r ? r(t) : null,
410
412
  controls: n,
411
- children: /* @__PURE__ */ a(re, { decision: e, textValues: r })
413
+ children: /* @__PURE__ */ h(ht, { decision: t, textValues: i })
412
414
  }
413
415
  )
414
- ] }) }, e.decisionId) : null;
416
+ ] }) }, t.decisionId) : null;
415
417
  }
416
- function ze(t) {
418
+ function gn(e) {
417
419
  const {
418
- customTitleContentAddCard: e,
420
+ customTitleContentAddCard: t,
419
421
  index: n,
420
- handleOpenModal: i,
422
+ handleOpenModal: r,
421
423
  shouldRenderEmptyMessage: o
422
- } = t, r = e || "Agregar decisión";
423
- return /* @__PURE__ */ a(le, { children: o ? null : /* @__PURE__ */ u(h, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
424
- /* @__PURE__ */ a(y, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
425
- /* @__PURE__ */ a(
426
- Me,
424
+ } = e, i = t || "Agregar decisión";
425
+ return /* @__PURE__ */ h(pt, { children: o ? null : /* @__PURE__ */ E(T, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
426
+ /* @__PURE__ */ h(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
427
+ /* @__PURE__ */ h(
428
+ un,
427
429
  {
428
- onClick: () => i ? i() : null,
429
- children: /* @__PURE__ */ a(
430
- H,
430
+ onClick: () => r ? r() : null,
431
+ children: /* @__PURE__ */ h(
432
+ _e,
431
433
  {
432
434
  id: `add-decision-${n}`,
433
435
  handleDelete: () => {
434
436
  },
435
- handleView: () => i ? i() : null,
437
+ handleView: () => r ? r() : null,
436
438
  controls: !1,
437
- children: /* @__PURE__ */ u(h, { direction: "column", gap: "12px", alignItems: "center", children: [
438
- /* @__PURE__ */ a(O, { appearance: "gray", icon: /* @__PURE__ */ a(ee, {}), size: "35px" }),
439
- /* @__PURE__ */ a(y, { appearance: "gray", type: "body", size: "large", children: r })
439
+ children: /* @__PURE__ */ E(T, { direction: "column", gap: "12px", alignItems: "center", children: [
440
+ /* @__PURE__ */ h(ue, { appearance: "gray", icon: /* @__PURE__ */ h(at, {}), size: "35px" }),
441
+ /* @__PURE__ */ h(k, { appearance: "gray", type: "body", size: "large", children: i })
440
442
  ] })
441
443
  }
442
444
  )
@@ -444,86 +446,86 @@ function ze(t) {
444
446
  )
445
447
  ] }) }, `add-decision-${n}`);
446
448
  }
447
- const qe = {
448
- loading: Ue,
449
- decision: _e,
450
- add: ze
451
- }, j = (t) => {
452
- const { type: e } = t, n = qe[e];
453
- return n ? n(t) : null;
454
- }, je = (t) => {
449
+ const bn = {
450
+ loading: pn,
451
+ decision: mn,
452
+ add: gn
453
+ }, Re = (e) => {
454
+ const { type: t } = e, n = bn[t];
455
+ return n ? n(e) : null;
456
+ }, yn = (e) => {
455
457
  const {
456
- controls: e,
458
+ controls: t,
457
459
  customTitleContentAddCard: n,
458
- decisions: i,
460
+ decisions: r,
459
461
  loading: o,
460
- handleOpenModal: r,
461
- handleDelete: p,
462
- textValues: g
463
- } = t, s = o ? Array.from({ length: 3 }).map(
464
- (c, l) => j({
462
+ handleOpenModal: i,
463
+ handleDelete: s,
464
+ textValues: l
465
+ } = e, u = o ? Array.from({ length: 3 }).map(
466
+ (c, f) => Re({
465
467
  type: "loading",
466
- index: l,
467
- controls: e,
468
+ index: f,
469
+ controls: t,
468
470
  customTitleContentAddCard: n,
469
471
  loading: o,
470
- handleOpenModal: r,
471
- handleDelete: p,
472
- textValues: g
472
+ handleOpenModal: i,
473
+ handleDelete: s,
474
+ textValues: l
473
475
  })
474
- ) : i == null ? void 0 : i.map(
475
- (c) => j({
476
+ ) : r == null ? void 0 : r.map(
477
+ (c) => Re({
476
478
  type: "decision",
477
479
  decision: c,
478
- controls: e,
480
+ controls: t,
479
481
  customTitleContentAddCard: n,
480
482
  loading: o,
481
- handleOpenModal: r,
482
- handleDelete: p,
483
- textValues: g
483
+ handleOpenModal: i,
484
+ handleDelete: s,
485
+ textValues: l
484
486
  })
485
- ), d = ((i == null ? void 0 : i.length) === 0 || i.length < Math.floor(window.innerWidth / 300)) && !o && e;
486
- return { renderedCards: s, shouldRenderAddCard: d };
487
- }, gt = (t) => {
487
+ ), d = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && t;
488
+ return { renderedCards: u, shouldRenderAddCard: d };
489
+ }, Oo = (e) => {
488
490
  const {
489
- controls: e = !0,
491
+ controls: t = !0,
490
492
  customTitleContentAddCard: n,
491
- customMessageEmptyDecisions: i,
493
+ customMessageEmptyDecisions: r,
492
494
  decisions: o,
493
- textValues: r,
494
- decisionTemplate: p,
495
- isModalOpen: g,
496
- selectedDecision: s,
495
+ textValues: i,
496
+ decisionTemplate: s,
497
+ isModalOpen: l,
498
+ selectedDecision: u,
497
499
  loading: d,
498
500
  handleOpenModal: c,
499
- handleCloseModal: l,
501
+ handleCloseModal: f,
500
502
  handleSubmitForm: b,
501
- handleDelete: T,
502
- terms: m = !0
503
- } = t, C = I("(max-width: 681px)"), w = I("(max-width: 400px)"), { renderedCards: F, shouldRenderAddCard: U } = je({
504
- controls: e,
503
+ handleDelete: w,
504
+ terms: p = !0
505
+ } = e, g = Y("(max-width: 681px)"), m = Y("(max-width: 400px)"), { renderedCards: S, shouldRenderAddCard: x } = yn({
506
+ controls: t,
505
507
  customTitleContentAddCard: n,
506
508
  decisions: o,
507
509
  loading: d,
508
510
  handleOpenModal: c,
509
- handleDelete: T,
510
- textValues: r
511
- }), R = (o == null ? void 0 : o.length) === 0 && !d;
512
- return /* @__PURE__ */ u(E, { children: [
513
- /* @__PURE__ */ a(Ve, { children: /* @__PURE__ */ a(Oe, { children: /* @__PURE__ */ a(h, { direction: "column", gap: "16px", padding: "6px", children: R ? /* @__PURE__ */ u(
514
- h,
511
+ handleDelete: w,
512
+ textValues: i
513
+ }), C = (o == null ? void 0 : o.length) === 0 && !d;
514
+ return /* @__PURE__ */ E(q, { children: [
515
+ /* @__PURE__ */ h(fn, { children: /* @__PURE__ */ h(hn, { children: /* @__PURE__ */ h(T, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ E(
516
+ T,
515
517
  {
516
518
  direction: "column",
517
519
  gap: "28px",
518
520
  width: "100%",
519
- height: C ? "auto" : "435px",
521
+ height: g ? "auto" : "435px",
520
522
  justifyContent: "center",
521
523
  alignItems: "center",
522
524
  children: [
523
- /* @__PURE__ */ a(y, { as: "span", type: "label", size: "large", appearance: "gray", children: i || /* @__PURE__ */ u(E, { children: [
525
+ /* @__PURE__ */ h(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ E(q, { children: [
524
526
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
525
- /* @__PURE__ */ u(
526
- y,
527
+ /* @__PURE__ */ E(
528
+ k,
527
529
  {
528
530
  as: "span",
529
531
  type: "label",
@@ -539,20 +541,20 @@ const qe = {
539
541
  ),
540
542
  "para empezar."
541
543
  ] }) }),
542
- /* @__PURE__ */ a(
543
- N,
544
+ /* @__PURE__ */ h(
545
+ z,
544
546
  {
545
- iconBefore: /* @__PURE__ */ a(ee, {}),
547
+ iconBefore: /* @__PURE__ */ h(at, {}),
546
548
  onClick: () => c ? c() : null,
547
549
  children: n || "Agregar decisión"
548
550
  }
549
551
  )
550
552
  ]
551
553
  }
552
- ) : /* @__PURE__ */ u(
553
- ne,
554
+ ) : /* @__PURE__ */ E(
555
+ ct,
554
556
  {
555
- templateColumns: w ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
557
+ templateColumns: m ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
556
558
  autoFlow: "row dense",
557
559
  gap: "24px",
558
560
  alignItems: "start",
@@ -560,112 +562,112 @@ const qe = {
560
562
  autoRows: "1fr",
561
563
  justifyItems: "center",
562
564
  padding: "6px",
563
- height: C ? "auto" : "484px",
565
+ height: g ? "auto" : "484px",
564
566
  children: [
565
- F,
566
- U && j({
567
+ S,
568
+ x && Re({
567
569
  type: "add",
568
570
  index: o == null ? void 0 : o.length,
569
- controls: e,
571
+ controls: t,
570
572
  customTitleContentAddCard: n,
571
- customMessageEmptyDecisions: i,
573
+ customMessageEmptyDecisions: r,
572
574
  loading: d,
573
575
  handleOpenModal: c,
574
- handleDelete: T,
575
- textValues: r,
576
- shouldRenderEmptyMessage: R,
577
- terms: m
576
+ handleDelete: w,
577
+ textValues: i,
578
+ shouldRenderEmptyMessage: C,
579
+ terms: p
578
580
  })
579
581
  ]
580
582
  }
581
583
  ) }) }) }),
582
- g && /* @__PURE__ */ a(
583
- Re,
584
+ l && /* @__PURE__ */ h(
585
+ cn,
584
586
  {
585
587
  portalId: "modal-portal",
586
- onCloseModal: l,
587
- title: s ? "Editar Decisión" : "Nueva decisión",
588
- children: /* @__PURE__ */ a(
589
- it,
588
+ onCloseModal: f,
589
+ title: u ? "Editar Decisión" : "Nueva decisión",
590
+ children: /* @__PURE__ */ h(
591
+ _n,
590
592
  {
591
- decision: s || p,
593
+ decision: u || s,
592
594
  onSubmitEvent: b,
593
- textValues: r,
594
- onCancel: () => l ? l() : () => {
595
+ textValues: i,
596
+ onCancel: () => f ? f() : () => {
595
597
  }
596
598
  }
597
599
  )
598
600
  }
599
601
  )
600
602
  ] });
601
- }, Be = f.div`
603
+ }, wn = D.div`
602
604
  display: flex;
603
- justify-content: ${({ justifyContent: t }) => t};
604
- align-items: ${({ alignItems: t }) => t};
605
- align-content: ${({ alignContent: t }) => t};
606
- flex-direction: ${({ direction: t }) => t};
607
- flex-wrap: ${({ wrap: t }) => t};
608
- height: ${({ height: t }) => t};
609
- width: ${({ width: t }) => t};
610
- gap: ${({ gap: t }) => t};
611
- margin: ${({ margin: t }) => t};
612
- padding: ${({ padding: t }) => t};
613
- background: ${({ background: t, theme: e }) => {
614
- var n, i, o, r;
615
- return t ? `${((i = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : i.N10) || v.palette.neutral.N10}` : `${((r = (o = e == null ? void 0 : e.palette) == null ? void 0 : o.neutral) == null ? void 0 : r.N0) || v.palette.neutral.N0}`;
605
+ justify-content: ${({ justifyContent: e }) => e};
606
+ align-items: ${({ alignItems: e }) => e};
607
+ align-content: ${({ alignContent: e }) => e};
608
+ flex-direction: ${({ direction: e }) => e};
609
+ flex-wrap: ${({ wrap: e }) => e};
610
+ height: ${({ height: e }) => e};
611
+ width: ${({ width: e }) => e};
612
+ gap: ${({ gap: e }) => e};
613
+ margin: ${({ margin: e }) => e};
614
+ padding: ${({ padding: e }) => e};
615
+ background: ${({ background: e, theme: t }) => {
616
+ var n, r, o, i;
617
+ return e ? `${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N10) || U.palette.neutral.N10}` : `${((i = (o = t == null ? void 0 : t.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || U.palette.neutral.N0}`;
616
618
  }};
617
- border: ${({ border: t, theme: e }) => {
618
- var n, i;
619
- return t ? `1px solid ${((i = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : i.N40) || v.palette.neutral.N40}` : "none";
619
+ border: ${({ border: e, theme: t }) => {
620
+ var n, r;
621
+ return e ? `1px solid ${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N40) || U.palette.neutral.N40}` : "none";
620
622
  }};
621
- border-radius: ${({ borderRadius: t }) => t};
622
- box-sizing: ${({ boxSizing: t }) => t};
623
- overflow-y: ${({ scroll: t }) => t ? "scroll" : "none"};
624
- `, He = (t) => {
623
+ border-radius: ${({ borderRadius: e }) => e};
624
+ box-sizing: ${({ boxSizing: e }) => e};
625
+ overflow-y: ${({ scroll: e }) => e ? "scroll" : "none"};
626
+ `, Tn = (e) => {
625
627
  const {
626
- children: e,
628
+ children: t,
627
629
  wrap: n,
628
- direction: i = "column",
630
+ direction: r = "column",
629
631
  justifyContent: o,
630
- alignItems: r,
631
- alignContent: p,
632
- height: g,
633
- width: s,
632
+ alignItems: i,
633
+ alignContent: s,
634
+ height: l,
635
+ width: u,
634
636
  gap: d,
635
637
  background: c,
636
- borderRadius: l,
638
+ borderRadius: f,
637
639
  border: b,
638
- margin: T = "0px",
639
- padding: m = "0px",
640
- boxSizing: C,
641
- scroll: w = !1
642
- } = t;
643
- return /* @__PURE__ */ a(
644
- Be,
640
+ margin: w = "0px",
641
+ padding: p = "0px",
642
+ boxSizing: g,
643
+ scroll: m = !1
644
+ } = e;
645
+ return /* @__PURE__ */ h(
646
+ wn,
645
647
  {
646
- direction: i,
648
+ direction: r,
647
649
  justifyContent: o,
648
- alignItems: r,
649
- alignContent: p,
650
- height: g,
651
- width: s,
650
+ alignItems: i,
651
+ alignContent: s,
652
+ height: l,
653
+ width: u,
652
654
  wrap: n,
653
655
  gap: d,
654
656
  background: c,
655
657
  border: b,
656
- margin: T,
657
- padding: m,
658
- borderRadius: l,
659
- boxSizing: C,
660
- scroll: w,
661
- children: e
658
+ margin: w,
659
+ padding: p,
660
+ borderRadius: f,
661
+ boxSizing: g,
662
+ scroll: m,
663
+ children: t
662
664
  }
663
665
  );
664
- }, mt = (t) => {
665
- const { appliedFilters: e, onClear: n, onClick: i, titleClearFilter: o, titleFilter: r } = t, p = !e || e.length === 0;
666
- return /* @__PURE__ */ a(ge, { borderRadius: "8px", children: /* @__PURE__ */ u(ne, { gap: "12px", templateColumns: "1fr auto auto", children: [
667
- /* @__PURE__ */ a(
668
- He,
666
+ }, ko = (e) => {
667
+ const { appliedFilters: t, onClear: n, onClick: r, titleClearFilter: o, titleFilter: i } = e, s = !t || t.length === 0;
668
+ return /* @__PURE__ */ h(Ht, { borderRadius: "8px", children: /* @__PURE__ */ E(ct, { gap: "12px", templateColumns: "1fr auto auto", children: [
669
+ /* @__PURE__ */ h(
670
+ Tn,
669
671
  {
670
672
  background: !0,
671
673
  borderRadius: "8px",
@@ -674,162 +676,162 @@ const qe = {
674
676
  gap: "8px",
675
677
  alignItems: "center",
676
678
  padding: "0px 8px",
677
- children: e == null ? void 0 : e.map((g) => /* @__PURE__ */ a(
678
- me,
679
+ children: t == null ? void 0 : t.map((l) => /* @__PURE__ */ h(
680
+ zt,
679
681
  {
680
682
  appearance: "primary",
681
683
  displayIcon: !0,
682
- icon: g.icon,
683
- label: g.label
684
+ icon: l.icon,
685
+ label: l.label
684
686
  },
685
- g.label
687
+ l.label
686
688
  ))
687
689
  }
688
690
  ),
689
- /* @__PURE__ */ a(
690
- N,
691
+ /* @__PURE__ */ h(
692
+ z,
691
693
  {
692
694
  cursorHover: !0,
693
- disabled: p,
694
- iconBefore: /* @__PURE__ */ a(ue, {}),
695
+ disabled: s,
696
+ iconBefore: /* @__PURE__ */ h(qt, {}),
695
697
  onClick: n,
696
698
  variant: "outlined",
697
699
  children: o
698
700
  }
699
701
  ),
700
- /* @__PURE__ */ a(
701
- N,
702
+ /* @__PURE__ */ h(
703
+ z,
702
704
  {
703
705
  cursorHover: !0,
704
- iconBefore: /* @__PURE__ */ a(pe, {}),
705
- onClick: i,
706
+ iconBefore: /* @__PURE__ */ h(Mt, {}),
707
+ onClick: r,
706
708
  variant: "outlined",
707
- children: r
709
+ children: i
708
710
  }
709
711
  )
710
712
  ] }) });
711
- }, Pe = f.div`
713
+ }, En = D.div`
712
714
  display: flex;
713
715
  flex-direction: column;
714
- background-color: ${({ theme: t }) => {
715
- var e, n;
716
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N0) || v.palette.neutral.N0;
716
+ background-color: ${({ theme: e }) => {
717
+ var t, n;
718
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || U.palette.neutral.N0;
717
719
  }};
718
- width: ${({ smallScreen: t }) => t ? "335px" : "450px"};
720
+ width: ${({ smallScreen: e }) => e ? "335px" : "450px"};
719
721
  height: auto;
720
722
  border-radius: 8px;
721
723
  padding: 24px;
722
724
  gap: 24px;
723
725
  box-sizing: border-box;
724
- `, bt = (t) => {
726
+ `, vo = (e) => {
725
727
  const {
726
- actionButtonLabel: e,
728
+ actionButtonLabel: t,
727
729
  cancelButtonLabel: n,
728
- children: i,
730
+ children: r,
729
731
  loading: o,
730
- onClick: r,
731
- onCloseModal: p,
732
- portalId: g,
733
- title: s
734
- } = t, d = I("(max-width: 768px)"), c = document.getElementById(g);
732
+ onClick: i,
733
+ onCloseModal: s,
734
+ portalId: l,
735
+ title: u
736
+ } = e, d = Y("(max-width: 768px)"), c = document.getElementById(l);
735
737
  if (!c)
736
738
  throw new Error(
737
739
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
738
740
  );
739
- return ae(
740
- /* @__PURE__ */ a(te, { children: /* @__PURE__ */ u(Pe, { $smallScreen: d, children: [
741
- /* @__PURE__ */ u(h, { direction: "column", gap: "16px", children: [
742
- /* @__PURE__ */ u(h, { alignContent: "center", justifyContent: "space-between", children: [
743
- /* @__PURE__ */ a(y, { appearance: "dark", size: "small", type: "headline", children: s }),
744
- /* @__PURE__ */ u(h, { alignItems: "center", children: [
745
- /* @__PURE__ */ a(y, { children: "Cerrar" }),
746
- /* @__PURE__ */ a(
747
- O,
741
+ return ut(
742
+ /* @__PURE__ */ h(lt, { children: /* @__PURE__ */ E(En, { $smallScreen: d, children: [
743
+ /* @__PURE__ */ E(T, { direction: "column", gap: "16px", children: [
744
+ /* @__PURE__ */ E(T, { alignContent: "center", justifyContent: "space-between", children: [
745
+ /* @__PURE__ */ h(k, { appearance: "dark", size: "small", type: "headline", children: u }),
746
+ /* @__PURE__ */ E(T, { alignItems: "center", children: [
747
+ /* @__PURE__ */ h(k, { children: "Cerrar" }),
748
+ /* @__PURE__ */ h(
749
+ ue,
748
750
  {
749
751
  appearance: "dark",
750
- icon: /* @__PURE__ */ a(Z, {}),
751
- onClick: p,
752
+ icon: /* @__PURE__ */ h(st, {}),
753
+ onClick: s,
752
754
  cursorHover: !0
753
755
  }
754
756
  )
755
757
  ] })
756
758
  ] }),
757
- /* @__PURE__ */ a(D, {})
759
+ /* @__PURE__ */ h($, {})
758
760
  ] }),
759
- i,
760
- /* @__PURE__ */ u(h, { gap: "20px", justifyContent: "flex-end", children: [
761
- /* @__PURE__ */ a(
762
- N,
761
+ r,
762
+ /* @__PURE__ */ E(T, { gap: "20px", justifyContent: "flex-end", children: [
763
+ /* @__PURE__ */ h(
764
+ z,
763
765
  {
764
766
  appearance: "gray",
765
- onClick: p,
767
+ onClick: s,
766
768
  spacing: "wide",
767
769
  variant: "outlined",
768
770
  children: n
769
771
  }
770
772
  ),
771
- /* @__PURE__ */ a(
772
- N,
773
+ /* @__PURE__ */ h(
774
+ z,
773
775
  {
774
776
  appearance: "primary",
775
777
  loading: o,
776
- onClick: r,
778
+ onClick: i,
777
779
  spacing: "wide",
778
780
  variant: "filled",
779
- children: e
781
+ children: t
780
782
  }
781
783
  )
782
784
  ] })
783
785
  ] }) }),
784
786
  c
785
787
  );
786
- }, Tt = (t) => {
787
- const { fields: e, onChange: n } = t;
788
- return /* @__PURE__ */ a(h, { direction: "column", gap: "16px", children: e.map((i) => /* @__PURE__ */ u(h, { gap: "6px", alignItems: "center", children: [
789
- /* @__PURE__ */ a(h, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(O, { appearance: "primary", icon: i.icon }) }),
790
- /* @__PURE__ */ a(
791
- be,
788
+ }, Fo = (e) => {
789
+ const { fields: t, onChange: n } = e;
790
+ return /* @__PURE__ */ h(T, { direction: "column", gap: "16px", children: t.map((r) => /* @__PURE__ */ E(T, { gap: "6px", alignItems: "center", children: [
791
+ /* @__PURE__ */ h(T, { padding: "22px 0 0 0", children: /* @__PURE__ */ h(ue, { appearance: "primary", icon: r.icon }) }),
792
+ /* @__PURE__ */ h(
793
+ Vt,
792
794
  {
793
- disabled: i.disabled,
794
- invalid: i.invalid,
795
- label: i.label,
796
- message: i.message,
797
- name: i.name,
795
+ disabled: r.disabled,
796
+ invalid: r.invalid,
797
+ label: r.label,
798
+ message: r.message,
799
+ name: r.name,
798
800
  onChange: n,
799
- options: i.options,
800
- placeholder: i.placeholder,
801
- required: i.required,
802
- values: i.values,
801
+ options: r.options,
802
+ placeholder: r.placeholder,
803
+ required: r.required,
804
+ values: r.values,
803
805
  fullwidth: !0
804
806
  },
805
- i.name
807
+ r.name
806
808
  )
807
- ] }, i.name)) });
808
- }, ft = (t) => {
809
- console.log(t);
810
- const { dataDecision: e, originalDecision: n } = t, i = {
811
- conditionName: e.ruleName || "",
812
- labelName: e.labelName || "",
813
- conditionDataType: e.decisionDataType || "alphabetical",
814
- value: e.value || "",
815
- howToSetTheCondition: e.howToSetTheDecision || "EqualTo",
809
+ ] }, r.name)) });
810
+ }, _o = (e) => {
811
+ console.log(e);
812
+ const { dataDecision: t, originalDecision: n } = e, r = {
813
+ conditionName: t.ruleName || "",
814
+ labelName: t.labelName || "",
815
+ conditionDataType: t.decisionDataType || "alphabetical",
816
+ value: t.value || "",
817
+ howToSetTheCondition: t.howToSetTheDecision || "EqualTo",
816
818
  switchPlaces: !0,
817
819
  hidden: !1
818
820
  };
819
821
  return {
820
822
  ...n,
821
823
  conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
822
- (o) => o.hidden ? { ...i } : o
824
+ (o) => o.hidden ? { ...r } : o
823
825
  )
824
826
  };
825
- }, xt = (t) => {
826
- const { decisions: e } = t;
827
- return e == null ? void 0 : e.map((n) => {
827
+ }, Lo = (e) => {
828
+ const { decisions: t } = e;
829
+ return t == null ? void 0 : t.map((n) => {
828
830
  var o;
829
- const i = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
830
- (r) => r.hidden
831
+ const r = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
832
+ (i) => i.hidden
831
833
  );
832
- return i ? {
834
+ return r ? {
833
835
  ...n,
834
836
  ruleName: n.ruleName,
835
837
  labelName: n.labelName,
@@ -837,184 +839,184 @@ const qe = {
837
839
  value: n.value,
838
840
  howToSetTheDecision: n.howToSetTheDecision,
839
841
  conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
840
- (r) => r.hidden ? { ...i, hidden: !1 } : r
842
+ (i) => i.hidden ? { ...r, hidden: !1 } : i
841
843
  )
842
844
  } : n;
843
845
  });
844
- }, Ge = (t) => ({
845
- schema: B().required("Required").test(
846
+ }, Sn = (e) => ({
847
+ schema: Fe().required("Required").test(
846
848
  "non-empty",
847
849
  "Value cannot be empty",
848
- (e) => e != null && e.trim() !== ""
850
+ (t) => t != null && t.trim() !== ""
849
851
  ),
850
- value: t
851
- }), Qe = (t) => ({
852
- schema: oe().test(
852
+ value: e
853
+ }), xn = (e) => ({
854
+ schema: ft().test(
853
855
  "isArrayOrString",
854
856
  "Must be an array of strings/numbers or a single string",
855
- (e) => Array.isArray(e) ? e.every(
857
+ (t) => Array.isArray(t) ? t.every(
856
858
  (n) => typeof n == "string" || typeof n == "number"
857
- ) : typeof e == "string"
859
+ ) : typeof t == "string"
858
860
  ),
859
- value: t
860
- }), Ye = (t) => ({
861
- schema: oe().test(
861
+ value: e
862
+ }), Cn = (e) => ({
863
+ schema: ft().test(
862
864
  "isArrayOrString",
863
865
  "Must be an array of strings/numbers or a single string",
864
- (e) => Array.isArray(e) ? e.every(
866
+ (t) => Array.isArray(t) ? t.every(
865
867
  (n) => typeof n == "string" || typeof n == "number"
866
- ) : typeof e == "string"
868
+ ) : typeof t == "string"
867
869
  ),
868
- value: t
869
- }), We = (t) => {
870
- const e = (t == null ? void 0 : t.from) ?? 0, n = (t == null ? void 0 : t.to) ?? 0;
870
+ value: e
871
+ }), Rn = (e) => {
872
+ const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
871
873
  return {
872
- schema: M({
873
- from: q().required("Range From is required").max(n, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
874
- to: q().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
874
+ schema: oe({
875
+ from: Ce().required("Range From is required").max(n, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
876
+ to: Ce().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
875
877
  "is-greater",
876
878
  "To value must be greater than From value",
877
- function(i) {
879
+ function(r) {
878
880
  const { from: o } = this.parent;
879
- return i > o;
881
+ return r > o;
880
882
  }
881
883
  )
882
884
  }),
883
- value: { from: e, to: n }
885
+ value: { from: t, to: n }
884
886
  };
885
- }, z = (t, e) => e === k.PERCENTAGE ? {
886
- schema: q().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
887
- value: t
887
+ }, Te = (e, t) => t === J.PERCENTAGE ? {
888
+ schema: Ce().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
889
+ value: e
888
890
  } : {
889
- schema: B().required("Required"),
890
- value: t
891
- }, Je = {
892
- [x.LIST_OF_VALUES]: Qe,
893
- [x.LIST_OF_VALUES_MULTI]: Ye,
894
- [x.RANGE]: We,
895
- [x.GREATER_THAN]: z,
896
- [x.LESS_THAN]: z,
897
- [x.EQUAL]: z
898
- }, X = (t) => Je[t] || Ge;
899
- function Ke({
900
- decision: t,
901
- onSubmitEvent: e,
891
+ schema: Fe().required("Required"),
892
+ value: e
893
+ }, An = {
894
+ [O.LIST_OF_VALUES]: xn,
895
+ [O.LIST_OF_VALUES_MULTI]: Cn,
896
+ [O.RANGE]: Rn,
897
+ [O.GREATER_THAN]: Te,
898
+ [O.LESS_THAN]: Te,
899
+ [O.EQUAL]: Te
900
+ }, ze = (e) => An[e] || Sn;
901
+ function Nn({
902
+ decision: e,
903
+ onSubmitEvent: t,
902
904
  textValues: n
903
905
  }) {
904
- const i = {
905
- ruleName: t.ruleName || "",
906
- decisionDataType: t.decisionDataType || k.ALPHABETICAL,
907
- howToSetTheDecision: t.howToSetTheDecision || "",
908
- value: t.value || "",
909
- effectiveFrom: t.effectiveFrom || "",
910
- validUntil: t.validUntil || "",
906
+ const r = {
907
+ ruleName: e.ruleName || "",
908
+ decisionDataType: e.decisionDataType || J.ALPHABETICAL,
909
+ howToSetTheDecision: e.howToSetTheDecision || "",
910
+ value: e.value || "",
911
+ effectiveFrom: e.effectiveFrom || "",
912
+ validUntil: e.validUntil || "",
911
913
  toggleNone: !0,
912
914
  conditionsThatEstablishesTheDecision: {},
913
915
  checkClosed: !1,
914
916
  terms: !0
915
917
  };
916
918
  let o;
917
- const r = {
918
- ruleName: B().required("Name is required"),
919
- value: Y(() => X(
919
+ const i = {
920
+ ruleName: Fe().required("Name is required"),
921
+ value: $e(() => ze(
920
922
  o.values.howToSetTheDecision
921
923
  )(
922
924
  o.values.value,
923
925
  o.values.decisionDataType
924
926
  ).schema),
925
- conditionsThatEstablishesTheDecision: Y((s, { parent: d }) => {
927
+ conditionsThatEstablishesTheDecision: $e((u, { parent: d }) => {
926
928
  var b;
927
- if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionsThatEstablishesTheDecision || {}).length > 0) return M().shape({});
928
- const l = (b = t.conditionsThatEstablishesTheDecision) == null ? void 0 : b.reduce(
929
- (T, m) => {
930
- if (o.values.conditionsThatEstablishesTheDecision[m.conditionName] !== void 0) {
931
- const w = X(
932
- m.howToSetTheCondition
929
+ if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionsThatEstablishesTheDecision || {}).length > 0) return oe().shape({});
930
+ const f = (b = e.conditionsThatEstablishesTheDecision) == null ? void 0 : b.reduce(
931
+ (w, p) => {
932
+ if (o.values.conditionsThatEstablishesTheDecision[p.conditionName] !== void 0) {
933
+ const m = ze(
934
+ p.howToSetTheCondition
933
935
  );
934
- T[m.conditionName] = w(
935
- m.value,
936
- m.conditionDataType
936
+ w[p.conditionName] = m(
937
+ p.value,
938
+ p.conditionDataType
937
939
  ).schema;
938
940
  }
939
- return T;
941
+ return w;
940
942
  },
941
943
  {}
942
944
  );
943
- return M(l).test(
945
+ return oe(f).test(
944
946
  "at-least-one-condition",
945
947
  "It must be at least one condition in order for the decision to be validated correctly.",
946
- (T) => T ? Object.values(T).some(
947
- (m) => m != null && m !== ""
948
+ (w) => w ? Object.values(w).some(
949
+ (p) => p != null && p !== ""
948
950
  ) : !1
949
951
  );
950
952
  })
951
953
  };
952
- n.terms && (r.effectiveFrom = W().required(
954
+ n.terms && (i.effectiveFrom = qe().required(
953
955
  "effective From date is required"
954
- ), r.validUntil = W().when(
956
+ ), i.validUntil = qe().when(
955
957
  "checkClosed",
956
- (s, d, { parent: c }) => (c == null ? void 0 : c.checkClosed) ? d.required("valid Until date is required").test(
958
+ (u, d, { parent: c }) => (c == null ? void 0 : c.checkClosed) ? d.required("valid Until date is required").test(
957
959
  "is-after-startDate",
958
960
  "valid Until date must be greater than or equal to Start date",
959
961
  function(b) {
960
- const T = this.parent.effectiveFrom;
961
- return !T || !b ? !0 : new Date(b) >= new Date(T);
962
+ const w = this.parent.effectiveFrom;
963
+ return !w || !b ? !0 : new Date(b) >= new Date(w);
962
964
  }
963
965
  ) : d.notRequired()
964
966
  ));
965
- const p = M(r);
966
- return o = xe({
967
- initialValues: i,
968
- validationSchema: p,
967
+ const s = oe(i);
968
+ return o = Kt({
969
+ initialValues: r,
970
+ validationSchema: s,
969
971
  validateOnBlur: !0,
970
- onSubmit: (s) => {
972
+ onSubmit: (u) => {
971
973
  var c;
972
974
  const d = {
973
- ...t,
974
- ruleName: s.ruleName,
975
- decisionDataType: s.decisionDataType,
976
- howToSetTheDecision: s.howToSetTheDecision,
977
- value: s.value,
978
- effectiveFrom: s.effectiveFrom,
979
- validUntil: s.validUntil,
980
- conditionsThatEstablishesTheDecision: (c = t.conditionsThatEstablishesTheDecision) == null ? void 0 : c.filter((l) => {
981
- const b = s.conditionsThatEstablishesTheDecision[l.conditionName];
975
+ ...e,
976
+ ruleName: u.ruleName,
977
+ decisionDataType: u.decisionDataType,
978
+ howToSetTheDecision: u.howToSetTheDecision,
979
+ value: u.value,
980
+ effectiveFrom: u.effectiveFrom,
981
+ validUntil: u.validUntil,
982
+ conditionsThatEstablishesTheDecision: (c = e.conditionsThatEstablishesTheDecision) == null ? void 0 : c.filter((f) => {
983
+ const b = u.conditionsThatEstablishesTheDecision[f.conditionName];
982
984
  return b != null && b !== "";
983
- }).map((l) => ({
984
- ...l,
985
- value: s.conditionsThatEstablishesTheDecision[l.conditionName]
985
+ }).map((f) => ({
986
+ ...f,
987
+ value: u.conditionsThatEstablishesTheDecision[f.conditionName]
986
988
  }))
987
989
  };
988
- e(d);
990
+ t(d);
989
991
  }
990
- }), { formik: o, handleToggleNoneChange: (s) => {
992
+ }), { formik: o, handleToggleNoneChange: (u) => {
991
993
  var d;
992
- o.setFieldValue("toggleNone", s), (d = t.conditionsThatEstablishesTheDecision) == null || d.forEach((c) => {
993
- if (s)
994
+ o.setFieldValue("toggleNone", u), (d = e.conditionsThatEstablishesTheDecision) == null || d.forEach((c) => {
995
+ if (u)
994
996
  o.setFieldValue(
995
997
  `conditionsThatEstablishesTheDecision.${c.conditionName}`,
996
998
  void 0
997
999
  );
998
1000
  else {
999
- const l = c.howToSetTheCondition === x.LIST_OF_VALUES_MULTI ? [] : "";
1001
+ const f = c.howToSetTheCondition === O.LIST_OF_VALUES_MULTI ? [] : "";
1000
1002
  o.setFieldValue(
1001
1003
  `conditionsThatEstablishesTheDecision.${c.conditionName}`,
1002
- l
1004
+ f
1003
1005
  );
1004
1006
  }
1005
1007
  });
1006
1008
  } };
1007
1009
  }
1008
- const Xe = f.div`
1010
+ const Dn = D.div`
1009
1011
  & > div {
1010
1012
  border-radius: 8px;
1011
1013
  border: 1px solid
1012
- ${({ theme: t }) => {
1013
- var e, n;
1014
- return ((n = (e = t == null ? void 0 : t.palette) == null ? void 0 : e.neutral) == null ? void 0 : n.N30) || v.palette.neutral.N30;
1014
+ ${({ theme: e }) => {
1015
+ var t, n;
1016
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || U.palette.neutral.N30;
1015
1017
  }};
1016
1018
  }
1017
- `, Ze = f.div`
1019
+ `, On = D.div`
1018
1020
  width: 100%;
1019
1021
  height: 100%;
1020
1022
  overflow-y: auto;
@@ -1031,61 +1033,61 @@ const Xe = f.div`
1031
1033
  background-color: #ebecf0;
1032
1034
  border-radius: 8px;
1033
1035
  }
1034
- `, et = (t) => {
1036
+ `, kn = (e) => {
1035
1037
  const {
1036
- checked: e,
1038
+ checked: t,
1037
1039
  children: n,
1038
- handleToggleChange: i,
1040
+ handleToggleChange: r,
1039
1041
  id: o,
1040
- labelToggle: r,
1041
- name: p,
1042
- valueToggle: g = ""
1043
- } = t, [s, d] = V(e), c = (l) => {
1044
- d(l.target.checked), i(l);
1042
+ labelToggle: i,
1043
+ name: s,
1044
+ valueToggle: l = ""
1045
+ } = e, [u, d] = ie(t), c = (f) => {
1046
+ d(f.target.checked), r(f);
1045
1047
  };
1046
- return ye(() => {
1047
- d(e);
1048
- }, [e]), /* @__PURE__ */ u(E, { children: [
1049
- /* @__PURE__ */ a(h, { children: /* @__PURE__ */ a(
1050
- ie,
1048
+ return Gt(() => {
1049
+ d(t);
1050
+ }, [t]), /* @__PURE__ */ E(q, { children: [
1051
+ /* @__PURE__ */ h(T, { children: /* @__PURE__ */ h(
1052
+ dt,
1051
1053
  {
1052
- checked: s,
1054
+ checked: u,
1053
1055
  id: o,
1054
- name: p,
1056
+ name: s,
1055
1057
  onChange: c,
1056
1058
  size: "small",
1057
- value: g,
1058
- children: /* @__PURE__ */ a(y, { size: "medium", type: "label", weight: "bold", children: r })
1059
+ value: l,
1060
+ children: /* @__PURE__ */ h(k, { size: "medium", type: "label", weight: "bold", children: i })
1059
1061
  }
1060
1062
  ) }),
1061
- s && /* @__PURE__ */ a(E, { children: n })
1063
+ u && /* @__PURE__ */ h(q, { children: n })
1062
1064
  ] });
1063
- }, tt = (t) => {
1065
+ }, vn = (e) => {
1064
1066
  const {
1065
- onHandleStartChange: e,
1067
+ onHandleStartChange: t,
1066
1068
  onHandleEndChange: n,
1067
- onCheckClosedChange: i,
1069
+ onCheckClosedChange: r,
1068
1070
  labelStart: o,
1069
- labelEnd: r,
1070
- checkedClosed: p = !1,
1071
- required: g = !1,
1072
- valueStart: s = "",
1071
+ labelEnd: i,
1072
+ checkedClosed: s = !1,
1073
+ required: l = !1,
1074
+ valueStart: u = "",
1073
1075
  valueEnd: d = "",
1074
1076
  messageStart: c = "",
1075
- messageEnd: l = "",
1077
+ messageEnd: f = "",
1076
1078
  statusStart: b = "pending",
1077
- statusEnd: T = "pending"
1078
- } = t, [m, C] = V(p), [w, F] = V(s), [U, R] = V(d), P = ({ target: S }) => {
1079
- C(S.checked), i && i(S.checked);
1080
- }, de = (S) => {
1081
- F(S.target.value), e(S);
1082
- }, se = (S) => {
1083
- R(S.target.value), n(S);
1084
- }, ce = I("(max-width: 400px)");
1085
- return /* @__PURE__ */ u(E, { children: [
1086
- /* @__PURE__ */ u(h, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1087
- /* @__PURE__ */ a(
1088
- y,
1079
+ statusEnd: w = "pending"
1080
+ } = e, [p, g] = ie(s), [m, S] = ie(u), [x, C] = ie(d), L = ({ target: _ }) => {
1081
+ g(_.checked), r && r(_.checked);
1082
+ }, A = (_) => {
1083
+ S(_.target.value), t(_);
1084
+ }, B = (_) => {
1085
+ C(_.target.value), n(_);
1086
+ }, I = Y("(max-width: 400px)");
1087
+ return /* @__PURE__ */ E(q, { children: [
1088
+ /* @__PURE__ */ E(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1089
+ /* @__PURE__ */ h(
1090
+ k,
1089
1091
  {
1090
1092
  appearance: "gray",
1091
1093
  margin: "10px 0",
@@ -1095,253 +1097,2004 @@ const Xe = f.div`
1095
1097
  children: "Vigencia"
1096
1098
  }
1097
1099
  ),
1098
- /* @__PURE__ */ a(
1099
- h,
1100
+ /* @__PURE__ */ h(
1101
+ T,
1100
1102
  {
1101
1103
  alignContent: "center",
1102
1104
  justifyContent: "center",
1103
1105
  wrap: "wrap",
1104
1106
  gap: "4px",
1105
- children: /* @__PURE__ */ a(
1106
- Te,
1107
+ children: /* @__PURE__ */ h(
1108
+ Jt,
1107
1109
  {
1108
1110
  label: "Cerrada",
1109
- onChange: P,
1110
- checked: m,
1111
+ onChange: L,
1112
+ checked: p,
1111
1113
  value: ""
1112
1114
  }
1113
1115
  )
1114
1116
  }
1115
1117
  )
1116
1118
  ] }),
1117
- /* @__PURE__ */ u(
1118
- h,
1119
+ /* @__PURE__ */ E(
1120
+ T,
1119
1121
  {
1120
- direction: ce ? "column" : "row",
1122
+ direction: I ? "column" : "row",
1121
1123
  justifyContent: "space-between",
1122
1124
  gap: "24px",
1123
1125
  children: [
1124
- /* @__PURE__ */ a(
1125
- G,
1126
+ /* @__PURE__ */ h(
1127
+ je,
1126
1128
  {
1127
1129
  id: "dateStart",
1128
1130
  label: o,
1129
- onChange: de,
1130
- value: w,
1131
- required: g,
1131
+ onChange: A,
1132
+ value: m,
1133
+ required: l,
1132
1134
  size: "compact",
1133
1135
  status: b,
1134
1136
  message: c
1135
1137
  }
1136
1138
  ),
1137
- m && /* @__PURE__ */ a(
1138
- G,
1139
+ p && /* @__PURE__ */ h(
1140
+ je,
1139
1141
  {
1140
1142
  id: "dateEnd",
1141
- label: r,
1142
- onChange: se,
1143
- value: U,
1144
- required: g,
1143
+ label: i,
1144
+ onChange: B,
1145
+ value: x,
1146
+ required: l,
1145
1147
  size: "compact",
1146
- status: T,
1147
- message: l
1148
+ status: w,
1149
+ message: f
1148
1150
  }
1149
1151
  )
1150
1152
  ]
1151
1153
  }
1152
1154
  )
1153
1155
  ] });
1154
- }, nt = (t) => {
1156
+ }, Fn = (e) => {
1155
1157
  const {
1156
- formik: e,
1158
+ formik: t,
1157
1159
  textValues: n,
1158
- onCancel: i,
1160
+ onCancel: r,
1159
1161
  visibleConditions: o,
1160
- normalizedDecision: r,
1161
- handleToggleNoneChange: p,
1162
- handleConditionToggleChange: g,
1163
- showConditionsError: s,
1162
+ normalizedDecision: i,
1163
+ handleToggleNoneChange: s,
1164
+ handleConditionToggleChange: l,
1165
+ showConditionsError: u,
1164
1166
  termStartStatus: d,
1165
1167
  termEndStatus: c
1166
- } = t;
1167
- return /* @__PURE__ */ a("form", { onSubmit: e.handleSubmit, children: /* @__PURE__ */ u(h, { direction: "column", gap: "24px", children: [
1168
- Q({
1169
- condition: r,
1170
- formik: e,
1168
+ } = e;
1169
+ return /* @__PURE__ */ h("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ E(T, { direction: "column", gap: "24px", children: [
1170
+ Ie({
1171
+ condition: i,
1172
+ formik: t,
1171
1173
  isDecision: !0
1172
1174
  }),
1173
- /* @__PURE__ */ a(D, { dashed: !0 }),
1174
- /* @__PURE__ */ a(Xe, { children: /* @__PURE__ */ a(Ze, { children: /* @__PURE__ */ u(
1175
- h,
1175
+ /* @__PURE__ */ h($, { dashed: !0 }),
1176
+ /* @__PURE__ */ h(Dn, { children: /* @__PURE__ */ h(On, { children: /* @__PURE__ */ E(
1177
+ T,
1176
1178
  {
1177
1179
  direction: "column",
1178
1180
  padding: "6px 12px",
1179
1181
  gap: "16px",
1180
1182
  height: "272px",
1181
1183
  children: [
1182
- /* @__PURE__ */ u(
1183
- h,
1184
+ /* @__PURE__ */ E(
1185
+ T,
1184
1186
  {
1185
1187
  justifyContent: "space-between",
1186
1188
  alignItems: "center",
1187
1189
  gap: "64px",
1188
1190
  children: [
1189
- /* @__PURE__ */ a(y, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
1190
- /* @__PURE__ */ a(
1191
- ie,
1191
+ /* @__PURE__ */ h(k, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
1192
+ /* @__PURE__ */ h(
1193
+ dt,
1192
1194
  {
1193
1195
  id: "toggleNone",
1194
- onChange: () => p(!e.values.toggleNone),
1195
- checked: e.values.toggleNone,
1196
+ onChange: () => s(!t.values.toggleNone),
1197
+ checked: t.values.toggleNone,
1196
1198
  size: "small",
1197
- children: /* @__PURE__ */ a(y, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
1199
+ children: /* @__PURE__ */ h(k, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
1198
1200
  }
1199
1201
  )
1200
1202
  ]
1201
1203
  }
1202
1204
  ),
1203
- /* @__PURE__ */ a(h, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((l) => /* @__PURE__ */ a(
1204
- et,
1205
+ /* @__PURE__ */ h(T, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((f) => /* @__PURE__ */ h(
1206
+ kn,
1205
1207
  {
1206
- id: `toggle-${l.conditionName}`,
1207
- name: `toggle.${l.conditionName}`,
1208
- labelToggle: l.labelName,
1209
- checked: !e.values.toggleNone && e.values.conditionsThatEstablishesTheDecision[l.conditionName] !== void 0,
1210
- handleToggleChange: (b) => g(
1211
- l.conditionName,
1212
- l.howToSetTheCondition === x.LIST_OF_VALUES_MULTI
1208
+ id: `toggle-${f.conditionName}`,
1209
+ name: `toggle.${f.conditionName}`,
1210
+ labelToggle: f.labelName,
1211
+ checked: !t.values.toggleNone && t.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0,
1212
+ handleToggleChange: (b) => l(
1213
+ f.conditionName,
1214
+ f.howToSetTheCondition === O.LIST_OF_VALUES_MULTI
1213
1215
  )(b.target.checked),
1214
- children: Q({ condition: l, formik: e })
1216
+ children: Ie({ condition: f, formik: t })
1215
1217
  },
1216
- l.conditionName
1218
+ f.conditionName
1217
1219
  )) })
1218
1220
  ]
1219
1221
  }
1220
1222
  ) }) }),
1221
- n.terms && /* @__PURE__ */ u(E, { children: [
1222
- /* @__PURE__ */ a(D, { dashed: !0 }),
1223
- /* @__PURE__ */ a(
1224
- tt,
1223
+ n.terms && /* @__PURE__ */ E(q, { children: [
1224
+ /* @__PURE__ */ h($, { dashed: !0 }),
1225
+ /* @__PURE__ */ h(
1226
+ vn,
1225
1227
  {
1226
1228
  labelStart: n.termStart,
1227
1229
  labelEnd: n.termEnd,
1228
- valueStart: e.values.effectiveFrom,
1229
- valueEnd: e.values.validUntil,
1230
- messageStart: e.errors.effectiveFrom,
1231
- messageEnd: e.errors.validUntil,
1230
+ valueStart: t.values.effectiveFrom,
1231
+ valueEnd: t.values.validUntil,
1232
+ messageStart: t.errors.effectiveFrom,
1233
+ messageEnd: t.errors.validUntil,
1232
1234
  statusStart: d,
1233
1235
  statusEnd: c,
1234
- onHandleStartChange: (l) => e.setFieldValue("effectiveFrom", l.target.value),
1235
- onHandleEndChange: (l) => e.setFieldValue("validUntil", l.target.value),
1236
- onCheckClosedChange: (l) => {
1237
- e.setFieldValue("checkClosed", l), l && e.setFieldValue("validUntil", "");
1236
+ onHandleStartChange: (f) => t.setFieldValue("effectiveFrom", f.target.value),
1237
+ onHandleEndChange: (f) => t.setFieldValue("validUntil", f.target.value),
1238
+ onCheckClosedChange: (f) => {
1239
+ t.setFieldValue("checkClosed", f), f && t.setFieldValue("validUntil", "");
1238
1240
  },
1239
- checkedClosed: e.values.checkClosed
1241
+ checkedClosed: t.values.checkClosed
1240
1242
  }
1241
1243
  )
1242
1244
  ] }),
1243
- /* @__PURE__ */ a(D, {}),
1244
- s && /* @__PURE__ */ a(y, { type: "label", size: "medium", appearance: "danger", children: String(e.errors.conditionsThatEstablishesTheDecision) }),
1245
- /* @__PURE__ */ u(h, { direction: "row", justifyContent: "end", gap: "16px", children: [
1246
- /* @__PURE__ */ a(N, { appearance: "gray", onClick: i, children: n.cancel }),
1247
- /* @__PURE__ */ a(N, { type: "submit", children: n.confirm })
1245
+ /* @__PURE__ */ h($, {}),
1246
+ u && /* @__PURE__ */ h(k, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
1247
+ /* @__PURE__ */ E(T, { direction: "row", justifyContent: "end", gap: "16px", children: [
1248
+ /* @__PURE__ */ h(z, { appearance: "gray", onClick: r, children: n.cancel }),
1249
+ /* @__PURE__ */ h(z, { type: "submit", children: n.confirm })
1248
1250
  ] })
1249
1251
  ] }) });
1250
- }, it = (t) => {
1251
- var T;
1252
- const { decision: e, onSubmitEvent: n, textValues: i, onCancel: o } = t, { formik: r, handleToggleNoneChange: p } = Ke({
1253
- decision: e,
1252
+ }, _n = (e) => {
1253
+ var w;
1254
+ const { decision: t, onSubmitEvent: n, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = Nn({
1255
+ decision: t,
1254
1256
  onSubmitEvent: n,
1255
- textValues: i
1256
- }), g = {
1257
- ruleName: e.ruleName,
1258
- labelName: e.labelName,
1259
- howToSetTheCondition: e.howToSetTheDecision,
1260
- decisionDataType: e.decisionDataType,
1261
- listOfPossibleValues: e.listOfPossibleValues
1262
- }, s = ((T = e.conditionsThatEstablishesTheDecision) == null ? void 0 : T.filter(
1263
- (m) => !m.hidden
1264
- )) || [], d = !!r.errors.conditionsThatEstablishesTheDecision && r.submitCount > 0, c = r.touched.effectiveFrom ? r.errors.effectiveFrom ? "invalid" : "valid" : void 0, l = r.touched.validUntil ? r.errors.validUntil ? "invalid" : "valid" : void 0;
1265
- return /* @__PURE__ */ a(
1266
- nt,
1257
+ textValues: r
1258
+ }), l = {
1259
+ ruleName: t.ruleName,
1260
+ labelName: t.labelName,
1261
+ howToSetTheCondition: t.howToSetTheDecision,
1262
+ decisionDataType: t.decisionDataType,
1263
+ listOfPossibleValues: t.listOfPossibleValues
1264
+ }, u = ((w = t.conditionsThatEstablishesTheDecision) == null ? void 0 : w.filter(
1265
+ (p) => !p.hidden
1266
+ )) || [], d = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, c = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, f = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
1267
+ return /* @__PURE__ */ h(
1268
+ Fn,
1267
1269
  {
1268
- formik: r,
1270
+ formik: i,
1269
1271
  onCancel: o,
1270
- textValues: i,
1271
- decision: e,
1272
- visibleConditions: s,
1273
- normalizedDecision: g,
1274
- handleToggleNoneChange: p,
1275
- handleConditionToggleChange: (m, C) => (w) => {
1276
- if (!w)
1277
- r.setFieldValue(
1278
- `conditionsThatEstablishesTheDecision.${m}`,
1272
+ textValues: r,
1273
+ decision: t,
1274
+ visibleConditions: u,
1275
+ normalizedDecision: l,
1276
+ handleToggleNoneChange: s,
1277
+ handleConditionToggleChange: (p, g) => (m) => {
1278
+ if (!m)
1279
+ i.setFieldValue(
1280
+ `conditionsThatEstablishesTheDecision.${p}`,
1279
1281
  void 0
1280
- ), r.setFieldTouched(
1281
- `conditionsThatEstablishesTheDecision.${m}`,
1282
+ ), i.setFieldTouched(
1283
+ `conditionsThatEstablishesTheDecision.${p}`,
1282
1284
  !1,
1283
1285
  !1
1284
1286
  );
1285
1287
  else {
1286
- const F = C ? [] : "";
1287
- r.setFieldValue(
1288
- `conditionsThatEstablishesTheDecision.${m}`,
1289
- F
1288
+ const S = g ? [] : "";
1289
+ i.setFieldValue(
1290
+ `conditionsThatEstablishesTheDecision.${p}`,
1291
+ S
1290
1292
  );
1291
1293
  }
1292
1294
  },
1293
1295
  showConditionsError: d,
1294
1296
  termStartStatus: c,
1295
- termEndStatus: l
1297
+ termEndStatus: f
1296
1298
  }
1297
1299
  );
1298
- }, yt = (t) => {
1300
+ }, Uo = (e) => {
1299
1301
  var o;
1300
- const { decisionTemplate: e } = t, n = { ...e }, i = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1301
- (r) => r.switchPlaces
1302
+ const { decisionTemplate: t } = e, n = { ...t }, r = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1303
+ (i) => i.switchPlaces
1302
1304
  );
1303
- return i ? {
1305
+ return r ? {
1304
1306
  ...n,
1305
- ruleName: i.conditionName,
1306
- labelName: i.labelName,
1307
- decisionDataType: i.conditionDataType,
1308
- value: i.value,
1309
- howToSetTheDecision: i.howToSetTheCondition,
1307
+ ruleName: r.conditionName,
1308
+ labelName: r.labelName,
1309
+ decisionDataType: r.conditionDataType,
1310
+ value: r.value,
1311
+ howToSetTheDecision: r.howToSetTheCondition,
1310
1312
  conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
1311
- (r) => r.conditionName === i.conditionName ? { ...r, hidden: !0 } : r
1313
+ (i) => i.conditionName === r.conditionName ? { ...i, hidden: !0 } : i
1312
1314
  )
1313
1315
  } : n;
1314
- }, vt = (t) => {
1315
- const { decisions: e } = t;
1316
- return e == null ? void 0 : e.map((n) => {
1316
+ }, Po = (e) => {
1317
+ const { decisions: t } = e;
1318
+ return t == null ? void 0 : t.map((n) => {
1317
1319
  var o;
1318
- const i = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1319
- (r) => r.switchPlaces
1320
+ const r = (o = n.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1321
+ (i) => i.switchPlaces
1320
1322
  );
1321
- return i ? {
1323
+ return r ? {
1322
1324
  ...n,
1323
- ruleName: i.conditionName,
1324
- labelName: i.labelName,
1325
- decisionDataType: i.conditionDataType,
1326
- value: i.value,
1327
- howToSetTheDecision: i.howToSetTheCondition,
1325
+ ruleName: r.conditionName,
1326
+ labelName: r.labelName,
1327
+ decisionDataType: r.conditionDataType,
1328
+ value: r.value,
1329
+ howToSetTheDecision: r.howToSetTheCondition,
1328
1330
  conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
1329
- (r) => r.conditionName === i.conditionName ? { ...r, hidden: !0 } : r
1331
+ (i) => i.conditionName === r.conditionName ? { ...i, hidden: !0 } : i
1330
1332
  )
1331
1333
  } : n;
1332
1334
  });
1333
1335
  };
1336
+ function mt(e, t) {
1337
+ return function() {
1338
+ return e.apply(t, arguments);
1339
+ };
1340
+ }
1341
+ const { toString: Ln } = Object.prototype, { getPrototypeOf: Le } = Object, { iterator: fe, toStringTag: gt } = Symbol, he = /* @__PURE__ */ ((e) => (t) => {
1342
+ const n = Ln.call(t);
1343
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
1344
+ })(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => he(t) === e), pe = (e) => (t) => typeof t === e, { isArray: W } = Array, ee = pe("undefined");
1345
+ function Un(e) {
1346
+ return e !== null && !ee(e) && e.constructor !== null && !ee(e.constructor) && v(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1347
+ }
1348
+ const bt = P("ArrayBuffer");
1349
+ function Pn(e) {
1350
+ let t;
1351
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && bt(e.buffer), t;
1352
+ }
1353
+ const Bn = pe("string"), v = pe("function"), yt = pe("number"), me = (e) => e !== null && typeof e == "object", jn = (e) => e === !0 || e === !1, se = (e) => {
1354
+ if (he(e) !== "object")
1355
+ return !1;
1356
+ const t = Le(e);
1357
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(gt in e) && !(fe in e);
1358
+ }, In = P("Date"), $n = P("File"), qn = P("Blob"), Mn = P("FileList"), Hn = (e) => me(e) && v(e.pipe), zn = (e) => {
1359
+ let t;
1360
+ return e && (typeof FormData == "function" && e instanceof FormData || v(e.append) && ((t = he(e)) === "formdata" || // detect form-data instance
1361
+ t === "object" && v(e.toString) && e.toString() === "[object FormData]"));
1362
+ }, Vn = P("URLSearchParams"), [Jn, Wn, Kn, Gn] = ["ReadableStream", "Request", "Response", "Headers"].map(P), Xn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1363
+ function te(e, t, { allOwnKeys: n = !1 } = {}) {
1364
+ if (e === null || typeof e > "u")
1365
+ return;
1366
+ let r, o;
1367
+ if (typeof e != "object" && (e = [e]), W(e))
1368
+ for (r = 0, o = e.length; r < o; r++)
1369
+ t.call(null, e[r], r, e);
1370
+ else {
1371
+ const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = i.length;
1372
+ let l;
1373
+ for (r = 0; r < s; r++)
1374
+ l = i[r], t.call(null, e[l], l, e);
1375
+ }
1376
+ }
1377
+ function wt(e, t) {
1378
+ t = t.toLowerCase();
1379
+ const n = Object.keys(e);
1380
+ let r = n.length, o;
1381
+ for (; r-- > 0; )
1382
+ if (o = n[r], t === o.toLowerCase())
1383
+ return o;
1384
+ return null;
1385
+ }
1386
+ const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tt = (e) => !ee(e) && e !== M;
1387
+ function Ae() {
1388
+ const { caseless: e } = Tt(this) && this || {}, t = {}, n = (r, o) => {
1389
+ const i = e && wt(t, o) || o;
1390
+ se(t[i]) && se(r) ? t[i] = Ae(t[i], r) : se(r) ? t[i] = Ae({}, r) : W(r) ? t[i] = r.slice() : t[i] = r;
1391
+ };
1392
+ for (let r = 0, o = arguments.length; r < o; r++)
1393
+ arguments[r] && te(arguments[r], n);
1394
+ return t;
1395
+ }
1396
+ const Qn = (e, t, n, { allOwnKeys: r } = {}) => (te(t, (o, i) => {
1397
+ n && v(o) ? e[i] = mt(o, n) : e[i] = o;
1398
+ }, { allOwnKeys: r }), e), Zn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Yn = (e, t, n, r) => {
1399
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
1400
+ value: t.prototype
1401
+ }), n && Object.assign(e.prototype, n);
1402
+ }, er = (e, t, n, r) => {
1403
+ let o, i, s;
1404
+ const l = {};
1405
+ if (t = t || {}, e == null) return t;
1406
+ do {
1407
+ for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0; )
1408
+ s = o[i], (!r || r(s, e, t)) && !l[s] && (t[s] = e[s], l[s] = !0);
1409
+ e = n !== !1 && Le(e);
1410
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
1411
+ return t;
1412
+ }, tr = (e, t, n) => {
1413
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
1414
+ const r = e.indexOf(t, n);
1415
+ return r !== -1 && r === n;
1416
+ }, nr = (e) => {
1417
+ if (!e) return null;
1418
+ if (W(e)) return e;
1419
+ let t = e.length;
1420
+ if (!yt(t)) return null;
1421
+ const n = new Array(t);
1422
+ for (; t-- > 0; )
1423
+ n[t] = e[t];
1424
+ return n;
1425
+ }, rr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Le(Uint8Array)), or = (e, t) => {
1426
+ const r = (e && e[fe]).call(e);
1427
+ let o;
1428
+ for (; (o = r.next()) && !o.done; ) {
1429
+ const i = o.value;
1430
+ t.call(e, i[0], i[1]);
1431
+ }
1432
+ }, ir = (e, t) => {
1433
+ let n;
1434
+ const r = [];
1435
+ for (; (n = e.exec(t)) !== null; )
1436
+ r.push(n);
1437
+ return r;
1438
+ }, sr = P("HTMLFormElement"), ar = (e) => e.toLowerCase().replace(
1439
+ /[-_\s]([a-z\d])(\w*)/g,
1440
+ function(n, r, o) {
1441
+ return r.toUpperCase() + o;
1442
+ }
1443
+ ), Ve = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), lr = P("RegExp"), Et = (e, t) => {
1444
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
1445
+ te(n, (o, i) => {
1446
+ let s;
1447
+ (s = t(o, i, e)) !== !1 && (r[i] = s || o);
1448
+ }), Object.defineProperties(e, r);
1449
+ }, cr = (e) => {
1450
+ Et(e, (t, n) => {
1451
+ if (v(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1452
+ return !1;
1453
+ const r = e[n];
1454
+ if (v(r)) {
1455
+ if (t.enumerable = !1, "writable" in t) {
1456
+ t.writable = !1;
1457
+ return;
1458
+ }
1459
+ t.set || (t.set = () => {
1460
+ throw Error("Can not rewrite read-only method '" + n + "'");
1461
+ });
1462
+ }
1463
+ });
1464
+ }, dr = (e, t) => {
1465
+ const n = {}, r = (o) => {
1466
+ o.forEach((i) => {
1467
+ n[i] = !0;
1468
+ });
1469
+ };
1470
+ return W(e) ? r(e) : r(String(e).split(t)), n;
1471
+ }, ur = () => {
1472
+ }, fr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1473
+ function hr(e) {
1474
+ return !!(e && v(e.append) && e[gt] === "FormData" && e[fe]);
1475
+ }
1476
+ const pr = (e) => {
1477
+ const t = new Array(10), n = (r, o) => {
1478
+ if (me(r)) {
1479
+ if (t.indexOf(r) >= 0)
1480
+ return;
1481
+ if (!("toJSON" in r)) {
1482
+ t[o] = r;
1483
+ const i = W(r) ? [] : {};
1484
+ return te(r, (s, l) => {
1485
+ const u = n(s, o + 1);
1486
+ !ee(u) && (i[l] = u);
1487
+ }), t[o] = void 0, i;
1488
+ }
1489
+ }
1490
+ return r;
1491
+ };
1492
+ return n(e, 0);
1493
+ }, mr = P("AsyncFunction"), gr = (e) => e && (me(e) || v(e)) && v(e.then) && v(e.catch), St = ((e, t) => e ? setImmediate : t ? ((n, r) => (M.addEventListener("message", ({ source: o, data: i }) => {
1494
+ o === M && i === n && r.length && r.shift()();
1495
+ }, !1), (o) => {
1496
+ r.push(o), M.postMessage(n, "*");
1497
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1498
+ typeof setImmediate == "function",
1499
+ v(M.postMessage)
1500
+ ), br = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || St, yr = (e) => e != null && v(e[fe]), a = {
1501
+ isArray: W,
1502
+ isArrayBuffer: bt,
1503
+ isBuffer: Un,
1504
+ isFormData: zn,
1505
+ isArrayBufferView: Pn,
1506
+ isString: Bn,
1507
+ isNumber: yt,
1508
+ isBoolean: jn,
1509
+ isObject: me,
1510
+ isPlainObject: se,
1511
+ isReadableStream: Jn,
1512
+ isRequest: Wn,
1513
+ isResponse: Kn,
1514
+ isHeaders: Gn,
1515
+ isUndefined: ee,
1516
+ isDate: In,
1517
+ isFile: $n,
1518
+ isBlob: qn,
1519
+ isRegExp: lr,
1520
+ isFunction: v,
1521
+ isStream: Hn,
1522
+ isURLSearchParams: Vn,
1523
+ isTypedArray: rr,
1524
+ isFileList: Mn,
1525
+ forEach: te,
1526
+ merge: Ae,
1527
+ extend: Qn,
1528
+ trim: Xn,
1529
+ stripBOM: Zn,
1530
+ inherits: Yn,
1531
+ toFlatObject: er,
1532
+ kindOf: he,
1533
+ kindOfTest: P,
1534
+ endsWith: tr,
1535
+ toArray: nr,
1536
+ forEachEntry: or,
1537
+ matchAll: ir,
1538
+ isHTMLForm: sr,
1539
+ hasOwnProperty: Ve,
1540
+ hasOwnProp: Ve,
1541
+ // an alias to avoid ESLint no-prototype-builtins detection
1542
+ reduceDescriptors: Et,
1543
+ freezeMethods: cr,
1544
+ toObjectSet: dr,
1545
+ toCamelCase: ar,
1546
+ noop: ur,
1547
+ toFiniteNumber: fr,
1548
+ findKey: wt,
1549
+ global: M,
1550
+ isContextDefined: Tt,
1551
+ isSpecCompliantForm: hr,
1552
+ toJSONObject: pr,
1553
+ isAsyncFn: mr,
1554
+ isThenable: gr,
1555
+ setImmediate: St,
1556
+ asap: br,
1557
+ isIterable: yr
1558
+ };
1559
+ function y(e, t, n, r, o) {
1560
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
1561
+ }
1562
+ a.inherits(y, Error, {
1563
+ toJSON: function() {
1564
+ return {
1565
+ // Standard
1566
+ message: this.message,
1567
+ name: this.name,
1568
+ // Microsoft
1569
+ description: this.description,
1570
+ number: this.number,
1571
+ // Mozilla
1572
+ fileName: this.fileName,
1573
+ lineNumber: this.lineNumber,
1574
+ columnNumber: this.columnNumber,
1575
+ stack: this.stack,
1576
+ // Axios
1577
+ config: a.toJSONObject(this.config),
1578
+ code: this.code,
1579
+ status: this.status
1580
+ };
1581
+ }
1582
+ });
1583
+ const xt = y.prototype, Ct = {};
1584
+ [
1585
+ "ERR_BAD_OPTION_VALUE",
1586
+ "ERR_BAD_OPTION",
1587
+ "ECONNABORTED",
1588
+ "ETIMEDOUT",
1589
+ "ERR_NETWORK",
1590
+ "ERR_FR_TOO_MANY_REDIRECTS",
1591
+ "ERR_DEPRECATED",
1592
+ "ERR_BAD_RESPONSE",
1593
+ "ERR_BAD_REQUEST",
1594
+ "ERR_CANCELED",
1595
+ "ERR_NOT_SUPPORT",
1596
+ "ERR_INVALID_URL"
1597
+ // eslint-disable-next-line func-names
1598
+ ].forEach((e) => {
1599
+ Ct[e] = { value: e };
1600
+ });
1601
+ Object.defineProperties(y, Ct);
1602
+ Object.defineProperty(xt, "isAxiosError", { value: !0 });
1603
+ y.from = (e, t, n, r, o, i) => {
1604
+ const s = Object.create(xt);
1605
+ return a.toFlatObject(e, s, function(u) {
1606
+ return u !== Error.prototype;
1607
+ }, (l) => l !== "isAxiosError"), y.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, i && Object.assign(s, i), s;
1608
+ };
1609
+ const wr = null;
1610
+ function Ne(e) {
1611
+ return a.isPlainObject(e) || a.isArray(e);
1612
+ }
1613
+ function Rt(e) {
1614
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
1615
+ }
1616
+ function Je(e, t, n) {
1617
+ return e ? e.concat(t).map(function(o, i) {
1618
+ return o = Rt(o), !n && i ? "[" + o + "]" : o;
1619
+ }).join(n ? "." : "") : t;
1620
+ }
1621
+ function Tr(e) {
1622
+ return a.isArray(e) && !e.some(Ne);
1623
+ }
1624
+ const Er = a.toFlatObject(a, {}, null, function(t) {
1625
+ return /^is[A-Z]/.test(t);
1626
+ });
1627
+ function ge(e, t, n) {
1628
+ if (!a.isObject(e))
1629
+ throw new TypeError("target must be an object");
1630
+ t = t || new FormData(), n = a.toFlatObject(n, {
1631
+ metaTokens: !0,
1632
+ dots: !1,
1633
+ indexes: !1
1634
+ }, !1, function(g, m) {
1635
+ return !a.isUndefined(m[g]);
1636
+ });
1637
+ const r = n.metaTokens, o = n.visitor || c, i = n.dots, s = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
1638
+ if (!a.isFunction(o))
1639
+ throw new TypeError("visitor must be a function");
1640
+ function d(p) {
1641
+ if (p === null) return "";
1642
+ if (a.isDate(p))
1643
+ return p.toISOString();
1644
+ if (!u && a.isBlob(p))
1645
+ throw new y("Blob is not supported. Use a Buffer instead.");
1646
+ return a.isArrayBuffer(p) || a.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
1647
+ }
1648
+ function c(p, g, m) {
1649
+ let S = p;
1650
+ if (p && !m && typeof p == "object") {
1651
+ if (a.endsWith(g, "{}"))
1652
+ g = r ? g : g.slice(0, -2), p = JSON.stringify(p);
1653
+ else if (a.isArray(p) && Tr(p) || (a.isFileList(p) || a.endsWith(g, "[]")) && (S = a.toArray(p)))
1654
+ return g = Rt(g), S.forEach(function(C, L) {
1655
+ !(a.isUndefined(C) || C === null) && t.append(
1656
+ // eslint-disable-next-line no-nested-ternary
1657
+ s === !0 ? Je([g], L, i) : s === null ? g : g + "[]",
1658
+ d(C)
1659
+ );
1660
+ }), !1;
1661
+ }
1662
+ return Ne(p) ? !0 : (t.append(Je(m, g, i), d(p)), !1);
1663
+ }
1664
+ const f = [], b = Object.assign(Er, {
1665
+ defaultVisitor: c,
1666
+ convertValue: d,
1667
+ isVisitable: Ne
1668
+ });
1669
+ function w(p, g) {
1670
+ if (!a.isUndefined(p)) {
1671
+ if (f.indexOf(p) !== -1)
1672
+ throw Error("Circular reference detected in " + g.join("."));
1673
+ f.push(p), a.forEach(p, function(S, x) {
1674
+ (!(a.isUndefined(S) || S === null) && o.call(
1675
+ t,
1676
+ S,
1677
+ a.isString(x) ? x.trim() : x,
1678
+ g,
1679
+ b
1680
+ )) === !0 && w(S, g ? g.concat(x) : [x]);
1681
+ }), f.pop();
1682
+ }
1683
+ }
1684
+ if (!a.isObject(e))
1685
+ throw new TypeError("data must be an object");
1686
+ return w(e), t;
1687
+ }
1688
+ function We(e) {
1689
+ const t = {
1690
+ "!": "%21",
1691
+ "'": "%27",
1692
+ "(": "%28",
1693
+ ")": "%29",
1694
+ "~": "%7E",
1695
+ "%20": "+",
1696
+ "%00": "\0"
1697
+ };
1698
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
1699
+ return t[r];
1700
+ });
1701
+ }
1702
+ function Ue(e, t) {
1703
+ this._pairs = [], e && ge(e, this, t);
1704
+ }
1705
+ const At = Ue.prototype;
1706
+ At.append = function(t, n) {
1707
+ this._pairs.push([t, n]);
1708
+ };
1709
+ At.toString = function(t) {
1710
+ const n = t ? function(r) {
1711
+ return t.call(this, r, We);
1712
+ } : We;
1713
+ return this._pairs.map(function(o) {
1714
+ return n(o[0]) + "=" + n(o[1]);
1715
+ }, "").join("&");
1716
+ };
1717
+ function Sr(e) {
1718
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1719
+ }
1720
+ function Nt(e, t, n) {
1721
+ if (!t)
1722
+ return e;
1723
+ const r = n && n.encode || Sr;
1724
+ a.isFunction(n) && (n = {
1725
+ serialize: n
1726
+ });
1727
+ const o = n && n.serialize;
1728
+ let i;
1729
+ if (o ? i = o(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new Ue(t, n).toString(r), i) {
1730
+ const s = e.indexOf("#");
1731
+ s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
1732
+ }
1733
+ return e;
1734
+ }
1735
+ class Ke {
1736
+ constructor() {
1737
+ this.handlers = [];
1738
+ }
1739
+ /**
1740
+ * Add a new interceptor to the stack
1741
+ *
1742
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1743
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1744
+ *
1745
+ * @return {Number} An ID used to remove interceptor later
1746
+ */
1747
+ use(t, n, r) {
1748
+ return this.handlers.push({
1749
+ fulfilled: t,
1750
+ rejected: n,
1751
+ synchronous: r ? r.synchronous : !1,
1752
+ runWhen: r ? r.runWhen : null
1753
+ }), this.handlers.length - 1;
1754
+ }
1755
+ /**
1756
+ * Remove an interceptor from the stack
1757
+ *
1758
+ * @param {Number} id The ID that was returned by `use`
1759
+ *
1760
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1761
+ */
1762
+ eject(t) {
1763
+ this.handlers[t] && (this.handlers[t] = null);
1764
+ }
1765
+ /**
1766
+ * Clear all interceptors from the stack
1767
+ *
1768
+ * @returns {void}
1769
+ */
1770
+ clear() {
1771
+ this.handlers && (this.handlers = []);
1772
+ }
1773
+ /**
1774
+ * Iterate over all the registered interceptors
1775
+ *
1776
+ * This method is particularly useful for skipping over any
1777
+ * interceptors that may have become `null` calling `eject`.
1778
+ *
1779
+ * @param {Function} fn The function to call for each interceptor
1780
+ *
1781
+ * @returns {void}
1782
+ */
1783
+ forEach(t) {
1784
+ a.forEach(this.handlers, function(r) {
1785
+ r !== null && t(r);
1786
+ });
1787
+ }
1788
+ }
1789
+ const Dt = {
1790
+ silentJSONParsing: !0,
1791
+ forcedJSONParsing: !0,
1792
+ clarifyTimeoutError: !1
1793
+ }, xr = typeof URLSearchParams < "u" ? URLSearchParams : Ue, Cr = typeof FormData < "u" ? FormData : null, Rr = typeof Blob < "u" ? Blob : null, Ar = {
1794
+ isBrowser: !0,
1795
+ classes: {
1796
+ URLSearchParams: xr,
1797
+ FormData: Cr,
1798
+ Blob: Rr
1799
+ },
1800
+ protocols: ["http", "https", "file", "blob", "url", "data"]
1801
+ }, Pe = typeof window < "u" && typeof document < "u", De = typeof navigator == "object" && navigator || void 0, Nr = Pe && (!De || ["ReactNative", "NativeScript", "NS"].indexOf(De.product) < 0), Dr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1802
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Or = Pe && window.location.href || "http://localhost", kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1803
+ __proto__: null,
1804
+ hasBrowserEnv: Pe,
1805
+ hasStandardBrowserEnv: Nr,
1806
+ hasStandardBrowserWebWorkerEnv: Dr,
1807
+ navigator: De,
1808
+ origin: Or
1809
+ }, Symbol.toStringTag, { value: "Module" })), N = {
1810
+ ...kr,
1811
+ ...Ar
1812
+ };
1813
+ function vr(e, t) {
1814
+ return ge(e, new N.classes.URLSearchParams(), Object.assign({
1815
+ visitor: function(n, r, o, i) {
1816
+ return N.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
1817
+ }
1818
+ }, t));
1819
+ }
1820
+ function Fr(e) {
1821
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1822
+ }
1823
+ function _r(e) {
1824
+ const t = {}, n = Object.keys(e);
1825
+ let r;
1826
+ const o = n.length;
1827
+ let i;
1828
+ for (r = 0; r < o; r++)
1829
+ i = n[r], t[i] = e[i];
1830
+ return t;
1831
+ }
1832
+ function Ot(e) {
1833
+ function t(n, r, o, i) {
1834
+ let s = n[i++];
1835
+ if (s === "__proto__") return !0;
1836
+ const l = Number.isFinite(+s), u = i >= n.length;
1837
+ return s = !s && a.isArray(o) ? o.length : s, u ? (a.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !l) : ((!o[s] || !a.isObject(o[s])) && (o[s] = []), t(n, r, o[s], i) && a.isArray(o[s]) && (o[s] = _r(o[s])), !l);
1838
+ }
1839
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
1840
+ const n = {};
1841
+ return a.forEachEntry(e, (r, o) => {
1842
+ t(Fr(r), o, n, 0);
1843
+ }), n;
1844
+ }
1845
+ return null;
1846
+ }
1847
+ function Lr(e, t, n) {
1848
+ if (a.isString(e))
1849
+ try {
1850
+ return (t || JSON.parse)(e), a.trim(e);
1851
+ } catch (r) {
1852
+ if (r.name !== "SyntaxError")
1853
+ throw r;
1854
+ }
1855
+ return (n || JSON.stringify)(e);
1856
+ }
1857
+ const ne = {
1858
+ transitional: Dt,
1859
+ adapter: ["xhr", "http", "fetch"],
1860
+ transformRequest: [function(t, n) {
1861
+ const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, i = a.isObject(t);
1862
+ if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
1863
+ return o ? JSON.stringify(Ot(t)) : t;
1864
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
1865
+ return t;
1866
+ if (a.isArrayBufferView(t))
1867
+ return t.buffer;
1868
+ if (a.isURLSearchParams(t))
1869
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1870
+ let l;
1871
+ if (i) {
1872
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
1873
+ return vr(t, this.formSerializer).toString();
1874
+ if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1875
+ const u = this.env && this.env.FormData;
1876
+ return ge(
1877
+ l ? { "files[]": t } : t,
1878
+ u && new u(),
1879
+ this.formSerializer
1880
+ );
1881
+ }
1882
+ }
1883
+ return i || o ? (n.setContentType("application/json", !1), Lr(t)) : t;
1884
+ }],
1885
+ transformResponse: [function(t) {
1886
+ const n = this.transitional || ne.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1887
+ if (a.isResponse(t) || a.isReadableStream(t))
1888
+ return t;
1889
+ if (t && a.isString(t) && (r && !this.responseType || o)) {
1890
+ const s = !(n && n.silentJSONParsing) && o;
1891
+ try {
1892
+ return JSON.parse(t);
1893
+ } catch (l) {
1894
+ if (s)
1895
+ throw l.name === "SyntaxError" ? y.from(l, y.ERR_BAD_RESPONSE, this, null, this.response) : l;
1896
+ }
1897
+ }
1898
+ return t;
1899
+ }],
1900
+ /**
1901
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1902
+ * timeout is not created.
1903
+ */
1904
+ timeout: 0,
1905
+ xsrfCookieName: "XSRF-TOKEN",
1906
+ xsrfHeaderName: "X-XSRF-TOKEN",
1907
+ maxContentLength: -1,
1908
+ maxBodyLength: -1,
1909
+ env: {
1910
+ FormData: N.classes.FormData,
1911
+ Blob: N.classes.Blob
1912
+ },
1913
+ validateStatus: function(t) {
1914
+ return t >= 200 && t < 300;
1915
+ },
1916
+ headers: {
1917
+ common: {
1918
+ Accept: "application/json, text/plain, */*",
1919
+ "Content-Type": void 0
1920
+ }
1921
+ }
1922
+ };
1923
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1924
+ ne.headers[e] = {};
1925
+ });
1926
+ const Ur = a.toObjectSet([
1927
+ "age",
1928
+ "authorization",
1929
+ "content-length",
1930
+ "content-type",
1931
+ "etag",
1932
+ "expires",
1933
+ "from",
1934
+ "host",
1935
+ "if-modified-since",
1936
+ "if-unmodified-since",
1937
+ "last-modified",
1938
+ "location",
1939
+ "max-forwards",
1940
+ "proxy-authorization",
1941
+ "referer",
1942
+ "retry-after",
1943
+ "user-agent"
1944
+ ]), Pr = (e) => {
1945
+ const t = {};
1946
+ let n, r, o;
1947
+ return e && e.split(`
1948
+ `).forEach(function(s) {
1949
+ o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && Ur[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
1950
+ }), t;
1951
+ }, Ge = Symbol("internals");
1952
+ function X(e) {
1953
+ return e && String(e).trim().toLowerCase();
1954
+ }
1955
+ function ae(e) {
1956
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(ae) : String(e);
1957
+ }
1958
+ function Br(e) {
1959
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1960
+ let r;
1961
+ for (; r = n.exec(e); )
1962
+ t[r[1]] = r[2];
1963
+ return t;
1964
+ }
1965
+ const jr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1966
+ function Ee(e, t, n, r, o) {
1967
+ if (a.isFunction(r))
1968
+ return r.call(this, t, n);
1969
+ if (o && (t = n), !!a.isString(t)) {
1970
+ if (a.isString(r))
1971
+ return t.indexOf(r) !== -1;
1972
+ if (a.isRegExp(r))
1973
+ return r.test(t);
1974
+ }
1975
+ }
1976
+ function Ir(e) {
1977
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
1978
+ }
1979
+ function $r(e, t) {
1980
+ const n = a.toCamelCase(" " + t);
1981
+ ["get", "set", "has"].forEach((r) => {
1982
+ Object.defineProperty(e, r + n, {
1983
+ value: function(o, i, s) {
1984
+ return this[r].call(this, t, o, i, s);
1985
+ },
1986
+ configurable: !0
1987
+ });
1988
+ });
1989
+ }
1990
+ let F = class {
1991
+ constructor(t) {
1992
+ t && this.set(t);
1993
+ }
1994
+ set(t, n, r) {
1995
+ const o = this;
1996
+ function i(l, u, d) {
1997
+ const c = X(u);
1998
+ if (!c)
1999
+ throw new Error("header name must be a non-empty string");
2000
+ const f = a.findKey(o, c);
2001
+ (!f || o[f] === void 0 || d === !0 || d === void 0 && o[f] !== !1) && (o[f || u] = ae(l));
2002
+ }
2003
+ const s = (l, u) => a.forEach(l, (d, c) => i(d, c, u));
2004
+ if (a.isPlainObject(t) || t instanceof this.constructor)
2005
+ s(t, n);
2006
+ else if (a.isString(t) && (t = t.trim()) && !jr(t))
2007
+ s(Pr(t), n);
2008
+ else if (a.isObject(t) && a.isIterable(t)) {
2009
+ let l = {}, u, d;
2010
+ for (const c of t) {
2011
+ if (!a.isArray(c))
2012
+ throw TypeError("Object iterator must return a key-value pair");
2013
+ l[d = c[0]] = (u = l[d]) ? a.isArray(u) ? [...u, c[1]] : [u, c[1]] : c[1];
2014
+ }
2015
+ s(l, n);
2016
+ } else
2017
+ t != null && i(n, t, r);
2018
+ return this;
2019
+ }
2020
+ get(t, n) {
2021
+ if (t = X(t), t) {
2022
+ const r = a.findKey(this, t);
2023
+ if (r) {
2024
+ const o = this[r];
2025
+ if (!n)
2026
+ return o;
2027
+ if (n === !0)
2028
+ return Br(o);
2029
+ if (a.isFunction(n))
2030
+ return n.call(this, o, r);
2031
+ if (a.isRegExp(n))
2032
+ return n.exec(o);
2033
+ throw new TypeError("parser must be boolean|regexp|function");
2034
+ }
2035
+ }
2036
+ }
2037
+ has(t, n) {
2038
+ if (t = X(t), t) {
2039
+ const r = a.findKey(this, t);
2040
+ return !!(r && this[r] !== void 0 && (!n || Ee(this, this[r], r, n)));
2041
+ }
2042
+ return !1;
2043
+ }
2044
+ delete(t, n) {
2045
+ const r = this;
2046
+ let o = !1;
2047
+ function i(s) {
2048
+ if (s = X(s), s) {
2049
+ const l = a.findKey(r, s);
2050
+ l && (!n || Ee(r, r[l], l, n)) && (delete r[l], o = !0);
2051
+ }
2052
+ }
2053
+ return a.isArray(t) ? t.forEach(i) : i(t), o;
2054
+ }
2055
+ clear(t) {
2056
+ const n = Object.keys(this);
2057
+ let r = n.length, o = !1;
2058
+ for (; r--; ) {
2059
+ const i = n[r];
2060
+ (!t || Ee(this, this[i], i, t, !0)) && (delete this[i], o = !0);
2061
+ }
2062
+ return o;
2063
+ }
2064
+ normalize(t) {
2065
+ const n = this, r = {};
2066
+ return a.forEach(this, (o, i) => {
2067
+ const s = a.findKey(r, i);
2068
+ if (s) {
2069
+ n[s] = ae(o), delete n[i];
2070
+ return;
2071
+ }
2072
+ const l = t ? Ir(i) : String(i).trim();
2073
+ l !== i && delete n[i], n[l] = ae(o), r[l] = !0;
2074
+ }), this;
2075
+ }
2076
+ concat(...t) {
2077
+ return this.constructor.concat(this, ...t);
2078
+ }
2079
+ toJSON(t) {
2080
+ const n = /* @__PURE__ */ Object.create(null);
2081
+ return a.forEach(this, (r, o) => {
2082
+ r != null && r !== !1 && (n[o] = t && a.isArray(r) ? r.join(", ") : r);
2083
+ }), n;
2084
+ }
2085
+ [Symbol.iterator]() {
2086
+ return Object.entries(this.toJSON())[Symbol.iterator]();
2087
+ }
2088
+ toString() {
2089
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
2090
+ `);
2091
+ }
2092
+ getSetCookie() {
2093
+ return this.get("set-cookie") || [];
2094
+ }
2095
+ get [Symbol.toStringTag]() {
2096
+ return "AxiosHeaders";
2097
+ }
2098
+ static from(t) {
2099
+ return t instanceof this ? t : new this(t);
2100
+ }
2101
+ static concat(t, ...n) {
2102
+ const r = new this(t);
2103
+ return n.forEach((o) => r.set(o)), r;
2104
+ }
2105
+ static accessor(t) {
2106
+ const r = (this[Ge] = this[Ge] = {
2107
+ accessors: {}
2108
+ }).accessors, o = this.prototype;
2109
+ function i(s) {
2110
+ const l = X(s);
2111
+ r[l] || ($r(o, s), r[l] = !0);
2112
+ }
2113
+ return a.isArray(t) ? t.forEach(i) : i(t), this;
2114
+ }
2115
+ };
2116
+ F.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2117
+ a.reduceDescriptors(F.prototype, ({ value: e }, t) => {
2118
+ let n = t[0].toUpperCase() + t.slice(1);
2119
+ return {
2120
+ get: () => e,
2121
+ set(r) {
2122
+ this[n] = r;
2123
+ }
2124
+ };
2125
+ });
2126
+ a.freezeMethods(F);
2127
+ function Se(e, t) {
2128
+ const n = this || ne, r = t || n, o = F.from(r.headers);
2129
+ let i = r.data;
2130
+ return a.forEach(e, function(l) {
2131
+ i = l.call(n, i, o.normalize(), t ? t.status : void 0);
2132
+ }), o.normalize(), i;
2133
+ }
2134
+ function kt(e) {
2135
+ return !!(e && e.__CANCEL__);
2136
+ }
2137
+ function K(e, t, n) {
2138
+ y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
2139
+ }
2140
+ a.inherits(K, y, {
2141
+ __CANCEL__: !0
2142
+ });
2143
+ function vt(e, t, n) {
2144
+ const r = n.config.validateStatus;
2145
+ !n.status || !r || r(n.status) ? e(n) : t(new y(
2146
+ "Request failed with status code " + n.status,
2147
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
2148
+ n.config,
2149
+ n.request,
2150
+ n
2151
+ ));
2152
+ }
2153
+ function qr(e) {
2154
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
2155
+ return t && t[1] || "";
2156
+ }
2157
+ function Mr(e, t) {
2158
+ e = e || 10;
2159
+ const n = new Array(e), r = new Array(e);
2160
+ let o = 0, i = 0, s;
2161
+ return t = t !== void 0 ? t : 1e3, function(u) {
2162
+ const d = Date.now(), c = r[i];
2163
+ s || (s = d), n[o] = u, r[o] = d;
2164
+ let f = i, b = 0;
2165
+ for (; f !== o; )
2166
+ b += n[f++], f = f % e;
2167
+ if (o = (o + 1) % e, o === i && (i = (i + 1) % e), d - s < t)
2168
+ return;
2169
+ const w = c && d - c;
2170
+ return w ? Math.round(b * 1e3 / w) : void 0;
2171
+ };
2172
+ }
2173
+ function Hr(e, t) {
2174
+ let n = 0, r = 1e3 / t, o, i;
2175
+ const s = (d, c = Date.now()) => {
2176
+ n = c, o = null, i && (clearTimeout(i), i = null), e.apply(null, d);
2177
+ };
2178
+ return [(...d) => {
2179
+ const c = Date.now(), f = c - n;
2180
+ f >= r ? s(d, c) : (o = d, i || (i = setTimeout(() => {
2181
+ i = null, s(o);
2182
+ }, r - f)));
2183
+ }, () => o && s(o)];
2184
+ }
2185
+ const ce = (e, t, n = 3) => {
2186
+ let r = 0;
2187
+ const o = Mr(50, 250);
2188
+ return Hr((i) => {
2189
+ const s = i.loaded, l = i.lengthComputable ? i.total : void 0, u = s - r, d = o(u), c = s <= l;
2190
+ r = s;
2191
+ const f = {
2192
+ loaded: s,
2193
+ total: l,
2194
+ progress: l ? s / l : void 0,
2195
+ bytes: u,
2196
+ rate: d || void 0,
2197
+ estimated: d && l && c ? (l - s) / d : void 0,
2198
+ event: i,
2199
+ lengthComputable: l != null,
2200
+ [t ? "download" : "upload"]: !0
2201
+ };
2202
+ e(f);
2203
+ }, n);
2204
+ }, Xe = (e, t) => {
2205
+ const n = e != null;
2206
+ return [(r) => t[0]({
2207
+ lengthComputable: n,
2208
+ total: e,
2209
+ loaded: r
2210
+ }), t[1]];
2211
+ }, Qe = (e) => (...t) => a.asap(() => e(...t)), zr = N.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, N.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
2212
+ new URL(N.origin),
2213
+ N.navigator && /(msie|trident)/i.test(N.navigator.userAgent)
2214
+ ) : () => !0, Vr = N.hasStandardBrowserEnv ? (
2215
+ // Standard browser envs support document.cookie
2216
+ {
2217
+ write(e, t, n, r, o, i) {
2218
+ const s = [e + "=" + encodeURIComponent(t)];
2219
+ a.isNumber(n) && s.push("expires=" + new Date(n).toGMTString()), a.isString(r) && s.push("path=" + r), a.isString(o) && s.push("domain=" + o), i === !0 && s.push("secure"), document.cookie = s.join("; ");
2220
+ },
2221
+ read(e) {
2222
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
2223
+ return t ? decodeURIComponent(t[3]) : null;
2224
+ },
2225
+ remove(e) {
2226
+ this.write(e, "", Date.now() - 864e5);
2227
+ }
2228
+ }
2229
+ ) : (
2230
+ // Non-standard browser env (web workers, react-native) lack needed support.
2231
+ {
2232
+ write() {
2233
+ },
2234
+ read() {
2235
+ return null;
2236
+ },
2237
+ remove() {
2238
+ }
2239
+ }
2240
+ );
2241
+ function Jr(e) {
2242
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
2243
+ }
2244
+ function Wr(e, t) {
2245
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
2246
+ }
2247
+ function Ft(e, t, n) {
2248
+ let r = !Jr(t);
2249
+ return e && (r || n == !1) ? Wr(e, t) : t;
2250
+ }
2251
+ const Ze = (e) => e instanceof F ? { ...e } : e;
2252
+ function V(e, t) {
2253
+ t = t || {};
2254
+ const n = {};
2255
+ function r(d, c, f, b) {
2256
+ return a.isPlainObject(d) && a.isPlainObject(c) ? a.merge.call({ caseless: b }, d, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
2257
+ }
2258
+ function o(d, c, f, b) {
2259
+ if (a.isUndefined(c)) {
2260
+ if (!a.isUndefined(d))
2261
+ return r(void 0, d, f, b);
2262
+ } else return r(d, c, f, b);
2263
+ }
2264
+ function i(d, c) {
2265
+ if (!a.isUndefined(c))
2266
+ return r(void 0, c);
2267
+ }
2268
+ function s(d, c) {
2269
+ if (a.isUndefined(c)) {
2270
+ if (!a.isUndefined(d))
2271
+ return r(void 0, d);
2272
+ } else return r(void 0, c);
2273
+ }
2274
+ function l(d, c, f) {
2275
+ if (f in t)
2276
+ return r(d, c);
2277
+ if (f in e)
2278
+ return r(void 0, d);
2279
+ }
2280
+ const u = {
2281
+ url: i,
2282
+ method: i,
2283
+ data: i,
2284
+ baseURL: s,
2285
+ transformRequest: s,
2286
+ transformResponse: s,
2287
+ paramsSerializer: s,
2288
+ timeout: s,
2289
+ timeoutMessage: s,
2290
+ withCredentials: s,
2291
+ withXSRFToken: s,
2292
+ adapter: s,
2293
+ responseType: s,
2294
+ xsrfCookieName: s,
2295
+ xsrfHeaderName: s,
2296
+ onUploadProgress: s,
2297
+ onDownloadProgress: s,
2298
+ decompress: s,
2299
+ maxContentLength: s,
2300
+ maxBodyLength: s,
2301
+ beforeRedirect: s,
2302
+ transport: s,
2303
+ httpAgent: s,
2304
+ httpsAgent: s,
2305
+ cancelToken: s,
2306
+ socketPath: s,
2307
+ responseEncoding: s,
2308
+ validateStatus: l,
2309
+ headers: (d, c, f) => o(Ze(d), Ze(c), f, !0)
2310
+ };
2311
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
2312
+ const f = u[c] || o, b = f(e[c], t[c], c);
2313
+ a.isUndefined(b) && f !== l || (n[c] = b);
2314
+ }), n;
2315
+ }
2316
+ const _t = (e) => {
2317
+ const t = V({}, e);
2318
+ let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: i, headers: s, auth: l } = t;
2319
+ t.headers = s = F.from(s), t.url = Nt(Ft(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && s.set(
2320
+ "Authorization",
2321
+ "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
2322
+ );
2323
+ let u;
2324
+ if (a.isFormData(n)) {
2325
+ if (N.hasStandardBrowserEnv || N.hasStandardBrowserWebWorkerEnv)
2326
+ s.setContentType(void 0);
2327
+ else if ((u = s.getContentType()) !== !1) {
2328
+ const [d, ...c] = u ? u.split(";").map((f) => f.trim()).filter(Boolean) : [];
2329
+ s.setContentType([d || "multipart/form-data", ...c].join("; "));
2330
+ }
2331
+ }
2332
+ if (N.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && zr(t.url))) {
2333
+ const d = o && i && Vr.read(i);
2334
+ d && s.set(o, d);
2335
+ }
2336
+ return t;
2337
+ }, Kr = typeof XMLHttpRequest < "u", Gr = Kr && function(e) {
2338
+ return new Promise(function(n, r) {
2339
+ const o = _t(e);
2340
+ let i = o.data;
2341
+ const s = F.from(o.headers).normalize();
2342
+ let { responseType: l, onUploadProgress: u, onDownloadProgress: d } = o, c, f, b, w, p;
2343
+ function g() {
2344
+ w && w(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
2345
+ }
2346
+ let m = new XMLHttpRequest();
2347
+ m.open(o.method.toUpperCase(), o.url, !0), m.timeout = o.timeout;
2348
+ function S() {
2349
+ if (!m)
2350
+ return;
2351
+ const C = F.from(
2352
+ "getAllResponseHeaders" in m && m.getAllResponseHeaders()
2353
+ ), A = {
2354
+ data: !l || l === "text" || l === "json" ? m.responseText : m.response,
2355
+ status: m.status,
2356
+ statusText: m.statusText,
2357
+ headers: C,
2358
+ config: e,
2359
+ request: m
2360
+ };
2361
+ vt(function(I) {
2362
+ n(I), g();
2363
+ }, function(I) {
2364
+ r(I), g();
2365
+ }, A), m = null;
2366
+ }
2367
+ "onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
2368
+ !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(S);
2369
+ }, m.onabort = function() {
2370
+ m && (r(new y("Request aborted", y.ECONNABORTED, e, m)), m = null);
2371
+ }, m.onerror = function() {
2372
+ r(new y("Network Error", y.ERR_NETWORK, e, m)), m = null;
2373
+ }, m.ontimeout = function() {
2374
+ let L = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
2375
+ const A = o.transitional || Dt;
2376
+ o.timeoutErrorMessage && (L = o.timeoutErrorMessage), r(new y(
2377
+ L,
2378
+ A.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
2379
+ e,
2380
+ m
2381
+ )), m = null;
2382
+ }, i === void 0 && s.setContentType(null), "setRequestHeader" in m && a.forEach(s.toJSON(), function(L, A) {
2383
+ m.setRequestHeader(A, L);
2384
+ }), a.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), l && l !== "json" && (m.responseType = o.responseType), d && ([b, p] = ce(d, !0), m.addEventListener("progress", b)), u && m.upload && ([f, w] = ce(u), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", w)), (o.cancelToken || o.signal) && (c = (C) => {
2385
+ m && (r(!C || C.type ? new K(null, e, m) : C), m.abort(), m = null);
2386
+ }, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
2387
+ const x = qr(o.url);
2388
+ if (x && N.protocols.indexOf(x) === -1) {
2389
+ r(new y("Unsupported protocol " + x + ":", y.ERR_BAD_REQUEST, e));
2390
+ return;
2391
+ }
2392
+ m.send(i || null);
2393
+ });
2394
+ }, Xr = (e, t) => {
2395
+ const { length: n } = e = e ? e.filter(Boolean) : [];
2396
+ if (t || n) {
2397
+ let r = new AbortController(), o;
2398
+ const i = function(d) {
2399
+ if (!o) {
2400
+ o = !0, l();
2401
+ const c = d instanceof Error ? d : this.reason;
2402
+ r.abort(c instanceof y ? c : new K(c instanceof Error ? c.message : c));
2403
+ }
2404
+ };
2405
+ let s = t && setTimeout(() => {
2406
+ s = null, i(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
2407
+ }, t);
2408
+ const l = () => {
2409
+ e && (s && clearTimeout(s), s = null, e.forEach((d) => {
2410
+ d.unsubscribe ? d.unsubscribe(i) : d.removeEventListener("abort", i);
2411
+ }), e = null);
2412
+ };
2413
+ e.forEach((d) => d.addEventListener("abort", i));
2414
+ const { signal: u } = r;
2415
+ return u.unsubscribe = () => a.asap(l), u;
2416
+ }
2417
+ }, Qr = function* (e, t) {
2418
+ let n = e.byteLength;
2419
+ if (n < t) {
2420
+ yield e;
2421
+ return;
2422
+ }
2423
+ let r = 0, o;
2424
+ for (; r < n; )
2425
+ o = r + t, yield e.slice(r, o), r = o;
2426
+ }, Zr = async function* (e, t) {
2427
+ for await (const n of Yr(e))
2428
+ yield* Qr(n, t);
2429
+ }, Yr = async function* (e) {
2430
+ if (e[Symbol.asyncIterator]) {
2431
+ yield* e;
2432
+ return;
2433
+ }
2434
+ const t = e.getReader();
2435
+ try {
2436
+ for (; ; ) {
2437
+ const { done: n, value: r } = await t.read();
2438
+ if (n)
2439
+ break;
2440
+ yield r;
2441
+ }
2442
+ } finally {
2443
+ await t.cancel();
2444
+ }
2445
+ }, Ye = (e, t, n, r) => {
2446
+ const o = Zr(e, t);
2447
+ let i = 0, s, l = (u) => {
2448
+ s || (s = !0, r && r(u));
2449
+ };
2450
+ return new ReadableStream({
2451
+ async pull(u) {
2452
+ try {
2453
+ const { done: d, value: c } = await o.next();
2454
+ if (d) {
2455
+ l(), u.close();
2456
+ return;
2457
+ }
2458
+ let f = c.byteLength;
2459
+ if (n) {
2460
+ let b = i += f;
2461
+ n(b);
2462
+ }
2463
+ u.enqueue(new Uint8Array(c));
2464
+ } catch (d) {
2465
+ throw l(d), d;
2466
+ }
2467
+ },
2468
+ cancel(u) {
2469
+ return l(u), o.return();
2470
+ }
2471
+ }, {
2472
+ highWaterMark: 2
2473
+ });
2474
+ }, be = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Lt = be && typeof ReadableStream == "function", eo = be && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ut = (e, ...t) => {
2475
+ try {
2476
+ return !!e(...t);
2477
+ } catch {
2478
+ return !1;
2479
+ }
2480
+ }, to = Lt && Ut(() => {
2481
+ let e = !1;
2482
+ const t = new Request(N.origin, {
2483
+ body: new ReadableStream(),
2484
+ method: "POST",
2485
+ get duplex() {
2486
+ return e = !0, "half";
2487
+ }
2488
+ }).headers.has("Content-Type");
2489
+ return e && !t;
2490
+ }), et = 64 * 1024, Oe = Lt && Ut(() => a.isReadableStream(new Response("").body)), de = {
2491
+ stream: Oe && ((e) => e.body)
2492
+ };
2493
+ be && ((e) => {
2494
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
2495
+ !de[t] && (de[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
2496
+ throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
2497
+ });
2498
+ });
2499
+ })(new Response());
2500
+ const no = async (e) => {
2501
+ if (e == null)
2502
+ return 0;
2503
+ if (a.isBlob(e))
2504
+ return e.size;
2505
+ if (a.isSpecCompliantForm(e))
2506
+ return (await new Request(N.origin, {
2507
+ method: "POST",
2508
+ body: e
2509
+ }).arrayBuffer()).byteLength;
2510
+ if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
2511
+ return e.byteLength;
2512
+ if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
2513
+ return (await eo(e)).byteLength;
2514
+ }, ro = async (e, t) => {
2515
+ const n = a.toFiniteNumber(e.getContentLength());
2516
+ return n ?? no(t);
2517
+ }, oo = be && (async (e) => {
2518
+ let {
2519
+ url: t,
2520
+ method: n,
2521
+ data: r,
2522
+ signal: o,
2523
+ cancelToken: i,
2524
+ timeout: s,
2525
+ onDownloadProgress: l,
2526
+ onUploadProgress: u,
2527
+ responseType: d,
2528
+ headers: c,
2529
+ withCredentials: f = "same-origin",
2530
+ fetchOptions: b
2531
+ } = _t(e);
2532
+ d = d ? (d + "").toLowerCase() : "text";
2533
+ let w = Xr([o, i && i.toAbortSignal()], s), p;
2534
+ const g = w && w.unsubscribe && (() => {
2535
+ w.unsubscribe();
2536
+ });
2537
+ let m;
2538
+ try {
2539
+ if (u && to && n !== "get" && n !== "head" && (m = await ro(c, r)) !== 0) {
2540
+ let A = new Request(t, {
2541
+ method: "POST",
2542
+ body: r,
2543
+ duplex: "half"
2544
+ }), B;
2545
+ if (a.isFormData(r) && (B = A.headers.get("content-type")) && c.setContentType(B), A.body) {
2546
+ const [I, _] = Xe(
2547
+ m,
2548
+ ce(Qe(u))
2549
+ );
2550
+ r = Ye(A.body, et, I, _);
2551
+ }
2552
+ }
2553
+ a.isString(f) || (f = f ? "include" : "omit");
2554
+ const S = "credentials" in Request.prototype;
2555
+ p = new Request(t, {
2556
+ ...b,
2557
+ signal: w,
2558
+ method: n.toUpperCase(),
2559
+ headers: c.normalize().toJSON(),
2560
+ body: r,
2561
+ duplex: "half",
2562
+ credentials: S ? f : void 0
2563
+ });
2564
+ let x = await fetch(p);
2565
+ const C = Oe && (d === "stream" || d === "response");
2566
+ if (Oe && (l || C && g)) {
2567
+ const A = {};
2568
+ ["status", "statusText", "headers"].forEach((Be) => {
2569
+ A[Be] = x[Be];
2570
+ });
2571
+ const B = a.toFiniteNumber(x.headers.get("content-length")), [I, _] = l && Xe(
2572
+ B,
2573
+ ce(Qe(l), !0)
2574
+ ) || [];
2575
+ x = new Response(
2576
+ Ye(x.body, et, I, () => {
2577
+ _ && _(), g && g();
2578
+ }),
2579
+ A
2580
+ );
2581
+ }
2582
+ d = d || "text";
2583
+ let L = await de[a.findKey(de, d) || "text"](x, e);
2584
+ return !C && g && g(), await new Promise((A, B) => {
2585
+ vt(A, B, {
2586
+ data: L,
2587
+ headers: F.from(x.headers),
2588
+ status: x.status,
2589
+ statusText: x.statusText,
2590
+ config: e,
2591
+ request: p
2592
+ });
2593
+ });
2594
+ } catch (S) {
2595
+ throw g && g(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
2596
+ new y("Network Error", y.ERR_NETWORK, e, p),
2597
+ {
2598
+ cause: S.cause || S
2599
+ }
2600
+ ) : y.from(S, S && S.code, e, p);
2601
+ }
2602
+ }), ke = {
2603
+ http: wr,
2604
+ xhr: Gr,
2605
+ fetch: oo
2606
+ };
2607
+ a.forEach(ke, (e, t) => {
2608
+ if (e) {
2609
+ try {
2610
+ Object.defineProperty(e, "name", { value: t });
2611
+ } catch {
2612
+ }
2613
+ Object.defineProperty(e, "adapterName", { value: t });
2614
+ }
2615
+ });
2616
+ const tt = (e) => `- ${e}`, io = (e) => a.isFunction(e) || e === null || e === !1, Pt = {
2617
+ getAdapter: (e) => {
2618
+ e = a.isArray(e) ? e : [e];
2619
+ const { length: t } = e;
2620
+ let n, r;
2621
+ const o = {};
2622
+ for (let i = 0; i < t; i++) {
2623
+ n = e[i];
2624
+ let s;
2625
+ if (r = n, !io(n) && (r = ke[(s = String(n)).toLowerCase()], r === void 0))
2626
+ throw new y(`Unknown adapter '${s}'`);
2627
+ if (r)
2628
+ break;
2629
+ o[s || "#" + i] = r;
2630
+ }
2631
+ if (!r) {
2632
+ const i = Object.entries(o).map(
2633
+ ([l, u]) => `adapter ${l} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
2634
+ );
2635
+ let s = t ? i.length > 1 ? `since :
2636
+ ` + i.map(tt).join(`
2637
+ `) : " " + tt(i[0]) : "as no adapter specified";
2638
+ throw new y(
2639
+ "There is no suitable adapter to dispatch the request " + s,
2640
+ "ERR_NOT_SUPPORT"
2641
+ );
2642
+ }
2643
+ return r;
2644
+ },
2645
+ adapters: ke
2646
+ };
2647
+ function xe(e) {
2648
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2649
+ throw new K(null, e);
2650
+ }
2651
+ function nt(e) {
2652
+ return xe(e), e.headers = F.from(e.headers), e.data = Se.call(
2653
+ e,
2654
+ e.transformRequest
2655
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Pt.getAdapter(e.adapter || ne.adapter)(e).then(function(r) {
2656
+ return xe(e), r.data = Se.call(
2657
+ e,
2658
+ e.transformResponse,
2659
+ r
2660
+ ), r.headers = F.from(r.headers), r;
2661
+ }, function(r) {
2662
+ return kt(r) || (xe(e), r && r.response && (r.response.data = Se.call(
2663
+ e,
2664
+ e.transformResponse,
2665
+ r.response
2666
+ ), r.response.headers = F.from(r.response.headers))), Promise.reject(r);
2667
+ });
2668
+ }
2669
+ const Bt = "1.9.0", ye = {};
2670
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2671
+ ye[e] = function(r) {
2672
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
2673
+ };
2674
+ });
2675
+ const rt = {};
2676
+ ye.transitional = function(t, n, r) {
2677
+ function o(i, s) {
2678
+ return "[Axios v" + Bt + "] Transitional option '" + i + "'" + s + (r ? ". " + r : "");
2679
+ }
2680
+ return (i, s, l) => {
2681
+ if (t === !1)
2682
+ throw new y(
2683
+ o(s, " has been removed" + (n ? " in " + n : "")),
2684
+ y.ERR_DEPRECATED
2685
+ );
2686
+ return n && !rt[s] && (rt[s] = !0, console.warn(
2687
+ o(
2688
+ s,
2689
+ " has been deprecated since v" + n + " and will be removed in the near future"
2690
+ )
2691
+ )), t ? t(i, s, l) : !0;
2692
+ };
2693
+ };
2694
+ ye.spelling = function(t) {
2695
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
2696
+ };
2697
+ function so(e, t, n) {
2698
+ if (typeof e != "object")
2699
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
2700
+ const r = Object.keys(e);
2701
+ let o = r.length;
2702
+ for (; o-- > 0; ) {
2703
+ const i = r[o], s = t[i];
2704
+ if (s) {
2705
+ const l = e[i], u = l === void 0 || s(l, i, e);
2706
+ if (u !== !0)
2707
+ throw new y("option " + i + " must be " + u, y.ERR_BAD_OPTION_VALUE);
2708
+ continue;
2709
+ }
2710
+ if (n !== !0)
2711
+ throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
2712
+ }
2713
+ }
2714
+ const le = {
2715
+ assertOptions: so,
2716
+ validators: ye
2717
+ }, j = le.validators;
2718
+ let H = class {
2719
+ constructor(t) {
2720
+ this.defaults = t || {}, this.interceptors = {
2721
+ request: new Ke(),
2722
+ response: new Ke()
2723
+ };
2724
+ }
2725
+ /**
2726
+ * Dispatch a request
2727
+ *
2728
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2729
+ * @param {?Object} config
2730
+ *
2731
+ * @returns {Promise} The Promise to be fulfilled
2732
+ */
2733
+ async request(t, n) {
2734
+ try {
2735
+ return await this._request(t, n);
2736
+ } catch (r) {
2737
+ if (r instanceof Error) {
2738
+ let o = {};
2739
+ Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
2740
+ const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
2741
+ try {
2742
+ r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
2743
+ ` + i) : r.stack = i;
2744
+ } catch {
2745
+ }
2746
+ }
2747
+ throw r;
2748
+ }
2749
+ }
2750
+ _request(t, n) {
2751
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = V(this.defaults, n);
2752
+ const { transitional: r, paramsSerializer: o, headers: i } = n;
2753
+ r !== void 0 && le.assertOptions(r, {
2754
+ silentJSONParsing: j.transitional(j.boolean),
2755
+ forcedJSONParsing: j.transitional(j.boolean),
2756
+ clarifyTimeoutError: j.transitional(j.boolean)
2757
+ }, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
2758
+ serialize: o
2759
+ } : le.assertOptions(o, {
2760
+ encode: j.function,
2761
+ serialize: j.function
2762
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), le.assertOptions(n, {
2763
+ baseUrl: j.spelling("baseURL"),
2764
+ withXsrfToken: j.spelling("withXSRFToken")
2765
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2766
+ let s = i && a.merge(
2767
+ i.common,
2768
+ i[n.method]
2769
+ );
2770
+ i && a.forEach(
2771
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2772
+ (p) => {
2773
+ delete i[p];
2774
+ }
2775
+ ), n.headers = F.concat(s, i);
2776
+ const l = [];
2777
+ let u = !0;
2778
+ this.interceptors.request.forEach(function(g) {
2779
+ typeof g.runWhen == "function" && g.runWhen(n) === !1 || (u = u && g.synchronous, l.unshift(g.fulfilled, g.rejected));
2780
+ });
2781
+ const d = [];
2782
+ this.interceptors.response.forEach(function(g) {
2783
+ d.push(g.fulfilled, g.rejected);
2784
+ });
2785
+ let c, f = 0, b;
2786
+ if (!u) {
2787
+ const p = [nt.bind(this), void 0];
2788
+ for (p.unshift.apply(p, l), p.push.apply(p, d), b = p.length, c = Promise.resolve(n); f < b; )
2789
+ c = c.then(p[f++], p[f++]);
2790
+ return c;
2791
+ }
2792
+ b = l.length;
2793
+ let w = n;
2794
+ for (f = 0; f < b; ) {
2795
+ const p = l[f++], g = l[f++];
2796
+ try {
2797
+ w = p(w);
2798
+ } catch (m) {
2799
+ g.call(this, m);
2800
+ break;
2801
+ }
2802
+ }
2803
+ try {
2804
+ c = nt.call(this, w);
2805
+ } catch (p) {
2806
+ return Promise.reject(p);
2807
+ }
2808
+ for (f = 0, b = d.length; f < b; )
2809
+ c = c.then(d[f++], d[f++]);
2810
+ return c;
2811
+ }
2812
+ getUri(t) {
2813
+ t = V(this.defaults, t);
2814
+ const n = Ft(t.baseURL, t.url, t.allowAbsoluteUrls);
2815
+ return Nt(n, t.params, t.paramsSerializer);
2816
+ }
2817
+ };
2818
+ a.forEach(["delete", "get", "head", "options"], function(t) {
2819
+ H.prototype[t] = function(n, r) {
2820
+ return this.request(V(r || {}, {
2821
+ method: t,
2822
+ url: n,
2823
+ data: (r || {}).data
2824
+ }));
2825
+ };
2826
+ });
2827
+ a.forEach(["post", "put", "patch"], function(t) {
2828
+ function n(r) {
2829
+ return function(i, s, l) {
2830
+ return this.request(V(l || {}, {
2831
+ method: t,
2832
+ headers: r ? {
2833
+ "Content-Type": "multipart/form-data"
2834
+ } : {},
2835
+ url: i,
2836
+ data: s
2837
+ }));
2838
+ };
2839
+ }
2840
+ H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
2841
+ });
2842
+ let ao = class jt {
2843
+ constructor(t) {
2844
+ if (typeof t != "function")
2845
+ throw new TypeError("executor must be a function.");
2846
+ let n;
2847
+ this.promise = new Promise(function(i) {
2848
+ n = i;
2849
+ });
2850
+ const r = this;
2851
+ this.promise.then((o) => {
2852
+ if (!r._listeners) return;
2853
+ let i = r._listeners.length;
2854
+ for (; i-- > 0; )
2855
+ r._listeners[i](o);
2856
+ r._listeners = null;
2857
+ }), this.promise.then = (o) => {
2858
+ let i;
2859
+ const s = new Promise((l) => {
2860
+ r.subscribe(l), i = l;
2861
+ }).then(o);
2862
+ return s.cancel = function() {
2863
+ r.unsubscribe(i);
2864
+ }, s;
2865
+ }, t(function(i, s, l) {
2866
+ r.reason || (r.reason = new K(i, s, l), n(r.reason));
2867
+ });
2868
+ }
2869
+ /**
2870
+ * Throws a `CanceledError` if cancellation has been requested.
2871
+ */
2872
+ throwIfRequested() {
2873
+ if (this.reason)
2874
+ throw this.reason;
2875
+ }
2876
+ /**
2877
+ * Subscribe to the cancel signal
2878
+ */
2879
+ subscribe(t) {
2880
+ if (this.reason) {
2881
+ t(this.reason);
2882
+ return;
2883
+ }
2884
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
2885
+ }
2886
+ /**
2887
+ * Unsubscribe from the cancel signal
2888
+ */
2889
+ unsubscribe(t) {
2890
+ if (!this._listeners)
2891
+ return;
2892
+ const n = this._listeners.indexOf(t);
2893
+ n !== -1 && this._listeners.splice(n, 1);
2894
+ }
2895
+ toAbortSignal() {
2896
+ const t = new AbortController(), n = (r) => {
2897
+ t.abort(r);
2898
+ };
2899
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
2900
+ }
2901
+ /**
2902
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2903
+ * cancels the `CancelToken`.
2904
+ */
2905
+ static source() {
2906
+ let t;
2907
+ return {
2908
+ token: new jt(function(o) {
2909
+ t = o;
2910
+ }),
2911
+ cancel: t
2912
+ };
2913
+ }
2914
+ };
2915
+ function lo(e) {
2916
+ return function(n) {
2917
+ return e.apply(null, n);
2918
+ };
2919
+ }
2920
+ function co(e) {
2921
+ return a.isObject(e) && e.isAxiosError === !0;
2922
+ }
2923
+ const ve = {
2924
+ Continue: 100,
2925
+ SwitchingProtocols: 101,
2926
+ Processing: 102,
2927
+ EarlyHints: 103,
2928
+ Ok: 200,
2929
+ Created: 201,
2930
+ Accepted: 202,
2931
+ NonAuthoritativeInformation: 203,
2932
+ NoContent: 204,
2933
+ ResetContent: 205,
2934
+ PartialContent: 206,
2935
+ MultiStatus: 207,
2936
+ AlreadyReported: 208,
2937
+ ImUsed: 226,
2938
+ MultipleChoices: 300,
2939
+ MovedPermanently: 301,
2940
+ Found: 302,
2941
+ SeeOther: 303,
2942
+ NotModified: 304,
2943
+ UseProxy: 305,
2944
+ Unused: 306,
2945
+ TemporaryRedirect: 307,
2946
+ PermanentRedirect: 308,
2947
+ BadRequest: 400,
2948
+ Unauthorized: 401,
2949
+ PaymentRequired: 402,
2950
+ Forbidden: 403,
2951
+ NotFound: 404,
2952
+ MethodNotAllowed: 405,
2953
+ NotAcceptable: 406,
2954
+ ProxyAuthenticationRequired: 407,
2955
+ RequestTimeout: 408,
2956
+ Conflict: 409,
2957
+ Gone: 410,
2958
+ LengthRequired: 411,
2959
+ PreconditionFailed: 412,
2960
+ PayloadTooLarge: 413,
2961
+ UriTooLong: 414,
2962
+ UnsupportedMediaType: 415,
2963
+ RangeNotSatisfiable: 416,
2964
+ ExpectationFailed: 417,
2965
+ ImATeapot: 418,
2966
+ MisdirectedRequest: 421,
2967
+ UnprocessableEntity: 422,
2968
+ Locked: 423,
2969
+ FailedDependency: 424,
2970
+ TooEarly: 425,
2971
+ UpgradeRequired: 426,
2972
+ PreconditionRequired: 428,
2973
+ TooManyRequests: 429,
2974
+ RequestHeaderFieldsTooLarge: 431,
2975
+ UnavailableForLegalReasons: 451,
2976
+ InternalServerError: 500,
2977
+ NotImplemented: 501,
2978
+ BadGateway: 502,
2979
+ ServiceUnavailable: 503,
2980
+ GatewayTimeout: 504,
2981
+ HttpVersionNotSupported: 505,
2982
+ VariantAlsoNegotiates: 506,
2983
+ InsufficientStorage: 507,
2984
+ LoopDetected: 508,
2985
+ NotExtended: 510,
2986
+ NetworkAuthenticationRequired: 511
2987
+ };
2988
+ Object.entries(ve).forEach(([e, t]) => {
2989
+ ve[t] = e;
2990
+ });
2991
+ function It(e) {
2992
+ const t = new H(e), n = mt(H.prototype.request, t);
2993
+ return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2994
+ return It(V(e, o));
2995
+ }, n;
2996
+ }
2997
+ const R = It(ne);
2998
+ R.Axios = H;
2999
+ R.CanceledError = K;
3000
+ R.CancelToken = ao;
3001
+ R.isCancel = kt;
3002
+ R.VERSION = Bt;
3003
+ R.toFormData = ge;
3004
+ R.AxiosError = y;
3005
+ R.Cancel = R.CanceledError;
3006
+ R.all = function(t) {
3007
+ return Promise.all(t);
3008
+ };
3009
+ R.spread = lo;
3010
+ R.isAxiosError = co;
3011
+ R.mergeConfig = V;
3012
+ R.AxiosHeaders = F;
3013
+ R.formToJSON = (e) => Ot(a.isHTMLForm(e) ? new FormData(e) : e);
3014
+ R.getAdapter = Pt.getAdapter;
3015
+ R.HttpStatusCode = ve;
3016
+ R.default = R;
3017
+ const {
3018
+ Axios: Io,
3019
+ AxiosError: $o,
3020
+ CanceledError: qo,
3021
+ isCancel: Mo,
3022
+ CancelToken: Ho,
3023
+ VERSION: zo,
3024
+ all: Vo,
3025
+ Cancel: Jo,
3026
+ isAxiosError: Wo,
3027
+ spread: Ko,
3028
+ toFormData: Go,
3029
+ AxiosHeaders: Xo,
3030
+ HttpStatusCode: Qo,
3031
+ formToJSON: Zo,
3032
+ getAdapter: Yo,
3033
+ mergeConfig: ei
3034
+ } = R, Q = /* @__PURE__ */ new Map(), uo = (e, t) => Q.get(`${t}:${e}`), fo = (e, t, n) => {
3035
+ const r = `${t}:${e}`;
3036
+ if (Q.set(r, n), Q.size > 1e3) {
3037
+ const o = Q.keys().next().value;
3038
+ o !== void 0 && Q.delete(o);
3039
+ }
3040
+ }, ho = (e) => /^[A-ZÁÉÍÓÚÑ][a-záéíóúñ]+(?:\s[A-ZÁÉÍÓÚÑ][a-záéíóúñ]+)*$/.test(e.trim()), ot = /* @__PURE__ */ new Map(), po = 1e3, mo = (e) => {
3041
+ const t = Date.now(), n = ot.get(e) || 0;
3042
+ return t - n < po ? !0 : (ot.set(e, t), !1);
3043
+ }, go = "https://api.mymemory.translated.net/get", bo = async (e, t, n = "es") => {
3044
+ var i;
3045
+ const r = `${t}:${e}`;
3046
+ if (ho(e))
3047
+ return e;
3048
+ const o = uo(e, t);
3049
+ if (o) return o;
3050
+ if (mo(r))
3051
+ return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
3052
+ try {
3053
+ const { data: s } = await R.get(go, {
3054
+ params: {
3055
+ q: e,
3056
+ langpair: `${n}|${t}`
3057
+ }
3058
+ }), l = ((i = s == null ? void 0 : s.responseData) == null ? void 0 : i.translatedText) || e;
3059
+ return fo(e, t, l), l;
3060
+ } catch (s) {
3061
+ return console.warn(`[Translation] Failed for: "${e}"`, s), e;
3062
+ }
3063
+ }, yo = (e) => typeof e == "string" && e.trim().length > 0, it = async (e, t) => {
3064
+ const n = await Promise.all(
3065
+ Object.entries(e).map(async ([r, o]) => {
3066
+ if (yo(o)) {
3067
+ const i = await bo(o, t);
3068
+ return [r, i];
3069
+ } else if (Array.isArray(o)) {
3070
+ const i = await Promise.all(
3071
+ o.map(
3072
+ async (s) => typeof s == "object" && s !== null ? await it(s, t) : s
3073
+ )
3074
+ );
3075
+ return [r, i];
3076
+ } else if (typeof o == "object" && o !== null) {
3077
+ const i = await it(o, t);
3078
+ return [r, i];
3079
+ } else
3080
+ return [r, o];
3081
+ })
3082
+ );
3083
+ return Object.fromEntries(n);
3084
+ };
1334
3085
  export {
1335
- H as BusinessRuleCard,
1336
- re as BusinessRuleView,
1337
- gt as BusinessRules,
1338
- mt as Filter,
1339
- bt as FilterModal,
1340
- Tt as FormFilter,
1341
- Re as ModalRules,
1342
- it as RulesForm,
1343
- ft as revertSortedDataSampleSwitchPlaces,
1344
- xt as revertSortedDataSwitchPlaces,
1345
- yt as sortDisplayDataSampleSwitchPlaces,
1346
- vt as sortDisplayDataSwitchPlaces
3086
+ _e as BusinessRuleCard,
3087
+ ht as BusinessRuleView,
3088
+ Oo as BusinessRules,
3089
+ ko as Filter,
3090
+ vo as FilterModal,
3091
+ Fo as FormFilter,
3092
+ cn as ModalRules,
3093
+ _n as RulesForm,
3094
+ _o as revertSortedDataSampleSwitchPlaces,
3095
+ Lo as revertSortedDataSwitchPlaces,
3096
+ Uo as sortDisplayDataSampleSwitchPlaces,
3097
+ Po as sortDisplayDataSwitchPlaces,
3098
+ it as translateObject,
3099
+ bo as translateText
1347
3100
  };