@epam/ai-dial-conversation-input 1.3.0-dev.33 → 1.3.0-dev.35

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