@epam/statgpt-conversation-view 0.2.0-rc.21 → 0.2.0-rc.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +5 -5
  2. package/index.mjs +359 -351
  3. package/package.json +6 -6
package/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as u, jsxs as A, Fragment as te } from "react/jsx-runtime";
2
2
  import * as ee from "react";
3
- import se, { createContext as Hr, useState as D, useContext as Gr, useCallback as P, useMemo as ue, useEffect as _, useRef as ae, startTransition as bi } from "react";
3
+ import se, { createContext as Hr, useState as D, useContext as Gr, useCallback as P, useMemo as ue, useEffect as R, useRef as ae, startTransition as bi } from "react";
4
4
  import { Role as be, DialSchemaProperties as Ln, SharePermission as ki } from "@epam/ai-dial-shared";
5
5
  import { InputWithIcon as zn, IconButton as Ve, KeyboardKey as Ci, Button as he, Popup as en, PopUpSize as nn, Loader as ye, PopUpState as ne, Tag as Ni, TREE_NODE_PADDING as ur, TREE_NODE_ARROW_SIZE as Ai, Radio as Fr, Calendar as hr, Checkbox as Br, useIsMobile as bn, Dropdown as Di, SERIES_LIMIT as Qe, CloseButton as Wr, Link as yi, CollapsibleBlock as zr, RequestLimitMessage as $r, DownloadFormatMessage as xi, Alert as Ti, useDebounce as Ei } from "@epam/statgpt-ui-components";
6
6
  import { IconPlayerStopFilled as Mi, IconCheck as Si, IconCopy as Jr, IconPlus as jr, IconSearch as Oi, IconCircleFilled as Li, IconExternalLink as _i, IconPointFilled as Ri } from "@tabler/icons-react";
@@ -256,9 +256,9 @@ var ze;
256
256
  m.push(y);
257
257
  }
258
258
  o(m.length == v);
259
- const b = X.getNumDataCodewords(g, c) * 8;
260
- o(m.length <= b), t(0, Math.min(4, b - m.length), m), t(0, (8 - m.length % 8) % 8, m), o(m.length % 8 == 0);
261
- for (let p = 236; m.length < b; p ^= 253)
259
+ const k = X.getNumDataCodewords(g, c) * 8;
260
+ o(m.length <= k), t(0, Math.min(4, k - m.length), m), t(0, (8 - m.length % 8) % 8, m), o(m.length % 8 == 0);
261
+ for (let p = 236; m.length < k; p ^= 253)
262
262
  t(p, 8, m);
263
263
  let C = [];
264
264
  for (; C.length * 8 < m.length; )
@@ -353,17 +353,17 @@ var ze;
353
353
  throw new RangeError("Invalid argument");
354
354
  const d = X.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][c], f = X.ECC_CODEWORDS_PER_BLOCK[a.ordinal][c], w = Math.floor(X.getNumRawDataModules(c) / 8), g = d - w % d, v = Math.floor(w / d);
355
355
  let m = [];
356
- const b = X.reedSolomonComputeDivisor(f);
356
+ const k = X.reedSolomonComputeDivisor(f);
357
357
  for (let p = 0, y = 0; p < d; p++) {
358
- let k = l.slice(y, y + v - f + (p < g ? 0 : 1));
359
- y += k.length;
360
- const x = X.reedSolomonComputeRemainder(k, b);
361
- p < g && k.push(0), m.push(k.concat(x));
358
+ let b = l.slice(y, y + v - f + (p < g ? 0 : 1));
359
+ y += b.length;
360
+ const x = X.reedSolomonComputeRemainder(b, k);
361
+ p < g && b.push(0), m.push(b.concat(x));
362
362
  }
363
363
  let C = [];
364
364
  for (let p = 0; p < m[0].length; p++)
365
- m.forEach((y, k) => {
366
- (p != v - f || k >= g) && C.push(y[p]);
365
+ m.forEach((y, b) => {
366
+ (p != v - f || b >= g) && C.push(y[p]);
367
367
  });
368
368
  return o(C.length == w), C;
369
369
  }
@@ -754,8 +754,8 @@ function Ll(e, n, t, r) {
754
754
  const o = e.length + t * 2, i = Math.floor(n * Ol), s = o / n, h = (r.width || i) * s, l = (r.height || i) * s, c = r.x == null ? e.length / 2 - h / 2 : r.x * s, a = r.y == null ? e.length / 2 - l / 2 : r.y * s, d = r.opacity == null ? 1 : r.opacity;
755
755
  let f = null;
756
756
  if (r.excavate) {
757
- let g = Math.floor(c), v = Math.floor(a), m = Math.ceil(h + c - g), b = Math.ceil(l + a - v);
758
- f = { x: g, y: v, w: m, h: b };
757
+ let g = Math.floor(c), v = Math.floor(a), m = Math.ceil(h + c - g), k = Math.ceil(l + a - v);
758
+ f = { x: g, y: v, w: m, h: k };
759
759
  }
760
760
  const w = r.crossOrigin;
761
761
  return { x: c, y: a, h: l, w: h, excavation: f, opacity: d, crossOrigin: w };
@@ -838,12 +838,12 @@ var Rl = (function() {
838
838
  "boostLevel",
839
839
  "marginSize",
840
840
  "imageSettings"
841
- ]), { style: m } = v, b = Hn(v, ["style"]), C = w == null ? void 0 : w.src, p = se.useRef(null), y = se.useRef(null), k = se.useCallback(
841
+ ]), { style: m } = v, k = Hn(v, ["style"]), C = w == null ? void 0 : w.src, p = se.useRef(null), y = se.useRef(null), b = se.useCallback(
842
842
  (J) => {
843
843
  p.current = J, typeof t == "function" ? t(J) : t && (t.current = J);
844
844
  },
845
845
  [t]
846
- ), [x, R] = se.useState(!1), { margin: S, cells: L, numCells: N, calculatedImageSettings: T } = Do({
846
+ ), [x, _] = se.useState(!1), { margin: S, cells: L, numCells: N, calculatedImageSettings: T } = Do({
847
847
  value: o,
848
848
  level: s,
849
849
  minVersion: a,
@@ -880,7 +880,7 @@ var Rl = (function() {
880
880
  );
881
881
  }
882
882
  }), se.useEffect(() => {
883
- R(!1);
883
+ _(!1);
884
884
  }, [C]);
885
885
  const O = Vn({ height: i, width: i }, m);
886
886
  let B = null;
@@ -891,7 +891,7 @@ var Rl = (function() {
891
891
  key: C,
892
892
  style: { display: "none" },
893
893
  onLoad: () => {
894
- R(!0);
894
+ _(!0);
895
895
  },
896
896
  ref: y,
897
897
  crossOrigin: T == null ? void 0 : T.crossOrigin
@@ -902,9 +902,9 @@ var Rl = (function() {
902
902
  style: O,
903
903
  height: i,
904
904
  width: i,
905
- ref: k,
905
+ ref: b,
906
906
  role: "img"
907
- }, b)
907
+ }, k)
908
908
  ), B);
909
909
  }
910
910
  );
@@ -935,7 +935,7 @@ var yo = se.forwardRef(
935
935
  "title",
936
936
  "marginSize",
937
937
  "imageSettings"
938
- ]), { margin: m, cells: b, numCells: C, calculatedImageSettings: p } = Do({
938
+ ]), { margin: m, cells: k, numCells: C, calculatedImageSettings: p } = Do({
939
939
  value: o,
940
940
  level: s,
941
941
  minVersion: a,
@@ -945,11 +945,11 @@ var yo = se.forwardRef(
945
945
  imageSettings: g,
946
946
  size: i
947
947
  });
948
- let y = b, k = null;
948
+ let y = k, b = null;
949
949
  g != null && p != null && (p.excavation != null && (y = Ao(
950
- b,
950
+ k,
951
951
  p.excavation
952
- )), k = /* @__PURE__ */ se.createElement(
952
+ )), b = /* @__PURE__ */ se.createElement(
953
953
  "image",
954
954
  {
955
955
  href: g.src,
@@ -982,7 +982,7 @@ var yo = se.forwardRef(
982
982
  }
983
983
  ),
984
984
  /* @__PURE__ */ se.createElement("path", { fill: l, d: x, shapeRendering: "crispEdges" }),
985
- k
985
+ b
986
986
  );
987
987
  }
988
988
  );
