@factorialco/f0-react 16.37.2 → 16.39.0

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.
Files changed (66) hide show
  1. package/dist/{ArchiveThumbnail-CmxVg6Qg.js → ArchiveThumbnail-BuomQ0jm.js} +7 -7
  2. package/dist/{ArchiveViewer-Dh5Q8kqC.js → ArchiveViewer-Cb1a_yK5.js} +6 -6
  3. package/dist/{ChatPostComposerDialog-DZu6Ki0B.js → ChatPostComposerDialog-BgqLmmZS.js} +3 -3
  4. package/dist/{Check-C_yDxMGY.js → Check-Cg2vvL5g.js} +1 -1
  5. package/dist/{CoachmarkProvider--mh08dHJ.js → CoachmarkProvider-DXJ3wMBS.js} +14164 -14155
  6. package/dist/{CodeThumbnail-DL9mzI-m.js → CodeThumbnail-bnwIB0Q2.js} +1 -1
  7. package/dist/{CodeViewer-CgoiN8zP.js → CodeViewer-DVL3P-jF.js} +6 -6
  8. package/dist/{DocumentToolbar-DbY19x0N.js → DocumentToolbar-7s9QNMWY.js} +5 -5
  9. package/dist/{DocxViewer-B0yAaoyL.js → DocxViewer-Bn22Gst6.js} +3 -3
  10. package/dist/{Ellipsis-CQUxNnJr.js → Ellipsis-Bxq1iUUk.js} +1 -1
  11. package/dist/{ExternalLink-Fo1hQrhp.js → ExternalLink-0G_eeFcn.js} +1 -1
  12. package/dist/{F0AiProcessingOverlay-C-wJZY3B.js → F0AiProcessingOverlay-B6DLMrO7.js} +466 -466
  13. package/dist/{F0Alert-CjCxfO5U.js → F0Alert-m54uY33f.js} +6 -6
  14. package/dist/F0AudioPlayer-Ck9Vyjrb.js +2 -0
  15. package/dist/{F0Button-CRX5bM7l.js → F0Button-fMxOyyNk.js} +3 -3
  16. package/dist/{F0CanvasPanel-3UaFqQPm.js → F0CanvasPanel-CfPdTW_o.js} +8790 -8744
  17. package/dist/{F0DocumentViewer-CRM648IU.js → F0DocumentViewer-C_E6pFUZ.js} +4 -4
  18. package/dist/{F0DocumentViewer-xKhfg1xv.js → F0DocumentViewer-FuhnkhM-.js} +1 -1
  19. package/dist/{F0Map-Ba01T3fx.js → F0Map-ByX3wxFv.js} +70 -70
  20. package/dist/{F0Select-D6a3zqGM.js → F0Select-BCUynP2p.js} +769 -768
  21. package/dist/{F0Text-nln_5mr_.js → F0Text-CnmiWNAg.js} +2 -2
  22. package/dist/F0VideoPlayer-BshnHziC.js +1 -0
  23. package/dist/{F0VideoPlayer-DekywICI.js → F0VideoPlayer-DGHxduSr.js} +23 -23
  24. package/dist/{HtmlThumbnail-DLR_pxKp.js → HtmlThumbnail-Bo575heu.js} +1 -1
  25. package/dist/{HtmlViewer-CBctOpaY.js → HtmlViewer-Q3xUMpkP.js} +9 -9
  26. package/dist/{LayoutGroup-DjozJ14S.js → LayoutGroup-OcrcUDNP.js} +1 -1
  27. package/dist/{LockLocked-eJV3xZDn.js → LockLocked-BmvISDv1.js} +1 -1
  28. package/dist/{Map-Ci5Z-3Eg.js → Map-FBPV6r6b.js} +12 -12
  29. package/dist/{PdfThumbnail-E90M_nXl.js → PdfThumbnail-QkmwtnOA.js} +1 -1
  30. package/dist/{PdfViewer-CtDyKQNZ.js → PdfViewer-D4NjCixG.js} +8 -8
  31. package/dist/{SandboxedHtmlFrame-BVvitEn4.js → SandboxedHtmlFrame-4npl5pHT.js} +3 -3
  32. package/dist/{SheetViewer-CLy7Q01x.js → SheetViewer-RsRTbw7A.js} +6 -6
  33. package/dist/{TextViewer-D763I9Qq.js → TextViewer-BvwaMVDG.js} +4 -4
  34. package/dist/ai.d.ts +3 -3
  35. package/dist/ai.js +5 -5
  36. package/dist/component-status.js +4 -4
  37. package/dist/{createIcon-DRrxxnkK.js → createIcon-iM5M-dE_.js} +1 -1
  38. package/dist/{dist-CFLvAnX2.js → dist-CGYo25BY.js} +2 -2
  39. package/dist/{dist-CDjojOPL.js → dist-CUKjZKvr.js} +1 -1
  40. package/dist/{dist-B9Q5wICd.js → dist-CngBJJ6S.js} +4 -4
  41. package/dist/{dist-BB49d7CP.js → dist-D83RDDAb.js} +2 -2
  42. package/dist/{dist-BlR9WJJ8.js → dist-DDAe_kuu.js} +1 -1
  43. package/dist/experimental.d.ts +136 -30
  44. package/dist/experimental.js +7291 -6592
  45. package/dist/{exports-B363KqBU.d.ts → exports-DYl7Pf17.d.ts} +1 -1
  46. package/dist/f0.d.ts +5 -5
  47. package/dist/f0.js +1639 -1637
  48. package/dist/{highlight-D-UmcSng.js → highlight-CJDVXMe_.js} +7 -7
  49. package/dist/{i18n-provider-CnVpBH9I.js → i18n-provider-Bx71VZQH.js} +1 -1
  50. package/dist/{i18n-provider-defaults-Bh7XGTvG.d.ts → i18n-provider-defaults-BhcttUkN.d.ts} +44 -3
  51. package/dist/{i18n-provider-defaults-DCJs6SOs.js → i18n-provider-defaults-Dlzuk_lt.js} +38 -3
  52. package/dist/i18n-provider-defaults.d.ts +1 -1
  53. package/dist/i18n-provider-defaults.js +1 -1
  54. package/dist/{index-BWn4S6tf.d.ts → index-C7sLtTlR.d.ts} +47 -7
  55. package/dist/{index-BPqcoGhj.d.ts → index-DOU2q_xI.d.ts} +19 -8
  56. package/dist/{localized-7ETR3yDx.js → localized-DkdWx-Vy.js} +1 -1
  57. package/dist/{maplibre-toPNwSEp.js → maplibre-Dgbj9gtn.js} +1 -1
  58. package/dist/{pdfWorker-B4vsWnwd.js → pdfWorker-BlDYyNbC.js} +1 -1
  59. package/dist/{popover-gRMsK8nl.js → popover-BGv1b-fc.js} +1 -1
  60. package/dist/{skeleton-B2Nqp_5d.js → skeleton-BsSrazKY.js} +1 -1
  61. package/dist/styles.css +1 -1
  62. package/dist/{toolbarStyles-fzsbc4zM.js → toolbarStyles-DGeMchhq.js} +1 -1
  63. package/dist/{useData-i0Sxq9o0.js → useData-CmFkOA0P.js} +6 -6
  64. package/package.json +1 -1
  65. package/dist/F0AudioPlayer-2XYmhjAg.js +0 -2
  66. package/dist/F0VideoPlayer-MJe3t44z.js +0 -1
@@ -1,17 +1,17 @@
1
- import { a as e, r as t } from "./i18n-provider-CnVpBH9I.js";
2
- import { n, t as r } from "./skeleton-B2Nqp_5d.js";
1
+ import { a as e, r as t } from "./i18n-provider-Bx71VZQH.js";
2
+ import { n, t as r } from "./skeleton-BsSrazKY.js";
3
3
  import { L as i, R as a } from "./tooltip-NXXT56H4.js";
4
- import { H as o, O as s, X as c, b as l, h as u, j as d, n as f, q as p, r as m, t as h, v as g, z as _ } from "./F0Button-CRX5bM7l.js";
5
- import { $ as v, $i as y, Aa as b, An as x, Bn as S, Bt as C, C as w, Cc as T, Cn as E, D, Di as O, Dn as k, Dt as ee, E as te, Ea as ne, En as A, Et as j, F as M, Fl as N, Fn as P, Fs as re, Gl as ie, Go as ae, Gt as F, Hn as oe, Ht as se, I as ce, Il as le, In as ue, Is as I, J as de, Jn as L, Kl as R, L as fe, M as pe, Mt as me, N as he, Nn as ge, Ns as _e, Nt as ve, Oa as ye, Oc as z, Oi as be, Ot as xe, Pl as Se, Pn as Ce, Ps as we, Q as Te, Qn as Ee, Qs as De, R as Oe, Sn as ke, Ss as Ae, T as je, Ta as B, Tc as Me, Ut as V, Vn as Ne, Vt as Pe, Wo as Fe, Wt as Ie, X as Le, Y as Re, Yn as ze, Yo as H, Ys as Be, Yt as Ve, Z as He, _n as Ue, _t as We, a as Ge, at as Ke, b as qe, bt as Je, ci as Ye, cn as Xe, da as Ze, dl as Qe, dn as $e, dt as et, ec as tt, et as nt, fl as rt, fn as it, gc as at, gt as ot, ho as st, ht as ct, it as lt, jt as ut, kt as dt, l as ft, la as pt, lc as mt, ln as ht, ls as gt, lt as _t, mi as vt, mn as yt, mt as bt, nn as xt, o as St, q as Ct, qn as wt, r as Tt, rn as Et, s as Dt, sl as Ot, st as kt, tc as At, tt as jt, ua as Mt, ut as Nt, v as Pt, vi as Ft, vt as It, w as Lt, xc as Rt, xl as zt, xn as Bt, xt as Vt, y as Ht, yc as Ut, yn as Wt, yt as Gt, z as Kt, zn as qt } from "./F0CanvasPanel-3UaFqQPm.js";
6
- import { a as U, u as Jt } from "./createIcon-DRrxxnkK.js";
7
- import { t as Yt } from "./i18n-provider-defaults-DCJs6SOs.js";
8
- import { C as Xt, H as Zt, I as Qt, N as W, U as $t, _ as en, b as tn, g as nn, h as rn, k as an, u as on } from "./useData-i0Sxq9o0.js";
9
- import { Br as sn, Hn as cn, Ht as ln, Rr as un, Sn as dn, St as fn, Ur as pn, Vn as mn, Yt as hn, bt as gn, ft as _n, xt as vn, zr as yn } from "./F0Select-D6a3zqGM.js";
10
- import { t as bn } from "./Check-C_yDxMGY.js";
11
- import { t as xn } from "./Ellipsis-CQUxNnJr.js";
12
- import { t as Sn } from "./ExternalLink-Fo1hQrhp.js";
13
- import { $ as Cn, a as wn, i as Tn, n as En, t as Dn } from "./popover-gRMsK8nl.js";
14
- import { t as On } from "./F0Text-nln_5mr_.js";
4
+ import { H as o, O as s, X as c, b as l, h as u, j as d, n as f, q as p, r as m, t as h, v as g, z as _ } from "./F0Button-fMxOyyNk.js";
5
+ import { $ as v, Ai as y, An as b, C as x, D as S, Dt as C, E as w, Ec as T, En as E, Et as D, F as O, Gn as ee, Gt as te, Hn as k, I as A, In as j, Is as M, J as N, Jl as ne, Jo as P, Jt as F, Kt as re, L as ie, Ll as ae, Ln as oe, Ls as se, M as ce, Mt as le, N as ue, Na as de, Nn as fe, Nt as I, Oa as L, Oc as pe, Ot as me, Q as he, Qn as ge, Qo as _e, Qs as ve, Qt as ye, R as be, Rl as xe, Rn as R, Rs as Se, Sc as Ce, Sn as z, T as we, Tn as Te, Ts as Ee, Un as De, Ut as Oe, Wn as ke, Wt as Ae, X as je, Xn as Me, Y as B, Yl as Ne, Z as V, Zn as Pe, _i as Fe, _n as Ie, _t as Le, a as Re, an as ze, at as H, b as Be, bn as Ve, bt as He, di as Ue, dn as We, dt as Ge, et as Ke, fa as qe, fc as Je, fn as Ye, fs as Xe, gt as Ze, hl as Qe, hn as $e, ht as et, ic as tt, it as nt, ja as rt, jc as it, ji as at, jt as ot, ka as st, kn as ct, kt as lt, l as ut, lt as dt, ma as ft, ml as pt, mn as mt, mt as ht, na as gt, o as _t, on as vt, pa as yt, q as bt, qo as xt, qt as St, r as Ct, rc as wt, s as Tt, st as Et, tc as Dt, tr as Ot, tt as kt, ul as At, ut as jt, v as Mt, vo as Nt, vt as Pt, w as Ft, wc as It, wl as Lt, wn as Rt, xi as zt, xt as Bt, y as Vt, yc as Ht, yt as Ut, z as Wt, zl as Gt, zn as Kt, zs as qt } from "./F0CanvasPanel-CfPdTW_o.js";
6
+ import { a as U, u as Jt } from "./createIcon-iM5M-dE_.js";
7
+ import { t as Yt } from "./i18n-provider-defaults-Dlzuk_lt.js";
8
+ import { C as Xt, H as Zt, I as Qt, N as W, U as $t, _ as en, b as tn, g as nn, h as rn, k as an, u as on } from "./useData-CmFkOA0P.js";
9
+ import { Br as sn, Hn as cn, Ht as ln, Rr as un, Sn as dn, St as fn, Ur as pn, Vn as mn, Yt as hn, bt as gn, ft as _n, xt as vn, zr as yn } from "./F0Select-BCUynP2p.js";
10
+ import { t as bn } from "./Check-Cg2vvL5g.js";
11
+ import { t as xn } from "./Ellipsis-Bxq1iUUk.js";
12
+ import { t as Sn } from "./ExternalLink-0G_eeFcn.js";
13
+ import { $ as Cn, a as wn, i as Tn, n as En, t as Dn } from "./popover-BGv1b-fc.js";
14
+ import { t as On } from "./F0Text-CnmiWNAg.js";
15
15
  import { a as kn } from "./dist-DMTFO2gF.js";
16
16
  import { Children as An, Fragment as jn, createContext as Mn, createElement as Nn, forwardRef as Pn, isValidElement as Fn, memo as In, useCallback as G, useContext as Ln, useEffect as K, useId as Rn, useImperativeHandle as zn, useInsertionEffect as Bn, useLayoutEffect as Vn, useMemo as q, useRef as J, useState as Y } from "react";
17
17
  import { Fragment as Hn, jsx as X, jsxs as Z } from "react/jsx-runtime";
