@epam/ai-dial-conversation-input 1.1.0-dev.53 → 1.1.0-dev.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ModelSelectorBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAiFzE,wDAAwD;AACxD,MAAM,WAAW,6BAA6B;IAC5C,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kFAAkF;IAClF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kJAAkJ;IAClJ,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iGAAiG;IACjG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAgGtE,CAAC"}
1
+ {"version":3,"file":"ModelSelectorBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ModelSelectorBottomSheet/ModelSelectorBottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,2BAA2B,CAAC;AAS9E,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAiFzE,wDAAwD;AACxD,MAAM,WAAW,6BAA6B;IAC5C,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kFAAkF;IAClF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kJAAkJ;IAClJ,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iGAAiG;IACjG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAgGtE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useModelSelector.d.ts","sourceRoot":"","sources":["../../src/hooks/useModelSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAGL,YAAY,EAEb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAM1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAO3D,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,gIAAgI;IAChI,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,yDAAyD;IACzD,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,iGAAiG;IACjG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,6CAA6C;AAC7C,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,YAAY,EAAE,SAAS,CAAC;IACxB,+CAA+C;IAC/C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0GAA0G;IAC1G,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,8CAA8C;IAC9C,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,0DAA0D;IAC1D,UAAU,EAAE,SAAS,CAAC;IACtB,wFAAwF;IACxF,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,GAAI,wGAM9B,uBAAuB,KAAG,sBA+H5B,CAAC"}
1
+ {"version":3,"file":"useModelSelector.d.ts","sourceRoot":"","sources":["../../src/hooks/useModelSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,2BAA2B,CAAC;AAE9E,OAAO,EAGL,YAAY,EAGb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAM1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAO3D,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,gIAAgI;IAChI,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,yDAAyD;IACzD,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,iGAAiG;IACjG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,6CAA6C;AAC7C,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,YAAY,EAAE,SAAS,CAAC;IACxB,+CAA+C;IAC/C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0GAA0G;IAC1G,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,8CAA8C;IAC9C,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,0DAA0D;IAC1D,UAAU,EAAE,SAAS,CAAC;IACtB,wFAAwF;IACxF,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,GAAI,wGAM9B,uBAAuB,KAAG,sBA+H5B,CAAC"}
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, Highlight as r, RequestStatus as i, ResponseFormat as a, buildCssVars as o, mergeClasses as s, useIsMobile as c } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as l, ButtonAppearance as u, ButtonVariant as d, DIAL_ICON_SIZE as f, DialButton as p, DialCloseButton as m, DialDropdown as h, DialDropdownIcon as g, DialErrorText as _, DialGhostIconButton as v, DialInput as y, DialPopup as b, DialPrimaryButton as x, DialRadioGroup as S, DialSearch as C, DialSkeleton as w, DialSkeletonVariant as T, DialSlider as E, DialTag as D, DialTooltip as O, ElementSize as k, PopupSize as ee, RadioGroupOrientation as A } from "@epam/ai-dial-ui-kit";
1
+ import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, RequestStatus as r, ResponseFormat as i, buildCssVars as a, mergeClasses as o, useIsMobile as s } from "@epam/ai-dial-chat-shared";
2
+ import { BASE_ICON_SIZE as c, ButtonAppearance as l, ButtonVariant as u, DIAL_ICON_SIZE as d, DialButton as f, DialCloseButton as p, DialDropdown as m, DialDropdownIcon as h, DialErrorText as g, DialGhostIconButton as _, DialInput as v, DialPopup as y, DialPrimaryButton as b, DialRadioGroup as x, DialSearch as S, DialSkeleton as C, DialSkeletonVariant as w, DialSlider as T, DialTag as E, DialTooltip as D, ElementSize as O, Highlight as k, PopupSize as ee, RadioGroupOrientation as A } from "@epam/ai-dial-ui-kit";
3
3
  import { IconArrowLeft as te, IconArrowNarrowRight as ne, IconCheck as re, IconChevronDown as ie, IconChevronRight as ae, IconFile as oe, IconMicrophone as se, IconPaperclip as j, IconPlayerStopFilled as ce, IconPlaystationSquare as le, IconPlus as ue, IconSettings as de, IconX as fe } from "@tabler/icons-react";
4
4
  import { createPortal as pe } from "react-dom";
5
5
  import { createElement as me, memo as he, useCallback as M, useEffect as N, useImperativeHandle as P, useLayoutEffect as ge, useMemo as F, useRef as I, useState as L } from "react";
