@epam/ai-dial-conversation-input 1.0.4 → 1.0.6

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/index.js CHANGED
@@ -1,43 +1,43 @@
1
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, Button as l, CloseButton as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialDropdownIcon as p, DialSlider as m, Dropdown as h, ElementSize as g, ErrorText as _, GhostIconButton as v, Highlight as y, NeutralButton as b, Popup as x, PopupSize as S, PrimaryButton as C, PrimaryIconButton as w, RadioGroup as T, RadioGroupOrientation as E, Search as D, Skeleton as O, SkeletonVariant as k, StaticIconButton as A, Textarea as ee, Tooltip as j } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowLeft as te, IconArrowNarrowRight as ne, IconCheck as M, IconChevronDown as re, IconChevronRight as N, IconFile as ie, IconMicrophone as ae, IconPaperclip as oe, IconPlayerStopFilled as P, IconPlaystationSquare as F, IconPlus as se, IconPrompt as ce, IconSettings as le, IconTool as ue, IconX as de } from "@tabler/icons-react";
4
- import { createPortal as fe } from "react-dom";
5
- import { createElement as I, memo as L, useCallback as R, useEffect as z, useImperativeHandle as pe, useLayoutEffect as me, useMemo as B, useRef as V, useState as H } from "react";
6
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
7
- import { AttachmentTray as he, MAX_UPLOADS_PER_MINUTE as ge, generateAttachmentId as _e, useClipboardPaste as ve } from "@epam/ai-dial-attachment-input";
2
+ import { BASE_ICON_SIZE as c, Button as l, CloseButton as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialDropdownIcon as p, DialSlider as m, Dropdown as h, ElementSize as g, ErrorText as _, GhostIconButton as v, Highlight as y, NeutralButton as b, Popup as x, PopupSize as S, PrimaryButton as C, PrimaryIconButton as w, RadioGroup as T, RadioGroupOrientation as E, Search as D, Skeleton as O, SkeletonVariant as k, StaticIconButton as A, Textarea as j, Tooltip as M } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowLeft as ee, IconArrowNarrowRight as te, IconCheck as N, IconChevronDown as ne, IconChevronRight as P, IconFile as re, IconMicrophone as ie, IconPaperclip as ae, IconPlayerStopFilled as F, IconPlaystationSquare as I, IconPlus as oe, IconPrompt as se, IconSettings as ce, IconTool as le, IconX as L } from "@tabler/icons-react";
4
+ import { createPortal as ue } from "react-dom";
5
+ import { createElement as R, memo as de, useCallback as z, useEffect as B, useImperativeHandle as fe, useLayoutEffect as pe, useMemo as V, useRef as H, useState as U } from "react";
6
+ import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
7
+ import { AttachmentTray as me, MAX_UPLOADS_PER_MINUTE as he, generateAttachmentId as ge, useClipboardPaste as _e } from "@epam/ai-dial-attachment-input";
8
8
  //#region src/hooks/useBottomSheet.ts
