@epam/ai-dial-conversation-input 1.3.0-dev.7 → 1.3.0-dev.70

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,135 +2131,138 @@ 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 { attachments: mn, buildAttachments: hn, addAttachments: gn, resetAttachments: _n, handleRemove: vn, handleRetry: yn, handleExpand: bn, hasBlockedAttachments: xn } = Me({
2160
2165
  initialAttachments: we,
2161
2166
  onUploadAttachment: a,
2162
2167
  onAttachmentsChange: p,
2163
- validateAttachment: yt,
2168
+ validateAttachment: vt,
2164
2169
  pendingDropFiles: fe,
2165
2170
  onDropFilesConsumed: pe,
2166
2171
  isDropDisabled: W,
2167
- pendingAttachments: ge,
2168
- onPendingAttachmentsConsumed: _e,
2172
+ pendingAttachments: me,
2173
+ onPendingAttachmentsConsumed: he,
2169
2174
  onExpandPastedText: L((e) => {
2170
- X((t) => t ? `${t}\n${e}` : e);
2171
- }, [X]),
2172
- maximumAttachmentsAmount: Tt,
2173
- baseAttachmentsAmount: Ze.length,
2174
- onAttachmentsLimitExceeded: Et
2175
+ Y((t) => t ? `${t}\n${e}` : e);
2176
+ }, [Y]),
2177
+ maximumAttachmentsAmount: xt,
2178
+ baseAttachmentsAmount: Je.length,
2179
+ onAttachmentsLimitExceeded: Tt
2175
2180
  }), Sn = L((e) => {
2176
2181
  gn(hn([e]));
2177
- }, [gn, hn]), Cn = B(!1), wn = B(Y);
2178
- wn.current = Y;
2182
+ }, [gn, hn]), Cn = B(!1), wn = B(J);
2183
+ wn.current = J;
2179
2184
  let [Tn, En] = V({
2180
2185
  text: "",
2181
2186
  revision: 0
2182
- }), { state: Dn, analyserNodeRef: On, errorMessage: kn, startRecording: An, stopRecording: jn, discardRecording: Mn } = $e({
2187
+ }), { state: Dn, analyserNodeRef: On, errorMessage: kn, startRecording: An, stopRecording: jn, discardRecording: Mn } = nt({
2183
2188
  onAttachAudio: Sn,
2184
- onTranscribeAudio: Ve,
2189
+ onTranscribeAudio: ze,
2185
2190
  onTranscript: L((e) => {
2186
2191
  let t = e.trim();
2187
2192
  if (t) {
2188
2193
  let e = wn.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
2189
- wn.current = n, X(n), En((e) => ({
2194
+ wn.current = n, Y(n), En((e) => ({
2190
2195
  text: t,
2191
2196
  revision: e.revision + 1
2192
- })), q.notifyChange(), u?.(n);
2197
+ })), Pt.notifyChange(), u?.(n);
2193
2198
  }
2194
2199
  Cn.current = !0;
2195
2200
  }, [
2196
- X,
2197
- q,
2201
+ Y,
2202
+ Pt,
2198
2203
  u
2199
2204
  ]),
2200
- errorLabel: Ye
2201
- }), $ = Dn === qe.Recording || Dn === qe.Processing;
2205
+ errorLabel: Ue
2206
+ }), $ = Dn === Xe.Recording || Dn === Xe.Processing;
2202
2207
  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) => {
2208
+ (Dn === Xe.Error || Dn === Xe.Idle && Cn.current) && (Cn.current = !1, X.current?.focus());
2209
+ }, [Dn, X]);
2210
+ let Nn = B(null), Pn = B(null), Fn = Et && Dt, { handlePaste: In } = ue(gn, Fn ? ge : Infinity), Ln = L((e) => {
2206
2211
  if (!Fn) {
2207
2212
  let t = e.clipboardData.getData("text/plain");
2208
- t.length >= ye && At?.(t.length, ye);
2213
+ t.length >= ye && kt?.(t.length, ye);
2209
2214
  }
2210
- In(e);
2215
+ if (In(e), e.defaultPrevented) return;
2216
+ let t = e.clipboardData.getData("text/plain").replace(/\r\n?/g, "\n");
2217
+ t !== "" && G?.onTextPaste?.(t);
2211
2218
  }, [
2212
2219
  Fn,
2213
2220
  ye,
2214
- At,
2215
- In
2216
- ]), Rn = Y.trim().length > 0 || mn.length > 0, zn = Rn && !xn && !Ie && !$, [Bn, Vn] = V([]);
2221
+ kt,
2222
+ In,
2223
+ G
2224
+ ]), Rn = J.trim().length > 0 || mn.length > 0, zn = Rn && !xn && !Pe && !$, [Bn, Vn] = V([]);
2217
2225
  R(() => {
2218
2226
  Vn([]);
2219
- }, [(rt ?? []).map((e) => e.id).join("|")]);
2227
+ }, [(et ?? []).map((e) => e.id).join("|")]);
2220
2228
  let Hn = z(() => {
2221
- let e = rt ?? [];
2229
+ let e = et ?? [];
2222
2230
  return at ? e.filter((e) => e.isSelected || !Bn.includes(e.id)) : e;
2223
2231
  }, [
2224
- rt,
2232
+ et,
2225
2233
  Bn,
2226
2234
  at
2227
2235
  ]), Un = L((e) => {
2228
- Vn((t) => t.includes(e) ? t : [...t, e]), rt?.find((t) => t.id === e)?.isSelected && it?.(e);
2229
- }, [rt, it]), Wn = be === void 0 || xe != null, Gn = Le && !s, Kn = async () => {
2230
- if (Ie || $) return;
2231
- if (Y.length >= ye) {
2232
- At?.(Y.length, ye);
2236
+ Vn((t) => t.includes(e) ? t : [...t, e]), et?.find((t) => t.id === e)?.isSelected && tt?.(e);
2237
+ }, [et, tt]), Wn = be === void 0 || xe != null, Gn = Fe && !s, Kn = async () => {
2238
+ if (Pe || $) return;
2239
+ if (J.length >= ye) {
2240
+ kt?.(J.length, ye);
2233
2241
  return;
2234
2242
  }
2235
- let e = Y, t = mn;
2236
- X(""), q.reset();
2243
+ let e = J, t = mn;
2244
+ Y(""), Pt.reset();
2237
2245
  try {
2238
2246
  await i?.(e, t), t.forEach((e) => {
2239
2247
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
2240
2248
  }), _n([]);
2241
2249
  } catch {
2242
- X(e), _n(t);
2250
+ Y(e), _n(t);
2243
2251
  }
2244
- }, qn = (e) => Xe === et.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey, Jn = (e) => {
2245
- if (!zt || e.nativeEvent.isComposing) return !1;
2246
- if (e.key === "Escape") return e.preventDefault(), e.stopPropagation(), Vt(), !0;
2247
- if (e.key === "ArrowDown" || e.key === "ArrowUp") return e.preventDefault(), Jt(e.key === "ArrowDown" ? Pe.Next : Pe.Previous), !0;
2252
+ }, qn = (e) => We === rt.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey, Jn = (e) => {
2253
+ if (!Bt || e.nativeEvent.isComposing) return !1;
2254
+ if (e.key === "Escape") return e.preventDefault(), e.stopPropagation(), Ht(), !0;
2255
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") return e.preventDefault(), Yt(e.key === "ArrowDown" ? Le.Next : Le.Previous), !0;
2248
2256
  if (e.key !== "Enter" || e.shiftKey) return !1;
2249
- let t = Yt();
2257
+ let t = Xt();
2250
2258
  return t == null ? qn(e) ? (e.preventDefault(), !0) : !1 : (e.preventDefault(), t.click(), !0);
2251
2259
  }, Yn = (e) => {
2252
- if (!$ && !Rt(e) && !Jn(e)) {
2260
+ if (!$ && !zt(e) && !Jn(e)) {
2253
2261
  if (!e.nativeEvent.isComposing && !W && !s) {
2254
2262
  if (e.key === "ArrowUp" || e.key === "ArrowDown") {
2255
- let t = e.currentTarget.selectionStart ?? 0, n = q.navigate(e.key === "ArrowUp" ? "up" : "down", Y, t);
2263
+ let t = e.currentTarget.selectionStart ?? 0, n = Pt.navigate(e.key === "ArrowUp" ? "up" : "down", J, t);
2256
2264
  if (n !== null) {
2257
- e.preventDefault(), X(n);
2265
+ e.preventDefault(), Y(n);
2258
2266
  return;
2259
2267
  }
2260
2268
  }
@@ -2263,7 +2271,7 @@ var Kt = {
2263
2271
  if (t != null) {
2264
2272
  e.preventDefault();
2265
2273
  let n = e.currentTarget;
2266
- 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);
2274
+ 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);
2267
2275
  return;
2268
2276
  }
2269
2277
  }
@@ -2277,52 +2285,52 @@ var Kt = {
2277
2285
  e.target.value = "", gn(n);
2278
2286
  }, Zn = z(() => {
2279
2287
  let e = [];
2280
- return on != null && e.push({
2281
- offset: on,
2282
- node: /* @__PURE__ */ P("span", {
2288
+ return Q != null && e.push({
2289
+ offset: Q,
2290
+ node: /* @__PURE__ */ F("span", {
2283
2291
  ref: sn,
2284
2292
  "aria-hidden": !0,
2285
2293
  className: "inline-block h-[1lh] w-0 align-text-top"
2286
2294
  }, "caret-marker")
2287
- }), an && G != null && nn != null && e.push({
2288
- offset: nn,
2289
- node: /* @__PURE__ */ P("span", {
2290
- className: K.commandHint,
2295
+ }), on && G != null && rn != null && e.push({
2296
+ offset: rn,
2297
+ node: /* @__PURE__ */ F("span", {
2298
+ className: q.commandHint,
2291
2299
  "aria-hidden": !0,
2292
2300
  "data-mirror-synthetic": !0,
2293
2301
  children: G.emptyQueryHint
2294
2302
  }, "command-hint")
2295
2303
  }), e;
2296
2304
  }, [
2305
+ Q,
2297
2306
  on,
2298
- an,
2299
2307
  G,
2300
- nn
2301
- ]), Qn = It || Zn.length > 0, { mirrorRef: $n, selectionRects: er, updateSelectionRects: tr, syncMirrorToTextarea: nr } = He({
2302
- textareaRef: Z,
2303
- message: Y,
2308
+ rn
2309
+ ]), Qn = It || Zn.length > 0, { mirrorRef: $n, selectionRects: er, updateSelectionRects: tr, syncMirrorToTextarea: nr } = Ge({
2310
+ textareaRef: X,
2311
+ message: J,
2304
2312
  isMirrorActive: Qn
2305
2313
  });
2306
- De(() => {
2314
+ Ae(() => {
2307
2315
  dn();
2308
2316
  }, [
2309
2317
  dn,
2310
- on,
2311
- Y
2318
+ Q,
2319
+ J
2312
2320
  ]);
2313
- let rr = /* @__PURE__ */ P("textarea", {
2314
- 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"),
2315
- ref: Z,
2316
- autoFocus: mt,
2317
- value: Y,
2321
+ let rr = /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("textarea", {
2322
+ 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"),
2323
+ ref: X,
2324
+ autoFocus: pt,
2325
+ value: J,
2318
2326
  onChange: (e) => {
2319
- X(e.target.value), q.notifyChange();
2327
+ Y(e.target.value), Pt.notifyChange();
2320
2328
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
2321
- Wt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), u?.(e.target.value);
2329
+ Gt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), u?.(e.target.value);
2322
2330
  },
2323
2331
  onSelect: tr,
2324
2332
  onScroll: () => {
2325
- nr(), on != null && dn();
2333
+ nr(), Q != null && dn();
2326
2334
  },
2327
2335
  onFocus: $t,
2328
2336
  onClick: Qt,
@@ -2332,53 +2340,53 @@ var Kt = {
2332
2340
  placeholder: m,
2333
2341
  "aria-label": h,
2334
2342
  "aria-autocomplete": G == null ? void 0 : "list",
2335
- "aria-controls": zt ? Gt : void 0,
2336
- "aria-activedescendant": qt ?? void 0,
2343
+ "aria-controls": Bt ? Kt : void 0,
2344
+ "aria-activedescendant": Jt ?? void 0,
2337
2345
  "aria-hidden": It ? !0 : void 0,
2338
2346
  disabled: W,
2339
2347
  readOnly: $,
2340
2348
  rows: 1
2341
- }), ir = G == null ? rr : /* @__PURE__ */ F(N, { children: [rr, /* @__PURE__ */ P("div", {
2349
+ }), G != null && /* @__PURE__ */ F("div", {
2342
2350
  "aria-hidden": !0,
2343
- className: l("pointer-events-none absolute", I?.fontClassName || "dial-body-paragraph-text"),
2351
+ className: l("pointer-events-none absolute", N?.fontClassName || "dial-body-paragraph-text"),
2344
2352
  style: {
2345
2353
  left: ln?.left ?? 0,
2346
2354
  top: ln?.top ?? 0
2347
2355
  },
2348
- children: /* @__PURE__ */ P(v, {
2349
- open: zt,
2356
+ children: /* @__PURE__ */ F(y, {
2357
+ open: Bt,
2350
2358
  onOpenChange: (e) => {
2351
- e || Ht();
2359
+ e || Ut();
2352
2360
  },
2353
2361
  placement: "top-start",
2354
2362
  trigger: [],
2355
2363
  initialFocus: -1,
2356
2364
  matchReferenceWidth: !1,
2357
- outsidePressIgnoreRef: Z,
2358
- renderOverlay: () => /* @__PURE__ */ P("div", {
2359
- ref: Kt,
2365
+ outsidePressIgnoreRef: X,
2366
+ renderOverlay: () => /* @__PURE__ */ F("div", {
2367
+ ref: qt,
2360
2368
  role: G.menuLabel == null ? void 0 : "group",
2361
2369
  "aria-label": G.menuLabel,
2362
2370
  children: G.renderMenu({
2363
- query: Bt,
2364
- caretPosition: Q ?? 0,
2371
+ query: Vt,
2372
+ caretPosition: Z ?? 0,
2365
2373
  close: fn,
2366
- listboxId: Gt,
2367
- activeOptionId: qt
2374
+ listboxId: Kt,
2375
+ activeOptionId: Jt
2368
2376
  })
2369
2377
  }),
2370
- children: /* @__PURE__ */ P("span", {
2378
+ children: /* @__PURE__ */ F("span", {
2371
2379
  "aria-hidden": !0,
2372
2380
  className: "inline-block h-[1lh] w-0"
2373
2381
  })
2374
2382
  })
2375
- })] }), ar = /* @__PURE__ */ F("div", {
2383
+ })] }), ir = /* @__PURE__ */ I("div", {
2376
2384
  ref: cn,
2377
- className: "relative -me-1 -ms-1 w-[calc(100%+8px)]",
2378
- children: [Qn && /* @__PURE__ */ F("div", {
2385
+ className: "relative -ms-1 -me-1 w-[calc(100%+8px)]",
2386
+ children: [Qn && /* @__PURE__ */ I("div", {
2379
2387
  ref: $n,
2380
- 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]"),
2381
- children: [ze(Y, Ft, Zn, K.mentionHighlight, K.mentionHighlightUnsupported), er.map((e, t) => /* @__PURE__ */ P("div", {
2388
+ 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"),
2389
+ children: [He(J, Ft, Zn, q.mentionHighlight, q.mentionHighlightUnsupported), er.map((e, t) => /* @__PURE__ */ F("div", {
2382
2390
  "aria-hidden": !0,
2383
2391
  className: "pointer-events-none absolute rounded-sm bg-control-accent-alpha-active",
2384
2392
  style: {
@@ -2388,33 +2396,33 @@ var Kt = {
2388
2396
  height: e.height
2389
2397
  }
2390
2398
  }, `selection-${t}`))]
2391
- }), ir]
2392
- }), or = Te ? void 0 : /* @__PURE__ */ P(pt, {
2393
- onAttachClick: Oe ? void 0 : () => Nn.current?.click(),
2394
- attachLabel: y,
2399
+ }), rr]
2400
+ }), ar = Te ? void 0 : /* @__PURE__ */ F(ht, {
2401
+ onAttachClick: Ee ? void 0 : () => Nn.current?.click(),
2402
+ attachLabel: g,
2395
2403
  addMenuTitle: C,
2396
2404
  menuTitle: w,
2397
2405
  menuCloseLabel: T,
2398
- style: J,
2406
+ style: Lt,
2399
2407
  isDisabled: W || $,
2400
- chatSettings: nt,
2401
- extraMenuItems: Lt,
2402
- onRecordVoice: Be && Dt && !s && !$ ? () => An(Je.Attachment) : void 0,
2408
+ chatSettings: $e,
2409
+ extraMenuItems: Rt,
2410
+ onRecordVoice: Ie && Et && !s && !$ ? () => An(Ze.Attachment) : void 0,
2403
2411
  recordVoiceLabel: ie,
2404
- toolsMenuItems: at ? rt : void 0,
2405
- onToolToggle: it,
2412
+ toolsMenuItems: at ? et : void 0,
2413
+ onToolToggle: tt,
2406
2414
  toolsMenuTitle: ot,
2407
2415
  toolsBackLabel: st,
2408
2416
  menuOverlays: lt,
2409
- getCaretPosition: () => Z.current?.selectionStart ?? Y.length
2410
- }), sr = ke === tt.Inline && (!Mt || je), cr = or && /* @__PURE__ */ P("div", {
2417
+ getCaretPosition: () => X.current?.selectionStart ?? J.length
2418
+ }), or = Oe === it.Inline && (!jt || je), sr = ar && /* @__PURE__ */ F("div", {
2411
2419
  className: l("flex", H.addCluster),
2412
- children: or
2413
- }), lr = Hn.length > 0 && it != null && /* @__PURE__ */ P("div", {
2420
+ children: ar
2421
+ }), cr = Hn.length > 0 && tt != null && /* @__PURE__ */ F("div", {
2414
2422
  className: l("min-w-0 flex-1", H.toolsChips),
2415
- children: /* @__PURE__ */ P(ht, {
2423
+ children: /* @__PURE__ */ F(_t, {
2416
2424
  items: Hn,
2417
- onToolToggle: it,
2425
+ onToolToggle: tt,
2418
2426
  onToolDismiss: Un,
2419
2427
  canRemove: at,
2420
2428
  removeLabel: ct?.removeLabel,
@@ -2422,15 +2430,15 @@ var Kt = {
2422
2430
  stateOffLabel: ct?.stateOffLabel
2423
2431
  })
2424
2432
  });
2425
- return /* @__PURE__ */ F("div", {
2433
+ return /* @__PURE__ */ I("div", {
2426
2434
  ref: Pn,
2427
- style: J,
2428
- 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),
2435
+ style: Lt,
2436
+ 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),
2429
2437
  children: [
2430
- (Ze.length > 0 || mn.length > 0) && /* @__PURE__ */ P(se, {
2431
- attachments: [...Ze, ...mn],
2438
+ (Je.length > 0 || mn.length > 0) && /* @__PURE__ */ F(se, {
2439
+ attachments: [...Je, ...mn],
2432
2440
  onRemove: (e) => {
2433
- Ze.some((t) => t.id === e) ? Qe?.(e) : vn(e);
2441
+ Je.some((t) => t.id === e) ? Qe?.(e) : vn(e);
2434
2442
  },
2435
2443
  onRetry: yn,
2436
2444
  onExpand: bn,
@@ -2438,168 +2446,171 @@ var Kt = {
2438
2446
  removeLabel: E,
2439
2447
  retryLabel: D,
2440
2448
  uploadingLabel: ee,
2441
- expandLabel: O,
2442
- clickLabel: k
2449
+ expandLabel: te,
2450
+ clickLabel: O
2443
2451
  },
2444
2452
  styles: {
2445
2453
  ...ce,
2446
- className: l(mn.length > 6 && "-me-4 w-[calc(100%+1rem)]", ce?.className)
2454
+ className: l(mn.length > 6 && "-me-4", ce?.className)
2447
2455
  },
2448
- onAttachmentClick: Ct == null ? void 0 : (e) => {
2449
- let t = [...Ze, ...mn].find((t) => t.id === e);
2450
- t != null && Ct(t);
2456
+ onAttachmentClick: yt == null ? void 0 : (e) => {
2457
+ let t = [...Je, ...mn].find((t) => t.id === e);
2458
+ t != null && yt(t);
2451
2459
  }
2452
2460
  }),
2453
- !Te && /* @__PURE__ */ P("input", {
2461
+ !Te && /* @__PURE__ */ F("input", {
2454
2462
  ref: Nn,
2455
2463
  type: "file",
2456
2464
  multiple: !0,
2457
- accept: S,
2465
+ accept: b,
2458
2466
  className: "sr-only",
2459
2467
  "aria-hidden": !0,
2460
2468
  tabIndex: -1,
2461
2469
  onChange: Xn
2462
2470
  }),
2463
- kn && /* @__PURE__ */ P(b, {
2471
+ kn && /* @__PURE__ */ F(x, {
2464
2472
  text: kn,
2465
- className: "min-w-0 break-words px-1"
2473
+ className: "min-w-0 px-1 break-words"
2466
2474
  }),
2467
- $ && /* @__PURE__ */ P(bt, {
2475
+ $ && /* @__PURE__ */ F(St, {
2468
2476
  embedded: !0,
2469
2477
  state: Dn,
2470
2478
  analyserNodeRef: On,
2471
2479
  onStop: jn,
2472
2480
  onDiscard: Mn,
2473
- attachButton: or,
2481
+ attachButton: ar,
2474
2482
  stopLabel: ae,
2475
2483
  discardLabel: oe,
2476
- processingLabel: Ge
2484
+ processingLabel: Be
2477
2485
  }),
2478
- !$ && U && ar,
2479
- !$ && !U && sr && lr && /* @__PURE__ */ P("div", {
2486
+ !$ && De && ir,
2487
+ !$ && !De && or && cr && /* @__PURE__ */ F("div", {
2480
2488
  className: "flex",
2481
- children: lr
2489
+ children: cr
2482
2490
  }),
2483
- !$ && !U && /* @__PURE__ */ F("div", {
2484
- className: l("flex items-center gap-2", sr ? "flex-nowrap" : "flex-wrap", H.actionRow),
2491
+ !$ && !De && /* @__PURE__ */ I("div", {
2492
+ className: l("flex items-center gap-2", or ? "flex-nowrap" : "flex-wrap", H.actionRow),
2485
2493
  children: [
2486
- sr && cr,
2487
- /* @__PURE__ */ P("div", {
2488
- className: l("flex min-w-0 items-center self-stretch", sr ? "flex-1" : "w-full", H.textareaWrap),
2489
- children: ar
2494
+ or && sr,
2495
+ /* @__PURE__ */ F("div", {
2496
+ className: l("flex min-w-0 items-center self-stretch", or ? "flex-1" : "w-full", H.textareaWrap),
2497
+ children: ir
2490
2498
  }),
2491
- !sr && cr,
2492
- !sr && lr,
2493
- /* @__PURE__ */ P("div", {
2499
+ !or && sr,
2500
+ !or && cr,
2501
+ /* @__PURE__ */ F("div", {
2494
2502
  className: l("ms-auto flex flex-shrink-0 items-center gap-2", H.footerActions),
2495
- children: Me ? Me({
2503
+ children: U ? U({
2496
2504
  canSend: zn,
2497
2505
  onSend: Kn
2498
- }) : /* @__PURE__ */ F(N, { children: [
2499
- kt,
2500
- /* @__PURE__ */ P(Zt, {
2506
+ }) : /* @__PURE__ */ I(P, { children: [
2507
+ Ot,
2508
+ /* @__PURE__ */ F(tn, {
2501
2509
  deployments: be,
2502
2510
  selectedDeploymentId: xe,
2503
2511
  onDeploymentChange: Se,
2504
2512
  modelSelectorLabels: Ce,
2505
- menuStyles: ue,
2513
+ menuStyles: le,
2506
2514
  isStreaming: s,
2507
- isMobile: Mt,
2515
+ isMobile: jt,
2508
2516
  isDisabled: Ne,
2509
- style: J,
2510
- modelPickerOverlay: wt,
2511
- isPickerOpen: Nt,
2512
- onPickerToggle: () => Pt((e) => !e),
2513
- onPickerOpenChange: Pt
2517
+ style: Lt,
2518
+ modelPickerOverlay: bt,
2519
+ isPickerOpen: Mt,
2520
+ onPickerToggle: () => Nt((e) => !e),
2521
+ onPickerOpenChange: Nt
2514
2522
  }),
2515
- Gn && /* @__PURE__ */ P(x, {
2516
- icon: /* @__PURE__ */ P(he, {
2517
- size: g.LG,
2518
- stroke: _,
2523
+ Gn && /* @__PURE__ */ F(S, {
2524
+ icon: /* @__PURE__ */ F(ve, {
2525
+ size: _.LG,
2526
+ stroke: v,
2519
2527
  "aria-hidden": !0
2520
2528
  }),
2521
2529
  "aria-label": re,
2522
2530
  tooltipProps: { tooltip: re },
2523
2531
  className: "size-[40px] flex-shrink-0 mobile:min-h-11 mobile:min-w-11",
2524
- onClick: () => An(Je.Dictation),
2532
+ onClick: () => An(Ze.Dictation),
2525
2533
  disabled: W || s
2526
2534
  }),
2527
- s && o ? /* @__PURE__ */ P(St, {
2535
+ s && o ? /* @__PURE__ */ F(wt, {
2528
2536
  onStop: o,
2529
2537
  ariaLabel: ne
2530
- }) : !s && /* @__PURE__ */ P(xt, {
2538
+ }) : !s && /* @__PURE__ */ F(Ct, {
2531
2539
  onSend: Kn,
2532
2540
  isDisabled: !Wn || !zn,
2533
- ariaLabel: A,
2534
- sendTooltip: Rn ? j : te ?? j
2541
+ ariaLabel: k,
2542
+ sendTooltip: Rn ? A : j ?? A
2535
2543
  })
2536
2544
  ] })
2537
2545
  })
2538
2546
  ]
2539
2547
  }),
2540
- /* @__PURE__ */ P("span", {
2548
+ /* @__PURE__ */ F("span", {
2541
2549
  className: "sr-only",
2542
2550
  role: "status",
2543
2551
  "aria-live": "polite",
2544
2552
  "aria-atomic": "true",
2545
- children: /* @__PURE__ */ P("span", { children: Tn.text }, Tn.revision)
2553
+ children: /* @__PURE__ */ F("span", { children: Tn.text }, Tn.revision)
2546
2554
  })
2547
2555
  ]
2548
2556
  });
2549
2557
  });
2550
- Qt.displayName = "Input";
2551
- var $t = {
2558
+ nn.displayName = "Input";
2559
+ var rn = {
2552
2560
  welcome: "_welcome_1icyo_1",
2553
2561
  description: "_description_1icyo_5"
2554
- }, 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 }) => {
2555
- let { colors: f, typography: p, attachmentTray: m, modelMenu: h } = a ?? {};
2556
- return /* @__PURE__ */ F("div", {
2562
+ }, 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 }) => {
2563
+ let { colors: p, typography: m, attachmentTray: h, modelMenu: g } = o ?? {};
2564
+ return /* @__PURE__ */ I("div", {
2557
2565
  style: c({
2558
- "--ci-welcome-color": f?.welcomeText,
2559
- "--ci-description-color": f?.descriptionText
2566
+ "--ci-welcome-color": p?.welcomeText,
2567
+ "--ci-description-color": p?.descriptionText
2560
2568
  }),
2561
- className: l("relative flex w-full flex-col items-center gap-9 px-4 py-5 desktop:p-5", o),
2569
+ className: l("relative flex w-full flex-col items-center gap-9 px-4 py-5 desktop:p-5", s),
2562
2570
  children: [
2563
- n && /* @__PURE__ */ F("div", {
2571
+ n && /* @__PURE__ */ I("div", {
2564
2572
  className: "flex flex-col items-center gap-4 text-center",
2565
- children: [/* @__PURE__ */ P("h1", {
2566
- className: l($t.welcome, "m-0", p?.welcomeClassName || "dial-display2-text"),
2573
+ children: [/* @__PURE__ */ F("h1", {
2574
+ className: l(rn.welcome, "m-0", m?.welcomeClassName || "dial-display2-text"),
2567
2575
  children: n
2568
- }), r && /* @__PURE__ */ P("p", {
2569
- className: l($t.description, "m-0 max-w-[540px]", p?.descriptionClassName || "dial-body-paragraph-text"),
2576
+ }), r && /* @__PURE__ */ F("p", {
2577
+ className: l(rn.description, "m-0 max-w-[540px]", m?.descriptionClassName || "dial-body-paragraph-text"),
2570
2578
  children: r
2571
2579
  })]
2572
2580
  }),
2573
- i != null && /* @__PURE__ */ P("div", {
2581
+ i != null && /* @__PURE__ */ F("div", {
2574
2582
  className: "flex w-full max-w-[700px] flex-col items-center empty:hidden",
2575
2583
  children: i
2576
2584
  }),
2577
- /* @__PURE__ */ P("div", {
2585
+ /* @__PURE__ */ I("div", {
2578
2586
  className: l("relative w-full", n ? "max-w-[700px]" : "max-w-[748px]"),
2579
- children: /* @__PURE__ */ P(Qt, {
2587
+ children: [a != null && /* @__PURE__ */ F("div", {
2588
+ className: "mb-2",
2589
+ children: a
2590
+ }), /* @__PURE__ */ F(nn, {
2580
2591
  placeholder: t,
2581
2592
  isStreaming: e,
2582
- isInputDisabled: u,
2583
- ...d,
2584
- className: s,
2585
- colors: f?.input,
2586
- typography: p?.input,
2587
- attachmentTray: m,
2588
- modelMenu: h
2589
- })
2593
+ isInputDisabled: d,
2594
+ ...f,
2595
+ className: u,
2596
+ colors: p?.input,
2597
+ typography: m?.input,
2598
+ attachmentTray: h,
2599
+ modelMenu: g
2600
+ })]
2590
2601
  })
2591
2602
  ]
2592
2603
  });
2593
- }, 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 }) => {
2594
- let pe = B(null), he = B(null), [ge, _e] = V([]);
2604
+ }, 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 }) => {
2605
+ let pe = B(null), me = B(null), [he, ge] = V([]);
2595
2606
  R(() => {
2596
- A?.length && (_e(A), j?.());
2597
- }, [A, j]);
2607
+ k?.length && (ge(k), A?.());
2608
+ }, [k, A]);
2598
2609
  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) => {
2599
2610
  Ce((t) => t.filter((t) => t.id !== e));
2600
2611
  }, De = L((e, t) => {
2601
2612
  p(e, Se, t);
2602
- }, [Se, p]), H = () => {
2613
+ }, [Se, p]), Oe = () => {
2603
2614
  if (Te) {
2604
2615
  if (ve.length >= de) {
2605
2616
  fe?.(ve.length, de);
@@ -2607,38 +2618,38 @@ var $t = {
2607
2618
  }
2608
2619
  De(ve, be);
2609
2620
  }
2610
- }, Oe = L(() => _e([]), []), U = L((e) => {
2621
+ }, ke = L(() => ge([]), []), Ae = L((e) => {
2611
2622
  ye(e), n?.(e);
2612
- }, [n]), ke = L((e) => {
2623
+ }, [n]), H = L((e) => {
2613
2624
  let t = Array.from(e.target.files ?? []);
2614
- t.length !== 0 && (e.target.value = "", _e(t));
2615
- }, []), Ae = z(() => N ? [{
2625
+ t.length !== 0 && (e.target.value = "", ge(t));
2626
+ }, []), je = z(() => N ? [{
2616
2627
  key: "dial-fs",
2617
- label: se ?? "DIAL file system",
2618
- icon: /* @__PURE__ */ P(me, {
2628
+ label: P ?? "DIAL file system",
2629
+ icon: /* @__PURE__ */ F(_e, {
2619
2630
  size: f,
2620
2631
  "aria-hidden": !0,
2621
- stroke: _
2632
+ stroke: v
2622
2633
  }),
2623
2634
  onClick: N
2624
- }] : [], [N, se]);
2625
- return /* @__PURE__ */ F("div", {
2626
- className: l("flex w-full flex-col gap-2", k),
2627
- children: [/* @__PURE__ */ P(Qt, {
2628
- ref: he,
2635
+ }] : [], [N, P]);
2636
+ return /* @__PURE__ */ I("div", {
2637
+ className: l("flex w-full flex-col gap-2", O),
2638
+ children: [/* @__PURE__ */ F(nn, {
2639
+ ref: me,
2629
2640
  message: e,
2630
2641
  messageRevision: t,
2631
2642
  activeMentions: r,
2632
2643
  onBackspaceAtCaret: i,
2633
2644
  caretPositionOverride: o,
2634
2645
  commandMenu: s,
2635
- ariaLabel: v,
2646
+ ariaLabel: _,
2636
2647
  hideActionBar: !0,
2637
- pendingDropFiles: ge,
2638
- onDropFilesConsumed: Oe,
2648
+ pendingDropFiles: he,
2649
+ onDropFilesConsumed: ke,
2639
2650
  onSend: De,
2640
2651
  onUploadAttachment: m,
2641
- onChange: U,
2652
+ onChange: Ae,
2642
2653
  onAttachmentsChange: xe,
2643
2654
  removeLabel: y,
2644
2655
  retryLabel: b,
@@ -2648,22 +2659,22 @@ var $t = {
2648
2659
  className: "max-w-full",
2649
2660
  prefixAttachments: Se,
2650
2661
  onRemovePrefixAttachment: Ee,
2651
- validateAttachment: te,
2662
+ validateAttachment: j,
2652
2663
  isAttachmentsEnabled: ne,
2653
2664
  isTextAttachmentsAllowed: re,
2654
2665
  maximumAttachmentsAmount: oe,
2655
2666
  onAttachmentsLimitExceeded: M,
2656
- pendingAttachments: I,
2667
+ pendingAttachments: se,
2657
2668
  onPendingAttachmentsConsumed: ce,
2658
2669
  onAttachmentClick: le,
2659
2670
  pasteTextThreshold: ue,
2660
2671
  maxMessageLength: de,
2661
2672
  onMessageTooLong: fe
2662
- }), /* @__PURE__ */ F("div", {
2673
+ }), /* @__PURE__ */ I("div", {
2663
2674
  className: "flex items-center justify-between",
2664
- children: [/* @__PURE__ */ F("div", {
2675
+ children: [/* @__PURE__ */ I("div", {
2665
2676
  className: "flex",
2666
- children: [!ie && /* @__PURE__ */ P("input", {
2677
+ children: [!ie && /* @__PURE__ */ F("input", {
2667
2678
  ref: pe,
2668
2679
  type: "file",
2669
2680
  multiple: !0,
@@ -2671,31 +2682,78 @@ var $t = {
2671
2682
  className: "sr-only",
2672
2683
  "aria-hidden": !0,
2673
2684
  tabIndex: -1,
2674
- onChange: ke
2675
- }), (!ie || (c?.length ?? 0) > 0) && /* @__PURE__ */ P(pt, {
2685
+ onChange: H
2686
+ }), (!ie || (c?.length ?? 0) > 0) && /* @__PURE__ */ F(ht, {
2676
2687
  onAttachClick: ie ? void 0 : () => pe.current?.click(),
2677
2688
  attachLabel: E,
2678
- addMenuTitle: T,
2689
+ addMenuTitle: w,
2679
2690
  menuTitle: D,
2680
- menuCloseLabel: O,
2681
- extraMenuItems: Ae,
2691
+ menuCloseLabel: ee,
2692
+ extraMenuItems: je,
2682
2693
  menuOverlays: c,
2683
- getCaretPosition: () => he.current?.getCaretPosition() ?? 0
2694
+ getCaretPosition: () => me.current?.getCaretPosition() ?? 0
2684
2695
  })]
2685
- }), /* @__PURE__ */ F("div", {
2696
+ }), /* @__PURE__ */ I("div", {
2686
2697
  className: "flex gap-2",
2687
- children: [/* @__PURE__ */ P(w, {
2698
+ children: [/* @__PURE__ */ F(T, {
2688
2699
  label: h,
2689
2700
  onClick: d
2690
- }), /* @__PURE__ */ P(ee, {
2701
+ }), /* @__PURE__ */ F(te, {
2691
2702
  label: g,
2692
- onClick: H,
2703
+ onClick: Oe,
2693
2704
  disabled: !Te
2694
2705
  })]
2695
2706
  })]
2696
2707
  })]
2697
2708
  });
2698
- }, nn = (e) => {
2709
+ }, Q = /* @__PURE__ */ function(e) {
2710
+ return e.Warning = "warning", e.Reached = "reached", e;
2711
+ }({}), sn = {
2712
+ [Q.Warning]: {
2713
+ Icon: fe,
2714
+ className: "text-warning"
2715
+ },
2716
+ [Q.Reached]: {
2717
+ Icon: de,
2718
+ className: "text-error"
2719
+ }
2720
+ }, 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 }) => {
2721
+ let { Icon: c, className: u } = sn[e];
2722
+ return /* @__PURE__ */ I("div", {
2723
+ role: "status",
2724
+ 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),
2725
+ children: [/* @__PURE__ */ I("div", {
2726
+ className: "flex min-w-0 flex-1 items-start gap-3",
2727
+ children: [/* @__PURE__ */ F("span", {
2728
+ "aria-hidden": "true",
2729
+ className: l("flex shrink-0", u),
2730
+ children: /* @__PURE__ */ F(c, { size: 24 })
2731
+ }), /* @__PURE__ */ I("div", {
2732
+ className: "flex min-w-0 flex-row flex-wrap items-baseline gap-x-1 break-words text-primary",
2733
+ children: [/* @__PURE__ */ F("span", {
2734
+ className: a,
2735
+ children: t
2736
+ }), n != null && /* @__PURE__ */ I(P, { children: [
2737
+ " ",
2738
+ /* @__PURE__ */ F("time", {
2739
+ dateTime: n.isoValue,
2740
+ "aria-hidden": n.ariaLabel != null || void 0,
2741
+ className: o,
2742
+ children: n.label
2743
+ }),
2744
+ n.ariaLabel != null && /* @__PURE__ */ F("span", {
2745
+ className: "sr-only",
2746
+ children: n.ariaLabel
2747
+ })
2748
+ ] })]
2749
+ })]
2750
+ }), r != null && /* @__PURE__ */ F(g, {
2751
+ className: "shrink-0 self-start",
2752
+ ariaLabel: i,
2753
+ onClose: () => r()
2754
+ })]
2755
+ });
2756
+ }, ln = (e) => {
2699
2757
  let [t, n] = V({
2700
2758
  text: e?.text,
2701
2759
  revision: e?.revision ?? 0
@@ -2710,11 +2768,11 @@ var $t = {
2710
2768
  messageRevision: t.revision,
2711
2769
  seedMessage: r
2712
2770
  };
2713
- }, rn = (e, t) => {
2771
+ }, un = (e, t) => {
2714
2772
  let n = B(e), r = B(t);
2715
2773
  r.current = t, R(() => {
2716
2774
  e !== n.current && (n.current = e, r.current());
2717
2775
  }, [e]);
2718
2776
  };
2719
2777
  //#endregion
2720
- 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 };
2778
+ 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 };