@factorialco/f0-react 16.12.0 → 16.14.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 (61) hide show
  1. package/dist/{ArchiveThumbnail-BwCie4ZN.js → ArchiveThumbnail-Im-F4iBB.js} +3 -3
  2. package/dist/{ArchiveViewer-J99cTOZk.js → ArchiveViewer-DSlBGIWL.js} +5 -5
  3. package/dist/{ChatPostComposerDialog-C6P_gLjC.js → ChatPostComposerDialog-BUIrVPYB.js} +3 -3
  4. package/dist/{CoachmarkProvider-BihAvRd7.js → CoachmarkProvider-TVPzpGcL.js} +15 -15
  5. package/dist/{CodeThumbnail-BrXM_Etf.js → CodeThumbnail-BzOAwnmv.js} +1 -1
  6. package/dist/{CodeViewer-B1CdgUib.js → CodeViewer-2-rYX9r-.js} +6 -6
  7. package/dist/{DocumentToolbar-B4FTTNkN.js → DocumentToolbar-BvTTYoE9.js} +5 -5
  8. package/dist/{DocxViewer-CMX0V1kB.js → DocxViewer-D6Gnx4Nv.js} +3 -3
  9. package/dist/{F0AiProcessingOverlay-B0Dhl0ek.js → F0AiProcessingOverlay-BGJYN4-Y.js} +739 -633
  10. package/dist/{F0Alert-CXtfc-sL.js → F0Alert-BsVVBxpJ.js} +5 -5
  11. package/dist/F0AudioPlayer-BBBT6xNg.js +2 -0
  12. package/dist/{F0Button-CfK_6Dfx.js → F0Button-C-4GtvuG.js} +3 -3
  13. package/dist/{F0CanvasPanel-BlTALv-d.js → F0CanvasPanel-BvVr_-L-.js} +3899 -3878
  14. package/dist/{F0DocumentViewer-rkhoBKx6.js → F0DocumentViewer-CcxOcWPu.js} +1 -1
  15. package/dist/{F0DocumentViewer-IO5gGhnu.js → F0DocumentViewer-DYB9Bsue.js} +4 -4
  16. package/dist/{F0Icon-BPx-9kOK.js → F0Icon-Chy6izoc.js} +1 -1
  17. package/dist/{F0Map-bWn-jjyc.js → F0Map-CACIkmZH.js} +7 -7
  18. package/dist/{F0Select-L8ZodaA4.js → F0Select-CTtudO6a.js} +384 -373
  19. package/dist/{F0Text-1893f70w.js → F0Text-V9FzeqE-.js} +2 -2
  20. package/dist/F0VideoPlayer-4BH24LDU.js +1 -0
  21. package/dist/{F0VideoPlayer-CAsJ7Htq.js → F0VideoPlayer-CDx6HjtC.js} +6 -6
  22. package/dist/{HtmlThumbnail-BXothSJU.js → HtmlThumbnail-D5snVcPj.js} +1 -1
  23. package/dist/{HtmlViewer-DyBvJkO4.js → HtmlViewer-DmV7nLoP.js} +9 -9
  24. package/dist/{LayoutGroup-CAwOHvO6.js → LayoutGroup-CBGqcfs4.js} +1 -1
  25. package/dist/{Map-Dsd3Z0cP.js → Map-Yy8alpbY.js} +10 -10
  26. package/dist/{PdfThumbnail-C9Mhhpth.js → PdfThumbnail-Cn3Bjm2o.js} +1 -1
  27. package/dist/{PdfViewer-Dgm0q0TP.js → PdfViewer-BlJilT0q.js} +8 -8
  28. package/dist/{SandboxedHtmlFrame-jclBkupb.js → SandboxedHtmlFrame-_jfAieV4.js} +2 -2
  29. package/dist/{SheetViewer-BKqsZMnt.js → SheetViewer-D9BALsKs.js} +5 -5
  30. package/dist/{TextViewer-jXuXWITH.js → TextViewer-RMttR3nS.js} +4 -4
  31. package/dist/ai.d.ts +4 -4
  32. package/dist/ai.js +5 -5
  33. package/dist/component-status.js +7 -7
  34. package/dist/{dist-D12pKTJH.js → dist-BHvGslVW.js} +1 -1
  35. package/dist/{dist-BWgB2Pxk.js → dist-COSPKSNt.js} +2 -2
  36. package/dist/{dist-CCGn12Jl.js → dist-DcAiVQvo.js} +1 -1
  37. package/dist/{dist-DG8KKI8a.js → dist-DkzaaPXh.js} +1 -1
  38. package/dist/{dist-DjDZq_T-.js → dist-Dujo_bNI.js} +4 -4
  39. package/dist/experimental.d.ts +2 -2
  40. package/dist/experimental.js +4846 -4846
  41. package/dist/{exports-CgvkBoX5.d.ts → exports-DqLVNMDb.d.ts} +25 -3
  42. package/dist/f0.d.ts +5 -5
  43. package/dist/f0.js +1352 -1352
  44. package/dist/{highlight-ZvTVxgBP.js → highlight-HLbV8eK1.js} +1 -1
  45. package/dist/{i18n-provider-C-057er8.js → i18n-provider-BgNnKMpC.js} +1 -1
  46. package/dist/{i18n-provider-defaults-ClM5fIad.d.ts → i18n-provider-defaults-C72SovYy.d.ts} +4 -0
  47. package/dist/{i18n-provider-defaults-C660Phfh.js → i18n-provider-defaults-Dcj1i76L.js} +4 -0
  48. package/dist/i18n-provider-defaults.d.ts +1 -1
  49. package/dist/i18n-provider-defaults.js +1 -1
  50. package/dist/{index-BBZI0n84.d.ts → index-UqIoYwH1.d.ts} +17 -3
  51. package/dist/{maplibre-D1MYjVVW.js → maplibre-Dg-6a8kB.js} +1 -1
  52. package/dist/{pdfWorker-B9zZWGPx.js → pdfWorker-1QNx8xpe.js} +1 -1
  53. package/dist/{popover-BVz3QY-0.js → popover-yM7qbdIU.js} +1 -1
  54. package/dist/{skeleton-C__vPA8D.js → skeleton-CGa-nqkR.js} +1 -1
  55. package/dist/styles.css +1 -1
  56. package/dist/{toolbarStyles-umCmRgJJ.js → toolbarStyles-DKuq0fnt.js} +1 -1
  57. package/dist/{types-B9V_H7Le.d.ts → types-Cz4ZsFAM.d.ts} +2 -2
  58. package/dist/{useData-CaY41foq.js → useData-DGDWXNUn.js} +6 -6
  59. package/package.json +1 -1
  60. package/dist/F0AudioPlayer-Cx38C20T.js +0 -2
  61. package/dist/F0VideoPlayer-V-YsiPSM.js +0 -1
@@ -1,25 +1,25 @@
1
- import { a as e, r as t } from "./i18n-provider-C-057er8.js";
2
- import { n, t as r } from "./skeleton-C__vPA8D.js";
1
+ import { a as e, r as t } from "./i18n-provider-BgNnKMpC.js";
2
+ import { n, t as r } from "./skeleton-CGa-nqkR.js";
3
3
  import { L as i, R as a } from "./tooltip-NXXT56H4.js";
4
- import { D as o, K as s, M as c, R as l, V as u, Y as d, b as f, h as p, n as m, r as h, t as g } from "./F0Button-CfK_6Dfx.js";
5
- import { $ as _, $c as v, A as y, Ao as b, Bn as x, Bs as S, C, Ct as w, Dn as T, Dt as E, En as D, F as O, Fo as k, Ft as A, G as j, Hi as ee, Is as M, It as N, J as P, Jc as F, K as te, Lt as ne, M as I, Ml as re, Mn as ie, N as ae, Nn as oe, On as se, P as ce, Pn as le, Pt as ue, Q as L, Qc as R, Qi as de, Rn as fe, Rs as pe, Rt as me, S as he, Sl as ge, Sn as _e, Ss as ve, St as ye, Tn as z, Tt as be, U as xe, Ut as Se, Vn as Ce, Vs as we, Wn as Te, X as Ee, Xi as De, Xt as Oe, Y as ke, Yo as Ae, Ys as je, Z as Me, Zi as B, Zt as Ne, _ as V, _t as Pe, ac as Fe, at as Ie, b as Le, bi as Re, bl as ze, bs as Be, cl as Ve, cs as He, ct as Ue, da as We, dc as Ge, dn as Ke, dt as qe, ei as Je, en as Ye, fa as Xe, ft as Ze, g as Qe, ga as $e, gt as et, h as tt, hn as nt, ht as rt, i as it, in as at, j as ot, jl as st, jn as ct, jo as lt, k as ut, ko as dt, lc as ft, ln as pt, lt as mt, ma as ht, mc as gt, mn as _t, mt as vt, nc as yt, nt as bt, o as xt, oi as St, on as Ct, pn as wt, pt as Tt, q as Et, r as Dt, rn as Ot, rt as kt, sc as At, st as jt, tn as Mt, to as Nt, ui as Pt, ut as Ft, vn as It, w as Lt, wt as Rt, x as zt, xl as Bt, xs as Vt, yc as Ht, yi as Ut, yn as Wt, ys as Gt, zt as Kt } from "./F0CanvasPanel-BlTALv-d.js";
6
- import { o as qt, t as H } from "./F0Icon-BPx-9kOK.js";
7
- import { t as Jt } from "./i18n-provider-defaults-C660Phfh.js";
8
- import { D as Yt, E as Xt, F as U, G as Zt, R as Qt, S as $t, T as en, W as tn, g as nn, h as rn, j as an, l as on, m as sn, w as cn, y as ln } from "./useData-CaY41foq.js";
9
- import { Dn as un, Er as dn, Ft as fn, On as pn, Ot as mn, Tr as hn, bt as gn, cn as _n, dt as vn, kr as yn, nn as bn, sn as xn, un as Sn, vt as Cn, wr as wn, yt as Tn } from "./F0Select-L8ZodaA4.js";
10
- import { t as En } from "./Check-DAp9gCRh.js";
11
- import { t as Dn } from "./Ellipsis-CBouJQYY.js";
12
- import { t as On } from "./ExternalLink-RdKU698E.js";
13
- import { $ as kn, a as An, i as jn, n as Mn, t as Nn } from "./popover-BVz3QY-0.js";
14
- import { t as Pn } from "./F0Text-1893f70w.js";
15
- import { a as Fn } from "./dist-BCNVh6y5.js";
16
- import { Children as In, createContext as Ln, createElement as Rn, forwardRef as zn, isValidElement as Bn, memo as Vn, useCallback as W, useContext as Hn, useEffect as G, useId as Un, useImperativeHandle as Wn, useInsertionEffect as Gn, useLayoutEffect as Kn, useMemo as K, useRef as q, useState as J } from "react";
17
- import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
4
+ import { D as o, K as s, M as c, R as l, V as u, Y as d, b as f, h as p, n as m, r as h, t as g } from "./F0Button-C-4GtvuG.js";
5
+ import { $ as _, $c as v, A as y, Ao as b, Bn as x, Bs as S, C, Ct as w, Dn as T, Dt as E, En as D, F as O, Fo as k, Ft as A, G as j, Hi as ee, Is as M, It as N, J as P, Jc as F, K as te, Lt as ne, M as I, Ml as re, Mn as ie, N as ae, Nn as oe, On as se, P as ce, Pn as le, Pt as ue, Q as L, Qc as R, Qi as de, Rn as fe, Rs as pe, Rt as me, S as he, Sl as ge, Sn as _e, Ss as ve, St as ye, Tn as z, Tt as be, U as xe, Ut as Se, Vn as Ce, Vs as we, Wn as Te, X as Ee, Xi as De, Xt as Oe, Y as B, Yo as ke, Ys as Ae, Z as je, Zi as V, Zt as Me, _ as H, _t as Ne, ac as Pe, at as Fe, b as Ie, bi as Le, bl as Re, bs as ze, cl as Be, cs as Ve, ct as He, da as Ue, dc as We, dn as Ge, dt as Ke, ei as qe, en as Je, fa as Ye, ft as Xe, g as Ze, ga as Qe, gt as $e, h as et, hn as tt, ht as nt, i as rt, in as it, j as at, jl as ot, jn as st, jo as ct, k as lt, ko as ut, lc as dt, ln as ft, lt as pt, ma as mt, mc as ht, mn as gt, mt as _t, nc as vt, nt as yt, o as bt, oi as xt, on as St, pn as Ct, pt as wt, q as Tt, r as Et, rn as Dt, rt as Ot, sc as kt, st as At, tn as jt, to as Mt, ui as Nt, ut as Pt, vn as Ft, w as It, wt as Lt, x as Rt, xl as zt, xs as Bt, yc as Vt, yi as Ht, yn as Ut, ys as Wt, zt as Gt } from "./F0CanvasPanel-BvVr_-L-.js";
6
+ import { o as Kt, t as U } from "./F0Icon-Chy6izoc.js";
7
+ import { t as qt } from "./i18n-provider-defaults-Dcj1i76L.js";
8
+ import { D as Jt, E as Yt, F as W, G as Xt, R as Zt, S as Qt, T as $t, W as en, g as tn, h as nn, j as rn, l as an, m as on, w as sn, y as cn } from "./useData-DGDWXNUn.js";
9
+ import { Dn as ln, Er as un, Ft as dn, On as fn, Ot as pn, Tr as mn, bt as hn, cn as gn, dt as _n, kr as vn, nn as yn, sn as bn, un as xn, vt as Sn, wr as Cn, yt as wn } from "./F0Select-CTtudO6a.js";
10
+ import { t as Tn } from "./Check-DAp9gCRh.js";
11
+ import { t as En } from "./Ellipsis-CBouJQYY.js";
12
+ import { t as Dn } from "./ExternalLink-RdKU698E.js";
13
+ import { $ as On, a as kn, i as An, n as jn, t as Mn } from "./popover-yM7qbdIU.js";
14
+ import { t as Nn } from "./F0Text-V9FzeqE-.js";
15
+ import { a as Pn } from "./dist-BCNVh6y5.js";
16
+ import { Children as Fn, createContext as In, createElement as Ln, forwardRef as Rn, isValidElement as zn, memo as Bn, useCallback as G, useContext as Vn, useEffect as K, useId as Hn, useImperativeHandle as Un, useInsertionEffect as Wn, useLayoutEffect as Gn, useMemo as q, useRef as J, useState as Y } from "react";
17
+ import { Fragment as Kn, jsx as X, jsxs as Z } from "react/jsx-runtime";
18
18
  import { createPortal as qn } from "react-dom";
19
19
  import { useTrackVolume as Jn } from "@livekit/components-react";
20
20
  //#region ../../node_modules/.bun/framer-motion@12.43.0+90584e9f7c97d403/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs
