@factorialco/f0-react 12.12.0 → 12.13.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 (38) hide show
  1. package/dist/{ArchiveThumbnail-b34U-zTc.js → ArchiveThumbnail-BZgITTo2.js} +4 -4
  2. package/dist/{ArchiveViewer-BpmryW7A.js → ArchiveViewer-BHu224N3.js} +2 -2
  3. package/dist/{ChatPostComposerDialog-Cr207fXs.js → ChatPostComposerDialog-CsxxDqxh.js} +2 -2
  4. package/dist/{CoachmarkProvider-CsytVD-X.js → CoachmarkProvider-9PVhiN-N.js} +17650 -17650
  5. package/dist/{CodeThumbnail-8NiQ3uzU.js → CodeThumbnail-ChpXV1S-.js} +1 -1
  6. package/dist/{CodeViewer-BNZqt-5s.js → CodeViewer-BKw04W0G.js} +5 -5
  7. package/dist/{DocumentToolbar-DUe9R1rU.js → DocumentToolbar-mB3bK8uS.js} +1 -1
  8. package/dist/{DocxViewer-BUMy2iL7.js → DocxViewer-Dr8WXU1s.js} +1 -1
  9. package/dist/{F0AiProcessingOverlay-CiUTeBwG.js → F0AiProcessingOverlay-BUynKfyI.js} +542 -542
  10. package/dist/{F0Alert-Ca8sBfXN.js → F0Alert-ALRcL0Af.js} +10 -10
  11. package/dist/F0AudioPlayer-Cd9nIQX5.js +2 -0
  12. package/dist/{F0AudioPlayer-BefDLQA2.js → F0AudioPlayer-vRJmmSpp.js} +423 -331
  13. package/dist/{F0CanvasPanel-BOo_mxBl.js → F0CanvasPanel-D1QmpvzX.js} +799 -780
  14. package/dist/{F0DocumentViewer-CaYAO9ok.js → F0DocumentViewer-CEuF9b_u.js} +1 -1
  15. package/dist/{F0DocumentViewer-h0XY5tgT.js → F0DocumentViewer-ChCqzIK3.js} +2 -2
  16. package/dist/{F0Map-b1uYlF_H.js → F0Map-CWhV5A03.js} +10 -10
  17. package/dist/F0VideoPlayer-DUw-DouS.js +1 -0
  18. package/dist/{F0VideoPlayer-D85XCpqh.js → F0VideoPlayer-wTc25_qN.js} +62 -62
  19. package/dist/{HtmlViewer-DxOnMV30.js → HtmlViewer-Uxb8n2vn.js} +3 -3
  20. package/dist/{Map-BOMgctnS.js → Map-95w5slTZ.js} +9 -9
  21. package/dist/{PdfThumbnail-98PDy4ud.js → PdfThumbnail-BYrhsyMw.js} +1 -1
  22. package/dist/{PdfViewer-nBnKrTYD.js → PdfViewer-DUxhQr-O.js} +5 -5
  23. package/dist/{SheetViewer-CD9SHbXJ.js → SheetViewer-C9Rbh_xJ.js} +12 -12
  24. package/dist/{TextViewer-DxRBCXzV.js → TextViewer-DP9lYxAB.js} +1 -1
  25. package/dist/ai.js +3 -3
  26. package/dist/component-status.js +1 -1
  27. package/dist/experimental.d.ts +14 -2
  28. package/dist/experimental.js +4984 -4897
  29. package/dist/f0.d.ts +6 -127
  30. package/dist/f0.js +171 -172
  31. package/dist/{highlight-CqFL-_MG.js → highlight-Bjt-wXg6.js} +7 -7
  32. package/dist/{maplibre-Ip4Qe9dM.js → maplibre-tJ3UolSF.js} +1 -1
  33. package/dist/{pdfWorker-DMjHHAyP.js → pdfWorker-BBnYtb1A.js} +1 -1
  34. package/dist/{types-geibVrTM.d.ts → types-oJKIDe-E.d.ts} +122 -1
  35. package/package.json +1 -1
  36. package/dist/F0AudioPlayer-CNb4kXOk.js +0 -3
  37. package/dist/F0SegmentedControl-DXoAzTmH.js +0 -103
  38. package/dist/F0VideoPlayer-_zLFiEIp.js +0 -1
@@ -2,21 +2,21 @@ import { a as e, r as t } from "./i18n-provider-Bdgo-LeP.js";
2
2
  import { n, t as r } from "./skeleton-AC0Fb8zj.js";
3
3
  import { L as i, R as a } from "./tooltip-BX4dSfeL.js";
4
4
  import { R as o, T as s, U as c, h as l, n as u, r as d, t as f, wt as p, y as m } from "./F0Button-d91IgOnc.js";
5
- import { $ as h, $a as g, $o as _, A as v, As as y, At as b, B as x, Br as S, Co as C, Ct as w, D as T, Eo as E, Et as D, F as O, Ha as k, Ht as A, Is as j, Jr as M, Ka as N, Ko as P, Ls as F, Lt as I, Ms as L, Mt as ee, O as te, P as R, Po as ne, Pt as z, Q as re, Qn as B, Qr as ie, R as V, St as ae, To as oe, Tt as se, Vi as ce, Vo as le, Wo as ue, Xr as de, Yr as fe, _ as pe, _o as me, _r as he, _t as ge, a as _e, ao as ve, ba as ye, c as be, cr as xe, ct as Se, dt as Ce, ei as we, ft as Te, g as Ee, ga as De, h as Oe, ha as ke, i as Ae, io as je, ir as Me, is as Ne, it as Pe, j as Fe, ja as Ie, k as Le, l as Re, lt as ze, mc as Be, ni as Ve, nt as He, oo as Ue, pc as We, pt as Ge, qr as Ke, r as qe, ro as Je, tt as Ye, u as Xe, v as Ze, vr as Qe, wt as $e, xo as et, y as tt, z as nt } from "./F0CanvasPanel-BOo_mxBl.js";
6
- import { o as rt, t as H } from "./F0Icon-DmCBV0gK.js";
7
- import { t as it } from "./i18n-provider-defaults-B9vdZZeS.js";
8
- import { C as at, H as ot, I as st, N as ct, U as lt, b as ut, g as dt, h as ft, k as pt, l as mt, m as ht } from "./useData-BYkiGUHX.js";
9
- import { $t as gt, Er as _t, Mt as vt, Sr as yt, Tn as bt, Tt as xt, _t as St, an as Ct, br as wt, ct as Tt, gt as Et, ht as Dt, in as Ot, sn as kt, wn as At, wr as jt, xr as Mt } from "./F0Select-BZ20yXKy.js";
10
- import { t as Nt } from "./ExternalLink-RdKU698E.js";
11
- import { a as Pt, gt as Ft, i as It, n as Lt, t as Rt } from "./popover-ics24JxK.js";
12
- import { a as zt } from "./dist-Cuwaibqg.js";
13
- import { createContext as Bt, createElement as Vt, forwardRef as U, memo as Ht, useCallback as W, useContext as Ut, useEffect as G, useId as Wt, useInsertionEffect as Gt, useLayoutEffect as Kt, useMemo as K, useRef as q, useState as J } from "react";
14
- import { Fragment as qt, jsx as Y, jsxs as X } from "react/jsx-runtime";
5
+ import { $a as h, $o as g, A as _, Ao as v, B as y, Ca as b, D as x, Da as S, Dt as C, H as w, I as T, Ji as E, Jo as D, Ls as O, Lt as k, Mo as A, Mt as j, No as M, Nt as N, O as P, Oo as F, P as I, Ra as ee, Sa as te, Sc as ne, St as L, Tr as re, Tt as R, Us as z, V as ie, Vo as ae, Vt as oe, Ws as se, Wt as ce, Ya as le, Yt as ue, Zo as de, _ as fe, _t as pe, a as me, ai as he, ar as ge, bt as _e, c as ve, do as ye, dr as be, ds as xe, dt as Se, ei as Ce, et as we, fo as Te, g as Ee, gt as De, h as Oe, hr as ke, i as Ae, it as je, j as Me, jt as Ne, k as Pe, kt as Fe, l as Ie, li as Le, ni as Re, oo as ze, os as Be, po as Ve, qr as He, r as Ue, ri as We, rt as Ge, si as Ke, ti as qe, tt as Je, u as Ye, uo as Xe, v as Ze, wo as Qe, wr as $e, xc as et, xt as tt, y as nt, zs as B, zt as rt } from "./F0CanvasPanel-D1QmpvzX.js";
6
+ import { o as it, t as V } from "./F0Icon-DmCBV0gK.js";
7
+ import { t as at } from "./i18n-provider-defaults-B9vdZZeS.js";
8
+ import { C as ot, H as st, I as ct, N as lt, U as ut, b as dt, g as ft, h as pt, k as mt, l as ht, m as gt } from "./useData-BYkiGUHX.js";
9
+ import { $t as _t, Er as vt, Mt as yt, Sr as bt, Tn as xt, Tt as St, _t as Ct, an as wt, br as Tt, ct as Et, gt as Dt, ht as Ot, in as kt, sn as At, wn as jt, wr as Mt, xr as Nt } from "./F0Select-BZ20yXKy.js";
10
+ import { t as Pt } from "./ExternalLink-RdKU698E.js";
11
+ import { a as Ft, gt as It, i as Lt, n as Rt, t as zt } from "./popover-ics24JxK.js";
12
+ import { a as Bt } from "./dist-Cuwaibqg.js";
13
+ import { createContext as Vt, createElement as Ht, forwardRef as H, memo as Ut, useCallback as U, useContext as Wt, useEffect as W, useId as Gt, useInsertionEffect as Kt, useLayoutEffect as qt, useMemo as G, useRef as K, useState as q } from "react";
14
+ import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
15
15
  import { createPortal as Jt } from "react-dom";
16
16
  import { useTrackVolume as Yt } from "@livekit/components-react";
17
17
  //#region ../../node_modules/.pnpm/motion@12.17.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/motion/dist/es/framer-motion/dist/es/utils/use-motion-value-event.mjs
