@foris/avocado-not-front 3.0.1 → 4.0.0

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.
@@ -1,33 +1,33 @@
1
- import J from "axios";
1
+ import V from "axios";
2
2
  import { create as Ve } from "zustand";
3
- import He, { useEffect as V, useMemo as O, useState as q, Fragment as $, useCallback as D, useRef as Xe, cloneElement as We } from "react";
4
- import { Heading as Re, Text as Qe, ThemeStore as fe, Breadcrumbs as Ye, Button as Ze, CardNotification as ye, Checkbox as Fe, PreviewerMarkdown as Pe, Divider as et, SkeletonBase as De, Modal as tt, Pill as ue, RoundButton as nt, SelectPagination as rt, Select as st, Switch as at, Table as ot, Pager as ct, TextField as it, toast as W, Accordion as lt, Drawer as dt, Loading as _t, Toaster as ut } from "@foris/avocado-suite";
5
- import { SummaryCard as ht, PromptCodeEditor as ft } from "@foris/ai-agent";
6
- import yt from "@uiw/react-codemirror";
3
+ import He, { useMemo as S, useEffect as K, useState as k, Fragment as $, useCallback as D, useRef as Xe, cloneElement as We } from "react";
4
+ import { Heading as Re, Text as Qe, ThemeStore as fe, Breadcrumbs as Ye, Button as Ze, CardNotification as ye, Checkbox as Fe, PreviewerMarkdown as Pe, Divider as et, SkeletonBase as De, Modal as tt, Pill as ue, RoundButton as nt, SelectPagination as at, Select as st, Switch as rt, Table as ct, Pager as ot, TextField as it, toast as W, Accordion as lt, Drawer as dt, Loading as _t, Toaster as ut } from "@foris/avocado-suite";
5
+ import { ChatPanel as ht, SummaryCard as ft, PromptCodeEditor as yt } from "@foris/ai-agent";
6
+ import mt from "@uiw/react-codemirror";
7
7
  import { json as we } from "@codemirror/lang-json";
8
- import { markdown as mt } from "@codemirror/lang-markdown";
9
- import { sql as xt } from "@codemirror/lang-sql";
10
- import { yaml as gt } from "@codemirror/lang-yaml";
8
+ import { markdown as xt } from "@codemirror/lang-markdown";
9
+ import { sql as gt } from "@codemirror/lang-sql";
10
+ import { yaml as bt } from "@codemirror/lang-yaml";
11
11
  import B from "jsonpath";