@@ -24,24 +24,24 @@ var Te = (e, t) => {
24
24
  "slide-up": "_slide-up_3xrn0_1",
25
25
  title: "_title_3xrn0_18",
26
26
  divider: "_divider_3xrn0_22"
27
- }, U = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: c, titleClassName: l = "dial-body-semi-text", className: u, children: d }) => (Te(e, r), !e || typeof document > "u" ? null : pe(/* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("div", {
28
- className: s(H.backdrop, "fixed inset-0 z-[55]"),
27
+ }, U = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": s, style: c, titleClassName: l = "dial-body-semi-text", className: u, children: f }) => (Te(e, r), !e || typeof document > "u" ? null : pe(/* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("div", {
28
+ className: o(H.backdrop, "fixed inset-0 z-[55]"),
29
29
  onPointerDown: r,
30
30
  "aria-hidden": !0
31
31
  }), /* @__PURE__ */ B("div", {
32
32
  role: "dialog",
33
33
  "aria-modal": !0,
34
- "aria-label": t ?? o,
34
+ "aria-label": t ?? s,
35
35
  style: c,
36
- className: s(H.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col", u),
36
+ className: o(H.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col", u),
37
37
  children: [t != null && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
38
38
  className: "relative flex h-[60px] flex-shrink-0 items-center justify-center px-4",
39
39
  children: [
40
40
  i && /* @__PURE__ */ z("div", {
41
41
  className: "absolute start-4",
42
- children: /* @__PURE__ */ z(v, {
42
+ children: /* @__PURE__ */ z(_, {
43
43
  icon: /* @__PURE__ */ z(te, {
44
- size: f.LG,
44
+ size: d.LG,
45
45
  stroke: 1.5,
46
46
  className: "rtl:scale-x-[-1]"
47
47
  }),
@@ -50,27 +50,27 @@ var Te = (e, t) => {
50
50
  })
51
51
  }),
52
52
  /* @__PURE__ */ z("span", {
53
- className: s(H.title, l),
53
+ className: o(H.title, l),
54
54
  children: t
55
55
  }),
56
56
  /* @__PURE__ */ z("div", {
57
57
  className: "absolute end-4 m-2",
58
- children: /* @__PURE__ */ z(m, {
58
+ children: /* @__PURE__ */ z(p, {
59
59
  ariaLabel: n,
60
- size: f.LG,
60
+ size: d.LG,
61
61
  onClose: r
62
62
  })
63
63
  })
64
64
  ]
65
65
  }), /* @__PURE__ */ z("div", { className: "h-px flex-shrink-0" })] }), /* @__PURE__ */ z("div", {
66
66
  className: "overflow-y-auto",
67
- children: d
67
+ children: f
68
68
  })]
69
69
  })] }), document.body)), Ee = async (e, t, n) => {
70
70
  let r = 6e4 / t, i = [];
71
71
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
72
72
  await Promise.allSettled(i);
73
- }, De = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
73
+ }, De = ({ initialAttachments: n, onUploadAttachment: i, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
74
74
  let [h, g] = L(n), _ = I(h);
75
75
  N(() => {
76
76
  _.current = h;
@@ -80,14 +80,14 @@ var Te = (e, t) => {
80
80
  });
81
81
  }, []);
82
82
  let v = M((e) => e.map((e) => {
83
- let n = e.type.startsWith("image/"), r = e.type.startsWith("audio/"), a = n ? URL.createObjectURL(e) : void 0, o = r ? URL.createObjectURL(e) : void 0;
83
+ let n = e.type.startsWith("image/"), i = e.type.startsWith("audio/"), a = n ? URL.createObjectURL(e) : void 0, o = i ? URL.createObjectURL(e) : void 0;
84
84
  return {
85
85
  id: Se(),
86
86
  name: e.name,
87
87
  contentType: e.type,
88
88
  file: e,
89
- type: n ? t.Image : r ? t.Audio : t.File,
90
- status: i.Idle,
89
+ type: n ? t.Image : i ? t.Audio : t.File,
90
+ status: r.Idle,
91
91
  previewUrl: a,
92
92
  playUrl: o
93
93
  };
@@ -99,46 +99,46 @@ var Te = (e, t) => {
99
99
  }, [a]), b = M((e) => {
100
100
  g(e), a?.(e);
101
101
  }, [a]), x = M(async (t) => {
102
- if (r) {
102
+ if (i) {
103
103
  y((e) => e.map((e) => e.id === t.id ? {
104
104
  ...e,
105
- status: i.Loading
105
+ status: r.Loading
106
106
  } : e));
107
107
  try {
108
- let e = await r(t);
108
+ let e = await i(t);
109
109
  y((n) => n.map((n) => n.id === t.id ? {
110
110
  ...n,
111
- status: i.Idle,
111
+ status: r.Idle,
112
112
  url: e
113
113
  } : n));
114
114
  } catch (n) {
115
- let r = typeof n == "object" && n && "errorReason" in n && Object.values(e).includes(n.errorReason) ? n.errorReason : void 0;
115
+ let i = typeof n == "object" && n && "errorReason" in n && Object.values(e).includes(n.errorReason) ? n.errorReason : void 0;
116
116
  y((e) => e.map((e) => e.id === t.id ? {
117
117
  ...e,
118
- status: i.Error,
119
- ...r != null && { errorReason: r }
118
+ status: r.Error,
119
+ ...i != null && { errorReason: i }
120
120
  } : e));
121
121
  }
122
122
  }
123
- }, [r, y]), S = M((e, t = !0) => {
124
- let n = new Set(_.current.map((e) => e.id)), r = e.filter((e) => !n.has(e.id));
125
- if (r.length !== 0) {
123
+ }, [i, y]), S = M((e, t = !0) => {
124
+ let n = new Set(_.current.map((e) => e.id)), i = e.filter((e) => !n.has(e.id));
125
+ if (i.length !== 0) {
126
126
  if (f != null && f > 0 && Number.isFinite(f)) {
127
- let e = p + _.current.length + r.length;
127
+ let e = p + _.current.length + i.length;
128
128
  if (e > f) {
129
- r.forEach((e) => {
129
+ i.forEach((e) => {
130
130
  e.previewUrl && URL.revokeObjectURL(e.previewUrl);
131
131
  }), m?.(e, f);
132
132
  return;
133
133
  }
134
134
  }
135
- if (y((e) => [...e, ...r]), t) {
135
+ if (y((e) => [...e, ...i]), t) {
136
136
  let e = [];
137
- r.forEach((t) => {
137
+ i.forEach((t) => {
138
138
  let n = o?.(t);
139
139
  n == null ? e.push(t) : y((e) => e.map((e) => e.id === t.id ? {
140
140
  ...e,
141
- status: i.Error,
141
+ status: r.Error,
142
142
  errorReason: n
143
143
  } : e));
144
144
  }), Ee(e, xe, x);
@@ -167,26 +167,26 @@ var Te = (e, t) => {
167
167
  l
168
168
  ]), N(() => {
169
169
  if (!o) return;
170
- let t = !1, n = [], r = _.current.map((r) => {
171
- if (r.status === i.Loading) return r;
172
- let a = o(r);
173
- if (a != null) return r.status === i.Error && r.errorReason === a ? r : (t = !0, {
174
- ...r,
175
- status: i.Error,
170
+ let t = !1, n = [], i = _.current.map((i) => {
171
+ if (i.status === r.Loading) return i;
172
+ let a = o(i);
173
+ if (a != null) return i.status === r.Error && i.errorReason === a ? i : (t = !0, {
174
+ ...i,
175
+ status: r.Error,
176
176
  errorReason: a
177
177
  });
178
- if (r.errorReason === e.UnsupportedType) {
178
+ if (i.errorReason === e.UnsupportedType) {
179
179
  t = !0;
180
180
  let e = {
181
- ...r,
182
- status: i.Idle,
181
+ ...i,
182
+ status: r.Idle,
183
183
  errorReason: void 0
184
184
  };
185
185
  return e.url ?? n.push(e), e;
186
186
  }
187
- return r;
187
+ return i;
188
188
  });
189
- t && y(() => r), n.forEach((e) => void x(e));
189
+ t && y(() => i), n.forEach((e) => void x(e));
190
190
  }, [
191
191
  o,
192
192
  y,
@@ -218,7 +218,7 @@ var Te = (e, t) => {
218
218
  C,
219
219
  d
220
220
  ]),
221
- hasBlockedAttachments: h.some((e) => e.status === i.Loading || e.status === i.Error)
221
+ hasBlockedAttachments: h.some((e) => e.status === r.Loading || e.status === r.Error)
222
222
  };
223
223
  }, Oe = (e, t) => {
224
224
  let [n, r] = L(e), [i, a] = L(!1), [o, s] = L(0);
@@ -334,7 +334,7 @@ var Te = (e, t) => {
334
334
  }({}), Re = {
335
335
  item: "_item_vou13_1",
336
336
  itemIcon: "_itemIcon_vou13_11"
337
- }, ze = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: c = "dial-body-semi-text", itemLabelClassName: l = "dial-small-text", btnTextClassName: u = "" }) => {
337
+ }, ze = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: s, titleClassName: c = "dial-body-semi-text", itemLabelClassName: l = "dial-small-text", btnTextClassName: u = "" }) => {
338
338
  let d = (e) => {
339
339
  e(), r();
340
340
  };
@@ -344,14 +344,14 @@ var Te = (e, t) => {
344
344
  closeLabel: n,
345
345
  onClose: r,
346
346
  style: i,
347
- className: o,
347
+ className: s,
348
348
  titleClassName: c,
349
349
  children: /* @__PURE__ */ z("ul", {
350
350
  role: "list",
351
351
  className: "flex flex-col",
352
- children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ z("li", { children: /* @__PURE__ */ z(p, {
352
+ children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ z("li", { children: /* @__PURE__ */ z(f, {
353
353
  type: "button",
354
- className: s(Re.item, "flex w-full items-center gap-3 px-4 py-[10px] text-start"),
354
+ className: o(Re.item, "flex w-full items-center gap-3 px-4 py-[10px] text-start"),
355
355
  iconBefore: /* @__PURE__ */ z("span", {
356
356
  className: Re.itemIcon,
357
357
  children: n
@@ -370,8 +370,8 @@ var Te = (e, t) => {
370
370
  })
371
371
  });
372
372
  }, Be = ({ gradientId: e = "gradient-check-icon" }) => /* @__PURE__ */ B("svg", {
373
- width: f.SM,
374
- height: f.SM,
373
+ width: d.SM,
374
+ height: d.SM,
375
375
  viewBox: "0 0 24 24",
376
376
  fill: "none",
377
377
  "aria-hidden": !0,
@@ -411,11 +411,11 @@ he(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
411
411
  role: "tab",
412
412
  "aria-selected": r,
413
413
  className: "contents",
414
- children: /* @__PURE__ */ z(D, {
414
+ children: /* @__PURE__ */ z(E, {
415
415
  label: e.label,
416
416
  selected: r,
417
417
  onClick: () => n(e.id),
418
- className: s("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, Ve.tabContainer, r && Ve.tabActive)
418
+ className: o("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, Ve.tabContainer, r && Ve.tabActive)
419
419
  })
420
420
  }, e.id);
421
421
  })
@@ -423,10 +423,10 @@ he(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
423
423
  });
424
424
  //#endregion
425
425
  //#region ../ai-dial-kit/src/components/Button/Buttons.tsx
426
- var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p, {
426
+ var W = (e) => /* @__PURE__ */ z(b, { ...e }), He = (e) => /* @__PURE__ */ z(f, {
427
427
  ...e,
428
- variant: d.Neutral,
429
- appearance: u.Outlined
428
+ variant: u.Neutral,
429
+ appearance: l.Outlined
430
430
  }), G = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
431
431
  let [s, c] = L(t), [l, u] = L(n), [d, f] = L(r), p = I(o);
432
432
  N(() => {
@@ -460,30 +460,30 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
460
460
  a
461
461
  ])
462
462
  };
463
- }, K = "!dial-small-semi-text !text-primary gap-1", Ue = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: o, onTemperatureChange: s, responseFormatLabel: c = "Response format", responseFormatHint: l = "Applies to new and existing messages", responseFormatMarkdownLabel: u = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: m = "Temperature", temperatureLabels: h = [
463
+ }, K = "!dial-small-semi-text !text-primary gap-1", Ue = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: a, onSystemPromptChange: o, onTemperatureChange: s, responseFormatLabel: c = "Response format", responseFormatHint: l = "Applies to new and existing messages", responseFormatMarkdownLabel: u = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: m = "Temperature", temperatureLabels: h = [
464
464
  "Precise",
465
465
  "Neutral",
466
466
  "Creative"
467
467
  ], temperatureHint: g }) => /* @__PURE__ */ B("div", {
468
468
  className: "flex flex-col gap-4 px-6 py-3",
469
469
  children: [
470
- e.responseFormat && /* @__PURE__ */ z(S, {
470
+ e.responseFormat && /* @__PURE__ */ z(x, {
471
471
  fieldTitle: c,
472
472
  labelClassName: K,
473
473
  elementId: "response-format",
474
474
  orientation: A.Column,
475
- activeRadioButton: t ?? a.Markdown,
475
+ activeRadioButton: t ?? i.Markdown,
476
476
  labelDescription: l,
477
477
  radioButtons: [{
478
- id: a.Markdown,
478
+ id: i.Markdown,
479
479
  name: u
480
480
  }, {
481
- id: a.PlainText,
481
+ id: i.PlainText,
482
482
  name: d
483
483
  }],
484
- onChange: (e) => i(e)
484
+ onChange: (e) => a(e)
485
485
  }),
486
- e.systemPrompt && /* @__PURE__ */ z(y, {
486
+ e.systemPrompt && /* @__PURE__ */ z(v, {
487
487
  value: n,
488
488
  placeholder: p,
489
489
  labelProps: {
@@ -492,7 +492,7 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
492
492
  },
493
493
  onChange: (e) => o(e ?? "")
494
494
  }),
495
- e.temperature && /* @__PURE__ */ z(E, {
495
+ e.temperature && /* @__PURE__ */ z(T, {
496
496
  labelProps: {
497
497
  label: m,
498
498
  className: K,
@@ -506,10 +506,10 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
506
506
  onChange: s
507
507
  })
508
508
  ]
509
- }), We = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
510
- let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = G({
509
+ }), We = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
510
+ let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: O, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = G({
511
511
  isOpen: e,
512
- features: o,
512
+ features: s,
513
513
  initialResponseFormat: c,
514
514
  initialSystemPrompt: l,
515
515
  initialTemperature: u,
@@ -525,7 +525,7 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
525
525
  backLabel: n,
526
526
  style: a,
527
527
  children: [/* @__PURE__ */ z(Ue, {
528
- features: o,
528
+ features: s,
529
529
  responseFormat: w,
530
530
  systemPrompt: T,
531
531
  temperature: E,
@@ -542,22 +542,22 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
542
542
  temperatureLabels: b,
543
543
  temperatureHint: x
544
544
  }), /* @__PURE__ */ z("div", {
545
- className: s("px-6 py-4 mobile:pb-8"),
546
- children: /* @__PURE__ */ z(O, {
545
+ className: o("px-6 py-4 mobile:pb-8"),
546
+ children: /* @__PURE__ */ z(D, {
547
547
  tooltip: C,
548
- hideTooltip: D || !C,
548
+ hideTooltip: O || !C,
549
549
  triggerClassName: "w-full",
550
550
  children: /* @__PURE__ */ z(W, {
551
551
  label: S,
552
552
  onClick: te,
553
- disabled: !D,
553
+ disabled: !O,
554
554
  className: "w-full"
555
555
  })
556
556
  })
557
557
  })]
558
558
  });
559
559
  }, q = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", responseFormatLabel: s, responseFormatHint: c, responseFormatMarkdownLabel: l, responseFormatPlainTextLabel: u, systemPromptLabel: d, systemPromptTooltip: f, temperatureLabel: p, temperatureLabels: m, temperatureHint: h, saveLabel: g = "Apply changes", saveDisabledTooltip: _ }) => {
560
- let { responseFormat: v, systemPrompt: y, temperature: x, canSubmit: S, setResponseFormat: C, setSystemPrompt: w, setTemperature: T, handleSubmit: E } = G({
560
+ let { responseFormat: v, systemPrompt: b, temperature: x, canSubmit: S, setResponseFormat: C, setSystemPrompt: w, setTemperature: T, handleSubmit: E } = G({
561
561
  features: e,
562
562
  initialResponseFormat: t,
563
563
  initialSystemPrompt: n,
@@ -565,7 +565,7 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
565
565
  onSave: i,
566
566
  onClose: a
567
567
  });
568
- return /* @__PURE__ */ z(b, {
568
+ return /* @__PURE__ */ z(y, {
569
569
  open: !0,
570
570
  header: o,
571
571
  size: ee.Sm,
@@ -573,7 +573,7 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
573
573
  className: "!bg-layer-2",
574
574
  footer: /* @__PURE__ */ z("div", {
575
575
  className: "flex justify-end px-6 py-4",
576
- children: /* @__PURE__ */ z(O, {
576
+ children: /* @__PURE__ */ z(D, {
577
577
  tooltip: _,
578
578
  hideTooltip: S || !_,
579
579
  children: /* @__PURE__ */ z(W, {
@@ -586,7 +586,7 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
586
586
  children: /* @__PURE__ */ z(Ue, {
587
587
  features: e,
588
588
  responseFormat: v,
589
- systemPrompt: y,
589
+ systemPrompt: b,
590
590
  temperature: x,
591
591
  onResponseFormatChange: C,
592
592
  onSystemPromptChange: w,
@@ -606,27 +606,27 @@ var W = (e) => /* @__PURE__ */ z(x, { ...e }), He = (e) => /* @__PURE__ */ z(p,
606
606
  he(q);
607
607
  //#endregion
608
608
  //#region src/components/AddAttachmentButton/AddAttachmentButton.tsx
609
- var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: i, style: o, listClassName: u = "cp-dropdown-overlay !w-[240px]", isDisabled: d = !1, chatSettings: p, extraMenuItems: m }) => {
610
- let g = c(), [_, y] = L(!1), [b, x] = L(!1), S = F(() => [
609
+ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: a, style: l, listClassName: u = "cp-dropdown-overlay !w-[240px]", isDisabled: f = !1, chatSettings: p, extraMenuItems: h }) => {
610
+ let g = s(), [v, y] = L(!1), [b, x] = L(!1), S = F(() => [
611
611
  ...e == null ? [] : [{
612
612
  key: "attach",
613
613
  label: t,
614
614
  icon: /* @__PURE__ */ z(j, {
615
- size: l,
615
+ size: c,
616
616
  "aria-hidden": !0
617
617
  }),
618
618
  onClick: e
619
619
  }],
620
- ...m ?? [],
620
+ ...h ?? [],
621
621
  ...p == null ? [] : [{
622
622
  key: "chat-settings",
623
623
  label: p.menuItemLabel ?? "Chat settings",
624
624
  icon: /* @__PURE__ */ z(de, {
625
- size: l,
625
+ size: c,
626
626
  "aria-hidden": !0
627
627
  }),
628
628
  iconAfter: g ? /* @__PURE__ */ z(ae, {
629
- size: l,
629
+ size: c,
630
630
  stroke: 1.5,
631
631
  className: "text-secondary rtl:scale-x-[-1]",
632
632
  "aria-hidden": !0
@@ -637,26 +637,26 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
637
637
  t,
638
638
  e,
639
639
  p,
640
- m,
640
+ h,
641
641
  g
642
642
  ]);
643
643
  return S.length === 0 ? null : /* @__PURE__ */ z(R, { children: g ? /* @__PURE__ */ B(R, { children: [
644
- /* @__PURE__ */ z(v, {
644
+ /* @__PURE__ */ z(_, {
645
645
  icon: /* @__PURE__ */ z(ue, {
646
- size: f.LG,
646
+ size: d.LG,
647
647
  "aria-hidden": !0
648
648
  }),
649
649
  "aria-label": n,
650
650
  tooltipProps: { tooltip: n },
651
- className: s("size-10 flex-shrink-0", d && "pointer-events-none opacity-50"),
651
+ className: o("size-10 flex-shrink-0", f && "pointer-events-none opacity-50"),
652
652
  onClick: () => y(!0)
653
653
  }),
654
654
  /* @__PURE__ */ z(ze, {
655
- isOpen: _,
655
+ isOpen: v,
656
656
  title: r,
657
- closeLabel: i,
657
+ closeLabel: a,
658
658
  onClose: () => y(!1),
659
- style: o,
659
+ style: l,
660
660
  items: S,
661
661
  className: "pb-4",
662
662
  btnTextClassName: "flex-1"
@@ -668,10 +668,10 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
668
668
  },
669
669
  backLabel: p.backLabel ?? "Back",
670
670
  onClose: () => x(!1),
671
- closeLabel: i,
672
- style: o,
671
+ closeLabel: a,
672
+ style: l,
673
673
  features: p.features,
674
- initialResponseFormat: p.responseFormat ?? a.Markdown,
674
+ initialResponseFormat: p.responseFormat ?? i.Markdown,
675
675
  initialSystemPrompt: p.systemPrompt,
676
676
  initialTemperature: p.temperature,
677
677
  onSave: p.onSave,
@@ -688,24 +688,24 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
688
688
  saveLabel: p.saveLabel,
689
689
  saveDisabledTooltip: p.saveDisabledTooltip
690
690
  })
691
- ] }) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(h, {
691
+ ] }) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(m, {
692
692
  matchReferenceWidth: !1,
693
693
  placement: "bottom-start",
694
694
  listClassName: u,
695
695
  items: S,
696
- children: /* @__PURE__ */ z(v, {
696
+ children: /* @__PURE__ */ z(_, {
697
697
  icon: /* @__PURE__ */ z(ue, {
698
- size: f.LG,
698
+ size: d.LG,
699
699
  "aria-hidden": !0
700
700
  }),
701
701
  "aria-label": n,
702
702
  tooltipProps: { tooltip: n },
703
703
  className: "size-10 flex-shrink-0",
704
- disabled: d
704
+ disabled: f
705
705
  })
706
706
  }), p != null && b && /* @__PURE__ */ z(q, {
707
707
  features: p.features,
708
- initialResponseFormat: p.responseFormat ?? a.Markdown,
708
+ initialResponseFormat: p.responseFormat ?? i.Markdown,
709
709
  initialSystemPrompt: p.systemPrompt,
710
710
  initialTemperature: p.temperature,
711
711
  onSave: p.onSave,
@@ -731,14 +731,14 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
731
731
  stopRecordingIcon: "_stopRecordingIcon_8j81i_28",
732
732
  recordingDot: "_recordingDot_8j81i_42",
733
733
  "recording-pulse": "_recording-pulse_8j81i_1"
734
- }, Ke = 3, Y = 4, X = 200, qe = (e) => `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`, Je = ({ state: e, analyserNodeRef: t, elapsedSeconds: n, errorMessage: r, onStop: i, onDiscard: a, stopLabel: o = "Stop recording", discardLabel: c = "Discard recording", timerLabel: l = "Recording time", style: u, className: d }) => {
735
- let p = I(null), m = I(new Float32Array(X)), h = I(0), g = I(0), y = e === Ne.Recording, b = e === Ne.Error, x = M((e) => {
734
+ }, Ke = 3, Y = 4, X = 200, qe = (e) => `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`, Je = ({ state: e, analyserNodeRef: t, elapsedSeconds: n, errorMessage: r, onStop: i, onDiscard: a, stopLabel: s = "Stop recording", discardLabel: c = "Discard recording", timerLabel: l = "Recording time", style: u, className: f }) => {
735
+ let p = I(null), m = I(new Float32Array(X)), h = I(0), v = I(0), y = e === Ne.Recording, b = e === Ne.Error, x = M((e) => {
736
736
  let t = e.getContext("2d");
737
737
  if (!t) return;
738
738
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
739
739
  let { width: n, height: r } = e;
740
740
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
741
- let i = Math.min(Math.max(1, Math.floor(n / Y)), X - 1), a = h.current, o = g.current;
741
+ let i = Math.min(Math.max(1, Math.floor(n / Y)), X - 1), a = h.current, o = v.current;
742
742
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
743
743
  for (let e = 0; e <= i; e++) {
744
744
  let n = ((a - i + e) % X + X) % X, o = m.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
@@ -750,10 +750,10 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
750
750
  if (!y) return;
751
751
  let e = p.current;
752
752
  if (!e) return;
753
- m.current.fill(0), h.current = 0, g.current = 0;
753
+ m.current.fill(0), h.current = 0, v.current = 0;
754
754
  let n, r = () => {
755
- if (g.current += 1, g.current >= Y) {
756
- g.current -= Y;
755
+ if (v.current += 1, v.current >= Y) {
756
+ v.current -= Y;
757
757
  let e = t.current;
758
758
  if (e) {
759
759
  let t = new Uint8Array(e.frequencyBinCount);
@@ -785,46 +785,46 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
785
785
  }, [x]);
786
786
  let S = /* @__PURE__ */ B("div", {
787
787
  className: "flex flex-shrink-0 items-center justify-end gap-1",
788
- children: [/* @__PURE__ */ z(v, {
788
+ children: [/* @__PURE__ */ z(_, {
789
789
  icon: /* @__PURE__ */ z(fe, {
790
- size: f.LG,
790
+ size: d.LG,
791
791
  "aria-hidden": !0
792
792
  }),
793
793
  "aria-label": c,
794
794
  className: "size-10 flex-shrink-0",
795
795
  onClick: a
796
- }), y && /* @__PURE__ */ z(v, {
796
+ }), y && /* @__PURE__ */ z(_, {
797
797
  icon: /* @__PURE__ */ z(ce, {
798
- size: f.LG,
798
+ size: d.LG,
799
799
  className: J.stopRecordingIcon,
800
800
  "aria-hidden": !0
801
801
  }),
802
- "aria-label": o,
802
+ "aria-label": s,
803
803
  className: "size-10 flex-shrink-0",
804
804
  onClick: i
805
805
  })]
806
806
  });
807
807
  return /* @__PURE__ */ B("div", {
808
- className: d,
808
+ className: f,
809
809
  children: [/* @__PURE__ */ B("div", {
810
810
  style: u,
811
- className: s(J.container, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", b && J.containerError),
811
+ className: o(J.container, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", b && J.containerError),
812
812
  children: [/* @__PURE__ */ B("div", {
813
813
  className: "flex min-w-0 flex-1 items-center gap-2",
814
814
  children: [y && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("span", {
815
815
  className: J.recordingDot,
816
816
  "aria-hidden": !0
817
817
  }), /* @__PURE__ */ z("span", {
818
- className: s(J.timer, "flex-shrink-0"),
818
+ className: o(J.timer, "flex-shrink-0"),
819
819
  "aria-label": l,
820
820
  children: qe(n)
821
821
  })] }), /* @__PURE__ */ z("canvas", {
822
822
  ref: p,
823
823
  height: 32,
824
- className: s(J.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
824
+ className: o(J.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
825
825
  })]
826
826
  }), S]
827
- }), b && r && /* @__PURE__ */ z(_, {
827
+ }), b && r && /* @__PURE__ */ z(g, {
828
828
  text: r,
829
829
  className: "mt-1 px-1"
830
830
  })]
@@ -841,39 +841,39 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
841
841
  sendButtonEnter: "_sendButtonEnter_1q2nu_1",
842
842
  sendButtonExiting: "_sendButtonExiting_1q2nu_55",
843
843
  sendButtonExit: "_sendButtonExit_1q2nu_55"
844
- }, Ye = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", title: r, isExiting: i = !1 }) => /* @__PURE__ */ z(O, {
844
+ }, Ye = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", title: r, isExiting: i = !1 }) => /* @__PURE__ */ z(D, {
845
845
  tooltip: r,
846
846
  hideTooltip: !r,
847
847
  children: /* @__PURE__ */ z("button", {
848
- className: s("flex size-[32px] cursor-pointer items-center justify-center rounded-full disabled:cursor-not-allowed", Z.sendButton, i && Z.sendButtonExiting),
848
+ className: o("flex size-[32px] cursor-pointer items-center justify-center rounded-full disabled:cursor-not-allowed", Z.sendButton, i && Z.sendButtonExiting),
849
849
  "aria-label": n,
850
850
  onClick: () => e?.(),
851
851
  type: "button",
852
852
  disabled: t,
853
853
  "aria-hidden": i,
854
854
  children: /* @__PURE__ */ z(ne, {
855
- size: f.LG,
855
+ size: d.LG,
856
856
  className: "rtl:scale-x-[-1]"
857
857
  })
858
858
  })
859
859
  }), Xe = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ z("button", {
860
- className: s("flex cursor-pointer items-center justify-center disabled:cursor-not-allowed"),
860
+ className: o("flex cursor-pointer items-center justify-center disabled:cursor-not-allowed"),
861
861
  "aria-label": t,
862
862
  onClick: () => e?.(),
863
863
  type: "button",
864
864
  children: /* @__PURE__ */ z(le, {
865
- size: f.LG,
865
+ size: d.LG,
866
866
  className: Z.stopIcon
867
867
  })
868
- }), Ze = ({ size: e = 20 }) => /* @__PURE__ */ z(w, {
869
- variant: T.Circular,
868
+ }), Ze = ({ size: e = 20 }) => /* @__PURE__ */ z(C, {
869
+ variant: w.Circular,
870
870
  width: e,
871
871
  height: e,
872
872
  active: !0
873
873
  }), Qe = ({ loadingLabel: e }) => /* @__PURE__ */ B("span", {
874
874
  className: "flex min-w-0 flex-1 items-center",
875
- children: [/* @__PURE__ */ z(w, {
876
- variant: T.Text,
875
+ children: [/* @__PURE__ */ z(C, {
876
+ variant: w.Text,
877
877
  width: "100%",
878
878
  height: 16,
879
879
  active: !0
@@ -897,70 +897,70 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
897
897
  size: i,
898
898
  labels: { tooltip: a },
899
899
  initialsName: r
900
- }), rt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: i, searchHeaderClassName: a = "bg-layer-0" }) => {
901
- let [o, c] = L(""), l = F(() => e?.find((e) => e.id === t), [e, t]), u = i?.loading !== void 0, d = F(() => u ? /* @__PURE__ */ z(Ze, { size: f.LG }) : nt(l?.iconUrl, l?.type, l?.displayName ?? l?.id ?? "", f.LG), [u, l]), p = l?.displayName ?? l?.id;
900
+ }), rt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = "bg-layer-0" }) => {
901
+ let [a, s] = L(""), c = F(() => e?.find((e) => e.id === t), [e, t]), l = r?.loading !== void 0, u = F(() => l ? /* @__PURE__ */ z(Ze, { size: d.LG }) : nt(c?.iconUrl, c?.type, c?.displayName ?? c?.id ?? "", d.LG), [l, c]), f = c?.displayName ?? c?.id;
902
902
  return {
903
- selectorIcon: d,
904
- selectorAriaLabel: p ? `${i?.ariaLabel ?? "Select model"}: ${p}` : i?.ariaLabel ?? "Select model",
905
- selectedLabel: p,
903
+ selectorIcon: u,
904
+ selectorAriaLabel: f ? `${r?.ariaLabel ?? "Select model"}: ${f}` : r?.ariaLabel ?? "Select model",
905
+ selectedLabel: f,
906
906
  menuItems: F(() => {
907
- if (u) return Array.from({ length: 7 }, (e, t) => ({
907
+ if (l) return Array.from({ length: 7 }, (e, t) => ({
908
908
  key: `__loading-${t}`,
909
909
  icon: /* @__PURE__ */ z(Ze, {}),
910
- label: /* @__PURE__ */ z(Qe, { loadingLabel: t === 0 ? i?.loading : void 0 }),
910
+ label: /* @__PURE__ */ z(Qe, { loadingLabel: t === 0 ? r?.loading : void 0 }),
911
911
  disabled: !0
912
912
  }));
913
913
  if (!e || e.length === 0) {
914
- let e = i?.error ?? i?.empty;
914
+ let e = r?.error ?? r?.empty;
915
915
  return e ? [{
916
916
  key: "__state",
917
917
  label: e,
918
918
  disabled: !0
919
919
  }] : [];
920
920
  }
921
- return tt(e, o).map((e) => {
922
- let i = e.id === t;
921
+ return tt(e, a).map((e) => {
922
+ let r = e.id === t;
923
923
  return {
924
924
  key: e.id,
925
925
  label: /* @__PURE__ */ B("span", {
926
926
  className: "flex w-full items-center justify-between gap-2",
927
- children: [/* @__PURE__ */ z(r, {
927
+ children: [/* @__PURE__ */ z(k, {
928
928
  text: et(e),
929
- query: o,
929
+ query: a,
930
930
  maxLines: 1
931
- }), i && /* @__PURE__ */ z(Be, { gradientId: "ms-check-grad" })]
931
+ }), r && /* @__PURE__ */ z(Be, { gradientId: "ms-check-grad" })]
932
932
  }),
933
933
  icon: nt(e.iconUrl, e.type, e.displayName ?? e.id),
934
934
  onClick: () => n?.(e.id),
935
- className: i ? "bg-accent-primary-alpha" : void 0
935
+ className: r ? "bg-accent-primary-alpha" : void 0
936
936
  };
937
937
  });
938
938
  }, [
939
939
  e,
940
- u,
941
- o,
940
+ l,
941
+ a,
942
942
  t,
943
- i,
943
+ r,
944
944
  n
945
945
  ]),
946
- menuHeader: F(() => !u && e && e.length > 0 ? /* @__PURE__ */ z("div", {
947
- className: s("sticky top-0 z-10 pb-1 pe-2 pt-2", a),
948
- children: /* @__PURE__ */ z(C, {
949
- value: o,
950
- placeholder: i?.searchPlaceholder ?? "Search",
951
- size: k.Small,
946
+ menuHeader: F(() => !l && e && e.length > 0 ? /* @__PURE__ */ z("div", {
947
+ className: o("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
948
+ children: /* @__PURE__ */ z(S, {
949
+ value: a,
950
+ placeholder: r?.searchPlaceholder ?? "Search",
951
+ size: O.Small,
952
952
  wrapperClassName: "border-0",
953
- onChange: c
953
+ onChange: s
954
954
  })
955
955
  }) : void 0, [
956
956
  e,
957
- u,
958
- o,
959
- i,
960
- a
957
+ l,
958
+ a,
959
+ r,
960
+ i
961
961
  ]),
962
962
  onOpenChange: (e) => {
963
- e || c("");
963
+ e || s("");
964
964
  }
965
965
  };
966
966
  }, it = typeof window < "u" ? ge : N;
@@ -1412,35 +1412,35 @@ var Ct = {
1412
1412
  itemIcon: "_itemIcon_3wv6u_15",
1413
1413
  checkIcon: "_checkIcon_3wv6u_19",
1414
1414
  stateLabel: "_stateLabel_3wv6u_23"
1415
- }, wt = 44, Tt = 8, Et = ({ index: e, style: t, ariaAttributes: n, items: i, selectedDeploymentId: a, labelClassName: o, query: c, onSelect: l }) => {
1416
- let u = i[e], d = nt(u.iconUrl, u.type, u.displayName ?? u.id, f.SM), m = u.id === a;
1415
+ }, wt = 44, Tt = 8, Et = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1416
+ let l = r[e], u = nt(l.iconUrl, l.type, l.displayName ?? l.id, d.SM), p = l.id === i;
1417
1417
  return /* @__PURE__ */ z("div", {
1418
1418
  style: t,
1419
1419
  ...n,
1420
- children: /* @__PURE__ */ z(p, {
1420
+ children: /* @__PURE__ */ z(f, {
1421
1421
  type: "button",
1422
- className: s(Ct.item, "flex h-full w-full items-center gap-3 px-4"),
1422
+ className: o(Ct.item, "flex h-full w-full items-center gap-3 px-4"),
1423
1423
  iconBefore: /* @__PURE__ */ z("span", {
1424
1424
  className: Ct.itemIcon,
1425
- children: d
1425
+ children: u
1426
1426
  }),
1427
1427
  label: /* @__PURE__ */ B("span", {
1428
1428
  className: "flex flex-1 items-center justify-between gap-2",
1429
- children: [/* @__PURE__ */ z(r, {
1430
- text: u.displayName ?? u.id,
1431
- query: c,
1429
+ children: [/* @__PURE__ */ z(k, {
1430
+ text: l.displayName ?? l.id,
1431
+ query: s,
1432
1432
  maxLines: 1,
1433
- className: s(o, "min-w-0 flex-1 text-start")
1434
- }), m && /* @__PURE__ */ z(re, {
1435
- size: f.SM,
1433
+ className: o(a, "min-w-0 flex-1 text-start")
1434
+ }), p && /* @__PURE__ */ z(re, {
1435
+ size: d.SM,
1436
1436
  className: Ct.checkIcon,
1437
1437
  "aria-hidden": !0
1438
1438
  })]
1439
1439
  }),
1440
- onClick: () => l(u.id)
1440
+ onClick: () => c(l.id)
1441
1441
  })
1442
1442
  });
1443
- }, Dt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: c, loadingLabel: l, errorLabel: u, emptyLabel: d, style: f, titleClassName: p = "dial-body-semi-text", labelClassName: m = "dial-small-text" }) => {
1443
+ }, Dt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: s, onSelect: c, loadingLabel: l, errorLabel: u, emptyLabel: d, style: f, titleClassName: p = "dial-body-semi-text", labelClassName: m = "dial-small-text" }) => {
1444
1444
  let [h, g] = L("");
1445
1445
  N(() => {
1446
1446
  e || g("");
@@ -1456,15 +1456,15 @@ var Ct = {
1456
1456
  className: "max-h-[80dvh]",
1457
1457
  children: [_ && !v && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("div", {
1458
1458
  className: "flex-shrink-0 px-4 py-[10px]",
1459
- children: /* @__PURE__ */ z(C, {
1459
+ children: /* @__PURE__ */ z(S, {
1460
1460
  value: h,
1461
1461
  placeholder: r,
1462
- size: k.Standard,
1462
+ size: O.Standard,
1463
1463
  onChange: g
1464
1464
  })
1465
- }), /* @__PURE__ */ z("div", { className: s(Ct.divider, "h-px flex-shrink-0") })] }), v ? /* @__PURE__ */ z($e, { loadingLabel: l }) : y ? /* @__PURE__ */ z("div", {
1465
+ }), /* @__PURE__ */ z("div", { className: o(Ct.divider, "h-px flex-shrink-0") })] }), v ? /* @__PURE__ */ z($e, { loadingLabel: l }) : y ? /* @__PURE__ */ z("div", {
1466
1466
  role: "list",
1467
- className: s(Ct.stateLabel, m, "px-4 py-4"),
1467
+ className: o(Ct.stateLabel, m, "px-4 py-4"),
1468
1468
  children: y
1469
1469
  }) : /* @__PURE__ */ z(St, {
1470
1470
  role: "list",
@@ -1475,7 +1475,7 @@ var Ct = {
1475
1475
  rowHeight: wt,
1476
1476
  rowProps: {
1477
1477
  items: b,
1478
- selectedDeploymentId: o,
1478
+ selectedDeploymentId: s,
1479
1479
  labelClassName: m,
1480
1480
  query: h,
1481
1481
  onSelect: (e) => {
@@ -1484,41 +1484,41 @@ var Ct = {
1484
1484
  }
1485
1485
  })]
1486
1486
  });
1487
- }, Ot = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isInputDisabled: o = !1, isDisabled: c = !1, style: l, modelPickerOverlay: u, isPickerOpen: d, onPickerToggle: p, onPickerOpenChange: m }) => {
1488
- let [_, y] = L(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, menuItems: C, menuHeader: w, onOpenChange: T } = rt({
1487
+ }, Ot = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isInputDisabled: s = !1, isDisabled: c = !1, style: l, modelPickerOverlay: u, isPickerOpen: f, onPickerToggle: p, onPickerOpenChange: g }) => {
1488
+ let [v, y] = L(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, menuItems: C, menuHeader: w, onOpenChange: T } = rt({
1489
1489
  deployments: e,
1490
1490
  selectedDeploymentId: t,
1491
1491
  onDeploymentChange: n,
1492
1492
  modelSelectorLabels: r
1493
1493
  });
1494
1494
  if (!e) return null;
1495
- let E = i || c ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, D = /* @__PURE__ */ z(ie, {
1496
- size: f.SM,
1495
+ let E = i || c ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, k = /* @__PURE__ */ z(ie, {
1496
+ size: d.SM,
1497
1497
  className: Z.modelSelectorCaret,
1498
1498
  "aria-hidden": !0
1499
1499
  });
1500
- return a ? /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(O, {
1500
+ return a ? /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(D, {
1501
1501
  tooltip: S,
1502
- children: /* @__PURE__ */ z(v, {
1502
+ children: /* @__PURE__ */ z(_, {
1503
1503
  icon: /* @__PURE__ */ B("div", {
1504
1504
  className: "flex items-center gap-1",
1505
- children: [b, D]
1505
+ children: [b, k]
1506
1506
  }),
1507
1507
  "aria-label": x,
1508
1508
  onClick: () => {
1509
1509
  c || y(!0);
1510
1510
  },
1511
- className: s(Z.modelSelectorButton, E)
1511
+ className: o(Z.modelSelectorButton, E)
1512
1512
  })
1513
1513
  }), u ? /* @__PURE__ */ z(U, {
1514
- isOpen: _,
1514
+ isOpen: v,
1515
1515
  title: r?.ariaLabel ?? "Select model",
1516
1516
  closeLabel: r?.closeLabel ?? "Close",
1517
1517
  onClose: () => y(!1),
1518
1518
  style: l,
1519
1519
  children: u(() => y(!1))
1520
1520
  }) : /* @__PURE__ */ z(Dt, {
1521
- isOpen: _,
1521
+ isOpen: v,
1522
1522
  title: r?.ariaLabel ?? "Select model",
1523
1523
  closeLabel: r?.closeLabel ?? "Close",
1524
1524
  searchPlaceholder: r?.searchPlaceholder ?? "Search",
@@ -1530,33 +1530,33 @@ var Ct = {
1530
1530
  errorLabel: r?.error,
1531
1531
  emptyLabel: r?.empty,
1532
1532
  style: l
1533
- })] }) : u ? /* @__PURE__ */ z(h, {
1533
+ })] }) : u ? /* @__PURE__ */ z(m, {
1534
1534
  placement: "top-end",
1535
1535
  matchReferenceWidth: !1,
1536
- open: d,
1537
- onOpenChange: m,
1536
+ open: f,
1537
+ onOpenChange: g,
1538
1538
  trigger: [],
1539
1539
  outsideClosable: !0,
1540
- renderOverlay: () => u(() => m?.(!1)),
1540
+ renderOverlay: () => u(() => g?.(!1)),
1541
1541
  listClassName: "cp-dropdown-overlay !w-[320px]",
1542
- children: /* @__PURE__ */ z(O, {
1542
+ children: /* @__PURE__ */ z(D, {
1543
1543
  tooltip: S,
1544
1544
  children: /* @__PURE__ */ B("button", {
1545
1545
  type: "button",
1546
1546
  "aria-label": x,
1547
- className: s("flex items-center justify-center gap-1 rounded-md p-2", Z.modelSelectorButton, o || i || c ? E : void 0, (o || c) && Z.modelSelectorButtonDisabled),
1547
+ className: o("flex items-center justify-center gap-1 rounded-md p-2", Z.modelSelectorButton, s || i || c ? E : void 0, (s || c) && Z.modelSelectorButtonDisabled),
1548
1548
  onClick: () => {
1549
- !o && !i && !c && p?.();
1549
+ !s && !i && !c && p?.();
1550
1550
  },
1551
- children: [b, D]
1551
+ children: [b, k]
1552
1552
  })
1553
1553
  })
1554
1554
  }) : /* @__PURE__ */ z("div", {
1555
- className: s(c && E),
1555
+ className: o(c && E),
1556
1556
  "aria-disabled": c || void 0,
1557
- children: /* @__PURE__ */ z(O, {
1557
+ children: /* @__PURE__ */ z(D, {
1558
1558
  tooltip: S,
1559
- children: /* @__PURE__ */ z(g, {
1559
+ children: /* @__PURE__ */ z(h, {
1560
1560
  icon: b,
1561
1561
  ariaLabel: x,
1562
1562
  items: C,
@@ -1565,15 +1565,15 @@ var Ct = {
1565
1565
  matchReferenceWidth: !1,
1566
1566
  listClassName: "cp-dropdown-overlay !w-[240px] !max-h-80",
1567
1567
  onOpenChange: c ? void 0 : T,
1568
- size: k.Standard,
1569
- caretIcon: D,
1570
- iconClassName: o || c ? E : void 0,
1571
- buttonClassName: s("bg-transparent", Z.modelSelectorButton, (o || c) && E && Z.modelSelectorButtonDisabled)
1568
+ size: O.Standard,
1569
+ caretIcon: k,
1570
+ iconClassName: s || c ? E : void 0,
1571
+ buttonClassName: o("bg-transparent", Z.modelSelectorButton, (s || c) && E && Z.modelSelectorButtonDisabled)
1572
1572
  })
1573
1573
  })
1574
1574
  });
1575
- }, kt = 160, At = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: a = !1, onChange: u, onAttachmentsChange: d, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: y = "Menu", menuCloseLabel: b = "Close", removeLabel: x, retryLabel: S, sendLabel: C, stopLabel: w, micLabel: T = "Record voice message", stopRecordingLabel: E, discardRecordingLabel: D, timerAriaLabel: O, colors: k, typography: ee, className: A, pendingDropFiles: te = [], onDropFilesConsumed: ne, pendingAttachments: re = [], onPendingAttachmentsConsumed: ie, pasteTextThreshold: ae = 4e3, deployments: j, selectedDeploymentId: ce, onDeploymentChange: le, modelSelectorLabels: ue, initialAttachments: de = [], isStacked: fe = !1, hideAddButton: pe = !1, hideAttachFile: me = !1, hideActionBar: he = !1, renderFooterActions: N, isInputDisabled: P = !1, isModelSelectorDisabled: ge = !1, isSendDisabled: _e = !1, isAudioMessageSupported: ve = !1, sendOnEnter: ye = Le.Enter, prefixAttachments: V = [], onRemovePrefixAttachment: xe, chatSettings: Se, autoFocus: Ce = !1, messageHistory: Te, onDialFileSystemClick: H, dialFileSystemLabel: U, validateAttachment: Ee, onAttachmentClick: ke, modelPickerOverlay: Ae, maximumAttachmentsAmount: Ne, onAttachmentsLimitExceeded: Pe, isAttachmentsEnabled: Fe = !0 }) => {
1576
- let Re = c(), [ze, Be] = L(!1), Ve = je(Te), W = F(() => o({
1575
+ }, kt = 160, At = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: u, onAttachmentsChange: f, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: v = "Add", menuTitle: y = "Menu", menuCloseLabel: b = "Close", removeLabel: x, retryLabel: S, sendLabel: C, stopLabel: w, micLabel: T = "Record voice message", stopRecordingLabel: E, discardRecordingLabel: D, timerAriaLabel: O, colors: k, typography: ee, className: A, pendingDropFiles: te = [], onDropFilesConsumed: ne, pendingAttachments: re = [], onPendingAttachmentsConsumed: ie, pasteTextThreshold: ae = 4e3, deployments: j, selectedDeploymentId: ce, onDeploymentChange: le, modelSelectorLabels: ue, initialAttachments: de = [], isStacked: fe = !1, hideAddButton: pe = !1, hideAttachFile: me = !1, hideActionBar: he = !1, renderFooterActions: N, isInputDisabled: P = !1, isModelSelectorDisabled: ge = !1, isSendDisabled: _e = !1, isAudioMessageSupported: ve = !1, sendOnEnter: ye = Le.Enter, prefixAttachments: V = [], onRemovePrefixAttachment: xe, chatSettings: Se, autoFocus: Ce = !1, messageHistory: Te, onDialFileSystemClick: H, dialFileSystemLabel: U, validateAttachment: Ee, onAttachmentClick: ke, modelPickerOverlay: Ae, maximumAttachmentsAmount: Ne, onAttachmentsLimitExceeded: Pe, isAttachmentsEnabled: Fe = !0 }) => {
1576
+ let Re = s(), [ze, Be] = L(!1), Ve = je(Te), W = F(() => a({
1577
1577
  "--ci-bg": k?.background,
1578
1578
  "--ci-text": k?.text,
1579
1579
  "--ci-border": k?.border,
@@ -1589,7 +1589,7 @@ var Ct = {
1589
1589
  key: "dial-fs",
1590
1590
  label: U ?? "DIAL file system",
1591
1591
  icon: /* @__PURE__ */ z(oe, {
1592
- size: l,
1592
+ size: c,
1593
1593
  "aria-hidden": !0
1594
1594
  }),
1595
1595
  onClick: H
@@ -1599,7 +1599,7 @@ var Ct = {
1599
1599
  }), { attachments: q, buildAttachments: J, addAttachments: Ke, resetAttachments: Y, handleRemove: X, handleRetry: qe, handleExpand: Ze, hasBlockedAttachments: Qe } = De({
1600
1600
  initialAttachments: de,
1601
1601
  onUploadAttachment: r,
1602
- onAttachmentsChange: d,
1602
+ onAttachmentsChange: f,
1603
1603
  validateAttachment: Ee,
1604
1604
  pendingDropFiles: te,
1605
1605
  onDropFilesConsumed: ne,
@@ -1613,7 +1613,7 @@ var Ct = {
1613
1613
  onAttachmentsLimitExceeded: Pe
1614
1614
  }), { state: $e, analyserNodeRef: et, elapsedSeconds: tt, errorMessage: nt, startRecording: rt, stopRecording: it, discardRecording: at } = Ie({ onAttachAudio: M((e) => {
1615
1615
  Ke(J([e]));
1616
- }, [Ke, J]) }), ot = I(null), st = I(null), { handlePaste: ct } = we(Ke, Fe ? ae : Infinity), lt = G.trim().length > 0 || q.length > 0, ut = lt && !Qe && !_e, { shouldRender: Q, isExiting: $, instanceKey: dt } = Oe(!a && lt, kt), ft = fe || q.length > 0 || G.includes("\n") || We, pt = j === void 0 || ce != null, mt = async () => {
1616
+ }, [Ke, J]) }), ot = I(null), st = I(null), { handlePaste: ct } = we(Ke, Fe ? ae : Infinity), lt = G.trim().length > 0 || q.length > 0, ut = lt && !Qe && !_e, { shouldRender: Q, isExiting: $, instanceKey: dt } = Oe(!l && lt, kt), ft = fe || q.length > 0 || G.includes("\n") || We, pt = j === void 0 || ce != null, mt = async () => {
1617
1617
  if (_e) return;
1618
1618
  let e = G, t = q;
1619
1619
  K(""), Ve.reset();
@@ -1625,14 +1625,14 @@ var Ct = {
1625
1625
  K(e), Y(t);
1626
1626
  }
1627
1627
  }, ht = (e) => {
1628
- if (!e.nativeEvent.isComposing && !P && !a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1628
+ if (!e.nativeEvent.isComposing && !P && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1629
1629
  let t = e.currentTarget.selectionStart ?? 0, n = Ve.navigate(e.key === "ArrowUp" ? "up" : "down", G, t);
1630
1630
  if (n !== null) {
1631
1631
  e.preventDefault(), K(n);
1632
1632
  return;
1633
1633
  }
1634
1634
  }
1635
- e.key === "Enter" && (ye === Le.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !a && ut && pt && !P && mt());
1635
+ e.key === "Enter" && (ye === Le.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && ut && pt && !P && mt());
1636
1636
  }, gt = (e) => {
1637
1637
  let t = Array.from(e.target.files ?? []);
1638
1638
  if (t.length === 0) return;
@@ -1653,7 +1653,7 @@ var Ct = {
1653
1653
  className: A
1654
1654
  });
1655
1655
  let _t = /* @__PURE__ */ z("textarea", {
1656
- className: s(Z.textarea, ee?.fontClassName, "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1656
+ className: o(Z.textarea, ee?.fontClassName, "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1657
1657
  ref: Ue,
1658
1658
  autoFocus: Ce,
1659
1659
  value: G,
@@ -1670,7 +1670,7 @@ var Ct = {
1670
1670
  return /* @__PURE__ */ B("div", {
1671
1671
  ref: st,
1672
1672
  style: W,
1673
- className: s(Z.wrapper, P && Z.wrapperDisabled, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", q.length > 6 ? "py-3 ps-3" : "p-3", A),
1673
+ className: o(Z.wrapper, P && Z.wrapperDisabled, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", q.length > 6 ? "py-3 ps-3" : "p-3", A),
1674
1674
  children: [(V.length > 0 || q.length > 0) && /* @__PURE__ */ z(be, {
1675
1675
  attachments: [...V, ...q],
1676
1676
  onRemove: (e) => {
@@ -1687,10 +1687,10 @@ var Ct = {
1687
1687
  t != null && ke(t);
1688
1688
  }
1689
1689
  }), he ? ft && _t : /* @__PURE__ */ B("div", {
1690
- className: s("flex items-center gap-2", ft ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1690
+ className: o("flex items-center gap-2", ft ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1691
1691
  children: [
1692
1692
  !pe && /* @__PURE__ */ B("div", {
1693
- className: s("order-2 flex", !ft && "desktop:order-1"),
1693
+ className: o("order-2 flex", !ft && "desktop:order-1"),
1694
1694
  children: [/* @__PURE__ */ z("input", {
1695
1695
  ref: ot,
1696
1696
  type: "file",
@@ -1703,7 +1703,7 @@ var Ct = {
1703
1703
  }), /* @__PURE__ */ z(Ge, {
1704
1704
  onAttachClick: me ? void 0 : () => ot.current?.click(),
1705
1705
  attachLabel: h,
1706
- addMenuTitle: _,
1706
+ addMenuTitle: v,
1707
1707
  menuTitle: y,
1708
1708
  menuCloseLabel: b,
1709
1709
  style: W,
@@ -1713,11 +1713,11 @@ var Ct = {
1713
1713
  })]
1714
1714
  }),
1715
1715
  /* @__PURE__ */ z("div", {
1716
- className: s("order-1 flex w-full min-w-0 items-center self-stretch", !ft && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1716
+ className: o("order-1 flex w-full min-w-0 items-center self-stretch", !ft && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1717
1717
  children: _t
1718
1718
  }),
1719
1719
  /* @__PURE__ */ B("div", {
1720
- className: s("flex flex-shrink-0 items-center gap-2", "order-3 ms-auto", !ft && "desktop:ms-0"),
1720
+ className: o("flex flex-shrink-0 items-center gap-2", "order-3 ms-auto", !ft && "desktop:ms-0"),
1721
1721
  children: [N ? N({
1722
1722
  canSend: ut,
1723
1723
  onSend: mt
@@ -1726,7 +1726,7 @@ var Ct = {
1726
1726
  selectedDeploymentId: ce,
1727
1727
  onDeploymentChange: le,
1728
1728
  modelSelectorLabels: ue,
1729
- isStreaming: a,
1729
+ isStreaming: l,
1730
1730
  isMobile: Re,
1731
1731
  isInputDisabled: P,
1732
1732
  isDisabled: ge,
@@ -1735,38 +1735,38 @@ var Ct = {
1735
1735
  isPickerOpen: ze,
1736
1736
  onPickerToggle: () => Be((e) => !e),
1737
1737
  onPickerOpenChange: Be
1738
- }), a && i ? /* @__PURE__ */ z(Xe, {
1738
+ }), l && i ? /* @__PURE__ */ z(Xe, {
1739
1739
  onStop: i,
1740
1740
  ariaLabel: w
1741
- }) : !a && Q && /* @__PURE__ */ z(Ye, {
1741
+ }) : !l && Q && /* @__PURE__ */ z(Ye, {
1742
1742
  onSend: mt,
1743
1743
  isDisabled: !pt || Qe || _e,
1744
1744
  ariaLabel: C,
1745
1745
  isExiting: $
1746
- }, dt)] }), ve && !$ && /* @__PURE__ */ z(v, {
1746
+ }, dt)] }), ve && !$ && /* @__PURE__ */ z(_, {
1747
1747
  icon: /* @__PURE__ */ z(se, {
1748
- size: f.LG,
1748
+ size: d.LG,
1749
1749
  "aria-hidden": !0
1750
1750
  }),
1751
1751
  "aria-label": T,
1752
1752
  className: "size-8 flex-shrink-0",
1753
1753
  onClick: rt,
1754
- disabled: P || a
1754
+ disabled: P || l
1755
1755
  })]
1756
1756
  })
1757
1757
  ]
1758
1758
  })]
1759
1759
  });
1760
- }, jt = { welcome: "_welcome_n2ph8_1" }, Mt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, styles: r, className: i, inputClassName: a, isInputDisabled: c = !1, ...l }) => {
1760
+ }, jt = { welcome: "_welcome_n2ph8_1" }, Mt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, styles: r, className: i, inputClassName: s, isInputDisabled: c = !1, ...l }) => {
1761
1761
  let { colors: u, typography: d } = r ?? {};
1762
1762
  return /* @__PURE__ */ B("div", {
1763
- style: o({
1763
+ style: a({
1764
1764
  "--ci-root-bg": u?.background,
1765
1765
  "--ci-welcome-color": u?.welcomeText
1766
1766
  }),
1767
- className: s("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
1767
+ className: o("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
1768
1768
  children: [n && /* @__PURE__ */ z("h1", {
1769
- className: s(jt.welcome, "m-0 text-center", d?.welcomeClassName),
1769
+ className: o(jt.welcome, "m-0 text-center", d?.welcomeClassName),
1770
1770
  children: n
1771
1771
  }), /* @__PURE__ */ z("div", {
1772
1772
  className: "relative w-full max-w-[748px]",
@@ -1775,22 +1775,22 @@ var Ct = {
1775
1775
  isStreaming: e,
1776
1776
  isInputDisabled: c,
1777
1777
  ...l,
1778
- className: a,
1778
+ className: s,
1779
1779
  colors: u?.input,
1780
1780
  typography: d?.input
1781
1781
  })
1782
1782
  })]
1783
1783
  });
1784
- }, Nt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: r, onUploadAttachment: a, cancelLabel: o = "Cancel", saveLabel: c = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles: v, onDropFilesConsumed: y, validateAttachment: b, isAttachmentsEnabled: x, hideAttachFile: S = !1, fileAccept: C, maximumAttachmentsAmount: w, onAttachmentsLimitExceeded: T, onDialFileSystemClick: E, dialFileSystemLabel: D, pendingAttachments: O, onPendingAttachmentsConsumed: k, onAttachmentClick: ee }) => {
1784
+ }, Nt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles: v, onDropFilesConsumed: y, validateAttachment: b, isAttachmentsEnabled: x, hideAttachFile: S = !1, fileAccept: C, maximumAttachmentsAmount: w, onAttachmentsLimitExceeded: T, onDialFileSystemClick: E, dialFileSystemLabel: D, pendingAttachments: O, onPendingAttachmentsConsumed: k, onAttachmentClick: ee }) => {
1785
1785
  let A = I(null), [te, ne] = L([]);
1786
1786
  N(() => {
1787
1787
  v?.length && (ne(v), y?.());
1788
1788
  }, [v, y]);
1789
- let [re, ie] = L(e ?? ""), [ae, se] = L([]), [j, ce] = L(t), le = ae.some((e) => e.status === i.Loading || e.status === i.Error), ue = (re.trim().length > 0 || ae.length > 0 || j.length > 0) && !le, de = (e) => {
1789
+ let [re, ie] = L(e ?? ""), [ae, se] = L([]), [j, ce] = L(t), le = ae.some((e) => e.status === r.Loading || e.status === r.Error), ue = (re.trim().length > 0 || ae.length > 0 || j.length > 0) && !le, de = (e) => {
1790
1790
  ce((t) => t.filter((t) => t.id !== e));
1791
1791
  }, fe = M((e, t) => {
1792
- r(e, j, t);
1793
- }, [j, r]), pe = () => {
1792
+ i(e, j, t);
1793
+ }, [j, i]), pe = () => {
1794
1794
  ue && fe(re, ae);
1795
1795
  }, me = M(() => ne([]), []), he = M((e) => {
1796
1796
  let t = Array.from(e.target.files ?? []);
@@ -1799,13 +1799,13 @@ var Ct = {
1799
1799
  key: "dial-fs",
1800
1800
  label: D ?? "DIAL file system",
1801
1801
  icon: /* @__PURE__ */ z(oe, {
1802
- size: l,
1802
+ size: c,
1803
1803
  "aria-hidden": !0
1804
1804
  }),
1805
1805
  onClick: E
1806
1806
  }] : [], [E, D]);
1807
1807
  return /* @__PURE__ */ B("div", {
1808
- className: s("flex w-full flex-col gap-2", _),
1808
+ className: o("flex w-full flex-col gap-2", _),
1809
1809
  children: [/* @__PURE__ */ z(At, {
1810
1810
  message: e,
1811
1811
  ariaLabel: u,
@@ -1853,10 +1853,10 @@ var Ct = {
1853
1853
  }), /* @__PURE__ */ B("div", {
1854
1854
  className: "flex gap-2",
1855
1855
  children: [/* @__PURE__ */ z(He, {
1856
- label: o,
1856
+ label: s,
1857
1857
  onClick: n
1858
1858
  }), /* @__PURE__ */ z(W, {
1859
- label: c,
1859
+ label: l,
1860
1860
  onClick: pe,
1861
1861
  disabled: !ue
1862
1862
  })]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-conversation-input",
3
3
  "description": "Conversation message input with model selection, attachments, voice input, and edit mode",
4
- "version": "1.1.0-dev.53",
4
+ "version": "1.1.0-dev.55",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,13 +17,13 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-attachment-input": "1.1.0-dev.53",
21
- "@epam/ai-dial-chat-shared": "1.1.0-dev.53",
20
+ "@epam/ai-dial-attachment-input": "1.1.0-dev.55",
21
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.55",
22
22
  "@tabler/icons-react": "^3.44.0",
23
23
  "react": "^19.0.0",
24
24
  "react-dom": "^19.2.6",
25
- "@epam/ai-dial-kit": "1.1.0-dev.53",
26
- "@epam/ai-dial-ui-kit": "^0.13.0-dev.12"
25
+ "@epam/ai-dial-kit": "1.1.0-dev.55",
26
+ "@epam/ai-dial-ui-kit": "^0.13.0-dev.17"
27
27
  },
28
28
  "dependencies": {
29
29
  "react-window": "^2.2.7"