18
18
  function Xt(e, t, n) {
19
- Gt(() => e.on(t, n), [
19
+ Kt(() => e.on(t, n), [
20
20
  e,
21
21
  t,
22
22
  n
@@ -35,16 +35,16 @@ var Zt = [
35
35
  "sm",
36
36
  "md",
37
37
  "lg"
38
- ], $t = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), en = /[\\`*_{}[\]()#+\-.!|~>]/g, tn = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(en, "\\$&"), nn = (e) => `<entity-ref type="${$t(e.type)}" id="${$t(e.id)}">${$t(e.label)}</entity-ref>`, rn = (e, t) => e.slice(t.start, x(t)).normalize("NFC") === `@${t.label}`.normalize("NFC");
38
+ ], $t = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), en = /[\\`*_{}[\]()#+\-.!|~>]/g, tn = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(en, "\\$&"), nn = (e) => `<entity-ref type="${$t(e.type)}" id="${$t(e.id)}">${$t(e.label)}</entity-ref>`, rn = (e, t) => e.slice(t.start, w(t)).normalize("NFC") === `@${t.label}`.normalize("NFC");
39
39
  function an(e, t) {
40
40
  let n = e.length - e.trimStart().length, r = e.trimEnd().length, i = t.filter((t) => t.start >= n && rn(e, t)).sort((e, t) => e.start - t.start), a = "", o = n;
41
- for (let t of i) t.start < o || x(t) > r || (a += tn(e.slice(o, t.start)) + nn(t), o = x(t));
41
+ for (let t of i) t.start < o || w(t) > r || (a += tn(e.slice(o, t.start)) + nn(t), o = w(t));
42
42
  return a + tn(e.slice(o, r));
43
43
  }
44
44
  //#endregion
45
45
  //#region src/addons/ai/ai/F0AiChat/hooks/useRevealOnChange.ts
46
46
  function on(e, t, n = .2) {
47
- let r = l(), [i, a] = J(!0), o = q(e);
47
+ let r = l(), [i, a] = q(!0), o = K(e);
48
48
  return m(() => {
49
49
  if (o.current === e) return;
50
50
  let n = o.current;
@@ -139,13 +139,13 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
139
139
  children: [/* @__PURE__ */ Y("div", { className: "h-5 w-28 animate-pulse rounded bg-f1-background-secondary" }), /* @__PURE__ */ Y("div", { className: "h-5 w-16 animate-pulse rounded bg-f1-background-secondary" })]
140
140
  }), /* @__PURE__ */ Y("div", { className: "h-2 w-full animate-pulse rounded-full bg-f1-background-secondary" })]
141
141
  }), pn = ({ usage: e, error: n = !1, onOpenChange: r, trigger: o, side: s = "top" }) => {
142
- let c = t(), [l, u] = J(!1), d = q(null), f = W((e) => {
142
+ let c = t(), [l, u] = q(!1), d = K(null), f = U((e) => {
143
143
  u(e), r?.(e);
144
144
  }, [r]), p = e ? dn(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;
145
- return /* @__PURE__ */ X(Rt, {
145
+ return /* @__PURE__ */ X(zt, {
146
146
  open: l,
147
147
  onOpenChange: f,
148
- children: [/* @__PURE__ */ Y(Pt, {
148
+ children: [/* @__PURE__ */ Y(Ft, {
149
149
  asChild: !0,
150
150
  children: o ?? /* @__PURE__ */ X("button", {
151
151
  type: "button",
@@ -160,7 +160,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
160
160
  children: b
161
161
  })]
162
162
  })
163
- }), /* @__PURE__ */ X(It, {
163
+ }), /* @__PURE__ */ X(Lt, {
164
164
  ref: d,
165
165
  side: s,
166
166
  align: "end",
@@ -191,8 +191,8 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
191
191
  children: [/* @__PURE__ */ Y("span", {
192
192
  className: "min-w-0 flex-1 truncate",
193
193
  children: c.t("ai.usageLimits.yourCompany")
194
- }), /* @__PURE__ */ Y(H, {
195
- icon: Mt,
194
+ }), /* @__PURE__ */ Y(V, {
195
+ icon: Nt,
196
196
  size: "md",
197
197
  color: "default"
198
198
  })]
@@ -209,16 +209,16 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
209
209
  })]
210
210
  });
211
211
  }, mn = (e) => {
212
- let { provided: t } = He();
213
- return t ? /* @__PURE__ */ Y(hn, { ...e }) : /* @__PURE__ */ Y(Ye, { children: /* @__PURE__ */ Y(hn, { ...e }) });
212
+ let { provided: t } = je();
213
+ return t ? /* @__PURE__ */ Y(hn, { ...e }) : /* @__PURE__ */ Y(Ge, { children: /* @__PURE__ */ Y(hn, { ...e }) });
214
214
  }, hn = ({ attachedFiles: e, isUploading: n, onRemove: r, removeLabel: i, reducedMotion: a }) => {
215
215
  let o = t(), s = gn(e), c = e.flatMap((e) => {
216
216
  let t = s.get(e.id);
217
217
  if (!t) return [];
218
- let n = e.file.name, a = e.file.type || Se({
218
+ let n = e.file.name, a = e.file.type || De({
219
219
  name: n,
220
220
  url: t
221
- }), o = ze({
221
+ }), o = pe({
222
222
  name: n,
223
223
  url: t,
224
224
  mimeType: a
@@ -236,7 +236,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
236
236
  };
237
237
  return [{
238
238
  id: e.id,
239
- content: /* @__PURE__ */ Y(Le, {
239
+ content: /* @__PURE__ */ Y(Pe, {
240
240
  attachment: o,
241
241
  status: e.status === "uploaded" ? "ready" : e.status === "error" ? "error" : "uploading",
242
242
  errorMessage: e.errorMessage,
@@ -246,7 +246,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
246
246
  })
247
247
  }];
248
248
  });
249
- return /* @__PURE__ */ Y(te, {
249
+ return /* @__PURE__ */ Y(P, {
250
250
  items: c,
251
251
  label: o.t(e.length === 1 ? "chat.attachmentCount.one" : "chat.attachmentCount.other", { count: e.length }),
252
252
  busy: n,
@@ -254,10 +254,10 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
254
254
  testIdPrefix: "ai-chat"
255
255
  });
256
256
  }, gn = (e) => {
257
- let [t, n] = J(() => /* @__PURE__ */ new Map()), r = q(t);
258
- return Kt(() => {
257
+ let [t, n] = q(() => /* @__PURE__ */ new Map()), r = K(t);
258
+ return qt(() => {
259
259
  r.current = t;
260
- }, [t]), G(() => {
260
+ }, [t]), W(() => {
261
261
  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));
262
262
  if (a.length === 0 && o.length === 0) return;
263
263
  let s = new Map(t);
@@ -267,7 +267,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
267
267
  }
268
268
  for (let e of a) s.set(e.id, URL.createObjectURL(e.file));
269
269
  n(s);
270
- }, [e]), G(() => () => {
270
+ }, [e]), W(() => () => {
271
271
  for (let e of r.current.values()) URL.revokeObjectURL(e);
272
272
  r.current = /* @__PURE__ */ new Map();
273
273
  }, []), t;
@@ -291,18 +291,18 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
291
291
  let { id: t, type: n, ...r } = e;
292
292
  return r;
293
293
  }), vn = ({ actions: e, showAttachEntry: n, onAttachClick: r, attachDisabled: i, attachDisabledTooltip: a, disabled: o, onOpenChange: s }) => {
294
- let c = t(), [l, d] = J(!1), f = (e) => {
294
+ let c = t(), [l, d] = q(!1), f = (e) => {
295
295
  d(e), s?.(e);
296
296
  }, p = [...n ? [{
297
297
  label: c.ai.addFilesOrPhotos,
298
- icon: ne,
298
+ icon: ae,
299
299
  onClick: r,
300
300
  disabled: i,
301
301
  disabledTooltip: a
302
302
  }, ...e.length > 0 ? [{ type: "separator" }] : []] : [], ..._n(e)];
303
303
  return /* @__PURE__ */ Y("div", {
304
304
  onClick: (e) => e.stopPropagation(),
305
- children: /* @__PURE__ */ Y(ye, {
305
+ children: /* @__PURE__ */ Y(S, {
306
306
  items: p,
307
307
  align: "start",
308
308
  disabled: o,
@@ -313,7 +313,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
313
313
  label: c.ai.addToConversation,
314
314
  hideLabel: !0,
315
315
  type: "button",
316
- icon: lt,
316
+ icon: ut,
317
317
  variant: "outline",
318
318
  size: "md",
319
319
  pressed: l,
@@ -323,7 +323,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
323
323
  });
324
324
  }, yn = ({ onUploadFiles: e, composerActions: n, isAtMaxFiles: r, maxFiles: i, acceptValue: a, fileInputRef: o, handleFileSelect: s, recordingStatus: c, onComposerActionsOpenChange: l }) => {
325
325
  let d = t(), f = c === "transcribing", p = () => o.current?.click(), m = n?.length ? n : null;
326
- return !e && !m ? null : /* @__PURE__ */ X(qt, { children: [m ? /* @__PURE__ */ Y(vn, {
326
+ return !e && !m ? null : /* @__PURE__ */ X(J, { children: [m ? /* @__PURE__ */ Y(vn, {
327
327
  actions: m,
328
328
  showAttachEntry: !!e,
329
329
  onAttachClick: p,
@@ -335,7 +335,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
335
335
  label: d.ai.attachFile,
336
336
  hideLabel: !0,
337
337
  type: "button",
338
- icon: ne,
338
+ icon: ae,
339
339
  variant: "outline",
340
340
  size: "md",
341
341
  disabled: r || f,
@@ -383,7 +383,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
383
383
  label: r.ai.creditWarning.dismiss ?? "",
384
384
  size: "sm",
385
385
  variant: "ghost",
386
- icon: F,
386
+ icon: se,
387
387
  hideLabel: !0,
388
388
  onClick: e.onDismiss
389
389
  }) : null]
@@ -402,8 +402,8 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
402
402
  children: [
403
403
  /* @__PURE__ */ Y("div", {
404
404
  className: "flex items-center py-0.5",
405
- children: /* @__PURE__ */ Y(H, {
406
- icon: et,
405
+ children: /* @__PURE__ */ Y(V, {
406
+ icon: F,
407
407
  size: "md",
408
408
  color: "default"
409
409
  })
@@ -418,7 +418,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
418
418
  variant: "ghost",
419
419
  label: r.ai.removeQuote,
420
420
  onClick: n,
421
- icon: F,
421
+ icon: se,
422
422
  hideLabel: !0,
423
423
  size: "sm"
424
424
  })
@@ -427,7 +427,7 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
427
427
  });
428
428
  }, Cn = ({ cards: e }) => e.length === 0 ? null : /* @__PURE__ */ Y("div", {
429
429
  className: "grid w-full grid-cols-2 gap-3",
430
- children: e.slice(0, 4).map((e) => /* @__PURE__ */ Y(T, {
430
+ children: e.slice(0, 4).map((e) => /* @__PURE__ */ Y(x, {
431
431
  avatar: {
432
432
  type: "icon",
433
433
  icon: e.icon
@@ -438,11 +438,11 @@ var sn = 14, cn = 2.31, ln = ({ percentage: e, tone: t }) => {
438
438
  }, e.id))
439
439
  });
440
440
  function wn(e = 24) {
441
- let [t, n] = J(null), [r, i] = J({
441
+ let [t, n] = q(null), [r, i] = q({
442
442
  start: !1,
443
443
  end: !1
444
444
  });
445
- return G(() => {
445
+ return W(() => {
446
446
  if (!t) return;
447
447
  let e = () => {
448
448
  let e = t.scrollWidth > t.clientWidth + 1;
@@ -460,7 +460,7 @@ function wn(e = 24) {
460
460
  };
461
461
  }, [t]), {
462
462
  ref: n,
463
- style: K(() => {
463
+ style: G(() => {
464
464
  if (!r.start && !r.end) return {};
465
465
  let t = `linear-gradient(to right, ${r.start ? `transparent 0, black ${e}px` : "black 0"}, ${r.end ? `black calc(100% - ${e}px), transparent 100%` : "black 100%"})`;
466
466
  return {
@@ -477,15 +477,15 @@ function An(e, t = Tn) {
477
477
  return e.length <= t ? e : [...e].sort(() => .5 - Math.random()).slice(0, t);
478
478
  }
479
479
  var jn = ({ suggestions: e, onItemClick: t, onItemHover: n, side: r = "top", reserveTwoRows: a = !0, overflow: o = "wrap" }) => {
480
- let [s, c] = J(null), l = q(null), d = o === "scroll", f = wn(), p = q(null), m = q(!1), h = Wt(), g = Wt(), _ = s === null ? null : e[s];
481
- return e.length === 0 ? null : /* @__PURE__ */ X(Rt, {
480
+ let [s, c] = q(null), l = K(null), d = o === "scroll", f = wn(), p = K(null), m = K(!1), h = Gt(), g = Gt(), _ = s === null ? null : e[s];
481
+ return e.length === 0 ? null : /* @__PURE__ */ X(zt, {
482
482
  open: _ !== null,
483
483
  onOpenChange: (e) => {
484
484
  e || (c(null), n?.(null));
485
485
  },
486
486
  children: [/* @__PURE__ */ Y("div", {
487
487
  className: i("flex w-full items-end", a && "min-h-[72px]"),
488
- children: /* @__PURE__ */ Y(Lt, {
488
+ children: /* @__PURE__ */ Y(Rt, {
489
489
  asChild: !0,
490
490
  children: /* @__PURE__ */ Y("div", {
491
491
  ref: (e) => {
@@ -509,7 +509,7 @@ var jn = ({ suggestions: e, onItemClick: t, onItemHover: n, side: r = "top", res
509
509
  }, `${e.label}-${t}`))
510
510
  })
511
511
  })
512
- }), _ ? /* @__PURE__ */ X(It, {
512
+ }), _ ? /* @__PURE__ */ X(Lt, {
513
513
  side: r,
514
514
  align: "start",
515
515
  sideOffset: 8,
@@ -530,7 +530,7 @@ var jn = ({ suggestions: e, onItemClick: t, onItemHover: n, side: r = "top", res
530
530
  children: [/* @__PURE__ */ X("div", {
531
531
  id: g,
532
532
  className: "flex items-center gap-1.5 p-2 pb-1 text-sm font-medium text-f1-foreground-secondary",
533
- children: [/* @__PURE__ */ Y(H, {
533
+ children: [/* @__PURE__ */ Y(V, {
534
534
  "aria-hidden": !0,
535
535
  icon: _.icon,
536
536
  size: "sm"
@@ -549,11 +549,11 @@ var jn = ({ suggestions: e, onItemClick: t, onItemHover: n, side: r = "top", res
549
549
  });
550
550
  };
551
551
  function Mn({ item: e, onSelect: t, onHover: n }) {
552
- let r = q(null), o = q(null), s = q(null), c = l(), u = W(() => {
552
+ let r = K(null), o = K(null), s = K(null), c = l(), u = U(() => {
553
553
  s.current != null && (clearTimeout(s.current), s.current = null);
554
554
  let e = o.current, t = r.current;
555
555
  e && (e.style.transition = "none", e.style.transform = "translateX(0)", e.style.overflow = ""), t && (t.style.removeProperty("mask-image"), t.style.removeProperty("-webkit-mask-image"));
556
- }, []), d = W(() => {
556
+ }, []), d = U(() => {
557
557
  c || (s.current = window.setTimeout(() => {
558
558
  let e = o.current, t = r.current;
559
559
  if (!e || !t) return;
@@ -564,16 +564,16 @@ function Mn({ item: e, onSelect: t, onHover: n }) {
564
564
  let s = `linear-gradient(90deg, transparent 0, #000 ${kn}px)`;
565
565
  t.style.setProperty("mask-image", s), t.style.setProperty("-webkit-mask-image", s), e.style.transition = `transform ${a}ms linear`, e.style.transform = `translateX(-${i}px)`;
566
566
  }, Dn));
567
- }, [c]), f = W(() => {
567
+ }, [c]), f = U(() => {
568
568
  n?.(e), d();
569
569
  }, [
570
570
  e,
571
571
  n,
572
572
  d
573
- ]), p = W(() => {
573
+ ]), p = U(() => {
574
574
  n?.(null), u();
575
575
  }, [n, u]);
576
- return G(() => () => {
576
+ return W(() => () => {
577
577
  s.current != null && clearTimeout(s.current);
578
578
  }, []), /* @__PURE__ */ X("button", {
579
579
  type: "button",
@@ -594,8 +594,8 @@ function Mn({ item: e, onSelect: t, onHover: n }) {
594
594
  }), /* @__PURE__ */ Y("span", {
595
595
  "aria-hidden": !0,
596
596
  className: "flex flex-shrink-0 items-center text-f1-foreground-secondary opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",
597
- children: /* @__PURE__ */ Y(H, {
598
- icon: jt,
597
+ children: /* @__PURE__ */ Y(V, {
598
+ icon: Mt,
599
599
  size: "sm"
600
600
  })
601
601
  })]
@@ -623,7 +623,7 @@ function Nn(e, t) {
623
623
  }
624
624
  function Pn({ searchPersons: e, mentionSources: n }) {
625
625
  let { ai: r } = t(), i = r.mentions.people;
626
- return K(() => {
626
+ return G(() => {
627
627
  let t = n ?? [];
628
628
  return !e || t.some((e) => e.type === "person") ? t : [Nn(e, { label: i }), ...t];
629
629
  }, [
@@ -651,21 +651,21 @@ function In(e, t) {
651
651
  //#region src/addons/ai/ai/F0AiChatTextArea/useFileAttachments.ts
652
652
  var Ln = 4e3;
653
653
  function Rn(e) {
654
- 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(() => {
654
+ let [n, r] = q([]), [i, a] = q(null), o = K(null), s = K(null), c = t(), l = e?.onUploadFiles, u = e?.allowedMimeTypes, d = e?.maxFiles, f = G(() => {
655
655
  if (u) return Array.isArray(u) ? u.join(",") : u;
656
- }, [u]), p = d !== void 0 && n.length >= d, m = q(0);
657
- G(() => {
656
+ }, [u]), p = d !== void 0 && n.length >= d, m = K(0);
657
+ W(() => {
658
658
  m.current = n.length;
659
659
  }, [n]);
660
- let h = W((e) => {
660
+ let h = U((e) => {
661
661
  o.current && clearTimeout(o.current), a(e), o.current = setTimeout(() => {
662
662
  a(null), o.current = null;
663
663
  }, Ln);
664
664
  }, []);
665
- G(() => () => {
665
+ W(() => () => {
666
666
  o.current && clearTimeout(o.current);
667
667
  }, []);
668
- let g = W(async (e) => {
668
+ let g = U(async (e) => {
669
669
  if (e.length === 0 || !l) return;
670
670
  let t = In(e, u);
671
671
  if (t.length === 0) return;
@@ -721,10 +721,10 @@ function Rn(e) {
721
721
  isAtMaxFiles: p,
722
722
  maxFiles: d,
723
723
  processFiles: g,
724
- handleFileSelect: W(async (e) => {
724
+ handleFileSelect: U(async (e) => {
725
725
  await g(Array.from(e.target.files ?? [])), e.target.value = "";
726
726
  }, [g]),
727
- handleRemoveFile: W((e) => {
727
+ handleRemoveFile: U((e) => {
728
728
  r((t) => t.filter((t) => t.id !== e));
729
729
  }, []),
730
730
  transientError: i,
@@ -733,46 +733,46 @@ function Rn(e) {
733
733
  }
734
734
  //#endregion
735
735
  //#region src/addons/ai/ai/F0AiChatTextArea/AiChatComposer.tsx
736
- var zn = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: s, creditWarning: u, clarifyingUI: f, pendingContext: m = null, onPendingContextChange: h, pendingQuote: g = null, onPendingQuoteChange: _, fileAttachments: v, toolbarStart: y, composerActions: b, onComposerActionsOpenChange: x, onTranscribe: S, searchPersons: C, mentionSources: w, onProcessFilesRef: T, disclaimer: E, usageLimits: D, footer: O, isWelcomeScreen: k = !1, fullscreen: A = !1, welcomeScreenSuggestions: j, onSuggestionClick: M, welcomeScreenSuggestionsPlacement: N = "above", welcomeScreenSuggestionsCollapsedByDefault: P = !1, welcomeScreenCards: F, padding: I = "default", name: L, ref: te }) => {
737
- let R = t(), ne = l(), z = !!ne, re = q(null), [B, ie] = J(null), [ae, oe] = J(!1), [se, ce] = J({
736
+ var zn = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: s, creditWarning: u, clarifyingUI: f, pendingContext: m = null, onPendingContextChange: h, pendingQuote: g = null, onPendingQuoteChange: _, fileAttachments: v, toolbarStart: b, composerActions: x, onComposerActionsOpenChange: S, onTranscribe: C, searchPersons: w, mentionSources: T, onProcessFilesRef: E, disclaimer: D, usageLimits: O, footer: k, isWelcomeScreen: A = !1, fullscreen: j = !1, welcomeScreenSuggestions: M, onSuggestionClick: N, welcomeScreenSuggestionsPlacement: P = "above", welcomeScreenSuggestionsCollapsedByDefault: F = !1, welcomeScreenCards: I, padding: ee = "default", name: te, ref: ne }) => {
737
+ let L = t(), re = l(), R = !!re, z = K(null), [ae, oe] = q(null), [se, ce] = q(!1), [le, ue] = q({
738
738
  isEmpty: !0,
739
739
  recorder: "idle"
740
- }), le = q(null), ue = q(null);
741
- G(() => () => {
742
- ue.current && clearTimeout(ue.current);
740
+ }), de = K(null), fe = K(null);
741
+ W(() => () => {
742
+ fe.current && clearTimeout(fe.current);
743
743
  }, []);
744
- let de = f != null, fe = q(m), pe = q(g);
745
- Kt(() => {
746
- fe.current = m, pe.current = g;
744
+ let pe = f != null, me = K(m), he = K(g);
745
+ qt(() => {
746
+ me.current = m, he.current = g;
747
747
  });
748
- let { tracking: me, setFocusChatInputFunction: he } = V(), ge = W((e, t) => {
749
- me?.onWelcomeSuggestionClick?.({
748
+ let { tracking: ge, setFocusChatInputFunction: _e } = y(), ve = U((e, t) => {
749
+ ge?.onWelcomeSuggestionClick?.({
750
750
  item: e,
751
751
  group: t,
752
752
  prompt: e.prompt || e.title
753
- }), M?.(e, t);
754
- }, [me, M]), { attachedFiles: _e, fileInputRef: ve, onUploadFiles: ye, acceptValue: be, isAtMaxFiles: xe, maxFiles: Se, processFiles: Ce, handleFileSelect: we, handleRemoveFile: Te, transientError: Ee, showTransientError: De } = Rn(v), Oe = Pn({
755
- searchPersons: C,
756
- mentionSources: w
753
+ }), N?.(e, t);
754
+ }, [ge, N]), { attachedFiles: ye, fileInputRef: be, onUploadFiles: xe, acceptValue: Se, isAtMaxFiles: Ce, maxFiles: we, processFiles: Te, handleFileSelect: Ee, handleRemoveFile: De, transientError: Oe, showTransientError: ke } = Rn(v), Ae = Pn({
755
+ searchPersons: w,
756
+ mentionSources: T
757
757
  });
758
- G(() => {
759
- P || typeof window < "u" && window.location.hash.length === 0 && re.current?.focus();
760
- }, []), G(() => {
761
- if (de) he(null);
762
- else return he(() => {
763
- re.current?.focus();
764
- }), () => he(null);
765
- }, [de, he]), G(() => {
766
- if (T) return T((e) => {
767
- Ce(e);
758
+ W(() => {
759
+ F || typeof window < "u" && window.location.hash.length === 0 && z.current?.focus();
760
+ }, []), W(() => {
761
+ if (pe) _e(null);
762
+ else return _e(() => {
763
+ z.current?.focus();
764
+ }), () => _e(null);
765
+ }, [pe, _e]), W(() => {
766
+ if (E) return E((e) => {
767
+ Te(e);
768
768
  }), () => {
769
- T(null);
769
+ E(null);
770
770
  };
771
- }, [T, Ce]);
772
- let ke = W((e) => void Ce(e), [Ce]), Ae = _e.filter((e) => e.status === "uploaded"), je = _e.some((e) => e.status === "uploading"), Me = _e.some((e) => e.status === "error"), Ne = !se.isEmpty || Ae.length > 0, Pe = async ({ text: t, mentions: n }) => {
773
- if (Me) return De(R.ai.fileUploadBlockedSubmit), !1;
771
+ }, [E, Te]);
772
+ let je = U((e) => void Te(e), [Te]), Me = ye.filter((e) => e.status === "uploaded"), Ne = ye.some((e) => e.status === "uploading"), Pe = ye.some((e) => e.status === "error"), Fe = !le.isEmpty || Me.length > 0, Ie = async ({ text: t, mentions: n }) => {
773
+ if (Pe) return ke(L.ai.fileUploadBlockedSubmit), !1;
774
774
  if (a && await a() === !1) return !1;
775
- let r = Ae, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = m, s = g;
775
+ let r = Me, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = m, s = g;
776
776
  o && h?.(null), s && _?.(null);
777
777
  try {
778
778
  await e({
@@ -782,44 +782,44 @@ var zn = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
782
782
  quote: s
783
783
  });
784
784
  } catch {
785
- return o && (fe.current == null || fe.current === o) && h?.(o), s && (pe.current == null || pe.current === s) && _?.(s), !1;
785
+ return o && (me.current == null || me.current === o) && h?.(o), s && (he.current == null || he.current === s) && _?.(s), !1;
786
786
  }
787
- for (let e of r) Te(e.id);
787
+ for (let e of r) De(e.id);
788
788
  return !0;
789
- }, Fe = B ? B.prompt ?? B.title : null, Ie = Fe ? [Fe] : s ?? [], Le = N === "inside", Re = k && j && j.length > 0 && M ? /* @__PURE__ */ Y(jn, {
790
- suggestions: j,
791
- onItemClick: ge,
792
- onItemHover: ie,
793
- side: Le ? "bottom" : "top",
794
- reserveTwoRows: !Le,
795
- overflow: Le ? "scroll" : "wrap"
796
- }) : null, ze = !P || ae || Ne || se.recorder !== "idle", Be = (e) => e instanceof Node ? le.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, Ve = () => {
797
- ue.current && clearTimeout(ue.current), ue.current = setTimeout(() => {
798
- Be(document.activeElement) || oe(!1);
789
+ }, Le = ae ? ae.prompt ?? ae.title : null, Re = Le ? [Le] : s ?? [], ze = P === "inside", Be = A && M && M.length > 0 && N ? /* @__PURE__ */ Y(jn, {
790
+ suggestions: M,
791
+ onItemClick: ve,
792
+ onItemHover: oe,
793
+ side: ze ? "bottom" : "top",
794
+ reserveTwoRows: !ze,
795
+ overflow: ze ? "scroll" : "wrap"
796
+ }) : null, Ve = !F || se || Fe || le.recorder !== "idle", He = (e) => e instanceof Node ? de.current?.contains(e) ? !0 : e instanceof Element && e.closest("[data-radix-popper-content-wrapper]") !== null : !1, Ue = () => {
797
+ fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => {
798
+ He(document.activeElement) || ce(!1);
799
799
  }, 0);
800
- }, He = Le, Ue = He && P, We = Ue && !ze, Ge = He && Re ? /* @__PURE__ */ Y("div", {
800
+ }, We = ze, Ge = We && F, Ke = Ge && !Ve, qe = We && Be ? /* @__PURE__ */ Y("div", {
801
801
  onClick: (e) => e.stopPropagation(),
802
- children: Re
803
- }) : void 0, Ke = {
804
- duration: z ? 0 : .32,
802
+ children: Be
803
+ }) : void 0, Je = {
804
+ duration: R ? 0 : .32,
805
805
  ease: [
806
806
  .4,
807
807
  0,
808
808
  .2,
809
809
  1
810
810
  ]
811
- }, qe = k && A && !!F && F.length > 0, Je = A && k, { motionProps: Ye } = on(k, 160, .5);
811
+ }, Ye = A && j && !!I && I.length > 0, Xe = j && A, { motionProps: Ze } = on(A, 160, .5);
812
812
  return /* @__PURE__ */ X(c.div, {
813
- ref: te,
814
- "data-composer-layout": Je ? "welcome" : "docked",
815
- className: i("flex flex-col items-center gap-2", I === "default" && "px-4 pb-3 pt-2", Je && "min-h-0 flex-1 justify-start -mt-20"),
816
- ...A ? Ye : {},
813
+ ref: ne,
814
+ "data-composer-layout": Xe ? "welcome" : "docked",
815
+ className: i("flex flex-col items-center gap-2", ee === "default" && "px-4 pb-3 pt-2", Xe && "min-h-0 flex-1 justify-start -mt-20"),
816
+ ...j ? Ze : {},
817
817
  children: [
818
818
  /* @__PURE__ */ X("div", {
819
819
  className: "flex w-full max-w-content flex-col gap-2",
820
- children: [Re && !Le ? /* @__PURE__ */ Y("div", { children: P ? /* @__PURE__ */ Y(p, {
820
+ children: [Be && !ze ? /* @__PURE__ */ Y("div", { children: F ? /* @__PURE__ */ Y(p, {
821
821
  initial: !1,
822
- children: ze ? /* @__PURE__ */ Y(c.div, {
822
+ children: Ve ? /* @__PURE__ */ Y(c.div, {
823
823
  className: "overflow-hidden",
824
824
  initial: {
825
825
  opacity: 0,
@@ -833,107 +833,107 @@ var zn = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
833
833
  opacity: 0,
834
834
  height: 0
835
835
  },
836
- transition: Ke,
837
- children: Re
836
+ transition: Je,
837
+ children: Be
838
838
  }, "welcome-suggestions") : null
839
- }) : Re }) : null, /* @__PURE__ */ Y(xn, {
839
+ }) : Be }) : null, /* @__PURE__ */ Y(xn, {
840
840
  creditWarning: u,
841
- children: /* @__PURE__ */ Y(nt, {
841
+ children: /* @__PURE__ */ Y(ie, {
842
842
  asForm: !0,
843
- surfaceRef: le,
844
- handleRef: re,
843
+ surfaceRef: de,
844
+ handleRef: z,
845
845
  className: "isolate z-20 items-stretch p-0 hover:cursor-text",
846
- accent: de,
847
- replacement: de ? f : null,
848
- onSurfaceFocus: () => oe(!0),
849
- onSurfaceBlur: Ve,
850
- onStateChange: ce,
851
- onSend: Pe,
846
+ accent: pe,
847
+ replacement: pe ? f : null,
848
+ onSurfaceFocus: () => ce(!0),
849
+ onSurfaceBlur: Ue,
850
+ onStateChange: ue,
851
+ onSend: Ie,
852
852
  inProgress: r,
853
853
  onStop: n,
854
- hasAttachments: Ae.length > 0,
855
- sendBlocked: je,
856
- error: Ee,
854
+ hasAttachments: Me.length > 0,
855
+ sendBlocked: Ne,
856
+ error: Oe,
857
857
  role: "textbox",
858
- name: L,
859
- placeholders: Ie,
858
+ name: te,
859
+ placeholders: Re,
860
860
  placeholdersPaused: r,
861
861
  labels: {
862
- placeholder: R.ai.inputPlaceholder,
863
- listening: R.ai.listening,
864
- send: R.ai.sendMessage,
865
- stop: R.ai.stopAnswerGeneration,
866
- recordAudio: R.ai.recordAudio,
867
- cancelRecording: R.ai.cancelRecording,
868
- confirmRecording: R.ai.stopRecording,
869
- micPermissionDenied: R.ai.micPermissionDenied,
870
- micError: R.ai.micError,
871
- transcriptionError: R.ai.transcriptionError,
872
- mentionSuggestions: R.ai.mentions.suggestions
862
+ placeholder: L.ai.inputPlaceholder,
863
+ listening: L.ai.listening,
864
+ send: L.ai.sendMessage,
865
+ stop: L.ai.stopAnswerGeneration,
866
+ recordAudio: L.ai.recordAudio,
867
+ cancelRecording: L.ai.cancelRecording,
868
+ confirmRecording: L.ai.stopRecording,
869
+ micPermissionDenied: L.ai.micPermissionDenied,
870
+ micError: L.ai.micError,
871
+ transcriptionError: L.ai.transcriptionError,
872
+ mentionSuggestions: L.ai.mentions.suggestions
873
873
  },
874
874
  mentions: {
875
- sources: Oe,
876
- showGroupLabels: Oe.length > 1
875
+ sources: Ae,
876
+ showGroupLabels: Ae.length > 1
877
877
  },
878
- voice: S ? {
879
- onTranscribe: S,
880
- onPress: me?.onDictationStart,
881
- onCancelled: me?.onDictationCancel
878
+ voice: C ? {
879
+ onTranscribe: C,
880
+ onPress: ge?.onDictationStart,
881
+ onCancelled: ge?.onDictationCancel
882
882
  } : void 0,
883
- onPasteFiles: v?.onUploadFiles ? ke : void 0,
883
+ onPasteFiles: v?.onUploadFiles ? je : void 0,
884
884
  pastePreferText: !0,
885
885
  header: g ? /* @__PURE__ */ Y(Sn, {
886
886
  quote: g,
887
887
  onRemove: () => _?.(null)
888
888
  }) : null,
889
889
  tray: /* @__PURE__ */ Y(mn, {
890
- attachedFiles: _e,
891
- isUploading: je,
892
- onRemove: Te,
893
- removeLabel: R.ai.removeFile,
894
- reducedMotion: z
890
+ attachedFiles: ye,
891
+ isUploading: Ne,
892
+ onRemove: De,
893
+ removeLabel: L.ai.removeFile,
894
+ reducedMotion: R
895
895
  }),
896
- leading: He ? /* @__PURE__ */ Y("div", {
896
+ leading: We ? /* @__PURE__ */ Y("div", {
897
897
  className: "flex shrink-0 self-center pl-3",
898
- children: /* @__PURE__ */ Y(ee, {
898
+ children: /* @__PURE__ */ Y(rt, {
899
899
  size: "sm",
900
900
  spin: r
901
901
  })
902
902
  }) : void 0,
903
- toolbarStart: ye || y || b?.length ? (e) => /* @__PURE__ */ X(qt, { children: [/* @__PURE__ */ Y(yn, {
904
- onUploadFiles: ye,
905
- composerActions: b,
906
- onComposerActionsOpenChange: x,
907
- isAtMaxFiles: xe,
908
- maxFiles: Se,
909
- acceptValue: be,
910
- fileInputRef: ve,
911
- handleFileSelect: we,
903
+ toolbarStart: xe || b || x?.length ? (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(yn, {
904
+ onUploadFiles: xe,
905
+ composerActions: x,
906
+ onComposerActionsOpenChange: S,
907
+ isAtMaxFiles: Ce,
908
+ maxFiles: we,
909
+ acceptValue: Se,
910
+ fileInputRef: be,
911
+ handleFileSelect: Ee,
912
912
  recordingStatus: e
913
- }), y ? /* @__PURE__ */ Y("div", {
913
+ }), b ? /* @__PURE__ */ Y("div", {
914
914
  className: "min-w-0 cursor-default",
915
915
  onClick: (e) => e.stopPropagation(),
916
- children: y
916
+ children: b
917
917
  }) : null] }) : void 0,
918
- toolbarCenter: Ge,
919
- collapsible: Ue,
920
- collapsed: We,
921
- reducedMotion: z
918
+ toolbarCenter: qe,
919
+ collapsible: Ge,
920
+ collapsed: Ke,
921
+ reducedMotion: R
922
922
  })
923
923
  })]
924
924
  }),
925
- qe ? /* @__PURE__ */ Y("div", {
925
+ Ye ? /* @__PURE__ */ Y("div", {
926
926
  className: "w-full max-w-content pt-2",
927
- children: /* @__PURE__ */ Y(Cn, { cards: F })
927
+ children: /* @__PURE__ */ Y(Cn, { cards: I })
928
928
  }) : null,
929
- O && k && A ? /* @__PURE__ */ Y("div", {
929
+ k && A && j ? /* @__PURE__ */ Y("div", {
930
930
  className: "w-full py-4 mx-auto flex max-w-content justify-center",
931
- children: O
931
+ children: k
932
932
  }) : null,
933
933
  /* @__PURE__ */ Y(p, {
934
934
  mode: "wait",
935
935
  initial: !1,
936
- children: de ? /* @__PURE__ */ X(c.div, {
936
+ children: pe ? /* @__PURE__ */ X(c.div, {
937
937
  className: "flex w-full max-w-content flex-row flex-wrap items-center justify-center gap-x-3 gap-y-1 text-sm font-medium text-f1-foreground-tertiary",
938
938
  initial: { opacity: 0 },
939
939
  animate: { opacity: 1 },
@@ -949,7 +949,7 @@ var zn = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
949
949
  children: "↑↓"
950
950
  }),
951
951
  " ",
952
- R.ai.clarifyingQuestion.navHint.navigate
952
+ L.ai.clarifyingQuestion.navHint.navigate
953
953
  ] }),
954
954
  /* @__PURE__ */ X("span", { children: [
955
955
  /* @__PURE__ */ Y("kbd", {
@@ -957,7 +957,7 @@ var zn = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
957
957
  children: "Enter"
958
958
  }),
959
959
  " ",
960
- R.ai.clarifyingQuestion.navHint.select
960
+ L.ai.clarifyingQuestion.navHint.select
961
961
  ] }),
962
962
  /* @__PURE__ */ X("span", { children: [
963
963
  /* @__PURE__ */ Y("kbd", {
@@ -965,41 +965,41 @@ var zn = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
965
965
  children: "Esc"
966
966
  }),
967
967
  " ",
968
- R.ai.clarifyingQuestion.navHint.cancel
968
+ L.ai.clarifyingQuestion.navHint.cancel
969
969
  ] })
970
970
  ]
971
- }, "clarifying-nav-hint") : (E?.text || D) && !Je && /* @__PURE__ */ X(c.div, {
972
- className: i("flex w-full max-w-content flex-row items-center gap-1", D ? "justify-between" : "justify-center"),
971
+ }, "clarifying-nav-hint") : (D?.text || O) && !Xe && /* @__PURE__ */ X(c.div, {
972
+ className: i("flex w-full max-w-content flex-row items-center gap-1", O ? "justify-between" : "justify-center"),
973
973
  initial: { opacity: 0 },
974
974
  animate: { opacity: 1 },
975
975
  exit: { opacity: 0 },
976
976
  transition: {
977
- duration: ne ? 0 : .3,
977
+ duration: re ? 0 : .3,
978
978
  ease: "easeOut"
979
979
  },
980
980
  children: [/* @__PURE__ */ X("div", {
981
981
  className: "flex min-w-0 flex-row items-center gap-1",
982
- children: [E?.text && E.onClick ? /* @__PURE__ */ Y("button", {
982
+ children: [D?.text && D.onClick ? /* @__PURE__ */ Y("button", {
983
983
  type: "button",
984
- onClick: E.onClick,
984
+ onClick: D.onClick,
985
985
  className: i("group min-w-0 cursor-pointer bg-transparent p-0 text-inherit", "transition-transform duration-700 ease-out", "hover:scale-[1.02] focus-visible:scale-[1.02]", "motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100"),
986
986
  children: /* @__PURE__ */ Y(d, {
987
987
  className: i("text-sm font-medium text-f1-foreground-tertiary transition-colors duration-700 ease-out", "group-hover:bg-gradient-to-r group-hover:from-[#E55619] group-hover:to-[#A1ADE5] group-hover:bg-clip-text group-hover:text-transparent", "group-focus-visible:bg-gradient-to-r group-focus-visible:from-[#E55619] group-focus-visible:to-[#A1ADE5] group-focus-visible:bg-clip-text group-focus-visible:text-transparent"),
988
- children: E.text
988
+ children: D.text
989
989
  })
990
- }) : E?.text ? /* @__PURE__ */ Y(d, {
990
+ }) : D?.text ? /* @__PURE__ */ Y(d, {
991
991
  className: "text-sm font-medium text-f1-foreground-tertiary",
992
- children: E.text
993
- }) : null, E?.link && E.linkText ? /* @__PURE__ */ Y(o, {
994
- href: E.link,
992
+ children: D.text
993
+ }) : null, D?.link && D.linkText ? /* @__PURE__ */ Y(o, {
994
+ href: D.link,
995
995
  target: "_blank",
996
996
  rel: "noopener noreferrer",
997
997
  className: "flex-shrink-0 text-sm font-medium text-f1-foreground-tertiary",
998
- children: E.linkText
998
+ children: D.linkText
999
999
  }) : null]
1000
- }), D ? /* @__PURE__ */ Y("div", {
1000
+ }), O ? /* @__PURE__ */ Y("div", {
1001
1001
  className: "flex shrink-0 items-center",
1002
- children: /* @__PURE__ */ Y(pn, { ...D })
1002
+ children: /* @__PURE__ */ Y(pn, { ...O })
1003
1003
  }) : null]
1004
1004
  }, "chat-disclaimer")
1005
1005
  })
@@ -1041,12 +1041,12 @@ function Wn({ ...e }) {
1041
1041
  //#endregion
1042
1042
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Image.tsx
1043
1043
  function Gn({ src: e, alt: n, ...r }) {
1044
- let o = t(), s = w(), c = $e(), l = D(e || void 0), [u, d] = J(!1), [p, m] = J(!1), h = n || (e ? Pe(e) : "") || "image";
1044
+ let o = t(), s = Fe(), c = Ne(), l = N(e || void 0), [u, d] = q(!1), [p, m] = q(!1), h = n || (e ? Se(e) : "") || "image";
1045
1045
  if (!e || u || l.status === "error") return n ? /* @__PURE__ */ Y("span", {
1046
1046
  className: "text-f1-foreground-secondary",
1047
1047
  children: n
1048
1048
  }) : null;
1049
- let g = l.status === "ready" ? /* @__PURE__ */ Y(ge, {
1049
+ let g = l.status === "ready" ? /* @__PURE__ */ Y(R, {
1050
1050
  ...r,
1051
1051
  src: l.url,
1052
1052
  alt: n,
@@ -1074,7 +1074,7 @@ function Gn({ src: e, alt: n, ...r }) {
1074
1074
  variant: "neutral",
1075
1075
  label: o.chat.download,
1076
1076
  hideLabel: !0,
1077
- icon: L,
1077
+ icon: B,
1078
1078
  onClick: () => c(e, h)
1079
1079
  })
1080
1080
  })]
@@ -1083,7 +1083,7 @@ function Gn({ src: e, alt: n, ...r }) {
1083
1083
  //#endregion
1084
1084
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Link.tsx
1085
1085
  function Kn({ children: e, ...t }) {
1086
- return /* @__PURE__ */ Y(de, {
1086
+ return /* @__PURE__ */ Y(We, {
1087
1087
  ...t,
1088
1088
  variant: "link",
1089
1089
  href: t.href,
@@ -1116,11 +1116,11 @@ function Yn({ children: e, ...t }) {
1116
1116
  //#endregion
1117
1117
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/components/EntityRefHoverCard.tsx
1118
1118
  function Xn({ id: e, trigger: t, resolver: n, contentClassName: r = "w-64", ...a }) {
1119
- 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);
1120
- G(() => () => {
1119
+ let o = K(/* @__PURE__ */ new Map()), [s, c] = q(() => o.current.get(e) ?? null), [l, u] = q(!1), [d, f] = q(!1), p = K(!0);
1120
+ W(() => () => {
1121
1121
  p.current = !1;
1122
1122
  }, []);
1123
- let m = W(() => {
1123
+ let m = U(() => {
1124
1124
  if (s || l) return;
1125
1125
  let t = o.current.get(e);
1126
1126
  t ? c(t) : (u(!0), f(!1), n(e).then((t) => {
@@ -1136,26 +1136,26 @@ function Xn({ id: e, trigger: t, resolver: n, contentClassName: r = "w-64", ...a
1136
1136
  s,
1137
1137
  l
1138
1138
  ]), h = d ? null : s;
1139
- return /* @__PURE__ */ X(Dt, {
1139
+ return /* @__PURE__ */ X(Ot, {
1140
1140
  openDelay: 300,
1141
1141
  closeDelay: 100,
1142
1142
  onOpenChange: (e) => {
1143
1143
  e && m();
1144
1144
  },
1145
- children: [/* @__PURE__ */ Y(St, {
1145
+ children: [/* @__PURE__ */ Y(Ct, {
1146
1146
  asChild: !0,
1147
1147
  children: t
1148
- }), /* @__PURE__ */ Y(Et, {
1148
+ }), /* @__PURE__ */ Y(Dt, {
1149
1149
  side: "top",
1150
1150
  align: "start",
1151
1151
  className: i(r, "rounded-2xl border-none p-0 shadow-md"),
1152
- children: l ? /* @__PURE__ */ Y(S.Skeleton, {}) : a.renderCard ? a.renderCard(h) : /* @__PURE__ */ Y(S, { ...h ? a.mapToCard(h) : a.fallbackCard })
1152
+ children: l ? /* @__PURE__ */ Y(He.Skeleton, {}) : a.renderCard ? a.renderCard(h) : /* @__PURE__ */ Y(He, { ...h ? a.mapToCard(h) : a.fallbackCard })
1153
1153
  })]
1154
1154
  });
1155
1155
  }
1156
1156
  //#endregion
1157
1157
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/components/MentionTrigger.tsx
1158
- var Zn = U(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1158
+ var Zn = H(({ label: e, ...t }, n) => /* @__PURE__ */ X("button", {
1159
1159
  ref: n,
1160
1160
  type: "button",
1161
1161
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1166,7 +1166,7 @@ Zn.displayName = "MentionTrigger";
1166
1166
  //#endregion
1167
1167
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/custom/CustomEntityRef.tsx
1168
1168
  function Qn({ id: e, label: n, config: r }) {
1169
- let i = t(), { resolve: a, avatar: o, url: s } = r, c = s?.(e), l = W((e) => ({
1169
+ let i = t(), { resolve: a, avatar: o, url: s } = r, c = s?.(e), l = U((e) => ({
1170
1170
  ...e,
1171
1171
  avatar: e.avatar ?? o,
1172
1172
  ...c && { secondaryActions: {
@@ -1177,7 +1177,7 @@ function Qn({ id: e, label: n, config: r }) {
1177
1177
  o,
1178
1178
  c,
1179
1179
  i
1180
- ]), u = K(() => l({ title: n }), [l, n]), d = W((e) => a ? a(e) : Promise.resolve({ title: n }), [a, n]);
1180
+ ]), u = G(() => l({ title: n }), [l, n]), d = U((e) => a ? a(e) : Promise.resolve({ title: n }), [a, n]);
1181
1181
  return /* @__PURE__ */ Y(Xn, {
1182
1182
  id: e,
1183
1183
  trigger: /* @__PURE__ */ Y(Zn, { label: n }),
@@ -1188,7 +1188,7 @@ function Qn({ id: e, label: n, config: r }) {
1188
1188
  }
1189
1189
  //#endregion
1190
1190
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/candidate/CandidateEntityRef.tsx
1191
- var $n = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1191
+ var $n = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1192
1192
  ref: n,
1193
1193
  type: "button",
1194
1194
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1197,7 +1197,7 @@ var $n = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1197
1197
  }));
1198
1198
  $n.displayName = "CandidateTrigger";
1199
1199
  function er({ id: e, label: n }) {
1200
- let { entityRefs: r } = V(), i = r?.resolvers?.candidate, a = t(), o = r?.urls?.candidate?.(e), s = K(() => (e) => {
1200
+ let { entityRefs: r } = y(), i = r?.resolvers?.candidate, a = t(), o = r?.urls?.candidate?.(e), s = G(() => (e) => {
1201
1201
  let t = [];
1202
1202
  return e.source && t.push({
1203
1203
  title: a.t("ai.entityRef.candidate.source"),
@@ -1231,7 +1231,7 @@ function er({ id: e, label: n }) {
1231
1231
  href: o
1232
1232
  } }
1233
1233
  };
1234
- }, [a, o]), c = K(() => ({
1234
+ }, [a, o]), c = G(() => ({
1235
1235
  title: n,
1236
1236
  ...o && { secondaryActions: {
1237
1237
  label: a.t("ai.view"),
@@ -1252,7 +1252,7 @@ function er({ id: e, label: n }) {
1252
1252
  }
1253
1253
  //#endregion
1254
1254
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/expense/ExpenseEntityRef.tsx
1255
- var tr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1255
+ var tr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1256
1256
  ref: n,
1257
1257
  type: "button",
1258
1258
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1261,10 +1261,10 @@ var tr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1261
1261
  }));
1262
1262
  tr.displayName = "ExpenseTrigger";
1263
1263
  function nr({ id: e, label: n }) {
1264
- let { entityRefs: r } = V(), i = r?.resolvers?.expense, a = t(), o = r?.urls?.expense?.(e), s = K(() => (e) => ({
1264
+ let { entityRefs: r } = y(), i = r?.resolvers?.expense, a = t(), o = r?.urls?.expense?.(e), s = G(() => (e) => ({
1265
1265
  avatar: {
1266
1266
  type: "icon",
1267
- icon: ue
1267
+ icon: de
1268
1268
  },
1269
1269
  title: e.description || `Expense #${e.id}`,
1270
1270
  description: [e.amount, e.status].filter(Boolean).join(" · "),
@@ -1272,7 +1272,7 @@ function nr({ id: e, label: n }) {
1272
1272
  label: a.t("ai.view"),
1273
1273
  href: o
1274
1274
  } }
1275
- }), [a, o]), c = K(() => ({
1275
+ }), [a, o]), c = G(() => ({
1276
1276
  title: n,
1277
1277
  ...o && { secondaryActions: {
1278
1278
  label: a.t("ai.view"),
@@ -1293,7 +1293,7 @@ function nr({ id: e, label: n }) {
1293
1293
  }
1294
1294
  //#endregion
1295
1295
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/jobPosting/JobPostingEntityRef.tsx
1296
- var rr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1296
+ var rr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1297
1297
  ref: n,
1298
1298
  type: "button",
1299
1299
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1302,14 +1302,14 @@ var rr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1302
1302
  }));
1303
1303
  rr.displayName = "JobPostingTrigger";
1304
1304
  function ir({ id: e, label: n }) {
1305
- let { entityRefs: r } = V(), i = r?.resolvers?.jobPosting, a = t(), o = r?.urls?.jobPosting?.(e), s = K(() => (e) => ({
1305
+ let { entityRefs: r } = y(), i = r?.resolvers?.jobPosting, a = t(), o = r?.urls?.jobPosting?.(e), s = G(() => (e) => ({
1306
1306
  title: e.title,
1307
1307
  description: [e.status, e.location].filter(Boolean).join(" · "),
1308
1308
  ...o && { secondaryActions: {
1309
1309
  label: a.t("ai.view"),
1310
1310
  href: o
1311
1311
  } }
1312
- }), [a, o]), c = K(() => ({
1312
+ }), [a, o]), c = G(() => ({
1313
1313
  title: n,
1314
1314
  ...o && { secondaryActions: {
1315
1315
  label: a.t("ai.view"),
@@ -1331,7 +1331,7 @@ function ir({ id: e, label: n }) {
1331
1331
  //#endregion
1332
1332
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/PersonEntityRef.tsx
1333
1333
  function ar({ id: e, label: t }) {
1334
- let { entityRefs: n } = V(), r = n?.resolvers?.person, i = n?.urls?.person?.(e);
1334
+ let { entityRefs: n } = y(), r = n?.resolvers?.person, i = n?.urls?.person?.(e);
1335
1335
  return r ? /* @__PURE__ */ Y(Xn, {
1336
1336
  id: e,
1337
1337
  trigger: /* @__PURE__ */ Y(Zn, { label: t }),
@@ -1374,7 +1374,7 @@ function or({ rows: e }) {
1374
1374
  }
1375
1375
  //#endregion
1376
1376
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/requisition/RequisitionEntityRef.tsx
1377
- var sr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1377
+ var sr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1378
1378
  ref: n,
1379
1379
  type: "button",
1380
1380
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1383,13 +1383,13 @@ var sr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1383
1383
  }));
1384
1384
  sr.displayName = "RequisitionTrigger";
1385
1385
  function cr({ id: e, label: n }) {
1386
- let { entityRefs: r } = V(), i = r?.resolvers?.requisition, a = t(), o = r?.urls?.requisition?.(e), s = K(() => (e) => {
1386
+ let { entityRefs: r } = y(), i = r?.resolvers?.requisition, a = t(), o = r?.urls?.requisition?.(e), s = G(() => (e) => {
1387
1387
  let t = e.lineManager ? `${e.lineManager.firstName} ${e.lineManager.lastName}` : void 0, n = [
1388
1388
  e.status ? {
1389
1389
  label: a.t("ai.entityRef.requisition.status"),
1390
1390
  value: /* @__PURE__ */ Y("div", {
1391
1391
  className: "flex items-center pt-1",
1392
- children: /* @__PURE__ */ Y(At, {
1392
+ children: /* @__PURE__ */ Y(jt, {
1393
1393
  text: e.status,
1394
1394
  variant: e.statusVariant ?? "neutral"
1395
1395
  })
@@ -1399,7 +1399,7 @@ function cr({ id: e, label: n }) {
1399
1399
  label: a.t("ai.entityRef.requisition.lineManager"),
1400
1400
  value: /* @__PURE__ */ X("div", {
1401
1401
  className: "flex items-center gap-1.5 pt-1",
1402
- children: [/* @__PURE__ */ Y(ft, {
1402
+ children: [/* @__PURE__ */ Y(pt, {
1403
1403
  firstName: e.lineManager.firstName,
1404
1404
  lastName: e.lineManager.lastName,
1405
1405
  src: e.lineManager.avatarUrl,
@@ -1421,7 +1421,7 @@ function cr({ id: e, label: n }) {
1421
1421
  href: o
1422
1422
  } }
1423
1423
  };
1424
- }, [a, o]), c = K(() => ({
1424
+ }, [a, o]), c = G(() => ({
1425
1425
  title: n,
1426
1426
  ...o && { secondaryActions: {
1427
1427
  label: a.t("ai.view"),
@@ -1442,7 +1442,7 @@ function cr({ id: e, label: n }) {
1442
1442
  }
1443
1443
  //#endregion
1444
1444
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/entityRef/entities/vacancy/VacancyEntityRef.tsx
1445
- var lr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1445
+ var lr = H(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1446
1446
  ref: n,
1447
1447
  type: "button",
1448
1448
  className: i("cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground", a()),
@@ -1451,14 +1451,14 @@ var lr = U(({ label: e, ...t }, n) => /* @__PURE__ */ Y("button", {
1451
1451
  }));
1452
1452
  lr.displayName = "VacancyTrigger";
1453
1453
  function ur({ id: e, label: n }) {
1454
- let { entityRefs: r } = V(), i = r?.resolvers?.vacancy, a = t(), o = r?.urls?.vacancy?.(e), s = K(() => (e) => ({
1454
+ let { entityRefs: r } = y(), i = r?.resolvers?.vacancy, a = t(), o = r?.urls?.vacancy?.(e), s = G(() => (e) => ({
1455
1455
  title: e.name,
1456
1456
  description: [e.status, e.vacancyType].filter(Boolean).join(" · "),
1457
1457
  ...o && { secondaryActions: {
1458
1458
  label: a.t("ai.view"),
1459
1459
  href: o
1460
1460
  } }
1461
- }), [a, o]), c = K(() => ({
1461
+ }), [a, o]), c = G(() => ({
1462
1462
  title: n,
1463
1463
  ...o && { secondaryActions: {
1464
1464
  label: a.t("ai.view"),
@@ -1499,7 +1499,7 @@ function mr(e) {
1499
1499
  return typeof e == "string" ? e : typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(mr).join("") : e && typeof e == "object" && "props" in e ? mr(e.props.children) : "";
1500
1500
  }
1501
1501
  function hr({ type: e, id: t, children: n }) {
1502
- let { entityRefs: r } = V();
1502
+ let { entityRefs: r } = y();
1503
1503
  if (!t || !e) return /* @__PURE__ */ Y("span", { children: n });
1504
1504
  let i = mr(n), a = fr(e);
1505
1505
  if (a) return /* @__PURE__ */ Y(a, {
@@ -1516,14 +1516,14 @@ function hr({ type: e, id: t, children: n }) {
1516
1516
  //#endregion
1517
1517
  //#region src/addons/ai/ai/F0AiChat/components/markdownRenderers/components/Table.tsx
1518
1518
  async function gr(e, t, n) {
1519
- let r = Ze(e), i = t === "xlsx" ? await tt([{
1519
+ let r = Ze(e), i = t === "xlsx" ? await nt([{
1520
1520
  name: "Data",
1521
1521
  rows: r
1522
1522
  }]) : await Ee(r);
1523
- pe(i, `${n}.${t}`);
1523
+ fe(i, `${n}.${t}`);
1524
1524
  }
1525
1525
  function _r({ children: e, title: n, ...r }) {
1526
- let a = t(), o = q(null), s = W((e) => {
1526
+ let a = t(), o = K(null), s = U((e) => {
1527
1527
  if (!o.current) return;
1528
1528
  let t = n?.replace(/\s+/g, "_").toLowerCase() || "table";
1529
1529
  gr(o.current, e, t);
@@ -1536,16 +1536,16 @@ function _r({ children: e, title: n, ...r }) {
1536
1536
  tag: "h2",
1537
1537
  className: "text-base font-medium capitalize text-f1-foreground",
1538
1538
  children: n ?? a.ai.reportCard.tableLabel
1539
- }), /* @__PURE__ */ Y(ye, {
1540
- icon: L,
1539
+ }), /* @__PURE__ */ Y(S, {
1540
+ icon: B,
1541
1541
  size: "md",
1542
1542
  items: [{
1543
1543
  label: a.t("ai.dataDownload.download", { format: "Excel" }),
1544
- icon: L,
1544
+ icon: B,
1545
1545
  onClick: () => s("xlsx")
1546
1546
  }, {
1547
1547
  label: a.t("ai.dataDownload.download", { format: "CSV" }),
1548
- icon: L,
1548
+ icon: B,
1549
1549
  onClick: () => s("csv")
1550
1550
  }]
1551
1551
  })]
@@ -1649,7 +1649,7 @@ var Er = {
1649
1649
  return i ? `${r}.${i}` : r;
1650
1650
  }
1651
1651
  let n = t.split("?")[1], r = n ? new URLSearchParams(n.split("#")[0]).get("path") : null;
1652
- return Pe(r ?? t) || e || "file";
1652
+ return Se(r ?? t) || e || "file";
1653
1653
  }, kr = (e, t) => e.startsWith("data:") ? e : `data:${t ?? "application/octet-stream"};base64,${e}`, Ar = (e, t) => {
1654
1654
  let n = Z(e.data), r = Z(e.url) ?? (n ? kr(n, t) : void 0);
1655
1655
  return r ? {
@@ -1687,17 +1687,17 @@ var Er = {
1687
1687
  if (n.length !== 0) return t === "user" ? n[n.length - 1] : n.join("\n\n");
1688
1688
  }, Ir = (e, { urlFor: t } = {}) => ({
1689
1689
  url: e.url ?? t?.(e.path) ?? e.path,
1690
- name: e.displayName || Pe(e.path),
1690
+ name: e.displayName || Se(e.path),
1691
1691
  mimeType: e.mimeType,
1692
1692
  size: e.bytes,
1693
1693
  previewUrl: e.preview && t ? t(e.preview.path) : void 0
1694
- }), Lr = (e) => Se(e) ?? "", Rr = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ Y(pt, {
1694
+ }), Lr = (e) => De(e) ?? "", Rr = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ Y(mt, {
1695
1695
  module: e.module,
1696
1696
  size: "md"
1697
- }) : e?.type === "file" ? /* @__PURE__ */ Y(ut, {
1697
+ }) : e?.type === "file" ? /* @__PURE__ */ Y(dt, {
1698
1698
  file: e.file,
1699
1699
  size: "lg"
1700
- }) : e?.type === "icon" ? /* @__PURE__ */ Y(dt, {
1700
+ }) : e?.type === "icon" ? /* @__PURE__ */ Y(ft, {
1701
1701
  icon: e.icon,
1702
1702
  size: "md"
1703
1703
  }) : null, zr = ({ action: e, isActive: n }) => {
@@ -1746,12 +1746,12 @@ function Br({ avatar: e, title: t, description: n, isActive: r = !1, action: a,
1746
1746
  Br.displayName = "F0CanvasCard";
1747
1747
  //#endregion
1748
1748
  //#region src/addons/ai/ai/F0AiChat/providers/FormCardValueFormatterProvider.tsx
1749
- var Vr = Bt(null);
1749
+ var Vr = Vt(null);
1750
1750
  function Hr({ children: e }) {
1751
- let [t, n] = J(0), r = q([]), i = W((e) => {
1751
+ let [t, n] = q(0), r = K([]), i = U((e) => {
1752
1752
  let t = r.current, i = t.findIndex((t) => t.formName === e.formName && t.customFieldName === e.customFieldName), a = e;
1753
1753
  i >= 0 ? t[i] = a : t.push(a), n((e) => e + 1);
1754
- }, []), a = K(() => ({
1754
+ }, []), a = G(() => ({
1755
1755
  formatters: [...r.current],
1756
1756
  setFormCardValueFormatter: i
1757
1757
  }), [i, t]);
@@ -1761,8 +1761,8 @@ function Hr({ children: e }) {
1761
1761
  });
1762
1762
  }
1763
1763
  function Ur(e) {
1764
- let t = Ut(Vr)?.formatters;
1765
- return K(() => !t || t.length === 0 ? null : (n, r, i) => {
1764
+ let t = Wt(Vr)?.formatters;
1765
+ return G(() => !t || t.length === 0 ? null : (n, r, i) => {
1766
1766
  let a, o = -1;
1767
1767
  for (let n of t) {
1768
1768
  let t = n.formName === void 0 || n.formName === e, r = n.customFieldName === void 0 || n.customFieldName === i.customFieldName;
@@ -1777,7 +1777,7 @@ function Ur(e) {
1777
1777
  }, [t, e]);
1778
1778
  }
1779
1779
  function Wr() {
1780
- let e = Ut(Vr);
1780
+ let e = Wt(Vr);
1781
1781
  if (!e) throw Error("useSetFormCardValueFormatter must be used within a FormCardValueFormatterProvider");
1782
1782
  return e.setFormCardValueFormatter;
1783
1783
  }
@@ -1791,7 +1791,7 @@ function Yr(e) {
1791
1791
  return e && e.charAt(0).toUpperCase() + e.slice(1);
1792
1792
  }
1793
1793
  function Xr(e) {
1794
- let { days: t, hours: n, minutes: r, seconds: i } = Me(e), a = [];
1794
+ let { days: t, hours: n, minutes: r, seconds: i } = be(e), a = [];
1795
1795
  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(" ");
1796
1796
  }
1797
1797
  function Zr(e) {
@@ -1866,7 +1866,7 @@ function ei(e, t) {
1866
1866
  };
1867
1867
  }
1868
1868
  function ti({ formName: e, formDescription: t, module: n, cardTitle: r, cardDescription: i, fieldDescriptions: a, formValues: o, valueFormatter: s }) {
1869
- let { canvasContent: c, openCanvas: l, closeCanvas: u, dismissCanvas: d } = V(), f = Ur(e), p = s ?? f, m = q(() => {}), h = r ?? e, g = i ?? t ?? "", _ = c?.type === "form" && c.formName === e, v = () => l({
1869
+ let { canvasContent: c, openCanvas: l, closeCanvas: u, dismissCanvas: d } = y(), f = Ur(e), p = s ?? f, m = K(() => {}), h = r ?? e, g = i ?? t ?? "", _ = c?.type === "form" && c.formName === e, v = () => l({
1870
1870
  type: "form",
1871
1871
  title: h,
1872
1872
  description: g,
@@ -1874,10 +1874,10 @@ function ti({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
1874
1874
  formDescription: t,
1875
1875
  formModule: n
1876
1876
  });
1877
- m.current = v, G(() => {
1877
+ m.current = v, W(() => {
1878
1878
  typeof window < "u" && (window.innerWidth < Kr || qr.has(e) || (qr.add(e), m.current()));
1879
1879
  }, [e]);
1880
- let y = a && o ? Object.entries(a).map(([e, t]) => {
1880
+ let b = a && o ? Object.entries(a).map(([e, t]) => {
1881
1881
  let n = o[e], r = p?.(e, n, {
1882
1882
  fieldType: t.fieldType,
1883
1883
  customFieldName: t.customFieldName
@@ -1893,7 +1893,7 @@ function ti({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
1893
1893
  if (!e) return !1;
1894
1894
  let t = Array.isArray(e.content) ? e.content[0] : e.content;
1895
1895
  return t?.type !== "item" || t.text !== "—";
1896
- }) : [], b = y.slice(0, Gr), x = y.length > Gr;
1896
+ }) : [], x = b.slice(0, Gr), S = b.length > Gr;
1897
1897
  return /* @__PURE__ */ Y(Br, {
1898
1898
  avatar: n ? {
1899
1899
  type: "module",
@@ -1908,15 +1908,15 @@ function ti({ formName: e, formDescription: t, module: n, cardTitle: r, cardDesc
1908
1908
  onClose: d ?? u,
1909
1909
  showButton: _
1910
1910
  },
1911
- children: b.length > 0 && !_ ? /* @__PURE__ */ Y("div", {
1911
+ children: x.length > 0 && !_ ? /* @__PURE__ */ Y("div", {
1912
1912
  className: "-mx-3 flex w-full flex-col overflow-hidden pb-1",
1913
- children: /* @__PURE__ */ Y(Xe, {
1914
- details: b.map((e) => ({
1913
+ children: /* @__PURE__ */ Y(Ye, {
1914
+ details: x.map((e) => ({
1915
1915
  title: e.label,
1916
1916
  content: e.content,
1917
1917
  ...e.verticalLayout && { verticalLayout: !0 }
1918
1918
  })),
1919
- showSeeMore: x,
1919
+ showSeeMore: S,
1920
1920
  onClickSeeMore: v,
1921
1921
  tableView: !0
1922
1922
  })
@@ -1927,7 +1927,7 @@ ti.displayName = "FormCard";
1927
1927
  //#endregion
1928
1928
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/ActiveFormCard.tsx
1929
1929
  function ni() {
1930
- let e = A(), t = e?.activeForm;
1930
+ let e = ue(), t = e?.activeForm;
1931
1931
  if (!t) return null;
1932
1932
  let n = t.cardTitle, r = t.cardDescription, i = (e?.getFillVersion(t.formName) ?? 0) > 0;
1933
1933
  return !n || !r || !i ? null : /* @__PURE__ */ Y("div", {
@@ -1946,10 +1946,10 @@ function ni() {
1946
1946
  //#endregion
1947
1947
  //#region src/addons/ai/ai/F0AiFileAttachments/F0AiFileAttachments.tsx
1948
1948
  var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
1949
- let { provided: t } = He();
1950
- return t ? /* @__PURE__ */ Y(oi, { ...e }) : /* @__PURE__ */ Y(Ye, { children: /* @__PURE__ */ Y(oi, { ...e }) });
1949
+ let { provided: t } = je();
1950
+ return t ? /* @__PURE__ */ Y(oi, { ...e }) : /* @__PURE__ */ Y(Ge, { children: /* @__PURE__ */ Y(oi, { ...e }) });
1951
1951
  }, oi = ({ files: e, align: t = "start", onOpenFile: n, onFileDownloaded: r, size: i = "default" }) => {
1952
- let { remotePreviews: a } = He(), { openImagePreview: o } = ae(), [s, c] = J(() => /* @__PURE__ */ new Set()), l = K(() => si(e, a, s), [
1952
+ let { remotePreviews: a } = je(), { openImagePreview: o } = C(), [s, c] = q(() => /* @__PURE__ */ new Set()), l = G(() => si(e, a, s), [
1953
1953
  e,
1954
1954
  a,
1955
1955
  s
@@ -1962,13 +1962,13 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
1962
1962
  onOpenFile: n,
1963
1963
  onFileDownloaded: r,
1964
1964
  openImage: (e, t) => {
1965
- n?.(e, "image") !== !1 && o(l.images.map(Te), t);
1965
+ n?.(e, "image") !== !1 && o(l.images.map(tt), t);
1966
1966
  },
1967
1967
  onImageError: (e) => c((t) => new Set(t).add(e.url))
1968
1968
  };
1969
1969
  return Y(i === "compact" ? ui : li, { ...u });
1970
1970
  }, si = (e, t, n) => {
1971
- let r = (e) => t || b(e.url), i = Ce(e.filter(r)), a = /* @__PURE__ */ new Set([
1971
+ let r = (e) => t || k(e.url), i = _e(e.filter(r)), a = /* @__PURE__ */ new Set([
1972
1972
  ...e.filter((e) => !r(e)),
1973
1973
  ...i.images.filter((e) => n.has(e.url)),
1974
1974
  ...i.audios,
@@ -1996,14 +1996,14 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
1996
1996
  },
1997
1997
  onImageError: o
1998
1998
  }) : null,
1999
- t.map((e, t) => /* @__PURE__ */ Y(be, {
2000
- file: Ge(e),
1999
+ t.map((e, t) => /* @__PURE__ */ Y(ve, {
2000
+ file: L(e),
2001
2001
  cornerClass: "rounded-xl",
2002
2002
  testIdPrefix: ii,
2003
2003
  onDownloaded: () => c?.(e)
2004
2004
  }, `${e.name}-${t}`)),
2005
- n.map(({ file: e, kind: t }, n) => /* @__PURE__ */ Y(O, {
2006
- file: Ge(e),
2005
+ n.map(({ file: e, kind: t }, n) => /* @__PURE__ */ Y(T, {
2006
+ file: L(e),
2007
2007
  kind: t,
2008
2008
  cornerClass: "rounded-xl",
2009
2009
  testIdPrefix: ii,
@@ -2028,8 +2028,8 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
2028
2028
  className: i("flex max-w-full flex-wrap gap-1", o === "end" ? "justify-end" : "justify-start"),
2029
2029
  children: f.map((e, n) => {
2030
2030
  let r = d.get(e);
2031
- return r ? /* @__PURE__ */ Y(O, {
2032
- file: Ge(e),
2031
+ return r ? /* @__PURE__ */ Y(T, {
2032
+ file: L(e),
2033
2033
  kind: r,
2034
2034
  cornerClass: "rounded-lg",
2035
2035
  compact: !0,
@@ -2050,7 +2050,7 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
2050
2050
  })]
2051
2051
  });
2052
2052
  }, di = ({ files: e, align: t, onFileDownloaded: n }) => {
2053
- let r = $e();
2053
+ let r = Ne();
2054
2054
  return e.length === 0 ? null : /* @__PURE__ */ Y("div", {
2055
2055
  className: i("flex max-w-full flex-wrap gap-1.5", t === "end" ? "justify-end" : "justify-start"),
2056
2056
  children: e.map((e, t) => /* @__PURE__ */ Y(pi, {
@@ -2061,15 +2061,15 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
2061
2061
  }, `${e.name}-${t}`))
2062
2062
  });
2063
2063
  }, fi = ({ file: e, onOpen: n, onError: r }) => {
2064
- let o = t(), s = D(e.thumbnailUrl ?? e.url);
2065
- return se(s.status, r), /* @__PURE__ */ Y("button", {
2064
+ let o = t(), s = N(e.thumbnailUrl ?? e.url);
2065
+ return j(s.status, r), /* @__PURE__ */ Y("button", {
2066
2066
  type: "button",
2067
2067
  onClick: n,
2068
2068
  draggable: !1,
2069
2069
  "aria-label": o.t("chat.openNamedDocument", { name: e.name }),
2070
2070
  className: i("relative box-border h-16 w-16 shrink-0 overflow-hidden rounded-lg border border-solid border-f1-border-secondary bg-f1-background-secondary p-0 transition-opacity hover:opacity-90", a()),
2071
2071
  "data-testid": "ai-chat-image-attachment",
2072
- children: s.status === "ready" ? /* @__PURE__ */ Y(ge, {
2072
+ children: s.status === "ready" ? /* @__PURE__ */ Y(R, {
2073
2073
  src: s.url,
2074
2074
  alt: e.name,
2075
2075
  draggable: !1,
@@ -2079,7 +2079,7 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
2079
2079
  });
2080
2080
  }, pi = ({ file: e, onDownload: n }) => {
2081
2081
  let r = t();
2082
- return /* @__PURE__ */ Y(z, {
2082
+ return /* @__PURE__ */ Y(oe, {
2083
2083
  file: {
2084
2084
  name: e.name,
2085
2085
  type: Lr(e)
@@ -2087,22 +2087,22 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
2087
2087
  size: "lg",
2088
2088
  actions: [{
2089
2089
  label: r.t("chat.downloadNamedFile", { name: e.name }),
2090
- icon: L,
2090
+ icon: B,
2091
2091
  onClick: n
2092
2092
  }]
2093
2093
  });
2094
2094
  }, mi = ({ images: e, onOpen: n, onImageError: r }) => {
2095
- let a = t(), o = e.length === 1 ? e[0] : void 0, s = D(o ? o.thumbnailUrl ?? o.url : void 0), c = _e(o && s.status === "ready" ? s.url : void 0, o) ?? void 0, l = o ? Ae(c?.width, c?.height) : null;
2095
+ let a = t(), o = e.length === 1 ? e[0] : void 0, s = N(o ? o.thumbnailUrl ?? o.url : void 0), c = me(o && s.status === "ready" ? s.url : void 0, o) ?? void 0, l = o ? Ae(c?.width, c?.height) : null;
2096
2096
  return /* @__PURE__ */ Y("div", {
2097
2097
  style: l ? { width: l.width } : void 0,
2098
- className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : R, v, ri),
2098
+ className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : I, _, ri),
2099
2099
  "data-testid": "ai-chat-image-album",
2100
- children: qe(c ? [c] : e).map((t, o, s) => {
2100
+ children: Ue(c ? [c] : e).map((t, o, s) => {
2101
2101
  let c = e[t.index];
2102
2102
  if (!c) return null;
2103
2103
  let l = o === s.length - 1;
2104
- return /* @__PURE__ */ Y(Re, {
2105
- image: Te(c),
2104
+ return /* @__PURE__ */ Y(Ie, {
2105
+ image: tt(c),
2106
2106
  aspectRatio: t.aspectRatio,
2107
2107
  spanFull: t.span === 2,
2108
2108
  inset: t.inset,
@@ -2118,7 +2118,7 @@ var ri = "rounded-xl", ii = "ai-chat", ai = (e) => {
2118
2118
  testIdPrefix: ii,
2119
2119
  overlay: t.hiddenCount > 0 ? /* @__PURE__ */ Y("span", {
2120
2120
  "aria-hidden": !0,
2121
- className: i("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse", Fe),
2121
+ className: i("absolute inset-0 flex items-center justify-center text-2xl font-semibold text-f1-foreground-inverse", Me),
2122
2122
  "data-testid": "ai-chat-image-album-more",
2123
2123
  children: `+${t.hiddenCount}`
2124
2124
  }) : void 0
@@ -2141,8 +2141,8 @@ function _i(e, t) {
2141
2141
  };
2142
2142
  }
2143
2143
  function vi({ containerRef: e, enabled: t = !0 }) {
2144
- let [n, r] = J(null), i = W(() => r(null), []);
2145
- return G(() => {
2144
+ let [n, r] = q(null), i = U(() => r(null), []);
2145
+ return W(() => {
2146
2146
  if (!t || typeof window > "u") return;
2147
2147
  let n = e.current;
2148
2148
  if (!n) return;
@@ -2167,8 +2167,8 @@ function vi({ containerRef: e, enabled: t = !0 }) {
2167
2167
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/ReplyPopover.tsx
2168
2168
  var yi = 8, bi = 8;
2169
2169
  function xi({ anchor: e, onReply: n }) {
2170
- let r = t(), a = q(null), [o, s] = J(null);
2171
- if (Kt(() => {
2170
+ let r = t(), a = K(null), [o, s] = q(null);
2171
+ if (qt(() => {
2172
2172
  if (!e) {
2173
2173
  s(null);
2174
2174
  return;
@@ -2197,7 +2197,7 @@ function xi({ anchor: e, onReply: n }) {
2197
2197
  type: "button",
2198
2198
  variant: "ghost",
2199
2199
  label: c,
2200
- icon: C,
2200
+ icon: v,
2201
2201
  onClick: () => {
2202
2202
  n(e.text);
2203
2203
  }
@@ -2206,15 +2206,15 @@ function xi({ anchor: e, onReply: n }) {
2206
2206
  }
2207
2207
  //#endregion
2208
2208
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/AssistantMessage.tsx
2209
- var Si = Bt(void 0), Ci = () => Ut(Si), wi = (e) => /* @__PURE__ */ Y(Qe, {
2209
+ var Si = Vt(void 0), Ci = () => Wt(Si), wi = (e) => /* @__PURE__ */ Y(re, {
2210
2210
  content: e,
2211
2211
  format: "markdown"
2212
2212
  }), Ti = ({ isGenerating: e, isLoading: t, message: n, renderToolCall: r, onReplyQuote: i, onRendered: a, renderMarkdown: o }) => {
2213
- let s = n?.content, c = Fr(s, "assistant") ?? "", l = K(() => Pr({ content: s }), [s]), u = (n && r?.(n)) ?? n?.generativeUI?.() ?? null, d = n?.toolCalls?.[0]?.id, f = !c && !u && l.length === 0, p = q(null), { anchor: m, clear: h } = vi({
2213
+ let s = n?.content, c = Fr(s, "assistant") ?? "", l = G(() => Pr({ content: s }), [s]), u = (n && r?.(n)) ?? n?.generativeUI?.() ?? null, d = n?.toolCalls?.[0]?.id, f = !c && !u && l.length === 0, p = K(null), { anchor: m, clear: h } = vi({
2214
2214
  containerRef: p,
2215
2215
  enabled: !!(n?.id && c)
2216
2216
  });
2217
- return G(() => {
2217
+ return W(() => {
2218
2218
  n?.id && !t && !e && a?.(n);
2219
2219
  }, [
2220
2220
  n,
@@ -2252,7 +2252,7 @@ var Si = Bt(void 0), Ci = () => Ut(Si), wi = (e) => /* @__PURE__ */ Y(Qe, {
2252
2252
  })
2253
2253
  });
2254
2254
  }, Ei = ({ onClose: e, onSubmit: n, reactionType: r, message: i }) => {
2255
- let [a, o] = J(""), s = t(), { title: c, label: l, placeholder: u } = r === "like" ? s.ai.feedbackModal.positive : s.ai.feedbackModal.negative, d = W(() => {
2255
+ let [a, o] = q(""), s = t(), { title: c, label: l, placeholder: u } = r === "like" ? s.ai.feedbackModal.positive : s.ai.feedbackModal.negative, d = U(() => {
2256
2256
  n(i, a);
2257
2257
  }, [
2258
2258
  a,
@@ -2261,14 +2261,14 @@ var Si = Bt(void 0), Ci = () => Ut(Si), wi = (e) => /* @__PURE__ */ Y(Qe, {
2261
2261
  ]), f = () => {
2262
2262
  e(i);
2263
2263
  };
2264
- return G(() => {
2264
+ return W(() => {
2265
2265
  let e = (e) => {
2266
2266
  e.key === "Enter" && (e.preventDefault(), d());
2267
2267
  };
2268
2268
  return document.addEventListener("keydown", e), () => {
2269
2269
  document.removeEventListener("keydown", e);
2270
2270
  };
2271
- }, [d]), /* @__PURE__ */ Y(xe, {
2271
+ }, [d]), /* @__PURE__ */ Y(ke, {
2272
2272
  position: "center",
2273
2273
  isOpen: !0,
2274
2274
  onClose: f,
@@ -2285,7 +2285,7 @@ var Si = Bt(void 0), Ci = () => Ut(Si), wi = (e) => /* @__PURE__ */ Y(Qe, {
2285
2285
  },
2286
2286
  children: /* @__PURE__ */ Y("div", {
2287
2287
  className: "flex flex-col gap-6",
2288
- children: /* @__PURE__ */ Y(B, {
2288
+ children: /* @__PURE__ */ Y(ge, {
2289
2289
  autoFocus: !0,
2290
2290
  label: l,
2291
2291
  placeholder: u,
@@ -2296,8 +2296,8 @@ var Si = Bt(void 0), Ci = () => Ut(Si), wi = (e) => /* @__PURE__ */ Y(Qe, {
2296
2296
  })
2297
2297
  })
2298
2298
  });
2299
- }, Di = Bt(null), Oi = ({ children: e }) => {
2300
- let [t, n] = J(null), r = t ? {
2299
+ }, Di = Vt(null), Oi = ({ children: e }) => {
2300
+ let [t, n] = q(null), r = t ? {
2301
2301
  isOpen: !0,
2302
2302
  currentReaction: t.action,
2303
2303
  currentMessage: t.message,
@@ -2321,7 +2321,7 @@ var Si = Bt(void 0), Ci = () => Ut(Si), wi = (e) => /* @__PURE__ */ Y(Qe, {
2321
2321
  children: e
2322
2322
  });
2323
2323
  }, ki = () => {
2324
- let e = Ut(Di);
2324
+ let e = Wt(Di);
2325
2325
  if (e === null) throw Error("useFeedbackModal must be used within a FeedbackModalProvider");
2326
2326
  return e;
2327
2327
  };
@@ -2346,11 +2346,11 @@ function Ai(e) {
2346
2346
  //#endregion
2347
2347
  //#region src/addons/ai/ai/F0AiMessagesContainer/components/feedback/TurnFeedback.tsx
2348
2348
  var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2349
- let i = t(), { open: a } = ki(), [o, c] = J(null);
2349
+ let i = t(), { open: a } = ki(), [o, c] = q(null);
2350
2350
  return /* @__PURE__ */ X("div", {
2351
2351
  className: "flex",
2352
2352
  children: [
2353
- /* @__PURE__ */ Y(he, {
2353
+ /* @__PURE__ */ Y($e, {
2354
2354
  size: "md",
2355
2355
  variant: "ghost",
2356
2356
  valueToCopy: e,
@@ -2369,9 +2369,9 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2369
2369
  "aria-label": i.actions.thumbsUp,
2370
2370
  children: /* @__PURE__ */ Y("div", {
2371
2371
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
2372
- children: /* @__PURE__ */ Y(H, {
2372
+ children: /* @__PURE__ */ Y(V, {
2373
2373
  size: "md",
2374
- icon: o === "like" ? Je : je,
2374
+ icon: o === "like" ? Xe : ye,
2375
2375
  color: "default"
2376
2376
  })
2377
2377
  })
@@ -2387,9 +2387,9 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2387
2387
  "aria-label": i.actions.thumbsDown,
2388
2388
  children: /* @__PURE__ */ Y("div", {
2389
2389
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
2390
- children: /* @__PURE__ */ Y(H, {
2390
+ children: /* @__PURE__ */ Y(V, {
2391
2391
  size: "md",
2392
- icon: o === "dislike" ? ve : Ue,
2392
+ icon: o === "dislike" ? Te : Ve,
2393
2393
  color: "default"
2394
2394
  })
2395
2395
  })
@@ -2413,20 +2413,20 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2413
2413
  "after:bottom-0"
2414
2414
  ])
2415
2415
  }), Ni = ({ icon: e, title: t, children: n, open: r, defaultOpen: a = !1, onOpenChange: o, lockOpen: s = !1 }) => {
2416
- let [u, d] = J(a), f = l(), p = r !== void 0, m = p ? r : u;
2417
- return /* @__PURE__ */ X(Ke, {
2416
+ let [u, d] = q(a), f = l(), p = r !== void 0, m = p ? r : u;
2417
+ return /* @__PURE__ */ X(Ce, {
2418
2418
  className: "mb-1 w-full",
2419
2419
  open: m,
2420
2420
  onOpenChange: (e) => {
2421
2421
  s || (p || d(e), o?.(e));
2422
2422
  },
2423
- children: [/* @__PURE__ */ X(fe, {
2423
+ children: [/* @__PURE__ */ X(Re, {
2424
2424
  disabled: s,
2425
2425
  className: i("gap-1", s ? "flex w-full items-center text-base text-f1-foreground-secondary" : "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90"),
2426
2426
  children: [
2427
2427
  /* @__PURE__ */ Y("span", {
2428
2428
  className: "flex items-center justify-start h-6 w-6",
2429
- children: /* @__PURE__ */ Y(H, {
2429
+ children: /* @__PURE__ */ Y(V, {
2430
2430
  icon: e,
2431
2431
  className: "block"
2432
2432
  })
@@ -2435,9 +2435,9 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2435
2435
  className: "min-h-6 flex items-center",
2436
2436
  children: /* @__PURE__ */ Y("span", { children: t })
2437
2437
  }),
2438
- s ? null : /* @__PURE__ */ Y(H, { icon: Mt })
2438
+ s ? null : /* @__PURE__ */ Y(V, { icon: Nt })
2439
2439
  ]
2440
- }), /* @__PURE__ */ Y(M, {
2440
+ }), /* @__PURE__ */ Y(qe, {
2441
2441
  forceMount: !0,
2442
2442
  className: "data-[state=open]:mt-3",
2443
2443
  children: /* @__PURE__ */ Y(c.div, {
@@ -2462,8 +2462,8 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2462
2462
  })]
2463
2463
  });
2464
2464
  }, Pi = 1e3, Fi = 1e3, Ii = ({ startedAt: e }) => {
2465
- let n = t(), [r, i] = J(() => e === null ? 0 : Date.now() - e);
2466
- if (G(() => {
2465
+ let n = t(), [r, i] = q(() => e === null ? 0 : Date.now() - e);
2466
+ if (W(() => {
2467
2467
  if (e === null) {
2468
2468
  i(0);
2469
2469
  return;
@@ -2487,13 +2487,13 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2487
2487
  }), c]
2488
2488
  });
2489
2489
  }, Li = ({ titles: e, title: n, inProgress: r, isWriting: i, startedAt: a = null }) => {
2490
- let o = t(), [s, c] = J(!!r), l = q(r);
2491
- G(() => {
2490
+ let o = t(), [s, c] = q(!!r), l = K(r);
2491
+ W(() => {
2492
2492
  l.current && !r ? c(!1) : r && !s && c(!0), l.current = r;
2493
2493
  }, [r, s]);
2494
2494
  let u = r ? o.ai.thoughtsGroupTitle : n ?? o.ai.thoughtsGroupTitle, d = e.length - 1, f = (e) => !r || i ? "completed" : e === d ? "executing" : "completed";
2495
2495
  return /* @__PURE__ */ Y(Ni, {
2496
- icon: Ne,
2496
+ icon: xe,
2497
2497
  title: u,
2498
2498
  open: s,
2499
2499
  onOpenChange: c,
@@ -2502,7 +2502,7 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2502
2502
  className: "flex flex-col gap-3 pb-4",
2503
2503
  children: e.map((t, n) => /* @__PURE__ */ X("div", {
2504
2504
  className: "relative",
2505
- children: [/* @__PURE__ */ Y(I, {
2505
+ children: [/* @__PURE__ */ Y(ce, {
2506
2506
  title: t,
2507
2507
  status: f(n),
2508
2508
  suffix: f(n) === "executing" ? /* @__PURE__ */ Y(Ii, { startedAt: a }) : void 0,
@@ -2514,24 +2514,24 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2514
2514
  }, n))
2515
2515
  })
2516
2516
  });
2517
- }, Ri = (e) => /* @__PURE__ */ Y(Qe, {
2517
+ }, Ri = (e) => /* @__PURE__ */ Y(re, {
2518
2518
  content: e,
2519
2519
  format: "markdown"
2520
2520
  }), zi = ({ text: e, renderMarkdown: t }) => /* @__PURE__ */ X("div", {
2521
2521
  className: "flex max-w-[90%] items-start gap-2 self-end pb-1 pr-2 text-f1-foreground-tertiary",
2522
2522
  children: [/* @__PURE__ */ Y("div", {
2523
2523
  className: "flex h-5 items-center",
2524
- children: /* @__PURE__ */ Y(H, { icon: et })
2524
+ children: /* @__PURE__ */ Y(V, { icon: F })
2525
2525
  }), /* @__PURE__ */ Y("div", {
2526
2526
  className: "min-w-0 whitespace-pre-wrap text-base leading-5 [&>div]:flex [&>div]:flex-col [&>div]:gap-1 [&_p]:m-0",
2527
2527
  children: (t ?? Ri)(e)
2528
2528
  })]
2529
2529
  }), Bi = ({ message: e, onReplyQuote: t, autoScrollIntoView: n = !0, renderMarkdown: r }) => {
2530
- let i = q(null), a = q(null), o = q(n);
2531
- G(() => {
2530
+ let i = K(null), a = K(null), o = K(n);
2531
+ W(() => {
2532
2532
  o.current && i.current?.scrollIntoView({ behavior: "smooth" });
2533
2533
  }, []);
2534
- let s = e?.content, c = e?.rawData, l = K(() => Pr({
2534
+ let s = e?.content, c = e?.rawData, l = G(() => Pr({
2535
2535
  content: s,
2536
2536
  rawData: c
2537
2537
  }), [s, c]), u = (Fr(s, "user") ?? "").trim(), d = e?.replyQuote ?? null, f = u.length > 0, { anchor: p, clear: m } = vi({
@@ -2588,10 +2588,10 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2588
2588
  })]
2589
2589
  }, n);
2590
2590
  }, qi = ({ messages: e, caption: t, subtitle: n, cta: r, onClick: a, fullscreen: o = !1 }) => {
2591
- let [s, c] = J(0), [d, f] = J(0), [p, m] = J("starting"), h = l(), g = e[s] ?? "", _ = e.join("\0"), v = q(!0);
2592
- return G(() => {
2591
+ let [s, c] = q(0), [d, f] = q(0), [p, m] = q("starting"), h = l(), g = e[s] ?? "", _ = e.join("\0"), v = K(!0);
2592
+ return W(() => {
2593
2593
  v.current ? v.current = !1 : (c(0), f(0), m("writing"));
2594
- }, [_]), G(() => {
2594
+ }, [_]), W(() => {
2595
2595
  if (h) return;
2596
2596
  let t;
2597
2597
  if (p === "starting") t = setTimeout(() => m("writing"), Ui);
@@ -2641,7 +2641,7 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2641
2641
  ]
2642
2642
  })
2643
2643
  });
2644
- }, Ji = zt.settleMs, Yi = 1e3, Xi = 2, Zi = "data-ai-anchor", Qi = "data-turn-index", $i = (e) => {
2644
+ }, Ji = Bt.settleMs, Yi = 1e3, Xi = 2, Zi = "data-ai-anchor", Qi = "data-turn-index", $i = (e) => {
2645
2645
  if (!e) return null;
2646
2646
  let t = e.closest(`[${Zi}]`);
2647
2647
  if (t) return t;
@@ -2652,7 +2652,7 @@ var ji = ({ content: e, targetMessage: n, onCopy: r }) => {
2652
2652
  return r.parentElement === n ? r : n;
2653
2653
  }, ea = (e, t) => t.getBoundingClientRect().top - e.getBoundingClientRect().top, ta = (e) => e.scrollHeight - e.scrollTop - e.clientHeight <= Xi;
2654
2654
  function na({ viewportRef: e, contentRef: t }) {
2655
- G(() => {
2655
+ W(() => {
2656
2656
  let n = e.current, r = t.current;
2657
2657
  if (!n || !r || typeof ResizeObserver > "u") return;
2658
2658
  let i = n.clientWidth, a = null, o, s = !1, c = null, l = () => {
@@ -2715,20 +2715,20 @@ function na({ viewportRef: e, contentRef: t }) {
2715
2715
  //#endregion
2716
2716
  //#region src/addons/ai/ai/F0AiMessagesContainer/hooks/useThinkingClock.ts
2717
2717
  var ra = (e, t) => {
2718
- let [n, r] = J(null);
2719
- return G(() => {
2718
+ let [n, r] = q(null);
2719
+ return W(() => {
2720
2720
  r(e ? (e) => e ?? t ?? Date.now() : null);
2721
2721
  }, [e, t]), n;
2722
2722
  };
2723
2723
  //#endregion
2724
2724
  //#region src/addons/ai/ai/F0AiMessagesContainer/useMessageScroll.ts
2725
2725
  function ia({ viewportRef: e, contentRef: t, endRef: n, lastTurnRef: r, turnsCount: i, freezeTurnMinHeight: a = !1 }) {
2726
- let [o, s] = J(0), [c, l] = J(!1), u = q(i), d = q(a);
2726
+ let [o, s] = q(0), [c, l] = q(!1), u = K(i), d = K(a);
2727
2727
  d.current = a;
2728
- let f = W((e = "smooth") => {
2728
+ let f = U((e = "smooth") => {
2729
2729
  n.current?.scrollIntoView({ behavior: e });
2730
2730
  }, [n]);
2731
- G(() => {
2731
+ W(() => {
2732
2732
  let n = e.current, r = t.current;
2733
2733
  if (!n || !r) return;
2734
2734
  let i = new ResizeObserver(() => {
@@ -2738,16 +2738,16 @@ function ia({ viewportRef: e, contentRef: t, endRef: n, lastTurnRef: r, turnsCou
2738
2738
  });
2739
2739
  return i.observe(n), i.observe(r), () => i.disconnect();
2740
2740
  }, [e, t]);
2741
- let p = W(() => {
2741
+ let p = U(() => {
2742
2742
  let t = e.current;
2743
2743
  if (!t) return;
2744
2744
  let { scrollTop: n, scrollHeight: r, clientHeight: i } = t, a = r - n - i;
2745
2745
  l(a > i);
2746
2746
  }, [e]);
2747
- return G(() => {
2747
+ return W(() => {
2748
2748
  let t = e.current;
2749
2749
  if (t) return t.addEventListener("scroll", p, { passive: !0 }), () => t.removeEventListener("scroll", p);
2750
- }, [p, e]), G(() => {
2750
+ }, [p, e]), W(() => {
2751
2751
  i > u.current && requestAnimationFrame(() => {
2752
2752
  requestAnimationFrame(() => {
2753
2753
  let t = e.current, n = r.current;
@@ -2776,28 +2776,28 @@ var aa = {
2776
2776
  onThumbsUp: () => {},
2777
2777
  onThumbsDown: () => {}
2778
2778
  }, oa = (e) => {
2779
- let t = He(), n = /* @__PURE__ */ Y(Oi, { children: /* @__PURE__ */ Y(sa, { ...e }) });
2780
- return e.filePreviews || !t.provided ? /* @__PURE__ */ Y(Ye, {
2779
+ let t = je(), n = /* @__PURE__ */ Y(Oi, { children: /* @__PURE__ */ Y(sa, { ...e }) });
2780
+ return e.filePreviews || !t.provided ? /* @__PURE__ */ Y(Ge, {
2781
2781
  filePreviews: e.filePreviews,
2782
2782
  children: n
2783
2783
  }) : n;
2784
2784
  }, sa = ({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a, initialMessageCaption: o, initialMessageSubtitle: s, initialMessageCta: l, onWelcomeClick: d, renderToolCall: f, onReplyQuote: m, onAssistantMessageRendered: h, autoScrollUserIntoView: g = !0, renderMarkdown: _, feedback: v, freezeLayout: y = !1, noShadows: b = !1, fullscreen: x = !1, children: S, AssistantMessage: C, UserMessage: w, onRegenerate: T, onCopy: E }) => {
2785
- let { modal: D, handleSubmit: O, handleClose: k } = Ai(v ?? aa), A = t(), j = C ?? Ti, M = w ?? Bi, N = K(() => {
2785
+ let { modal: D, handleSubmit: O, handleClose: k } = Ai(v ?? aa), A = t(), j = C ?? Ti, M = w ?? Bi, N = G(() => {
2786
2786
  let e = a ?? A.ai.defaultInitialMessage;
2787
2787
  return (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "string" && e.length > 0);
2788
- }, [a, A.ai.defaultInitialMessage]), P = !n && e.length === 0 && N.length > 0, F = q(null), L = q(null), ee = q(null), te = q(null), R = q(null), { showScrollBtn: ne, turnMinHeight: z, scrollToBottom: re } = ia({
2788
+ }, [a, A.ai.defaultInitialMessage]), P = !n && e.length === 0 && N.length > 0, F = K(null), I = K(null), ee = K(null), te = K(null), ne = K(null), { showScrollBtn: L, turnMinHeight: re, scrollToBottom: R } = ia({
2789
2789
  viewportRef: F,
2790
- contentRef: L,
2790
+ contentRef: I,
2791
2791
  endRef: ee,
2792
- lastTurnRef: R,
2792
+ lastTurnRef: ne,
2793
2793
  turnsCount: e.length,
2794
2794
  freezeTurnMinHeight: y
2795
2795
  });
2796
2796
  na({
2797
2797
  viewportRef: F,
2798
- contentRef: L
2798
+ contentRef: I
2799
2799
  });
2800
- let B = e[e.length - 1], ie = ra(!(!B || B.endIndicator !== "thinking" && !B.thinking?.inProgress), B?.thinking?.startedAt), V = B?.endIndicator === "asking", ae = (t, n) => {
2800
+ let z = e[e.length - 1], ie = ra(!(!z || z.endIndicator !== "thinking" && !z.thinking?.inProgress), z?.thinking?.startedAt), ae = z?.endIndicator === "asking", oe = (t, n) => {
2801
2801
  let r = n === e.length - 1, a = {
2802
2802
  renderToolCall: f,
2803
2803
  onReplyQuote: m,
@@ -2838,10 +2838,10 @@ var aa = {
2838
2838
  }, `${n}-a-${i}`);
2839
2839
  };
2840
2840
  return /* @__PURE__ */ X("div", {
2841
- ref: r ? R : void 0,
2841
+ ref: r ? ne : void 0,
2842
2842
  className: i("flex flex-col items-start justify-start gap-2 px-1", r && "pb-5"),
2843
2843
  [Qi]: n,
2844
- style: { minHeight: r && z || void 0 },
2844
+ style: { minHeight: r && re || void 0 },
2845
2845
  children: [
2846
2846
  t.userMessages.map((e, t) => o(e, t)),
2847
2847
  t.thinking && t.thinking.titles.length > 0 ? /* @__PURE__ */ Y(Li, {
@@ -2852,13 +2852,13 @@ var aa = {
2852
2852
  startedAt: r ? ie : null
2853
2853
  }) : null,
2854
2854
  t.assistantMessages.map((e, t) => s(e, t)),
2855
- t.endIndicator === "thinking" ? /* @__PURE__ */ Y(I, {
2855
+ t.endIndicator === "thinking" ? /* @__PURE__ */ Y(ce, {
2856
2856
  title: A.ai.thinking,
2857
2857
  status: "executing",
2858
2858
  suffix: /* @__PURE__ */ Y(Ii, { startedAt: ie })
2859
2859
  }) : null,
2860
- t.endIndicator === "activity" ? /* @__PURE__ */ Y(I, { status: "writing" }) : null,
2861
- t.endIndicator === "asking" ? /* @__PURE__ */ Y(I, {
2860
+ t.endIndicator === "activity" ? /* @__PURE__ */ Y(ce, { status: "writing" }) : null,
2861
+ t.endIndicator === "asking" ? /* @__PURE__ */ Y(ce, {
2862
2862
  title: A.ai.askingQuestions,
2863
2863
  status: "asking"
2864
2864
  }) : null,
@@ -2871,19 +2871,19 @@ var aa = {
2871
2871
  ]
2872
2872
  }, `turn-${n}`);
2873
2873
  };
2874
- return /* @__PURE__ */ X(qt, { children: [/* @__PURE__ */ X("div", {
2874
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
2875
2875
  className: "relative flex flex-1 flex-col overflow-hidden",
2876
2876
  children: [
2877
2877
  /* @__PURE__ */ Y("div", {
2878
2878
  role: "status",
2879
2879
  className: "sr-only",
2880
- children: V ? A.ai.askingQuestions : ""
2880
+ children: ae ? A.ai.askingQuestions : ""
2881
2881
  }),
2882
2882
  /* @__PURE__ */ Y("div", {
2883
2883
  ref: F,
2884
2884
  className: i("flex-1 overflow-y-scroll [overflow-anchor:none]", "[scrollbar-width:thin] [scrollbar-color:transparent_transparent]", "hover:[scrollbar-color:var(--scrollbar-thumb)_transparent]", "[&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent", "[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-transparent", "hover:[&::-webkit-scrollbar-thumb]:bg-f1-background-inverse/30"),
2885
2885
  children: /* @__PURE__ */ X("div", {
2886
- ref: L,
2886
+ ref: I,
2887
2887
  className: "flex min-h-full flex-col items-center px-4 pb-[calc(1rem+var(--f0-ai-composer-overlap,0px))] pt-4",
2888
2888
  children: [
2889
2889
  /* @__PURE__ */ X("div", {
@@ -2898,7 +2898,7 @@ var aa = {
2898
2898
  onClick: d,
2899
2899
  fullscreen: x
2900
2900
  }) : null,
2901
- n ? null : e.map((e, t) => ae(e, t)),
2901
+ n ? null : e.map((e, t) => oe(e, t)),
2902
2902
  r
2903
2903
  ]
2904
2904
  }),
@@ -2912,7 +2912,7 @@ var aa = {
2912
2912
  ref: ee,
2913
2913
  children: S
2914
2914
  }),
2915
- /* @__PURE__ */ Y(p, { children: ne ? /* @__PURE__ */ Y(c.div, {
2915
+ /* @__PURE__ */ Y(p, { children: L ? /* @__PURE__ */ Y(c.div, {
2916
2916
  className: "sticky bottom-[calc(0.5rem+var(--f0-ai-composer-overlap,0px))] z-10 flex justify-center",
2917
2917
  initial: {
2918
2918
  opacity: 0,
@@ -2928,10 +2928,10 @@ var aa = {
2928
2928
  },
2929
2929
  transition: { duration: .2 },
2930
2930
  children: /* @__PURE__ */ Y(u, {
2931
- onClick: () => re(),
2931
+ onClick: () => R(),
2932
2932
  label: A.ai.scrollToBottom,
2933
2933
  variant: "neutral",
2934
- icon: _t,
2934
+ icon: vt,
2935
2935
  hideLabel: !0
2936
2936
  })
2937
2937
  }) : null })
@@ -2960,7 +2960,7 @@ var aa = {
2960
2960
  /* @__PURE__ */ Y(r, { className: "h-5 w-4/5 rounded-md" })
2961
2961
  ]
2962
2962
  })
2963
- }), ua = { ai: it.ai }, da = Bt(null);
2963
+ }), ua = { ai: at.ai }, da = Vt(null);
2964
2964
  function fa({ children: e, translations: t }) {
2965
2965
  return /* @__PURE__ */ Y(da.Provider, {
2966
2966
  value: t,
@@ -2968,14 +2968,14 @@ function fa({ children: e, translations: t }) {
2968
2968
  });
2969
2969
  }
2970
2970
  function pa() {
2971
- let e = Ut(da);
2971
+ let e = Wt(da);
2972
2972
  if (e === null) throw Error("useAiChatTranslations must be used within an AiChatTranslationsProvider");
2973
2973
  return e;
2974
2974
  }
2975
2975
  //#endregion
2976
2976
  //#region src/addons/ai/ai/F0AiChat/providers/useCanvasEntities.ts
2977
2977
  function ma() {
2978
- let { canvasEntities: e } = V();
2978
+ let { canvasEntities: e } = y();
2979
2979
  return e;
2980
2980
  }
2981
2981
  //#endregion
@@ -3011,15 +3011,15 @@ var ga = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
3011
3011
  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"),
3012
3012
  children: e ? /* @__PURE__ */ Y("div", { className: "h-2 w-2 rounded-full bg-f1-background" }) : null
3013
3013
  }), va = 132, ya = ({ mode: e, hasSelection: n, hasCustomText: r, customAnswerText: a, isCustomAnswerActive: o, canProceed: s, inputRef: c, onActivate: l, onChangeText: u, onToggleActive: d, onConfirm: f }) => {
3014
- let p = t().ai.clarifyingQuestion.typeYourAnswer, m = q(null), h = Ft(m, c);
3015
- Kt(() => {
3014
+ let p = t().ai.clarifyingQuestion.typeYourAnswer, m = K(null), h = It(m, c);
3015
+ qt(() => {
3016
3016
  let e = m.current;
3017
3017
  if (!e) return;
3018
3018
  e.style.height = "auto";
3019
3019
  let t = Math.min(e.scrollHeight, va);
3020
3020
  e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > va ? "auto" : "hidden";
3021
3021
  }, [a]);
3022
- let g = e === "single" ? /* @__PURE__ */ Y(_a, { isSelected: r && !n }) : /* @__PURE__ */ Y(Tt, {
3022
+ let g = e === "single" ? /* @__PURE__ */ Y(_a, { isSelected: r && !n }) : /* @__PURE__ */ Y(Et, {
3023
3023
  checked: o,
3024
3024
  onCheckedChange: () => d(!o),
3025
3025
  title: p,
@@ -3041,7 +3041,7 @@ var ga = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
3041
3041
  className: "min-w-0 flex-1 resize-none bg-transparent text-base text-f1-foreground outline-none placeholder:text-f1-foreground-tertiary"
3042
3042
  })]
3043
3043
  });
3044
- }, ba = U(({ option: e, isSelected: t, mode: n, isTabStop: r, onToggle: o, onKeyNavigate: s }, c) => n === "single" ? /* @__PURE__ */ X("div", {
3044
+ }, ba = H(({ option: e, isSelected: t, mode: n, isTabStop: r, onToggle: o, onKeyNavigate: s }, c) => n === "single" ? /* @__PURE__ */ X("div", {
3045
3045
  ref: c,
3046
3046
  role: "radio",
3047
3047
  "aria-checked": t,
@@ -3058,7 +3058,7 @@ var ga = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
3058
3058
  }) : /* @__PURE__ */ X("div", {
3059
3059
  ref: c,
3060
3060
  className: i("flex cursor-pointer items-center rounded-md pl-2 transition-[background-color,transform] hover:bg-f1-background-secondary active:scale-[0.99]"),
3061
- children: [/* @__PURE__ */ Y(Tt, {
3061
+ children: [/* @__PURE__ */ Y(Et, {
3062
3062
  checked: t,
3063
3063
  onCheckedChange: () => o(e.id),
3064
3064
  title: e.label,
@@ -3082,8 +3082,8 @@ var xa = [
3082
3082
  if (e !== "single") return 0;
3083
3083
  let t = n.findIndex((e) => r.includes(e.id));
3084
3084
  return t >= 0 ? t : 0;
3085
- })(), [x, S] = J(b), C = q([]);
3086
- G(() => {
3085
+ })(), [x, S] = q(b), C = K([]);
3086
+ W(() => {
3087
3087
  p && e === "single" && C.current[x]?.focus();
3088
3088
  }, []);
3089
3089
  let w = (t) => {
@@ -3179,7 +3179,7 @@ var xa = [
3179
3179
  disabled: r,
3180
3180
  label: l.ai.clarifyingQuestion.back,
3181
3181
  hideLabel: !0,
3182
- icon: yt
3182
+ icon: bt
3183
3183
  }),
3184
3184
  /* @__PURE__ */ Y("span", {
3185
3185
  className: "translate-y-px text-sm font-semibold text-f1-foreground-tertiary",
@@ -3193,7 +3193,7 @@ var xa = [
3193
3193
  disabled: i || !a,
3194
3194
  label: l.ai.clarifyingQuestion.next,
3195
3195
  hideLabel: !0,
3196
- icon: Mt
3196
+ icon: Nt
3197
3197
  })
3198
3198
  ]
3199
3199
  }) : null,
@@ -3204,7 +3204,7 @@ var xa = [
3204
3204
  onClick: c,
3205
3205
  label: l.actions.cancel,
3206
3206
  hideLabel: !0,
3207
- icon: F
3207
+ icon: se
3208
3208
  })
3209
3209
  ]
3210
3210
  });
@@ -3212,26 +3212,26 @@ var xa = [
3212
3212
  clarifyingQuestion: e,
3213
3213
  isSubmitDisabled: t
3214
3214
  }), ja = ({ clarifyingQuestion: e, isSubmitDisabled: n }) => {
3215
- let r = t(), i = l(), { currentStep: a, currentStepIndex: o, totalSteps: s, toggleOption: u, confirm: d, skip: f, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = a, D = q(null), O = S ?? "single", k = s > 1, A = o === 0, j = o === s - 1, M = k ? r.t("ai.clarifyingQuestion.stepOf", {
3215
+ let r = t(), i = l(), { currentStep: a, currentStepIndex: o, totalSteps: s, toggleOption: u, confirm: d, skip: f, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = a, D = K(null), O = S ?? "single", k = s > 1, A = o === 0, j = o === s - 1, M = k ? r.t("ai.clarifyingQuestion.stepOf", {
3216
3216
  current: String(o + 1),
3217
3217
  total: String(s)
3218
- }) : void 0, N = x.length > 0, P = (T ?? "").trim().length > 0, F = N || E && P || C === !0, I = n === !0 && j, L = () => {
3218
+ }) : void 0, N = x.length > 0, P = (T ?? "").trim().length > 0, F = N || E && P || C === !0, I = n === !0 && j, ee = () => {
3219
3219
  I || d();
3220
- }, ee = () => {
3220
+ }, te = () => {
3221
3221
  I || f();
3222
- }, te = (e) => {
3222
+ }, ne = (e) => {
3223
3223
  let t = O === "single" && x.includes(e);
3224
3224
  u(e), O === "single" && !j && !t && Promise.resolve().then(d);
3225
- }, R = j ? r.ai.clarifyingQuestion.submit : r.ai.clarifyingQuestion.next, ne = C === !0 && !N && !(E && P), z = () => {
3225
+ }, L = j ? r.ai.clarifyingQuestion.submit : r.ai.clarifyingQuestion.next, re = C === !0 && !N && !(E && P), R = () => {
3226
3226
  v(), requestAnimationFrame(() => {
3227
3227
  D.current?.focus();
3228
3228
  });
3229
- }, re = (e) => {
3229
+ }, z = (e) => {
3230
3230
  e.key === "Escape" && (e.preventDefault(), m());
3231
- }, B = i ? 0 : Oa, ie = i ? 0 : ka;
3231
+ }, ie = i ? 0 : Oa, ae = i ? 0 : ka;
3232
3232
  return /* @__PURE__ */ X("div", {
3233
3233
  className: "flex flex-col",
3234
- onKeyDown: re,
3234
+ onKeyDown: z,
3235
3235
  children: [/* @__PURE__ */ Y("div", {
3236
3236
  className: "flex flex-col gap-3 pt-3",
3237
3237
  children: /* @__PURE__ */ Y(p, {
@@ -3243,14 +3243,14 @@ var xa = [
3243
3243
  animate: {
3244
3244
  opacity: 1,
3245
3245
  transition: {
3246
- duration: B,
3246
+ duration: ie,
3247
3247
  ease: Da
3248
3248
  }
3249
3249
  },
3250
3250
  exit: {
3251
3251
  opacity: 0,
3252
3252
  transition: {
3253
- duration: ie,
3253
+ duration: ae,
3254
3254
  ease: Da
3255
3255
  }
3256
3256
  },
@@ -3275,21 +3275,21 @@ var xa = [
3275
3275
  isCustomAnswerActive: E,
3276
3276
  canProceed: F,
3277
3277
  customInputRef: D,
3278
- onToggleOption: te,
3279
- onActivateCustom: z,
3278
+ onToggleOption: ne,
3279
+ onActivateCustom: R,
3280
3280
  onChangeCustomText: g,
3281
3281
  onToggleCustomActive: _,
3282
- onConfirm: L
3282
+ onConfirm: ee
3283
3283
  })]
3284
3284
  }, o)
3285
3285
  })
3286
3286
  }), /* @__PURE__ */ Y(ga, {
3287
3287
  canProceed: F,
3288
3288
  submitDisabled: I,
3289
- label: R,
3290
- onConfirm: L,
3291
- onSkip: ee,
3292
- showSkip: ne
3289
+ label: L,
3290
+ onConfirm: ee,
3291
+ onSkip: te,
3292
+ showSkip: re
3293
3293
  })]
3294
3294
  });
3295
3295
  };
@@ -3615,22 +3615,22 @@ var za = class {
3615
3615
  repeatType: "mirror"
3616
3616
  };
3617
3617
  function Ka(e) {
3618
- let [t, n] = J(e), r = Be(e), i = q(null);
3618
+ let [t, n] = q(e), r = ne(e), i = K(null);
3619
3619
  return Xt(r, "change", (e) => n(e)), {
3620
3620
  value: t,
3621
3621
  motionValue: r,
3622
3622
  controls: i,
3623
- animate: W((e, t) => {
3624
- i.current = We(r, e, t);
3623
+ animate: U((e, t) => {
3624
+ i.current = et(r, e, t);
3625
3625
  }, [r])
3626
3626
  };
3627
3627
  }
3628
3628
  function qa(e, t) {
3629
- let [n, r] = J(Ba), { value: i, animate: a, motionValue: o } = Ka(Ua), { value: s, animate: c } = Ka(Va), { value: l, animate: u } = Ka(Ha), { value: d, animate: f } = Ka(Wa), p = Yt(t, {
3629
+ let [n, r] = q(Ba), { value: i, animate: a, motionValue: o } = Ka(Ua), { value: s, animate: c } = Ka(Va), { value: l, animate: u } = Ka(Ha), { value: d, animate: f } = Ka(Wa), p = Yt(t, {
3630
3630
  fftSize: 512,
3631
3631
  smoothingTimeConstant: .55
3632
3632
  });
3633
- return G(() => {
3633
+ return W(() => {
3634
3634
  switch (e) {
3635
3635
  case "idle":
3636
3636
  case "failed":
@@ -3660,7 +3660,7 @@ function qa(e, t) {
3660
3660
  c,
3661
3661
  u,
3662
3662
  f
3663
- ]), G(() => {
3663
+ ]), W(() => {
3664
3664
  e === "speaking" && p > 0 && !o.isAnimating() && a(.2 + .2 * p, { duration: 0 });
3665
3665
  }, [
3666
3666
  e,
@@ -3834,7 +3834,7 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
3834
3834
  0,
3835
3835
  1
3836
3836
  ], precision: a = "highp", style: o, contextAttributes: s = {}, lerp: c = 1, devicePixelRatio: l = 1, onDoneLoadingTextures: u, onError: d = console.error, onWarning: f = console.warn }) {
3837
- 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({
3837
+ let p = K(null), m = K(null), h = K(null), g = K(null), _ = K(void 0), v = K(void 0), y = K(!1), b = K(void 0), x = K(0), S = K([0, 0]), C = K([]), w = K(0), T = K(void 0), E = K({
3838
3838
  [Qa]: {
3839
3839
  type: "float",
3840
3840
  isNeeded: !1,
@@ -3885,7 +3885,7 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
3885
3885
  0
3886
3886
  ]
3887
3887
  }
3888
- }), D = q(r), O = (e, t) => {
3888
+ }), D = K(r), O = (e, t) => {
3889
3889
  let n = "width" in e ? e.width ?? 0 : 0, r = "height" in e ? e.height ?? 0 : 0, i = E.current.iChannelResolution;
3890
3890
  if (!i) return;
3891
3891
  Array.isArray(i.value) || (i.value = []);
@@ -3952,12 +3952,12 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
3952
3952
  n.deleteShader(r), d?.($(`Shader compiler log: ${e}`));
3953
3953
  }
3954
3954
  return r;
3955
- }, L = (e, t) => {
3955
+ }, ee = (e, t) => {
3956
3956
  let n = m.current;
3957
3957
  if (!n) return;
3958
3958
  let r = I(n.FRAGMENT_SHADER, e), i = I(n.VERTEX_SHADER, t);
3959
3959
  g.current = n.createProgram(), g.current && i && r && (n.attachShader(g.current, i), n.attachShader(g.current, r), n.linkProgram(g.current), n.getProgramParameter(g.current, n.LINK_STATUS) ? (n.useProgram(g.current), _.current = n.getAttribLocation(g.current, "aVertexPosition"), n.enableVertexAttribArray(_.current)) : d?.($(`Unable to initialize the shader program: ${n.getProgramInfoLog(g.current)}`)));
3960
- }, ee = () => {
3960
+ }, te = () => {
3961
3961
  if (r) for (let e of Object.keys(r)) {
3962
3962
  let t = r[e];
3963
3963
  if (!t) continue;
@@ -3971,7 +3971,7 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
3971
3971
  ...o ? { arraySize: o } : {}
3972
3972
  };
3973
3973
  }
3974
- }, te = () => {
3974
+ }, ne = () => {
3975
3975
  let e = m.current;
3976
3976
  if (e) {
3977
3977
  if (n && n.length > 0) {
@@ -3992,7 +3992,7 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
3992
3992
  });
3993
3993
  } else u && u();
3994
3994
  }
3995
- }, R = (e) => {
3995
+ }, L = (e) => {
3996
3996
  let t = Ja.includes(a ?? "highp"), n = `precision ${t ? a : Ja[1]} float;\n`;
3997
3997
  t || f?.($(`wrong precision type ${a}, please make sure to pass one of a valid precision lowp, mediump, highp, by default you shader precision will be set to highp.`));
3998
3998
  let r = n.concat(`#define DPR ${l.toFixed(1)}\n`).concat(e.replace(/texture\(/g, "texture2D("));
@@ -4002,7 +4002,7 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
4002
4002
  r = So(r, `uniform ${e.type} ${t}${e.arraySize || ""}; \n`, r.lastIndexOf(n) + n.length), e.isNeeded = !0;
4003
4003
  }
4004
4004
  return e.includes("mainImage") && (r = r.concat(Ya)), r;
4005
- }, ne = (e) => {
4005
+ }, re = (e) => {
4006
4006
  let t = m.current;
4007
4007
  if (!t || !g.current) return;
4008
4008
  let n = w.current ? (e - w.current) / 1e3 : 0;
@@ -4061,31 +4061,31 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
4061
4061
  t.activeTexture(t.TEXTURE0 + e), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(s, e), r && n.updateTexture(i, a, o);
4062
4062
  }
4063
4063
  }
4064
- }, z = (e) => {
4064
+ }, R = (e) => {
4065
4065
  let t = m.current;
4066
4066
  if (!t) return;
4067
- t.viewport(0, 0, t.drawingBufferWidth, t.drawingBufferHeight), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT), t.bindBuffer(t.ARRAY_BUFFER, h.current), t.vertexAttribPointer(_.current ?? 0, 3, t.FLOAT, !1, 0, 0), ne(e), t.drawArrays(t.TRIANGLE_STRIP, 0, 4);
4067
+ t.viewport(0, 0, t.drawingBufferWidth, t.drawingBufferHeight), t.clear(t.COLOR_BUFFER_BIT | t.DEPTH_BUFFER_BIT), t.bindBuffer(t.ARRAY_BUFFER, h.current), t.vertexAttribPointer(_.current ?? 0, 3, t.FLOAT, !1, 0, 0), re(e), t.drawArrays(t.TRIANGLE_STRIP, 0, 4);
4068
4068
  let n = E.current.iMouse?.value;
4069
4069
  if (E.current.iMouse?.isNeeded && c !== 1 && Array.isArray(n)) {
4070
4070
  let e = n[0] ?? 0, t = n[1] ?? 0;
4071
4071
  n[0] = xo(e, S.current[0] ?? 0, c), n[1] = xo(t, S.current[1] ?? 0, c);
4072
4072
  }
4073
- v.current = requestAnimationFrame(z);
4074
- }, re = () => {
4073
+ v.current = requestAnimationFrame(R);
4074
+ }, z = () => {
4075
4075
  let e = { passive: !0 };
4076
4076
  E.current.iMouse?.isNeeded && p.current && (p.current.addEventListener("mousemove", N, e), p.current.addEventListener("mouseout", P, e), p.current.addEventListener("mouseup", P, e), p.current.addEventListener("mousedown", M, e), p.current.addEventListener("touchmove", N, e), p.current.addEventListener("touchend", P, e), p.current.addEventListener("touchstart", M, e)), E.current.iDeviceOrientation?.isNeeded && window.addEventListener("deviceorientation", j, e), p.current && (T.current = new ResizeObserver(F), T.current.observe(p.current), window.addEventListener("resize", F, e));
4077
- }, B = () => {
4077
+ }, ie = () => {
4078
4078
  let e = { passive: !0 };
4079
4079
  E.current.iMouse?.isNeeded && p.current && (p.current.removeEventListener("mousemove", N, e), p.current.removeEventListener("mouseout", P, e), p.current.removeEventListener("mouseup", P, e), p.current.removeEventListener("mousedown", M, e), p.current.removeEventListener("touchmove", N, e), p.current.removeEventListener("touchend", P, e), p.current.removeEventListener("touchstart", M, e)), E.current.iDeviceOrientation?.isNeeded && window.removeEventListener("deviceorientation", j, e), T.current && (T.current.disconnect(), window.removeEventListener("resize", F, e));
4080
4080
  };
4081
- return G(() => {
4081
+ return W(() => {
4082
4082
  D.current = r;
4083
- }, [r]), G(() => {
4083
+ }, [r]), W(() => {
4084
4084
  let n = C.current;
4085
4085
  function r() {
4086
4086
  k();
4087
4087
  let n = m.current;
4088
- n && p.current && (n.clearColor(...i), n.clearDepth(1), n.enable(n.DEPTH_TEST), n.depthFunc(n.LEQUAL), n.viewport(0, 0, p.current.width, p.current.height), p.current.height = p.current.clientHeight, p.current.width = p.current.clientWidth, ee(), te(), L(R(e || Xa), t || Za), A(), requestAnimationFrame(z), re(), F());
4088
+ n && p.current && (n.clearColor(...i), n.clearDepth(1), n.enable(n.DEPTH_TEST), n.depthFunc(n.LEQUAL), n.viewport(0, 0, p.current.width, p.current.height), p.current.height = p.current.clientHeight, p.current.width = p.current.clientWidth, te(), ne(), ee(L(e || Xa), t || Za), A(), requestAnimationFrame(R), z(), F());
4089
4089
  }
4090
4090
  return requestAnimationFrame(r), () => {
4091
4091
  let e = m.current;
@@ -4093,7 +4093,7 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
4093
4093
  if (e.getExtension("WEBGL_lose_context")?.loseContext(), e.useProgram(null), e.deleteProgram(g.current ?? null), n.length > 0) for (let t of n) e.deleteTexture(t._webglTexture);
4094
4094
  g.current = null;
4095
4095
  }
4096
- B(), cancelAnimationFrame(v.current ?? 0);
4096
+ ie(), cancelAnimationFrame(v.current ?? 0);
4097
4097
  };
4098
4098
  }, []), /* @__PURE__ */ Y("canvas", {
4099
4099
  ref: p,
@@ -4106,7 +4106,7 @@ function Co({ fs: e, vs: t = Za, textures: n = [], uniforms: r, clearColor: i =
4106
4106
  }
4107
4107
  //#endregion
4108
4108
  //#region src/addons/ai/ai/F0AuraVoiceAnimation/components/shaderSource.ts
4109
- var wo = "\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}", To = rt({
4109
+ var wo = "\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}", To = it({
4110
4110
  base: "aspect-square",
4111
4111
  variants: { size: {
4112
4112
  icon: "h-[24px]",
@@ -4129,7 +4129,7 @@ function Eo(e) {
4129
4129
  }
4130
4130
  }
4131
4131
  function Do({ 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 }) {
4132
- let p = K(() => Eo(o), [o]);
4132
+ let p = G(() => Eo(o), [o]);
4133
4133
  return /* @__PURE__ */ Y("div", {
4134
4134
  ref: u,
4135
4135
  className: d,
@@ -4232,7 +4232,7 @@ function Oo({ size: e = "lg", state: t, color: n, colorShift: r = .05, audioTrac
4232
4232
  }
4233
4233
  //#endregion
4234
4234
  //#region src/blocks/ai/F0HILActionConfirmation/F0HILActionConfirmation.tsx
4235
- var ko = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm: i, cancelText: a, onCancel: o, stackAt: s = "sm" }) => /* @__PURE__ */ Y(T, {
4235
+ var ko = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm: i, cancelText: a, onCancel: o, stackAt: s = "sm" }) => /* @__PURE__ */ Y(x, {
4236
4236
  title: e,
4237
4237
  description: t,
4238
4238
  avatar: n,
@@ -4245,7 +4245,7 @@ var ko = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4245
4245
  label: a,
4246
4246
  onClick: o
4247
4247
  }
4248
- }), Ao = rt({
4248
+ }), Ao = it({
4249
4249
  base: [
4250
4250
  "relative flex flex-col rounded-2xl bg-f1-background",
4251
4251
  "border border-solid border-f1-border-secondary",
@@ -4257,9 +4257,9 @@ var ko = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4257
4257
  false: "hover:shadow-md"
4258
4258
  } },
4259
4259
  defaultVariants: { selected: !1 }
4260
- }), jo = rt({ base: "text-lg font-semibold text-f1-foreground line-clamp-3" }), Mo = rt({ base: "text-sm text-f1-foreground-secondary leading-normal" }), No = rt({ base: "text-sm font-medium text-f1-foreground leading-normal" }), Po = ({ description: e, isRevealed: n, onAskOne: r }) => {
4260
+ }), jo = it({ base: "text-lg font-semibold text-f1-foreground line-clamp-3" }), Mo = it({ base: "text-sm text-f1-foreground-secondary leading-normal" }), No = it({ base: "text-sm font-medium text-f1-foreground leading-normal" }), Po = ({ description: e, isRevealed: n, onAskOne: r }) => {
4261
4261
  let a = t(), o = l();
4262
- return /* @__PURE__ */ X(qt, { children: [e ? /* @__PURE__ */ Y("span", {
4262
+ return /* @__PURE__ */ X(J, { children: [e ? /* @__PURE__ */ Y("span", {
4263
4263
  className: i(Mo(), "truncate"),
4264
4264
  children: e
4265
4265
  }) : null, /* @__PURE__ */ Y(p, { children: r && n ? /* @__PURE__ */ Y(c.div, {
@@ -4276,7 +4276,7 @@ var ko = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4276
4276
  1
4277
4277
  ]
4278
4278
  },
4279
- children: /* @__PURE__ */ Y(k, {
4279
+ children: /* @__PURE__ */ Y(le, {
4280
4280
  size: "md",
4281
4281
  label: a.ai.ask,
4282
4282
  onClick: (e) => {
@@ -4297,7 +4297,7 @@ var ko = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4297
4297
  className: i(No()),
4298
4298
  children: e
4299
4299
  }) : null]
4300
- }), Lo = ({ balance: e }) => /* @__PURE__ */ Y(vt, {
4300
+ }), Lo = ({ balance: e }) => /* @__PURE__ */ Y(yt, {
4301
4301
  amount: e.amount,
4302
4302
  percentage: e.percentage ?? void 0,
4303
4303
  invertStatus: e.invertStatus,
@@ -4306,32 +4306,32 @@ var ko = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4306
4306
  let { label: t } = e;
4307
4307
  return e.content === "person" ? /* @__PURE__ */ Y(Io, {
4308
4308
  label: t,
4309
- children: /* @__PURE__ */ Y(ft, {
4309
+ children: /* @__PURE__ */ Y(pt, {
4310
4310
  firstName: e.avatar.firstName,
4311
4311
  lastName: e.avatar.lastName,
4312
4312
  src: e.avatar.src,
4313
4313
  size: "xs"
4314
4314
  })
4315
- }) : e.content === "people" ? /* @__PURE__ */ Y(mt, {
4315
+ }) : e.content === "people" ? /* @__PURE__ */ Y(ht, {
4316
4316
  type: "person",
4317
4317
  avatars: e.avatars,
4318
4318
  size: "md",
4319
4319
  max: 3
4320
4320
  }) : e.content === "team" ? /* @__PURE__ */ Y(Io, {
4321
4321
  label: t,
4322
- children: /* @__PURE__ */ Y(ht, {
4322
+ children: /* @__PURE__ */ Y(gt, {
4323
4323
  name: e.avatar.name,
4324
4324
  src: e.avatar.src,
4325
4325
  size: "xs"
4326
4326
  })
4327
4327
  }) : e.content === "company" ? /* @__PURE__ */ Y(Io, {
4328
4328
  label: t,
4329
- children: /* @__PURE__ */ Y(at, {
4329
+ children: /* @__PURE__ */ Y(ot, {
4330
4330
  name: e.avatar.name,
4331
4331
  src: e.avatar.src,
4332
4332
  size: "xs"
4333
4333
  })
4334
- }) : e.content === "alert" ? /* @__PURE__ */ Y(bt, {
4334
+ }) : e.content === "alert" ? /* @__PURE__ */ Y(xt, {
4335
4335
  text: e.alertLabel,
4336
4336
  level: e.level
4337
4337
  }) : e.content === "balance" ? /* @__PURE__ */ Y(Lo, { balance: e.balance }) : null;
@@ -4397,17 +4397,17 @@ var Ho = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4397
4397
  children: e
4398
4398
  });
4399
4399
  }, Wo = ({ data: e, label: t, invertStatus: n }) => {
4400
- let r = `sparkline-gradient-${Wt().replace(/:/g, "")}`, i = Vo(e, n), a = Bo[i];
4400
+ let r = `sparkline-gradient-${Gt().replace(/:/g, "")}`, i = Vo(e, n), a = Bo[i];
4401
4401
  return /* @__PURE__ */ Y("div", {
4402
4402
  className: "flex flex-1 flex-col",
4403
4403
  children: /* @__PURE__ */ X("div", {
4404
4404
  className: "relative w-full flex-1",
4405
4405
  role: "img",
4406
4406
  "aria-label": `Sparkline chart showing ${i} trend`,
4407
- children: [/* @__PURE__ */ Y(ce, {
4407
+ children: [/* @__PURE__ */ Y(E, {
4408
4408
  width: "100%",
4409
4409
  height: "100%",
4410
- children: /* @__PURE__ */ X(ie, {
4410
+ children: /* @__PURE__ */ X(he, {
4411
4411
  data: e,
4412
4412
  margin: {
4413
4413
  top: 4,
@@ -4432,11 +4432,11 @@ var Ho = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4432
4432
  stopOpacity: .02
4433
4433
  })]
4434
4434
  }) }),
4435
- /* @__PURE__ */ Y(we, {
4435
+ /* @__PURE__ */ Y(Ke, {
4436
4436
  hide: !0,
4437
4437
  domain: ["dataMin - 1", "dataMax + 1"]
4438
4438
  }),
4439
- /* @__PURE__ */ Y(Ve, {
4439
+ /* @__PURE__ */ Y(Le, {
4440
4440
  type: "linear",
4441
4441
  dataKey: "value",
4442
4442
  stroke: a.stroke,
@@ -4444,7 +4444,7 @@ var Ho = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4444
4444
  fill: `url(#${r})`,
4445
4445
  fillOpacity: 1,
4446
4446
  isAnimationActive: !1,
4447
- dot: (t) => /* @__PURE__ */ Vt(Ho, {
4447
+ dot: (t) => /* @__PURE__ */ Ht(Ho, {
4448
4448
  ...t,
4449
4449
  key: t.index,
4450
4450
  dataLength: e.length,
@@ -4460,8 +4460,8 @@ var Ho = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4460
4460
  })]
4461
4461
  })
4462
4462
  });
4463
- }, Go = U((e, t) => {
4464
- let { description: n, heading: r, label: o, selected: s = !1, onClick: u, onAskOne: d, className: f, ...p } = e, [m, h] = J(!1), [g, _] = J(!1), v = m || g, y = l(), b = v && !!d, x = {
4463
+ }, Go = H((e, t) => {
4464
+ let { description: n, heading: r, label: o, selected: s = !1, onClick: u, onAskOne: d, className: f, ...p } = e, [m, h] = q(!1), [g, _] = q(!1), v = m || g, y = l(), b = v && !!d, x = {
4465
4465
  duration: y ? 0 : .2,
4466
4466
  ease: [
4467
4467
  .33,
@@ -4476,7 +4476,7 @@ var Ho = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4476
4476
  }, w = m ? "[animation:rotate-gradient_2s_linear_infinite_running]" : "[animation:rotate-gradient_2s_linear_infinite_paused]";
4477
4477
  return /* @__PURE__ */ X("div", {
4478
4478
  className: "relative",
4479
- children: [s ? /* @__PURE__ */ X(qt, { children: [/* @__PURE__ */ Y("div", {
4479
+ children: [s ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
4480
4480
  "data-testid": "selected-border",
4481
4481
  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))]", w)
4482
4482
  }), /* @__PURE__ */ Y("div", {
@@ -4525,7 +4525,7 @@ var Ho = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4525
4525
  Go.displayName = "F0AiInsightCardInternal";
4526
4526
  //#endregion
4527
4527
  //#region src/addons/ai/ai/F0AiInsightCard/F0AiInsightCard.tsx
4528
- var Ko = ["className"], qo = U((e, t) => {
4528
+ var Ko = ["className"], qo = H((e, t) => {
4529
4529
  let n = Ko.reduce((e, t) => {
4530
4530
  let { [t]: n, ...r } = e;
4531
4531
  return r;
@@ -4536,7 +4536,7 @@ var Ko = ["className"], qo = U((e, t) => {
4536
4536
  });
4537
4537
  });
4538
4538
  qo.displayName = "F0AiInsightCard";
4539
- var Jo = e(Ie(qo, () => /* @__PURE__ */ X("div", {
4539
+ var Jo = e(ee(qo, () => /* @__PURE__ */ X("div", {
4540
4540
  className: "flex w-[217px] h-[200px] flex-col gap-2 rounded-2xl border border-solid border-f1-border-secondary bg-f1-background p-4",
4541
4541
  "aria-busy": "true",
4542
4542
  "aria-live": "polite",
@@ -4561,8 +4561,8 @@ var Jo = e(Ie(qo, () => /* @__PURE__ */ X("div", {
4561
4561
  "sparkline"
4562
4562
  ], Xo = 180, Zo = (e) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : Xo, Qo = (e, t) => e.length <= t ? e : `${e.slice(0, t).trimEnd()}...`, $o = (e) => e.showActions !== !1, es = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-")));
4563
4563
  function ts(e) {
4564
- let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = Xo } = e, [u, d] = J(!1), p = Wt(), m = q(null), h = Zo(l), g = s.length > h, _ = u ? s : Qo(s, h), v = $o(e) ? e : null, y = es(e);
4565
- return G(() => {
4564
+ let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = Xo } = e, [u, d] = q(!1), p = Gt(), m = K(null), h = Zo(l), g = s.length > h, _ = u ? s : Qo(s, h), v = $o(e) ? e : null, y = es(e);
4565
+ return W(() => {
4566
4566
  u && m.current?.focus();
4567
4567
  }, [u]), /* @__PURE__ */ X("section", {
4568
4568
  className: "overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background",
@@ -4570,7 +4570,7 @@ function ts(e) {
4570
4570
  children: [
4571
4571
  /* @__PURE__ */ X("div", {
4572
4572
  className: "flex items-center gap-3 px-4 py-3",
4573
- children: [t ? /* @__PURE__ */ Y(pt, {
4573
+ children: [t ? /* @__PURE__ */ Y(mt, {
4574
4574
  module: t,
4575
4575
  size: "md"
4576
4576
  }) : null, /* @__PURE__ */ X("div", {
@@ -4594,7 +4594,7 @@ function ts(e) {
4594
4594
  ref: m,
4595
4595
  tabIndex: u ? -1 : void 0,
4596
4596
  className: i("text-base text-f1-foreground whitespace-pre-wrap break-words", u && a(), !u && "inline"),
4597
- children: [_, g && !u ? /* @__PURE__ */ X(qt, { children: [" ", /* @__PURE__ */ Y("button", {
4597
+ children: [_, g && !u ? /* @__PURE__ */ X(J, { children: [" ", /* @__PURE__ */ Y("button", {
4598
4598
  type: "button",
4599
4599
  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()),
4600
4600
  "aria-controls": p,
@@ -4620,17 +4620,17 @@ ts.displayName = "F0AiProposalCard";
4620
4620
  //#endregion
4621
4621
  //#region src/blocks/ai/F0AiMessageSources/components/CollapsibleMessage.tsx
4622
4622
  var ns = ({ icon: e, title: t, children: n }) => {
4623
- let [r, i] = J(!1), a = l();
4624
- return /* @__PURE__ */ X(Ke, {
4623
+ let [r, i] = q(!1), a = l();
4624
+ return /* @__PURE__ */ X(Ce, {
4625
4625
  className: "mb-1 w-full",
4626
4626
  open: r,
4627
4627
  onOpenChange: i,
4628
- children: [/* @__PURE__ */ X(fe, {
4628
+ children: [/* @__PURE__ */ X(Re, {
4629
4629
  className: "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90",
4630
4630
  children: [
4631
4631
  /* @__PURE__ */ Y("span", {
4632
4632
  className: "mr-2 *:block",
4633
- children: /* @__PURE__ */ Y(H, {
4633
+ children: /* @__PURE__ */ Y(V, {
4634
4634
  icon: e,
4635
4635
  className: "block"
4636
4636
  })
@@ -4639,12 +4639,12 @@ var ns = ({ icon: e, title: t, children: n }) => {
4639
4639
  className: "mr-[2px]",
4640
4640
  children: t
4641
4641
  }),
4642
- /* @__PURE__ */ Y(H, {
4643
- icon: Mt,
4642
+ /* @__PURE__ */ Y(V, {
4643
+ icon: Nt,
4644
4644
  className: "h-4 w-4 transition-transform duration-200"
4645
4645
  })
4646
4646
  ]
4647
- }), /* @__PURE__ */ Y(M, {
4647
+ }), /* @__PURE__ */ Y(qe, {
4648
4648
  forceMount: !0,
4649
4649
  className: "data-[state=open]:mt-3",
4650
4650
  children: /* @__PURE__ */ Y(c.div, {
@@ -4668,9 +4668,9 @@ var ns = ({ icon: e, title: t, children: n }) => {
4668
4668
  })
4669
4669
  })]
4670
4670
  });
4671
- }, rs = (e) => N[e] ?? Nt, is = ({ iconName: e }) => e ? /* @__PURE__ */ Y("div", {
4671
+ }, rs = (e) => h[e] ?? Pt, is = ({ iconName: e }) => e ? /* @__PURE__ */ Y("div", {
4672
4672
  className: "mr-1 flex items-center justify-center",
4673
- children: /* @__PURE__ */ Y(H, {
4673
+ children: /* @__PURE__ */ Y(V, {
4674
4674
  icon: rs(e),
4675
4675
  size: "md",
4676
4676
  color: "default"
@@ -4681,7 +4681,7 @@ function as({ sources: e, title: n }) {
4681
4681
  if (!e || e.length === 0 || !Array.isArray(e)) return null;
4682
4682
  let i = n ?? r.ai.resourcesGroupTitle;
4683
4683
  return /* @__PURE__ */ Y(ns, {
4684
- icon: st,
4684
+ icon: ct,
4685
4685
  title: i,
4686
4686
  children: /* @__PURE__ */ Y("div", {
4687
4687
  className: "flex flex-col gap-1 rounded-lg border border-solid border-f1-border-secondary p-2",
@@ -4712,26 +4712,26 @@ as.displayName = "F0AiMessageSources";
4712
4712
  //#endregion
4713
4713
  //#region src/addons/ai/ai/F0AiTableCard/F0AiTableCard.tsx
4714
4714
  async function os(e, t, n) {
4715
- let r = Ze(e), i = t === "xlsx" ? await tt([{
4715
+ let r = Ze(e), i = t === "xlsx" ? await nt([{
4716
4716
  name: "Data",
4717
4717
  rows: r
4718
4718
  }]) : await Ee(r);
4719
- pe(i, `${n}.${t}`);
4719
+ fe(i, `${n}.${t}`);
4720
4720
  }
4721
4721
  function ss({ dataset: e, title: n, filename: r }) {
4722
- let a = t(), o = q(null), s = n ?? a.ai.aiTable.title, c = W((e) => {
4722
+ let a = t(), o = K(null), s = n ?? a.ai.aiTable.title, c = U((e) => {
4723
4723
  if (!o.current) return;
4724
4724
  let t = r ?? (s.replace(/\s+/g, "_").toLowerCase() || "table");
4725
4725
  os(o.current, e, t);
4726
4726
  }, [s, r]);
4727
- return e.columns?.length ? /* @__PURE__ */ X(ct, {
4727
+ return e.columns?.length ? /* @__PURE__ */ X(lt, {
4728
4728
  display: "flex",
4729
4729
  flexDirection: "column",
4730
4730
  gap: "md",
4731
4731
  borderRadius: "md",
4732
4732
  border: "default",
4733
4733
  borderColor: "secondary",
4734
- children: [/* @__PURE__ */ X(ct, {
4734
+ children: [/* @__PURE__ */ X(lt, {
4735
4735
  display: "flex",
4736
4736
  alignItems: "center",
4737
4737
  justifyContent: "between",
@@ -4745,20 +4745,20 @@ function ss({ dataset: e, title: n, filename: r }) {
4745
4745
  tag: "h2",
4746
4746
  className: "text-base font-medium capitalize text-f1-foreground",
4747
4747
  children: s
4748
- }), /* @__PURE__ */ Y(ye, {
4749
- icon: L,
4748
+ }), /* @__PURE__ */ Y(S, {
4749
+ icon: B,
4750
4750
  size: "md",
4751
4751
  items: [{
4752
4752
  label: a.ai.aiTable.downloadExcel,
4753
- icon: L,
4753
+ icon: B,
4754
4754
  onClick: () => c("xlsx")
4755
4755
  }, {
4756
4756
  label: a.ai.aiTable.downloadCsv,
4757
- icon: L,
4757
+ icon: B,
4758
4758
  onClick: () => c("csv")
4759
4759
  }]
4760
4760
  })]
4761
- }), /* @__PURE__ */ Y(ct, {
4761
+ }), /* @__PURE__ */ Y(lt, {
4762
4762
  overflowX: "auto",
4763
4763
  children: /* @__PURE__ */ X("table", {
4764
4764
  ref: o,
@@ -4781,7 +4781,7 @@ ss.displayName = "F0AiTableCard";
4781
4781
  //#endregion
4782
4782
  //#region src/addons/ai/ai/F0AiChatHeader/components/CreditsPopover.tsx
4783
4783
  function cs({ credits: e, trigger: n }) {
4784
- let r = t(), [i, a] = J(!1), [o, s] = J(!1), [l, p] = J(!1), [m, h] = J(null), _ = W((t) => {
4784
+ let r = t(), [i, a] = q(!1), [o, s] = q(!1), [l, p] = q(!1), [m, h] = q(null), g = U((t) => {
4785
4785
  a(t), t && e?.fetchUsage && (s(!0), p(!1), e.fetchUsage().then((e) => {
4786
4786
  h(e), p(!1);
4787
4787
  }).catch(() => {
@@ -4791,29 +4791,29 @@ function cs({ credits: e, trigger: n }) {
4791
4791
  }));
4792
4792
  }, [e]);
4793
4793
  if (!e) return null;
4794
- let v = m ? Math.min(100, Math.round(m.used / m.total * 100)) : 0, y = e.companyName;
4795
- return /* @__PURE__ */ X(Rt, {
4794
+ let _ = m ? Math.min(100, Math.round(m.used / m.total * 100)) : 0, v = e.companyName;
4795
+ return /* @__PURE__ */ X(zt, {
4796
4796
  open: i,
4797
- onOpenChange: _,
4798
- children: [/* @__PURE__ */ Y(Pt, {
4797
+ onOpenChange: g,
4798
+ children: [/* @__PURE__ */ Y(Ft, {
4799
4799
  asChild: !0,
4800
4800
  children: n ?? /* @__PURE__ */ Y(u, {
4801
4801
  variant: "ghost",
4802
4802
  hideLabel: !0,
4803
4803
  label: r.t("ai.credits.title"),
4804
- icon: me,
4804
+ icon: Qe,
4805
4805
  pressed: i
4806
4806
  })
4807
- }), /* @__PURE__ */ X(It, {
4807
+ }), /* @__PURE__ */ X(Lt, {
4808
4808
  side: "bottom",
4809
4809
  align: "end",
4810
4810
  alignOffset: -68,
4811
4811
  sideOffset: 4,
4812
4812
  collisionPadding: 12,
4813
4813
  className: "flex w-[324px] flex-col gap-3 rounded-md border border-solid border-f1-border-secondary p-3",
4814
- children: [y ? /* @__PURE__ */ X("div", {
4814
+ children: [v ? /* @__PURE__ */ X("div", {
4815
4815
  className: "flex min-w-0 max-w-full flex-1 items-center gap-2 overflow-hidden text-left text-lg text-f1-foreground",
4816
- children: [/* @__PURE__ */ Y(at, {
4816
+ children: [/* @__PURE__ */ Y(ot, {
4817
4817
  name: e.companyName ?? "",
4818
4818
  src: e.companyLogoUrl,
4819
4819
  size: "lg"
@@ -4852,7 +4852,7 @@ function cs({ credits: e, trigger: n }) {
4852
4852
  className: "text-sm text-f1-foreground-secondary",
4853
4853
  children: r.t("ai.credits.creditsError")
4854
4854
  }) : null,
4855
- !o && !l && m ? /* @__PURE__ */ X(qt, { children: [
4855
+ !o && !l && m ? /* @__PURE__ */ X(J, { children: [
4856
4856
  /* @__PURE__ */ X("div", {
4857
4857
  className: "flex justify-between",
4858
4858
  children: [/* @__PURE__ */ Y("span", {
@@ -4870,7 +4870,7 @@ function cs({ credits: e, trigger: n }) {
4870
4870
  children: /* @__PURE__ */ Y(c.div, {
4871
4871
  className: "h-full rounded-full",
4872
4872
  style: {
4873
- width: `${v}%`,
4873
+ width: `${_}%`,
4874
4874
  backgroundImage: "linear-gradient(90deg, #E55619, #A1ADE5, #E51943, #E55619)",
4875
4875
  backgroundSize: "300% 100%"
4876
4876
  },
@@ -4899,7 +4899,7 @@ function cs({ credits: e, trigger: n }) {
4899
4899
  variant: "outlinePromote",
4900
4900
  href: e.upgradePlanUrl,
4901
4901
  label: r.t("ai.credits.upgradePlan"),
4902
- icon: g
4902
+ icon: ze
4903
4903
  })]
4904
4904
  }) : null]
4905
4905
  })]
@@ -4983,7 +4983,7 @@ var ls = "linear-gradient(90deg, #E55619, #A1ADE5, #E51943, #E55619)", us = ({ l
4983
4983
  });
4984
4984
  };
4985
4985
  function ds({ employeeCredits: e, trigger: n }) {
4986
- let r = t(), [i, a] = J(!1), [o, s] = J(!1), [c, l] = J(!1), [f, p] = J(null), m = W((t) => {
4986
+ let r = t(), [i, a] = q(!1), [o, s] = q(!1), [c, l] = q(!1), [f, p] = q(null), m = U((t) => {
4987
4987
  a(t), t && e?.fetchUsage && (s(!0), l(!1), e.fetchUsage().then((e) => {
4988
4988
  p(e), l(!1);
4989
4989
  }).catch(() => {
@@ -4994,19 +4994,19 @@ function ds({ employeeCredits: e, trigger: n }) {
4994
4994
  }, [e]);
4995
4995
  if (!e) return null;
4996
4996
  let h = !!e.companyName;
4997
- return /* @__PURE__ */ X(Rt, {
4997
+ return /* @__PURE__ */ X(zt, {
4998
4998
  open: i,
4999
4999
  onOpenChange: m,
5000
- children: [/* @__PURE__ */ Y(Pt, {
5000
+ children: [/* @__PURE__ */ Y(Ft, {
5001
5001
  asChild: !0,
5002
5002
  children: n ?? /* @__PURE__ */ Y(u, {
5003
5003
  variant: "ghost",
5004
5004
  hideLabel: !0,
5005
5005
  label: r.t("ai.credits.title"),
5006
- icon: me,
5006
+ icon: Qe,
5007
5007
  pressed: i
5008
5008
  })
5009
- }), /* @__PURE__ */ X(It, {
5009
+ }), /* @__PURE__ */ X(Lt, {
5010
5010
  side: "bottom",
5011
5011
  align: "end",
5012
5012
  alignOffset: -68,
@@ -5015,7 +5015,7 @@ function ds({ employeeCredits: e, trigger: n }) {
5015
5015
  className: "flex w-[324px] flex-col gap-3 rounded-md border border-solid border-f1-border-secondary p-3",
5016
5016
  children: [h ? /* @__PURE__ */ X("div", {
5017
5017
  className: "flex min-w-0 max-w-full flex-1 items-center gap-2 overflow-hidden text-left text-lg text-f1-foreground",
5018
- children: [/* @__PURE__ */ Y(at, {
5018
+ children: [/* @__PURE__ */ Y(ot, {
5019
5019
  name: e.companyName ?? "",
5020
5020
  src: e.companyLogoUrl,
5021
5021
  size: "lg"
@@ -5047,20 +5047,20 @@ var fs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5047
5047
  }) : e ? /* @__PURE__ */ Y(cs, {
5048
5048
  credits: e,
5049
5049
  trigger: n
5050
- }) : null, ps = fs, ms = ({ historyEnabled: e = !1, title: n, currentThreadTitle: r, fullscreen: a = !1, lockVisualizationMode: o = !1, onToggleVisualizationMode: f, onClose: p, onNewChat: m, onOpenHistory: h, hasMessages: g = !1, credits: v, employeeCredits: y, compact: b = !1, actions: x }) => {
5051
- let S = t(), C = l(), { panelOverlays: w } = V(), T = !o && !w && /* @__PURE__ */ Y(u, {
5050
+ }) : null, ps = fs, ms = ({ historyEnabled: e = !1, title: n, currentThreadTitle: r, fullscreen: a = !1, lockVisualizationMode: o = !1, onToggleVisualizationMode: f, onClose: p, onNewChat: m, onOpenHistory: h, hasMessages: _ = !1, credits: v, employeeCredits: b, compact: x = !1, actions: S }) => {
5051
+ let C = t(), w = l(), { panelOverlays: T } = y(), E = !o && !T && /* @__PURE__ */ Y(u, {
5052
5052
  variant: "ghost",
5053
5053
  hideLabel: !0,
5054
- label: a ? S.ai.collapseChat : S.ai.expandChat,
5055
- icon: a ? P : _,
5054
+ label: a ? C.ai.collapseChat : C.ai.expandChat,
5055
+ icon: a ? g : Be,
5056
5056
  onClick: f
5057
- }), E = /* @__PURE__ */ Y(u, {
5057
+ }), O = /* @__PURE__ */ Y(u, {
5058
5058
  variant: "ghost",
5059
5059
  hideLabel: !0,
5060
- label: S.ai.closeChat,
5061
- icon: F,
5060
+ label: C.ai.closeChat,
5061
+ icon: se,
5062
5062
  onClick: p
5063
- }), D = x?.map((e) => /* @__PURE__ */ Y(u, {
5063
+ }), k = S?.map((e) => /* @__PURE__ */ Y(u, {
5064
5064
  variant: "ghost",
5065
5065
  hideLabel: !0,
5066
5066
  label: e.label,
@@ -5068,24 +5068,24 @@ var fs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5068
5068
  type: "button",
5069
5069
  onClick: e.onClick
5070
5070
  }, e.id));
5071
- return b ? /* @__PURE__ */ X("header", {
5071
+ return x ? /* @__PURE__ */ X("header", {
5072
5072
  className: i("flex items-center justify-between gap-3 pr-4 pl-5 py-3"),
5073
5073
  children: [/* @__PURE__ */ Y(d, {
5074
5074
  lines: 1,
5075
5075
  className: "min-w-0 flex-1 text-left font-semibold text-f1-foreground",
5076
- children: r ?? S.ai.newConversation
5076
+ children: r ?? C.ai.newConversation
5077
5077
  }), /* @__PURE__ */ X(c.div, {
5078
5078
  className: "flex shrink-0 items-center",
5079
5079
  initial: { opacity: 0 },
5080
5080
  animate: { opacity: 1 },
5081
5081
  transition: {
5082
- duration: C ? 0 : .2,
5082
+ duration: w ? 0 : .2,
5083
5083
  ease: "easeOut"
5084
5084
  },
5085
5085
  children: [
5086
- D,
5087
- T,
5088
- E
5086
+ k,
5087
+ E,
5088
+ O
5089
5089
  ]
5090
5090
  })]
5091
5091
  }) : e ? /* @__PURE__ */ X("header", {
@@ -5102,9 +5102,9 @@ var fs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5102
5102
  children: [/* @__PURE__ */ Y(d, {
5103
5103
  lines: 1,
5104
5104
  className: "min-w-0 text-left",
5105
- children: r ?? S.ai.newConversation
5106
- }), /* @__PURE__ */ Y(H, {
5107
- icon: ot,
5105
+ children: r ?? C.ai.newConversation
5106
+ }), /* @__PURE__ */ Y(V, {
5107
+ icon: st,
5108
5108
  color: "default",
5109
5109
  size: "md"
5110
5110
  })]
@@ -5115,17 +5115,17 @@ var fs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5115
5115
  initial: { opacity: 0 },
5116
5116
  animate: { opacity: 1 },
5117
5117
  transition: {
5118
- duration: C ? 0 : .2,
5118
+ duration: w ? 0 : .2,
5119
5119
  ease: "easeOut"
5120
5120
  },
5121
5121
  children: [
5122
5122
  /* @__PURE__ */ Y(fs, {
5123
5123
  credits: v,
5124
- employeeCredits: y
5124
+ employeeCredits: b
5125
5125
  }),
5126
- D,
5127
- T,
5128
- E
5126
+ k,
5127
+ E,
5128
+ O
5129
5129
  ]
5130
5130
  })]
5131
5131
  }) : /* @__PURE__ */ X("header", {
@@ -5141,24 +5141,24 @@ var fs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5141
5141
  initial: { opacity: 0 },
5142
5142
  animate: { opacity: 1 },
5143
5143
  transition: {
5144
- duration: C ? 0 : .2,
5144
+ duration: w ? 0 : .2,
5145
5145
  ease: "easeOut"
5146
5146
  },
5147
5147
  children: [
5148
- g && !o ? /* @__PURE__ */ Y(u, {
5148
+ _ && !o ? /* @__PURE__ */ Y(u, {
5149
5149
  variant: "ghost",
5150
5150
  hideLabel: !0,
5151
- label: S.ai.startNewChat,
5152
- icon: le,
5151
+ label: C.ai.startNewChat,
5152
+ icon: D,
5153
5153
  onClick: m
5154
5154
  }) : null,
5155
5155
  /* @__PURE__ */ Y(fs, {
5156
5156
  credits: v,
5157
- employeeCredits: y
5157
+ employeeCredits: b
5158
5158
  }),
5159
- D,
5160
- T,
5161
- E
5159
+ k,
5160
+ E,
5161
+ O
5162
5162
  ]
5163
5163
  })]
5164
5164
  });
@@ -5167,14 +5167,14 @@ var fs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5167
5167
  //#region src/addons/ai/ai/F0AiChatHistory/utils.ts
5168
5168
  function hs(e) {
5169
5169
  let t = new Date(e), n = /* @__PURE__ */ new Date();
5170
- return De(t) ? "today" : ke(t) ? "yesterday" : Ct(t, n) ? "thisMonth" : "older";
5170
+ return b(t) ? "today" : te(t) ? "yesterday" : wt(t, n) ? "thisMonth" : "older";
5171
5171
  }
5172
5172
  function gs(e, t, n) {
5173
- let r = new Date(e), i = kt(r, "p", { locale: n });
5174
- if (De(r)) return `${t.today}, ${i}`;
5175
- if (ke(r)) return `${t.yesterday}, ${i}`;
5176
- let a = !Ot(r, /* @__PURE__ */ new Date());
5177
- return `${kt(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
5173
+ let r = new Date(e), i = At(r, "p", { locale: n });
5174
+ if (b(r)) return `${t.today}, ${i}`;
5175
+ if (te(r)) return `${t.yesterday}, ${i}`;
5176
+ let a = !kt(r, /* @__PURE__ */ new Date());
5177
+ return `${At(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
5178
5178
  }
5179
5179
  function _s(e) {
5180
5180
  let t = {
@@ -5197,13 +5197,13 @@ function _s(e) {
5197
5197
  //#endregion
5198
5198
  //#region src/addons/ai/ai/F0AiChatHistory/components/ThreadItem.tsx
5199
5199
  function vs({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSelect: s, onPin: c, onUnpin: l, onDelete: f, className: p }) {
5200
- let m = t(), h = gt(), g = K(() => [{
5200
+ let m = t(), h = _t(), g = G(() => [{
5201
5201
  label: n ? m.ai.unpinChat : m.ai.pinChat,
5202
- icon: n ? oe : E,
5202
+ icon: n ? A : M,
5203
5203
  onClick: () => n ? l(e.id) : c(e.id)
5204
5204
  }, {
5205
5205
  label: m.ai.deleteChat,
5206
- icon: j,
5206
+ icon: z,
5207
5207
  critical: !0,
5208
5208
  onClick: () => f(e.id)
5209
5209
  }], [
@@ -5212,7 +5212,7 @@ function vs({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
5212
5212
  c,
5213
5213
  l,
5214
5214
  f
5215
- ]), _ = K(() => gs(e.updatedAt, {
5215
+ ]), _ = G(() => gs(e.updatedAt, {
5216
5216
  today: m.ai.today,
5217
5217
  yesterday: m.ai.yesterday
5218
5218
  }, h), [
@@ -5234,7 +5234,7 @@ function vs({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
5234
5234
  className: "flex w-full min-w-0 items-center gap-1",
5235
5235
  onClick: () => s(e.id, e.title),
5236
5236
  children: [
5237
- e.icon ? /* @__PURE__ */ Y(H, {
5237
+ e.icon ? /* @__PURE__ */ Y(V, {
5238
5238
  icon: e.icon,
5239
5239
  size: "sm",
5240
5240
  className: "mr-1 shrink-0 text-f1-icon",
@@ -5258,13 +5258,13 @@ function vs({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
5258
5258
  o ? /* @__PURE__ */ Y("div", {
5259
5259
  className: "flex h-7 w-7 shrink-0 items-center justify-center",
5260
5260
  "aria-label": m.ai.threadOptions,
5261
- children: /* @__PURE__ */ Y(xt, { size: "small" })
5261
+ children: /* @__PURE__ */ Y(St, { size: "small" })
5262
5262
  }) : /* @__PURE__ */ Y("div", {
5263
5263
  className: i("hidden items-center", "group-hover:flex group-focus-within:flex", "has-[[aria-expanded=true]]:flex"),
5264
- children: /* @__PURE__ */ Y(ye, {
5264
+ children: /* @__PURE__ */ Y(S, {
5265
5265
  items: g,
5266
5266
  children: /* @__PURE__ */ Y(u, {
5267
- icon: y,
5267
+ icon: O,
5268
5268
  variant: "ghost",
5269
5269
  size: "sm",
5270
5270
  label: m.ai.threadOptions,
@@ -5278,9 +5278,9 @@ function vs({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
5278
5278
  //#endregion
5279
5279
  //#region src/addons/ai/ai/F0AiChatHistory/components/CollapsibleGroup.tsx
5280
5280
  function ys({ label: e, threads: t, pinnedIds: n, onSelect: r, onPin: o, onUnpin: s, onDelete: c }) {
5281
- let [l, u] = J(!0), d = W(() => {
5281
+ let [l, u] = q(!0), d = U(() => {
5282
5282
  u((e) => !e);
5283
- }, []), f = W((e) => {
5283
+ }, []), f = U((e) => {
5284
5284
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
5285
5285
  }, [d]);
5286
5286
  return /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("div", {
@@ -5292,8 +5292,8 @@ function ys({ label: e, threads: t, pinnedIds: n, onSelect: r, onPin: o, onUnpin
5292
5292
  children: [/* @__PURE__ */ Y("span", {
5293
5293
  className: "text-sm font-medium capitalize tracking-wide text-f1-foreground-secondary",
5294
5294
  children: e
5295
- }), /* @__PURE__ */ Y(H, {
5296
- icon: l ? ot : wt,
5295
+ }), /* @__PURE__ */ Y(V, {
5296
+ icon: l ? st : Tt,
5297
5297
  color: "secondary",
5298
5298
  size: "xs"
5299
5299
  })]
@@ -5344,14 +5344,14 @@ function Cs() {
5344
5344
  //#endregion
5345
5345
  //#region src/addons/ai/ai/F0AiChatHistory/F0AiChatHistory.tsx
5346
5346
  var ws = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading: o, error: c, pinnedIds: l, onPinThread: u, onUnpinThread: f, onDeleteThread: p }) => {
5347
- let m = t(), [h, g] = J("");
5348
- G(() => {
5347
+ let m = t(), [h, g] = q("");
5348
+ W(() => {
5349
5349
  let t = (t) => {
5350
5350
  t.key === "Escape" && e();
5351
5351
  };
5352
5352
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
5353
5353
  }, [e]);
5354
- let _ = K(() => ({
5354
+ let _ = G(() => ({
5355
5355
  today: m.ai.today,
5356
5356
  yesterday: m.ai.yesterday,
5357
5357
  thisMonth: m.ai.thisMonth,
@@ -5361,18 +5361,18 @@ var ws = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading:
5361
5361
  m.ai.yesterday,
5362
5362
  m.ai.thisMonth,
5363
5363
  m.ai.older
5364
- ]), v = K(() => {
5364
+ ]), v = G(() => {
5365
5365
  if (!h.trim()) return a;
5366
5366
  let e = h.toLowerCase();
5367
5367
  return a.filter((t) => t.title.toLowerCase().includes(e));
5368
- }, [a, h]), y = K(() => v.filter((e) => l.has(e.id)), [v, l]), b = K(() => v.filter((e) => !l.has(e.id)), [v, l]), x = K(() => _s(b), [b]), S = W((t, r) => {
5368
+ }, [a, h]), y = G(() => v.filter((e) => l.has(e.id)), [v, l]), b = G(() => v.filter((e) => !l.has(e.id)), [v, l]), x = G(() => _s(b), [b]), S = U((t, r) => {
5369
5369
  n(t, r), e();
5370
- }, [n, e]), C = W(() => {
5370
+ }, [n, e]), C = U(() => {
5371
5371
  r(), e();
5372
- }, [r, e]), w = W((e) => {
5372
+ }, [r, e]), w = U((e) => {
5373
5373
  p(e);
5374
5374
  }, [p]), T = y.length > 0 || x.length > 0;
5375
- return Jt(/* @__PURE__ */ X(qt, { children: [/* @__PURE__ */ Y("div", {
5375
+ return Jt(/* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
5376
5376
  className: "fixed inset-0 z-50 bg-f1-background-overlay animate-in fade-in-0",
5377
5377
  onClick: e,
5378
5378
  "aria-hidden": "true"
@@ -5385,8 +5385,8 @@ var ws = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading:
5385
5385
  className: i("pointer-events-auto relative flex w-full max-w-[600px] flex-col", "rounded-xl bg-f1-background shadow-lg", "max-h-[min(600px,80vh)]"),
5386
5386
  children: [/* @__PURE__ */ X("div", {
5387
5387
  className: "flex flex-shrink-0 items-center gap-2 border-0 border-b border-solid border-f1-border-secondary py-2 pl-5 pr-3",
5388
- children: [/* @__PURE__ */ Y(H, {
5389
- icon: st,
5388
+ children: [/* @__PURE__ */ Y(V, {
5389
+ icon: ct,
5390
5390
  color: "secondary",
5391
5391
  size: "md"
5392
5392
  }), /* @__PURE__ */ Y("input", {
@@ -5406,8 +5406,8 @@ var ws = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading:
5406
5406
  onClick: C,
5407
5407
  children: /* @__PURE__ */ X("div", {
5408
5408
  className: "flex w-full items-center gap-2",
5409
- children: [/* @__PURE__ */ Y(H, {
5410
- icon: le,
5409
+ children: [/* @__PURE__ */ Y(V, {
5410
+ icon: D,
5411
5411
  color: "default",
5412
5412
  size: "md"
5413
5413
  }), /* @__PURE__ */ Y(d, {
@@ -5450,14 +5450,14 @@ var ws = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading:
5450
5450
  })] }), document.body);
5451
5451
  }, Ts = "f0-ai-pinned-threads";
5452
5452
  function Es() {
5453
- let e = re(Ts, []);
5453
+ let e = we(Ts, []);
5454
5454
  return new Set(Array.isArray(e) ? e : []);
5455
5455
  }
5456
5456
  function Ds(e) {
5457
- h(Ts, [...e]);
5457
+ Je(Ts, [...e]);
5458
5458
  }
5459
5459
  function Os({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, unpinThread: i }) {
5460
- let [a, o] = J([]), [s, c] = J(!1), [l, u] = J(null), [d, f] = J(Es), [p, m] = J(() => /* @__PURE__ */ new Set()), h = W(async () => {
5460
+ let [a, o] = q([]), [s, c] = q(!1), [l, u] = q(null), [d, f] = q(Es), [p, m] = q(() => /* @__PURE__ */ new Set()), h = U(async () => {
5461
5461
  c(!0), u(null);
5462
5462
  try {
5463
5463
  let e = await t();
@@ -5469,22 +5469,22 @@ function Os({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
5469
5469
  c(!1);
5470
5470
  }
5471
5471
  }, [t]);
5472
- G(() => {
5472
+ W(() => {
5473
5473
  e && h();
5474
5474
  }, [e, h]);
5475
- let g = W((e, t) => {
5475
+ let g = U((e, t) => {
5476
5476
  f((n) => {
5477
5477
  if (t === n.has(e)) return n;
5478
5478
  let r = new Set(n);
5479
5479
  return t ? r.add(e) : r.delete(e), Ds(r), r;
5480
5480
  });
5481
- }, []), _ = W((e, t) => {
5481
+ }, []), _ = U((e, t) => {
5482
5482
  m((n) => {
5483
5483
  if (t === n.has(e)) return n;
5484
5484
  let r = new Set(n);
5485
5485
  return t ? r.add(e) : r.delete(e), r;
5486
5486
  });
5487
- }, []), v = W((e, t) => {
5487
+ }, []), v = U((e, t) => {
5488
5488
  let n = t ? r : i;
5489
5489
  g(e, t), n && (_(e, !0), n(e).catch(() => g(e, !t)).finally(() => _(e, !1)));
5490
5490
  }, [
@@ -5500,9 +5500,9 @@ function Os({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
5500
5500
  refetch: h,
5501
5501
  pinnedIds: d,
5502
5502
  pendingIds: p,
5503
- pinThread: W((e) => v(e, !0), [v]),
5504
- unpinThread: W((e) => v(e, !1), [v]),
5505
- deleteThread: W(async (e) => {
5503
+ pinThread: U((e) => v(e, !0), [v]),
5504
+ unpinThread: U((e) => v(e, !1), [v]),
5505
+ deleteThread: U(async (e) => {
5506
5506
  _(e, !0);
5507
5507
  try {
5508
5508
  await n(e), o((t) => t.filter((t) => t.id !== e)), f((t) => {
@@ -5524,7 +5524,7 @@ function Os({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
5524
5524
  }
5525
5525
  //#endregion
5526
5526
  //#region src/addons/ai/ai/F0AiChatUsageLimits/types.ts
5527
- var ks = ["top", "bottom"], As = c.create(ee), js = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ X("div", {
5527
+ var ks = ["top", "bottom"], As = c.create(rt), js = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ X("div", {
5528
5528
  role: "status",
5529
5529
  "aria-live": "polite",
5530
5530
  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",
@@ -5577,9 +5577,9 @@ var ks = ["top", "bottom"], As = c.create(ee), js = ({ label: e, reduceMotion: t
5577
5577
  className: "font-medium",
5578
5578
  children: e
5579
5579
  })]
5580
- }), Ms = Ht(function({ active: e, label: n, className: r, children: a }) {
5580
+ }), Ms = Ut(function({ active: e, label: n, className: r, children: a }) {
5581
5581
  let { t: o } = t(), s = l(), u = n ?? o("ai.applyingChanges");
5582
- return G(() => {
5582
+ return W(() => {
5583
5583
  if (!e) return;
5584
5584
  let t = document.activeElement;
5585
5585
  t && t.getAttribute("name") !== "one-ai-input" && t.blur();