@carto/ps-react-ui 4.4.0-chat-ui.2 → 4.4.0-chat-ui.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/chat.js CHANGED
@@ -1,19 +1,45 @@
1
- import { jsx as a, jsxs as T, Fragment as Te } from "react/jsx-runtime";
1
+ import { useRef as se, useState as Q, useEffect as ge, forwardRef as ae } from "react";
2
+ import { jsx as a, jsxs as T, Fragment as ke } from "react/jsx-runtime";
2
3
  import { c as z } from "react/compiler-runtime";
3
- import { styled as se, Typography as _, Box as y, Link as ke, ButtonBase as Se, Fab as _e, IconButton as H, FilledInput as $e, FormHelperText as Ae, FormControl as Ie, DialogTitle as Re, DialogContent as Ee, Dialog as Le, createSvgIcon as ae, Tooltip as De, Button as re, Collapse as le, CircularProgress as ze } from "@mui/material";
4
- import { ErrorOutline as he, ArrowUpward as Be, KeyboardArrowDown as Fe, Close as ge, StopCircleOutlined as We, ArrowUpwardOutlined as Me, ThumbUp as Oe, ThumbUpOutlined as He, ThumbDown as Pe, ThumbDownOutlined as Ve, ArrowRight as xe, Error as Ue, CheckCircle as je, ChevronRight as Ne } from "@mui/icons-material";
4
+ import { styled as ce, Typography as _, Box as y, Link as Se, ButtonBase as _e, Fab as Ae, IconButton as O, FilledInput as $e, FormHelperText as Ie, FormControl as Re, DialogTitle as Ee, DialogContent as Le, Dialog as De, createSvgIcon as de, Tooltip as ze, Button as le, Collapse as ie, CircularProgress as Be } from "@mui/material";
5
+ import { ErrorOutline as xe, ArrowUpward as Fe, KeyboardArrowDown as We, Close as be, StopCircleOutlined as Me, ArrowUpwardOutlined as He, ThumbUp as Oe, ThumbUpOutlined as Pe, ThumbDown as Ve, ThumbDownOutlined as Ue, ArrowRight as ye, Error as je, CheckCircle as Ne, ChevronRight as Ge } from "@mui/icons-material";
5
6
  import { keyframes as N } from "@mui/material/styles";
