@epam/statgpt-conversation-view 0.2.0-rc.14 → 0.2.0-rc.16

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 +7 -7
  2. package/index.mjs +190 -189
  3. package/package.json +6 -6
package/index.mjs CHANGED
@@ -3,14 +3,14 @@ import * as q from "react";
3
3
  import ae, { createContext as Gr, useState as A, useContext as Br, useCallback as V, useMemo as se, useEffect as R, useRef as le, startTransition as vi } from "react";
4
4
  import { Role as be, DialSchemaProperties as On, SharePermission as bi } from "@epam/ai-dial-shared";
5
5
  import { InputWithIcon as zn, IconButton as Re, KeyboardKey as Ci, Button as de, Popup as qe, PopUpSize as Qe, Loader as ye, PopUpState as ne, Tag as ki, TREE_NODE_PADDING as ur, TREE_NODE_ARROW_SIZE as Ni, Radio as Fr, Calendar as hr, Checkbox as Wr, useIsMobile as vn, Dropdown as Ai, SERIES_LIMIT as cn, CloseButton as zr, Link as Di, CollapsibleBlock as $r, RequestLimitMessage as Jr, DownloadFormatMessage as xi, Alert as yi, useDebounce as Mi } from "@epam/statgpt-ui-components";
6
- import { IconPlayerStopFilled as Ti, IconCheck as Ei, IconCopy as Ur, IconPlus as jr, IconSearch as Si, IconCircleFilled as Oi, IconClock as Li, IconArrowUpRight as _i, IconExternalLink as Ri, IconPointFilled as Ii } from "@tabler/icons-react";
6
+ import { IconPlayerStopFilled as Ei, IconCheck as Ti, IconCopy as Ur, IconPlus as jr, IconSearch as Si, IconCircleFilled as Oi, IconClock as Li, IconArrowUpRight as _i, IconExternalLink as Ri, IconPointFilled as Ii } from "@tabler/icons-react";
7
7
  import G from "classnames";
8
- import { generateConversationId as Yr, InvitationType as Vi, getSharedConversationsRequest as Kr, ShareTarget as Zr, AttachmentType as Te, mergeMessages as Pi, streamChatResponse as Hi } from "@epam/statgpt-dial-toolkit";
8
+ import { generateConversationId as Yr, InvitationType as Vi, getSharedConversationsRequest as Kr, ShareTarget as Zr, AttachmentType as Ee, mergeMessages as Pi, streamChatResponse as Hi } from "@epam/statgpt-dial-toolkit";
9
9
  import { SHARE_CONVERSATION_ROUTE as Xr, cleanConversationNames as Ln, CalendarResolution as on, getTimePeriod as sn, CUSTOM_PERIOD as nn, Locale as Fe, QueryFilterType as dn, formatNumberBySign as Gi, defaultFormatNumbers as Bi, getConversationNavPath as Fi } from "@epam/statgpt-shared-toolkit";
10
10
  import { transformSharedConversations as Wi } from "@epam/statgpt-conversation-list";
11
11
  import qr from "react-markdown";
12
12
  import Qr from "remark-gfm";
13
- import { isQuarterly as eo, isMonthly as no, findCodelistByDimension as bn, getAvailableCodes as zi, getDimensionTitle as to, DimensionType as $i, getAnnotationPeriod as ro, getFilteredItemsWithParents as Ji, getAvailableCodesFromConstrains as oo, SeriesFilterOperator as _n, GET_v3_FILTER_AND as Ui, getTimeRangeFromAttachment as ji, getQueryTimePeriodFilters as io, getTimeSeriesFilterKey as Cn, TIME_PERIOD as un, getTimeSeriesCount as fr, getLocalizedName as ge, getDimensions as He, getStructureComponentsMap as $n, SdmxDataFormat as yn, FileColumnsAttribute as Mn, DownloadType as hn, getTimeQueryFilter as Yi, getTimeDimension as Ki, generateShortUrn as fn, getConcept as lo, getLastUpdatedTime as Zi, getArtifactByUrnWithWildCard as Xi, getAdditionalColumns as qi, getTimePeriods as Jn, sortPeriods as Un, FREQUENCY_DIMENSION_ID as Qi, Periods as Tn, isYearly as el, getParsedResponse as nl, getFiltersDtoFromDataQuery as tl, getStructureDimensions as wr } from "@epam/statgpt-sdmx-toolkit";
13
+ import { isQuarterly as eo, isMonthly as no, findCodelistByDimension as bn, getAvailableCodes as zi, getDimensionTitle as to, DimensionType as $i, getAnnotationPeriod as ro, getFilteredItemsWithParents as Ji, getAvailableCodesFromConstrains as oo, SeriesFilterOperator as _n, GET_v3_FILTER_AND as Ui, getTimeRangeFromAttachment as ji, getQueryTimePeriodFilters as io, getTimeSeriesFilterKey as Cn, TIME_PERIOD as un, getTimeSeriesCount as fr, getLocalizedName as ge, getDimensions as He, getStructureComponentsMap as $n, SdmxDataFormat as yn, FileColumnsAttribute as Mn, DownloadType as hn, getTimeQueryFilter as Yi, getTimeDimension as Ki, generateShortUrn as fn, getConcept as lo, getLastUpdatedTime as Zi, getArtifactByUrnWithWildCard as Xi, getAdditionalColumns as qi, getTimePeriods as Jn, sortPeriods as Un, FREQUENCY_DIMENSION_ID as Qi, Periods as En, isYearly as el, getParsedResponse as nl, getFiltersDtoFromDataQuery as tl, getStructureDimensions as wr } from "@epam/statgpt-sdmx-toolkit";
14
14
  import { FixedSizeList as rl } from "react-window";
15
15
  import ol from "react-virtualized-auto-sizer";
16
16
  import { useFloating as ao, autoUpdate as il, offset as ll, flip as al, shift as cl, arrow as sl, useClick as dl, useInteractions as co, FloatingPortal as ul, useHover as hl, safePolygon as fl } from "@floating-ui/react";