9
- var ye = (e, t) => {
10
- z(() => {
9
+ var ve = (e, t) => {
10
+ B(() => {
11
11
  if (!e) return;
12
12
  let n = (e) => {
13
13
  e.key === "Escape" && t();
14
14
  };
15
15
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
16
- }, [e, t]), z(() => {
16
+ }, [e, t]), B(() => {
17
17
  if (e) return document.body.style.overflow = "hidden", () => {
18
18
  document.body.style.overflow = "";
19
19
  };
20
20
  }, [e]);
21
- }, be = {
21
+ }, ye = {
22
22
  backdrop: "_backdrop_1d50f_9",
23
23
  sheet: "_sheet_1d50f_13",
24
24
  "slide-up": "_slide-up_1d50f_1",
25
25
  title: "_title_1d50f_18",
26
26
  divider: "_divider_1d50f_22"
27
- }, K = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: p = "dial-body-semi-text", className: m, colors: h, children: _ }) => {
28
- if (ye(e, r), !e || typeof document > "u") return null;
27
+ }, q = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: p = "dial-body-semi-text", className: m, colors: h, children: _ }) => {
28
+ if (ve(e, r), !e || typeof document > "u") return null;
29
29
  let y = a({
30
30
  "--ci-backdrop": h?.backdrop,
31
31
  "--ci-sheet-bg": h?.sheetBg,
32
32
  "--ci-sheet-text": h?.sheetText,
33
33
  "--ci-sheet-divider": h?.divider
34
34
  });
35
- return fe(/* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
36
- className: o(be.backdrop, "fixed inset-0 z-[55]"),
35
+ return ue(/* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
36
+ className: o(ye.backdrop, "fixed inset-0 z-[55]"),
37
37
  style: y,
38
38
  onPointerDown: r,
39
39
  "aria-hidden": !0
40
- }), /* @__PURE__ */ G("div", {
40
+ }), /* @__PURE__ */ K("div", {
41
41
  role: "dialog",
42
42
  "aria-modal": !0,
43
43
  "aria-label": t ?? c,
@@ -45,14 +45,14 @@ var ye = (e, t) => {
45
45
  ...y,
46
46
  ...l
47
47
  },
48
- className: o(be.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", m),
49
- children: [t != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G("div", {
48
+ className: o(ye.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", m),
49
+ children: [t != null && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K("div", {
50
50
  className: "relative flex h-[60px] flex-shrink-0 items-center justify-center px-4",
51
51
  children: [
52
- i && /* @__PURE__ */ W("div", {
52
+ i && /* @__PURE__ */ G("div", {
53
53
  className: "absolute start-4",
54
- children: /* @__PURE__ */ W(v, {
55
- icon: /* @__PURE__ */ W(te, {
54
+ children: /* @__PURE__ */ G(v, {
55
+ icon: /* @__PURE__ */ G(ee, {
56
56
  size: d.LG,
57
57
  stroke: f,
58
58
  className: "rtl:scale-x-[-1]"
@@ -61,41 +61,41 @@ var ye = (e, t) => {
61
61
  onClick: i
62
62
  })
63
63
  }),
64
- /* @__PURE__ */ W("span", {
65
- className: o(be.title, p),
64
+ /* @__PURE__ */ G("span", {
65
+ className: o(ye.title, p),
66
66
  children: t
67
67
  }),
68
- /* @__PURE__ */ W("div", {
68
+ /* @__PURE__ */ G("div", {
69
69
  className: "absolute end-4 m-2",
70
- children: /* @__PURE__ */ W(u, {
70
+ children: /* @__PURE__ */ G(u, {
71
71
  ariaLabel: n,
72
72
  onClose: r,
73
73
  size: g.Standard
74
74
  })
75
75
  })
76
76
  ]
77
- }), /* @__PURE__ */ W("div", { className: o(be.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ W("div", {
77
+ }), /* @__PURE__ */ G("div", { className: o(ye.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ G("div", {
78
78
  className: "overflow-y-auto",
79
79
  children: _
80
80
  })]
81
81
  })] }), document.body);
82
- }, xe = async (e, t, n) => {
82
+ }, be = async (e, t, n) => {
83
83
  let r = 6e4 / t, i = [];
84
84
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
85
85
  await Promise.allSettled(i);
86
- }, Se = ({ 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 }) => {
87
- let [h, g] = H(n), _ = V(h);
88
- z(() => {
86
+ }, xe = ({ 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 }) => {
87
+ let [h, g] = U(n), _ = H(h);
88
+ B(() => {
89
89
  _.current = h;
90
- }, [h]), z(() => () => {
90
+ }, [h]), B(() => () => {
91
91
  _.current.forEach((e) => {
92
92
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
93
93
  });
94
94
  }, []);
95
- let v = R((e) => e.map((e) => {
95
+ let v = z((e) => e.map((e) => {
96
96
  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;
97
97
  return {
98
- id: _e(),
98
+ id: ge(),
99
99
  name: e.name,
100
100
  contentType: e.type,
101
101
  file: e,
@@ -104,26 +104,26 @@ var ye = (e, t) => {
104
104
  previewUrl: a,
105
105
  playUrl: o
106
106
  };
107
- }), []), y = V(a);
108
- z(() => {
107
+ }), []), y = H(a);
108
+ B(() => {
109
109
  y.current = a;
110
110
  }, [a]);
111
- let b = V(!0), x = R((e) => {
111
+ let b = H(!0), x = z((e) => {
112
112
  g((t) => {
113
113
  let n = e(t);
114
114
  return n === t ? t : n;
115
115
  });
116
116
  }, []);
117
- z(() => {
117
+ B(() => {
118
118
  if (b.current) {
119
119
  b.current = !1;
120
120
  return;
121
121
  }
122
122
  y.current?.(h);
123
123
  }, [h]);
124
- let S = R((e) => {
124
+ let S = z((e) => {
125
125
  g(e);
126
- }, []), C = R(async (t) => {
126
+ }, []), C = z(async (t) => {
127
127
  if (i) {
128
128
  x((e) => e.map((e) => e.id === t.id ? {
129
129
  ...e,
@@ -145,7 +145,7 @@ var ye = (e, t) => {
145
145
  } : e));
146
146
  }
147
147
  }
148
- }, [i, x]), w = R((e, t = !0) => {
148
+ }, [i, x]), w = z((e, t = !0) => {
149
149
  let n = new Set(_.current.map((e) => e.id)), i = e.filter((e) => !n.has(e.id));
150
150
  if (i.length !== 0) {
151
151
  if (f != null && f > 0 && Number.isFinite(f)) {
@@ -166,7 +166,7 @@ var ye = (e, t) => {
166
166
  status: r.Error,
167
167
  errorReason: n
168
168
  } : e));
169
- }), xe(e, ge, C);
169
+ }), be(e, he, C);
170
170
  }
171
171
  }
172
172
  }, [
@@ -177,20 +177,20 @@ var ye = (e, t) => {
177
177
  C,
178
178
  o
179
179
  ]);
180
- z(() => {
180
+ B(() => {
181
181
  s.length !== 0 && (w(v(s)), c?.());
182
182
  }, [
183
183
  w,
184
184
  v,
185
185
  c,
186
186
  s
187
- ]), z(() => {
187
+ ]), B(() => {
188
188
  l.length !== 0 && (w(l, !1), u?.());
189
189
  }, [
190
190
  w,
191
191
  u,
192
192
  l
193
- ]), z(() => {
193
+ ]), B(() => {
194
194
  if (!o) return;
195
195
  let t = !1, n = [], i = _.current.map((i) => {
196
196
  if (i.status === r.Loading) return i;
@@ -217,7 +217,7 @@ var ye = (e, t) => {
217
217
  x,
218
218
  C
219
219
  ]);
220
- let T = R((e) => {
220
+ let T = z((e) => {
221
221
  x((t) => {
222
222
  let n = t.find((t) => t.id === e);
223
223
  return n?.previewUrl && URL.revokeObjectURL(n.previewUrl), n?.playUrl && URL.revokeObjectURL(n.playUrl), t.filter((t) => t.id !== e);
@@ -229,11 +229,11 @@ var ye = (e, t) => {
229
229
  addAttachments: w,
230
230
  resetAttachments: S,
231
231
  handleRemove: T,
232
- handleRetry: R((e) => {
232
+ handleRetry: z((e) => {
233
233
  let t = h.find((t) => t.id === e);
234
234
  t && C(t);
235
235
  }, [h, C]),
236
- handleExpand: R(async (e) => {
236
+ handleExpand: z(async (e) => {
237
237
  let n = h.find((t) => t.id === e);
238
238
  if (!n || n.type !== t.Pasted) return;
239
239
  let r = await n.file.text();
@@ -245,9 +245,9 @@ var ye = (e, t) => {
245
245
  ]),
246
246
  hasBlockedAttachments: h.some((e) => e.status === r.Loading || e.status === r.Error)
247
247
  };
248
- }, Ce = (e, t) => {
249
- let [n, r] = H(e), [i, a] = H(!1), [o, s] = H(0);
250
- return z(() => {
248
+ }, Se = (e, t) => {
249
+ let [n, r] = U(e), [i, a] = U(!1), [o, s] = U(0);
250
+ return B(() => {
251
251
  if (e) {
252
252
  r(!0), a(!1), s((e) => e + 1);
253
253
  return;
@@ -263,18 +263,18 @@ var ye = (e, t) => {
263
263
  isExiting: i,
264
264
  instanceKey: o
265
265
  };
266
- }, we = (e, t) => !e.slice(0, t).includes("\n"), Te = (e, t) => !e.slice(t).includes("\n"), Ee = (e) => {
267
- let t = V(e);
266
+ }, Ce = (e, t) => !e.slice(0, t).includes("\n"), we = (e, t) => !e.slice(t).includes("\n"), Te = (e) => {
267
+ let t = H(e);
268
268
  t.current = e;
269
- let n = V(-1), r = V(""), i = R((e, i, a) => {
269
+ let n = H(-1), r = H(""), i = z((e, i, a) => {
270
270
  let o = t.current;
271
- return !o || o.length === 0 ? null : e === "up" ? !we(i, a) || n.current === 0 ? null : (n.current === -1 ? (r.current = i, n.current = o.length - 1) : --n.current, o[n.current]) : n.current === -1 || !Te(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
272
- }, []), a = R(() => {
271
+ return !o || o.length === 0 ? null : e === "up" ? !Ce(i, a) || n.current === 0 ? null : (n.current === -1 ? (r.current = i, n.current = o.length - 1) : --n.current, o[n.current]) : n.current === -1 || !we(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
272
+ }, []), a = z(() => {
273
273
  n.current = -1, r.current = "";
274
- }, []), o = R(() => {
274
+ }, []), o = z(() => {
275
275
  n.current = -1, r.current = "";
276
276
  }, []);
277
- return B(() => ({
277
+ return V(() => ({
278
278
  navigate: i,
279
279
  notifyChange: a,
280
280
  reset: o
@@ -283,34 +283,27 @@ var ye = (e, t) => {
283
283
  a,
284
284
  o
285
285
  ]);
286
- }, De = ({ messageProp: e, messageRevision: t }) => {
287
- let [n, r] = H(e), i = V(null), a = V(0), [o, s] = H(!1);
288
- return z(() => {
286
+ }, Ee = ({ messageProp: e, messageRevision: t }) => {
287
+ let [n, r] = U(e), i = H(null);
288
+ return B(() => {
289
289
  r(e);
290
- }, [e, t]), z(() => {
291
- i.current && (a.current = i.current.offsetHeight);
292
- }, []), me(() => {
293
- if (!i.current || a.current === 0) return;
294
- let e = i.current.offsetHeight > a.current;
295
- s((t) => e ? !0 : n === "" ? !1 : t);
296
- }, [n]), {
290
+ }, [e, t]), {
297
291
  message: n,
298
292
  setMessage: r,
299
- textareaRef: i,
300
- isMultiLine: o
293
+ textareaRef: i
301
294
  };
302
- }, Oe = /* @__PURE__ */ function(e) {
295
+ }, De = /* @__PURE__ */ function(e) {
303
296
  return e.Idle = "idle", e.Recording = "recording", e.Error = "error", e;
304
- }({}), ke = [
297
+ }({}), Oe = [
305
298
  "audio/webm;codecs=opus",
306
299
  "audio/ogg;codecs=opus",
307
300
  "audio/webm"
308
- ], Ae = () => ke.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", je = ({ onAttachAudio: e }) => {
309
- let [t, n] = H("idle"), [r, i] = H(null), a = V(null), o = V(null), s = V(null), c = V(null), l = V([]), u = V(""), d = V(e);
301
+ ], ke = () => Oe.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", Ae = ({ onAttachAudio: e }) => {
302
+ let [t, n] = U("idle"), [r, i] = U(null), a = H(null), o = H(null), s = H(null), c = H(null), l = H([]), u = H(""), d = H(e);
310
303
  d.current = e;
311
- let f = R(() => {
304
+ let f = z(() => {
312
305
  a.current &&= (a.current.getTracks().forEach((e) => e.stop()), null), o.current &&= (o.current.close(), null), s.current = null, c.current = null;
313
- }, []), p = R(() => {
306
+ }, []), p = z(() => {
314
307
  (async () => {
315
308
  try {
316
309
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
@@ -319,7 +312,7 @@ var ye = (e, t) => {
319
312
  o.current = t;
320
313
  let r = t.createAnalyser();
321
314
  r.fftSize = 256, s.current = r, t.createMediaStreamSource(e).connect(r);
322
- let i = Ae();
315
+ let i = ke();
323
316
  u.current = i, l.current = [];
324
317
  let d = new MediaRecorder(e, i ? { mimeType: i } : void 0);
325
318
  c.current = d, d.ondataavailable = (e) => {
@@ -329,17 +322,17 @@ var ye = (e, t) => {
329
322
  i(e instanceof Error ? e.message : "Microphone access denied"), n("error");
330
323
  }
331
324
  })();
332
- }, []), m = R(() => {
325
+ }, []), m = z(() => {
333
326
  let e = c.current;
334
327
  !e || e.state !== "recording" || (e.onstop = () => {
335
328
  let e = u.current || "audio/webm", t = new Blob(l.current, { type: e }), r = e.split(";")[0].split("/")[1] ?? "webm", a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, -1), o = new File([t], `voice-${a}.${r}`, { type: e });
336
329
  d.current(o), f(), i(null), n("idle");
337
330
  }, e.stop());
338
- }, [f]), h = R(() => {
331
+ }, [f]), h = z(() => {
339
332
  let e = c.current;
340
333
  e && e.state === "recording" && (e.ondataavailable = null, e.onstop = null, e.stop()), f(), i(null), n("idle");
341
334
  }, [f]);
342
- return z(() => () => {
335
+ return B(() => () => {
343
336
  f();
344
337
  }, [f]), {
345
338
  state: t,
@@ -349,12 +342,12 @@ var ye = (e, t) => {
349
342
  stopRecording: m,
350
343
  discardRecording: h
351
344
  };
352
- }, Me = /* @__PURE__ */ function(e) {
345
+ }, je = /* @__PURE__ */ function(e) {
353
346
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
354
- }({}), Ne = {
347
+ }({}), Me = {
355
348
  item: "_item_1sr2n_1",
356
349
  itemIcon: "_itemIcon_1sr2n_11"
357
- }, Pe = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: s, className: c, titleClassName: u = "dial-body-semi-text", itemLabelClassName: d = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
350
+ }, Ne = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: s, className: c, titleClassName: u = "dial-body-semi-text", itemLabelClassName: d = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
358
351
  let m = (e) => {
359
352
  e(), r();
360
353
  }, h = a({
@@ -363,7 +356,7 @@ var ye = (e, t) => {
363
356
  "--ci-sheet-item-active": p?.itemActiveBg,
364
357
  "--ci-sheet-icon": p?.itemIcon
365
358
  });
366
- return /* @__PURE__ */ W(K, {
359
+ return /* @__PURE__ */ G(q, {
367
360
  isOpen: e,
368
361
  title: t,
369
362
  closeLabel: n,
@@ -372,23 +365,23 @@ var ye = (e, t) => {
372
365
  className: c,
373
366
  titleClassName: u,
374
367
  colors: p?.shell,
375
- children: /* @__PURE__ */ W("ul", {
368
+ children: /* @__PURE__ */ G("ul", {
376
369
  role: "list",
377
370
  className: "flex flex-col",
378
371
  style: h,
379
- children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ W("li", { children: /* @__PURE__ */ W(l, {
372
+ children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ G("li", { children: /* @__PURE__ */ G(l, {
380
373
  type: "button",
381
- className: o(Ne.item, "w-full gap-3 px-4 py-[10px] text-start"),
382
- iconBefore: /* @__PURE__ */ W("span", {
383
- className: Ne.itemIcon,
374
+ className: o(Me.item, "w-full gap-3 px-4 py-[10px] text-start"),
375
+ iconBefore: /* @__PURE__ */ G("span", {
376
+ className: Me.itemIcon,
384
377
  children: n
385
378
  }),
386
- iconAfter: r ? /* @__PURE__ */ W("span", {
379
+ iconAfter: r ? /* @__PURE__ */ G("span", {
387
380
  className: "ms-auto",
388
381
  children: r
389
382
  }) : null,
390
383
  textClassName: f,
391
- label: /* @__PURE__ */ W("span", {
384
+ label: /* @__PURE__ */ G("span", {
392
385
  className: d,
393
386
  children: t
394
387
  }),
@@ -396,9 +389,9 @@ var ye = (e, t) => {
396
389
  }) }, e))
397
390
  })
398
391
  });
399
- }, Fe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
400
- let [s, c] = H(t), [l, u] = H(n), [d, f] = H(r), p = V(o);
401
- z(() => {
392
+ }, Pe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
393
+ let [s, c] = U(t), [l, u] = U(n), [d, f] = U(r), p = H(o);
394
+ B(() => {
402
395
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
403
396
  }, [
404
397
  o,
@@ -415,7 +408,7 @@ var ye = (e, t) => {
415
408
  setResponseFormat: c,
416
409
  setSystemPrompt: u,
417
410
  setTemperature: f,
418
- handleSubmit: R(() => {
411
+ handleSubmit: z(() => {
419
412
  if (!m) return;
420
413
  let t = {};
421
414
  e.responseFormat && s != null && (t.responseFormat = s), e.systemPrompt && (t.systemPrompt = l), e.temperature && (t.temperature = d), i(t), a();
@@ -429,17 +422,17 @@ var ye = (e, t) => {
429
422
  a
430
423
  ])
431
424
  };
432
- }, Ie = { label: "_label_14i7c_1" }, Le = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
425
+ }, Fe = { label: "_label_14i7c_1" }, Ie = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
433
426
  "Precise",
434
427
  "Neutral",
435
428
  "Creative"
436
429
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
437
- let S = a({ "--csf-label-text": x?.labelText }), C = o(b, Ie.label, "gap-1");
438
- return /* @__PURE__ */ G("div", {
430
+ let S = a({ "--csf-label-text": x?.labelText }), C = o(b, Fe.label, "gap-1");
431
+ return /* @__PURE__ */ K("div", {
439
432
  className: "flex flex-col gap-4 px-6 pb-3",
440
433
  style: S,
441
434
  children: [
442
- e.responseFormat && /* @__PURE__ */ W(T, {
435
+ e.responseFormat && /* @__PURE__ */ G(T, {
443
436
  id: "response-format",
444
437
  labelProps: {
445
438
  label: u,
@@ -458,7 +451,7 @@ var ye = (e, t) => {
458
451
  }],
459
452
  onChange: (e) => s(e)
460
453
  }),
461
- e.systemPrompt && /* @__PURE__ */ W(ee, {
454
+ e.systemPrompt && /* @__PURE__ */ G(j, {
462
455
  value: n,
463
456
  placeholder: g,
464
457
  resize: !0,
@@ -468,7 +461,7 @@ var ye = (e, t) => {
468
461
  },
469
462
  onChange: (e) => c(e ?? "")
470
463
  }),
471
- e.temperature && /* @__PURE__ */ W(m, {
464
+ e.temperature && /* @__PURE__ */ G(m, {
472
465
  labelProps: {
473
466
  label: _,
474
467
  className: C,
@@ -483,8 +476,8 @@ var ye = (e, t) => {
483
476
  })
484
477
  ]
485
478
  });
486
- }, Re = ({ 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: w }) => {
487
- let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: A, setTemperature: ee, handleSubmit: te } = Fe({
479
+ }, Le = ({ 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: w }) => {
480
+ let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: A, setTemperature: j, handleSubmit: ee } = Pe({
488
481
  isOpen: e,
489
482
  features: s,
490
483
  initialResponseFormat: c,
@@ -493,7 +486,7 @@ var ye = (e, t) => {
493
486
  onSave: d,
494
487
  onClose: r
495
488
  });
496
- return /* @__PURE__ */ G(K, {
489
+ return /* @__PURE__ */ K(q, {
497
490
  isOpen: e,
498
491
  title: f,
499
492
  closeLabel: i,
@@ -501,14 +494,14 @@ var ye = (e, t) => {
501
494
  onBack: t,
502
495
  backLabel: n,
503
496
  style: a,
504
- children: [/* @__PURE__ */ W(Le, {
497
+ children: [/* @__PURE__ */ G(Ie, {
505
498
  features: s,
506
499
  responseFormat: T,
507
500
  systemPrompt: E,
508
501
  temperature: D,
509
502
  onResponseFormatChange: k,
510
503
  onSystemPromptChange: A,
511
- onTemperatureChange: ee,
504
+ onTemperatureChange: j,
512
505
  responseFormatLabel: p,
513
506
  responseFormatHint: m,
514
507
  responseFormatMarkdownLabel: h,
@@ -518,23 +511,23 @@ var ye = (e, t) => {
518
511
  temperatureLabel: y,
519
512
  temperatureLabels: b,
520
513
  temperatureHint: x
521
- }), /* @__PURE__ */ W("div", {
514
+ }), /* @__PURE__ */ G("div", {
522
515
  className: o("px-6 py-4 mobile:pb-8"),
523
- children: /* @__PURE__ */ W(j, {
516
+ children: /* @__PURE__ */ G(M, {
524
517
  tooltip: w,
525
518
  hideTooltip: O || !w,
526
519
  triggerClassName: "w-full",
527
- children: /* @__PURE__ */ W(C, {
520
+ children: /* @__PURE__ */ G(C, {
528
521
  label: S,
529
- onClick: te,
522
+ onClick: ee,
530
523
  disabled: !O,
531
524
  className: "w-full"
532
525
  })
533
526
  })
534
527
  })]
535
528
  });
536
- }, ze = { modal: "_modal_kl0h0_1" }, Be = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = ze.modal }) => {
537
- let { responseFormat: b, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Fe({
529
+ }, Re = { modal: "_modal_kl0h0_1" }, ze = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = Re.modal }) => {
530
+ let { responseFormat: b, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Pe({
538
531
  features: e,
539
532
  initialResponseFormat: t,
540
533
  initialSystemPrompt: n,
@@ -542,26 +535,26 @@ var ye = (e, t) => {
542
535
  onSave: i,
543
536
  onClose: a
544
537
  });
545
- return /* @__PURE__ */ W(x, {
538
+ return /* @__PURE__ */ G(x, {
546
539
  open: !0,
547
540
  header: o,
548
541
  titleClassName: s,
549
542
  size: S.Sm,
550
543
  onClose: a,
551
544
  className: y,
552
- footer: /* @__PURE__ */ W("div", {
545
+ footer: /* @__PURE__ */ G("div", {
553
546
  className: "flex justify-end px-6 py-4",
554
- children: /* @__PURE__ */ W(j, {
547
+ children: /* @__PURE__ */ G(M, {
555
548
  tooltip: v,
556
549
  hideTooltip: E || !v,
557
- children: /* @__PURE__ */ W(C, {
550
+ children: /* @__PURE__ */ G(C, {
558
551
  label: _,
559
552
  onClick: A,
560
553
  disabled: !E
561
554
  })
562
555
  })
563
556
  }),
564
- children: /* @__PURE__ */ W(Le, {
557
+ children: /* @__PURE__ */ G(Ie, {
565
558
  features: e,
566
559
  responseFormat: b,
567
560
  systemPrompt: w,
@@ -581,11 +574,11 @@ var ye = (e, t) => {
581
574
  })
582
575
  });
583
576
  };
584
- L(Be);
585
- var Ve = {
577
+ de(ze);
578
+ var Be = {
586
579
  icon: "_icon_1fv6z_1",
587
580
  selectedIcon: "_selectedIcon_1fv6z_5"
588
- }, He = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: p, itemLabelClassName: m = "dial-small-text", colors: h }) => /* @__PURE__ */ W(K, {
581
+ }, Ve = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: p, itemLabelClassName: m = "dial-small-text", colors: h }) => /* @__PURE__ */ G(q, {
589
582
  isOpen: e,
590
583
  title: u,
591
584
  closeLabel: i,
@@ -593,33 +586,33 @@ var Ve = {
593
586
  onBack: t,
594
587
  backLabel: n,
595
588
  style: s,
596
- children: /* @__PURE__ */ W("ul", {
589
+ children: /* @__PURE__ */ G("ul", {
597
590
  role: "menu",
598
591
  className: "flex flex-col pb-4",
599
592
  style: a({
600
593
  "--tbs-icon-text": h?.iconText,
601
594
  "--tbs-selected-icon-text": h?.selectedIconText
602
595
  }),
603
- children: d.map((e) => /* @__PURE__ */ W("li", {
596
+ children: d.map((e) => /* @__PURE__ */ G("li", {
604
597
  role: "none",
605
- children: /* @__PURE__ */ W(l, {
598
+ children: /* @__PURE__ */ G(l, {
606
599
  type: "button",
607
600
  role: "menuitemcheckbox",
608
601
  "aria-checked": e.isSelected,
609
602
  className: "w-full gap-3 px-4 py-[10px] text-start",
610
- iconBefore: /* @__PURE__ */ W("span", {
611
- className: o("flex items-center", Ve.icon),
603
+ iconBefore: /* @__PURE__ */ G("span", {
604
+ className: o("flex items-center", Be.icon),
612
605
  children: e.icon
613
606
  }),
614
- iconAfter: e.isSelected ? /* @__PURE__ */ W("span", {
615
- className: o("ms-auto", Ve.selectedIcon),
616
- children: /* @__PURE__ */ W(M, {
607
+ iconAfter: e.isSelected ? /* @__PURE__ */ G("span", {
608
+ className: o("ms-auto", Be.selectedIcon),
609
+ children: /* @__PURE__ */ G(N, {
617
610
  size: c,
618
611
  "aria-hidden": !0,
619
612
  stroke: f
620
613
  })
621
614
  }) : null,
622
- label: /* @__PURE__ */ W("span", {
615
+ label: /* @__PURE__ */ G("span", {
623
616
  className: m,
624
617
  children: e.label
625
618
  }),
@@ -627,12 +620,12 @@ var Ve = {
627
620
  })
628
621
  }, e.id))
629
622
  })
630
- }), Ue = {
623
+ }), J = {
631
624
  selectedToolIcon: "_selectedToolIcon_r268y_1",
632
625
  toolIcon: "_toolIcon_r268y_5",
633
626
  chevronIcon: "_chevronIcon_r268y_9"
634
- }, We = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: p = "w-[240px]", isDisabled: m = !1, chatSettings: _, extraMenuItems: y, toolsMenuItems: b = [], onToolToggle: x, toolsMenuTitle: S = "Tools", toolsBackLabel: C = "Back", promptsMenuOverlay: w, promptsMenuTitle: T = "Prompts", promptsBackLabel: E = "Back", colors: D }) => {
635
- let O = s(), [k, A] = H(!1), [ee, j] = H(!1), [te, ne] = H(!1), [re, ie] = H(!1), [ae, P] = H(!1), F = B(() => a({
627
+ }, He = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: p = "w-[240px]", isDisabled: m = !1, chatSettings: _, extraMenuItems: y, toolsMenuItems: b = [], onToolToggle: x, toolsMenuTitle: S = "Tools", toolsBackLabel: C = "Back", promptsMenuOverlay: w, promptsMenuTitle: T = "Prompts", promptsBackLabel: E = "Back", colors: D }) => {
628
+ let O = s(), [k, A] = U(!1), [j, M] = U(!1), [ee, te] = U(!1), [ne, re] = U(!1), [ie, F] = U(!1), I = V(() => a({
636
629
  "--aab-selected-tool-icon": D?.selectedToolIcon,
637
630
  "--aab-tool-icon": D?.toolIcon,
638
631
  "--aab-chevron-icon": D?.chevronIcon
@@ -640,36 +633,36 @@ var Ve = {
640
633
  D?.selectedToolIcon,
641
634
  D?.toolIcon,
642
635
  D?.chevronIcon
643
- ]), de = b.length > 0 && x != null, fe = B(() => b.map((e) => ({
636
+ ]), L = b.length > 0 && x != null, ue = V(() => b.map((e) => ({
644
637
  key: e.id,
645
- label: /* @__PURE__ */ G("span", {
638
+ label: /* @__PURE__ */ K("span", {
646
639
  className: "flex flex-1 items-center gap-2",
647
- children: [/* @__PURE__ */ W("span", {
640
+ children: [/* @__PURE__ */ G("span", {
648
641
  className: "flex-1",
649
642
  children: e.label
650
- }), e.isSelected && /* @__PURE__ */ W(M, {
643
+ }), e.isSelected && /* @__PURE__ */ G(N, {
651
644
  size: c,
652
- style: F,
653
- className: Ue.selectedToolIcon,
645
+ style: I,
646
+ className: J.selectedToolIcon,
654
647
  "aria-hidden": !0,
655
648
  stroke: f
656
649
  })]
657
650
  }),
658
- icon: /* @__PURE__ */ W("span", {
659
- style: F,
660
- className: o("flex items-center", Ue.toolIcon),
651
+ icon: /* @__PURE__ */ G("span", {
652
+ style: I,
653
+ className: o("flex items-center", J.toolIcon),
661
654
  children: e.icon
662
655
  }),
663
656
  onClick: () => x?.(e.id)
664
657
  })), [
665
658
  b,
666
659
  x,
667
- F
668
- ]), I = B(() => [
660
+ I
661
+ ]), R = V(() => [
669
662
  ...e == null ? [] : [{
670
663
  key: "attach",
671
664
  label: t,
672
- icon: /* @__PURE__ */ W(oe, {
665
+ icon: /* @__PURE__ */ G(ae, {
673
666
  size: c,
674
667
  "aria-hidden": !0,
675
668
  stroke: f
@@ -677,66 +670,66 @@ var Ve = {
677
670
  onClick: e
678
671
  }],
679
672
  ...y ?? [],
680
- ...de ? [{
673
+ ...L ? [{
681
674
  key: "tools",
682
675
  label: S,
683
- icon: /* @__PURE__ */ W(ue, {
676
+ icon: /* @__PURE__ */ G(le, {
684
677
  size: c,
685
678
  "aria-hidden": !0,
686
679
  stroke: f
687
680
  }),
688
681
  onClick: O ? () => {
689
- ne(!0), A(!1);
682
+ te(!0), A(!1);
690
683
  } : () => void 0,
691
- ...O ? { iconAfter: /* @__PURE__ */ W(N, {
684
+ ...O ? { iconAfter: /* @__PURE__ */ G(P, {
692
685
  size: c,
693
686
  stroke: f,
694
- style: F,
695
- className: o("rtl:scale-x-[-1]", Ue.chevronIcon),
687
+ style: I,
688
+ className: o("rtl:scale-x-[-1]", J.chevronIcon),
696
689
  "aria-hidden": !0
697
- }) } : { children: fe }
690
+ }) } : { children: ue }
698
691
  }] : [],
699
692
  ...w == null ? [] : [{
700
693
  key: "prompts",
701
694
  label: T,
702
- icon: /* @__PURE__ */ W(ce, {
695
+ icon: /* @__PURE__ */ G(se, {
703
696
  size: c,
704
697
  "aria-hidden": !0,
705
698
  stroke: f
706
699
  }),
707
700
  onClick: O ? () => {
708
- ie(!0), A(!1);
701
+ re(!0), A(!1);
709
702
  } : () => void 0,
710
- ...O ? { iconAfter: /* @__PURE__ */ W(N, {
703
+ ...O ? { iconAfter: /* @__PURE__ */ G(P, {
711
704
  size: c,
712
705
  stroke: f,
713
- style: F,
714
- className: o("rtl:scale-x-[-1]", Ue.chevronIcon),
706
+ style: I,
707
+ className: o("rtl:scale-x-[-1]", J.chevronIcon),
715
708
  "aria-hidden": !0
716
709
  }) } : {
717
710
  children: [{
718
711
  key: "prompts-panel",
719
712
  label: ""
720
713
  }],
721
- renderSubMenu: () => w(() => P(!1))
714
+ renderSubMenu: () => w(() => F(!1))
722
715
  }
723
716
  }],
724
717
  ..._ == null ? [] : [{
725
718
  key: "chat-settings",
726
719
  label: _.menuItemLabel ?? "Chat settings",
727
- icon: /* @__PURE__ */ W(le, {
720
+ icon: /* @__PURE__ */ G(ce, {
728
721
  size: c,
729
722
  "aria-hidden": !0,
730
723
  stroke: f
731
724
  }),
732
- iconAfter: O ? /* @__PURE__ */ W(N, {
725
+ iconAfter: O ? /* @__PURE__ */ G(P, {
733
726
  size: c,
734
727
  stroke: f,
735
- style: F,
736
- className: o("rtl:scale-x-[-1]", Ue.chevronIcon),
728
+ style: I,
729
+ className: o("rtl:scale-x-[-1]", J.chevronIcon),
737
730
  "aria-hidden": !0
738
731
  }) : null,
739
- onClick: () => j(!0)
732
+ onClick: () => M(!0)
740
733
  }]
741
734
  ], [
742
735
  t,
@@ -744,23 +737,23 @@ var Ve = {
744
737
  _,
745
738
  y,
746
739
  O,
747
- de,
740
+ L,
748
741
  S,
749
- fe,
742
+ ue,
750
743
  w,
751
744
  T,
752
- F
745
+ I
753
746
  ]);
754
- if (I.length === 0) return null;
755
- let L = /* @__PURE__ */ W(h, {
747
+ if (R.length === 0) return null;
748
+ let de = /* @__PURE__ */ G(h, {
756
749
  matchReferenceWidth: !1,
757
750
  placement: "bottom-start",
758
751
  listClassName: p,
759
- items: I,
760
- open: w == null ? void 0 : ae,
761
- onOpenChange: w == null ? void 0 : P,
762
- children: /* @__PURE__ */ W(v, {
763
- icon: /* @__PURE__ */ W(se, {
752
+ items: R,
753
+ open: w == null ? void 0 : ie,
754
+ onOpenChange: w == null ? void 0 : F,
755
+ children: /* @__PURE__ */ G(v, {
756
+ icon: /* @__PURE__ */ G(oe, {
764
757
  size: d.LG,
765
758
  "aria-hidden": !0,
766
759
  stroke: f
@@ -770,9 +763,9 @@ var Ve = {
770
763
  disabled: m
771
764
  })
772
765
  });
773
- return /* @__PURE__ */ W(U, { children: O ? /* @__PURE__ */ G(U, { children: [
774
- /* @__PURE__ */ W(v, {
775
- icon: /* @__PURE__ */ W(se, {
766
+ return /* @__PURE__ */ G(W, { children: O ? /* @__PURE__ */ K(W, { children: [
767
+ /* @__PURE__ */ G(v, {
768
+ icon: /* @__PURE__ */ G(oe, {
776
769
  size: d.LG,
777
770
  "aria-hidden": !0,
778
771
  stroke: f
@@ -783,48 +776,48 @@ var Ve = {
783
776
  disabled: m,
784
777
  onClick: () => A(!0)
785
778
  }),
786
- /* @__PURE__ */ W(Pe, {
779
+ /* @__PURE__ */ G(Ne, {
787
780
  isOpen: k,
788
781
  title: r,
789
782
  closeLabel: l,
790
783
  onClose: () => A(!1),
791
784
  style: u,
792
- items: I,
785
+ items: R,
793
786
  className: "pb-4",
794
787
  btnTextClassName: "flex-1"
795
788
  }),
796
- de && /* @__PURE__ */ W(He, {
797
- isOpen: te,
789
+ L && /* @__PURE__ */ G(Ve, {
790
+ isOpen: ee,
798
791
  onBack: () => {
799
- ne(!1), A(!0);
792
+ te(!1), A(!0);
800
793
  },
801
794
  backLabel: C,
802
- onClose: () => ne(!1),
795
+ onClose: () => te(!1),
803
796
  closeLabel: l,
804
797
  style: u,
805
798
  title: S,
806
799
  items: b,
807
800
  onToolToggle: x
808
801
  }),
809
- w != null && /* @__PURE__ */ W(K, {
810
- isOpen: re,
802
+ w != null && /* @__PURE__ */ G(q, {
803
+ isOpen: ne,
811
804
  title: T,
812
805
  closeLabel: l,
813
806
  onBack: () => {
814
- ie(!1), A(!0);
807
+ re(!1), A(!0);
815
808
  },
816
809
  backLabel: E,
817
- onClose: () => ie(!1),
810
+ onClose: () => re(!1),
818
811
  style: u,
819
- children: w(() => ie(!1))
812
+ children: w(() => re(!1))
820
813
  }),
821
- _ != null && /* @__PURE__ */ W(Re, {
822
- isOpen: ee,
814
+ _ != null && /* @__PURE__ */ G(Le, {
815
+ isOpen: j,
823
816
  onBack: () => {
824
- j(!1), A(!0);
817
+ M(!1), A(!0);
825
818
  },
826
819
  backLabel: _.backLabel ?? "Back",
827
- onClose: () => j(!1),
820
+ onClose: () => M(!1),
828
821
  closeLabel: l,
829
822
  style: u,
830
823
  features: _.features,
@@ -845,13 +838,13 @@ var Ve = {
845
838
  saveLabel: _.saveLabel,
846
839
  saveDisabledTooltip: _.saveDisabledTooltip
847
840
  })
848
- ] }) : /* @__PURE__ */ G(U, { children: [L, _ != null && ee && /* @__PURE__ */ W(Be, {
841
+ ] }) : /* @__PURE__ */ K(W, { children: [de, _ != null && j && /* @__PURE__ */ G(ze, {
849
842
  features: _.features,
850
843
  initialResponseFormat: _.responseFormat ?? i.Markdown,
851
844
  initialSystemPrompt: _.systemPrompt,
852
845
  initialTemperature: _.temperature,
853
846
  onSave: _.onSave,
854
- onClose: () => j(!1),
847
+ onClose: () => M(!1),
855
848
  title: _.title,
856
849
  responseFormatLabel: _.responseFormatLabel,
857
850
  responseFormatHint: _.responseFormatHint,
@@ -865,13 +858,13 @@ var Ve = {
865
858
  saveLabel: _.saveLabel,
866
859
  saveDisabledTooltip: _.saveDisabledTooltip
867
860
  })] }) });
868
- }, q = {
861
+ }, Ue = {
869
862
  chip: "_chip_ydmd8_1",
870
863
  chipSelected: "_chipSelected_ydmd8_9",
871
864
  chipIcon: "_chipIcon_ydmd8_16",
872
865
  chipText: "_chipText_ydmd8_19",
873
866
  chipClose: "_chipClose_ydmd8_22"
874
- }, Ge = (e) => `Remove ${e}`, Ke = ({ items: e, onToolToggle: t, onToolDismiss: n, removeLabel: r = Ge, typography: i, colors: s }) => e.length === 0 ? null : /* @__PURE__ */ W("div", {
867
+ }, We = (e) => `Remove ${e}`, Ge = ({ items: e, onToolToggle: t, onToolDismiss: n, removeLabel: r = We, typography: i, colors: s }) => e.length === 0 ? null : /* @__PURE__ */ G("div", {
875
868
  className: "flex flex-wrap items-center gap-2",
876
869
  style: a({
877
870
  "--ci-chip-bg": s?.chipBg,
@@ -886,68 +879,68 @@ var Ve = {
886
879
  "--ci-chip-close": s?.chipClose,
887
880
  "--ci-chip-close-hover": s?.chipCloseHover
888
881
  }),
889
- children: e.map((e) => /* @__PURE__ */ G("div", {
890
- className: o(q.chip, e.isSelected && q.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 pe-1 ps-2 transition-colors"),
891
- children: [/* @__PURE__ */ G("button", {
882
+ children: e.map((e) => /* @__PURE__ */ K("div", {
883
+ className: o(Ue.chip, e.isSelected && Ue.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 pe-1 ps-2 transition-colors"),
884
+ children: [/* @__PURE__ */ K("button", {
892
885
  type: "button",
893
886
  onClick: () => t(e.id),
894
887
  "aria-pressed": e.isSelected,
895
888
  className: "flex min-w-0 items-center gap-1.5",
896
- children: [/* @__PURE__ */ W("span", {
897
- className: o(q.chipIcon, "shrink-0"),
889
+ children: [/* @__PURE__ */ G("span", {
890
+ className: o(Ue.chipIcon, "shrink-0"),
898
891
  "aria-hidden": !0,
899
892
  children: e.icon
900
- }), /* @__PURE__ */ W("span", {
901
- className: o(q.chipText, i?.fontClassName || "dial-small-paragraph-text", "truncate"),
893
+ }), /* @__PURE__ */ G("span", {
894
+ className: o(Ue.chipText, i?.fontClassName || "dial-small-paragraph-text", "truncate"),
902
895
  children: e.label
903
896
  })]
904
- }), /* @__PURE__ */ W("button", {
897
+ }), /* @__PURE__ */ G("button", {
905
898
  type: "button",
906
899
  onClick: () => n(e.id),
907
900
  "aria-label": r(e.label),
908
- className: o(q.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
909
- children: /* @__PURE__ */ W(de, {
901
+ className: o(Ue.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
902
+ children: /* @__PURE__ */ G(L, {
910
903
  size: 12,
911
904
  "aria-hidden": !0,
912
905
  stroke: f
913
906
  })
914
907
  })]
915
908
  }, e.id))
916
- }), J = {
909
+ }), Y = {
917
910
  wrapper: "_wrapper_15jsc_1",
918
911
  wrapperDisabled: "_wrapperDisabled_15jsc_8",
919
912
  textarea: "_textarea_15jsc_13",
920
913
  modelSelectorButton: "_modelSelectorButton_15jsc_24",
921
914
  modelSelectorCaret: "_modelSelectorCaret_15jsc_24",
922
915
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_15jsc_33"
923
- }, qe = {
916
+ }, Ke = {
924
917
  wrapperError: "_wrapperError_129ri_1",
925
918
  waveformCanvas: "_waveformCanvas_129ri_5",
926
919
  recordingDot: "_recordingDot_129ri_19",
927
920
  "recording-pulse": "_recording-pulse_129ri_1"
928
- }, Je = 3, Ye = 4, Y = 200, Xe = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, stopLabel: a = "Stop recording", discardLabel: s = "Discard recording", style: c, className: l }) => {
929
- let u = V(null), p = V(new Float32Array(Y)), m = V(0), h = V(0), g = e === Oe.Recording, y = e === Oe.Error, b = R((e) => {
921
+ }, qe = 3, Je = 4, X = 200, Ye = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, stopLabel: a = "Stop recording", discardLabel: s = "Discard recording", style: c, className: l }) => {
922
+ let u = H(null), p = H(new Float32Array(X)), m = H(0), h = H(0), g = e === De.Recording, y = e === De.Error, b = z((e) => {
930
923
  let t = e.getContext("2d");
931
924
  if (!t) return;
932
925
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
933
926
  let { width: n, height: r } = e;
934
927
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
935
- let i = Math.min(Math.max(1, Math.floor(n / Ye)), Y - 1), a = m.current, o = h.current;
928
+ let i = Math.min(Math.max(1, Math.floor(n / Je)), X - 1), a = m.current, o = h.current;
936
929
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
937
930
  for (let e = 0; e <= i; e++) {
938
- let n = ((a - i + e) % Y + Y) % Y, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
939
- t.fillRect(e * Ye, (r - c) / 2, Je, c);
931
+ let n = ((a - i + e) % X + X) % X, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
932
+ t.fillRect(e * Je, (r - c) / 2, qe, c);
940
933
  }
941
934
  t.restore();
942
935
  }, []);
943
- z(() => {
936
+ B(() => {
944
937
  if (!g) return;
945
938
  let e = u.current;
946
939
  if (!e) return;
947
940
  p.current.fill(0), m.current = 0, h.current = 0;
948
941
  let n, r = () => {
949
- if (h.current += 1, h.current >= Ye) {
950
- h.current -= Ye;
942
+ if (h.current += 1, h.current >= Je) {
943
+ h.current -= Je;
951
944
  let e = t.current;
952
945
  if (e) {
953
946
  let t = new Uint8Array(e.frequencyBinCount);
@@ -957,7 +950,7 @@ var Ve = {
957
950
  let r = (t[e] - 128) / 128;
958
951
  n += r * r;
959
952
  }
960
- p.current[m.current % Y] = Math.sqrt(n / t.length), m.current++;
953
+ p.current[m.current % X] = Math.sqrt(n / t.length), m.current++;
961
954
  }
962
955
  }
963
956
  b(e), n = requestAnimationFrame(r);
@@ -969,7 +962,7 @@ var Ve = {
969
962
  g,
970
963
  t,
971
964
  b
972
- ]), z(() => {
965
+ ]), B(() => {
973
966
  let e = u.current;
974
967
  if (!e) return;
975
968
  let t = new ResizeObserver(() => {
@@ -977,18 +970,18 @@ var Ve = {
977
970
  });
978
971
  return t.observe(e), () => t.disconnect();
979
972
  }, [b]);
980
- let x = /* @__PURE__ */ G("div", {
973
+ let x = /* @__PURE__ */ K("div", {
981
974
  className: "flex flex-shrink-0 items-center justify-end gap-1",
982
- children: [/* @__PURE__ */ W(v, {
983
- icon: /* @__PURE__ */ W(de, {
975
+ children: [/* @__PURE__ */ G(v, {
976
+ icon: /* @__PURE__ */ G(L, {
984
977
  size: d.LG,
985
978
  "aria-hidden": !0,
986
979
  stroke: f
987
980
  }),
988
981
  "aria-label": s,
989
982
  onClick: i
990
- }), g && /* @__PURE__ */ W(w, {
991
- icon: /* @__PURE__ */ W(P, {
983
+ }), g && /* @__PURE__ */ G(w, {
984
+ icon: /* @__PURE__ */ G(F, {
992
985
  size: d.LG,
993
986
  "aria-hidden": !0
994
987
  }),
@@ -996,82 +989,82 @@ var Ve = {
996
989
  "aria-label": a
997
990
  })]
998
991
  });
999
- return /* @__PURE__ */ G("div", {
992
+ return /* @__PURE__ */ K("div", {
1000
993
  className: l,
1001
- children: [/* @__PURE__ */ G("div", {
994
+ children: [/* @__PURE__ */ K("div", {
1002
995
  style: c,
1003
- className: o(J.wrapper, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 shadow-md desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", y && qe.wrapperError),
1004
- children: [/* @__PURE__ */ G("div", {
996
+ className: o(Y.wrapper, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 shadow-md desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", y && Ke.wrapperError),
997
+ children: [/* @__PURE__ */ K("div", {
1005
998
  className: "flex min-w-0 flex-1 items-center gap-3",
1006
- children: [g && /* @__PURE__ */ W("span", {
1007
- className: o(qe.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
999
+ children: [g && /* @__PURE__ */ G("span", {
1000
+ className: o(Ke.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1008
1001
  "aria-hidden": !0
1009
- }), /* @__PURE__ */ W("canvas", {
1002
+ }), /* @__PURE__ */ G("canvas", {
1010
1003
  ref: u,
1011
1004
  height: 32,
1012
- className: o(qe.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
1005
+ className: o(Ke.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
1013
1006
  })]
1014
1007
  }), x]
1015
- }), y && n && /* @__PURE__ */ W(_, {
1008
+ }), y && n && /* @__PURE__ */ G(_, {
1016
1009
  text: n,
1017
1010
  className: "mt-1 px-1"
1018
1011
  })]
1019
1012
  });
1020
- }, Ze = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ W(w, {
1013
+ }, Xe = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ G(w, {
1021
1014
  "aria-label": n,
1022
1015
  onClick: () => e?.(),
1023
1016
  disabled: t,
1024
1017
  "aria-hidden": r,
1025
- icon: /* @__PURE__ */ W(ne, {
1018
+ icon: /* @__PURE__ */ G(te, {
1026
1019
  size: d.LG,
1027
1020
  className: "rtl:scale-x-[-1]",
1028
1021
  stroke: f
1029
1022
  })
1030
- }), Qe = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ W(A, {
1031
- icon: /* @__PURE__ */ W(F, {
1023
+ }), Ze = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ G(A, {
1024
+ icon: /* @__PURE__ */ G(I, {
1032
1025
  size: d.LG,
1033
1026
  stroke: f
1034
1027
  }),
1035
1028
  onClick: () => e?.(),
1036
1029
  "aria-label": t
1037
- }), $e = ({ size: e = 20 }) => /* @__PURE__ */ W(O, {
1030
+ }), Qe = ({ size: e = 20 }) => /* @__PURE__ */ G(O, {
1038
1031
  variant: k.Circular,
1039
1032
  width: e,
1040
1033
  height: e,
1041
1034
  active: !0
1042
- }), et = ({ loadingLabel: e }) => /* @__PURE__ */ G("span", {
1035
+ }), $e = ({ loadingLabel: e }) => /* @__PURE__ */ K("span", {
1043
1036
  className: "flex min-w-0 flex-1 items-center",
1044
- children: [/* @__PURE__ */ W(O, {
1037
+ children: [/* @__PURE__ */ G(O, {
1045
1038
  variant: k.Text,
1046
1039
  width: "100%",
1047
1040
  height: 16,
1048
1041
  active: !0
1049
- }), e && /* @__PURE__ */ W("span", {
1042
+ }), e && /* @__PURE__ */ G("span", {
1050
1043
  className: "sr-only",
1051
1044
  children: e
1052
1045
  })]
1053
- }), tt = ({ loadingLabel: e }) => /* @__PURE__ */ W("div", {
1046
+ }), et = ({ loadingLabel: e }) => /* @__PURE__ */ G("div", {
1054
1047
  role: "status",
1055
1048
  "aria-label": e,
1056
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ G("div", {
1049
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ K("div", {
1057
1050
  className: "flex h-11 items-center gap-3 px-4",
1058
1051
  "aria-hidden": "true",
1059
- children: [/* @__PURE__ */ W($e, {}), /* @__PURE__ */ W(et, {})]
1052
+ children: [/* @__PURE__ */ G(Qe, {}), /* @__PURE__ */ G($e, {})]
1060
1053
  }, t))
1061
- }), X = (e) => e.displayName ?? e.id, Z = (e, t) => {
1054
+ }), Z = (e) => e.displayName ?? e.id, tt = (e, t) => {
1062
1055
  let n = t.trim().toLowerCase();
1063
- return n ? e.filter((e) => X(e).toLowerCase().includes(n)) : e;
1064
- }, nt = (e, t, r, i = 18, a) => /* @__PURE__ */ W(n, {
1056
+ return n ? e.filter((e) => Z(e).toLowerCase().includes(n)) : e;
1057
+ }, Q = (e, t, r, i = 18, a) => /* @__PURE__ */ G(n, {
1065
1058
  src: e,
1066
1059
  size: i,
1067
1060
  labels: { tooltip: a },
1068
1061
  initialsName: r
1069
- }), rt = {
1062
+ }), nt = {
1070
1063
  searchHeader: "_searchHeader_1tt5t_1",
1071
1064
  selectedItem: "_selectedItem_1tt5t_5",
1072
1065
  selectedItemCheck: "_selectedItemCheck_1tt5t_9"
1073
- }, it = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = rt.searchHeader, selectedItemClassName: s = rt.selectedItem, selectedItemCheckClassName: c = rt.selectedItemCheck, colors: l }) => {
1074
- let [u, p] = H(""), m = B(() => e?.find((e) => e.id === t), [e, t]), h = r?.loading !== void 0, _ = !h && !m && !!t, v = B(() => h ? /* @__PURE__ */ W($e, { size: d.LG }) : nt(m?.iconUrl, m?.type, m?.displayName ?? m?.id ?? "", d.LG, _ ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1066
+ }, rt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = nt.searchHeader, selectedItemClassName: s = nt.selectedItem, selectedItemCheckClassName: c = nt.selectedItemCheck, colors: l }) => {
1067
+ let [u, p] = U(""), m = V(() => e?.find((e) => e.id === t), [e, t]), h = r?.loading !== void 0, _ = !h && !m && !!t, v = V(() => h ? /* @__PURE__ */ G(Qe, { size: d.LG }) : Q(m?.iconUrl, m?.type, m?.displayName ?? m?.id ?? "", d.LG, _ ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1075
1068
  h,
1076
1069
  m,
1077
1070
  _,
@@ -1081,11 +1074,11 @@ var Ve = {
1081
1074
  selectorIcon: v,
1082
1075
  selectorAriaLabel: b ? `${r?.ariaLabel ?? "Select model"}: ${b}` : r?.ariaLabel ?? "Select model",
1083
1076
  selectedLabel: b,
1084
- menuItems: B(() => {
1077
+ menuItems: V(() => {
1085
1078
  if (h) return Array.from({ length: 7 }, (e, t) => ({
1086
1079
  key: `__loading-${t}`,
1087
- icon: /* @__PURE__ */ W($e, {}),
1088
- label: /* @__PURE__ */ W(et, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1080
+ icon: /* @__PURE__ */ G(Qe, {}),
1081
+ label: /* @__PURE__ */ G($e, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1089
1082
  disabled: !0
1090
1083
  }));
1091
1084
  if (!e || e.length === 0) {
@@ -1096,25 +1089,25 @@ var Ve = {
1096
1089
  disabled: !0
1097
1090
  }] : [];
1098
1091
  }
1099
- return Z(e, u).map((e) => {
1092
+ return tt(e, u).map((e) => {
1100
1093
  let r = e.id === t;
1101
1094
  return {
1102
1095
  key: e.id,
1103
- label: /* @__PURE__ */ G("span", {
1096
+ label: /* @__PURE__ */ K("span", {
1104
1097
  className: "flex w-full items-center justify-between gap-2",
1105
1098
  style: a({ "--ms-selected-item-check": l?.selectedItemCheck }),
1106
- children: [/* @__PURE__ */ W(y, {
1107
- text: X(e),
1099
+ children: [/* @__PURE__ */ G(y, {
1100
+ text: Z(e),
1108
1101
  query: u,
1109
1102
  maxLines: 1
1110
- }), r && /* @__PURE__ */ W(M, {
1103
+ }), r && /* @__PURE__ */ G(N, {
1111
1104
  size: d.SM,
1112
1105
  stroke: f,
1113
1106
  className: c,
1114
1107
  "aria-hidden": !0
1115
1108
  })]
1116
1109
  }),
1117
- icon: nt(e.iconUrl, e.type, e.displayName ?? e.id),
1110
+ icon: Q(e.iconUrl, e.type, e.displayName ?? e.id),
1118
1111
  onClick: () => n?.(e.id),
1119
1112
  className: r ? s : void 0
1120
1113
  };
@@ -1130,10 +1123,10 @@ var Ve = {
1130
1123
  c,
1131
1124
  l?.selectedItemCheck
1132
1125
  ]),
1133
- menuHeader: B(() => !h && e && e.length > 0 ? /* @__PURE__ */ W("div", {
1126
+ menuHeader: V(() => !h && e && e.length > 0 ? /* @__PURE__ */ G("div", {
1134
1127
  style: a({ "--ms-search-header-bg": l?.searchHeaderBackground }),
1135
1128
  className: o("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
1136
- children: /* @__PURE__ */ W(D, {
1129
+ children: /* @__PURE__ */ G(D, {
1137
1130
  value: u,
1138
1131
  placeholder: r?.searchPlaceholder ?? "Search",
1139
1132
  size: g.Small,
@@ -1152,7 +1145,7 @@ var Ve = {
1152
1145
  e || p("");
1153
1146
  }
1154
1147
  };
1155
- }, Q = typeof window < "u" ? me : z;
1148
+ }, it = typeof window < "u" ? pe : B;
1156
1149
  function at(e) {
1157
1150
  if (e !== void 0) switch (typeof e) {
1158
1151
  case "number": return e;
@@ -1162,14 +1155,14 @@ function at(e) {
1162
1155
  }
1163
1156
  }
1164
1157
  function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1165
- let { styleHeight: s, styleWidth: c } = B(() => ({
1158
+ let { styleHeight: s, styleWidth: c } = V(() => ({
1166
1159
  styleHeight: at(o?.height),
1167
1160
  styleWidth: at(o?.width)
1168
- }), [o?.height, o?.width]), [l, u] = H({
1161
+ }), [o?.height, o?.width]), [l, u] = U({
1169
1162
  height: t,
1170
1163
  width: n
1171
1164
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1172
- return Q(() => {
1165
+ return it(() => {
1173
1166
  if (i === null || d) return;
1174
1167
  let t = new ResizeObserver((e) => {
1175
1168
  for (let t of e) {
@@ -1189,7 +1182,7 @@ function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1189
1182
  i,
1190
1183
  s,
1191
1184
  c
1192
- ]), B(() => ({
1185
+ ]), V(() => ({
1193
1186
  height: s ?? l.height,
1194
1187
  width: c ?? l.width
1195
1188
  }), [
@@ -1199,12 +1192,12 @@ function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1199
1192
  ]);
1200
1193
  }
1201
1194
  function st(e) {
1202
- let t = V(() => {
1195
+ let t = H(() => {
1203
1196
  throw Error("Cannot call during render.");
1204
1197
  });
1205
- return Q(() => {
1198
+ return it(() => {
1206
1199
  t.current = e;
1207
- }, [e]), R((e) => t.current?.(e), [t]);
1200
+ }, [e]), z((e) => t.current?.(e), [t]);
1208
1201
  }
1209
1202
  var ct = null;
1210
1203
  function lt(e = !1) {
@@ -1316,7 +1309,7 @@ function ht({ itemCount: e, itemProps: t, itemSize: n }) {
1316
1309
  };
1317
1310
  }
1318
1311
  function gt({ itemCount: e, itemProps: t, itemSize: n }) {
1319
- return B(() => ht({
1312
+ return V(() => ht({
1320
1313
  itemCount: e,
1321
1314
  itemProps: t,
1322
1315
  itemSize: n
@@ -1345,14 +1338,14 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1345
1338
  element: e,
1346
1339
  mode: r === "vertical" ? "only-height" : "only-width",
1347
1340
  style: t
1348
- }), f = V({
1341
+ }), f = H({
1349
1342
  height: 0,
1350
1343
  width: 0
1351
1344
  }), p = r === "vertical" ? u : d, m = _t({
1352
1345
  containerSize: p,
1353
1346
  itemSize: s
1354
1347
  });
1355
- me(() => {
1348
+ pe(() => {
1356
1349
  if (typeof c == "function") {
1357
1350
  let e = f.current;
1358
1351
  (e.height !== u || e.width !== d) && (c({
@@ -1369,7 +1362,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1369
1362
  itemCount: a,
1370
1363
  itemProps: o,
1371
1364
  itemSize: m
1372
- }), g = R((e) => h.get(e), [h]), [_, v] = H(() => mt({
1365
+ }), g = z((e) => h.get(e), [h]), [_, v] = U(() => mt({
1373
1366
  cachedBounds: h,
1374
1367
  containerScrollOffset: 0,
1375
1368
  containerSize: p,
@@ -1380,7 +1373,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1380
1373
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1381
1374
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1382
1375
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1383
- }, C = R(() => ft({
1376
+ }, C = z(() => ft({
1384
1377
  cachedBounds: h,
1385
1378
  itemCount: a,
1386
1379
  itemSize: m
@@ -1388,7 +1381,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1388
1381
  h,
1389
1382
  a,
1390
1383
  m
1391
- ]), w = R((t) => mt({
1384
+ ]), w = z((t) => mt({
1392
1385
  cachedBounds: h,
1393
1386
  containerScrollOffset: ut({
1394
1387
  containerElement: e,
@@ -1408,13 +1401,13 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1408
1401
  a,
1409
1402
  l
1410
1403
  ]);
1411
- return Q(() => {
1404
+ return it(() => {
1412
1405
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1413
1406
  }, [
1414
1407
  e,
1415
1408
  r,
1416
1409
  w
1417
- ]), Q(() => {
1410
+ ]), it(() => {
1418
1411
  if (!e) return;
1419
1412
  let t = () => {
1420
1413
  v((t) => {
@@ -1476,7 +1469,7 @@ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1476
1469
  };
1477
1470
  }
1478
1471
  function yt(e) {
1479
- return B(() => e, Object.values(e));
1472
+ return V(() => e, Object.values(e));
1480
1473
  }
1481
1474
  function bt(e, t) {
1482
1475
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
@@ -1487,18 +1480,18 @@ function xt(e) {
1487
1480
  }
1488
1481
  var St = "data-react-window-index";
1489
1482
  function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
1490
- let m = yt(u), h = B(() => L(s, bt), [s]), [g, _] = H(null), v = xt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = vt({
1483
+ let m = yt(u), h = V(() => de(s, bt), [s]), [g, _] = U(null), v = xt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = vt({
1491
1484
  containerElement: g,
1492
1485
  containerStyle: f,
1493
1486
  defaultContainerSize: n,
1494
1487
  direction: "vertical",
1495
1488
  itemCount: c,
1496
1489
  itemProps: m,
1497
- itemSize: B(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1490
+ itemSize: V(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1498
1491
  onResize: i,
1499
1492
  overscanCount: o
1500
1493
  });
1501
- pe(r, () => ({
1494
+ fe(r, () => ({
1502
1495
  get element() {
1503
1496
  return g;
1504
1497
  },
@@ -1513,7 +1506,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1513
1506
  top: r
1514
1507
  });
1515
1508
  }
1516
- }), [g, x]), Q(() => {
1509
+ }), [g, x]), it(() => {
1517
1510
  if (!g) return;
1518
1511
  let e = Array.from(g.children).filter((e, t) => {
1519
1512
  if (e.hasAttribute("aria-hidden")) return !1;
@@ -1527,7 +1520,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1527
1520
  l,
1528
1521
  S,
1529
1522
  w
1530
- ]), z(() => {
1523
+ ]), B(() => {
1531
1524
  S >= 0 && w >= 0 && a && a({
1532
1525
  startIndex: C,
1533
1526
  stopIndex: T
@@ -1542,11 +1535,11 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1542
1535
  w,
1543
1536
  T
1544
1537
  ]);
1545
- let E = B(() => {
1538
+ let E = V(() => {
1546
1539
  let e = [];
1547
1540
  if (c > 0) for (let t = S; t <= w; t++) {
1548
1541
  let n = y(t);
1549
- e.push(/* @__PURE__ */ I(h, {
1542
+ e.push(/* @__PURE__ */ R(h, {
1550
1543
  ...m,
1551
1544
  ariaAttributes: {
1552
1545
  "aria-posinset": t + 1,
@@ -1573,7 +1566,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1573
1566
  m,
1574
1567
  S,
1575
1568
  w
1576
- ]), D = /* @__PURE__ */ W("div", {
1569
+ ]), D = /* @__PURE__ */ G("div", {
1577
1570
  "aria-hidden": !0,
1578
1571
  style: {
1579
1572
  height: b(),
@@ -1581,7 +1574,7 @@ function Ct({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1581
1574
  zIndex: -1
1582
1575
  }
1583
1576
  });
1584
- return I(d, {
1577
+ return R(d, {
1585
1578
  role: "list",
1586
1579
  ...p,
1587
1580
  className: t,
@@ -1602,25 +1595,25 @@ var wt = {
1602
1595
  checkIcon: "_checkIcon_1tiyp_19",
1603
1596
  stateLabel: "_stateLabel_1tiyp_23"
1604
1597
  }, Tt = 44, Et = 8, Dt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1605
- let u = r[e], p = nt(u.iconUrl, u.type, u.displayName ?? u.id, d.SM), m = u.id === i;
1606
- return /* @__PURE__ */ W("div", {
1598
+ let u = r[e], p = Q(u.iconUrl, u.type, u.displayName ?? u.id, d.SM), m = u.id === i;
1599
+ return /* @__PURE__ */ G("div", {
1607
1600
  style: t,
1608
1601
  ...n,
1609
- children: /* @__PURE__ */ W(l, {
1602
+ children: /* @__PURE__ */ G(l, {
1610
1603
  type: "button",
1611
1604
  className: o(wt.item, "h-full w-full gap-3 px-4"),
1612
- iconBefore: /* @__PURE__ */ W("span", {
1605
+ iconBefore: /* @__PURE__ */ G("span", {
1613
1606
  className: wt.itemIcon,
1614
1607
  children: p
1615
1608
  }),
1616
- label: /* @__PURE__ */ G("span", {
1609
+ label: /* @__PURE__ */ K("span", {
1617
1610
  className: "flex flex-1 items-center justify-between gap-2",
1618
- children: [/* @__PURE__ */ W(y, {
1611
+ children: [/* @__PURE__ */ G(y, {
1619
1612
  text: u.displayName ?? u.id,
1620
1613
  query: s,
1621
1614
  maxLines: 1,
1622
1615
  className: o(a, "min-w-0 flex-1 text-start")
1623
- }), m && /* @__PURE__ */ W(M, {
1616
+ }), m && /* @__PURE__ */ G(N, {
1624
1617
  size: d.SM,
1625
1618
  className: wt.checkIcon,
1626
1619
  "aria-hidden": !0,
@@ -1631,11 +1624,11 @@ var wt = {
1631
1624
  })
1632
1625
  });
1633
1626
  }, Ot = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: s, selectedDeploymentId: c, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: _ }) => {
1634
- let [v, y] = H("");
1635
- z(() => {
1627
+ let [v, y] = U("");
1628
+ B(() => {
1636
1629
  e || y("");
1637
1630
  }, [e]);
1638
- let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? Z(s, v) : [], w = (e) => {
1631
+ let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? tt(s, v) : [], w = (e) => {
1639
1632
  l(e), i();
1640
1633
  }, T = a({
1641
1634
  "--ci-sheet-divider": _?.divider,
@@ -1645,7 +1638,7 @@ var wt = {
1645
1638
  "--ci-sheet-icon": _?.itemIcon,
1646
1639
  "--ci-check-icon": _?.checkIcon
1647
1640
  });
1648
- return /* @__PURE__ */ W(K, {
1641
+ return /* @__PURE__ */ G(q, {
1649
1642
  isOpen: e,
1650
1643
  title: t,
1651
1644
  closeLabel: n,
@@ -1654,22 +1647,22 @@ var wt = {
1654
1647
  titleClassName: m,
1655
1648
  className: "max-h-[80dvh]",
1656
1649
  colors: _?.shell,
1657
- children: /* @__PURE__ */ G("div", {
1650
+ children: /* @__PURE__ */ K("div", {
1658
1651
  className: "contents",
1659
1652
  style: T,
1660
- children: [b && !x && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
1653
+ children: [b && !x && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
1661
1654
  className: "flex-shrink-0 px-4 py-[10px]",
1662
- children: /* @__PURE__ */ W(D, {
1655
+ children: /* @__PURE__ */ G(D, {
1663
1656
  value: v,
1664
1657
  placeholder: r,
1665
1658
  size: g.Standard,
1666
1659
  onChange: (e) => y(e ?? "")
1667
1660
  })
1668
- }), /* @__PURE__ */ W("div", { className: o(wt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ W(tt, { loadingLabel: u }) : S ? /* @__PURE__ */ W("div", {
1661
+ }), /* @__PURE__ */ G("div", { className: o(wt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ G(et, { loadingLabel: u }) : S ? /* @__PURE__ */ G("div", {
1669
1662
  role: "list",
1670
1663
  className: o(wt.stateLabel, h, "px-4 py-4"),
1671
1664
  children: S
1672
- }) : /* @__PURE__ */ W(Ct, {
1665
+ }) : /* @__PURE__ */ G(Ct, {
1673
1666
  role: "list",
1674
1667
  className: "overflow-y-auto",
1675
1668
  style: { height: Math.min(C.length, Et) * Tt },
@@ -1687,23 +1680,23 @@ var wt = {
1687
1680
  })
1688
1681
  });
1689
1682
  }, kt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: c, modelPickerOverlay: l, isPickerOpen: u, onPickerToggle: m, onPickerOpenChange: _ }) => {
1690
- let [y, b] = H(!1), { selectorIcon: x, selectorAriaLabel: S, selectedLabel: C, menuItems: w, menuHeader: T, onOpenChange: E } = it({
1683
+ let [y, b] = U(!1), { selectorIcon: x, selectorAriaLabel: S, selectedLabel: C, menuItems: w, menuHeader: T, onOpenChange: E } = rt({
1691
1684
  deployments: e,
1692
1685
  selectedDeploymentId: t,
1693
1686
  onDeploymentChange: n,
1694
1687
  modelSelectorLabels: r
1695
1688
  });
1696
1689
  if (!e) return null;
1697
- let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ W(re, {
1690
+ let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ G(ne, {
1698
1691
  size: d.SM,
1699
- className: J.modelSelectorCaret,
1692
+ className: Y.modelSelectorCaret,
1700
1693
  "aria-hidden": !0,
1701
1694
  stroke: f
1702
1695
  });
1703
- return a ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(j, {
1696
+ return a ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(M, {
1704
1697
  tooltip: C,
1705
- children: /* @__PURE__ */ W(v, {
1706
- icon: /* @__PURE__ */ G("div", {
1698
+ children: /* @__PURE__ */ G(v, {
1699
+ icon: /* @__PURE__ */ K("div", {
1707
1700
  className: "flex items-center gap-1",
1708
1701
  children: [x, O]
1709
1702
  }),
@@ -1711,16 +1704,16 @@ var wt = {
1711
1704
  onClick: () => {
1712
1705
  s || b(!0);
1713
1706
  },
1714
- className: o("w-[50px]", J.modelSelectorButton, D)
1707
+ className: o("w-[50px]", Y.modelSelectorButton, D)
1715
1708
  })
1716
- }), l ? /* @__PURE__ */ W(K, {
1709
+ }), l ? /* @__PURE__ */ G(q, {
1717
1710
  isOpen: y,
1718
1711
  title: r?.ariaLabel ?? "Select model",
1719
1712
  closeLabel: r?.closeLabel ?? "Close",
1720
1713
  onClose: () => b(!1),
1721
1714
  style: c,
1722
1715
  children: l(() => b(!1))
1723
- }) : /* @__PURE__ */ W(Ot, {
1716
+ }) : /* @__PURE__ */ G(Ot, {
1724
1717
  isOpen: y,
1725
1718
  title: r?.ariaLabel ?? "Select model",
1726
1719
  closeLabel: r?.closeLabel ?? "Close",
@@ -1733,7 +1726,7 @@ var wt = {
1733
1726
  errorLabel: r?.error,
1734
1727
  emptyLabel: r?.empty,
1735
1728
  style: c
1736
- })] }) : l ? /* @__PURE__ */ W(h, {
1729
+ })] }) : l ? /* @__PURE__ */ G(h, {
1737
1730
  placement: "top-end",
1738
1731
  matchReferenceWidth: !1,
1739
1732
  open: u,
@@ -1742,25 +1735,25 @@ var wt = {
1742
1735
  outsideClosable: !0,
1743
1736
  renderOverlay: () => l(() => _?.(!1)),
1744
1737
  listClassName: "!w-[368px] !bg-layer-raised",
1745
- children: /* @__PURE__ */ W(j, {
1738
+ children: /* @__PURE__ */ G(M, {
1746
1739
  tooltip: C,
1747
- children: /* @__PURE__ */ G("button", {
1740
+ children: /* @__PURE__ */ K("button", {
1748
1741
  type: "button",
1749
1742
  "aria-label": S,
1750
1743
  "aria-disabled": s || void 0,
1751
- className: o("flex items-center justify-center gap-1 rounded-full p-2", J.modelSelectorButton, D, s && J.modelSelectorButtonDisabled),
1744
+ className: o("flex items-center justify-center gap-1 rounded-full p-2", Y.modelSelectorButton, D, s && Y.modelSelectorButtonDisabled),
1752
1745
  onClick: () => {
1753
1746
  !i && !s && m?.();
1754
1747
  },
1755
1748
  children: [x, O]
1756
1749
  })
1757
1750
  })
1758
- }) : /* @__PURE__ */ W("div", {
1751
+ }) : /* @__PURE__ */ G("div", {
1759
1752
  className: o(s && D),
1760
1753
  "aria-disabled": s || void 0,
1761
- children: /* @__PURE__ */ W(j, {
1754
+ children: /* @__PURE__ */ G(M, {
1762
1755
  tooltip: C,
1763
- children: /* @__PURE__ */ W(p, {
1756
+ children: /* @__PURE__ */ G(p, {
1764
1757
  icon: x,
1765
1758
  ariaLabel: S,
1766
1759
  items: w,
@@ -1772,12 +1765,12 @@ var wt = {
1772
1765
  size: g.Standard,
1773
1766
  caretIcon: O,
1774
1767
  iconClassName: s ? D : void 0,
1775
- buttonClassName: o("bg-transparent", J.modelSelectorButton, s && J.modelSelectorButtonDisabled)
1768
+ buttonClassName: o("bg-transparent", Y.modelSelectorButton, s && Y.modelSelectorButtonDisabled)
1776
1769
  })
1777
1770
  })
1778
1771
  });
1779
- }, At = 160, jt = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: _, addMenuTitle: y = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: C, sendLabel: w, stopLabel: T, micLabel: E = "Record voice message", stopRecordingLabel: D, discardRecordingLabel: O, colors: k, typography: A, className: ee, pendingDropFiles: j = [], onDropFilesConsumed: te, pendingAttachments: ne = [], onPendingAttachmentsConsumed: M, pasteTextThreshold: re = 4e3, maxMessageLength: N = 5e4, deployments: oe, selectedDeploymentId: P, onDeploymentChange: F, modelSelectorLabels: se, initialAttachments: ce = [], isStacked: le = !1, hideAddButton: ue = !1, hideAttachFile: de = !1, hideActionBar: fe = !1, renderFooterActions: I, isInputDisabled: L = !1, isModelSelectorDisabled: pe = !1, isSendDisabled: me = !1, isAudioMessageSupported: ge = !1, sendOnEnter: _e = Me.Enter, prefixAttachments: ye = [], onRemovePrefixAttachment: be, chatSettings: K, toolsMenuItems: xe, onToolToggle: we, toolsMenuTitle: Te, toolsBackLabel: Oe, toolsChipLabels: ke, promptsMenuOverlay: Ae, promptsMenuTitle: Ne, promptsBackLabel: Pe, autoFocus: Fe = !1, messageHistory: Ie, onDialFileSystemClick: Le, dialFileSystemLabel: Re, validateAttachment: ze, onAttachmentClick: Be, modelPickerOverlay: Ve, maximumAttachmentsAmount: He, onAttachmentsLimitExceeded: Ue, isAttachmentsEnabled: q = !0, usageLimitsSlot: Ge, onMessageTooLong: qe }) => {
1780
- let Je = s(), [Ye, Y] = H(!1), $e = Ee(Ie), et = B(() => a({
1772
+ }, At = 160, jt = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: _, addMenuTitle: y = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: C, sendLabel: w, stopLabel: T, micLabel: E = "Record voice message", stopRecordingLabel: D, discardRecordingLabel: O, colors: k, typography: A, className: j, pendingDropFiles: M = [], onDropFilesConsumed: ee, pendingAttachments: te = [], onPendingAttachmentsConsumed: N, pasteTextThreshold: ne = 4e3, maxMessageLength: P = 5e4, deployments: ae, selectedDeploymentId: F, onDeploymentChange: I, modelSelectorLabels: oe, initialAttachments: se = [], hideAddButton: ce = !1, hideAttachFile: le = !1, hideActionBar: L = !1, renderFooterActions: ue, isInputDisabled: R = !1, isModelSelectorDisabled: de = !1, isSendDisabled: fe = !1, isAudioMessageSupported: pe = !1, sendOnEnter: he = je.Enter, prefixAttachments: ge = [], onRemovePrefixAttachment: ve, chatSettings: ye, toolsMenuItems: q, onToolToggle: be, toolsMenuTitle: Ce, toolsBackLabel: we, toolsChipLabels: De, promptsMenuOverlay: Oe, promptsMenuTitle: ke, promptsBackLabel: Me, autoFocus: Ne = !1, messageHistory: Pe, onDialFileSystemClick: Fe, dialFileSystemLabel: Ie, validateAttachment: Le, onAttachmentClick: Re, modelPickerOverlay: ze, maximumAttachmentsAmount: Be, onAttachmentsLimitExceeded: Ve, isAttachmentsEnabled: J = !0, usageLimitsSlot: Ue, onMessageTooLong: We }) => {
1773
+ let Ke = s(), [qe, Je] = U(!1), X = Te(Pe), Qe = V(() => a({
1781
1774
  "--ci-bg": k?.background,
1782
1775
  "--ci-text": k?.text,
1783
1776
  "--ci-border": k?.border,
@@ -1790,217 +1783,217 @@ var wt = {
1790
1783
  "--ci-voice-error": k?.voiceError,
1791
1784
  "--ci-voice-waveform": k?.voiceWaveform,
1792
1785
  "--ci-voice-accent": k?.voiceAccent
1793
- }), [k]), tt = B(() => Le ? [{
1786
+ }), [k]), $e = V(() => Fe ? [{
1794
1787
  key: "dial-fs",
1795
- label: Re ?? "DIAL file system",
1796
- icon: /* @__PURE__ */ W(ie, {
1788
+ label: Ie ?? "DIAL file system",
1789
+ icon: /* @__PURE__ */ G(re, {
1797
1790
  size: c,
1798
1791
  "aria-hidden": !0,
1799
1792
  stroke: f
1800
1793
  }),
1801
- onClick: Le
1802
- }] : [], [Le, Re]), { message: X, setMessage: Z, textareaRef: nt, isMultiLine: rt } = De({
1794
+ onClick: Fe
1795
+ }] : [], [Fe, Ie]), { message: et, setMessage: Z, textareaRef: tt } = Ee({
1803
1796
  messageProp: e,
1804
1797
  messageRevision: t
1805
- }), { attachments: it, buildAttachments: Q, addAttachments: at, resetAttachments: ot, handleRemove: st, handleRetry: ct, handleExpand: lt, hasBlockedAttachments: ut } = Se({
1806
- initialAttachments: ce,
1798
+ }), { attachments: Q, buildAttachments: nt, addAttachments: rt, resetAttachments: it, handleRemove: at, handleRetry: ot, handleExpand: st, hasBlockedAttachments: ct } = xe({
1799
+ initialAttachments: se,
1807
1800
  onUploadAttachment: r,
1808
1801
  onAttachmentsChange: p,
1809
- validateAttachment: ze,
1810
- pendingDropFiles: j,
1811
- onDropFilesConsumed: te,
1812
- pendingAttachments: ne,
1813
- onPendingAttachmentsConsumed: M,
1814
- onExpandPastedText: R((e) => {
1802
+ validateAttachment: Le,
1803
+ pendingDropFiles: M,
1804
+ onDropFilesConsumed: ee,
1805
+ pendingAttachments: te,
1806
+ onPendingAttachmentsConsumed: N,
1807
+ onExpandPastedText: z((e) => {
1815
1808
  Z((t) => t ? `${t}\n${e}` : e);
1816
1809
  }, [Z]),
1817
- maximumAttachmentsAmount: He,
1818
- baseAttachmentsAmount: ye.length,
1819
- onAttachmentsLimitExceeded: Ue
1820
- }), { state: $, analyserNodeRef: dt, errorMessage: ft, startRecording: pt, stopRecording: mt, discardRecording: ht } = je({ onAttachAudio: R((e) => {
1821
- at(Q([e]));
1822
- }, [at, Q]) }), gt = V(null), _t = V(null), { handlePaste: vt } = ve(at, q ? re : Infinity), yt = R((e) => {
1823
- if (!q) {
1810
+ maximumAttachmentsAmount: Be,
1811
+ baseAttachmentsAmount: ge.length,
1812
+ onAttachmentsLimitExceeded: Ve
1813
+ }), { state: lt, analyserNodeRef: ut, errorMessage: $, startRecording: dt, stopRecording: ft, discardRecording: pt } = Ae({ onAttachAudio: z((e) => {
1814
+ rt(nt([e]));
1815
+ }, [rt, nt]) }), mt = H(null), ht = H(null), { handlePaste: gt } = _e(rt, J ? ne : Infinity), _t = z((e) => {
1816
+ if (!J) {
1824
1817
  let t = e.clipboardData.getData("text/plain");
1825
- t.length >= N && qe?.(t.length, N);
1818
+ t.length >= P && We?.(t.length, P);
1826
1819
  }
1827
- vt(e);
1820
+ gt(e);
1828
1821
  }, [
1829
- q,
1830
- N,
1831
- qe,
1832
- vt
1833
- ]), bt = X.trim().length > 0 || it.length > 0, xt = bt && !ut && !me, { shouldRender: St, isExiting: Ct, instanceKey: wt } = Ce(!l && bt, At), [Tt, Et] = H([]);
1834
- z(() => {
1835
- Et([]);
1836
- }, [(xe ?? []).map((e) => e.id).join("|")]);
1837
- let Dt = B(() => (xe ?? []).filter((e) => e.isSelected || !Tt.includes(e.id)), [xe, Tt]), Ot = R((e) => {
1838
- Et((t) => t.includes(e) ? t : [...t, e]), xe?.find((t) => t.id === e)?.isSelected && we?.(e);
1839
- }, [xe, we]), jt = Dt.length > 0 && we != null, Mt = le || X.includes("\n") || rt || jt, Nt = oe === void 0 || P != null, Pt = B(() => ge && !Ct && !l, [
1840
- ge,
1841
- Ct,
1822
+ J,
1823
+ P,
1824
+ We,
1825
+ gt
1826
+ ]), vt = et.trim().length > 0 || Q.length > 0, yt = vt && !ct && !fe, { shouldRender: bt, isExiting: xt, instanceKey: St } = Se(!l && vt, At), [Ct, wt] = U([]);
1827
+ B(() => {
1828
+ wt([]);
1829
+ }, [(q ?? []).map((e) => e.id).join("|")]);
1830
+ let Tt = V(() => (q ?? []).filter((e) => e.isSelected || !Ct.includes(e.id)), [q, Ct]), Et = z((e) => {
1831
+ wt((t) => t.includes(e) ? t : [...t, e]), q?.find((t) => t.id === e)?.isSelected && be?.(e);
1832
+ }, [q, be]), Dt = ae === void 0 || F != null, Ot = V(() => pe && !xt && !l, [
1833
+ pe,
1834
+ xt,
1842
1835
  l
1843
- ]), Ft = async () => {
1844
- if (me) return;
1845
- if (!q && X.length >= N) {
1846
- qe?.(X.length, N);
1836
+ ]), jt = async () => {
1837
+ if (fe) return;
1838
+ if (!J && et.length >= P) {
1839
+ We?.(et.length, P);
1847
1840
  return;
1848
1841
  }
1849
- let e = X, t = it;
1850
- Z(""), $e.reset();
1842
+ let e = et, t = Q;
1843
+ Z(""), X.reset();
1851
1844
  try {
1852
1845
  await n?.(e, t), t.forEach((e) => {
1853
1846
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
1854
- }), ot([]);
1847
+ }), it([]);
1855
1848
  } catch {
1856
- Z(e), ot(t);
1849
+ Z(e), it(t);
1857
1850
  }
1858
- }, It = (e) => {
1859
- if (!e.nativeEvent.isComposing && !L && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1860
- let t = e.currentTarget.selectionStart ?? 0, n = $e.navigate(e.key === "ArrowUp" ? "up" : "down", X, t);
1851
+ }, Mt = (e) => {
1852
+ if (!e.nativeEvent.isComposing && !R && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1853
+ let t = e.currentTarget.selectionStart ?? 0, n = X.navigate(e.key === "ArrowUp" ? "up" : "down", et, t);
1861
1854
  if (n !== null) {
1862
1855
  e.preventDefault(), Z(n);
1863
1856
  return;
1864
1857
  }
1865
1858
  }
1866
- e.key === "Enter" && (_e === Me.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && xt && Nt && !L && Ft());
1867
- }, Lt = (e) => {
1859
+ e.key === "Enter" && (he === je.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && yt && Dt && !R && jt());
1860
+ }, Nt = (e) => {
1868
1861
  let t = Array.from(e.target.files ?? []);
1869
1862
  if (t.length === 0) return;
1870
- let n = Q(t);
1871
- e.target.value = "", at(n);
1863
+ let n = nt(t);
1864
+ e.target.value = "", rt(n);
1872
1865
  };
1873
- if ($ !== "idle") return /* @__PURE__ */ W(Xe, {
1874
- state: $,
1875
- analyserNodeRef: dt,
1876
- errorMessage: ft,
1877
- onStop: mt,
1878
- onDiscard: ht,
1866
+ if (lt !== "idle") return /* @__PURE__ */ G(Ye, {
1867
+ state: lt,
1868
+ analyserNodeRef: ut,
1869
+ errorMessage: $,
1870
+ onStop: ft,
1871
+ onDiscard: pt,
1879
1872
  stopLabel: D,
1880
1873
  discardLabel: O,
1881
- style: et,
1882
- className: ee
1874
+ style: Qe,
1875
+ className: j
1883
1876
  });
1884
- let Rt = /* @__PURE__ */ W("textarea", {
1885
- className: o(J.textarea, A?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1886
- ref: nt,
1887
- autoFocus: Fe,
1888
- value: X,
1877
+ let Pt = /* @__PURE__ */ G("textarea", {
1878
+ className: o(Y.textarea, A?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1879
+ ref: tt,
1880
+ autoFocus: Ne,
1881
+ value: et,
1889
1882
  onChange: (e) => {
1890
- Z(e.target.value), $e.notifyChange(), u?.(e.target.value);
1883
+ Z(e.target.value), X.notifyChange(), u?.(e.target.value);
1891
1884
  },
1892
- onKeyDown: It,
1893
- onPaste: yt,
1885
+ onKeyDown: Mt,
1886
+ onPaste: _t,
1894
1887
  placeholder: m,
1895
1888
  "aria-label": h,
1896
- disabled: L,
1889
+ disabled: R,
1897
1890
  rows: 1
1898
1891
  });
1899
- return /* @__PURE__ */ G("div", {
1900
- ref: _t,
1901
- style: et,
1902
- className: o(J.wrapper, L && J.wrapperDisabled, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", it.length > 6 ? "py-3 ps-3" : "p-3", ee),
1903
- children: [(ye.length > 0 || it.length > 0) && /* @__PURE__ */ W(he, {
1904
- attachments: [...ye, ...it],
1892
+ return /* @__PURE__ */ K("div", {
1893
+ ref: ht,
1894
+ style: Qe,
1895
+ className: o(Y.wrapper, R && Y.wrapperDisabled, "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", Q.length > 6 ? "py-3 ps-3" : "p-3", j),
1896
+ children: [(ge.length > 0 || Q.length > 0) && /* @__PURE__ */ G(me, {
1897
+ attachments: [...ge, ...Q],
1905
1898
  onRemove: (e) => {
1906
- ye.some((t) => t.id === e) ? be?.(e) : st(e);
1899
+ ge.some((t) => t.id === e) ? ve?.(e) : at(e);
1907
1900
  },
1908
- onRetry: ct,
1909
- onExpand: lt,
1901
+ onRetry: ot,
1902
+ onExpand: st,
1910
1903
  labels: {
1911
1904
  removeLabel: S,
1912
1905
  retryLabel: C
1913
1906
  },
1914
- onAttachmentClick: Be == null ? void 0 : (e) => {
1915
- let t = [...ye, ...it].find((t) => t.id === e);
1916
- t != null && Be(t);
1907
+ onAttachmentClick: Re == null ? void 0 : (e) => {
1908
+ let t = [...ge, ...Q].find((t) => t.id === e);
1909
+ t != null && Re(t);
1917
1910
  }
1918
- }), fe ? Mt && Rt : /* @__PURE__ */ G("div", {
1919
- className: o("flex items-center gap-2", Mt ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1911
+ }), L ? Pt : /* @__PURE__ */ K("div", {
1912
+ className: "flex flex-wrap items-center gap-2",
1920
1913
  children: [
1921
- !ue && /* @__PURE__ */ G("div", {
1922
- className: o("flex", "order-2", !Mt && "desktop:order-1"),
1923
- children: [/* @__PURE__ */ W("input", {
1924
- ref: gt,
1914
+ /* @__PURE__ */ G("div", {
1915
+ className: "flex w-full min-w-0 items-center self-stretch",
1916
+ children: Pt
1917
+ }),
1918
+ !ce && /* @__PURE__ */ K("div", {
1919
+ className: "flex",
1920
+ children: [/* @__PURE__ */ G("input", {
1921
+ ref: mt,
1925
1922
  type: "file",
1926
1923
  multiple: !0,
1927
1924
  accept: _,
1928
1925
  className: "sr-only",
1929
1926
  "aria-hidden": !0,
1930
1927
  tabIndex: -1,
1931
- onChange: Lt
1932
- }), /* @__PURE__ */ W(We, {
1933
- onAttachClick: de ? void 0 : () => gt.current?.click(),
1928
+ onChange: Nt
1929
+ }), /* @__PURE__ */ G(He, {
1930
+ onAttachClick: le ? void 0 : () => mt.current?.click(),
1934
1931
  attachLabel: g,
1935
1932
  addMenuTitle: y,
1936
1933
  menuTitle: b,
1937
1934
  menuCloseLabel: x,
1938
- style: et,
1939
- isDisabled: L,
1940
- chatSettings: K,
1941
- extraMenuItems: tt,
1942
- toolsMenuItems: xe,
1943
- onToolToggle: we,
1944
- toolsMenuTitle: Te,
1945
- toolsBackLabel: Oe,
1946
- promptsMenuOverlay: Ae,
1947
- promptsMenuTitle: Ne,
1948
- promptsBackLabel: Pe
1935
+ style: Qe,
1936
+ isDisabled: R,
1937
+ chatSettings: ye,
1938
+ extraMenuItems: $e,
1939
+ toolsMenuItems: q,
1940
+ onToolToggle: be,
1941
+ toolsMenuTitle: Ce,
1942
+ toolsBackLabel: we,
1943
+ promptsMenuOverlay: Oe,
1944
+ promptsMenuTitle: ke,
1945
+ promptsBackLabel: Me
1949
1946
  })]
1950
1947
  }),
1951
- Mt && Dt.length > 0 && we != null && /* @__PURE__ */ W("div", {
1952
- className: "order-3 min-w-0 flex-1",
1953
- children: /* @__PURE__ */ W(Ke, {
1954
- items: Dt,
1955
- onToolToggle: we,
1956
- onToolDismiss: Ot,
1957
- removeLabel: ke?.removeLabel
1948
+ Tt.length > 0 && be != null && /* @__PURE__ */ G("div", {
1949
+ className: "min-w-0 flex-1",
1950
+ children: /* @__PURE__ */ G(Ge, {
1951
+ items: Tt,
1952
+ onToolToggle: be,
1953
+ onToolDismiss: Et,
1954
+ removeLabel: De?.removeLabel
1958
1955
  })
1959
1956
  }),
1960
- /* @__PURE__ */ W("div", {
1961
- className: o("order-1 flex w-full min-w-0 items-center self-stretch", !Mt && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1962
- children: Rt
1963
- }),
1964
- /* @__PURE__ */ G("div", {
1965
- className: o("flex flex-shrink-0 items-center gap-2", Mt && jt ? "order-4" : "order-3", "ms-auto", !Mt && "desktop:ms-0"),
1966
- children: [I ? I({
1967
- canSend: xt,
1968
- onSend: Ft
1969
- }) : /* @__PURE__ */ G(U, { children: [
1970
- Ge,
1971
- /* @__PURE__ */ W(kt, {
1972
- deployments: oe,
1973
- selectedDeploymentId: P,
1974
- onDeploymentChange: F,
1975
- modelSelectorLabels: se,
1957
+ /* @__PURE__ */ K("div", {
1958
+ className: "ms-auto flex flex-shrink-0 items-center gap-2",
1959
+ children: [ue ? ue({
1960
+ canSend: yt,
1961
+ onSend: jt
1962
+ }) : /* @__PURE__ */ K(W, { children: [
1963
+ Ue,
1964
+ /* @__PURE__ */ G(kt, {
1965
+ deployments: ae,
1966
+ selectedDeploymentId: F,
1967
+ onDeploymentChange: I,
1968
+ modelSelectorLabels: oe,
1976
1969
  isStreaming: l,
1977
- isMobile: Je,
1978
- isDisabled: pe,
1979
- style: et,
1980
- modelPickerOverlay: Ve,
1981
- isPickerOpen: Ye,
1982
- onPickerToggle: () => Y((e) => !e),
1983
- onPickerOpenChange: Y
1970
+ isMobile: Ke,
1971
+ isDisabled: de,
1972
+ style: Qe,
1973
+ modelPickerOverlay: ze,
1974
+ isPickerOpen: qe,
1975
+ onPickerToggle: () => Je((e) => !e),
1976
+ onPickerOpenChange: Je
1984
1977
  }),
1985
- l && i ? /* @__PURE__ */ W(Qe, {
1978
+ l && i ? /* @__PURE__ */ G(Ze, {
1986
1979
  onStop: i,
1987
1980
  ariaLabel: T
1988
- }) : !l && St && /* @__PURE__ */ W(Ze, {
1989
- onSend: Ft,
1990
- isDisabled: !Nt || ut || me,
1981
+ }) : !l && bt && /* @__PURE__ */ G(Xe, {
1982
+ onSend: jt,
1983
+ isDisabled: !Dt || ct || fe,
1991
1984
  ariaLabel: w,
1992
- isExiting: Ct
1993
- }, wt)
1994
- ] }), Pt && /* @__PURE__ */ W(v, {
1995
- icon: /* @__PURE__ */ W(ae, {
1985
+ isExiting: xt
1986
+ }, St)
1987
+ ] }), Ot && /* @__PURE__ */ G(v, {
1988
+ icon: /* @__PURE__ */ G(ie, {
1996
1989
  size: d.LG,
1997
1990
  stroke: f,
1998
1991
  "aria-hidden": !0
1999
1992
  }),
2000
1993
  "aria-label": E,
2001
1994
  className: "size-[40px] flex-shrink-0",
2002
- onClick: pt,
2003
- disabled: L || l
1995
+ onClick: dt,
1996
+ disabled: R || l
2004
1997
  })]
2005
1998
  })
2006
1999
  ]
@@ -2008,15 +2001,15 @@ var wt = {
2008
2001
  });
2009
2002
  }, Mt = { welcome: "_welcome_n2ph8_1" }, Nt = ({ 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 }) => {
2010
2003
  let { colors: u, typography: d } = r ?? {};
2011
- return /* @__PURE__ */ G("div", {
2004
+ return /* @__PURE__ */ K("div", {
2012
2005
  style: a({ "--ci-welcome-color": u?.welcomeText }),
2013
2006
  className: o("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
2014
- children: [n && /* @__PURE__ */ W("h1", {
2007
+ children: [n && /* @__PURE__ */ G("h1", {
2015
2008
  className: o(Mt.welcome, "m-0 text-center", d?.welcomeClassName || "dial-display2-text"),
2016
2009
  children: n
2017
- }), /* @__PURE__ */ W("div", {
2010
+ }), /* @__PURE__ */ G("div", {
2018
2011
  className: "relative w-full max-w-[748px]",
2019
- children: /* @__PURE__ */ W(jt, {
2012
+ children: /* @__PURE__ */ G(jt, {
2020
2013
  placeholder: t,
2021
2014
  isStreaming: e,
2022
2015
  isInputDisabled: c,
@@ -2027,98 +2020,97 @@ var wt = {
2027
2020
  })
2028
2021
  })]
2029
2022
  });
2030
- }, Pt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: p, addMenuTitle: m = "Add", attachLabel: h = "Attach file", menuTitle: g = "Menu", menuCloseLabel: _ = "Close", className: v, pendingDropFiles: y, onDropFilesConsumed: x, validateAttachment: S, isAttachmentsEnabled: w, hideAttachFile: T = !1, fileAccept: E, maximumAttachmentsAmount: D, onAttachmentsLimitExceeded: O, onDialFileSystemClick: k, dialFileSystemLabel: A, pendingAttachments: ee, onPendingAttachmentsConsumed: j, onAttachmentClick: te, pasteTextThreshold: ne, maxMessageLength: M = 5e4, onMessageTooLong: re }) => {
2031
- let N = V(null), [ae, oe] = H([]);
2032
- z(() => {
2033
- y?.length && (oe(y), x?.());
2023
+ }, Pt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: p, addMenuTitle: m = "Add", attachLabel: h = "Attach file", menuTitle: g = "Menu", menuCloseLabel: _ = "Close", className: v, pendingDropFiles: y, onDropFilesConsumed: x, validateAttachment: S, isAttachmentsEnabled: w, hideAttachFile: T = !1, fileAccept: E, maximumAttachmentsAmount: D, onAttachmentsLimitExceeded: O, onDialFileSystemClick: k, dialFileSystemLabel: A, pendingAttachments: j, onPendingAttachmentsConsumed: M, onAttachmentClick: ee, pasteTextThreshold: te, maxMessageLength: N = 5e4, onMessageTooLong: ne }) => {
2024
+ let P = H(null), [ie, ae] = U([]);
2025
+ B(() => {
2026
+ y?.length && (ae(y), x?.());
2034
2027
  }, [y, x]);
2035
- let [P, F] = H(e ?? ""), [se, ce] = H([]), [le, ue] = H(t), de = se.some((e) => e.status === r.Loading || e.status === r.Error), fe = (P.trim().length > 0 || se.length > 0 || le.length > 0) && !de, I = (e) => {
2036
- ue((t) => t.filter((t) => t.id !== e));
2037
- }, L = R((e, t) => {
2038
- i(e, le, t);
2039
- }, [le, i]), pe = () => {
2040
- if (fe) {
2041
- if (!w && P.length >= M) {
2042
- re?.(P.length, M);
2028
+ let [F, I] = U(e ?? ""), [oe, se] = U([]), [ce, le] = U(t), L = oe.some((e) => e.status === r.Loading || e.status === r.Error), ue = (F.trim().length > 0 || oe.length > 0 || ce.length > 0) && !L, R = (e) => {
2029
+ le((t) => t.filter((t) => t.id !== e));
2030
+ }, de = z((e, t) => {
2031
+ i(e, ce, t);
2032
+ }, [ce, i]), fe = () => {
2033
+ if (ue) {
2034
+ if (!w && F.length >= N) {
2035
+ ne?.(F.length, N);
2043
2036
  return;
2044
2037
  }
2045
- L(P, se);
2038
+ de(F, oe);
2046
2039
  }
2047
- }, me = R(() => oe([]), []), he = R((e) => {
2040
+ }, pe = z(() => ae([]), []), me = z((e) => {
2048
2041
  let t = Array.from(e.target.files ?? []);
2049
- t.length !== 0 && (e.target.value = "", oe(t));
2050
- }, []), ge = B(() => k ? [{
2042
+ t.length !== 0 && (e.target.value = "", ae(t));
2043
+ }, []), he = V(() => k ? [{
2051
2044
  key: "dial-fs",
2052
2045
  label: A ?? "DIAL file system",
2053
- icon: /* @__PURE__ */ W(ie, {
2046
+ icon: /* @__PURE__ */ G(re, {
2054
2047
  size: c,
2055
2048
  "aria-hidden": !0,
2056
2049
  stroke: f
2057
2050
  }),
2058
2051
  onClick: k
2059
2052
  }] : [], [k, A]);
2060
- return /* @__PURE__ */ G("div", {
2053
+ return /* @__PURE__ */ K("div", {
2061
2054
  className: o("flex w-full flex-col gap-2", v),
2062
- children: [/* @__PURE__ */ W(jt, {
2055
+ children: [/* @__PURE__ */ G(jt, {
2063
2056
  message: e,
2064
2057
  ariaLabel: u,
2065
- isStacked: !0,
2066
2058
  hideActionBar: !0,
2067
- pendingDropFiles: ae,
2068
- onDropFilesConsumed: me,
2069
- onSend: L,
2059
+ pendingDropFiles: ie,
2060
+ onDropFilesConsumed: pe,
2061
+ onSend: de,
2070
2062
  onUploadAttachment: a,
2071
- onChange: F,
2072
- onAttachmentsChange: ce,
2063
+ onChange: I,
2064
+ onAttachmentsChange: se,
2073
2065
  removeLabel: d,
2074
2066
  retryLabel: p,
2075
2067
  className: "max-w-full",
2076
- prefixAttachments: le,
2077
- onRemovePrefixAttachment: I,
2068
+ prefixAttachments: ce,
2069
+ onRemovePrefixAttachment: R,
2078
2070
  validateAttachment: S,
2079
2071
  isAttachmentsEnabled: w,
2080
2072
  maximumAttachmentsAmount: D,
2081
2073
  onAttachmentsLimitExceeded: O,
2082
- pendingAttachments: ee,
2083
- onPendingAttachmentsConsumed: j,
2084
- onAttachmentClick: te,
2085
- pasteTextThreshold: ne,
2086
- maxMessageLength: M,
2087
- onMessageTooLong: re
2088
- }), /* @__PURE__ */ G("div", {
2074
+ pendingAttachments: j,
2075
+ onPendingAttachmentsConsumed: M,
2076
+ onAttachmentClick: ee,
2077
+ pasteTextThreshold: te,
2078
+ maxMessageLength: N,
2079
+ onMessageTooLong: ne
2080
+ }), /* @__PURE__ */ K("div", {
2089
2081
  className: "flex items-center justify-between",
2090
- children: [/* @__PURE__ */ W("div", {
2082
+ children: [/* @__PURE__ */ G("div", {
2091
2083
  className: "flex",
2092
- children: !T && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("input", {
2093
- ref: N,
2084
+ children: !T && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("input", {
2085
+ ref: P,
2094
2086
  type: "file",
2095
2087
  multiple: !0,
2096
2088
  accept: E,
2097
2089
  className: "sr-only",
2098
2090
  "aria-hidden": !0,
2099
2091
  tabIndex: -1,
2100
- onChange: he
2101
- }), /* @__PURE__ */ W(We, {
2102
- onAttachClick: () => N.current?.click(),
2092
+ onChange: me
2093
+ }), /* @__PURE__ */ G(He, {
2094
+ onAttachClick: () => P.current?.click(),
2103
2095
  attachLabel: h,
2104
2096
  addMenuTitle: m,
2105
2097
  menuTitle: g,
2106
2098
  menuCloseLabel: _,
2107
- extraMenuItems: ge
2099
+ extraMenuItems: he
2108
2100
  })] })
2109
- }), /* @__PURE__ */ G("div", {
2101
+ }), /* @__PURE__ */ K("div", {
2110
2102
  className: "flex gap-2",
2111
- children: [/* @__PURE__ */ W(b, {
2103
+ children: [/* @__PURE__ */ G(b, {
2112
2104
  label: s,
2113
2105
  onClick: n
2114
- }), /* @__PURE__ */ W(C, {
2106
+ }), /* @__PURE__ */ G(C, {
2115
2107
  label: l,
2116
- onClick: pe,
2117
- disabled: !fe
2108
+ onClick: fe,
2109
+ disabled: !ue
2118
2110
  })]
2119
2111
  })]
2120
2112
  })]
2121
2113
  });
2122
2114
  };
2123
2115
  //#endregion
2124
- export { K as BottomSheetShell, Be as ChatSettingsModal, Nt as ConversationInput, Pt as EditMessageInput, jt as Input, Me as SendOnEnter };
2116
+ export { q as BottomSheetShell, ze as ChatSettingsModal, Nt as ConversationInput, Pt as EditMessageInput, jt as Input, je as SendOnEnter };