6
- import { useRef as be, forwardRef as ce, useState as ie, useEffect as Ge } from "react";
7
- import { C as Ke } from "./copy-button-DGL1tyli.js";
8
- import { a as Xe } from "./index-BnyeR7Qx.js";
9
- const q = 768, Mt = 300, Ot = 100, Ye = 126, ye = se(_)(() => ({
7
+ import { C as Xe } from "./copy-button-DGL1tyli.js";
8
+ import { a as Ye } from "./index-BnyeR7Qx.js";
9
+ const J = 768, Mt = 300, Ht = 100, Ke = 126;
10
+ function Ot(t, e = {}) {
11
+ const {
12
+ speed: o = 500,
13
+ skipAnimation: r = !1
14
+ } = e, l = se(r), [n, u] = Q(() => l.current ? t.length : 0);
15
+ return ge(() => {
16
+ if (l.current) {
17
+ u(t.length);
18
+ return;
19
+ }
20
+ if (n >= t.length)
21
+ return;
22
+ const s = 1e3 / o;
23
+ let i, c = null;
24
+ function d(g) {
25
+ c ??= g;
26
+ const m = g - c, p = Math.floor(m / s);
27
+ p > 0 && (c = g, u((f) => Math.min(f + p, t.length))), i = requestAnimationFrame(d);
28
+ }
29
+ return i = requestAnimationFrame(d), () => cancelAnimationFrame(i);
30
+ }, [t, n, o]), {
31
+ displayedText: t.slice(0, n),
32
+ isTyping: n < t.length
33
+ };
34
+ }
35
+ const Ce = ce(_)(() => ({
10
36
  whiteSpace: "pre-wrap",
11
37
  overflowX: "clip",
12
38
  overflowWrap: "break-word",
13
39
  maxWidth: "100%"
14
40
  }));
15
- ye.displayName = "ChatMessageOverflow";
16
- const O = {
41
+ Ce.displayName = "ChatMessageOverflow";
42
+ const H = {
17
43
  agentMessageContainer: (t) => ({
18
44
  width: "100%",
19
45
  display: "flex",
@@ -25,6 +51,48 @@ const O = {
25
51
  },
26
52
  "& + .PsChat--user-message": {
27
53
  marginTop: t.spacing(3)
54
+ },
55
+ "& > p:first-of-type": {
56
+ marginTop: 0
57
+ },
58
+ "& table": {
59
+ alignSelf: "stretch",
60
+ display: "block",
61
+ overflowX: "auto",
62
+ maxWidth: "100%",
63
+ borderCollapse: "collapse",
64
+ margin: t.spacing(1, 0),
65
+ fontSize: "0.875em"
66
+ },
67
+ "& th, & td": {
68
+ border: `1px solid ${t.palette.divider}`,
69
+ padding: t.spacing(0.5, 1),
70
+ textAlign: "left"
71
+ },
72
+ "& th": {
73
+ backgroundColor: t.palette.action.hover,
74
+ fontWeight: 600
75
+ },
76
+ "& tr:nth-of-type(even) td": {
77
+ backgroundColor: t.palette.action.hover
78
+ },
79
+ "& ul.contains-task-list": {
80
+ listStyle: "none",
81
+ paddingLeft: 0
82
+ },
83
+ '& .task-list-item input[type="checkbox"]': {
84
+ marginRight: t.spacing(0.5)
85
+ },
86
+ "& del": {
87
+ textDecoration: "line-through",
88
+ opacity: 0.7
89
+ },
90
+ "& > ul, & > ol": {
91
+ margin: t.spacing(1, 0),
92
+ paddingLeft: t.spacing(3),
93
+ "& > li + li": {
94
+ marginTop: t.spacing(1)
95
+ }
28
96
  }
29
97
  }),
30
98
  userMessageContainer: {
@@ -163,7 +231,7 @@ const O = {
163
231
  }
164
232
  }
165
233
  };
166
- function Ht(t) {
234
+ function Pt(t) {
167
235
  const e = z(11), {
168
236
  children: o,
169
237
  muted: r,
@@ -171,23 +239,23 @@ function Ht(t) {
171
239
  sx: n
172
240
  } = t, u = r === void 0 ? !1 : r;
173
241
  let s;
174
- e[0] !== l ? (s = l && /* @__PURE__ */ a(y, { sx: O.userMessageTop, children: l }), e[0] = l, e[1] = s) : s = e[1];
175
- const i = u ? O.muted : void 0;
242
+ e[0] !== l ? (s = l && /* @__PURE__ */ a(y, { sx: H.userMessageTop, children: l }), e[0] = l, e[1] = s) : s = e[1];
243
+ const i = u ? H.muted : void 0;
176
244
  let c;
177
245
  e[2] !== n || e[3] !== i ? (c = {
178
- ...O.userMessage,
246
+ ...H.userMessage,
179
247
  ...i,
180
248
  ...n
181
249
  }, e[2] = n, e[3] = i, e[4] = c) : c = e[4];
182
250
  let d;
183
- e[5] !== o || e[6] !== c ? (d = /* @__PURE__ */ a(ye, { className: "PsChat--user-message-inner", variant: "body2", sx: c, children: o }), e[5] = o, e[6] = c, e[7] = d) : d = e[7];
184
- let x;
185
- return e[8] !== s || e[9] !== d ? (x = /* @__PURE__ */ T(y, { className: "PsChat--user-message", sx: O.userMessageContainer, children: [
251
+ e[5] !== o || e[6] !== c ? (d = /* @__PURE__ */ a(Ce, { className: "PsChat--user-message-inner", variant: "body2", sx: c, children: o }), e[5] = o, e[6] = c, e[7] = d) : d = e[7];
252
+ let g;
253
+ return e[8] !== s || e[9] !== d ? (g = /* @__PURE__ */ T(y, { className: "PsChat--user-message", sx: H.userMessageContainer, children: [
186
254
  s,
187
255
  d
188
- ] }), e[8] = s, e[9] = d, e[10] = x) : x = e[10], x;
256
+ ] }), e[8] = s, e[9] = d, e[10] = g) : g = e[10], g;
189
257
  }
190
- const Je = (t) => {
258
+ const qe = (t) => {
191
259
  const e = z(6);
192
260
  let o, r;
193
261
  e[0] !== t ? ({
@@ -197,11 +265,11 @@ const Je = (t) => {
197
265
  const l = `PsChat--agent-message ${o ?? ""}`;
198
266
  let n;
199
267
  return e[3] !== r || e[4] !== l ? (n = /* @__PURE__ */ a(y, { className: l, ...r }), e[3] = r, e[4] = l, e[5] = n) : n = e[5], n;
200
- }, qe = se(Je)(({
268
+ }, Je = ce(qe)(({
201
269
  theme: t
202
- }) => O.agentMessageContainer(t));
203
- qe.displayName = "ChatAgentMessage";
204
- function Pt(t) {
270
+ }) => H.agentMessageContainer(t));
271
+ Je.displayName = "ChatAgentMessage";
272
+ function Vt(t) {
205
273
  const e = z(13), {
206
274
  errors: o,
207
275
  icon: r,
@@ -210,15 +278,15 @@ function Pt(t) {
210
278
  } = t;
211
279
  let u;
212
280
  e[0] !== n ? (u = {
213
- ...O.errorMessage,
281
+ ...H.errorMessage,
214
282
  ...n
215
283
  }, e[0] = n, e[1] = u) : u = e[1];
216
284
  let s;
217
- e[2] !== r ? (s = r ?? /* @__PURE__ */ a(he, { fontSize: "medium", color: "error" }), e[2] = r, e[3] = s) : s = e[3];
285
+ e[2] !== r ? (s = r ?? /* @__PURE__ */ a(xe, { fontSize: "medium", color: "error" }), e[2] = r, e[3] = s) : s = e[3];
218
286
  let i;
219
287
  e[4] !== o ? (i = o.map(Ze), e[4] = o, e[5] = i) : i = e[5];
220
288
  let c;
221
- e[6] !== l ? (c = l?.length ? /* @__PURE__ */ a(y, { sx: O.errorActions, children: (l ?? []).map(Qe) }) : null, e[6] = l, e[7] = c) : c = e[7];
289
+ e[6] !== l ? (c = l?.length ? /* @__PURE__ */ a(y, { sx: H.errorActions, children: (l ?? []).map(Qe) }) : null, e[6] = l, e[7] = c) : c = e[7];
222
290
  let d;
223
291
  return e[8] !== u || e[9] !== s || e[10] !== i || e[11] !== c ? (d = /* @__PURE__ */ T(y, { sx: u, children: [
224
292
  s,
@@ -228,8 +296,8 @@ function Pt(t) {
228
296
  }
229
297
  function Qe(t, e) {
230
298
  return /* @__PURE__ */ T("span", { children: [
231
- e > 0 && /* @__PURE__ */ a(_, { component: "span", variant: "body2", sx: O.errorActionSeparator, children: "·" }),
232
- /* @__PURE__ */ a(ke, { component: "button", variant: "body2", onClick: t.onClick, sx: O.errorAction, children: t.label })
299
+ e > 0 && /* @__PURE__ */ a(_, { component: "span", variant: "body2", sx: H.errorActionSeparator, children: "·" }),
300
+ /* @__PURE__ */ a(Se, { component: "button", variant: "body2", onClick: t.onClick, sx: H.errorAction, children: t.label })
233
301
  ] }, e);
234
302
  }
235
303
  function Ze(t, e) {
@@ -250,16 +318,16 @@ function et(t) {
250
318
  } : void 0, e[5] = o, e[6] = u) : u = e[6];
251
319
  let s;
252
320
  e[7] !== n || e[8] !== u ? (s = {
253
- ...O.suggestionButton,
321
+ ...H.suggestionButton,
254
322
  ...u,
255
323
  ...n
256
324
  }, e[7] = n, e[8] = u, e[9] = s) : s = e[9];
257
325
  let i;
258
326
  e[10] !== r ? (i = /* @__PURE__ */ a(_, { color: "inherit", variant: "body2", children: r }), e[10] = r, e[11] = i) : i = e[11];
259
327
  let c;
260
- e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ a(Be, {}), e[12] = c) : c = e[12];
328
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ a(Fe, {}), e[12] = c) : c = e[12];
261
329
  let d;
262
- return e[13] !== l || e[14] !== s || e[15] !== i ? (d = /* @__PURE__ */ T(Se, { sx: s, ...l, children: [
330
+ return e[13] !== l || e[14] !== s || e[15] !== i ? (d = /* @__PURE__ */ T(_e, { sx: s, ...l, children: [
263
331
  i,
264
332
  c
265
333
  ] }), e[13] = l, e[14] = s, e[15] = i, e[16] = d) : d = e[16], d;
@@ -577,7 +645,7 @@ function rt(t) {
577
645
  let c;
578
646
  return e[3] !== n || e[4] !== i ? (c = /* @__PURE__ */ a(_, { variant: "body2", sx: i, children: n }), e[3] = n, e[4] = i, e[5] = c) : c = e[5], c;
579
647
  }
580
- function Vt(t) {
648
+ function Ut(t) {
581
649
  const e = z(16), {
582
650
  size: o,
583
651
  labels: r,
@@ -593,25 +661,25 @@ function Vt(t) {
593
661
  height: n,
594
662
  ...l
595
663
  }, e[2] = n, e[3] = l, e[4] = c) : c = e[4];
596
- const d = n * 0.75, x = n * 0.75;
597
- let h;
598
- e[5] !== d || e[6] !== x ? (h = /* @__PURE__ */ a(y, { component: "span", sx: {
664
+ const d = n * 0.75, g = n * 0.75;
665
+ let m;
666
+ e[5] !== d || e[6] !== g ? (m = /* @__PURE__ */ a(y, { component: "span", sx: {
599
667
  ...w.loaderOuterCircle,
600
668
  width: d,
601
- height: x
602
- } }), e[5] = d, e[6] = x, e[7] = h) : h = e[7];
603
- const f = n * 0.32, m = n * 0.32;
604
- let g;
605
- e[8] !== m || e[9] !== f ? (g = /* @__PURE__ */ a(y, { component: "span", sx: {
669
+ height: g
670
+ } }), e[5] = d, e[6] = g, e[7] = m) : m = e[7];
671
+ const p = n * 0.32, f = n * 0.32;
672
+ let x;
673
+ e[8] !== f || e[9] !== p ? (x = /* @__PURE__ */ a(y, { component: "span", sx: {
606
674
  ...w.loaderInnerCircle,
607
- width: f,
608
- height: m
609
- } }), e[8] = m, e[9] = f, e[10] = g) : g = e[10];
610
- let p;
611
- return e[11] !== g || e[12] !== i || e[13] !== c || e[14] !== h ? (p = /* @__PURE__ */ T(y, { role: "status", "aria-busy": !0, "aria-label": i, sx: c, children: [
612
- h,
613
- g
614
- ] }), e[11] = g, e[12] = i, e[13] = c, e[14] = h, e[15] = p) : p = e[15], p;
675
+ width: p,
676
+ height: f
677
+ } }), e[8] = f, e[9] = p, e[10] = x) : x = e[10];
678
+ let h;
679
+ return e[11] !== x || e[12] !== i || e[13] !== c || e[14] !== m ? (h = /* @__PURE__ */ T(y, { role: "status", "aria-busy": !0, "aria-label": i, sx: c, children: [
680
+ m,
681
+ x
682
+ ] }), e[11] = x, e[12] = i, e[13] = c, e[14] = m, e[15] = h) : h = e[15], h;
615
683
  }
616
684
  const lt = N`
617
685
  0% { border-top-color: transparent; border-bottom-color: var(--chat-border-color) }
@@ -656,12 +724,20 @@ const lt = N`
656
724
  footerCorner: {
657
725
  position: "absolute",
658
726
  bottom: "38px",
659
- right: `max(16px, calc(50% - ${q / 2}px + 6px))`,
727
+ right: `max(16px, calc(50% - ${J / 2}px + 6px))`,
660
728
  margin: "0 auto"
661
729
  },
662
730
  footer: {
663
- maxWidth: q,
664
- margin: "0 auto"
731
+ maxWidth: J,
732
+ margin: "0 auto",
733
+ "& textarea": {
734
+ resize: "none",
735
+ maxHeight: "10em",
736
+ overflowY: "auto !important",
737
+ paddingRight: ({
738
+ spacing: t
739
+ }) => t(5)
740
+ }
665
741
  },
666
742
  footerCaption: {
667
743
  textAlign: "center"
@@ -671,7 +747,7 @@ const lt = N`
671
747
  flex: 1,
672
748
  position: "relative",
673
749
  mx: "auto",
674
- maxWidth: q,
750
+ maxWidth: J,
675
751
  width: "100%",
676
752
  maxHeight: "100%",
677
753
  pt: 1,
@@ -719,7 +795,7 @@ const lt = N`
719
795
  spacing: t
720
796
  }) => t(3),
721
797
  textAlign: "center",
722
- maxWidth: q,
798
+ maxWidth: J,
723
799
  margin: "0 auto"
724
800
  },
725
801
  starterItems: {
@@ -733,7 +809,7 @@ const lt = N`
733
809
  gridTemplateColumns: "repeat(2, 1fr)"
734
810
  }
735
811
  };
736
- function Ut(t) {
812
+ function jt(t) {
737
813
  const e = z(12), {
738
814
  children: o,
739
815
  labels: r,
@@ -741,7 +817,7 @@ function Ut(t) {
741
817
  } = t;
742
818
  let n;
743
819
  e[0] !== r ? (n = r === void 0 ? {} : r, e[0] = r, e[1] = n) : n = e[1];
744
- const u = n, s = be(null);
820
+ const u = n, s = se(null);
745
821
  let i;
746
822
  e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = () => {
747
823
  s.current?.scrollTo({
@@ -755,18 +831,18 @@ function Ut(t) {
755
831
  ...W.content,
756
832
  ...l
757
833
  }, e[3] = l, e[4] = d) : d = e[4];
758
- const x = u.jumpToLatest ?? "Jump to latest";
759
- let h;
760
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(Fe, {}), e[5] = h) : h = e[5];
761
- let f;
762
- e[6] !== x ? (f = /* @__PURE__ */ a(y, { sx: W.jumpToLatestWrapper, children: /* @__PURE__ */ a(_e, { size: "small", onClick: c, "aria-label": x, sx: W.jumpToLatest, children: h }) }), e[6] = x, e[7] = f) : f = e[7];
834
+ const g = u.jumpToLatest ?? "Jump to latest";
763
835
  let m;
764
- return e[8] !== o || e[9] !== d || e[10] !== f ? (m = /* @__PURE__ */ T(y, { ref: s, sx: d, children: [
836
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ a(We, {}), e[5] = m) : m = e[5];
837
+ let p;
838
+ e[6] !== g ? (p = /* @__PURE__ */ a(y, { sx: W.jumpToLatestWrapper, children: /* @__PURE__ */ a(Ae, { size: "small", onClick: c, "aria-label": g, sx: W.jumpToLatest, children: m }) }), e[6] = g, e[7] = p) : p = e[7];
839
+ let f;
840
+ return e[8] !== o || e[9] !== d || e[10] !== p ? (f = /* @__PURE__ */ T(y, { ref: s, sx: d, children: [
765
841
  o,
766
- f
767
- ] }), e[8] = o, e[9] = d, e[10] = f, e[11] = m) : m = e[11], m;
842
+ p
843
+ ] }), e[8] = o, e[9] = d, e[10] = p, e[11] = f) : f = e[11], f;
768
844
  }
769
- function jt(t) {
845
+ function Nt(t) {
770
846
  const e = z(14), {
771
847
  leftSlot: o,
772
848
  title: r,
@@ -782,21 +858,21 @@ function jt(t) {
782
858
  let i;
783
859
  e[2] !== r ? (i = /* @__PURE__ */ a(_, { variant: "subtitle2", sx: W.headerTitle, children: r }), e[2] = r, e[3] = i) : i = e[3];
784
860
  let c;
785
- e[4] !== n ? (c = n && /* @__PURE__ */ a(H, { size: "medium", onClick: n, "aria-label": "Close", children: /* @__PURE__ */ a(ge, {}) }), e[4] = n, e[5] = c) : c = e[5];
861
+ e[4] !== n ? (c = n && /* @__PURE__ */ a(O, { size: "medium", onClick: n, "aria-label": "Close", children: /* @__PURE__ */ a(be, {}) }), e[4] = n, e[5] = c) : c = e[5];
786
862
  let d;
787
863
  e[6] !== l || e[7] !== c ? (d = /* @__PURE__ */ T(y, { sx: W.headerActions, children: [
788
864
  l,
789
865
  c
790
866
  ] }), e[6] = l, e[7] = c, e[8] = d) : d = e[8];
791
- let x;
792
- return e[9] !== o || e[10] !== s || e[11] !== i || e[12] !== d ? (x = /* @__PURE__ */ T(y, { sx: s, children: [
867
+ let g;
868
+ return e[9] !== o || e[10] !== s || e[11] !== i || e[12] !== d ? (g = /* @__PURE__ */ T(y, { sx: s, children: [
793
869
  o,
794
870
  i,
795
871
  d
796
- ] }), e[9] = o, e[10] = s, e[11] = i, e[12] = d, e[13] = x) : x = e[13], x;
872
+ ] }), e[9] = o, e[10] = s, e[11] = i, e[12] = d, e[13] = g) : g = e[13], g;
797
873
  }
798
874
  const st = "Responses are AI generated. Please verify key information.";
799
- function Nt(t) {
875
+ function Gt(t) {
800
876
  const e = z(35), {
801
877
  value: o,
802
878
  onChange: r,
@@ -807,45 +883,45 @@ function Nt(t) {
807
883
  placeholder: i,
808
884
  labels: c,
809
885
  caption: d,
810
- sx: x
811
- } = t, h = u === void 0 ? !1 : u, f = s === void 0 ? !1 : s, m = i === void 0 ? "Type a message..." : i;
812
- let g;
813
- e[0] !== c ? (g = c === void 0 ? {} : c, e[0] = c, e[1] = g) : g = e[1];
814
- const p = g, b = d === void 0 ? st : d;
886
+ sx: g
887
+ } = t, m = u === void 0 ? !1 : u, p = s === void 0 ? !1 : s, f = i === void 0 ? "Type a message..." : i;
888
+ let x;
889
+ e[0] !== c ? (x = c === void 0 ? {} : c, e[0] = c, e[1] = x) : x = e[1];
890
+ const h = x, b = d === void 0 ? st : d;
815
891
  let v;
816
- e[2] !== f || e[3] !== h || e[4] !== o ? (v = o.trim() && !f && !h, e[2] = f, e[3] = h, e[4] = o, e[5] = v) : v = e[5];
892
+ e[2] !== p || e[3] !== m || e[4] !== o ? (v = o.trim() && !p && !m, e[2] = p, e[3] = m, e[4] = o, e[5] = v) : v = e[5];
817
893
  const C = v;
818
894
  let k;
819
895
  e[6] !== C || e[7] !== l ? (k = (M) => {
820
896
  M.key === "Enter" && !M.shiftKey && (M.preventDefault(), C && l());
821
897
  }, e[6] = C, e[7] = l, e[8] = k) : k = e[8];
822
898
  const S = k;
823
- let A;
824
- e[9] !== x ? (A = {
899
+ let $;
900
+ e[9] !== g ? ($ = {
825
901
  ...W.footerWrapper,
826
- ...x
827
- }, e[9] = x, e[10] = A) : A = e[10];
902
+ ...g
903
+ }, e[9] = g, e[10] = $) : $ = e[10];
828
904
  let I;
829
905
  e[11] !== r ? (I = (M) => r(M.target.value), e[11] = r, e[12] = I) : I = e[12];
830
- const R = f || h;
831
- let $;
832
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
906
+ const R = p || m;
907
+ let A;
908
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
833
909
  minHeight: 0
834
- }, e[13] = $) : $ = e[13];
910
+ }, e[13] = A) : A = e[13];
835
911
  let E;
836
- e[14] !== S || e[15] !== m || e[16] !== I || e[17] !== R || e[18] !== o ? (E = /* @__PURE__ */ a($e, { multiline: !0, value: o, onChange: I, onKeyDown: S, placeholder: m, disabled: R, sx: W.footer, style: $, fullWidth: !0, size: "small" }), e[14] = S, e[15] = m, e[16] = I, e[17] = R, e[18] = o, e[19] = E) : E = e[19];
912
+ e[14] !== S || e[15] !== f || e[16] !== I || e[17] !== R || e[18] !== o ? (E = /* @__PURE__ */ a($e, { multiline: !0, value: o, onChange: I, onKeyDown: S, placeholder: f, disabled: R, sx: W.footer, style: A, fullWidth: !0, size: "small" }), e[14] = S, e[15] = f, e[16] = I, e[17] = R, e[18] = o, e[19] = E) : E = e[19];
837
913
  let B;
838
- e[20] !== C || e[21] !== f || e[22] !== h || e[23] !== p.send || e[24] !== p.stop || e[25] !== l || e[26] !== n ? (B = /* @__PURE__ */ a(y, { sx: W.footerCorner, children: h && n ? /* @__PURE__ */ a(H, { size: "small", onClick: n, disabled: f, "aria-label": p.stop ?? "Stop", children: /* @__PURE__ */ a(We, {}) }) : /* @__PURE__ */ a(H, { size: "small", variant: "contained", onClick: l, disabled: !C, "aria-label": p.send ?? "Send", children: /* @__PURE__ */ a(Me, {}) }) }), e[20] = C, e[21] = f, e[22] = h, e[23] = p.send, e[24] = p.stop, e[25] = l, e[26] = n, e[27] = B) : B = e[27];
914
+ e[20] !== C || e[21] !== p || e[22] !== m || e[23] !== h.send || e[24] !== h.stop || e[25] !== l || e[26] !== n ? (B = /* @__PURE__ */ a(y, { sx: W.footerCorner, children: m && n ? /* @__PURE__ */ a(O, { size: "small", onClick: n, disabled: p, "aria-label": h.stop ?? "Stop", children: /* @__PURE__ */ a(Me, {}) }) : /* @__PURE__ */ a(O, { size: "small", variant: "contained", onClick: l, disabled: !C, "aria-label": h.send ?? "Send", children: /* @__PURE__ */ a(He, {}) }) }), e[20] = C, e[21] = p, e[22] = m, e[23] = h.send, e[24] = h.stop, e[25] = l, e[26] = n, e[27] = B) : B = e[27];
839
915
  let L;
840
- e[28] !== b ? (L = b ? /* @__PURE__ */ a(Ae, { sx: W.footerCaption, children: b }) : null, e[28] = b, e[29] = L) : L = e[29];
916
+ e[28] !== b ? (L = b ? /* @__PURE__ */ a(Ie, { sx: W.footerCaption, children: b }) : null, e[28] = b, e[29] = L) : L = e[29];
841
917
  let D;
842
- return e[30] !== E || e[31] !== B || e[32] !== L || e[33] !== A ? (D = /* @__PURE__ */ T(Ie, { fullWidth: !0, sx: A, children: [
918
+ return e[30] !== E || e[31] !== B || e[32] !== L || e[33] !== $ ? (D = /* @__PURE__ */ T(Re, { fullWidth: !0, sx: $, children: [
843
919
  E,
844
920
  B,
845
921
  L
846
- ] }), e[30] = E, e[31] = B, e[32] = L, e[33] = A, e[34] = D) : D = e[34], D;
922
+ ] }), e[30] = E, e[31] = B, e[32] = L, e[33] = $, e[34] = D) : D = e[34], D;
847
923
  }
848
- const de = [
924
+ const ue = [
849
925
  "#C9DB7440",
850
926
  // pastel green
851
927
  "#FE88B140",
@@ -855,7 +931,7 @@ const de = [
855
931
  "#F6CF7140"
856
932
  // pastel yellow
857
933
  ];
858
- function Gt(t) {
934
+ function Xt(t) {
859
935
  const e = z(40), {
860
936
  icon: o,
861
937
  title: r,
@@ -865,53 +941,53 @@ function Gt(t) {
865
941
  onSelect: s,
866
942
  sx: i
867
943
  } = t, c = u === void 0 ? "small" : u;
868
- let d, x, h, f, m, g, p, b;
944
+ let d, g, m, p, f, x, h, b;
869
945
  if (e[0] !== l || e[1] !== o || e[2] !== n || e[3] !== s || e[4] !== c || e[5] !== i || e[6] !== r) {
870
946
  const k = n.map(at);
871
- x = y;
947
+ g = y;
872
948
  const S = c === "small" ? 1 : 2;
873
- e[15] !== i || e[16] !== S ? (m = {
949
+ e[15] !== i || e[16] !== S ? (f = {
874
950
  ...W.starter,
875
951
  gap: S,
876
952
  ...i
877
- }, e[15] = i, e[16] = S, e[17] = m) : m = e[17], g = o, e[18] !== c || e[19] !== r ? (p = r && /* @__PURE__ */ a(_, { variant: c === "small" ? "h6" : "h5", children: r }), e[18] = c, e[19] = r, e[20] = p) : p = e[20], e[21] !== l || e[22] !== c ? (b = l && /* @__PURE__ */ a(_, { variant: c === "small" ? "body2" : "body1", color: "text.secondary", children: l }), e[21] = l, e[22] = c, e[23] = b) : b = e[23], d = y;
878
- const A = c === "small" ? 1 : 2, I = n.length > 2 ? W.starterItemsTwoCol : void 0;
879
- e[24] !== I || e[25] !== A ? (h = {
953
+ }, e[15] = i, e[16] = S, e[17] = f) : f = e[17], x = o, e[18] !== c || e[19] !== r ? (h = r && /* @__PURE__ */ a(_, { variant: c === "small" ? "h6" : "h5", children: r }), e[18] = c, e[19] = r, e[20] = h) : h = e[20], e[21] !== l || e[22] !== c ? (b = l && /* @__PURE__ */ a(_, { variant: c === "small" ? "body2" : "body1", color: "text.secondary", children: l }), e[21] = l, e[22] = c, e[23] = b) : b = e[23], d = y;
954
+ const $ = c === "small" ? 1 : 2, I = n.length > 2 ? W.starterItemsTwoCol : void 0;
955
+ e[24] !== I || e[25] !== $ ? (m = {
880
956
  ...W.starterItems,
881
- gap: A,
957
+ gap: $,
882
958
  ...I
883
- }, e[24] = I, e[25] = A, e[26] = h) : h = e[26];
959
+ }, e[24] = I, e[25] = $, e[26] = m) : m = e[26];
884
960
  let R;
885
- e[27] !== s ? (R = ($) => /* @__PURE__ */ a(et, { label: $.label, onClick: () => s?.($.label), color: $.color }, $.label), e[27] = s, e[28] = R) : R = e[28], f = k.map(R), e[0] = l, e[1] = o, e[2] = n, e[3] = s, e[4] = c, e[5] = i, e[6] = r, e[7] = d, e[8] = x, e[9] = h, e[10] = f, e[11] = m, e[12] = g, e[13] = p, e[14] = b;
961
+ e[27] !== s ? (R = (A) => /* @__PURE__ */ a(et, { label: A.label, onClick: () => s?.(A.label), color: A.color }, A.label), e[27] = s, e[28] = R) : R = e[28], p = k.map(R), e[0] = l, e[1] = o, e[2] = n, e[3] = s, e[4] = c, e[5] = i, e[6] = r, e[7] = d, e[8] = g, e[9] = m, e[10] = p, e[11] = f, e[12] = x, e[13] = h, e[14] = b;
886
962
  } else
887
- d = e[7], x = e[8], h = e[9], f = e[10], m = e[11], g = e[12], p = e[13], b = e[14];
963
+ d = e[7], g = e[8], m = e[9], p = e[10], f = e[11], x = e[12], h = e[13], b = e[14];
888
964
  let v;
889
- e[29] !== d || e[30] !== h || e[31] !== f ? (v = /* @__PURE__ */ a(d, { sx: h, children: f }), e[29] = d, e[30] = h, e[31] = f, e[32] = v) : v = e[32];
965
+ e[29] !== d || e[30] !== m || e[31] !== p ? (v = /* @__PURE__ */ a(d, { sx: m, children: p }), e[29] = d, e[30] = m, e[31] = p, e[32] = v) : v = e[32];
890
966
  let C;
891
- return e[33] !== x || e[34] !== m || e[35] !== g || e[36] !== p || e[37] !== b || e[38] !== v ? (C = /* @__PURE__ */ T(x, { sx: m, children: [
892
- g,
893
- p,
967
+ return e[33] !== g || e[34] !== f || e[35] !== x || e[36] !== h || e[37] !== b || e[38] !== v ? (C = /* @__PURE__ */ T(g, { sx: f, children: [
968
+ x,
969
+ h,
894
970
  b,
895
971
  v
896
- ] }), e[33] = x, e[34] = m, e[35] = g, e[36] = p, e[37] = b, e[38] = v, e[39] = C) : C = e[39], C;
972
+ ] }), e[33] = g, e[34] = f, e[35] = x, e[36] = h, e[37] = b, e[38] = v, e[39] = C) : C = e[39], C;
897
973
  }
898
974
  function at(t, e) {
899
975
  return typeof t == "string" ? {
900
976
  label: t,
901
- color: de[e]
977
+ color: ue[e]
902
978
  } : {
903
979
  label: t.label,
904
- color: t.color ?? de[e]
980
+ color: t.color ?? ue[e]
905
981
  };
906
982
  }
907
- const Kt = se(y)(({
983
+ const Yt = ce(y)(({
908
984
  theme: t
909
985
  }) => ({
910
986
  display: "flex",
911
987
  alignItems: "center",
912
988
  gap: t.spacing(0.5)
913
989
  }));
914
- function Xt(t) {
990
+ function Kt(t) {
915
991
  const e = z(25), {
916
992
  rating: o,
917
993
  onRatingChange: r,
@@ -924,21 +1000,21 @@ function Xt(t) {
924
1000
  e[2] !== r || e[3] !== o ? (s = () => r?.(o === "up" ? null : "up"), e[2] = r, e[3] = o, e[4] = s) : s = e[4];
925
1001
  const i = u.thumbUp ?? "Thumbs up", c = o === "up" ? "primary" : void 0;
926
1002
  let d;
927
- e[5] !== o ? (d = o === "up" ? /* @__PURE__ */ a(Oe, { fontSize: "small" }) : /* @__PURE__ */ a(He, { fontSize: "small" }), e[5] = o, e[6] = d) : d = e[6];
1003
+ e[5] !== o ? (d = o === "up" ? /* @__PURE__ */ a(Oe, { fontSize: "small" }) : /* @__PURE__ */ a(Pe, { fontSize: "small" }), e[5] = o, e[6] = d) : d = e[6];
1004
+ let g;
1005
+ e[7] !== s || e[8] !== i || e[9] !== c || e[10] !== d ? (g = /* @__PURE__ */ a(O, { size: "small", onClick: s, "aria-label": i, color: c, children: d }), e[7] = s, e[8] = i, e[9] = c, e[10] = d, e[11] = g) : g = e[11];
1006
+ let m;
1007
+ e[12] !== r || e[13] !== o ? (m = () => r?.(o === "down" ? null : "down"), e[12] = r, e[13] = o, e[14] = m) : m = e[14];
1008
+ const p = u.thumbDown ?? "Thumbs down", f = o === "down" ? "primary" : void 0;
928
1009
  let x;
929
- e[7] !== s || e[8] !== i || e[9] !== c || e[10] !== d ? (x = /* @__PURE__ */ a(H, { size: "small", onClick: s, "aria-label": i, color: c, children: d }), e[7] = s, e[8] = i, e[9] = c, e[10] = d, e[11] = x) : x = e[11];
1010
+ e[15] !== o ? (x = o === "down" ? /* @__PURE__ */ a(Ve, { fontSize: "small" }) : /* @__PURE__ */ a(Ue, { fontSize: "small" }), e[15] = o, e[16] = x) : x = e[16];
930
1011
  let h;
931
- e[12] !== r || e[13] !== o ? (h = () => r?.(o === "down" ? null : "down"), e[12] = r, e[13] = o, e[14] = h) : h = e[14];
932
- const f = u.thumbDown ?? "Thumbs down", m = o === "down" ? "primary" : void 0;
933
- let g;
934
- e[15] !== o ? (g = o === "down" ? /* @__PURE__ */ a(Pe, { fontSize: "small" }) : /* @__PURE__ */ a(Ve, { fontSize: "small" }), e[15] = o, e[16] = g) : g = e[16];
935
- let p;
936
- e[17] !== m || e[18] !== g || e[19] !== h || e[20] !== f ? (p = /* @__PURE__ */ a(H, { size: "small", onClick: h, "aria-label": f, color: m, children: g }), e[17] = m, e[18] = g, e[19] = h, e[20] = f, e[21] = p) : p = e[21];
1012
+ e[17] !== f || e[18] !== x || e[19] !== m || e[20] !== p ? (h = /* @__PURE__ */ a(O, { size: "small", onClick: m, "aria-label": p, color: f, children: x }), e[17] = f, e[18] = x, e[19] = m, e[20] = p, e[21] = h) : h = e[21];
937
1013
  let b;
938
- return e[22] !== p || e[23] !== x ? (b = /* @__PURE__ */ T(Te, { children: [
939
- x,
940
- p
941
- ] }), e[22] = p, e[23] = x, e[24] = b) : b = e[24], b;
1014
+ return e[22] !== h || e[23] !== g ? (b = /* @__PURE__ */ T(ke, { children: [
1015
+ g,
1016
+ h
1017
+ ] }), e[22] = h, e[23] = g, e[24] = b) : b = e[24], b;
942
1018
  }
943
1019
  const ct = /^-?\d/;
944
1020
  function dt(t) {
@@ -999,39 +1075,39 @@ function ut(t) {
999
1075
  gap: 0.5
1000
1076
  }, e[3] = c) : c = e[3];
1001
1077
  let d;
1002
- e[4] !== n ? (d = /* @__PURE__ */ a(Ke, { copyText: n, "aria-label": "Copy content" }), e[4] = n, e[5] = d) : d = e[5];
1003
- let x;
1004
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ a(ge, {}), e[6] = x) : x = e[6];
1005
- let h;
1006
- e[7] !== r ? (h = /* @__PURE__ */ a(H, { onClick: r, "aria-label": "close", children: x }), e[7] = r, e[8] = h) : h = e[8];
1007
- let f;
1008
- e[9] !== d || e[10] !== h ? (f = /* @__PURE__ */ T(y, { sx: c, children: [
1009
- d,
1010
- h
1011
- ] }), e[9] = d, e[10] = h, e[11] = f) : f = e[11];
1012
- let m;
1013
- e[12] !== f || e[13] !== l ? (m = /* @__PURE__ */ T(Re, { sx: w.fullViewTitle, children: [
1014
- l,
1015
- f
1016
- ] }), e[12] = f, e[13] = l, e[14] = m) : m = e[14];
1078
+ e[4] !== n ? (d = /* @__PURE__ */ a(Xe, { copyText: n, "aria-label": "Copy content" }), e[4] = n, e[5] = d) : d = e[5];
1017
1079
  let g;
1018
- e[15] !== s ? (g = s.map(ft), e[15] = s, e[16] = g) : g = e[16];
1080
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(be, {}), e[6] = g) : g = e[6];
1081
+ let m;
1082
+ e[7] !== r ? (m = /* @__PURE__ */ a(O, { onClick: r, "aria-label": "close", children: g }), e[7] = r, e[8] = m) : m = e[8];
1019
1083
  let p;
1020
- e[17] !== g ? (p = /* @__PURE__ */ a(Ee, { sx: w.fullViewDialogContent, children: /* @__PURE__ */ a(y, { component: "pre", sx: w.fullViewPre, children: g }) }), e[17] = g, e[18] = p) : p = e[18];
1021
- let b;
1022
- return e[19] !== r || e[20] !== o || e[21] !== p || e[22] !== m ? (b = /* @__PURE__ */ T(Le, { open: o, onClose: r, sx: w.fullViewDialog, PaperProps: i, fullScreen: !0, children: [
1023
- m,
1084
+ e[9] !== d || e[10] !== m ? (p = /* @__PURE__ */ T(y, { sx: c, children: [
1085
+ d,
1086
+ m
1087
+ ] }), e[9] = d, e[10] = m, e[11] = p) : p = e[11];
1088
+ let f;
1089
+ e[12] !== p || e[13] !== l ? (f = /* @__PURE__ */ T(Ee, { sx: w.fullViewTitle, children: [
1090
+ l,
1024
1091
  p
1025
- ] }), e[19] = r, e[20] = o, e[21] = p, e[22] = m, e[23] = b) : b = e[23], b;
1092
+ ] }), e[12] = p, e[13] = l, e[14] = f) : f = e[14];
1093
+ let x;
1094
+ e[15] !== s ? (x = s.map(pt), e[15] = s, e[16] = x) : x = e[16];
1095
+ let h;
1096
+ e[17] !== x ? (h = /* @__PURE__ */ a(Le, { sx: w.fullViewDialogContent, children: /* @__PURE__ */ a(y, { component: "pre", sx: w.fullViewPre, children: x }) }), e[17] = x, e[18] = h) : h = e[18];
1097
+ let b;
1098
+ return e[19] !== r || e[20] !== o || e[21] !== h || e[22] !== f ? (b = /* @__PURE__ */ T(De, { open: o, onClose: r, sx: w.fullViewDialog, PaperProps: i, fullScreen: !0, children: [
1099
+ f,
1100
+ h
1101
+ ] }), e[19] = r, e[20] = o, e[21] = h, e[22] = f, e[23] = b) : b = e[23], b;
1026
1102
  }
1027
- function ft(t, e) {
1103
+ function pt(t, e) {
1028
1104
  return /* @__PURE__ */ T(y, { component: "span", sx: w.fullViewLine, children: [
1029
- t.map(pt),
1105
+ t.map(ft),
1030
1106
  `
1031
1107
  `
1032
1108
  ] }, e);
1033
1109
  }
1034
- function pt(t, e) {
1110
+ function ft(t, e) {
1035
1111
  return typeof t == "string" ? t : /* @__PURE__ */ a(y, { component: "span", sx: w[`syntaxToken_${t.type}`], children: t.value }, e);
1036
1112
  }
1037
1113
  function mt(t) {
@@ -1045,7 +1121,7 @@ const ht = () => /* @__PURE__ */ a("svg", { xmlns: "http://www.w3.org/2000/svg",
1045
1121
  d: "M12.01 11.83 15.18 15l1.41-1.41L12.01 9l-4.59 4.59L8.84 15z",
1046
1122
  clipRule: "evenodd"
1047
1123
  }
1048
- ) }), gt = ae(ht(), "ArrowUp");
1124
+ ) }), gt = de(ht(), "ArrowUp");
1049
1125
  function xt({ width: t, height: e, sx: o, ...r }, l) {
1050
1126
  return /* @__PURE__ */ a(
1051
1127
  gt,
@@ -1061,7 +1137,7 @@ function xt({ width: t, height: e, sx: o, ...r }, l) {
1061
1137
  }
1062
1138
  );
1063
1139
  }
1064
- const bt = ce(xt);
1140
+ const bt = ae(xt);
1065
1141
  bt.displayName = "ArrowUp";
1066
1142
  const yt = () => /* @__PURE__ */ a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ a(
1067
1143
  "path",
@@ -1071,7 +1147,7 @@ const yt = () => /* @__PURE__ */ a("svg", { xmlns: "http://www.w3.org/2000/svg",
1071
1147
  d: "m6.121 19.293 2.877-2.877V19H11v-6l-6 .007v1.994l2.584.001-2.877 2.877zM13 11l6-.007V8.999h-2.585l2.878-2.878-1.414-1.414L15 7.585V5H13z",
1072
1148
  clipRule: "evenodd"
1073
1149
  }
1074
- ) }), Ct = ae(yt(), "CloseDiagonallyRight");
1150
+ ) }), Ct = de(yt(), "CloseDiagonallyRight");
1075
1151
  function vt({ width: t, height: e, sx: o, ...r }, l) {
1076
1152
  return /* @__PURE__ */ a(
1077
1153
  Ct,
@@ -1087,7 +1163,7 @@ function vt({ width: t, height: e, sx: o, ...r }, l) {
1087
1163
  }
1088
1164
  );
1089
1165
  }
1090
- const wt = ce(vt);
1166
+ const wt = ae(vt);
1091
1167
  wt.displayName = "CloseDiagonallyRight";
1092
1168
  const Tt = () => /* @__PURE__ */ a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ a(
1093
1169
  "path",
@@ -1097,7 +1173,7 @@ const Tt = () => /* @__PURE__ */ a("svg", { xmlns: "http://www.w3.org/2000/svg",
1097
1173
  d: "m14.121 11.293 2.877-2.877V11H19V5l-6 .007v1.994l2.584.001-2.877 2.877zM5 19l6-.007v-1.994H8.415l2.878-2.878-1.414-1.414L7 15.585V13H5z",
1098
1174
  clipRule: "evenodd"
1099
1175
  }
1100
- ) }), kt = ae(Tt(), "OpenDiagonallyRight");
1176
+ ) }), kt = de(Tt(), "OpenDiagonallyRight");
1101
1177
  function St({ width: t, height: e, sx: o, ...r }, l) {
1102
1178
  return /* @__PURE__ */ a(
1103
1179
  kt,
@@ -1113,9 +1189,9 @@ function St({ width: t, height: e, sx: o, ...r }, l) {
1113
1189
  }
1114
1190
  );
1115
1191
  }
1116
- const Ce = ce(St);
1117
- Ce.displayName = "OpenDiagonallyRight";
1118
- function ue(t) {
1192
+ const ve = ae(St);
1193
+ ve.displayName = "OpenDiagonallyRight";
1194
+ function pe(t) {
1119
1195
  const e = z(28), {
1120
1196
  content: o,
1121
1197
  title: r,
@@ -1125,58 +1201,58 @@ function ue(t) {
1125
1201
  } = t, s = r === void 0 ? "" : r, i = l === void 0 ? !1 : l;
1126
1202
  let c;
1127
1203
  e[0] !== n ? (c = n === void 0 ? {} : n, e[0] = n, e[1] = c) : c = e[1];
1128
- const d = c, x = be(null), [h, f] = ie(!1), [m, g] = ie(!1);
1129
- let p;
1130
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = () => {
1131
- const D = x.current;
1132
- D && f(D.scrollHeight > D.clientHeight);
1133
- }, e[2] = p) : p = e[2];
1134
- const b = p;
1204
+ const d = c, g = se(null), [m, p] = Q(!1), [f, x] = Q(!1);
1205
+ let h;
1206
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = () => {
1207
+ const D = g.current;
1208
+ D && p(D.scrollHeight > D.clientHeight);
1209
+ }, e[2] = h) : h = e[2];
1210
+ const b = h;
1135
1211
  let v;
1136
1212
  e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = () => {
1137
1213
  b();
1138
- const D = x.current;
1214
+ const D = g.current;
1139
1215
  if (!D)
1140
1216
  return;
1141
1217
  const M = new ResizeObserver(b);
1142
1218
  return M.observe(D), () => M.disconnect();
1143
1219
  }, e[3] = v) : v = e[3];
1144
1220
  let C;
1145
- e[4] !== o ? (C = [b, o], e[4] = o, e[5] = C) : C = e[5], Ge(v, C);
1221
+ e[4] !== o ? (C = [b, o], e[4] = o, e[5] = C) : C = e[5], ge(v, C);
1146
1222
  const k = d.fullView ?? "Full view";
1147
1223
  let S;
1148
1224
  e[6] !== u ? (S = {
1149
1225
  ...w.codeArea,
1150
1226
  ...u
1151
1227
  }, e[6] = u, e[7] = S) : S = e[7];
1152
- let A;
1153
- e[8] !== i ? (A = i ? w.codeAreaPreError : {}, e[8] = i, e[9] = A) : A = e[9];
1228
+ let $;
1229
+ e[8] !== i ? ($ = i ? w.codeAreaPreError : {}, e[8] = i, e[9] = $) : $ = e[9];
1154
1230
  let I;
1155
- e[10] !== A ? (I = {
1231
+ e[10] !== $ ? (I = {
1156
1232
  ...w.codeAreaPre,
1157
- maxHeight: Ye,
1158
- ...A
1159
- }, e[10] = A, e[11] = I) : I = e[11];
1233
+ maxHeight: Ke,
1234
+ ...$
1235
+ }, e[10] = $, e[11] = I) : I = e[11];
1160
1236
  let R;
1161
- e[12] !== o || e[13] !== I ? (R = /* @__PURE__ */ a(y, { component: "pre", ref: x, sx: I, children: o }), e[12] = o, e[13] = I, e[14] = R) : R = e[14];
1162
- let $;
1163
- e[15] !== k || e[16] !== h ? ($ = h && /* @__PURE__ */ a(De, { title: k, children: /* @__PURE__ */ a(H, { size: "small", onClick: () => g(!0), sx: w.codeAreaFullViewButton, children: /* @__PURE__ */ a(Ce, {}) }) }), e[15] = k, e[16] = h, e[17] = $) : $ = e[17];
1237
+ e[12] !== o || e[13] !== I ? (R = /* @__PURE__ */ a(y, { component: "pre", ref: g, sx: I, children: o }), e[12] = o, e[13] = I, e[14] = R) : R = e[14];
1238
+ let A;
1239
+ e[15] !== k || e[16] !== m ? (A = m && /* @__PURE__ */ a(ze, { title: k, children: /* @__PURE__ */ a(O, { size: "small", onClick: () => x(!0), sx: w.codeAreaFullViewButton, children: /* @__PURE__ */ a(ve, {}) }) }), e[15] = k, e[16] = m, e[17] = A) : A = e[17];
1164
1240
  let E;
1165
- e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = () => g(!1), e[18] = E) : E = e[18];
1241
+ e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = () => x(!1), e[18] = E) : E = e[18];
1166
1242
  let B;
1167
- e[19] !== o || e[20] !== m || e[21] !== s ? (B = /* @__PURE__ */ a(ut, { open: m, onClose: E, title: s, content: o }), e[19] = o, e[20] = m, e[21] = s, e[22] = B) : B = e[22];
1243
+ e[19] !== o || e[20] !== f || e[21] !== s ? (B = /* @__PURE__ */ a(ut, { open: f, onClose: E, title: s, content: o }), e[19] = o, e[20] = f, e[21] = s, e[22] = B) : B = e[22];
1168
1244
  let L;
1169
- return e[23] !== R || e[24] !== $ || e[25] !== B || e[26] !== S ? (L = /* @__PURE__ */ T(y, { sx: S, children: [
1245
+ return e[23] !== R || e[24] !== A || e[25] !== B || e[26] !== S ? (L = /* @__PURE__ */ T(y, { sx: S, children: [
1170
1246
  R,
1171
- $,
1247
+ A,
1172
1248
  B
1173
- ] }), e[23] = R, e[24] = $, e[25] = B, e[26] = S, e[27] = L) : L = e[27], L;
1249
+ ] }), e[23] = R, e[24] = A, e[25] = B, e[26] = S, e[27] = L) : L = e[27], L;
1174
1250
  }
1175
1251
  function fe(t) {
1176
1252
  const e = t.replace(/_/g, " ");
1177
1253
  return e.charAt(0).toUpperCase() + e.slice(1);
1178
1254
  }
1179
- function ve(t) {
1255
+ function we(t) {
1180
1256
  return t.status === "running" ? t.runningLabel ?? fe(t.name) : t.label ?? fe(t.name);
1181
1257
  }
1182
1258
  function _t(t) {
@@ -1193,7 +1269,7 @@ function _t(t) {
1193
1269
  gap: 0.5
1194
1270
  }, e[0] = l) : l = e[0];
1195
1271
  let n;
1196
- e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ a(je, { sx: {
1272
+ e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ a(Ne, { sx: {
1197
1273
  fontSize: 12
1198
1274
  }, color: "success" }), e[1] = n) : n = e[1];
1199
1275
  const u = r?.success ?? "Success";
@@ -1211,7 +1287,7 @@ function _t(t) {
1211
1287
  gap: 0.5
1212
1288
  }, e[4] = l) : l = e[4];
1213
1289
  let n;
1214
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ a(Ue, { sx: {
1290
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ a(je, { sx: {
1215
1291
  fontSize: 12
1216
1292
  }, color: "error" }), e[5] = n) : n = e[5];
1217
1293
  const u = r?.error ?? "Error";
@@ -1223,70 +1299,70 @@ function _t(t) {
1223
1299
  }
1224
1300
  case "running": {
1225
1301
  let l;
1226
- return e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ a(ze, { size: 14 }), e[8] = l) : l = e[8], l;
1302
+ return e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ a(Be, { size: 14 }), e[8] = l) : l = e[8], l;
1227
1303
  }
1228
1304
  default:
1229
1305
  return null;
1230
1306
  }
1231
1307
  }
1232
- function we(t) {
1308
+ function Te(t) {
1233
1309
  const e = z(33), {
1234
1310
  tool: o,
1235
1311
  labels: r
1236
1312
  } = t;
1237
1313
  let l;
1238
1314
  e[0] !== r ? (l = r === void 0 ? {} : r, e[0] = r, e[1] = l) : l = e[1];
1239
- const n = l, u = o.status === "error", s = n.toolExecuted ?? "Tool executed", i = n.reference ?? "Reference:", c = n.duration ?? "Duration:", d = n.status ?? "Status:", x = n.inputArguments ?? "Input arguments:", h = n.output ?? "Output:";
1240
- let f;
1241
- e[2] !== i || e[3] !== o.reference ? (f = o.reference && /* @__PURE__ */ T(y, { sx: w.traceField, children: [
1315
+ const n = l, u = o.status === "error", s = n.toolExecuted ?? "Tool executed", i = n.reference ?? "Reference:", c = n.duration ?? "Duration:", d = n.status ?? "Status:", g = n.inputArguments ?? "Input arguments:", m = n.output ?? "Output:";
1316
+ let p;
1317
+ e[2] !== i || e[3] !== o.reference ? (p = o.reference && /* @__PURE__ */ T(y, { sx: w.traceField, children: [
1242
1318
  /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceFieldLabel, children: i }),
1243
1319
  /* @__PURE__ */ T(y, { sx: w.traceReference, children: [
1244
- /* @__PURE__ */ a(Xe, { color: "success" }),
1320
+ /* @__PURE__ */ a(Ye, { color: "success" }),
1245
1321
  /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, children: o.reference })
1246
1322
  ] })
1247
- ] }), e[2] = i, e[3] = o.reference, e[4] = f) : f = e[4];
1248
- let m;
1249
- e[5] !== c || e[6] !== o.duration ? (m = o.duration != null && /* @__PURE__ */ T(y, { sx: w.traceField, children: [
1323
+ ] }), e[2] = i, e[3] = o.reference, e[4] = p) : p = e[4];
1324
+ let f;
1325
+ e[5] !== c || e[6] !== o.duration ? (f = o.duration != null && /* @__PURE__ */ T(y, { sx: w.traceField, children: [
1250
1326
  /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceFieldLabel, children: c }),
1251
1327
  /* @__PURE__ */ T(_, { variant: "code3", children: [
1252
1328
  o.duration,
1253
1329
  "s"
1254
1330
  ] })
1255
- ] }), e[5] = c, e[6] = o.duration, e[7] = m) : m = e[7];
1256
- let g;
1257
- e[8] !== d ? (g = /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceFieldLabel, children: d }), e[8] = d, e[9] = g) : g = e[9];
1258
- let p;
1259
- e[10] !== n || e[11] !== o.status ? (p = /* @__PURE__ */ a(_t, { status: o.status, labels: n }), e[10] = n, e[11] = o.status, e[12] = p) : p = e[12];
1331
+ ] }), e[5] = c, e[6] = o.duration, e[7] = f) : f = e[7];
1332
+ let x;
1333
+ e[8] !== d ? (x = /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceFieldLabel, children: d }), e[8] = d, e[9] = x) : x = e[9];
1334
+ let h;
1335
+ e[10] !== n || e[11] !== o.status ? (h = /* @__PURE__ */ a(_t, { status: o.status, labels: n }), e[10] = n, e[11] = o.status, e[12] = h) : h = e[12];
1260
1336
  let b;
1261
- e[13] !== g || e[14] !== p ? (b = /* @__PURE__ */ T(y, { sx: w.traceField, children: [
1262
- g,
1263
- p
1264
- ] }), e[13] = g, e[14] = p, e[15] = b) : b = e[15];
1337
+ e[13] !== x || e[14] !== h ? (b = /* @__PURE__ */ T(y, { sx: w.traceField, children: [
1338
+ x,
1339
+ h
1340
+ ] }), e[13] = x, e[14] = h, e[15] = b) : b = e[15];
1265
1341
  let v;
1266
- e[16] !== x || e[17] !== u || e[18] !== o.inputArguments || e[19] !== o.output || e[20] !== s ? (v = o.inputArguments && /* @__PURE__ */ T(y, { children: [
1267
- /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceField, children: x }),
1268
- /* @__PURE__ */ a(ue, { sx: {
1342
+ e[16] !== g || e[17] !== u || e[18] !== o.inputArguments || e[19] !== o.output || e[20] !== s ? (v = o.inputArguments && /* @__PURE__ */ T(y, { children: [
1343
+ /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceField, children: g }),
1344
+ /* @__PURE__ */ a(pe, { sx: {
1269
1345
  mt: 0.5,
1270
1346
  mb: o.output ? 1.5 : 0
1271
- }, content: o.inputArguments, title: `${s}: ${x}`, isError: u })
1272
- ] }), e[16] = x, e[17] = u, e[18] = o.inputArguments, e[19] = o.output, e[20] = s, e[21] = v) : v = e[21];
1347
+ }, content: o.inputArguments, title: `${s}: ${g}`, isError: u })
1348
+ ] }), e[16] = g, e[17] = u, e[18] = o.inputArguments, e[19] = o.output, e[20] = s, e[21] = v) : v = e[21];
1273
1349
  let C;
1274
- e[22] !== u || e[23] !== h || e[24] !== o.output || e[25] !== s ? (C = o.output && /* @__PURE__ */ T(y, { children: [
1275
- /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceField, children: h }),
1276
- /* @__PURE__ */ a(ue, { sx: {
1350
+ e[22] !== u || e[23] !== m || e[24] !== o.output || e[25] !== s ? (C = o.output && /* @__PURE__ */ T(y, { children: [
1351
+ /* @__PURE__ */ a(_, { variant: "code3", fontWeight: 600, color: "text.secondary", sx: w.traceField, children: m }),
1352
+ /* @__PURE__ */ a(pe, { sx: {
1277
1353
  mt: 0.5
1278
- }, content: o.output, title: `${s}: ${h}`, isError: u })
1279
- ] }), e[22] = u, e[23] = h, e[24] = o.output, e[25] = s, e[26] = C) : C = e[26];
1354
+ }, content: o.output, title: `${s}: ${m}`, isError: u })
1355
+ ] }), e[22] = u, e[23] = m, e[24] = o.output, e[25] = s, e[26] = C) : C = e[26];
1280
1356
  let k;
1281
- return e[27] !== f || e[28] !== m || e[29] !== b || e[30] !== v || e[31] !== C ? (k = /* @__PURE__ */ T(y, { children: [
1357
+ return e[27] !== p || e[28] !== f || e[29] !== b || e[30] !== v || e[31] !== C ? (k = /* @__PURE__ */ T(y, { children: [
1358
+ p,
1282
1359
  f,
1283
- m,
1284
1360
  b,
1285
1361
  v,
1286
1362
  C
1287
- ] }), e[27] = f, e[28] = m, e[29] = b, e[30] = v, e[31] = C, e[32] = k) : k = e[32], k;
1363
+ ] }), e[27] = p, e[28] = f, e[29] = b, e[30] = v, e[31] = C, e[32] = k) : k = e[32], k;
1288
1364
  }
1289
- function pe(t) {
1365
+ function me(t) {
1290
1366
  const e = z(29), {
1291
1367
  tool: o,
1292
1368
  expanded: r,
@@ -1299,38 +1375,38 @@ function pe(t) {
1299
1375
  const i = s, c = o.status === "running", d = i.toolExecuted ?? "Tool executed";
1300
1376
  if (c) {
1301
1377
  let k;
1302
- e[2] !== o ? (k = ve(o), e[2] = o, e[3] = k) : k = e[3];
1378
+ e[2] !== o ? (k = we(o), e[2] = o, e[3] = k) : k = e[3];
1303
1379
  let S;
1304
1380
  return e[4] !== k ? (S = /* @__PURE__ */ a(rt, { children: k }), e[4] = k, e[5] = S) : S = e[5], S;
1305
1381
  }
1306
- const x = `PsChat--tool-trace ${o.name}`;
1307
- let h;
1308
- e[6] !== r || e[7] !== l ? (h = () => l?.(!r), e[6] = r, e[7] = l, e[8] = h) : h = e[8];
1309
- let f;
1310
- e[9] !== d ? (f = /* @__PURE__ */ a(_, { variant: "caption", fontWeight: 600, color: "text.secondary", children: d }), e[9] = d, e[10] = f) : f = e[10];
1311
- const m = r ? "rotate(90deg)" : "rotate(0deg)";
1312
- let g;
1313
- e[11] !== m ? (g = /* @__PURE__ */ a(xe, { sx: {
1314
- ...w.traceChevron,
1315
- transform: m
1316
- } }), e[11] = m, e[12] = g) : g = e[12];
1382
+ const g = `PsChat--tool-trace ${o.name}`;
1383
+ let m;
1384
+ e[6] !== r || e[7] !== l ? (m = () => l?.(!r), e[6] = r, e[7] = l, e[8] = m) : m = e[8];
1317
1385
  let p;
1318
- e[13] !== r || e[14] !== h || e[15] !== f || e[16] !== g ? (p = /* @__PURE__ */ T(re, { size: "small", variant: "text", onClick: h, "aria-expanded": r, sx: w.traceHeader, children: [
1319
- f,
1320
- g
1321
- ] }), e[13] = r, e[14] = h, e[15] = f, e[16] = g, e[17] = p) : p = e[17];
1386
+ e[9] !== d ? (p = /* @__PURE__ */ a(_, { variant: "caption", fontWeight: 600, color: "text.secondary", children: d }), e[9] = d, e[10] = p) : p = e[10];
1387
+ const f = r ? "rotate(90deg)" : "rotate(0deg)";
1388
+ let x;
1389
+ e[11] !== f ? (x = /* @__PURE__ */ a(ye, { sx: {
1390
+ ...w.traceChevron,
1391
+ transform: f
1392
+ } }), e[11] = f, e[12] = x) : x = e[12];
1393
+ let h;
1394
+ e[13] !== r || e[14] !== m || e[15] !== p || e[16] !== x ? (h = /* @__PURE__ */ T(le, { size: "small", variant: "text", onClick: m, "aria-expanded": r, sx: w.traceHeader, children: [
1395
+ p,
1396
+ x
1397
+ ] }), e[13] = r, e[14] = m, e[15] = p, e[16] = x, e[17] = h) : h = e[17];
1322
1398
  let b;
1323
- e[18] !== i || e[19] !== o ? (b = /* @__PURE__ */ a(y, { sx: w.traceDetailsWrapper, children: /* @__PURE__ */ a(we, { tool: o, labels: i }) }), e[18] = i, e[19] = o, e[20] = b) : b = e[20];
1399
+ e[18] !== i || e[19] !== o ? (b = /* @__PURE__ */ a(y, { sx: w.traceDetailsWrapper, children: /* @__PURE__ */ a(Te, { tool: o, labels: i }) }), e[18] = i, e[19] = o, e[20] = b) : b = e[20];
1324
1400
  let v;
1325
- e[21] !== r || e[22] !== b ? (v = /* @__PURE__ */ a(le, { in: r, unmountOnExit: !0, children: b }), e[21] = r, e[22] = b, e[23] = v) : v = e[23];
1401
+ e[21] !== r || e[22] !== b ? (v = /* @__PURE__ */ a(ie, { in: r, unmountOnExit: !0, children: b }), e[21] = r, e[22] = b, e[23] = v) : v = e[23];
1326
1402
  let C;
1327
- return e[24] !== u || e[25] !== v || e[26] !== x || e[27] !== p ? (C = /* @__PURE__ */ T(y, { width: "100%", sx: u, className: x, children: [
1328
- p,
1403
+ return e[24] !== u || e[25] !== v || e[26] !== g || e[27] !== h ? (C = /* @__PURE__ */ T(y, { width: "100%", sx: u, className: g, children: [
1404
+ h,
1329
1405
  v
1330
- ] }), e[24] = u, e[25] = v, e[26] = x, e[27] = p, e[28] = C) : C = e[28], C;
1406
+ ] }), e[24] = u, e[25] = v, e[26] = g, e[27] = h, e[28] = C) : C = e[28], C;
1331
1407
  }
1332
- function me(t, e) {
1333
- const o = z(5), [r, l] = ie(t);
1408
+ function he(t, e) {
1409
+ const o = z(5), [r, l] = Q(t);
1334
1410
  if (e) {
1335
1411
  let n;
1336
1412
  return o[0] !== e || o[1] !== t ? (n = [t, e], o[0] = e, o[1] = t, o[2] = n) : n = o[2], n;
@@ -1339,7 +1415,7 @@ function me(t, e) {
1339
1415
  return o[3] !== r ? (n = [r, l], o[3] = r, o[4] = n) : n = o[4], n;
1340
1416
  }
1341
1417
  }
1342
- function Yt(t) {
1418
+ function qt(t) {
1343
1419
  const e = z(62), {
1344
1420
  tools: o,
1345
1421
  expanded: r,
@@ -1351,25 +1427,25 @@ function Yt(t) {
1351
1427
  } = t, c = r === void 0 ? !1 : r;
1352
1428
  let d;
1353
1429
  e[0] !== n ? (d = n === void 0 ? {} : n, e[0] = n, e[1] = d) : d = e[1];
1354
- const x = d;
1355
- let h;
1356
- e[2] !== s ? (h = s === void 0 ? {} : s, e[2] = s, e[3] = h) : h = e[3];
1357
- const f = h, [m, g] = me(c, l), [p, b] = me(x, u);
1430
+ const g = d;
1431
+ let m;
1432
+ e[2] !== s ? (m = s === void 0 ? {} : s, e[2] = s, e[3] = m) : m = e[3];
1433
+ const p = m, [f, x] = he(c, l), [h, b] = he(g, u);
1358
1434
  let v;
1359
1435
  e[4] !== o ? (v = o.filter(It), e[4] = o, e[5] = v) : v = e[5];
1360
1436
  const C = v.length;
1361
1437
  let k, S;
1362
- if (e[6] !== m || e[7] !== p || e[8] !== f || e[9] !== C || e[10] !== g || e[11] !== b || e[12] !== i || e[13] !== o) {
1438
+ if (e[6] !== f || e[7] !== h || e[8] !== p || e[9] !== C || e[10] !== x || e[11] !== b || e[12] !== i || e[13] !== o) {
1363
1439
  S = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
1364
1440
  e: {
1365
- const A = o.filter(At), I = o.filter($t), R = f.toolsUsed ?? "tools used", $ = f.error ?? "Error";
1441
+ const $ = o.filter($t), I = o.filter(At), R = p.toolsUsed ?? "tools used", A = p.error ?? "Error";
1366
1442
  if (o.length === 1) {
1367
1443
  let F;
1368
- e[16] !== m || e[17] !== f || e[18] !== g || e[19] !== i || e[20] !== o[0] ? (F = /* @__PURE__ */ a(pe, { tool: o[0], expanded: m, onExpandedChange: g, labels: f, sx: i }), e[16] = m, e[17] = f, e[18] = g, e[19] = i, e[20] = o[0], e[21] = F) : F = e[21], S = F;
1444
+ e[16] !== f || e[17] !== p || e[18] !== x || e[19] !== i || e[20] !== o[0] ? (F = /* @__PURE__ */ a(me, { tool: o[0], expanded: f, onExpandedChange: x, labels: p, sx: i }), e[16] = f, e[17] = p, e[18] = x, e[19] = i, e[20] = o[0], e[21] = F) : F = e[21], S = F;
1369
1445
  break e;
1370
1446
  }
1371
1447
  let E;
1372
- e[22] !== m || e[23] !== g ? (E = () => g(!m), e[22] = m, e[23] = g, e[24] = E) : E = e[24];
1448
+ e[22] !== f || e[23] !== x ? (E = () => x(!f), e[22] = f, e[23] = x, e[24] = E) : E = e[24];
1373
1449
  const B = C > 0 ? 0.5 : 0;
1374
1450
  let L;
1375
1451
  e[25] !== B ? (L = {
@@ -1382,100 +1458,101 @@ function Yt(t) {
1382
1458
  " ",
1383
1459
  R
1384
1460
  ] }), e[27] = o.length, e[28] = R, e[29] = D) : D = e[29];
1385
- const M = m ? "rotate(90deg)" : "rotate(0deg)";
1461
+ const M = f ? "rotate(90deg)" : "rotate(0deg)";
1386
1462
  let P;
1387
- e[30] !== M ? (P = /* @__PURE__ */ a(xe, { sx: {
1463
+ e[30] !== M ? (P = /* @__PURE__ */ a(ye, { sx: {
1388
1464
  ...w.traceChevron,
1389
1465
  transform: M
1390
1466
  } }), e[30] = M, e[31] = P) : P = e[31];
1391
1467
  let V;
1392
1468
  e[32] !== C ? (V = C > 0 && /* @__PURE__ */ T(_, { variant: "code3", sx: w.errorBadge, children: [
1393
1469
  C,
1394
- /* @__PURE__ */ a(he, { sx: {
1470
+ /* @__PURE__ */ a(xe, { sx: {
1395
1471
  fontSize: 12
1396
1472
  }, color: "error" })
1397
1473
  ] }), e[32] = C, e[33] = V) : V = e[33];
1398
1474
  let G;
1399
- e[34] !== m || e[35] !== L || e[36] !== D || e[37] !== P || e[38] !== V || e[39] !== E ? (G = /* @__PURE__ */ T(re, { size: "small", variant: "text", onClick: E, "aria-expanded": m, sx: L, children: [
1475
+ e[34] !== f || e[35] !== L || e[36] !== D || e[37] !== P || e[38] !== V || e[39] !== E ? (G = /* @__PURE__ */ T(le, { size: "small", variant: "text", onClick: E, "aria-expanded": f, sx: L, children: [
1400
1476
  D,
1401
1477
  P,
1402
1478
  V
1403
- ] }), e[34] = m, e[35] = L, e[36] = D, e[37] = P, e[38] = V, e[39] = E, e[40] = G) : G = e[40];
1404
- const Q = le, Z = m, ee = !0, te = y, oe = "ul";
1479
+ ] }), e[34] = f, e[35] = L, e[36] = D, e[37] = P, e[38] = V, e[39] = E, e[40] = G) : G = e[40];
1480
+ const Z = ie, ee = f, te = !0, oe = y, ne = "ul";
1405
1481
  let U;
1406
1482
  e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = {
1407
1483
  ...w.traceDetailsWrapper,
1408
1484
  p: 0,
1409
1485
  listStyle: "none"
1410
1486
  }, e[41] = U) : U = e[41];
1411
- let K;
1412
- e[42] !== $ || e[43] !== m || e[44] !== p || e[45] !== f || e[46] !== b ? (K = (F) => {
1413
- const J = p[F.id] ?? !1;
1414
- return /* @__PURE__ */ T(y, { component: "li", sx: w.groupListItem, "aria-expanded": J, children: [
1415
- /* @__PURE__ */ T(re, { variant: "text", color: "inherit", fullWidth: !0, onClick: () => b({
1416
- ...p,
1417
- [F.id]: !J
1418
- }), "aria-expanded": J, sx: w.groupHeader, children: [
1419
- /* @__PURE__ */ a(_, { flexGrow: 1, flexShrink: 0, variant: "caption", color: "text.secondary", children: ve(F) }),
1420
- F.status === "error" && /* @__PURE__ */ a(_, { variant: "code3", color: "error.main", children: $ }),
1421
- /* @__PURE__ */ a(Ne, { sx: {
1487
+ let X;
1488
+ e[42] !== A || e[43] !== f || e[44] !== h || e[45] !== p || e[46] !== b ? (X = (F) => {
1489
+ const q = h[F.id] ?? !1;
1490
+ return /* @__PURE__ */ T(y, { component: "li", sx: w.groupListItem, "aria-expanded": q, children: [
1491
+ /* @__PURE__ */ T(le, { variant: "text", color: "inherit", fullWidth: !0, onClick: () => b({
1492
+ ...h,
1493
+ [F.id]: !q
1494
+ }), "aria-expanded": q, sx: w.groupHeader, children: [
1495
+ /* @__PURE__ */ a(_, { flexGrow: 1, flexShrink: 0, variant: "caption", color: "text.secondary", children: we(F) }),
1496
+ F.status === "error" && /* @__PURE__ */ a(_, { variant: "code3", color: "error.main", children: A }),
1497
+ /* @__PURE__ */ a(Ge, { sx: {
1422
1498
  ...w.traceChevron,
1423
- transform: m ? "rotate(90deg)" : "rotate(0deg)"
1499
+ transform: f ? "rotate(90deg)" : "rotate(0deg)"
1424
1500
  } })
1425
1501
  ] }),
1426
- /* @__PURE__ */ a(le, { in: J, unmountOnExit: !0, children: /* @__PURE__ */ a(y, { px: 1.5, py: 1, children: /* @__PURE__ */ a(we, { tool: F, labels: f }) }) })
1502
+ /* @__PURE__ */ a(ie, { in: q, unmountOnExit: !0, children: /* @__PURE__ */ a(y, { px: 1.5, py: 1, children: /* @__PURE__ */ a(Te, { tool: F, labels: p }) }) })
1427
1503
  ] }, F.id);
1428
- }, e[42] = $, e[43] = m, e[44] = p, e[45] = f, e[46] = b, e[47] = K) : K = e[47];
1429
- const ne = I.map(K);
1504
+ }, e[42] = A, e[43] = f, e[44] = h, e[45] = p, e[46] = b, e[47] = X) : X = e[47];
1505
+ const re = I.map(X);
1430
1506
  let j;
1431
- e[48] !== te || e[49] !== oe || e[50] !== U || e[51] !== ne ? (j = /* @__PURE__ */ a(te, { component: oe, sx: U, children: ne }), e[48] = te, e[49] = oe, e[50] = U, e[51] = ne, e[52] = j) : j = e[52];
1432
- let X;
1433
- e[53] !== Q || e[54] !== Z || e[55] !== ee || e[56] !== j ? (X = /* @__PURE__ */ a(Q, { in: Z, unmountOnExit: ee, children: j }), e[53] = Q, e[54] = Z, e[55] = ee, e[56] = j, e[57] = X) : X = e[57];
1507
+ e[48] !== oe || e[49] !== ne || e[50] !== U || e[51] !== re ? (j = /* @__PURE__ */ a(oe, { component: ne, sx: U, children: re }), e[48] = oe, e[49] = ne, e[50] = U, e[51] = re, e[52] = j) : j = e[52];
1434
1508
  let Y;
1435
- e[58] !== p || e[59] !== f || e[60] !== b ? (Y = (F) => /* @__PURE__ */ a(pe, { tool: F, labels: f, expanded: p[F.id], onExpandedChange: () => b({
1436
- ...p,
1437
- [F.id]: !p[F.id]
1438
- }) }, F.id), e[58] = p, e[59] = f, e[60] = b, e[61] = Y) : Y = e[61], k = /* @__PURE__ */ T(y, { width: "100%", sx: i, className: "PsChat--tool-group", children: [
1509
+ e[53] !== Z || e[54] !== ee || e[55] !== te || e[56] !== j ? (Y = /* @__PURE__ */ a(Z, { in: ee, unmountOnExit: te, children: j }), e[53] = Z, e[54] = ee, e[55] = te, e[56] = j, e[57] = Y) : Y = e[57];
1510
+ let K;
1511
+ e[58] !== h || e[59] !== p || e[60] !== b ? (K = (F) => /* @__PURE__ */ a(me, { tool: F, labels: p, expanded: h[F.id], onExpandedChange: () => b({
1512
+ ...h,
1513
+ [F.id]: !h[F.id]
1514
+ }) }, F.id), e[58] = h, e[59] = p, e[60] = b, e[61] = K) : K = e[61], k = /* @__PURE__ */ T(y, { width: "100%", sx: i, className: "PsChat--tool-group", children: [
1439
1515
  G,
1440
- X,
1441
- A.map(Y)
1516
+ Y,
1517
+ $.map(K)
1442
1518
  ] });
1443
1519
  }
1444
- e[6] = m, e[7] = p, e[8] = f, e[9] = C, e[10] = g, e[11] = b, e[12] = i, e[13] = o, e[14] = k, e[15] = S;
1520
+ e[6] = f, e[7] = h, e[8] = p, e[9] = C, e[10] = x, e[11] = b, e[12] = i, e[13] = o, e[14] = k, e[15] = S;
1445
1521
  } else
1446
1522
  k = e[14], S = e[15];
1447
1523
  return S !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel") ? S : k;
1448
1524
  }
1449
- function $t(t) {
1525
+ function At(t) {
1450
1526
  return t.status !== "running";
1451
1527
  }
1452
- function At(t) {
1528
+ function $t(t) {
1453
1529
  return t.status === "running";
1454
1530
  }
1455
1531
  function It(t) {
1456
1532
  return t.status === "error";
1457
1533
  }
1458
1534
  export {
1459
- Ot as CHAT_DIVIDER_DELAY,
1460
- q as CHAT_MAX_WIDTH,
1535
+ Ht as CHAT_DIVIDER_DELAY,
1536
+ J as CHAT_MAX_WIDTH,
1461
1537
  Mt as CHAT_SCROLL_DELAY,
1462
- Ye as CHAT_TOOL_CODE_AREA_MAX_HEIGHT,
1463
- Kt as ChatActionsContainer,
1464
- qe as ChatAgentMessage,
1465
- Ut as ChatContent,
1466
- Pt as ChatErrorMessage,
1467
- Nt as ChatFooter,
1468
- jt as ChatHeader,
1469
- Vt as ChatLoader,
1470
- ye as ChatMessageOverflow,
1471
- Xt as ChatRatingAction,
1472
- Gt as ChatStarter,
1538
+ Ke as CHAT_TOOL_CODE_AREA_MAX_HEIGHT,
1539
+ Yt as ChatActionsContainer,
1540
+ Je as ChatAgentMessage,
1541
+ jt as ChatContent,
1542
+ Vt as ChatErrorMessage,
1543
+ Gt as ChatFooter,
1544
+ Nt as ChatHeader,
1545
+ Ut as ChatLoader,
1546
+ Ce as ChatMessageOverflow,
1547
+ Kt as ChatRatingAction,
1548
+ Xt as ChatStarter,
1473
1549
  et as ChatSuggestionButton,
1474
1550
  rt as ChatThinking,
1475
- ue as ChatToolCodeArea,
1551
+ pe as ChatToolCodeArea,
1476
1552
  ut as ChatToolFullViewDialog,
1477
- Yt as ChatToolGroup,
1478
- pe as ChatToolTrace,
1479
- Ht as ChatUserMessage
1553
+ qt as ChatToolGroup,
1554
+ me as ChatToolTrace,
1555
+ Pt as ChatUserMessage,
1556
+ Ot as useTypewriter
1480
1557
  };
1481
1558
  //# sourceMappingURL=chat.js.map