@@ -1035,22 +1035,22 @@ const Pl = (e, n) => ({
1035
1035
  shareRemoveAccessToUsers: g,
1036
1036
  chatName: v,
1037
1037
  getSharedConversations: m,
1038
- revokeSharedConversations: b,
1038
+ revokeSharedConversations: k,
1039
1039
  baseUrl: C,
1040
1040
  id: p,
1041
1041
  clientSharedPage: y,
1042
- clientSharedProp: k
1042
+ clientSharedProp: b
1043
1043
  }) => {
1044
- const [x, R] = D(null), [S, L] = D(), [N, T] = D(!1), [O, B] = D(!1), [J, F] = D(), I = ue(() => {
1044
+ const [x, _] = D(null), [S, L] = D(), [N, T] = D(!1), [O, B] = D(!1), [J, F] = D(), I = ue(() => {
1045
1045
  var Z;
1046
1046
  const Y = C || window.location.origin;
1047
- if (C && C !== window.location.origin && y && k) {
1047
+ if (C && C !== window.location.origin && y && b) {
1048
1048
  const ie = (Z = x == null ? void 0 : x.split(`/${Zr}/`)) == null ? void 0 : Z[1];
1049
- return `${Y}/${y}?${k}=${ie}`;
1049
+ return `${Y}/${y}?${b}=${ie}`;
1050
1050
  }
1051
1051
  return `${Y}/${n}${x}`;
1052
- }, [C, x, n, y, k]);
1053
- _(() => {
1052
+ }, [C, x, n, y, b]);
1053
+ R(() => {
1054
1054
  (async () => {
1055
1055
  try {
1056
1056
  const Z = decodeURI(e ? e == null ? void 0 : e.id : `${p == null ? void 0 : p[0]}/${n}/${p == null ? void 0 : p[1]}`), ie = `${decodeURI(Z)}`, we = await (o == null ? void 0 : o(ie)), de = Pl(
@@ -1059,7 +1059,7 @@ const Pl = (e, n) => ({
1059
1059
  ), me = await (i == null ? void 0 : i(de)), ce = await (m == null ? void 0 : m(
1060
1060
  Yr(Kr.OTHERS)
1061
1061
  ));
1062
- me && ce && (T(!0), R(Vl(me)), L(
1062
+ me && ce && (T(!0), _(Vl(me)), L(
1063
1063
  Hl(
1064
1064
  e,
1065
1065
  ce == null ? void 0 : ce.resources
@@ -1078,12 +1078,12 @@ const Pl = (e, n) => ({
1078
1078
  n
1079
1079
  ]);
1080
1080
  const z = P(() => {
1081
- t(), R(null), T(!1), B(!1);
1081
+ t(), _(null), T(!1), B(!1);
1082
1082
  }, [t]), W = P(() => {
1083
1083
  B(!0), navigator.clipboard.writeText(I || "");
1084
1084
  }, [I]), j = async () => {
1085
1085
  try {
1086
- F(!0), S && await (b == null ? void 0 : b({ resources: [S] }));
1086
+ F(!0), S && await (k == null ? void 0 : k({ resources: [S] }));
1087
1087
  } catch (Y) {
1088
1088
  F(!1), console.error("Error revoking shared conversation", Y);
1089
1089
  }
@@ -1349,14 +1349,14 @@ const Pl = (e, n) => ({
1349
1349
  }) => {
1350
1350
  var L, N, T, O;
1351
1351
  const [w, g] = D(null), [v, m] = D(), {
1352
- onboardingFileSchema: b,
1352
+ onboardingFileSchema: k,
1353
1353
  onboardingFileName: C,
1354
1354
  onboardingFilePath: p,
1355
1355
  isShowOnboarding: y,
1356
- setIsShowOnboarding: k,
1356
+ setIsShowOnboarding: b,
1357
1357
  setOnboardingFileSchema: x
1358
1358
  } = Ne();
1359
- _(() => {
1359
+ R(() => {
1360
1360
  (async () => {
1361
1361
  try {
1362
1362
  const J = await r.getBucket();
@@ -1366,7 +1366,7 @@ const Pl = (e, n) => ({
1366
1366
  }
1367
1367
  })();
1368
1368
  }, [r]);
1369
- const R = P(
1369
+ const _ = P(
1370
1370
  async (B, J) => {
1371
1371
  var F, I, z;
1372
1372
  m(!0), w || console.error("No bucket");
@@ -1390,9 +1390,9 @@ const Pl = (e, n) => ({
1390
1390
  ), K = await r.getConversations(d), Y = await r.getSharedConversations(
1391
1391
  Yr(Kr.ME)
1392
1392
  );
1393
- if (l && b) {
1393
+ if (l && k) {
1394
1394
  const Z = {
1395
- ...b,
1395
+ ...k,
1396
1396
  isStarted: !0
1397
1397
  };
1398
1398
  await ((z = r.putOnboardingFile) == null ? void 0 : z.call(
@@ -1421,7 +1421,7 @@ const Pl = (e, n) => ({
1421
1421
  d,
1422
1422
  C,
1423
1423
  p,
1424
- b,
1424
+ k,
1425
1425
  l,
1426
1426
  a,
1427
1427
  x,
@@ -1432,9 +1432,9 @@ const Pl = (e, n) => ({
1432
1432
  ), S = P(
1433
1433
  async (B) => {
1434
1434
  var J;
1435
- if (k(!1), B && b) {
1435
+ if (b(!1), B && k) {
1436
1436
  const F = {
1437
- ...b,
1437
+ ...k,
1438
1438
  isSkipped: !0
1439
1439
  };
1440
1440
  await ((J = r.putOnboardingFile) == null ? void 0 : J.call(
@@ -1449,13 +1449,13 @@ const Pl = (e, n) => ({
1449
1449
  r,
1450
1450
  C,
1451
1451
  p,
1452
- b,
1453
1452
  k,
1453
+ b,
1454
1454
  x
1455
1455
  ]
1456
1456
  );
1457
- return _(() => {
1458
- h && w && R(h);
1457
+ return R(() => {
1458
+ h && w && _(h);
1459
1459
  }, [w, h]), /* @__PURE__ */ A("div", { className: "flex flex-col h-full w-full", children: [
1460
1460
  h || v ? /* @__PURE__ */ u(ye, {}) : y ? /* @__PURE__ */ u(
1461
1461
  Bl,
@@ -1464,7 +1464,7 @@ const Pl = (e, n) => ({
1464
1464
  messageContent: ((N = (L = l == null ? void 0 : l.properties) == null ? void 0 : L.choice) == null ? void 0 : N.description) || "",
1465
1465
  choiceButtons: ((O = (T = l == null ? void 0 : l.properties) == null ? void 0 : T.choice) == null ? void 0 : O.oneOf) || [],
1466
1466
  handleOnboardingSkip: S,
1467
- onClick: R
1467
+ onClick: _
1468
1468
  }
1469
1469
  ) : /* @__PURE__ */ A("div", { className: "flex flex-col h-full items-center justify-center sm:px-4", children: [
1470
1470
  /* @__PURE__ */ A(
@@ -1490,7 +1490,7 @@ const Pl = (e, n) => ({
1490
1490
  inputClasses: "mr-2",
1491
1491
  placeholder: (o == null ? void 0 : o.askAnything) ?? "Ask anything...",
1492
1492
  sendMessageIcon: i.sendMessageIcon,
1493
- onSendMessage: R
1493
+ onSendMessage: _
1494
1494
  }
1495
1495
  ),
1496
1496
  /* @__PURE__ */ u("div", { className: "max-w-full overflow-x-auto no-scrollbar", children: /* @__PURE__ */ u(
@@ -1507,7 +1507,7 @@ const Pl = (e, n) => ({
1507
1507
  {
1508
1508
  title: B.title,
1509
1509
  text: (J = B[Ln.DialWidgetOptions]) == null ? void 0 : J.populateText,
1510
- onClick: R
1510
+ onClick: _
1511
1511
  },
1512
1512
  B.title
1513
1513
  );
@@ -1519,7 +1519,7 @@ const Pl = (e, n) => ({
1519
1519
  Wl,
1520
1520
  {
1521
1521
  titles: o,
1522
- openNewConversation: () => k(!1)
1522
+ openNewConversation: () => b(!1)
1523
1523
  }
1524
1524
  ),
1525
1525
  !y && /* @__PURE__ */ u(
@@ -1875,7 +1875,7 @@ function Ul() {
1875
1875
  g.l10ns.bg = v, g.l10ns;
1876
1876
  var m = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
1877
1877
  l10ns: {}
1878
- }, b = {
1878
+ }, k = {
1879
1879
  weekdays: {
1880
1880
  shorthand: ["রবি", "সোম", "মঙ্গল", "বুধ", "বৃহস্পতি", "শুক্র", "শনি"],
1881
1881
  longhand: [
@@ -1919,7 +1919,7 @@ function Ul() {
1919
1919
  ]
1920
1920
  }
1921
1921
  };
1922
- m.l10ns.bn = b, m.l10ns;
1922
+ m.l10ns.bn = k, m.l10ns;
1923
1923
  var C = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
1924
1924
  l10ns: {}
1925
1925
  }, p = {
@@ -1989,7 +1989,7 @@ function Ul() {
1989
1989
  C.l10ns.cat = C.l10ns.ca = p, C.l10ns;
1990
1990
  var y = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
1991
1991
  l10ns: {}
1992
- }, k = {
1992
+ }, b = {
1993
1993
  weekdays: {
1994
1994
  shorthand: [
1995
1995
  "یەکشەممە",
@@ -2045,10 +2045,10 @@ function Ul() {
2045
2045
  return "";
2046
2046
  }
2047
2047
  };
2048
- y.l10ns.ckb = k, y.l10ns;
2048
+ y.l10ns.ckb = b, y.l10ns;
2049
2049
  var x = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
2050
2050
  l10ns: {}
2051
- }, R = {
2051
+ }, _ = {
2052
2052
  weekdays: {
2053
2053
  shorthand: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"],
2054
2054
  longhand: [
@@ -2103,7 +2103,7 @@ function Ul() {
2103
2103
  yearAriaLabel: "Rok",
2104
2104
  time_24hr: !0
2105
2105
  };
2106
- x.l10ns.cs = R, x.l10ns;
2106
+ x.l10ns.cs = _, x.l10ns;
2107
2107
  var S = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
2108
2108
  l10ns: {}
2109
2109
  }, L = {
@@ -4935,12 +4935,12 @@ function Ul() {
4935
4935
  az: c,
4936
4936
  be: d,
4937
4937
  bg: v,
4938
- bn: b,
4938
+ bn: k,
4939
4939
  bs: w,
4940
4940
  ca: p,
4941
- ckb: k,
4941
+ ckb: b,
4942
4942
  cat: p,
4943
- cs: R,
4943
+ cs: _,
4944
4944
  cy: L,
4945
4945
  da: T,
4946
4946
  de: B,
@@ -5083,9 +5083,9 @@ function Xl() {
5083
5083
  }
5084
5084
  function v() {
5085
5085
  a._bind(a.prevMonthNav, "click", function(N) {
5086
- N.preventDefault(), N.stopPropagation(), a.changeYear(a.currentYear - 1), b(), g();
5086
+ N.preventDefault(), N.stopPropagation(), a.changeYear(a.currentYear - 1), k(), g();
5087
5087
  }), a._bind(a.nextMonthNav, "click", function(N) {
5088
- N.preventDefault(), N.stopPropagation(), a.changeYear(a.currentYear + 1), b(), g();
5088
+ N.preventDefault(), N.stopPropagation(), a.changeYear(a.currentYear + 1), k(), g();
5089
5089
  }), a._bind(d.monthsContainer, "mouseover", function(N) {
5090
5090
  a.config.mode === "range" && a.onMouseOver(i(N), "flatpickr-monthSelect-month");
5091
5091
  });
@@ -5098,7 +5098,7 @@ function Xl() {
5098
5098
  B && B.classList.add("selected");
5099
5099
  }
5100
5100
  }
5101
- function b() {
5101
+ function k() {
5102
5102
  var N = a.selectedDates[0];
5103
5103
  if (N && (N = new Date(N), N.setFullYear(a.currentYear), a.config.minDate && N < a.config.minDate && (N = a.config.minDate), a.config.maxDate && N > a.config.maxDate && (N = a.config.maxDate), a.currentYear = N.getFullYear()), a.currentYearElement.value = String(a.currentYear), a.rContainer) {
5104
5104
  var T = a.rContainer.querySelectorAll(".flatpickr-monthSelect-month");
@@ -5139,7 +5139,7 @@ function Xl() {
5139
5139
  40: 3,
5140
5140
  38: -3
5141
5141
  };
5142
- function k(N, T, O, B) {
5142
+ function b(N, T, O, B) {
5143
5143
  var J = y[B.keyCode] !== void 0;
5144
5144
  if (!(!J && B.keyCode !== 13) && !(!a.rContainer || !d.monthsContainer)) {
5145
5145
  var F = a.rContainer.querySelector(".flatpickr-monthSelect-month.selected"), I = Array.prototype.indexOf.call(d.monthsContainer.children, document.activeElement);
@@ -5154,7 +5154,7 @@ function Xl() {
5154
5154
  var N;
5155
5155
  ((N = a.config) === null || N === void 0 ? void 0 : N.mode) === "range" && a.selectedDates.length === 1 && a.clear(!1), a.selectedDates.length || g();
5156
5156
  }
5157
- function R() {
5157
+ function _() {
5158
5158
  c._stubbedCurrentMonth = a._initialDate.getMonth(), a._initialDate.setMonth(c._stubbedCurrentMonth), a.currentMonth = c._stubbedCurrentMonth;
5159
5159
  }
5160
5160
  function S() {
@@ -5170,9 +5170,9 @@ function Xl() {
5170
5170
  a.config.enableTime = !1;
5171
5171
  },
5172
5172
  onValueUpdate: m,
5173
- onKeyDown: k,
5173
+ onKeyDown: b,
5174
5174
  onReady: [
5175
- R,
5175
+ _,
5176
5176
  f,
5177
5177
  w,
5178
5178
  v,
@@ -5438,12 +5438,12 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5438
5438
  titles: a,
5439
5439
  defaultTimeOption: d
5440
5440
  }) => {
5441
- var R, S, L, N;
5441
+ var _, S, L, N;
5442
5442
  const f = to(
5443
5443
  s == null ? void 0 : s[0].annotations
5444
5444
  ), [w, g] = D(
5445
5445
  n
5446
- ), v = !n || ((R = n == null ? void 0 : n.startPeriod) == null ? void 0 : R.getTime()) === ((S = f == null ? void 0 : f.startPeriod) == null ? void 0 : S.getTime()) && ((L = n == null ? void 0 : n.endPeriod) == null ? void 0 : L.getTime()) === ((N = f == null ? void 0 : f.endPeriod) == null ? void 0 : N.getTime()) ? 0 : rn, [m, b] = D(
5446
+ ), v = !n || ((_ = n == null ? void 0 : n.startPeriod) == null ? void 0 : _.getTime()) === ((S = f == null ? void 0 : f.startPeriod) == null ? void 0 : S.getTime()) && ((L = n == null ? void 0 : n.endPeriod) == null ? void 0 : L.getTime()) === ((N = f == null ? void 0 : f.endPeriod) == null ? void 0 : N.getTime()) ? 0 : rn, [m, k] = D(
5447
5447
  d ?? v
5448
5448
  ), C = ue(() => {
5449
5449
  const { startPeriod: T, endPeriod: O } = f, B = T == null ? void 0 : T.getFullYear(), J = O == null ? void 0 : O.getFullYear(), F = (/* @__PURE__ */ new Date()).getFullYear();
@@ -5451,7 +5451,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5451
5451
  (I) => I.value === rn || I.value === 0 || +I.value >= 0 && J - F >= +I.value || +I.value < 0 && B - F < +I.value
5452
5452
  );
5453
5453
  }, [f, t]);
5454
- _(() => {
5454
+ R(() => {
5455
5455
  h(w, m);
5456
5456
  }, [w]);
5457
5457
  const p = (T) => {
@@ -5477,7 +5477,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5477
5477
  };
5478
5478
  if (f == null)
5479
5479
  return null;
5480
- const k = vr(
5480
+ const b = vr(
5481
5481
  f.startPeriod,
5482
5482
  (w == null ? void 0 : w.endPeriod) || f.endPeriod,
5483
5483
  e,
@@ -5501,7 +5501,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5501
5501
  label: T.title,
5502
5502
  onChange: () => {
5503
5503
  const { value: O } = T;
5504
- b(O), O !== rn && g(
5504
+ k(O), O !== rn && g(
5505
5505
  O === 0 ? f : ta(f, O)
5506
5506
  );
5507
5507
  },
@@ -5514,7 +5514,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5514
5514
  hr,
5515
5515
  {
5516
5516
  onChange: p,
5517
- options: k,
5517
+ options: b,
5518
5518
  value: (w == null ? void 0 : w.startPeriod) || (f == null ? void 0 : f.startPeriod),
5519
5519
  label: (a == null ? void 0 : a.from) || "From",
5520
5520
  id: "time-options-start",
@@ -5545,7 +5545,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5545
5545
  }) => {
5546
5546
  var a;
5547
5547
  const [s, h] = D(!1), l = "cursor-pointer text-neutrals-1000 w-6 h-6 shrink-0";
5548
- _(() => {
5548
+ R(() => {
5549
5549
  var d;
5550
5550
  h(!!((d = e == null ? void 0 : e.children) != null && d.length));
5551
5551
  }, [e]);
@@ -5611,7 +5611,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5611
5611
  const [i, s] = D(
5612
5612
  []
5613
5613
  );
5614
- return _(() => {
5614
+ return R(() => {
5615
5615
  s(ha(e));
5616
5616
  }, [e]), i == null ? void 0 : i.map((h) => /* @__PURE__ */ u(
5617
5617
  Ro,
@@ -5703,12 +5703,12 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5703
5703
  selectedTimeOption: d
5704
5704
  }) => {
5705
5705
  const [f, w] = D(""), [g, v] = D([]), m = (e == null ? void 0 : e.displayMode) === Je.HIERARCHY;
5706
- _(() => {
5706
+ R(() => {
5707
5707
  var p;
5708
5708
  const C = ((p = e == null ? void 0 : e.dimensionValues) == null ? void 0 : p.filter(
5709
5709
  (y) => {
5710
- var k, x;
5711
- return (x = (k = y == null ? void 0 : y.name) == null ? void 0 : k.toLowerCase()) == null ? void 0 : x.includes(f == null ? void 0 : f.toLowerCase());
5710
+ var b, x;
5711
+ return (x = (b = y == null ? void 0 : y.name) == null ? void 0 : b.toLowerCase()) == null ? void 0 : x.includes(f == null ? void 0 : f.toLowerCase());
5712
5712
  }
5713
5713
  )) || [];
5714
5714
  v(
@@ -5717,10 +5717,10 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5717
5717
  C
5718
5718
  ) : C
5719
5719
  );
5720
- }, [m, f, e == null ? void 0 : e.dimensionValues]), _(() => {
5720
+ }, [m, f, e == null ? void 0 : e.dimensionValues]), R(() => {
5721
5721
  w("");
5722
5722
  }, [e]);
5723
- const b = P(
5723
+ const k = P(
5724
5724
  (C) => {
5725
5725
  w(C);
5726
5726
  },
@@ -5758,7 +5758,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5758
5758
  cssClass: "filters-search-input-text",
5759
5759
  placeholder: (h == null ? void 0 : h.searchPlaceholder) ?? "Search",
5760
5760
  value: f,
5761
- onChange: b,
5761
+ onChange: k,
5762
5762
  iconBeforeInput: /* @__PURE__ */ u(
5763
5763
  Oi,
5764
5764
  {
@@ -5802,21 +5802,21 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5802
5802
  expandHierarchicalValue: g
5803
5803
  }) => {
5804
5804
  var L;
5805
- const v = bn(), [m, b] = D(0), [C, p] = D(!1), y = (e == null ? void 0 : e.isTimeDimension) && (e == null ? void 0 : e.timeRange), k = ue(() => {
5805
+ const v = bn(), [m, k] = D(0), [C, p] = D(!1), y = (e == null ? void 0 : e.isTimeDimension) && (e == null ? void 0 : e.timeRange), b = ue(() => {
5806
5806
  var N, T, O, B;
5807
5807
  return (N = e == null ? void 0 : e.timeRange) != null && N.startPeriod && ((T = e == null ? void 0 : e.timeRange) != null && T.endPeriod) ? `${mn((O = e == null ? void 0 : e.timeRange) == null ? void 0 : O.startPeriod, o)} -
5808
5808
  ${mn((B = e == null ? void 0 : e.timeRange) == null ? void 0 : B.endPeriod, o)}` : "";
5809
5809
  }, [o, e == null ? void 0 : e.timeRange]);
5810
- _(() => {
5810
+ R(() => {
5811
5811
  var N;
5812
- b(
5812
+ k(
5813
5813
  (N = Oo(e == null ? void 0 : e.dimensionValues)) == null ? void 0 : N.length
5814
5814
  );
5815
5815
  }, [e == null ? void 0 : e.dimensionValues]);
5816
5816
  const x = (N) => {
5817
5817
  t == null || t(e == null ? void 0 : e.id, N);
5818
- }, R = h ? m > 0 : !0;
5819
- _(() => {
5818
+ }, _ = h ? m > 0 : !0;
5819
+ R(() => {
5820
5820
  e.isSelectedFilter || p(!1);
5821
5821
  }, [e.isSelectedFilter]);
5822
5822
  const S = () => {
@@ -5854,8 +5854,8 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5854
5854
  }
5855
5855
  ),
5856
5856
  /* @__PURE__ */ A("div", { className: "ml-2 flex gap-2 items-center text-neutrals-800", children: [
5857
- y && /* @__PURE__ */ u("span", { className: "filters-facet-item-counter border-none", children: k }),
5858
- !y && R && /* @__PURE__ */ u(
5857
+ y && /* @__PURE__ */ u("span", { className: "filters-facet-item-counter border-none", children: b }),
5858
+ !y && _ && /* @__PURE__ */ u(
5859
5859
  "span",
5860
5860
  {
5861
5861
  className: G(
@@ -5985,47 +5985,47 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5985
5985
  selectedTimeOption: g
5986
5986
  }) => {
5987
5987
  const v = bn(), m = P(
5988
- (k) => {
5988
+ (b) => {
5989
5989
  c({
5990
- ...e == null ? void 0 : e.find((x) => (x == null ? void 0 : x.id) === k),
5990
+ ...e == null ? void 0 : e.find((x) => (x == null ? void 0 : x.id) === b),
5991
5991
  isSelectedFilter: !0
5992
5992
  });
5993
5993
  },
5994
5994
  [e, c]
5995
- ), b = (k, x) => {
5995
+ ), k = (b, x) => {
5996
5996
  var S;
5997
- const R = {
5997
+ const _ = {
5998
5998
  ...t,
5999
5999
  dimensionValues: (S = t == null ? void 0 : t.dimensionValues) == null ? void 0 : S.map(
6000
- (L) => (L == null ? void 0 : L.id) === k ? { ...L, isSelectedValue: x } : L
6000
+ (L) => (L == null ? void 0 : L.id) === b ? { ...L, isSelectedValue: x } : L
6001
6001
  )
6002
6002
  };
6003
- c(R), f && f(R);
6004
- }, C = (k) => {
6005
- var R;
6003
+ c(_), f && f(_);
6004
+ }, C = (b) => {
6005
+ var _;
6006
6006
  const x = {
6007
6007
  ...t,
6008
- dimensionValues: (R = t == null ? void 0 : t.dimensionValues) == null ? void 0 : R.map(
6009
- (S) => (k == null ? void 0 : k.find(
6008
+ dimensionValues: (_ = t == null ? void 0 : t.dimensionValues) == null ? void 0 : _.map(
6009
+ (S) => (b == null ? void 0 : b.find(
6010
6010
  (N) => (N == null ? void 0 : N.id) === (S == null ? void 0 : S.id)
6011
6011
  )) || S
6012
6012
  )
6013
6013
  };
6014
6014
  c(x), f && f(x);
6015
- }, p = (k) => {
6015
+ }, p = (b) => {
6016
6016
  var x;
6017
6017
  c({
6018
6018
  ...t,
6019
6019
  dimensionValues: (x = t == null ? void 0 : t.dimensionValues) == null ? void 0 : x.map(
6020
- (R) => (R == null ? void 0 : R.id) === (k == null ? void 0 : k.id) ? { ...R, isExpanded: !(k != null && k.isExpanded) } : R
6020
+ (_) => (_ == null ? void 0 : _.id) === (b == null ? void 0 : b.id) ? { ..._, isExpanded: !(b != null && b.isExpanded) } : _
6021
6021
  )
6022
6022
  });
6023
- }, y = (k, x) => {
6024
- const R = {
6023
+ }, y = (b, x) => {
6024
+ const _ = {
6025
6025
  ...t,
6026
- timeRange: k || void 0
6026
+ timeRange: b || void 0
6027
6027
  };
6028
- w == null || w(x), c(R), f && f(R);
6028
+ w == null || w(x), c(_), f && f(_);
6029
6029
  };
6030
6030
  return /* @__PURE__ */ A(
6031
6031
  "div",
@@ -6056,7 +6056,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
6056
6056
  isDisableValues: i,
6057
6057
  initialConstraints: l,
6058
6058
  timeRangeOptions: h,
6059
- selectFilterValue: b,
6059
+ selectFilterValue: k,
6060
6060
  selectHierarchicalNodes: C,
6061
6061
  expandHierarchicalValue: p,
6062
6062
  onTimePeriodChange: y,
@@ -6079,7 +6079,7 @@ const ia = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
6079
6079
  titles: n,
6080
6080
  isDisableValues: i,
6081
6081
  timeRangeOptions: h,
6082
- selectFilterValue: b,
6082
+ selectFilterValue: k,
6083
6083
  selectHierarchicalNodes: C,
6084
6084
  expandHierarchicalValue: p,
6085
6085
  onTimePeriodChange: y,
@@ -6419,7 +6419,7 @@ const Kn = [
6419
6419
  supressReferenceClick: s
6420
6420
  }) => {
6421
6421
  var L;
6422
- const [h, l] = D(!0), [c, a] = D(!1), d = ae(null), { isShowOnboarding: f, onboardingFileSchema: w, setOnboardingFileSchema: g } = Ne(), { refs: v, floatingStyles: m, context: b, placement: C } = lo({
6422
+ const [h, l] = D(!0), [c, a] = D(!1), d = ae(null), { isShowOnboarding: f, onboardingFileSchema: w, setOnboardingFileSchema: g } = Ne(), { refs: v, floatingStyles: m, context: k, placement: C } = lo({
6423
6423
  open: h,
6424
6424
  onOpenChange: l,
6425
6425
  placement: "right-start",
@@ -6433,7 +6433,7 @@ const Kn = [
6433
6433
  sl({ element: d })
6434
6434
  ],
6435
6435
  whileElementsMounted: il
6436
- }), p = dl(b), { getFloatingProps: y } = ao([p]), k = P(() => {
6436
+ }), p = dl(k), { getFloatingProps: y } = ao([p]), b = P(() => {
6437
6437
  if (f) {
6438
6438
  const N = Ra(
6439
6439
  w,
@@ -6450,21 +6450,21 @@ const Kn = [
6450
6450
  }
6451
6451
  l == null || l(!1);
6452
6452
  }, [f, w, g]);
6453
- _(() => {
6453
+ R(() => {
6454
6454
  v.setReference((e == null ? void 0 : e.current) ?? null);
6455
6455
  }, [e, v]);
6456
- const x = () => k(), R = (L = e == null ? void 0 : e.current) == null ? void 0 : L.getBoundingClientRect();
6457
- return _(() => {
6458
- o && !c && (k(), a(!0));
6459
- }, [o, k, c]), /* @__PURE__ */ u(te, { children: h && /* @__PURE__ */ A(ul, { children: [
6460
- R && /* @__PURE__ */ u(
6456
+ const x = () => b(), _ = (L = e == null ? void 0 : e.current) == null ? void 0 : L.getBoundingClientRect();
6457
+ return R(() => {
6458
+ o && !c && (b(), a(!0));
6459
+ }, [o, b, c]), /* @__PURE__ */ u(te, { children: h && /* @__PURE__ */ A(ul, { children: [
6460
+ _ && /* @__PURE__ */ u(
6461
6461
  Va,
6462
6462
  {
6463
6463
  overlayClasses: s ? "cursor-default" : "cursor-pointer",
6464
- targetPosition: R,
6464
+ targetPosition: _,
6465
6465
  onClose: () => {
6466
6466
  var N;
6467
- r ? (r == null || r(), i ? k() : l(!1)) : s || (k(), (N = e == null ? void 0 : e.current) == null || N.click());
6467
+ r ? (r == null || r(), i ? b() : l(!1)) : s || (b(), (N = e == null ? void 0 : e.current) == null || N.click());
6468
6468
  }
6469
6469
  }
6470
6470
  ),
@@ -6507,23 +6507,23 @@ const Kn = [
6507
6507
  filterIconClassName: h,
6508
6508
  timeSeriesCount: l
6509
6509
  }) => {
6510
- const c = ae(null), [a, d] = D(""), [f, w] = D(""), [g, v] = D(!1), { onboardingFileSchema: m, isShowOnboarding: b } = Ne(), C = Qe < (l ?? 0), p = ue(
6510
+ const c = ae(null), [a, d] = D(""), [f, w] = D(""), [g, v] = D(!1), { onboardingFileSchema: m, isShowOnboarding: k } = Ne(), C = Qe < (l ?? 0), p = ue(
6511
6511
  () => e != null && e.isShowBadge ? e == null ? void 0 : e.title : `${e == null ? void 0 : e.title}: ${n}`,
6512
6512
  [e == null ? void 0 : e.isShowBadge, e == null ? void 0 : e.title, n]
6513
6513
  );
6514
- return _(() => {
6515
- if (b) {
6516
- const { title: y, description: k } = Ge(
6514
+ return R(() => {
6515
+ if (k) {
6516
+ const { title: y, description: b } = Ge(
6517
6517
  oe.FILTERS,
6518
6518
  o
6519
6519
  );
6520
- d(y), w(k);
6520
+ d(y), w(b);
6521
6521
  }
6522
- }, [o, b]), _(() => {
6523
- b && v(
6522
+ }, [o, k]), R(() => {
6523
+ k && v(
6524
6524
  (m == null ? void 0 : m.lastDisplayedElement) === oe.FILTERS
6525
6525
  );
6526
- }, [m == null ? void 0 : m.lastDisplayedElement, b]), /* @__PURE__ */ u("div", { className: "relative filter-button-container", ref: c, children: t ? /* @__PURE__ */ u(ye, {}) : /* @__PURE__ */ A(te, { children: [
6526
+ }, [m == null ? void 0 : m.lastDisplayedElement, k]), /* @__PURE__ */ u("div", { className: "relative filter-button-container", ref: c, children: t ? /* @__PURE__ */ u(ye, {}) : /* @__PURE__ */ A(te, { children: [
6527
6527
  /* @__PURE__ */ u(
6528
6528
  he,
6529
6529
  {
@@ -6654,24 +6654,24 @@ const Ba = (e, n) => {
6654
6654
  conversation: g,
6655
6655
  setConversation: v,
6656
6656
  updateConversation: m,
6657
- updateDataQueries: b,
6657
+ updateDataQueries: k,
6658
6658
  limitMessages: C,
6659
6659
  filterIconClassName: p
6660
6660
  }) => {
6661
6661
  var Se, Oe;
6662
- const [y, k] = D(ne.Closed), [x, R] = D([]), [S, L] = D([]), [N, T] = D(), [O, B] = D(
6662
+ const [y, b] = D(ne.Closed), [x, _] = D([]), [S, L] = D([]), [N, T] = D(), [O, B] = D(
6663
6663
  []
6664
6664
  ), [J, F] = D(void 0), I = ae(l || []), [z, W] = D([]), [j, K] = D(), [Y, Z] = D(), ie = ae(!1), [we, de] = D(!1), me = (H) => {
6665
6665
  const E = H ? x.map(
6666
6666
  (M) => M.id === H.id ? H : M
6667
6667
  ) : x;
6668
- Z(!0), R(Cr(E)), K == null || K(!0), ce(
6668
+ Z(!0), _(Cr(E)), K == null || K(!0), ce(
6669
6669
  H != null && H.isTimeDimension ? kr(E, H) : E,
6670
- R,
6670
+ _,
6671
6671
  K
6672
6672
  );
6673
6673
  };
6674
- _(() => {
6674
+ R(() => {
6675
6675
  y === ne.Closed && W(I.current);
6676
6676
  }, [y]);
6677
6677
  const ce = P(
@@ -6709,7 +6709,7 @@ const Ba = (e, n) => {
6709
6709
  },
6710
6710
  [e, s == null ? void 0 : s.urn, n, a, r]
6711
6711
  );
6712
- _(() => {
6712
+ R(() => {
6713
6713
  const H = ia(
6714
6714
  n,
6715
6715
  r,
@@ -6758,14 +6758,14 @@ const Ba = (e, n) => {
6758
6758
  a,
6759
6759
  l,
6760
6760
  ce
6761
- ]), _(() => {
6761
+ ]), R(() => {
6762
6762
  S != null && S.length && B(Lo(S));
6763
- }, [S]), _(() => {
6764
- R(
6763
+ }, [S]), R(() => {
6764
+ _(
6765
6765
  (H) => kr(H, N)
6766
6766
  );
6767
- }, [N]), _(() => {
6768
- y === ne.Opened && (T({ ...S == null ? void 0 : S[0], isSelectedFilter: !0 }), R(S)), y === ne.Closed && T(void 0);
6767
+ }, [N]), R(() => {
6768
+ y === ne.Opened && (T({ ...S == null ? void 0 : S[0], isSelectedFilter: !0 }), _(S)), y === ne.Closed && T(void 0);
6769
6769
  }, [S, y]);
6770
6770
  const ge = P(
6771
6771
  async (H) => {
@@ -6778,7 +6778,7 @@ const Ba = (e, n) => {
6778
6778
  h
6779
6779
  )
6780
6780
  } : null;
6781
- v == null || v(M), b == null || b(
6781
+ v == null || v(M), k == null || k(
6782
6782
  ja(
6783
6783
  E,
6784
6784
  s,
@@ -6796,11 +6796,11 @@ const Ba = (e, n) => {
6796
6796
  h,
6797
6797
  v,
6798
6798
  m,
6799
- b
6799
+ k
6800
6800
  ]
6801
6801
  ), Ae = P(
6802
6802
  (H, E) => {
6803
- R(
6803
+ _(
6804
6804
  (M) => la(M, H, E)
6805
6805
  ), (N == null ? void 0 : N.id) === H && T((M) => ({
6806
6806
  ...M,
@@ -6824,12 +6824,12 @@ const Ba = (e, n) => {
6824
6824
  (V) => (M == null ? void 0 : M.find(
6825
6825
  ($) => ($ == null ? void 0 : $.id) === (V == null ? void 0 : V.id)
6826
6826
  )) || V
6827
- ), R(M), Z(!1);
6827
+ ), _(M), Z(!1);
6828
6828
  },
6829
6829
  [n, a, r]
6830
6830
  ), le = P(
6831
6831
  (H) => {
6832
- Z(!0), R(Cr(H)), e == null || e.getConstraints(
6832
+ Z(!0), _(Cr(H)), e == null || e.getConstraints(
6833
6833
  (s == null ? void 0 : s.urn) || "",
6834
6834
  Dr(H).filter(
6835
6835
  (E) => E.componentCode !== hn
@@ -6852,13 +6852,13 @@ const Ba = (e, n) => {
6852
6852
  },
6853
6853
  [le, x]
6854
6854
  ), Ee = P(() => {
6855
- I.current = z, k(ne.Closed), de(!0);
6855
+ I.current = z, b(ne.Closed), de(!0);
6856
6856
  }, [z]), Ie = P(() => {
6857
6857
  const H = sa(x);
6858
6858
  le(H);
6859
6859
  }, [le, x]), De = P(() => {
6860
6860
  const H = xe(x);
6861
- c == null || c(H, I.current, x), L(x), k(ne.Closed), de(!0), bi(() => {
6861
+ c == null || c(H, I.current, x), L(x), b(ne.Closed), de(!0), bi(() => {
6862
6862
  ge(x);
6863
6863
  });
6864
6864
  }, [
@@ -6881,7 +6881,7 @@ const Ba = (e, n) => {
6881
6881
  O
6882
6882
  ),
6883
6883
  isLoading: j,
6884
- setModalState: k,
6884
+ setModalState: b,
6885
6885
  titles: f,
6886
6886
  isModalClosed: we,
6887
6887
  warningIcon: C == null ? void 0 : C.warningIcon,
@@ -7059,11 +7059,11 @@ const qa = ({ attachment: e, className: n = "" }) => {
7059
7059
  const h = ae(null), [l, c] = D(""), [a, d] = D(""), [f, w] = D(!1), { onboardingFileSchema: g, isShowOnboarding: v } = Ne(), m = P(
7060
7060
  (C, p = "") => o ? Fa(C) || sn(C) ? /* @__PURE__ */ u(Wo, { className: p }) : qe(C) ? /* @__PURE__ */ u(oc, { className: p }) : Zn(C) ? /* @__PURE__ */ u(ic, { className: p }) : Fo(C) ? /* @__PURE__ */ u(rc, { className: p }) : null : null,
7061
7061
  [o]
7062
- ), b = P(
7062
+ ), k = P(
7063
7063
  (C) => qe(C) ? i || "Data Grid" : C.title,
7064
7064
  [i]
7065
7065
  );
7066
- return _(() => {
7066
+ return R(() => {
7067
7067
  if (v && sn(e)) {
7068
7068
  const { title: C, description: p } = Ge(
7069
7069
  oe.CHARTS,
@@ -7071,7 +7071,7 @@ const qa = ({ attachment: e, className: n = "" }) => {
7071
7071
  );
7072
7072
  c(C), d(p);
7073
7073
  }
7074
- }, [e, s, v]), _(() => {
7074
+ }, [e, s, v]), R(() => {
7075
7075
  var C;
7076
7076
  if (sn(e) && v) {
7077
7077
  const p = (g == null ? void 0 : g.lastDisplayedElement) === oe.CHARTS;
@@ -7097,7 +7097,7 @@ const qa = ({ attachment: e, className: n = "" }) => {
7097
7097
  onClick: () => r(n),
7098
7098
  children: [
7099
7099
  m(e, "w-4 h-4"),
7100
- /* @__PURE__ */ u("h4", { className: "truncate max-w-[130px]", title: b(e), children: b(e) }),
7100
+ /* @__PURE__ */ u("h4", { className: "truncate max-w-[130px]", title: k(e), children: k(e) }),
7101
7101
  f && /* @__PURE__ */ u(
7102
7102
  Fe,
7103
7103
  {
@@ -7173,7 +7173,7 @@ const qa = ({ attachment: e, className: n = "" }) => {
7173
7173
  /* @__PURE__ */ u("h5", { className: "font-bold", children: n.value })
7174
7174
  ] }, n.title)) }), dc = ({ titles: e, chart: n, isOpen: t, onClose: r }) => {
7175
7175
  const [o, i] = D(ne.Closed);
7176
- _(() => {
7176
+ R(() => {
7177
7177
  i(t ? ne.Opened : ne.Closed);
7178
7178
  }, [t]);
7179
7179
  const s = P(() => {
@@ -7212,15 +7212,15 @@ const qa = ({ attachment: e, className: n = "" }) => {
7212
7212
  }, []), v = P(() => {
7213
7213
  t(!1), w(!0);
7214
7214
  }, []);
7215
- return _(() => {
7215
+ return R(() => {
7216
7216
  if (d) {
7217
- const { title: b, description: C } = Ge(
7217
+ const { title: k, description: C } = Ge(
7218
7218
  oe.CHART_PER_SERIES,
7219
7219
  e.titles
7220
7220
  );
7221
- i(b), h(C);
7221
+ i(k), h(C);
7222
7222
  }
7223
- }, [e.titles, d]), _(() => {
7223
+ }, [e.titles, d]), R(() => {
7224
7224
  d && c(
7225
7225
  (a == null ? void 0 : a.lastDisplayedElement) === oe.CHART_PER_SERIES && e.node.rowIndex === 0
7226
7226
  );
@@ -7354,7 +7354,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7354
7354
  showLimitMessage: r
7355
7355
  }) => {
7356
7356
  const [o, i] = D(!1), [s, h] = D([]), [l, c] = D(), [a, d] = D(400);
7357
- _(() => {
7357
+ R(() => {
7358
7358
  e.url != null && (i(!0), n.getFile(e.url).then((w) => {
7359
7359
  if (w == null) {
7360
7360
  h([]), c([]), i(!1);
@@ -7363,7 +7363,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7363
7363
  const { columns: g, data: v } = mc(w);
7364
7364
  h(v), c(g), i(!1);
7365
7365
  }));
7366
- }, [e.url, n]), _(() => {
7366
+ }, [e.url, n]), R(() => {
7367
7367
  s ? (d(Uo(s.length)), r == null || r(s.length >= Qe)) : r == null || r(!1);
7368
7368
  }, [s, r]);
7369
7369
  const f = ue(
@@ -7447,7 +7447,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7447
7447
  },
7448
7448
  [r, n]
7449
7449
  );
7450
- return _(() => {
7450
+ return R(() => {
7451
7451
  var d, f;
7452
7452
  l != null && l.current && h(
7453
7453
  ((d = l == null ? void 0 : l.current) == null ? void 0 : d.scrollHeight) > ((f = l == null ? void 0 : l.current) == null ? void 0 : f.offsetHeight)
@@ -7508,7 +7508,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7508
7508
  locale: i
7509
7509
  }) => {
7510
7510
  const [s, h] = D(ne.Closed);
7511
- _(() => {
7511
+ R(() => {
7512
7512
  h(t ? ne.Opened : ne.Closed);
7513
7513
  }, [t]);
7514
7514
  const l = P(() => {
@@ -7609,15 +7609,15 @@ const Wn = ["index", "value"], mc = (e) => ({
7609
7609
  return ((a = l == null ? void 0 : l.values) == null ? void 0 : a.length) > 0 ? { ...l } : { ...l, values: [{ value: n == null ? void 0 : n[c] }] };
7610
7610
  }) : t;
7611
7611
  }, Ec = (e, n, t) => (e == null ? void 0 : e.map((r) => {
7612
- var d, f, w, g, v, m, b, C;
7613
- const o = r == null ? void 0 : r.id, i = ((f = (d = r == null ? void 0 : r.values) == null ? void 0 : d[0]) == null ? void 0 : f.value) || ((g = (w = r == null ? void 0 : r.values) == null ? void 0 : w[0]) == null ? void 0 : g.id), s = (m = (v = r == null ? void 0 : r.values) == null ? void 0 : v[0]) == null ? void 0 : m.ids, h = n == null ? void 0 : n.get(o), l = (b = h == null ? void 0 : h.codes) != null && b.length ? h : void 0, c = fe(
7612
+ var d, f, w, g, v, m, k, C;
7613
+ const o = r == null ? void 0 : r.id, i = ((f = (d = r == null ? void 0 : r.values) == null ? void 0 : d[0]) == null ? void 0 : f.value) || ((g = (w = r == null ? void 0 : r.values) == null ? void 0 : w[0]) == null ? void 0 : g.id), s = (m = (v = r == null ? void 0 : r.values) == null ? void 0 : v[0]) == null ? void 0 : m.ids, h = n == null ? void 0 : n.get(o), l = (k = h == null ? void 0 : h.codes) != null && k.length ? h : void 0, c = fe(
7614
7614
  (C = l == null ? void 0 : l.codes) == null ? void 0 : C.find((p) => (p == null ? void 0 : p.id) === i),
7615
7615
  t
7616
7616
  ) || i, a = s && s.map(
7617
7617
  (p) => {
7618
7618
  var y;
7619
7619
  return fe(
7620
- (y = l == null ? void 0 : l.codes) == null ? void 0 : y.find((k) => (k == null ? void 0 : k.id) === p),
7620
+ (y = l == null ? void 0 : l.codes) == null ? void 0 : y.find((b) => (b == null ? void 0 : b.id) === p),
7621
7621
  t
7622
7622
  ) || p;
7623
7623
  }
@@ -7711,9 +7711,9 @@ const Wn = ["index", "value"], mc = (e) => ({
7711
7711
  id: d == null ? void 0 : d.id,
7712
7712
  title: fe(g, o),
7713
7713
  value: Array.isArray(v) ? v == null ? void 0 : v.map(
7714
- (b) => Qo(
7714
+ (k) => Qo(
7715
7715
  d == null ? void 0 : d.id,
7716
- b,
7716
+ k,
7717
7717
  t
7718
7718
  ) || ""
7719
7719
  ) : v,
@@ -7731,10 +7731,10 @@ const Wn = ["index", "value"], mc = (e) => ({
7731
7731
  [e == null ? void 0 : e.dataSetData]
7732
7732
  ), v = ue(
7733
7733
  () => {
7734
- var k, x, R, S, L, N;
7734
+ var b, x, _, S, L, N;
7735
7735
  return [
7736
7736
  Dn(
7737
- (x = (k = e == null ? void 0 : e.dataSetData) == null ? void 0 : k.dataflows) == null ? void 0 : x[0],
7737
+ (x = (b = e == null ? void 0 : e.dataSetData) == null ? void 0 : b.dataflows) == null ? void 0 : x[0],
7738
7738
  e == null ? void 0 : e.locale,
7739
7739
  e.titles
7740
7740
  ),
@@ -7750,7 +7750,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7750
7750
  ),
7751
7751
  ...Rc(
7752
7752
  e == null ? void 0 : e.attributesData,
7753
- (S = (R = e == null ? void 0 : e.dataSetData) == null ? void 0 : R.dataStructures) == null ? void 0 : S[0],
7753
+ (S = (_ = e == null ? void 0 : e.dataSetData) == null ? void 0 : _.dataStructures) == null ? void 0 : S[0],
7754
7754
  g,
7755
7755
  (N = (L = e == null ? void 0 : e.data) == null ? void 0 : L.originalData) == null ? void 0 : N.parsedTimeSeriesValue,
7756
7756
  e == null ? void 0 : e.locale
@@ -7768,23 +7768,23 @@ const Wn = ["index", "value"], mc = (e) => ({
7768
7768
  e == null ? void 0 : e.data
7769
7769
  ),
7770
7770
  [e]
7771
- ), b = P(() => {
7771
+ ), k = P(() => {
7772
7772
  t(!0);
7773
7773
  }, []), C = P(() => {
7774
7774
  t(!1), w(!0);
7775
7775
  }, []);
7776
- return _(() => {
7776
+ return R(() => {
7777
7777
  if (d) {
7778
- const { title: k, description: x } = Ge(
7778
+ const { title: b, description: x } = Ge(
7779
7779
  oe.METADATA_PER_SERIES,
7780
7780
  e.titles
7781
7781
  );
7782
- i(k), h(x);
7782
+ i(b), h(x);
7783
7783
  }
7784
- }, [e.titles, d]), _(() => {
7784
+ }, [e.titles, d]), R(() => {
7785
7785
  if (d) {
7786
- const k = (a == null ? void 0 : a.lastDisplayedElement) === oe.METADATA_PER_SERIES && e.node.rowIndex === 0;
7787
- c(k), k && setTimeout(() => {
7786
+ const b = (a == null ? void 0 : a.lastDisplayedElement) === oe.METADATA_PER_SERIES && e.node.rowIndex === 0;
7787
+ c(b), b && setTimeout(() => {
7788
7788
  var x;
7789
7789
  (x = r == null ? void 0 : r.current) == null || x.scrollIntoView({
7790
7790
  block: "end",
@@ -7803,7 +7803,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7803
7803
  title: ((p = e.titles) == null ? void 0 : p.metadata) || "View details",
7804
7804
  buttonClassName: "!text-neutrals-1000 !border-none !p-1",
7805
7805
  icon: /* @__PURE__ */ u(Yo, { className: "w-5 h-5" }),
7806
- onClick: b
7806
+ onClick: k
7807
7807
  }
7808
7808
  ) }),
7809
7809
  l && /* @__PURE__ */ u(
@@ -7812,7 +7812,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7812
7812
  reference: r,
7813
7813
  title: o,
7814
7814
  description: s,
7815
- onReferenceClick: b,
7815
+ onReferenceClick: k,
7816
7816
  shouldCloseTooltip: f
7817
7817
  }
7818
7818
  ),
@@ -7916,27 +7916,27 @@ const Wn = ["index", "value"], mc = (e) => ({
7916
7916
  titles: o,
7917
7917
  showLimitMessage: i
7918
7918
  }) => {
7919
- const [s, h] = D(!1), [l, c] = D([]), [a, d] = D(), [f, w] = D(400), g = ae(null), [v, m] = D(""), [b, C] = D(""), [p, y] = D(!1), { isShowOnboarding: k, onboardingFileSchema: x, setOnboardingFileSchema: R } = Ne();
7920
- _(() => {
7919
+ const [s, h] = D(!1), [l, c] = D([]), [a, d] = D(), [f, w] = D(400), g = ae(null), [v, m] = D(""), [k, C] = D(""), [p, y] = D(!1), { isShowOnboarding: b, onboardingFileSchema: x, setOnboardingFileSchema: _ } = Ne();
7920
+ R(() => {
7921
7921
  if (e.grid_data == null)
7922
7922
  h(!0);
7923
7923
  else {
7924
7924
  const L = e.grid_data.columns.map((N) => N.colId === pn ? { ...N, hide: !t } : N);
7925
7925
  c(e.grid_data.data), d(L), h(!1);
7926
7926
  }
7927
- }, [e.grid_data, t]), _(() => {
7927
+ }, [e.grid_data, t]), R(() => {
7928
7928
  l ? (w(Uo(l.length)), i == null || i(l.length >= Qe)) : i == null || i(!1);
7929
- }, [l, i]), _(() => {
7930
- if (k) {
7929
+ }, [l, i]), R(() => {
7930
+ if (b) {
7931
7931
  const { title: L, description: N } = Ge(
7932
7932
  oe.DATA_GRID,
7933
7933
  o
7934
7934
  );
7935
7935
  m(L), C(N);
7936
7936
  }
7937
- }, [o, k]), _(() => {
7937
+ }, [o, b]), R(() => {
7938
7938
  var L;
7939
- x && !((L = x == null ? void 0 : x.infoElements) != null && L.dataGrid) && (R == null || R({
7939
+ x && !((L = x == null ? void 0 : x.infoElements) != null && L.dataGrid) && (_ == null || _({
7940
7940
  ...x,
7941
7941
  infoElements: {
7942
7942
  ...x == null ? void 0 : x.infoElements,
@@ -7944,8 +7944,8 @@ const Wn = ["index", "value"], mc = (e) => ({
7944
7944
  },
7945
7945
  lastDisplayedElement: oe.DATA_GRID
7946
7946
  }));
7947
- }, [x, R]), _(() => {
7948
- if (k) {
7947
+ }, [x, _]), R(() => {
7948
+ if (b) {
7949
7949
  const L = (x == null ? void 0 : x.lastDisplayedElement) === oe.DATA_GRID;
7950
7950
  y(L), !s && !n && L && setTimeout(() => {
7951
7951
  var N;
@@ -7957,7 +7957,7 @@ const Wn = ["index", "value"], mc = (e) => ({
7957
7957
  }
7958
7958
  }, [
7959
7959
  x == null ? void 0 : x.lastDisplayedElement,
7960
- k,
7960
+ b,
7961
7961
  n,
7962
7962
  s
7963
7963
  ]);
@@ -8000,7 +8000,7 @@ const Wn = ["index", "value"], mc = (e) => ({
8000
8000
  {
8001
8001
  reference: g,
8002
8002
  title: v,
8003
- description: b,
8003
+ description: k,
8004
8004
  supressReferenceClick: !0
8005
8005
  }
8006
8006
  )
@@ -8014,7 +8014,7 @@ const Wn = ["index", "value"], mc = (e) => ({
8014
8014
  onNext: i
8015
8015
  }) => {
8016
8016
  const s = ae(null), [h, l] = D(""), [c, a] = D(""), [d, f] = D(!1), { onboardingFileSchema: w, isShowOnboarding: g } = Ne();
8017
- _(() => {
8017
+ R(() => {
8018
8018
  if (g) {
8019
8019
  const { title: C, description: p } = Ge(
8020
8020
  oe.CHARTS_NAVIGATION,
@@ -8022,7 +8022,7 @@ const Wn = ["index", "value"], mc = (e) => ({
8022
8022
  );
8023
8023
  l(C), a(p);
8024
8024
  }
8025
- }, [r, g]), _(() => {
8025
+ }, [r, g]), R(() => {
8026
8026
  var C;
8027
8027
  if (g) {
8028
8028
  const p = (w == null ? void 0 : w.lastDisplayedElement) === oe.CHARTS_NAVIGATION;
@@ -8032,7 +8032,7 @@ const Wn = ["index", "value"], mc = (e) => ({
8032
8032
  }));
8033
8033
  }
8034
8034
  }, [w == null ? void 0 : w.lastDisplayedElement, g]);
8035
- const v = n > 0 ? e / n * 100 : 0, m = n > 0 ? Math.min(Gc * n, Hc) : 0, b = n > 0 ? Math.max(m / n, Fc) : 0;
8035
+ const v = n > 0 ? e / n * 100 : 0, m = n > 0 ? Math.min(Gc * n, Hc) : 0, k = n > 0 ? Math.max(m / n, Fc) : 0;
8036
8036
  return /* @__PURE__ */ A("div", { className: "w-full flex flex-row items-center gap-2 justify-center", children: [
8037
8037
  /* @__PURE__ */ u(
8038
8038
  "div",
@@ -8059,7 +8059,7 @@ const Wn = ["index", "value"], mc = (e) => ({
8059
8059
  className: "h-full rounded-full bg-primary absolute",
8060
8060
  style: {
8061
8061
  left: `${v}%`,
8062
- width: `${b}px`
8062
+ width: `${k}px`
8063
8063
  }
8064
8064
  }
8065
8065
  )
@@ -8173,21 +8173,21 @@ function zc(e, n, t) {
8173
8173
  }
8174
8174
  const $c = ({ option: e, style: n }) => {
8175
8175
  const t = ae(null), [r, o] = D(e);
8176
- _(() => {
8176
+ R(() => {
8177
8177
  o(ml(e));
8178
8178
  }, [e]);
8179
8179
  const i = P(() => {
8180
- var b, C, p, y, k;
8181
- const s = (C = (b = t.current) == null ? void 0 : b.getEchartsInstance) == null ? void 0 : C.call(b);
8180
+ var k, C, p, y, b;
8181
+ const s = (C = (k = t.current) == null ? void 0 : k.getEchartsInstance) == null ? void 0 : C.call(k);
8182
8182
  if (!s) return;
8183
8183
  const l = s.getDom().clientWidth, c = e.legend || {}, a = c.itemHeight ?? 14, d = ((p = c.textStyle) == null ? void 0 : p.fontSize) ?? 12, f = (
8184
8184
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8185
- ((k = (y = s.getModel()) == null ? void 0 : y.getComponent("legend")) == null ? void 0 : k.getData()) || []
8185
+ ((b = (y = s.getModel()) == null ? void 0 : y.getComponent("legend")) == null ? void 0 : b.getData()) || []
8186
8186
  );
8187
8187
  let w = 0;
8188
8188
  f.forEach((x) => {
8189
- const R = x.option.name || "";
8190
- w += zc(s, R, c);
8189
+ const _ = x.option.name || "";
8190
+ w += zc(s, _, c);
8191
8191
  });
8192
8192
  const v = Math.max(1, Math.ceil(w / l)) * (+a + +d + 6), m = 20;
8193
8193
  o((x) => ({
@@ -8198,7 +8198,7 @@ const $c = ({ option: e, style: n }) => {
8198
8198
  }
8199
8199
  }));
8200
8200
  }, [e.legend]);
8201
- return _(() => {
8201
+ return R(() => {
8202
8202
  i();
8203
8203
  const s = () => {
8204
8204
  i();
@@ -8226,20 +8226,20 @@ const $c = ({ option: e, style: n }) => {
8226
8226
  }) => {
8227
8227
  const [s, h] = D(!0), [l, c] = D([]), [a, d] = D(0), [f, w] = D(
8228
8228
  void 0
8229
- ), { onboardingFileSchema: g, isShowOnboarding: v, setOnboardingFileSchema: m } = Ne(), b = ae(null);
8230
- _(() => {
8229
+ ), { onboardingFileSchema: g, isShowOnboarding: v, setOnboardingFileSchema: m } = Ne(), k = ae(null);
8230
+ R(() => {
8231
8231
  var y;
8232
8232
  h(e.charting_data == null), c(((y = e.charting_data) == null ? void 0 : y.units) || []);
8233
- }, [e.charting_data]), _(() => {
8233
+ }, [e.charting_data]), R(() => {
8234
8234
  const y = (l == null ? void 0 : l.length) >= a;
8235
8235
  w(
8236
8236
  !s && y ? l[a] : l[0]
8237
8237
  ), y || d(0);
8238
- }, [s, l, a]), _(() => {
8238
+ }, [s, l, a]), R(() => {
8239
8239
  var y;
8240
8240
  g && v && !s && (Pa(g) && (m == null || m(
8241
8241
  Ia(g)
8242
- ), (y = b == null ? void 0 : b.current) == null || y.scrollIntoView({
8242
+ ), (y = k == null ? void 0 : k.current) == null || y.scrollIntoView({
8243
8243
  block: "center",
8244
8244
  behavior: "smooth"
8245
8245
  })), g.lastDisplayedElement === oe.CHART_PER_SERIES && (m == null || m(
@@ -8256,7 +8256,7 @@ const $c = ({ option: e, style: n }) => {
8256
8256
  }, [l]), p = P(() => {
8257
8257
  d((y) => Math.max(y - 1, 0));
8258
8258
  }, []);
8259
- return s || t ? /* @__PURE__ */ u(ye, {}) : /* @__PURE__ */ u("div", { className: "chart-attachment w-full h-full", ref: b, children: e.charting_data && /* @__PURE__ */ u("div", { className: "flex flex-col w-full h-full gap-4", children: l.length == 0 || f == null ? /* @__PURE__ */ u("h4", { className: "ml-1", children: (i == null ? void 0 : i.chartInfo) || "No data" }) : /* @__PURE__ */ A(te, { children: [
8259
+ return s || t ? /* @__PURE__ */ u(ye, {}) : /* @__PURE__ */ u("div", { className: "chart-attachment w-full h-full", ref: k, children: e.charting_data && /* @__PURE__ */ u("div", { className: "flex flex-col w-full h-full gap-4", children: l.length == 0 || f == null ? /* @__PURE__ */ u("h4", { className: "ml-1", children: (i == null ? void 0 : i.chartInfo) || "No data" }) : /* @__PURE__ */ A(te, { children: [
8260
8260
  /* @__PURE__ */ A("div", { className: "flex flex-col gap-1", children: [
8261
8261
  /* @__PURE__ */ A("h3", { className: "chart-attachment-title", children: [
8262
8262
  (i == null ? void 0 : i.chart) || "Chart",
@@ -8385,8 +8385,8 @@ const $c = ({ option: e, style: n }) => {
8385
8385
  showLimitMessage: w,
8386
8386
  externalLink: g
8387
8387
  }) => {
8388
- const v = Yc(d), [m, b] = D(Sr[0]), [C, p] = D(v[0]), [y, k] = D(!0), x = P(() => {
8389
- const R = Kc(
8388
+ const v = Yc(d), [m, k] = D(Sr[0]), [C, p] = D(v[0]), [y, b] = D(!0), x = P(() => {
8389
+ const _ = Kc(
8390
8390
  s,
8391
8391
  n,
8392
8392
  l,
@@ -8397,7 +8397,7 @@ const $c = ({ option: e, style: n }) => {
8397
8397
  N,
8398
8398
  h,
8399
8399
  L,
8400
- R,
8400
+ _,
8401
8401
  T,
8402
8402
  y
8403
8403
  ), i();
@@ -8452,7 +8452,7 @@ const $c = ({ option: e, style: n }) => {
8452
8452
  {
8453
8453
  title: (d == null ? void 0 : d.dataFormat) || "Data Format",
8454
8454
  selectedValue: m,
8455
- setSelectedValue: b,
8455
+ setSelectedValue: k,
8456
8456
  items: Sr,
8457
8457
  infoMessage: /* @__PURE__ */ u(
8458
8458
  xi,
@@ -8489,7 +8489,7 @@ const $c = ({ option: e, style: n }) => {
8489
8489
  height: 24,
8490
8490
  className: "text-primary",
8491
8491
  onClick: () => {
8492
- k(!y);
8492
+ b(!y);
8493
8493
  }
8494
8494
  }
8495
8495
  ) : /* @__PURE__ */ u(
@@ -8499,7 +8499,7 @@ const $c = ({ option: e, style: n }) => {
8499
8499
  height: 24,
8500
8500
  className: "text-neutrals-500",
8501
8501
  onClick: () => {
8502
- k(!y);
8502
+ b(!y);
8503
8503
  }
8504
8504
  }
8505
8505
  ),
@@ -8553,37 +8553,37 @@ const $c = ({ option: e, style: n }) => {
8553
8553
  onOpenAdvancedView: s,
8554
8554
  titles: h
8555
8555
  }) => {
8556
- const { isOpenedAdvancedView: l } = We(), [c, a] = D(), d = ae(null), [f, w] = D(""), [g, v] = D(""), [m, b] = D(!1), { onboardingFileSchema: C, isShowOnboarding: p } = Ne();
8557
- _(() => {
8556
+ const { isOpenedAdvancedView: l } = We(), [c, a] = D(), d = ae(null), [f, w] = D(""), [g, v] = D(""), [m, k] = D(!1), { onboardingFileSchema: C, isShowOnboarding: p } = Ne();
8557
+ R(() => {
8558
8558
  if (p) {
8559
- const { title: k, description: x } = Ge(
8559
+ const { title: b, description: x } = Ge(
8560
8560
  oe.OPEN_ADVANCED_VIEW,
8561
8561
  h
8562
8562
  );
8563
- w(k), v(x);
8563
+ w(b), v(x);
8564
8564
  }
8565
- }, [h, p]), _(() => {
8566
- var k;
8565
+ }, [h, p]), R(() => {
8566
+ var b;
8567
8567
  if (p) {
8568
8568
  const x = (C == null ? void 0 : C.lastDisplayedElement) === oe.OPEN_ADVANCED_VIEW;
8569
- b(x), x && ((k = d == null ? void 0 : d.current) == null || k.scrollIntoView({
8569
+ k(x), x && ((b = d == null ? void 0 : d.current) == null || b.scrollIntoView({
8570
8570
  block: "center",
8571
8571
  behavior: "smooth"
8572
8572
  }));
8573
8573
  }
8574
- }, [C == null ? void 0 : C.lastDisplayedElement, p]), _(() => {
8574
+ }, [C == null ? void 0 : C.lastDisplayedElement, p]), R(() => {
8575
8575
  if (!o && !c && (e != null && e[0])) {
8576
- const k = wn(
8576
+ const b = wn(
8577
8577
  e[0].id,
8578
8578
  e[0].version,
8579
8579
  e[0].agencyID
8580
8580
  );
8581
- a(k), i == null || i(k);
8581
+ a(b), i == null || i(b);
8582
8582
  } else o && o !== c && (a(o), i == null || i(o));
8583
8583
  }, [e, i, o, c]);
8584
8584
  const y = P(
8585
- (k) => {
8586
- a(k), i == null || i(k);
8585
+ (b) => {
8586
+ a(b), i == null || i(b);
8587
8587
  },
8588
8588
  [i]
8589
8589
  );
@@ -8595,22 +8595,22 @@ const $c = ({ option: e, style: n }) => {
8595
8595
  t && l && "hide-advance-button"
8596
8596
  ),
8597
8597
  children: [
8598
- /* @__PURE__ */ u("div", { className: "flex items-center w-full overflow-y-auto gap-4 sm:w-[calc(100%-30px)]", children: e == null ? void 0 : e.map((k) => /* @__PURE__ */ u(
8598
+ /* @__PURE__ */ u("div", { className: "flex items-center w-full overflow-y-auto gap-4 sm:w-[calc(100%-30px)]", children: e == null ? void 0 : e.map((b) => /* @__PURE__ */ u(
8599
8599
  Xc,
8600
8600
  {
8601
- id: k == null ? void 0 : k.id,
8602
- title: fe(k, n || Be.EN),
8603
- version: k == null ? void 0 : k.version,
8604
- agency: k == null ? void 0 : k.agencyID,
8601
+ id: b == null ? void 0 : b.id,
8602
+ title: fe(b, n || Be.EN),
8603
+ version: b == null ? void 0 : b.version,
8604
+ agency: b == null ? void 0 : b.agencyID,
8605
8605
  isActive: (e == null ? void 0 : e.length) > 1 && c === wn(
8606
- k == null ? void 0 : k.id,
8607
- k == null ? void 0 : k.version,
8608
- k == null ? void 0 : k.agencyID
8606
+ b == null ? void 0 : b.id,
8607
+ b == null ? void 0 : b.version,
8608
+ b == null ? void 0 : b.agencyID
8609
8609
  ),
8610
8610
  isSingleTab: (e == null ? void 0 : e.length) === 1,
8611
8611
  onSelectDataset: y
8612
8612
  },
8613
- k == null ? void 0 : k.id
8613
+ b == null ? void 0 : b.id
8614
8614
  )) }),
8615
8615
  !t && /* @__PURE__ */ u("div", { ref: d, children: /* @__PURE__ */ u(
8616
8616
  Ve,
@@ -8737,17 +8737,17 @@ const ti = ({
8737
8737
  isDataSetAttachments: g,
8738
8738
  locale: v,
8739
8739
  dimensions: m,
8740
- filters: b,
8740
+ filters: k,
8741
8741
  selectDataset: C,
8742
8742
  onAdvancedViewOpen: p,
8743
8743
  limitMessages: y,
8744
- attachmentsConfig: k
8744
+ attachmentsConfig: b
8745
8745
  }) => {
8746
- const [x, R] = D(0), [S, L] = D(null), { isOpenedAdvancedView: N, setIsOpenedAdvancedView: T } = We(), [O, B] = D(ne.Closed), [J, F] = D(!1), [I, z] = D(), [W, j] = D(), [K, Y] = D(!1), Z = {
8746
+ const [x, _] = D(0), [S, L] = D(null), { isOpenedAdvancedView: N, setIsOpenedAdvancedView: T } = We(), [O, B] = D(ne.Closed), [J, F] = D(!1), [I, z] = D(), [W, j] = D(), [K, Y] = D(!1), Z = {
8747
8747
  downloadDataSet: n.downloadDataSet,
8748
8748
  getConstraints: n.getConstraints
8749
8749
  }, ie = fn.DATA_IN_TABLE, we = (Ae) => {
8750
- R(Ae);
8750
+ _(Ae);
8751
8751
  }, de = P(() => {
8752
8752
  p == null || p(), T(!0), n.updateCurrentDataQuery(l || (c == null ? void 0 : c[0])), n.updateDataQueries(c), n.updateDatasets(d);
8753
8753
  }, [
@@ -8758,18 +8758,18 @@ const ti = ({
8758
8758
  T,
8759
8759
  p
8760
8760
  ]);
8761
- _(() => {
8761
+ R(() => {
8762
8762
  L(e[x] || null);
8763
- }, [e, x]), _(() => {
8763
+ }, [e, x]), R(() => {
8764
8764
  F(
8765
8765
  g && (d == null || (d == null ? void 0 : d.length) == 0)
8766
8766
  );
8767
8767
  }, [d, g]);
8768
8768
  const me = P(() => {
8769
8769
  B(ne.Closed);
8770
- }, [B]), ce = k == null ? void 0 : k.isExternaLinkIncludeFilters, ge = ni(
8770
+ }, [B]), ce = b == null ? void 0 : b.isExternaLinkIncludeFilters, ge = ni(
8771
8771
  ce,
8772
- b,
8772
+ k,
8773
8773
  l || (c == null ? void 0 : c[0]),
8774
8774
  m
8775
8775
  );
@@ -8924,7 +8924,7 @@ const ti = ({
8924
8924
  locale: v,
8925
8925
  type: ie,
8926
8926
  dimensions: m,
8927
- filters: b,
8927
+ filters: k,
8928
8928
  urn: l == null ? void 0 : l.urn,
8929
8929
  datasetIcon: o == null ? void 0 : o.datasetIcon,
8930
8930
  isDisplayDatasetIcon: o == null ? void 0 : o.isDisplayDatasetIcon,
@@ -8970,7 +8970,7 @@ const ti = ({
8970
8970
  const v = {
8971
8971
  getConstraints: n.getConstraints
8972
8972
  };
8973
- return _(() => {
8973
+ return R(() => {
8974
8974
  l || c == null || c(!1);
8975
8975
  }, [l, c]), /* @__PURE__ */ u("div", { className: "bg-white rounded h-full min-h-0", children: /* @__PURE__ */ A("div", { className: "flex flex-col gap-4 h-full overflow-x-hidden", children: [
8976
8976
  /* @__PURE__ */ A("div", { className: "data-details-header flex justify-between items-center", children: [
@@ -9704,11 +9704,11 @@ const Us = ({
9704
9704
  infoSegmentHeaderClassName: v,
9705
9705
  nameAndMetadataContainerClassName: m
9706
9706
  }) => {
9707
- const [b, C] = D(""), [p, y] = D(!1), k = ae(null), [x, R] = D(""), [S, L] = D(""), [N, T] = D(!1), { onboardingFileSchema: O, isShowOnboarding: B } = Ne(), [J, F] = D(!1), I = ue(
9708
- () => i != null && i.isMetadataDescription ? xc(t, b, s, h) : [],
9707
+ const [k, C] = D(""), [p, y] = D(!1), b = ae(null), [x, _] = D(""), [S, L] = D(""), [N, T] = D(!1), { onboardingFileSchema: O, isShowOnboarding: B } = Ne(), [J, F] = D(!1), I = ue(
9708
+ () => i != null && i.isMetadataDescription ? xc(t, k, s, h) : [],
9709
9709
  [
9710
9710
  t,
9711
- b,
9711
+ k,
9712
9712
  s,
9713
9713
  i == null ? void 0 : i.isMetadataDescription,
9714
9714
  h
@@ -9735,18 +9735,18 @@ const Us = ({
9735
9735
  }, []), j = P(() => {
9736
9736
  y(!1), F(!0);
9737
9737
  }, []);
9738
- _(() => {
9738
+ R(() => {
9739
9739
  const Z = l && l(z) || Js(Zi(t), s);
9740
9740
  C(Z);
9741
- }, [t, s, z, l]), _(() => {
9741
+ }, [t, s, z, l]), R(() => {
9742
9742
  if (B) {
9743
9743
  const { title: Y, description: Z } = Ge(
9744
9744
  oe.METADATA_PER_DATASET,
9745
9745
  h
9746
9746
  );
9747
- R(Y), L(Z);
9747
+ _(Y), L(Z);
9748
9748
  }
9749
- }, [h, B]), _(() => {
9749
+ }, [h, B]), R(() => {
9750
9750
  B && T(
9751
9751
  (O == null ? void 0 : O.lastDisplayedElement) === oe.METADATA_PER_DATASET
9752
9752
  );
@@ -9790,7 +9790,7 @@ const Us = ({
9790
9790
  m
9791
9791
  ),
9792
9792
  children: [
9793
- /* @__PURE__ */ u("div", { ref: k, children: /* @__PURE__ */ u(
9793
+ /* @__PURE__ */ u("div", { ref: b, children: /* @__PURE__ */ u(
9794
9794
  Ve,
9795
9795
  {
9796
9796
  title: (h == null ? void 0 : h.metadata) ?? "View details",
@@ -9829,14 +9829,14 @@ const Us = ({
9829
9829
  ] }),
9830
9830
  K(
9831
9831
  (h == null ? void 0 : h.lastUpdated) ?? "Last updated",
9832
- b
9832
+ k
9833
9833
  )
9834
9834
  ] })
9835
9835
  ] }),
9836
9836
  N && /* @__PURE__ */ u(
9837
9837
  Fe,
9838
9838
  {
9839
- reference: k,
9839
+ reference: b,
9840
9840
  title: x,
9841
9841
  description: S,
9842
9842
  onReferenceClick: W,
@@ -9862,7 +9862,7 @@ const Us = ({
9862
9862
  shareConversationProps: r
9863
9863
  }) => {
9864
9864
  const { setIsOpenedAdvancedView: o } = We(), i = ae(null), [s, h] = D(""), [l, c] = D(""), [a, d] = D(!1), { onboardingFileSchema: f, isShowOnboarding: w } = Ne();
9865
- return _(() => {
9865
+ return R(() => {
9866
9866
  if (w) {
9867
9867
  const { title: g, description: v } = Ge(
9868
9868
  oe.EXIT_ADVANCED_VIEW,
@@ -9870,7 +9870,7 @@ const Us = ({
9870
9870
  );
9871
9871
  h(g), c(v);
9872
9872
  }
9873
- }, [e, w]), _(() => {
9873
+ }, [e, w]), R(() => {
9874
9874
  w && d(
9875
9875
  (f == null ? void 0 : f.lastDisplayedElement) === oe.EXIT_ADVANCED_VIEW
9876
9876
  );
@@ -10392,10 +10392,10 @@ function hi(e, n, t, r, o, i, s) {
10392
10392
  const [h, l] = D(), [c, a] = D(), [d, f] = D(), [w, g] = D(), [v, m] = D({
10393
10393
  title: (s == null ? void 0 : s.dataGrid) || "Data Grid",
10394
10394
  type: Te.CUSTOM_DATA_GRID
10395
- }), [b, C] = D({
10395
+ }), [k, C] = D({
10396
10396
  title: (s == null ? void 0 : s.chart) || "Chart",
10397
10397
  type: Te.CUSTOM_CHART
10398
- }), [p, y] = D([]), [k, x] = D([]), [R, S] = D(!1), [L, N] = D({
10398
+ }), [p, y] = D([]), [b, x] = D([]), [_, S] = D(!1), [L, N] = D({
10399
10399
  startPeriod: null,
10400
10400
  endPeriod: null
10401
10401
  }), T = P(
@@ -10438,7 +10438,7 @@ function hi(e, n, t, r, o, i, s) {
10438
10438
  },
10439
10439
  [e]
10440
10440
  );
10441
- _(() => {
10441
+ R(() => {
10442
10442
  async function F(I) {
10443
10443
  S(!0);
10444
10444
  try {
@@ -10469,7 +10469,7 @@ function hi(e, n, t, r, o, i, s) {
10469
10469
  },
10470
10470
  [e, t]
10471
10471
  );
10472
- _(() => {
10472
+ R(() => {
10473
10473
  var F, I, z;
10474
10474
  if (w != null && h != null && (d != null && d.length)) {
10475
10475
  const W = (z = (I = (F = w.dataflows) == null ? void 0 : F[0]) == null ? void 0 : I.names) == null ? void 0 : z[n], j = Nd(
@@ -10503,7 +10503,7 @@ function hi(e, n, t, r, o, i, s) {
10503
10503
  d,
10504
10504
  L,
10505
10505
  e == null ? void 0 : e.putOnboardingFile
10506
- ]), _(() => {
10506
+ ]), R(() => {
10507
10507
  w != null && h != null && C((F) => {
10508
10508
  const I = gd(
10509
10509
  w,
@@ -10519,18 +10519,18 @@ function hi(e, n, t, r, o, i, s) {
10519
10519
  });
10520
10520
  }, [w, h, t, n, o]);
10521
10521
  const J = ue(
10522
- () => [v, b],
10523
- [v, b]
10522
+ () => [v, k],
10523
+ [v, k]
10524
10524
  );
10525
10525
  return {
10526
10526
  dataMessage: h,
10527
10527
  structures: w,
10528
10528
  dataset: c,
10529
10529
  dimensions: p,
10530
- structureDimensions: k,
10530
+ structureDimensions: b,
10531
10531
  onFiltersChange: B,
10532
10532
  constraints: d,
10533
- isLoadingGridData: R,
10533
+ isLoadingGridData: _,
10534
10534
  dataSetAttachments: J
10535
10535
  };
10536
10536
  }
@@ -10555,7 +10555,7 @@ const vu = ({
10555
10555
  dimensions: g,
10556
10556
  structureDimensions: v,
10557
10557
  structures: m,
10558
- dataSetAttachments: b,
10558
+ dataSetAttachments: k,
10559
10559
  onFiltersChange: C,
10560
10560
  isLoadingGridData: p,
10561
10561
  constraints: y
@@ -10567,7 +10567,7 @@ const vu = ({
10567
10567
  (O = e.styles) == null ? void 0 : O.chartingStyles,
10568
10568
  o,
10569
10569
  t
10570
- ), [k, x] = D(), [R, S] = D({
10570
+ ), [b, x] = D(), [_, S] = D({
10571
10571
  filterKey: null,
10572
10572
  timeFilter: null
10573
10573
  }), L = P(
@@ -10587,7 +10587,7 @@ const vu = ({
10587
10587
  [n, e.currentDataQuery, e == null ? void 0 : e.dataQueries]
10588
10588
  ), T = ni(
10589
10589
  c == null ? void 0 : c.isExternaLinkIncludeFilters,
10590
- R,
10590
+ _,
10591
10591
  e.currentDataQuery || ((B = e.dataQueries) == null ? void 0 : B[0]),
10592
10592
  g
10593
10593
  );
@@ -10612,7 +10612,7 @@ const vu = ({
10612
10612
  selectDataset: N
10613
10613
  }
10614
10614
  ),
10615
- p && !k ? /* @__PURE__ */ u(ye, {}) : /* @__PURE__ */ A(te, { children: [
10615
+ p && !b ? /* @__PURE__ */ u(ye, {}) : /* @__PURE__ */ A(te, { children: [
10616
10616
  /* @__PURE__ */ u(
10617
10617
  Us,
10618
10618
  {
@@ -10640,7 +10640,7 @@ const vu = ({
10640
10640
  ...d,
10641
10641
  titles: t,
10642
10642
  actions: n,
10643
- attachments: b,
10643
+ attachments: k,
10644
10644
  attachmentsDataQuery: e.currentDataQuery,
10645
10645
  dataQueries: e == null ? void 0 : e.dataQueries,
10646
10646
  dimensions: g,
@@ -10656,7 +10656,7 @@ const vu = ({
10656
10656
  },
10657
10657
  setIsFiltering: x,
10658
10658
  attachmentsConfig: c,
10659
- filters: R,
10659
+ filters: _,
10660
10660
  onFiltersChange: L
10661
10661
  }
10662
10662
  )
@@ -10666,44 +10666,49 @@ const vu = ({
10666
10666
  ] }) : /* @__PURE__ */ u(ye, {})
10667
10667
  ] });
10668
10668
  };
10669
- function Ad(e, n) {
10670
- const [t, r] = D([]), [o, i] = D();
10671
- return _(() => {
10672
- function s(h) {
10669
+ function Ad(e, n, t, r, o) {
10670
+ const [i, s] = D([]), [h, l] = D();
10671
+ return R(() => {
10672
+ function c(a) {
10673
10673
  try {
10674
10674
  Promise.all(
10675
- h == null ? void 0 : h.map((l) => e(l == null ? void 0 : l.urn))
10676
- ).then((l) => {
10677
- var c;
10678
- r(
10679
- ((c = l == null ? void 0 : l.map((a) => {
10680
- var d, f;
10681
- return (f = (d = a == null ? void 0 : a.data) == null ? void 0 : d.dataflows) == null ? void 0 : f[0];
10682
- })) == null ? void 0 : c.filter((a) => !!a)) || []
10683
- ), i(
10675
+ a.map((d) => e(d.urn))
10676
+ ).then((d) => {
10677
+ var w;
10678
+ const f = ((w = d == null ? void 0 : d.map((g) => {
10679
+ var v, m;
10680
+ return (m = (v = g == null ? void 0 : g.data) == null ? void 0 : v.dataflows) == null ? void 0 : m[0];
10681
+ })) == null ? void 0 : w.filter((g) => !!g)) || [];
10682
+ s(f), n(f), t(a), r(a == null ? void 0 : a[0]), l(
10684
10683
  new Map(
10685
- l == null ? void 0 : l.map((a) => {
10686
- var d, f, w, g, v, m, b, C, p;
10684
+ d == null ? void 0 : d.map((g) => {
10685
+ var v, m, k, C, p, y, b, x, _;
10687
10686
  return [
10688
10687
  wn(
10689
- (w = (f = (d = a == null ? void 0 : a.data) == null ? void 0 : d.dataflows) == null ? void 0 : f[0]) == null ? void 0 : w.id,
10690
- (m = (v = (g = a == null ? void 0 : a.data) == null ? void 0 : g.dataflows) == null ? void 0 : v[0]) == null ? void 0 : m.version,
10691
- (p = (C = (b = a == null ? void 0 : a.data) == null ? void 0 : b.dataflows) == null ? void 0 : C[0]) == null ? void 0 : p.agencyID
10688
+ (k = (m = (v = g == null ? void 0 : g.data) == null ? void 0 : v.dataflows) == null ? void 0 : m[0]) == null ? void 0 : k.id,
10689
+ (y = (p = (C = g == null ? void 0 : g.data) == null ? void 0 : C.dataflows) == null ? void 0 : p[0]) == null ? void 0 : y.version,
10690
+ (_ = (x = (b = g == null ? void 0 : g.data) == null ? void 0 : b.dataflows) == null ? void 0 : x[0]) == null ? void 0 : _.agencyID
10692
10691
  ),
10693
- a == null ? void 0 : a.data
10692
+ g == null ? void 0 : g.data
10694
10693
  ];
10695
10694
  })
10696
10695
  )
10697
10696
  );
10698
10697
  });
10699
- } catch (l) {
10700
- console.error("Error loading datasets", l);
10698
+ } catch (d) {
10699
+ console.error("Error loading datasets", d);
10701
10700
  }
10702
10701
  }
10703
- n && n.length && s(n);
10704
- }, [n, e]), {
10705
- datasets: t,
10706
- datasetStructuresMap: o
10702
+ o && o.length && c(o);
10703
+ }, [
10704
+ o,
10705
+ e,
10706
+ r,
10707
+ t,
10708
+ n
10709
+ ]), {
10710
+ datasets: i,
10711
+ datasetStructuresMap: h
10707
10712
  };
10708
10713
  }
10709
10714
  function Vr(e) {
@@ -10792,18 +10797,18 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
10792
10797
  }
10793
10798
  ), Td = ({ stages: e, expandIcon: n, processingTitle: t }) => {
10794
10799
  const [r, o] = D(), [i, s] = D(), h = ae(null), l = ae(null);
10795
- _(() => {
10800
+ R(() => {
10796
10801
  var a;
10797
10802
  s(
10798
10803
  (a = e == null ? void 0 : e.filter((d) => (d == null ? void 0 : d.status) !== fi.COMPLETED)) == null ? void 0 : a.at(-1)
10799
10804
  );
10800
- }, [e]), _(() => {
10805
+ }, [e]), R(() => {
10801
10806
  var a;
10802
10807
  r && ((a = l == null ? void 0 : l.current) == null || a.scrollIntoView({
10803
10808
  block: "nearest",
10804
10809
  behavior: "smooth"
10805
10810
  }));
10806
- }, [r]), _(() => {
10811
+ }, [r]), R(() => {
10807
10812
  const a = h.current;
10808
10813
  let d;
10809
10814
  if (!a) return;
@@ -10899,7 +10904,7 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
10899
10904
  editMessageTitles: o
10900
10905
  }) => {
10901
10906
  const { isOpenedAdvancedView: i } = We(), s = ae(null);
10902
- _(() => {
10907
+ R(() => {
10903
10908
  const l = s.current;
10904
10909
  h(), l && (l.focus(), l.setSelectionRange(l.value.length, l.value.length));
10905
10910
  }, []);
@@ -10978,25 +10983,28 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
10978
10983
  onAdvancedViewOpen: g,
10979
10984
  regenerateMessage: v,
10980
10985
  selectMessageToSend: m,
10981
- messageActionsIcons: b,
10986
+ messageActionsIcons: k,
10982
10987
  rateResponse: C,
10983
10988
  editMessage: p,
10984
10989
  editMessageTitles: y,
10985
- isReadOnlyConversation: k,
10990
+ isReadOnlyConversation: b,
10986
10991
  isNotLastUserMessage: x,
10987
- limitMessages: R,
10992
+ limitMessages: _,
10988
10993
  attachmentsConfig: S
10989
10994
  }) => {
10990
10995
  var Se, Oe;
10991
10996
  const [L, N] = D(), [T, O] = D(), [B, J] = D([]), [F, I] = D(
10992
10997
  []
10993
10998
  ), [z, W] = D(), [j, K] = D(!1), Y = e.role === be.User, Z = e.role === be.System, { datasets: ie, datasetStructuresMap: we } = Ad(
10994
- r == null ? void 0 : r.getDataSet,
10999
+ r.getDataSet,
11000
+ r.updateDatasets,
11001
+ r.updateDataQueries,
11002
+ r.updateCurrentDataQuery,
10995
11003
  L
10996
11004
  ), [de, me] = D(!1), [ce, ge] = D(
10997
11005
  []
10998
11006
  );
10999
- _(() => {
11007
+ R(() => {
11000
11008
  O(L == null ? void 0 : L[0]);
11001
11009
  }, [L]);
11002
11010
  const { dataSetAttachments: Ae, dimensions: xe, isLoadingGridData: pe } = hi(
@@ -11021,22 +11029,22 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
11021
11029
  },
11022
11030
  [L]
11023
11031
  );
11024
- _(() => {
11032
+ R(() => {
11025
11033
  var M, V, $, U;
11026
11034
  const H = (V = (M = e.custom_content) == null ? void 0 : M.form_schema) == null ? void 0 : V.properties, E = x ? (($ = H == null ? void 0 : H.choice) == null ? void 0 : $.oneOf) || ((U = H == null ? void 0 : H.completion) == null ? void 0 : U.oneOf) : [];
11027
11035
  ge(E || []);
11028
- }, [e, x]), _(() => {
11036
+ }, [e, x]), R(() => {
11029
11037
  const H = Er(e), E = Vr(H), M = H.filter(
11030
11038
  (V) => Fn(V)
11031
11039
  );
11032
11040
  N(E), I(M);
11033
- }, [e]), _(() => {
11041
+ }, [e]), R(() => {
11034
11042
  K(
11035
11043
  L != null && L.length > 0
11036
11044
  );
11037
- }, [L]), _(() => {
11045
+ }, [L]), R(() => {
11038
11046
  o && o.urn && W(o.urn);
11039
- }, [o]), _(() => {
11047
+ }, [o]), R(() => {
11040
11048
  if ((e == null ? void 0 : e.role) === be.System && n) {
11041
11049
  const H = Er(n), E = Vr(H) || [];
11042
11050
  L && E && we && J(
@@ -11093,7 +11101,7 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
11093
11101
  locale: d,
11094
11102
  dimensions: xe,
11095
11103
  selectDataset: De,
11096
- limitMessages: R,
11104
+ limitMessages: _,
11097
11105
  attachmentsConfig: S
11098
11106
  }
11099
11107
  ),
@@ -11117,7 +11125,7 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
11117
11125
  xe,
11118
11126
  De,
11119
11127
  g,
11120
- R,
11128
+ _,
11121
11129
  S
11122
11130
  ]
11123
11131
  );
@@ -11175,21 +11183,21 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
11175
11183
  !s && (Y ? !de && /* @__PURE__ */ u(
11176
11184
  Md,
11177
11185
  {
11178
- messageActionsIcons: b,
11186
+ messageActionsIcons: k,
11179
11187
  message: e,
11180
11188
  isStreaming: i,
11181
11189
  onEditClick: Re,
11182
- isReadOnly: k
11190
+ isReadOnly: b
11183
11191
  }
11184
11192
  ) : /* @__PURE__ */ u(
11185
11193
  Ed,
11186
11194
  {
11187
- messageActionsIcons: b,
11195
+ messageActionsIcons: k,
11188
11196
  message: e,
11189
11197
  isStreaming: i,
11190
11198
  regenerateMessage: v,
11191
11199
  rateResponse: C,
11192
- isReadOnly: k
11200
+ isReadOnly: b
11193
11201
  }
11194
11202
  )),
11195
11203
  !le && !pe && /* @__PURE__ */ u(
@@ -11214,61 +11222,61 @@ const xd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ A(
11214
11222
  }) => {
11215
11223
  const i = ae(null), s = ae(null), { isOpenedAdvancedView: h } = We(), [l, c] = D(null), [a, d] = D(!1), f = () => {
11216
11224
  var C;
11217
- const m = (C = s.current) == null ? void 0 : C.parentElement, b = i.current;
11218
- if (m && b) {
11219
- const p = b.offsetTop - m.offsetTop;
11225
+ const m = (C = s.current) == null ? void 0 : C.parentElement, k = i.current;
11226
+ if (m && k) {
11227
+ const p = k.offsetTop - m.offsetTop;
11220
11228
  m.scrollTo({
11221
11229
  top: p,
11222
11230
  behavior: "smooth"
11223
11231
  });
11224
11232
  }
11225
11233
  };
11226
- _(() => {
11234
+ R(() => {
11227
11235
  f();
11228
- }, [e, n]), _(() => {
11236
+ }, [e, n]), R(() => {
11229
11237
  !h && l !== null && setTimeout(() => {
11230
- var m, b;
11231
- (b = (m = s == null ? void 0 : s.current) == null ? void 0 : m.parentElement) == null || b.scrollTo({
11238
+ var m, k;
11239
+ (k = (m = s == null ? void 0 : s.current) == null ? void 0 : m.parentElement) == null || k.scrollTo({
11232
11240
  top: l,
11233
11241
  behavior: "smooth"
11234
11242
  });
11235
11243
  });
11236
11244
  }, [h, l]);
11237
11245
  const w = () => {
11238
- var b, C;
11239
- const m = ((C = (b = s.current) == null ? void 0 : b.parentElement) == null ? void 0 : C.scrollTop) || null;
11246
+ var k, C;
11247
+ const m = ((C = (k = s.current) == null ? void 0 : k.parentElement) == null ? void 0 : C.scrollTop) || null;
11240
11248
  c(m);
11241
11249
  }, g = () => {
11242
- var b;
11243
- const m = (b = s.current) == null ? void 0 : b.parentElement;
11250
+ var k;
11251
+ const m = (k = s.current) == null ? void 0 : k.parentElement;
11244
11252
  if (m) {
11245
11253
  const { scrollTop: C, scrollHeight: p, clientHeight: y } = m;
11246
11254
  C + y >= p ? d(!1) : !a && !h && d(!0);
11247
11255
  }
11248
11256
  };
11249
- _(() => {
11257
+ R(() => {
11250
11258
  h && d(!1);
11251
11259
  }, [h]);
11252
11260
  const v = Ei(g, 300);
11253
- return _(() => {
11254
- var b;
11255
- const m = (b = s.current) == null ? void 0 : b.parentElement;
11261
+ return R(() => {
11262
+ var k;
11263
+ const m = (k = s.current) == null ? void 0 : k.parentElement;
11256
11264
  return m == null || m.addEventListener("scroll", v), () => m == null ? void 0 : m.removeEventListener("scroll", v);
11257
11265
  }, [v]), /* @__PURE__ */ A("div", { ref: s, className: "h-full w-full", children: [
11258
11266
  /* @__PURE__ */ A("div", { className: "flex flex-col gap-y-6 max-w-full", children: [
11259
- e.map((m, b) => /* @__PURE__ */ u(
11267
+ e.map((m, k) => /* @__PURE__ */ u(
11260
11268
  Od,
11261
11269
  {
11262
11270
  message: m,
11263
- previousMessage: Ba(e, b),
11271
+ previousMessage: Ba(e, k),
11264
11272
  onAdvancedViewOpen: w,
11265
11273
  isStreaming: n,
11266
- isCurrentMessageStreaming: n && b === e.length - 1 && m.role === be.Assistant,
11267
- showAdvancedView: b === Wa(e) && !t,
11268
- isNotLastUserMessage: b === e.length - 1 && m.role !== be.User,
11274
+ isCurrentMessageStreaming: n && k === e.length - 1 && m.role === be.Assistant,
11275
+ showAdvancedView: k === Wa(e) && !t,
11276
+ isNotLastUserMessage: k === e.length - 1 && m.role !== be.User,
11269
11277
  ...o
11270
11278
  },
11271
- m.id || b
11279
+ m.id || k
11272
11280
  )),
11273
11281
  /* @__PURE__ */ u("div", { ref: i, className: "h-4" })
11274
11282
  ] }),
@@ -11365,13 +11373,13 @@ const Wd = (e, n, t, r) => {
11365
11373
  titles: g,
11366
11374
  dataQuery: v,
11367
11375
  handleInvalidStreaming: m,
11368
- setConversation: b,
11376
+ setConversation: k,
11369
11377
  setConversations: C,
11370
11378
  openUrl: p,
11371
11379
  messageActionsIcons: y,
11372
- editMessageTitles: k,
11380
+ editMessageTitles: b,
11373
11381
  scrollBottomIcon: x,
11374
- isFinalMessage: R,
11382
+ isFinalMessage: _,
11375
11383
  limitMessages: S,
11376
11384
  attachmentsConfig: L
11377
11385
  }) => {
@@ -11382,7 +11390,7 @@ const Wd = (e, n, t, r) => {
11382
11390
  isShowOnboarding: Z,
11383
11391
  setOnboardingFileSchema: ie
11384
11392
  } = Ne();
11385
- _(() => {
11393
+ R(() => {
11386
11394
  var E;
11387
11395
  j && ((E = t.putOnboardingFile) == null || E.call(
11388
11396
  t,
@@ -11390,7 +11398,7 @@ const Wd = (e, n, t, r) => {
11390
11398
  K,
11391
11399
  j
11392
11400
  ));
11393
- }, [t, j, Y, K]), _(() => {
11401
+ }, [t, j, Y, K]), R(() => {
11394
11402
  W && (j == null ? void 0 : j.lastDisplayedElement) === oe.OPEN_ADVANCED_VIEW && (ie == null || ie(
11395
11403
  Ho(j)
11396
11404
  ));
@@ -11442,14 +11450,14 @@ const Wd = (e, n, t, r) => {
11442
11450
  [t, e]
11443
11451
  ), ce = P(
11444
11452
  (E) => {
11445
- b(
11453
+ k(
11446
11454
  (M) => M ? {
11447
11455
  ...M,
11448
11456
  messages: [...(M == null ? void 0 : M.messages) || [], E]
11449
11457
  } : null
11450
11458
  );
11451
11459
  },
11452
- [b]
11460
+ [k]
11453
11461
  ), ge = P(() => {
11454
11462
  const E = {
11455
11463
  id: `msg-${Date.now() + 1}`,
@@ -11457,20 +11465,20 @@ const Wd = (e, n, t, r) => {
11457
11465
  content: "",
11458
11466
  timestamp: Date.now()
11459
11467
  };
11460
- return b(
11468
+ return k(
11461
11469
  (M) => M ? {
11462
11470
  ...M,
11463
11471
  messages: [...M.messages, E]
11464
11472
  } : null
11465
11473
  ), E;
11466
- }, [b]), Ae = P(
11474
+ }, [k]), Ae = P(
11467
11475
  (E, M) => {
11468
11476
  var $;
11469
11477
  const V = ($ = Pi) == null ? void 0 : $(E, [
11470
11478
  M
11471
11479
  ]);
11472
11480
  if (V)
11473
- return b(
11481
+ return k(
11474
11482
  (U) => U ? {
11475
11483
  ...U,
11476
11484
  messages: U.messages.map(
@@ -11479,7 +11487,7 @@ const Wd = (e, n, t, r) => {
11479
11487
  } : null
11480
11488
  ), V;
11481
11489
  },
11482
- [b]
11490
+ [k]
11483
11491
  ), xe = P(
11484
11492
  (E, M) => {
11485
11493
  t.rateResponse(E, M);
@@ -11532,7 +11540,7 @@ const Wd = (e, n, t, r) => {
11532
11540
  [me]
11533
11541
  ), Re = P(
11534
11542
  (E, M) => {
11535
- b(
11543
+ k(
11536
11544
  (V) => V ? {
11537
11545
  ...V,
11538
11546
  messages: V.messages.filter(
@@ -11541,7 +11549,7 @@ const Wd = (e, n, t, r) => {
11541
11549
  } : null
11542
11550
  );
11543
11551
  },
11544
- [b]
11552
+ [k]
11545
11553
  ), Ee = P(() => {
11546
11554
  N && !N.signal.aborted && N.abort();
11547
11555
  }, [N]), Ie = (E) => (E == null ? void 0 : E.name) === Jd, De = P(
@@ -11638,14 +11646,14 @@ const Wd = (e, n, t, r) => {
11638
11646
  ...M,
11639
11647
  messages: M.messages.slice(0, V.length)
11640
11648
  };
11641
- b(
11649
+ k(
11642
11650
  (U) => U ? {
11643
11651
  ...U,
11644
11652
  ...$
11645
11653
  } : null
11646
11654
  ), Ce(V, $, E);
11647
11655
  },
11648
- [b, Ce]
11656
+ [k, Ce]
11649
11657
  ), Oe = P(
11650
11658
  async (E, M) => {
11651
11659
  if (!M || !E)
@@ -11654,22 +11662,22 @@ const Wd = (e, n, t, r) => {
11654
11662
  ...M,
11655
11663
  messages: [...M.messages.slice(0, V.length - 1), E]
11656
11664
  };
11657
- b(
11665
+ k(
11658
11666
  (U) => U ? {
11659
11667
  ...U,
11660
11668
  ...$
11661
11669
  } : null
11662
11670
  ), Ce(V, $, E);
11663
11671
  },
11664
- [b, Ce]
11672
+ [k, Ce]
11665
11673
  );
11666
- _(() => {
11674
+ R(() => {
11667
11675
  async function E() {
11668
11676
  var M, V, $;
11669
11677
  try {
11670
11678
  F(!0);
11671
11679
  const { bucket: U } = await t.getBucket(), q = await t.getConversation(decodeURI(e));
11672
- b(q), B(
11680
+ k(q), B(
11673
11681
  Id(q) && Pd(q, U)
11674
11682
  ), (q.messages.length === 0 || ((V = (M = q == null ? void 0 : q.messages) == null ? void 0 : M[0]) == null ? void 0 : V.role) === be.Assistant && (($ = q == null ? void 0 : q.messages) == null ? void 0 : $.length) === 1) && Me(q.prompt, q);
11675
11683
  } catch {
@@ -11743,7 +11751,7 @@ const Wd = (e, n, t, r) => {
11743
11751
  messageActionsIcons: y,
11744
11752
  rateResponse: xe,
11745
11753
  editMessage: (E) => Oe(E, n),
11746
- editMessageTitles: k,
11754
+ editMessageTitles: b,
11747
11755
  scrollBottomIcon: x,
11748
11756
  isReadOnlyConversation: O || Z,
11749
11757
  limitMessages: S,
@@ -11773,7 +11781,7 @@ const Wd = (e, n, t, r) => {
11773
11781
  inputClasses: "border-neutrals-600 mr-2"
11774
11782
  }
11775
11783
  ) }),
11776
- Z && R && /* @__PURE__ */ u(
11784
+ Z && _ && /* @__PURE__ */ u(
11777
11785
  he,
11778
11786
  {
11779
11787
  iconBefore: /* @__PURE__ */ u(jr, { width: 24, height: 24 }),