12
- import { Legend as pt, Tooltip as bt, XAxis as jt, YAxis as wt, ResponsiveContainer as te, AreaChart as Ct, CartesianGrid as me, Area as Nt, BarChart as vt, Bar as Et, LineChart as kt, Line as qt, PieChart as St, Pie as At, Cell as Ot } from "recharts";
13
- const v = Ve(() => ({})), oe = (e, t, s, r) => {
14
- const l = s == null ? void 0 : s.hash, o = r && Object.keys(r).length > 0 ? { ...r } : {};
15
- v.setState((i) => {
12
+ import { Legend as pt, Tooltip as jt, XAxis as wt, YAxis as Ct, ResponsiveContainer as te, AreaChart as Nt, CartesianGrid as me, Area as vt, BarChart as Et, Bar as St, LineChart as qt, Line as kt, PieChart as Ot, Pie as At, Cell as Tt } from "recharts";
13
+ const v = Ve(() => ({})), ce = (e, t, s, a) => {
14
+ const i = s == null ? void 0 : s.hash, c = a && Object.keys(a).length > 0 ? { ...a } : {};
15
+ v.setState((l) => {
16
16
  var n;
17
17
  return {
18
- ...i,
18
+ ...l,
19
19
  [e]: {
20
- ...i[e],
20
+ ...l[e],
21
21
  apiConfig: t,
22
- currentPageId: l,
22
+ currentPageId: i,
23
23
  isLoading: !1,
24
24
  isModalOpen: !0,
25
25
  isDrawerOpen: !1,
26
- entries: o,
26
+ entries: c,
27
27
  overlay: null,
28
28
  pages: {
29
- ...(n = i[e]) == null ? void 0 : n.pages,
30
- [l]: {
29
+ ...(n = l[e]) == null ? void 0 : n.pages,
30
+ [i]: {
31
31
  page: s
32
32
  }
33
33
  }
@@ -35,29 +35,29 @@ const v = Ve(() => ({})), oe = (e, t, s, r) => {
35
35
  };
36
36
  });
37
37
  }, Le = (e, t, s) => {
38
- const r = s && Object.keys(s).length > 0 ? { ...e, ...s } : e;
38
+ const a = s && Object.keys(s).length > 0 ? { ...e, ...s } : e;
39
39
  return t.length === 0 ? e : Object.fromEntries(
40
- Object.entries(r).filter(
41
- ([l]) => !t.includes(l)
40
+ Object.entries(a).filter(
41
+ ([i]) => !t.includes(i)
42
42
  )
43
43
  );
44
- }, Tt = (e, t, s, r, l) => {
45
- sessionStorage.setItem("sessionId", s), v.setState((o) => {
46
- const i = o[e] ?? {}, n = i.entries ?? {}, d = Le(
44
+ }, $t = (e, t, s, a, i) => {
45
+ sessionStorage.setItem("sessionId", s), v.setState((c) => {
46
+ const l = c[e] ?? {}, n = l.entries ?? {}, d = Le(
47
47
  n,
48
- r,
49
- l
48
+ a,
49
+ i
50
50
  );
51
51
  return {
52
- ...o,
52
+ ...c,
53
53
  [e]: {
54
- ...i,
54
+ ...l,
55
55
  currentPageId: t.hash,
56
56
  entries: d,
57
57
  isLoading: !1,
58
58
  overlay: null,
59
59
  pages: {
60
- ...i.pages,
60
+ ...l.pages,
61
61
  [t.hash]: {
62
62
  page: { ...t }
63
63
  }
@@ -65,20 +65,20 @@ const v = Ve(() => ({})), oe = (e, t, s, r) => {
65
65
  }
66
66
  };
67
67
  });
68
- }, $t = (e, t, s, r) => {
69
- v.setState((l) => {
70
- var a;
71
- const o = l[e] ?? {}, i = o.entries ?? {}, n = Le(
72
- i,
68
+ }, Rt = (e, t, s, a) => {
69
+ v.setState((i) => {
70
+ var r;
71
+ const c = i[e] ?? {}, l = c.entries ?? {}, n = Le(
72
+ l,
73
73
  s,
74
- r
75
- ), d = (a = t.components) == null ? void 0 : a.some(
74
+ a
75
+ ), d = (r = t.components) == null ? void 0 : r.some(
76
76
  (u) => u.component === "drawer"
77
77
  );
78
78
  return {
79
- ...l,
79
+ ...i,
80
80
  [e]: {
81
- ...o,
81
+ ...c,
82
82
  entries: n,
83
83
  overlay: t,
84
84
  isLoading: !1,
@@ -95,37 +95,37 @@ const v = Ve(() => ({})), oe = (e, t, s, r) => {
95
95
  overlay: null
96
96
  }
97
97
  }));
98
- }, Rt = (e) => {
98
+ }, Dt = (e) => {
99
99
  var s;
100
100
  return ((s = v.getState()[e]) == null ? void 0 : s.overlay) ?? null;
101
- }, S = (e, t) => {
101
+ }, O = (e, t) => {
102
102
  const {
103
103
  content: s,
104
- sessionId: r,
105
- deprecatedStateKeys: l = [],
106
- sessionState: o
104
+ sessionId: a,
105
+ deprecatedStateKeys: i = [],
106
+ sessionState: c
107
107
  } = t;
108
- s.type !== "page" && s.type !== "overlay" || (s.type === "page" ? Tt(
108
+ s.type !== "page" && s.type !== "overlay" || (s.type === "page" ? $t(
109
109
  e,
110
110
  s,
111
- r,
112
- l,
113
- o
114
- ) : $t(
111
+ a,
112
+ i,
113
+ c
114
+ ) : Rt(
115
115
  e,
116
116
  s,
117
- l,
118
- o
117
+ i,
118
+ c
119
119
  ));
120
120
  }, L = (e, t) => {
121
121
  v.setState((s) => {
122
- var r;
122
+ var a;
123
123
  return {
124
124
  ...s,
125
125
  [e]: {
126
126
  ...s[e],
127
127
  entries: {
128
- ...(r = s[e]) == null ? void 0 : r.entries,
128
+ ...(a = s[e]) == null ? void 0 : a.entries,
129
129
  ...t
130
130
  // New entries
131
131
  }
@@ -158,58 +158,58 @@ const v = Ve(() => ({})), oe = (e, t, s, r) => {
158
158
  }));
159
159
  }, Ce = (e, t) => {
160
160
  v.setState((s) => {
161
- const r = s[e];
162
- return r ? {
161
+ const a = s[e];
162
+ return a ? {
163
163
  ...s,
164
164
  [e]: {
165
- ...r,
165
+ ...a,
166
166
  apiConfig: {
167
- ...r.apiConfig,
167
+ ...a.apiConfig,
168
168
  headers: t
169
169
  }
170
170
  }
171
171
  } : s;
172
172
  });
173
173
  };
174
- let ce = !1, P = [], Ne = !1;
175
- const Dt = (e) => e._userFlow || null, ve = (e) => {
174
+ let oe = !1, P = [], Ne = !1;
175
+ const Lt = (e) => e._userFlow || null, ve = (e) => {
176
176
  P.forEach(({ resolve: t, reject: s }) => {
177
177
  e ? s(e) : t(void 0);
178
178
  }), P = [];
179
- }, Lt = async (e) => {
180
- var r, l;
179
+ }, Bt = async (e) => {
180
+ var a, i;
181
181
  const t = e == null ? void 0 : e.config;
182
- if (((r = e == null ? void 0 : e.response) == null ? void 0 : r.status) === 401 && !t._retry) {
183
- const o = Dt(t);
184
- if (o) {
185
- const n = (l = v.getState()[o]) == null ? void 0 : l.apiConfig;
182
+ if (((a = e == null ? void 0 : e.response) == null ? void 0 : a.status) === 401 && !t._retry) {
183
+ const c = Lt(t);
184
+ if (c) {
185
+ const n = (i = v.getState()[c]) == null ? void 0 : i.apiConfig;
186
186
  if (!n)
187
187
  return Promise.reject(e);
188
188
  if (n.onAuthenticationError || typeof n.headers == "function") {
189
- if (ce)
190
- return new Promise((a, u) => {
191
- P.push({ resolve: a, reject: u });
192
- }).then(() => J(t)).catch((a) => (console.error("[axiosInterceptors] Queued request failed:", a), Promise.reject(a)));
193
- t._retry = !0, ce = !0;
189
+ if (oe)
190
+ return new Promise((r, u) => {
191
+ P.push({ resolve: r, reject: u });
192
+ }).then(() => V(t)).catch((r) => (console.error("[axiosInterceptors] Queued request failed:", r), Promise.reject(r)));
193
+ t._retry = !0, oe = !0;
194
194
  try {
195
- let a;
195
+ let r;
196
196
  if (n.onAuthenticationError)
197
- a = await n.onAuthenticationError();
197
+ r = await n.onAuthenticationError();
198
198
  else if (typeof n.headers == "function")
199
- a = n.headers();
199
+ r = n.headers();
200
200
  else
201
201
  throw new Error("No refresh handler available");
202
- return n.onAuthenticationError && (typeof n.headers == "string" ? Ce(o, JSON.stringify(a)) : Ce(o, a)), t.headers || (t.headers = {}), Object.assign(t.headers, a), ve(null), J(t);
203
- } catch (a) {
202
+ return n.onAuthenticationError && (typeof n.headers == "string" ? Ce(c, JSON.stringify(r)) : Ce(c, r)), t.headers || (t.headers = {}), Object.assign(t.headers, r), ve(null), V(t);
203
+ } catch (r) {
204
204
  return console.error(
205
205
  "[axiosInterceptors] Token refresh failed:",
206
- a
206
+ r
207
207
  ), console.error(
208
208
  "[axiosInterceptors] Rejecting queued requests:",
209
209
  P.length
210
- ), ve(a), Promise.reject(a);
210
+ ), ve(r), Promise.reject(r);
211
211
  } finally {
212
- ce = !1;
212
+ oe = !1;
213
213
  }
214
214
  } else
215
215
  console.warn(
@@ -222,17 +222,17 @@ const Dt = (e) => e._userFlow || null, ve = (e) => {
222
222
  );
223
223
  }
224
224
  return Promise.reject(e);
225
- }, Bt = () => {
225
+ }, It = () => {
226
226
  if (Ne) {
227
227
  console.debug(
228
228
  "[axiosInterceptors] Interceptors already initialized, skipping"
229
229
  );
230
230
  return;
231
231
  }
232
- console.debug("[axiosInterceptors] Initializing interceptors..."), J.interceptors.response.use(void 0, Lt), console.debug("[axiosInterceptors] Response error interceptor registered"), Ne = !0, console.debug("[axiosInterceptors] Interceptors initialized successfully");
232
+ console.debug("[axiosInterceptors] Initializing interceptors..."), V.interceptors.response.use(void 0, Bt), console.debug("[axiosInterceptors] Response error interceptor registered"), Ne = !0, console.debug("[axiosInterceptors] Interceptors initialized successfully");
233
233
  };
234
- Bt();
235
- function It(e) {
234
+ It();
235
+ function zt(e) {
236
236
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
237
237
  }
238
238
  var ie = { exports: {} }, Q = {};
@@ -246,135 +246,172 @@ var ie = { exports: {} }, Q = {};
246
246
  * LICENSE file in the root directory of this source tree.
247
247
  */
248
248
  var Ee;
249
- function zt() {
249
+ function Mt() {
250
250
  if (Ee) return Q;
251
251
  Ee = 1;
252
- var e = He, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, l = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
253
- function i(n, d, a) {
252
+ var e = He, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
253
+ function l(n, d, r) {
254
254
  var u, f = {}, _ = null, h = null;
255
- a !== void 0 && (_ = "" + a), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (h = d.ref);
256
- for (u in d) r.call(d, u) && !o.hasOwnProperty(u) && (f[u] = d[u]);
255
+ r !== void 0 && (_ = "" + r), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (h = d.ref);
256
+ for (u in d) a.call(d, u) && !c.hasOwnProperty(u) && (f[u] = d[u]);
257
257
  if (n && n.defaultProps) for (u in d = n.defaultProps, d) f[u] === void 0 && (f[u] = d[u]);
258
- return { $$typeof: t, type: n, key: _, ref: h, props: f, _owner: l.current };
258
+ return { $$typeof: t, type: n, key: _, ref: h, props: f, _owner: i.current };
259
259
  }
260
- return Q.Fragment = s, Q.jsx = i, Q.jsxs = i, Q;
260
+ return Q.Fragment = s, Q.jsx = l, Q.jsxs = l, Q;
261
261
  }
262
- var ke;
263
- function Mt() {
264
- return ke || (ke = 1, ie.exports = zt()), ie.exports;
262
+ var Se;
263
+ function Kt() {
264
+ return Se || (Se = 1, ie.exports = Mt()), ie.exports;
265
265
  }
266
- var c = Mt();
267
- const Kt = (e) => {
266
+ var o = Kt();
267
+ const Gt = (e) => {
268
268
  if (!(e != null && e.content)) return null;
269
269
  const t = {
270
270
  ...e,
271
271
  children: e.content,
272
272
  type: e.variant
273
273
  };
274
- return /* @__PURE__ */ c.jsx(Re, { ...t });
275
- }, Gt = (e) => {
274
+ return /* @__PURE__ */ o.jsx(Re, { ...t });
275
+ }, Ut = (e) => {
276
276
  if (!e) return null;
277
277
  const t = {
278
278
  ...e,
279
279
  children: e.content
280
280
  };
281
- return /* @__PURE__ */ c.jsx(Qe, { ...t });
282
- }, Ut = (e) => (V(() => {
283
- e != null && e.chatPanelCallback && (e == null || e.chatPanelCallback(e));
284
- }, [e == null ? void 0 : e.chatPanelCallback]), null), Jt = "_summaryCard_jva4h_1", Vt = {
285
- summaryCard: Jt
286
- }, Ht = (e) => {
287
- const t = e.dataSource, s = {
281
+ return /* @__PURE__ */ o.jsx(Qe, { ...t });
282
+ }, Jt = (e) => {
283
+ const t = e.dataSource, s = S(() => ({
284
+ url: e.dataSource.url,
285
+ method: e.dataSource.method,
286
+ headers: e.dataSource.headers,
287
+ params: t == null ? void 0 : t.data
288
+ }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]), a = e.locale ?? "en", i = S(() => {
289
+ var l, n, d, r, u;
290
+ const c = {
291
+ title: (l = e == null ? void 0 : e.translations) == null ? void 0 : l.title,
292
+ welcomeTitle: (n = e == null ? void 0 : e.translations) == null ? void 0 : n.welcomeTitle,
293
+ welcomeDescription: (d = e == null ? void 0 : e.translations) == null ? void 0 : d.welcomeDescription,
294
+ placeholder: (r = e == null ? void 0 : e.translations) == null ? void 0 : r.placeholder,
295
+ disclaimer: (u = e == null ? void 0 : e.translations) == null ? void 0 : u.disclaimer
296
+ };
297
+ return Object.fromEntries(Object.entries(c).filter(([, f]) => !!f));
298
+ }, [e == null ? void 0 : e.translations]);
299
+ return K(() => {
300
+ e.onResolveProps && e.onResolveProps({
301
+ dataSource: s,
302
+ locale: a,
303
+ translations: i,
304
+ initialSuggestions: e.initialSuggestions
305
+ });
306
+ }, [e.onResolveProps, s, a, i, e.initialSuggestions]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx(
307
+ ht,
308
+ {
309
+ dataSource: s,
310
+ locale: a,
311
+ translations: i,
312
+ initialSuggestions: e.initialSuggestions
313
+ }
314
+ );
315
+ }, Vt = "_summaryCard_jva4h_1", Ht = {
316
+ summaryCard: Vt
317
+ }, Xt = (e) => {
318
+ const t = e.dataSource, s = S(() => ({
288
319
  url: e.dataSource.url,
289
320
  method: e.dataSource.method,
290
321
  headers: e.dataSource.headers,
291
322
  body: t == null ? void 0 : t.data
292
- }, r = e.locale ?? "en", l = O(() => {
293
- var i, n, d;
294
- const o = {
295
- title: (i = e == null ? void 0 : e.translations) == null ? void 0 : i.title,
323
+ }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]), a = e.locale ?? "en", i = S(() => {
324
+ var l, n, d;
325
+ const c = {
326
+ title: (l = e == null ? void 0 : e.translations) == null ? void 0 : l.title,
296
327
  loading: (n = e == null ? void 0 : e.translations) == null ? void 0 : n.loading,
297
328
  noData: (d = e == null ? void 0 : e.translations) == null ? void 0 : d.noData
298
329
  };
299
330
  return Object.fromEntries(
300
- Object.entries(o).filter(([, a]) => !!a)
331
+ Object.entries(c).filter(([, r]) => !!r)
301
332
  );
302
333
  }, [e == null ? void 0 : e.translations]);
303
- return /* @__PURE__ */ c.jsx("section", { className: Vt.summaryCard, children: /* @__PURE__ */ c.jsx(
304
- ht,
334
+ return K(() => {
335
+ e.onResolveProps && e.onResolveProps({
336
+ dataSource: s,
337
+ locale: a,
338
+ translations: i
339
+ });
340
+ }, [e.onResolveProps, s, a, i]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx("section", { className: Ht.summaryCard, children: /* @__PURE__ */ o.jsx(
341
+ ft,
305
342
  {
306
343
  dataSource: s,
307
- locale: r,
308
- translations: l
344
+ locale: a,
345
+ translations: i
309
346
  }
310
347
  ) });
311
348
  }, M = (e, t) => {
312
- const s = v((r) => {
313
- var l;
314
- return ((l = r[e]) == null ? void 0 : l.entries) || {};
349
+ const s = v((a) => {
350
+ var i;
351
+ return ((i = a[e]) == null ? void 0 : i.entries) || {};
315
352
  });
316
- return O(() => {
317
- const r = {
353
+ return S(() => {
354
+ const a = {
318
355
  disabled: !1
319
356
  };
320
- return !t || t.length === 0 || t.forEach((l) => {
321
- const o = s[l.key], i = o == null || o === "" || Array.isArray(o) && o.length === 0;
322
- l.when === "empty" && i && l.actions.forEach((d) => {
323
- r[d] = !0;
357
+ return !t || t.length === 0 || t.forEach((i) => {
358
+ const c = s[i.key], l = c == null || c === "" || Array.isArray(c) && c.length === 0;
359
+ i.when === "empty" && l && i.actions.forEach((d) => {
360
+ a[d] = !0;
324
361
  });
325
- }), r;
362
+ }), a;
326
363
  }, [t, s]);
327
- }, Xt = "_promptCodeEditor_1d57s_1", Wt = {
328
- promptCodeEditor: Xt
329
- }, Qt = (e) => {
364
+ }, Wt = "_promptCodeEditor_1d57s_1", Qt = {
365
+ promptCodeEditor: Wt
366
+ }, Yt = (e) => {
330
367
  const {
331
368
  userFlow: t,
332
369
  responseKey: s,
333
- codeBlockValue: r,
334
- language: l,
335
- disabled: o,
336
- dependencies: i,
370
+ codeBlockValue: a,
371
+ language: i,
372
+ disabled: c,
373
+ dependencies: l,
337
374
  dataSource: n,
338
375
  inputLabel: d,
339
- inputPlaceholder: a,
376
+ inputPlaceholder: r,
340
377
  codeBlockLabel: u
341
- } = e, f = fe.useThemeStore((b) => b.theme.mode), [_, h] = q(
342
- r || ""
378
+ } = e, f = fe.useThemeStore((p) => p.theme.mode), [_, h] = k(
379
+ a || ""
343
380
  ), { disabled: j } = M(
344
381
  t,
345
- i
346
- ), y = o ?? j, x = l ?? "json", m = {
382
+ l
383
+ ), y = c ?? j, x = i ?? "json", m = {
347
384
  url: (n == null ? void 0 : n.url) || "",
348
385
  method: (n == null ? void 0 : n.method) || "post",
349
386
  headers: n == null ? void 0 : n.headers,
350
387
  body: n == null ? void 0 : n.data
351
- }, g = (b) => {
352
- h(b);
388
+ }, g = (p) => {
389
+ h(p);
353
390
  const N = {
354
- [s]: b
391
+ [s]: p
355
392
  };
356
393
  L(t, N);
357
394
  };
358
- return V(() => {
359
- r !== void 0 && r !== _ && h(r);
360
- }, [r]), /* @__PURE__ */ c.jsx("section", { className: Wt.promptCodeEditor, children: /* @__PURE__ */ c.jsx(
361
- ft,
395
+ return K(() => {
396
+ a !== void 0 && a !== _ && h(a);
397
+ }, [a]), /* @__PURE__ */ o.jsx("section", { className: Qt.promptCodeEditor, children: /* @__PURE__ */ o.jsx(
398
+ yt,
362
399
  {
363
400
  themeMode: f,
364
401
  requestConfig: m,
365
402
  language: x,
366
403
  disabled: y,
367
404
  inputLabel: d,
368
- inputPlaceholder: a,
405
+ inputPlaceholder: r,
369
406
  codeBlockLabel: u,
370
407
  codeBlockValue: _,
371
408
  onCodeChange: g
372
409
  }
373
410
  ) });
374
- }, Yt = "_body_14tsv_1", Zt = "_body_content_14tsv_5", qe = {
375
- body: Yt,
376
- body_content: Zt
377
- }, Ft = ({ inputs: e }) => /* @__PURE__ */ c.jsx("section", { className: qe.body, children: /* @__PURE__ */ c.jsx("div", { className: qe.body_content, children: e.map((t, s) => /* @__PURE__ */ c.jsx($, { children: t }, s)) }) }), X = (e) => {
411
+ }, Zt = "_body_14tsv_1", Ft = "_body_content_14tsv_5", qe = {
412
+ body: Zt,
413
+ body_content: Ft
414
+ }, Pt = ({ inputs: e }) => /* @__PURE__ */ o.jsx("section", { className: qe.body, children: /* @__PURE__ */ o.jsx("div", { className: qe.body_content, children: e.map((t, s) => /* @__PURE__ */ o.jsx($, { children: t }, s)) }) }), X = (e) => {
378
415
  if (!e)
379
416
  return { "content-type": "application/json" };
380
417
  if (typeof e == "function")
@@ -386,118 +423,118 @@ const Kt = (e) => {
386
423
  return { "content-type": "application/json", Authorization: e };
387
424
  }
388
425
  return e;
389
- }, F = () => new AbortController(), Pt = (e, t = {}, s = {}, r = !1, l) => {
390
- const o = F();
391
- r && o.abort();
392
- const i = X(t);
426
+ }, F = () => new AbortController(), en = (e, t = {}, s = {}, a = !1, i) => {
427
+ const c = F();
428
+ a && c.abort();
429
+ const l = X(t);
393
430
  return {
394
- call: J.get(e, {
431
+ call: V.get(e, {
395
432
  headers: {
396
- ...i
433
+ ...l
397
434
  },
398
435
  params: s,
399
- signal: o.signal,
400
- _userFlow: l
436
+ signal: c.signal,
437
+ _userFlow: i
401
438
  }),
402
- controller: o
439
+ controller: c
403
440
  };
404
- }, he = (e, t = {}, s = {}, r = {}, l = !1, o) => {
405
- const i = F();
406
- l && i.abort();
441
+ }, he = (e, t = {}, s = {}, a = {}, i = !1, c) => {
442
+ const l = F();
443
+ i && l.abort();
407
444
  const n = X(t);
408
445
  return {
409
- call: J.post(e, s, {
446
+ call: V.post(e, s, {
410
447
  headers: {
411
448
  ...n
412
449
  },
413
- params: r,
414
- signal: i.signal,
415
- _userFlow: o
450
+ params: a,
451
+ signal: l.signal,
452
+ _userFlow: c
416
453
  }),
417
- controller: i
454
+ controller: l
418
455
  };
419
- }, en = (e, t = {}, s = {}, r = {}, l = !1, o) => {
420
- const i = F();
421
- l && i.abort();
456
+ }, tn = (e, t = {}, s = {}, a = {}, i = !1, c) => {
457
+ const l = F();
458
+ i && l.abort();
422
459
  const n = X(t);
423
460
  return {
424
- call: J.put(e, s, {
461
+ call: V.put(e, s, {
425
462
  headers: {
426
463
  ...n
427
464
  },
428
- params: r,
429
- signal: i.signal,
430
- _userFlow: o
465
+ params: a,
466
+ signal: l.signal,
467
+ _userFlow: c
431
468
  }),
432
- controller: i
469
+ controller: l
433
470
  };
434
- }, tn = (e, t = {}, s = {}, r = {}, l = !1, o) => {
435
- const i = F();
436
- l && i.abort();
471
+ }, nn = (e, t = {}, s = {}, a = {}, i = !1, c) => {
472
+ const l = F();
473
+ i && l.abort();
437
474
  const n = X(t);
438
475
  return {
439
- call: J.patch(e, s, {
476
+ call: V.patch(e, s, {
440
477
  headers: {
441
478
  ...n
442
479
  },
443
- params: r,
444
- signal: i.signal,
445
- _userFlow: o
480
+ params: a,
481
+ signal: l.signal,
482
+ _userFlow: c
446
483
  }),
447
- controller: i
484
+ controller: l
448
485
  };
449
- }, nn = (e, t = {}, s = {}, r = {}, l = !1, o) => {
450
- const i = F();
451
- l && i.abort();
486
+ }, an = (e, t = {}, s = {}, a = {}, i = !1, c) => {
487
+ const l = F();
488
+ i && l.abort();
452
489
  const n = X(t);
453
490
  return {
454
- call: J.delete(e, {
491
+ call: V.delete(e, {
455
492
  headers: {
456
493
  ...n
457
494
  },
458
495
  data: s,
459
- params: r,
460
- signal: i.signal,
461
- _userFlow: o
496
+ params: a,
497
+ signal: l.signal,
498
+ _userFlow: c
462
499
  }),
463
- controller: i
500
+ controller: l
464
501
  };
465
502
  }, Be = () => {
466
503
  let e;
467
- return { callEndpoint: async (r) => {
468
- r.controller && (e = r.controller);
469
- let l = {};
504
+ return { callEndpoint: async (a) => {
505
+ a.controller && (e = a.controller);
506
+ let i = {};
470
507
  try {
471
- l = await r.call;
472
- } catch (o) {
473
- throw o;
508
+ i = await a.call;
509
+ } catch (c) {
510
+ throw c;
474
511
  }
475
- return l;
512
+ return i;
476
513
  }, cancelEndpoint: () => {
477
514
  e && e.abort();
478
515
  } };
479
- }, Ie = async (e, t, s = "", r = {}, l = {}) => {
516
+ }, Ie = async (e, t, s = "", a = {}, i = {}) => {
480
517
  try {
481
- const { callEndpoint: o } = Be(), { api: i, headers: n } = e, d = sessionStorage.getItem("sessionId"), a = new URLSearchParams({ session_name: t });
482
- s && a.append("hash_code", s), d && a.append("sessionId", d);
483
- const u = `${i}/not-front/next-ui/?${a.toString()}`, f = X(n), _ = he(
518
+ const { callEndpoint: c } = Be(), { api: l, headers: n } = e, d = sessionStorage.getItem("sessionId"), r = new URLSearchParams({ session_name: t });
519
+ s && r.append("hash_code", s), d && r.append("sessionId", d);
520
+ const u = `${l}/not-front/next-ui/?${r.toString()}`, f = X(n), _ = he(
484
521
  u,
485
522
  f,
486
- r,
487
- l,
523
+ a,
524
+ i,
488
525
  !1,
489
526
  t
490
527
  );
491
- return await o(_);
492
- } catch (o) {
493
- return console.error(o), Promise.reject(o);
528
+ return await c(_);
529
+ } catch (c) {
530
+ return console.error(c), Promise.reject(c);
494
531
  }
495
532
  }, I = () => {
496
- const e = v((n) => n), { callEndpoint: t } = Be(), s = async (n, d, a, u, f = !0) => {
533
+ const e = v((n) => n), { callEndpoint: t } = Be(), s = async (n, d, r, u, f = !0) => {
497
534
  var _;
498
535
  try {
499
536
  const h = (_ = e[n]) == null ? void 0 : _.apiConfig, j = {
500
- state: { ...a },
537
+ state: { ...r },
501
538
  triggerKey: u
502
539
  };
503
540
  return f && H(n, !0), await Ie(
@@ -509,28 +546,28 @@ const Kt = (e) => {
509
546
  } catch (h) {
510
547
  throw f && H(n, !1), console.error("[getNextUI] Error fetching next UI:", h), h;
511
548
  }
512
- }, r = (n, d) => {
513
- const { method: a, url: u, headers: f, data: _, params: h } = n;
514
- switch (a) {
549
+ }, a = (n, d) => {
550
+ const { method: r, url: u, headers: f, data: _, params: h } = n;
551
+ switch (r) {
515
552
  case "post":
516
553
  return he(u, f, _, {}, !1, d);
517
554
  case "put":
518
- return en(u, f, _, {}, !1, d);
519
- case "patch":
520
555
  return tn(u, f, _, {}, !1, d);
556
+ case "patch":
557
+ return nn(u, f, _, {}, !1, d);
521
558
  case "delete":
522
- return nn(u, f, _, h, !1, d);
559
+ return an(u, f, _, h, !1, d);
523
560
  case "get":
524
561
  default:
525
- return Pt(u, f, h, !1, d);
562
+ return en(u, f, h, !1, d);
526
563
  }
527
- }, l = (n, d) => {
528
- const { url: a, headers: u } = n, f = {
564
+ }, i = (n, d) => {
565
+ const { url: r, headers: u } = n, f = {
529
566
  query: n == null ? void 0 : n.query,
530
567
  variables: (n == null ? void 0 : n.variables) || {}
531
568
  };
532
569
  return he(
533
- a,
570
+ r,
534
571
  {
535
572
  ...u,
536
573
  "Content-Type": "application/json"
@@ -540,21 +577,21 @@ const Kt = (e) => {
540
577
  !1,
541
578
  d
542
579
  );
543
- }, o = async (n, d, a = !0) => {
580
+ }, c = async (n, d, r = !0) => {
544
581
  var u, f;
545
582
  if (!n) {
546
583
  console.warn("[fetchDataSource] Invalid or missing dataSource");
547
584
  return;
548
585
  }
549
- a && H(d, !0);
586
+ r && H(d, !0);
550
587
  try {
551
588
  let _;
552
589
  switch (n == null ? void 0 : n.type) {
553
590
  case "rest":
554
- _ = r(n, d);
591
+ _ = a(n, d);
555
592
  break;
556
593
  case "graphql":
557
- _ = l(n, d);
594
+ _ = i(n, d);
558
595
  break;
559
596
  default:
560
597
  throw new Error("[fetchDataSource] Unsupported data source type");
@@ -571,20 +608,20 @@ const Kt = (e) => {
571
608
  }
572
609
  };
573
610
  } finally {
574
- a && H(d, !1);
611
+ r && H(d, !1);
575
612
  }
576
613
  };
577
614
  return {
578
615
  getNextUI: s,
579
- fetchDataSource: o,
580
- fetchAndGetNextUI: async (n, d, a, u, f) => {
616
+ fetchDataSource: c,
617
+ fetchAndGetNextUI: async (n, d, r, u, f) => {
581
618
  try {
582
619
  H(n, !0);
583
- const _ = await o(f, n, !1);
620
+ const _ = await c(f, n, !1);
584
621
  return _ && await s(
585
622
  n,
586
623
  d,
587
- a,
624
+ r,
588
625
  u
589
626
  );
590
627
  } catch (_) {
@@ -595,30 +632,30 @@ const Kt = (e) => {
595
632
  }
596
633
  }
597
634
  };
598
- }, rn = ({
635
+ }, sn = ({
599
636
  userFlow: e,
600
637
  items: t,
601
638
  responseKey: s
602
639
  }) => {
603
- const { getNextUI: r } = I(), l = D(
604
- async ({ actionType: i, hashCode: n, redirectUrl: d }) => {
605
- var a;
640
+ const { getNextUI: a } = I(), i = D(
641
+ async ({ actionType: l, hashCode: n, redirectUrl: d }) => {
642
+ var r;
606
643
  try {
607
- switch (i) {
644
+ switch (l) {
608
645
  case "GO_TO_NEXT_UI":
609
- const u = await r(
646
+ const u = await a(
610
647
  e,
611
648
  n,
612
- { ...(a = v.getState()[e]) == null ? void 0 : a.entries },
649
+ { ...(r = v.getState()[e]) == null ? void 0 : r.entries },
613
650
  s
614
651
  );
615
- u != null && u.data && S(e, u == null ? void 0 : u.data);
652
+ u != null && u.data && O(e, u == null ? void 0 : u.data);
616
653
  break;
617
654
  case "REDIRECT":
618
655
  d ? window.location.href = d : console.warn("Missing redirectUrl for REDIRECT actionType");
619
656
  break;
620
657
  default:
621
- console.warn(`Unhandled actionType: ${i}`);
658
+ console.warn(`Unhandled actionType: ${l}`);
622
659
  break;
623
660
  }
624
661
  } catch (u) {
@@ -626,38 +663,38 @@ const Kt = (e) => {
626
663
  }
627
664
  },
628
665
  []
629
- ), o = O(() => t == null ? void 0 : t.map((i) => ({
630
- title: i == null ? void 0 : i.title,
631
- component: /* @__PURE__ */ c.jsx("div", { onClick: () => l(i) })
666
+ ), c = S(() => t == null ? void 0 : t.map((l) => ({
667
+ title: l == null ? void 0 : l.title,
668
+ component: /* @__PURE__ */ o.jsx("div", { onClick: () => i(l) })
632
669
  })), []);
633
- return /* @__PURE__ */ c.jsx(Ye, { items: o });
634
- }, sn = (e) => {
670
+ return /* @__PURE__ */ o.jsx(Ye, { items: c });
671
+ }, rn = (e) => {
635
672
  const {
636
673
  userFlow: t,
637
674
  pageId: s,
638
- responseKey: r,
639
- actionType: l,
640
- label: o,
641
- content: i,
675
+ responseKey: a,
676
+ actionType: i,
677
+ label: c,
678
+ content: l,
642
679
  dataSource: n,
643
680
  redirectUrl: d,
644
- dependencies: a,
681
+ dependencies: r,
645
682
  onClick: u,
646
683
  ...f
647
684
  } = e, { getNextUI: _, fetchDataSource: h, fetchAndGetNextUI: j } = I(), { disabled: y } = M(
648
685
  t,
649
- a
686
+ r
650
687
  ), x = {
651
688
  ...f,
652
- children: i ?? o
689
+ children: l ?? c
653
690
  }, m = (x == null ? void 0 : x.disabled) ?? y, g = D(async () => {
654
- var b, N, p;
691
+ var p, N, b;
655
692
  try {
656
693
  const C = {
657
- ...(b = v.getState()[t]) == null ? void 0 : b.entries,
658
- [r]: { status: 200 }
694
+ ...(p = v.getState()[t]) == null ? void 0 : p.entries,
695
+ [a]: { status: 200 }
659
696
  };
660
- switch (L(t, C), l) {
697
+ switch (L(t, C), i) {
661
698
  case "CLOSE_MODAL":
662
699
  ge(t, !1);
663
700
  break;
@@ -672,9 +709,9 @@ const Kt = (e) => {
672
709
  t,
673
710
  s,
674
711
  C,
675
- r
712
+ a
676
713
  );
677
- w != null && w.data && S(t, w == null ? void 0 : w.data);
714
+ w != null && w.data && O(t, w == null ? void 0 : w.data);
678
715
  break;
679
716
  }
680
717
  case "FETCH_AND_GO_TO_NEXT_UI": {
@@ -682,10 +719,10 @@ const Kt = (e) => {
682
719
  t,
683
720
  s,
684
721
  C,
685
- r,
722
+ a,
686
723
  n
687
724
  );
688
- w != null && w.data && S(t, w == null ? void 0 : w.data);
725
+ w != null && w.data && O(t, w == null ? void 0 : w.data);
689
726
  break;
690
727
  }
691
728
  case "GET_DATA_SOURCE": {
@@ -693,43 +730,43 @@ const Kt = (e) => {
693
730
  t,
694
731
  s,
695
732
  C,
696
- r
733
+ a
697
734
  ), E = (N = w == null ? void 0 : w.data) == null ? void 0 : N.content;
698
735
  if ((E == null ? void 0 : E.type) !== "fetch") break;
699
- const T = E == null ? void 0 : E.dataSource, k = await h(
736
+ const T = E == null ? void 0 : E.dataSource, q = await h(
700
737
  T,
701
738
  t,
702
739
  // Avoid to handle loading state until all the requests are done
703
740
  !1
704
- ), K = {
705
- ...(p = v.getState()[t]) == null ? void 0 : p.entries,
706
- [r]: {
707
- status: k == null ? void 0 : k.status,
708
- content: k == null ? void 0 : k.data
741
+ ), G = {
742
+ ...(b = v.getState()[t]) == null ? void 0 : b.entries,
743
+ [a]: {
744
+ status: q == null ? void 0 : q.status,
745
+ content: q == null ? void 0 : q.data
709
746
  }
710
747
  };
711
- L(t, K);
712
- const G = await _(
748
+ L(t, G);
749
+ const U = await _(
713
750
  t,
714
751
  s,
715
- K,
716
- r
752
+ G,
753
+ a
717
754
  );
718
- G != null && G.data && S(t, G == null ? void 0 : G.data);
755
+ U != null && U.data && O(t, U == null ? void 0 : U.data);
719
756
  break;
720
757
  }
721
758
  case "REDIRECT":
722
759
  d ? window.location.href = d : console.warn("Missing redirectUrl for REDIRECT actionType");
723
760
  break;
724
761
  default:
725
- console.warn(`Unhandled actionType: ${l}`);
762
+ console.warn(`Unhandled actionType: ${i}`);
726
763
  break;
727
764
  }
728
765
  } catch (C) {
729
766
  alert(JSON.stringify(C));
730
767
  }
731
- }, [l, n, s, r, t]);
732
- return /* @__PURE__ */ c.jsx(
768
+ }, [i, n, s, a, t]);
769
+ return /* @__PURE__ */ o.jsx(
733
770
  Ze,
734
771
  {
735
772
  ...x,
@@ -737,64 +774,64 @@ const Kt = (e) => {
737
774
  onClick: () => !m && (u ?? g)()
738
775
  }
739
776
  );
740
- }, an = "_cardNotificationNotFront_t7pln_1", on = {
741
- cardNotificationNotFront: an
742
- }, cn = (e) => {
743
- const { content: t, description: s, ...r } = e, l = {
744
- ...r,
777
+ }, cn = "_cardNotificationNotFront_t7pln_1", on = {
778
+ cardNotificationNotFront: cn
779
+ }, ln = (e) => {
780
+ const { content: t, description: s, ...a } = e, i = {
781
+ ...a,
745
782
  children: t ?? s
746
783
  };
747
- return /* @__PURE__ */ c.jsx(
784
+ return /* @__PURE__ */ o.jsx(
748
785
  ye,
749
786
  {
750
- ...l,
787
+ ...i,
751
788
  className: on.cardNotificationNotFront
752
789
  }
753
790
  );
754
- }, ln = (e) => {
791
+ }, dn = (e) => {
755
792
  const {
756
793
  userFlow: t,
757
794
  pageId: s,
758
- responseKey: r,
759
- actionType: l,
760
- label: o,
761
- value: i,
795
+ responseKey: a,
796
+ actionType: i,
797
+ label: c,
798
+ value: l,
762
799
  required: n,
763
800
  dependencies: d,
764
- ...a
801
+ ...r
765
802
  } = e, u = {
766
- ...a
767
- }, { getNextUI: f } = I(), [_, h] = q(i || !1), { disabled: j } = M(
803
+ ...r
804
+ }, { getNextUI: f } = I(), [_, h] = k(l || !1), { disabled: j } = M(
768
805
  t,
769
806
  d
770
- ), y = O(() => n && o ? `${o} *` : o ?? "", [o, n]), x = D(async () => {
807
+ ), y = S(() => n && c ? `${c} *` : c ?? "", [c, n]), x = D(async () => {
771
808
  var g;
772
809
  try {
773
- const b = !_;
774
- h(b);
810
+ const p = !_;
811
+ h(p);
775
812
  const N = {
776
813
  ...(g = v.getState()[t]) == null ? void 0 : g.entries,
777
- [r]: b
814
+ [a]: p
778
815
  };
779
- switch (L(t, N), l) {
816
+ switch (L(t, N), i) {
780
817
  case "GO_TO_NEXT_UI":
781
- const p = await f(
818
+ const b = await f(
782
819
  t,
783
820
  s,
784
821
  N,
785
- r
822
+ a
786
823
  );
787
- p != null && p.data && S(t, p == null ? void 0 : p.data);
824
+ b != null && b.data && O(t, b == null ? void 0 : b.data);
788
825
  break;
789
826
  default:
790
- console.warn(`Unhandled actionType: ${l}`);
827
+ console.warn(`Unhandled actionType: ${i}`);
791
828
  break;
792
829
  }
793
- } catch (b) {
794
- console.error("Error in checkbox action:", b), alert(JSON.stringify(b));
830
+ } catch (p) {
831
+ console.error("Error in checkbox action:", p), alert(JSON.stringify(p));
795
832
  }
796
- }, [t, s, r, l, _]), m = (u == null ? void 0 : u.disabled) ?? j;
797
- return /* @__PURE__ */ c.jsx(
833
+ }, [t, s, a, i, _]), m = (u == null ? void 0 : u.disabled) ?? j;
834
+ return /* @__PURE__ */ o.jsx(
798
835
  Fe,
799
836
  {
800
837
  ...u,
@@ -806,56 +843,56 @@ const Kt = (e) => {
806
843
  }
807
844
  }
808
845
  );
809
- }, dn = "_codeEditor_1coz7_1", _n = "_codeEditor_label_1coz7_4", un = "_codeEditor_wrapper_1coz7_13", hn = "_input_1coz7_17", fn = "_preview_1coz7_18", Y = {
810
- codeEditor: dn,
811
- codeEditor_label: _n,
812
- codeEditor_wrapper: un,
813
- input: hn,
814
- preview: fn
815
- }, yn = (e) => {
846
+ }, _n = "_codeEditor_1coz7_1", un = "_codeEditor_label_1coz7_4", hn = "_codeEditor_wrapper_1coz7_13", fn = "_input_1coz7_17", yn = "_preview_1coz7_18", Y = {
847
+ codeEditor: _n,
848
+ codeEditor_label: un,
849
+ codeEditor_wrapper: hn,
850
+ input: fn,
851
+ preview: yn
852
+ }, mn = (e) => {
816
853
  const {
817
854
  userFlow: t,
818
855
  responseKey: s,
819
- label: r,
820
- language: l,
821
- placeholder: o,
822
- value: i,
856
+ label: a,
857
+ language: i,
858
+ placeholder: c,
859
+ value: l,
823
860
  required: n,
824
861
  dependencies: d,
825
- disabled: a,
862
+ disabled: r,
826
863
  showPreview: u
827
- } = e, [f, _] = q(i ?? ""), h = fe.useThemeStore((b) => b.theme.mode), { disabled: j } = M(
864
+ } = e, [f, _] = k(l ?? ""), h = fe.useThemeStore((p) => p.theme.mode), { disabled: j } = M(
828
865
  t,
829
866
  d
830
- ), y = a ?? j, x = {
867
+ ), y = r ?? j, x = {
831
868
  json: we(),
832
- markdown: mt(),
833
- sql: xt(),
834
- yaml: gt()
835
- }, m = O(() => n && r ? `${r} *` : r ?? "", [r, n]), g = (b) => {
836
- _(b);
869
+ markdown: xt(),
870
+ sql: gt(),
871
+ yaml: bt()
872
+ }, m = S(() => n && a ? `${a} *` : a ?? "", [a, n]), g = (p) => {
873
+ _(p);
837
874
  const N = {
838
- [s]: b
875
+ [s]: p
839
876
  };
840
877
  L(t, N);
841
878
  };
842
- return /* @__PURE__ */ c.jsxs("div", { className: Y.codeEditor, children: [
843
- m && m !== "" && /* @__PURE__ */ c.jsx("label", { className: Y.codeEditor_label, children: m }),
844
- /* @__PURE__ */ c.jsxs("div", { className: Y.codeEditor_wrapper, children: [
845
- /* @__PURE__ */ c.jsx(
846
- yt,
879
+ return /* @__PURE__ */ o.jsxs("div", { className: Y.codeEditor, children: [
880
+ m && m !== "" && /* @__PURE__ */ o.jsx("label", { className: Y.codeEditor_label, children: m }),
881
+ /* @__PURE__ */ o.jsxs("div", { className: Y.codeEditor_wrapper, children: [
882
+ /* @__PURE__ */ o.jsx(
883
+ mt,
847
884
  {
848
885
  className: Y.input,
849
886
  value: f,
850
887
  height: "400px",
851
- placeholder: o,
852
- extensions: [x[l] ?? we()],
853
- onChange: (b) => g(b),
888
+ placeholder: c,
889
+ extensions: [x[i] ?? we()],
890
+ onChange: (p) => g(p),
854
891
  theme: h,
855
892
  editable: !y
856
893
  }
857
894
  ),
858
- l == "markdown" && u && /* @__PURE__ */ c.jsx(Pe, { className: Y.preview, children: f })
895
+ i == "markdown" && u && /* @__PURE__ */ o.jsx(Pe, { className: Y.preview, children: f })
859
896
  ] })
860
897
  ] });
861
898
  };
@@ -865,69 +902,69 @@ var le = { exports: {} };
865
902
  Licensed under the MIT License (MIT), see
866
903
  http://jedwatson.github.io/classnames
867
904
  */
868
- var Se;
869
- function mn() {
870
- return Se || (Se = 1, (function(e) {
905
+ var ke;
906
+ function xn() {
907
+ return ke || (ke = 1, (function(e) {
871
908
  (function() {
872
909
  var t = {}.hasOwnProperty;
873
910
  function s() {
874
- for (var r = [], l = 0; l < arguments.length; l++) {
875
- var o = arguments[l];
876
- if (o) {
877
- var i = typeof o;
878
- if (i === "string" || i === "number")
879
- r.push(o);
880
- else if (Array.isArray(o)) {
881
- if (o.length) {
882
- var n = s.apply(null, o);
883
- n && r.push(n);
911
+ for (var a = [], i = 0; i < arguments.length; i++) {
912
+ var c = arguments[i];
913
+ if (c) {
914
+ var l = typeof c;
915
+ if (l === "string" || l === "number")
916
+ a.push(c);
917
+ else if (Array.isArray(c)) {
918
+ if (c.length) {
919
+ var n = s.apply(null, c);
920
+ n && a.push(n);
884
921
  }
885
- } else if (i === "object") {
886
- if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]")) {
887
- r.push(o.toString());
922
+ } else if (l === "object") {
923
+ if (c.toString !== Object.prototype.toString && !c.toString.toString().includes("[native code]")) {
924
+ a.push(c.toString());
888
925
  continue;
889
926
  }
890
- for (var d in o)
891
- t.call(o, d) && o[d] && r.push(d);
927
+ for (var d in c)
928
+ t.call(c, d) && c[d] && a.push(d);
892
929
  }
893
930
  }
894
931
  }
895
- return r.join(" ");
932
+ return a.join(" ");
896
933
  }
897
934
  e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
898
935
  })();
899
936
  })(le)), le.exports;
900
937
  }
901
- var xn = mn();
902
- const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
903
- dividerNotFront: gn
904
- }, bn = (e) => /* @__PURE__ */ c.jsx(et, { ...e, className: pn.dividerNotFront }), jn = (e, t, s) => {
905
- const { url: r, paginationKeys: l, params: o } = e, i = [], n = (l == null ? void 0 : l.page) ?? "page";
906
- if (i.push(`${n}=${t}`), typeof s == "string") {
907
- const u = (l == null ? void 0 : l.text) ?? "text";
908
- i.push(`${u}=${encodeURIComponent(s || "")}`);
938
+ var gn = xn();
939
+ const ee = /* @__PURE__ */ zt(gn), bn = "_dividerNotFront_tze3j_1", pn = {
940
+ dividerNotFront: bn
941
+ }, jn = (e) => /* @__PURE__ */ o.jsx(et, { ...e, className: pn.dividerNotFront }), wn = (e, t, s) => {
942
+ const { url: a, paginationKeys: i, params: c } = e, l = [], n = (i == null ? void 0 : i.page) ?? "page";
943
+ if (l.push(`${n}=${t}`), typeof s == "string") {
944
+ const u = (i == null ? void 0 : i.text) ?? "text";
945
+ l.push(`${u}=${encodeURIComponent(s || "")}`);
909
946
  }
910
- if (o && typeof o == "object") {
911
- const u = Object.entries(o).map(
947
+ if (c && typeof c == "object") {
948
+ const u = Object.entries(c).map(
912
949
  ([f, _]) => `${encodeURIComponent(f)}=${encodeURIComponent(_)}`
913
950
  );
914
- i.push(...u);
951
+ l.push(...u);
915
952
  }
916
- const d = i.join("&");
917
- return d ? `${r}?${d}` : r;
918
- }, pe = (e, t, s) => {
919
- const { type: r, url: l, method: o, headers: i } = e;
920
- return r === "rest" ? {
953
+ const d = l.join("&");
954
+ return d ? `${a}?${d}` : a;
955
+ }, be = (e, t, s) => {
956
+ const { type: a, url: i, method: c, headers: l } = e;
957
+ return a === "rest" ? {
921
958
  type: "rest",
922
- url: jn(e, t, s),
923
- method: o,
924
- headers: i,
959
+ url: wn(e, t, s),
960
+ method: c,
961
+ headers: l,
925
962
  data: (e == null ? void 0 : e.data) || {}
926
963
  } : {
927
964
  type: "graphql",
928
- url: l,
965
+ url: i,
929
966
  method: "post",
930
- headers: i,
967
+ headers: l,
931
968
  query: e == null ? void 0 : e.query,
932
969
  variables: {
933
970
  ...(e == null ? void 0 : e.variables) || {},
@@ -935,36 +972,36 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
935
972
  page: t
936
973
  }
937
974
  };
938
- }, de = (e) => Array.isArray(e) ? e : typeof e == "object" ? JSON.stringify(e) : e, ze = (e, t, s, r) => {
939
- const l = B.query(e, t), o = l == null ? void 0 : l.map((a) => {
975
+ }, de = (e) => Array.isArray(e) ? e : typeof e == "object" ? JSON.stringify(e) : e, ze = (e, t, s, a) => {
976
+ const i = B.query(e, t), c = i == null ? void 0 : i.map((r) => {
940
977
  var u, f;
941
978
  if (s) {
942
979
  const _ = {};
943
980
  for (const [h, j] of Object.entries(s))
944
981
  if (typeof j == "object" && "path" in j) {
945
- const y = j, x = (u = B.query(a, y.path)) == null ? void 0 : u[0];
982
+ const y = j, x = (u = B.query(r, y.path)) == null ? void 0 : u[0];
946
983
  y.translations && String(x) in y.translations ? _[h] = de(
947
984
  y.translations[String(x)]
948
985
  ) : _[h] = de(x);
949
986
  } else {
950
987
  const y = j;
951
- _[h] = de((f = B.query(a, y)) == null ? void 0 : f[0]);
988
+ _[h] = de((f = B.query(r, y)) == null ? void 0 : f[0]);
952
989
  }
953
990
  return _;
954
991
  } else
955
- return a;
956
- }), i = B.value(e, (r == null ? void 0 : r.size) ?? "$.meta.size") ?? l.length, n = B.value(e, (r == null ? void 0 : r.total) ?? "$.meta.total") ?? 0, d = {
957
- size: i,
992
+ return r;
993
+ }), l = B.value(e, (a == null ? void 0 : a.size) ?? "$.meta.size") ?? i.length, n = B.value(e, (a == null ? void 0 : a.total) ?? "$.meta.total") ?? 0, d = {
994
+ size: l,
958
995
  total: n,
959
- totalPages: r != null && r.totalPages ? B.value(
996
+ totalPages: a != null && a.totalPages ? B.value(
960
997
  e,
961
- (r == null ? void 0 : r.totalPages) ?? "$.meta.totalPages"
962
- ) : i > 0 ? Math.ceil(n / i) : 0
998
+ (a == null ? void 0 : a.totalPages) ?? "$.meta.totalPages"
999
+ ) : l > 0 ? Math.ceil(n / l) : 0
963
1000
  };
964
- return { items: o, pagination: d };
1001
+ return { items: c, pagination: d };
965
1002
  }, ne = ({ withPadding: e = !1 }) => {
966
- const t = (s) => /* @__PURE__ */ c.jsx("span", { style: { color: R.labelColor }, children: s });
967
- return /* @__PURE__ */ c.jsx(
1003
+ const t = (s) => /* @__PURE__ */ o.jsx("span", { style: { color: R.labelColor }, children: s });
1004
+ return /* @__PURE__ */ o.jsx(
968
1005
  pt,
969
1006
  {
970
1007
  formatter: t,
@@ -975,38 +1012,38 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
975
1012
  }
976
1013
  }
977
1014
  );
978
- }, wn = ({
1015
+ }, Cn = ({
979
1016
  active: e,
980
1017
  payload: t,
981
1018
  label: s,
982
- tooltipKey: r
1019
+ tooltipKey: a
983
1020
  }) => {
984
- var o;
1021
+ var c;
985
1022
  if (!e || !t || !t.length)
986
1023
  return null;
987
- const l = {
1024
+ const i = {
988
1025
  backgroundColor: R.tooltipBg,
989
1026
  borderRadius: R.tooltipBorderRadius,
990
1027
  color: R.tooltipColor,
991
1028
  padding: "8px 12px",
992
1029
  border: "1px solid #e5e7eb"
993
1030
  };
994
- if (r) {
995
- const i = (o = t[0]) == null ? void 0 : o.payload;
996
- if (i && i[r] !== void 0 && i[r] !== null)
997
- return /* @__PURE__ */ c.jsx("div", { style: l, children: /* @__PURE__ */ c.jsx("p", { style: { margin: 0 }, children: i[r] }) });
1031
+ if (a) {
1032
+ const l = (c = t[0]) == null ? void 0 : c.payload;
1033
+ if (l && l[a] !== void 0 && l[a] !== null)
1034
+ return /* @__PURE__ */ o.jsx("div", { style: i, children: /* @__PURE__ */ o.jsx("p", { style: { margin: 0 }, children: l[a] }) });
998
1035
  }
999
- return /* @__PURE__ */ c.jsxs("div", { style: l, children: [
1000
- /* @__PURE__ */ c.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children: s }),
1001
- t.map((i, n) => /* @__PURE__ */ c.jsx("p", { style: { margin: "2px 0", color: i.color }, children: `${i.name}: ${i.value}` }, n))
1036
+ return /* @__PURE__ */ o.jsxs("div", { style: i, children: [
1037
+ /* @__PURE__ */ o.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children: s }),
1038
+ t.map((l, n) => /* @__PURE__ */ o.jsx("p", { style: { margin: "2px 0", color: l.color }, children: `${l.name}: ${l.value}` }, n))
1002
1039
  ] });
1003
- }, re = ({ tooltipKey: e } = {}) => /* @__PURE__ */ c.jsx(
1004
- bt,
1040
+ }, ae = ({ tooltipKey: e } = {}) => /* @__PURE__ */ o.jsx(
1041
+ jt,
1005
1042
  {
1006
- content: /* @__PURE__ */ c.jsx(wn, { tooltipKey: e })
1043
+ content: /* @__PURE__ */ o.jsx(Cn, { tooltipKey: e })
1007
1044
  }
1008
- ), be = ({ dataKey: e, hide: t = !1 }) => /* @__PURE__ */ c.jsx(
1009
- jt,
1045
+ ), pe = ({ dataKey: e, hide: t = !1 }) => /* @__PURE__ */ o.jsx(
1046
+ wt,
1010
1047
  {
1011
1048
  dataKey: e,
1012
1049
  hide: t,
@@ -1015,81 +1052,81 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1015
1052
  fontSize: R.fontSize
1016
1053
  }
1017
1054
  }
1018
- ), je = () => /* @__PURE__ */ c.jsx(
1019
- wt,
1055
+ ), je = () => /* @__PURE__ */ o.jsx(
1056
+ Ct,
1020
1057
  {
1021
1058
  tick: {
1022
1059
  fill: R.labelColor,
1023
1060
  fontSize: R.fontSize
1024
1061
  }
1025
1062
  }
1026
- ), Cn = (e) => {
1027
- const { data: t, xKey: s, yKeys: r, tooltipKey: l } = e;
1028
- return /* @__PURE__ */ c.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ c.jsxs(Ct, { data: t, children: [
1029
- /* @__PURE__ */ c.jsx(me, { strokeDasharray: "3 3" }),
1030
- /* @__PURE__ */ c.jsx(be, { dataKey: s }),
1031
- /* @__PURE__ */ c.jsx(je, {}),
1032
- /* @__PURE__ */ c.jsx(re, { tooltipKey: l }),
1033
- /* @__PURE__ */ c.jsx(ne, {}),
1034
- r.map((o, i) => /* @__PURE__ */ c.jsx(
1035
- Nt,
1063
+ ), Nn = (e) => {
1064
+ const { data: t, xKey: s, yKeys: a, tooltipKey: i } = e;
1065
+ return /* @__PURE__ */ o.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(Nt, { data: t, children: [
1066
+ /* @__PURE__ */ o.jsx(me, { strokeDasharray: "3 3" }),
1067
+ /* @__PURE__ */ o.jsx(pe, { dataKey: s }),
1068
+ /* @__PURE__ */ o.jsx(je, {}),
1069
+ /* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
1070
+ /* @__PURE__ */ o.jsx(ne, {}),
1071
+ a.map((c, l) => /* @__PURE__ */ o.jsx(
1072
+ vt,
1036
1073
  {
1037
1074
  type: "monotone",
1038
- dataKey: o,
1039
- stroke: z[i % z.length],
1040
- fill: z[i % z.length]
1075
+ dataKey: c,
1076
+ stroke: z[l % z.length],
1077
+ fill: z[l % z.length]
1041
1078
  },
1042
- o
1079
+ c
1043
1080
  ))
1044
1081
  ] }) });
1045
- }, Nn = (e) => {
1046
- const { data: t, yKeys: s, xKey: r, tooltipKey: l } = e;
1047
- return /* @__PURE__ */ c.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ c.jsxs(vt, { data: t, children: [
1048
- /* @__PURE__ */ c.jsx(me, { strokeDasharray: "3 3" }),
1049
- /* @__PURE__ */ c.jsx(be, { hide: !0, dataKey: r }),
1050
- /* @__PURE__ */ c.jsx(je, {}),
1051
- /* @__PURE__ */ c.jsx(re, { tooltipKey: l }),
1052
- /* @__PURE__ */ c.jsx(ne, { withPadding: !0 }),
1053
- s.map((o, i) => /* @__PURE__ */ c.jsx(
1054
- Et,
1082
+ }, vn = (e) => {
1083
+ const { data: t, yKeys: s, xKey: a, tooltipKey: i } = e;
1084
+ return /* @__PURE__ */ o.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(Et, { data: t, children: [
1085
+ /* @__PURE__ */ o.jsx(me, { strokeDasharray: "3 3" }),
1086
+ /* @__PURE__ */ o.jsx(pe, { hide: !0, dataKey: a }),
1087
+ /* @__PURE__ */ o.jsx(je, {}),
1088
+ /* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
1089
+ /* @__PURE__ */ o.jsx(ne, { withPadding: !0 }),
1090
+ s.map((c, l) => /* @__PURE__ */ o.jsx(
1091
+ St,
1055
1092
  {
1056
- dataKey: o,
1057
- fill: z[i % z.length]
1093
+ dataKey: c,
1094
+ fill: z[l % z.length]
1058
1095
  },
1059
- o
1096
+ c
1060
1097
  ))
1061
1098
  ] }) });
1062
- }, vn = (e) => {
1063
- const { data: t, xKey: s, yKeys: r, tooltipKey: l } = e;
1064
- return /* @__PURE__ */ c.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ c.jsxs(kt, { data: t, children: [
1065
- /* @__PURE__ */ c.jsx(me, { strokeDasharray: "3 3" }),
1066
- /* @__PURE__ */ c.jsx(be, { dataKey: s }),
1067
- /* @__PURE__ */ c.jsx(je, {}),
1068
- /* @__PURE__ */ c.jsx(re, { tooltipKey: l }),
1069
- /* @__PURE__ */ c.jsx(ne, {}),
1070
- r.map((o, i) => /* @__PURE__ */ c.jsx(
1071
- qt,
1099
+ }, En = (e) => {
1100
+ const { data: t, xKey: s, yKeys: a, tooltipKey: i } = e;
1101
+ return /* @__PURE__ */ o.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(qt, { data: t, children: [
1102
+ /* @__PURE__ */ o.jsx(me, { strokeDasharray: "3 3" }),
1103
+ /* @__PURE__ */ o.jsx(pe, { dataKey: s }),
1104
+ /* @__PURE__ */ o.jsx(je, {}),
1105
+ /* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
1106
+ /* @__PURE__ */ o.jsx(ne, {}),
1107
+ a.map((c, l) => /* @__PURE__ */ o.jsx(
1108
+ kt,
1072
1109
  {
1073
1110
  type: "monotone",
1074
- dataKey: o,
1075
- stroke: z[i % z.length],
1111
+ dataKey: c,
1112
+ stroke: z[l % z.length],
1076
1113
  strokeWidth: 2,
1077
1114
  dot: !1
1078
1115
  },
1079
- o
1116
+ c
1080
1117
  ))
1081
1118
  ] }) });
1082
- }, En = (e) => {
1083
- const { data: t, xKey: s, yKeys: r, tooltipKey: l } = e, o = ({
1084
- cx: i,
1119
+ }, Sn = (e) => {
1120
+ const { data: t, xKey: s, yKeys: a, tooltipKey: i } = e, c = ({
1121
+ cx: l,
1085
1122
  cy: n,
1086
1123
  midAngle: d,
1087
- innerRadius: a,
1124
+ innerRadius: r,
1088
1125
  outerRadius: u,
1089
1126
  value: f
1090
1127
  }) => {
1091
- const _ = Math.PI / 180, h = 25 + a + (u - a), j = i + h * Math.cos(-(d ?? 0) * _), y = n + h * Math.sin(-(d ?? 0) * _);
1092
- return /* @__PURE__ */ c.jsx(
1128
+ const _ = Math.PI / 180, h = 25 + r + (u - r), j = l + h * Math.cos(-(d ?? 0) * _), y = n + h * Math.sin(-(d ?? 0) * _);
1129
+ return /* @__PURE__ */ o.jsx(
1093
1130
  "text",
1094
1131
  {
1095
1132
  x: j,
@@ -1102,19 +1139,19 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1102
1139
  }
1103
1140
  );
1104
1141
  };
1105
- return /* @__PURE__ */ c.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ c.jsxs(St, { children: [
1106
- /* @__PURE__ */ c.jsx(re, { tooltipKey: l }),
1107
- /* @__PURE__ */ c.jsx(ne, {}),
1108
- /* @__PURE__ */ c.jsx(
1142
+ return /* @__PURE__ */ o.jsx(te, { width: "100%", height: 400, children: /* @__PURE__ */ o.jsxs(Ot, { children: [
1143
+ /* @__PURE__ */ o.jsx(ae, { tooltipKey: i }),
1144
+ /* @__PURE__ */ o.jsx(ne, {}),
1145
+ /* @__PURE__ */ o.jsx(
1109
1146
  At,
1110
1147
  {
1111
1148
  data: t,
1112
- dataKey: r[0],
1149
+ dataKey: a[0],
1113
1150
  nameKey: s,
1114
- label: o,
1151
+ label: c,
1115
1152
  outerRadius: 120,
1116
- children: t.map((i, n) => /* @__PURE__ */ c.jsx(
1117
- Ot,
1153
+ children: t.map((l, n) => /* @__PURE__ */ o.jsx(
1154
+ Tt,
1118
1155
  {
1119
1156
  fill: z[n % z.length]
1120
1157
  },
@@ -1123,11 +1160,11 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1123
1160
  }
1124
1161
  )
1125
1162
  ] }) });
1126
- }, kn = {
1127
- area: Cn,
1128
- bar: Nn,
1129
- line: vn,
1130
- pie: En
1163
+ }, qn = {
1164
+ area: Nn,
1165
+ bar: vn,
1166
+ line: En,
1167
+ pie: Sn
1131
1168
  }, z = [
1132
1169
  "var(--color-primitive-palette-1-50)",
1133
1170
  "var(--color-primitive-palette-2-50)",
@@ -1153,124 +1190,124 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1153
1190
  tooltipBg: "#fff",
1154
1191
  tooltipColor: "#000",
1155
1192
  tooltipBorderRadius: "4px"
1156
- }, qn = (e) => {
1157
- const { component: t, userFlow: s, hash: r, responseKey: l, dataSource: o, ...i } = e, n = kn[i.type];
1193
+ }, kn = (e) => {
1194
+ const { component: t, userFlow: s, hash: a, responseKey: i, dataSource: c, ...l } = e, n = qn[l.type];
1158
1195
  if (!n)
1159
- return /* @__PURE__ */ c.jsx("div", { children: "Not supported chart type" });
1160
- const { fetchDataSource: d } = I(), [a, u] = q(!1), [f, _] = q([]), h = async () => {
1196
+ return /* @__PURE__ */ o.jsx("div", { children: "Not supported chart type" });
1197
+ const { fetchDataSource: d } = I(), [r, u] = k(!1), [f, _] = k([]), h = async () => {
1161
1198
  var y, x;
1162
1199
  try {
1163
1200
  u(!0);
1164
- const { jsonPathData: m, mapperData: g } = o, b = pe(
1165
- o,
1201
+ const { jsonPathData: m, mapperData: g } = c, p = be(
1202
+ c,
1166
1203
  1
1167
1204
  ), N = await d(
1168
- b,
1205
+ p,
1169
1206
  s,
1170
1207
  !1
1171
- ), p = m ? (y = ze(N == null ? void 0 : N.data, m, g)) == null ? void 0 : y.items : (x = N == null ? void 0 : N.data) == null ? void 0 : x.data;
1172
- _(p), u(!1);
1208
+ ), b = m ? (y = ze(N == null ? void 0 : N.data, m, g)) == null ? void 0 : y.items : (x = N == null ? void 0 : N.data) == null ? void 0 : x.data;
1209
+ _(b), u(!1);
1173
1210
  } catch (m) {
1174
1211
  alert(JSON.stringify(m)), u(!1);
1175
1212
  }
1176
1213
  };
1177
- V(() => {
1178
- o ? h() : _(i.data);
1214
+ K(() => {
1215
+ c ? h() : _(l.data);
1179
1216
  }, []);
1180
1217
  const j = {
1181
- ...i,
1218
+ ...l,
1182
1219
  data: f
1183
1220
  };
1184
- return a ? /* @__PURE__ */ c.jsx(De, { height: 400 }) : f.length > 0 ? n(j) : /* @__PURE__ */ c.jsx(ye, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" });
1185
- }, Sn = "_header_g1eri_1", An = "_header_content_g1eri_5", Ae = {
1186
- header: Sn,
1221
+ return r ? /* @__PURE__ */ o.jsx(De, { height: 400 }) : f.length > 0 ? n(j) : /* @__PURE__ */ o.jsx(ye, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" });
1222
+ }, On = "_header_g1eri_1", An = "_header_content_g1eri_5", Oe = {
1223
+ header: On,
1187
1224
  header_content: An
1188
- }, On = ({ components: e = [] }) => /* @__PURE__ */ c.jsx("section", { className: ee(Ae.header, "avocado-dark-theme"), children: /* @__PURE__ */ c.jsx("div", { className: Ae.header_content, children: e.map((t, s) => /* @__PURE__ */ c.jsx($, { children: t }, s)) }) }), A = (e, t, s, r) => {
1189
- var i;
1190
- const l = {
1191
- accordion: (n) => /* @__PURE__ */ c.jsx(xr, { ...n, userFlow: e, pageId: t }),
1192
- aiChatPanel: (n) => /* @__PURE__ */ c.jsx(Ut, { ...n, userFlow: e, pageId: t, chatPanelCallback: r }),
1193
- aiSummaryCard: (n) => /* @__PURE__ */ c.jsx(Ht, { ...n, userFlow: e, pageId: t }),
1194
- aiPromptCodeEditor: (n) => /* @__PURE__ */ c.jsx(Qt, { ...n, userFlow: e, pageId: t }),
1195
- breadcrumbs: (n) => /* @__PURE__ */ c.jsx(rn, { ...n, userFlow: e, pageId: t }),
1196
- button: (n) => /* @__PURE__ */ c.jsx(sn, { ...n, userFlow: e, pageId: t }),
1197
- cardNotification: (n) => /* @__PURE__ */ c.jsx(cn, { ...n }),
1198
- chart: (n) => /* @__PURE__ */ c.jsx(qn, { ...n, userFlow: e }),
1199
- checkbox: (n) => /* @__PURE__ */ c.jsx(ln, { ...n, userFlow: e, pageId: t }),
1200
- code: (n) => /* @__PURE__ */ c.jsx(yn, { ...n, userFlow: e, pageId: t }),
1201
- divider: (n) => /* @__PURE__ */ c.jsx(bn, { ...n }),
1202
- drawer: (n) => /* @__PURE__ */ c.jsx(jr, { ...n, userFlow: e, pageId: t }),
1203
- heading: (n) => Kt(n),
1204
- pill: (n) => /* @__PURE__ */ c.jsx(Bn, { ...n }),
1205
- modal: (n) => /* @__PURE__ */ c.jsx(Rn, { ...n, userFlow: e, pageId: t }),
1206
- roundButton: (n) => /* @__PURE__ */ c.jsx(In, { ...n, userFlow: e, pageId: t }),
1207
- row: (n) => /* @__PURE__ */ c.jsx(Kn, { ...n, userFlow: e, pageId: t }),
1208
- select: (n) => /* @__PURE__ */ c.jsx(Xn, { ...n, userFlow: e, pageId: t }),
1209
- switch: (n) => /* @__PURE__ */ c.jsx(sr, { ...n, userFlow: e, pageId: t }),
1210
- spacing: (n) => /* @__PURE__ */ c.jsx(rr, { ...n, userFlow: e, pageId: t }),
1211
- table: (n) => /* @__PURE__ */ c.jsx(dr, { ...n, userFlow: e, pageId: t }),
1212
- text: (n) => Gt(n),
1213
- textField: (n) => /* @__PURE__ */ c.jsx(hr, { ...n, userFlow: e, pageId: t }),
1214
- toast: (n) => /* @__PURE__ */ c.jsx(fr, { ...n, userFlow: e, pageId: t })
1225
+ }, Tn = ({ components: e = [] }) => /* @__PURE__ */ o.jsx("section", { className: ee(Oe.header, "avocado-dark-theme"), children: /* @__PURE__ */ o.jsx("div", { className: Oe.header_content, children: e.map((t, s) => /* @__PURE__ */ o.jsx($, { children: t }, s)) }) }), A = (e, t, s, a) => {
1226
+ var l;
1227
+ const i = {
1228
+ accordion: (n) => /* @__PURE__ */ o.jsx(ga, { ...n, userFlow: e, pageId: t }),
1229
+ aiChatPanel: (n) => /* @__PURE__ */ o.jsx(Jt, { ...n, userFlow: e, pageId: t, onResolveProps: a == null ? void 0 : a.aiChatPanel }),
1230
+ aiSummaryCard: (n) => /* @__PURE__ */ o.jsx(Xt, { ...n, userFlow: e, pageId: t, onResolveProps: a == null ? void 0 : a.aiSummaryCard }),
1231
+ aiPromptCodeEditor: (n) => /* @__PURE__ */ o.jsx(Yt, { ...n, userFlow: e, pageId: t }),
1232
+ breadcrumbs: (n) => /* @__PURE__ */ o.jsx(sn, { ...n, userFlow: e, pageId: t }),
1233
+ button: (n) => /* @__PURE__ */ o.jsx(rn, { ...n, userFlow: e, pageId: t }),
1234
+ cardNotification: (n) => /* @__PURE__ */ o.jsx(ln, { ...n }),
1235
+ chart: (n) => /* @__PURE__ */ o.jsx(kn, { ...n, userFlow: e }),
1236
+ checkbox: (n) => /* @__PURE__ */ o.jsx(dn, { ...n, userFlow: e, pageId: t }),
1237
+ code: (n) => /* @__PURE__ */ o.jsx(mn, { ...n, userFlow: e, pageId: t }),
1238
+ divider: (n) => /* @__PURE__ */ o.jsx(jn, { ...n }),
1239
+ drawer: (n) => /* @__PURE__ */ o.jsx(wa, { ...n, userFlow: e, pageId: t }),
1240
+ heading: (n) => Gt(n),
1241
+ pill: (n) => /* @__PURE__ */ o.jsx(In, { ...n }),
1242
+ modal: (n) => /* @__PURE__ */ o.jsx(Dn, { ...n, userFlow: e, pageId: t }),
1243
+ roundButton: (n) => /* @__PURE__ */ o.jsx(zn, { ...n, userFlow: e, pageId: t }),
1244
+ row: (n) => /* @__PURE__ */ o.jsx(Gn, { ...n, userFlow: e, pageId: t }),
1245
+ select: (n) => /* @__PURE__ */ o.jsx(Wn, { ...n, userFlow: e, pageId: t }),
1246
+ switch: (n) => /* @__PURE__ */ o.jsx(ra, { ...n, userFlow: e, pageId: t }),
1247
+ spacing: (n) => /* @__PURE__ */ o.jsx(sa, { ...n, userFlow: e, pageId: t }),
1248
+ table: (n) => /* @__PURE__ */ o.jsx(_a, { ...n, userFlow: e, pageId: t }),
1249
+ text: (n) => Ut(n),
1250
+ textField: (n) => /* @__PURE__ */ o.jsx(fa, { ...n, userFlow: e, pageId: t }),
1251
+ toast: (n) => /* @__PURE__ */ o.jsx(ya, { ...n, userFlow: e, pageId: t })
1215
1252
  };
1216
- return (i = s == null ? void 0 : s.filter(Boolean)) == null ? void 0 : i.map((n) => {
1217
- const d = l[n.component];
1253
+ return (l = s == null ? void 0 : s.filter(Boolean)) == null ? void 0 : l.map((n) => {
1254
+ const d = i[n.component];
1218
1255
  return d ? d({ ...n, userFlow: e, pageId: t }) : null;
1219
1256
  });
1220
- }, Tn = "_modalContent_p06ci_1", $n = {
1221
- modalContent: Tn
1222
- }, Rn = ({
1257
+ }, $n = "_modalContent_p06ci_1", Rn = {
1258
+ modalContent: $n
1259
+ }, Dn = ({
1223
1260
  userFlow: e,
1224
1261
  pageId: t,
1225
1262
  responseKey: s,
1226
- header: r,
1227
- body: l,
1228
- footer: o,
1229
- headerStatusColor: i,
1263
+ header: a,
1264
+ body: i,
1265
+ footer: c,
1266
+ headerStatusColor: l,
1230
1267
  ...n
1231
1268
  }) => {
1232
1269
  const d = v((m) => {
1233
1270
  var g;
1234
1271
  return (g = m[e]) == null ? void 0 : g.isModalOpen;
1235
- }), a = v((m) => {
1272
+ }), r = v((m) => {
1236
1273
  var g;
1237
1274
  return (g = m[e]) == null ? void 0 : g.isLoading;
1238
- }), u = d && !a, f = {
1275
+ }), u = d && !r, f = {
1239
1276
  ...n
1240
- }, _ = (f == null ? void 0 : f.headerStatusColor) ?? i, h = D(() => {
1277
+ }, _ = (f == null ? void 0 : f.headerStatusColor) ?? l, h = D(() => {
1241
1278
  xe(e), ge(e, !1);
1242
- }, [e, s]), j = Array.isArray(r) ? A(e, t, r) : r, y = A(e, t, l), x = A(e, t, o);
1243
- return /* @__PURE__ */ c.jsx(
1279
+ }, [e, s]), j = Array.isArray(a) ? A(e, t, a) : a, y = A(e, t, i), x = A(e, t, c);
1280
+ return /* @__PURE__ */ o.jsx(
1244
1281
  tt,
1245
1282
  {
1246
1283
  ...f,
1247
1284
  headerStatusColor: _,
1248
- header: typeof j == "string" ? j : /* @__PURE__ */ c.jsx(c.Fragment, { children: j.map((m, g) => /* @__PURE__ */ c.jsx($, { children: m }, `modal-header-${g}`)) }),
1249
- children: /* @__PURE__ */ c.jsx("section", { className: $n.modalContent, children: y.map((m, g) => /* @__PURE__ */ c.jsx($, { children: m }, `modal-body-${g}`)) }),
1250
- actions: /* @__PURE__ */ c.jsx(c.Fragment, { children: x.map((m, g) => /* @__PURE__ */ c.jsx($, { children: m }, `modal-footer-${g}`)) }),
1285
+ header: typeof j == "string" ? j : /* @__PURE__ */ o.jsx(o.Fragment, { children: j.map((m, g) => /* @__PURE__ */ o.jsx($, { children: m }, `modal-header-${g}`)) }),
1286
+ children: /* @__PURE__ */ o.jsx("section", { className: Rn.modalContent, children: y.map((m, g) => /* @__PURE__ */ o.jsx($, { children: m }, `modal-body-${g}`)) }),
1287
+ actions: /* @__PURE__ */ o.jsx(o.Fragment, { children: x.map((m, g) => /* @__PURE__ */ o.jsx($, { children: m }, `modal-footer-${g}`)) }),
1251
1288
  open: u,
1252
1289
  onClose: h
1253
1290
  }
1254
1291
  );
1255
- }, Dn = ({ userFlow: e, pageId: t }) => {
1256
- var o, i;
1257
- const s = Rt(e);
1292
+ }, Ln = ({ userFlow: e, pageId: t }) => {
1293
+ var c, l;
1294
+ const s = Dt(e);
1258
1295
  if (!s)
1259
1296
  return null;
1260
- const r = [
1297
+ const a = [
1261
1298
  ...(s == null ? void 0 : s.components) || [],
1262
- ...((o = s == null ? void 0 : s.header) == null ? void 0 : o.components) || [],
1263
- ...((i = s == null ? void 0 : s.body) == null ? void 0 : i.components) || []
1264
- ], l = A(
1299
+ ...((c = s == null ? void 0 : s.header) == null ? void 0 : c.components) || [],
1300
+ ...((l = s == null ? void 0 : s.body) == null ? void 0 : l.components) || []
1301
+ ], i = A(
1265
1302
  e,
1266
1303
  t,
1267
- r
1304
+ a
1268
1305
  );
1269
- return /* @__PURE__ */ c.jsx(c.Fragment, { children: l == null ? void 0 : l.map((n, d) => {
1270
- const a = `overlay-${d}-${s == null ? void 0 : s.hash}`;
1271
- return /* @__PURE__ */ c.jsx($, { children: n }, a);
1306
+ return /* @__PURE__ */ o.jsx(o.Fragment, { children: i == null ? void 0 : i.map((n, d) => {
1307
+ const r = `overlay-${d}-${s == null ? void 0 : s.hash}`;
1308
+ return /* @__PURE__ */ o.jsx($, { children: n }, r);
1272
1309
  }) });
1273
- }, Ln = {
1310
+ }, Bn = {
1274
1311
  success: {
1275
1312
  color: "success-opacity",
1276
1313
  textColor: "success-60",
@@ -1296,28 +1333,28 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1296
1333
  textColor: "neutral-70",
1297
1334
  iconColor: "neutral-70"
1298
1335
  }
1299
- }, Bn = (e) => {
1300
- const { content: t, variant: s = "neutral", ...r } = e, l = Ln[s], o = {
1301
- ...r,
1336
+ }, In = (e) => {
1337
+ const { content: t, variant: s = "neutral", ...a } = e, i = Bn[s], c = {
1338
+ ...a,
1302
1339
  children: t,
1303
- color: (r == null ? void 0 : r.color) ?? l.color,
1304
- textColor: (r == null ? void 0 : r.textColor) ?? l.textColor,
1305
- iconColor: (r == null ? void 0 : r.iconColor) ?? l.iconColor
1340
+ color: (a == null ? void 0 : a.color) ?? i.color,
1341
+ textColor: (a == null ? void 0 : a.textColor) ?? i.textColor,
1342
+ iconColor: (a == null ? void 0 : a.iconColor) ?? i.iconColor
1306
1343
  };
1307
- return /* @__PURE__ */ c.jsx(ue, { ...o });
1308
- }, In = (e) => {
1344
+ return /* @__PURE__ */ o.jsx(ue, { ...c });
1345
+ }, zn = (e) => {
1309
1346
  const {
1310
1347
  userFlow: t,
1311
1348
  pageId: s,
1312
- responseKey: r,
1313
- actionType: l,
1314
- dataSource: o,
1315
- dependencies: i,
1349
+ responseKey: a,
1350
+ actionType: i,
1351
+ dataSource: c,
1352
+ dependencies: l,
1316
1353
  onClick: n,
1317
1354
  ...d
1318
- } = e, { getNextUI: a, fetchAndGetNextUI: u } = I(), { disabled: f } = M(
1355
+ } = e, { getNextUI: r, fetchAndGetNextUI: u } = I(), { disabled: f } = M(
1319
1356
  t,
1320
- i
1357
+ l
1321
1358
  ), _ = {
1322
1359
  ...d
1323
1360
  }, h = (_ == null ? void 0 : _.disabled) ?? f, j = D(async () => {
@@ -1325,17 +1362,17 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1325
1362
  try {
1326
1363
  const x = {
1327
1364
  ...(y = v.getState()[t]) == null ? void 0 : y.entries,
1328
- [r]: { status: 200 }
1365
+ [a]: { status: 200 }
1329
1366
  };
1330
- switch (L(t, x), l) {
1367
+ switch (L(t, x), i) {
1331
1368
  case "GO_TO_NEXT_UI": {
1332
- const m = await a(
1369
+ const m = await r(
1333
1370
  t,
1334
1371
  s,
1335
1372
  x,
1336
- r
1373
+ a
1337
1374
  );
1338
- m != null && m.data && S(t, m == null ? void 0 : m.data);
1375
+ m != null && m.data && O(t, m == null ? void 0 : m.data);
1339
1376
  break;
1340
1377
  }
1341
1378
  case "FETCH_AND_GO_TO_NEXT_UI": {
@@ -1343,10 +1380,10 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1343
1380
  t,
1344
1381
  s,
1345
1382
  x,
1346
- r,
1347
- o
1383
+ a,
1384
+ c
1348
1385
  );
1349
- m != null && m.data && S(t, m == null ? void 0 : m.data);
1386
+ m != null && m.data && O(t, m == null ? void 0 : m.data);
1350
1387
  break;
1351
1388
  }
1352
1389
  case "CLOSE_MODAL":
@@ -1359,14 +1396,14 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1359
1396
  Z(t, !0);
1360
1397
  break;
1361
1398
  default:
1362
- console.warn(`Unhandled actionType: ${l}`);
1399
+ console.warn(`Unhandled actionType: ${i}`);
1363
1400
  break;
1364
1401
  }
1365
1402
  } catch (x) {
1366
1403
  alert(JSON.stringify(x));
1367
1404
  }
1368
- }, [l, o, s, r, t]);
1369
- return /* @__PURE__ */ c.jsx(
1405
+ }, [i, c, s, a, t]);
1406
+ return /* @__PURE__ */ o.jsx(
1370
1407
  nt,
1371
1408
  {
1372
1409
  ..._,
@@ -1374,8 +1411,8 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1374
1411
  onClick: () => !h && (n ?? j)()
1375
1412
  }
1376
1413
  );
1377
- }, zn = "_row_1bqj4_1", Mn = "_row_column_1bqj4_65", U = {
1378
- row: zn,
1414
+ }, Mn = "_row_1bqj4_1", Kn = "_row_column_1bqj4_65", J = {
1415
+ row: Mn,
1379
1416
  "row__gap-none": "_row__gap-none_1bqj4_5",
1380
1417
  "row__gap-xxs": "_row__gap-xxs_1bqj4_8",
1381
1418
  "row__gap-xs": "_row__gap-xs_1bqj4_11",
@@ -1396,7 +1433,7 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1396
1433
  "row__align-center": "_row__align-center_1bqj4_56",
1397
1434
  "row__align-stretch": "_row__align-stretch_1bqj4_59",
1398
1435
  "row__align-baseline": "_row__align-baseline_1bqj4_62",
1399
- row_column: Mn,
1436
+ row_column: Kn,
1400
1437
  "row_column__gap-none": "_row_column__gap-none_1bqj4_72",
1401
1438
  "row_column__gap-xxs": "_row_column__gap-xxs_1bqj4_75",
1402
1439
  "row_column__gap-xs": "_row_column__gap-xs_1bqj4_78",
@@ -1417,27 +1454,27 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1417
1454
  "row_column__align-center": "_row_column__align-center_1bqj4_123",
1418
1455
  "row_column__align-stretch": "_row_column__align-stretch_1bqj4_126",
1419
1456
  "row_column__align-baseline": "_row_column__align-baseline_1bqj4_129"
1420
- }, Kn = (e) => {
1457
+ }, Gn = (e) => {
1421
1458
  const {
1422
1459
  userFlow: t,
1423
1460
  pageId: s,
1424
- columnWidth: r,
1425
- columns: l,
1426
- gap: o = "md",
1427
- justifyContent: i = "start",
1461
+ columnWidth: a,
1462
+ columns: i,
1463
+ gap: c = "md",
1464
+ justifyContent: l = "start",
1428
1465
  alignItems: n = "stretch"
1429
- } = e, d = Array.isArray(l) ? l.map((a, u) => {
1466
+ } = e, d = Array.isArray(i) ? i.map((r, u) => {
1430
1467
  const f = `col_${u}`, _ = `col_${u}`;
1431
- if (Array.isArray(a))
1468
+ if (Array.isArray(r))
1432
1469
  return {
1433
1470
  gap: "md",
1434
1471
  justifyContent: "start",
1435
1472
  alignItems: "start",
1436
- items: a,
1473
+ items: r,
1437
1474
  hash: f,
1438
1475
  responseKey: _
1439
1476
  };
1440
- const h = a;
1477
+ const h = r;
1441
1478
  return {
1442
1479
  gap: (h == null ? void 0 : h.gap) ?? "md",
1443
1480
  justifyContent: (h == null ? void 0 : h.justifyContent) ?? "start",
@@ -1447,30 +1484,30 @@ const ee = /* @__PURE__ */ It(xn), gn = "_dividerNotFront_tze3j_1", pn = {
1447
1484
  responseKey: (h == null ? void 0 : h.responseKey) ?? _
1448
1485
  };
1449
1486
  }) : [];
1450
- return d.length === 0 ? null : /* @__PURE__ */ c.jsx(
1487
+ return d.length === 0 ? null : /* @__PURE__ */ o.jsx(
1451
1488
  "div",
1452
1489
  {
1453
1490
  className: ee(
1454
- U.row,
1455
- U[`row__gap-${o}`],
1456
- U[`row__justify-${i}`],
1457
- U[`row__align-${n}`]
1491
+ J.row,
1492
+ J[`row__gap-${c}`],
1493
+ J[`row__justify-${l}`],
1494
+ J[`row__align-${n}`]
1458
1495
  ),
1459
- children: d == null ? void 0 : d.map((a, u) => {
1460
- const f = (r == null ? void 0 : r[u]) || `${100 / d.length}%`, _ = A(t, s, a.items);
1461
- return !_ || _.length === 0 ? null : /* @__PURE__ */ c.jsx(
1496
+ children: d == null ? void 0 : d.map((r, u) => {
1497
+ const f = (a == null ? void 0 : a[u]) || `${100 / d.length}%`, _ = A(t, s, r.items);
1498
+ return !_ || _.length === 0 ? null : /* @__PURE__ */ o.jsx(
1462
1499
  "div",
1463
1500
  {
1464
1501
  className: ee(
1465
- U.row_column,
1466
- U[`row_column__gap-${a.gap}`],
1467
- U[`row_column__justify-${a.justifyContent}`],
1468
- U[`row_column__align-${a.alignItems}`]
1502
+ J.row_column,
1503
+ J[`row_column__gap-${r.gap}`],
1504
+ J[`row_column__justify-${r.justifyContent}`],
1505
+ J[`row_column__align-${r.alignItems}`]
1469
1506
  ),
1470
1507
  style: { width: f },
1471
1508
  children: _
1472
1509
  },
1473
- a.hash || u
1510
+ r.hash || u
1474
1511
  );
1475
1512
  })
1476
1513
  }
@@ -1480,13 +1517,13 @@ function Me({
1480
1517
  userFlow: e,
1481
1518
  pageId: t,
1482
1519
  responseKey: s,
1483
- actionType: r,
1484
- getNextUI: l,
1485
- isMulti: o = !1,
1486
- debounceMs: i
1520
+ actionType: a,
1521
+ getNextUI: i,
1522
+ isMulti: c = !1,
1523
+ debounceMs: l
1487
1524
  }) {
1488
1525
  const n = Xe(null);
1489
- V(() => () => {
1526
+ K(() => () => {
1490
1527
  n.current !== null && (clearTimeout(n.current), n.current = null);
1491
1528
  }, []);
1492
1529
  const d = D(
@@ -1496,83 +1533,83 @@ function Me({
1496
1533
  ...(h = v.getState()[e]) == null ? void 0 : h.entries,
1497
1534
  [s]: u
1498
1535
  };
1499
- if (L(e, f), r && (r === "GO_TO_NEXT_UI" || r === "GO_TO_NEXT_UI_WITHOUT_LOADING"))
1536
+ if (L(e, f), a && (a === "GO_TO_NEXT_UI" || a === "GO_TO_NEXT_UI_WITHOUT_LOADING"))
1500
1537
  try {
1501
- const y = await l(
1538
+ const y = await i(
1502
1539
  e,
1503
1540
  t,
1504
1541
  f,
1505
1542
  s,
1506
- r === "GO_TO_NEXT_UI"
1543
+ a === "GO_TO_NEXT_UI"
1507
1544
  );
1508
- y != null && y.data && S(e, y.data);
1545
+ y != null && y.data && O(e, y.data);
1509
1546
  } catch (j) {
1510
1547
  console.error("[useSelectChange] Failed to fetch next UI", j);
1511
1548
  }
1512
1549
  },
1513
- [e, t, s, r, l]
1550
+ [e, t, s, a, i]
1514
1551
  );
1515
1552
  return D(
1516
1553
  (u) => {
1517
- if (!o) {
1554
+ if (!c) {
1518
1555
  d(u);
1519
1556
  return;
1520
1557
  }
1521
- if (i == null) {
1558
+ if (l == null) {
1522
1559
  d(u);
1523
1560
  return;
1524
1561
  }
1525
1562
  n.current !== null && (clearTimeout(n.current), n.current = null), n.current = setTimeout(() => {
1526
1563
  d(u), n.current = null;
1527
- }, i);
1564
+ }, l);
1528
1565
  },
1529
- [o, i, d]
1566
+ [c, l, d]
1530
1567
  );
1531
1568
  }
1532
- const Gn = (e, t, s, r) => {
1533
- const l = B.query(e, t);
1534
- return (l == null ? void 0 : l.map((o) => {
1535
- var d, a;
1536
- const i = (d = B.query(o, s)) == null ? void 0 : d[0], n = r ? (a = B.query(o, r)) == null ? void 0 : a[0] : o;
1537
- return { label: i, value: n };
1569
+ const Un = (e, t, s, a) => {
1570
+ const i = B.query(e, t);
1571
+ return (i == null ? void 0 : i.map((c) => {
1572
+ var d, r;
1573
+ const l = (d = B.query(c, s)) == null ? void 0 : d[0], n = a ? (r = B.query(c, a)) == null ? void 0 : r[0] : c;
1574
+ return { label: l, value: n };
1538
1575
  })) ?? [];
1539
- }, Un = (e, t, s, r = 10) => {
1576
+ }, Jn = (e, t, s, a = 10) => {
1540
1577
  var n, d;
1541
- let l, o;
1578
+ let i, c;
1542
1579
  if (s) {
1543
- const a = B.value(e, s.size ?? "$.meta.size") ?? r, u = B.value(e, s.total ?? "$.meta.total") ?? 0;
1544
- l = a, o = u;
1580
+ const r = B.value(e, s.size ?? "$.meta.size") ?? a, u = B.value(e, s.total ?? "$.meta.total") ?? 0;
1581
+ i = r, c = u;
1545
1582
  } else {
1546
- const a = e == null ? void 0 : e.meta;
1547
- l = (a == null ? void 0 : a.size) ?? ((n = a == null ? void 0 : a.page) == null ? void 0 : n.size) ?? r, o = (a == null ? void 0 : a.total) ?? ((d = a == null ? void 0 : a.page) == null ? void 0 : d.total) ?? 0;
1583
+ const r = e == null ? void 0 : e.meta;
1584
+ i = (r == null ? void 0 : r.size) ?? ((n = r == null ? void 0 : r.page) == null ? void 0 : n.size) ?? a, c = (r == null ? void 0 : r.total) ?? ((d = r == null ? void 0 : r.page) == null ? void 0 : d.total) ?? 0;
1548
1585
  }
1549
- const i = o > 0 ? Math.ceil(o / l) > t : !1;
1586
+ const l = c > 0 ? Math.ceil(c / i) > t : !1;
1550
1587
  return {
1551
- pageSize: l,
1552
- total: o,
1553
- hasMore: i
1588
+ pageSize: i,
1589
+ total: c,
1590
+ hasMore: l
1554
1591
  };
1555
- }, Jn = "_selectNotFront_1yw9q_1", Ke = {
1556
- selectNotFront: Jn
1557
- }, Vn = ({
1592
+ }, Vn = "_selectNotFront_1yw9q_1", Ke = {
1593
+ selectNotFront: Vn
1594
+ }, Hn = ({
1558
1595
  userFlow: e,
1559
1596
  pageId: t,
1560
1597
  responseKey: s,
1561
- required: r,
1562
- dataSource: l,
1563
- actionType: o,
1564
- dependencies: i,
1598
+ required: a,
1599
+ dataSource: i,
1600
+ actionType: c,
1601
+ dependencies: l,
1565
1602
  debounceMs: n,
1566
1603
  ...d
1567
1604
  }) => {
1568
- const a = {
1605
+ const r = {
1569
1606
  ...d
1570
- }, { getNextUI: u, fetchDataSource: f } = I(), [_, h] = q((a == null ? void 0 : a.value) ?? ""), { disabled: j } = M(
1607
+ }, { getNextUI: u, fetchDataSource: f } = I(), [_, h] = k((r == null ? void 0 : r.value) ?? ""), { disabled: j } = M(
1571
1608
  e,
1572
- i
1573
- ), y = (a == null ? void 0 : a.disabled) ?? j, x = O(() => r && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, r]), m = O(() => {
1574
- const p = a != null && a.isMulti ? _ : [_], C = {};
1575
- return typeof p == "object" && "length" in p && (p == null || p.forEach((w) => {
1609
+ l
1610
+ ), y = (r == null ? void 0 : r.disabled) ?? j, x = S(() => a && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, a]), m = S(() => {
1611
+ const b = r != null && r.isMulti ? _ : [_], C = {};
1612
+ return typeof b == "object" && "length" in b && (b == null || b.forEach((w) => {
1576
1613
  const E = JSON.stringify(w.value), T = JSON.stringify(w.label);
1577
1614
  C[E] = w, T in C || (C[T] = w);
1578
1615
  })), C;
@@ -1580,94 +1617,94 @@ const Gn = (e, t, s, r) => {
1580
1617
  userFlow: e,
1581
1618
  pageId: t,
1582
1619
  responseKey: s,
1583
- actionType: o,
1620
+ actionType: c,
1584
1621
  getNextUI: u,
1585
- isMulti: a == null ? void 0 : a.isMulti,
1622
+ isMulti: r == null ? void 0 : r.isMulti,
1586
1623
  debounceMs: n
1587
- }), b = (p) => {
1588
- h(p), g(p);
1589
- }, N = async (p, C, { page: w }) => {
1624
+ }), p = (b) => {
1625
+ h(b), g(b);
1626
+ }, N = async (b, C, { page: w }) => {
1590
1627
  const {
1591
1628
  jsonPathLabel: E,
1592
1629
  jsonPathOptions: T,
1593
- jsonPathValue: k,
1594
- jsonPathPagination: K
1595
- } = l, G = pe(
1596
- l,
1630
+ jsonPathValue: q,
1631
+ jsonPathPagination: G
1632
+ } = i, U = be(
1633
+ i,
1597
1634
  w,
1598
- p
1635
+ b
1599
1636
  ), se = await f(
1600
- G,
1637
+ U,
1601
1638
  e,
1602
1639
  !1
1603
- ), ae = se == null ? void 0 : se.data, Ue = ae ? Gn(
1604
- ae,
1640
+ ), re = se == null ? void 0 : se.data, Ue = re ? Un(
1641
+ re,
1605
1642
  T,
1606
1643
  E,
1607
- k
1608
- ) : [], { hasMore: Je } = Un(
1609
- ae,
1644
+ q
1645
+ ) : [], { hasMore: Je } = Jn(
1646
+ re,
1610
1647
  w,
1611
- K
1648
+ G
1612
1649
  );
1613
1650
  return {
1614
1651
  options: Ue,
1615
1652
  hasMore: Je,
1616
1653
  additional: {
1617
- page: p ? 1 : w + 1
1654
+ page: b ? 1 : w + 1
1618
1655
  }
1619
1656
  };
1620
1657
  };
1621
- return /* @__PURE__ */ c.jsx(
1622
- rt,
1658
+ return /* @__PURE__ */ o.jsx(
1659
+ at,
1623
1660
  {
1624
- ...a,
1661
+ ...r,
1625
1662
  className: Ke.selectNotFront,
1626
1663
  label: x,
1627
1664
  value: _,
1628
1665
  disabled: y,
1629
- noOptionsMessage: () => /* @__PURE__ */ c.jsx(c.Fragment, { children: "Sin opciones" }),
1630
- onChange: (p) => !y && b(p),
1666
+ noOptionsMessage: () => /* @__PURE__ */ o.jsx(o.Fragment, { children: "Sin opciones" }),
1667
+ onChange: (b) => !y && p(b),
1631
1668
  loadOptions: N,
1632
1669
  additional: { page: 1 },
1633
- isOptionDisabled: (p) => {
1634
- const C = JSON.stringify(p == null ? void 0 : p.value), w = JSON.stringify(p == null ? void 0 : p.label);
1670
+ isOptionDisabled: (b) => {
1671
+ const C = JSON.stringify(b == null ? void 0 : b.value), w = JSON.stringify(b == null ? void 0 : b.label);
1635
1672
  return !!(m != null && m[C]) || !!(m != null && m[w]);
1636
1673
  },
1637
1674
  debounceTimeout: 350
1638
1675
  }
1639
1676
  );
1640
- }, Hn = ({
1677
+ }, Xn = ({
1641
1678
  userFlow: e,
1642
1679
  pageId: t,
1643
1680
  responseKey: s,
1644
- dataSource: r,
1645
- required: l,
1646
- actionType: o,
1647
- dependencies: i,
1681
+ dataSource: a,
1682
+ required: i,
1683
+ actionType: c,
1684
+ dependencies: l,
1648
1685
  debounceMs: n,
1649
1686
  ...d
1650
1687
  }) => {
1651
- const a = {
1688
+ const r = {
1652
1689
  ...d
1653
- }, { getNextUI: u } = I(), [f, _] = q(a.value || ""), { disabled: h } = M(
1690
+ }, { getNextUI: u } = I(), [f, _] = k(r.value || ""), { disabled: h } = M(
1654
1691
  e,
1655
- i
1656
- ), j = (a == null ? void 0 : a.disabled) ?? h, y = O(() => l && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, l]), x = Me({
1692
+ l
1693
+ ), j = (r == null ? void 0 : r.disabled) ?? h, y = S(() => i && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, i]), x = Me({
1657
1694
  userFlow: e,
1658
1695
  pageId: t,
1659
1696
  responseKey: s,
1660
- actionType: o,
1697
+ actionType: c,
1661
1698
  getNextUI: u,
1662
- isMulti: a == null ? void 0 : a.isMulti,
1699
+ isMulti: r == null ? void 0 : r.isMulti,
1663
1700
  debounceMs: n
1664
1701
  }), m = (g) => {
1665
1702
  _(g), x(g);
1666
1703
  };
1667
- return /* @__PURE__ */ c.jsx(
1704
+ return /* @__PURE__ */ o.jsx(
1668
1705
  st,
1669
1706
  {
1670
- ...a,
1707
+ ...r,
1671
1708
  className: Ke.selectNotFront,
1672
1709
  label: y,
1673
1710
  value: f,
@@ -1675,67 +1712,67 @@ const Gn = (e, t, s, r) => {
1675
1712
  onChange: (g) => !j && m(g)
1676
1713
  }
1677
1714
  );
1678
- }, Xn = (e) => {
1715
+ }, Wn = (e) => {
1679
1716
  const { dataSource: t } = e;
1680
- return t ? /* @__PURE__ */ c.jsx(Vn, { ...e }) : /* @__PURE__ */ c.jsx(Hn, { ...e });
1681
- }, Wn = "_spacing_19hqa_1", Qn = "_spacing__xxs_19hqa_1", Yn = "_spacing__xs_19hqa_4", Zn = "_spacing__sm_19hqa_7", Fn = "_spacing__md_19hqa_10", Pn = "_spacing__lg_19hqa_13", er = "_spacing__xl_19hqa_16", tr = "_spacing__xxl_19hqa_19", nr = "_spacing__xxxl_19hqa_22", Oe = {
1682
- spacing: Wn,
1683
- spacing__xxs: Qn,
1684
- spacing__xs: Yn,
1685
- spacing__sm: Zn,
1686
- spacing__md: Fn,
1687
- spacing__lg: Pn,
1688
- spacing__xl: er,
1689
- spacing__xxl: tr,
1690
- spacing__xxxl: nr
1691
- }, rr = (e) => {
1692
- const { size: t } = e, s = ee(Oe.spacing, Oe[`spacing__${t}`]);
1693
- return /* @__PURE__ */ c.jsx("div", { className: s });
1694
- }, sr = (e) => {
1717
+ return t ? /* @__PURE__ */ o.jsx(Hn, { ...e }) : /* @__PURE__ */ o.jsx(Xn, { ...e });
1718
+ }, Qn = "_spacing_19hqa_1", Yn = "_spacing__xxs_19hqa_1", Zn = "_spacing__xs_19hqa_4", Fn = "_spacing__sm_19hqa_7", Pn = "_spacing__md_19hqa_10", ea = "_spacing__lg_19hqa_13", ta = "_spacing__xl_19hqa_16", na = "_spacing__xxl_19hqa_19", aa = "_spacing__xxxl_19hqa_22", Ae = {
1719
+ spacing: Qn,
1720
+ spacing__xxs: Yn,
1721
+ spacing__xs: Zn,
1722
+ spacing__sm: Fn,
1723
+ spacing__md: Pn,
1724
+ spacing__lg: ea,
1725
+ spacing__xl: ta,
1726
+ spacing__xxl: na,
1727
+ spacing__xxxl: aa
1728
+ }, sa = (e) => {
1729
+ const { size: t } = e, s = ee(Ae.spacing, Ae[`spacing__${t}`]);
1730
+ return /* @__PURE__ */ o.jsx("div", { className: s });
1731
+ }, ra = (e) => {
1695
1732
  const {
1696
1733
  userFlow: t,
1697
1734
  pageId: s,
1698
- responseKey: r,
1699
- actionType: l,
1700
- label: o,
1701
- value: i,
1735
+ responseKey: a,
1736
+ actionType: i,
1737
+ label: c,
1738
+ value: l,
1702
1739
  required: n,
1703
1740
  dependencies: d,
1704
- ...a
1741
+ ...r
1705
1742
  } = e, u = {
1706
- ...a
1707
- }, { getNextUI: f } = I(), [_, h] = q(i || !1), { disabled: j } = M(
1743
+ ...r
1744
+ }, { getNextUI: f } = I(), [_, h] = k(l || !1), { disabled: j } = M(
1708
1745
  t,
1709
1746
  d
1710
- ), y = (u == null ? void 0 : u.disabled) ?? j, x = O(() => n && o ? `${o} *` : o ?? "", [o, n]), m = D(async () => {
1747
+ ), y = (u == null ? void 0 : u.disabled) ?? j, x = S(() => n && c ? `${c} *` : c ?? "", [c, n]), m = D(async () => {
1711
1748
  var g;
1712
1749
  try {
1713
- const b = !_;
1714
- h(b);
1750
+ const p = !_;
1751
+ h(p);
1715
1752
  const N = {
1716
1753
  ...(g = v.getState()[t]) == null ? void 0 : g.entries,
1717
- [r]: b
1754
+ [a]: p
1718
1755
  };
1719
- switch (L(t, N), l) {
1756
+ switch (L(t, N), i) {
1720
1757
  case "GO_TO_NEXT_UI":
1721
- const p = await f(
1758
+ const b = await f(
1722
1759
  t,
1723
1760
  s,
1724
1761
  N,
1725
- r
1762
+ a
1726
1763
  );
1727
- p != null && p.data && S(t, p == null ? void 0 : p.data);
1764
+ b != null && b.data && O(t, b == null ? void 0 : b.data);
1728
1765
  break;
1729
1766
  default:
1730
- console.warn(`Unhandled actionType: ${l}`);
1767
+ console.warn(`Unhandled actionType: ${i}`);
1731
1768
  break;
1732
1769
  }
1733
- } catch (b) {
1734
- console.error("Error in switch action:", b), alert(JSON.stringify(b));
1770
+ } catch (p) {
1771
+ console.error("Error in switch action:", p), alert(JSON.stringify(p));
1735
1772
  }
1736
- }, [t, s, r, l, _]);
1737
- return /* @__PURE__ */ c.jsx(
1738
- at,
1773
+ }, [t, s, a, i, _]);
1774
+ return /* @__PURE__ */ o.jsx(
1775
+ rt,
1739
1776
  {
1740
1777
  ...u,
1741
1778
  label: x,
@@ -1744,72 +1781,72 @@ const Gn = (e, t, s, r) => {
1744
1781
  onChange: () => !y && m()
1745
1782
  }
1746
1783
  );
1747
- }, ar = "_tableSkeleton_3nr9n_1", or = "_tableArrayPills_3nr9n_7", Ge = {
1748
- tableSkeleton: ar,
1749
- tableArrayPills: or
1750
- }, cr = ({ values: e }) => {
1751
- const s = e == null ? void 0 : e.slice(0, 4), r = (e == null ? void 0 : e.length) - 4;
1752
- return /* @__PURE__ */ c.jsxs("div", { className: Ge.tableArrayPills, children: [
1753
- s.map((l, o) => /* @__PURE__ */ c.jsx(ue, { children: String(l) }, o)),
1754
- r > 0 && /* @__PURE__ */ c.jsxs(ue, { outlined: !0, children: [
1784
+ }, ca = "_tableSkeleton_3nr9n_1", oa = "_tableArrayPills_3nr9n_7", Ge = {
1785
+ tableSkeleton: ca,
1786
+ tableArrayPills: oa
1787
+ }, ia = ({ values: e }) => {
1788
+ const s = e == null ? void 0 : e.slice(0, 4), a = (e == null ? void 0 : e.length) - 4;
1789
+ return /* @__PURE__ */ o.jsxs("div", { className: Ge.tableArrayPills, children: [
1790
+ s.map((i, c) => /* @__PURE__ */ o.jsx(ue, { children: String(i) }, c)),
1791
+ a > 0 && /* @__PURE__ */ o.jsxs(ue, { outlined: !0, children: [
1755
1792
  "+",
1756
- r
1793
+ a
1757
1794
  ] })
1758
1795
  ] });
1759
- }, ir = ({
1796
+ }, la = ({
1760
1797
  userFlow: e,
1761
1798
  pageId: t,
1762
1799
  tableResponseKey: s,
1763
- component: r,
1764
- rowData: l
1800
+ component: a,
1801
+ rowData: i
1765
1802
  }) => {
1766
- const { getNextUI: o, fetchAndGetNextUI: i, fetchDataSource: n } = I(), d = A(e, t, [
1767
- { ...r }
1768
- ]), a = (d == null ? void 0 : d[0]) || null;
1769
- if (!a) return null;
1803
+ const { getNextUI: c, fetchAndGetNextUI: l, fetchDataSource: n } = I(), d = A(e, t, [
1804
+ { ...a }
1805
+ ]), r = (d == null ? void 0 : d[0]) || null;
1806
+ if (!r) return null;
1770
1807
  const {
1771
1808
  actionType: u,
1772
1809
  responseKey: f,
1773
1810
  dataSource: _
1774
- } = a.props, h = D(async () => {
1811
+ } = r.props, h = D(async () => {
1775
1812
  var j, y, x;
1776
1813
  try {
1777
1814
  const m = {
1778
1815
  ...(j = v.getState()[e]) == null ? void 0 : j.entries,
1779
1816
  [f]: { status: 200 },
1780
- [s]: [{ ...l }]
1817
+ [s]: [{ ...i }]
1781
1818
  };
1782
1819
  switch (L(e, m), u) {
1783
1820
  case "GO_TO_NEXT_UI": {
1784
- const g = await o(
1821
+ const g = await c(
1785
1822
  e,
1786
1823
  t,
1787
1824
  m,
1788
1825
  f
1789
1826
  );
1790
- g != null && g.data && S(e, g == null ? void 0 : g.data);
1827
+ g != null && g.data && O(e, g == null ? void 0 : g.data);
1791
1828
  break;
1792
1829
  }
1793
1830
  case "FETCH_AND_GO_TO_NEXT_UI": {
1794
- const g = await i(
1831
+ const g = await l(
1795
1832
  e,
1796
1833
  t,
1797
1834
  m,
1798
1835
  f,
1799
1836
  _
1800
1837
  );
1801
- g != null && g.data && S(e, g == null ? void 0 : g.data);
1838
+ g != null && g.data && O(e, g == null ? void 0 : g.data);
1802
1839
  break;
1803
1840
  }
1804
1841
  case "GET_DATA_SOURCE": {
1805
- const g = await o(
1842
+ const g = await c(
1806
1843
  e,
1807
1844
  t,
1808
1845
  m,
1809
1846
  f
1810
- ), b = (y = g == null ? void 0 : g.data) == null ? void 0 : y.content;
1811
- if ((b == null ? void 0 : b.type) !== "fetch") break;
1812
- const N = b == null ? void 0 : b.dataSource, p = await n(
1847
+ ), p = (y = g == null ? void 0 : g.data) == null ? void 0 : y.content;
1848
+ if ((p == null ? void 0 : p.type) !== "fetch") break;
1849
+ const N = p == null ? void 0 : p.dataSource, b = await n(
1813
1850
  N,
1814
1851
  e,
1815
1852
  // Avoid to handle loading state until all the requests are done
@@ -1817,18 +1854,18 @@ const Gn = (e, t, s, r) => {
1817
1854
  ), C = {
1818
1855
  ...(x = v.getState()[e]) == null ? void 0 : x.entries,
1819
1856
  [f]: {
1820
- status: p == null ? void 0 : p.status,
1821
- content: p == null ? void 0 : p.data
1857
+ status: b == null ? void 0 : b.status,
1858
+ content: b == null ? void 0 : b.data
1822
1859
  }
1823
1860
  };
1824
1861
  L(e, C);
1825
- const w = await o(
1862
+ const w = await c(
1826
1863
  e,
1827
1864
  t,
1828
1865
  C,
1829
1866
  f
1830
1867
  );
1831
- w != null && w.data && S(e, w == null ? void 0 : w.data);
1868
+ w != null && w.data && O(e, w == null ? void 0 : w.data);
1832
1869
  break;
1833
1870
  }
1834
1871
  default:
@@ -1839,10 +1876,10 @@ const Gn = (e, t, s, r) => {
1839
1876
  alert(JSON.stringify(m));
1840
1877
  }
1841
1878
  }, [u, _, t, f, e]);
1842
- return We(a, {
1879
+ return We(r, {
1843
1880
  onClick: h
1844
1881
  });
1845
- }, lr = () => /* @__PURE__ */ c.jsx("div", { className: Ge.tableSkeleton, children: [...Array(10)].map((e, t) => /* @__PURE__ */ c.jsx(
1882
+ }, da = () => /* @__PURE__ */ o.jsx("div", { className: Ge.tableSkeleton, children: [...Array(10)].map((e, t) => /* @__PURE__ */ o.jsx(
1846
1883
  De,
1847
1884
  {
1848
1885
  maxWidth: "100%",
@@ -1850,21 +1887,21 @@ const Gn = (e, t, s, r) => {
1850
1887
  radius: 8
1851
1888
  },
1852
1889
  `tableSkeletonBase${t}`
1853
- )) }), dr = ({
1890
+ )) }), _a = ({
1854
1891
  userFlow: e,
1855
1892
  pageId: t,
1856
1893
  responseKey: s,
1857
- component: r,
1858
- dataSource: l,
1859
- rightActions: o,
1860
- ...i
1894
+ component: a,
1895
+ dataSource: i,
1896
+ rightActions: c,
1897
+ ...l
1861
1898
  }) => {
1862
- var b, N, p;
1863
- const { fetchDataSource: n } = I(), [d, a] = q(!1), [u, f] = q(1), [_, h] = q(null), j = O(() => {
1864
- if (o != null && o.length)
1865
- return o.map((C, w) => ({
1866
- renderContent: (E) => /* @__PURE__ */ c.jsx(
1867
- ir,
1899
+ var p, N, b;
1900
+ const { fetchDataSource: n } = I(), [d, r] = k(!1), [u, f] = k(1), [_, h] = k(null), j = S(() => {
1901
+ if (c != null && c.length)
1902
+ return c.map((C, w) => ({
1903
+ renderContent: (E) => /* @__PURE__ */ o.jsx(
1904
+ la,
1868
1905
  {
1869
1906
  userFlow: e,
1870
1907
  pageId: t,
@@ -1875,97 +1912,97 @@ const Gn = (e, t, s, r) => {
1875
1912
  `tableRowAction${w}`
1876
1913
  )
1877
1914
  }));
1878
- }, [o, e, t]), y = async (C = 1) => {
1915
+ }, [c, e, t]), y = async (C = 1) => {
1879
1916
  try {
1880
- a(!0);
1881
- const { jsonPathData: w, mapperData: E, jsonPathPagination: T } = l, k = pe(
1882
- l,
1917
+ r(!0);
1918
+ const { jsonPathData: w, mapperData: E, jsonPathPagination: T } = i, q = be(
1919
+ i,
1883
1920
  C
1884
- ), K = await n(
1885
- k,
1921
+ ), G = await n(
1922
+ q,
1886
1923
  e,
1887
1924
  !1
1888
1925
  );
1889
1926
  h(
1890
1927
  ze(
1891
- K == null ? void 0 : K.data,
1928
+ G == null ? void 0 : G.data,
1892
1929
  w,
1893
1930
  E,
1894
1931
  T
1895
1932
  )
1896
- ), a(!1);
1933
+ ), r(!1);
1897
1934
  } catch (w) {
1898
- alert(JSON.stringify(w)), a(!1);
1935
+ alert(JSON.stringify(w)), r(!1);
1899
1936
  }
1900
1937
  }, x = (C) => {
1901
1938
  f(C), y(C);
1902
1939
  };
1903
- V(() => {
1940
+ K(() => {
1904
1941
  y();
1905
1942
  }, []);
1906
- const m = O(() => !(_ != null && _.items) || !(i != null && i.columns) ? i == null ? void 0 : i.columns : i.columns.map((C) => {
1943
+ const m = S(() => !(_ != null && _.items) || !(l != null && l.columns) ? l == null ? void 0 : l.columns : l.columns.map((C) => {
1907
1944
  var E;
1908
1945
  return ((E = _ == null ? void 0 : _.items) == null ? void 0 : E.some(
1909
1946
  (T) => Array.isArray(C != null && C.accessor ? T[C == null ? void 0 : C.accessor] : void 0)
1910
1947
  )) ? {
1911
1948
  ...C,
1912
1949
  renderCell: (T) => {
1913
- const k = C.accessor ? T[C.accessor] : void 0;
1914
- return Array.isArray(k) ? /* @__PURE__ */ c.jsx(cr, { values: k }) : k;
1950
+ const q = C.accessor ? T[C.accessor] : void 0;
1951
+ return Array.isArray(q) ? /* @__PURE__ */ o.jsx(ia, { values: q }) : q;
1915
1952
  }
1916
1953
  } : C;
1917
- }), [_ == null ? void 0 : _.items, i == null ? void 0 : i.columns]), g = {
1918
- ...i,
1954
+ }), [_ == null ? void 0 : _.items, l == null ? void 0 : l.columns]), g = {
1955
+ ...l,
1919
1956
  data: _ == null ? void 0 : _.items,
1920
1957
  columns: m,
1921
1958
  rightActions: j
1922
1959
  };
1923
- return /* @__PURE__ */ c.jsx(c.Fragment, { children: d ? /* @__PURE__ */ c.jsx(lr, {}) : _ && ((b = _ == null ? void 0 : _.items) == null ? void 0 : b.length) > 0 ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
1924
- /* @__PURE__ */ c.jsx(ot, { ...g }),
1925
- (_ == null ? void 0 : _.pagination) && ((N = _ == null ? void 0 : _.pagination) == null ? void 0 : N.totalPages) > 1 && /* @__PURE__ */ c.jsx(
1926
- ct,
1960
+ return /* @__PURE__ */ o.jsx(o.Fragment, { children: d ? /* @__PURE__ */ o.jsx(da, {}) : _ && ((p = _ == null ? void 0 : _.items) == null ? void 0 : p.length) > 0 ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1961
+ /* @__PURE__ */ o.jsx(ct, { ...g }),
1962
+ (_ == null ? void 0 : _.pagination) && ((N = _ == null ? void 0 : _.pagination) == null ? void 0 : N.totalPages) > 1 && /* @__PURE__ */ o.jsx(
1963
+ ot,
1927
1964
  {
1928
1965
  classname: { global: "row__end" },
1929
1966
  page: u,
1930
1967
  size: _ == null ? void 0 : _.pagination.size,
1931
- total: (p = _ == null ? void 0 : _.pagination) == null ? void 0 : p.total,
1968
+ total: (b = _ == null ? void 0 : _.pagination) == null ? void 0 : b.total,
1932
1969
  onChange: x
1933
1970
  }
1934
1971
  )
1935
- ] }) : /* @__PURE__ */ c.jsx(ye, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) });
1936
- }, _r = "_textFieldNotFront_cps4i_1", ur = {
1937
- textFieldNotFront: _r
1938
- }, hr = (e) => {
1972
+ ] }) : /* @__PURE__ */ o.jsx(ye, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) });
1973
+ }, ua = "_textFieldNotFront_cps4i_1", ha = {
1974
+ textFieldNotFront: ua
1975
+ }, fa = (e) => {
1939
1976
  const {
1940
1977
  userFlow: t,
1941
1978
  pageId: s,
1942
- component: r,
1943
- hash: l,
1944
- responseKey: o,
1945
- required: i,
1979
+ component: a,
1980
+ hash: i,
1981
+ responseKey: c,
1982
+ required: l,
1946
1983
  dependencies: n,
1947
1984
  ...d
1948
- } = e, a = {
1985
+ } = e, r = {
1949
1986
  ...d
1950
- }, [u, f] = q((a == null ? void 0 : a.value) ?? ""), { disabled: _ } = M(
1987
+ }, [u, f] = k((r == null ? void 0 : r.value) ?? ""), { disabled: _ } = M(
1951
1988
  t,
1952
1989
  n
1953
- ), h = (a == null ? void 0 : a.disabled) ?? _, j = O(() => i && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, i]), y = (x) => {
1954
- var b;
1955
- const m = (b = x == null ? void 0 : x.target) == null ? void 0 : b.value;
1990
+ ), h = (r == null ? void 0 : r.disabled) ?? _, j = S(() => l && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, l]), y = (x) => {
1991
+ var p;
1992
+ const m = (p = x == null ? void 0 : x.target) == null ? void 0 : p.value;
1956
1993
  f(m);
1957
1994
  const g = {
1958
- [o]: m
1995
+ [c]: m
1959
1996
  };
1960
1997
  L(t, g);
1961
1998
  };
1962
- return V(() => {
1963
- f((a == null ? void 0 : a.value) ?? "");
1964
- }, [a == null ? void 0 : a.value]), /* @__PURE__ */ c.jsx(
1999
+ return K(() => {
2000
+ f((r == null ? void 0 : r.value) ?? "");
2001
+ }, [r == null ? void 0 : r.value]), /* @__PURE__ */ o.jsx(
1965
2002
  it,
1966
2003
  {
1967
- ...a,
1968
- className: ur.textFieldNotFront,
2004
+ ...r,
2005
+ className: ha.textFieldNotFront,
1969
2006
  allowClear: !1,
1970
2007
  label: j,
1971
2008
  value: u,
@@ -1973,107 +2010,107 @@ const Gn = (e, t, s, r) => {
1973
2010
  onChange: (x) => !h && y(x)
1974
2011
  }
1975
2012
  );
1976
- }, fr = ({
2013
+ }, ya = ({
1977
2014
  userFlow: e,
1978
2015
  pageId: t,
1979
2016
  responseKey: s,
1980
- variant: r,
1981
- content: l,
1982
- actionType: o,
1983
- redirectUrl: i
2017
+ variant: a,
2018
+ content: i,
2019
+ actionType: c,
2020
+ redirectUrl: l
1984
2021
  }) => {
1985
2022
  const n = D(async () => {
1986
2023
  xe(e);
1987
2024
  try {
1988
- switch (o) {
2025
+ switch (c) {
1989
2026
  case "AUTOCLOSE_AND_REDIRECT":
1990
- window.location.href = i;
2027
+ window.location.href = l;
1991
2028
  break;
1992
2029
  default:
1993
- console.warn(`Unhandled actionType: ${o}`);
2030
+ console.warn(`Unhandled actionType: ${c}`);
1994
2031
  break;
1995
2032
  }
1996
2033
  } catch (d) {
1997
2034
  console.error("Error in toast action:", d), alert(JSON.stringify(d));
1998
2035
  }
1999
- }, [o, t, s, e, i]);
2000
- return V(() => {
2036
+ }, [c, t, s, e, l]);
2037
+ return K(() => {
2001
2038
  ({
2002
2039
  info: W.info,
2003
2040
  error: W.error,
2004
2041
  success: W.success,
2005
2042
  warning: W.warning
2006
- }[r] || W.info)(l, {
2007
- autoClose: o ? !1 : 4e3,
2043
+ }[a] || W.info)(i, {
2044
+ autoClose: c ? !1 : 4e3,
2008
2045
  containerId: e,
2009
2046
  onClose: n
2010
2047
  });
2011
2048
  }, [n, e]), null;
2012
- }, yr = "_accordion_1ri2t_1", mr = "_accordionBody_1ri2t_8", Te = {
2013
- accordion: yr,
2014
- accordionBody: mr
2015
- }, xr = (e) => {
2049
+ }, ma = "_accordion_1ri2t_1", xa = "_accordionBody_1ri2t_8", Te = {
2050
+ accordion: ma,
2051
+ accordionBody: xa
2052
+ }, ga = (e) => {
2016
2053
  const {
2017
2054
  userFlow: t,
2018
2055
  pageId: s,
2019
- responseKey: r,
2020
- dependencies: l,
2021
- customContent: o,
2022
- actionContent: i,
2056
+ responseKey: a,
2057
+ dependencies: i,
2058
+ customContent: c,
2059
+ actionContent: l,
2023
2060
  components: n,
2024
2061
  ...d
2025
- } = e, { getNextUI: a } = I(), [u, f] = q(
2062
+ } = e, { getNextUI: r } = I(), [u, f] = k(
2026
2063
  d.checkboxChecked || !1
2027
2064
  ), { disabled: _ } = M(
2028
2065
  t,
2029
- l
2030
- ), h = A(t, s, n), j = i ? A(t, s, i) : void 0, y = o ? A(t, s, o) : void 0, x = D(
2031
- async (b) => {
2066
+ i
2067
+ ), h = A(t, s, n), j = l ? A(t, s, l) : void 0, y = c ? A(t, s, c) : void 0, x = D(
2068
+ async (p) => {
2032
2069
  var N;
2033
2070
  try {
2034
- const p = b.target.checked;
2035
- f(p);
2071
+ const b = p.target.checked;
2072
+ f(b);
2036
2073
  const C = {
2037
2074
  ...(N = v.getState()[t]) == null ? void 0 : N.entries,
2038
- [r]: p
2075
+ [a]: b
2039
2076
  };
2040
2077
  if (L(t, C), d.actionType === "GO_TO_NEXT_UI") {
2041
- const w = await a(
2078
+ const w = await r(
2042
2079
  t,
2043
2080
  s,
2044
2081
  C,
2045
- r
2082
+ a
2046
2083
  );
2047
- w != null && w.data && S(t, w == null ? void 0 : w.data);
2084
+ w != null && w.data && O(t, w == null ? void 0 : w.data);
2048
2085
  }
2049
- } catch (p) {
2050
- console.error("Error in accordion checkbox action:", p), alert(JSON.stringify(p));
2086
+ } catch (b) {
2087
+ console.error("Error in accordion checkbox action:", b), alert(JSON.stringify(b));
2051
2088
  }
2052
2089
  },
2053
- [t, s, r, d.actionType, a]
2090
+ [t, s, a, d.actionType, r]
2054
2091
  ), m = d.disabled || _, g = {
2055
2092
  ...d,
2056
2093
  className: Te.accordion,
2057
2094
  disabled: m,
2058
2095
  checkboxChecked: u,
2059
2096
  onChanceCheckbox: d.hasCheckbox ? x : void 0,
2060
- actionContent: j ? /* @__PURE__ */ c.jsx(c.Fragment, { children: j.map((b, N) => /* @__PURE__ */ c.jsx($, { children: b }, `accordion-action-${N}`)) }) : void 0,
2061
- customContent: y ? /* @__PURE__ */ c.jsx(c.Fragment, { children: y.map((b, N) => /* @__PURE__ */ c.jsx($, { children: b }, `accordion-custom-${N}`)) }) : void 0,
2062
- children: h ? /* @__PURE__ */ c.jsx("section", { className: Te.accordionBody, children: h.map((b, N) => /* @__PURE__ */ c.jsx($, { children: b }, `accordion-child-${N}`)) }) : void 0
2097
+ actionContent: j ? /* @__PURE__ */ o.jsx(o.Fragment, { children: j.map((p, N) => /* @__PURE__ */ o.jsx($, { children: p }, `accordion-action-${N}`)) }) : void 0,
2098
+ customContent: y ? /* @__PURE__ */ o.jsx(o.Fragment, { children: y.map((p, N) => /* @__PURE__ */ o.jsx($, { children: p }, `accordion-custom-${N}`)) }) : void 0,
2099
+ children: h ? /* @__PURE__ */ o.jsx("section", { className: Te.accordionBody, children: h.map((p, N) => /* @__PURE__ */ o.jsx($, { children: p }, `accordion-child-${N}`)) }) : void 0
2063
2100
  };
2064
- return /* @__PURE__ */ c.jsx(lt, { ...g });
2065
- }, gr = "_drawer_13pxo_1", pr = "_drawerBody_13pxo_5", br = "_drawerFooter_13pxo_11", _e = {
2066
- drawer: gr,
2067
- drawerBody: pr,
2068
- drawerFooter: br
2069
- }, jr = ({
2101
+ return /* @__PURE__ */ o.jsx(lt, { ...g });
2102
+ }, ba = "_drawer_13pxo_1", pa = "_drawerBody_13pxo_5", ja = "_drawerFooter_13pxo_11", _e = {
2103
+ drawer: ba,
2104
+ drawerBody: pa,
2105
+ drawerFooter: ja
2106
+ }, wa = ({
2070
2107
  userFlow: e,
2071
2108
  pageId: t,
2072
2109
  responseKey: s,
2073
- header: r,
2074
- body: l,
2075
- footer: o,
2076
- ...i
2110
+ header: a,
2111
+ body: i,
2112
+ footer: c,
2113
+ ...l
2077
2114
  }) => {
2078
2115
  const n = v((y) => {
2079
2116
  var x;
@@ -2081,91 +2118,91 @@ const Gn = (e, t, s, r) => {
2081
2118
  }), d = v((y) => {
2082
2119
  var x;
2083
2120
  return (x = y[e]) == null ? void 0 : x.isLoading;
2084
- }), a = n && !d, u = {
2085
- ...i,
2086
- isOpen: a,
2121
+ }), r = n && !d, u = {
2122
+ ...l,
2123
+ isOpen: r,
2087
2124
  children: null
2088
2125
  }, f = D(() => {
2089
2126
  xe(e), Z(e, !1);
2090
- }, [e]), _ = Array.isArray(r) ? A(e, t, r) : r ? /* @__PURE__ */ c.jsx(Re, { type: "h2", children: r }) : void 0, h = A(e, t, l), j = o ? A(e, t, o) : void 0;
2091
- return /* @__PURE__ */ c.jsx(
2127
+ }, [e]), _ = Array.isArray(a) ? A(e, t, a) : a ? /* @__PURE__ */ o.jsx(Re, { type: "h2", children: a }) : void 0, h = A(e, t, i), j = c ? A(e, t, c) : void 0;
2128
+ return /* @__PURE__ */ o.jsx(
2092
2129
  dt,
2093
2130
  {
2094
2131
  ...u,
2095
2132
  className: _e.drawer,
2096
- isOpen: a,
2133
+ isOpen: r,
2097
2134
  onClose: f,
2098
2135
  heightGap: 0,
2099
- title: _ ? /* @__PURE__ */ c.jsx(c.Fragment, { children: Array.isArray(_) ? _.map((y, x) => /* @__PURE__ */ c.jsx($, { children: y }, `drawer-header-${x}`)) : _ }) : void 0,
2100
- children: /* @__PURE__ */ c.jsx("section", { className: _e.drawerBody, children: h.map((y, x) => /* @__PURE__ */ c.jsx($, { children: y }, `drawer-body-${x}`)) }),
2101
- footer: j ? /* @__PURE__ */ c.jsx("div", { className: _e.drawerFooter, children: j.map((y, x) => /* @__PURE__ */ c.jsx($, { children: y }, `drawer-footer-${x}`)) }) : void 0
2136
+ title: _ ? /* @__PURE__ */ o.jsx(o.Fragment, { children: Array.isArray(_) ? _.map((y, x) => /* @__PURE__ */ o.jsx($, { children: y }, `drawer-header-${x}`)) : _ }) : void 0,
2137
+ children: /* @__PURE__ */ o.jsx("section", { className: _e.drawerBody, children: h.map((y, x) => /* @__PURE__ */ o.jsx($, { children: y }, `drawer-body-${x}`)) }),
2138
+ footer: j ? /* @__PURE__ */ o.jsx("div", { className: _e.drawerFooter, children: j.map((y, x) => /* @__PURE__ */ o.jsx($, { children: y }, `drawer-footer-${x}`)) }) : void 0
2102
2139
  }
2103
2140
  );
2104
- }, $e = (e, t, s, r, l) => {
2105
- const o = A(
2141
+ }, $e = (e, t, s, a, i) => {
2142
+ const c = A(
2106
2143
  e,
2107
2144
  t,
2108
- (r == null ? void 0 : r.components) || null,
2109
- l
2145
+ (a == null ? void 0 : a.components) || null,
2146
+ i
2110
2147
  );
2111
2148
  switch (s) {
2112
2149
  case "body":
2113
- return /* @__PURE__ */ c.jsx(
2114
- Ft,
2150
+ return /* @__PURE__ */ o.jsx(
2151
+ Pt,
2115
2152
  {
2116
- ...r,
2117
- inputs: o || []
2153
+ ...a,
2154
+ inputs: c || []
2118
2155
  },
2119
- JSON.stringify(r == null ? void 0 : r.components)
2156
+ JSON.stringify(a == null ? void 0 : a.components)
2120
2157
  );
2121
2158
  case "header":
2122
- return /* @__PURE__ */ c.jsx(
2123
- On,
2159
+ return /* @__PURE__ */ o.jsx(
2160
+ Tn,
2124
2161
  {
2125
- ...r,
2126
- components: o || []
2162
+ ...a,
2163
+ components: c || []
2127
2164
  },
2128
- JSON.stringify(r == null ? void 0 : r.components)
2165
+ JSON.stringify(a == null ? void 0 : a.components)
2129
2166
  );
2130
2167
  default:
2131
2168
  return null;
2132
2169
  }
2133
- }, Rr = (e, t, s, r) => {
2170
+ }, Da = (e, t, s, a) => {
2134
2171
  var _, h, j;
2135
- const [l, o] = q(!1), i = v((y) => y), n = (_ = i[e]) == null ? void 0 : _.currentPageId, d = n ? $e(
2172
+ const [i, c] = k(!1), l = v((y) => y), n = (_ = l[e]) == null ? void 0 : _.currentPageId, d = n ? $e(
2136
2173
  e,
2137
2174
  n,
2138
2175
  "header",
2139
- ((h = i[e].pages[n].page) == null ? void 0 : h.header) || null,
2140
- r
2141
- ) : null, a = n ? $e(
2176
+ ((h = l[e].pages[n].page) == null ? void 0 : h.header) || null,
2177
+ a
2178
+ ) : null, r = n ? $e(
2142
2179
  e,
2143
2180
  n,
2144
2181
  "body",
2145
- ((j = i[e].pages[n].page) == null ? void 0 : j.body) || null,
2146
- r
2147
- ) : null, u = O(() => {
2182
+ ((j = l[e].pages[n].page) == null ? void 0 : j.body) || null,
2183
+ a
2184
+ ) : null, u = S(() => {
2148
2185
  var y;
2149
- return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2150
- ((y = i[e]) == null ? void 0 : y.isLoading) && /* @__PURE__ */ c.jsx(_t, {}),
2186
+ return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2187
+ ((y = l[e]) == null ? void 0 : y.isLoading) && /* @__PURE__ */ o.jsx(_t, {}),
2151
2188
  d,
2152
- a,
2153
- n && /* @__PURE__ */ c.jsx(Dn, { userFlow: e, pageId: n }),
2154
- i[e] && /* @__PURE__ */ c.jsx(ut, {})
2189
+ r,
2190
+ n && /* @__PURE__ */ o.jsx(Ln, { userFlow: e, pageId: n }),
2191
+ l[e] && /* @__PURE__ */ o.jsx(ut, {})
2155
2192
  ] });
2156
- }, [d, a, n, e]), f = async () => {
2193
+ }, [d, r, n, e]), f = async () => {
2157
2194
  try {
2158
2195
  const y = await Ie(
2159
2196
  t,
2160
2197
  e
2161
2198
  ), x = y == null ? void 0 : y.data, m = x == null ? void 0 : x.content;
2162
- (y == null ? void 0 : y.status) === 200 ? oe(e, t, m, x == null ? void 0 : x.sessionState) : o(!0);
2199
+ (y == null ? void 0 : y.status) === 200 ? ce(e, t, m, x == null ? void 0 : x.sessionState) : c(!0);
2163
2200
  } catch (y) {
2164
- console.error("[not-page]: API call failed", y), o(!0);
2201
+ console.error("[not-page]: API call failed", y), c(!0);
2165
2202
  }
2166
2203
  };
2167
- return V(() => {
2168
- t != null && t.api && !s && e ? f() : !(t != null && t.api) && s && e || t != null && t.api && s && e ? oe(e, t, s) : (!(t != null && t.api) && !s || !e) && (o(!0), console.error(
2204
+ return K(() => {
2205
+ t != null && t.api && !s && e ? f() : !(t != null && t.api) && s && e || t != null && t.api && s && e ? ce(e, t, s) : (!(t != null && t.api) && !s || !e) && (c(!0), console.error(
2169
2206
  "[not-page]: API call failed",
2170
2207
  "not api config",
2171
2208
  "not userFlow"
@@ -2177,12 +2214,12 @@ const Gn = (e, t, s, r) => {
2177
2214
  return window.addEventListener(y, x), () => {
2178
2215
  window.removeEventListener(y, x);
2179
2216
  };
2180
- }, []), l && console.error("[not-page]: No render page"), u;
2217
+ }, []), i && console.error("[not-page]: No render page"), u;
2181
2218
  };
2182
2219
  export {
2183
- qn as Chart,
2184
- Kn as Row,
2185
- Kt as heading,
2186
- Gt as text,
2187
- Rr as usePage
2220
+ kn as Chart,
2221
+ Gn as Row,
2222
+ Gt as heading,
2223
+ Ut as text,
2224
+ Da as usePage
2188
2225
  };