@@ -105,7 +105,7 @@ const wo = ({
105
105
  {
106
106
  buttonClassName: "input-for-ask-button",
107
107
  onClick: () => c == null ? void 0 : c(),
108
- icon: /* @__PURE__ */ u(Ti, {})
108
+ icon: /* @__PURE__ */ u(Ei, {})
109
109
  }
110
110
  ) : /* @__PURE__ */ u(
111
111
  Re,
@@ -720,7 +720,7 @@ var Ml = {
720
720
  M: $e.QrCode.Ecc.MEDIUM,
721
721
  Q: $e.QrCode.Ecc.QUARTILE,
722
722
  H: $e.QrCode.Ecc.HIGH
723
- }, po = 128, vo = "L", bo = "#FFFFFF", Co = "#000000", ko = !1, No = 1, Tl = 4, El = 0, Sl = 0.1;
723
+ }, po = 128, vo = "L", bo = "#FFFFFF", Co = "#000000", ko = !1, No = 1, El = 4, Tl = 0, Sl = 0.1;
724
724
  function Ao(e, n = 0) {
725
725
  const t = [];
726
726
  return e.forEach(function(r, o) {
@@ -760,7 +760,7 @@ function Ol(e, n, t, r) {
760
760
  return { x: s, y: a, h: l, w: f, excavation: h, opacity: d, crossOrigin: w };
761
761
  }
762
762
  function Ll(e, n) {
763
- return n != null ? Math.max(Math.floor(n), 0) : e ? Tl : El;
763
+ return n != null ? Math.max(Math.floor(n), 0) : e ? El : Tl;
764
764
  }
765
765
  function xo({
766
766
  value: e,
@@ -1090,7 +1090,7 @@ const Il = (e, n) => ({
1090
1090
  de,
1091
1091
  {
1092
1092
  buttonClassName: L ? "text-button-secondary" : "text-button-primary",
1093
- iconBefore: L ? /* @__PURE__ */ u(Ei, { width: 20, height: 20 }) : /* @__PURE__ */ u(Ur, { width: 20, height: 20 }),
1093
+ iconBefore: L ? /* @__PURE__ */ u(Ti, { width: 20, height: 20 }) : /* @__PURE__ */ u(Ur, { width: 20, height: 20 }),
1094
1094
  title: L ? h ?? "Copied" : d ?? "Copy link",
1095
1095
  disabled: L,
1096
1096
  onClick: z
@@ -1182,7 +1182,7 @@ const Il = (e, n) => ({
1182
1182
  ),
1183
1183
  r === ne.Opened && /* @__PURE__ */ u(Gl, { onCloseModal: c, ...t })
1184
1184
  ] });
1185
- }, To = ({
1185
+ }, Eo = ({
1186
1186
  conversation: e,
1187
1187
  locale: n,
1188
1188
  isOpenedAdvancedView: t,
@@ -1217,7 +1217,7 @@ const Il = (e, n) => ({
1217
1217
  ) }) })
1218
1218
  ]
1219
1219
  }
1220
- ) }), Eo = ({ content: e, textColorClass: n }) => {
1220
+ ) }), To = ({ content: e, textColorClass: n }) => {
1221
1221
  const { isOpenedAdvancedView: t } = We();
1222
1222
  return /* @__PURE__ */ u(
1223
1223
  "div",
@@ -1269,7 +1269,7 @@ const Il = (e, n) => ({
1269
1269
  handleOnboardingSkip: o
1270
1270
  }) => /* @__PURE__ */ C("div", { className: "onboarding w-full h-full flex flex-col flex-1 overflow-auto", children: [
1271
1271
  /* @__PURE__ */ u(
1272
- To,
1272
+ Eo,
1273
1273
  {
1274
1274
  conversation: {
1275
1275
  name: (e == null ? void 0 : e.onboardingTitle) ?? "Introducing the AI assistant"
@@ -1277,7 +1277,7 @@ const Il = (e, n) => ({
1277
1277
  }
1278
1278
  ),
1279
1279
  /* @__PURE__ */ C("div", { className: "onboarding-content flex flex-col", children: [
1280
- /* @__PURE__ */ u(Eo, { content: n }),
1280
+ /* @__PURE__ */ u(To, { content: n }),
1281
1281
  /* @__PURE__ */ u("div", { className: "mt-4", children: /* @__PURE__ */ u(So, { choiceButtons: t, onClick: r }) }),
1282
1282
  /* @__PURE__ */ C("div", { className: "flex mt-8", children: [
1283
1283
  /* @__PURE__ */ u(
@@ -2814,7 +2814,7 @@ function Ul() {
2814
2814
  time_24hr: !0
2815
2815
  };
2816
2816
  me.l10ns.he = we, me.l10ns;
2817
- var Ee = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
2817
+ var Te = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
2818
2818
  l10ns: {}
2819
2819
  }, Ie = {
2820
2820
  weekdays: {
@@ -2860,7 +2860,7 @@ function Ul() {
2860
2860
  ]
2861
2861
  }
2862
2862
  };
2863
- Ee.l10ns.hi = Ie, Ee.l10ns;
2863
+ Te.l10ns.hi = Ie, Te.l10ns;
2864
2864
  var Ve = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
2865
2865
  l10ns: {}
2866
2866
  }, De = {
@@ -3029,7 +3029,7 @@ function Ul() {
3029
3029
  Se.l10ns.hy = Oe, Se.l10ns;
3030
3030
  var H = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3031
3031
  l10ns: {}
3032
- }, T = {
3032
+ }, E = {
3033
3033
  weekdays: {
3034
3034
  shorthand: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
3035
3035
  longhand: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
@@ -3071,8 +3071,8 @@ function Ul() {
3071
3071
  time_24hr: !0,
3072
3072
  rangeSeparator: " - "
3073
3073
  };
3074
- H.l10ns.id = T, H.l10ns;
3075
- var E = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3074
+ H.l10ns.id = E, H.l10ns;
3075
+ var T = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3076
3076
  l10ns: {}
3077
3077
  }, P = {
3078
3078
  weekdays: {
@@ -3126,7 +3126,7 @@ function Ul() {
3126
3126
  yearAriaLabel: "Ár",
3127
3127
  time_24hr: !0
3128
3128
  };
3129
- E.l10ns.is = P, E.l10ns;
3129
+ T.l10ns.is = P, T.l10ns;
3130
3130
  var W = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3131
3131
  l10ns: {}
3132
3132
  }, j = {
@@ -3925,7 +3925,7 @@ function Ul() {
3925
3925
  xt.l10ns.no = yt, xt.l10ns;
3926
3926
  var Mt = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3927
3927
  l10ns: {}
3928
- }, Tt = {
3928
+ }, Et = {
3929
3929
  weekdays: {
3930
3930
  shorthand: ["ਐਤ", "ਸੋਮ", "ਮੰਗਲ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕਰ", "ਸ਼ਨਿੱਚਰ"],
3931
3931
  longhand: [
@@ -3970,8 +3970,8 @@ function Ul() {
3970
3970
  },
3971
3971
  time_24hr: !0
3972
3972
  };
3973
- Mt.l10ns.pa = Tt, Mt.l10ns;
3974
- var Et = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3973
+ Mt.l10ns.pa = Et, Mt.l10ns;
3974
+ var Tt = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3975
3975
  l10ns: {}
3976
3976
  }, St = {
3977
3977
  weekdays: {
@@ -4026,7 +4026,7 @@ function Ul() {
4026
4026
  return ".";
4027
4027
  }
4028
4028
  };
4029
- Et.l10ns.pl = St, Et.l10ns;
4029
+ Tt.l10ns.pl = St, Tt.l10ns;
4030
4030
  var Ot = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
4031
4031
  l10ns: {}
4032
4032
  }, Lt = {
@@ -4958,7 +4958,7 @@ function Ul() {
4958
4958
  hr: De,
4959
4959
  hu: xe,
4960
4960
  hy: Oe,
4961
- id: T,
4961
+ id: E,
4962
4962
  is: P,
4963
4963
  it: j,
4964
4964
  ja: Ce,
@@ -4975,7 +4975,7 @@ function Ul() {
4975
4975
  nl: Nt,
4976
4976
  nn: Dt,
4977
4977
  no: yt,
4978
- pa: Tt,
4978
+ pa: Et,
4979
4979
  pl: St,
4980
4980
  pt: Lt,
4981
4981
  ro: Rt,
@@ -5528,7 +5528,8 @@ const oa = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
5528
5528
  value: (w == null ? void 0 : w.endPeriod) || (h == null ? void 0 : h.endPeriod),
5529
5529
  label: (a == null ? void 0 : a.to) || "To",
5530
5530
  id: "time-options-end",
5531
- icon: l
5531
+ icon: l,
5532
+ isEndDate: !0
5532
5533
  }
5533
5534
  )
5534
5535
  ] }) })
@@ -6089,7 +6090,7 @@ const oa = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
6089
6090
  ]
6090
6091
  }
6091
6092
  );
6092
- }, En = (e, n, t, r, o = Fe.EN) => {
6093
+ }, Tn = (e, n, t, r, o = Fe.EN) => {
6093
6094
  const i = n == null ? void 0 : n.map((c) => {
6094
6095
  const f = bn(
6095
6096
  t == null ? void 0 : t.codelists,
@@ -6171,7 +6172,7 @@ const oa = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
6171
6172
  var i;
6172
6173
  const t = (i = n == null ? void 0 : n.timeDimensions) == null ? void 0 : i[0], r = ji(e, t) || null;
6173
6174
  return r ? io(r, t == null ? void 0 : t.id) : null;
6174
- }, Ta = (e, n) => {
6175
+ }, Ea = (e, n) => {
6175
6176
  const t = _o(e), r = t.find(
6176
6177
  (o) => (o == null ? void 0 : o.isTimeDimension) && (o == null ? void 0 : o.timeRange)
6177
6178
  );
@@ -6185,7 +6186,7 @@ const oa = (e, n, t, r) => (e == null ? void 0 : e.map((o) => {
6185
6186
  r == null ? void 0 : r.id
6186
6187
  )
6187
6188
  };
6188
- }, Ea = (e) => e == null ? void 0 : e.filter(
6189
+ }, Ta = (e) => e == null ? void 0 : e.filter(
6189
6190
  (n) => {
6190
6191
  var t;
6191
6192
  return n.timeRange || ((t = n.dimensionValues) == null ? void 0 : t.some((r) => r.isSelectedValue));
@@ -6293,7 +6294,7 @@ const Kn = [
6293
6294
  "charts",
6294
6295
  "chartsNavigation"
6295
6296
  /* CHARTS_NAVIGATION */
6296
- ], Tr = [
6297
+ ], Er = [
6297
6298
  "dataGrid",
6298
6299
  "metadataPerSeries",
6299
6300
  ...Kn,
@@ -6314,8 +6315,8 @@ const Kn = [
6314
6315
  }) || "", _a = (e, n) => {
6315
6316
  if (!e || !n)
6316
6317
  return "";
6317
- if (Tr.includes(n)) {
6318
- const r = Hn(Tr, e);
6318
+ if (Er.includes(n)) {
6319
+ const r = Hn(Er, e);
6319
6320
  if (r)
6320
6321
  return r;
6321
6322
  }
@@ -6541,36 +6542,36 @@ const Kn = [
6541
6542
  }
6542
6543
  )
6543
6544
  ] }) });
6544
- }, Er = (e) => {
6545
+ }, Tr = (e) => {
6545
6546
  var t;
6546
6547
  const n = [];
6547
6548
  return (t = e.custom_content) != null && t.attachments && n.push(...e.custom_content.attachments), n;
6548
6549
  };
6549
6550
  function Zn(e) {
6550
6551
  var n;
6551
- return e.type === Te.MARKDOWN && e.title != null && ((n = e.title) == null ? void 0 : n.startsWith("URL Query"));
6552
+ return e.type === Ee.MARKDOWN && e.title != null && ((n = e.title) == null ? void 0 : n.startsWith("URL Query"));
6552
6553
  }
6553
6554
  function Bo(e) {
6554
6555
  var n;
6555
- return e.type === Te.JSON && e.title != null && ((n = e.title) == null ? void 0 : n.startsWith("Query (JSON)"));
6556
+ return e.type === Ee.JSON && e.title != null && ((n = e.title) == null ? void 0 : n.startsWith("Query (JSON)"));
6556
6557
  }
6557
6558
  function Fo(e) {
6558
- return e.type === Te.MARKDOWN && !Zn(e);
6559
+ return e.type === Ee.MARKDOWN && !Zn(e);
6559
6560
  }
6560
6561
  function Ha(e) {
6561
- return e.type === Te.CSV;
6562
+ return e.type === Ee.CSV;
6562
6563
  }
6563
6564
  function Gn(e) {
6564
- return e.type === Te.TABLE;
6565
+ return e.type === Ee.TABLE;
6565
6566
  }
6566
6567
  function Xe(e) {
6567
- return e.type === Te.CUSTOM_DATA_GRID;
6568
+ return e.type === Ee.CUSTOM_DATA_GRID;
6568
6569
  }
6569
6570
  function an(e) {
6570
- return e.type === Te.CUSTOM_CHART;
6571
+ return e.type === Ee.CUSTOM_CHART;
6571
6572
  }
6572
6573
  function Ga(e) {
6573
- return e.type === Te.PLOTLY;
6574
+ return e.type === Ee.PLOTLY;
6574
6575
  }
6575
6576
  const Ba = (e, n) => {
6576
6577
  var t;
@@ -6598,7 +6599,7 @@ const Ba = (e, n) => {
6598
6599
  content: "",
6599
6600
  custom_content: {
6600
6601
  attachments: (t == null ? void 0 : t.map((i) => ({
6601
- type: Te.JSON,
6602
+ type: Ee.JSON,
6602
6603
  title: i == null ? void 0 : i.title,
6603
6604
  data: JSON.stringify({
6604
6605
  urn: i == null ? void 0 : i.urn,
@@ -6650,11 +6651,11 @@ const Ba = (e, n) => {
6650
6651
  const [p, x] = A(ne.Closed), [v, y] = A([]), [_, O] = A([]), [S, N] = A(), [M, L] = A(
6651
6652
  []
6652
6653
  ), [B, $] = A(void 0), I = le(l || []), [F, U] = A([]), [z, J] = A(), [ee, K] = A(), Q = le(!1), [ie, ue] = A(!1), he = (H) => {
6653
- const T = H ? v.map(
6654
- (E) => E.id === H.id ? H : E
6654
+ const E = H ? v.map(
6655
+ (T) => T.id === H.id ? H : T
6655
6656
  ) : v;
6656
- K(!0), y(Nr(T)), J == null || J(!0), fe(
6657
- H != null && H.isTimeDimension ? kr(T, H) : T,
6657
+ K(!0), y(Nr(E)), J == null || J(!0), fe(
6658
+ H != null && H.isTimeDimension ? kr(E, H) : E,
6658
6659
  y,
6659
6660
  J
6660
6661
  );
@@ -6663,7 +6664,7 @@ const Ba = (e, n) => {
6663
6664
  p === ne.Closed && U(I.current);
6664
6665
  }, [p]);
6665
6666
  const fe = V(
6666
- (H, T, E) => {
6667
+ (H, E, T) => {
6667
6668
  e == null || e.getConstraints(
6668
6669
  c == null ? void 0 : c.urn,
6669
6670
  xr(H).filter(
@@ -6672,8 +6673,8 @@ const Ba = (e, n) => {
6672
6673
  ).then((P) => {
6673
6674
  var j;
6674
6675
  const W = ((j = P == null ? void 0 : P.data) == null ? void 0 : j.dataConstraints) || [];
6675
- I.current = W, E == null || E(!1), T(
6676
- En(
6676
+ I.current = W, T == null || T(!1), E(
6677
+ Tn(
6677
6678
  H,
6678
6679
  n,
6679
6680
  r,
@@ -6682,8 +6683,8 @@ const Ba = (e, n) => {
6682
6683
  )
6683
6684
  );
6684
6685
  }).catch(() => {
6685
- I.current = [], E == null || E(!1), T(
6686
- En(
6686
+ I.current = [], T == null || T(!1), E(
6687
+ Tn(
6687
6688
  H,
6688
6689
  n,
6689
6690
  r,
@@ -6703,7 +6704,7 @@ const Ba = (e, n) => {
6703
6704
  r,
6704
6705
  t,
6705
6706
  a
6706
- ), T = n == null ? void 0 : n.map((P) => {
6707
+ ), E = n == null ? void 0 : n.map((P) => {
6707
6708
  const W = bn(
6708
6709
  r == null ? void 0 : r.codelists,
6709
6710
  r == null ? void 0 : r.conceptSchemes,
@@ -6718,9 +6719,9 @@ const Ba = (e, n) => {
6718
6719
  ...P,
6719
6720
  dimensionValues: j
6720
6721
  };
6721
- }), E = H.map((P) => {
6722
+ }), T = H.map((P) => {
6722
6723
  var j;
6723
- const W = ((j = T == null ? void 0 : T.find((Z) => Z.id === P.id)) == null ? void 0 : j.dimensionValues) || [];
6724
+ const W = ((j = E == null ? void 0 : E.find((Z) => Z.id === P.id)) == null ? void 0 : j.dimensionValues) || [];
6724
6725
  return {
6725
6726
  ...P,
6726
6727
  dimensionValues: W
@@ -6728,7 +6729,7 @@ const Ba = (e, n) => {
6728
6729
  });
6729
6730
  if (!Q.current) {
6730
6731
  const P = sa(
6731
- E,
6732
+ T,
6732
6733
  c,
6733
6734
  I.current
6734
6735
  );
@@ -6757,24 +6758,24 @@ const Ba = (e, n) => {
6757
6758
  }, [_, p]);
6758
6759
  const ce = V(
6759
6760
  async (H) => {
6760
- const T = Ea(H), E = g ? {
6761
+ const E = Ta(H), T = g ? {
6761
6762
  ...g,
6762
6763
  messages: $a(
6763
6764
  g == null ? void 0 : g.messages,
6764
- T,
6765
+ E,
6765
6766
  c,
6766
6767
  f
6767
6768
  )
6768
6769
  } : null;
6769
- b == null || b(E), k == null || k(
6770
+ b == null || b(T), k == null || k(
6770
6771
  Ja(
6771
- T,
6772
+ E,
6772
6773
  c,
6773
6774
  f
6774
6775
  )
6775
6776
  ), await m(decodeURI(w), {
6776
- name: E == null ? void 0 : E.name,
6777
- messages: (E == null ? void 0 : E.messages) || []
6777
+ name: T == null ? void 0 : T.name,
6778
+ messages: (T == null ? void 0 : T.messages) || []
6778
6779
  });
6779
6780
  },
6780
6781
  [
@@ -6787,32 +6788,32 @@ const Ba = (e, n) => {
6787
6788
  k
6788
6789
  ]
6789
6790
  ), pe = V(
6790
- (H, T) => {
6791
+ (H, E) => {
6791
6792
  y(
6792
- (E) => ia(E, H, T)
6793
- ), (S == null ? void 0 : S.id) === H && N((E) => ({
6794
- ...E,
6795
- displayMode: T
6793
+ (T) => ia(T, H, E)
6794
+ ), (S == null ? void 0 : S.id) === H && N((T) => ({
6795
+ ...T,
6796
+ displayMode: E
6796
6797
  }));
6797
6798
  },
6798
6799
  [S == null ? void 0 : S.id]
6799
6800
  ), ke = V(
6800
- (H) => Ta(H, n),
6801
+ (H) => Ea(H, n),
6801
6802
  [n]
6802
6803
  ), Ae = V(
6803
- (H, T) => {
6804
- const E = En(
6805
- T,
6804
+ (H, E) => {
6805
+ const T = Tn(
6806
+ E,
6806
6807
  n,
6807
6808
  r,
6808
6809
  H,
6809
6810
  a
6810
6811
  );
6811
6812
  I.current = H, N(
6812
- (P) => (E == null ? void 0 : E.find(
6813
+ (P) => (T == null ? void 0 : T.find(
6813
6814
  (W) => (W == null ? void 0 : W.id) === (P == null ? void 0 : P.id)
6814
6815
  )) || P
6815
- ), y(E), K(!1);
6816
+ ), y(T), K(!1);
6816
6817
  },
6817
6818
  [n, a, r]
6818
6819
  ), me = V(
@@ -6820,12 +6821,12 @@ const Ba = (e, n) => {
6820
6821
  K(!0), y(Nr(H)), e == null || e.getConstraints(
6821
6822
  (c == null ? void 0 : c.urn) || "",
6822
6823
  xr(H).filter(
6823
- (T) => T.componentCode !== un
6824
+ (E) => E.componentCode !== un
6824
6825
  )
6825
- ).then((T) => {
6826
- var E;
6826
+ ).then((E) => {
6827
+ var T;
6827
6828
  Ae(
6828
- ((E = T == null ? void 0 : T.data) == null ? void 0 : E.dataConstraints) || [],
6829
+ ((T = E == null ? void 0 : E.data) == null ? void 0 : T.dataConstraints) || [],
6829
6830
  H
6830
6831
  );
6831
6832
  }).catch(() => {
@@ -6835,11 +6836,11 @@ const Ba = (e, n) => {
6835
6836
  [e, c == null ? void 0 : c.urn, Ae]
6836
6837
  ), we = V(
6837
6838
  (H) => {
6838
- const T = aa(v, H);
6839
- me(T);
6839
+ const E = aa(v, H);
6840
+ me(E);
6840
6841
  },
6841
6842
  [me, v]
6842
- ), Ee = V(() => {
6843
+ ), Te = V(() => {
6843
6844
  I.current = F, x(ne.Closed), ue(!0);
6844
6845
  }, [F]), Ie = V(() => {
6845
6846
  const H = ca(v);
@@ -6880,7 +6881,7 @@ const Ba = (e, n) => {
6880
6881
  size: Qe.LG,
6881
6882
  containerClassName: "advanced-view-filters-modal h-[80%]",
6882
6883
  dividers: i == null ? void 0 : i.isShowDividers,
6883
- onClose: Ee,
6884
+ onClose: Te,
6884
6885
  closeButtonTitle: (h == null ? void 0 : h.close) || "Close",
6885
6886
  children: [
6886
6887
  /* @__PURE__ */ u(
@@ -6910,7 +6911,7 @@ const Ba = (e, n) => {
6910
6911
  {
6911
6912
  titles: h,
6912
6913
  onApply: Ve,
6913
- onClose: Ee,
6914
+ onClose: Te,
6914
6915
  onClearAllFilters: Ie,
6915
6916
  modalProps: i,
6916
6917
  applyDisabled: z || ee,
@@ -7614,13 +7615,13 @@ const Fn = ["index", "value"], gc = (e) => ({
7614
7615
  title: ge(f, t) || o,
7615
7616
  value: c ? a : s
7616
7617
  };
7617
- }).filter(({ value: r }) => !!r)) || [], Tc = (e, n) => {
7618
+ }).filter(({ value: r }) => !!r)) || [], Ec = (e, n) => {
7618
7619
  var c, f, l;
7619
7620
  const t = (c = e == null ? void 0 : e.dataSets) == null ? void 0 : c[0], r = (f = e == null ? void 0 : e.structures) == null ? void 0 : f[0], o = ((l = r == null ? void 0 : r.attributes) == null ? void 0 : l.dimensionGroup) || [], i = t == null ? void 0 : t.dimensionGroupAttributes;
7620
7621
  return new Map(
7621
7622
  o.map((s) => {
7622
7623
  var w;
7623
- const a = (w = s == null ? void 0 : s.relationship) == null ? void 0 : w.dimensions, { codedSeriesKey: d, decodedSeriesKey: h } = Ec(e, n, a);
7624
+ const a = (w = s == null ? void 0 : s.relationship) == null ? void 0 : w.dimensions, { codedSeriesKey: d, decodedSeriesKey: h } = Tc(e, n, a);
7624
7625
  return [
7625
7626
  s.id,
7626
7627
  {
@@ -7631,7 +7632,7 @@ const Fn = ["index", "value"], gc = (e) => ({
7631
7632
  ];
7632
7633
  })
7633
7634
  );
7634
- }, Ec = (e, n, t) => {
7635
+ }, Tc = (e, n, t) => {
7635
7636
  var f, l, s;
7636
7637
  const r = (f = e == null ? void 0 : e.structures) == null ? void 0 : f[0], o = [
7637
7638
  ...(r == null ? void 0 : r.dimensions.series) || [],
@@ -7688,7 +7689,7 @@ const Fn = ["index", "value"], gc = (e) => ({
7688
7689
  var f, l, s, a;
7689
7690
  if (!e || !n || !r)
7690
7691
  return [];
7691
- const i = ((s = (l = (f = e == null ? void 0 : e.structures) == null ? void 0 : f[0]) == null ? void 0 : l.attributes) == null ? void 0 : s.dimensionGroup) || [], c = Tc(e, r);
7692
+ const i = ((s = (l = (f = e == null ? void 0 : e.structures) == null ? void 0 : f[0]) == null ? void 0 : l.attributes) == null ? void 0 : s.dimensionGroup) || [], c = Ec(e, r);
7692
7693
  return ((a = i == null ? void 0 : i.map((d, h) => {
7693
7694
  var m;
7694
7695
  const w = c == null ? void 0 : c.get(d == null ? void 0 : d.id), g = t == null ? void 0 : t.get(d == null ? void 0 : d.id), b = Oc(
@@ -9470,7 +9471,7 @@ const vs = (e, n, t) => {
9470
9471
  evening: "вечір",
9471
9472
  night: "ніч"
9472
9473
  }
9473
- }, Ts = {
9474
+ }, Es = {
9474
9475
  narrow: {
9475
9476
  am: "ДП",
9476
9477
  pm: "ПП",
@@ -9501,12 +9502,12 @@ const vs = (e, n, t) => {
9501
9502
  evening: "веч.",
9502
9503
  night: "ночі"
9503
9504
  }
9504
- }, Es = (e, n) => {
9505
+ }, Ts = (e, n) => {
9505
9506
  const t = String(n == null ? void 0 : n.unit), r = Number(e);
9506
9507
  let o;
9507
9508
  return t === "date" ? r === 3 || r === 23 ? o = "-є" : o = "-е" : t === "minute" || t === "second" || t === "hour" ? o = "-а" : o = "-й", r + o;
9508
9509
  }, Ss = {
9509
- ordinalNumber: Es,
9510
+ ordinalNumber: Ts,
9510
9511
  era: Ue({
9511
9512
  values: Ns,
9512
9513
  defaultWidth: "wide"
@@ -9529,7 +9530,7 @@ const vs = (e, n, t) => {
9529
9530
  dayPeriod: Ue({
9530
9531
  values: Ms,
9531
9532
  defaultWidth: "any",
9532
- formattingValues: Ts,
9533
+ formattingValues: Es,
9533
9534
  defaultFormattingWidth: "wide"
9534
9535
  })
9535
9536
  }, Os = /^(\d+)(-?(е|й|є|а|я))?/i, Ls = /\d+/i, _s = {
@@ -10236,11 +10237,11 @@ function si(e, n, t, r, o, i) {
10236
10237
  function Pr(e, n, t) {
10237
10238
  if (t) {
10238
10239
  const r = n == null ? void 0 : n[t];
10239
- if (r === Tn.MONTHLY)
10240
+ if (r === En.MONTHLY)
10240
10241
  return e == null ? void 0 : e.filter((o) => no(o));
10241
- if (r === Tn.QUARTERLY)
10242
+ if (r === En.QUARTERLY)
10242
10243
  return e == null ? void 0 : e.filter((o) => eo(o));
10243
- if (r === Tn.ANNUAL)
10244
+ if (r === En.ANNUAL)
10244
10245
  return e == null ? void 0 : e.filter((o) => el(o));
10245
10246
  }
10246
10247
  return e;
@@ -10324,10 +10325,10 @@ function Nd(e, n, t, r, o, i, c, f, l, s, a) {
10324
10325
  function ui(e, n, t, r, o, i, c) {
10325
10326
  const [f, l] = A(), [s, a] = A(), [d, h] = A(), [w, g] = A(), [b, m] = A({
10326
10327
  title: (c == null ? void 0 : c.dataGrid) || "Data Grid",
10327
- type: Te.CUSTOM_DATA_GRID
10328
+ type: Ee.CUSTOM_DATA_GRID
10328
10329
  }), [k, D] = A({
10329
10330
  title: (c == null ? void 0 : c.chart) || "Chart",
10330
- type: Te.CUSTOM_CHART
10331
+ type: Ee.CUSTOM_CHART
10331
10332
  }), [p, x] = A([]), [v, y] = A([]), [_, O] = A(!1), [S, N] = A({
10332
10333
  startPeriod: null,
10333
10334
  endPeriod: null
@@ -10771,7 +10772,7 @@ const yd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ C(
10771
10772
  a.index
10772
10773
  )) })
10773
10774
  ] });
10774
- }, Td = ({
10775
+ }, Ed = ({
10775
10776
  message: e,
10776
10777
  regenerateMessage: n,
10777
10778
  messageActionsIcons: t,
@@ -10796,7 +10797,7 @@ const yd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ C(
10796
10797
  l && !i && d !== !1 && (d === null ? /* @__PURE__ */ u("p", { onClick: () => w(!0), children: l }) : /* @__PURE__ */ u("p", { children: a })),
10797
10798
  s && !i && d !== !0 && (d === null ? /* @__PURE__ */ u("p", { onClick: () => w(!1), children: s }) : /* @__PURE__ */ u("p", { className: "rotate-180", children: a }))
10798
10799
  ] });
10799
- }, Ed = ({
10800
+ }, Td = ({
10800
10801
  message: e,
10801
10802
  onEditClick: n,
10802
10803
  messageActionsIcons: t,
@@ -10924,7 +10925,7 @@ const yd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ C(
10924
10925
  l == null ? void 0 : l.chartingStyles,
10925
10926
  h,
10926
10927
  t
10927
- ), { isOpenedAdvancedView: we } = We(), Ee = () => {
10928
+ ), { isOpenedAdvancedView: we } = We(), Te = () => {
10928
10929
  K && fe(!0);
10929
10930
  }, Ie = () => {
10930
10931
  fe(!1);
@@ -10933,20 +10934,20 @@ const yd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ C(
10933
10934
  }, De = V(
10934
10935
  (H) => {
10935
10936
  H && (L(
10936
- S == null ? void 0 : S.find((T) => (T == null ? void 0 : T.urn) === H)
10937
+ S == null ? void 0 : S.find((E) => (E == null ? void 0 : E.urn) === H)
10937
10938
  ), z(void 0));
10938
10939
  },
10939
10940
  [S]
10940
10941
  );
10941
10942
  R(() => {
10942
- var E, P, W, j;
10943
- const H = (P = (E = e.custom_content) == null ? void 0 : E.form_schema) == null ? void 0 : P.properties, T = y ? ((W = H == null ? void 0 : H.choice) == null ? void 0 : W.oneOf) || ((j = H == null ? void 0 : H.completion) == null ? void 0 : j.oneOf) : [];
10944
- pe(T || []);
10943
+ var T, P, W, j;
10944
+ const H = (P = (T = e.custom_content) == null ? void 0 : T.form_schema) == null ? void 0 : P.properties, E = y ? ((W = H == null ? void 0 : H.choice) == null ? void 0 : W.oneOf) || ((j = H == null ? void 0 : H.completion) == null ? void 0 : j.oneOf) : [];
10945
+ pe(E || []);
10945
10946
  }, [e, y]), R(() => {
10946
- const H = Er(e), T = Hr(H), E = H.filter(
10947
+ const H = Tr(e), E = Hr(H), T = H.filter(
10947
10948
  (P) => Gn(P)
10948
10949
  );
10949
- N(T), F(E);
10950
+ N(E), F(T);
10950
10951
  }, [e]), R(() => {
10951
10952
  ee(
10952
10953
  S != null && S.length > 0
@@ -10955,10 +10956,10 @@ const yd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ C(
10955
10956
  o && o.urn && z(o.urn);
10956
10957
  }, [o]), R(() => {
10957
10958
  if ((e == null ? void 0 : e.role) === be.System && n) {
10958
- const H = Er(n), T = Hr(H) || [];
10959
- S && T && ue && $(
10959
+ const H = Tr(n), E = Hr(H) || [];
10960
+ S && E && ue && $(
10960
10961
  Xc(
10961
- T,
10962
+ E,
10962
10963
  S,
10963
10964
  ue,
10964
10965
  d
@@ -11084,22 +11085,22 @@ const yd = ({ stage: e, stageRef: n, isCurrentStage: t }) => /* @__PURE__ */ C(
11084
11085
  onEditApply: Ve,
11085
11086
  editMessageTitles: x
11086
11087
  }
11087
- ) : /* @__PURE__ */ u(Eo, { content: e.content })
11088
+ ) : /* @__PURE__ */ u(To, { content: e.content })
11088
11089
  ]
11089
11090
  }
11090
11091
  ),
11091
11092
  xe,
11092
11093
  !c && (K ? !he && /* @__PURE__ */ u(
11093
- Ed,
11094
+ Td,
11094
11095
  {
11095
11096
  messageActionsIcons: k,
11096
11097
  message: e,
11097
11098
  isStreaming: i,
11098
- onEditClick: Ee,
11099
+ onEditClick: Te,
11099
11100
  isReadOnly: v
11100
11101
  }
11101
11102
  ) : /* @__PURE__ */ u(
11102
- Td,
11103
+ Ed,
11103
11104
  {
11104
11105
  messageActionsIcons: k,
11105
11106
  message: e,
@@ -11300,8 +11301,8 @@ const Wd = (e, n, t, r) => {
11300
11301
  setOnboardingFileSchema: ie
11301
11302
  } = Ne();
11302
11303
  R(() => {
11303
- var T;
11304
- J && ((T = t.putOnboardingFile) == null || T.call(
11304
+ var E;
11305
+ J && ((E = t.putOnboardingFile) == null || E.call(
11305
11306
  t,
11306
11307
  K,
11307
11308
  ee,
@@ -11321,22 +11322,22 @@ const Wd = (e, n, t, r) => {
11321
11322
  p(`/${d}${h}`);
11322
11323
  }, [d, h, p]), he = V(async () => {
11323
11324
  try {
11324
- const { bucket: T } = await t.getBucket(), E = $d(
11325
+ const { bucket: E } = await t.getBucket(), T = $d(
11325
11326
  n,
11326
- T,
11327
+ E,
11327
11328
  d
11328
11329
  );
11329
- await t.createConversation(E, d);
11330
+ await t.createConversation(T, d);
11330
11331
  const P = await t.getConversations(d);
11331
11332
  D(Ln(P)), p(
11332
11333
  zd(
11333
- E,
11334
+ T,
11334
11335
  d,
11335
11336
  h
11336
11337
  )
11337
11338
  );
11338
- } catch (T) {
11339
- console.error("Failed to save conversation:", T);
11339
+ } catch (E) {
11340
+ console.error("Failed to save conversation:", E);
11340
11341
  }
11341
11342
  }, [
11342
11343
  t,
@@ -11346,72 +11347,72 @@ const Wd = (e, n, t, r) => {
11346
11347
  p,
11347
11348
  D
11348
11349
  ]), fe = V(
11349
- async (T) => {
11350
+ async (E) => {
11350
11351
  try {
11351
11352
  await t.updateConversation(decodeURI(e), {
11352
- name: T.name,
11353
- messages: T.messages
11353
+ name: E.name,
11354
+ messages: E.messages
11354
11355
  });
11355
- } catch (E) {
11356
- console.error("Failed to save conversation:", E);
11356
+ } catch (T) {
11357
+ console.error("Failed to save conversation:", T);
11357
11358
  }
11358
11359
  },
11359
11360
  [t, e]
11360
11361
  ), ce = V(
11361
- (T) => {
11362
+ (E) => {
11362
11363
  k(
11363
- (E) => E ? {
11364
- ...E,
11365
- messages: [...(E == null ? void 0 : E.messages) || [], T]
11364
+ (T) => T ? {
11365
+ ...T,
11366
+ messages: [...(T == null ? void 0 : T.messages) || [], E]
11366
11367
  } : null
11367
11368
  );
11368
11369
  },
11369
11370
  [k]
11370
11371
  ), pe = V(() => {
11371
- const T = {
11372
+ const E = {
11372
11373
  id: `msg-${Date.now() + 1}`,
11373
11374
  role: be.Assistant,
11374
11375
  content: "",
11375
11376
  timestamp: Date.now()
11376
11377
  };
11377
11378
  return k(
11378
- (E) => E ? {
11379
- ...E,
11380
- messages: [...E.messages, T]
11379
+ (T) => T ? {
11380
+ ...T,
11381
+ messages: [...T.messages, E]
11381
11382
  } : null
11382
- ), T;
11383
+ ), E;
11383
11384
  }, [k]), ke = V(
11384
- (T, E) => {
11385
+ (E, T) => {
11385
11386
  var W;
11386
- const P = (W = Pi) == null ? void 0 : W(T, [
11387
- E
11387
+ const P = (W = Pi) == null ? void 0 : W(E, [
11388
+ T
11388
11389
  ]);
11389
11390
  if (P)
11390
11391
  return k(
11391
11392
  (j) => j ? {
11392
11393
  ...j,
11393
11394
  messages: j.messages.map(
11394
- (Z) => Z.id === T.id ? { ...P } : Z
11395
+ (Z) => Z.id === E.id ? { ...P } : Z
11395
11396
  )
11396
11397
  } : null
11397
11398
  ), P;
11398
11399
  },
11399
11400
  [k]
11400
11401
  ), Ae = V(
11401
- (T, E) => {
11402
- t.rateResponse(T, E);
11402
+ (E, T) => {
11403
+ t.rateResponse(E, T);
11403
11404
  },
11404
11405
  [t]
11405
11406
  ), me = V(
11406
- async (T, E, P) => {
11407
+ async (E, T, P) => {
11407
11408
  var Z;
11408
11409
  const W = new AbortController();
11409
11410
  M(W);
11410
- let j = T;
11411
+ let j = E;
11411
11412
  if (P)
11412
11413
  return await ((Z = Hi) == null ? void 0 : Z(
11413
11414
  encodeURI(P.id),
11414
- E,
11415
+ T,
11415
11416
  {
11416
11417
  model: P.model,
11417
11418
  signal: W == null ? void 0 : W.signal,
@@ -11436,24 +11437,24 @@ const Wd = (e, n, t, r) => {
11436
11437
  },
11437
11438
  [ke, m, w]
11438
11439
  ), we = V(
11439
- async (T, E, P) => {
11440
- if (E) {
11440
+ async (E, T, P) => {
11441
+ if (T) {
11441
11442
  const W = {
11442
- ...E,
11443
- messages: [...E.messages],
11443
+ ...T,
11444
+ messages: [...T.messages],
11444
11445
  updatedAt: Date.now()
11445
11446
  };
11446
- P && W.messages.push(P), W.messages.push(T), await fe(W);
11447
+ P && W.messages.push(P), W.messages.push(E), await fe(W);
11447
11448
  }
11448
11449
  },
11449
11450
  [fe]
11450
- ), Ee = V(
11451
- (T, E) => {
11451
+ ), Te = V(
11452
+ (E, T) => {
11452
11453
  k(
11453
11454
  (P) => P ? {
11454
11455
  ...P,
11455
11456
  messages: P.messages.filter(
11456
- (W) => W.id !== E.id
11457
+ (W) => W.id !== T.id
11457
11458
  )
11458
11459
  } : null
11459
11460
  );
@@ -11461,23 +11462,23 @@ const Wd = (e, n, t, r) => {
11461
11462
  [k]
11462
11463
  ), Ie = V(() => {
11463
11464
  N && !N.signal.aborted && N.abort();
11464
- }, [N]), Ve = (T) => (T == null ? void 0 : T.name) === Jd, De = V(
11465
- async (T, E, P, W, j, Z = !0) => {
11465
+ }, [N]), Ve = (E) => (E == null ? void 0 : E.name) === Jd, De = V(
11466
+ async (E, T, P, W, j, Z = !0) => {
11466
11467
  Ve(j) ? await we(
11467
11468
  W ?? P,
11468
- T,
11469
- Z ? E : void 0
11470
- ) : Ee(j, E);
11469
+ E,
11470
+ Z ? T : void 0
11471
+ ) : Te(j, T);
11471
11472
  },
11472
- [we, Ee]
11473
+ [we, Te]
11473
11474
  ), Me = V(
11474
- async (T, E, P) => {
11475
- if (!E || !T)
11475
+ async (E, T, P) => {
11476
+ if (!T || !E)
11476
11477
  return;
11477
11478
  const W = Wd(
11478
- T,
11479
- F,
11480
11479
  E,
11480
+ F,
11481
+ T,
11481
11482
  P
11482
11483
  );
11483
11484
  let j, Z;
@@ -11485,19 +11486,19 @@ const Wd = (e, n, t, r) => {
11485
11486
  ce(W);
11486
11487
  try {
11487
11488
  U(!0), j = pe();
11488
- const Ce = Hd(W, E);
11489
+ const Ce = Hd(W, T);
11489
11490
  Z = await me(
11490
11491
  j,
11491
11492
  Ce,
11492
- E
11493
+ T
11493
11494
  ), await we(
11494
11495
  Z,
11495
- E,
11496
+ T,
11496
11497
  W
11497
11498
  );
11498
11499
  } catch (Ce) {
11499
11500
  De(
11500
- E,
11501
+ T,
11501
11502
  W,
11502
11503
  j,
11503
11504
  Z,
@@ -11517,20 +11518,20 @@ const Wd = (e, n, t, r) => {
11517
11518
  De
11518
11519
  ]
11519
11520
  ), xe = V(
11520
- async (T, E, P) => {
11521
+ async (E, T, P) => {
11521
11522
  let W, j;
11522
11523
  try {
11523
11524
  U(!0), W = pe(), j = await me(
11524
11525
  W,
11525
- T,
11526
- E
11526
+ E,
11527
+ T
11527
11528
  ), await we(
11528
11529
  j,
11529
- E
11530
+ T
11530
11531
  );
11531
11532
  } catch (Z) {
11532
11533
  De(
11533
- E,
11534
+ T,
11534
11535
  P,
11535
11536
  W,
11536
11537
  j,
@@ -11548,54 +11549,54 @@ const Wd = (e, n, t, r) => {
11548
11549
  pe
11549
11550
  ]
11550
11551
  ), Se = V(
11551
- async (T, E) => {
11552
- if (!E || !T)
11552
+ async (E, T) => {
11553
+ if (!T || !E)
11553
11554
  return;
11554
- const P = Gd(T, E), W = {
11555
- ...E,
11556
- messages: E.messages.slice(0, P.length)
11555
+ const P = Gd(E, T), W = {
11556
+ ...T,
11557
+ messages: T.messages.slice(0, P.length)
11557
11558
  };
11558
11559
  k(
11559
11560
  (j) => j ? {
11560
11561
  ...j,
11561
11562
  ...W
11562
11563
  } : null
11563
- ), xe(P, W, T);
11564
+ ), xe(P, W, E);
11564
11565
  },
11565
11566
  [k, xe]
11566
11567
  ), Oe = V(
11567
- async (T, E) => {
11568
- if (!E || !T)
11568
+ async (E, T) => {
11569
+ if (!T || !E)
11569
11570
  return;
11570
- const P = Bd(T, E), W = {
11571
- ...E,
11572
- messages: [...E.messages.slice(0, P.length - 1), T]
11571
+ const P = Bd(E, T), W = {
11572
+ ...T,
11573
+ messages: [...T.messages.slice(0, P.length - 1), E]
11573
11574
  };
11574
11575
  k(
11575
11576
  (j) => j ? {
11576
11577
  ...j,
11577
11578
  ...W
11578
11579
  } : null
11579
- ), xe(P, W, T);
11580
+ ), xe(P, W, E);
11580
11581
  },
11581
11582
  [k, xe]
11582
11583
  );
11583
11584
  R(() => {
11584
- async function T() {
11585
- var E, P, W;
11585
+ async function E() {
11586
+ var T, P, W;
11586
11587
  try {
11587
11588
  I(!0);
11588
11589
  const { bucket: j } = await t.getBucket(), Z = await t.getConversation(decodeURI(e));
11589
11590
  k(Z), B(
11590
11591
  Id(Z) && Vd(Z, j)
11591
- ), (Z.messages.length === 0 || ((P = (E = Z == null ? void 0 : Z.messages) == null ? void 0 : E[0]) == null ? void 0 : P.role) === be.Assistant && ((W = Z == null ? void 0 : Z.messages) == null ? void 0 : W.length) === 1) && Me(Z.prompt, Z);
11592
+ ), (Z.messages.length === 0 || ((P = (T = Z == null ? void 0 : Z.messages) == null ? void 0 : T[0]) == null ? void 0 : P.role) === be.Assistant && ((W = Z == null ? void 0 : Z.messages) == null ? void 0 : W.length) === 1) && Me(Z.prompt, Z);
11592
11593
  } catch {
11593
11594
  B(!0);
11594
11595
  } finally {
11595
11596
  I(!1);
11596
11597
  }
11597
11598
  }
11598
- e && T();
11599
+ e && E();
11599
11600
  }, [e]);
11600
11601
  const H = se(
11601
11602
  () => ({
@@ -11620,7 +11621,7 @@ const Wd = (e, n, t, r) => {
11620
11621
  ),
11621
11622
  children: [
11622
11623
  z && !f ? null : /* @__PURE__ */ u(
11623
- To,
11624
+ Eo,
11624
11625
  {
11625
11626
  conversation: n,
11626
11627
  locale: d,
@@ -11651,15 +11652,15 @@ const Wd = (e, n, t, r) => {
11651
11652
  dataQuery: b,
11652
11653
  locale: d,
11653
11654
  titles: g,
11654
- regenerateMessage: (T) => Se(T, n),
11655
- selectMessageToSend: (T, E) => Me(
11656
- T,
11655
+ regenerateMessage: (E) => Se(E, n),
11656
+ selectMessageToSend: (E, T) => Me(
11657
+ E,
11657
11658
  n,
11658
- E
11659
+ T
11659
11660
  ),
11660
11661
  messageActionsIcons: x,
11661
11662
  rateResponse: Ae,
11662
- editMessage: (T) => Oe(T, n),
11663
+ editMessage: (E) => Oe(E, n),
11663
11664
  editMessageTitles: v,
11664
11665
  scrollBottomIcon: y,
11665
11666
  isReadOnlyConversation: L || Q,
@@ -11681,7 +11682,7 @@ const Wd = (e, n, t, r) => {
11681
11682
  ) }) : /* @__PURE__ */ u("div", { className: G(i.inputContainerClass), children: /* @__PURE__ */ u(
11682
11683
  wo,
11683
11684
  {
11684
- onSendMessage: (T) => Me(T, n),
11685
+ onSendMessage: (E) => Me(E, n),
11685
11686
  onStopStreaming: Ie,
11686
11687
  inProcess: F,
11687
11688
  sendMessageIcon: i.sendMessageIcon,