@@ -36,25 +36,25 @@ var Kn = [
36
36
  "sm",
37
37
  "md",
38
38
  "lg"
39
- ], Jn = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow transition-colors focus-within:border-f1-border", Yn = [], Xn = () => null, Zn = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: o = !1, maxLength: s, maxLengthError: l, error: u = null, labels: d, placeholders: m, placeholdersPaused: h, placeholderPreview: g, placeholderPreviewOneLine: _ = !1, role: v = "combobox", name: y, mentions: b, autocomplete: x, voice: S, onTextChange: C, onCleared: w, onEscape: E, onArrowUpWhenEmpty: D, onPasteFiles: O, pastePreferText: k = !1, onStateChange: ee, header: te, tray: ne, leading: A, toolbarStart: M, toolbarCenter: N, collapsible: P = !1, collapsed: re = !1, replacement: ie, asForm: ae = !1, className: F, surfaceRef: se, onSurfaceFocus: ce, onSurfaceBlur: le, handleRef: ue, reducedMotion: I = !1, "data-testid": de }) => {
40
- let L = It(d, S), R = ie != null, { error: fe, show: pe, clear: me } = We(), he = J(() => {}), ge = J(() => {}), _e = J(""), ve = G((e) => {
41
- let t = _e.current, n = t && !/\s$/.test(t) ? " " : "";
42
- he.current(`${t}${n}${e}`);
43
- }, []), ye = {
44
- "permission-denied": L.micPermissionDenied,
45
- "device-error": L.micError,
46
- "transcription-failed": L.transcriptionError
47
- }, z = ze({
39
+ ], Jn = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow transition-colors focus-within:border-f1-border", Yn = [], Xn = () => null, Zn = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: o = !1, maxLength: s, maxLengthError: l, error: u = null, labels: d, placeholders: m, placeholdersPaused: h, placeholderPreview: g, placeholderPreviewOneLine: _ = !1, role: v = "combobox", name: y, mentions: b, autocomplete: x, voice: S, onTextChange: C, onCleared: w, onEscape: E, onArrowUpWhenEmpty: O, onPasteFiles: te, pastePreferText: k = !1, onStateChange: A, header: j, tray: M, leading: N, toolbarStart: ne, toolbarCenter: P, collapsible: F = !1, collapsed: re = !1, replacement: ie, asForm: ae = !1, className: oe, surfaceRef: se, onSurfaceFocus: ce, onSurfaceBlur: le, handleRef: ue, reducedMotion: de = !1, "data-testid": fe }) => {
40
+ let I = Pt(d, S), L = ie != null, { error: pe, show: me, clear: he } = Le(), _e = J(() => {}), ve = J(() => {}), ye = J(""), be = G((e) => {
41
+ let t = ye.current, n = t && !/\s$/.test(t) ? " " : "";
42
+ _e.current(`${t}${n}${e}`);
43
+ }, []), xe = {
44
+ "permission-denied": I.micPermissionDenied,
45
+ "device-error": I.micError,
46
+ "transcription-failed": I.transcriptionError
47
+ }, R = ge({
48
48
  onTranscribe: S?.onTranscribe,
49
- onPartial: ve,
49
+ onPartial: be,
50
50
  onFinal: (e) => {
51
- ve(e), ge.current();
51
+ be(e), ve.current();
52
52
  },
53
- onError: (e) => pe(ye[e]),
53
+ onError: (e) => me(xe[e]),
54
54
  onAudio: S?.onAudio
55
- }), [be, xe] = Y(!1), Se = z.status === "recording", Ce = z.status === "transcribing", we = !!S && (!!S.onTranscribe || !!S.onAudio) && z.isSupported, Te = !S?.onAudio && (z.status !== "idle" || be), [Ee, De] = Y(!1), Oe = Je({
55
+ }), [Se, Ce] = Y(!1), z = R.status === "recording", we = R.status === "transcribing", Te = !!S && (!!S.onTranscribe || !!S.onAudio) && R.isSupported, Ee = !S?.onAudio && (R.status !== "idle" || Se), [De, Oe] = Y(!1), ke = He({
56
56
  mentions: {
57
- enabled: !!b && b.sources.length + +!!b.pinned > 0 && !Ee && !R,
57
+ enabled: !!b && b.sources.length + +!!b.pinned > 0 && !De && !L,
58
58
  sources: b?.sources ?? Yn,
59
59
  pinned: b?.pinned,
60
60
  scopeKey: b?.scopeKey,
@@ -62,55 +62,55 @@ var Kn = [
62
62
  },
63
63
  transformChange: x?.transformChange,
64
64
  onTextChange: C,
65
- historySuspended: Te
66
- }), { value: ke, setValue: Ae, setCursorPosition: je, textareaRef: B, highlightRef: Me, mentions: V, requestSelection: Ne, clearText: Pe, breakHistory: Fe } = Oe;
67
- he.current = (e) => {
68
- Ae(e), je(e.length);
65
+ historySuspended: Ee
66
+ }), { value: Ae, setValue: je, setCursorPosition: Me, textareaRef: B, highlightRef: Ne, mentions: V, requestSelection: Pe, clearText: Fe, breakHistory: Ie } = ke;
67
+ _e.current = (e) => {
68
+ je(e), Me(e.length);
69
69
  };
70
- let Ie = J(ke);
71
- Ie.current = ke;
72
- let Le = J(V.mentions);
73
- Le.current = V.mentions;
74
- let Re = (x?.useAutocomplete ?? Xn)(Oe), H = Re?.isOpen ?? !1, Be = V.dismissCurrentTrigger;
70
+ let Re = J(Ae);
71
+ Re.current = Ae;
72
+ let ze = J(V.mentions);
73
+ ze.current = V.mentions;
74
+ let H = (x?.useAutocomplete ?? Xn)(ke), Be = H?.isOpen ?? !1, Ve = V.dismissCurrentTrigger;
75
75
  K(() => {
76
- De(H), H && Be();
77
- }, [H, Be]);
78
- let { highlightSegments: Ve, hasOverlay: He } = Vt(Oe, { suppressGhost: H }), Ue = G((e) => {
76
+ Oe(Be), Be && Ve();
77
+ }, [Be, Ve]);
78
+ let { highlightSegments: Ue, hasOverlay: We } = Bt(ke, { suppressGhost: Be }), Ke = G((e) => {
79
79
  let t = B.current;
80
80
  if (!t) return;
81
81
  t.focus(e);
82
82
  let n = t.value.length;
83
83
  t.setSelectionRange(n, n);
84
84
  }, [B]);
85
- ge.current = () => B.current?.focus();
86
- let Ge = V.close;
85
+ ve.current = () => B.current?.focus();
86
+ let qe = V.close;
87
87
  K(() => {
88
- R && Ge();
89
- }, [R, Ge]);
90
- let Ke = ke.length === 0;
88
+ L && qe();
89
+ }, [L, qe]);
90
+ let Je = Ae.length === 0;
91
91
  K(() => {
92
- ee?.({
93
- isEmpty: Ke,
94
- recorder: z.status
92
+ A?.({
93
+ isEmpty: Je,
94
+ recorder: R.status
95
95
  });
96
96
  }, [
97
- ee,
98
- Ke,
99
- z.status
97
+ A,
98
+ Je,
99
+ R.status
100
100
  ]);
101
- let [qe, Ye] = Y(!1), Xe = s !== void 0 && ke.trim().length > s;
101
+ let [Ye, Xe] = Y(!1), $e = s !== void 0 && Ae.trim().length > s;
102
102
  K(() => {
103
- Xe || Ye(!1);
104
- }, [Xe]);
105
- let Ze = qe && Xe ? l ?? null : null, Qe = Ze ?? u ?? fe, [$e, tt] = Y(!1), nt = J(!1), it = ke.trim().length > 0 || a, at = it && !Te && !o && !$e && !R, st = t && !Ce, lt = G(() => {
106
- if (!at || nt.current) return;
107
- if (Xe) {
108
- Ye(!0);
103
+ $e || Xe(!1);
104
+ }, [$e]);
105
+ let tt = Ye && $e ? l ?? null : null, nt = tt ?? u ?? pe, [rt, it] = Y(!1), at = J(!1), ot = Ae.trim().length > 0 || a, st = ot && !Ee && !o && !rt && !L, ct = t && !we, lt = G(() => {
106
+ if (!st || at.current) return;
107
+ if ($e) {
108
+ Xe(!0);
109
109
  return;
110
110
  }
111
111
  V.close();
112
- let t = Ie.current, n = (e) => {
113
- !e && Ie.current === t && (Pe(), Fe()), B.current?.focus({ preventScroll: !0 });
112
+ let t = Re.current, n = (e) => {
113
+ !e && Re.current === t && (Fe(), Ie()), B.current?.focus({ preventScroll: !0 });
114
114
  }, r;
115
115
  try {
116
116
  r = e({
@@ -121,117 +121,117 @@ var Kn = [
121
121
  n(!0);
122
122
  return;
123
123
  }
124
- r instanceof Promise ? (nt.current = !0, tt(!0), r.then((e) => {
125
- nt.current = !1, tt(!1), n(e === !1);
124
+ r instanceof Promise ? (at.current = !0, it(!0), r.then((e) => {
125
+ at.current = !1, it(!1), n(e === !1);
126
126
  }, () => {
127
- nt.current = !1, tt(!1), n(!0);
127
+ at.current = !1, it(!1), n(!0);
128
128
  })) : n(r === !1);
129
129
  }, [
130
- at,
131
- Xe,
130
+ st,
131
+ $e,
132
132
  V,
133
133
  e,
134
- Pe,
135
134
  Fe,
135
+ Ie,
136
136
  B
137
137
  ]), ut = G(() => {
138
- be || (S?.onPress?.(), me(), xe(!0), (async () => {
138
+ Se || (S?.onPress?.(), he(), Ce(!0), (async () => {
139
139
  try {
140
- await z.start(), _e.current = Ie.current;
140
+ await R.start(), ye.current = Re.current;
141
141
  } catch {} finally {
142
- xe(!1);
142
+ Ce(!1);
143
143
  }
144
144
  })());
145
145
  }, [
146
- be,
146
+ Se,
147
147
  S,
148
- me,
149
- z
150
- ]), dt = z.cancel, ft = G(() => {
151
- dt(), S?.onCancelled?.();
152
- }, [dt, S]), pt = J(!1), mt = S?.onStarted;
148
+ he,
149
+ R
150
+ ]), ft = R.cancel, pt = G(() => {
151
+ ft(), S?.onCancelled?.();
152
+ }, [ft, S]), mt = J(!1), gt = S?.onStarted;
153
153
  K(() => {
154
- Se && !pt.current && mt?.(), pt.current = Se;
155
- }, [Se, mt]), zn(ue, () => ({
154
+ z && !mt.current && gt?.(), mt.current = z;
155
+ }, [z, gt]), zn(ue, () => ({
156
156
  focus: (e) => {
157
- R || Ue(e);
157
+ L || Ke(e);
158
158
  },
159
- clear: Pe,
160
- loadDraft: Oe.loadDraft,
159
+ clear: Fe,
160
+ loadDraft: ke.loadDraft,
161
161
  getDraft: () => ({
162
- text: Ie.current,
163
- mentions: Le.current
162
+ text: Re.current,
163
+ mentions: ze.current
164
164
  }),
165
165
  insertText: (e) => {
166
- let t = B.current, n = Ie.current, r = t?.selectionStart ?? n.length, i = t?.selectionEnd ?? n.length, a = r + e.length, o = n.slice(0, r) + e + n.slice(i);
167
- Ae(o), je(a), C?.(o), Ne(a, o, !0);
166
+ let t = B.current, n = Re.current, r = t?.selectionStart ?? n.length, i = t?.selectionEnd ?? n.length, a = r + e.length, o = n.slice(0, r) + e + n.slice(i);
167
+ je(o), Me(a), C?.(o), Pe(a, o, !0);
168
168
  },
169
- cancelRecording: dt,
170
- breakHistory: Fe,
169
+ cancelRecording: ft,
170
+ breakHistory: Ie,
171
171
  addFiles: () => {}
172
172
  }), [
173
- R,
174
- Ue,
175
- Pe,
176
- Oe.loadDraft,
173
+ L,
174
+ Ke,
175
+ Fe,
176
+ ke.loadDraft,
177
177
  B,
178
- Ae,
179
178
  je,
179
+ Me,
180
180
  C,
181
- Ne,
182
- dt,
183
- Fe
181
+ Pe,
182
+ ft,
183
+ Ie
184
184
  ]);
185
- let { escapeArmed: ht, handleClearKeyDown: gt, handleUndoRedoKeyDown: vt } = Oe, yt = (e) => {
185
+ let { escapeArmed: _t, handleClearKeyDown: vt, handleUndoRedoKeyDown: yt } = ke, bt = (e) => {
186
186
  if (e.key !== "Escape") return !1;
187
187
  if (E?.(e)) return !0;
188
- if (Se) return e.preventDefault(), ft(), !0;
189
- let t = ht;
190
- return gt(e) ? (t && (Ye(!1), w?.()), !0) : !1;
188
+ if (z) return e.preventDefault(), pt(), !0;
189
+ let t = _t;
190
+ return vt(e) ? (t && (Xe(!1), w?.()), !0) : !1;
191
191
  }, xt = (e) => {
192
- R || Gt(e) || vt(e) || Re?.handleKeyDown(e) || V.handleKeyDown(e) || yt(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && ke === "" && z.status === "idle" && !be && !S?.busy && D?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || lt()));
192
+ L || Ut(e) || yt(e) || H?.handleKeyDown(e) || V.handleKeyDown(e) || bt(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && Ae === "" && R.status === "idle" && !Se && !S?.busy && O?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || lt()));
193
193
  }, St = (e) => {
194
- e.preventDefault(), !R && (t && !Te ? (V.close(), n?.(), B.current?.focus()) : lt());
195
- }, Ct = _t({
196
- enabled: !!O && !R,
197
- onFiles: O ?? (() => {}),
194
+ e.preventDefault(), !L && (t && !Ee ? (V.close(), n?.(), B.current?.focus()) : lt());
195
+ }, Ct = dt({
196
+ enabled: !!te && !L,
197
+ onFiles: te ?? (() => {}),
198
198
  preferText: k
199
- }), wt = Rn(), Tt = Rn(), Et = `chat-composer-mentions-${wt.replace(/:/g, "")}`, Dt = V.isOpen && !H && !R && (V.isLoading || V.rows.length > 0), Ot = V.rows[V.selectedIndex] ?? V.rows[0], kt = Dt && Ot ? ot(Et, Ot.item) : void 0, At = (e) => we ? /* @__PURE__ */ X(f, {
199
+ }), wt = Rn(), Tt = Rn(), Et = `chat-composer-mentions-${wt.replace(/:/g, "")}`, Dt = V.isOpen && !Be && !L && (V.isLoading || V.rows.length > 0), Ot = V.rows[V.selectedIndex] ?? V.rows[0], kt = Dt && Ot ? Ze(Et, Ot.item) : void 0, At = (e) => Te ? /* @__PURE__ */ X(f, {
200
200
  type: "button",
201
201
  variant: "ghost",
202
202
  size: e,
203
203
  hideLabel: !0,
204
- label: S?.busy ? L.sendingVoice : L.recordAudio,
204
+ label: S?.busy ? I.sendingVoice : I.recordAudio,
205
205
  icon: T,
206
206
  onClick: ut,
207
207
  disabled: S?.disabled,
208
- loading: be || Ce || !!S?.busy
209
- }) : null, jt = et({
210
- streaming: st,
211
- hasDataToSend: it,
212
- canSend: at
213
- }), Mt = (e) => /* @__PURE__ */ X(Nt, {
214
- action: jt,
208
+ loading: Se || we || !!S?.busy
209
+ }) : null, Mt = Ge({
210
+ streaming: ct,
211
+ hasDataToSend: ot,
212
+ canSend: st
213
+ }), Nt = (e) => /* @__PURE__ */ X(jt, {
214
+ action: Mt,
215
215
  sendKind: r,
216
216
  size: e,
217
217
  submit: ae,
218
- labels: L,
218
+ labels: I,
219
219
  onSend: lt,
220
220
  onStop: () => {
221
221
  n?.(), B.current?.focus();
222
222
  }
223
- }), Pt = { duration: I ? 0 : .15 }, Ft = typeof M == "function" ? M(z.status) : M, Lt = /* @__PURE__ */ X("div", {
223
+ }), Ft = { duration: de ? 0 : .15 }, It = typeof ne == "function" ? ne(R.status) : ne, Lt = /* @__PURE__ */ X("div", {
224
224
  className: "grid",
225
225
  children: /* @__PURE__ */ X(c, {
226
226
  initial: !1,
227
- children: Se ? /* @__PURE__ */ Z(p.div, {
227
+ children: z ? /* @__PURE__ */ Z(p.div, {
228
228
  className: "flex items-center gap-3 pb-2 pl-3 pr-2 [grid-area:1/1]",
229
229
  initial: { opacity: 0 },
230
230
  animate: { opacity: 1 },
231
231
  exit: { opacity: 0 },
232
- transition: Pt,
233
- children: [/* @__PURE__ */ X(oe, {
234
- stream: z.stream,
232
+ transition: Ft,
233
+ children: [/* @__PURE__ */ X(ee, {
234
+ stream: R.stream,
235
235
  className: "min-w-0 flex-1"
236
236
  }), /* @__PURE__ */ Z("div", {
237
237
  className: "flex shrink-0 items-center gap-2",
@@ -240,17 +240,17 @@ var Kn = [
240
240
  variant: "outline",
241
241
  size: "md",
242
242
  hideLabel: !0,
243
- label: L.cancelRecording,
244
- icon: rt,
245
- onClick: ft
243
+ label: I.cancelRecording,
244
+ icon: Qe,
245
+ onClick: pt
246
246
  }), /* @__PURE__ */ X(f, {
247
247
  type: "button",
248
248
  variant: "default",
249
249
  size: "md",
250
250
  hideLabel: !0,
251
- label: L.confirmRecording,
251
+ label: I.confirmRecording,
252
252
  icon: bn,
253
- onClick: z.stop
253
+ onClick: R.stop
254
254
  })]
255
255
  })]
256
256
  }, "recording-row") : /* @__PURE__ */ Z(p.div, {
@@ -258,25 +258,25 @@ var Kn = [
258
258
  initial: { opacity: 0 },
259
259
  animate: { opacity: 1 },
260
260
  exit: { opacity: 0 },
261
- transition: Pt,
261
+ transition: Ft,
262
262
  children: [
263
- Ft ? /* @__PURE__ */ X("div", {
264
- className: i("flex items-center gap-1", N ? "shrink-0" : "min-w-0"),
265
- children: Ft
263
+ It ? /* @__PURE__ */ X("div", {
264
+ className: i("flex items-center gap-1", P ? "shrink-0" : "min-w-0"),
265
+ children: It
266
266
  }) : null,
267
- N ? /* @__PURE__ */ X("div", {
267
+ P ? /* @__PURE__ */ X("div", {
268
268
  className: "min-w-0 flex-1",
269
- children: N
269
+ children: P
270
270
  }) : null,
271
271
  /* @__PURE__ */ Z("div", {
272
272
  className: "ml-auto flex shrink-0 items-center gap-1",
273
- children: [At("md"), Mt("md")]
273
+ children: [At("md"), Nt("md")]
274
274
  })
275
275
  ]
276
276
  }, "actions-row")
277
277
  })
278
278
  }), Rt = {
279
- duration: I ? 0 : .32,
279
+ duration: de ? 0 : .32,
280
280
  ease: [
281
281
  .4,
282
282
  0,
@@ -284,59 +284,59 @@ var Kn = [
284
284
  1
285
285
  ]
286
286
  }, zt = /* @__PURE__ */ Z(Hn, { children: [
287
- te,
288
- /* @__PURE__ */ X(bt, {
289
- message: Qe,
287
+ j,
288
+ /* @__PURE__ */ X(ht, {
289
+ message: nt,
290
290
  id: Tt,
291
- reducedMotion: I
291
+ reducedMotion: de
292
292
  }),
293
- ne,
293
+ M,
294
294
  /* @__PURE__ */ Z("div", {
295
- className: i((A || re) && "flex items-end", re && "pr-3"),
295
+ className: i((N || re) && "flex items-end", re && "pr-3"),
296
296
  children: [
297
- A,
298
- /* @__PURE__ */ X(j, {
297
+ N,
298
+ /* @__PURE__ */ X(D, {
299
299
  className: "min-w-0 flex-1",
300
300
  textareaRef: B,
301
- highlightRef: Me,
302
- value: ke,
301
+ highlightRef: Ne,
302
+ value: Ae,
303
303
  role: v,
304
304
  name: y,
305
- ariaLabel: L.placeholder,
305
+ ariaLabel: I.placeholder,
306
306
  placeholder: m ? {
307
307
  mode: "overlay",
308
- texts: Se ? [L.listening] : m,
309
- fallback: Se ? L.listening : L.placeholder,
308
+ texts: z ? [I.listening] : m,
309
+ fallback: z ? I.listening : I.placeholder,
310
310
  paused: h,
311
- preview: Se ? void 0 : g,
311
+ preview: z ? void 0 : g,
312
312
  previewOneLine: _
313
313
  } : {
314
314
  mode: "native",
315
- text: Se ? L.listening : L.placeholder
315
+ text: z ? I.listening : I.placeholder
316
316
  },
317
- onChange: Oe.handleChange,
317
+ onChange: ke.handleChange,
318
318
  onKeyDown: xt,
319
319
  onPaste: Ct,
320
- onFocus: Re?.handleFocus,
321
- onBlur: Re?.handleBlur,
322
- onCursorUpdate: Oe.updateCursorPosition,
323
- onScroll: Oe.syncHighlightScroll,
324
- highlightSegments: Ve,
325
- hasOverlay: He,
326
- isAutocompleteOpen: H || Dt,
327
- autocompleteListboxId: H ? Re?.listboxId : Dt ? Et : void 0,
328
- activeAutocompleteOptionId: (H ? Re?.activeDescendantId : void 0) ?? kt,
329
- isInvalid: Ze !== null,
320
+ onFocus: H?.handleFocus,
321
+ onBlur: H?.handleBlur,
322
+ onCursorUpdate: ke.updateCursorPosition,
323
+ onScroll: ke.syncHighlightScroll,
324
+ highlightSegments: Ue,
325
+ hasOverlay: We,
326
+ isAutocompleteOpen: Be || Dt,
327
+ autocompleteListboxId: Be ? H?.listboxId : Dt ? Et : void 0,
328
+ activeAutocompleteOptionId: (Be ? H?.activeDescendantId : void 0) ?? kt,
329
+ isInvalid: tt !== null,
330
330
  errorMessageId: Tt
331
331
  }),
332
332
  re ? /* @__PURE__ */ Z("div", {
333
333
  className: "flex shrink-0 items-center gap-2 pb-[10px] pl-2",
334
334
  onMouseDown: (e) => e.preventDefault(),
335
- children: [At("sm"), Mt("sm")]
335
+ children: [At("sm"), Nt("sm")]
336
336
  }) : null
337
337
  ]
338
338
  }),
339
- P ? /* @__PURE__ */ X(c, {
339
+ F ? /* @__PURE__ */ X(c, {
340
340
  initial: !1,
341
341
  children: re ? null : /* @__PURE__ */ X(p.div, {
342
342
  className: "overflow-hidden",
@@ -356,12 +356,12 @@ var Kn = [
356
356
  children: Lt
357
357
  }, "action-row")
358
358
  }) : Lt
359
- ] }), Bt = /* @__PURE__ */ Z(Hn, { children: [
360
- Re?.popover,
361
- /* @__PURE__ */ X(ct, {
359
+ ] }), Vt = /* @__PURE__ */ Z(Hn, { children: [
360
+ H?.popover,
361
+ /* @__PURE__ */ X(et, {
362
362
  isOpen: Dt,
363
363
  listboxId: Et,
364
- label: L.mentionSuggestions,
364
+ label: I.mentionSuggestions,
365
365
  rows: V.rows,
366
366
  groups: V.groups,
367
367
  showGroupLabels: !!b?.showGroupLabels,
@@ -369,11 +369,11 @@ var Kn = [
369
369
  selectedIndex: V.selectedIndex,
370
370
  position: V.popoverPosition,
371
371
  onSelect: V.selectRow,
372
- pinnedDescription: L.mentionPinnedDescription
372
+ pinnedDescription: I.mentionPinnedDescription
373
373
  }),
374
374
  ie === void 0 ? zt : /* @__PURE__ */ X(c, {
375
375
  initial: !1,
376
- children: R ? /* @__PURE__ */ X(p.div, {
376
+ children: L ? /* @__PURE__ */ X(p.div, {
377
377
  className: "overflow-hidden",
378
378
  initial: {
379
379
  height: 0,
@@ -387,7 +387,7 @@ var Kn = [
387
387
  height: 0,
388
388
  opacity: 0,
389
389
  transition: {
390
- duration: I ? 0 : .22,
390
+ duration: de ? 0 : .22,
391
391
  ease: [
392
392
  .4,
393
393
  0,
@@ -397,7 +397,7 @@ var Kn = [
397
397
  }
398
398
  },
399
399
  transition: {
400
- duration: I ? 0 : .4,
400
+ duration: de ? 0 : .4,
401
401
  ease: [
402
402
  .4,
403
403
  0,
@@ -420,7 +420,7 @@ var Kn = [
420
420
  height: 0,
421
421
  opacity: 0,
422
422
  transition: {
423
- duration: I ? 0 : .15,
423
+ duration: de ? 0 : .15,
424
424
  ease: [
425
425
  .55,
426
426
  0,
@@ -430,7 +430,7 @@ var Kn = [
430
430
  }
431
431
  },
432
432
  transition: {
433
- duration: I ? 0 : .4,
433
+ duration: de ? 0 : .4,
434
434
  ease: [
435
435
  .4,
436
436
  0,
@@ -441,28 +441,28 @@ var Kn = [
441
441
  children: zt
442
442
  }, "input")
443
443
  })
444
- ] }), Ht = i(Jn, F);
444
+ ] }), Ht = i(Jn, oe);
445
445
  return ae ? /* @__PURE__ */ X("form", {
446
446
  ref: se,
447
- "data-testid": de,
447
+ "data-testid": fe,
448
448
  "data-f0-chat-composer": "",
449
449
  "aria-busy": t,
450
450
  className: Ht,
451
451
  onClick: () => {
452
- R || B.current?.focus();
452
+ L || B.current?.focus();
453
453
  },
454
454
  onFocus: ce,
455
455
  onBlur: le,
456
456
  onSubmit: St,
457
- children: Bt
457
+ children: Vt
458
458
  }) : /* @__PURE__ */ X("div", {
459
459
  ref: se,
460
- "data-testid": de,
460
+ "data-testid": fe,
461
461
  "data-f0-chat-composer": "",
462
462
  className: Ht,
463
463
  onFocus: ce,
464
464
  onBlur: le,
465
- children: Bt
465
+ children: Vt
466
466
  });
467
467
  };
468
468
  //#endregion
@@ -492,13 +492,13 @@ function Qn(e, t, n = .2) {
492
492
  //#endregion
493
493
  //#region src/addons/ai/F0AiChatTextArea/components/AttachedFilesList.tsx
494
494
  var $n = (e) => {
495
- let { provided: t } = ht();
496
- return t ? /* @__PURE__ */ X(er, { ...e }) : /* @__PURE__ */ X(Xe, { children: /* @__PURE__ */ X(er, { ...e }) });
495
+ let { provided: t } = Ye();
496
+ return t ? /* @__PURE__ */ X(er, { ...e }) : /* @__PURE__ */ X(We, { children: /* @__PURE__ */ X(er, { ...e }) });
497
497
  }, er = ({ attachedFiles: e, isUploading: n, onRemove: r, removeLabel: i, reducedMotion: a }) => {
498
498
  let o = t(), s = tr(e), c = q(() => e.flatMap((e) => {
499
499
  let t = s.get(e.id);
500
500
  if (!t) return [];
501
- let n = e.file.name, r = e.file.type || ke({
501
+ let n = e.file.name, r = e.file.type || Te({
502
502
  name: n,
503
503
  url: t
504
504
  });
@@ -523,10 +523,10 @@ var $n = (e) => {
523
523
  }];
524
524
  }), [e, s]), l = q(() => c.map(({ att: e, attachment: t }, n) => ({
525
525
  file: t,
526
- item: e.status === "uploaded" ? it(t, yt(n, t.url)) : null
527
- })), [c]), u = Re(l, "composer"), d = c.map(({ att: e, attachment: t }) => ({
526
+ item: e.status === "uploaded" ? $e(t, Ie(n, t.url)) : null
527
+ })), [c]), u = B(l, "composer"), d = c.map(({ att: e, attachment: t }) => ({
528
528
  id: e.id,
529
- content: /* @__PURE__ */ X(He, {
529
+ content: /* @__PURE__ */ X(V, {
530
530
  attachment: t,
531
531
  status: e.status === "uploaded" ? "ready" : e.status === "error" ? "error" : "uploading",
532
532
  errorMessage: e.errorMessage,
@@ -536,7 +536,7 @@ var $n = (e) => {
536
536
  testIdPrefix: "ai-chat"
537
537
  })
538
538
  }));
539
- return /* @__PURE__ */ X(Le, {
539
+ return /* @__PURE__ */ X(je, {
540
540
  items: d,
541
541
  label: o.t(e.length === 1 ? "chat.attachmentCount.one" : "chat.attachmentCount.other", { count: e.length }),
542
542
  busy: n,
@@ -566,14 +566,14 @@ var $n = (e) => {
566
566
  u(e), s?.(e);
567
567
  }, p = [...n ? [{
568
568
  label: c.ai.addFilesOrPhotos,
569
- icon: mt,
569
+ icon: Je,
570
570
  onClick: r,
571
571
  disabled: i,
572
572
  disabledTooltip: a
573
- }, ...e.length > 0 ? [{ type: "separator" }] : []] : [], ...de(e)];
573
+ }, ...e.length > 0 ? [{ type: "separator" }] : []] : [], ...N(e)];
574
574
  return /* @__PURE__ */ X("div", {
575
575
  onClick: (e) => e.stopPropagation(),
576
- children: /* @__PURE__ */ X(H, {
576
+ children: /* @__PURE__ */ X(_e, {
577
577
  items: p,
578
578
  align: "start",
579
579
  disabled: o,
@@ -606,7 +606,7 @@ var $n = (e) => {
606
606
  label: u.ai.attachFile,
607
607
  hideLabel: !0,
608
608
  type: "button",
609
- icon: mt,
609
+ icon: Je,
610
610
  variant: "ghost",
611
611
  size: "md",
612
612
  disabled: r || d,
@@ -637,7 +637,7 @@ var $n = (e) => {
637
637
  };
638
638
  }, ar = ({ creditWarning: e, children: n }) => {
639
639
  let r = t(), i = ir(e);
640
- return /* @__PURE__ */ X(Ct, {
640
+ return /* @__PURE__ */ X(bt, {
641
641
  notice: i,
642
642
  dismissLabel: r.ai.creditWarning.dismiss ?? "",
643
643
  className: "[&_form]:border-f1-border",
@@ -834,7 +834,7 @@ var mr = (e, t) => e || t ? {
834
834
  /* @__PURE__ */ X("div", {
835
835
  className: "flex items-center py-0.5",
836
836
  children: /* @__PURE__ */ X(U, {
837
- icon: Be,
837
+ icon: ve,
838
838
  size: "md",
839
839
  color: "default"
840
840
  })
@@ -849,7 +849,7 @@ var mr = (e, t) => e || t ? {
849
849
  variant: "ghost",
850
850
  label: r.ai.removeQuote,
851
851
  onClick: n,
852
- icon: rt,
852
+ icon: Qe,
853
853
  hideLabel: !0,
854
854
  size: "sm"
855
855
  })
@@ -858,7 +858,7 @@ var mr = (e, t) => e || t ? {
858
858
  });
859
859
  }, gr = ({ cards: e }) => e.length === 0 ? null : /* @__PURE__ */ X("div", {
860
860
  className: "grid w-full grid-cols-2 gap-3",
861
- children: e.slice(0, 4).map((e) => /* @__PURE__ */ X(y, {
861
+ children: e.slice(0, 4).map((e) => /* @__PURE__ */ X(gt, {
862
862
  avatar: {
863
863
  type: "icon",
864
864
  icon: e.icon
@@ -1002,91 +1002,91 @@ function Sr(e) {
1002
1002
  //#endregion
1003
1003
  //#region src/addons/ai/F0AiChatTextArea/AiChatComposer.tsx
1004
1004
  var Cr = "w-full max-w-content px-1";
1005
- function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: o, creditWarning: s, clarifyingUI: l, pendingContext: d = null, onPendingContextChange: f, pendingQuote: m = null, onPendingQuoteChange: h, fileAttachments: g, toolbarStart: _, composerActions: v, onComposerActionsOpenChange: y, onTranscribe: b, searchPersons: x, mentionSources: S, onProcessFilesRef: C, disclaimer: w, usageLimits: T, footer: E, isWelcomeScreen: D = !1, fullscreen: O = !1, welcomeScreenSuggestions: k, onSuggestionClick: te, welcomeScreenSuggestionsPlacement: ne = "above", welcomeScreenSuggestionsCollapsedByDefault: A = !1, welcomeScreenCards: j, padding: M = "default", name: N }) {
1006
- let P = t(), re = !!u(), ie = J(null), [ae, oe] = Y(!1), [se, ce] = Y({
1005
+ function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: o, creditWarning: s, clarifyingUI: l, pendingContext: d = null, onPendingContextChange: f, pendingQuote: m = null, onPendingQuoteChange: h, fileAttachments: g, toolbarStart: _, composerActions: v, onComposerActionsOpenChange: y, onTranscribe: b, searchPersons: x, mentionSources: S, onProcessFilesRef: w, disclaimer: T, usageLimits: E, footer: D, isWelcomeScreen: O = !1, fullscreen: ee = !1, welcomeScreenSuggestions: te, onSuggestionClick: k, welcomeScreenSuggestionsPlacement: A = "above", welcomeScreenSuggestionsCollapsedByDefault: j = !1, welcomeScreenCards: M, padding: N = "default", name: ne }) {
1006
+ let P = t(), ie = !!u(), ae = J(null), [oe, se] = Y(!1), [ce, ue] = Y({
1007
1007
  isEmpty: !0,
1008
1008
  recorder: "idle"
1009
- }), le = J(null), ue = J(null);
1009
+ }), de = J(null), fe = J(null);
1010
1010
  K(() => () => {
1011
- ue.current && clearTimeout(ue.current);
1011
+ fe.current && clearTimeout(fe.current);
1012
1012
  }, []);
1013
- let I = l != null, de = J(d), L = J(m);
1013
+ let I = l != null, L = J(d), pe = J(m);
1014
1014
  Vn(() => {
1015
- de.current = d, L.current = m;
1015
+ L.current = d, pe.current = m;
1016
1016
  });
1017
- let { tracking: R, setFocusChatInputFunction: fe } = F(), { attachedFiles: pe, fileInputRef: he, onUploadFiles: ge, acceptValue: _e, isAtMaxFiles: ve, maxFiles: ye, processFiles: z, handleFileSelect: be, handleRemoveFile: Se, transientError: Ce, showTransientError: we } = Sr(g), Te = vr({
1017
+ let { tracking: he, setFocusChatInputFunction: ge } = F(), { attachedFiles: _e, fileInputRef: ve, onUploadFiles: ye, acceptValue: be, isAtMaxFiles: xe, maxFiles: R, processFiles: Se, handleFileSelect: Ce, handleRemoveFile: z, transientError: we, showTransientError: Te } = Sr(g), Ee = vr({
1018
1018
  searchPersons: x,
1019
1019
  mentionSources: S
1020
1020
  });
1021
1021
  K(() => {
1022
- A || typeof window < "u" && window.location.hash.length === 0 && ie.current?.focus();
1022
+ j || typeof window < "u" && window.location.hash.length === 0 && ae.current?.focus();
1023
1023
  }, []), K(() => {
1024
- if (I) fe(null);
1025
- else return fe(() => {
1026
- ie.current?.focus();
1027
- }), () => fe(null);
1028
- }, [I, fe]), K(() => {
1029
- if (C) return C((e) => {
1030
- z(e);
1024
+ if (I) ge(null);
1025
+ else return ge(() => {
1026
+ ae.current?.focus();
1027
+ }), () => ge(null);
1028
+ }, [I, ge]), K(() => {
1029
+ if (w) return w((e) => {
1030
+ Se(e);
1031
1031
  }), () => {
1032
- C(null);
1032
+ w(null);
1033
1033
  };
1034
- }, [C, z]);
1035
- let Ee = G((e) => void z(e), [z]), De = pe.filter((e) => e.status === "uploaded"), Oe = pe.some((e) => e.status === "uploading"), ke = pe.some((e) => e.status === "error"), Ae = !se.isEmpty || De.length > 0, je = async ({ text: t, mentions: n }) => {
1036
- if (ke) return we(P.ai.fileUploadBlockedSubmit), !1;
1034
+ }, [w, Se]);
1035
+ let De = G((e) => void Se(e), [Se]), Oe = _e.filter((e) => e.status === "uploaded"), Ae = _e.some((e) => e.status === "uploading"), je = _e.some((e) => e.status === "error"), Me = !ce.isEmpty || Oe.length > 0, B = async ({ text: t, mentions: n }) => {
1036
+ if (je) return Te(P.ai.fileUploadBlockedSubmit), !1;
1037
1037
  if (a && await a() === !1) return !1;
1038
- let r = De, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = d, s = m;
1038
+ let r = Oe, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = d, s = m;
1039
1039
  o && f?.(null), s && h?.(null);
1040
1040
  try {
1041
1041
  await e({
1042
- text: me(t, n),
1042
+ text: le(t, n),
1043
1043
  files: i,
1044
1044
  context: o,
1045
1045
  quote: s
1046
1046
  });
1047
1047
  } catch {
1048
- return o && (de.current == null || de.current === o) && f?.(o), s && (L.current == null || L.current === s) && h?.(s), !1;
1048
+ return o && (L.current == null || L.current === o) && f?.(o), s && (pe.current == null || pe.current === s) && h?.(s), !1;
1049
1049
  }
1050
- for (let e of r) Se(e.id);
1050
+ for (let e of r) z(e.id);
1051
1051
  return !0;
1052
- }, B = ne === "inside", Me = V(), Pe = Ie({
1053
- onItemClick: te,
1054
- inBar: B
1055
- }), Fe = D && k && k.length > 0 && te ? /* @__PURE__ */ X(ee, {
1056
- suggestions: k,
1052
+ }, Ne = A === "inside", V = re(), Pe = St({
1053
+ onItemClick: k,
1054
+ inBar: Ne
1055
+ }), Fe = O && te && te.length > 0 && k ? /* @__PURE__ */ X(C, {
1056
+ suggestions: te,
1057
1057
  onItemClick: Pe.pick,
1058
1058
  onItemHover: Pe.preview,
1059
- side: B ? "bottom" : "top",
1060
- reserveTwoRows: !B,
1061
- overflow: B ? "scroll" : "wrap"
1062
- }) : null, Le = !A || ae || Ae || se.recorder !== "idle", Re = (e) => e instanceof Node ? le.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, ze = () => {
1063
- ue.current && clearTimeout(ue.current), ue.current = setTimeout(() => {
1064
- Re(document.activeElement) || oe(!1);
1059
+ side: Ne ? "bottom" : "top",
1060
+ reserveTwoRows: !Ne,
1061
+ overflow: Ne ? "scroll" : "wrap"
1062
+ }) : null, Ie = !j || oe || Me || ce.recorder !== "idle", Le = (e) => e instanceof Node ? de.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, Re = () => {
1063
+ fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => {
1064
+ Le(document.activeElement) || se(!1);
1065
1065
  }, 0);
1066
- }, H = B, Be = H && A, Ve = Be && !Le, He = H && Fe ? /* @__PURE__ */ X("div", {
1066
+ }, ze = Ne, H = ze && j, Be = H && !Ie, Ve = ze && Fe ? /* @__PURE__ */ X("div", {
1067
1067
  onClick: (e) => e.stopPropagation(),
1068
1068
  children: Fe
1069
- }) : void 0, Ue = {
1070
- duration: re ? 0 : .32,
1069
+ }) : void 0, He = {
1070
+ duration: ie ? 0 : .32,
1071
1071
  ease: [
1072
1072
  .4,
1073
1073
  0,
1074
1074
  .2,
1075
1075
  1
1076
1076
  ]
1077
- }, We = D && O && !!j && j.length > 0, Ge = O && D, Ke = Ge || !Me?.inBar, qe = Ge ? null : mr(w, T), Je = I || !!(qe?.text || qe?.trailing), { motionProps: Ye } = Qn(D, 160, .5);
1077
+ }, Ue = O && ee && !!M && M.length > 0, We = ee && O, Ge = We || !V?.inBar, Ke = We ? null : mr(T, E), qe = I || !!(Ke?.text || Ke?.trailing), { motionProps: Je } = Qn(O, 160, .5);
1078
1078
  return /* @__PURE__ */ Z(p.div, {
1079
- "data-composer-layout": Ge ? "welcome" : "docked",
1080
- className: i("flex flex-col items-center", M === "default" && "px-4 pb-3 pt-2", Ge && "min-h-0 flex-1 justify-start"),
1081
- ...O ? Ye : {},
1079
+ "data-composer-layout": We ? "welcome" : "docked",
1080
+ className: i("flex flex-col items-center", N === "default" && "px-4 pb-3 pt-2", We && "min-h-0 flex-1 justify-start"),
1081
+ ...ee ? Je : {},
1082
1082
  children: [
1083
1083
  /* @__PURE__ */ Z("div", {
1084
1084
  className: i("flex flex-col gap-2", Cr),
1085
1085
  children: [
1086
- E && !O ? E : null,
1087
- Fe && !B ? /* @__PURE__ */ X("div", { children: A ? /* @__PURE__ */ X(c, {
1086
+ D && !ee ? D : null,
1087
+ Fe && !Ne ? /* @__PURE__ */ X("div", { children: j ? /* @__PURE__ */ X(c, {
1088
1088
  initial: !1,
1089
- children: Le ? /* @__PURE__ */ X(p.div, {
1089
+ children: Ie ? /* @__PURE__ */ X(p.div, {
1090
1090
  className: "overflow-hidden",
1091
1091
  initial: {
1092
1092
  opacity: 0,
@@ -1100,7 +1100,7 @@ function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1100
1100
  opacity: 0,
1101
1101
  height: 0
1102
1102
  },
1103
- transition: Ue,
1103
+ transition: He,
1104
1104
  children: Fe
1105
1105
  }, "welcome-suggestions") : null
1106
1106
  }) : Fe }) : null,
@@ -1108,25 +1108,25 @@ function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1108
1108
  creditWarning: s,
1109
1109
  children: /* @__PURE__ */ X(Zn, {
1110
1110
  asForm: !0,
1111
- surfaceRef: le,
1112
- handleRef: ie,
1111
+ surfaceRef: de,
1112
+ handleRef: ae,
1113
1113
  className: "isolate z-20 items-stretch bg-f1-special-page-surface p-0 hover:cursor-text",
1114
1114
  replacement: I ? l : null,
1115
- onSurfaceFocus: () => oe(!0),
1116
- onSurfaceBlur: ze,
1117
- onStateChange: ce,
1118
- onSend: je,
1115
+ onSurfaceFocus: () => se(!0),
1116
+ onSurfaceBlur: Re,
1117
+ onStateChange: ue,
1118
+ onSend: B,
1119
1119
  inProgress: r,
1120
1120
  onStop: n,
1121
- hasAttachments: De.length > 0,
1122
- sendBlocked: Oe,
1123
- error: Ce,
1121
+ hasAttachments: Oe.length > 0,
1122
+ sendBlocked: Ae,
1123
+ error: we,
1124
1124
  role: "textbox",
1125
- name: N,
1125
+ name: ne,
1126
1126
  placeholders: o ?? [],
1127
1127
  placeholdersPaused: r,
1128
- placeholderPreview: Me?.prompt,
1129
- placeholderPreviewOneLine: Ke,
1128
+ placeholderPreview: V?.prompt,
1129
+ placeholderPreviewOneLine: Ge,
1130
1130
  labels: {
1131
1131
  placeholder: P.ai.inputPlaceholder,
1132
1132
  listening: P.ai.listening,
@@ -1141,80 +1141,80 @@ function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1141
1141
  mentionSuggestions: P.ai.mentions.suggestions
1142
1142
  },
1143
1143
  mentions: {
1144
- sources: Te,
1145
- showGroupLabels: Te.length > 1
1144
+ sources: Ee,
1145
+ showGroupLabels: Ee.length > 1
1146
1146
  },
1147
1147
  voice: b ? {
1148
1148
  onTranscribe: b,
1149
- onPress: R?.onDictationStart,
1150
- onCancelled: R?.onDictationCancel
1149
+ onPress: he?.onDictationStart,
1150
+ onCancelled: he?.onDictationCancel
1151
1151
  } : void 0,
1152
- onPasteFiles: g?.onUploadFiles ? Ee : void 0,
1152
+ onPasteFiles: g?.onUploadFiles ? De : void 0,
1153
1153
  pastePreferText: !0,
1154
1154
  header: m ? /* @__PURE__ */ X(hr, {
1155
1155
  quote: m,
1156
1156
  onRemove: () => h?.(null)
1157
1157
  }) : null,
1158
1158
  tray: /* @__PURE__ */ X($n, {
1159
- attachedFiles: pe,
1160
- isUploading: Oe,
1161
- onRemove: Se,
1159
+ attachedFiles: _e,
1160
+ isUploading: Ae,
1161
+ onRemove: z,
1162
1162
  removeLabel: P.ai.removeFile,
1163
- reducedMotion: re
1163
+ reducedMotion: ie
1164
1164
  }),
1165
- leading: H ? /* @__PURE__ */ X("div", {
1165
+ leading: ze ? /* @__PURE__ */ X("div", {
1166
1166
  className: "flex shrink-0 self-center pl-3",
1167
- children: /* @__PURE__ */ X(Ne, {
1167
+ children: /* @__PURE__ */ X(ke, {
1168
1168
  size: "sm",
1169
1169
  spin: r
1170
1170
  })
1171
1171
  }) : void 0,
1172
- toolbarStart: ge || _ || v?.length ? (e) => /* @__PURE__ */ Z(Hn, { children: [/* @__PURE__ */ X(rr, {
1173
- onUploadFiles: ge,
1172
+ toolbarStart: ye || _ || v?.length ? (e) => /* @__PURE__ */ Z(Hn, { children: [/* @__PURE__ */ X(rr, {
1173
+ onUploadFiles: ye,
1174
1174
  composerActions: v,
1175
1175
  onComposerActionsOpenChange: y,
1176
- isAtMaxFiles: ve,
1177
- maxFiles: ye,
1178
- acceptValue: _e,
1179
- fileInputRef: he,
1180
- handleFileSelect: be,
1176
+ isAtMaxFiles: xe,
1177
+ maxFiles: R,
1178
+ acceptValue: be,
1179
+ fileInputRef: ve,
1180
+ handleFileSelect: Ce,
1181
1181
  recordingStatus: e
1182
1182
  }), _ ? /* @__PURE__ */ X("div", {
1183
1183
  className: "min-w-0 cursor-default",
1184
1184
  onClick: (e) => e.stopPropagation(),
1185
1185
  children: _
1186
1186
  }) : null] }) : void 0,
1187
- toolbarCenter: He,
1188
- collapsible: Be,
1189
- collapsed: Ve,
1190
- reducedMotion: re
1187
+ toolbarCenter: Ve,
1188
+ collapsible: H,
1189
+ collapsed: Be,
1190
+ reducedMotion: ie
1191
1191
  })
1192
1192
  })
1193
1193
  ]
1194
1194
  }),
1195
1195
  /* @__PURE__ */ X("div", {
1196
- className: i("grid transition-collapse duration-base ease-out-swift motion-reduce:transition-none", Cr, Je ? "mt-2 grid-rows-expanded" : "mt-0 grid-rows-collapsed"),
1196
+ className: i("grid transition-collapse duration-base ease-out-swift motion-reduce:transition-none", Cr, qe ? "mt-2 grid-rows-expanded" : "mt-0 grid-rows-collapsed"),
1197
1197
  children: /* @__PURE__ */ X("div", {
1198
- className: i("flex min-h-0 min-w-0 flex-col items-center", !Je && "overflow-hidden"),
1199
- children: /* @__PURE__ */ X(xe, {
1198
+ className: i("flex min-h-0 min-w-0 flex-col items-center", !qe && "overflow-hidden"),
1199
+ children: /* @__PURE__ */ X(me, {
1200
1200
  hint: I ? {
1201
1201
  navigate: P.ai.clarifyingQuestion.navHint.navigate,
1202
1202
  select: P.ai.clarifyingQuestion.navHint.select,
1203
1203
  cancel: P.ai.clarifyingQuestion.navHint.cancel
1204
1204
  } : null,
1205
- disclaimer: qe,
1206
- reducedMotion: re,
1205
+ disclaimer: Ke,
1206
+ reducedMotion: ie,
1207
1207
  fieldInset: "button"
1208
1208
  })
1209
1209
  })
1210
1210
  }),
1211
- We ? /* @__PURE__ */ X("div", {
1211
+ Ue ? /* @__PURE__ */ X("div", {
1212
1212
  className: i("mt-2 pt-2", Cr),
1213
- children: /* @__PURE__ */ X(gr, { cards: j })
1213
+ children: /* @__PURE__ */ X(gr, { cards: M })
1214
1214
  }) : null,
1215
- E && D && O ? /* @__PURE__ */ X("div", {
1215
+ D && O && ee ? /* @__PURE__ */ X("div", {
1216
1216
  className: "mx-auto mt-2 flex w-full max-w-content justify-center py-4",
1217
- children: E
1217
+ children: D
1218
1218
  }) : null
1219
1219
  ]
1220
1220
  });
@@ -1226,7 +1226,7 @@ function Tr(e) {
1226
1226
  ...e,
1227
1227
  name: "one-ai-input"
1228
1228
  });
1229
- return se() ? t : /* @__PURE__ */ X(Pe, { children: t });
1229
+ return te() ? t : /* @__PURE__ */ X(Ae, { children: t });
1230
1230
  }
1231
1231
  //#endregion
1232
1232
  //#region src/addons/ai/markdown/typography.ts
@@ -1326,12 +1326,12 @@ function Vr({ children: e, ...t }) {
1326
1326
  //#endregion
1327
1327
  //#region src/addons/ai/markdown/Image.tsx
1328
1328
  function Hr({ src: e, alt: n, ...r }) {
1329
- let o = t(), s = ge(), c = Ce(), l = ue(e || void 0), [u, d] = Y(!1), [f, p] = Y(!1), m = n || (e ? Ue(e) : "") || "image";
1329
+ let o = t(), s = j(), c = oe(), l = Kt(e || void 0), [u, d] = Y(!1), [f, p] = Y(!1), m = n || (e ? Ve(e) : "") || "image";
1330
1330
  if (!e || u || l.status === "error") return n ? /* @__PURE__ */ X("span", {
1331
1331
  className: "text-f1-foreground-secondary",
1332
1332
  children: n
1333
1333
  }) : null;
1334
- let g = l.status === "ready" ? /* @__PURE__ */ X(x, {
1334
+ let g = l.status === "ready" ? /* @__PURE__ */ X(fe, {
1335
1335
  ...r,
1336
1336
  src: l.url,
1337
1337
  alt: n,
@@ -1359,7 +1359,7 @@ function Hr({ src: e, alt: n, ...r }) {
1359
1359
  variant: "neutral",
1360
1360
  label: o.chat.download,
1361
1361
  hideLabel: !0,
1362
- icon: Ot,
1362
+ icon: At,
1363
1363
  onClick: () => c(e, m)
1364
1364
  })
1365
1365
  })]
@@ -1468,7 +1468,7 @@ var Zr = (e) => Array.from(e.querySelector("tr")?.children ?? []), Qr = (e) => {
1468
1468
  //#endregion
1469
1469
  //#region src/addons/ai/markdown/useOneLineWidth.ts
1470
1470
  function ti(e, t) {
1471
- let n = J(null), r = B(), [i, a] = Y();
1471
+ let n = J(null), r = L(), [i, a] = Y();
1472
1472
  return Vn(function() {
1473
1473
  if (!t || !n.current) return;
1474
1474
  let e = parseFloat(getComputedStyle(n.current, "::before").width);
@@ -1496,11 +1496,11 @@ var ni = (e) => An.toArray(e).filter((e) => Fn(e)), ri = (e) => ni(e.props.child
1496
1496
  return t;
1497
1497
  };
1498
1498
  async function ai({ header: e, rows: t }, n, r) {
1499
- let i = (e.length > 0 ? [e, ...t] : t).map((e) => e.map((e) => Oe(Xr(e)))), a = n === "xlsx" ? await Kt([{
1499
+ let i = (e.length > 0 ? [e, ...t] : t).map((e) => e.map((e) => be(Xr(e)))), a = n === "xlsx" ? await Wt([{
1500
1500
  name: "Data",
1501
1501
  rows: i
1502
- }]) : await ce(i);
1503
- fe(a, `${r}.${n}`);
1502
+ }]) : await A(i);
1503
+ ie(a, `${r}.${n}`);
1504
1504
  }
1505
1505
  var oi = (e, t, n) => e ? {
1506
1506
  role: "region",
@@ -1508,32 +1508,32 @@ var oi = (e, t, n) => e ? {
1508
1508
  "aria-label": t || n
1509
1509
  } : {};
1510
1510
  function si({ children: e, title: n, ...r }) {
1511
- let o = t(), s = J(null), c = $r(s), l = c.left || c.right, d = u(), p = M(), m = (t) => {
1511
+ let o = t(), s = J(null), c = $r(s), l = c.left || c.right, d = u(), p = O(), m = (t) => {
1512
1512
  let r = n?.replace(/\s+/g, "_").toLowerCase() || "table";
1513
1513
  ai(ii(e), t, r);
1514
1514
  }, h = /* @__PURE__ */ Z("div", {
1515
1515
  className: "-ml-2 flex gap-1 pt-1",
1516
- children: [/* @__PURE__ */ X(H, {
1516
+ children: [/* @__PURE__ */ X(_e, {
1517
1517
  items: [{
1518
1518
  label: o.t("ai.dataDownload.download", { format: "Excel" }),
1519
- icon: Ot,
1519
+ icon: At,
1520
1520
  onClick: () => m("xlsx")
1521
1521
  }, {
1522
1522
  label: o.t("ai.dataDownload.download", { format: "CSV" }),
1523
- icon: Ot,
1523
+ icon: At,
1524
1524
  onClick: () => m("csv")
1525
1525
  }],
1526
1526
  children: /* @__PURE__ */ X(f, {
1527
1527
  variant: "ghost",
1528
1528
  size: "sm",
1529
- icon: Ot,
1529
+ icon: At,
1530
1530
  label: o.ai.dataDownload.title,
1531
1531
  className: "text-f1-foreground-secondary hover:text-f1-foreground"
1532
1532
  })
1533
1533
  }), l && (c.after > 0 || c.left) ? /* @__PURE__ */ X(f, {
1534
1534
  variant: "ghost",
1535
1535
  size: "sm",
1536
- icon: c.after > 0 ? Se : pn,
1536
+ icon: c.after > 0 ? ae : pn,
1537
1537
  iconPosition: c.after > 0 ? "right" : "left",
1538
1538
  label: c.after > 0 ? o.t(c.after === 1 ? "ai.aiTable.moreColumns.one" : "ai.aiTable.moreColumns.other", { count: c.after }) : o.ai.aiTable.backToStart,
1539
1539
  className: "text-f1-foreground-secondary hover:text-f1-foreground",
@@ -1564,7 +1564,7 @@ var ci = "border-0 border-b border-solid pr-4 text-left text-sm leading-4.5 @[56
1564
1564
  className: "after:invisible after:block after:h-0 after:w-max after:overflow-hidden after:content-[attr(data-floor)] first:after:max-w-44"
1565
1565
  }), di = "after:max-w-[min(20rem,40cqi)]", fi = i("[--cap:min(20rem,40cqi)]", "after:max-w-[calc(var(--cap)_-_(var(--cap)_-_min(6rem,var(--cap)))_*_max(0,sign(var(--one-line,0px)_-_var(--cap))))]", "before:invisible before:absolute before:end-full before:h-0 before:w-max before:overflow-hidden before:whitespace-nowrap before:content-[attr(data-floor)]");
1566
1566
  function pi({ children: e, ...t }) {
1567
- let { className: n, ...r } = ui(Xr(e)), a = M();
1567
+ let { className: n, ...r } = ui(Xr(e)), a = O();
1568
1568
  return /* @__PURE__ */ X("th", {
1569
1569
  ...r,
1570
1570
  ...t,
@@ -1573,7 +1573,7 @@ function pi({ children: e, ...t }) {
1573
1573
  });
1574
1574
  }
1575
1575
  function mi({ children: e, ellipsis: t = !1, ...n }) {
1576
- let r = Xr(e), { className: a, ...o } = ui(r), { cell: s, width: c } = ti(r, !t), l = M();
1576
+ let r = Xr(e), { className: a, ...o } = ui(r), { cell: s, width: c } = ti(r, !t), l = O();
1577
1577
  return /* @__PURE__ */ X("td", {
1578
1578
  ref: s,
1579
1579
  title: t && r || void 0,
@@ -1634,7 +1634,7 @@ function gi({ id: e, trigger: t, resolver: n, contentClassName: r = "w-64", ...a
1634
1634
  side: "top",
1635
1635
  align: "start",
1636
1636
  className: i(r, "rounded-2xl border-none bg-f1-background p-0 text-f1-foreground shadow-md"),
1637
- children: a.renderCard ? a.renderCard(o) : o.status === "loading" ? /* @__PURE__ */ X(y.Skeleton, {}) : /* @__PURE__ */ X(y, { ...o.status === "ready" ? a.mapToCard(o.data) : a.fallbackCard })
1637
+ children: a.renderCard ? a.renderCard(o) : o.status === "loading" ? /* @__PURE__ */ X(gt.Skeleton, {}) : /* @__PURE__ */ X(gt, { ...o.status === "ready" ? a.mapToCard(o.data) : a.fallbackCard })
1638
1638
  })]
1639
1639
  });
1640
1640
  }
@@ -1749,7 +1749,7 @@ function Si({ id: e, label: n }) {
1749
1749
  let { entityRefs: r } = F(), i = r?.resolvers?.expense, a = t(), o = r?.urls?.expense?.(e), s = q(() => (e) => ({
1750
1750
  avatar: {
1751
1751
  type: "icon",
1752
- icon: Ut
1752
+ icon: Ce
1753
1753
  },
1754
1754
  title: e.description || `Expense #${e.id}`,
1755
1755
  description: [e.amount, e.status].filter(Boolean).join(" · "),
@@ -1829,7 +1829,7 @@ function Ei({ id: e, label: t }) {
1829
1829
  resolver: r,
1830
1830
  contentClassName: "w-72",
1831
1831
  renderCard: (e) => {
1832
- if (e.status !== "ready") return /* @__PURE__ */ X(he, {
1832
+ if (e.status !== "ready") return /* @__PURE__ */ X(ue, {
1833
1833
  name: t,
1834
1834
  avatar: {
1835
1835
  type: "person",
@@ -1840,7 +1840,7 @@ function Ei({ id: e, label: t }) {
1840
1840
  profileHref: i
1841
1841
  });
1842
1842
  let n = e.data;
1843
- return /* @__PURE__ */ X(he, {
1843
+ return /* @__PURE__ */ X(ue, {
1844
1844
  name: `${n.firstName} ${n.lastName}`,
1845
1845
  avatar: {
1846
1846
  type: "person",
@@ -2095,7 +2095,7 @@ var Vi = (e) => typeof e == "object" && !!e, Q = (e) => typeof e == "string" &&
2095
2095
  return i ? `${r}.${i}` : r;
2096
2096
  }
2097
2097
  let n = t.split("?")[1], r = n ? new URLSearchParams(n.split("#")[0]).get("path") : null;
2098
- return Ue(r ?? t) || e || "file";
2098
+ return Ve(r ?? t) || e || "file";
2099
2099
  }, Ui = (e, t) => e.startsWith("data:") ? e : `data:${t ?? "application/octet-stream"};base64,${e}`, Wi = (e, t) => {
2100
2100
  let n = Q(e.data), r = Q(e.url) ?? (n ? Ui(n, t) : void 0);
2101
2101
  if (!r) return null;
@@ -2146,11 +2146,11 @@ var Vi = (e) => typeof e == "object" && !!e, Q = (e) => typeof e == "string" &&
2146
2146
  if (n.length !== 0) return t === "user" ? n[n.length - 1] : n.join("\n\n");
2147
2147
  }, Qi = (e, { urlFor: t } = {}) => ({
2148
2148
  url: e.url ?? t?.(e.path) ?? e.path,
2149
- name: e.displayName || Ue(e.path),
2149
+ name: e.displayName || Ve(e.path),
2150
2150
  mimeType: e.mimeType,
2151
2151
  size: e.bytes,
2152
2152
  previewUrl: e.preview ? t?.(e.preview.path) ?? e.preview.url : void 0
2153
- }), $i = (e) => ke(e) ?? "", ea = Mn(!1), ta = () => Ln(ea), na = (e, t) => {
2153
+ }), $i = (e) => Te(e) ?? "", ea = Mn(!1), ta = () => Ln(ea), na = (e, t) => {
2154
2154
  let [n, r] = Y(() => t ? null : new Set(e));
2155
2155
  return t && n !== null ? r(null) : !t && n === null && r(new Set(e)), (e) => e !== void 0 && n !== null && !n.has(e);
2156
2156
  }, ra = kn.settleMs, ia = 1e3, aa = 2, oa = "data-ai-anchor", sa = "data-turn-index", ca = (e) => {
@@ -2460,7 +2460,7 @@ function Fa(e) {
2460
2460
  return e && e.charAt(0).toUpperCase() + e.slice(1);
2461
2461
  }
2462
2462
  function Ia(e) {
2463
- let { days: t, hours: n, minutes: r, seconds: i } = vt(e), a = [];
2463
+ let { days: t, hours: n, minutes: r, seconds: i } = Fe(e), a = [];
2464
2464
  return t > 0 && a.push(`${t}d`), n > 0 && a.push(`${n}h`), r > 0 && a.push(`${r}m`), (i > 0 || a.length === 0) && a.push(`${i}s`), a.join(" ");
2465
2465
  }
2466
2466
  function La(e) {
@@ -2579,7 +2579,7 @@ function Va({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
2579
2579
  },
2580
2580
  children: y.length > 0 && !g ? /* @__PURE__ */ X("div", {
2581
2581
  className: "-mx-3 flex w-full flex-col overflow-hidden pb-1",
2582
- children: /* @__PURE__ */ X(D, {
2582
+ children: /* @__PURE__ */ X(S, {
2583
2583
  details: y.map((e) => ({
2584
2584
  title: e.label,
2585
2585
  content: e.content,
@@ -2596,7 +2596,7 @@ Va.displayName = "FormCard";
2596
2596
  //#endregion
2597
2597
  //#region src/addons/ai/F0AiMessagesContainer/components/ActiveFormCard.tsx
2598
2598
  function Ha() {
2599
- let e = Ee(), t = e?.activeForm;
2599
+ let e = Ot(), t = e?.activeForm;
2600
2600
  if (!t) return null;
2601
2601
  let n = t.cardTitle, r = t.cardDescription, i = (e?.getFillVersion(t.formName) ?? 0) > 0;
2602
2602
  return !n || !r || !i ? null : /* @__PURE__ */ X("div", {
@@ -2615,9 +2615,9 @@ function Ha() {
2615
2615
  //#endregion
2616
2616
  //#region src/addons/ai/F0AiFileAttachments/components/FileCanvasCards.tsx
2617
2617
  var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile: t, onCanvasUnavailable: n }) => {
2618
- let { canvasContent: r, tryOpenCanvas: i, dismissCanvas: a, panelOverlays: o } = F(), s = qt(), c = ta(), l = e.map((e) => e.file), u = (r, { fallback: a = !0 } = {}) => {
2618
+ let { canvasContent: r, tryOpenCanvas: i, dismissCanvas: a, panelOverlays: o } = F(), s = k(), c = ta(), l = e.map((e) => e.file), u = (r, { fallback: a = !0 } = {}) => {
2619
2619
  let o = e[r];
2620
- o && t?.(o.file, "document", { documentKind: o.documentKind }) !== !1 && !i(Dt({
2620
+ o && t?.(o.file, "document", { documentKind: o.documentKind }) !== !1 && !i(Tt({
2621
2621
  files: l,
2622
2622
  index: r,
2623
2623
  config: s
@@ -2637,7 +2637,7 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2637
2637
  className: "flex w-full max-w-sm flex-col gap-2",
2638
2638
  "data-testid": "ai-chat-file-canvas-cards",
2639
2639
  children: e.map(({ file: e }, t) => {
2640
- let n = ft(r, e.url);
2640
+ let n = ut(r, e.url);
2641
2641
  return /* @__PURE__ */ X("div", {
2642
2642
  "data-active": n || void 0,
2643
2643
  "data-testid": "ai-chat-file-canvas-card",
@@ -2651,7 +2651,7 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2651
2651
  }
2652
2652
  },
2653
2653
  title: e.name,
2654
- description: e.size ? Bt(e.size) : $e(e.name, $i(e)),
2654
+ description: e.size ? Rt(e.size) : mt(e.name, $i(e)),
2655
2655
  isActive: n,
2656
2656
  action: {
2657
2657
  type: "open",
@@ -2663,8 +2663,8 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2663
2663
  })
2664
2664
  });
2665
2665
  }, Ka = "rounded-xl", qa = "ai-chat", Ja = (e) => {
2666
- let { provided: t } = ht();
2667
- return t ? /* @__PURE__ */ X(Za, { ...e }) : /* @__PURE__ */ X(Xe, { children: /* @__PURE__ */ X(Za, { ...e }) });
2666
+ let { provided: t } = Ye();
2667
+ return t ? /* @__PURE__ */ X(Za, { ...e }) : /* @__PURE__ */ X(We, { children: /* @__PURE__ */ X(Za, { ...e }) });
2668
2668
  }, Ya = {
2669
2669
  image: 0,
2670
2670
  video: 1,
@@ -2672,11 +2672,11 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2672
2672
  audio: 3,
2673
2673
  file: 4
2674
2674
  }, Xa = (e) => e.bucket === "image" || e.bucket === "video" || e.bucket === "audio" || e.bucket === "document" ? e.bucket : "file", Za = ({ files: e, align: t = "start", onOpenFile: n, onFileDownloaded: r, size: i = "default", opensIn: a }) => {
2675
- let { remotePreviews: o } = ht(), s = Ve(), c = i === "default" && (a ?? (t === "start" && s ? "canvas" : "viewer")) === "canvas", [l, u] = Y(() => /* @__PURE__ */ new Set()), d = q(() => Qa(e, o, l), [
2675
+ let { remotePreviews: o } = Ye(), s = ye(), c = i === "default" && (a ?? (t === "start" && s ? "canvas" : "viewer")) === "canvas", [l, u] = Y(() => /* @__PURE__ */ new Set()), d = q(() => Qa(e, o, l), [
2676
2676
  e,
2677
2677
  o,
2678
2678
  l
2679
- ]), f = q(() => i === "compact" ? d : [...d].sort((e, t) => Ya[e.cls.bucket] - Ya[t.cls.bucket]), [d, i]), p = Re(f, "transcript");
2679
+ ]), f = q(() => i === "compact" ? d : [...d].sort((e, t) => Ya[e.cls.bucket] - Ya[t.cls.bucket]), [d, i]), p = B(f, "transcript");
2680
2680
  return e.length === 0 ? null : X(i === "compact" ? to : eo, {
2681
2681
  entries: d,
2682
2682
  canvas: c,
@@ -2689,12 +2689,12 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2689
2689
  onImageError: (e) => u((t) => new Set(t).add(e.url))
2690
2690
  });
2691
2691
  }, Qa = (e, t, n) => e.map((e, r) => {
2692
- let i = Wt(e), a = !(t || S(e.url)) || i.bucket === "file" || i.bucket === "image" && n.has(e.url);
2692
+ let i = z(e), a = !(t || De(e.url)) || i.bucket === "file" || i.bucket === "image" && n.has(e.url);
2693
2693
  return {
2694
2694
  file: e,
2695
2695
  cls: i,
2696
2696
  generic: a,
2697
- item: a ? null : it(e, yt(r, e.url))
2697
+ item: a ? null : $e(e, Ie(r, e.url))
2698
2698
  };
2699
2699
  }), $a = ({ align: e, compact: t = !1, children: n }) => /* @__PURE__ */ X("div", {
2700
2700
  className: i("flex w-full min-w-0 flex-col gap-1.5", e === "end" ? "items-end" : "items-start"),
@@ -2726,8 +2726,8 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2726
2726
  }) : null,
2727
2727
  c.map((e, t) => {
2728
2728
  let { file: n, cls: r } = e, i = `${n.name}-${t}`;
2729
- return r.bucket === "video" ? /* @__PURE__ */ X(w, {
2730
- file: k(n),
2729
+ return r.bucket === "video" ? /* @__PURE__ */ X(x, {
2730
+ file: b(n),
2731
2731
  cornerClass: "rounded-xl",
2732
2732
  testIdPrefix: qa,
2733
2733
  onDownloaded: () => s?.(n)
@@ -2735,8 +2735,8 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2735
2735
  }),
2736
2736
  f || t ? null : d.map((e, t) => {
2737
2737
  let { file: n, cls: i } = e;
2738
- return i.bucket === "document" ? /* @__PURE__ */ X(Ke, {
2739
- file: k(n),
2738
+ return i.bucket === "document" ? /* @__PURE__ */ X(H, {
2739
+ file: b(n),
2740
2740
  kind: i.kind,
2741
2741
  cornerClass: "rounded-xl",
2742
2742
  testIdPrefix: qa,
@@ -2748,8 +2748,8 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2748
2748
  onDownloaded: () => s?.(n)
2749
2749
  }, `${n.name}-${t}`) : null;
2750
2750
  }),
2751
- c.map((e, t) => e.cls.bucket === "audio" ? /* @__PURE__ */ X(je, {
2752
- file: k(e.file),
2751
+ c.map((e, t) => e.cls.bucket === "audio" ? /* @__PURE__ */ X(we, {
2752
+ file: b(e.file),
2753
2753
  testIdPrefix: qa,
2754
2754
  onDownloaded: () => s?.(e.file)
2755
2755
  }, `${e.file.name}-${t}`) : null),
@@ -2759,8 +2759,8 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2759
2759
  "data-testid": f ? `${qa}-file-shelf` : void 0,
2760
2760
  children: [g.length > 0 ? g.map((e, t) => {
2761
2761
  let { file: n, cls: i } = e;
2762
- return i.bucket === "document" ? /* @__PURE__ */ X(Ke, {
2763
- file: k(n),
2762
+ return i.bucket === "document" ? /* @__PURE__ */ X(H, {
2763
+ file: b(n),
2764
2764
  kind: i.kind,
2765
2765
  cornerClass: "rounded-xl",
2766
2766
  compact: !0,
@@ -2795,12 +2795,12 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2795
2795
  }, c) : s.bucket === "video" ? /* @__PURE__ */ X(ao, {
2796
2796
  file: i,
2797
2797
  onOpen: () => n(e)
2798
- }, c) : s.bucket === "audio" ? /* @__PURE__ */ X(te, {
2799
- file: k(i),
2798
+ }, c) : s.bucket === "audio" ? /* @__PURE__ */ X(w, {
2799
+ file: b(i),
2800
2800
  testIdPrefix: qa,
2801
2801
  onOpen: () => n(e)
2802
- }, c) : s.bucket === "document" ? /* @__PURE__ */ X(Ke, {
2803
- file: k(i),
2802
+ }, c) : s.bucket === "document" ? /* @__PURE__ */ X(H, {
2803
+ file: b(i),
2804
2804
  kind: s.kind,
2805
2805
  cornerClass: "rounded-xl",
2806
2806
  compact: !0,
@@ -2814,32 +2814,32 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2814
2814
  })
2815
2815
  })
2816
2816
  }), no = ({ file: e, onFileDownloaded: n }) => {
2817
- let r = t(), i = Ce(), a = $i(e);
2818
- return /* @__PURE__ */ X(kt, {
2817
+ let r = t(), i = oe(), a = $i(e);
2818
+ return /* @__PURE__ */ X(Et, {
2819
2819
  file: {
2820
2820
  ...e,
2821
2821
  mimeType: a
2822
2822
  },
2823
- icon: a === "application/zip" ? le : void 0,
2823
+ icon: a === "application/zip" ? Gt : void 0,
2824
2824
  testId: `${qa}-file-tile`,
2825
2825
  action: {
2826
2826
  label: r.t("chat.downloadNamedFile", { name: e.name }),
2827
- icon: Ot,
2827
+ icon: At,
2828
2828
  onClick: () => {
2829
2829
  i(e.url, e.name), n?.(e);
2830
2830
  }
2831
2831
  }
2832
2832
  });
2833
2833
  }, ro = "relative box-border h-[132px] w-[168px] shrink-0 overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background-secondary p-0 transition-opacity hover:opacity-90", io = ({ file: e, onOpen: n, onError: r }) => {
2834
- let o = t(), s = ue(e.thumbnailUrl ?? e.url);
2835
- return P(s.status, r), /* @__PURE__ */ X("button", {
2834
+ let o = t(), s = Kt(e.thumbnailUrl ?? e.url);
2835
+ return R(s.status, r), /* @__PURE__ */ X("button", {
2836
2836
  type: "button",
2837
2837
  onClick: n,
2838
2838
  draggable: !1,
2839
2839
  "aria-label": o.t("chat.openNamedDocument", { name: e.name }),
2840
2840
  className: i(ro, a()),
2841
2841
  "data-testid": "ai-chat-image-attachment",
2842
- children: s.status === "ready" ? /* @__PURE__ */ X(x, {
2842
+ children: s.status === "ready" ? /* @__PURE__ */ X(fe, {
2843
2843
  src: s.url,
2844
2844
  alt: e.name,
2845
2845
  draggable: !1,
@@ -2848,7 +2848,7 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2848
2848
  }) : null
2849
2849
  });
2850
2850
  }, ao = ({ file: e, onOpen: n }) => {
2851
- let r = t(), { urlCache: o } = qt(), s = ue(e.thumbnailUrl), c = !e.thumbnailUrl && o === null, [l, u] = Y(!1);
2851
+ let r = t(), { urlCache: o } = k(), s = Kt(e.thumbnailUrl), c = !e.thumbnailUrl && o === null, [l, u] = Y(!1);
2852
2852
  return /* @__PURE__ */ Z("button", {
2853
2853
  type: "button",
2854
2854
  onClick: n,
@@ -2859,20 +2859,20 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2859
2859
  url: e.url,
2860
2860
  posterUrl: s.status === "ready" ? s.url : void 0,
2861
2861
  onError: () => u(!0)
2862
- }) : null, /* @__PURE__ */ X(Te, {})]
2862
+ }) : null, /* @__PURE__ */ X(he, {})]
2863
2863
  });
2864
2864
  }, oo = ({ images: e, onOpen: n, onImageError: r }) => {
2865
- let a = t(), o = e.length === 1 ? e[0] : void 0, s = ue(o ? o.thumbnailUrl ?? o.url : void 0), c = qe(o && s.status === "ready" ? s.url : void 0, o) ?? void 0, l = o ? Ht(c?.width, c?.height) : null;
2865
+ let a = t(), o = e.length === 1 ? e[0] : void 0, s = Kt(o ? o.thumbnailUrl ?? o.url : void 0), c = Be(o && s.status === "ready" ? s.url : void 0, o) ?? void 0, l = o ? Vt(c?.width, c?.height) : null;
2866
2866
  return /* @__PURE__ */ X("div", {
2867
2867
  style: l ? { width: l.width } : void 0,
2868
- className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : lt, nt, Ka),
2868
+ className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : nt, Ke, Ka),
2869
2869
  "data-testid": "ai-chat-image-album",
2870
- children: Pt(c ? [c] : e).map((t, o, s) => {
2870
+ children: Mt(c ? [c] : e).map((t, o, s) => {
2871
2871
  let c = e[t.index];
2872
2872
  if (!c) return null;
2873
2873
  let l = o === s.length - 1;
2874
- return /* @__PURE__ */ X(Lt, {
2875
- image: A(c),
2874
+ return /* @__PURE__ */ X(Ft, {
2875
+ image: ct(c),
2876
2876
  aspectRatio: t.aspectRatio,
2877
2877
  spanFull: t.span === 2,
2878
2878
  inset: t.inset,
@@ -2888,7 +2888,7 @@ var Ua = 625, Wa = /* @__PURE__ */ new Set(), Ga = ({ documents: e, onOpenFile:
2888
2888
  testIdPrefix: qa,
2889
2889
  overlay: t.hiddenCount > 0 ? /* @__PURE__ */ X("span", {
2890
2890
  "aria-hidden": !0,
2891
- className: i("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse", jt),
2891
+ className: i("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse", kt),
2892
2892
  "data-testid": "ai-chat-image-album-more",
2893
2893
  children: `+${t.hiddenCount}`
2894
2894
  }) : void 0
@@ -2967,7 +2967,7 @@ function mo({ anchor: e, onReply: n }) {
2967
2967
  type: "button",
2968
2968
  variant: "ghost",
2969
2969
  label: c,
2970
- icon: De,
2970
+ icon: Dt,
2971
2971
  onClick: () => {
2972
2972
  n(e.text);
2973
2973
  }
@@ -2976,7 +2976,7 @@ function mo({ anchor: e, onReply: n }) {
2976
2976
  }
2977
2977
  //#endregion
2978
2978
  //#region src/addons/ai/F0AiMessagesContainer/components/AssistantMessage.tsx
2979
- var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(be, {
2979
+ var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(at, {
2980
2980
  content: e,
2981
2981
  format: "markdown"
2982
2982
  }), vo = ({ isGenerating: e, isLoading: t, isLive: n = !1, message: r, renderToolCall: i, onReplyQuote: a, onRendered: o, renderMarkdown: s }) => {
@@ -3041,7 +3041,7 @@ var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(be, {
3041
3041
  return document.addEventListener("keydown", e), () => {
3042
3042
  document.removeEventListener("keydown", e);
3043
3043
  };
3044
- }, [d]), /* @__PURE__ */ X(Ft, {
3044
+ }, [d]), /* @__PURE__ */ X(zt, {
3045
3045
  position: "center",
3046
3046
  isOpen: !0,
3047
3047
  onClose: f,
@@ -3058,7 +3058,7 @@ var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(be, {
3058
3058
  },
3059
3059
  children: /* @__PURE__ */ X("div", {
3060
3060
  className: "flex flex-col gap-6",
3061
- children: /* @__PURE__ */ X(Ye, {
3061
+ children: /* @__PURE__ */ X(Ue, {
3062
3062
  autoFocus: !0,
3063
3063
  label: l,
3064
3064
  placeholder: u,
@@ -3074,7 +3074,7 @@ var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(be, {
3074
3074
  return /* @__PURE__ */ Z("div", {
3075
3075
  className: i("-ml-2 -mt-1 flex items-center", !a && f === null && "opacity-0 transition-opacity duration-150 focus-within:opacity-100 group-hover/turn:opacity-100 motion-reduce:transition-none [@media(hover:none)]:opacity-100"),
3076
3076
  children: [
3077
- /* @__PURE__ */ X(O, {
3077
+ /* @__PURE__ */ X(y, {
3078
3078
  size: "md",
3079
3079
  variant: "ghost",
3080
3080
  valueToCopy: e,
@@ -3095,7 +3095,7 @@ var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(be, {
3095
3095
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
3096
3096
  children: /* @__PURE__ */ X(U, {
3097
3097
  size: "md",
3098
- icon: f === "like" ? _e : we,
3098
+ icon: f === "like" ? M : se,
3099
3099
  color: "default"
3100
3100
  })
3101
3101
  })
@@ -3113,7 +3113,7 @@ var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(be, {
3113
3113
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
3114
3114
  children: /* @__PURE__ */ X(U, {
3115
3115
  size: "md",
3116
- icon: f === "dislike" ? re : I,
3116
+ icon: f === "dislike" ? Se : qt,
3117
3117
  color: "default"
3118
3118
  })
3119
3119
  })
@@ -3130,7 +3130,7 @@ var ho = Mn(void 0), go = () => Ln(ho), _o = (e) => /* @__PURE__ */ X(be, {
3130
3130
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
3131
3131
  children: /* @__PURE__ */ X(U, {
3132
3132
  size: "md",
3133
- icon: N,
3133
+ icon: xe,
3134
3134
  color: "default"
3135
3135
  })
3136
3136
  })
@@ -3191,11 +3191,11 @@ function xo() {
3191
3191
  //#region src/addons/ai/F0AiMessagesContainer/components/rail.ts
3192
3192
  var So = "-ml-1 flex w-5 shrink-0 flex-col items-center", Co = "w-px shrink-0 bg-f1-border-secondary", wo = ({ icon: e, title: t, children: n, open: r, onOpenChange: a, disabled: o = !1 }) => {
3193
3193
  let s = u();
3194
- return /* @__PURE__ */ Z(pt, {
3194
+ return /* @__PURE__ */ Z(qe, {
3195
3195
  className: "mb-1 w-full",
3196
3196
  open: r,
3197
3197
  onOpenChange: a,
3198
- children: [/* @__PURE__ */ Z(Ze, {
3198
+ children: [/* @__PURE__ */ Z(ft, {
3199
3199
  disabled: o,
3200
3200
  className: i("group/rail flex w-full items-start gap-1.5 text-left text-base text-f1-foreground-secondary", !o && "transition-colors duration-150 hover:text-f1-foreground"),
3201
3201
  children: [e ? /* @__PURE__ */ X("span", {
@@ -3212,7 +3212,7 @@ var So = "-ml-1 flex w-5 shrink-0 flex-col items-center", Co = "w-px shrink-0 bg
3212
3212
  })
3213
3213
  })] })
3214
3214
  })]
3215
- }), /* @__PURE__ */ X(Mt, {
3215
+ }), /* @__PURE__ */ X(yt, {
3216
3216
  forceMount: !0,
3217
3217
  className: "data-[state=open]:mt-1.5",
3218
3218
  children: /* @__PURE__ */ X(p.div, {
@@ -3246,11 +3246,11 @@ function To({ step: e, last: t }) {
3246
3246
  className: "flex gap-1.5",
3247
3247
  children: [/* @__PURE__ */ Z("span", {
3248
3248
  className: i(So, "pt-0.5"),
3249
- children: [n ? /* @__PURE__ */ X(L, {
3249
+ children: [n ? /* @__PURE__ */ X(Pe, {
3250
3250
  variant: "thinking",
3251
3251
  size: 15
3252
3252
  }) : /* @__PURE__ */ X(U, {
3253
- icon: zt,
3253
+ icon: Lt,
3254
3254
  size: "sm",
3255
3255
  color: "secondary"
3256
3256
  }), t ? null : /* @__PURE__ */ X("span", {
@@ -3330,7 +3330,7 @@ var jo = (e, t) => {
3330
3330
  function Mo({ titles: e, isThinking: t, startedAt: n }) {
3331
3331
  let [r, a] = Y(!1), o = jo(e, t), s = o.length > 0, c = r && s, l = t && !c;
3332
3332
  return /* @__PURE__ */ X(wo, {
3333
- icon: l ? /* @__PURE__ */ X(L, {
3333
+ icon: l ? /* @__PURE__ */ X(Pe, {
3334
3334
  variant: "thinking",
3335
3335
  size: 15
3336
3336
  }) : null,
@@ -3372,12 +3372,12 @@ function Po({ turn: e }) {
3372
3372
  className: "flex items-start gap-1.5 text-f1-foreground-secondary",
3373
3373
  children: [/* @__PURE__ */ X("span", {
3374
3374
  className: i(So, "h-5 justify-center"),
3375
- children: /* @__PURE__ */ X(L, {
3375
+ children: /* @__PURE__ */ X(Pe, {
3376
3376
  variant: r,
3377
3377
  size: 15
3378
3378
  })
3379
3379
  }), e.status === "asking" ? /* @__PURE__ */ X("p", {
3380
- className: i("text-pretty leading-5", wt),
3380
+ className: i("text-pretty leading-5", Me),
3381
3381
  children: n.ai.askingQuestions
3382
3382
  }) : null]
3383
3383
  }) : null;
@@ -3424,7 +3424,7 @@ function Ro({ children: e }) {
3424
3424
  display: "flex",
3425
3425
  height: "5",
3426
3426
  alignItems: "center",
3427
- children: /* @__PURE__ */ X(U, { icon: Be })
3427
+ children: /* @__PURE__ */ X(U, { icon: ve })
3428
3428
  }), /* @__PURE__ */ Z("div", {
3429
3429
  className: "min-w-0 whitespace-pre-wrap text-base leading-5 [overflow-wrap:anywhere] [&>div]:flex [&>div]:flex-col [&>div]:gap-1 [&_p]:m-0",
3430
3430
  children: [/* @__PURE__ */ X("span", {
@@ -3478,7 +3478,7 @@ function Vo(e) {
3478
3478
  }
3479
3479
  //#endregion
3480
3480
  //#region src/addons/ai/F0AiMessagesContainer/components/UserMessage.tsx
3481
- var Ho = (e) => /* @__PURE__ */ X(be, {
3481
+ var Ho = (e) => /* @__PURE__ */ X(at, {
3482
3482
  content: e,
3483
3483
  format: "markdown"
3484
3484
  }), Uo = /[.,:;!?*_~]/, Wo = (e, t) => e.split(t).length - 1, Go = (e) => {
@@ -3496,9 +3496,9 @@ var Ho = (e) => /* @__PURE__ */ X(be, {
3496
3496
  target: "_blank",
3497
3497
  children: r
3498
3498
  }), e.slice(n)] }, t);
3499
- }, qo = (e, t) => ve(e).map((e, n) => n % 2 == 1 ? Ko(e, `${t}-${n}`) : e), Jo = (e) => /* @__PURE__ */ X("p", {
3499
+ }, qo = (e, t) => I(e).map((e, n) => n % 2 == 1 ? Ko(e, `${t}-${n}`) : e), Jo = (e) => /* @__PURE__ */ X("p", {
3500
3500
  className: "m-0",
3501
- children: ut(e).map((e, t) => e.kind === "text" ? qo(e.text, t) : /* @__PURE__ */ X(Fi, {
3501
+ children: ot(e).map((e, t) => e.kind === "text" ? qo(e.text, t) : /* @__PURE__ */ X(Fi, {
3502
3502
  type: e.type,
3503
3503
  id: e.id,
3504
3504
  typed: !0,
@@ -3509,7 +3509,7 @@ function Xo({ message: e, onReplyQuote: n, onCopy: r, autoScrollIntoView: a = !0
3509
3509
  let s = Vo(a), c = J(null), l = e?.content, u = e?.rawData, d = q(() => Xi({
3510
3510
  content: l,
3511
3511
  rawData: u
3512
- }), [l, u]), f = (Zi(l, "user") ?? "").trim(), p = e?.presentation, m = p?.kind === "notice", h = p?.kind === "answers" && p.questions.length > 0 ? p.questions : null, g = h !== null || f.length > 0, _ = t(), v = h ? h.map(({ question: e, answers: t }) => `${e}\n${Fo(t, _.ai.clarifyingQuestion.skipped)}`).join("\n\n") : dt(f), { anchor: y, clear: b } = uo({
3512
+ }), [l, u]), f = (Zi(l, "user") ?? "").trim(), p = e?.presentation, m = p?.kind === "notice", h = p?.kind === "answers" && p.questions.length > 0 ? p.questions : null, g = h !== null || f.length > 0, _ = t(), v = h ? h.map(({ question: e, answers: t }) => `${e}\n${Fo(t, _.ai.clarifyingQuestion.skipped)}`).join("\n\n") : lt(f), { anchor: b, clear: x } = uo({
3513
3513
  containerRef: c,
3514
3514
  enabled: g && !m
3515
3515
  });
@@ -3521,12 +3521,12 @@ function Xo({ message: e, onReplyQuote: n, onCopy: r, autoScrollIntoView: a = !0
3521
3521
  children: f
3522
3522
  })
3523
3523
  });
3524
- let x = o ?? Yo(f), S = o ?? Ho;
3524
+ let S = o ?? Yo(f), C = o ?? Ho;
3525
3525
  return /* @__PURE__ */ Z("div", {
3526
3526
  ref: s,
3527
3527
  className: "group/user-message my-4 flex w-full flex-col items-end gap-2 first:mt-0 last:mb-0",
3528
3528
  children: [
3529
- h ? h.length === 1 ? /* @__PURE__ */ X(Bo, { question: h[0].question }) : null : e?.replyQuote ? /* @__PURE__ */ X(Ro, { children: S(e.replyQuote) }) : null,
3529
+ h ? h.length === 1 ? /* @__PURE__ */ X(Bo, { question: h[0].question }) : null : e?.replyQuote ? /* @__PURE__ */ X(Ro, { children: C(e.replyQuote) }) : null,
3530
3530
  d.length > 0 ? /* @__PURE__ */ X("div", {
3531
3531
  className: "flex w-full max-w-[90%] justify-end",
3532
3532
  children: /* @__PURE__ */ X(so, {
@@ -3544,10 +3544,10 @@ function Xo({ message: e, onReplyQuote: n, onCopy: r, autoScrollIntoView: a = !0
3544
3544
  children: [/* @__PURE__ */ X("div", {
3545
3545
  ref: c,
3546
3546
  className: "whitespace-pre-wrap rounded-xl [overflow-wrap:anywhere] bg-f1-background-tertiary px-4 py-3 [&>div]:flex [&>div]:flex-col [&>div]:gap-3",
3547
- children: h ? /* @__PURE__ */ X(Lo, { questions: h }) : x(f)
3547
+ children: h ? /* @__PURE__ */ X(Lo, { questions: h }) : S(f)
3548
3548
  }), /* @__PURE__ */ X("div", {
3549
3549
  className: i("absolute bottom-0 right-full mr-1 flex", "opacity-0 transition-opacity duration-150 focus-within:opacity-100 group-hover/user-message:opacity-100 motion-reduce:transition-none [@media(hover:none)]:opacity-100"),
3550
- children: /* @__PURE__ */ X(O, {
3550
+ children: /* @__PURE__ */ X(y, {
3551
3551
  size: "md",
3552
3552
  variant: "ghost",
3553
3553
  valueToCopy: v,
@@ -3558,9 +3558,9 @@ function Xo({ message: e, onReplyQuote: n, onCopy: r, autoScrollIntoView: a = !0
3558
3558
  })]
3559
3559
  }) : null,
3560
3560
  /* @__PURE__ */ X(mo, {
3561
- anchor: y,
3561
+ anchor: b,
3562
3562
  onReply: (e) => {
3563
- n?.(e), b(), window.getSelection()?.removeAllRanges();
3563
+ n?.(e), x(), window.getSelection()?.removeAllRanges();
3564
3564
  }
3565
3565
  })
3566
3566
  ]
@@ -3586,7 +3586,7 @@ function Zo({ phrase: e, caption: t, onClick: n }) {
3586
3586
  //#endregion
3587
3587
  //#region src/addons/ai/F0AiChat/providers/useWelcomeRound.ts
3588
3588
  var Qo = () => {
3589
- let e = Ln(C), [t] = Y(() => e?.nextRound ?? 0), n = e?.claimRound;
3589
+ let e = Ln(Oe), [t] = Y(() => e?.nextRound ?? 0), n = e?.claimRound;
3590
3590
  return K(function() {
3591
3591
  n?.(t);
3592
3592
  }, [n, t]), t;
@@ -3595,7 +3595,7 @@ var Qo = () => {
3595
3595
  return () => t(null);
3596
3596
  }, [e, t]);
3597
3597
  }, es = ({ onItemClick: e, onItemHover: t }) => {
3598
- let { preview: n, pick: r } = Ie({ onItemClick: e }), i = g((e) => t?.(e));
3598
+ let { preview: n, pick: r } = St({ onItemClick: e }), i = g((e) => t?.(e));
3599
3599
  return {
3600
3600
  preview: G((e) => {
3601
3601
  n(e), i(e);
@@ -3663,7 +3663,7 @@ function cs({ prompts: { suggestions: e, onItemClick: t, onItemHover: n }, round
3663
3663
  flexDirection: "column",
3664
3664
  gap: "md",
3665
3665
  width: "full",
3666
- children: o.map(({ item: e, group: t, onOverflowChange: n }, r) => /* @__PURE__ */ X(St, {
3666
+ children: o.map(({ item: e, group: t, onOverflowChange: n }, r) => /* @__PURE__ */ X(_t, {
3667
3667
  label: e.title,
3668
3668
  icon: t.icon,
3669
3669
  onClick: () => a(e, t),
@@ -3733,20 +3733,20 @@ var ds = {
3733
3733
  onThumbsDown: () => {}
3734
3734
  }, fs = (e) => e?.status === "working" || e?.status === "answering";
3735
3735
  function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a, initialMessageCaption: o, initialMessageSubtitle: s, onWelcomeClick: l, welcomePrompts: u, renderToolCall: d, onReplyQuote: f, onAssistantMessageRendered: m, autoScrollUserIntoView: h = !0, renderMarkdown: g, feedback: _, freezeLayout: v = !1, noShadows: y = !1, children: b, AssistantMessage: x, UserMessage: S, onRegenerate: C, onCopy: w }) {
3736
- let { modal: T, handleSubmit: E, handleClose: D } = Bi(_ ?? ds), O = t(), k = x ?? vo, ee = S ?? Xo, te = a ?? O.ai.defaultInitialMessage, ne = !n && e.length === 0 && te !== "", A = J(null), j = J(null), M = J(null), N = J(null), { showScrollBtn: P, scrolledFromTop: re, turnMinHeight: ie, scrollToBottom: ae } = Ca({
3737
- viewportRef: A,
3738
- contentRef: j,
3739
- lastTurnRef: N,
3736
+ let { modal: T, handleSubmit: E, handleClose: D } = Bi(_ ?? ds), O = t(), ee = x ?? vo, te = S ?? Xo, k = a ?? O.ai.defaultInitialMessage, A = !n && e.length === 0 && k !== "", j = J(null), M = J(null), N = J(null), ne = J(null), { showScrollBtn: P, scrolledFromTop: F, turnMinHeight: re, scrollToBottom: ie } = Ca({
3737
+ viewportRef: j,
3738
+ contentRef: M,
3739
+ lastTurnRef: ne,
3740
3740
  turnsCount: e.length,
3741
3741
  isLoadingThread: n,
3742
3742
  lastTurnInProgress: fs(e.at(-1)),
3743
3743
  freezeTurnMinHeight: v
3744
3744
  });
3745
3745
  da({
3746
- viewportRef: A,
3747
- contentRef: j
3746
+ viewportRef: j,
3747
+ contentRef: M
3748
3748
  });
3749
- let F = e[e.length - 1], oe = F?.status === "working", se = fa(oe), ce = F?.status === "asking" ? O.ai.askingQuestions : oe ? F.thinking?.titles.at(-1) ?? O.ai.thinkingNow : "", le = na(e.flatMap((e) => e.assistantMessages.flatMap((e) => e.id ? [e.id] : [])), n), ue = (t, n) => {
3749
+ let ae = e[e.length - 1], oe = ae?.status === "working", se = fa(oe), le = ae?.status === "asking" ? O.ai.askingQuestions : oe ? ae.thinking?.titles.at(-1) ?? O.ai.thinkingNow : "", ue = na(e.flatMap((e) => e.assistantMessages.flatMap((e) => e.id ? [e.id] : [])), n), de = (t, n) => {
3750
3750
  let r = n === e.length - 1, i = fs(t), a = r && oe, o = t.thinking ?? (a ? { titles: [] } : null), s = t.assistantMessages.some(ms), c = {
3751
3751
  renderToolCall: d,
3752
3752
  onReplyQuote: f,
@@ -3759,39 +3759,39 @@ function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a
3759
3759
  inProgress: i,
3760
3760
  index: t,
3761
3761
  isCurrentMessage: !1,
3762
- AssistantMessage: k,
3763
- UserMessage: ee,
3762
+ AssistantMessage: ee,
3763
+ UserMessage: te,
3764
3764
  onRegenerate: C,
3765
3765
  onCopy: w,
3766
3766
  rawData: e.rawData || {},
3767
3767
  ...c
3768
3768
  };
3769
- return /* @__PURE__ */ X(ee, { ...r }, `${n}-u-${t}`);
3769
+ return /* @__PURE__ */ X(te, { ...r }, `${n}-u-${t}`);
3770
3770
  }, u = (e, a) => {
3771
3771
  let o = r && a === t.assistantMessages.length - 1, s = t.userMessages.length + a, l = {
3772
3772
  message: e,
3773
3773
  inProgress: i,
3774
3774
  index: s,
3775
3775
  isCurrentMessage: o,
3776
- AssistantMessage: k,
3777
- UserMessage: ee,
3776
+ AssistantMessage: ee,
3777
+ UserMessage: te,
3778
3778
  onRegenerate: C,
3779
3779
  onCopy: w,
3780
3780
  rawData: e.rawData || {},
3781
3781
  ...c
3782
3782
  };
3783
- return /* @__PURE__ */ X(k, {
3783
+ return /* @__PURE__ */ X(ee, {
3784
3784
  ...l,
3785
3785
  isGenerating: i && o,
3786
- isLive: i || le(e.id),
3786
+ isLive: i || ue(e.id),
3787
3787
  isLoading: i && o && !ms(e)
3788
3788
  }, `${n}-a-${a}`);
3789
3789
  };
3790
3790
  return /* @__PURE__ */ Z("div", {
3791
- ref: r ? N : void 0,
3791
+ ref: r ? ne : void 0,
3792
3792
  className: "group/turn flex flex-col items-start justify-start gap-2 px-1",
3793
3793
  [sa]: n,
3794
- style: { minHeight: r && ie || void 0 },
3794
+ style: { minHeight: r && re || void 0 },
3795
3795
  children: [
3796
3796
  t.userMessages.map((e, t) => l(e, t)),
3797
3797
  o || s ? /* @__PURE__ */ X("span", {
@@ -3824,32 +3824,32 @@ function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a
3824
3824
  /* @__PURE__ */ X("div", {
3825
3825
  role: "status",
3826
3826
  className: "sr-only",
3827
- children: ce
3827
+ children: le
3828
3828
  }),
3829
3829
  /* @__PURE__ */ X("div", {
3830
- ref: A,
3830
+ ref: j,
3831
3831
  className: i("flex-1 overflow-y-scroll [overflow-anchor:none]", "relative", "[mask-image:linear-gradient(to_top,transparent_var(--f0-ai-composer-overlap,0px),#000_var(--f0-ai-composer-overlap,0px))]", "scroll-pb-[var(--f0-ai-composer-overlap,0px)]", "scrollbar-on-hover"),
3832
3832
  children: /* @__PURE__ */ Z("div", {
3833
- ref: j,
3834
- className: i("flex min-h-full flex-col items-center px-4 pt-4", ne ? "pb-[calc(1rem+var(--f0-ai-composer-overlap,0px))]" : "pb-[calc(3rem+var(--f0-ai-composer-overlap,0px))]"),
3833
+ ref: M,
3834
+ className: i("flex min-h-full flex-col items-center px-4 pt-4", A ? "pb-[calc(1rem+var(--f0-ai-composer-overlap,0px))]" : "pb-[calc(3rem+var(--f0-ai-composer-overlap,0px))]"),
3835
3835
  children: [
3836
3836
  /* @__PURE__ */ Z("div", {
3837
- className: i(ne ? "flex flex-1 px-1" : "flex flex-col gap-6", "w-full max-w-content"),
3837
+ className: i(A ? "flex flex-1 px-1" : "flex flex-col gap-6", "w-full max-w-content"),
3838
3838
  children: [
3839
3839
  n ? /* @__PURE__ */ X(xo, {}) : null,
3840
- ne ? /* @__PURE__ */ X(us, {
3841
- phrase: te,
3840
+ A ? /* @__PURE__ */ X(us, {
3841
+ phrase: k,
3842
3842
  caption: o,
3843
3843
  subtitle: s,
3844
3844
  prompts: u,
3845
3845
  onClick: l
3846
3846
  }) : null,
3847
- n ? null : e.map((e, t) => ue(e, t)),
3847
+ n ? null : e.map((e, t) => de(e, t)),
3848
3848
  r
3849
3849
  ]
3850
3850
  }),
3851
3851
  /* @__PURE__ */ X("div", {
3852
- ref: M,
3852
+ ref: N,
3853
3853
  className: "h-px shrink-0",
3854
3854
  "aria-hidden": !0
3855
3855
  }),
@@ -3875,12 +3875,12 @@ function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a
3875
3875
  scale: .8
3876
3876
  },
3877
3877
  transition: { duration: .2 },
3878
- children: /* @__PURE__ */ X(pe, {
3878
+ children: /* @__PURE__ */ X(ce, {
3879
3879
  label: O.ai.scrollToBottom,
3880
- onClick: () => ae()
3880
+ onClick: () => ie()
3881
3881
  })
3882
3882
  }) : null }),
3883
- y ? null : /* @__PURE__ */ X(pa, { visible: re })
3883
+ y ? null : /* @__PURE__ */ X(pa, { visible: F })
3884
3884
  ]
3885
3885
  }), T.isOpen ? /* @__PURE__ */ X(yo, {
3886
3886
  onSubmit: E,
@@ -3893,8 +3893,8 @@ var ms = (e) => !!Zi(e.content) || Xi(e).length > 0;
3893
3893
  //#endregion
3894
3894
  //#region src/addons/ai/F0AiMessagesContainer/F0AiMessagesContainer.tsx
3895
3895
  function hs(e) {
3896
- let t = ht(), n = /* @__PURE__ */ X(Ri, { children: /* @__PURE__ */ X(ps, { ...e }) });
3897
- return e.filePreviews || !t.provided ? /* @__PURE__ */ X(Xe, {
3896
+ let t = Ye(), n = /* @__PURE__ */ X(Ri, { children: /* @__PURE__ */ X(ps, { ...e }) });
3897
+ return e.filePreviews || !t.provided ? /* @__PURE__ */ X(We, {
3898
3898
  filePreviews: e.filePreviews,
3899
3899
  children: n
3900
3900
  }) : n;
@@ -4164,7 +4164,7 @@ var Ds = [
4164
4164
  onClick: c,
4165
4165
  label: l.actions.cancel,
4166
4166
  hideLabel: !0,
4167
- icon: rt
4167
+ icon: Qe
4168
4168
  })
4169
4169
  ]
4170
4170
  });
@@ -4172,17 +4172,17 @@ var Ds = [
4172
4172
  clarifyingQuestion: e,
4173
4173
  isSubmitDisabled: t
4174
4174
  }), Rs = ({ clarifyingQuestion: e, isSubmitDisabled: n }) => {
4175
- let r = t(), i = u(), { currentStep: a, currentStepIndex: o, totalSteps: s, toggleOption: l, confirm: d, skip: f, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = a, D = J(null), O = S ?? "single", k = s > 1, ee = o === 0, te = o === s - 1, ne = k ? r.t("ai.clarifyingQuestion.stepOf", {
4175
+ let r = t(), i = u(), { currentStep: a, currentStepIndex: o, totalSteps: s, toggleOption: l, confirm: d, skip: f, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = a, D = J(null), O = S ?? "single", ee = s > 1, te = o === 0, k = o === s - 1, A = ee ? r.t("ai.clarifyingQuestion.stepOf", {
4176
4176
  current: String(o + 1),
4177
4177
  total: String(s)
4178
- }) : void 0, A = x.length > 0, j = (T ?? "").trim().length > 0, M = A || E && j || C === !0, N = n === !0 && te, P = () => {
4179
- N || d();
4180
- }, re = () => {
4181
- N || f();
4182
- }, ie = (e) => {
4178
+ }) : void 0, j = x.length > 0, M = (T ?? "").trim().length > 0, N = j || E && M || C === !0, ne = n === !0 && k, P = () => {
4179
+ ne || d();
4180
+ }, F = () => {
4181
+ ne || f();
4182
+ }, re = (e) => {
4183
4183
  let t = O === "single" && x.includes(e);
4184
- l(e), O === "single" && !te && !t && Promise.resolve().then(d);
4185
- }, ae = te ? r.ai.clarifyingQuestion.submit : r.ai.clarifyingQuestion.next, F = C === !0 && !A && !(E && j), oe = () => {
4184
+ l(e), O === "single" && !k && !t && Promise.resolve().then(d);
4185
+ }, ie = k ? r.ai.clarifyingQuestion.submit : r.ai.clarifyingQuestion.next, ae = C === !0 && !j && !(E && M), oe = () => {
4186
4186
  v(), requestAnimationFrame(() => {
4187
4187
  D.current?.focus();
4188
4188
  });
@@ -4216,10 +4216,10 @@ var Ds = [
4216
4216
  },
4217
4217
  children: [/* @__PURE__ */ X(Ns, {
4218
4218
  question: y,
4219
- stepLabel: ne,
4220
- isFirstStep: ee,
4221
- isFinalStep: te,
4222
- canProceed: M,
4219
+ stepLabel: A,
4220
+ isFirstStep: te,
4221
+ isFinalStep: k,
4222
+ canProceed: N,
4223
4223
  onBack: h,
4224
4224
  onNext: d,
4225
4225
  onCancel: m
@@ -4229,13 +4229,13 @@ var Ds = [
4229
4229
  options: b,
4230
4230
  selectedOptionIds: x,
4231
4231
  allowCustomAnswer: w,
4232
- hasSelection: A,
4233
- hasCustomText: j,
4232
+ hasSelection: j,
4233
+ hasCustomText: M,
4234
4234
  customAnswerText: T,
4235
4235
  isCustomAnswerActive: E,
4236
- canProceed: M,
4236
+ canProceed: N,
4237
4237
  customInputRef: D,
4238
- onToggleOption: ie,
4238
+ onToggleOption: re,
4239
4239
  onActivateCustom: oe,
4240
4240
  onChangeCustomText: g,
4241
4241
  onToggleCustomActive: _,
@@ -4244,12 +4244,12 @@ var Ds = [
4244
4244
  }, o)
4245
4245
  })
4246
4246
  }), /* @__PURE__ */ X(Ss, {
4247
- canProceed: M,
4248
- submitDisabled: N,
4249
- label: ae,
4247
+ canProceed: N,
4248
+ submitDisabled: ne,
4249
+ label: ie,
4250
4250
  onConfirm: P,
4251
- onSkip: re,
4252
- showSkip: F
4251
+ onSkip: F,
4252
+ showSkip: ae
4253
4253
  })]
4254
4254
  });
4255
4255
  };
@@ -4575,13 +4575,13 @@ var Ks = class {
4575
4575
  repeatType: "mirror"
4576
4576
  };
4577
4577
  function $s(e) {
4578
- let [t, n] = Y(e), r = R(e), i = J(null);
4578
+ let [t, n] = Y(e), r = Ne(e), i = J(null);
4579
4579
  return Gn(r, "change", (e) => n(e)), {
4580
4580
  value: t,
4581
4581
  motionValue: r,
4582
4582
  controls: i,
4583
4583
  animate: G((e, t) => {
4584
- i.current = ie(r, e, t);
4584
+ i.current = ne(r, e, t);
4585
4585
  }, [r])
4586
4586
  };
4587
4587
  }
@@ -4851,9 +4851,9 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4851
4851
  Array.isArray(i.value) || (i.value = []);
4852
4852
  let a = i.value;
4853
4853
  a[t * 3] = n * l, a[t * 3 + 1] = r * l, a[t * 3 + 2] = 0;
4854
- }, k = () => {
4855
- p.current && (m.current = p.current.getContext("webgl", s) || p.current.getContext("experimental-webgl", s), m.current?.getExtension("OES_standard_derivatives"), m.current?.getExtension("EXT_shader_texture_lod"));
4856
4854
  }, ee = () => {
4855
+ p.current && (m.current = p.current.getContext("webgl", s) || p.current.getContext("experimental-webgl", s), m.current?.getExtension("OES_standard_derivatives"), m.current?.getExtension("EXT_shader_texture_lod"));
4856
+ }, te = () => {
4857
4857
  let e = m.current;
4858
4858
  h.current = e?.createBuffer() ?? null, e?.bindBuffer(e.ARRAY_BUFFER, h.current), e?.bufferData(e.ARRAY_BUFFER, new Float32Array([
4859
4859
  1,
@@ -4869,19 +4869,19 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4869
4869
  -1,
4870
4870
  0
4871
4871
  ]), e.STATIC_DRAW);
4872
- }, te = ({ alpha: e, beta: t, gamma: n }) => {
4872
+ }, k = ({ alpha: e, beta: t, gamma: n }) => {
4873
4873
  E.current.iDeviceOrientation.value = [
4874
4874
  e ?? 0,
4875
4875
  t ?? 0,
4876
4876
  n ?? 0,
4877
4877
  window.orientation ?? 0
4878
4878
  ];
4879
- }, ne = (e) => {
4879
+ }, A = (e) => {
4880
4880
  let [t = 0, n = 0] = Dc(e), r = t - (b.current?.left ?? 0) - window.pageXOffset, i = (b.current?.height ?? 0) - n - (b.current?.top ?? 0) - window.pageYOffset;
4881
4881
  y.current = !0;
4882
4882
  let a = Array.isArray(E.current.iMouse?.value) ? E.current.iMouse.value : void 0;
4883
4883
  a && (a[2] = r, a[3] = i), S.current[0] = r, S.current[1] = i;
4884
- }, A = (e) => {
4884
+ }, j = (e) => {
4885
4885
  b.current = p.current?.getBoundingClientRect();
4886
4886
  let [t = 0, n = 0] = Dc(e), r = t - (b.current?.left ?? 0), i = (b.current?.height ?? 0) - n - (b.current?.top ?? 0);
4887
4887
  if (c !== 1) S.current[0] = r, S.current[1] = i;
@@ -4889,10 +4889,10 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4889
4889
  let e = Array.isArray(E.current.iMouse?.value) ? E.current.iMouse.value : void 0;
4890
4890
  e && (e[0] = r, e[1] = i);
4891
4891
  }
4892
- }, j = () => {
4892
+ }, M = () => {
4893
4893
  let e = Array.isArray(E.current.iMouse?.value) ? E.current.iMouse.value : void 0;
4894
4894
  e && (e[2] = 0, e[3] = 0);
4895
- }, M = () => {
4895
+ }, N = () => {
4896
4896
  let e = m.current;
4897
4897
  if (!e) return;
4898
4898
  b.current = p.current?.getBoundingClientRect();
@@ -4901,7 +4901,7 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4901
4901
  let t = e.getUniformLocation(g.current, uc);
4902
4902
  e.uniform2fv(t, [e.canvas.width, e.canvas.height]);
4903
4903
  }
4904
- }, N = (e, t) => {
4904
+ }, ne = (e, t) => {
4905
4905
  let n = m.current;
4906
4906
  if (!n) return null;
4907
4907
  let r = n.createShader(e);
@@ -4915,9 +4915,9 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4915
4915
  }, P = (e, t) => {
4916
4916
  let n = m.current;
4917
4917
  if (!n) return;
4918
- let r = N(n.FRAGMENT_SHADER, e), i = N(n.VERTEX_SHADER, t);
4918
+ let r = ne(n.FRAGMENT_SHADER, e), i = ne(n.VERTEX_SHADER, t);
4919
4919
  g.current = n.createProgram(), g.current && i && r && (n.attachShader(g.current, i), n.attachShader(g.current, r), n.linkProgram(g.current), n.getProgramParameter(g.current, n.LINK_STATUS) ? (n.useProgram(g.current), _.current = n.getAttribLocation(g.current, "aVertexPosition"), n.enableVertexAttribArray(_.current)) : d?.(Ec(`Unable to initialize the shader program: ${n.getProgramInfoLog(g.current)}`)));
4920
- }, re = () => {
4920
+ }, F = () => {
4921
4921
  if (r) for (let e of Object.keys(r)) {
4922
4922
  let t = r[e];
4923
4923
  if (!t) continue;
@@ -4931,7 +4931,7 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4931
4931
  ...o ? { arraySize: o } : {}
4932
4932
  };
4933
4933
  }
4934
- }, ie = () => {
4934
+ }, re = () => {
4935
4935
  let e = m.current;
4936
4936
  if (e) {
4937
4937
  if (n && n.length > 0) {
@@ -4952,7 +4952,7 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4952
4952
  });
4953
4953
  } else u && u();
4954
4954
  }
4955
- }, ae = (e) => {
4955
+ }, ie = (e) => {
4956
4956
  let t = tc.includes(a ?? "highp"), n = `precision ${t ? a : tc[1]} float;\n`;
4957
4957
  t || f?.(Ec(`wrong precision type ${a}, please make sure to pass one of a valid precision lowp, mediump, highp, by default you shader precision will be set to highp.`));
4958
4958
  let r = n.concat(`#define DPR ${l.toFixed(1)}\n`).concat(e.replace(/texture\(/g, "texture2D("));
@@ -4962,7 +4962,7 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
4962
4962
  r = kc(r, `uniform ${e.type} ${t}${e.arraySize || ""}; \n`, r.lastIndexOf(n) + n.length), e.isNeeded = !0;
4963
4963
  }
4964
4964
  return e.includes("mainImage") && (r = r.concat(nc)), r;
4965
- }, F = (e) => {
4965
+ }, ae = (e) => {
4966
4966
  let t = m.current;
4967
4967
  if (!t || !g.current) return;
4968
4968
  let n = w.current ? (e - w.current) / 1e3 : 0;
@@ -5024,7 +5024,7 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
5024
5024
  }, oe = (e) => {
5025
5025
  let t = m.current;
5026
5026
  if (!t) return;
5027
- t.viewport(0, 0, t.drawingBufferWidth, t.drawingBufferHeight), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT), t.bindBuffer(t.ARRAY_BUFFER, h.current), t.vertexAttribPointer(_.current ?? 0, 3, t.FLOAT, !1, 0, 0), F(e), t.drawArrays(t.TRIANGLE_STRIP, 0, 4);
5027
+ t.viewport(0, 0, t.drawingBufferWidth, t.drawingBufferHeight), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT), t.bindBuffer(t.ARRAY_BUFFER, h.current), t.vertexAttribPointer(_.current ?? 0, 3, t.FLOAT, !1, 0, 0), ae(e), t.drawArrays(t.TRIANGLE_STRIP, 0, 4);
5028
5028
  let n = E.current.iMouse?.value;
5029
5029
  if (E.current.iMouse?.isNeeded && c !== 1 && Array.isArray(n)) {
5030
5030
  let e = n[0] ?? 0, t = n[1] ?? 0;
@@ -5033,19 +5033,19 @@ function Ac({ fs: e, vs: t = ic, textures: n = [], uniforms: r, clearColor: i =
5033
5033
  v.current = requestAnimationFrame(oe);
5034
5034
  }, se = () => {
5035
5035
  let e = { passive: !0 };
5036
- E.current.iMouse?.isNeeded && p.current && (p.current.addEventListener("mousemove", A, e), p.current.addEventListener("mouseout", j, e), p.current.addEventListener("mouseup", j, e), p.current.addEventListener("mousedown", ne, e), p.current.addEventListener("touchmove", A, e), p.current.addEventListener("touchend", j, e), p.current.addEventListener("touchstart", ne, e)), E.current.iDeviceOrientation?.isNeeded && window.addEventListener("deviceorientation", te, e), p.current && (T.current = new ResizeObserver(M), T.current.observe(p.current), window.addEventListener("resize", M, e));
5036
+ E.current.iMouse?.isNeeded && p.current && (p.current.addEventListener("mousemove", j, e), p.current.addEventListener("mouseout", M, e), p.current.addEventListener("mouseup", M, e), p.current.addEventListener("mousedown", A, e), p.current.addEventListener("touchmove", j, e), p.current.addEventListener("touchend", M, e), p.current.addEventListener("touchstart", A, e)), E.current.iDeviceOrientation?.isNeeded && window.addEventListener("deviceorientation", k, e), p.current && (T.current = new ResizeObserver(N), T.current.observe(p.current), window.addEventListener("resize", N, e));
5037
5037
  }, ce = () => {
5038
5038
  let e = { passive: !0 };
5039
- E.current.iMouse?.isNeeded && p.current && (p.current.removeEventListener("mousemove", A, e), p.current.removeEventListener("mouseout", j, e), p.current.removeEventListener("mouseup", j, e), p.current.removeEventListener("mousedown", ne, e), p.current.removeEventListener("touchmove", A, e), p.current.removeEventListener("touchend", j, e), p.current.removeEventListener("touchstart", ne, e)), E.current.iDeviceOrientation?.isNeeded && window.removeEventListener("deviceorientation", te, e), T.current && (T.current.disconnect(), window.removeEventListener("resize", M, e));
5039
+ E.current.iMouse?.isNeeded && p.current && (p.current.removeEventListener("mousemove", j, e), p.current.removeEventListener("mouseout", M, e), p.current.removeEventListener("mouseup", M, e), p.current.removeEventListener("mousedown", A, e), p.current.removeEventListener("touchmove", j, e), p.current.removeEventListener("touchend", M, e), p.current.removeEventListener("touchstart", A, e)), E.current.iDeviceOrientation?.isNeeded && window.removeEventListener("deviceorientation", k, e), T.current && (T.current.disconnect(), window.removeEventListener("resize", N, e));
5040
5040
  };
5041
5041
  return K(() => {
5042
5042
  D.current = r;
5043
5043
  }, [r]), K(() => {
5044
5044
  let n = C.current;
5045
5045
  function r() {
5046
- k();
5046
+ ee();
5047
5047
  let n = m.current;
5048
- n && p.current && (n.clearColor(...i), n.clearDepth(1), n.enable(n.DEPTH_TEST), n.depthFunc(n.LEQUAL), n.viewport(0, 0, p.current.width, p.current.height), p.current.height = p.current.clientHeight, p.current.width = p.current.clientWidth, re(), ie(), P(ae(e || rc), t || ic), ee(), requestAnimationFrame(oe), se(), M());
5048
+ n && p.current && (n.clearColor(...i), n.clearDepth(1), n.enable(n.DEPTH_TEST), n.depthFunc(n.LEQUAL), n.viewport(0, 0, p.current.width, p.current.height), p.current.height = p.current.clientHeight, p.current.width = p.current.clientWidth, F(), re(), P(ie(e || rc), t || ic), te(), requestAnimationFrame(oe), se(), N());
5049
5049
  }
5050
5050
  return requestAnimationFrame(r), () => {
5051
5051
  let e = m.current;
@@ -5192,7 +5192,7 @@ function Fc({ size: e = "lg", state: t, color: n, colorShift: r = .05, audioTrac
5192
5192
  }
5193
5193
  //#endregion
5194
5194
  //#region src/blocks/ai/F0HILActionConfirmation/F0HILActionConfirmation.tsx
5195
- var Ic = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm: i, cancelText: a, onCancel: o, stackAt: s = "sm" }) => /* @__PURE__ */ X(Ge, {
5195
+ var Ic = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm: i, cancelText: a, onCancel: o, stackAt: s = "sm" }) => /* @__PURE__ */ X(Re, {
5196
5196
  title: e,
5197
5197
  description: t,
5198
5198
  avatar: n,
@@ -5365,10 +5365,10 @@ var Yc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5365
5365
  className: "relative w-full flex-1",
5366
5366
  role: "img",
5367
5367
  "aria-label": `Sparkline chart showing ${i} trend`,
5368
- children: [/* @__PURE__ */ X(st, {
5368
+ children: [/* @__PURE__ */ X(Nt, {
5369
5369
  width: "100%",
5370
5370
  height: "100%",
5371
- children: /* @__PURE__ */ Z(ne, {
5371
+ children: /* @__PURE__ */ Z(st, {
5372
5372
  data: e,
5373
5373
  margin: {
5374
5374
  top: 4,
@@ -5393,11 +5393,11 @@ var Yc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5393
5393
  stopOpacity: .02
5394
5394
  })]
5395
5395
  }) }),
5396
- /* @__PURE__ */ X(ye, {
5396
+ /* @__PURE__ */ X(rt, {
5397
5397
  hide: !0,
5398
5398
  domain: ["dataMin - 1", "dataMax + 1"]
5399
5399
  }),
5400
- /* @__PURE__ */ X(b, {
5400
+ /* @__PURE__ */ X(de, {
5401
5401
  type: "linear",
5402
5402
  dataKey: "value",
5403
5403
  stroke: a.stroke,
@@ -5484,7 +5484,7 @@ var Yc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5484
5484
  });
5485
5485
  });
5486
5486
  Qc.displayName = "F0AiInsightCard";
5487
- var $c = e(gt(Qc, () => /* @__PURE__ */ Z("div", {
5487
+ var $c = e(Xe(Qc, () => /* @__PURE__ */ Z("div", {
5488
5488
  className: "flex w-[217px] h-[200px] flex-col gap-2 rounded-2xl border border-solid border-f1-border-secondary bg-f1-background p-4",
5489
5489
  "aria-busy": "true",
5490
5490
  "aria-live": "polite",
@@ -5569,11 +5569,11 @@ ol.displayName = "F0AiProposalCard";
5569
5569
  //#region src/blocks/ai/F0AiMessageSources/components/CollapsibleMessage.tsx
5570
5570
  var sl = ({ icon: e, title: t, children: n }) => {
5571
5571
  let [r, i] = Y(!1), a = u();
5572
- return /* @__PURE__ */ Z(pt, {
5572
+ return /* @__PURE__ */ Z(qe, {
5573
5573
  className: "mb-1 w-full",
5574
5574
  open: r,
5575
5575
  onOpenChange: i,
5576
- children: [/* @__PURE__ */ Z(Ze, {
5576
+ children: [/* @__PURE__ */ Z(ft, {
5577
5577
  className: "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90",
5578
5578
  children: [
5579
5579
  /* @__PURE__ */ X("span", {
@@ -5592,7 +5592,7 @@ var sl = ({ icon: e, title: t, children: n }) => {
5592
5592
  className: "h-4 w-4 transition-transform duration-200"
5593
5593
  })
5594
5594
  ]
5595
- }), /* @__PURE__ */ X(Mt, {
5595
+ }), /* @__PURE__ */ X(yt, {
5596
5596
  forceMount: !0,
5597
5597
  className: "data-[state=open]:mt-3",
5598
5598
  children: /* @__PURE__ */ X(p.div, {
@@ -5616,7 +5616,7 @@ var sl = ({ icon: e, title: t, children: n }) => {
5616
5616
  })
5617
5617
  })]
5618
5618
  });
5619
- }, cl = (e) => Ae[e] ?? Sn, ll = ({ iconName: e }) => e ? /* @__PURE__ */ X("div", {
5619
+ }, cl = (e) => Ee[e] ?? Sn, ll = ({ iconName: e }) => e ? /* @__PURE__ */ X("div", {
5620
5620
  className: "mr-1 flex items-center justify-center",
5621
5621
  children: /* @__PURE__ */ X(U, {
5622
5622
  icon: cl(e),
@@ -5704,7 +5704,7 @@ function ml({ indicator: e }) {
5704
5704
  hideLabel: !0,
5705
5705
  label: n.ai.conversations,
5706
5706
  "aria-describedby": i ? r : void 0,
5707
- icon: Me
5707
+ icon: pe
5708
5708
  })
5709
5709
  }),
5710
5710
  /* @__PURE__ */ X("span", {
@@ -5780,7 +5780,7 @@ function vl({ label: e, onClick: t }) {
5780
5780
  variant: "ghost",
5781
5781
  hideLabel: !0,
5782
5782
  label: e,
5783
- icon: at,
5783
+ icon: Ht,
5784
5784
  onClick: t
5785
5785
  })
5786
5786
  }) : null
@@ -5839,14 +5839,14 @@ var Sl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode
5839
5839
  variant: "ghost",
5840
5840
  hideLabel: !0,
5841
5841
  label: n ? m.ai.collapseChat : m.ai.expandChat,
5842
- icon: n ? Rt : z,
5842
+ icon: n ? It : it,
5843
5843
  onClick: r
5844
5844
  }),
5845
5845
  /* @__PURE__ */ X(f, {
5846
5846
  variant: "ghost",
5847
5847
  hideLabel: !0,
5848
5848
  label: m.ai.closeChat,
5849
- icon: rt,
5849
+ icon: Qe,
5850
5850
  onClick: a
5851
5851
  })
5852
5852
  ]
@@ -5872,7 +5872,7 @@ function Cl({ items: e }) {
5872
5872
  let n = t();
5873
5873
  return /* @__PURE__ */ X("div", {
5874
5874
  className: i("hidden shrink-0 items-center", "group-hover:flex group-focus-within:flex", "has-[[aria-expanded=true]]:flex", "[@media(hover:none)]:flex [@media(pointer:coarse)]:flex"),
5875
- children: /* @__PURE__ */ X(H, {
5875
+ children: /* @__PURE__ */ X(_e, {
5876
5876
  items: e,
5877
5877
  children: /* @__PURE__ */ X(f, {
5878
5878
  icon: xn,
@@ -5939,16 +5939,16 @@ function Tl({ items: e, status: n, statusId: r, isPending: a }) {
5939
5939
  //#endregion
5940
5940
  //#region src/addons/ai/F0AiChatHistory/components/ThreadItem.tsx
5941
5941
  function El({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSelect: o, onPin: c, onUnpin: l, onDelete: u, threadActions: d, className: f }) {
5942
- let p = t(), h = Rn(), g = Tt() === "two-level", _ = q(() => [
5942
+ let p = t(), h = Rn(), g = Ct() === "two-level", _ = q(() => [
5943
5943
  {
5944
5944
  label: n ? p.ai.unpinChat : p.ai.pinChat,
5945
- icon: n ? tt : At,
5945
+ icon: n ? wt : tt,
5946
5946
  onClick: () => n ? l(e.id) : c(e.id)
5947
5947
  },
5948
5948
  ...d?.(e) ?? [],
5949
5949
  {
5950
5950
  label: p.ai.deleteChat,
5951
- icon: Qe,
5951
+ icon: pt,
5952
5952
  critical: !0,
5953
5953
  onClick: () => u(e.id)
5954
5954
  }
@@ -6131,7 +6131,7 @@ function Nl({ value: e, onChange: n }) {
6131
6131
  size: "sm",
6132
6132
  hideLabel: !0,
6133
6133
  label: r.actions.clear,
6134
- icon: rt,
6134
+ icon: Qe,
6135
6135
  onClick: () => n("")
6136
6136
  }) : null
6137
6137
  ]
@@ -6159,7 +6159,7 @@ var Pl = () => {
6159
6159
  //#region src/addons/ai/F0AiChatHistory/utils.ts
6160
6160
  function Fl(e) {
6161
6161
  let t = new Date(e), n = /* @__PURE__ */ new Date();
6162
- return ae(t) ? "today" : Fe(t) ? "yesterday" : dn(t, n) ? "thisMonth" : "older";
6162
+ return P(t) ? "today" : xt(t) ? "yesterday" : dn(t, n) ? "thisMonth" : "older";
6163
6163
  }
6164
6164
  function Il(e) {
6165
6165
  let t = {
@@ -6214,7 +6214,7 @@ function Ll({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads:
6214
6214
  className: "flex flex-col gap-2",
6215
6215
  children: [
6216
6216
  r ? /* @__PURE__ */ X(Ml, {
6217
- icon: at,
6217
+ icon: Ht,
6218
6218
  label: h.ai.startNewChat,
6219
6219
  onClick: () => {
6220
6220
  r(), e();
@@ -6310,11 +6310,11 @@ var Vl = [
6310
6310
  "attention"
6311
6311
  ], Hl = "f0-ai-pinned-threads";
6312
6312
  function Ul() {
6313
- let e = xt(Hl, []);
6313
+ let e = ze(Hl, []);
6314
6314
  return new Set(Array.isArray(e) ? e : []);
6315
6315
  }
6316
6316
  function Wl(e) {
6317
- Et(Hl, [...e]);
6317
+ vt(Hl, [...e]);
6318
6318
  }
6319
6319
  function Gl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, unpinThread: i }) {
6320
6320
  let [a, o] = Y([]), [s, c] = Y(!1), [l, u] = Y(null), [d, f] = Y(Ul), [p, m] = Y(() => /* @__PURE__ */ new Set()), h = G(async () => {
@@ -6384,7 +6384,7 @@ function Gl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
6384
6384
  }
6385
6385
  //#endregion
6386
6386
  //#region src/addons/ai/F0AiChatHeader/types.ts
6387
- var Kl = ["attention"], ql = ["top", "bottom"], Jl = p.create(Ne), Yl = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ Z("div", {
6387
+ var Kl = ["attention"], ql = ["top", "bottom"], Jl = p.create(ke), Yl = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ Z("div", {
6388
6388
  role: "status",
6389
6389
  "aria-live": "polite",
6390
6390
  className: "flex flex-row items-center gap-1 rounded-full border border-solid border-f1-border-secondary bg-f1-background px-2 py-1.5 pr-2.5 shadow-md",