@epam/ai-dial-conversation-input 1.3.0-dev.9 → 1.3.0-dev.96

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,9 +1,9 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, MIME_TYPE_EXT_MAP as r, RESIZABLE_TEXTAREA_CLASS_NAME as i, RequestStatus as a, ResponseFormat as o, SELECT_LIST_MAX_HEIGHT_PX as s, buildCssVars as c, mergeClasses as l, normalizeMimeType as u, useIsMobile as d } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as f, BottomSheet as p, Button as m, ButtonVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, Dropdown as v, ElementSize as y, ErrorText as b, GhostIconButton as x, Highlight as S, MenuItemMark as C, NeutralButton as w, NeutralIconButton as T, Popup as E, PopupSize as D, PrimaryButton as ee, PrimaryIconButton as O, RadioGroup as k, RadioGroupOrientation as A, Search as j, Skeleton as te, SkeletonVariant as ne, Slider as re, Spinner as ie, Textarea as ae, TextareaResize as oe, Tooltip as M } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
4
- import { AttachmentTray as se, MAX_UPLOADS_PER_MINUTE as I, generateAttachmentId as ce, useClipboardPaste as le } from "@epam/ai-dial-attachment-input";
5
- import { IconArrowNarrowRight as ue, IconCheck as de, IconChevronDown as fe, IconChevronRight as pe, IconFile as me, IconMicrophone as he, IconPaperclip as ge, IconPlayerStop as _e, IconPlus as ve, IconSettings as ye, IconTool as be, IconX as xe } from "@tabler/icons-react";
6
- import { createElement as Se, forwardRef as Ce, memo as we, useCallback as L, useEffect as R, useId as Te, useImperativeHandle as Ee, useLayoutEffect as De, useMemo as z, useRef as B, useState as V } from "react";
2
+ import { BASE_ICON_SIZE as f, BottomSheet as p, Button as m, ButtonVariant as h, CloseButton as g, DIAL_ICON_SIZE as _, DIAL_KIT_ICON_STROKE as v, Dropdown as y, ElementSize as b, ErrorText as x, GhostIconButton as S, Highlight as C, MenuItemMark as w, NeutralButton as T, NeutralIconButton as E, Popup as D, PopupSize as ee, PrimaryButton as te, PrimaryIconButton as O, RadioGroup as k, RadioGroupOrientation as A, Search as j, Skeleton as ne, SkeletonVariant as re, Slider as ie, Spinner as ae, Textarea as oe, TextareaResize as M, Tooltip as N } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
4
+ import { AttachmentTray as se, MAX_UPLOADS_PER_MINUTE as ce, generateAttachmentId as le, useClipboardPaste as ue } from "@epam/ai-dial-attachment-input";
5
+ import { IconAlertCircleFilled as de, IconAlertTriangleFilled as fe, IconArrowNarrowRight as pe, IconCheck as me, IconChevronDown as he, IconChevronRight as ge, IconFile as _e, IconMicrophone as ve, IconPaperclip as ye, IconPlayerStop as be, IconPlus as xe, IconSettings as Se, IconTool as Ce, IconX as we } from "@tabler/icons-react";
6
+ import { createElement as Te, forwardRef as Ee, memo as De, useCallback as L, useEffect as R, useId as Oe, useImperativeHandle as ke, useLayoutEffect as Ae, useMemo as z, useRef as B, useState as V } from "react";
7
7
  //#region src/constants/public-class-names.ts
8
8
  var H = {
9
9
  wrapper: "dial-ci-wrapper",
@@ -18,20 +18,21 @@ var H = {
18
18
  modelMenu: "dial-ci-model-menu",
19
19
  modelMenuSearch: "dial-ci-model-menu-search",
20
20
  modelMenuItem: "dial-ci-model-menu-item",
21
- modelMenuItemSelected: "dial-ci-model-menu-item-selected"
22
- }, Oe = {
21
+ modelMenuItemSelected: "dial-ci-model-menu-item-selected",
22
+ usageBanner: "dial-ci-usage-banner"
23
+ }, je = {
23
24
  backdrop: "_backdrop_1ym62_8",
24
25
  sheet: "_sheet_1ym62_12",
25
26
  title: "_title_1ym62_16",
26
27
  divider: "_divider_1ym62_20"
27
- }, U = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: s, titleClassName: u = "dial-body-semi-text", className: d, colors: f, children: m }) => {
28
- let h = c({
28
+ }, U = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: s, titleClassName: u = "dial-body-semi-text", className: d, colors: f, portalId: m, overlayClassName: h, overlayStyle: g, children: _ }) => {
29
+ let v = c({
29
30
  "--ci-backdrop": f?.backdrop,
30
31
  "--ci-sheet-bg": f?.sheetBg,
31
32
  "--ci-sheet-text": f?.sheetText,
32
33
  "--ci-sheet-divider": f?.divider
33
34
  });
34
- return /* @__PURE__ */ P(p, {
35
+ return /* @__PURE__ */ F(p, {
35
36
  open: e,
36
37
  onClose: r,
37
38
  title: t,
@@ -40,21 +41,25 @@ var H = {
40
41
  backAriaLabel: a,
41
42
  closeAriaLabel: n,
42
43
  style: {
43
- ...h,
44
+ ...v,
44
45
  ...s
45
46
  },
46
- overlayStyle: h,
47
- className: l(Oe.sheet, d),
48
- overlayClassName: Oe.backdrop,
49
- headerClassName: Oe.divider,
50
- titleClassName: l(Oe.title, u),
51
- children: m
47
+ overlayStyle: {
48
+ ...v,
49
+ ...g
50
+ },
51
+ className: l(je.sheet, d),
52
+ overlayClassName: l(je.backdrop, h),
53
+ portalId: m,
54
+ headerClassName: je.divider,
55
+ titleClassName: l(je.title, u),
56
+ children: _
52
57
  });
53
- }, ke = async (e, t, n) => {
58
+ }, W = async (e, t, n) => {
54
59
  let r = 6e4 / t, i = [];
55
60
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
56
61
  await Promise.allSettled(i);
57
- }, Ae = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: i, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, isDropDisabled: l = !1, pendingAttachments: u, onPendingAttachmentsConsumed: d, onExpandPastedText: f, maximumAttachmentsAmount: p, baseAttachmentsAmount: m = 0, onAttachmentsLimitExceeded: h }) => {
62
+ }, Me = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: i, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, isDropDisabled: l = !1, pendingAttachments: u, onPendingAttachmentsConsumed: d, onExpandPastedText: f, maximumAttachmentsAmount: p, baseAttachmentsAmount: m = 0, onAttachmentsLimitExceeded: h }) => {
58
63
  let [g, _] = V(n), v = B(g);
59
64
  R(() => {
60
65
  v.current = g;
@@ -66,7 +71,7 @@ var H = {
66
71
  let y = L((e) => e.map((e) => {
67
72
  let n = e.type.startsWith("image/"), r = e.type.startsWith("audio/"), i = n ? URL.createObjectURL(e) : void 0, o = r ? URL.createObjectURL(e) : void 0;
68
73
  return {
69
- id: ce(),
74
+ id: le(),
70
75
  name: e.name,
71
76
  contentType: e.type,
72
77
  file: e,
@@ -138,7 +143,7 @@ var H = {
138
143
  status: a.Error,
139
144
  errorReason: n
140
145
  } : e));
141
- }), ke(e, I, w);
146
+ }), W(e, ce, w);
142
147
  }
143
148
  }
144
149
  }, [
@@ -223,29 +228,29 @@ var H = {
223
228
  ]),
224
229
  hasBlockedAttachments: g.some((e) => e.status === a.Loading || e.status === a.Error)
225
230
  };