21
21
  function Yn(e, t, n) {
22
- Gn(() => e.on(t, n), [
22
+ Wn(() => e.on(t, n), [
23
23
  e,
24
24
  t,
25
25
  n
@@ -39,7 +39,7 @@ var Xn = [
39
39
  "md",
40
40
  "lg"
41
41
  ], Qn = "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", $n = [], er = () => null, tr = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: o = !1, maxLength: c, maxLengthError: l, error: u = null, labels: f, placeholders: p, placeholdersPaused: h, placeholderPreview: g, placeholderPreviewOneLine: _ = !1, role: y = "combobox", name: b, mentions: x, autocomplete: S, voice: C, onTextChange: w, onCleared: T, onEscape: E, onArrowUpWhenEmpty: D, onPasteFiles: O, pastePreferText: k = !1, onStateChange: A, header: j, tray: ee, leading: M, toolbarStart: N, toolbarCenter: P, collapsible: F = !1, collapsed: te = !1, replacement: ne, asForm: I = !1, className: re, surfaceRef: ie, onSurfaceFocus: ae, onSurfaceBlur: oe, handleRef: se, reducedMotion: ce = !1, "data-testid": ue }) => {
42
- let L = vt(f, C), R = ne != null, { error: de, show: fe, clear: pe } = Tt(), me = q(() => {}), he = q(() => {}), ge = q(""), _e = W((e) => {
42
+ let L = _t(f, C), R = ne != null, { error: de, show: fe, clear: pe } = wt(), me = J(() => {}), he = J(() => {}), ge = J(""), _e = G((e) => {
43
43
  let t = ge.current, n = t && !/\s$/.test(t) ? " " : "";
44
44
  me.current(`${t}${n}${e}`);
45
45
  }, []), ve = {
@@ -54,7 +54,7 @@ var Xn = [
54
54
  },
55
55
  onError: (e) => fe(ve[e]),
56
56
  onAudio: C?.onAudio
57
- }), [be, xe] = J(!1), Se = z.status === "recording", we = z.status === "transcribing", Te = !!C && (!!C.onTranscribe || !!C.onAudio) && z.isSupported, Ee = !C?.onAudio && (z.status !== "idle" || be), [De, Oe] = J(!1), ke = et({
57
+ }), [be, xe] = Y(!1), Se = z.status === "recording", we = z.status === "transcribing", Te = !!C && (!!C.onTranscribe || !!C.onAudio) && z.isSupported, Ee = !C?.onAudio && (z.status !== "idle" || be), [De, Oe] = Y(!1), B = $e({
58
58
  mentions: {
59
59
  enabled: !!x && x.sources.length + +!!x.pinned > 0 && !De && !R,
60
60
  sources: x?.sources ?? $n,
@@ -65,81 +65,81 @@ var Xn = [
65
65
  transformChange: S?.transformChange,
66
66
  onTextChange: w,
67
67
  historySuspended: Ee
68
- }), { value: Ae, setValue: je, setCursorPosition: Me, textareaRef: B, highlightRef: Ne, mentions: V, requestSelection: Fe, clearText: Ie, breakHistory: Le } = ke;
68
+ }), { value: ke, setValue: Ae, setCursorPosition: je, textareaRef: V, highlightRef: Me, mentions: H, requestSelection: Pe, clearText: Fe, breakHistory: Ie } = B;
69
69
  me.current = (e) => {
70
- je(e), Me(e.length);
70
+ Ae(e), je(e.length);
71
71
  };
72
- let Re = q(Ae);
73
- Re.current = Ae;
74
- let ze = q(V.mentions);
75
- ze.current = V.mentions;
76
- let Be = (S?.useAutocomplete ?? er)(ke), Ve = Be?.isOpen ?? !1, He = V.dismissCurrentTrigger;
77
- G(() => {
78
- Oe(Ve), Ve && He();
79
- }, [Ve, He]);
80
- let { highlightSegments: We, hasOverlay: Ge } = Pe(ke, { suppressGhost: Ve }), Ke = W((e) => {
81
- let t = B.current;
72
+ let Le = J(ke);
73
+ Le.current = ke;
74
+ let Re = J(H.mentions);
75
+ Re.current = H.mentions;
76
+ let ze = (S?.useAutocomplete ?? er)(B), Be = ze?.isOpen ?? !1, Ve = H.dismissCurrentTrigger;
77
+ K(() => {
78
+ Oe(Be), Be && Ve();
79
+ }, [Be, Ve]);
80
+ let { highlightSegments: Ue, hasOverlay: We } = Ne(B, { suppressGhost: Be }), Ge = G((e) => {
81
+ let t = V.current;
82
82
  if (!t) return;
83
83
  t.focus(e);
84
84
  let n = t.value.length;
85
85
  t.setSelectionRange(n, n);
86
- }, [B]);
87
- he.current = () => B.current?.focus();
88
- let Je = V.close;
89
- G(() => {
90
- R && Je();
91
- }, [R, Je]);
92
- let Ye = Ae.length === 0;
93
- G(() => {
86
+ }, [V]);
87
+ he.current = () => V.current?.focus();
88
+ let qe = H.close;
89
+ K(() => {
90
+ R && qe();
91
+ }, [R, qe]);
92
+ let Je = ke.length === 0;
93
+ K(() => {
94
94
  A?.({
95
- isEmpty: Ye,
95
+ isEmpty: Je,
96
96
  recorder: z.status
97
97
  });
98
98
  }, [
99
99
  A,
100
- Ye,
100
+ Je,
101
101
  z.status
102
102
  ]);
103
- let [Xe, Qe] = J(!1), $e = c !== void 0 && Ae.trim().length > c;
104
- G(() => {
105
- $e || Qe(!1);
106
- }, [$e]);
107
- let tt = Xe && $e ? l ?? null : null, nt = tt ?? u ?? de, [it, at] = J(!1), ot = q(!1), st = Ae.trim().length > 0 || a, ct = st && !Ee && !o && !it && !R, lt = t && !we, ut = W(() => {
108
- if (!ct || ot.current) return;
109
- if ($e) {
110
- Qe(!0);
103
+ let [Ye, Ze] = Y(!1), Qe = c !== void 0 && ke.trim().length > c;
104
+ K(() => {
105
+ Qe || Ze(!1);
106
+ }, [Qe]);
107
+ let et = Ye && Qe ? l ?? null : null, tt = et ?? u ?? de, [rt, it] = Y(!1), at = J(!1), ot = ke.trim().length > 0 || a, st = ot && !Ee && !o && !rt && !R, ct = t && !we, lt = G(() => {
108
+ if (!st || at.current) return;
109
+ if (Qe) {
110
+ Ze(!0);
111
111
  return;
112
112
  }
113
- V.close();
114
- let t = Re.current, n = (e) => {
115
- !e && Re.current === t && (Ie(), Le()), B.current?.focus({ preventScroll: !0 });
113
+ H.close();
114
+ let t = Le.current, n = (e) => {
115
+ !e && Le.current === t && (Fe(), Ie()), V.current?.focus({ preventScroll: !0 });
116
116
  }, r;
117
117
  try {
118
118
  r = e({
119
119
  text: t,
120
- mentions: V.mentions
120
+ mentions: H.mentions
121
121
  });
122
122
  } catch {
123
123
  n(!0);
124
124
  return;
125
125
  }
126
- r instanceof Promise ? (ot.current = !0, at(!0), r.then((e) => {
127
- ot.current = !1, at(!1), n(e === !1);
126
+ r instanceof Promise ? (at.current = !0, it(!0), r.then((e) => {
127
+ at.current = !1, it(!1), n(e === !1);
128
128
  }, () => {
129
- ot.current = !1, at(!1), n(!0);
129
+ at.current = !1, it(!1), n(!0);
130
130
  })) : n(r === !1);
131
131
  }, [
132
- ct,
133
- $e,
134
- V,
132
+ st,
133
+ Qe,
134
+ H,
135
135
  e,
136
+ Fe,
136
137
  Ie,
137
- Le,
138
- B
139
- ]), dt = W(() => {
138
+ V
139
+ ]), ut = G(() => {
140
140
  be || (C?.onPress?.(), pe(), xe(!0), (async () => {
141
141
  try {
142
- await z.start(), ge.current = Re.current;
142
+ await z.start(), ge.current = Le.current;
143
143
  } catch {} finally {
144
144
  xe(!1);
145
145
  }
@@ -149,80 +149,80 @@ var Xn = [
149
149
  C,
150
150
  pe,
151
151
  z
152
- ]), pt = z.cancel, ht = W(() => {
153
- pt(), C?.onCancelled?.();
154
- }, [pt, C]), gt = q(!1), _t = C?.onStarted;
155
- G(() => {
156
- Se && !gt.current && _t?.(), gt.current = Se;
157
- }, [Se, _t]), Wn(se, () => ({
152
+ ]), ft = z.cancel, mt = G(() => {
153
+ ft(), C?.onCancelled?.();
154
+ }, [ft, C]), ht = J(!1), gt = C?.onStarted;
155
+ K(() => {
156
+ Se && !ht.current && gt?.(), ht.current = Se;
157
+ }, [Se, gt]), Un(se, () => ({
158
158
  focus: (e) => {
159
- R || Ke(e);
159
+ R || Ge(e);
160
160
  },
161
- clear: Ie,
162
- loadDraft: ke.loadDraft,
161
+ clear: Fe,
162
+ loadDraft: B.loadDraft,
163
163
  getDraft: () => ({
164
- text: Re.current,
165
- mentions: ze.current
164
+ text: Le.current,
165
+ mentions: Re.current
166
166
  }),
167
167
  insertText: (e) => {
168
- 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);
169
- je(o), Me(a), w?.(o), Fe(a, o, !0);
168
+ let t = V.current, n = Le.current, r = t?.selectionStart ?? n.length, i = t?.selectionEnd ?? n.length, a = r + e.length, o = n.slice(0, r) + e + n.slice(i);
169
+ Ae(o), je(a), w?.(o), Pe(a, o, !0);
170
170
  },
171
- cancelRecording: pt,
172
- breakHistory: Le,
171
+ cancelRecording: ft,
172
+ breakHistory: Ie,
173
173
  addFiles: () => {}
174
174
  }), [
175
175
  R,
176
- Ke,
177
- Ie,
178
- ke.loadDraft,
179
- B,
176
+ Ge,
177
+ Fe,
178
+ B.loadDraft,
179
+ V,
180
+ Ae,
180
181
  je,
181
- Me,
182
182
  w,
183
- Fe,
184
- pt,
185
- Le
183
+ Pe,
184
+ ft,
185
+ Ie
186
186
  ]);
187
- let { escapeArmed: yt, handleClearKeyDown: bt, handleUndoRedoKeyDown: xt } = ke, St = (e) => {
187
+ let { escapeArmed: vt, handleClearKeyDown: yt, handleUndoRedoKeyDown: bt } = B, xt = (e) => {
188
188
  if (e.key !== "Escape") return !1;
189
189
  if (E?.(e)) return !0;
190
- if (Se) return e.preventDefault(), ht(), !0;
191
- let t = yt;
192
- return bt(e) ? (t && (Qe(!1), T?.()), !0) : !1;
190
+ if (Se) return e.preventDefault(), mt(), !0;
191
+ let t = vt;
192
+ return yt(e) ? (t && (Ze(!1), T?.()), !0) : !1;
193
+ }, St = (e) => {
194
+ R || nt(e) || bt(e) || ze?.handleKeyDown(e) || H.handleKeyDown(e) || xt(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && ke === "" && z.status === "idle" && !be && !C?.busy && D?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || lt()));
193
195
  }, Ct = (e) => {
194
- R || rt(e) || xt(e) || Be?.handleKeyDown(e) || V.handleKeyDown(e) || St(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && Ae === "" && z.status === "idle" && !be && !C?.busy && D?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || ut()));
195
- }, wt = (e) => {
196
- e.preventDefault(), !R && (t && !Ee ? (V.close(), n?.(), B.current?.focus()) : ut());
197
- }, Et = jt({
196
+ e.preventDefault(), !R && (t && !Ee ? (H.close(), n?.(), V.current?.focus()) : lt());
197
+ }, Tt = At({
198
198
  enabled: !!O && !R,
199
199
  onFiles: O ?? (() => {}),
200
200
  preferText: k
201
- }), Dt = Un(), Ot = Un(), kt = `chat-composer-mentions-${Dt.replace(/:/g, "")}`, At = V.isOpen && !Ve && !R && (V.isLoading || V.rows.length > 0), Mt = V.rows[V.selectedIndex] ?? V.rows[0], Nt = At && Mt ? Ze(kt, Mt.item) : void 0, Pt = (e) => Te ? /* @__PURE__ */ X(m, {
201
+ }), Et = Hn(), Dt = Hn(), Ot = `chat-composer-mentions-${Et.replace(/:/g, "")}`, kt = H.isOpen && !Be && !R && (H.isLoading || H.rows.length > 0), jt = H.rows[H.selectedIndex] ?? H.rows[0], Mt = kt && jt ? Xe(Ot, jt.item) : void 0, Nt = (e) => Te ? /* @__PURE__ */ X(m, {
202
202
  type: "button",
203
203
  variant: "ghost",
204
204
  size: e,
205
205
  hideLabel: !0,
206
206
  label: C?.busy ? L.sendingVoice : L.recordAudio,
207
- icon: ft,
208
- onClick: dt,
207
+ icon: dt,
208
+ onClick: ut,
209
209
  disabled: C?.disabled,
210
210
  loading: be || we || !!C?.busy
211
- }) : null, It = mt({
212
- streaming: lt,
213
- hasDataToSend: st,
214
- canSend: ct
215
- }), Lt = (e) => /* @__PURE__ */ X(Ue, {
216
- action: It,
211
+ }) : null, Ft = pt({
212
+ streaming: ct,
213
+ hasDataToSend: ot,
214
+ canSend: st
215
+ }), It = (e) => /* @__PURE__ */ X(He, {
216
+ action: Ft,
217
217
  sendKind: r,
218
218
  size: e,
219
219
  submit: I,
220
220
  labels: L,
221
- onSend: ut,
221
+ onSend: lt,
222
222
  onStop: () => {
223
- n?.(), B.current?.focus();
223
+ n?.(), V.current?.focus();
224
224
  }
225
- }), Rt = { duration: ce ? 0 : .15 }, zt = typeof N == "function" ? N(z.status) : N, Bt = /* @__PURE__ */ X("div", {
225
+ }), Lt = { duration: ce ? 0 : .15 }, Rt = typeof N == "function" ? N(z.status) : N, zt = /* @__PURE__ */ X("div", {
226
226
  className: "grid",
227
227
  children: /* @__PURE__ */ X(d, {
228
228
  initial: !1,
@@ -231,7 +231,7 @@ var Xn = [
231
231
  initial: { opacity: 0 },
232
232
  animate: { opacity: 1 },
233
233
  exit: { opacity: 0 },
234
- transition: Rt,
234
+ transition: Lt,
235
235
  children: [/* @__PURE__ */ X(le, {
236
236
  stream: z.stream,
237
237
  className: "min-w-0 flex-1"
@@ -244,14 +244,14 @@ var Xn = [
244
244
  hideLabel: !0,
245
245
  label: L.cancelRecording,
246
246
  icon: v,
247
- onClick: ht
247
+ onClick: mt
248
248
  }), /* @__PURE__ */ X(m, {
249
249
  type: "button",
250
250
  variant: "default",
251
251
  size: "md",
252
252
  hideLabel: !0,
253
253
  label: L.confirmRecording,
254
- icon: En,
254
+ icon: Tn,
255
255
  onClick: z.stop
256
256
  })]
257
257
  })]
@@ -260,11 +260,11 @@ var Xn = [
260
260
  initial: { opacity: 0 },
261
261
  animate: { opacity: 1 },
262
262
  exit: { opacity: 0 },
263
- transition: Rt,
263
+ transition: Lt,
264
264
  children: [
265
- zt ? /* @__PURE__ */ X("div", {
265
+ Rt ? /* @__PURE__ */ X("div", {
266
266
  className: i("flex items-center gap-1", P ? "shrink-0" : "min-w-0"),
267
- children: zt
267
+ children: Rt
268
268
  }) : null,
269
269
  P ? /* @__PURE__ */ X("div", {
270
270
  className: "min-w-0 flex-1",
@@ -272,12 +272,12 @@ var Xn = [
272
272
  }) : null,
273
273
  /* @__PURE__ */ Z("div", {
274
274
  className: "ml-auto flex shrink-0 items-center gap-1",
275
- children: [Pt("md"), Lt("md")]
275
+ children: [Nt("md"), It("md")]
276
276
  })
277
277
  ]
278
278
  }, "actions-row")
279
279
  })
280
- }), Vt = {
280
+ }), Bt = {
281
281
  duration: ce ? 0 : .32,
282
282
  ease: [
283
283
  .4,
@@ -285,11 +285,11 @@ var Xn = [
285
285
  .2,
286
286
  1
287
287
  ]
288
- }, Ht = /* @__PURE__ */ Z(Y, { children: [
288
+ }, Vt = /* @__PURE__ */ Z(Kn, { children: [
289
289
  j,
290
- /* @__PURE__ */ X(Ft, {
291
- message: nt,
292
- id: Ot,
290
+ /* @__PURE__ */ X(Pt, {
291
+ message: tt,
292
+ id: Dt,
293
293
  reducedMotion: ce
294
294
  }),
295
295
  ee,
@@ -299,9 +299,9 @@ var Xn = [
299
299
  M,
300
300
  /* @__PURE__ */ X(ye, {
301
301
  className: "min-w-0 flex-1",
302
- textareaRef: B,
303
- highlightRef: Ne,
304
- value: Ae,
302
+ textareaRef: V,
303
+ highlightRef: Me,
304
+ value: ke,
305
305
  role: y,
306
306
  name: b,
307
307
  ariaLabel: L.placeholder,
@@ -316,25 +316,25 @@ var Xn = [
316
316
  mode: "native",
317
317
  text: Se ? L.listening : L.placeholder
318
318
  },
319
- onChange: ke.handleChange,
320
- onKeyDown: Ct,
321
- onPaste: Et,
322
- onFocus: Be?.handleFocus,
323
- onBlur: Be?.handleBlur,
324
- onCursorUpdate: ke.updateCursorPosition,
325
- onScroll: ke.syncHighlightScroll,
326
- highlightSegments: We,
327
- hasOverlay: Ge,
328
- isAutocompleteOpen: Ve || At,
329
- autocompleteListboxId: Ve ? Be?.listboxId : At ? kt : void 0,
330
- activeAutocompleteOptionId: (Ve ? Be?.activeDescendantId : void 0) ?? Nt,
331
- isInvalid: tt !== null,
332
- errorMessageId: Ot
319
+ onChange: B.handleChange,
320
+ onKeyDown: St,
321
+ onPaste: Tt,
322
+ onFocus: ze?.handleFocus,
323
+ onBlur: ze?.handleBlur,
324
+ onCursorUpdate: B.updateCursorPosition,
325
+ onScroll: B.syncHighlightScroll,
326
+ highlightSegments: Ue,
327
+ hasOverlay: We,
328
+ isAutocompleteOpen: Be || kt,
329
+ autocompleteListboxId: Be ? ze?.listboxId : kt ? Ot : void 0,
330
+ activeAutocompleteOptionId: (Be ? ze?.activeDescendantId : void 0) ?? Mt,
331
+ isInvalid: et !== null,
332
+ errorMessageId: Dt
333
333
  }),
334
334
  te ? /* @__PURE__ */ Z("div", {
335
335
  className: "flex shrink-0 items-center gap-2 pb-[10px] pl-2",
336
336
  onMouseDown: (e) => e.preventDefault(),
337
- children: [Pt("sm"), Lt("sm")]
337
+ children: [Nt("sm"), It("sm")]
338
338
  }) : null
339
339
  ]
340
340
  }),
@@ -354,26 +354,26 @@ var Xn = [
354
354
  opacity: 0,
355
355
  height: 0
356
356
  },
357
- transition: Vt,
358
- children: Bt
357
+ transition: Bt,
358
+ children: zt
359
359
  }, "action-row")
360
- }) : Bt
361
- ] }), Ut = /* @__PURE__ */ Z(Y, { children: [
362
- Be?.popover,
363
- /* @__PURE__ */ X(qe, {
364
- isOpen: At,
365
- listboxId: kt,
360
+ }) : zt
361
+ ] }), Ht = /* @__PURE__ */ Z(Kn, { children: [
362
+ ze?.popover,
363
+ /* @__PURE__ */ X(Ke, {
364
+ isOpen: kt,
365
+ listboxId: Ot,
366
366
  label: L.mentionSuggestions,
367
- rows: V.rows,
368
- groups: V.groups,
367
+ rows: H.rows,
368
+ groups: H.groups,
369
369
  showGroupLabels: !!x?.showGroupLabels,
370
- isLoading: V.isLoading,
371
- selectedIndex: V.selectedIndex,
372
- position: V.popoverPosition,
373
- onSelect: V.selectRow,
370
+ isLoading: H.isLoading,
371
+ selectedIndex: H.selectedIndex,
372
+ position: H.popoverPosition,
373
+ onSelect: H.selectRow,
374
374
  pinnedDescription: L.mentionPinnedDescription
375
375
  }),
376
- ne === void 0 ? Ht : /* @__PURE__ */ X(d, {
376
+ ne === void 0 ? Vt : /* @__PURE__ */ X(d, {
377
377
  initial: !1,
378
378
  children: R ? /* @__PURE__ */ X(s.div, {
379
379
  className: "overflow-hidden",
@@ -440,37 +440,37 @@ var Xn = [
440
440
  1
441
441
  ]
442
442
  },
443
- children: Ht
443
+ children: Vt
444
444
  }, "input")
445
445
  })
446
- ] }), Wt = i(Qn, re);
446
+ ] }), Ut = i(Qn, re);
447
447
  return I ? /* @__PURE__ */ X("form", {
448
448
  ref: ie,
449
449
  "data-testid": ue,
450
450
  "data-f0-chat-composer": "",
451
451
  "aria-busy": t,
452
- className: Wt,
452
+ className: Ut,
453
453
  onClick: () => {
454
- R || B.current?.focus();
454
+ R || V.current?.focus();
455
455
  },
456
456
  onFocus: ae,
457
457
  onBlur: oe,
458
- onSubmit: wt,
459
- children: Ut
458
+ onSubmit: Ct,
459
+ children: Ht
460
460
  }) : /* @__PURE__ */ X("div", {
461
461
  ref: ie,
462
462
  "data-testid": ue,
463
463
  "data-f0-chat-composer": "",
464
- className: Wt,
464
+ className: Ut,
465
465
  onFocus: ae,
466
466
  onBlur: oe,
467
- children: Ut
467
+ children: Ht
468
468
  });
469
469
  };
470
470
  //#endregion
471
471
  //#region src/addons/ai/F0AiChat/hooks/useRevealOnChange.ts
472
472
  function nr(e, t, n = .2) {
473
- let r = p(), [i, a] = J(!0), o = q(e);
473
+ let r = p(), [i, a] = Y(!0), o = J(e);
474
474
  return f(() => {
475
475
  if (o.current === e) return;
476
476
  let n = o.current;
@@ -494,19 +494,19 @@ function nr(e, t, n = .2) {
494
494
  //#endregion
495
495
  //#region src/addons/ai/F0AiChatTextArea/components/AttachedFilesList.tsx
496
496
  var rr = (e) => {
497
- let { provided: t } = Mt();
498
- return t ? /* @__PURE__ */ X(ir, { ...e }) : /* @__PURE__ */ X(Ye, { children: /* @__PURE__ */ X(ir, { ...e }) });
497
+ let { provided: t } = jt();
498
+ return t ? /* @__PURE__ */ X(ir, { ...e }) : /* @__PURE__ */ X(Je, { children: /* @__PURE__ */ X(ir, { ...e }) });
499
499
  }, ir = ({ attachedFiles: e, isUploading: n, onRemove: r, removeLabel: i, reducedMotion: a }) => {
500
- let o = t(), s = ar(e), c = K(() => e.flatMap((e) => {
500
+ let o = t(), s = ar(e), c = q(() => e.flatMap((e) => {
501
501
  let t = s.get(e.id);
502
502
  if (!t) return [];
503
- let n = e.file.name, r = e.file.type || _t({
503
+ let n = e.file.name, r = e.file.type || gt({
504
504
  name: n,
505
505
  url: t
506
506
  });
507
507
  return [{
508
508
  att: e,
509
- attachment: nt({
509
+ attachment: tt({
510
510
  name: n,
511
511
  url: t,
512
512
  mimeType: r
@@ -523,12 +523,12 @@ var rr = (e) => {
523
523
  size: e.file.size
524
524
  }
525
525
  }];
526
- }), [e, s]), l = K(() => c.map(({ att: e, attachment: t }, n) => ({
526
+ }), [e, s]), l = q(() => c.map(({ att: e, attachment: t }, n) => ({
527
527
  file: t,
528
- item: e.status === "uploaded" ? at(t, Ct(n, t.url)) : null
529
- })), [c]), u = Et(l, "composer"), d = c.map(({ att: e, attachment: t }) => ({
528
+ item: e.status === "uploaded" ? it(t, St(n, t.url)) : null
529
+ })), [c]), u = Tt(l, "composer"), d = c.map(({ att: e, attachment: t }) => ({
530
530
  id: e.id,
531
- content: /* @__PURE__ */ X(ke, {
531
+ content: /* @__PURE__ */ X(B, {
532
532
  attachment: t,
533
533
  status: e.status === "uploaded" ? "ready" : e.status === "error" ? "error" : "uploading",
534
534
  errorMessage: e.errorMessage,
@@ -546,10 +546,10 @@ var rr = (e) => {
546
546
  testIdPrefix: "ai-chat"
547
547
  });
548
548
  }, ar = (e) => {
549
- let [t, n] = J(() => /* @__PURE__ */ new Map()), r = q(t);
550
- return Kn(() => {
549
+ let [t, n] = Y(() => /* @__PURE__ */ new Map()), r = J(t);
550
+ return Gn(() => {
551
551
  r.current = t;
552
- }, [t]), G(() => {
552
+ }, [t]), K(() => {
553
553
  let t = r.current, i = new Set(e.map((e) => e.id)), a = e.filter((e) => !t.has(e.id)), o = [...t.keys()].filter((e) => !i.has(e));
554
554
  if (a.length === 0 && o.length === 0) return;
555
555
  let s = new Map(t);
@@ -559,16 +559,16 @@ var rr = (e) => {
559
559
  }
560
560
  for (let e of a) s.set(e.id, URL.createObjectURL(e.file));
561
561
  n(s);
562
- }, [e]), G(() => () => {
562
+ }, [e]), K(() => () => {
563
563
  for (let e of r.current.values()) URL.revokeObjectURL(e);
564
564
  r.current = /* @__PURE__ */ new Map();
565
565
  }, []), t;
566
566
  }, or = ({ actions: e, showAttachEntry: n, onAttachClick: r, attachDisabled: i, attachDisabledTooltip: a, disabled: o, onOpenChange: s }) => {
567
- let c = t(), [l, u] = J(!1), d = (e) => {
567
+ let c = t(), [l, u] = Y(!1), d = (e) => {
568
568
  u(e), s?.(e);
569
569
  }, f = [...n ? [{
570
570
  label: c.ai.addFilesOrPhotos,
571
- icon: je,
571
+ icon: Ae,
572
572
  onClick: r,
573
573
  disabled: i,
574
574
  disabledTooltip: a
@@ -586,7 +586,7 @@ var rr = (e) => {
586
586
  label: c.ai.addToConversation,
587
587
  hideLabel: !0,
588
588
  type: "button",
589
- icon: Zt,
589
+ icon: Xt,
590
590
  variant: "ghost",
591
591
  size: "md",
592
592
  pressed: l,
@@ -596,7 +596,7 @@ var rr = (e) => {
596
596
  });
597
597
  }, sr = ({ onUploadFiles: e, composerActions: n, isAtMaxFiles: r, maxFiles: i, acceptValue: a, fileInputRef: o, handleFileSelect: s, recordingStatus: c, onComposerActionsOpenChange: l }) => {
598
598
  let u = t(), d = c === "transcribing", f = () => o.current?.click(), p = n?.length ? n : null;
599
- return !e && !p ? null : /* @__PURE__ */ Z(Y, { children: [p ? /* @__PURE__ */ X(or, {
599
+ return !e && !p ? null : /* @__PURE__ */ Z(Kn, { children: [p ? /* @__PURE__ */ X(or, {
600
600
  actions: p,
601
601
  showAttachEntry: !!e,
602
602
  onAttachClick: f,
@@ -608,7 +608,7 @@ var rr = (e) => {
608
608
  label: u.ai.attachFile,
609
609
  hideLabel: !0,
610
610
  type: "button",
611
- icon: je,
611
+ icon: Ae,
612
612
  variant: "ghost",
613
613
  size: "md",
614
614
  disabled: r || d,
@@ -677,7 +677,7 @@ var rr = (e) => {
677
677
  function pr({ open: e, percentage: t, tone: n, label: r }) {
678
678
  return /* @__PURE__ */ X(l, {
679
679
  description: e ? "" : r,
680
- children: /* @__PURE__ */ X(An, {
680
+ children: /* @__PURE__ */ X(kn, {
681
681
  asChild: !0,
682
682
  children: /* @__PURE__ */ Z("button", {
683
683
  type: "button",
@@ -738,13 +738,13 @@ var mr = ({ label: e, description: n, percentage: r, unlimited: a = !1 }) => {
738
738
  //#endregion
739
739
  //#region src/addons/ai/F0AiChatUsageLimits/components/UsageSkeleton.tsx
740
740
  function hr() {
741
- return /* @__PURE__ */ Z(U, {
741
+ return /* @__PURE__ */ Z(W, {
742
742
  display: "flex",
743
743
  flexDirection: "column",
744
744
  gap: "md",
745
745
  "aria-busy": "true",
746
746
  "aria-live": "polite",
747
- children: [/* @__PURE__ */ Z(U, {
747
+ children: [/* @__PURE__ */ Z(W, {
748
748
  display: "flex",
749
749
  justifyContent: "between",
750
750
  children: [/* @__PURE__ */ X("div", { className: "h-5 w-28 animate-pulse rounded bg-f1-background-secondary" }), /* @__PURE__ */ X("div", { className: "h-5 w-16 animate-pulse rounded bg-f1-background-secondary" })]
@@ -755,13 +755,13 @@ function hr() {
755
755
  //#region src/addons/ai/F0AiChatUsageLimits/F0AiChatUsageLimitsButton.tsx
756
756
  var gr = (e) => Math.min(100, Math.max(0, Math.round(e)));
757
757
  function _r({ usage: e, error: n = !1, onOpenChange: r, trigger: o, side: s = "top" }) {
758
- let c = t(), [l, u] = J(!1), d = q(null), f = W((e) => {
758
+ let c = t(), [l, u] = Y(!1), d = J(null), f = G((e) => {
759
759
  u(e), r?.(e);
760
760
  }, [r]), p = e ? gr(e.usedPercentage) : 0, m = e?.unlimited ?? !1, h = m ? "unlimited" : p >= 100 ? "exhausted" : "default", g = e?.sections ?? [], _ = !!e?.onSeeCompany || g.length > 0, v = c.t("ai.usageLimits.title"), y = m ? c.t("ai.usageLimits.unlimited") : c.t("ai.usageLimits.used", { percentage: p }), b = e ? `${v}: ${y}` : v;
761
- return /* @__PURE__ */ Z(Nn, {
761
+ return /* @__PURE__ */ Z(Mn, {
762
762
  open: l,
763
763
  onOpenChange: f,
764
- children: [o ? /* @__PURE__ */ X(An, {
764
+ children: [o ? /* @__PURE__ */ X(kn, {
765
765
  asChild: !0,
766
766
  children: o
767
767
  }) : /* @__PURE__ */ X(pr, {
@@ -769,7 +769,7 @@ function _r({ usage: e, error: n = !1, onOpenChange: r, trigger: o, side: s = "t
769
769
  percentage: p,
770
770
  tone: h,
771
771
  label: b
772
- }), /* @__PURE__ */ Z(jn, {
772
+ }), /* @__PURE__ */ Z(An, {
773
773
  ref: d,
774
774
  side: s,
775
775
  align: "end",
@@ -800,8 +800,8 @@ function _r({ usage: e, error: n = !1, onOpenChange: r, trigger: o, side: s = "t
800
800
  children: [/* @__PURE__ */ X("span", {
801
801
  className: "min-w-0 flex-1 truncate",
802
802
  children: c.t("ai.usageLimits.yourCompany")
803
- }), /* @__PURE__ */ X(H, {
804
- icon: hn,
803
+ }), /* @__PURE__ */ X(U, {
804
+ icon: mn,
805
805
  size: "md",
806
806
  color: "default"
807
807
  })]
@@ -835,7 +835,7 @@ var vr = (e, t) => e || t ? {
835
835
  children: [
836
836
  /* @__PURE__ */ X("div", {
837
837
  className: "flex items-center py-0.5",
838
- children: /* @__PURE__ */ X(H, {
838
+ children: /* @__PURE__ */ X(U, {
839
839
  icon: M,
840
840
  size: "md",
841
841
  color: "default"
@@ -892,7 +892,7 @@ function xr(e, t) {
892
892
  }
893
893
  function Sr({ searchPersons: e, mentionSources: n }) {
894
894
  let { ai: r } = t(), i = r.mentions.people;
895
- return K(() => {
895
+ return q(() => {
896
896
  let t = n ?? [];
897
897
  return !e || t.some((e) => e.type === "person") ? t : [xr(e, { label: i }), ...t];
898
898
  }, [
@@ -920,21 +920,21 @@ function wr(e, t) {
920
920
  //#region src/addons/ai/F0AiChatTextArea/useFileAttachments.ts
921
921
  var Tr = 4e3;
922
922
  function Er(e) {
923
- let [n, r] = J([]), [i, a] = J(null), o = q(null), s = q(null), c = t(), l = e?.onUploadFiles, u = e?.allowedMimeTypes, d = e?.maxFiles, f = K(() => {
923
+ let [n, r] = Y([]), [i, a] = Y(null), o = J(null), s = J(null), c = t(), l = e?.onUploadFiles, u = e?.allowedMimeTypes, d = e?.maxFiles, f = q(() => {
924
924
  if (u) return Array.isArray(u) ? u.join(",") : u;
925
- }, [u]), p = d !== void 0 && n.length >= d, m = q(0);
926
- G(() => {
925
+ }, [u]), p = d !== void 0 && n.length >= d, m = J(0);
926
+ K(() => {
927
927
  m.current = n.length;
928
928
  }, [n]);
929
- let h = W((e) => {
929
+ let h = G((e) => {
930
930
  o.current && clearTimeout(o.current), a(e), o.current = setTimeout(() => {
931
931
  a(null), o.current = null;
932
932
  }, Tr);
933
933
  }, []);
934
- G(() => () => {
934
+ K(() => () => {
935
935
  o.current && clearTimeout(o.current);
936
936
  }, []);
937
- let g = W(async (e) => {
937
+ let g = G(async (e) => {
938
938
  if (e.length === 0 || !l) return;
939
939
  let t = wr(e, u);
940
940
  if (t.length === 0) return;
@@ -990,10 +990,10 @@ function Er(e) {
990
990
  isAtMaxFiles: p,
991
991
  maxFiles: d,
992
992
  processFiles: g,
993
- handleFileSelect: W(async (e) => {
993
+ handleFileSelect: G(async (e) => {
994
994
  await g(Array.from(e.target.files ?? [])), e.target.value = "";
995
995
  }, [g]),
996
- handleRemoveFile: W((e) => {
996
+ handleRemoveFile: G((e) => {
997
997
  r((t) => t.filter((t) => t.id !== e));
998
998
  }, []),
999
999
  transientError: i,
@@ -1004,37 +1004,37 @@ function Er(e) {
1004
1004
  //#region src/addons/ai/F0AiChatTextArea/AiChatComposer.tsx
1005
1005
  var Dr = "w-full max-w-content px-1";
1006
1006
  function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: o, creditWarning: c, clarifyingUI: l, pendingContext: u = null, onPendingContextChange: f, pendingQuote: m = null, onPendingQuoteChange: h, fileAttachments: g, toolbarStart: _, composerActions: v, onComposerActionsOpenChange: y, onTranscribe: b, searchPersons: x, mentionSources: S, onProcessFilesRef: C, disclaimer: T, usageLimits: D, footer: O, isWelcomeScreen: k = !1, fullscreen: A = !1, welcomeScreenSuggestions: j, onSuggestionClick: ee, welcomeScreenSuggestionsPlacement: M = "above", welcomeScreenSuggestionsCollapsedByDefault: N = !1, welcomeScreenCards: P, padding: F = "default", name: te }) {
1007
- let I = t(), re = !!p(), ie = q(null), [ae, se] = J(!1), [ce, le] = J({
1007
+ let I = t(), re = !!p(), ie = J(null), [ae, se] = Y(!1), [ce, le] = Y({
1008
1008
  isEmpty: !0,
1009
1009
  recorder: "idle"
1010
- }), ue = q(null), L = q(null);
1011
- G(() => () => {
1010
+ }), ue = J(null), L = J(null);
1011
+ K(() => () => {
1012
1012
  L.current && clearTimeout(L.current);
1013
1013
  }, []);
1014
- let R = l != null, de = q(u), fe = q(m);
1015
- Kn(() => {
1014
+ let R = l != null, de = J(u), fe = J(m);
1015
+ Gn(() => {
1016
1016
  de.current = u, fe.current = m;
1017
1017
  });
1018
- let { tracking: pe, setFocusChatInputFunction: he } = Kt(), { attachedFiles: ge, fileInputRef: _e, onUploadFiles: ve, acceptValue: ye, isAtMaxFiles: z, maxFiles: be, processFiles: xe, handleFileSelect: Se, handleRemoveFile: Ce, transientError: we, showTransientError: Te } = Er(g), Ee = Sr({
1018
+ let { tracking: pe, setFocusChatInputFunction: he } = Gt(), { attachedFiles: ge, fileInputRef: _e, onUploadFiles: ve, acceptValue: ye, isAtMaxFiles: z, maxFiles: be, processFiles: xe, handleFileSelect: Se, handleRemoveFile: Ce, transientError: we, showTransientError: Te } = Er(g), Ee = Sr({
1019
1019
  searchPersons: x,
1020
1020
  mentionSources: S
1021
1021
  });
1022
- G(() => {
1022
+ K(() => {
1023
1023
  N || typeof window < "u" && window.location.hash.length === 0 && ie.current?.focus();
1024
- }, []), G(() => {
1024
+ }, []), K(() => {
1025
1025
  if (R) he(null);
1026
1026
  else return he(() => {
1027
1027
  ie.current?.focus();
1028
1028
  }), () => he(null);
1029
- }, [R, he]), G(() => {
1029
+ }, [R, he]), K(() => {
1030
1030
  if (C) return C((e) => {
1031
1031
  xe(e);
1032
1032
  }), () => {
1033
1033
  C(null);
1034
1034
  };
1035
1035
  }, [C, xe]);
1036
- let De = W((e) => void xe(e), [xe]), Oe = ge.filter((e) => e.status === "uploaded"), ke = ge.some((e) => e.status === "uploading"), Ae = ge.some((e) => e.status === "error"), je = !ce.isEmpty || Oe.length > 0, Me = async ({ text: t, mentions: n }) => {
1037
- if (Ae) return Te(I.ai.fileUploadBlockedSubmit), !1;
1036
+ let De = G((e) => void xe(e), [xe]), Oe = ge.filter((e) => e.status === "uploaded"), B = ge.some((e) => e.status === "uploading"), ke = ge.some((e) => e.status === "error"), Ae = !ce.isEmpty || Oe.length > 0, je = async ({ text: t, mentions: n }) => {
1037
+ if (ke) return Te(I.ai.fileUploadBlockedSubmit), !1;
1038
1038
  if (a && await a() === !1) return !1;
1039
1039
  let r = Oe, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = u, s = m;
1040
1040
  o && f?.(null), s && h?.(null);
@@ -1050,24 +1050,24 @@ function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1050
1050
  }
1051
1051
  for (let e of r) Ce(e.id);
1052
1052
  return !0;
1053
- }, B = M === "inside", Ne = ne(), V = me({
1053
+ }, V = M === "inside", Me = ne(), H = me({
1054
1054
  onItemClick: ee,
1055
- inBar: B
1056
- }), Pe = k && j && j.length > 0 && ee ? /* @__PURE__ */ X(w, {
1055
+ inBar: V
1056
+ }), Ne = k && j && j.length > 0 && ee ? /* @__PURE__ */ X(w, {
1057
1057
  suggestions: j,
1058
- onItemClick: V.pick,
1059
- onItemHover: V.preview,
1060
- side: B ? "bottom" : "top",
1061
- reserveTwoRows: !B,
1062
- overflow: B ? "scroll" : "wrap"
1063
- }) : null, Fe = !N || ae || je || ce.recorder !== "idle", Ie = (e) => e instanceof Node ? ue.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, Le = () => {
1058
+ onItemClick: H.pick,
1059
+ onItemHover: H.preview,
1060
+ side: V ? "bottom" : "top",
1061
+ reserveTwoRows: !V,
1062
+ overflow: V ? "scroll" : "wrap"
1063
+ }) : null, Pe = !N || ae || Ae || ce.recorder !== "idle", Fe = (e) => e instanceof Node ? ue.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, Ie = () => {
1064
1064
  L.current && clearTimeout(L.current), L.current = setTimeout(() => {
1065
- Ie(document.activeElement) || se(!1);
1065
+ Fe(document.activeElement) || se(!1);
1066
1066
  }, 0);
1067
- }, Re = B, ze = Re && N, Be = ze && !Fe, Ve = Re && Pe ? /* @__PURE__ */ X("div", {
1067
+ }, Le = V, Re = Le && N, ze = Re && !Pe, Be = Le && Ne ? /* @__PURE__ */ X("div", {
1068
1068
  onClick: (e) => e.stopPropagation(),
1069
- children: Pe
1070
- }) : void 0, He = {
1069
+ children: Ne
1070
+ }) : void 0, Ve = {
1071
1071
  duration: re ? 0 : .32,
1072
1072
  ease: [
1073
1073
  .4,
@@ -1075,19 +1075,19 @@ function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1075
1075
  .2,
1076
1076
  1
1077
1077
  ]
1078
- }, Ue = k && A && !!P && P.length > 0, We = A && k, Ge = We || !Ne?.inBar, Ke = R || !!(T?.text || D), { motionProps: qe } = nr(k, 160, .5);
1078
+ }, He = k && A && !!P && P.length > 0, Ue = A && k, We = Ue || !Me?.inBar, Ge = R || !!(T?.text || D), { motionProps: Ke } = nr(k, 160, .5);
1079
1079
  return /* @__PURE__ */ Z(s.div, {
1080
- "data-composer-layout": We ? "welcome" : "docked",
1081
- className: i("flex flex-col items-center", F === "default" && "px-4 pb-3 pt-2", We && "min-h-0 flex-1 justify-start"),
1082
- ...A ? qe : {},
1080
+ "data-composer-layout": Ue ? "welcome" : "docked",
1081
+ className: i("flex flex-col items-center", F === "default" && "px-4 pb-3 pt-2", Ue && "min-h-0 flex-1 justify-start"),
1082
+ ...A ? Ke : {},
1083
1083
  children: [
1084
1084
  /* @__PURE__ */ Z("div", {
1085
1085
  className: i("flex flex-col gap-2", Dr),
1086
1086
  children: [
1087
1087
  O && !A ? O : null,
1088
- Pe && !B ? /* @__PURE__ */ X("div", { children: N ? /* @__PURE__ */ X(d, {
1088
+ Ne && !V ? /* @__PURE__ */ X("div", { children: N ? /* @__PURE__ */ X(d, {
1089
1089
  initial: !1,
1090
- children: Fe ? /* @__PURE__ */ X(s.div, {
1090
+ children: Pe ? /* @__PURE__ */ X(s.div, {
1091
1091
  className: "overflow-hidden",
1092
1092
  initial: {
1093
1093
  opacity: 0,
@@ -1101,10 +1101,10 @@ function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1101
1101
  opacity: 0,
1102
1102
  height: 0
1103
1103
  },
1104
- transition: He,
1105
- children: Pe
1104
+ transition: Ve,
1105
+ children: Ne
1106
1106
  }, "welcome-suggestions") : null
1107
- }) : Pe }) : null,
1107
+ }) : Ne }) : null,
1108
1108
  /* @__PURE__ */ X(lr, {
1109
1109
  creditWarning: c,
1110
1110
  children: /* @__PURE__ */ X(tr, {
@@ -1114,20 +1114,20 @@ function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1114
1114
  className: "isolate z-20 items-stretch bg-f1-special-page-surface p-0 hover:cursor-text",
1115
1115
  replacement: R ? l : null,
1116
1116
  onSurfaceFocus: () => se(!0),
1117
- onSurfaceBlur: Le,
1117
+ onSurfaceBlur: Ie,
1118
1118
  onStateChange: le,
1119
- onSend: Me,
1119
+ onSend: je,
1120
1120
  inProgress: r,
1121
1121
  onStop: n,
1122
1122
  hasAttachments: Oe.length > 0,
1123
- sendBlocked: ke,
1123
+ sendBlocked: B,
1124
1124
  error: we,
1125
1125
  role: "textbox",
1126
1126
  name: te,
1127
1127
  placeholders: o ?? [],
1128
1128
  placeholdersPaused: r,
1129
- placeholderPreview: Ne?.prompt,
1130
- placeholderPreviewOneLine: Ge,
1129
+ placeholderPreview: Me?.prompt,
1130
+ placeholderPreviewOneLine: We,
1131
1131
  labels: {
1132
1132
  placeholder: I.ai.inputPlaceholder,
1133
1133
  listening: I.ai.listening,
@@ -1158,19 +1158,19 @@ function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1158
1158
  }) : null,
1159
1159
  tray: /* @__PURE__ */ X(rr, {
1160
1160
  attachedFiles: ge,
1161
- isUploading: ke,
1161
+ isUploading: B,
1162
1162
  onRemove: Ce,
1163
1163
  removeLabel: I.ai.removeFile,
1164
1164
  reducedMotion: re
1165
1165
  }),
1166
- leading: Re ? /* @__PURE__ */ X("div", {
1166
+ leading: Le ? /* @__PURE__ */ X("div", {
1167
1167
  className: "flex shrink-0 self-center pl-3",
1168
1168
  children: /* @__PURE__ */ X(oe, {
1169
1169
  size: "sm",
1170
1170
  spin: r
1171
1171
  })
1172
1172
  }) : void 0,
1173
- toolbarStart: ve || _ || v?.length ? (e) => /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(sr, {
1173
+ toolbarStart: ve || _ || v?.length ? (e) => /* @__PURE__ */ Z(Kn, { children: [/* @__PURE__ */ X(sr, {
1174
1174
  onUploadFiles: ve,
1175
1175
  composerActions: v,
1176
1176
  onComposerActionsOpenChange: y,
@@ -1185,19 +1185,19 @@ function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1185
1185
  onClick: (e) => e.stopPropagation(),
1186
1186
  children: _
1187
1187
  }) : null] }) : void 0,
1188
- toolbarCenter: Ve,
1189
- collapsible: ze,
1190
- collapsed: Be,
1188
+ toolbarCenter: Be,
1189
+ collapsible: Re,
1190
+ collapsed: ze,
1191
1191
  reducedMotion: re
1192
1192
  })
1193
1193
  })
1194
1194
  ]
1195
1195
  }),
1196
1196
  /* @__PURE__ */ X("div", {
1197
- className: i("grid transition-collapse duration-base ease-out-swift motion-reduce:transition-none", Dr, Ke ? "mt-2 grid-rows-expanded" : "mt-0 grid-rows-collapsed"),
1197
+ className: i("grid transition-collapse duration-base ease-out-swift motion-reduce:transition-none", Dr, Ge ? "mt-2 grid-rows-expanded" : "mt-0 grid-rows-collapsed"),
1198
1198
  children: /* @__PURE__ */ X("div", {
1199
- className: i("flex min-h-0 min-w-0 flex-col items-center", !Ke && "overflow-hidden"),
1200
- children: /* @__PURE__ */ X(Rt, {
1199
+ className: i("flex min-h-0 min-w-0 flex-col items-center", !Ge && "overflow-hidden"),
1200
+ children: /* @__PURE__ */ X(Lt, {
1201
1201
  hint: R ? {
1202
1202
  navigate: I.ai.clarifyingQuestion.navHint.navigate,
1203
1203
  select: I.ai.clarifyingQuestion.navHint.select,
@@ -1209,7 +1209,7 @@ function Or({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
1209
1209
  })
1210
1210
  })
1211
1211
  }),
1212
- Ue ? /* @__PURE__ */ X("div", {
1212
+ He ? /* @__PURE__ */ X("div", {
1213
1213
  className: i("mt-2 pt-2", Dr),
1214
1214
  children: /* @__PURE__ */ X(br, { cards: P })
1215
1215
  }) : null,
@@ -1327,7 +1327,7 @@ function Gr({ children: e, ...t }) {
1327
1327
  //#endregion
1328
1328
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/components/Image.tsx
1329
1329
  function Kr({ src: e, alt: n, ...r }) {
1330
- let o = t(), s = z(), c = D(), l = se(e || void 0), [u, d] = J(!1), [f, p] = J(!1), m = n || (e ? pt(e) : "") || "image";
1330
+ let o = t(), s = z(), c = D(), l = se(e || void 0), [u, d] = Y(!1), [f, p] = Y(!1), m = n || (e ? ft(e) : "") || "image";
1331
1331
  if (!e || u || l.status === "error") return n ? /* @__PURE__ */ X("span", {
1332
1332
  className: "text-f1-foreground-secondary",
1333
1333
  children: n
@@ -1375,10 +1375,10 @@ function qr({ children: e, className: n, target: r, ...o }) {
1375
1375
  target: r,
1376
1376
  rel: l ? "noopener noreferrer" : o.rel,
1377
1377
  className: i(c(), "font-medium text-f1-foreground visited:text-f1-foreground", a(), n),
1378
- children: [e, l ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("span", {
1378
+ children: [e, l ? /* @__PURE__ */ Z(Kn, { children: [/* @__PURE__ */ X("span", {
1379
1379
  className: "ml-1 inline-block align-[-3px]",
1380
- children: /* @__PURE__ */ X(H, {
1381
- icon: On,
1380
+ children: /* @__PURE__ */ X(U, {
1381
+ icon: Dn,
1382
1382
  size: "sm",
1383
1383
  "aria-hidden": !0
1384
1384
  })
@@ -1433,11 +1433,11 @@ function $r({ children: e, ...t }) {
1433
1433
  //#endregion
1434
1434
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/components/EntityRefHoverCard.tsx
1435
1435
  function ei({ id: e, trigger: t, resolver: n, contentClassName: r = "w-64", ...a }) {
1436
- let o = q(/* @__PURE__ */ new Map()), [s, c] = J(() => o.current.get(e) ?? null), [l, u] = J(!1), [d, f] = J(!1), p = q(!0);
1437
- G(() => () => {
1436
+ let o = J(/* @__PURE__ */ new Map()), [s, c] = Y(() => o.current.get(e) ?? null), [l, u] = Y(!1), [d, f] = Y(!1), p = J(!0);
1437
+ K(() => () => {
1438
1438
  p.current = !1;
1439
1439
  }, []);
1440
- let m = W(() => {
1440
+ let m = G(() => {
1441
1441
  if (s || l) return;
1442
1442
  let t = o.current.get(e);
1443
1443
  t ? c(t) : (u(!0), f(!1), n(e).then((t) => {
@@ -1456,16 +1456,16 @@ function ei({ id: e, trigger: t, resolver: n, contentClassName: r = "w-64", ...a
1456
1456
  status: "ready",
1457
1457
  data: s
1458
1458
  } : d ? { status: "failed" } : { status: "loading" };
1459
- return /* @__PURE__ */ Z(Cn, {
1459
+ return /* @__PURE__ */ Z(Sn, {
1460
1460
  openDelay: 300,
1461
1461
  closeDelay: 100,
1462
1462
  onOpenChange: (e) => {
1463
1463
  e && m();
1464
1464
  },
1465
- children: [/* @__PURE__ */ X(gn, {
1465
+ children: [/* @__PURE__ */ X(hn, {
1466
1466
  asChild: !0,
1467
1467
  children: t
1468
- }), /* @__PURE__ */ X(Tn, {
1468
+ }), /* @__PURE__ */ X(wn, {
1469
1469
  side: "top",
1470
1470
  align: "start",
1471
1471
  className: i(r, "rounded-2xl border-none bg-f1-background p-0 text-f1-foreground shadow-md"),
@@ -1475,7 +1475,7 @@ function ei({ id: e, trigger: t, resolver: n, contentClassName: r = "w-64", ...a
1475
1475
  }
1476
1476
  //#endregion
1477
1477
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/components/MentionTrigger.tsx
1478
- var ti = zn(({ label: e, avatar: t, ...n }, r) => /* @__PURE__ */ Z("button", {
1478
+ var ti = Rn(({ label: e, avatar: t, ...n }, r) => /* @__PURE__ */ Z("button", {
1479
1479
  ref: r,
1480
1480
  type: "button",
1481
1481
  className: i("group/mention -mx-1 inline-flex max-w-full cursor-pointer items-baseline gap-1.5 rounded-sm px-1 py-0.5 text-left font-medium [color:inherit] transition-colors duration-150 hover:bg-f1-background-hover motion-reduce:transition-none", t ? "my-[calc((max(1lh,24px)_-_1lh)_/_2_-_2px)]" : "-my-0.5", a()),
@@ -1493,7 +1493,7 @@ ti.displayName = "MentionTrigger";
1493
1493
  //#endregion
1494
1494
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/custom/CustomEntityRef.tsx
1495
1495
  function ni({ id: e, label: n, config: r }) {
1496
- let i = t(), { resolve: a, avatar: o, url: s } = r, c = s?.(e), l = W((e) => ({
1496
+ let i = t(), { resolve: a, avatar: o, url: s } = r, c = s?.(e), l = G((e) => ({
1497
1497
  ...e,
1498
1498
  avatar: e.avatar ?? o,
1499
1499
  ...c && { secondaryActions: {
@@ -1504,7 +1504,7 @@ function ni({ id: e, label: n, config: r }) {
1504
1504
  o,
1505
1505
  c,
1506
1506
  i
1507
- ]), u = K(() => l({ title: n }), [l, n]), d = W((e) => a ? a(e) : Promise.resolve({ title: n }), [a, n]);
1507
+ ]), u = q(() => l({ title: n }), [l, n]), d = G((e) => a ? a(e) : Promise.resolve({ title: n }), [a, n]);
1508
1508
  return /* @__PURE__ */ X(ei, {
1509
1509
  id: e,
1510
1510
  trigger: /* @__PURE__ */ X(ti, { label: n }),
@@ -1515,7 +1515,7 @@ function ni({ id: e, label: n, config: r }) {
1515
1515
  }
1516
1516
  //#endregion
1517
1517
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/candidate/CandidateEntityRef.tsx
1518
- var ri = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1518
+ var ri = Rn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1519
1519
  ref: n,
1520
1520
  type: "button",
1521
1521
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1524,7 +1524,7 @@ var ri = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1524
1524
  }));
1525
1525
  ri.displayName = "CandidateTrigger";
1526
1526
  function ii({ id: e, label: n }) {
1527
- let { entityRefs: r } = Kt(), i = r?.resolvers?.candidate, a = t(), o = r?.urls?.candidate?.(e), s = K(() => (e) => {
1527
+ let { entityRefs: r } = Gt(), i = r?.resolvers?.candidate, a = t(), o = r?.urls?.candidate?.(e), s = q(() => (e) => {
1528
1528
  let t = [];
1529
1529
  return e.source && t.push({
1530
1530
  title: a.t("ai.entityRef.candidate.source"),
@@ -1558,7 +1558,7 @@ function ii({ id: e, label: n }) {
1558
1558
  href: o
1559
1559
  } }
1560
1560
  };
1561
- }, [a, o]), c = K(() => ({
1561
+ }, [a, o]), c = q(() => ({
1562
1562
  title: n,
1563
1563
  ...o && { secondaryActions: {
1564
1564
  label: a.t("ai.view"),
@@ -1579,7 +1579,7 @@ function ii({ id: e, label: n }) {
1579
1579
  }
1580
1580
  //#endregion
1581
1581
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/expense/ExpenseEntityRef.tsx
1582
- var ai = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1582
+ var ai = Rn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1583
1583
  ref: n,
1584
1584
  type: "button",
1585
1585
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1588,10 +1588,10 @@ var ai = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1588
1588
  }));
1589
1589
  ai.displayName = "ExpenseTrigger";
1590
1590
  function oi({ id: e, label: n }) {
1591
- let { entityRefs: r } = Kt(), i = r?.resolvers?.expense, a = t(), o = r?.urls?.expense?.(e), s = K(() => (e) => ({
1591
+ let { entityRefs: r } = Gt(), i = r?.resolvers?.expense, a = t(), o = r?.urls?.expense?.(e), s = q(() => (e) => ({
1592
1592
  avatar: {
1593
1593
  type: "icon",
1594
- icon: Fe
1594
+ icon: Pe
1595
1595
  },
1596
1596
  title: e.description || `Expense #${e.id}`,
1597
1597
  description: [e.amount, e.status].filter(Boolean).join(" · "),
@@ -1599,7 +1599,7 @@ function oi({ id: e, label: n }) {
1599
1599
  label: a.t("ai.view"),
1600
1600
  href: o
1601
1601
  } }
1602
- }), [a, o]), c = K(() => ({
1602
+ }), [a, o]), c = q(() => ({
1603
1603
  title: n,
1604
1604
  ...o && { secondaryActions: {
1605
1605
  label: a.t("ai.view"),
@@ -1620,7 +1620,7 @@ function oi({ id: e, label: n }) {
1620
1620
  }
1621
1621
  //#endregion
1622
1622
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/jobPosting/JobPostingEntityRef.tsx
1623
- var si = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1623
+ var si = Rn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1624
1624
  ref: n,
1625
1625
  type: "button",
1626
1626
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1629,14 +1629,14 @@ var si = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1629
1629
  }));
1630
1630
  si.displayName = "JobPostingTrigger";
1631
1631
  function ci({ id: e, label: n }) {
1632
- let { entityRefs: r } = Kt(), i = r?.resolvers?.jobPosting, a = t(), o = r?.urls?.jobPosting?.(e), s = K(() => (e) => ({
1632
+ let { entityRefs: r } = Gt(), i = r?.resolvers?.jobPosting, a = t(), o = r?.urls?.jobPosting?.(e), s = q(() => (e) => ({
1633
1633
  title: e.title,
1634
1634
  description: [e.status, e.location].filter(Boolean).join(" · "),
1635
1635
  ...o && { secondaryActions: {
1636
1636
  label: a.t("ai.view"),
1637
1637
  href: o
1638
1638
  } }
1639
- }), [a, o]), c = K(() => ({
1639
+ }), [a, o]), c = q(() => ({
1640
1640
  title: n,
1641
1641
  ...o && { secondaryActions: {
1642
1642
  label: a.t("ai.view"),
@@ -1657,7 +1657,7 @@ function ci({ id: e, label: n }) {
1657
1657
  }
1658
1658
  //#endregion
1659
1659
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/ChipAvatar.tsx
1660
- var li = qt({
1660
+ var li = Kt({
1661
1661
  variants: { color: {
1662
1662
  viridian: "bg-avatar-soft-viridian text-avatar-soft-viridian",
1663
1663
  malibu: "bg-avatar-soft-malibu text-avatar-soft-malibu",
@@ -1674,13 +1674,13 @@ var li = qt({
1674
1674
  defaultVariants: { color: "viridian" }
1675
1675
  });
1676
1676
  function ui({ name: e }) {
1677
- return /* @__PURE__ */ X(Xt, {
1677
+ return /* @__PURE__ */ X(Yt, {
1678
1678
  size: "small",
1679
1679
  type: "rounded",
1680
- className: li({ color: cn(e.join("")) }),
1681
- children: /* @__PURE__ */ X(Yt, {
1680
+ className: li({ color: sn(e.join("")) }),
1681
+ children: /* @__PURE__ */ X(Jt, {
1682
1682
  className: "select-none text-xs text-inherit",
1683
- children: en(e)
1683
+ children: $t(e)
1684
1684
  })
1685
1685
  });
1686
1686
  }
@@ -1688,7 +1688,7 @@ function ui({ name: e }) {
1688
1688
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/PersonEntityRef.tsx
1689
1689
  var di = "\xA0";
1690
1690
  function fi({ id: e, label: t }) {
1691
- let { entityRefs: n } = Kt(), r = n?.resolvers?.person, i = n?.urls?.person?.(e);
1691
+ let { entityRefs: n } = Gt(), r = n?.resolvers?.person, i = n?.urls?.person?.(e);
1692
1692
  if (!r) return /* @__PURE__ */ X("span", { children: t });
1693
1693
  let [a = "", ...o] = t.trim().split(/\s+/), s = o.join(" ");
1694
1694
  return /* @__PURE__ */ X(ei, {
@@ -1746,7 +1746,7 @@ function pi({ rows: e }) {
1746
1746
  }
1747
1747
  //#endregion
1748
1748
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/requisition/RequisitionEntityRef.tsx
1749
- var mi = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1749
+ var mi = Rn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1750
1750
  ref: n,
1751
1751
  type: "button",
1752
1752
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1755,13 +1755,13 @@ var mi = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1755
1755
  }));
1756
1756
  mi.displayName = "RequisitionTrigger";
1757
1757
  function hi({ id: e, label: n }) {
1758
- let { entityRefs: r } = Kt(), i = r?.resolvers?.requisition, a = t(), o = r?.urls?.requisition?.(e), s = K(() => (e) => {
1758
+ let { entityRefs: r } = Gt(), i = r?.resolvers?.requisition, a = t(), o = r?.urls?.requisition?.(e), s = q(() => (e) => {
1759
1759
  let t = e.lineManager ? `${e.lineManager.firstName} ${e.lineManager.lastName}` : void 0, n = [
1760
1760
  e.status ? {
1761
1761
  label: a.t("ai.entityRef.requisition.status"),
1762
1762
  value: /* @__PURE__ */ X("div", {
1763
1763
  className: "flex items-center pt-1",
1764
- children: /* @__PURE__ */ X(un, {
1764
+ children: /* @__PURE__ */ X(ln, {
1765
1765
  text: e.status,
1766
1766
  variant: e.statusVariant ?? "neutral"
1767
1767
  })
@@ -1771,7 +1771,7 @@ function hi({ id: e, label: n }) {
1771
1771
  label: a.t("ai.entityRef.requisition.lineManager"),
1772
1772
  value: /* @__PURE__ */ Z("div", {
1773
1773
  className: "flex items-center gap-1.5 pt-1",
1774
- children: [/* @__PURE__ */ X(rn, {
1774
+ children: [/* @__PURE__ */ X(nn, {
1775
1775
  firstName: e.lineManager.firstName,
1776
1776
  lastName: e.lineManager.lastName,
1777
1777
  src: e.lineManager.avatarUrl,
@@ -1793,7 +1793,7 @@ function hi({ id: e, label: n }) {
1793
1793
  href: o
1794
1794
  } }
1795
1795
  };
1796
- }, [a, o]), c = K(() => ({
1796
+ }, [a, o]), c = q(() => ({
1797
1797
  title: n,
1798
1798
  ...o && { secondaryActions: {
1799
1799
  label: a.t("ai.view"),
@@ -1814,7 +1814,7 @@ function hi({ id: e, label: n }) {
1814
1814
  }
1815
1815
  //#endregion
1816
1816
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/entityRef/entities/vacancy/VacancyEntityRef.tsx
1817
- var gi = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1817
+ var gi = Rn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1818
1818
  ref: n,
1819
1819
  type: "button",
1820
1820
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1823,14 +1823,14 @@ var gi = zn(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1823
1823
  }));
1824
1824
  gi.displayName = "VacancyTrigger";
1825
1825
  function _i({ id: e, label: n }) {
1826
- let { entityRefs: r } = Kt(), i = r?.resolvers?.vacancy, a = t(), o = r?.urls?.vacancy?.(e), s = K(() => (e) => ({
1826
+ let { entityRefs: r } = Gt(), i = r?.resolvers?.vacancy, a = t(), o = r?.urls?.vacancy?.(e), s = q(() => (e) => ({
1827
1827
  title: e.name,
1828
1828
  description: [e.status, e.vacancyType].filter(Boolean).join(" · "),
1829
1829
  ...o && { secondaryActions: {
1830
1830
  label: a.t("ai.view"),
1831
1831
  href: o
1832
1832
  } }
1833
- }), [a, o]), c = K(() => ({
1833
+ }), [a, o]), c = q(() => ({
1834
1834
  title: n,
1835
1835
  ...o && { secondaryActions: {
1836
1836
  label: a.t("ai.view"),
@@ -1871,7 +1871,7 @@ function xi(e) {
1871
1871
  return typeof e == "string" ? e : typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(xi).join("") : e && typeof e == "object" && "props" in e ? xi(e.props.children) : "";
1872
1872
  }
1873
1873
  function Si({ type: e, id: t, children: n }) {
1874
- let { entityRefs: r } = Kt();
1874
+ let { entityRefs: r } = Gt();
1875
1875
  if (!t || !e) return /* @__PURE__ */ X("span", { children: n });
1876
1876
  let i = xi(n), a = yi(e);
1877
1877
  if (a) return /* @__PURE__ */ X(a, {
@@ -1894,8 +1894,8 @@ var Ci = (e) => Array.from(e.querySelector("tr")?.children ?? []), wi = (e) => {
1894
1894
  return n ? (r.selectNodeContents(n), r.getBoundingClientRect().right > t) : !1;
1895
1895
  }));
1896
1896
  }, Ti = (e) => {
1897
- let [t, n] = J(!1), [r, i] = J(!1), [a, o] = J(0);
1898
- return G(() => {
1897
+ let [t, n] = Y(!1), [r, i] = Y(!1), [a, o] = Y(0);
1898
+ return K(() => {
1899
1899
  let t = e.current;
1900
1900
  if (!t) return;
1901
1901
  let r = () => {
@@ -1919,8 +1919,8 @@ var Ci = (e) => Array.from(e.querySelector("tr")?.children ?? []), wi = (e) => {
1919
1919
  //#endregion
1920
1920
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/components/useOneLineWidth.ts
1921
1921
  function Di(e, t) {
1922
- let n = q(null), r = We(), [i, a] = J();
1923
- return Kn(function() {
1922
+ let n = J(null), r = Ue(), [i, a] = Y();
1923
+ return Gn(function() {
1924
1924
  if (!t || !n.current) return;
1925
1925
  let e = parseFloat(getComputedStyle(n.current, "::before").width);
1926
1926
  a(Number.isFinite(e) ? e : void 0);
@@ -1935,7 +1935,7 @@ function Di(e, t) {
1935
1935
  }
1936
1936
  //#endregion
1937
1937
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/components/Table.tsx
1938
- var Oi = (e) => In.toArray(e).filter((e) => Bn(e)), ki = (e) => Oi(e.props.children).map((e) => e.props.children), Ai = (e) => {
1938
+ var Oi = (e) => Fn.toArray(e).filter((e) => zn(e)), ki = (e) => Oi(e.props.children).map((e) => e.props.children), Ai = (e) => {
1939
1939
  let t = {
1940
1940
  header: [],
1941
1941
  rows: []
@@ -1950,11 +1950,11 @@ async function ji({ header: e, rows: t }, n, r) {
1950
1950
  let i = (e.length > 0 ? [e, ...t] : t).map((e) => e.map((e) => ae(xi(e)))), a = n === "xlsx" ? await O([{
1951
1951
  name: "Data",
1952
1952
  rows: i
1953
- }]) : await ot(i);
1953
+ }]) : await at(i);
1954
1954
  I(a, `${r}.${n}`);
1955
1955
  }
1956
1956
  function Mi({ children: e, title: n, ...r }) {
1957
- let o = t(), s = q(null), c = Ti(s), l = c.left || c.right, u = p(), d = (t) => {
1957
+ let o = t(), s = J(null), c = Ti(s), l = c.left || c.right, u = p(), d = (t) => {
1958
1958
  let r = n?.replace(/\s+/g, "_").toLowerCase() || "table";
1959
1959
  ji(Ai(e), t, r);
1960
1960
  };
@@ -1995,7 +1995,7 @@ function Mi({ children: e, title: n, ...r }) {
1995
1995
  }), l && (c.after > 0 || c.left) ? /* @__PURE__ */ X(m, {
1996
1996
  variant: "ghost",
1997
1997
  size: "sm",
1998
- icon: c.after > 0 ? ze : yn,
1998
+ icon: c.after > 0 ? Re : vn,
1999
1999
  iconPosition: c.after > 0 ? "right" : "left",
2000
2000
  label: c.after > 0 ? o.t(c.after === 1 ? "ai.aiTable.moreColumns.one" : "ai.aiTable.moreColumns.other", { count: c.after }) : o.ai.aiTable.backToStart,
2001
2001
  className: "text-f1-foreground-secondary hover:text-f1-foreground",
@@ -2062,8 +2062,8 @@ var zi = {
2062
2062
  td: Ri,
2063
2063
  img: Kr,
2064
2064
  "entity-ref": Si
2065
- }, Bi = Ln(null), Vi = ({ children: e }) => {
2066
- let [t, n] = J(null), r = t ? {
2065
+ }, Bi = In(null), Vi = ({ children: e }) => {
2066
+ let [t, n] = Y(null), r = t ? {
2067
2067
  isOpen: !0,
2068
2068
  currentReaction: t.action,
2069
2069
  currentMessage: t.message,
@@ -2087,7 +2087,7 @@ var zi = {
2087
2087
  children: e
2088
2088
  });
2089
2089
  }, Hi = () => {
2090
- let e = Hn(Bi);
2090
+ let e = Vn(Bi);
2091
2091
  if (e === null) throw Error("useFeedbackModal must be used within a FeedbackModalProvider");
2092
2092
  return e;
2093
2093
  };
@@ -2118,7 +2118,7 @@ var Wi = (e) => typeof e == "object" && !!e, Q = (e) => typeof e == "string" &&
2118
2118
  return i ? `${r}.${i}` : r;
2119
2119
  }
2120
2120
  let n = t.split("?")[1], r = n ? new URLSearchParams(n.split("#")[0]).get("path") : null;
2121
- return pt(r ?? t) || e || "file";
2121
+ return ft(r ?? t) || e || "file";
2122
2122
  }, Ki = (e, t) => e.startsWith("data:") ? e : `data:${t ?? "application/octet-stream"};base64,${e}`, qi = (e, t) => {
2123
2123
  let n = Q(e.data), r = Q(e.url) ?? (n ? Ki(n, t) : void 0);
2124
2124
  if (!r) return null;
@@ -2169,14 +2169,14 @@ var Wi = (e) => typeof e == "object" && !!e, Q = (e) => typeof e == "string" &&
2169
2169
  if (n.length !== 0) return t === "user" ? n[n.length - 1] : n.join("\n\n");
2170
2170
  }, ta = (e, { urlFor: t } = {}) => ({
2171
2171
  url: e.url ?? t?.(e.path) ?? e.path,
2172
- name: e.displayName || pt(e.path),
2172
+ name: e.displayName || ft(e.path),
2173
2173
  mimeType: e.mimeType,
2174
2174
  size: e.bytes,
2175
2175
  previewUrl: e.preview ? t?.(e.preview.path) ?? e.preview.url : void 0
2176
- }), na = (e) => _t(e) ?? "", ra = Ln(!1), ia = () => Hn(ra), aa = (e, t) => {
2177
- let [n, r] = J(() => t ? null : new Set(e));
2176
+ }), na = (e) => gt(e) ?? "", ra = In(!1), ia = () => Vn(ra), aa = (e, t) => {
2177
+ let [n, r] = Y(() => t ? null : new Set(e));
2178
2178
  return t && n !== null ? r(null) : !t && n === null && r(new Set(e)), (e) => e !== void 0 && n !== null && !n.has(e);
2179
- }, oa = Fn.settleMs, sa = 1e3, ca = 2, la = "data-ai-anchor", ua = "data-turn-index", da = (e) => {
2179
+ }, oa = Pn.settleMs, sa = 1e3, ca = 2, la = "data-ai-anchor", ua = "data-turn-index", da = (e) => {
2180
2180
  if (!e) return null;
2181
2181
  let t = e.closest(`[${la}]`);
2182
2182
  if (t) return t;
@@ -2187,7 +2187,7 @@ var Wi = (e) => typeof e == "object" && !!e, Q = (e) => typeof e == "string" &&
2187
2187
  return r.parentElement === n ? r : n;
2188
2188
  }, fa = (e, t) => t.getBoundingClientRect().top - e.getBoundingClientRect().top, pa = (e) => e.scrollHeight - e.scrollTop - e.clientHeight <= ca;
2189
2189
  function ma({ viewportRef: e, contentRef: t }) {
2190
- G(() => {
2190
+ K(() => {
2191
2191
  let n = e.current, r = t.current;
2192
2192
  if (!n || !r || typeof ResizeObserver > "u") return;
2193
2193
  let i = n.clientWidth, a = null, o, s = !1, c = null, l = () => {
@@ -2250,8 +2250,8 @@ function ma({ viewportRef: e, contentRef: t }) {
2250
2250
  //#endregion
2251
2251
  //#region src/addons/ai/F0AiMessagesContainer/hooks/useThinkingClock.ts
2252
2252
  var ha = (e, t) => {
2253
- let [n, r] = J(null);
2254
- return G(() => {
2253
+ let [n, r] = Y(null);
2254
+ return K(() => {
2255
2255
  r(e ? (e) => e ?? t ?? Date.now() : null);
2256
2256
  }, [e, t]), n;
2257
2257
  };
@@ -2293,15 +2293,15 @@ var _a = 32, va = (e) => e.scrollHeight - e.scrollTop - e.clientHeight, ya = (e,
2293
2293
  };
2294
2294
  }, wa = (e, t) => t.turnsCount === 0 ? "none" : e === null || e.isLoadingThread && !t.isLoadingThread || e.turnsCount === 0 && !t.isLoadingThread && !t.lastTurnInProgress ? "opened" : t.turnsCount > e.turnsCount ? "sent" : "none", Ta = (e) => requestAnimationFrame(() => requestAnimationFrame(e));
2295
2295
  function Ea({ viewportRef: e, contentRef: t, lastTurnRef: n, turnsCount: r, isLoadingThread: i = !1, lastTurnInProgress: a = !1, freezeTurnMinHeight: o = !1 }) {
2296
- let [s, c] = J(0), [l, u] = J(!1), [d, f] = J(!1), p = q(null), m = q(o);
2296
+ let [s, c] = Y(0), [l, u] = Y(!1), [d, f] = Y(!1), p = J(null), m = J(o);
2297
2297
  m.current = o;
2298
- let h = q(!1), g = W((t = "smooth") => {
2298
+ let h = J(!1), g = G((t = "smooth") => {
2299
2299
  let n = e.current;
2300
2300
  h.current = !0, n?.scrollTo({
2301
2301
  top: n.scrollHeight,
2302
2302
  behavior: t
2303
2303
  });
2304
- }, [e]), _ = W(() => {
2304
+ }, [e]), _ = G(() => {
2305
2305
  let r = e.current;
2306
2306
  r && (f(r.scrollTop > 0), u(!h.current && ya(r, t.current, n.current, a) > _a));
2307
2307
  }, [
@@ -2309,7 +2309,7 @@ function Ea({ viewportRef: e, contentRef: t, lastTurnRef: n, turnsCount: r, isLo
2309
2309
  t,
2310
2310
  n,
2311
2311
  a
2312
- ]), v = W(() => {
2312
+ ]), v = G(() => {
2313
2313
  let t = e.current, r = n.current;
2314
2314
  !h.current || !t || !r || !xa(r) || va(t) <= 1 || t.scrollTo({
2315
2315
  top: t.scrollHeight,
@@ -2320,7 +2320,7 @@ function Ea({ viewportRef: e, contentRef: t, lastTurnRef: n, turnsCount: r, isLo
2320
2320
  n,
2321
2321
  a
2322
2322
  ]);
2323
- return G(() => {
2323
+ return K(() => {
2324
2324
  let n = e.current, r = t.current;
2325
2325
  if (!n || !r) return;
2326
2326
  let i = new ResizeObserver(() => {
@@ -2334,7 +2334,7 @@ function Ea({ viewportRef: e, contentRef: t, lastTurnRef: n, turnsCount: r, isLo
2334
2334
  t,
2335
2335
  _,
2336
2336
  v
2337
- ]), G(() => {
2337
+ ]), K(() => {
2338
2338
  let t = e.current;
2339
2339
  if (!t) return;
2340
2340
  let n = t.scrollTop, r = () => {
@@ -2342,12 +2342,12 @@ function Ea({ viewportRef: e, contentRef: t, lastTurnRef: n, turnsCount: r, isLo
2342
2342
  va(t) <= 1 ? h.current = !0 : e < n && (h.current = !1), n = e, _();
2343
2343
  };
2344
2344
  return t.addEventListener("scroll", r, { passive: !0 }), () => t.removeEventListener("scroll", r);
2345
- }, [_, e]), G(() => {
2345
+ }, [_, e]), K(() => {
2346
2346
  let n = e.current, r = t.current;
2347
2347
  if (n && r) return Ca(n, r, () => {
2348
2348
  h.current = !1;
2349
2349
  });
2350
- }, [e, t]), G(() => {
2350
+ }, [e, t]), K(() => {
2351
2351
  let t = {
2352
2352
  turnsCount: r,
2353
2353
  isLoadingThread: i,
@@ -2379,13 +2379,13 @@ function Ea({ viewportRef: e, contentRef: t, lastTurnRef: n, turnsCount: r, isLo
2379
2379
  }
2380
2380
  //#endregion
2381
2381
  //#region src/addons/ai/canvas/F0CanvasCard/F0CanvasCard.tsx
2382
- var Da = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ X(an, {
2382
+ var Da = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ X(rn, {
2383
2383
  module: e.module,
2384
2384
  size: "md"
2385
- }) : e?.type === "file" ? /* @__PURE__ */ X(ln, {
2385
+ }) : e?.type === "file" ? /* @__PURE__ */ X(cn, {
2386
2386
  file: e.file,
2387
2387
  size: "lg"
2388
- }) : e?.type === "icon" ? /* @__PURE__ */ X(nn, {
2388
+ }) : e?.type === "icon" ? /* @__PURE__ */ X(tn, {
2389
2389
  icon: e.icon,
2390
2390
  size: "md"
2391
2391
  }) : null, Oa = ({ action: e, isActive: n }) => {
@@ -2438,12 +2438,12 @@ function ka({ avatar: e, title: t, description: n, isActive: r = !1, action: a,
2438
2438
  ka.displayName = "F0CanvasCard";
2439
2439
  //#endregion
2440
2440
  //#region src/addons/ai/F0AiChat/providers/FormCardValueFormatterProvider.tsx
2441
- var Aa = Ln(null);
2441
+ var Aa = In(null);
2442
2442
  function ja({ children: e }) {
2443
- let [t, n] = J(0), r = q([]), i = W((e) => {
2443
+ let [t, n] = Y(0), r = J([]), i = G((e) => {
2444
2444
  let t = r.current, i = t.findIndex((t) => t.formName === e.formName && t.customFieldName === e.customFieldName), a = e;
2445
2445
  i >= 0 ? t[i] = a : t.push(a), n((e) => e + 1);
2446
- }, []), a = K(() => ({
2446
+ }, []), a = q(() => ({
2447
2447
  formatters: [...r.current],
2448
2448
  setFormCardValueFormatter: i
2449
2449
  }), [i, t]);
@@ -2453,8 +2453,8 @@ function ja({ children: e }) {
2453
2453
  });
2454
2454
  }
2455
2455
  function Ma(e) {
2456
- let t = Hn(Aa)?.formatters;
2457
- return K(() => !t || t.length === 0 ? null : (n, r, i) => {
2456
+ let t = Vn(Aa)?.formatters;
2457
+ return q(() => !t || t.length === 0 ? null : (n, r, i) => {
2458
2458
  let a, o = -1;
2459
2459
  for (let n of t) {
2460
2460
  let t = n.formName === void 0 || n.formName === e, r = n.customFieldName === void 0 || n.customFieldName === i.customFieldName;
@@ -2469,7 +2469,7 @@ function Ma(e) {
2469
2469
  }, [t, e]);
2470
2470
  }
2471
2471
  function Na() {
2472
- let e = Hn(Aa);
2472
+ let e = Vn(Aa);
2473
2473
  if (!e) throw Error("useSetFormCardValueFormatter must be used within a FormCardValueFormatterProvider");
2474
2474
  return e.setFormCardValueFormatter;
2475
2475
  }
@@ -2483,7 +2483,7 @@ function Ra(e) {
2483
2483
  return e && e.charAt(0).toUpperCase() + e.slice(1);
2484
2484
  }
2485
2485
  function za(e) {
2486
- let { days: t, hours: n, minutes: r, seconds: i } = St(e), a = [];
2486
+ let { days: t, hours: n, minutes: r, seconds: i } = xt(e), a = [];
2487
2487
  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(" ");
2488
2488
  }
2489
2489
  function Ba(e) {
@@ -2558,7 +2558,7 @@ function Ua(e, t) {
2558
2558
  };
2559
2559
  }
2560
2560
  function Wa({ formName: e, formDescription: t, module: n, cardTitle: r, cardDescription: i, fieldDescriptions: a, formValues: o, valueFormatter: s }) {
2561
- let { canvasContent: c, openCanvas: l, dismissCanvas: u } = Kt(), d = Ma(e), f = s ?? d, p = q(() => {}), m = r ?? e, h = i ?? t ?? "", g = c?.type === "form" && c.formName === e, _ = () => l({
2561
+ let { canvasContent: c, openCanvas: l, dismissCanvas: u } = Gt(), d = Ma(e), f = s ?? d, p = J(() => {}), m = r ?? e, h = i ?? t ?? "", g = c?.type === "form" && c.formName === e, _ = () => l({
2562
2562
  type: "form",
2563
2563
  title: m,
2564
2564
  description: h,
@@ -2566,7 +2566,7 @@ function Wa({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
2566
2566
  formDescription: t,
2567
2567
  formModule: n
2568
2568
  });
2569
- p.current = _, G(() => {
2569
+ p.current = _, K(() => {
2570
2570
  typeof window < "u" && (window.innerWidth < Fa || Ia.has(e) || (Ia.add(e), p.current()));
2571
2571
  }, [e]);
2572
2572
  let v = a && o ? Object.entries(a).map(([e, t]) => {
@@ -2602,7 +2602,7 @@ function Wa({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
2602
2602
  },
2603
2603
  children: y.length > 0 && !g ? /* @__PURE__ */ X("div", {
2604
2604
  className: "-mx-3 flex w-full flex-col overflow-hidden pb-1",
2605
- children: /* @__PURE__ */ X(Lt, {
2605
+ children: /* @__PURE__ */ X(It, {
2606
2606
  details: y.map((e) => ({
2607
2607
  title: e.label,
2608
2608
  content: e.content,
@@ -2638,19 +2638,19 @@ function Ga() {
2638
2638
  //#endregion
2639
2639
  //#region src/addons/ai/F0AiFileAttachments/components/FileCanvasCards.tsx
2640
2640
  var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile: t, onCanvasUnavailable: n }) => {
2641
- let { canvasContent: r, tryOpenCanvas: i, dismissCanvas: a, panelOverlays: o } = Kt(), s = ct(), c = ia(), l = e.map((e) => e.file), u = (r, { fallback: a = !0 } = {}) => {
2641
+ let { canvasContent: r, tryOpenCanvas: i, dismissCanvas: a, panelOverlays: o } = Gt(), s = st(), c = ia(), l = e.map((e) => e.file), u = (r, { fallback: a = !0 } = {}) => {
2642
2642
  let o = e[r];
2643
- o && t?.(o.file, "document", { documentKind: o.documentKind }) !== !1 && !i(it({
2643
+ o && t?.(o.file, "document", { documentKind: o.documentKind }) !== !1 && !i(rt({
2644
2644
  files: l,
2645
2645
  index: r,
2646
2646
  config: s
2647
2647
  })) && a && n(r);
2648
- }, d = q(u);
2649
- Kn(() => {
2648
+ }, d = J(u);
2649
+ Gn(() => {
2650
2650
  d.current = u;
2651
2651
  });
2652
2652
  let f = l[0]?.url, p = o || typeof window < "u" && window.innerWidth < Ka;
2653
- return G(() => {
2653
+ return K(() => {
2654
2654
  c && f && !qa.has(f) && !p && (qa.add(f), d.current(0, { fallback: !1 }));
2655
2655
  }, [
2656
2656
  c,
@@ -2660,7 +2660,7 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2660
2660
  className: "flex w-full max-w-sm flex-col gap-2",
2661
2661
  "data-testid": "ai-chat-file-canvas-cards",
2662
2662
  children: e.map(({ file: e }, t) => {
2663
- let n = xt(r, e.url);
2663
+ let n = bt(r, e.url);
2664
2664
  return /* @__PURE__ */ X("div", {
2665
2665
  "data-active": n || void 0,
2666
2666
  "data-testid": "ai-chat-file-canvas-card",
@@ -2674,7 +2674,7 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2674
2674
  }
2675
2675
  },
2676
2676
  title: e.name,
2677
- description: e.size ? wt(e.size) : Ot(e.name, na(e)),
2677
+ description: e.size ? Ct(e.size) : Dt(e.name, na(e)),
2678
2678
  isActive: n,
2679
2679
  action: {
2680
2680
  type: "open",
@@ -2686,8 +2686,8 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2686
2686
  })
2687
2687
  });
2688
2688
  }, Ya = "rounded-xl", Xa = "ai-chat", Za = (e) => {
2689
- let { provided: t } = Mt();
2690
- return t ? /* @__PURE__ */ X(eo, { ...e }) : /* @__PURE__ */ X(Ye, { children: /* @__PURE__ */ X(eo, { ...e }) });
2689
+ let { provided: t } = jt();
2690
+ return t ? /* @__PURE__ */ X(eo, { ...e }) : /* @__PURE__ */ X(Je, { children: /* @__PURE__ */ X(eo, { ...e }) });
2691
2691
  }, Qa = {
2692
2692
  image: 0,
2693
2693
  video: 1,
@@ -2695,11 +2695,11 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2695
2695
  audio: 3,
2696
2696
  file: 4
2697
2697
  }, $a = (e) => e.bucket === "image" || e.bucket === "video" || e.bucket === "audio" || e.bucket === "document" ? e.bucket : "file", eo = ({ files: e, align: t = "start", onOpenFile: n, onFileDownloaded: r, size: i = "default", opensIn: a }) => {
2698
- let { remotePreviews: o } = Mt(), s = Se(), c = i === "default" && (a ?? (t === "start" && s ? "canvas" : "viewer")) === "canvas", [l, u] = J(() => /* @__PURE__ */ new Set()), d = K(() => to(e, o, l), [
2698
+ let { remotePreviews: o } = jt(), s = Se(), c = i === "default" && (a ?? (t === "start" && s ? "canvas" : "viewer")) === "canvas", [l, u] = Y(() => /* @__PURE__ */ new Set()), d = q(() => to(e, o, l), [
2699
2699
  e,
2700
2700
  o,
2701
2701
  l
2702
- ]), f = K(() => i === "compact" ? d : [...d].sort((e, t) => Qa[e.cls.bucket] - Qa[t.cls.bucket]), [d, i]), p = Et(f, "transcript");
2702
+ ]), f = q(() => i === "compact" ? d : [...d].sort((e, t) => Qa[e.cls.bucket] - Qa[t.cls.bucket]), [d, i]), p = Tt(f, "transcript");
2703
2703
  return e.length === 0 ? null : X(i === "compact" ? io : ro, {
2704
2704
  entries: d,
2705
2705
  canvas: c,
@@ -2712,12 +2712,12 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2712
2712
  onImageError: (e) => u((t) => new Set(t).add(e.url))
2713
2713
  });
2714
2714
  }, to = (e, t, n) => e.map((e, r) => {
2715
- let i = Ke(e), a = !(t || ie(e.url)) || i.bucket === "file" || i.bucket === "image" && n.has(e.url);
2715
+ let i = Ge(e), a = !(t || ie(e.url)) || i.bucket === "file" || i.bucket === "image" && n.has(e.url);
2716
2716
  return {
2717
2717
  file: e,
2718
2718
  cls: i,
2719
2719
  generic: a,
2720
- item: a ? null : at(e, Ct(r, e.url))
2720
+ item: a ? null : it(e, St(r, e.url))
2721
2721
  };
2722
2722
  }), no = ({ align: e, compact: t = !1, children: n }) => /* @__PURE__ */ X("div", {
2723
2723
  className: i("flex w-full min-w-0 flex-col gap-1.5", e === "end" ? "items-end" : "items-start"),
@@ -2749,8 +2749,8 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2749
2749
  }) : null,
2750
2750
  c.map((e, t) => {
2751
2751
  let { file: n, cls: r } = e, i = `${n.name}-${t}`;
2752
- return r.bucket === "video" ? /* @__PURE__ */ X(Le, {
2753
- file: Wt(n),
2752
+ return r.bucket === "video" ? /* @__PURE__ */ X(Ie, {
2753
+ file: Ut(n),
2754
2754
  cornerClass: "rounded-xl",
2755
2755
  testIdPrefix: Xa,
2756
2756
  onDownloaded: () => s?.(n)
@@ -2758,8 +2758,8 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2758
2758
  }),
2759
2759
  f || t ? null : d.map((e, t) => {
2760
2760
  let { file: n, cls: i } = e;
2761
- return i.bucket === "document" ? /* @__PURE__ */ X(kt, {
2762
- file: Wt(n),
2761
+ return i.bucket === "document" ? /* @__PURE__ */ X(Ot, {
2762
+ file: Ut(n),
2763
2763
  kind: i.kind,
2764
2764
  cornerClass: "rounded-xl",
2765
2765
  testIdPrefix: Xa,
@@ -2772,7 +2772,7 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2772
2772
  }, `${n.name}-${t}`) : null;
2773
2773
  }),
2774
2774
  c.map((e, t) => e.cls.bucket === "audio" ? /* @__PURE__ */ X(he, {
2775
- file: Wt(e.file),
2775
+ file: Ut(e.file),
2776
2776
  testIdPrefix: Xa,
2777
2777
  onDownloaded: () => s?.(e.file)
2778
2778
  }, `${e.file.name}-${t}`) : null),
@@ -2782,8 +2782,8 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2782
2782
  "data-testid": f ? `${Xa}-file-shelf` : void 0,
2783
2783
  children: [g.length > 0 ? g.map((e, t) => {
2784
2784
  let { file: n, cls: i } = e;
2785
- return i.bucket === "document" ? /* @__PURE__ */ X(kt, {
2786
- file: Wt(n),
2785
+ return i.bucket === "document" ? /* @__PURE__ */ X(Ot, {
2786
+ file: Ut(n),
2787
2787
  kind: i.kind,
2788
2788
  cornerClass: "rounded-xl",
2789
2789
  compact: !0,
@@ -2819,11 +2819,11 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2819
2819
  file: i,
2820
2820
  onOpen: () => n(e)
2821
2821
  }, c) : s.bucket === "audio" ? /* @__PURE__ */ X(C, {
2822
- file: Wt(i),
2822
+ file: Ut(i),
2823
2823
  testIdPrefix: Xa,
2824
2824
  onOpen: () => n(e)
2825
- }, c) : s.bucket === "document" ? /* @__PURE__ */ X(kt, {
2826
- file: Wt(i),
2825
+ }, c) : s.bucket === "document" ? /* @__PURE__ */ X(Ot, {
2826
+ file: Ut(i),
2827
2827
  kind: s.kind,
2828
2828
  cornerClass: "rounded-xl",
2829
2829
  compact: !0,
@@ -2838,7 +2838,7 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2838
2838
  })
2839
2839
  }), ao = ({ file: e, onFileDownloaded: n }) => {
2840
2840
  let r = t(), i = D(), a = na(e);
2841
- return /* @__PURE__ */ X(Ie, {
2841
+ return /* @__PURE__ */ X(Fe, {
2842
2842
  file: {
2843
2843
  ...e,
2844
2844
  mimeType: a
@@ -2871,31 +2871,31 @@ var Ka = 625, qa = /* @__PURE__ */ new Set(), Ja = ({ documents: e, onOpenFile:
2871
2871
  }) : null
2872
2872
  });
2873
2873
  }, co = ({ file: e, onOpen: n }) => {
2874
- let r = t(), { urlCache: o } = ct(), s = se(e.thumbnailUrl), c = !e.thumbnailUrl && o === null, [l, u] = J(!1);
2874
+ let r = t(), { urlCache: o } = st(), s = se(e.thumbnailUrl), c = !e.thumbnailUrl && o === null, [l, u] = Y(!1);
2875
2875
  return /* @__PURE__ */ Z("button", {
2876
2876
  type: "button",
2877
2877
  onClick: n,
2878
2878
  "aria-label": r.t("chat.videoPlayerLabel", { name: e.name }),
2879
2879
  className: i(oo, a()),
2880
2880
  "data-testid": "ai-chat-video-attachment",
2881
- children: [!l && (s.status === "ready" || c) ? /* @__PURE__ */ X(Me, {
2881
+ children: [!l && (s.status === "ready" || c) ? /* @__PURE__ */ X(je, {
2882
2882
  url: e.url,
2883
2883
  posterUrl: s.status === "ready" ? s.url : void 0,
2884
2884
  onError: () => u(!0)
2885
2885
  }) : null, /* @__PURE__ */ X(Ee, {})]
2886
2886
  });
2887
2887
  }, lo = ({ images: e, onOpen: n, onImageError: r }) => {
2888
- let a = t(), o = e.length === 1 ? e[0] : void 0, s = se(o ? o.thumbnailUrl ?? o.url : void 0), c = V(o && s.status === "ready" ? s.url : void 0, o) ?? void 0, l = o ? Qe(c?.width, c?.height) : null;
2888
+ let a = t(), o = e.length === 1 ? e[0] : void 0, s = se(o ? o.thumbnailUrl ?? o.url : void 0), c = H(o && s.status === "ready" ? s.url : void 0, o) ?? void 0, l = o ? Ze(c?.width, c?.height) : null;
2889
2889
  return /* @__PURE__ */ X("div", {
2890
2890
  style: l ? { width: l.width } : void 0,
2891
- className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : bt, L, Ya),
2891
+ className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : yt, L, Ya),
2892
2892
  "data-testid": "ai-chat-image-album",
2893
- children: tt(c ? [c] : e).map((t, o, s) => {
2893
+ children: et(c ? [c] : e).map((t, o, s) => {
2894
2894
  let c = e[t.index];
2895
2895
  if (!c) return null;
2896
2896
  let l = o === s.length - 1;
2897
- return /* @__PURE__ */ X(zt, {
2898
- image: It(c),
2897
+ return /* @__PURE__ */ X(Rt, {
2898
+ image: Ft(c),
2899
2899
  aspectRatio: t.aspectRatio,
2900
2900
  spanFull: t.span === 2,
2901
2901
  inset: t.inset,
@@ -2934,8 +2934,8 @@ function po(e, t) {
2934
2934
  };
2935
2935
  }
2936
2936
  function mo({ containerRef: e, enabled: t = !0 }) {
2937
- let [n, r] = J(null), i = W(() => r(null), []);
2938
- return G(() => {
2937
+ let [n, r] = Y(null), i = G(() => r(null), []);
2938
+ return K(() => {
2939
2939
  if (!t || typeof window > "u") return;
2940
2940
  let n = e.current;
2941
2941
  if (!n) return;
@@ -2960,8 +2960,8 @@ function mo({ containerRef: e, enabled: t = !0 }) {
2960
2960
  //#region src/addons/ai/F0AiMessagesContainer/components/ReplyPopover.tsx
2961
2961
  var ho = 8, go = 8;
2962
2962
  function _o({ anchor: e, onReply: n }) {
2963
- let r = t(), a = q(null), [o, s] = J(null);
2964
- if (Kn(() => {
2963
+ let r = t(), a = J(null), [o, s] = Y(null);
2964
+ if (Gn(() => {
2965
2965
  if (!e) {
2966
2966
  s(null);
2967
2967
  return;
@@ -2999,15 +2999,15 @@ function _o({ anchor: e, onReply: n }) {
2999
2999
  }
3000
3000
  //#endregion
3001
3001
  //#region src/addons/ai/F0AiMessagesContainer/components/AssistantMessage.tsx
3002
- var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3002
+ var vo = In(void 0), yo = () => Vn(vo), bo = (e) => /* @__PURE__ */ X(Le, {
3003
3003
  content: e,
3004
3004
  format: "markdown"
3005
3005
  }), xo = ({ isGenerating: e, isLoading: t, isLive: n = !1, message: r, renderToolCall: i, onReplyQuote: a, onRendered: o, renderMarkdown: s }) => {
3006
- let c = r?.content, l = ea(c, "assistant") ?? "", u = K(() => $i({ content: c }), [c]), d = (r && i?.(r)) ?? r?.generativeUI?.() ?? null, f = r?.toolCalls?.[0]?.id, p = !l && !d && u.length === 0, m = q(null), { anchor: h, clear: g } = mo({
3006
+ let c = r?.content, l = ea(c, "assistant") ?? "", u = q(() => $i({ content: c }), [c]), d = (r && i?.(r)) ?? r?.generativeUI?.() ?? null, f = r?.toolCalls?.[0]?.id, p = !l && !d && u.length === 0, m = J(null), { anchor: h, clear: g } = mo({
3007
3007
  containerRef: m,
3008
3008
  enabled: !!(r?.id && l)
3009
3009
  });
3010
- return G(() => {
3010
+ return K(() => {
3011
3011
  r?.id && !t && !e && o?.(r);
3012
3012
  }, [
3013
3013
  r,
@@ -3048,7 +3048,7 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3048
3048
  })
3049
3049
  });
3050
3050
  }, So = ({ onClose: e, onSubmit: n, reactionType: r, message: i }) => {
3051
- let [a, o] = J(""), s = t(), { title: c, label: l, placeholder: u } = r === "like" ? s.ai.feedbackModal.positive : s.ai.feedbackModal.negative, d = W(() => {
3051
+ let [a, o] = Y(""), s = t(), { title: c, label: l, placeholder: u } = r === "like" ? s.ai.feedbackModal.positive : s.ai.feedbackModal.negative, d = G(() => {
3052
3052
  n(i, a);
3053
3053
  }, [
3054
3054
  a,
@@ -3057,14 +3057,14 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3057
3057
  ]), f = () => {
3058
3058
  e(i);
3059
3059
  };
3060
- return G(() => {
3060
+ return K(() => {
3061
3061
  let e = (e) => {
3062
3062
  e.key === "Enter" && (e.preventDefault(), d());
3063
3063
  };
3064
3064
  return document.addEventListener("keydown", e), () => {
3065
3065
  document.removeEventListener("keydown", e);
3066
3066
  };
3067
- }, [d]), /* @__PURE__ */ X(Pt, {
3067
+ }, [d]), /* @__PURE__ */ X(Nt, {
3068
3068
  position: "center",
3069
3069
  isOpen: !0,
3070
3070
  onClose: f,
@@ -3081,7 +3081,7 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3081
3081
  },
3082
3082
  children: /* @__PURE__ */ X("div", {
3083
3083
  className: "flex flex-col gap-6",
3084
- children: /* @__PURE__ */ X(Je, {
3084
+ children: /* @__PURE__ */ X(qe, {
3085
3085
  autoFocus: !0,
3086
3086
  label: l,
3087
3087
  placeholder: u,
@@ -3093,11 +3093,11 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3093
3093
  })
3094
3094
  });
3095
3095
  }, Co = ({ content: e, targetMessage: n, onCopy: r, latest: a, onRegenerate: s, actions: c = [], note: l }) => {
3096
- let u = t(), { open: d } = Hi(), [f, p] = J(null), m = n.id, h = a && s && m ? () => s(m) : void 0;
3096
+ let u = t(), { open: d } = Hi(), [f, p] = Y(null), m = n.id, h = a && s && m ? () => s(m) : void 0;
3097
3097
  return /* @__PURE__ */ Z("div", {
3098
3098
  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"),
3099
3099
  children: [
3100
- /* @__PURE__ */ X(Ut, {
3100
+ /* @__PURE__ */ X(Ht, {
3101
3101
  size: "md",
3102
3102
  variant: "ghost",
3103
3103
  valueToCopy: e,
@@ -3116,9 +3116,9 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3116
3116
  "aria-label": u.actions.thumbsUp,
3117
3117
  children: /* @__PURE__ */ X("div", {
3118
3118
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
3119
- children: /* @__PURE__ */ X(H, {
3119
+ children: /* @__PURE__ */ X(U, {
3120
3120
  size: "md",
3121
- icon: f === "like" ? Gt : Be,
3121
+ icon: f === "like" ? Wt : ze,
3122
3122
  color: "default"
3123
3123
  })
3124
3124
  })
@@ -3134,9 +3134,9 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3134
3134
  "aria-label": u.actions.thumbsDown,
3135
3135
  children: /* @__PURE__ */ X("div", {
3136
3136
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
3137
- children: /* @__PURE__ */ X(H, {
3137
+ children: /* @__PURE__ */ X(U, {
3138
3138
  size: "md",
3139
- icon: f === "dislike" ? Vt : ve,
3139
+ icon: f === "dislike" ? Bt : ve,
3140
3140
  color: "default"
3141
3141
  })
3142
3142
  })
@@ -3151,9 +3151,9 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3151
3151
  "aria-label": u.ai.regenerate,
3152
3152
  children: /* @__PURE__ */ X("div", {
3153
3153
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
3154
- children: /* @__PURE__ */ X(H, {
3154
+ children: /* @__PURE__ */ X(U, {
3155
3155
  size: "md",
3156
- icon: Bt,
3156
+ icon: zt,
3157
3157
  color: "default"
3158
3158
  })
3159
3159
  })
@@ -3169,7 +3169,7 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3169
3169
  tooltip: t,
3170
3170
  children: /* @__PURE__ */ X("div", {
3171
3171
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
3172
- children: /* @__PURE__ */ X(H, {
3172
+ children: /* @__PURE__ */ X(U, {
3173
3173
  size: "md",
3174
3174
  icon: e,
3175
3175
  color: "default"
@@ -3186,19 +3186,19 @@ var vo = Ln(void 0), yo = () => Hn(vo), bo = (e) => /* @__PURE__ */ X(Re, {
3186
3186
  //#endregion
3187
3187
  //#region src/addons/ai/F0AiMessagesContainer/components/MessagesSkeleton.tsx
3188
3188
  function wo() {
3189
- return /* @__PURE__ */ X(U, {
3189
+ return /* @__PURE__ */ X(W, {
3190
3190
  display: "flex",
3191
3191
  height: "full",
3192
3192
  width: "full",
3193
3193
  maxWidth: "content",
3194
3194
  flexDirection: "column",
3195
3195
  gap: "2xl",
3196
- children: /* @__PURE__ */ Z(U, {
3196
+ children: /* @__PURE__ */ Z(W, {
3197
3197
  display: "flex",
3198
3198
  flexDirection: "column",
3199
3199
  gap: "md",
3200
3200
  children: [
3201
- /* @__PURE__ */ X(U, {
3201
+ /* @__PURE__ */ X(W, {
3202
3202
  display: "flex",
3203
3203
  justifyContent: "end",
3204
3204
  children: /* @__PURE__ */ X(r, { className: "h-12 w-2/5 rounded-full" })
@@ -3213,7 +3213,7 @@ function wo() {
3213
3213
  //#endregion
3214
3214
  //#region src/addons/ai/F0AiMessagesContainer/components/rail.ts
3215
3215
  var To = "-ml-1 flex w-5 shrink-0 flex-col items-center", Eo = "w-px shrink-0 bg-f1-border-secondary", Do = ({ icon: e, title: t, children: n, open: r, defaultOpen: a = !1, onOpenChange: o, lockOpen: c = !1 }) => {
3216
- let [l, u] = J(a), d = p(), f = r !== void 0, m = f ? r : l;
3216
+ let [l, u] = Y(a), d = p(), f = r !== void 0, m = f ? r : l;
3217
3217
  return /* @__PURE__ */ Z(De, {
3218
3218
  className: "mb-1 w-full",
3219
3219
  open: m,
@@ -3236,13 +3236,13 @@ var To = "-ml-1 flex w-5 shrink-0 flex-col items-center", Eo = "w-px shrink-0 bg
3236
3236
  className: "min-h-6 flex items-center",
3237
3237
  children: /* @__PURE__ */ Z("span", { children: [t, c ? null : /* @__PURE__ */ X("span", {
3238
3238
  className: "ml-[3px] inline-flex align-middle group-data-[state=open]/rail:rotate-90",
3239
- children: /* @__PURE__ */ X(H, {
3240
- icon: hn,
3239
+ children: /* @__PURE__ */ X(U, {
3240
+ icon: mn,
3241
3241
  size: "sm"
3242
3242
  })
3243
3243
  })] })
3244
3244
  })]
3245
- }), /* @__PURE__ */ X(B, {
3245
+ }), /* @__PURE__ */ X(V, {
3246
3246
  forceMount: !0,
3247
3247
  className: "data-[state=open]:mt-1.5",
3248
3248
  children: /* @__PURE__ */ X(s.div, {
@@ -3279,8 +3279,8 @@ function Oo({ step: e, last: t }) {
3279
3279
  children: [n ? /* @__PURE__ */ X(x, {
3280
3280
  variant: "thinking",
3281
3281
  size: 16
3282
- }) : /* @__PURE__ */ X(H, {
3283
- icon: Ve,
3282
+ }) : /* @__PURE__ */ X(U, {
3283
+ icon: Be,
3284
3284
  size: "sm",
3285
3285
  color: "secondary"
3286
3286
  }), t ? null : /* @__PURE__ */ X("span", {
@@ -3324,8 +3324,8 @@ function Ao({ elapsedMs: e }) {
3324
3324
  //#endregion
3325
3325
  //#region src/addons/ai/F0AiMessagesContainer/components/useElapsedMs.ts
3326
3326
  var jo = 1e3, Mo = (e, t) => {
3327
- let [n, r] = J(() => e === null ? 0 : Date.now() - e);
3328
- return G(function() {
3327
+ let [n, r] = Y(() => e === null ? 0 : Date.now() - e);
3328
+ return K(function() {
3329
3329
  if (e === null || (r(Date.now() - e), !t)) return;
3330
3330
  let n = setInterval(() => {
3331
3331
  r(Date.now() - e);
@@ -3358,9 +3358,9 @@ var Po = (e, t) => {
3358
3358
  }));
3359
3359
  };
3360
3360
  function Fo({ titles: e, title: n, inProgress: r, isWriting: a, answered: o = !1, startedAt: s = null }) {
3361
- let c = t(), l = !!r && !a && !o, [u, d] = J(!1), f = !!r && !a, p = Po(e, f), m = p.length > 0, h = (l || u) && m, g = f && !h;
3361
+ let c = t(), l = !!r && !a && !o, [u, d] = Y(!1), f = !!r && !a, p = Po(e, f), m = p.length > 0, h = (l || u) && m, g = f && !h;
3362
3362
  return /* @__PURE__ */ X(Do, {
3363
- icon: g && m ? /* @__PURE__ */ X(x, { variant: "thinking" }) : /* @__PURE__ */ X(H, { icon: Ht }),
3363
+ icon: g && m ? /* @__PURE__ */ X(x, { variant: "thinking" }) : /* @__PURE__ */ X(U, { icon: Vt }),
3364
3364
  title: /* @__PURE__ */ X("span", {
3365
3365
  className: i(g && "shine-text"),
3366
3366
  children: /* @__PURE__ */ X(No, {
@@ -3411,7 +3411,7 @@ function zo({ questions: e }) {
3411
3411
  children: /* @__PURE__ */ X(Ro, { answers: e[0].answers })
3412
3412
  }) : /* @__PURE__ */ X("dl", {
3413
3413
  className: "m-0 flex flex-col gap-3",
3414
- children: e.map(({ question: e, answers: t }, n) => /* @__PURE__ */ Z(U, {
3414
+ children: e.map(({ question: e, answers: t }, n) => /* @__PURE__ */ Z(W, {
3415
3415
  display: "flex",
3416
3416
  flexDirection: "column",
3417
3417
  gap: "xs",
@@ -3431,11 +3431,11 @@ function Bo({ children: e }) {
3431
3431
  let n = t();
3432
3432
  return /* @__PURE__ */ Z("div", {
3433
3433
  className: "flex max-w-[90%] items-start gap-2 self-end pb-1 pr-2 text-f1-foreground-secondary",
3434
- children: [/* @__PURE__ */ X(U, {
3434
+ children: [/* @__PURE__ */ X(W, {
3435
3435
  display: "flex",
3436
3436
  height: "5",
3437
3437
  alignItems: "center",
3438
- children: /* @__PURE__ */ X(H, { icon: M })
3438
+ children: /* @__PURE__ */ X(U, { icon: M })
3439
3439
  }), /* @__PURE__ */ Z("div", {
3440
3440
  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",
3441
3441
  children: [/* @__PURE__ */ X("span", {
@@ -3448,8 +3448,8 @@ function Bo({ children: e }) {
3448
3448
  //#endregion
3449
3449
  //#region src/addons/ai/F0AiMessagesContainer/components/useIsTextCut.ts
3450
3450
  var Vo = () => {
3451
- let e = q(null), [t, n] = J(!1);
3452
- return Kn(function() {
3451
+ let e = J(null), [t, n] = Y(!1);
3452
+ return Gn(function() {
3453
3453
  let t = e.current;
3454
3454
  if (!t) return;
3455
3455
  let r = () => n(t.scrollHeight > t.clientHeight);
@@ -3464,7 +3464,7 @@ var Vo = () => {
3464
3464
  //#endregion
3465
3465
  //#region src/addons/ai/F0AiMessagesContainer/components/QuestionQuote.tsx
3466
3466
  function Ho({ question: e }) {
3467
- let n = t(), { textRef: r, isCut: o } = Vo(), s = Un(), [c, l] = J(!1);
3467
+ let n = t(), { textRef: r, isCut: o } = Vo(), s = Hn(), [c, l] = Y(!1);
3468
3468
  return /* @__PURE__ */ Z(Bo, { children: [/* @__PURE__ */ X("p", {
3469
3469
  ref: r,
3470
3470
  id: s,
@@ -3482,19 +3482,19 @@ function Ho({ question: e }) {
3482
3482
  //#endregion
3483
3483
  //#region src/addons/ai/F0AiMessagesContainer/components/useScrollIntoViewOnArrival.ts
3484
3484
  function Uo(e) {
3485
- let t = q(null), [n] = J(e);
3486
- return G(function() {
3485
+ let t = J(null), [n] = Y(e);
3486
+ return K(function() {
3487
3487
  n && t.current?.scrollIntoView({ behavior: "smooth" });
3488
3488
  }, [n]), t;
3489
3489
  }
3490
3490
  //#endregion
3491
3491
  //#region src/addons/ai/F0AiMessagesContainer/components/UserMessage.tsx
3492
- var Wo = (e) => /* @__PURE__ */ X(Re, {
3492
+ var Wo = (e) => /* @__PURE__ */ X(Le, {
3493
3493
  content: e,
3494
3494
  format: "markdown"
3495
3495
  });
3496
3496
  function Go({ message: e, onReplyQuote: n, onCopy: r, autoScrollIntoView: a = !0, renderMarkdown: o }) {
3497
- let s = Uo(a), c = q(null), l = e?.content, u = e?.rawData, d = K(() => $i({
3497
+ let s = Uo(a), c = J(null), l = e?.content, u = e?.rawData, d = q(() => $i({
3498
3498
  content: l,
3499
3499
  rawData: u
3500
3500
  }), [l, u]), f = (ea(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${Lo(t, _.ai.clarifyingQuestion.skipped)}`).join("\n\n") : be(f), { anchor: y, clear: b } = mo({
@@ -3535,7 +3535,7 @@ function Go({ message: e, onReplyQuote: n, onCopy: r, autoScrollIntoView: a = !0
3535
3535
  children: h ? /* @__PURE__ */ X(zo, { questions: h }) : x(f)
3536
3536
  }), /* @__PURE__ */ X("div", {
3537
3537
  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"),
3538
- children: /* @__PURE__ */ X(Ut, {
3538
+ children: /* @__PURE__ */ X(Ht, {
3539
3539
  size: "md",
3540
3540
  variant: "ghost",
3541
3541
  valueToCopy: v,
@@ -3557,7 +3557,7 @@ function Go({ message: e, onReplyQuote: n, onCopy: r, autoScrollIntoView: a = !0
3557
3557
  //#endregion
3558
3558
  //#region src/addons/ai/F0AiMessagesContainer/components/WelcomePhrase.tsx
3559
3559
  function Ko({ phrase: e, caption: t, onClick: n }) {
3560
- let r = i("text-balance text-center text-xl font-semibold text-f1-foreground", n && i("rounded-sm transition-transform duration-200", "hover:scale-[1.02] focus-visible:scale-[1.02]", "motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100", a())), o = /* @__PURE__ */ Z(Y, { children: [t ? /* @__PURE__ */ Z("span", {
3560
+ let r = i("text-balance text-center text-xl font-semibold text-f1-foreground", n && i("rounded-sm transition-transform duration-200", "hover:scale-[1.02] focus-visible:scale-[1.02]", "motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100", a())), o = /* @__PURE__ */ Z(Kn, { children: [t ? /* @__PURE__ */ Z("span", {
3561
3561
  className: "text-f1-foreground-secondary",
3562
3562
  children: [t, " "]
3563
3563
  }) : null, e] });
@@ -3574,12 +3574,12 @@ function Ko({ phrase: e, caption: t, onClick: n }) {
3574
3574
  //#endregion
3575
3575
  //#region src/addons/ai/F0AiChat/providers/useWelcomeRound.ts
3576
3576
  var qo = () => {
3577
- let e = Hn(ue), [t] = J(() => e?.nextRound ?? 0), n = e?.claimRound;
3578
- return G(function() {
3577
+ let e = Vn(ue), [t] = Y(() => e?.nextRound ?? 0), n = e?.claimRound;
3578
+ return K(function() {
3579
3579
  n?.(t);
3580
3580
  }, [n, t]), t;
3581
3581
  }, Jo = (e, t) => {
3582
- G(function() {
3582
+ K(function() {
3583
3583
  return () => t(null);
3584
3584
  }, [e, t]);
3585
3585
  }, Yo = 3, Xo = (e, t) => {
@@ -3609,7 +3609,7 @@ var qo = () => {
3609
3609
  return n.add(i), i;
3610
3610
  });
3611
3611
  }, es = (e) => {
3612
- let [t, n] = J(() => Zo(e)), { cut: r } = t.rows === e ? t : Zo(e), i = (t) => n((n) => {
3612
+ let [t, n] = Y(() => Zo(e)), { cut: r } = t.rows === e ? t : Zo(e), i = (t) => n((n) => {
3613
3613
  let r = n.rows === e ? n : Zo(e);
3614
3614
  return r.cut.has(t) ? r : {
3615
3615
  rows: e,
@@ -3625,13 +3625,13 @@ var qo = () => {
3625
3625
  }));
3626
3626
  };
3627
3627
  function ts({ prompts: { suggestions: e, onItemClick: t }, round: n }) {
3628
- let { preview: r, pick: i } = me({ onItemClick: t }), a = es(K(() => Xo(e, n), [e, n]));
3629
- return Jo(e, r), /* @__PURE__ */ X(U, {
3628
+ let { preview: r, pick: i } = me({ onItemClick: t }), a = es(q(() => Xo(e, n), [e, n]));
3629
+ return Jo(e, r), /* @__PURE__ */ X(W, {
3630
3630
  display: "flex",
3631
3631
  flexDirection: "column",
3632
3632
  gap: "md",
3633
3633
  width: "full",
3634
- children: a.map(({ item: e, group: t, onOverflowChange: n }, a) => /* @__PURE__ */ X(Dt, {
3634
+ children: a.map(({ item: e, group: t, onOverflowChange: n }, a) => /* @__PURE__ */ X(Et, {
3635
3635
  label: e.title,
3636
3636
  icon: t.icon,
3637
3637
  onClick: () => i(e, t),
@@ -3667,12 +3667,12 @@ function ns({ prompts: e }) {
3667
3667
  //#endregion
3668
3668
  //#region src/addons/ai/F0AiMessagesContainer/components/WelcomeScreen.tsx
3669
3669
  function rs({ phrase: e, caption: t, subtitle: n, prompts: r, onClick: i }) {
3670
- return /* @__PURE__ */ Z(U, {
3670
+ return /* @__PURE__ */ Z(W, {
3671
3671
  display: "flex",
3672
3672
  flexDirection: "column",
3673
3673
  width: "full",
3674
3674
  grow: !0,
3675
- children: [/* @__PURE__ */ Z(U, {
3675
+ children: [/* @__PURE__ */ Z(W, {
3676
3676
  display: "flex",
3677
3677
  flexDirection: "column",
3678
3678
  alignItems: "center",
@@ -3684,7 +3684,7 @@ function rs({ phrase: e, caption: t, subtitle: n, prompts: r, onClick: i }) {
3684
3684
  phrase: e,
3685
3685
  caption: t,
3686
3686
  onClick: i
3687
- }), n ? /* @__PURE__ */ X(Pn, {
3687
+ }), n ? /* @__PURE__ */ X(Nn, {
3688
3688
  variant: "description",
3689
3689
  align: "center",
3690
3690
  content: n,
@@ -3701,7 +3701,7 @@ var is = {
3701
3701
  onThumbsDown: () => {}
3702
3702
  };
3703
3703
  function as({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a, initialMessageCaption: o, initialMessageSubtitle: c, onWelcomeClick: l, welcomePrompts: u, renderToolCall: f, onReplyQuote: p, onAssistantMessageRendered: m, autoScrollUserIntoView: h = !0, renderMarkdown: g, feedback: _, freezeLayout: v = !1, noShadows: y = !1, fullscreen: b = !1, children: x, AssistantMessage: S, UserMessage: C, onRegenerate: w, onCopy: T }) {
3704
- let { modal: E, handleSubmit: D, handleClose: O } = Ui(_ ?? is), k = t(), A = S ?? xo, j = C ?? Go, ee = a ?? k.ai.defaultInitialMessage, M = !n && e.length === 0 && ee !== "", N = q(null), P = q(null), F = q(null), te = q(null), { showScrollBtn: ne, scrolledFromTop: I, turnMinHeight: re, scrollToBottom: ie } = Ea({
3704
+ let { modal: E, handleSubmit: D, handleClose: O } = Ui(_ ?? is), k = t(), A = S ?? xo, j = C ?? Go, ee = a ?? k.ai.defaultInitialMessage, M = !n && e.length === 0 && ee !== "", N = J(null), P = J(null), F = J(null), te = J(null), { showScrollBtn: ne, scrolledFromTop: I, turnMinHeight: re, scrollToBottom: ie } = Ea({
3705
3705
  viewportRef: N,
3706
3706
  contentRef: P,
3707
3707
  lastTurnRef: te,
@@ -3792,7 +3792,7 @@ function as({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a
3792
3792
  ]
3793
3793
  }, `turn-${n}`);
3794
3794
  };
3795
- return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ Z("div", {
3795
+ return /* @__PURE__ */ Z(Kn, { children: [/* @__PURE__ */ Z("div", {
3796
3796
  className: "relative flex flex-1 flex-col overflow-hidden",
3797
3797
  children: [
3798
3798
  /* @__PURE__ */ X("div", {
@@ -3849,7 +3849,7 @@ function as({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a
3849
3849
  scale: .8
3850
3850
  },
3851
3851
  transition: { duration: .2 },
3852
- children: /* @__PURE__ */ X(ut, {
3852
+ children: /* @__PURE__ */ X(lt, {
3853
3853
  label: k.ai.scrollToBottom,
3854
3854
  onClick: () => ie()
3855
3855
  })
@@ -3867,15 +3867,15 @@ var os = (e) => !!ea(e.content) || $i(e).length > 0;
3867
3867
  //#endregion
3868
3868
  //#region src/addons/ai/F0AiMessagesContainer/F0AiMessagesContainer.tsx
3869
3869
  function ss(e) {
3870
- let t = Mt(), n = /* @__PURE__ */ X(Vi, { children: /* @__PURE__ */ X(as, { ...e }) });
3871
- return e.filePreviews || !t.provided ? /* @__PURE__ */ X(Ye, {
3870
+ let t = jt(), n = /* @__PURE__ */ X(Vi, { children: /* @__PURE__ */ X(as, { ...e }) });
3871
+ return e.filePreviews || !t.provided ? /* @__PURE__ */ X(Je, {
3872
3872
  filePreviews: e.filePreviews,
3873
3873
  children: n
3874
3874
  }) : n;
3875
3875
  }
3876
3876
  //#endregion
3877
3877
  //#region src/addons/ai/F0AiChat/types.ts
3878
- var cs = { ai: Jt.ai }, ls = Ln(null);
3878
+ var cs = { ai: qt.ai }, ls = In(null);
3879
3879
  function us({ children: e, translations: t }) {
3880
3880
  return /* @__PURE__ */ X(ls.Provider, {
3881
3881
  value: t,
@@ -3883,14 +3883,14 @@ function us({ children: e, translations: t }) {
3883
3883
  });
3884
3884
  }
3885
3885
  function ds() {
3886
- let e = Hn(ls);
3886
+ let e = Vn(ls);
3887
3887
  if (e === null) throw Error("useAiChatTranslations must be used within an AiChatTranslationsProvider");
3888
3888
  return e;
3889
3889
  }
3890
3890
  //#endregion
3891
3891
  //#region src/addons/ai/F0AiChat/providers/useCanvasEntities.ts
3892
3892
  function fs() {
3893
- let { canvasEntities: e } = Kt();
3893
+ let { canvasEntities: e } = Gt();
3894
3894
  return e;
3895
3895
  }
3896
3896
  //#endregion
@@ -3926,15 +3926,15 @@ var ms = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
3926
3926
  className: i("flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-colors", e ? "bg-f1-background-selected-bold" : "border-2 border-solid border-f1-border bg-f1-background"),
3927
3927
  children: e ? /* @__PURE__ */ X("div", { className: "h-2 w-2 rounded-full bg-f1-background" }) : null
3928
3928
  }), gs = 132, _s = ({ mode: e, hasSelection: n, hasCustomText: r, customAnswerText: a, isCustomAnswerActive: o, canProceed: s, inputRef: c, onActivate: l, onChangeText: u, onToggleActive: d, onConfirm: f }) => {
3929
- let p = t().ai.clarifyingQuestion.typeYourAnswer, m = q(null), h = kn(m, c);
3930
- Kn(() => {
3929
+ let p = t().ai.clarifyingQuestion.typeYourAnswer, m = J(null), h = On(m, c);
3930
+ Gn(() => {
3931
3931
  let e = m.current;
3932
3932
  if (!e) return;
3933
3933
  e.style.height = "auto";
3934
3934
  let t = Math.min(e.scrollHeight, gs);
3935
3935
  e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > gs ? "auto" : "hidden";
3936
3936
  }, [a]);
3937
- let g = e === "single" ? /* @__PURE__ */ X(hs, { isSelected: r && !n }) : /* @__PURE__ */ X(vn, {
3937
+ let g = e === "single" ? /* @__PURE__ */ X(hs, { isSelected: r && !n }) : /* @__PURE__ */ X(_n, {
3938
3938
  checked: o,
3939
3939
  onCheckedChange: () => d(!o),
3940
3940
  title: p,
@@ -3956,7 +3956,7 @@ var ms = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
3956
3956
  className: "min-w-0 flex-1 resize-none bg-transparent text-base text-f1-foreground outline-none placeholder:text-f1-foreground-tertiary"
3957
3957
  })]
3958
3958
  });
3959
- }, vs = zn(({ option: e, isSelected: t, mode: n, isTabStop: r, onToggle: o, onKeyNavigate: s }, c) => n === "single" ? /* @__PURE__ */ Z("div", {
3959
+ }, vs = Rn(({ option: e, isSelected: t, mode: n, isTabStop: r, onToggle: o, onKeyNavigate: s }, c) => n === "single" ? /* @__PURE__ */ Z("div", {
3960
3960
  ref: c,
3961
3961
  role: "radio",
3962
3962
  "aria-checked": t,
@@ -3973,12 +3973,12 @@ var ms = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
3973
3973
  }) : /* @__PURE__ */ Z("div", {
3974
3974
  ref: c,
3975
3975
  className: i("flex cursor-pointer items-start rounded-md pl-2 transition-[background-color,transform] hover:bg-f1-background-secondary active:scale-[0.99]"),
3976
- children: [/* @__PURE__ */ X(U, {
3976
+ children: [/* @__PURE__ */ X(W, {
3977
3977
  display: "flex",
3978
3978
  height: "9",
3979
3979
  shrink: !1,
3980
3980
  alignItems: "center",
3981
- children: /* @__PURE__ */ X(vn, {
3981
+ children: /* @__PURE__ */ X(_n, {
3982
3982
  checked: t,
3983
3983
  onCheckedChange: () => o(e.id),
3984
3984
  title: e.label,
@@ -4010,8 +4010,8 @@ var ys = [
4010
4010
  if (e !== "single") return 0;
4011
4011
  let t = n.findIndex((e) => r.includes(e.id));
4012
4012
  return t >= 0 ? t : 0;
4013
- })(), [b, x] = J(y), S = q([]), C = q(null);
4014
- G(function() {
4013
+ })(), [b, x] = Y(y), S = J([]), C = J(null);
4014
+ K(function() {
4015
4015
  let e = C.current, t = document.activeElement, n = t === null || t === document.body || !!e?.closest("[data-f0-chat-composer]")?.contains(t);
4016
4016
  e && n && e.focus({ preventScroll: !0 });
4017
4017
  }, []);
@@ -4113,7 +4113,7 @@ var ys = [
4113
4113
  disabled: r,
4114
4114
  label: l.ai.clarifyingQuestion.back,
4115
4115
  hideLabel: !0,
4116
- icon: dn
4116
+ icon: un
4117
4117
  }),
4118
4118
  /* @__PURE__ */ X("span", {
4119
4119
  className: "translate-y-px text-sm font-semibold text-f1-foreground-tertiary",
@@ -4127,7 +4127,7 @@ var ys = [
4127
4127
  disabled: i || !a,
4128
4128
  label: l.ai.clarifyingQuestion.next,
4129
4129
  hideLabel: !0,
4130
- icon: hn
4130
+ icon: mn
4131
4131
  })
4132
4132
  ]
4133
4133
  }) : null,
@@ -4146,7 +4146,7 @@ var ys = [
4146
4146
  clarifyingQuestion: e,
4147
4147
  isSubmitDisabled: t
4148
4148
  }), As = ({ clarifyingQuestion: e, isSubmitDisabled: n }) => {
4149
- let r = t(), i = p(), { currentStep: a, currentStepIndex: o, totalSteps: c, toggleOption: l, confirm: u, 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 = q(null), O = S ?? "single", k = c > 1, A = o === 0, j = o === c - 1, ee = k ? r.t("ai.clarifyingQuestion.stepOf", {
4149
+ let r = t(), i = p(), { currentStep: a, currentStepIndex: o, totalSteps: c, toggleOption: l, confirm: u, 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 = c > 1, A = o === 0, j = o === c - 1, ee = k ? r.t("ai.clarifyingQuestion.stepOf", {
4150
4150
  current: String(o + 1),
4151
4151
  total: String(c)
4152
4152
  }) : void 0, M = x.length > 0, N = (T ?? "").trim().length > 0, P = M || E && N || C === !0, F = n === !0 && j, te = () => {
@@ -4549,22 +4549,22 @@ var Rs = class {
4549
4549
  repeatType: "mirror"
4550
4550
  };
4551
4551
  function Gs(e) {
4552
- let [t, n] = J(e), r = re(e), i = q(null);
4552
+ let [t, n] = Y(e), r = re(e), i = J(null);
4553
4553
  return Yn(r, "change", (e) => n(e)), {
4554
4554
  value: t,
4555
4555
  motionValue: r,
4556
4556
  controls: i,
4557
- animate: W((e, t) => {
4558
- i.current = st(r, e, t);
4557
+ animate: G((e, t) => {
4558
+ i.current = ot(r, e, t);
4559
4559
  }, [r])
4560
4560
  };
4561
4561
  }
4562
4562
  function Ks(e, t) {
4563
- let [n, r] = J(zs), { value: i, animate: a, motionValue: o } = Gs(Hs), { value: s, animate: c } = Gs(Bs), { value: l, animate: u } = Gs(Vs), { value: d, animate: f } = Gs(Us), p = Jn(t, {
4563
+ let [n, r] = Y(zs), { value: i, animate: a, motionValue: o } = Gs(Hs), { value: s, animate: c } = Gs(Bs), { value: l, animate: u } = Gs(Vs), { value: d, animate: f } = Gs(Us), p = Jn(t, {
4564
4564
  fftSize: 512,
4565
4565
  smoothingTimeConstant: .55
4566
4566
  });
4567
- return G(() => {
4567
+ return K(() => {
4568
4568
  switch (e) {
4569
4569
  case "idle":
4570
4570
  case "failed":
@@ -4594,7 +4594,7 @@ function Ks(e, t) {
4594
4594
  c,
4595
4595
  u,
4596
4596
  f
4597
- ]), G(() => {
4597
+ ]), K(() => {
4598
4598
  e === "speaking" && p > 0 && !o.isAnimating() && a(.2 + .2 * p, { duration: 0 });
4599
4599
  }, [
4600
4600
  e,
@@ -4768,7 +4768,7 @@ function Sc({ fs: e, vs: t = Xs, textures: n = [], uniforms: r, clearColor: i =
4768
4768
  0,
4769
4769
  1
4770
4770
  ], precision: a = "highp", style: o, contextAttributes: s = {}, lerp: c = 1, devicePixelRatio: l = 1, onDoneLoadingTextures: u, onError: d = console.error, onWarning: f = console.warn }) {
4771
- let p = q(null), m = q(null), h = q(null), g = q(null), _ = q(void 0), v = q(void 0), y = q(!1), b = q(void 0), x = q(0), S = q([0, 0]), C = q([]), w = q(0), T = q(void 0), E = q({
4771
+ let p = J(null), m = J(null), h = J(null), g = J(null), _ = J(void 0), v = J(void 0), y = J(!1), b = J(void 0), x = J(0), S = J([0, 0]), C = J([]), w = J(0), T = J(void 0), E = J({
4772
4772
  [Zs]: {
4773
4773
  type: "float",
4774
4774
  isNeeded: !1,
@@ -4819,7 +4819,7 @@ function Sc({ fs: e, vs: t = Xs, textures: n = [], uniforms: r, clearColor: i =
4819
4819
  0
4820
4820
  ]
4821
4821
  }
4822
- }), D = q(r), O = (e, t) => {
4822
+ }), D = J(r), O = (e, t) => {
4823
4823
  let n = "width" in e ? e.width ?? 0 : 0, r = "height" in e ? e.height ?? 0 : 0, i = E.current.iChannelResolution;
4824
4824
  if (!i) return;
4825
4825
  Array.isArray(i.value) || (i.value = []);
@@ -5012,9 +5012,9 @@ function Sc({ fs: e, vs: t = Xs, textures: n = [], uniforms: r, clearColor: i =
5012
5012
  let e = { passive: !0 };
5013
5013
  E.current.iMouse?.isNeeded && p.current && (p.current.removeEventListener("mousemove", M, e), p.current.removeEventListener("mouseout", N, e), p.current.removeEventListener("mouseup", N, e), p.current.removeEventListener("mousedown", ee, e), p.current.removeEventListener("touchmove", M, e), p.current.removeEventListener("touchend", N, e), p.current.removeEventListener("touchstart", ee, e)), E.current.iDeviceOrientation?.isNeeded && window.removeEventListener("deviceorientation", j, e), T.current && (T.current.disconnect(), window.removeEventListener("resize", P, e));
5014
5014
  };
5015
- return G(() => {
5015
+ return K(() => {
5016
5016
  D.current = r;
5017
- }, [r]), G(() => {
5017
+ }, [r]), K(() => {
5018
5018
  let n = C.current;
5019
5019
  function r() {
5020
5020
  k();
@@ -5040,7 +5040,7 @@ function Sc({ fs: e, vs: t = Xs, textures: n = [], uniforms: r, clearColor: i =
5040
5040
  }
5041
5041
  //#endregion
5042
5042
  //#region src/addons/ai/F0AuraVoiceAnimation/components/shaderSource.ts
5043
- var Cc = "\nconst float TAU = 6.283185;\n\n// Noise for dithering\nvec2 randFibo(vec2 p) {\n p = fract(p * vec2(443.897, 441.423));\n p += dot(p, p.yx + 19.19);\n return fract((p.xx + p.yx) * p.xy);\n}\n\n// Tonemap\nvec3 Tonemap(vec3 x) {\n x *= 4.0;\n return x / (1.0 + x);\n}\n\n// Luma for alpha\nfloat luma(vec3 color) {\n return dot(color, vec3(0.299, 0.587, 0.114));\n}\n\n// RGB to HSV\nvec3 rgb2hsv(vec3 c) {\n vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\n vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));\n float d = q.x - min(q.w, q.y);\n float e = 1.0e-10;\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n}\n\n// HSV to RGB\nvec3 hsv2rgb(vec3 c) {\n vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\n// SDF shapes\nfloat sdCircle(vec2 st, float r) {\n return length(st) - r;\n}\n\nfloat sdLine(vec2 p, float r) {\n float halfLen = r * 2.0;\n vec2 a = vec2(-halfLen, 0.0);\n vec2 b = vec2(halfLen, 0.0);\n vec2 pa = p - a;\n vec2 ba = b - a;\n float h = clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);\n return length(pa - ba * h);\n}\n\nfloat getSdf(vec2 st) {\n if(uShape == 1.0) return sdCircle(st, uScale);\n else if(uShape == 2.0) return sdLine(st, uScale);\n return sdCircle(st, uScale); // Default\n}\n\nvec2 turb(vec2 pos, float t, float it) {\n // Initial rotation matrix for swirl direction\n mat2 rotation = mat2(0.6, -0.25, 0.25, 0.9);\n // Secondary rotation applied each iteration (approx 53 degree rotation)\n mat2 layerRotation = mat2(0.6, -0.8, 0.8, 0.6);\n\n float frequency = mix(2.0, 15.0, uFrequency);\n float amplitude = uAmplitude;\n float frequencyGrowth = 1.4;\n float animTime = t * 0.1 * uSpeed;\n\n const int LAYERS = 4;\n for(int i = 0; i < LAYERS; i++) {\n // Calculate wave displacement for this layer\n vec2 rotatedPos = pos * rotation;\n vec2 wave = sin(frequency * rotatedPos + float(i) * animTime + it);\n\n // Apply displacement along rotation direction\n pos += (amplitude / frequency) * rotation[0] * wave;\n\n // Evolve parameters for next layer\n rotation *= layerRotation;\n amplitude *= mix(1.0, max(wave.x, wave.y), uVariance);\n frequency *= frequencyGrowth;\n }\n\n return pos;\n}\n\nconst float ITERATIONS = 36.0;\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n vec2 uv = fragCoord / iResolution.xy;\n\n vec3 pp = vec3(0.0);\n vec3 bloom = vec3(0.0);\n float t = iTime * 0.5;\n vec2 pos = uv - 0.5;\n\n vec2 prevPos = turb(pos, t, 0.0 - 1.0 / ITERATIONS);\n float spacing = mix(1.0, TAU, uSpacing);\n\n for(float i = 1.0; i < ITERATIONS + 1.0; i++) {\n float iter = i / ITERATIONS;\n vec2 st = turb(pos, t, iter * spacing);\n float d = abs(getSdf(st));\n float pd = distance(st, prevPos);\n prevPos = st;\n float dynamicBlur = exp2(pd * 2.0 * 1.4426950408889634) - 1.0;\n float ds = smoothstep(0.0, uBlur * 0.05 + max(dynamicBlur * uSmoothing, 0.001), d);\n\n // Shift color based on iteration using uColorScale\n vec3 color = uColor;\n if(uColorShift > 0.01) {\n vec3 hsv = rgb2hsv(color);\n // Shift hue by iteration\n hsv.x = fract(hsv.x + (1.0 - iter) * uColorShift * 0.3);\n color = hsv2rgb(hsv);\n }\n\n float invd = 1.0 / max(d + dynamicBlur, 0.001);\n pp += (ds - 1.0) * color;\n bloom += clamp(invd, 0.0, 250.0) * color;\n }\n\n pp *= 1.0 / ITERATIONS;\n\n vec3 color;\n\n // Dark mode (default)\n if(uMode < 0.5) {\n // use bloom effect\n bloom = bloom / (bloom + 2e4);\n color = (-pp + bloom * 3.0 * uBloom) * 1.2;\n color += (randFibo(fragCoord).x - 0.5) / 255.0;\n color = Tonemap(color);\n float alpha = luma(color) * uMix;\n fragColor = vec4(color * uMix, alpha);\n }\n\n // Light mode\n else {\n // no bloom effect\n color = -pp;\n color += (randFibo(fragCoord).x - 0.5) / 255.0;\n\n // Preserve hue by tone mapping brightness only\n float brightness = length(color);\n vec3 direction = brightness > 0.0 ? color / brightness : color;\n\n // Reinhard on brightness\n float factor = 2.0;\n float mappedBrightness = (brightness * factor) / (1.0 + brightness * factor);\n color = direction * mappedBrightness;\n\n // Boost saturation to compensate for white background bleed-through\n // When alpha < 1.0, white bleeds through making colors look desaturated\n // So we increase saturation to maintain vibrant appearance\n float gray = dot(color, vec3(0.2, 0.5, 0.1));\n float saturationBoost = 3.0;\n color = mix(vec3(gray), color, saturationBoost);\n\n // Clamp between 0-1\n color = clamp(color, 0.0, 1.0);\n\n float alpha = mappedBrightness * clamp(uMix, 1.0, 2.0);\n fragColor = vec4(color, alpha);\n }\n}", wc = qt({
5043
+ var Cc = "\nconst float TAU = 6.283185;\n\n// Noise for dithering\nvec2 randFibo(vec2 p) {\n p = fract(p * vec2(443.897, 441.423));\n p += dot(p, p.yx + 19.19);\n return fract((p.xx + p.yx) * p.xy);\n}\n\n// Tonemap\nvec3 Tonemap(vec3 x) {\n x *= 4.0;\n return x / (1.0 + x);\n}\n\n// Luma for alpha\nfloat luma(vec3 color) {\n return dot(color, vec3(0.299, 0.587, 0.114));\n}\n\n// RGB to HSV\nvec3 rgb2hsv(vec3 c) {\n vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\n vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));\n float d = q.x - min(q.w, q.y);\n float e = 1.0e-10;\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n}\n\n// HSV to RGB\nvec3 hsv2rgb(vec3 c) {\n vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\n// SDF shapes\nfloat sdCircle(vec2 st, float r) {\n return length(st) - r;\n}\n\nfloat sdLine(vec2 p, float r) {\n float halfLen = r * 2.0;\n vec2 a = vec2(-halfLen, 0.0);\n vec2 b = vec2(halfLen, 0.0);\n vec2 pa = p - a;\n vec2 ba = b - a;\n float h = clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);\n return length(pa - ba * h);\n}\n\nfloat getSdf(vec2 st) {\n if(uShape == 1.0) return sdCircle(st, uScale);\n else if(uShape == 2.0) return sdLine(st, uScale);\n return sdCircle(st, uScale); // Default\n}\n\nvec2 turb(vec2 pos, float t, float it) {\n // Initial rotation matrix for swirl direction\n mat2 rotation = mat2(0.6, -0.25, 0.25, 0.9);\n // Secondary rotation applied each iteration (approx 53 degree rotation)\n mat2 layerRotation = mat2(0.6, -0.8, 0.8, 0.6);\n\n float frequency = mix(2.0, 15.0, uFrequency);\n float amplitude = uAmplitude;\n float frequencyGrowth = 1.4;\n float animTime = t * 0.1 * uSpeed;\n\n const int LAYERS = 4;\n for(int i = 0; i < LAYERS; i++) {\n // Calculate wave displacement for this layer\n vec2 rotatedPos = pos * rotation;\n vec2 wave = sin(frequency * rotatedPos + float(i) * animTime + it);\n\n // Apply displacement along rotation direction\n pos += (amplitude / frequency) * rotation[0] * wave;\n\n // Evolve parameters for next layer\n rotation *= layerRotation;\n amplitude *= mix(1.0, max(wave.x, wave.y), uVariance);\n frequency *= frequencyGrowth;\n }\n\n return pos;\n}\n\nconst float ITERATIONS = 36.0;\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n vec2 uv = fragCoord / iResolution.xy;\n\n vec3 pp = vec3(0.0);\n vec3 bloom = vec3(0.0);\n float t = iTime * 0.5;\n vec2 pos = uv - 0.5;\n\n vec2 prevPos = turb(pos, t, 0.0 - 1.0 / ITERATIONS);\n float spacing = mix(1.0, TAU, uSpacing);\n\n for(float i = 1.0; i < ITERATIONS + 1.0; i++) {\n float iter = i / ITERATIONS;\n vec2 st = turb(pos, t, iter * spacing);\n float d = abs(getSdf(st));\n float pd = distance(st, prevPos);\n prevPos = st;\n float dynamicBlur = exp2(pd * 2.0 * 1.4426950408889634) - 1.0;\n float ds = smoothstep(0.0, uBlur * 0.05 + max(dynamicBlur * uSmoothing, 0.001), d);\n\n // Shift color based on iteration using uColorScale\n vec3 color = uColor;\n if(uColorShift > 0.01) {\n vec3 hsv = rgb2hsv(color);\n // Shift hue by iteration\n hsv.x = fract(hsv.x + (1.0 - iter) * uColorShift * 0.3);\n color = hsv2rgb(hsv);\n }\n\n float invd = 1.0 / max(d + dynamicBlur, 0.001);\n pp += (ds - 1.0) * color;\n bloom += clamp(invd, 0.0, 250.0) * color;\n }\n\n pp *= 1.0 / ITERATIONS;\n\n vec3 color;\n\n // Dark mode (default)\n if(uMode < 0.5) {\n // use bloom effect\n bloom = bloom / (bloom + 2e4);\n color = (-pp + bloom * 3.0 * uBloom) * 1.2;\n color += (randFibo(fragCoord).x - 0.5) / 255.0;\n color = Tonemap(color);\n float alpha = luma(color) * uMix;\n fragColor = vec4(color * uMix, alpha);\n }\n\n // Light mode\n else {\n // no bloom effect\n color = -pp;\n color += (randFibo(fragCoord).x - 0.5) / 255.0;\n\n // Preserve hue by tone mapping brightness only\n float brightness = length(color);\n vec3 direction = brightness > 0.0 ? color / brightness : color;\n\n // Reinhard on brightness\n float factor = 2.0;\n float mappedBrightness = (brightness * factor) / (1.0 + brightness * factor);\n color = direction * mappedBrightness;\n\n // Boost saturation to compensate for white background bleed-through\n // When alpha < 1.0, white bleeds through making colors look desaturated\n // So we increase saturation to maintain vibrant appearance\n float gray = dot(color, vec3(0.2, 0.5, 0.1));\n float saturationBoost = 3.0;\n color = mix(vec3(gray), color, saturationBoost);\n\n // Clamp between 0-1\n color = clamp(color, 0.0, 1.0);\n\n float alpha = mappedBrightness * clamp(uMix, 1.0, 2.0);\n fragColor = vec4(color, alpha);\n }\n}", wc = Kt({
5044
5044
  base: "aspect-square",
5045
5045
  variants: { size: {
5046
5046
  icon: "h-[24px]",
@@ -5063,7 +5063,7 @@ function Tc(e) {
5063
5063
  }
5064
5064
  }
5065
5065
  function Ec({ shape: e = 1, speed: t = 1, amplitude: n = .5, frequency: r = .5, scale: i = .2, blur: a = 1, color: o = "#FF355E", colorShift: s = 1, brightness: c = 1, themeMode: l = typeof window < "u" && document.documentElement.classList.contains("dark") ? "dark" : "light", ref: u, className: d, ...f }) {
5066
- let p = K(() => Tc(o), [o]);
5066
+ let p = q(() => Tc(o), [o]);
5067
5067
  return /* @__PURE__ */ X("div", {
5068
5068
  ref: u,
5069
5069
  className: d,
@@ -5179,7 +5179,7 @@ var Oc = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
5179
5179
  label: a,
5180
5180
  onClick: o
5181
5181
  }
5182
- }), kc = qt({
5182
+ }), kc = Kt({
5183
5183
  base: [
5184
5184
  "relative flex flex-col rounded-2xl bg-f1-background",
5185
5185
  "border border-solid border-f1-border-secondary",
@@ -5191,9 +5191,9 @@ var Oc = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
5191
5191
  false: "hover:shadow-md"
5192
5192
  } },
5193
5193
  defaultVariants: { selected: !1 }
5194
- }), Ac = qt({ base: "text-lg font-semibold text-f1-foreground line-clamp-3" }), jc = qt({ base: "text-sm text-f1-foreground-secondary leading-normal" }), Mc = qt({ base: "text-sm font-medium text-f1-foreground leading-normal" }), Nc = ({ description: e, isRevealed: n, onAskOne: r }) => {
5194
+ }), Ac = Kt({ base: "text-lg font-semibold text-f1-foreground line-clamp-3" }), jc = Kt({ base: "text-sm text-f1-foreground-secondary leading-normal" }), Mc = Kt({ base: "text-sm font-medium text-f1-foreground leading-normal" }), Nc = ({ description: e, isRevealed: n, onAskOne: r }) => {
5195
5195
  let a = t(), o = p();
5196
- return /* @__PURE__ */ Z(Y, { children: [e ? /* @__PURE__ */ X("span", {
5196
+ return /* @__PURE__ */ Z(Kn, { children: [e ? /* @__PURE__ */ X("span", {
5197
5197
  className: i(jc(), "truncate"),
5198
5198
  children: e
5199
5199
  }) : null, /* @__PURE__ */ X(d, { children: r && n ? /* @__PURE__ */ X(s.div, {
@@ -5232,7 +5232,7 @@ var Oc = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
5232
5232
  className: i(Mc()),
5233
5233
  children: e
5234
5234
  }) : null]
5235
- }), Ic = ({ balance: e }) => /* @__PURE__ */ X(fn, {
5235
+ }), Ic = ({ balance: e }) => /* @__PURE__ */ X(dn, {
5236
5236
  amount: e.amount,
5237
5237
  percentage: e.percentage ?? void 0,
5238
5238
  invertStatus: e.invertStatus,
@@ -5241,32 +5241,32 @@ var Oc = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
5241
5241
  let { label: t } = e;
5242
5242
  return e.content === "person" ? /* @__PURE__ */ X(Fc, {
5243
5243
  label: t,
5244
- children: /* @__PURE__ */ X(rn, {
5244
+ children: /* @__PURE__ */ X(nn, {
5245
5245
  firstName: e.avatar.firstName,
5246
5246
  lastName: e.avatar.lastName,
5247
5247
  src: e.avatar.src,
5248
5248
  size: "xs"
5249
5249
  })
5250
- }) : e.content === "people" ? /* @__PURE__ */ X(on, {
5250
+ }) : e.content === "people" ? /* @__PURE__ */ X(an, {
5251
5251
  type: "person",
5252
5252
  avatars: e.avatars,
5253
5253
  size: "md",
5254
5254
  max: 3
5255
5255
  }) : e.content === "team" ? /* @__PURE__ */ X(Fc, {
5256
5256
  label: t,
5257
- children: /* @__PURE__ */ X(sn, {
5257
+ children: /* @__PURE__ */ X(on, {
5258
5258
  name: e.avatar.name,
5259
5259
  src: e.avatar.src,
5260
5260
  size: "xs"
5261
5261
  })
5262
5262
  }) : e.content === "company" ? /* @__PURE__ */ X(Fc, {
5263
5263
  label: t,
5264
- children: /* @__PURE__ */ X($t, {
5264
+ children: /* @__PURE__ */ X(Qt, {
5265
5265
  name: e.avatar.name,
5266
5266
  src: e.avatar.src,
5267
5267
  size: "xs"
5268
5268
  })
5269
- }) : e.content === "alert" ? /* @__PURE__ */ X(pn, {
5269
+ }) : e.content === "alert" ? /* @__PURE__ */ X(fn, {
5270
5270
  text: e.alertLabel,
5271
5271
  level: e.level
5272
5272
  }) : e.content === "balance" ? /* @__PURE__ */ X(Ic, { balance: e.balance }) : null;
@@ -5332,17 +5332,17 @@ var Vc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5332
5332
  children: e
5333
5333
  });
5334
5334
  }, Uc = ({ data: e, label: t, invertStatus: n }) => {
5335
- let r = `sparkline-gradient-${Un().replace(/:/g, "")}`, i = Bc(e, n), a = zc[i];
5335
+ let r = `sparkline-gradient-${Hn().replace(/:/g, "")}`, i = Bc(e, n), a = zc[i];
5336
5336
  return /* @__PURE__ */ X("div", {
5337
5337
  className: "flex flex-1 flex-col",
5338
5338
  children: /* @__PURE__ */ Z("div", {
5339
5339
  className: "relative w-full flex-1",
5340
5340
  role: "img",
5341
5341
  "aria-label": `Sparkline chart showing ${i} trend`,
5342
- children: [/* @__PURE__ */ X(Nt, {
5342
+ children: [/* @__PURE__ */ X(Mt, {
5343
5343
  width: "100%",
5344
5344
  height: "100%",
5345
- children: /* @__PURE__ */ Z(Xe, {
5345
+ children: /* @__PURE__ */ Z(Ye, {
5346
5346
  data: e,
5347
5347
  margin: {
5348
5348
  top: 4,
@@ -5367,11 +5367,11 @@ var Vc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5367
5367
  stopOpacity: .02
5368
5368
  })]
5369
5369
  }) }),
5370
- /* @__PURE__ */ X(ht, {
5370
+ /* @__PURE__ */ X(mt, {
5371
5371
  hide: !0,
5372
5372
  domain: ["dataMin - 1", "dataMax + 1"]
5373
5373
  }),
5374
- /* @__PURE__ */ X($e, {
5374
+ /* @__PURE__ */ X(Qe, {
5375
5375
  type: "linear",
5376
5376
  dataKey: "value",
5377
5377
  stroke: a.stroke,
@@ -5379,7 +5379,7 @@ var Vc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5379
5379
  fill: `url(#${r})`,
5380
5380
  fillOpacity: 1,
5381
5381
  isAnimationActive: !1,
5382
- dot: (t) => /* @__PURE__ */ Rn(Vc, {
5382
+ dot: (t) => /* @__PURE__ */ Ln(Vc, {
5383
5383
  ...t,
5384
5384
  key: t.index,
5385
5385
  dataLength: e.length,
@@ -5395,8 +5395,8 @@ var Vc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5395
5395
  })]
5396
5396
  })
5397
5397
  });
5398
- }, Wc = zn((e, t) => {
5399
- let { description: n, heading: r, label: o, selected: c = !1, onClick: l, onAskOne: u, ...d } = e, [f, m] = J(!1), [h, g] = J(!1), _ = f || h, v = p(), y = _ && !!u, b = {
5398
+ }, Wc = Rn((e, t) => {
5399
+ let { description: n, heading: r, label: o, selected: c = !1, onClick: l, onAskOne: u, ...d } = e, [f, m] = Y(!1), [h, g] = Y(!1), _ = f || h, v = p(), y = _ && !!u, b = {
5400
5400
  duration: v ? 0 : .2,
5401
5401
  ease: [
5402
5402
  .33,
@@ -5411,7 +5411,7 @@ var Vc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5411
5411
  }, C = f ? "[animation:rotate-gradient_2s_linear_infinite_running]" : "[animation:rotate-gradient_2s_linear_infinite_paused]";
5412
5412
  return /* @__PURE__ */ Z("div", {
5413
5413
  className: "relative",
5414
- children: [c ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("div", {
5414
+ children: [c ? /* @__PURE__ */ Z(Kn, { children: [/* @__PURE__ */ X("div", {
5415
5415
  "data-testid": "selected-border",
5416
5416
  className: i("absolute -inset-px rounded-2xl", "[--gradient-angle:0deg]", "bg-[conic-gradient(from_var(--gradient-angle),hsla(229,57%,76%,0.7),hsla(348,80%,50%,0.7),hsla(348,80%,50%,0.7),hsla(18,80%,50%,0.7),hsla(229,57%,76%,0.7),hsla(229,57%,76%,0.7))]", C)
5417
5417
  }), /* @__PURE__ */ X("div", {
@@ -5458,7 +5458,7 @@ var Vc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
5458
5458
  });
5459
5459
  });
5460
5460
  Wc.displayName = "F0AiInsightCard";
5461
- var Gc = e(Ae(Wc, () => /* @__PURE__ */ Z("div", {
5461
+ var Gc = e(ke(Wc, () => /* @__PURE__ */ Z("div", {
5462
5462
  className: "flex w-[217px] h-[200px] flex-col gap-2 rounded-2xl border border-solid border-f1-border-secondary bg-f1-background p-4",
5463
5463
  "aria-busy": "true",
5464
5464
  "aria-live": "polite",
@@ -5483,8 +5483,8 @@ var Gc = e(Ae(Wc, () => /* @__PURE__ */ Z("div", {
5483
5483
  "sparkline"
5484
5484
  ], qc = 180, Jc = (e) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : qc, Yc = (e, t) => e.length <= t ? e : `${e.slice(0, t).trimEnd()}...`, Xc = (e) => e.showActions !== !1, Zc = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-")));
5485
5485
  function Qc(e) {
5486
- let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = qc } = e, [u, d] = J(!1), f = Un(), p = q(null), m = Jc(l), h = s.length > m, _ = u ? s : Yc(s, m), v = Xc(e) ? e : null, y = Zc(e);
5487
- return G(() => {
5486
+ let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = qc } = e, [u, d] = Y(!1), f = Hn(), p = J(null), m = Jc(l), h = s.length > m, _ = u ? s : Yc(s, m), v = Xc(e) ? e : null, y = Zc(e);
5487
+ return K(() => {
5488
5488
  u && p.current?.focus();
5489
5489
  }, [u]), /* @__PURE__ */ Z("section", {
5490
5490
  className: "overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background",
@@ -5492,7 +5492,7 @@ function Qc(e) {
5492
5492
  children: [
5493
5493
  /* @__PURE__ */ Z("div", {
5494
5494
  className: "flex items-center gap-3 px-4 py-3",
5495
- children: [t ? /* @__PURE__ */ X(an, {
5495
+ children: [t ? /* @__PURE__ */ X(rn, {
5496
5496
  module: t,
5497
5497
  size: "md"
5498
5498
  }) : null, /* @__PURE__ */ Z("div", {
@@ -5516,7 +5516,7 @@ function Qc(e) {
5516
5516
  ref: p,
5517
5517
  tabIndex: u ? -1 : void 0,
5518
5518
  className: i("text-base text-f1-foreground whitespace-pre-wrap break-words", u && a(), !u && "inline"),
5519
- children: [_, h && !u ? /* @__PURE__ */ Z(Y, { children: [" ", /* @__PURE__ */ X("button", {
5519
+ children: [_, h && !u ? /* @__PURE__ */ Z(Kn, { children: [" ", /* @__PURE__ */ X("button", {
5520
5520
  type: "button",
5521
5521
  className: i("inline cursor-pointer rounded-none border-0 bg-transparent p-0 text-base text-f1-foreground underline underline-offset-2 hover:text-f1-foreground-secondary", a()),
5522
5522
  "aria-controls": f,
@@ -5542,7 +5542,7 @@ Qc.displayName = "F0AiProposalCard";
5542
5542
  //#endregion
5543
5543
  //#region src/blocks/ai/F0AiMessageSources/components/CollapsibleMessage.tsx
5544
5544
  var $c = ({ icon: e, title: t, children: n }) => {
5545
- let [r, i] = J(!1), a = p();
5545
+ let [r, i] = Y(!1), a = p();
5546
5546
  return /* @__PURE__ */ Z(De, {
5547
5547
  className: "mb-1 w-full",
5548
5548
  open: r,
@@ -5552,7 +5552,7 @@ var $c = ({ icon: e, title: t, children: n }) => {
5552
5552
  children: [
5553
5553
  /* @__PURE__ */ X("span", {
5554
5554
  className: "mr-2 *:block",
5555
- children: /* @__PURE__ */ X(H, {
5555
+ children: /* @__PURE__ */ X(U, {
5556
5556
  icon: e,
5557
5557
  className: "block"
5558
5558
  })
@@ -5561,12 +5561,12 @@ var $c = ({ icon: e, title: t, children: n }) => {
5561
5561
  className: "mr-[2px]",
5562
5562
  children: t
5563
5563
  }),
5564
- /* @__PURE__ */ X(H, {
5565
- icon: hn,
5564
+ /* @__PURE__ */ X(U, {
5565
+ icon: mn,
5566
5566
  className: "h-4 w-4 transition-transform duration-200"
5567
5567
  })
5568
5568
  ]
5569
- }), /* @__PURE__ */ X(B, {
5569
+ }), /* @__PURE__ */ X(V, {
5570
5570
  forceMount: !0,
5571
5571
  className: "data-[state=open]:mt-3",
5572
5572
  children: /* @__PURE__ */ X(s.div, {
@@ -5590,9 +5590,9 @@ var $c = ({ icon: e, title: t, children: n }) => {
5590
5590
  })
5591
5591
  })]
5592
5592
  });
5593
- }, el = (e) => He[e] ?? On, tl = ({ iconName: e }) => e ? /* @__PURE__ */ X("div", {
5593
+ }, el = (e) => Ve[e] ?? Dn, tl = ({ iconName: e }) => e ? /* @__PURE__ */ X("div", {
5594
5594
  className: "mr-1 flex items-center justify-center",
5595
- children: /* @__PURE__ */ X(H, {
5595
+ children: /* @__PURE__ */ X(U, {
5596
5596
  icon: el(e),
5597
5597
  size: "md",
5598
5598
  color: "default"
@@ -5603,7 +5603,7 @@ function nl({ sources: e, title: n }) {
5603
5603
  if (!e || e.length === 0 || !Array.isArray(e)) return null;
5604
5604
  let i = n ?? r.ai.resourcesGroupTitle;
5605
5605
  return /* @__PURE__ */ X($c, {
5606
- icon: Qt,
5606
+ icon: Zt,
5607
5607
  title: i,
5608
5608
  children: /* @__PURE__ */ X("div", {
5609
5609
  className: "flex flex-col gap-1 rounded-lg border border-solid border-f1-border-secondary p-2",
@@ -5637,23 +5637,23 @@ async function rl(e, t, n) {
5637
5637
  let r = ce(e), i = t === "xlsx" ? await O([{
5638
5638
  name: "Data",
5639
5639
  rows: r
5640
- }]) : await ot(r);
5640
+ }]) : await at(r);
5641
5641
  I(i, `${n}.${t}`);
5642
5642
  }
5643
5643
  function il({ dataset: e, title: n, filename: r }) {
5644
- let a = t(), o = q(null), s = n ?? a.ai.aiTable.title, c = W((e) => {
5644
+ let a = t(), o = J(null), s = n ?? a.ai.aiTable.title, c = G((e) => {
5645
5645
  if (!o.current) return;
5646
5646
  let t = r ?? (s.replace(/\s+/g, "_").toLowerCase() || "table");
5647
5647
  rl(o.current, e, t);
5648
5648
  }, [s, r]);
5649
- return e.columns?.length ? /* @__PURE__ */ Z(U, {
5649
+ return e.columns?.length ? /* @__PURE__ */ Z(W, {
5650
5650
  display: "flex",
5651
5651
  flexDirection: "column",
5652
5652
  gap: "md",
5653
5653
  borderRadius: "md",
5654
5654
  border: "default",
5655
5655
  borderColor: "secondary",
5656
- children: [/* @__PURE__ */ Z(U, {
5656
+ children: [/* @__PURE__ */ Z(W, {
5657
5657
  display: "flex",
5658
5658
  alignItems: "center",
5659
5659
  justifyContent: "between",
@@ -5680,7 +5680,7 @@ function il({ dataset: e, title: n, filename: r }) {
5680
5680
  onClick: () => c("csv")
5681
5681
  }]
5682
5682
  })]
5683
- }), /* @__PURE__ */ X(U, {
5683
+ }), /* @__PURE__ */ X(W, {
5684
5684
  overflowX: "auto",
5685
5685
  children: /* @__PURE__ */ Z("table", {
5686
5686
  ref: o,
@@ -5701,10 +5701,61 @@ function il({ dataset: e, title: n, filename: r }) {
5701
5701
  }
5702
5702
  il.displayName = "F0AiTableCard";
5703
5703
  //#endregion
5704
+ //#region src/elements/primitives/F0StatusDot.tsx
5705
+ var al = {
5706
+ unread: "bg-f1-background-info-bold",
5707
+ attention: "bg-f1-background-warning-bold",
5708
+ live: "bg-f1-background-positive-bold",
5709
+ active: "bg-f1-background-selected-bold"
5710
+ };
5711
+ function ol({ status: e, placement: t = "inline", ringClassName: n = "ring-f1-background", "data-testid": r }) {
5712
+ return /* @__PURE__ */ X("span", {
5713
+ "aria-hidden": "true",
5714
+ "data-testid": r,
5715
+ className: i("inline-block size-2 shrink-0 rounded-full", al[e], t === "corner" && "pointer-events-none absolute right-1 top-1 ring-2", t === "corner" && n)
5716
+ });
5717
+ }
5718
+ //#endregion
5719
+ //#region src/addons/ai/F0AiChatHeader/components/ConversationsButton.tsx
5720
+ function sl({ indicator: e }) {
5721
+ let n = t(), r = Hn(), i = e === "attention" ? n.ai.conversationsNeedAttention : void 0;
5722
+ return /* @__PURE__ */ Z("div", {
5723
+ className: "group/conversations relative flex shrink-0",
5724
+ children: [
5725
+ /* @__PURE__ */ X(kn, {
5726
+ asChild: !0,
5727
+ children: /* @__PURE__ */ X(m, {
5728
+ variant: "ghost",
5729
+ hideLabel: !0,
5730
+ label: n.ai.conversations,
5731
+ "aria-describedby": i ? r : void 0,
5732
+ icon: We
5733
+ })
5734
+ }),
5735
+ /* @__PURE__ */ X("span", {
5736
+ id: r,
5737
+ hidden: !0,
5738
+ children: i
5739
+ }),
5740
+ /* @__PURE__ */ X("span", {
5741
+ className: "sr-only",
5742
+ "aria-live": "polite",
5743
+ children: i
5744
+ }),
5745
+ e ? /* @__PURE__ */ X(ol, {
5746
+ status: e,
5747
+ placement: "corner",
5748
+ ringClassName: "ring-f1-background group-hover/conversations:ring-f1-background-secondary-hover group-active/conversations:ring-f1-background-secondary-hover",
5749
+ "data-testid": "conversations-indicator"
5750
+ }) : null
5751
+ ]
5752
+ });
5753
+ }
5754
+ //#endregion
5704
5755
  //#region src/addons/ai/F0AiChatHeader/components/useCutTitleTooltip.ts
5705
- var al = (e) => {
5706
- let [t, n] = J(null), [r, i] = J(!1);
5707
- return Kn(function() {
5756
+ var cl = (e) => {
5757
+ let [t, n] = Y(null), [r, i] = Y(!1);
5758
+ return Gn(function() {
5708
5759
  if (!t) return;
5709
5760
  let e = () => i(t.scrollWidth > t.clientWidth);
5710
5761
  e();
@@ -5714,16 +5765,16 @@ var al = (e) => {
5714
5765
  textRef: n,
5715
5766
  tooltip: r ? e : ""
5716
5767
  };
5717
- }, ol = {
5768
+ }, ll = {
5718
5769
  xs: "pl-1",
5719
5770
  md: "pl-3"
5720
5771
  };
5721
- function sl({ title: e, inset: t }) {
5722
- let { textRef: n, tooltip: r } = al(e), a = p(), [o] = J(e);
5772
+ function ul({ title: e, inset: t }) {
5773
+ let { textRef: n, tooltip: r } = cl(e), a = p(), [o] = Y(e);
5723
5774
  return /* @__PURE__ */ X(l, {
5724
5775
  description: r,
5725
5776
  children: /* @__PURE__ */ X("span", {
5726
- className: i("relative flex min-w-0 flex-1 text-base font-medium text-f1-foreground", ol[t]),
5777
+ className: i("relative flex min-w-0 flex-1 text-base font-medium text-f1-foreground", ll[t]),
5727
5778
  children: /* @__PURE__ */ X(s.span, {
5728
5779
  ref: n,
5729
5780
  className: "min-w-0 truncate text-left",
@@ -5740,7 +5791,7 @@ function sl({ title: e, inset: t }) {
5740
5791
  }
5741
5792
  //#endregion
5742
5793
  //#region src/addons/ai/F0AiChatHeader/components/NewChatButton.tsx
5743
- function cl({ label: e, onClick: t }) {
5794
+ function dl({ label: e, onClick: t }) {
5744
5795
  let n = p();
5745
5796
  return /* @__PURE__ */ X(d, {
5746
5797
  initial: !1,
@@ -5754,7 +5805,7 @@ function cl({ label: e, onClick: t }) {
5754
5805
  variant: "ghost",
5755
5806
  hideLabel: !0,
5756
5807
  label: e,
5757
- icon: yt,
5808
+ icon: vt,
5758
5809
  onClick: t
5759
5810
  })
5760
5811
  }) : null
@@ -5762,13 +5813,13 @@ function cl({ label: e, onClick: t }) {
5762
5813
  }
5763
5814
  //#endregion
5764
5815
  //#region src/addons/ai/F0AiChatHeader/usePointerAtRest.ts
5765
- var ll = 500, ul = () => {
5766
- let [e, t] = J(() => window.matchMedia?.("(hover: hover)").matches === !0);
5767
- return G(function() {
5816
+ var fl = 500, pl = () => {
5817
+ let [e, t] = Y(() => window.matchMedia?.("(hover: hover)").matches === !0);
5818
+ return K(function() {
5768
5819
  if (!e) return;
5769
5820
  let n = () => t(!1);
5770
5821
  window.addEventListener("pointermove", n, { passive: !0 });
5771
- let r = window.setTimeout(n, ll);
5822
+ let r = window.setTimeout(n, fl);
5772
5823
  return () => {
5773
5824
  window.removeEventListener("pointermove", n), window.clearTimeout(r);
5774
5825
  };
@@ -5776,32 +5827,24 @@ var ll = 500, ul = () => {
5776
5827
  };
5777
5828
  //#endregion
5778
5829
  //#region src/addons/ai/F0AiChatHeader/F0AiChatHeader.tsx
5779
- function dl(e) {
5830
+ function ml(e) {
5780
5831
  e.detail !== 0 && (e.preventDefault(), e.stopPropagation());
5781
5832
  }
5782
- var fl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode: r, onClose: a, onNewChat: o, history: c, historyOpen: l, onHistoryOpenChange: u }) => {
5783
- let d = t(), f = p(), h = e?.trim() ?? "", { panelOverlays: g } = Kt(), [_, y] = J(null), b = ul();
5784
- return /* @__PURE__ */ Z(Nn, {
5785
- open: l,
5786
- onOpenChange: u,
5787
- children: [/* @__PURE__ */ X(Mn, {
5833
+ var hl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode: r, onClose: a, onNewChat: o, history: c, historyIndicator: l, historyOpen: u, onHistoryOpenChange: d }) => {
5834
+ let f = t(), h = p(), g = e?.trim() ?? "", { panelOverlays: _ } = Gt(), [y, b] = Y(null), x = pl();
5835
+ return /* @__PURE__ */ Z(Mn, {
5836
+ open: u,
5837
+ onOpenChange: d,
5838
+ children: [/* @__PURE__ */ X(jn, {
5788
5839
  asChild: !0,
5789
5840
  children: /* @__PURE__ */ Z("header", {
5790
- ref: y,
5791
- onClickCapture: b ? dl : void 0,
5841
+ ref: b,
5842
+ onClickCapture: x ? ml : void 0,
5792
5843
  className: "relative flex w-full items-center justify-between gap-1 overflow-hidden py-3 pl-2.5 pr-3",
5793
5844
  children: [
5794
- c ? /* @__PURE__ */ X(An, {
5795
- asChild: !0,
5796
- children: /* @__PURE__ */ X(m, {
5797
- variant: "ghost",
5798
- hideLabel: !0,
5799
- label: d.ai.conversations,
5800
- icon: Ge
5801
- })
5802
- }) : null,
5803
- /* @__PURE__ */ X(sl, {
5804
- title: h,
5845
+ c ? /* @__PURE__ */ X(sl, { indicator: l }) : null,
5846
+ /* @__PURE__ */ X(ul, {
5847
+ title: g,
5805
5848
  inset: c ? "xs" : "md"
5806
5849
  }),
5807
5850
  /* @__PURE__ */ Z(s.div, {
@@ -5809,25 +5852,25 @@ var fl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode
5809
5852
  initial: { opacity: 0 },
5810
5853
  animate: { opacity: 1 },
5811
5854
  transition: {
5812
- duration: f ? 0 : .2,
5855
+ duration: h ? 0 : .2,
5813
5856
  ease: "easeOut"
5814
5857
  },
5815
5858
  children: [
5816
- /* @__PURE__ */ X(cl, {
5817
- label: d.ai.startNewChat,
5859
+ /* @__PURE__ */ X(dl, {
5860
+ label: f.ai.startNewChat,
5818
5861
  onClick: o
5819
5862
  }),
5820
- g ? null : /* @__PURE__ */ X(m, {
5863
+ _ ? null : /* @__PURE__ */ X(m, {
5821
5864
  variant: "ghost",
5822
5865
  hideLabel: !0,
5823
- label: n ? d.ai.collapseChat : d.ai.expandChat,
5824
- icon: n ? At : gt,
5866
+ label: n ? f.ai.collapseChat : f.ai.expandChat,
5867
+ icon: n ? kt : ht,
5825
5868
  onClick: r
5826
5869
  }),
5827
5870
  /* @__PURE__ */ X(m, {
5828
5871
  variant: "ghost",
5829
5872
  hideLabel: !0,
5830
- label: d.ai.closeChat,
5873
+ label: f.ai.closeChat,
5831
5874
  icon: v,
5832
5875
  onClick: a
5833
5876
  })
@@ -5835,14 +5878,14 @@ var fl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode
5835
5878
  })
5836
5879
  ]
5837
5880
  })
5838
- }), c ? /* @__PURE__ */ X(jn, {
5839
- container: _?.parentElement,
5881
+ }), c ? /* @__PURE__ */ X(An, {
5882
+ container: y?.parentElement,
5840
5883
  side: "bottom",
5841
5884
  align: "start",
5842
5885
  sideOffset: 0,
5843
5886
  alignOffset: 8,
5844
5887
  avoidCollisions: !1,
5845
- "aria-label": d.ai.conversations,
5888
+ "aria-label": f.ai.conversations,
5846
5889
  className: i("flex w-[min(26rem,calc(var(--radix-popper-anchor-width)-1rem))] max-h-[min(32rem,calc(var(--radix-popper-available-height)-1rem))] flex-col overflow-hidden p-0", "rounded-lg border-solid border-f1-border shadow-xl", "motion-reduce:data-[state=open]:animate-none motion-reduce:data-[state=closed]:animate-none"),
5847
5890
  children: c
5848
5891
  }) : null]
@@ -5850,32 +5893,32 @@ var fl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode
5850
5893
  };
5851
5894
  //#endregion
5852
5895
  //#region src/addons/ai/F0AiChatHistory/utils.ts
5853
- function pl(e) {
5896
+ function gl(e) {
5854
5897
  let t = new Date(e), n = /* @__PURE__ */ new Date();
5855
- return b(t) ? "today" : dt(t) ? "yesterday" : _n(t, n) ? "thisMonth" : "older";
5898
+ return b(t) ? "today" : ut(t) ? "yesterday" : gn(t, n) ? "thisMonth" : "older";
5856
5899
  }
5857
- function ml(e, t, n) {
5858
- let r = new Date(e), i = Sn(r, "p", { locale: n });
5900
+ function _l(e, t, n) {
5901
+ let r = new Date(e), i = xn(r, "p", { locale: n });
5859
5902
  if (b(r)) return `${t.today}, ${i}`;
5860
- if (dt(r)) return `${t.yesterday}, ${i}`;
5861
- let a = !xn(r, /* @__PURE__ */ new Date());
5862
- return `${Sn(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
5903
+ if (ut(r)) return `${t.yesterday}, ${i}`;
5904
+ let a = !bn(r, /* @__PURE__ */ new Date());
5905
+ return `${xn(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
5863
5906
  }
5864
- function hl(e, t) {
5907
+ function vl(e, t) {
5865
5908
  let n = new Date(e);
5866
- return dt(n) ? Sn(n, "p", { locale: t }) : lt(n, {
5909
+ return ut(n) ? xn(n, "p", { locale: t }) : ct(n, {
5867
5910
  addSuffix: !0,
5868
5911
  locale: t
5869
5912
  });
5870
5913
  }
5871
- function gl(e) {
5914
+ function yl(e) {
5872
5915
  let t = {
5873
5916
  today: [],
5874
5917
  yesterday: [],
5875
5918
  thisMonth: [],
5876
5919
  older: []
5877
5920
  };
5878
- for (let n of e) t[pl(n.updatedAt)].push(n);
5921
+ for (let n of e) t[gl(n.updatedAt)].push(n);
5879
5922
  return [
5880
5923
  "today",
5881
5924
  "yesterday",
@@ -5887,17 +5930,87 @@ function gl(e) {
5887
5930
  }));
5888
5931
  }
5889
5932
  //#endregion
5933
+ //#region src/addons/ai/F0AiChatHistory/components/ThreadActionsMenu.tsx
5934
+ function bl({ items: e }) {
5935
+ let n = t();
5936
+ return /* @__PURE__ */ X("div", {
5937
+ 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"),
5938
+ children: /* @__PURE__ */ X(k, {
5939
+ items: e,
5940
+ children: /* @__PURE__ */ X(m, {
5941
+ icon: En,
5942
+ variant: "ghost",
5943
+ size: "sm",
5944
+ label: n.ai.threadOptions,
5945
+ hideLabel: !0,
5946
+ noAutoTooltip: !0
5947
+ })
5948
+ })
5949
+ });
5950
+ }
5951
+ //#endregion
5952
+ //#region src/addons/ai/F0AiChatHistory/components/ThreadStatusIndicator.tsx
5953
+ function xl({ id: e, status: n }) {
5954
+ let r = t(), i = {
5955
+ running: r.ai.threadRunning,
5956
+ unread: r.ai.threadUnread,
5957
+ attention: r.ai.threadAttention
5958
+ }[n];
5959
+ return /* @__PURE__ */ Z(W, {
5960
+ display: "flex",
5961
+ alignItems: "center",
5962
+ justifyContent: "center",
5963
+ shrink: !1,
5964
+ "aria-hidden": "true",
5965
+ children: [/* @__PURE__ */ X("span", {
5966
+ id: e,
5967
+ className: "sr-only",
5968
+ "aria-hidden": "true",
5969
+ children: i
5970
+ }), n === "running" ? /* @__PURE__ */ X(W, {
5971
+ display: "flex",
5972
+ "aria-hidden": "true",
5973
+ children: /* @__PURE__ */ X(pn, { size: "small" })
5974
+ }) : /* @__PURE__ */ X(ol, { status: n })]
5975
+ });
5976
+ }
5977
+ //#endregion
5978
+ //#region src/addons/ai/F0AiChatHistory/components/ThreadActionsSlot.tsx
5979
+ function Sl({ items: e, status: n, statusId: r, isPending: a }) {
5980
+ let o = t();
5981
+ return a ? /* @__PURE__ */ X(W, {
5982
+ display: "flex",
5983
+ height: "7",
5984
+ width: "7",
5985
+ shrink: !1,
5986
+ alignItems: "center",
5987
+ justifyContent: "center",
5988
+ "aria-label": o.ai.threadOptions,
5989
+ children: /* @__PURE__ */ X(pn, { size: "small" })
5990
+ }) : /* @__PURE__ */ Z("div", {
5991
+ "data-testid": "thread-actions-slot",
5992
+ className: n ? i("group/slot relative flex h-7 w-7 shrink-0 items-center justify-center", "[@media(hover:none)]:w-auto [@media(hover:none)]:gap-1", "[@media(pointer:coarse)]:w-auto [@media(pointer:coarse)]:gap-1") : "contents",
5993
+ children: [n ? /* @__PURE__ */ X("span", {
5994
+ className: i("flex items-center justify-center", "[@media(hover:hover)_and_(pointer:fine)]:group-hover:hidden", "[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:hidden", "[@media(hover:hover)_and_(pointer:fine)]:group-has-[[aria-expanded=true]]/slot:hidden"),
5995
+ children: /* @__PURE__ */ X(xl, {
5996
+ id: r,
5997
+ status: n
5998
+ })
5999
+ }) : null, /* @__PURE__ */ X(bl, { items: e })]
6000
+ });
6001
+ }
6002
+ //#endregion
5890
6003
  //#region src/addons/ai/F0AiChatHistory/components/ThreadItem.tsx
5891
- function _l({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSelect: s, onPin: c, onUnpin: l, onDelete: u, threadActions: d, className: f, relativeTime: p = !1 }) {
5892
- let g = t(), _ = bn(), v = K(() => [
6004
+ function Cl({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSelect: s, onPin: c, onUnpin: l, onDelete: u, threadActions: d, className: f, relativeTime: p = !1 }) {
6005
+ let m = t(), g = yn(), _ = Hn(), v = q(() => [
5893
6006
  {
5894
- label: n ? g.ai.unpinChat : g.ai.pinChat,
6007
+ label: n ? m.ai.unpinChat : m.ai.pinChat,
5895
6008
  icon: n ? S : we,
5896
6009
  onClick: () => n ? l(e.id) : c(e.id)
5897
6010
  },
5898
6011
  ...d?.(e) ?? [],
5899
6012
  {
5900
- label: g.ai.deleteChat,
6013
+ label: m.ai.deleteChat,
5901
6014
  icon: R,
5902
6015
  critical: !0,
5903
6016
  onClick: () => u(e.id)
@@ -5909,17 +6022,17 @@ function _l({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSel
5909
6022
  l,
5910
6023
  u,
5911
6024
  d,
5912
- g.ai.pinChat,
5913
- g.ai.unpinChat,
5914
- g.ai.deleteChat
5915
- ]), y = K(() => ml(e.updatedAt, {
5916
- today: g.ai.today,
5917
- yesterday: g.ai.yesterday
5918
- }, _), [
6025
+ m.ai.pinChat,
6026
+ m.ai.unpinChat,
6027
+ m.ai.deleteChat
6028
+ ]), y = q(() => _l(e.updatedAt, {
6029
+ today: m.ai.today,
6030
+ yesterday: m.ai.yesterday
6031
+ }, g), [
5919
6032
  e.updatedAt,
5920
- g.ai.today,
5921
- g.ai.yesterday,
5922
- _
6033
+ m.ai.today,
6034
+ m.ai.yesterday,
6035
+ g
5923
6036
  ]);
5924
6037
  return /* @__PURE__ */ Z("div", {
5925
6038
  className: i("group flex items-center gap-1 rounded-md py-1.5 pl-3 pr-1.5 hover:bg-f1-background-hover", f, r && "bg-f1-background-secondary"),
@@ -5928,12 +6041,13 @@ function _l({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSel
5928
6041
  type: "button",
5929
6042
  variant: "unstyled",
5930
6043
  "aria-label": e.title,
6044
+ "aria-describedby": e.status && !a ? _ : void 0,
5931
6045
  "aria-current": r ? "true" : void 0,
5932
6046
  className: "flex min-w-0 flex-1 cursor-pointer self-stretch",
5933
6047
  onClick: () => s(e.id, e.title),
5934
6048
  children: /* @__PURE__ */ Z("span", {
5935
6049
  className: i("flex w-full min-w-0 gap-1", p ? "items-start" : "items-center"),
5936
- children: [e.icon ? /* @__PURE__ */ X(H, {
6050
+ children: [e.icon ? /* @__PURE__ */ X(U, {
5937
6051
  icon: e.icon,
5938
6052
  size: "sm",
5939
6053
  className: i("mr-1 shrink-0 text-f1-icon", p && "mt-1"),
@@ -5947,9 +6061,9 @@ function _l({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSel
5947
6061
  }), /* @__PURE__ */ X("span", {
5948
6062
  title: y,
5949
6063
  className: "text-left text-sm text-f1-foreground-secondary",
5950
- children: hl(e.updatedAt, _)
6064
+ children: vl(e.updatedAt, g)
5951
6065
  })]
5952
- }) : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(h, {
6066
+ }) : /* @__PURE__ */ Z(Kn, { children: [/* @__PURE__ */ X(h, {
5953
6067
  lines: 1,
5954
6068
  className: "py-0.5 text-left font-medium",
5955
6069
  children: e.title
@@ -5963,33 +6077,21 @@ function _l({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSel
5963
6077
  className: "hidden shrink-0 pr-1 text-sm font-medium text-f1-foreground-tertiary group-focus-within:inline group-hover:inline",
5964
6078
  children: e.trailingLabel
5965
6079
  }) : null,
5966
- a ? /* @__PURE__ */ X("div", {
5967
- className: "flex h-7 w-7 shrink-0 items-center justify-center",
5968
- "aria-label": g.ai.threadOptions,
5969
- children: /* @__PURE__ */ X(mn, { size: "small" })
5970
- }) : /* @__PURE__ */ X("div", {
5971
- 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"),
5972
- children: /* @__PURE__ */ X(k, {
5973
- items: v,
5974
- children: /* @__PURE__ */ X(m, {
5975
- icon: Dn,
5976
- variant: "ghost",
5977
- size: "sm",
5978
- label: g.ai.threadOptions,
5979
- hideLabel: !0,
5980
- noAutoTooltip: !0
5981
- })
5982
- })
6080
+ /* @__PURE__ */ X(Sl, {
6081
+ items: v,
6082
+ status: e.status,
6083
+ statusId: _,
6084
+ isPending: a
5983
6085
  })
5984
6086
  ]
5985
6087
  });
5986
6088
  }
5987
6089
  //#endregion
5988
6090
  //#region src/addons/ai/F0AiChatHistory/components/CollapsibleGroup.tsx
5989
- function vl({ label: e, threads: t, pinnedIds: n, activeThreadId: r, onSelect: o, onPin: s, onUnpin: c, onDelete: l, threadActions: u }) {
5990
- let [d, f] = J(!0), p = W(() => {
6091
+ function wl({ label: e, threads: t, pinnedIds: n, activeThreadId: r, onSelect: o, onPin: s, onUnpin: c, onDelete: l, threadActions: u }) {
6092
+ let [d, f] = Y(!0), p = G(() => {
5991
6093
  f((e) => !e);
5992
- }, []), m = W((e) => {
6094
+ }, []), m = G((e) => {
5993
6095
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p());
5994
6096
  }, [p]);
5995
6097
  return /* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ Z("div", {
@@ -6004,15 +6106,15 @@ function vl({ label: e, threads: t, pinnedIds: n, activeThreadId: r, onSelect: o
6004
6106
  children: e
6005
6107
  }), /* @__PURE__ */ X("span", {
6006
6108
  className: i("flex opacity-0 transition-opacity duration-150 group-hover/label:opacity-100 group-focus-visible/label:opacity-100 motion-reduce:transition-none", !d && "opacity-100"),
6007
- children: /* @__PURE__ */ X(H, {
6008
- icon: d ? tn : wn,
6109
+ children: /* @__PURE__ */ X(U, {
6110
+ icon: d ? en : Cn,
6009
6111
  color: "secondary",
6010
6112
  size: "xs"
6011
6113
  })
6012
6114
  })]
6013
6115
  }), d ? /* @__PURE__ */ X("div", {
6014
6116
  className: "flex flex-col gap-0.5",
6015
- children: t.map((e) => /* @__PURE__ */ X(_l, {
6117
+ children: t.map((e) => /* @__PURE__ */ X(Cl, {
6016
6118
  thread: e,
6017
6119
  isPinned: n.has(e.id),
6018
6120
  isActive: e.id === r,
@@ -6027,15 +6129,15 @@ function vl({ label: e, threads: t, pinnedIds: n, activeThreadId: r, onSelect: o
6027
6129
  }
6028
6130
  //#endregion
6029
6131
  //#region src/addons/ai/F0AiChatHistory/components/HistorySkeletonRow.tsx
6030
- function yl({ width: e }) {
6132
+ function Tl({ width: e }) {
6031
6133
  return /* @__PURE__ */ Z("div", {
6032
6134
  className: "flex flex-col py-1.5 px-3",
6033
- children: [/* @__PURE__ */ X(U, {
6135
+ children: [/* @__PURE__ */ X(W, {
6034
6136
  display: "flex",
6035
6137
  height: "5",
6036
6138
  alignItems: "center",
6037
6139
  children: /* @__PURE__ */ X(r, { className: i("h-3.5 rounded", e) })
6038
- }), /* @__PURE__ */ X(U, {
6140
+ }), /* @__PURE__ */ X(W, {
6039
6141
  display: "flex",
6040
6142
  height: "4",
6041
6143
  alignItems: "center",
@@ -6045,45 +6147,45 @@ function yl({ width: e }) {
6045
6147
  }
6046
6148
  //#endregion
6047
6149
  //#region src/addons/ai/F0AiChatHistory/components/skeletonRowWidths.ts
6048
- var bl = [
6150
+ var El = [
6049
6151
  "w-3/5",
6050
6152
  "w-4/5",
6051
6153
  "w-2/5",
6052
6154
  "w-3/4",
6053
6155
  "w-1/2",
6054
6156
  "w-2/3"
6055
- ], xl = Array.from({ length: 12 }, (e, t) => bl[t % bl.length]);
6056
- function Sl() {
6157
+ ], Dl = Array.from({ length: 12 }, (e, t) => El[t % El.length]);
6158
+ function Ol() {
6057
6159
  return /* @__PURE__ */ Z("div", {
6058
6160
  "aria-hidden": "true",
6059
- children: [/* @__PURE__ */ X(U, {
6161
+ children: [/* @__PURE__ */ X(W, {
6060
6162
  display: "flex",
6061
6163
  height: "6",
6062
6164
  alignItems: "center",
6063
6165
  paddingX: "md",
6064
6166
  children: /* @__PURE__ */ X(r, { className: "h-3 w-12 rounded" })
6065
- }), /* @__PURE__ */ X(U, {
6167
+ }), /* @__PURE__ */ X(W, {
6066
6168
  display: "flex",
6067
6169
  flexDirection: "column",
6068
6170
  gap: "xs",
6069
- children: xl.map((e, t) => /* @__PURE__ */ X(yl, { width: e }, t))
6171
+ children: Dl.map((e, t) => /* @__PURE__ */ X(Tl, { width: e }, t))
6070
6172
  })]
6071
6173
  });
6072
6174
  }
6073
6175
  //#endregion
6074
6176
  //#region src/addons/ai/F0AiChatHistory/components/HistoryRow.tsx
6075
- function Cl({ icon: e, label: t, onClick: n }) {
6177
+ function kl({ icon: e, label: t, onClick: n }) {
6076
6178
  return /* @__PURE__ */ X(o, {
6077
6179
  variant: "ghost",
6078
6180
  size: "md",
6079
6181
  className: "[&>div>span>span]:w-full",
6080
6182
  onClick: n,
6081
- children: /* @__PURE__ */ Z(U, {
6183
+ children: /* @__PURE__ */ Z(W, {
6082
6184
  display: "flex",
6083
6185
  width: "full",
6084
6186
  alignItems: "center",
6085
6187
  gap: "md",
6086
- children: [/* @__PURE__ */ X(H, {
6188
+ children: [/* @__PURE__ */ X(U, {
6087
6189
  icon: e,
6088
6190
  color: "default",
6089
6191
  size: "md"
@@ -6097,13 +6199,13 @@ function Cl({ icon: e, label: t, onClick: n }) {
6097
6199
  }
6098
6200
  //#endregion
6099
6201
  //#region src/addons/ai/F0AiChatHistory/components/SearchRow.tsx
6100
- function wl({ value: e, onChange: n }) {
6202
+ function Al({ value: e, onChange: n }) {
6101
6203
  let r = t();
6102
6204
  return /* @__PURE__ */ Z("div", {
6103
6205
  className: "flex h-12 shrink-0 items-center gap-2 border-0 border-b border-solid border-f1-border-secondary pl-5 pr-2",
6104
6206
  children: [
6105
- /* @__PURE__ */ X(H, {
6106
- icon: Qt,
6207
+ /* @__PURE__ */ X(U, {
6208
+ icon: Zt,
6107
6209
  color: "secondary",
6108
6210
  size: "md"
6109
6211
  }),
@@ -6128,9 +6230,9 @@ function wl({ value: e, onChange: n }) {
6128
6230
  }
6129
6231
  //#endregion
6130
6232
  //#region src/addons/ai/F0AiChatHistory/useMoreBelow.ts
6131
- var Tl = () => {
6132
- let [e, t] = J(null), [n, r] = J(null), [i, a] = J(!1);
6133
- return Kn(function() {
6233
+ var jl = () => {
6234
+ let [e, t] = Y(null), [n, r] = Y(null), [i, a] = Y(!1);
6235
+ return Gn(function() {
6134
6236
  if (!e || !n) return;
6135
6237
  let t = () => a(e.scrollTop + e.clientHeight < e.scrollHeight - 1);
6136
6238
  t(), e.addEventListener("scroll", t, { passive: !0 });
@@ -6146,8 +6248,8 @@ var Tl = () => {
6146
6248
  };
6147
6249
  //#endregion
6148
6250
  //#region src/addons/ai/F0AiChatHistory/F0AiChatHistory.tsx
6149
- function El({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads: o, activeThreadId: s, isLoading: c, error: l, pinnedIds: u, onPinThread: d, onUnpinThread: f, onDeleteThread: p, threadActions: m }) {
6150
- let h = t(), [g, _] = J(""), { setList: v, setRows: y, moreBelow: b } = Tl(), x = K(() => ({
6251
+ function Ml({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads: o, activeThreadId: s, isLoading: c, error: l, pinnedIds: u, onPinThread: d, onUnpinThread: f, onDeleteThread: p, threadActions: m }) {
6252
+ let h = t(), [g, _] = Y(""), { setList: v, setRows: y, moreBelow: b } = jl(), x = q(() => ({
6151
6253
  today: h.ai.today,
6152
6254
  yesterday: h.ai.yesterday,
6153
6255
  thisMonth: h.ai.thisMonth,
@@ -6157,17 +6259,17 @@ function El({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads:
6157
6259
  h.ai.yesterday,
6158
6260
  h.ai.thisMonth,
6159
6261
  h.ai.older
6160
- ]), S = K(() => {
6262
+ ]), S = q(() => {
6161
6263
  if (!g.trim()) return o;
6162
6264
  let e = g.toLowerCase();
6163
6265
  return o.filter((t) => t.title.toLowerCase().includes(e));
6164
- }, [o, g]), C = K(() => S.filter((e) => u.has(e.id)), [S, u]), w = K(() => S.filter((e) => !u.has(e.id)), [S, u]), T = K(() => gl(w), [w]), E = W((t, r) => {
6266
+ }, [o, g]), C = q(() => S.filter((e) => u.has(e.id)), [S, u]), w = q(() => S.filter((e) => !u.has(e.id)), [S, u]), T = q(() => yl(w), [w]), E = G((t, r) => {
6165
6267
  n(t, r), e();
6166
- }, [n, e]), D = W((e) => {
6268
+ }, [n, e]), D = G((e) => {
6167
6269
  p(e);
6168
6270
  }, [p]), O = C.length > 0 || T.length > 0;
6169
- return /* @__PURE__ */ Z(Y, { children: [
6170
- /* @__PURE__ */ X(wl, {
6271
+ return /* @__PURE__ */ Z(Kn, { children: [
6272
+ /* @__PURE__ */ X(Al, {
6171
6273
  value: g,
6172
6274
  onChange: _
6173
6275
  }),
@@ -6178,14 +6280,14 @@ function El({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads:
6178
6280
  ref: y,
6179
6281
  className: "flex flex-col gap-2",
6180
6282
  children: [
6181
- r ? /* @__PURE__ */ X(Cl, {
6182
- icon: yt,
6283
+ r ? /* @__PURE__ */ X(kl, {
6284
+ icon: vt,
6183
6285
  label: h.ai.startNewChat,
6184
6286
  onClick: () => {
6185
6287
  r(), e();
6186
6288
  }
6187
6289
  }) : null,
6188
- c ? /* @__PURE__ */ X(Sl, {}) : null,
6290
+ c ? /* @__PURE__ */ X(Ol, {}) : null,
6189
6291
  !c && l ? /* @__PURE__ */ X("p", {
6190
6292
  className: "py-8 text-center text-base text-f1-foreground-secondary",
6191
6293
  children: l
@@ -6194,7 +6296,7 @@ function El({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads:
6194
6296
  className: "py-8 text-center text-base text-f1-foreground-secondary",
6195
6297
  children: g.trim() ? h.ai.noMatchingChats : h.ai.noPreviousChats
6196
6298
  }) : null,
6197
- !c && !l && C.length > 0 ? /* @__PURE__ */ X(vl, {
6299
+ !c && !l && C.length > 0 ? /* @__PURE__ */ X(wl, {
6198
6300
  label: h.ai.pinnedChats,
6199
6301
  threads: C,
6200
6302
  pinnedIds: u,
@@ -6205,7 +6307,7 @@ function El({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads:
6205
6307
  onDelete: D,
6206
6308
  threadActions: m
6207
6309
  }) : null,
6208
- !c && !l ? T.map((e) => /* @__PURE__ */ X(vl, {
6310
+ !c && !l ? T.map((e) => /* @__PURE__ */ X(wl, {
6209
6311
  label: x[e.key],
6210
6312
  threads: e.threads,
6211
6313
  pinnedIds: u,
@@ -6221,7 +6323,7 @@ function El({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads:
6221
6323
  }),
6222
6324
  a && a.length > 0 ? /* @__PURE__ */ X("div", {
6223
6325
  className: "flex flex-shrink-0 flex-col gap-1 border-0 border-t border-solid border-f1-border-secondary p-2",
6224
- children: a.map((t) => /* @__PURE__ */ X(Cl, {
6326
+ children: a.map((t) => /* @__PURE__ */ X(kl, {
6225
6327
  icon: t.icon,
6226
6328
  label: t.label,
6227
6329
  onClick: () => {
@@ -6233,7 +6335,7 @@ function El({ onClose: e, onSelectThread: n, onNewChat: r, actions: a, threads:
6233
6335
  }
6234
6336
  //#endregion
6235
6337
  //#region src/addons/ai/F0AiChatHistory/components/SkeletonRow.tsx
6236
- function Dl({ width: e }) {
6338
+ function Nl({ width: e }) {
6237
6339
  return /* @__PURE__ */ X("div", {
6238
6340
  className: "flex items-center py-1.5 pl-1.5 pr-2",
6239
6341
  children: /* @__PURE__ */ X(r, { className: i("h-4 rounded", e) })
@@ -6241,44 +6343,48 @@ function Dl({ width: e }) {
6241
6343
  }
6242
6344
  //#endregion
6243
6345
  //#region src/addons/ai/F0AiChatHistory/components/SkeletonGroup.tsx
6244
- function Ol({ titleWidth: e, rows: t }) {
6245
- return /* @__PURE__ */ Z(U, {
6346
+ function Pl({ titleWidth: e, rows: t }) {
6347
+ return /* @__PURE__ */ Z(W, {
6246
6348
  display: "flex",
6247
6349
  flexDirection: "column",
6248
6350
  gap: "xs",
6249
6351
  children: [/* @__PURE__ */ X("div", {
6250
6352
  className: "flex items-center p-1.5",
6251
6353
  children: /* @__PURE__ */ X(r, { className: i("h-3 rounded", e) })
6252
- }), t.map((e, t) => /* @__PURE__ */ X(Dl, { width: e }, t))]
6354
+ }), t.map((e, t) => /* @__PURE__ */ X(Nl, { width: e }, t))]
6253
6355
  });
6254
6356
  }
6255
6357
  //#endregion
6256
6358
  //#region src/addons/ai/F0AiChatHistory/components/ThreadListSkeleton.tsx
6257
- function kl() {
6359
+ function Fl() {
6258
6360
  return /* @__PURE__ */ Z("div", {
6259
6361
  "aria-hidden": "true",
6260
6362
  className: "flex flex-col gap-4",
6261
- children: [/* @__PURE__ */ X(Ol, {
6363
+ children: [/* @__PURE__ */ X(Pl, {
6262
6364
  titleWidth: "w-12",
6263
- rows: bl.slice(0, 2)
6264
- }), /* @__PURE__ */ X(Ol, {
6365
+ rows: El.slice(0, 2)
6366
+ }), /* @__PURE__ */ X(Pl, {
6265
6367
  titleWidth: "w-24",
6266
- rows: bl
6368
+ rows: El
6267
6369
  })]
6268
6370
  });
6269
6371
  }
6270
6372
  //#endregion
6271
6373
  //#region src/addons/ai/F0AiChatHistory/useChatHistory.ts
6272
- var Al = "f0-ai-pinned-threads";
6273
- function jl() {
6274
- let e = Oe(Al, []);
6374
+ var Il = [
6375
+ "running",
6376
+ "unread",
6377
+ "attention"
6378
+ ], Ll = "f0-ai-pinned-threads";
6379
+ function Rl() {
6380
+ let e = Oe(Ll, []);
6275
6381
  return new Set(Array.isArray(e) ? e : []);
6276
6382
  }
6277
- function Ml(e) {
6278
- Ne(Al, [...e]);
6383
+ function zl(e) {
6384
+ Me(Ll, [...e]);
6279
6385
  }
6280
- function Nl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, unpinThread: i }) {
6281
- let [a, o] = J([]), [s, c] = J(!1), [l, u] = J(null), [d, f] = J(jl), [p, m] = J(() => /* @__PURE__ */ new Set()), h = W(async () => {
6386
+ function Bl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, unpinThread: i }) {
6387
+ let [a, o] = Y([]), [s, c] = Y(!1), [l, u] = Y(null), [d, f] = Y(Rl), [p, m] = Y(() => /* @__PURE__ */ new Set()), h = G(async () => {
6282
6388
  c(!0), u(null);
6283
6389
  try {
6284
6390
  let e = await t();
@@ -6290,22 +6396,22 @@ function Nl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
6290
6396
  c(!1);
6291
6397
  }
6292
6398
  }, [t]);
6293
- G(() => {
6399
+ K(() => {
6294
6400
  e && h();
6295
6401
  }, [e, h]);
6296
- let g = W((e, t) => {
6402
+ let g = G((e, t) => {
6297
6403
  f((n) => {
6298
6404
  if (t === n.has(e)) return n;
6299
6405
  let r = new Set(n);
6300
- return t ? r.add(e) : r.delete(e), Ml(r), r;
6406
+ return t ? r.add(e) : r.delete(e), zl(r), r;
6301
6407
  });
6302
- }, []), _ = W((e, t) => {
6408
+ }, []), _ = G((e, t) => {
6303
6409
  m((n) => {
6304
6410
  if (t === n.has(e)) return n;
6305
6411
  let r = new Set(n);
6306
6412
  return t ? r.add(e) : r.delete(e), r;
6307
6413
  });
6308
- }, []), v = W((e, t) => {
6414
+ }, []), v = G((e, t) => {
6309
6415
  let n = t ? r : i;
6310
6416
  g(e, t), n && (_(e, !0), n(e).catch(() => g(e, !t)).finally(() => _(e, !1)));
6311
6417
  }, [
@@ -6321,15 +6427,15 @@ function Nl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
6321
6427
  refetch: h,
6322
6428
  pinnedIds: d,
6323
6429
  pendingIds: p,
6324
- pinThread: W((e) => v(e, !0), [v]),
6325
- unpinThread: W((e) => v(e, !1), [v]),
6326
- deleteThread: W(async (e) => {
6430
+ pinThread: G((e) => v(e, !0), [v]),
6431
+ unpinThread: G((e) => v(e, !1), [v]),
6432
+ deleteThread: G(async (e) => {
6327
6433
  _(e, !0);
6328
6434
  try {
6329
6435
  await n(e), o((t) => t.filter((t) => t.id !== e)), f((t) => {
6330
6436
  if (!t.has(e)) return t;
6331
6437
  let n = new Set(t);
6332
- return n.delete(e), Ml(n), n;
6438
+ return n.delete(e), zl(n), n;
6333
6439
  });
6334
6440
  } catch {
6335
6441
  h();
@@ -6344,12 +6450,12 @@ function Nl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
6344
6450
  };
6345
6451
  }
6346
6452
  //#endregion
6347
- //#region src/addons/ai/F0AiChatUsageLimits/types.ts
6348
- var Pl = ["top", "bottom"], Fl = s.create(oe), Il = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ Z("div", {
6453
+ //#region src/addons/ai/F0AiChatHeader/types.ts
6454
+ var Vl = ["attention"], Hl = ["top", "bottom"], Ul = s.create(oe), Wl = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ Z("div", {
6349
6455
  role: "status",
6350
6456
  "aria-live": "polite",
6351
6457
  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",
6352
- children: [/* @__PURE__ */ X(Fl, {
6458
+ children: [/* @__PURE__ */ X(Ul, {
6353
6459
  size: "xs",
6354
6460
  animate: t ? void 0 : {
6355
6461
  rotate: [0, 360],
@@ -6398,9 +6504,9 @@ var Pl = ["top", "bottom"], Fl = s.create(oe), Il = ({ label: e, reduceMotion: t
6398
6504
  className: "font-medium",
6399
6505
  children: e
6400
6506
  })]
6401
- }), Ll = Vn(function({ active: e, label: n, className: r, children: a }) {
6507
+ }), Gl = Bn(function({ active: e, label: n, className: r, children: a }) {
6402
6508
  let { t: o } = t(), c = p(), l = n ?? o("ai.applyingChanges");
6403
- return G(() => {
6509
+ return K(() => {
6404
6510
  if (!e) return;
6405
6511
  let t = document.activeElement;
6406
6512
  t && t.getAttribute("name") !== "one-ai-input" && t.blur();
@@ -6422,7 +6528,7 @@ var Pl = ["top", "bottom"], Fl = s.create(oe), Il = ({ label: e, reduceMotion: t
6422
6528
  },
6423
6529
  children: /* @__PURE__ */ X("div", {
6424
6530
  className: "mt-[40vh]",
6425
- children: /* @__PURE__ */ X(Il, {
6531
+ children: /* @__PURE__ */ X(Wl, {
6426
6532
  label: l,
6427
6533
  reduceMotion: c
6428
6534
  })
@@ -6437,4 +6543,4 @@ var Pl = ["top", "bottom"], Fl = s.create(oe), Il = ({ label: e, reduceMotion: t
6437
6543
  });
6438
6544
  });
6439
6545
  //#endregion
6440
- export { Zi as A, Xn as B, yo as C, Na as D, Ma as E, xr as F, br as I, _r as L, ea as M, zi as N, ka as O, kr as P, tr as R, ss as S, ja as T, ks as _, El as a, ds as b, fl as c, Qc as d, Kc as f, Rs as g, Dc as h, kl as i, $i as j, ta as k, il as l, Oc as m, Pl as n, vl as o, Gc as p, Nl as r, _l as s, Ll as t, nl as u, ps as v, uo as w, cs as x, us as y, Zn as z };
6546
+ export { ka as A, tr as B, cs as C, ja as D, uo as E, zi as F, Xn as H, kr as I, xr as L, Zi as M, $i as N, Ma as O, ea as P, br as R, ds as S, yo as T, Zn as V, Dc as _, Bl as a, ps as b, wl as c, il as d, nl as f, Oc as g, Gc as h, Il as i, ta as j, Na as k, Cl as l, Kc as m, Hl as n, Fl as o, Qc as p, Vl as r, Ml as s, Gl as t, hl as u, Rs as v, ss as w, us as x, ks as y, _r as z };