226
- }, je = (e, t) => {
231
+ }, Ne = (e, t) => {
227
232
  let n = t;
228
233
  for (; n < e.length && !/\s/.test(e[n]);) n++;
229
234
  return n;
230
- }, Me = (e, t) => {
235
+ }, Pe = (e, t) => {
231
236
  let n = t;
232
237
  for (; n > 0 && !/\s/.test(e[n - 1]);) n--;
233
238
  return {
234
239
  start: n,
235
- end: je(e, n)
240
+ end: Ne(e, n)
236
241
  };
237
- }, W = (e, t) => e.startsWith(t) && !e.slice(t.length).includes(t), Ne = "[role=\"option\"]:not([aria-disabled=\"true\"])", Pe = /* @__PURE__ */ function(e) {
242
+ }, Fe = (e, t) => e.startsWith(t) && !e.slice(t.length).includes(t), Ie = "[role=\"option\"]:not([aria-disabled=\"true\"])", Le = /* @__PURE__ */ function(e) {
238
243
  return e.Next = "next", e.Previous = "previous", e;
239
- }({}), Fe = ({ config: e, message: t }) => {
244
+ }({}), Re = ({ config: e, message: t }) => {
240
245
  let [n, r] = V(!1), [i, a] = V(null), [o, s] = V(null), c = B(null);
241
246
  c.current = i;
242
247
  let l = e != null && i != null && i <= t.length ? (() => {
243
- let n = t.slice(i, je(t, i));
244
- return W(n, e.triggerPrefix) ? n.slice(e.triggerPrefix.length) : "";
248
+ let n = t.slice(i, Ne(t, i));
249
+ return Fe(n, e.triggerPrefix) ? n.slice(e.triggerPrefix.length) : "";
245
250
  })() : "", u = L((t, n, i) => {
246
251
  if (e == null || i) return;
247
- let { start: c, end: l } = Me(t, n), u = t.slice(c, l);
248
- if (!W(u, e.triggerPrefix)) {
252
+ let { start: c, end: l } = Pe(t, n), u = t.slice(c, l);
253
+ if (!Fe(u, e.triggerPrefix)) {
249
254
  r(!1), s(null), a(null);
250
255
  return;
251
256
  }
@@ -263,7 +268,7 @@ var H = {
263
268
  let n = c.current;
264
269
  if (n == null) return;
265
270
  let i = Math.min(n, t.length);
266
- W(t.slice(i, je(t, i)), e.triggerPrefix) || (r(!1), s(null), a(null));
271
+ Fe(t.slice(i, Ne(t, i)), e.triggerPrefix) || (r(!1), s(null), a(null));
267
272
  }, [e, t]);
268
273
  let d = L(() => {
269
274
  r(!1), s(i);
@@ -271,8 +276,8 @@ var H = {
271
276
  r(!1);
272
277
  }, []), p = L((n) => {
273
278
  if (e == null) return;
274
- let { start: i, end: s } = Me(t, n);
275
- if (!W(t.slice(i, s), e.triggerPrefix)) {
279
+ let { start: i, end: s } = Pe(t, n);
280
+ if (!Fe(t.slice(i, s), e.triggerPrefix)) {
276
281
  a(null), r(!1);
277
282
  return;
278
283
  }
@@ -281,11 +286,11 @@ var H = {
281
286
  e,
282
287
  t,
283
288
  o
284
- ]), m = Te(), h = B(null), [g, _] = V(null);
289
+ ]), m = Oe(), h = B(null), [g, _] = V(null);
285
290
  R(() => {
286
291
  _(null);
287
292
  }, [n, l]);
288
- let v = L(() => Array.from(h.current?.querySelectorAll(Ne) ?? []), []), y = L((e) => {
293
+ let v = L(() => Array.from(h.current?.querySelectorAll(Ie) ?? []), []), y = L((e) => {
289
294
  let t = v();
290
295
  if (t.length === 0) {
291
296
  _(null);
@@ -308,12 +313,12 @@ var H = {
308
313
  moveActiveOption: y,
309
314
  getActiveOption: b
310
315
  };
311
- }, Ie = (e, t) => !e.slice(0, t).includes("\n"), Le = (e, t) => !e.slice(t).includes("\n"), Re = (e) => {
316
+ }, ze = (e, t) => !e.slice(0, t).includes("\n"), Be = (e, t) => !e.slice(t).includes("\n"), Ve = (e) => {
312
317
  let t = B(e);
313
318
  t.current = e;
314
319
  let n = B(-1), r = B(""), i = L((e, i, a) => {
315
320
  let o = t.current;
316
- return !o || o.length === 0 ? null : e === "up" ? !Ie(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 || !Le(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
321
+ return !o || o.length === 0 ? null : e === "up" ? !ze(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 || !Be(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
317
322
  }, []), a = L(() => {
318
323
  n.current = -1, r.current = "";
319
324
  }, []), o = L(() => {
@@ -328,16 +333,16 @@ var H = {
328
333
  a,
329
334
  o
330
335
  ]);
331
- }, ze = (e, t, n, r, i) => {
336
+ }, He = (e, t, n, r, i) => {
332
337
  let a = [...t].sort((e, t) => e.start - t.start), o = [...n].sort((e, t) => e.offset - t.offset), s = [], c = 0, l = 0, u = (t, n) => {
333
338
  if (n <= t) return;
334
339
  let r = t;
335
340
  o.filter((e) => e.offset >= t && e.offset <= n).forEach((t) => {
336
- t.offset > r && s.push(/* @__PURE__ */ P("span", {
341
+ t.offset > r && s.push(/* @__PURE__ */ F("span", {
337
342
  "aria-hidden": !0,
338
343
  children: e.slice(r, t.offset)
339
344
  }, `text-${l++}`)), s.push(t.node), r = t.offset;
340
- }), r < n && s.push(/* @__PURE__ */ P("span", {
345
+ }), r < n && s.push(/* @__PURE__ */ F("span", {
341
346
  "aria-hidden": !0,
342
347
  children: e.slice(r, n)
343
348
  }, `text-${l++}`));
@@ -345,16 +350,16 @@ var H = {
345
350
  return a.forEach((t, n) => {
346
351
  if (u(c, t.start), t.start + t.length <= c) return;
347
352
  let a = e.slice(t.start, t.start + t.length);
348
- s.push(t.render ? /* @__PURE__ */ P("span", {
353
+ s.push(t.render ? /* @__PURE__ */ F("span", {
349
354
  className: "pointer-events-auto",
350
355
  children: t.render()
351
- }, `range-${n}`) : /* @__PURE__ */ P("span", {
356
+ }, `range-${n}`) : /* @__PURE__ */ F("span", {
352
357
  "aria-hidden": !0,
353
358
  className: t.isUnsupported ? i : r,
354
359
  children: a
355
360
  }, `range-${n}`)), c = Math.max(c, t.start + t.length);
356
361
  }), u(c, e.length), s;
357
- }, Be = (e, t) => {
362
+ }, Ue = (e, t) => {
358
363
  let n = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode: (e) => e.parentElement?.closest("[data-mirror-synthetic]") == null ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT }), r = 0;
359
364
  for (let e = n.nextNode(); e != null; e = n.nextNode()) {
360
365
  let n = e.textContent?.length ?? 0;
@@ -365,12 +370,12 @@ var H = {
365
370
  r += n;
366
371
  }
367
372
  return null;
368
- }, Ve = (e, t, n) => {
369
- let r = Be(e, t), i = Be(e, n);
373
+ }, We = (e, t, n) => {
374
+ let r = Ue(e, t), i = Ue(e, n);
370
375
  if (r == null || i == null) return null;
371
376
  let a = document.createRange();
372
377
  return a.setStart(r.node, r.offset), a.setEnd(i.node, i.offset), a;
373
- }, He = ({ textareaRef: e, message: t, isMirrorActive: n }) => {
378
+ }, Ge = ({ textareaRef: e, message: t, isMirrorActive: n }) => {
374
379
  let r = B(null), [i, a] = V([]), o = L(() => {
375
380
  let t = e.current, n = r.current;
376
381
  if (t == null || n == null) return;
@@ -382,7 +387,7 @@ var H = {
382
387
  a((e) => e.length === 0 ? e : []);
383
388
  return;
384
389
  }
385
- let c = Ve(i, o, s);
390
+ let c = We(i, o, s);
386
391
  if (c == null) {
387
392
  a((e) => e.length === 0 ? e : []);
388
393
  return;
@@ -390,7 +395,7 @@ var H = {
390
395
  let l = i.getBoundingClientRect();
391
396
  a(Array.from(c.getClientRects()).map((e) => new DOMRect(e.left - l.left, e.top - l.top + i.scrollTop, e.width, e.height)));
392
397
  }, [n, e]);
393
- return De(() => {
398
+ return Ae(() => {
394
399
  n && o(), s();
395
400
  }, [
396
401
  n,
@@ -416,7 +421,7 @@ var H = {
416
421
  updateSelectionRects: s,
417
422
  syncMirrorToTextarea: o
418
423
  };
419
- }, Ue = ({ messageProp: e, messageRevision: t }) => {
424
+ }, Ke = ({ messageProp: e, messageRevision: t }) => {
420
425
  let [n, r] = V(e), i = B(null);
421
426
  return R(() => {
422
427
  r(e);
@@ -425,10 +430,10 @@ var H = {
425
430
  setMessage: r,
426
431
  textareaRef: i
427
432
  };
428
- }, We = (e, t, n, r = n) => {
433
+ }, qe = (e, t, n, r = n) => {
429
434
  let i = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set;
430
435
  i ? i.call(e, t) : e.value = t, e.setSelectionRange(n, r), e.dispatchEvent(new Event("input", { bubbles: !0 }));
431
- }, Ge = (e) => e.key.toLowerCase() === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey, Ke = ({ insertion: e, textareaRef: t }) => {
436
+ }, Je = (e) => e.key.toLowerCase() === "z" && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey, Ye = ({ insertion: e, textareaRef: t }) => {
432
437
  let n = e?.revision, r = B(e?.text);
433
438
  r.current = e?.text;
434
439
  let i = B(n), a = B(null);
@@ -442,7 +447,7 @@ var H = {
442
447
  let { value: r, selectionStart: i, selectionEnd: o } = n, s = i ?? r.length, c = o ?? s;
443
448
  if (n.focus(), a.current = null, typeof document.execCommand == "function" && document.execCommand("insertText", !1, e)) return;
444
449
  let l = `${r.slice(0, s)}${e}${r.slice(c)}`;
445
- We(n, l, s + e.length), a.current = {
450
+ qe(n, l, s + e.length), a.current = {
446
451
  insertedValue: l,
447
452
  previousValue: r,
448
453
  previousSelectionStart: s,
@@ -451,17 +456,17 @@ var H = {
451
456
  });
452
457
  }, [n, t]), { handleUndoKeyDown: (e) => {
453
458
  let n = a.current, r = t.current;
454
- return n == null || r == null || !Ge(e) || (a.current = null, r.value !== n.insertedValue) ? !1 : (e.preventDefault(), We(r, n.previousValue, n.previousSelectionStart, n.previousSelectionEnd), !0);
459
+ return n == null || r == null || !Je(e) || (a.current = null, r.value !== n.insertedValue) ? !1 : (e.preventDefault(), qe(r, n.previousValue, n.previousSelectionStart, n.previousSelectionEnd), !0);
455
460
  } };
456
- }, qe = /* @__PURE__ */ function(e) {
461
+ }, Xe = /* @__PURE__ */ function(e) {
457
462
  return e.Idle = "idle", e.Recording = "recording", e.Processing = "processing", e.Error = "error", e;
458
- }({}), Je = /* @__PURE__ */ function(e) {
463
+ }({}), Ze = /* @__PURE__ */ function(e) {
459
464
  return e.Dictation = "dictation", e.Attachment = "attachment", e;
460
- }({}), Ye = [
465
+ }({}), Qe = [
461
466
  "audio/webm;codecs=opus",
462
467
  "audio/ogg;codecs=opus",
463
468
  "audio/webm"
464
- ], Xe = 100, Ze = 100, Qe = .01, $e = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: i = "Voice input failed" }) => {
469
+ ], $e = 100, et = 100, tt = .01, nt = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: i = "Voice input failed" }) => {
465
470
  let [a, o] = V("idle"), [s, c] = V(null), l = B(null), d = B(null), f = B({
466
471
  onAttachAudio: e,
467
472
  onTranscribeAudio: t,
@@ -492,7 +497,7 @@ var H = {
492
497
  n.aborted || (t.controller.abort(), d.current = null, c(e instanceof Error ? e.message : f.current.errorLabel), o("error"));
493
498
  }, S = () => {
494
499
  if (!a || n.aborted) return;
495
- let e = Ye.find((e) => MediaRecorder.isTypeSupported(e)), t = new MediaRecorder(a, e ? { mimeType: e } : void 0);
500
+ let e = Qe.find((e) => MediaRecorder.isTypeSupported(e)), t = new MediaRecorder(a, e ? { mimeType: e } : void 0);
496
501
  p = t;
497
502
  let s = Date.now(), c = !1, d = !1, S = new Uint8Array(l.current?.fftSize ?? 256), C = async () => {
498
503
  if (!(g || n.aborted)) {
@@ -500,7 +505,7 @@ var H = {
500
505
  try {
501
506
  let a = t.mimeType || e || "audio/webm", l = new Blob(_, { type: a });
502
507
  _.length = 0, y();
503
- let p = Date.now() - s >= Ze;
508
+ let p = Date.now() - s >= et;
504
509
  if (l.size && (!i || p && (!c || d))) {
505
510
  let e = u(a), t = r[e] ?? e.split("/")[1] ?? "webm", s = new File([l], "voice-" + crypto.randomUUID() + "." + t, { type: a });
506
511
  if (i) {
@@ -526,8 +531,8 @@ var H = {
526
531
  e.getByteTimeDomainData(S), c = !0;
527
532
  let t = 0;
528
533
  for (let e of S) t += ((e - 128) / 128) ** 2;
529
- Math.sqrt(t / S.length) >= Qe && (d = !0, v());
530
- }, Xe));
534
+ Math.sqrt(t / S.length) >= tt && (d = !0, v());
535
+ }, $e));
531
536
  };
532
537
  t.stop = () => {
533
538
  h || n.aborted || (h = !0, v(), o("processing"), p?.state === "recording" && p.stop());
@@ -558,14 +563,14 @@ var H = {
558
563
  stopRecording: m,
559
564
  discardRecording: h
560
565
  };
561
- }, et = /* @__PURE__ */ function(e) {
566
+ }, rt = /* @__PURE__ */ function(e) {
562
567
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
563
- }({}), tt = /* @__PURE__ */ function(e) {
568
+ }({}), it = /* @__PURE__ */ function(e) {
564
569
  return e.Stacked = "stacked", e.Inline = "inline", e;
565
- }({}), nt = {
570
+ }({}), at = {
566
571
  item: "_item_1sr2n_1",
567
572
  itemIcon: "_itemIcon_1sr2n_11"
568
- }, rt = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: s = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: d = "", colors: f }) => {
573
+ }, ot = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: s = "dial-body-semi-text", itemLabelClassName: u = "dial-small-text", btnTextClassName: d = "", colors: f }) => {
569
574
  let p = (e) => {
570
575
  e(), r();
571
576
  }, h = c({
@@ -574,7 +579,7 @@ var H = {
574
579
  "--ci-sheet-item-active": f?.itemActiveBg,
575
580
  "--ci-sheet-icon": f?.itemIcon
576
581
  });
577
- return /* @__PURE__ */ P(U, {
582
+ return /* @__PURE__ */ F(U, {
578
583
  isOpen: e,
579
584
  title: t,
580
585
  closeLabel: n,
@@ -583,23 +588,23 @@ var H = {
583
588
  className: o,
584
589
  titleClassName: s,
585
590
  colors: f?.shell,
586
- children: /* @__PURE__ */ P("ul", {
591
+ children: /* @__PURE__ */ F("ul", {
587
592
  role: "list",
588
593
  className: "flex flex-col",
589
594
  style: h,
590
- children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ P("li", { children: /* @__PURE__ */ P(m, {
595
+ children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ F("li", { children: /* @__PURE__ */ F(m, {
591
596
  type: "button",
592
- className: l(nt.item, "w-full gap-3 px-4 py-[10px] text-start"),
593
- iconBefore: /* @__PURE__ */ P("span", {
594
- className: nt.itemIcon,
597
+ className: l(at.item, "w-full gap-3 px-4 py-[10px] text-start"),
598
+ iconBefore: /* @__PURE__ */ F("span", {
599
+ className: at.itemIcon,
595
600
  children: n
596
601
  }),
597
- iconAfter: r ? /* @__PURE__ */ P("span", {
602
+ iconAfter: r ? /* @__PURE__ */ F("span", {
598
603
  className: "ms-auto",
599
604
  children: r
600
605
  }) : null,
601
606
  textClassName: d,
602
- label: /* @__PURE__ */ P("span", {
607
+ label: /* @__PURE__ */ F("span", {
603
608
  className: u,
604
609
  children: t
605
610
  }),
@@ -607,7 +612,7 @@ var H = {
607
612
  }) }, e))
608
613
  })
609
614
  });
610
- }, it = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
615
+ }, st = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
611
616
  let [s, c] = V(t), [l, u] = V(n), [d, f] = V(r), p = B(o);
612
617
  R(() => {
613
618
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
@@ -640,17 +645,17 @@ var H = {
640
645
  a
641
646
  ])
642
647
  };
643
- }, at = { label: "_label_14i7c_1" }, ot = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: a, onSystemPromptChange: s, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
648
+ }, ct = { label: "_label_14i7c_1" }, lt = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: a, onSystemPromptChange: s, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
644
649
  "Precise",
645
650
  "Neutral",
646
651
  "Creative"
647
652
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
648
- let S = c({ "--csf-label-text": x?.labelText }), C = l(b, at.label, "gap-1");
649
- return /* @__PURE__ */ F("div", {
653
+ let S = c({ "--csf-label-text": x?.labelText }), C = l(b, ct.label, "gap-1");
654
+ return /* @__PURE__ */ I("div", {
650
655
  className: "flex flex-col gap-4 px-6 pb-3",
651
656
  style: S,
652
657
  children: [
653
- e.responseFormat && /* @__PURE__ */ P(k, {
658
+ e.responseFormat && /* @__PURE__ */ F(k, {
654
659
  id: "response-format",
655
660
  labelProps: {
656
661
  label: d,
@@ -669,18 +674,18 @@ var H = {
669
674
  }],
670
675
  onChange: (e) => a(e)
671
676
  }),
672
- e.systemPrompt && /* @__PURE__ */ P(ae, {
677
+ e.systemPrompt && /* @__PURE__ */ F(oe, {
673
678
  value: n,
674
679
  placeholder: g,
675
680
  className: i,
676
- resize: oe.Vertical,
681
+ resize: M.Vertical,
677
682
  labelProps: {
678
683
  className: C,
679
684
  label: h
680
685
  },
681
686
  onChange: (e) => s(e ?? "")
682
687
  }),
683
- e.temperature && /* @__PURE__ */ P(re, {
688
+ e.temperature && /* @__PURE__ */ F(ie, {
684
689
  labelProps: {
685
690
  label: _,
686
691
  className: C,
@@ -697,8 +702,8 @@ var H = {
697
702
  })
698
703
  ]
699
704
  });
700
- }, st = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: c, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
701
- let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: O, setSystemPrompt: k, setTemperature: A, handleSubmit: j } = it({
705
+ }, ut = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: c, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
706
+ let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: ee, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = st({
702
707
  isOpen: e,
703
708
  features: o,
704
709
  initialResponseFormat: s,
@@ -707,7 +712,7 @@ var H = {
707
712
  onSave: d,
708
713
  onClose: r
709
714
  });
710
- return /* @__PURE__ */ F(U, {
715
+ return /* @__PURE__ */ I(U, {
711
716
  isOpen: e,
712
717
  title: f,
713
718
  closeLabel: i,
@@ -715,14 +720,14 @@ var H = {
715
720
  onBack: t,
716
721
  backLabel: n,
717
722
  style: a,
718
- children: [/* @__PURE__ */ P(ot, {
723
+ children: [/* @__PURE__ */ F(lt, {
719
724
  features: o,
720
725
  responseFormat: w,
721
726
  systemPrompt: T,
722
727
  temperature: E,
723
- onResponseFormatChange: O,
724
- onSystemPromptChange: k,
725
- onTemperatureChange: A,
728
+ onResponseFormatChange: ee,
729
+ onSystemPromptChange: O,
730
+ onTemperatureChange: k,
726
731
  responseFormatLabel: p,
727
732
  responseFormatHint: m,
728
733
  responseFormatMarkdownLabel: h,
@@ -732,23 +737,23 @@ var H = {
732
737
  temperatureLabel: y,
733
738
  temperatureLabels: b,
734
739
  temperatureHint: x
735
- }), /* @__PURE__ */ P("div", {
740
+ }), /* @__PURE__ */ F("div", {
736
741
  className: l("px-6 py-4 mobile:pb-8"),
737
- children: /* @__PURE__ */ P(M, {
742
+ children: /* @__PURE__ */ F(N, {
738
743
  tooltip: C,
739
744
  hideTooltip: D || !C,
740
745
  triggerClassName: "w-full",
741
- children: /* @__PURE__ */ P(ee, {
746
+ children: /* @__PURE__ */ F(te, {
742
747
  label: S,
743
- onClick: j,
748
+ onClick: A,
744
749
  disabled: !D,
745
750
  className: "w-full"
746
751
  })
747
752
  })
748
753
  })]
749
754
  });
750
- }, ct = { modal: "_modal_kl0h0_1" }, lt = ({ 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: g, temperatureHint: _, saveLabel: v = "Apply changes", saveDisabledTooltip: y, backgroundClassName: b = ct.modal }) => {
751
- let { responseFormat: x, systemPrompt: S, temperature: C, canSubmit: w, setResponseFormat: T, setSystemPrompt: ee, setTemperature: O, handleSubmit: k } = it({
755
+ }, dt = { modal: "_modal_kl0h0_1" }, ft = ({ 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: g, temperatureHint: _, saveLabel: v = "Apply changes", saveDisabledTooltip: y, backgroundClassName: b = dt.modal }) => {
756
+ let { responseFormat: x, systemPrompt: S, temperature: C, canSubmit: w, setResponseFormat: T, setSystemPrompt: E, setTemperature: te, handleSubmit: O } = st({
752
757
  features: e,
753
758
  initialResponseFormat: t,
754
759
  initialSystemPrompt: n,
@@ -756,31 +761,31 @@ var H = {
756
761
  onSave: i,
757
762
  onClose: a
758
763
  });
759
- return /* @__PURE__ */ P(E, {
764
+ return /* @__PURE__ */ F(D, {
760
765
  open: !0,
761
766
  header: o,
762
767
  titleClassName: s,
763
- size: D.Sm,
768
+ size: ee.Sm,
764
769
  onClose: a,
765
770
  className: b,
766
771
  mainButtons: [{
767
772
  label: v,
768
773
  variant: h.Primary,
769
- onClick: k,
774
+ onClick: O,
770
775
  disabled: !w,
771
776
  tooltipProps: y ? {
772
777
  tooltip: y,
773
778
  hideTooltip: w
774
779
  } : void 0
775
780
  }],
776
- children: /* @__PURE__ */ P(ot, {
781
+ children: /* @__PURE__ */ F(lt, {
777
782
  features: e,
778
783
  responseFormat: x,
779
784
  systemPrompt: S,
780
785
  temperature: C,
781
786
  onResponseFormatChange: T,
782
- onSystemPromptChange: ee,
783
- onTemperatureChange: O,
787
+ onSystemPromptChange: E,
788
+ onTemperatureChange: te,
784
789
  responseFormatLabel: c,
785
790
  responseFormatHint: l,
786
791
  responseFormatMarkdownLabel: u,
@@ -792,10 +797,10 @@ var H = {
792
797
  temperatureHint: _
793
798
  })
794
799
  });
795
- }, ut = {
800
+ }, G = {
796
801
  icon: "_icon_1fv6z_1",
797
802
  selectedIcon: "_selectedIcon_1fv6z_5"
798
- }, dt = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: s, onToolToggle: u, itemLabelClassName: d = "dial-small-text", colors: p }) => /* @__PURE__ */ P(U, {
803
+ }, pt = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: a, title: o = "Tools", items: s, onToolToggle: u, itemLabelClassName: d = "dial-small-text", colors: p }) => /* @__PURE__ */ F(U, {
799
804
  isOpen: e,
800
805
  title: o,
801
806
  closeLabel: i,
@@ -803,33 +808,33 @@ var H = {
803
808
  onBack: t,
804
809
  backLabel: n,
805
810
  style: a,
806
- children: /* @__PURE__ */ P("ul", {
811
+ children: /* @__PURE__ */ F("ul", {
807
812
  role: "menu",
808
813
  className: "flex flex-col pb-4",
809
814
  style: c({
810
815
  "--tbs-icon-text": p?.iconText,
811
816
  "--tbs-selected-icon-text": p?.selectedIconText
812
817
  }),
813
- children: s.map((e) => /* @__PURE__ */ P("li", {
818
+ children: s.map((e) => /* @__PURE__ */ F("li", {
814
819
  role: "none",
815
- children: /* @__PURE__ */ P(m, {
820
+ children: /* @__PURE__ */ F(m, {
816
821
  type: "button",
817
822
  role: "menuitemcheckbox",
818
823
  "aria-checked": e.isSelected,
819
824
  className: "w-full gap-3 px-4 py-[10px] text-start",
820
- iconBefore: /* @__PURE__ */ P("span", {
821
- className: l("flex items-center", ut.icon),
825
+ iconBefore: /* @__PURE__ */ F("span", {
826
+ className: l("flex items-center", G.icon),
822
827
  children: e.icon
823
828
  }),
824
- iconAfter: e.isSelected ? /* @__PURE__ */ P("span", {
825
- className: l("ms-auto", ut.selectedIcon),
826
- children: /* @__PURE__ */ P(de, {
829
+ iconAfter: e.isSelected ? /* @__PURE__ */ F("span", {
830
+ className: l("ms-auto", G.selectedIcon),
831
+ children: /* @__PURE__ */ F(me, {
827
832
  size: f,
828
833
  "aria-hidden": !0,
829
- stroke: _
834
+ stroke: v
830
835
  })
831
836
  }) : null,
832
- label: /* @__PURE__ */ P("span", {
837
+ label: /* @__PURE__ */ F("span", {
833
838
  className: d,
834
839
  children: e.label
835
840
  }),
@@ -837,57 +842,57 @@ var H = {
837
842
  })
838
843
  }, e.id))
839
844
  })
840
- }), ft = {
845
+ }), mt = {
841
846
  toolIcon: "_toolIcon_ma5s5_1",
842
847
  chevronIcon: "_chevronIcon_ma5s5_5"
843
- }, pt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: a, menuCloseLabel: s, style: u, listClassName: p = "w-[240px]", isDisabled: m = !1, chatSettings: h, extraMenuItems: b, toolsMenuItems: S = [], onToolToggle: w, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, getCaretPosition: ee, colors: O }) => {
844
- let k = d(), [A, j] = V(!1), [te, ne] = V(!1), [re, ie] = V(!1), [ae, oe] = V(null), [M, se] = V(!1), I = z(() => c({
845
- "--aab-tool-icon": O?.toolIcon,
846
- "--aab-chevron-icon": O?.chevronIcon
847
- }), [O?.toolIcon, O?.chevronIcon]), ce = S.length > 0 && w != null, le = D != null && D.length > 0, ue = z(() => S.map((e) => ({
848
+ }, ht = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: a, menuCloseLabel: s, style: u, listClassName: p = "w-[240px]", isDisabled: m = !1, chatSettings: h, extraMenuItems: g, toolsMenuItems: x = [], onToolToggle: C, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, getCaretPosition: ee, colors: te }) => {
849
+ let O = d(), [k, A] = V(!1), [j, ne] = V(!1), [re, ie] = V(!1), [ae, oe] = V(null), [M, N] = V(!1), se = z(() => c({
850
+ "--aab-tool-icon": te?.toolIcon,
851
+ "--aab-chevron-icon": te?.chevronIcon
852
+ }), [te?.toolIcon, te?.chevronIcon]), ce = x.length > 0 && C != null, le = D != null && D.length > 0, ue = z(() => x.map((e) => ({
848
853
  key: e.id,
849
854
  label: e.label,
850
- icon: /* @__PURE__ */ P("span", {
851
- style: I,
852
- className: l("flex items-center", ft.toolIcon),
855
+ icon: /* @__PURE__ */ F("span", {
856
+ style: se,
857
+ className: l("flex items-center", mt.toolIcon),
853
858
  children: e.icon
854
859
  }),
855
860
  selectable: !0,
856
- mark: C.Check,
861
+ mark: w.Check,
857
862
  checked: e.isSelected,
858
- onClick: () => w?.(e.id)
863
+ onClick: () => C?.(e.id)
859
864
  })), [
860
- S,
861
- w,
862
- I
865
+ x,
866
+ C,
867
+ se
863
868
  ]), de = z(() => [
864
869
  ...e == null ? [] : [{
865
870
  key: "attach",
866
871
  label: r,
867
- icon: /* @__PURE__ */ P(ge, {
872
+ icon: /* @__PURE__ */ F(ye, {
868
873
  size: f,
869
874
  "aria-hidden": !0,
870
- stroke: _
875
+ stroke: v
871
876
  }),
872
877
  onClick: e
873
878
  }],
874
- ...b ?? [],
879
+ ...g ?? [],
875
880
  ...ce ? [{
876
881
  key: "tools",
877
882
  label: T,
878
- icon: /* @__PURE__ */ P(be, {
883
+ icon: /* @__PURE__ */ F(Ce, {
879
884
  size: f,
880
885
  "aria-hidden": !0,
881
- stroke: _
886
+ stroke: v
882
887
  }),
883
- onClick: k ? () => {
884
- ie(!0), j(!1);
888
+ onClick: O ? () => {
889
+ ie(!0), A(!1);
885
890
  } : () => void 0,
886
- ...k ? { iconAfter: /* @__PURE__ */ P(pe, {
891
+ ...O ? { iconAfter: /* @__PURE__ */ F(ge, {
887
892
  size: f,
888
- stroke: _,
889
- style: I,
890
- className: l("rtl:scale-x-[-1]", ft.chevronIcon),
893
+ stroke: v,
894
+ style: se,
895
+ className: l("rtl:scale-x-[-1]", mt.chevronIcon),
891
896
  "aria-hidden": !0
892
897
  }) } : { children: ue }
893
898
  }] : [],
@@ -895,48 +900,48 @@ var H = {
895
900
  key: e.key,
896
901
  label: e.title,
897
902
  icon: e.icon,
898
- onClick: k ? () => {
899
- oe(e.key), j(!1);
903
+ onClick: O ? () => {
904
+ oe(e.key), A(!1);
900
905
  } : () => void 0,
901
- ...k ? { iconAfter: /* @__PURE__ */ P(pe, {
906
+ ...O ? { iconAfter: /* @__PURE__ */ F(ge, {
902
907
  size: f,
903
- stroke: _,
904
- style: I,
905
- className: l("rtl:scale-x-[-1]", ft.chevronIcon),
908
+ stroke: v,
909
+ style: se,
910
+ className: l("rtl:scale-x-[-1]", mt.chevronIcon),
906
911
  "aria-hidden": !0
907
912
  }) } : {
908
913
  children: [{
909
914
  key: `${e.key}-panel`,
910
915
  label: ""
911
916
  }],
912
- renderSubMenu: () => e.renderOverlay(() => se(!1), ee?.() ?? 0)
917
+ renderSubMenu: () => e.renderOverlay(() => N(!1), ee?.() ?? 0)
913
918
  }
914
919
  })),
915
920
  ...t == null ? [] : [{
916
921
  key: "record-voice",
917
922
  label: n,
918
- icon: /* @__PURE__ */ P(he, {
923
+ icon: /* @__PURE__ */ F(ve, {
919
924
  size: f,
920
925
  "aria-hidden": !0,
921
- stroke: _
926
+ stroke: v
922
927
  }),
923
928
  onClick: () => {
924
- j(!1), se(!1), t();
929
+ A(!1), N(!1), t();
925
930
  }
926
931
  }],
927
932
  ...h == null ? [] : [{
928
933
  key: "chat-settings",
929
934
  label: h.menuItemLabel ?? "Chat settings",
930
- icon: /* @__PURE__ */ P(ye, {
935
+ icon: /* @__PURE__ */ F(Se, {
931
936
  size: f,
932
937
  "aria-hidden": !0,
933
- stroke: _
938
+ stroke: v
934
939
  }),
935
- iconAfter: k ? /* @__PURE__ */ P(pe, {
940
+ iconAfter: O ? /* @__PURE__ */ F(ge, {
936
941
  size: f,
937
- stroke: _,
938
- style: I,
939
- className: l("rtl:scale-x-[-1]", ft.chevronIcon),
942
+ stroke: v,
943
+ style: se,
944
+ className: l("rtl:scale-x-[-1]", mt.chevronIcon),
940
945
  "aria-hidden": !0
941
946
  }) : null,
942
947
  onClick: () => ne(!0)
@@ -947,17 +952,17 @@ var H = {
947
952
  t,
948
953
  n,
949
954
  h,
950
- b,
951
- k,
955
+ g,
956
+ O,
952
957
  ce,
953
958
  T,
954
959
  ue,
955
960
  D,
956
961
  ee,
957
- I
962
+ se
958
963
  ]);
959
964
  if (de.length === 0) return null;
960
- let fe = /* @__PURE__ */ P(v, {
965
+ let fe = /* @__PURE__ */ F(y, {
961
966
  matchReferenceWidth: !1,
962
967
  placement: "bottom-start",
963
968
  listClassName: p,
@@ -965,74 +970,74 @@ var H = {
965
970
  items: de,
966
971
  disabled: m,
967
972
  open: le ? M : void 0,
968
- onOpenChange: le ? se : void 0,
969
- children: /* @__PURE__ */ P(x, {
970
- icon: /* @__PURE__ */ P(ve, {
971
- size: g.LG,
973
+ onOpenChange: le ? N : void 0,
974
+ children: /* @__PURE__ */ F(S, {
975
+ icon: /* @__PURE__ */ F(xe, {
976
+ size: _.LG,
972
977
  "aria-hidden": !0,
973
- stroke: _
978
+ stroke: v
974
979
  }),
975
980
  "aria-label": i,
976
981
  tooltipProps: { tooltip: i },
977
982
  disabled: m
978
983
  })
979
984
  });
980
- return /* @__PURE__ */ P(N, { children: k ? /* @__PURE__ */ F(N, { children: [
981
- /* @__PURE__ */ P(x, {
982
- icon: /* @__PURE__ */ P(ve, {
983
- size: g.LG,
985
+ return /* @__PURE__ */ F(P, { children: O ? /* @__PURE__ */ I(P, { children: [
986
+ /* @__PURE__ */ F(S, {
987
+ icon: /* @__PURE__ */ F(xe, {
988
+ size: _.LG,
984
989
  "aria-hidden": !0,
985
- stroke: _
990
+ stroke: v
986
991
  }),
987
992
  "aria-label": i,
988
- size: y.Large,
993
+ size: b.Large,
989
994
  tooltipProps: { tooltip: i },
990
995
  disabled: m,
991
- onClick: () => j(!0)
996
+ onClick: () => A(!0)
992
997
  }),
993
- /* @__PURE__ */ P(rt, {
994
- isOpen: A,
998
+ /* @__PURE__ */ F(ot, {
999
+ isOpen: k,
995
1000
  title: a,
996
1001
  closeLabel: s,
997
- onClose: () => j(!1),
1002
+ onClose: () => A(!1),
998
1003
  style: u,
999
1004
  items: de,
1000
1005
  className: "pb-4",
1001
1006
  btnTextClassName: "flex-1"
1002
1007
  }),
1003
- ce && /* @__PURE__ */ P(dt, {
1008
+ ce && /* @__PURE__ */ F(pt, {
1004
1009
  isOpen: re,
1005
1010
  onBack: () => {
1006
- ie(!1), j(!0);
1011
+ ie(!1), A(!0);
1007
1012
  },
1008
1013
  backLabel: E,
1009
1014
  onClose: () => ie(!1),
1010
1015
  closeLabel: s,
1011
1016
  style: u,
1012
1017
  title: T,
1013
- items: S,
1014
- onToolToggle: w
1018
+ items: x,
1019
+ onToolToggle: C
1015
1020
  }),
1016
- D?.map((e) => /* @__PURE__ */ P(U, {
1021
+ D?.map((e) => /* @__PURE__ */ F(U, {
1017
1022
  isOpen: ae === e.key,
1018
1023
  title: e.title,
1019
1024
  closeLabel: s,
1020
1025
  onBack: () => {
1021
- oe(null), j(!0);
1026
+ oe(null), A(!0);
1022
1027
  },
1023
1028
  backLabel: e.backLabel ?? "Back",
1024
1029
  onClose: () => oe(null),
1025
1030
  style: u,
1026
- children: /* @__PURE__ */ P("div", {
1031
+ children: /* @__PURE__ */ F("div", {
1027
1032
  role: "menu",
1028
1033
  "aria-label": e.title,
1029
1034
  children: e.renderOverlay(() => oe(null), ee?.() ?? 0)
1030
1035
  })
1031
1036
  }, e.key)),
1032
- h != null && /* @__PURE__ */ P(st, {
1033
- isOpen: te,
1037
+ h != null && /* @__PURE__ */ F(ut, {
1038
+ isOpen: j,
1034
1039
  onBack: () => {
1035
- ne(!1), j(!0);
1040
+ ne(!1), A(!0);
1036
1041
  },
1037
1042
  backLabel: h.backLabel ?? "Back",
1038
1043
  onClose: () => ne(!1),
@@ -1056,7 +1061,7 @@ var H = {
1056
1061
  saveLabel: h.saveLabel,
1057
1062
  saveDisabledTooltip: h.saveDisabledTooltip
1058
1063
  })
1059
- ] }) : /* @__PURE__ */ F(N, { children: [fe, h != null && te && /* @__PURE__ */ P(lt, {
1064
+ ] }) : /* @__PURE__ */ I(P, { children: [fe, h != null && j && /* @__PURE__ */ F(ft, {
1060
1065
  features: h.features,
1061
1066
  initialResponseFormat: h.responseFormat ?? o.Markdown,
1062
1067
  initialSystemPrompt: h.systemPrompt,
@@ -1076,17 +1081,17 @@ var H = {
1076
1081
  saveLabel: h.saveLabel,
1077
1082
  saveDisabledTooltip: h.saveDisabledTooltip
1078
1083
  })] }) });
1079
- }, G = {
1084
+ }, K = {
1080
1085
  chip: "_chip_1lvv5_1",
1081
1086
  chipSelected: "_chipSelected_1lvv5_9",
1082
1087
  chipIcon: "_chipIcon_1lvv5_16",
1083
1088
  chipText: "_chipText_1lvv5_19",
1084
1089
  chipState: "_chipState_1lvv5_22",
1085
1090
  chipClose: "_chipClose_1lvv5_25"
1086
- }, mt = (e) => `Remove ${e}`, ht = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = mt, stateOnLabel: a, stateOffLabel: o, typography: s, colors: u }) => {
1091
+ }, gt = (e) => `Remove ${e}`, _t = ({ items: e, onToolToggle: t, onToolDismiss: n, canRemove: r = !0, removeLabel: i = gt, stateOnLabel: a, stateOffLabel: o, typography: s, colors: u }) => {
1087
1092
  if (e.length === 0) return null;
1088
1093
  let d = !!(a && o);
1089
- return /* @__PURE__ */ P("div", {
1094
+ return /* @__PURE__ */ F("div", {
1090
1095
  className: "flex flex-wrap items-center gap-2",
1091
1096
  style: c({
1092
1097
  "--ci-chip-bg": u?.chipBg,
@@ -1102,46 +1107,46 @@ var H = {
1102
1107
  "--ci-chip-close": u?.chipClose,
1103
1108
  "--ci-chip-close-hover": u?.chipCloseHover
1104
1109
  }),
1105
- children: e.map((e) => /* @__PURE__ */ F("div", {
1106
- className: l(G.chip, e.isSelected && G.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 transition-colors", r ? "pe-1 ps-2" : "px-2"),
1107
- children: [/* @__PURE__ */ F("button", {
1110
+ children: e.map((e) => /* @__PURE__ */ I("div", {
1111
+ className: l(K.chip, e.isSelected && K.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 transition-colors", r ? "ps-2 pe-1" : "px-2"),
1112
+ children: [/* @__PURE__ */ I("button", {
1108
1113
  type: "button",
1109
1114
  onClick: () => t(e.id),
1110
1115
  "aria-pressed": e.isSelected,
1111
1116
  className: "flex min-w-0 items-center gap-1.5",
1112
1117
  children: [
1113
- /* @__PURE__ */ P("span", {
1114
- className: l(G.chipIcon, "shrink-0"),
1118
+ /* @__PURE__ */ F("span", {
1119
+ className: l(K.chipIcon, "shrink-0"),
1115
1120
  "aria-hidden": !0,
1116
1121
  children: e.icon
1117
1122
  }),
1118
- /* @__PURE__ */ F("span", {
1119
- className: l(G.chipText, s?.fontClassName || "dial-small-paragraph-text", "truncate"),
1120
- children: [e.label, d && /* @__PURE__ */ P("span", {
1123
+ /* @__PURE__ */ I("span", {
1124
+ className: l(K.chipText, s?.fontClassName || "dial-small-paragraph-text", "truncate"),
1125
+ children: [e.label, d && /* @__PURE__ */ F("span", {
1121
1126
  "aria-hidden": !0,
1122
1127
  children: ":"
1123
1128
  })]
1124
1129
  }),
1125
- d && /* @__PURE__ */ P("span", {
1126
- className: l(G.chipState, s?.fontClassName || "dial-small-paragraph-text", "ms-1 shrink-0 uppercase tracking-wider"),
1130
+ d && /* @__PURE__ */ F("span", {
1131
+ className: l(K.chipState, s?.fontClassName || "dial-small-paragraph-text", "ms-1 shrink-0 tracking-wider uppercase"),
1127
1132
  "aria-hidden": !0,
1128
1133
  children: e.isSelected ? a : o
1129
1134
  })
1130
1135
  ]
1131
- }), r && /* @__PURE__ */ P("button", {
1136
+ }), r && /* @__PURE__ */ F("button", {
1132
1137
  type: "button",
1133
1138
  onClick: () => n(e.id),
1134
1139
  "aria-label": i(e.label),
1135
- className: l(G.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
1136
- children: /* @__PURE__ */ P(xe, {
1140
+ className: l(K.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
1141
+ children: /* @__PURE__ */ F(we, {
1137
1142
  size: 12,
1138
1143
  "aria-hidden": !0,
1139
- stroke: _
1144
+ stroke: v
1140
1145
  })
1141
1146
  })]
1142
1147
  }, e.id))
1143
1148
  });
1144
- }, K = {
1149
+ }, q = {
1145
1150
  wrapper: "_wrapper_19a9k_2",
1146
1151
  wrapperDisabled: "_wrapperDisabled_19a9k_9",
1147
1152
  textarea: "_textarea_19a9k_13",
@@ -1154,33 +1159,33 @@ var H = {
1154
1159
  modelSelectorName: "_modelSelectorName_19a9k_72",
1155
1160
  modelSelectorVersion: "_modelSelectorVersion_19a9k_75",
1156
1161
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_19a9k_84"
1157
- }, gt = {
1162
+ }, vt = {
1158
1163
  waveformCanvas: "_waveformCanvas_18zb5_1",
1159
1164
  recordingDot: "_recordingDot_18zb5_15",
1160
1165
  "recording-pulse": "_recording-pulse_18zb5_1"
1161
- }, _t = 3, vt = 4, yt = 200, bt = ({ state: e, analyserNodeRef: t, onStop: n, onDiscard: r, attachButton: i, stopLabel: a = "Stop recording", discardLabel: o = "Discard recording", processingLabel: s = "Transcribing audio…", style: c, className: u, embedded: d = !1 }) => {
1162
- let f = B(null), p = B(new Float32Array(yt)), m = B(0), h = B(0), v = e === qe.Recording, y = e === qe.Processing, b = L((e) => {
1166
+ }, yt = 3, bt = 4, xt = 200, St = ({ state: e, analyserNodeRef: t, onStop: n, onDiscard: r, attachButton: i, stopLabel: a = "Stop recording", discardLabel: o = "Discard recording", processingLabel: s = "Transcribing audio…", style: c, className: u, embedded: d = !1 }) => {
1167
+ let f = B(null), p = B(new Float32Array(xt)), m = B(0), h = B(0), g = e === Xe.Recording, y = e === Xe.Processing, b = L((e) => {
1163
1168
  let t = e.getContext("2d");
1164
1169
  if (!t) return;
1165
1170
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
1166
1171
  let { width: n, height: r } = e;
1167
1172
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
1168
- let i = Math.min(Math.max(1, Math.floor(n / vt)), yt - 1), a = m.current, o = h.current;
1173
+ let i = Math.min(Math.max(1, Math.floor(n / bt)), xt - 1), a = m.current, o = h.current;
1169
1174
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
1170
1175
  for (let e = 0; e <= i; e++) {
1171
- let n = ((a - i + e) % yt + yt) % yt, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1172
- t.fillRect(e * vt, (r - c) / 2, _t, c);
1176
+ let n = ((a - i + e) % xt + xt) % xt, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1177
+ t.fillRect(e * bt, (r - c) / 2, yt, c);
1173
1178
  }
1174
1179
  t.restore();
1175
1180
  }, []);
1176
1181
  R(() => {
1177
- if (!v) return;
1182
+ if (!g) return;
1178
1183
  let e = f.current;
1179
1184
  if (!e) return;
1180
1185
  p.current.fill(0), m.current = 0, h.current = 0;
1181
1186
  let n, r = () => {
1182
- if (h.current += 1, h.current >= vt) {
1183
- h.current -= vt;
1187
+ if (h.current += 1, h.current >= bt) {
1188
+ h.current -= bt;
1184
1189
  let e = t.current;
1185
1190
  if (e) {
1186
1191
  let t = new Uint8Array(e.frequencyBinCount);
@@ -1190,7 +1195,7 @@ var H = {
1190
1195
  let r = (t[e] - 128) / 128;
1191
1196
  n += r * r;
1192
1197
  }
1193
- p.current[m.current % yt] = Math.sqrt(n / t.length), m.current++;
1198
+ p.current[m.current % xt] = Math.sqrt(n / t.length), m.current++;
1194
1199
  }
1195
1200
  }
1196
1201
  b(e), n = requestAnimationFrame(r);
@@ -1199,7 +1204,7 @@ var H = {
1199
1204
  cancelAnimationFrame(n);
1200
1205
  };
1201
1206
  }, [
1202
- v,
1207
+ g,
1203
1208
  t,
1204
1209
  b
1205
1210
  ]), R(() => {
@@ -1210,128 +1215,128 @@ var H = {
1210
1215
  });
1211
1216
  return t.observe(e), () => t.disconnect();
1212
1217
  }, [b]);
1213
- let x = /* @__PURE__ */ F("div", {
1218
+ let x = /* @__PURE__ */ I("div", {
1214
1219
  className: "flex flex-shrink-0 items-center justify-end gap-1",
1215
1220
  children: [
1216
- /* @__PURE__ */ P(T, {
1217
- icon: /* @__PURE__ */ P(xe, {
1218
- size: g.LG,
1221
+ /* @__PURE__ */ F(E, {
1222
+ icon: /* @__PURE__ */ F(we, {
1223
+ size: _.LG,
1219
1224
  "aria-hidden": !0,
1220
- stroke: _
1225
+ stroke: v
1221
1226
  }),
1222
1227
  "aria-label": o,
1223
1228
  className: "mobile:min-h-11 mobile:min-w-11",
1224
1229
  onClick: r
1225
1230
  }),
1226
- v && /* @__PURE__ */ P(O, {
1227
- icon: /* @__PURE__ */ P(de, {
1228
- size: g.LG,
1231
+ g && /* @__PURE__ */ F(O, {
1232
+ icon: /* @__PURE__ */ F(me, {
1233
+ size: _.LG,
1229
1234
  "aria-hidden": !0,
1230
- stroke: _
1235
+ stroke: v
1231
1236
  }),
1232
1237
  onClick: () => n?.(),
1233
1238
  autoFocus: !0,
1234
1239
  "aria-label": a,
1235
1240
  className: "mobile:min-h-11 mobile:min-w-11"
1236
1241
  }),
1237
- y && /* @__PURE__ */ P("span", {
1242
+ y && /* @__PURE__ */ F("span", {
1238
1243
  className: "flex size-[40px] flex-shrink-0 items-center justify-center mobile:min-h-11 mobile:min-w-11",
1239
- children: /* @__PURE__ */ P(ie, {
1244
+ children: /* @__PURE__ */ F(ae, {
1240
1245
  size: 20,
1241
1246
  ariaLabel: s
1242
1247
  })
1243
1248
  })
1244
1249
  ]
1245
1250
  });
1246
- return /* @__PURE__ */ P("div", {
1251
+ return /* @__PURE__ */ F("div", {
1247
1252
  className: u,
1248
- children: /* @__PURE__ */ F("div", {
1253
+ children: /* @__PURE__ */ I("div", {
1249
1254
  style: c,
1250
- className: l("flex w-full min-w-0 flex-col justify-center gap-2", !d && K.wrapper, !d && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md"),
1251
- children: [/* @__PURE__ */ F("div", {
1255
+ className: l("flex w-full min-w-0 flex-col justify-center gap-2", !d && q.wrapper, !d && "min-h-[64px] max-w-[748px] rounded-xl border px-3 shadow-md"),
1256
+ children: [/* @__PURE__ */ I("div", {
1252
1257
  className: "flex min-w-0 flex-1 items-center gap-3",
1253
- children: [v && /* @__PURE__ */ P("span", {
1254
- className: l(gt.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1258
+ children: [g && /* @__PURE__ */ F("span", {
1259
+ className: l(vt.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1255
1260
  "aria-hidden": !0
1256
- }), /* @__PURE__ */ P("canvas", {
1261
+ }), /* @__PURE__ */ F("canvas", {
1257
1262
  ref: f,
1258
1263
  height: 26,
1259
1264
  "aria-hidden": !0,
1260
- className: l(gt.waveformCanvas, "h-[26px] min-w-0 flex-1")
1265
+ className: l(vt.waveformCanvas, "h-[26px] min-w-0 flex-1")
1261
1266
  })]
1262
- }), /* @__PURE__ */ F("div", {
1267
+ }), /* @__PURE__ */ I("div", {
1263
1268
  className: "flex items-center justify-between gap-2",
1264
- children: [i ?? /* @__PURE__ */ P("span", { "aria-hidden": !0 }), x]
1269
+ children: [i ?? /* @__PURE__ */ F("span", { "aria-hidden": !0 }), x]
1265
1270
  })]
1266
1271
  })
1267
1272
  });
1268
- }, xt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ P(O, {
1273
+ }, Ct = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ F(O, {
1269
1274
  "aria-label": n,
1270
1275
  onClick: () => e?.(),
1271
1276
  disabled: t,
1272
1277
  tooltipProps: r ? { tooltip: r } : void 0,
1273
- icon: /* @__PURE__ */ P(ue, {
1274
- size: g.LG,
1278
+ icon: /* @__PURE__ */ F(pe, {
1279
+ size: _.LG,
1275
1280
  className: "rtl:scale-x-[-1]",
1276
- stroke: _
1281
+ stroke: v
1277
1282
  })
1278
- }), St = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ P(T, {
1279
- icon: /* @__PURE__ */ P(_e, {
1280
- size: g.LG,
1281
- stroke: _
1283
+ }), wt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ F(E, {
1284
+ icon: /* @__PURE__ */ F(be, {
1285
+ size: _.LG,
1286
+ stroke: v
1282
1287
  }),
1283
1288
  onClick: () => e?.(),
1284
1289
  "aria-label": t
1285
- }), Ct = ({ size: e = 20 }) => /* @__PURE__ */ P(te, {
1286
- variant: ne.Circular,
1290
+ }), Tt = ({ size: e = 20 }) => /* @__PURE__ */ F(ne, {
1291
+ variant: re.Circular,
1287
1292
  width: e,
1288
1293
  height: e,
1289
1294
  active: !0
1290
- }), wt = ({ loadingLabel: e }) => /* @__PURE__ */ F("span", {
1295
+ }), Et = ({ loadingLabel: e }) => /* @__PURE__ */ I("span", {
1291
1296
  className: "flex min-w-0 flex-1 items-center",
1292
- children: [/* @__PURE__ */ P(te, {
1293
- variant: ne.Text,
1297
+ children: [/* @__PURE__ */ F(ne, {
1298
+ variant: re.Text,
1294
1299
  width: "100%",
1295
1300
  height: 16,
1296
1301
  active: !0
1297
- }), e && /* @__PURE__ */ P("span", {
1302
+ }), e && /* @__PURE__ */ F("span", {
1298
1303
  className: "sr-only",
1299
1304
  children: e
1300
1305
  })]
1301
- }), Tt = ({ loadingLabel: e }) => /* @__PURE__ */ P("div", {
1306
+ }), Dt = ({ loadingLabel: e }) => /* @__PURE__ */ F("div", {
1302
1307
  role: "status",
1303
1308
  "aria-label": e,
1304
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ F("div", {
1309
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ I("div", {
1305
1310
  className: "flex h-11 items-center gap-3 px-4",
1306
1311
  "aria-hidden": "true",
1307
- children: [/* @__PURE__ */ P(Ct, {}), /* @__PURE__ */ P(wt, {})]
1312
+ children: [/* @__PURE__ */ F(Tt, {}), /* @__PURE__ */ F(Et, {})]
1308
1313
  }, t))
1309
- }), Et = (e) => e.displayName ?? e.id, Dt = (e, t) => {
1314
+ }), Ot = (e) => e.displayName ?? e.id, kt = (e, t) => {
1310
1315
  let n = t.trim().toLowerCase();
1311
- return n ? e.filter((e) => Et(e).toLowerCase().includes(n)) : e;
1312
- }, Ot = (e, t, r, i = 18, a) => /* @__PURE__ */ P(n, {
1316
+ return n ? e.filter((e) => Ot(e).toLowerCase().includes(n)) : e;
1317
+ }, At = (e, t, r, i = 18, a) => /* @__PURE__ */ F(n, {
1313
1318
  src: e,
1314
1319
  size: i,
1315
1320
  labels: { tooltip: a },
1316
1321
  initialsName: r
1317
- }), kt = {
1322
+ }), jt = {
1318
1323
  searchHeader: "_searchHeader_1u7db_1",
1319
1324
  itemText: "_itemText_1u7db_13",
1320
1325
  itemHover: "_itemHover_1u7db_17",
1321
1326
  selectedItemBackground: "_selectedItemBackground_1u7db_22",
1322
1327
  selectedItemText: "_selectedItemText_1u7db_26",
1323
1328
  checkIcon: "_checkIcon_1u7db_30"
1324
- }, At = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, styles: i }) => {
1325
- let [a, o] = V(""), s = z(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = z(() => u ? /* @__PURE__ */ P(Ct, { size: g.LG }) : Ot(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", g.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1329
+ }, Mt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, styles: i }) => {
1330
+ let [a, o] = V(""), s = z(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = z(() => u ? /* @__PURE__ */ F(Tt, { size: _.LG }) : At(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", _.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1326
1331
  u,
1327
1332
  s,
1328
1333
  d,
1329
1334
  r?.unavailableTooltip
1330
- ]), p = s?.displayName ?? s?.id, m = s?.displayVersion, h = p ? `${r?.ariaLabel ?? "Select model"}: ${p}` : r?.ariaLabel ?? "Select model", _ = z(() => {
1335
+ ]), p = s?.displayName ?? s?.id, m = s?.displayVersion, h = p ? `${r?.ariaLabel ?? "Select model"}: ${p}` : r?.ariaLabel ?? "Select model", g = z(() => {
1331
1336
  if (u) return Array.from({ length: 7 }, (e, t) => ({
1332
1337
  key: `__loading-${t}`,
1333
- icon: /* @__PURE__ */ P(Ct, {}),
1334
- label: /* @__PURE__ */ P(wt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1338
+ icon: /* @__PURE__ */ F(Tt, {}),
1339
+ label: /* @__PURE__ */ F(Et, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1335
1340
  disabled: !0
1336
1341
  }));
1337
1342
  if (!e || e.length === 0) {
@@ -1343,19 +1348,19 @@ var H = {
1343
1348
  }] : [];
1344
1349
  }
1345
1350
  let o = i?.colors;
1346
- return Dt(e, a).map((e) => {
1351
+ return kt(e, a).map((e) => {
1347
1352
  let r = e.id === t;
1348
1353
  return {
1349
1354
  key: e.id,
1350
- label: /* @__PURE__ */ P(S, {
1351
- text: Et(e),
1355
+ label: /* @__PURE__ */ F(C, {
1356
+ text: Ot(e),
1352
1357
  query: a,
1353
1358
  maxLines: 1
1354
1359
  }),
1355
- icon: Ot(e.iconUrl, e.type, e.displayName ?? e.id),
1356
- mark: C.Check,
1360
+ icon: At(e.iconUrl, e.type, e.displayName ?? e.id),
1361
+ mark: w.Check,
1357
1362
  checked: r,
1358
- className: l(o?.itemText && kt.itemText, o?.itemHoverBackground && kt.itemHover, r && o?.selectedItemBackground && kt.selectedItemBackground, r && o?.selectedItemText && kt.selectedItemText, r && o?.checkIcon && kt.checkIcon, i?.itemClassName, r && i?.selectedItemClassName, H.modelMenuItem, r && H.modelMenuItemSelected),
1363
+ className: l(o?.itemText && jt.itemText, o?.itemHoverBackground && jt.itemHover, r && o?.selectedItemBackground && jt.selectedItemBackground, r && o?.selectedItemText && jt.selectedItemText, r && o?.checkIcon && jt.checkIcon, i?.itemClassName, r && i?.selectedItemClassName, H.modelMenuItem, r && H.modelMenuItemSelected),
1359
1364
  onClick: () => n?.(e.id)
1360
1365
  };
1361
1366
  });
@@ -1381,14 +1386,14 @@ var H = {
1381
1386
  selectorAriaLabel: h,
1382
1387
  selectedLabel: p,
1383
1388
  selectedVersion: m,
1384
- menuItems: _,
1385
- menuHeader: z(() => !u && e && e.length > 0 ? /* @__PURE__ */ P("div", {
1389
+ menuItems: g,
1390
+ menuHeader: z(() => !u && e && e.length > 0 ? /* @__PURE__ */ F("div", {
1386
1391
  style: c({ "--ms-search-header-bg": i?.colors?.searchHeaderBackground }),
1387
- className: l("sticky top-0 z-10 pb-1 pe-2 pt-2", kt.searchHeader, i?.searchHeaderClassName, H.modelMenuSearch),
1388
- children: /* @__PURE__ */ P(j, {
1392
+ className: l("sticky top-0 z-10 pe-2 pt-2 pb-1", jt.searchHeader, i?.searchHeaderClassName, H.modelMenuSearch),
1393
+ children: /* @__PURE__ */ F(j, {
1389
1394
  value: a,
1390
1395
  placeholder: r?.searchPlaceholder ?? "Search",
1391
- size: y.Small,
1396
+ size: b.Small,
1392
1397
  wrapperClassName: "border-0",
1393
1398
  onChange: (e) => o(e ?? "")
1394
1399
  })
@@ -1405,8 +1410,8 @@ var H = {
1405
1410
  e || o("");
1406
1411
  }
1407
1412
  };
1408
- }, jt = typeof window < "u" ? De : R;
1409
- function Mt(e) {
1413
+ }, Nt = typeof window < "u" ? Ae : R;
1414
+ function Pt(e) {
1410
1415
  if (e !== void 0) switch (typeof e) {
1411
1416
  case "number": return e;
1412
1417
  case "string":
@@ -1414,15 +1419,15 @@ function Mt(e) {
1414
1419
  break;
1415
1420
  }
1416
1421
  }
1417
- function Nt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1422
+ function Ft({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1418
1423
  let { styleHeight: s, styleWidth: c } = z(() => ({
1419
- styleHeight: Mt(o?.height),
1420
- styleWidth: Mt(o?.width)
1424
+ styleHeight: Pt(o?.height),
1425
+ styleWidth: Pt(o?.width)
1421
1426
  }), [o?.height, o?.width]), [l, u] = V({
1422
1427
  height: t,
1423
1428
  width: n
1424
1429
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1425
- return jt(() => {
1430
+ return Nt(() => {
1426
1431
  if (i === null || d) return;
1427
1432
  let t = new ResizeObserver((e) => {
1428
1433
  for (let t of e) {
@@ -1451,26 +1456,26 @@ function Nt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1451
1456
  c
1452
1457
  ]);
1453
1458
  }
1454
- function Pt(e) {
1459
+ function It(e) {
1455
1460
  let t = B(() => {
1456
1461
  throw Error("Cannot call during render.");
1457
1462
  });
1458
- return jt(() => {
1463
+ return Nt(() => {
1459
1464
  t.current = e;
1460
1465
  }, [e]), L((e) => t.current?.(e), [t]);
1461
1466
  }
1462
- var q = null;
1463
- function Ft(e = !1) {
1464
- if (q === null || e) {
1467
+ var Lt = null;
1468
+ function Rt(e = !1) {
1469
+ if (Lt === null || e) {
1465
1470
  let e = document.createElement("div"), t = e.style;
1466
1471
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
1467
1472
  let n = document.createElement("div"), r = n.style;
1468
- return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? q = "positive-descending" : (e.scrollLeft = 1, q = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), q;
1473
+ return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? Lt = "positive-descending" : (e.scrollLeft = 1, Lt = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), Lt;
1469
1474
  }
1470
- return q;
1475
+ return Lt;
1471
1476
  }
1472
- function It({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1473
- if (t === "horizontal" && n) switch (Ft()) {
1477
+ function J({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1478
+ if (t === "horizontal" && n) switch (Rt()) {
1474
1479
  case "negative": return -r;
1475
1480
  case "positive-descending":
1476
1481
  if (e) {
@@ -1481,26 +1486,26 @@ function It({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1481
1486
  }
1482
1487
  return r;
1483
1488
  }
1484
- function J(e, t = "Assertion error") {
1489
+ function Y(e, t = "Assertion error") {
1485
1490
  if (!e) throw console.error(t), Error(t);
1486
1491
  }
1487
- function Lt(e, t) {
1492
+ function X(e, t) {
1488
1493
  if (e === t) return !0;
1489
- if (!!e != !!t || (J(e !== void 0), J(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1494
+ if (!!e != !!t || (Y(e !== void 0), Y(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1490
1495
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
1491
1496
  return !0;
1492
1497
  }
1493
- function Y({ cachedBounds: e, itemCount: t, itemSize: n }) {
1498
+ function zt({ cachedBounds: e, itemCount: t, itemSize: n }) {
1494
1499
  if (t === 0) return 0;
1495
1500
  if (typeof n == "number") return t * n;
1496
1501
  {
1497
1502
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
1498
- return J(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1503
+ return Y(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1499
1504
  }
1500
1505
  }
1501
- function X({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1506
+ function Bt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1502
1507
  if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
1503
- let s = Y({
1508
+ let s = zt({
1504
1509
  cachedBounds: t,
1505
1510
  itemCount: r,
1506
1511
  itemSize: i
@@ -1512,7 +1517,7 @@ function X({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, con
1512
1517
  default: return a >= u && a <= l ? a : a < u ? u : l;
1513
1518
  }
1514
1519
  }
1515
- function Z({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1520
+ function Vt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1516
1521
  let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
1517
1522
  for (; u < a;) {
1518
1523
  let n = e.get(u);
@@ -1531,11 +1536,11 @@ function Z({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCo
1531
1536
  stopIndexOverscan: l
1532
1537
  };
1533
1538
  }
1534
- function Rt({ itemCount: e, itemProps: t, itemSize: n }) {
1539
+ function Z({ itemCount: e, itemProps: t, itemSize: n }) {
1535
1540
  let r = /* @__PURE__ */ new Map();
1536
1541
  return {
1537
1542
  get(i) {
1538
- for (J(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1543
+ for (Y(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1539
1544
  let e = r.size, a;
1540
1545
  switch (typeof n) {
1541
1546
  case "function":
@@ -1551,14 +1556,14 @@ function Rt({ itemCount: e, itemProps: t, itemSize: n }) {
1551
1556
  });
1552
1557
  else {
1553
1558
  let t = r.get(e - 1);
1554
- J(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1559
+ Y(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1555
1560
  scrollOffset: t.scrollOffset + t.size,
1556
1561
  size: a
1557
1562
  });
1558
1563
  }
1559
1564
  }
1560
1565
  let a = r.get(i);
1561
- return J(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1566
+ return Y(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1562
1567
  },
1563
1568
  set(e, t) {
1564
1569
  r.set(e, t);
@@ -1568,8 +1573,8 @@ function Rt({ itemCount: e, itemProps: t, itemSize: n }) {
1568
1573
  }
1569
1574
  };
1570
1575
  }
1571
- function zt({ itemCount: e, itemProps: t, itemSize: n }) {
1572
- return z(() => Rt({
1576
+ function Ht({ itemCount: e, itemProps: t, itemSize: n }) {
1577
+ return z(() => Z({
1573
1578
  itemCount: e,
1574
1579
  itemProps: t,
1575
1580
  itemSize: n
@@ -1579,11 +1584,11 @@ function zt({ itemCount: e, itemProps: t, itemSize: n }) {
1579
1584
  n
1580
1585
  ]);
1581
1586
  }
1582
- function Bt({ containerSize: e, itemSize: t }) {
1587
+ function Ut({ containerSize: e, itemSize: t }) {
1583
1588
  let n;
1584
1589
  switch (typeof t) {
1585
1590
  case "string":
1586
- J(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), J(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1591
+ Y(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Y(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1587
1592
  break;
1588
1593
  default:
1589
1594
  n = t;
@@ -1591,8 +1596,8 @@ function Bt({ containerSize: e, itemSize: t }) {
1591
1596
  }
1592
1597
  return n;
1593
1598
  }
1594
- function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1595
- let { height: u = n, width: d = n } = Nt({
1599
+ function Wt({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1600
+ let { height: u = n, width: d = n } = Ft({
1596
1601
  defaultHeight: r === "vertical" ? n : void 0,
1597
1602
  defaultWidth: r === "horizontal" ? n : void 0,
1598
1603
  element: e,
@@ -1601,11 +1606,11 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1601
1606
  }), f = B({
1602
1607
  height: 0,
1603
1608
  width: 0
1604
- }), p = r === "vertical" ? u : d, m = Bt({
1609
+ }), p = r === "vertical" ? u : d, m = Ut({
1605
1610
  containerSize: p,
1606
1611
  itemSize: s
1607
1612
  });
1608
- De(() => {
1613
+ Ae(() => {
1609
1614
  if (typeof c == "function") {
1610
1615
  let e = f.current;
1611
1616
  (e.height !== u || e.width !== d) && (c({
@@ -1618,11 +1623,11 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1618
1623
  c,
1619
1624
  d
1620
1625
  ]);
1621
- let h = zt({
1626
+ let h = Ht({
1622
1627
  itemCount: a,
1623
1628
  itemProps: o,
1624
1629
  itemSize: m
1625
- }), g = L((e) => h.get(e), [h]), [_, v] = V(() => Z({
1630
+ }), g = L((e) => h.get(e), [h]), [_, v] = V(() => Vt({
1626
1631
  cachedBounds: h,
1627
1632
  containerScrollOffset: 0,
1628
1633
  containerSize: p,
@@ -1633,7 +1638,7 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1633
1638
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1634
1639
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1635
1640
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1636
- }, C = L(() => Y({
1641
+ }, C = L(() => zt({
1637
1642
  cachedBounds: h,
1638
1643
  itemCount: a,
1639
1644
  itemSize: m
@@ -1641,9 +1646,9 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1641
1646
  h,
1642
1647
  a,
1643
1648
  m
1644
- ]), w = L((t) => Z({
1649
+ ]), w = L((t) => Vt({
1645
1650
  cachedBounds: h,
1646
- containerScrollOffset: It({
1651
+ containerScrollOffset: J({
1647
1652
  containerElement: e,
1648
1653
  direction: r,
1649
1654
  isRtl: i,
@@ -1661,19 +1666,19 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1661
1666
  a,
1662
1667
  l
1663
1668
  ]);
1664
- return jt(() => {
1669
+ return Nt(() => {
1665
1670
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1666
1671
  }, [
1667
1672
  e,
1668
1673
  r,
1669
1674
  w
1670
- ]), jt(() => {
1675
+ ]), Nt(() => {
1671
1676
  if (!e) return;
1672
1677
  let t = () => {
1673
1678
  v((t) => {
1674
- let { scrollLeft: n, scrollTop: o } = e, s = Z({
1679
+ let { scrollLeft: n, scrollTop: o } = e, s = Vt({
1675
1680
  cachedBounds: h,
1676
- containerScrollOffset: It({
1681
+ containerScrollOffset: J({
1677
1682
  containerElement: e,
1678
1683
  direction: r,
1679
1684
  isRtl: i,
@@ -1683,7 +1688,7 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1683
1688
  itemCount: a,
1684
1689
  overscanCount: l
1685
1690
  });
1686
- return Lt(s, t) ? t : s;
1691
+ return X(s, t) ? t : s;
1687
1692
  });
1688
1693
  };
1689
1694
  return e.addEventListener("scroll", t), () => {
@@ -1699,8 +1704,8 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1699
1704
  ]), {
1700
1705
  getCellBounds: g,
1701
1706
  getEstimatedSize: C,
1702
- scrollToIndex: Pt(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1703
- let s = X({
1707
+ scrollToIndex: It(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1708
+ let s = Bt({
1704
1709
  align: t,
1705
1710
  cachedBounds: h,
1706
1711
  containerScrollOffset: n,
@@ -1710,14 +1715,14 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1710
1715
  itemSize: m
1711
1716
  });
1712
1717
  if (e) {
1713
- if (s = It({
1718
+ if (s = J({
1714
1719
  containerElement: e,
1715
1720
  direction: r,
1716
1721
  isRtl: i,
1717
1722
  scrollOffset: s
1718
1723
  }), typeof e.scrollTo != "function") {
1719
1724
  let e = w(s);
1720
- Lt(_, e) || v(e);
1725
+ X(_, e) || v(e);
1721
1726
  }
1722
1727
  return s;
1723
1728
  }
@@ -1728,19 +1733,19 @@ function Q({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0
1728
1733
  stopIndexVisible: x
1729
1734
  };
1730
1735
  }
1731
- function Vt(e) {
1736
+ function Gt(e) {
1732
1737
  return z(() => e, Object.values(e));
1733
1738
  }
1734
- function Ht(e, t) {
1739
+ function Kt(e, t) {
1735
1740
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
1736
- return Lt(n, a) && Lt(r, o) && Lt(i, s);
1741
+ return X(n, a) && X(r, o) && X(i, s);
1737
1742
  }
1738
- function Ut(e) {
1743
+ function qt(e) {
1739
1744
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
1740
1745
  }
1741
- var Wt = "data-react-window-index";
1742
- function Gt({ 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 }) {
1743
- let m = Vt(u), h = z(() => we(s, Ht), [s]), [g, _] = V(null), v = Ut(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Q({
1746
+ var Jt = "data-react-window-index";
1747
+ function Yt({ 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 }) {
1748
+ let m = Gt(u), h = z(() => De(s, Kt), [s]), [g, _] = V(null), v = qt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Wt({
1744
1749
  containerElement: g,
1745
1750
  containerStyle: f,
1746
1751
  defaultContainerSize: n,
@@ -1751,7 +1756,7 @@ function Gt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1751
1756
  onResize: i,
1752
1757
  overscanCount: o
1753
1758
  });
1754
- Ee(r, () => ({
1759
+ ke(r, () => ({
1755
1760
  get element() {
1756
1761
  return g;
1757
1762
  },
@@ -1766,12 +1771,12 @@ function Gt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1766
1771
  top: r
1767
1772
  });
1768
1773
  }
1769
- }), [g, x]), jt(() => {
1774
+ }), [g, x]), Nt(() => {
1770
1775
  if (!g) return;
1771
1776
  let e = Array.from(g.children).filter((e, t) => {
1772
1777
  if (e.hasAttribute("aria-hidden")) return !1;
1773
1778
  let n = `${S + t}`;
1774
- return e.setAttribute(Wt, n), !0;
1779
+ return e.setAttribute(Jt, n), !0;
1775
1780
  });
1776
1781
  if (v) return l.observeRowElements(e);
1777
1782
  }, [
@@ -1799,7 +1804,7 @@ function Gt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1799
1804
  let e = [];
1800
1805
  if (c > 0) for (let t = S; t <= w; t++) {
1801
1806
  let n = y(t);
1802
- e.push(/* @__PURE__ */ Se(h, {
1807
+ e.push(/* @__PURE__ */ Te(h, {
1803
1808
  ...m,
1804
1809
  ariaAttributes: {
1805
1810
  "aria-posinset": t + 1,
@@ -1826,7 +1831,7 @@ function Gt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1826
1831
  m,
1827
1832
  S,
1828
1833
  w
1829
- ]), D = /* @__PURE__ */ P("div", {
1834
+ ]), D = /* @__PURE__ */ F("div", {
1830
1835
  "aria-hidden": !0,
1831
1836
  style: {
1832
1837
  height: b(),
@@ -1834,7 +1839,7 @@ function Gt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1834
1839
  zIndex: -1
1835
1840
  }
1836
1841
  });
1837
- return Se(d, {
1842
+ return Te(d, {
1838
1843
  role: "list",
1839
1844
  ...p,
1840
1845
  className: t,
@@ -1848,7 +1853,7 @@ function Gt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1848
1853
  }
1849
1854
  }, E, e, D);
1850
1855
  }
1851
- var Kt = {
1856
+ var Xt = {
1852
1857
  search: "_search_5skzl_1",
1853
1858
  divider: "_divider_5skzl_5",
1854
1859
  item: "_item_5skzl_9",
@@ -1857,42 +1862,42 @@ var Kt = {
1857
1862
  stateLabel: "_stateLabel_5skzl_27",
1858
1863
  itemSelectedBackground: "_itemSelectedBackground_5skzl_37",
1859
1864
  itemSelectedText: "_itemSelectedText_5skzl_41"
1860
- }, qt = 44, Jt = 8, Yt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, itemClassName: s, selectedItemClassName: c, hasSelectedBackground: u, hasSelectedText: d, onSelect: f }) => {
1861
- let p = r[e], h = Ot(p.iconUrl, p.type, p.displayName ?? p.id, g.SM), v = p.id === i;
1862
- return /* @__PURE__ */ P("div", {
1865
+ }, Zt = 44, Qt = 8, $t = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, itemClassName: s, selectedItemClassName: c, hasSelectedBackground: u, hasSelectedText: d, onSelect: f }) => {
1866
+ let p = r[e], h = At(p.iconUrl, p.type, p.displayName ?? p.id, _.SM), g = p.id === i;
1867
+ return /* @__PURE__ */ F("div", {
1863
1868
  style: t,
1864
1869
  ...n,
1865
- children: /* @__PURE__ */ P(m, {
1870
+ children: /* @__PURE__ */ F(m, {
1866
1871
  type: "button",
1867
- "aria-current": v ? "true" : void 0,
1868
- className: l(Kt.item, "h-full w-full gap-3 px-4", v && u && Kt.itemSelectedBackground, v && d && Kt.itemSelectedText, s, v && c, H.modelMenuItem, v && H.modelMenuItemSelected),
1869
- iconBefore: /* @__PURE__ */ P("span", {
1870
- className: Kt.itemIcon,
1872
+ "aria-current": g ? "true" : void 0,
1873
+ className: l(Xt.item, "h-full w-full gap-3 px-4", g && u && Xt.itemSelectedBackground, g && d && Xt.itemSelectedText, s, g && c, H.modelMenuItem, g && H.modelMenuItemSelected),
1874
+ iconBefore: /* @__PURE__ */ F("span", {
1875
+ className: Xt.itemIcon,
1871
1876
  children: h
1872
1877
  }),
1873
- label: /* @__PURE__ */ F("span", {
1878
+ label: /* @__PURE__ */ I("span", {
1874
1879
  className: "flex flex-1 items-center justify-between gap-2",
1875
- children: [/* @__PURE__ */ P(S, {
1880
+ children: [/* @__PURE__ */ F(C, {
1876
1881
  text: p.displayName ?? p.id,
1877
1882
  query: o,
1878
1883
  maxLines: 1,
1879
1884
  className: l(a, "min-w-0 flex-1 text-start")
1880
- }), v && /* @__PURE__ */ P(de, {
1881
- size: g.SM,
1882
- className: Kt.checkIcon,
1885
+ }), g && /* @__PURE__ */ F(me, {
1886
+ size: _.SM,
1887
+ className: Xt.checkIcon,
1883
1888
  "aria-hidden": !0,
1884
- stroke: _
1889
+ stroke: v
1885
1890
  })]
1886
1891
  }),
1887
1892
  onClick: () => f(p.id)
1888
1893
  })
1889
1894
  });
1890
- }, Xt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: s, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: g, menuStyles: _ }) => {
1891
- let [v, b] = V("");
1895
+ }, en = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: s, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: g, menuStyles: _ }) => {
1896
+ let [v, y] = V("");
1892
1897
  R(() => {
1893
- e || b("");
1898
+ e || y("");
1894
1899
  }, [e]);
1895
- let x = a && a.length > 0, S = u !== void 0, C = !x && !S ? d ?? f : void 0, w = x ? Dt(a, v) : [], T = (e) => {
1900
+ let x = a && a.length > 0, S = u !== void 0, C = !x && !S ? d ?? f : void 0, w = x ? kt(a, v) : [], T = (e) => {
1896
1901
  s(e), i();
1897
1902
  }, E = _?.colors, D = c({
1898
1903
  "--ci-sheet-divider": g?.divider,
@@ -1904,7 +1909,7 @@ var Kt = {
1904
1909
  "--ci-sheet-selected-bg": E?.selectedItemBackground,
1905
1910
  "--ci-sheet-selected-text": E?.selectedItemText
1906
1911
  });
1907
- return /* @__PURE__ */ P(U, {
1912
+ return /* @__PURE__ */ F(U, {
1908
1913
  isOpen: e,
1909
1914
  title: t,
1910
1915
  closeLabel: n,
@@ -1913,29 +1918,29 @@ var Kt = {
1913
1918
  titleClassName: m,
1914
1919
  className: l("max-h-[80dvh]", _?.className, H.modelMenu),
1915
1920
  colors: g?.shell,
1916
- children: /* @__PURE__ */ F("div", {
1921
+ children: /* @__PURE__ */ I("div", {
1917
1922
  className: "contents",
1918
1923
  style: D,
1919
- children: [x && !S && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("div", {
1924
+ children: [x && !S && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1920
1925
  style: c({ "--ci-sheet-search-bg": _?.colors?.searchHeaderBackground }),
1921
- className: l("flex-shrink-0 px-4 py-[10px]", Kt.search, _?.searchHeaderClassName, H.modelMenuSearch),
1922
- children: /* @__PURE__ */ P(j, {
1926
+ className: l("flex-shrink-0 px-4 py-[10px]", Xt.search, _?.searchHeaderClassName, H.modelMenuSearch),
1927
+ children: /* @__PURE__ */ F(j, {
1923
1928
  value: v,
1924
1929
  placeholder: r,
1925
- size: y.Standard,
1926
- onChange: (e) => b(e ?? "")
1930
+ size: b.Standard,
1931
+ onChange: (e) => y(e ?? "")
1927
1932
  })
1928
- }), /* @__PURE__ */ P("div", { className: l(Kt.divider, "h-px flex-shrink-0") })] }), S ? /* @__PURE__ */ P(Tt, { loadingLabel: u }) : C ? /* @__PURE__ */ P("div", {
1933
+ }), /* @__PURE__ */ F("div", { className: l(Xt.divider, "h-px flex-shrink-0") })] }), S ? /* @__PURE__ */ F(Dt, { loadingLabel: u }) : C ? /* @__PURE__ */ F("div", {
1929
1934
  role: "list",
1930
- className: l(Kt.stateLabel, h, "px-4 py-4"),
1935
+ className: l(Xt.stateLabel, h, "px-4 py-4"),
1931
1936
  children: C
1932
- }) : /* @__PURE__ */ P(Gt, {
1937
+ }) : /* @__PURE__ */ F(Yt, {
1933
1938
  role: "list",
1934
1939
  className: "overflow-y-auto",
1935
- style: { height: Math.min(w.length, Jt) * qt },
1936
- rowComponent: Yt,
1940
+ style: { height: Math.min(w.length, Qt) * Zt },
1941
+ rowComponent: $t,
1937
1942
  rowCount: w.length,
1938
- rowHeight: qt,
1943
+ rowHeight: Zt,
1939
1944
  rowProps: {
1940
1945
  items: w,
1941
1946
  selectedDeploymentId: o,
@@ -1950,8 +1955,8 @@ var Kt = {
1950
1955
  })]
1951
1956
  })
1952
1957
  });
1953
- }, Zt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, menuStyles: i, isStreaming: a, isMobile: o, isDisabled: c = !1, style: u, modelPickerOverlay: d, isPickerOpen: f, onPickerToggle: p, onPickerOpenChange: h }) => {
1954
- let [y, b] = V(!1), { selectorIcon: S, selectorAriaLabel: C, selectedLabel: w, selectedVersion: T, menuItems: E, menuHeader: D, menuStyle: ee, onOpenChange: O } = At({
1958
+ }, tn = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, menuStyles: i, isStreaming: a, isMobile: o, isDisabled: c = !1, style: u, modelPickerOverlay: d, isPickerOpen: f, onPickerToggle: p, onPickerOpenChange: h }) => {
1959
+ let [g, b] = V(!1), { selectorIcon: x, selectorAriaLabel: C, selectedLabel: w, selectedVersion: T, menuItems: E, menuHeader: D, menuStyle: ee, onOpenChange: te } = Mt({
1955
1960
  deployments: e,
1956
1961
  selectedDeploymentId: t,
1957
1962
  onDeploymentChange: n,
@@ -1959,37 +1964,37 @@ var Kt = {
1959
1964
  styles: i
1960
1965
  });
1961
1966
  if (!e) return null;
1962
- let k = a || c, A = k ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, j = /* @__PURE__ */ P(fe, {
1963
- size: g.SM,
1964
- className: l(K.modelSelectorCaret, H.modelSelectorCaret),
1967
+ let O = a || c, k = O ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, A = /* @__PURE__ */ F(he, {
1968
+ size: _.SM,
1969
+ className: l(q.modelSelectorCaret, H.modelSelectorCaret),
1965
1970
  "aria-hidden": !0,
1966
- stroke: _
1967
- }), te = /* @__PURE__ */ P("span", {
1971
+ stroke: v
1972
+ }), j = /* @__PURE__ */ F("span", {
1968
1973
  className: l("flex shrink-0 items-center", H.modelSelectorIcon),
1969
- children: S
1974
+ children: x
1970
1975
  });
1971
- if (o) return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(x, {
1976
+ if (o) return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(S, {
1972
1977
  tooltipProps: { tooltip: w },
1973
- icon: /* @__PURE__ */ F("div", {
1978
+ icon: /* @__PURE__ */ I("div", {
1974
1979
  className: "flex items-center gap-1",
1975
- children: [te, j]
1980
+ children: [j, A]
1976
1981
  }),
1977
1982
  "aria-label": C,
1978
- "aria-disabled": k || void 0,
1983
+ "aria-disabled": O || void 0,
1979
1984
  onClick: () => {
1980
- k || b(!0);
1985
+ O || b(!0);
1981
1986
  },
1982
- className: l("w-[50px]", K.modelSelectorButton, A, H.modelSelectorButton)
1983
- }), d ? /* @__PURE__ */ P(U, {
1984
- isOpen: y,
1987
+ className: l("w-[50px]", q.modelSelectorButton, k, H.modelSelectorButton)
1988
+ }), d ? /* @__PURE__ */ F(U, {
1989
+ isOpen: g,
1985
1990
  title: r?.ariaLabel ?? "Select model",
1986
1991
  closeLabel: r?.closeLabel ?? "Close",
1987
1992
  onClose: () => b(!1),
1988
1993
  style: u,
1989
1994
  className: l(i?.className, H.modelMenu),
1990
1995
  children: d(() => b(!1))
1991
- }) : /* @__PURE__ */ P(Xt, {
1992
- isOpen: y,
1996
+ }) : /* @__PURE__ */ F(en, {
1997
+ isOpen: g,
1993
1998
  title: r?.ariaLabel ?? "Select model",
1994
1999
  closeLabel: r?.closeLabel ?? "Close",
1995
2000
  searchPlaceholder: r?.searchPlaceholder ?? "Search",
@@ -2005,7 +2010,7 @@ var Kt = {
2005
2010
  })] });
2006
2011
  if (d) {
2007
2012
  let e = T ? `${w} · ${T}` : w;
2008
- return /* @__PURE__ */ P(v, {
2013
+ return /* @__PURE__ */ F(y, {
2009
2014
  placement: "top-end",
2010
2015
  matchReferenceWidth: !1,
2011
2016
  open: f,
@@ -2014,34 +2019,34 @@ var Kt = {
2014
2019
  outsideClosable: !0,
2015
2020
  renderOverlay: () => d(() => h?.(!1)),
2016
2021
  listClassName: l("!w-[368px] !bg-layer-raised", i?.className, H.modelMenu),
2017
- children: /* @__PURE__ */ P(m, {
2022
+ children: /* @__PURE__ */ F(m, {
2018
2023
  "aria-label": C,
2019
- "aria-disabled": k || void 0,
2024
+ "aria-disabled": O || void 0,
2020
2025
  tooltipProps: { tooltip: e },
2021
- className: l("h-auto min-w-0 gap-1.5 !rounded-full !border-0 px-0 py-1.5 pe-2 ps-1.5", K.modelSelectorButton, A, k && K.modelSelectorButtonDisabled, H.modelSelectorButton),
2026
+ className: l("h-auto min-w-0 gap-1.5 !rounded-full !border-0 px-0 py-1.5 ps-1.5 pe-2", q.modelSelectorButton, k, O && q.modelSelectorButtonDisabled, H.modelSelectorButton),
2022
2027
  onClick: () => {
2023
- k || p?.();
2028
+ O || p?.();
2024
2029
  },
2025
- iconBefore: te,
2026
- iconAfter: j,
2030
+ iconBefore: j,
2031
+ iconAfter: A,
2027
2032
  textClassName: "min-w-0",
2028
- label: /* @__PURE__ */ F("span", {
2029
- className: "flex min-w-0 max-w-[180px] items-baseline gap-1",
2030
- children: [/* @__PURE__ */ P("span", {
2031
- className: l("dial-small-text max-w-[180px] shrink-0 truncate", K.modelSelectorName),
2033
+ label: /* @__PURE__ */ I("span", {
2034
+ className: "flex max-w-[180px] min-w-0 items-baseline gap-1",
2035
+ children: [/* @__PURE__ */ F("span", {
2036
+ className: l("dial-small-text max-w-[180px] shrink-0 truncate", q.modelSelectorName),
2032
2037
  children: w
2033
- }), T && /* @__PURE__ */ P("span", {
2034
- className: l("dial-tiny-text min-w-0 truncate", K.modelSelectorVersion),
2038
+ }), T && /* @__PURE__ */ F("span", {
2039
+ className: l("dial-tiny-text min-w-0 truncate", q.modelSelectorVersion),
2035
2040
  children: T
2036
2041
  })]
2037
2042
  })
2038
2043
  })
2039
2044
  });
2040
2045
  }
2041
- return /* @__PURE__ */ P("div", {
2042
- className: l(A),
2043
- "aria-disabled": k || void 0,
2044
- children: /* @__PURE__ */ P(v, {
2046
+ return /* @__PURE__ */ F("div", {
2047
+ className: l(k),
2048
+ "aria-disabled": O || void 0,
2049
+ children: /* @__PURE__ */ F(y, {
2045
2050
  items: E,
2046
2051
  menuHeader: D,
2047
2052
  placement: "bottom-end",
@@ -2049,20 +2054,20 @@ var Kt = {
2049
2054
  maxDropdownHeight: s,
2050
2055
  listClassName: l("!w-[240px]", i?.className, H.modelMenu),
2051
2056
  listStyle: ee,
2052
- disabled: k,
2053
- onOpenChange: k ? void 0 : O,
2054
- children: /* @__PURE__ */ P(m, {
2057
+ disabled: O,
2058
+ onOpenChange: O ? void 0 : te,
2059
+ children: /* @__PURE__ */ F(m, {
2055
2060
  "aria-label": C,
2056
- "aria-disabled": k || void 0,
2061
+ "aria-disabled": O || void 0,
2057
2062
  tooltipProps: { tooltip: w },
2058
- iconBefore: te,
2059
- iconAfter: j,
2060
- className: l("h-auto gap-1 !rounded-full !border-0 p-1.5", K.modelSelectorButton, k && K.modelSelectorButtonDisabled, H.modelSelectorButton)
2063
+ iconBefore: j,
2064
+ iconAfter: A,
2065
+ className: l("h-auto gap-1 !rounded-full !border-0 p-1.5", q.modelSelectorButton, O && q.modelSelectorButtonDisabled, H.modelSelectorButton)
2061
2066
  })
2062
2067
  })
2063
2068
  });
2064
- }, Qt = Ce(({ message: e = "", messageRevision: t, focusRequestId: n, textInsertion: r, onSend: i, onUploadAttachment: a, onStop: o, isStreaming: s = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: y = "Attach file", fileAccept: S, addMenuTitle: C = "Add", menuTitle: w = "Menu", menuCloseLabel: T = "Close", removeLabel: E, retryLabel: D, uploadingLabel: ee, expandLabel: O, clickLabel: k, sendLabel: A, sendTooltip: j, emptyMessageTooltip: te, stopLabel: ne, micLabel: re = "Dictate", recordVoiceLabel: ie = "Record voice", stopRecordingLabel: ae, discardRecordingLabel: oe, colors: M, typography: I, attachmentTray: ce, modelMenu: ue, className: de, pendingDropFiles: fe = [], onDropFilesConsumed: pe, pendingAttachments: ge = [], onPendingAttachmentsConsumed: _e, pasteTextThreshold: ve = 4e3, maxMessageLength: ye = 5e4, deployments: be, selectedDeploymentId: xe, onDeploymentChange: Se, modelSelectorLabels: Ce, initialAttachments: we = [], hideAddButton: Te = !1, hideAttachFile: Oe = !1, hideActionBar: U = !1, actionRowLayout: ke = tt.Stacked, isInlineActionRowAllowedBelowDesktop: je = !1, renderFooterActions: Me, isInputDisabled: W = !1, isModelSelectorDisabled: Ne = !1, isSendDisabled: Ie = !1, isAudioMessageSupported: Le = !1, isVoiceRecordingSupported: Be = Le, onTranscribeAudio: Ve, transcribingLabel: Ge, voiceErrorLabel: Ye, sendOnEnter: Xe = et.Enter, prefixAttachments: Ze = [], onRemovePrefixAttachment: Qe, chatSettings: nt, toolsMenuItems: rt, onToolToggle: it, canRemoveTools: at = !0, toolsMenuTitle: ot, toolsBackLabel: st, toolsChipLabels: ct, menuOverlays: lt, activeMentions: ut, onBackspaceAtCaret: dt, caretPositionOverride: ft, commandMenu: G, autoFocus: mt = !1, messageHistory: gt, onDialFileSystemClick: _t, dialFileSystemLabel: vt, validateAttachment: yt, onAttachmentClick: Ct, modelPickerOverlay: wt, maximumAttachmentsAmount: Tt, onAttachmentsLimitExceeded: Et, isAttachmentsEnabled: Dt = !0, isTextAttachmentsAllowed: Ot = !0, usageLimitsSlot: kt, onMessageTooLong: At }, jt) => {
2065
- let Mt = d(), [Nt, Pt] = V(!1), q = Re(gt), Ft = ut ?? [], It = Ft.length > 0, J = z(() => c({
2069
+ }, nn = Ee(({ message: e = "", messageRevision: t, focusRequestId: n, textInsertion: r, onSend: i, onUploadAttachment: a, onStop: o, isStreaming: s = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: b, addMenuTitle: C = "Add", menuTitle: w = "Menu", menuCloseLabel: T = "Close", removeLabel: E, retryLabel: D, uploadingLabel: ee, expandLabel: te, clickLabel: O, sendLabel: k, sendTooltip: A, emptyMessageTooltip: j, stopLabel: ne, micLabel: re = "Dictate", recordVoiceLabel: ie = "Record voice", stopRecordingLabel: ae, discardRecordingLabel: oe, colors: M, typography: N, attachmentTray: ce, modelMenu: le, className: de, pendingDropFiles: fe = [], onDropFilesConsumed: pe, pendingAttachments: me = [], onPendingAttachmentsConsumed: he, pasteTextThreshold: ge = 4e3, maxMessageLength: ye = 5e4, deployments: be, selectedDeploymentId: xe, onDeploymentChange: Se, modelSelectorLabels: Ce, initialAttachments: we = [], hideAddButton: Te = !1, hideAttachFile: Ee = !1, hideActionBar: De = !1, actionRowLayout: Oe = it.Stacked, isInlineActionRowAllowedBelowDesktop: je = !1, renderFooterActions: U, isInputDisabled: W = !1, isModelSelectorDisabled: Ne = !1, isSendDisabled: Pe = !1, isAudioMessageSupported: Fe = !1, isVoiceRecordingSupported: Ie = Fe, onTranscribeAudio: ze, transcribingLabel: Be, voiceErrorLabel: Ue, sendOnEnter: We = rt.Enter, prefixAttachments: Je = [], onRemovePrefixAttachment: Qe, chatSettings: $e, toolsMenuItems: et, onToolToggle: tt, canRemoveTools: at = !0, toolsMenuTitle: ot, toolsBackLabel: st, toolsChipLabels: ct, menuOverlays: lt, activeMentions: ut, onBackspaceAtCaret: dt, caretPositionOverride: ft, commandMenu: G, autoFocus: pt = !1, messageHistory: mt, onDialFileSystemClick: K, dialFileSystemLabel: gt, validateAttachment: vt, onAttachmentClick: yt, modelPickerOverlay: bt, maximumAttachmentsAmount: xt, onAttachmentsLimitExceeded: Tt, isAttachmentsEnabled: Et = !0, isTextAttachmentsAllowed: Dt = !0, usageLimitsSlot: Ot, onMessageTooLong: kt }, At) => {
2070
+ let jt = d(), [Mt, Nt] = V(!1), Pt = Ve(mt), Ft = ut ?? [], It = Ft.length > 0, Lt = z(() => c({
2066
2071
  "--ci-bg": M?.background,
2067
2072
  "--ci-text": M?.text,
2068
2073
  "--ci-border": M?.border,
@@ -2080,40 +2085,40 @@ var Kt = {
2080
2085
  "--ci-mention-highlight-text": M?.mentionHighlightText,
2081
2086
  "--ci-mention-highlight-unsupported-bg": M?.mentionHighlightUnsupportedBg,
2082
2087
  "--ci-mention-highlight-unsupported-text": M?.mentionHighlightUnsupportedText
2083
- }), [M]), Lt = z(() => _t ? [{
2088
+ }), [M]), Rt = z(() => K ? [{
2084
2089
  key: "dial-fs",
2085
- label: vt ?? "DIAL file system",
2086
- icon: /* @__PURE__ */ P(me, {
2090
+ label: gt ?? "DIAL file system",
2091
+ icon: /* @__PURE__ */ F(_e, {
2087
2092
  size: f,
2088
2093
  "aria-hidden": !0,
2089
- stroke: _
2094
+ stroke: v
2090
2095
  }),
2091
- onClick: _t
2092
- }] : [], [_t, vt]), { message: Y, setMessage: X, textareaRef: Z } = Ue({
2096
+ onClick: K
2097
+ }] : [], [K, gt]), { message: J, setMessage: Y, textareaRef: X } = Ke({
2093
2098
  messageProp: e,
2094
2099
  messageRevision: t
2095
2100
  });
2096
2101
  R(() => {
2097
- n !== void 0 && Z.current?.focus();
2098
- }, [n, Z]), Ee(jt, () => ({ getCaretPosition: () => Z.current?.selectionStart ?? Y.length }), [Y, Z]);
2099
- let { handleUndoKeyDown: Rt } = Ke({
2102
+ n !== void 0 && X.current?.focus();
2103
+ }, [n, X]), ke(At, () => ({ getCaretPosition: () => X.current?.selectionStart ?? J.length }), [J, X]);
2104
+ let { handleUndoKeyDown: zt } = Ye({
2100
2105
  insertion: r,
2101
- textareaRef: Z
2102
- }), { isMenuOpen: zt, query: Bt, activeWordStart: Q, dismiss: Vt, closeOnOutsidePress: Ht, handleCaretMove: Ut, handleValueChange: Wt, listboxId: Gt, overlayRef: Kt, activeOptionId: qt, moveActiveOption: Jt, getActiveOption: Yt } = Fe({
2106
+ textareaRef: X
2107
+ }), { isMenuOpen: Bt, query: Vt, activeWordStart: Z, dismiss: Ht, closeOnOutsidePress: Ut, handleCaretMove: Wt, handleValueChange: Gt, listboxId: Kt, overlayRef: qt, activeOptionId: Jt, moveActiveOption: Yt, getActiveOption: Xt } = Re({
2103
2108
  config: G,
2104
- message: Y
2105
- }), Xt = B(Ut);
2106
- Xt.current = Ut;
2109
+ message: J
2110
+ }), Zt = B(Wt);
2111
+ Zt.current = Wt;
2107
2112
  let Qt = () => {
2108
- Ut(Z.current?.selectionStart ?? Y.length);
2113
+ Wt(X.current?.selectionStart ?? J.length);
2109
2114
  }, $t = () => {
2110
2115
  requestAnimationFrame(() => {
2111
- let e = Z.current;
2112
- Xt.current(e?.selectionStart ?? e?.value.length ?? 0);
2116
+ let e = X.current;
2117
+ Zt.current(e?.selectionStart ?? e?.value.length ?? 0);
2113
2118
  });
2114
2119
  }, en = (e) => {
2115
- e.key !== "ArrowLeft" && e.key !== "ArrowRight" && e.key !== "Home" && e.key !== "End" && e.key !== "PageUp" && e.key !== "PageDown" || Ut(e.currentTarget.selectionStart ?? Y.length);
2116
- }, tn = G?.emptyQueryHint != null, nn = G != null && Q != null ? Q + G.triggerPrefix.length : null, rn = nn != null && Y.slice(nn).split("\n", 1)[0] !== "", an = tn && zt && Bt === "" && nn != null && !rn, on = G != null && zt ? Q ?? 0 : null, sn = B(null), cn = B(null), [ln, un] = V(null), dn = L(() => {
2120
+ e.key !== "ArrowLeft" && e.key !== "ArrowRight" && e.key !== "Home" && e.key !== "End" && e.key !== "PageUp" && e.key !== "PageDown" || Wt(e.currentTarget.selectionStart ?? J.length);
2121
+ }, nn = G?.emptyQueryHint != null, rn = G != null && Z != null ? Z + G.triggerPrefix.length : null, an = rn != null && J.slice(rn).split("\n", 1)[0] !== "", on = nn && Bt && Vt === "" && rn != null && !an, Q = G != null && Bt ? Z ?? 0 : null, sn = B(null), cn = B(null), [ln, un] = V(null), dn = L(() => {
2117
2122
  let e = sn.current, t = cn.current;
2118
2123
  if (e == null || t == null) {
2119
2124
  un(null);
@@ -2126,86 +2131,87 @@ var Kt = {
2126
2131
  });
2127
2132
  }, []);
2128
2133
  R(() => {
2129
- if (on == null) return;
2130
- let e = Z.current;
2134
+ if (Q == null) return;
2135
+ let e = X.current;
2131
2136
  if (e == null || typeof ResizeObserver > "u") return;
2132
2137
  let t = new ResizeObserver(dn);
2133
2138
  return t.observe(e), () => t.disconnect();
2134
2139
  }, [
2135
- on,
2136
- Z,
2140
+ Q,
2141
+ X,
2137
2142
  dn
2138
2143
  ]);
2139
2144
  let fn = L((e) => {
2140
- if (G == null || (Vt(), !e?.consumeQuery) || (e.returnFocus !== !1 && Z.current?.focus(), Q == null)) return;
2141
- let t = `${G.triggerPrefix}${Bt}`, n = Q + t.length;
2142
- if (Y.slice(Q, n) !== t) return;
2143
- let r = Y.slice(0, Q) + Y.slice(n);
2144
- X(r), q.notifyChange(), u?.(r);
2145
+ if (G == null || (Ht(), !e?.consumeQuery) || (e.returnFocus !== !1 && X.current?.focus(), Z == null)) return;
2146
+ let t = `${G.triggerPrefix}${Vt}`, n = Z + t.length;
2147
+ if (J.slice(Z, n) !== t) return;
2148
+ let r = J.slice(0, Z) + J.slice(n);
2149
+ Y(r), Pt.notifyChange(), u?.(r);
2145
2150
  }, [
2146
2151
  G,
2152
+ Ht,
2147
2153
  Vt,
2148
- Bt,
2154
+ J,
2155
+ Z,
2149
2156
  Y,
2150
- Q,
2151
- X,
2152
- q,
2157
+ Pt,
2153
2158
  u,
2154
- Z
2159
+ X
2155
2160
  ]), pn = B(void 0);
2156
2161
  R(() => {
2157
- ft == null || pn.current === t || (pn.current = t, Z.current?.setSelectionRange(ft, ft), Ut(ft));
2158
- }, [Y]);
2159
- let { attachments: mn, buildAttachments: hn, addAttachments: gn, resetAttachments: _n, handleRemove: vn, handleRetry: yn, handleExpand: bn, hasBlockedAttachments: xn } = Ae({
2162
+ ft == null || pn.current === t || (pn.current = t, X.current?.setSelectionRange(ft, ft), Wt(ft));
2163
+ }, [J]);
2164
+ let mn = B(J);
2165
+ mn.current = J;
2166
+ let { attachments: hn, buildAttachments: gn, addAttachments: _n, resetAttachments: vn, handleRemove: yn, handleRetry: bn, handleExpand: xn, hasBlockedAttachments: Sn } = Me({
2160
2167
  initialAttachments: we,
2161
2168
  onUploadAttachment: a,
2162
2169
  onAttachmentsChange: p,
2163
- validateAttachment: yt,
2170
+ validateAttachment: vt,
2164
2171
  pendingDropFiles: fe,
2165
2172
  onDropFilesConsumed: pe,
2166
2173
  isDropDisabled: W,
2167
- pendingAttachments: ge,
2168
- onPendingAttachmentsConsumed: _e,
2174
+ pendingAttachments: me,
2175
+ onPendingAttachmentsConsumed: he,
2169
2176
  onExpandPastedText: L((e) => {
2170
- X((t) => t ? `${t}\n${e}` : e);
2171
- }, [X]),
2172
- maximumAttachmentsAmount: Tt,
2173
- baseAttachmentsAmount: Ze.length,
2174
- onAttachmentsLimitExceeded: Et
2175
- }), Sn = L((e) => {
2176
- gn(hn([e]));
2177
- }, [gn, hn]), Cn = B(!1), wn = B(Y);
2178
- wn.current = Y;
2179
- let [Tn, En] = V({
2177
+ let t = mn.current, n = t ? `${t}\n${e}` : e;
2178
+ mn.current = n, Y(n), u?.(n);
2179
+ }, [Y, u]),
2180
+ maximumAttachmentsAmount: xt,
2181
+ baseAttachmentsAmount: Je.length,
2182
+ onAttachmentsLimitExceeded: Tt
2183
+ }), Cn = L((e) => {
2184
+ _n(gn([e]));
2185
+ }, [_n, gn]), wn = B(!1), [Tn, En] = V({
2180
2186
  text: "",
2181
2187
  revision: 0
2182
- }), { state: Dn, analyserNodeRef: On, errorMessage: kn, startRecording: An, stopRecording: jn, discardRecording: Mn } = $e({
2183
- onAttachAudio: Sn,
2184
- onTranscribeAudio: Ve,
2188
+ }), { state: Dn, analyserNodeRef: On, errorMessage: kn, startRecording: An, stopRecording: jn, discardRecording: Mn } = nt({
2189
+ onAttachAudio: Cn,
2190
+ onTranscribeAudio: ze,
2185
2191
  onTranscript: L((e) => {
2186
2192
  let t = e.trim();
2187
2193
  if (t) {
2188
- let e = wn.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
2189
- wn.current = n, X(n), En((e) => ({
2194
+ let e = mn.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
2195
+ mn.current = n, Y(n), En((e) => ({
2190
2196
  text: t,
2191
2197
  revision: e.revision + 1
2192
- })), q.notifyChange(), u?.(n);
2198
+ })), Pt.notifyChange(), u?.(n);
2193
2199
  }
2194
- Cn.current = !0;
2200
+ wn.current = !0;
2195
2201
  }, [
2196
- X,
2197
- q,
2202
+ Y,
2203
+ Pt,
2198
2204
  u
2199
2205
  ]),
2200
- errorLabel: Ye
2201
- }), $ = Dn === qe.Recording || Dn === qe.Processing;
2206
+ errorLabel: Ue
2207
+ }), $ = Dn === Xe.Recording || Dn === Xe.Processing;
2202
2208
  R(() => {
2203
- (Dn === qe.Error || Dn === qe.Idle && Cn.current) && (Cn.current = !1, Z.current?.focus());
2204
- }, [Dn, Z]);
2205
- let Nn = B(null), Pn = B(null), Fn = Dt && Ot, { handlePaste: In } = le(gn, Fn ? ve : Infinity), Ln = L((e) => {
2209
+ (Dn === Xe.Error || Dn === Xe.Idle && wn.current) && (wn.current = !1, X.current?.focus());
2210
+ }, [Dn, X]);
2211
+ let Nn = B(null), Pn = B(null), Fn = Et && Dt, { handlePaste: In } = ue(_n, Fn ? ge : Infinity), Ln = L((e) => {
2206
2212
  if (!Fn) {
2207
2213
  let t = e.clipboardData.getData("text/plain");
2208
- t.length >= ye && At?.(t.length, ye);
2214
+ t.length >= ye && kt?.(t.length, ye);
2209
2215
  }
2210
2216
  if (In(e), e.defaultPrevented) return;
2211
2217
  let t = e.clipboardData.getData("text/plain").replace(/\r\n?/g, "\n");
@@ -2213,51 +2219,51 @@ var Kt = {
2213
2219
  }, [
2214
2220
  Fn,
2215
2221
  ye,
2216
- At,
2222
+ kt,
2217
2223
  In,
2218
2224
  G
2219
- ]), Rn = Y.trim().length > 0 || mn.length > 0, zn = Rn && !xn && !Ie && !$, [Bn, Vn] = V([]);
2225
+ ]), Rn = J.trim().length > 0 || hn.length > 0, zn = Rn && !Sn && !Pe && !$, [Bn, Vn] = V([]);
2220
2226
  R(() => {
2221
2227
  Vn([]);
2222
- }, [(rt ?? []).map((e) => e.id).join("|")]);
2228
+ }, [(et ?? []).map((e) => e.id).join("|")]);
2223
2229
  let Hn = z(() => {
2224
- let e = rt ?? [];
2230
+ let e = et ?? [];
2225
2231
  return at ? e.filter((e) => e.isSelected || !Bn.includes(e.id)) : e;
2226
2232
  }, [
2227
- rt,
2233
+ et,
2228
2234
  Bn,
2229
2235
  at
2230
2236
  ]), Un = L((e) => {
2231
- Vn((t) => t.includes(e) ? t : [...t, e]), rt?.find((t) => t.id === e)?.isSelected && it?.(e);
2232
- }, [rt, it]), Wn = be === void 0 || xe != null, Gn = Le && !s, Kn = async () => {
2233
- if (Ie || $) return;
2234
- if (Y.length >= ye) {
2235
- At?.(Y.length, ye);
2237
+ Vn((t) => t.includes(e) ? t : [...t, e]), et?.find((t) => t.id === e)?.isSelected && tt?.(e);
2238
+ }, [et, tt]), Wn = be === void 0 || xe != null, Gn = Fe && !s, Kn = async () => {
2239
+ if (Pe || $) return;
2240
+ if (J.length >= ye) {
2241
+ kt?.(J.length, ye);
2236
2242
  return;
2237
2243
  }
2238
- let e = Y, t = mn;
2239
- X(""), q.reset();
2244
+ let e = J, t = hn;
2245
+ Y(""), Pt.reset();
2240
2246
  try {
2241
2247
  await i?.(e, t), t.forEach((e) => {
2242
2248
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
2243
- }), _n([]);
2249
+ }), vn([]);
2244
2250
  } catch {
2245
- X(e), _n(t);
2251
+ Y(e), vn(t);
2246
2252
  }
2247
- }, qn = (e) => Xe === et.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey, Jn = (e) => {
2248
- if (!zt || e.nativeEvent.isComposing) return !1;
2249
- if (e.key === "Escape") return e.preventDefault(), e.stopPropagation(), Vt(), !0;
2250
- if (e.key === "ArrowDown" || e.key === "ArrowUp") return e.preventDefault(), Jt(e.key === "ArrowDown" ? Pe.Next : Pe.Previous), !0;
2253
+ }, qn = (e) => We === rt.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey, Jn = (e) => {
2254
+ if (!Bt || e.nativeEvent.isComposing) return !1;
2255
+ if (e.key === "Escape") return e.preventDefault(), e.stopPropagation(), Ht(), !0;
2256
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") return e.preventDefault(), Yt(e.key === "ArrowDown" ? Le.Next : Le.Previous), !0;
2251
2257
  if (e.key !== "Enter" || e.shiftKey) return !1;
2252
- let t = Yt();
2258
+ let t = Xt();
2253
2259
  return t == null ? qn(e) ? (e.preventDefault(), !0) : !1 : (e.preventDefault(), t.click(), !0);
2254
2260
  }, Yn = (e) => {
2255
- if (!$ && !Rt(e) && !Jn(e)) {
2261
+ if (!$ && !zt(e) && !Jn(e)) {
2256
2262
  if (!e.nativeEvent.isComposing && !W && !s) {
2257
2263
  if (e.key === "ArrowUp" || e.key === "ArrowDown") {
2258
- let t = e.currentTarget.selectionStart ?? 0, n = q.navigate(e.key === "ArrowUp" ? "up" : "down", Y, t);
2264
+ let t = e.currentTarget.selectionStart ?? 0, n = Pt.navigate(e.key === "ArrowUp" ? "up" : "down", J, t);
2259
2265
  if (n !== null) {
2260
- e.preventDefault(), X(n);
2266
+ e.preventDefault(), Y(n);
2261
2267
  return;
2262
2268
  }
2263
2269
  }
@@ -2266,7 +2272,7 @@ var Kt = {
2266
2272
  if (t != null) {
2267
2273
  e.preventDefault();
2268
2274
  let n = e.currentTarget;
2269
- n.setSelectionRange(t.start, t.start + t.length), typeof document.execCommand == "function" && document.execCommand("delete", !1) || We(n, Y.slice(0, t.start) + Y.slice(t.start + t.length), t.start);
2275
+ n.setSelectionRange(t.start, t.start + t.length), typeof document.execCommand == "function" && document.execCommand("delete", !1) || qe(n, J.slice(0, t.start) + J.slice(t.start + t.length), t.start);
2270
2276
  return;
2271
2277
  }
2272
2278
  }
@@ -2276,56 +2282,56 @@ var Kt = {
2276
2282
  }, Xn = (e) => {
2277
2283
  let t = Array.from(e.target.files ?? []);
2278
2284
  if (t.length === 0) return;
2279
- let n = hn(t);
2280
- e.target.value = "", gn(n);
2285
+ let n = gn(t);
2286
+ e.target.value = "", _n(n);
2281
2287
  }, Zn = z(() => {
2282
2288
  let e = [];
2283
- return on != null && e.push({
2284
- offset: on,
2285
- node: /* @__PURE__ */ P("span", {
2289
+ return Q != null && e.push({
2290
+ offset: Q,
2291
+ node: /* @__PURE__ */ F("span", {
2286
2292
  ref: sn,
2287
2293
  "aria-hidden": !0,
2288
2294
  className: "inline-block h-[1lh] w-0 align-text-top"
2289
2295
  }, "caret-marker")
2290
- }), an && G != null && nn != null && e.push({
2291
- offset: nn,
2292
- node: /* @__PURE__ */ P("span", {
2293
- className: K.commandHint,
2296
+ }), on && G != null && rn != null && e.push({
2297
+ offset: rn,
2298
+ node: /* @__PURE__ */ F("span", {
2299
+ className: q.commandHint,
2294
2300
  "aria-hidden": !0,
2295
2301
  "data-mirror-synthetic": !0,
2296
2302
  children: G.emptyQueryHint
2297
2303
  }, "command-hint")
2298
2304
  }), e;
2299
2305
  }, [
2306
+ Q,
2300
2307
  on,
2301
- an,
2302
2308
  G,
2303
- nn
2304
- ]), Qn = It || Zn.length > 0, { mirrorRef: $n, selectionRects: er, updateSelectionRects: tr, syncMirrorToTextarea: nr } = He({
2305
- textareaRef: Z,
2306
- message: Y,
2309
+ rn
2310
+ ]), Qn = It || Zn.length > 0, { mirrorRef: $n, selectionRects: er, updateSelectionRects: tr, syncMirrorToTextarea: nr } = Ge({
2311
+ textareaRef: X,
2312
+ message: J,
2307
2313
  isMirrorActive: Qn
2308
2314
  });
2309
- De(() => {
2315
+ Ae(() => {
2310
2316
  dn();
2311
2317
  }, [
2312
2318
  dn,
2313
- on,
2314
- Y
2319
+ Q,
2320
+ J
2315
2321
  ]);
2316
- let rr = /* @__PURE__ */ P("textarea", {
2317
- className: l(K.textarea, Qn && K.textareaMentionMode, I?.fontClassName || "dial-body-paragraph-text", "relative z-0 max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent pe-1 ps-1 outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2318
- ref: Z,
2319
- autoFocus: mt,
2320
- value: Y,
2322
+ let rr = /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("textarea", {
2323
+ className: l(q.textarea, Qn && q.textareaMentionMode, N?.fontClassName || "dial-body-paragraph-text", "relative z-0 [field-sizing:content] max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent ps-1 pe-1 outline-hidden", "disabled:cursor-not-allowed"),
2324
+ ref: X,
2325
+ autoFocus: pt,
2326
+ value: J,
2321
2327
  onChange: (e) => {
2322
- X(e.target.value), q.notifyChange();
2328
+ Y(e.target.value), Pt.notifyChange();
2323
2329
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
2324
- Wt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), u?.(e.target.value);
2330
+ Gt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), u?.(e.target.value);
2325
2331
  },
2326
2332
  onSelect: tr,
2327
2333
  onScroll: () => {
2328
- nr(), on != null && dn();
2334
+ nr(), Q != null && dn();
2329
2335
  },
2330
2336
  onFocus: $t,
2331
2337
  onClick: Qt,
@@ -2335,53 +2341,53 @@ var Kt = {
2335
2341
  placeholder: m,
2336
2342
  "aria-label": h,
2337
2343
  "aria-autocomplete": G == null ? void 0 : "list",
2338
- "aria-controls": zt ? Gt : void 0,
2339
- "aria-activedescendant": qt ?? void 0,
2344
+ "aria-controls": Bt ? Kt : void 0,
2345
+ "aria-activedescendant": Jt ?? void 0,
2340
2346
  "aria-hidden": It ? !0 : void 0,
2341
2347
  disabled: W,
2342
2348
  readOnly: $,
2343
2349
  rows: 1
2344
- }), ir = G == null ? rr : /* @__PURE__ */ F(N, { children: [rr, /* @__PURE__ */ P("div", {
2350
+ }), G != null && /* @__PURE__ */ F("div", {
2345
2351
  "aria-hidden": !0,
2346
- className: l("pointer-events-none absolute", I?.fontClassName || "dial-body-paragraph-text"),
2352
+ className: l("pointer-events-none absolute", N?.fontClassName || "dial-body-paragraph-text"),
2347
2353
  style: {
2348
2354
  left: ln?.left ?? 0,
2349
2355
  top: ln?.top ?? 0
2350
2356
  },
2351
- children: /* @__PURE__ */ P(v, {
2352
- open: zt,
2357
+ children: /* @__PURE__ */ F(y, {
2358
+ open: Bt,
2353
2359
  onOpenChange: (e) => {
2354
- e || Ht();
2360
+ e || Ut();
2355
2361
  },
2356
2362
  placement: "top-start",
2357
2363
  trigger: [],
2358
2364
  initialFocus: -1,
2359
2365
  matchReferenceWidth: !1,
2360
- outsidePressIgnoreRef: Z,
2361
- renderOverlay: () => /* @__PURE__ */ P("div", {
2362
- ref: Kt,
2366
+ outsidePressIgnoreRef: X,
2367
+ renderOverlay: () => /* @__PURE__ */ F("div", {
2368
+ ref: qt,
2363
2369
  role: G.menuLabel == null ? void 0 : "group",
2364
2370
  "aria-label": G.menuLabel,
2365
2371
  children: G.renderMenu({
2366
- query: Bt,
2367
- caretPosition: Q ?? 0,
2372
+ query: Vt,
2373
+ caretPosition: Z ?? 0,
2368
2374
  close: fn,
2369
- listboxId: Gt,
2370
- activeOptionId: qt
2375
+ listboxId: Kt,
2376
+ activeOptionId: Jt
2371
2377
  })
2372
2378
  }),
2373
- children: /* @__PURE__ */ P("span", {
2379
+ children: /* @__PURE__ */ F("span", {
2374
2380
  "aria-hidden": !0,
2375
2381
  className: "inline-block h-[1lh] w-0"
2376
2382
  })
2377
2383
  })
2378
- })] }), ar = /* @__PURE__ */ F("div", {
2384
+ })] }), ir = /* @__PURE__ */ I("div", {
2379
2385
  ref: cn,
2380
- className: "relative -me-1 -ms-1 w-[calc(100%+8px)]",
2381
- children: [Qn && /* @__PURE__ */ F("div", {
2386
+ className: "relative -ms-1 -me-1 w-[calc(100%+8px)]",
2387
+ children: [Qn && /* @__PURE__ */ I("div", {
2382
2388
  ref: $n,
2383
- className: l(K.textarea, I?.fontClassName || "dial-body-paragraph-text", "pointer-events-none absolute inset-0 z-10 max-h-[272px] w-full overflow-hidden whitespace-pre-wrap pe-1 ps-1 [overflow-wrap:anywhere]"),
2384
- children: [ze(Y, Ft, Zn, K.mentionHighlight, K.mentionHighlightUnsupported), er.map((e, t) => /* @__PURE__ */ P("div", {
2389
+ className: l(q.textarea, N?.fontClassName || "dial-body-paragraph-text", "pointer-events-none absolute inset-0 z-10 max-h-[272px] w-full overflow-hidden ps-1 pe-1 [overflow-wrap:anywhere] whitespace-pre-wrap"),
2390
+ children: [He(J, Ft, Zn, q.mentionHighlight, q.mentionHighlightUnsupported), er.map((e, t) => /* @__PURE__ */ F("div", {
2385
2391
  "aria-hidden": !0,
2386
2392
  className: "pointer-events-none absolute rounded-sm bg-control-accent-alpha-active",
2387
2393
  style: {
@@ -2391,33 +2397,33 @@ var Kt = {
2391
2397
  height: e.height
2392
2398
  }
2393
2399
  }, `selection-${t}`))]
2394
- }), ir]
2395
- }), or = Te ? void 0 : /* @__PURE__ */ P(pt, {
2396
- onAttachClick: Oe ? void 0 : () => Nn.current?.click(),
2397
- attachLabel: y,
2400
+ }), rr]
2401
+ }), ar = Te ? void 0 : /* @__PURE__ */ F(ht, {
2402
+ onAttachClick: Ee ? void 0 : () => Nn.current?.click(),
2403
+ attachLabel: g,
2398
2404
  addMenuTitle: C,
2399
2405
  menuTitle: w,
2400
2406
  menuCloseLabel: T,
2401
- style: J,
2407
+ style: Lt,
2402
2408
  isDisabled: W || $,
2403
- chatSettings: nt,
2404
- extraMenuItems: Lt,
2405
- onRecordVoice: Be && Dt && !s && !$ ? () => An(Je.Attachment) : void 0,
2409
+ chatSettings: $e,
2410
+ extraMenuItems: Rt,
2411
+ onRecordVoice: Ie && Et && !s && !$ ? () => An(Ze.Attachment) : void 0,
2406
2412
  recordVoiceLabel: ie,
2407
- toolsMenuItems: at ? rt : void 0,
2408
- onToolToggle: it,
2413
+ toolsMenuItems: at ? et : void 0,
2414
+ onToolToggle: tt,
2409
2415
  toolsMenuTitle: ot,
2410
2416
  toolsBackLabel: st,
2411
2417
  menuOverlays: lt,
2412
- getCaretPosition: () => Z.current?.selectionStart ?? Y.length
2413
- }), sr = ke === tt.Inline && (!Mt || je), cr = or && /* @__PURE__ */ P("div", {
2418
+ getCaretPosition: () => X.current?.selectionStart ?? J.length
2419
+ }), or = Oe === it.Inline && (!jt || je), sr = ar && /* @__PURE__ */ F("div", {
2414
2420
  className: l("flex", H.addCluster),
2415
- children: or
2416
- }), lr = Hn.length > 0 && it != null && /* @__PURE__ */ P("div", {
2421
+ children: ar
2422
+ }), cr = Hn.length > 0 && tt != null && /* @__PURE__ */ F("div", {
2417
2423
  className: l("min-w-0 flex-1", H.toolsChips),
2418
- children: /* @__PURE__ */ P(ht, {
2424
+ children: /* @__PURE__ */ F(_t, {
2419
2425
  items: Hn,
2420
- onToolToggle: it,
2426
+ onToolToggle: tt,
2421
2427
  onToolDismiss: Un,
2422
2428
  canRemove: at,
2423
2429
  removeLabel: ct?.removeLabel,
@@ -2425,184 +2431,187 @@ var Kt = {
2425
2431
  stateOffLabel: ct?.stateOffLabel
2426
2432
  })
2427
2433
  });
2428
- return /* @__PURE__ */ F("div", {
2434
+ return /* @__PURE__ */ I("div", {
2429
2435
  ref: Pn,
2430
- style: J,
2431
- className: l(K.wrapper, W && K.wrapperDisabled, W && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "p-4 focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", de, H.wrapper),
2436
+ style: Lt,
2437
+ className: l(q.wrapper, W && q.wrapperDisabled, W && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "p-4 focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", de, H.wrapper),
2432
2438
  children: [
2433
- (Ze.length > 0 || mn.length > 0) && /* @__PURE__ */ P(se, {
2434
- attachments: [...Ze, ...mn],
2439
+ (Je.length > 0 || hn.length > 0) && /* @__PURE__ */ F(se, {
2440
+ attachments: [...Je, ...hn],
2435
2441
  onRemove: (e) => {
2436
- Ze.some((t) => t.id === e) ? Qe?.(e) : vn(e);
2442
+ Je.some((t) => t.id === e) ? Qe?.(e) : yn(e);
2437
2443
  },
2438
- onRetry: yn,
2439
- onExpand: bn,
2444
+ onRetry: bn,
2445
+ onExpand: xn,
2440
2446
  labels: {
2441
2447
  removeLabel: E,
2442
2448
  retryLabel: D,
2443
2449
  uploadingLabel: ee,
2444
- expandLabel: O,
2445
- clickLabel: k
2450
+ expandLabel: te,
2451
+ clickLabel: O
2446
2452
  },
2447
2453
  styles: {
2448
2454
  ...ce,
2449
- className: l(mn.length > 6 && "-me-4 w-[calc(100%+1rem)]", ce?.className)
2455
+ className: l(hn.length > 6 && "-me-4", ce?.className)
2450
2456
  },
2451
- onAttachmentClick: Ct == null ? void 0 : (e) => {
2452
- let t = [...Ze, ...mn].find((t) => t.id === e);
2453
- t != null && Ct(t);
2457
+ onAttachmentClick: yt == null ? void 0 : (e) => {
2458
+ let t = [...Je, ...hn].find((t) => t.id === e);
2459
+ t != null && yt(t);
2454
2460
  }
2455
2461
  }),
2456
- !Te && /* @__PURE__ */ P("input", {
2462
+ !Te && /* @__PURE__ */ F("input", {
2457
2463
  ref: Nn,
2458
2464
  type: "file",
2459
2465
  multiple: !0,
2460
- accept: S,
2466
+ accept: b,
2461
2467
  className: "sr-only",
2462
2468
  "aria-hidden": !0,
2463
2469
  tabIndex: -1,
2464
2470
  onChange: Xn
2465
2471
  }),
2466
- kn && /* @__PURE__ */ P(b, {
2472
+ kn && /* @__PURE__ */ F(x, {
2467
2473
  text: kn,
2468
- className: "min-w-0 break-words px-1"
2474
+ className: "min-w-0 px-1 break-words"
2469
2475
  }),
2470
- $ && /* @__PURE__ */ P(bt, {
2476
+ $ && /* @__PURE__ */ F(St, {
2471
2477
  embedded: !0,
2472
2478
  state: Dn,
2473
2479
  analyserNodeRef: On,
2474
2480
  onStop: jn,
2475
2481
  onDiscard: Mn,
2476
- attachButton: or,
2482
+ attachButton: ar,
2477
2483
  stopLabel: ae,
2478
2484
  discardLabel: oe,
2479
- processingLabel: Ge
2485
+ processingLabel: Be
2480
2486
  }),
2481
- !$ && U && ar,
2482
- !$ && !U && sr && lr && /* @__PURE__ */ P("div", {
2487
+ !$ && De && ir,
2488
+ !$ && !De && or && cr && /* @__PURE__ */ F("div", {
2483
2489
  className: "flex",
2484
- children: lr
2490
+ children: cr
2485
2491
  }),
2486
- !$ && !U && /* @__PURE__ */ F("div", {
2487
- className: l("flex items-center gap-2", sr ? "flex-nowrap" : "flex-wrap", H.actionRow),
2492
+ !$ && !De && /* @__PURE__ */ I("div", {
2493
+ className: l("flex items-center gap-2", or ? "flex-nowrap" : "flex-wrap", H.actionRow),
2488
2494
  children: [
2489
- sr && cr,
2490
- /* @__PURE__ */ P("div", {
2491
- className: l("flex min-w-0 items-center self-stretch", sr ? "flex-1" : "w-full", H.textareaWrap),
2492
- children: ar
2495
+ or && sr,
2496
+ /* @__PURE__ */ F("div", {
2497
+ className: l("flex min-w-0 items-center self-stretch", or ? "flex-1" : "w-full", H.textareaWrap),
2498
+ children: ir
2493
2499
  }),
2494
- !sr && cr,
2495
- !sr && lr,
2496
- /* @__PURE__ */ P("div", {
2500
+ !or && sr,
2501
+ !or && cr,
2502
+ /* @__PURE__ */ F("div", {
2497
2503
  className: l("ms-auto flex flex-shrink-0 items-center gap-2", H.footerActions),
2498
- children: Me ? Me({
2504
+ children: U ? U({
2499
2505
  canSend: zn,
2500
2506
  onSend: Kn
2501
- }) : /* @__PURE__ */ F(N, { children: [
2502
- kt,
2503
- /* @__PURE__ */ P(Zt, {
2507
+ }) : /* @__PURE__ */ I(P, { children: [
2508
+ Ot,
2509
+ /* @__PURE__ */ F(tn, {
2504
2510
  deployments: be,
2505
2511
  selectedDeploymentId: xe,
2506
2512
  onDeploymentChange: Se,
2507
2513
  modelSelectorLabels: Ce,
2508
- menuStyles: ue,
2514
+ menuStyles: le,
2509
2515
  isStreaming: s,
2510
- isMobile: Mt,
2516
+ isMobile: jt,
2511
2517
  isDisabled: Ne,
2512
- style: J,
2513
- modelPickerOverlay: wt,
2514
- isPickerOpen: Nt,
2515
- onPickerToggle: () => Pt((e) => !e),
2516
- onPickerOpenChange: Pt
2518
+ style: Lt,
2519
+ modelPickerOverlay: bt,
2520
+ isPickerOpen: Mt,
2521
+ onPickerToggle: () => Nt((e) => !e),
2522
+ onPickerOpenChange: Nt
2517
2523
  }),
2518
- Gn && /* @__PURE__ */ P(x, {
2519
- icon: /* @__PURE__ */ P(he, {
2520
- size: g.LG,
2521
- stroke: _,
2524
+ Gn && /* @__PURE__ */ F(S, {
2525
+ icon: /* @__PURE__ */ F(ve, {
2526
+ size: _.LG,
2527
+ stroke: v,
2522
2528
  "aria-hidden": !0
2523
2529
  }),
2524
2530
  "aria-label": re,
2525
2531
  tooltipProps: { tooltip: re },
2526
2532
  className: "size-[40px] flex-shrink-0 mobile:min-h-11 mobile:min-w-11",
2527
- onClick: () => An(Je.Dictation),
2533
+ onClick: () => An(Ze.Dictation),
2528
2534
  disabled: W || s
2529
2535
  }),
2530
- s && o ? /* @__PURE__ */ P(St, {
2536
+ s && o ? /* @__PURE__ */ F(wt, {
2531
2537
  onStop: o,
2532
2538
  ariaLabel: ne
2533
- }) : !s && /* @__PURE__ */ P(xt, {
2539
+ }) : !s && /* @__PURE__ */ F(Ct, {
2534
2540
  onSend: Kn,
2535
2541
  isDisabled: !Wn || !zn,
2536
- ariaLabel: A,
2537
- sendTooltip: Rn ? j : te ?? j
2542
+ ariaLabel: k,
2543
+ sendTooltip: Rn ? A : j ?? A
2538
2544
  })
2539
2545
  ] })
2540
2546
  })
2541
2547
  ]
2542
2548
  }),
2543
- /* @__PURE__ */ P("span", {
2549
+ /* @__PURE__ */ F("span", {
2544
2550
  className: "sr-only",
2545
2551
  role: "status",
2546
2552
  "aria-live": "polite",
2547
2553
  "aria-atomic": "true",
2548
- children: /* @__PURE__ */ P("span", { children: Tn.text }, Tn.revision)
2554
+ children: /* @__PURE__ */ F("span", { children: Tn.text }, Tn.revision)
2549
2555
  })
2550
2556
  ]
2551
2557
  });
2552
2558
  });
2553
- Qt.displayName = "Input";
2554
- var $t = {
2559
+ nn.displayName = "Input";
2560
+ var rn = {
2555
2561
  welcome: "_welcome_1icyo_1",
2556
2562
  description: "_description_1icyo_5"
2557
- }, en = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, belowWelcomeSlot: i, styles: a, className: o, inputClassName: s, isInputDisabled: u = !1, ...d }) => {
2558
- let { colors: f, typography: p, attachmentTray: m, modelMenu: h } = a ?? {};
2559
- return /* @__PURE__ */ F("div", {
2563
+ }, an = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, belowWelcomeSlot: i, aboveInputSlot: a, styles: o, className: s, inputClassName: u, isInputDisabled: d = !1, ...f }) => {
2564
+ let { colors: p, typography: m, attachmentTray: h, modelMenu: g } = o ?? {};
2565
+ return /* @__PURE__ */ I("div", {
2560
2566
  style: c({
2561
- "--ci-welcome-color": f?.welcomeText,
2562
- "--ci-description-color": f?.descriptionText
2567
+ "--ci-welcome-color": p?.welcomeText,
2568
+ "--ci-description-color": p?.descriptionText
2563
2569
  }),
2564
- className: l("relative flex w-full flex-col items-center gap-9 px-4 py-5 desktop:p-5", o),
2570
+ className: l("relative flex w-full flex-col items-center gap-9 px-4 py-5 desktop:p-5", s),
2565
2571
  children: [
2566
- n && /* @__PURE__ */ F("div", {
2572
+ n && /* @__PURE__ */ I("div", {
2567
2573
  className: "flex flex-col items-center gap-4 text-center",
2568
- children: [/* @__PURE__ */ P("h1", {
2569
- className: l($t.welcome, "m-0", p?.welcomeClassName || "dial-display2-text"),
2574
+ children: [/* @__PURE__ */ F("h1", {
2575
+ className: l(rn.welcome, "m-0", m?.welcomeClassName || "dial-display2-text"),
2570
2576
  children: n
2571
- }), r && /* @__PURE__ */ P("p", {
2572
- className: l($t.description, "m-0 max-w-[540px]", p?.descriptionClassName || "dial-body-paragraph-text"),
2577
+ }), r && /* @__PURE__ */ F("p", {
2578
+ className: l(rn.description, "m-0 max-w-[540px]", m?.descriptionClassName || "dial-body-paragraph-text"),
2573
2579
  children: r
2574
2580
  })]
2575
2581
  }),
2576
- i != null && /* @__PURE__ */ P("div", {
2582
+ i != null && /* @__PURE__ */ F("div", {
2577
2583
  className: "flex w-full max-w-[700px] flex-col items-center empty:hidden",
2578
2584
  children: i
2579
2585
  }),
2580
- /* @__PURE__ */ P("div", {
2586
+ /* @__PURE__ */ I("div", {
2581
2587
  className: l("relative w-full", n ? "max-w-[700px]" : "max-w-[748px]"),
2582
- children: /* @__PURE__ */ P(Qt, {
2588
+ children: [a != null && /* @__PURE__ */ F("div", {
2589
+ className: "mb-2",
2590
+ children: a
2591
+ }), /* @__PURE__ */ F(nn, {
2583
2592
  placeholder: t,
2584
2593
  isStreaming: e,
2585
- isInputDisabled: u,
2586
- ...d,
2587
- className: s,
2588
- colors: f?.input,
2589
- typography: p?.input,
2590
- attachmentTray: m,
2591
- modelMenu: h
2592
- })
2594
+ isInputDisabled: d,
2595
+ ...f,
2596
+ className: u,
2597
+ colors: p?.input,
2598
+ typography: m?.input,
2599
+ attachmentTray: h,
2600
+ modelMenu: g
2601
+ })]
2593
2602
  })
2594
2603
  ]
2595
2604
  });
2596
- }, tn = ({ message: e, messageRevision: t, onChange: n, activeMentions: r, onBackspaceAtCaret: i, caretPositionOverride: o, commandMenu: s, menuOverlays: c, initialAttachments: u = [], onCancel: d, onSave: p, onUploadAttachment: m, cancelLabel: h = "Cancel", saveLabel: g = "Save & Submit", ariaLabel: v, removeLabel: y, retryLabel: b, uploadingLabel: x, expandLabel: S, clickLabel: C, addMenuTitle: T = "Add", attachLabel: E = "Attach file", menuTitle: D = "Menu", menuCloseLabel: O = "Close", className: k, pendingDropFiles: A, onDropFilesConsumed: j, validateAttachment: te, isAttachmentsEnabled: ne, isTextAttachmentsAllowed: re, hideAttachFile: ie = !1, fileAccept: ae, maximumAttachmentsAmount: oe, onAttachmentsLimitExceeded: M, onDialFileSystemClick: N, dialFileSystemLabel: se, pendingAttachments: I, onPendingAttachmentsConsumed: ce, onAttachmentClick: le, pasteTextThreshold: ue, maxMessageLength: de = 5e4, onMessageTooLong: fe }) => {
2597
- let pe = B(null), he = B(null), [ge, _e] = V([]);
2605
+ }, on = ({ message: e, messageRevision: t, onChange: n, activeMentions: r, onBackspaceAtCaret: i, caretPositionOverride: o, commandMenu: s, menuOverlays: c, initialAttachments: u = [], onCancel: d, onSave: p, onUploadAttachment: m, cancelLabel: h = "Cancel", saveLabel: g = "Save & Submit", ariaLabel: _, removeLabel: y, retryLabel: b, uploadingLabel: x, expandLabel: S, clickLabel: C, addMenuTitle: w = "Add", attachLabel: E = "Attach file", menuTitle: D = "Menu", menuCloseLabel: ee = "Close", className: O, pendingDropFiles: k, onDropFilesConsumed: A, validateAttachment: j, isAttachmentsEnabled: ne, isTextAttachmentsAllowed: re, hideAttachFile: ie = !1, fileAccept: ae, maximumAttachmentsAmount: oe, onAttachmentsLimitExceeded: M, onDialFileSystemClick: N, dialFileSystemLabel: P, pendingAttachments: se, onPendingAttachmentsConsumed: ce, onAttachmentClick: le, pasteTextThreshold: ue, maxMessageLength: de = 5e4, onMessageTooLong: fe }) => {
2606
+ let pe = B(null), me = B(null), [he, ge] = V([]);
2598
2607
  R(() => {
2599
- A?.length && (_e(A), j?.());
2600
- }, [A, j]);
2608
+ k?.length && (ge(k), A?.());
2609
+ }, [k, A]);
2601
2610
  let [ve, ye] = V(e ?? ""), [be, xe] = V([]), [Se, Ce] = V(u), we = be.some((e) => e.status === a.Loading || e.status === a.Error), Te = (ve.trim().length > 0 || be.length > 0 || Se.length > 0) && !we, Ee = (e) => {
2602
2611
  Ce((t) => t.filter((t) => t.id !== e));
2603
2612
  }, De = L((e, t) => {
2604
2613
  p(e, Se, t);
2605
- }, [Se, p]), H = () => {
2614
+ }, [Se, p]), Oe = () => {
2606
2615
  if (Te) {
2607
2616
  if (ve.length >= de) {
2608
2617
  fe?.(ve.length, de);
@@ -2610,38 +2619,38 @@ var $t = {
2610
2619
  }
2611
2620
  De(ve, be);
2612
2621
  }
2613
- }, Oe = L(() => _e([]), []), U = L((e) => {
2622
+ }, ke = L(() => ge([]), []), Ae = L((e) => {
2614
2623
  ye(e), n?.(e);
2615
- }, [n]), ke = L((e) => {
2624
+ }, [n]), H = L((e) => {
2616
2625
  let t = Array.from(e.target.files ?? []);
2617
- t.length !== 0 && (e.target.value = "", _e(t));
2618
- }, []), Ae = z(() => N ? [{
2626
+ t.length !== 0 && (e.target.value = "", ge(t));
2627
+ }, []), je = z(() => N ? [{
2619
2628
  key: "dial-fs",
2620
- label: se ?? "DIAL file system",
2621
- icon: /* @__PURE__ */ P(me, {
2629
+ label: P ?? "DIAL file system",
2630
+ icon: /* @__PURE__ */ F(_e, {
2622
2631
  size: f,
2623
2632
  "aria-hidden": !0,
2624
- stroke: _
2633
+ stroke: v
2625
2634
  }),
2626
2635
  onClick: N
2627
- }] : [], [N, se]);
2628
- return /* @__PURE__ */ F("div", {
2629
- className: l("flex w-full flex-col gap-2", k),
2630
- children: [/* @__PURE__ */ P(Qt, {
2631
- ref: he,
2636
+ }] : [], [N, P]);
2637
+ return /* @__PURE__ */ I("div", {
2638
+ className: l("flex w-full flex-col gap-2", O),
2639
+ children: [/* @__PURE__ */ F(nn, {
2640
+ ref: me,
2632
2641
  message: e,
2633
2642
  messageRevision: t,
2634
2643
  activeMentions: r,
2635
2644
  onBackspaceAtCaret: i,
2636
2645
  caretPositionOverride: o,
2637
2646
  commandMenu: s,
2638
- ariaLabel: v,
2647
+ ariaLabel: _,
2639
2648
  hideActionBar: !0,
2640
- pendingDropFiles: ge,
2641
- onDropFilesConsumed: Oe,
2649
+ pendingDropFiles: he,
2650
+ onDropFilesConsumed: ke,
2642
2651
  onSend: De,
2643
2652
  onUploadAttachment: m,
2644
- onChange: U,
2653
+ onChange: Ae,
2645
2654
  onAttachmentsChange: xe,
2646
2655
  removeLabel: y,
2647
2656
  retryLabel: b,
@@ -2651,22 +2660,22 @@ var $t = {
2651
2660
  className: "max-w-full",
2652
2661
  prefixAttachments: Se,
2653
2662
  onRemovePrefixAttachment: Ee,
2654
- validateAttachment: te,
2663
+ validateAttachment: j,
2655
2664
  isAttachmentsEnabled: ne,
2656
2665
  isTextAttachmentsAllowed: re,
2657
2666
  maximumAttachmentsAmount: oe,
2658
2667
  onAttachmentsLimitExceeded: M,
2659
- pendingAttachments: I,
2668
+ pendingAttachments: se,
2660
2669
  onPendingAttachmentsConsumed: ce,
2661
2670
  onAttachmentClick: le,
2662
2671
  pasteTextThreshold: ue,
2663
2672
  maxMessageLength: de,
2664
2673
  onMessageTooLong: fe
2665
- }), /* @__PURE__ */ F("div", {
2674
+ }), /* @__PURE__ */ I("div", {
2666
2675
  className: "flex items-center justify-between",
2667
- children: [/* @__PURE__ */ F("div", {
2676
+ children: [/* @__PURE__ */ I("div", {
2668
2677
  className: "flex",
2669
- children: [!ie && /* @__PURE__ */ P("input", {
2678
+ children: [!ie && /* @__PURE__ */ F("input", {
2670
2679
  ref: pe,
2671
2680
  type: "file",
2672
2681
  multiple: !0,
@@ -2674,31 +2683,78 @@ var $t = {
2674
2683
  className: "sr-only",
2675
2684
  "aria-hidden": !0,
2676
2685
  tabIndex: -1,
2677
- onChange: ke
2678
- }), (!ie || (c?.length ?? 0) > 0) && /* @__PURE__ */ P(pt, {
2686
+ onChange: H
2687
+ }), (!ie || (c?.length ?? 0) > 0) && /* @__PURE__ */ F(ht, {
2679
2688
  onAttachClick: ie ? void 0 : () => pe.current?.click(),
2680
2689
  attachLabel: E,
2681
- addMenuTitle: T,
2690
+ addMenuTitle: w,
2682
2691
  menuTitle: D,
2683
- menuCloseLabel: O,
2684
- extraMenuItems: Ae,
2692
+ menuCloseLabel: ee,
2693
+ extraMenuItems: je,
2685
2694
  menuOverlays: c,
2686
- getCaretPosition: () => he.current?.getCaretPosition() ?? 0
2695
+ getCaretPosition: () => me.current?.getCaretPosition() ?? 0
2687
2696
  })]
2688
- }), /* @__PURE__ */ F("div", {
2697
+ }), /* @__PURE__ */ I("div", {
2689
2698
  className: "flex gap-2",
2690
- children: [/* @__PURE__ */ P(w, {
2699
+ children: [/* @__PURE__ */ F(T, {
2691
2700
  label: h,
2692
2701
  onClick: d
2693
- }), /* @__PURE__ */ P(ee, {
2702
+ }), /* @__PURE__ */ F(te, {
2694
2703
  label: g,
2695
- onClick: H,
2704
+ onClick: Oe,
2696
2705
  disabled: !Te
2697
2706
  })]
2698
2707
  })]
2699
2708
  })]
2700
2709
  });
2701
- }, nn = (e) => {
2710
+ }, Q = /* @__PURE__ */ function(e) {
2711
+ return e.Warning = "warning", e.Reached = "reached", e;
2712
+ }({}), sn = {
2713
+ [Q.Warning]: {
2714
+ Icon: fe,
2715
+ className: "text-warning"
2716
+ },
2717
+ [Q.Reached]: {
2718
+ Icon: de,
2719
+ className: "text-error"
2720
+ }
2721
+ }, cn = ({ severity: e, limitText: t, reset: n, onClose: r, closeAriaLabel: i = "Close notification", limitTextClassName: a = "dial-small-paragraph-semi-text", resetTextClassName: o = "dial-small-paragraph-text", className: s }) => {
2722
+ let { Icon: c, className: u } = sn[e];
2723
+ return /* @__PURE__ */ I("div", {
2724
+ role: "status",
2725
+ className: l("relative flex items-center justify-between gap-3 rounded-xl border border-transparent bg-layer-sunken p-3 text-primary", H.usageBanner, s),
2726
+ children: [/* @__PURE__ */ I("div", {
2727
+ className: "flex min-w-0 flex-1 items-start gap-3",
2728
+ children: [/* @__PURE__ */ F("span", {
2729
+ "aria-hidden": "true",
2730
+ className: l("flex shrink-0", u),
2731
+ children: /* @__PURE__ */ F(c, { size: 24 })
2732
+ }), /* @__PURE__ */ I("div", {
2733
+ className: "flex min-w-0 flex-row flex-wrap items-baseline gap-x-1 break-words text-primary",
2734
+ children: [/* @__PURE__ */ F("span", {
2735
+ className: a,
2736
+ children: t
2737
+ }), n != null && /* @__PURE__ */ I(P, { children: [
2738
+ " ",
2739
+ /* @__PURE__ */ F("time", {
2740
+ dateTime: n.isoValue,
2741
+ "aria-hidden": n.ariaLabel != null || void 0,
2742
+ className: o,
2743
+ children: n.label
2744
+ }),
2745
+ n.ariaLabel != null && /* @__PURE__ */ F("span", {
2746
+ className: "sr-only",
2747
+ children: n.ariaLabel
2748
+ })
2749
+ ] })]
2750
+ })]
2751
+ }), r != null && /* @__PURE__ */ F(g, {
2752
+ className: "shrink-0 self-start",
2753
+ ariaLabel: i,
2754
+ onClose: () => r()
2755
+ })]
2756
+ });
2757
+ }, ln = (e) => {
2702
2758
  let [t, n] = V({
2703
2759
  text: e?.text,
2704
2760
  revision: e?.revision ?? 0
@@ -2713,11 +2769,11 @@ var $t = {
2713
2769
  messageRevision: t.revision,
2714
2770
  seedMessage: r
2715
2771
  };
2716
- }, rn = (e, t) => {
2772
+ }, un = (e, t) => {
2717
2773
  let n = B(e), r = B(t);
2718
2774
  r.current = t, R(() => {
2719
2775
  e !== n.current && (n.current = e, r.current());
2720
2776
  }, [e]);
2721
2777
  };
2722
2778
  //#endregion
2723
- export { tt as ActionRowLayout, U as BottomSheetShell, H as CONVERSATION_INPUT_CLASS, lt as ChatSettingsModal, en as ConversationInput, tn as EditMessageInput, Qt as Input, et as SendOnEnter, nn as useComposerSeed, rn as useComposerSeedSource };
2779
+ export { it as ActionRowLayout, U as BottomSheetShell, H as CONVERSATION_INPUT_CLASS, ft as ChatSettingsModal, an as ConversationInput, on as EditMessageInput, nn as Input, rt as SendOnEnter, Q as UsageLimitBannerSeverity, cn as UsageLimitBannerView, ln as useComposerSeed, un as useComposerSeedSource };