@factorialco/f0-react 13.7.1 → 13.9.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.
- package/dist/{ArchiveThumbnail-BP0t4Rfi.js → ArchiveThumbnail-BMp3YbfD.js} +3 -3
- package/dist/{ArchiveViewer-CU9adsgr.js → ArchiveViewer-hEye6_DO.js} +5 -5
- package/dist/{ChatPostComposerDialog-o1a3GnnA.js → ChatPostComposerDialog-DvK-F_9b.js} +4 -4
- package/dist/{CoachmarkProvider-BlsZ4V3B.js → CoachmarkProvider-CSyq_SH1.js} +23566 -23065
- package/dist/{CodeThumbnail-ZwkABs75.js → CodeThumbnail-BskK4DTN.js} +1 -1
- package/dist/{CodeViewer-BrmnIt6k.js → CodeViewer-CUVpRfFA.js} +8 -8
- package/dist/{DocumentToolbar-D_afy-RH.js → DocumentToolbar-lIncsF3z.js} +5 -5
- package/dist/{DocxViewer-BptrjRiz.js → DocxViewer-BAwGUg5D.js} +3 -3
- package/dist/{F0AiProcessingOverlay-DwjvXNhv.js → F0AiProcessingOverlay-hPOUgmJz.js} +107 -107
- package/dist/{F0Alert-D5av-4_1.js → F0Alert-DWpoDmXm.js} +5 -5
- package/dist/F0AudioPlayer-B87gu5ab.js +2 -0
- package/dist/{F0Button-xbk-nrvL.js → F0Button-DJAGcvGQ.js} +4 -4
- package/dist/{F0CanvasPanel-Dj85hg3n.js → F0CanvasPanel-BqX2Sult.js} +4517 -4517
- package/dist/{F0DocumentViewer-BfZZ_Nj4.js → F0DocumentViewer-D8n4cD0X.js} +1 -1
- package/dist/{F0DocumentViewer-BtB3wnNC.js → F0DocumentViewer-bO7PViP1.js} +4 -4
- package/dist/{F0Icon-Dr2xuQq2.js → F0Icon-CqhIsgzq.js} +1 -1
- package/dist/{F0Map-DWnyL4oO.js → F0Map-WdDErexm.js} +572 -572
- package/dist/{F0Select-DD_AdtqV.js → F0Select-CLVnq8Oe.js} +5679 -5679
- package/dist/{F0Text-DzVOqGyO.js → F0Text-sHWQ6Zjr.js} +2 -2
- package/dist/{F0VideoPlayer-B7YJAF5w.js → F0VideoPlayer--6DJybCc.js} +6 -6
- package/dist/F0VideoPlayer-ChcyxpNN.js +1 -0
- package/dist/{HtmlThumbnail-BNAinxys.js → HtmlThumbnail-aIC6kVaS.js} +1 -1
- package/dist/{HtmlViewer-BZu6alyR.js → HtmlViewer-bxvjs0HU.js} +9 -9
- package/dist/{LayoutGroup-CXsoUZn_.js → LayoutGroup-CmYTzUe-.js} +15 -15
- package/dist/{Map-CVG9kKlw.js → Map-B9SA_hEH.js} +10 -10
- package/dist/{PdfThumbnail-DopWiXV1.js → PdfThumbnail---NygeL_.js} +1 -1
- package/dist/{PdfViewer-CPWR6tv7.js → PdfViewer-Dzj9Ilu-.js} +13 -13
- package/dist/{SandboxedHtmlFrame-Pi5lxvZj.js → SandboxedHtmlFrame-Dv21SdxM.js} +2 -2
- package/dist/{SheetViewer-Dwu1GbVa.js → SheetViewer-CyhOFDVZ.js} +5 -5
- package/dist/{TextViewer-DXd78D8P.js → TextViewer-CKrr0PDH.js} +4 -4
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +4 -4
- package/dist/component-status.js +14 -14
- package/dist/{dist-Bvf79ox7.js → dist-78QS1RpN.js} +4 -4
- package/dist/{dist-BgfZJh24.js → dist-B0VLslFD.js} +1 -1
- package/dist/{dist-CvYOoTs5.js → dist-DvI6nhUB.js} +1 -1
- package/dist/experimental.d.ts +70 -6
- package/dist/experimental.js +6618 -6098
- package/dist/{exports-DqmLMJgR.d.ts → exports-DaVqRnuz.d.ts} +1 -1
- package/dist/f0.d.ts +5 -5
- package/dist/f0.js +1335 -1322
- package/dist/{highlight-CE5OJwQE.js → highlight-DZRNad9z.js} +1 -1
- package/dist/{i18n-provider-aZCxX7lT.js → i18n-provider-5AmqITig.js} +1 -1
- package/dist/{i18n-provider-defaults-BUY-YS7I.d.ts → i18n-provider-defaults-DztF2sWo.d.ts} +46 -0
- package/dist/{i18n-provider-defaults-BpglikGz.js → i18n-provider-defaults-mM2ICqyS.js} +46 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-CMtDE2kR.d.ts → index-C0pYJxas.d.ts} +1 -1
- package/dist/{maplibre-B0ReOfxN.js → maplibre-9SjV58q1.js} +1 -1
- package/dist/{pdfWorker-Q-062J_A.js → pdfWorker-DMcapWPE.js} +1 -1
- package/dist/{popover-CT3rox5D.js → popover-Cw4HYjOL.js} +1 -1
- package/dist/{posts-i2uZfohA.js → posts-BBvCiBdi.js} +12 -9
- package/dist/{scrollarea-iuapGs70.js → scrollarea-4p-5wD8d.js} +3 -3
- package/dist/{skeleton-C5JQM5pK.js → skeleton-BWzVGMzP.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{toolbarStyles-DblQOIMP.js → toolbarStyles-DDsE4J6B.js} +1 -1
- package/dist/{types-DNh-Ul2e.d.ts → types-D8tVTeWQ.d.ts} +83 -30
- package/dist/{useData-Af3QuQSP.js → useData-BjMlOMnX.js} +7 -7
- package/package.json +1 -1
- package/dist/F0AudioPlayer-BINo7ymK.js +0 -2
- package/dist/F0VideoPlayer-yNQxunbp.js +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as e, r as t } from "./i18n-provider-
|
|
2
|
-
import { n, t as r } from "./skeleton-
|
|
1
|
+
import { a as e, r as t } from "./i18n-provider-5AmqITig.js";
|
|
2
|
+
import { n, t as r } from "./skeleton-BWzVGMzP.js";
|
|
3
3
|
import { L as i, R as a } from "./tooltip-BX4dSfeL.js";
|
|
4
|
-
import { T as o, U as s, h as c, n as l, r as u, t as d, wt as f, y as p } from "./F0Button-
|
|
5
|
-
import { $ as m, $t as h, A as g, Aa as _, Ao as v, As as y, B as b, Bt as x, C as S, Cc as C, Di as w, Ds as T, Ei as E, Ft as D, G as O,
|
|
6
|
-
import { o as Ot, t as G } from "./F0Icon-
|
|
7
|
-
import { t as kt } from "./i18n-provider-defaults-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { T as o, U as s, h as c, n as l, r as u, t as d, wt as f, y as p } from "./F0Button-DJAGcvGQ.js";
|
|
5
|
+
import { $ as m, $t as h, A as g, Aa as _, Ao as v, As as y, B as b, Bt as x, C as S, Cc as C, Di as w, Ds as T, Ei as E, Ft as D, G as O, Gi as ee, Go as k, Gt as A, H as j, Ht as M, J as N, Jo as P, K as F, Kc as I, Ko as L, Kt as te, Lr as ne, Lt as re, M as ie, Ms as ae, Mt as R, O as oe, Oi as z, Ot as B, Po as se, Ps as ce, Pt as le, Q as ue, S as de, Sc as fe, St as pe, U as me, Ui as he, Vi as V, Vo as ge, Vr as _e, W as ve, Ws as ye, Wt as be, Xr as xe, Xt as Se, Y as Ce, Yt as we, Zr as Te, _t as Ee, a as De, an as H, ao as Oe, at as ke, b as U, bo as Ae, bs as je, cn as Me, ct as Ne, dn as Pe, ds as Fe, dt as Ie, en as Le, fn as Re, fs as ze, ft as Be, g as Ve, gn as He, gt as Ue, h as We, in as Ge, io as Ke, it as qe, j as Je, jr as Ye, jt as Xe, k as Ze, ki as Qe, kt as $e, ln as et, lo as tt, ls as nt, lt as rt, m as it, nl as at, nn as ot, ns as st, ot as ct, q as lt, qo as ut, r as dt, rn as ft, rs as pt, rt as W, ss as mt, st as ht, tl as gt, tt as _t, ut as vt, vc as yt, vn as bt, vt as xt, x as St, xn as Ct, y as wt, yi as Tt, yt as Et, zs as Dt } from "./F0CanvasPanel-BqX2Sult.js";
|
|
6
|
+
import { o as Ot, t as G } from "./F0Icon-CqhIsgzq.js";
|
|
7
|
+
import { t as kt } from "./i18n-provider-defaults-mM2ICqyS.js";
|
|
8
|
+
import { F as At, H as jt, M as Mt, O as Nt, S as Pt, V as Ft, g as It, h as Lt, l as Rt, m as zt, y as Bt } from "./useData-BjMlOMnX.js";
|
|
9
|
+
import { Cr as Vt, Dr as Ht, En as Ut, Et as Wt, Nt as Gt, Sr as Kt, Tn as qt, Tr as Jt, _t as Yt, an as Xt, cn as Zt, en as Qt, gt as $t, lt as en, on as tn, vt as nn, xr as rn } from "./F0Select-CLVnq8Oe.js";
|
|
10
10
|
import { t as an } from "./Check-DAp9gCRh.js";
|
|
11
11
|
import { t as on } from "./Ellipsis-CBouJQYY.js";
|
|
12
12
|
import { t as sn } from "./ExternalLink-RdKU698E.js";
|
|
13
|
-
import { a as cn, gt as ln, i as un, t as dn } from "./popover-
|
|
13
|
+
import { a as cn, gt as ln, i as un, t as dn } from "./popover-Cw4HYjOL.js";
|
|
14
14
|
import { a as fn } from "./dist-Cuwaibqg.js";
|
|
15
15
|
import { createContext as pn, createElement as mn, forwardRef as hn, memo as gn, useCallback as K, useContext as _n, useEffect as q, useId as vn, useImperativeHandle as yn, useInsertionEffect as bn, useLayoutEffect as xn, useMemo as J, useRef as Y, useState as X } from "react";
|
|
16
16
|
import { Fragment as Sn, jsx as Z, jsxs as Q } from "react/jsx-runtime";
|
|
@@ -46,7 +46,7 @@ function Nn(e, t) {
|
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/elements/F0Composer/parts/surface.ts
|
|
48
48
|
var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow-md transition-colors", Fn = [], In = () => null, Ln = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: o = !1, maxLength: c, maxLengthError: u, error: d = null, labels: p, placeholders: m, placeholdersPaused: h, role: g = "combobox", name: _, mentions: v, autocomplete: y, voice: b, onTextChange: x, onCleared: S, onEscape: w, onArrowUpWhenEmpty: T, onPasteFiles: E, pastePreferText: D = !1, onStateChange: O, header: ee, tray: k, leading: A, toolbarStart: j, toolbarCenter: M, collapsible: N = !1, collapsed: P = !1, replacement: F, accent: I = !1, asForm: L = !1, className: te, surfaceRef: ne, onSurfaceFocus: re, onSurfaceBlur: ie, handleRef: ae, reducedMotion: R = !1, "data-testid": oe }) => {
|
|
49
|
-
let z =
|
|
49
|
+
let z = rt(p, b), B = F != null, { error: se, show: le, clear: ue } = Ne(), de = Y(() => {}), fe = Y(() => {}), pe = Y(""), me = K((e) => {
|
|
50
50
|
let t = pe.current, n = t && !/\s$/.test(t) ? " " : "";
|
|
51
51
|
de.current(`${t}${n}${e}`);
|
|
52
52
|
}, []), he = {
|
|
@@ -80,11 +80,11 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
80
80
|
Pe.current = Te;
|
|
81
81
|
let Fe = Y(U.mentions);
|
|
82
82
|
Fe.current = U.mentions;
|
|
83
|
-
let
|
|
83
|
+
let ze = (y?.useAutocomplete ?? In)(we), Ve = ze?.isOpen ?? !1, He = U.dismissCurrentTrigger;
|
|
84
84
|
q(() => {
|
|
85
|
-
Ce(
|
|
86
|
-
}, [
|
|
87
|
-
let { highlightSegments:
|
|
85
|
+
Ce(Ve), Ve && He();
|
|
86
|
+
}, [Ve, He]);
|
|
87
|
+
let { highlightSegments: We, hasOverlay: Ge } = Be(we, { suppressGhost: Ve }), Ke = K((e) => {
|
|
88
88
|
let t = H.current;
|
|
89
89
|
if (!t) return;
|
|
90
90
|
t.focus(e);
|
|
@@ -92,10 +92,10 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
92
92
|
t.setSelectionRange(n, n);
|
|
93
93
|
}, [H]);
|
|
94
94
|
fe.current = () => H.current?.focus();
|
|
95
|
-
let
|
|
95
|
+
let Je = U.close;
|
|
96
96
|
q(() => {
|
|
97
|
-
B &&
|
|
98
|
-
}, [B,
|
|
97
|
+
B && Je();
|
|
98
|
+
}, [B, Je]);
|
|
99
99
|
let Ye = Te.length === 0;
|
|
100
100
|
q(() => {
|
|
101
101
|
O?.({
|
|
@@ -111,8 +111,8 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
111
111
|
q(() => {
|
|
112
112
|
Qe || Ze(!1);
|
|
113
113
|
}, [Qe]);
|
|
114
|
-
let $e = Xe && Qe ? u ?? null : null, et = $e ?? d ?? se, [tt, nt] = X(!1),
|
|
115
|
-
if (!at ||
|
|
114
|
+
let $e = Xe && Qe ? u ?? null : null, et = $e ?? d ?? se, [tt, nt] = X(!1), it = Y(!1), at = (Te.trim().length > 0 || a) && !xe && !o && !tt && !B, ot = t && !ye, lt = K(() => {
|
|
115
|
+
if (!at || it.current) return;
|
|
116
116
|
if (Qe) {
|
|
117
117
|
Ze(!0);
|
|
118
118
|
return;
|
|
@@ -130,10 +130,10 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
130
130
|
n(!0);
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
|
-
r instanceof Promise ? (
|
|
134
|
-
|
|
133
|
+
r instanceof Promise ? (it.current = !0, nt(!0), r.then((e) => {
|
|
134
|
+
it.current = !1, nt(!1), n(e === !1);
|
|
135
135
|
}, () => {
|
|
136
|
-
|
|
136
|
+
it.current = !1, nt(!1), n(!0);
|
|
137
137
|
})) : n(r === !1);
|
|
138
138
|
}, [
|
|
139
139
|
at,
|
|
@@ -199,14 +199,14 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
199
199
|
let t = yt;
|
|
200
200
|
return xt(e) ? (t && (Ze(!1), S?.()), !0) : !1;
|
|
201
201
|
}, wt = (e) => {
|
|
202
|
-
B || vt(e) || St(e) ||
|
|
202
|
+
B || vt(e) || St(e) || ze?.handleKeyDown(e) || U.handleKeyDown(e) || Ct(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && Te === "" && V.status === "idle" && !ge && !b?.busy && T?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || lt()));
|
|
203
203
|
}, Tt = (e) => {
|
|
204
204
|
e.preventDefault(), !B && (t && !xe ? (U.close(), n?.(), H.current?.focus()) : lt());
|
|
205
|
-
}, Et =
|
|
205
|
+
}, Et = qe({
|
|
206
206
|
enabled: !!E && !B,
|
|
207
207
|
onFiles: E ?? (() => {}),
|
|
208
208
|
preferText: D
|
|
209
|
-
}), Dt = vn(), Ot = vn(), G = `chat-composer-mentions-${Dt.replace(/:/g, "")}`, kt = U.isOpen && !
|
|
209
|
+
}), Dt = vn(), Ot = vn(), G = `chat-composer-mentions-${Dt.replace(/:/g, "")}`, kt = U.isOpen && !Ve && !B && (U.isLoading || U.rows.length > 0), At = U.rows[U.selectedIndex] ?? U.rows[0], jt = kt && At ? ht(G, At.item) : void 0, Mt = (e) => be ? /* @__PURE__ */ Z(l, {
|
|
210
210
|
type: "button",
|
|
211
211
|
variant: "outline",
|
|
212
212
|
size: e,
|
|
@@ -235,7 +235,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
235
235
|
},
|
|
236
236
|
transition: {
|
|
237
237
|
duration: .15,
|
|
238
|
-
ease:
|
|
238
|
+
ease: Le
|
|
239
239
|
},
|
|
240
240
|
children: ot ? /* @__PURE__ */ Z(l, {
|
|
241
241
|
type: L ? "submit" : "button",
|
|
@@ -253,7 +253,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
253
253
|
size: e,
|
|
254
254
|
hideLabel: !0,
|
|
255
255
|
label: r === "save" ? z.save : z.send,
|
|
256
|
-
icon: r === "save" ? an :
|
|
256
|
+
icon: r === "save" ? an : Jt,
|
|
257
257
|
onClick: L ? void 0 : lt,
|
|
258
258
|
disabled: !at
|
|
259
259
|
})
|
|
@@ -268,7 +268,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
268
268
|
animate: { opacity: 1 },
|
|
269
269
|
exit: { opacity: 0 },
|
|
270
270
|
transition: Ft,
|
|
271
|
-
children: [/* @__PURE__ */ Z(
|
|
271
|
+
children: [/* @__PURE__ */ Z(Re, {
|
|
272
272
|
stream: V.stream,
|
|
273
273
|
className: "min-w-0 flex-1"
|
|
274
274
|
}), /* @__PURE__ */ Q("div", {
|
|
@@ -333,7 +333,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
333
333
|
className: i((A || P) && "flex items-end", P && "pr-3"),
|
|
334
334
|
children: [
|
|
335
335
|
A,
|
|
336
|
-
/* @__PURE__ */ Z(
|
|
336
|
+
/* @__PURE__ */ Z(Ue, {
|
|
337
337
|
className: "min-w-0 flex-1",
|
|
338
338
|
textareaRef: H,
|
|
339
339
|
highlightRef: Oe,
|
|
@@ -353,15 +353,15 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
353
353
|
onChange: we.handleChange,
|
|
354
354
|
onKeyDown: wt,
|
|
355
355
|
onPaste: Et,
|
|
356
|
-
onFocus:
|
|
357
|
-
onBlur:
|
|
356
|
+
onFocus: ze?.handleFocus,
|
|
357
|
+
onBlur: ze?.handleBlur,
|
|
358
358
|
onCursorUpdate: we.updateCursorPosition,
|
|
359
359
|
onScroll: we.syncHighlightScroll,
|
|
360
|
-
highlightSegments:
|
|
360
|
+
highlightSegments: We,
|
|
361
361
|
hasOverlay: Ge,
|
|
362
|
-
isAutocompleteOpen:
|
|
363
|
-
autocompleteListboxId:
|
|
364
|
-
activeAutocompleteOptionId: (
|
|
362
|
+
isAutocompleteOpen: Ve || kt,
|
|
363
|
+
autocompleteListboxId: Ve ? ze?.listboxId : kt ? G : void 0,
|
|
364
|
+
activeAutocompleteOptionId: (Ve ? ze?.activeDescendantId : void 0) ?? jt,
|
|
365
365
|
isInvalid: $e !== null,
|
|
366
366
|
errorMessageId: Ot
|
|
367
367
|
}),
|
|
@@ -393,7 +393,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
|
|
|
393
393
|
}, "action-row")
|
|
394
394
|
}) : Lt
|
|
395
395
|
] }), Bt = /* @__PURE__ */ Q(Sn, { children: [
|
|
396
|
-
|
|
396
|
+
ze?.popover,
|
|
397
397
|
/* @__PURE__ */ Z(ct, {
|
|
398
398
|
isOpen: kt,
|
|
399
399
|
listboxId: G,
|
|
@@ -529,12 +529,12 @@ function Rn(e, t, n = .2) {
|
|
|
529
529
|
//#region src/addons/ai/F0AiChatTextArea/components/AttachedFilesList.tsx
|
|
530
530
|
var zn = (e) => {
|
|
531
531
|
let { provided: t } = R();
|
|
532
|
-
return t ? /* @__PURE__ */ Z(Bn, { ...e }) : /* @__PURE__ */ Z(
|
|
532
|
+
return t ? /* @__PURE__ */ Z(Bn, { ...e }) : /* @__PURE__ */ Z(Xe, { children: /* @__PURE__ */ Z(Bn, { ...e }) });
|
|
533
533
|
}, Bn = ({ attachedFiles: e, isUploading: n, onRemove: r, removeLabel: i, reducedMotion: a }) => {
|
|
534
534
|
let o = t(), s = Vn(e), c = J(() => e.flatMap((e) => {
|
|
535
535
|
let t = s.get(e.id);
|
|
536
536
|
if (!t) return [];
|
|
537
|
-
let n = e.file.name, r = e.file.type ||
|
|
537
|
+
let n = e.file.name, r = e.file.type || A({
|
|
538
538
|
name: n,
|
|
539
539
|
url: t
|
|
540
540
|
});
|
|
@@ -628,7 +628,7 @@ var zn = (e) => {
|
|
|
628
628
|
}, ...e.length > 0 ? [{ type: "separator" }] : []] : [], ...Hn(e)];
|
|
629
629
|
return /* @__PURE__ */ Z("div", {
|
|
630
630
|
onClick: (e) => e.stopPropagation(),
|
|
631
|
-
children: /* @__PURE__ */ Z(
|
|
631
|
+
children: /* @__PURE__ */ Z(tt, {
|
|
632
632
|
items: p,
|
|
633
633
|
align: "start",
|
|
634
634
|
disabled: o,
|
|
@@ -639,7 +639,7 @@ var zn = (e) => {
|
|
|
639
639
|
label: c.ai.addToConversation,
|
|
640
640
|
hideLabel: !0,
|
|
641
641
|
type: "button",
|
|
642
|
-
icon:
|
|
642
|
+
icon: jt,
|
|
643
643
|
variant: "outline",
|
|
644
644
|
size: "md",
|
|
645
645
|
pressed: u,
|
|
@@ -692,7 +692,7 @@ var zn = (e) => {
|
|
|
692
692
|
};
|
|
693
693
|
}, Kn = ({ creditWarning: e, children: n }) => {
|
|
694
694
|
let r = t(), i = Gn(e);
|
|
695
|
-
return /* @__PURE__ */ Z(
|
|
695
|
+
return /* @__PURE__ */ Z(j, {
|
|
696
696
|
notice: i,
|
|
697
697
|
dismissLabel: r.ai.creditWarning.dismiss ?? "",
|
|
698
698
|
className: "[&_form]:border-f1-border",
|
|
@@ -823,7 +823,7 @@ var zn = (e) => {
|
|
|
823
823
|
className: "min-w-0 flex-1 truncate",
|
|
824
824
|
children: c.t("ai.usageLimits.yourCompany")
|
|
825
825
|
}), /* @__PURE__ */ Z(G, {
|
|
826
|
-
icon:
|
|
826
|
+
icon: Kt,
|
|
827
827
|
size: "md",
|
|
828
828
|
color: "default"
|
|
829
829
|
})]
|
|
@@ -1307,7 +1307,7 @@ function hr({ src: e, alt: n, ...r }) {
|
|
|
1307
1307
|
//#endregion
|
|
1308
1308
|
//#region src/addons/ai/F0AiChat/components/markdownRenderers/components/Link.tsx
|
|
1309
1309
|
function gr({ children: e, ...t }) {
|
|
1310
|
-
return /* @__PURE__ */ Z(
|
|
1310
|
+
return /* @__PURE__ */ Z(Qe, {
|
|
1311
1311
|
...t,
|
|
1312
1312
|
variant: "link",
|
|
1313
1313
|
href: t.href,
|
|
@@ -1360,16 +1360,16 @@ function br({ id: e, trigger: t, resolver: n, contentClassName: r = "w-64", ...a
|
|
|
1360
1360
|
s,
|
|
1361
1361
|
l
|
|
1362
1362
|
]), h = d ? null : s;
|
|
1363
|
-
return /* @__PURE__ */ Q(
|
|
1363
|
+
return /* @__PURE__ */ Q($t, {
|
|
1364
1364
|
openDelay: 300,
|
|
1365
1365
|
closeDelay: 100,
|
|
1366
1366
|
onOpenChange: (e) => {
|
|
1367
1367
|
e && m();
|
|
1368
1368
|
},
|
|
1369
|
-
children: [/* @__PURE__ */ Z(
|
|
1369
|
+
children: [/* @__PURE__ */ Z(nn, {
|
|
1370
1370
|
asChild: !0,
|
|
1371
1371
|
children: t
|
|
1372
|
-
}), /* @__PURE__ */ Z(
|
|
1372
|
+
}), /* @__PURE__ */ Z(Yt, {
|
|
1373
1373
|
side: "top",
|
|
1374
1374
|
align: "start",
|
|
1375
1375
|
className: i(r, "rounded-2xl border-none p-0 shadow-md"),
|
|
@@ -1613,7 +1613,7 @@ function Mr({ id: e, label: n }) {
|
|
|
1613
1613
|
label: a.t("ai.entityRef.requisition.status"),
|
|
1614
1614
|
value: /* @__PURE__ */ Z("div", {
|
|
1615
1615
|
className: "flex items-center pt-1",
|
|
1616
|
-
children: /* @__PURE__ */ Z(
|
|
1616
|
+
children: /* @__PURE__ */ Z(qt, {
|
|
1617
1617
|
text: e.status,
|
|
1618
1618
|
variant: e.statusVariant ?? "neutral"
|
|
1619
1619
|
})
|
|
@@ -1740,10 +1740,10 @@ function zr({ type: e, id: t, children: n }) {
|
|
|
1740
1740
|
//#endregion
|
|
1741
1741
|
//#region src/addons/ai/F0AiChat/components/markdownRenderers/components/Table.tsx
|
|
1742
1742
|
async function Br(e, t, n) {
|
|
1743
|
-
let r =
|
|
1743
|
+
let r = Je(e), i = t === "xlsx" ? await ie([{
|
|
1744
1744
|
name: "Data",
|
|
1745
1745
|
rows: r
|
|
1746
|
-
}]) : await
|
|
1746
|
+
}]) : await Ze(r);
|
|
1747
1747
|
g(i, `${n}.${t}`);
|
|
1748
1748
|
}
|
|
1749
1749
|
function Vr({ children: e, title: n, ...r }) {
|
|
@@ -1760,7 +1760,7 @@ function Vr({ children: e, title: n, ...r }) {
|
|
|
1760
1760
|
tag: "h2",
|
|
1761
1761
|
className: "text-base font-medium capitalize text-f1-foreground",
|
|
1762
1762
|
children: n ?? a.ai.reportCard.tableLabel
|
|
1763
|
-
}), /* @__PURE__ */ Z(
|
|
1763
|
+
}), /* @__PURE__ */ Z(tt, {
|
|
1764
1764
|
icon: yt,
|
|
1765
1765
|
size: "md",
|
|
1766
1766
|
items: [{
|
|
@@ -1928,13 +1928,13 @@ var Xr = {
|
|
|
1928
1928
|
mimeType: e.mimeType,
|
|
1929
1929
|
size: e.bytes,
|
|
1930
1930
|
previewUrl: e.preview ? t?.(e.preview.path) ?? e.preview.url : void 0
|
|
1931
|
-
}), li = (e) =>
|
|
1931
|
+
}), li = (e) => A(e) ?? "", ui = pn(!1), di = () => _n(ui), fi = (e, t) => {
|
|
1932
1932
|
let [n, r] = X(() => t ? null : new Set(e));
|
|
1933
1933
|
return t && n !== null ? r(null) : !t && n === null && r(new Set(e)), (e) => e !== void 0 && n !== null && !n.has(e);
|
|
1934
|
-
}, pi = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ Z(
|
|
1934
|
+
}, pi = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ Z(Nt, {
|
|
1935
1935
|
module: e.module,
|
|
1936
1936
|
size: "md"
|
|
1937
|
-
}) : e?.type === "file" ? /* @__PURE__ */ Z(
|
|
1937
|
+
}) : e?.type === "file" ? /* @__PURE__ */ Z(Bt, {
|
|
1938
1938
|
file: e.file,
|
|
1939
1939
|
size: "lg"
|
|
1940
1940
|
}) : e?.type === "icon" ? /* @__PURE__ */ Z(It, {
|
|
@@ -2312,7 +2312,7 @@ var Vi = 625, Hi = /* @__PURE__ */ new Set(), Ui = ({ documents: e, onOpenFile:
|
|
|
2312
2312
|
});
|
|
2313
2313
|
}, Wi = "rounded-xl", Gi = "ai-chat", Ki = (e) => {
|
|
2314
2314
|
let { provided: t } = R();
|
|
2315
|
-
return t ? /* @__PURE__ */ Z(Yi, { ...e }) : /* @__PURE__ */ Z(
|
|
2315
|
+
return t ? /* @__PURE__ */ Z(Yi, { ...e }) : /* @__PURE__ */ Z(Xe, { children: /* @__PURE__ */ Z(Yi, { ...e }) });
|
|
2316
2316
|
}, qi = {
|
|
2317
2317
|
image: 0,
|
|
2318
2318
|
video: 1,
|
|
@@ -2337,7 +2337,7 @@ var Vi = 625, Hi = /* @__PURE__ */ new Set(), Ui = ({ documents: e, onOpenFile:
|
|
|
2337
2337
|
onImageError: (e) => u((t) => new Set(t).add(e.url))
|
|
2338
2338
|
});
|
|
2339
2339
|
}, Xi = (e, t, n) => e.map((e, r) => {
|
|
2340
|
-
let i =
|
|
2340
|
+
let i = M(e), a = !(t || et(e.url)) || i.bucket === "file" || i.bucket === "image" && n.has(e.url);
|
|
2341
2341
|
return {
|
|
2342
2342
|
file: e,
|
|
2343
2343
|
cls: i,
|
|
@@ -2468,7 +2468,7 @@ var Vi = 625, Hi = /* @__PURE__ */ new Set(), Ui = ({ documents: e, onOpenFile:
|
|
|
2468
2468
|
...e,
|
|
2469
2469
|
mimeType: a
|
|
2470
2470
|
},
|
|
2471
|
-
icon: a === "application/zip" ?
|
|
2471
|
+
icon: a === "application/zip" ? I : void 0,
|
|
2472
2472
|
testId: `${Gi}-file-tile`,
|
|
2473
2473
|
action: {
|
|
2474
2474
|
label: r.t("chat.downloadNamedFile", { name: e.name }),
|
|
@@ -2480,7 +2480,7 @@ var Vi = 625, Hi = /* @__PURE__ */ new Set(), Ui = ({ documents: e, onOpenFile:
|
|
|
2480
2480
|
});
|
|
2481
2481
|
}, ta = "relative box-border h-[132px] w-[168px] shrink-0 overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background-secondary p-0 transition-opacity hover:opacity-90", na = ({ file: e, onOpen: n, onError: r }) => {
|
|
2482
2482
|
let o = t(), s = H(e.thumbnailUrl ?? e.url);
|
|
2483
|
-
return
|
|
2483
|
+
return Ge(s.status, r), /* @__PURE__ */ Z("button", {
|
|
2484
2484
|
type: "button",
|
|
2485
2485
|
onClick: n,
|
|
2486
2486
|
draggable: !1,
|
|
@@ -2507,15 +2507,15 @@ var Vi = 625, Hi = /* @__PURE__ */ new Set(), Ui = ({ documents: e, onOpenFile:
|
|
|
2507
2507
|
url: e.url,
|
|
2508
2508
|
posterUrl: s.status === "ready" ? s.url : void 0,
|
|
2509
2509
|
onError: () => u(!0)
|
|
2510
|
-
}) : null, /* @__PURE__ */ Z(
|
|
2510
|
+
}) : null, /* @__PURE__ */ Z(F, {})]
|
|
2511
2511
|
});
|
|
2512
2512
|
}, ia = ({ images: e, onOpen: n, onImageError: r }) => {
|
|
2513
|
-
let a = t(), o = e.length === 1 ? e[0] : void 0, s = H(o ? o.thumbnailUrl ?? o.url : void 0), c =
|
|
2513
|
+
let a = t(), o = e.length === 1 ? e[0] : void 0, s = H(o ? o.thumbnailUrl ?? o.url : void 0), c = Ve(o && s.status === "ready" ? s.url : void 0, o) ?? void 0, l = o ? We(c?.width, c?.height) : null;
|
|
2514
2514
|
return /* @__PURE__ */ Z("div", {
|
|
2515
2515
|
style: l ? { width: l.width } : void 0,
|
|
2516
|
-
className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : ue,
|
|
2516
|
+
className: i("grid grid-cols-2 overflow-hidden border border-solid border-f1-border-secondary", l ? "max-w-full" : ue, N, Wi),
|
|
2517
2517
|
"data-testid": "ai-chat-image-album",
|
|
2518
|
-
children:
|
|
2518
|
+
children: it(c ? [c] : e).map((t, o, s) => {
|
|
2519
2519
|
let c = e[t.index];
|
|
2520
2520
|
if (!c) return null;
|
|
2521
2521
|
let l = o === s.length - 1;
|
|
@@ -2615,7 +2615,7 @@ function da({ anchor: e, onReply: n }) {
|
|
|
2615
2615
|
type: "button",
|
|
2616
2616
|
variant: "ghost",
|
|
2617
2617
|
label: c,
|
|
2618
|
-
icon:
|
|
2618
|
+
icon: nt,
|
|
2619
2619
|
onClick: () => {
|
|
2620
2620
|
n(e.text);
|
|
2621
2621
|
}
|
|
@@ -2706,7 +2706,7 @@ var fa = pn(void 0), pa = () => _n(fa), ma = (e) => /* @__PURE__ */ Z(Te, {
|
|
|
2706
2706
|
},
|
|
2707
2707
|
children: /* @__PURE__ */ Z("div", {
|
|
2708
2708
|
className: "flex flex-col gap-6",
|
|
2709
|
-
children: /* @__PURE__ */ Z(
|
|
2709
|
+
children: /* @__PURE__ */ Z(Ye, {
|
|
2710
2710
|
autoFocus: !0,
|
|
2711
2711
|
label: l,
|
|
2712
2712
|
placeholder: u,
|
|
@@ -2792,7 +2792,7 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
|
|
|
2792
2792
|
className: "flex min-w-0 flex-1 items-center justify-center gap-1",
|
|
2793
2793
|
children: /* @__PURE__ */ Z(G, {
|
|
2794
2794
|
size: "md",
|
|
2795
|
-
icon: s === "like" ?
|
|
2795
|
+
icon: s === "like" ? k : L,
|
|
2796
2796
|
color: "default"
|
|
2797
2797
|
})
|
|
2798
2798
|
})
|
|
@@ -2810,7 +2810,7 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
|
|
|
2810
2810
|
className: "flex min-w-0 flex-1 items-center justify-center gap-1",
|
|
2811
2811
|
children: /* @__PURE__ */ Z(G, {
|
|
2812
2812
|
size: "md",
|
|
2813
|
-
icon: s === "dislike" ? ut :
|
|
2813
|
+
icon: s === "dislike" ? ut : P,
|
|
2814
2814
|
color: "default"
|
|
2815
2815
|
})
|
|
2816
2816
|
})
|
|
@@ -2856,7 +2856,7 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
|
|
|
2856
2856
|
className: "min-h-6 flex items-center",
|
|
2857
2857
|
children: /* @__PURE__ */ Z("span", { children: t })
|
|
2858
2858
|
}),
|
|
2859
|
-
l ? null : /* @__PURE__ */ Z(G, { icon:
|
|
2859
|
+
l ? null : /* @__PURE__ */ Z(G, { icon: Kt })
|
|
2860
2860
|
]
|
|
2861
2861
|
}), /* @__PURE__ */ Z(w, {
|
|
2862
2862
|
forceMount: !0,
|
|
@@ -2923,7 +2923,7 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
|
|
|
2923
2923
|
className: "flex flex-col gap-3 pb-4",
|
|
2924
2924
|
children: e.map((t, n) => /* @__PURE__ */ Q("div", {
|
|
2925
2925
|
className: "relative",
|
|
2926
|
-
children: [/* @__PURE__ */ Z(
|
|
2926
|
+
children: [/* @__PURE__ */ Z(He, {
|
|
2927
2927
|
title: t,
|
|
2928
2928
|
status: f(n),
|
|
2929
2929
|
suffix: f(n) === "executing" ? /* @__PURE__ */ Z(Ea, { startedAt: a }) : void 0,
|
|
@@ -3125,7 +3125,7 @@ var Ba = {
|
|
|
3125
3125
|
onThumbsDown: () => {}
|
|
3126
3126
|
}, Va = (e) => {
|
|
3127
3127
|
let t = R(), n = /* @__PURE__ */ Z(va, { children: /* @__PURE__ */ Z(Ha, { ...e }) });
|
|
3128
|
-
return e.filePreviews || !t.provided ? /* @__PURE__ */ Z(
|
|
3128
|
+
return e.filePreviews || !t.provided ? /* @__PURE__ */ Z(Xe, {
|
|
3129
3129
|
filePreviews: e.filePreviews,
|
|
3130
3130
|
children: n
|
|
3131
3131
|
}) : n;
|
|
@@ -3205,13 +3205,13 @@ var Ba = {
|
|
|
3205
3205
|
className: "text-base italic text-f1-foreground-secondary",
|
|
3206
3206
|
children: k.ai.responseStopped
|
|
3207
3207
|
}) : null,
|
|
3208
|
-
t.endIndicator === "thinking" ? /* @__PURE__ */ Z(
|
|
3208
|
+
t.endIndicator === "thinking" ? /* @__PURE__ */ Z(He, {
|
|
3209
3209
|
title: k.ai.thinking,
|
|
3210
3210
|
status: "executing",
|
|
3211
3211
|
suffix: /* @__PURE__ */ Z(Ea, { startedAt: R })
|
|
3212
3212
|
}) : null,
|
|
3213
|
-
t.endIndicator === "activity" ? /* @__PURE__ */ Z(
|
|
3214
|
-
t.endIndicator === "asking" ? /* @__PURE__ */ Z(
|
|
3213
|
+
t.endIndicator === "activity" ? /* @__PURE__ */ Z(He, { status: "writing" }) : null,
|
|
3214
|
+
t.endIndicator === "asking" ? /* @__PURE__ */ Z(He, {
|
|
3215
3215
|
title: k.ai.askingQuestions,
|
|
3216
3216
|
status: "asking"
|
|
3217
3217
|
}) : null,
|
|
@@ -3372,7 +3372,7 @@ var Za = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
|
|
|
3372
3372
|
let t = Math.min(e.scrollHeight, $a);
|
|
3373
3373
|
e.style.height = `${t}px`, e.style.overflowY = e.scrollHeight > $a ? "auto" : "hidden";
|
|
3374
3374
|
}, [a]);
|
|
3375
|
-
let g = e === "single" ? /* @__PURE__ */ Z(Qa, { isSelected: r && !n }) : /* @__PURE__ */ Z(
|
|
3375
|
+
let g = e === "single" ? /* @__PURE__ */ Z(Qa, { isSelected: r && !n }) : /* @__PURE__ */ Z(en, {
|
|
3376
3376
|
checked: o,
|
|
3377
3377
|
onCheckedChange: () => d(!o),
|
|
3378
3378
|
title: p,
|
|
@@ -3411,7 +3411,7 @@ var Za = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
|
|
|
3411
3411
|
}) : /* @__PURE__ */ Q("div", {
|
|
3412
3412
|
ref: c,
|
|
3413
3413
|
className: i("flex cursor-pointer items-center rounded-md pl-2 transition-[background-color,transform] hover:bg-f1-background-secondary active:scale-[0.99]"),
|
|
3414
|
-
children: [/* @__PURE__ */ Z(
|
|
3414
|
+
children: [/* @__PURE__ */ Z(en, {
|
|
3415
3415
|
checked: t,
|
|
3416
3416
|
onCheckedChange: () => o(e.id),
|
|
3417
3417
|
title: e.label,
|
|
@@ -3532,7 +3532,7 @@ var no = [
|
|
|
3532
3532
|
disabled: r,
|
|
3533
3533
|
label: l.ai.clarifyingQuestion.back,
|
|
3534
3534
|
hideLabel: !0,
|
|
3535
|
-
icon:
|
|
3535
|
+
icon: Vt
|
|
3536
3536
|
}),
|
|
3537
3537
|
/* @__PURE__ */ Z("span", {
|
|
3538
3538
|
className: "translate-y-px text-sm font-semibold text-f1-foreground-tertiary",
|
|
@@ -3546,7 +3546,7 @@ var no = [
|
|
|
3546
3546
|
disabled: i || !a,
|
|
3547
3547
|
label: l.ai.clarifyingQuestion.next,
|
|
3548
3548
|
hideLabel: !0,
|
|
3549
|
-
icon:
|
|
3549
|
+
icon: Kt
|
|
3550
3550
|
})
|
|
3551
3551
|
]
|
|
3552
3552
|
}) : null,
|
|
@@ -3968,13 +3968,13 @@ var xo = class {
|
|
|
3968
3968
|
repeatType: "mirror"
|
|
3969
3969
|
};
|
|
3970
3970
|
function ko(e) {
|
|
3971
|
-
let [t, n] = X(e), r =
|
|
3971
|
+
let [t, n] = X(e), r = at(e), i = Y(null);
|
|
3972
3972
|
return Tn(r, "change", (e) => n(e)), {
|
|
3973
3973
|
value: t,
|
|
3974
3974
|
motionValue: r,
|
|
3975
3975
|
controls: i,
|
|
3976
3976
|
animate: K((e, t) => {
|
|
3977
|
-
i.current =
|
|
3977
|
+
i.current = gt(r, e, t);
|
|
3978
3978
|
}, [r])
|
|
3979
3979
|
};
|
|
3980
3980
|
}
|
|
@@ -4650,7 +4650,7 @@ var fs = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
|
|
|
4650
4650
|
className: i(gs()),
|
|
4651
4651
|
children: e
|
|
4652
4652
|
}) : null]
|
|
4653
|
-
}), bs = ({ balance: e }) => /* @__PURE__ */ Z(
|
|
4653
|
+
}), bs = ({ balance: e }) => /* @__PURE__ */ Z(Gt, {
|
|
4654
4654
|
amount: e.amount,
|
|
4655
4655
|
percentage: e.percentage ?? void 0,
|
|
4656
4656
|
invertStatus: e.invertStatus,
|
|
@@ -4665,26 +4665,26 @@ var fs = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
|
|
|
4665
4665
|
src: e.avatar.src,
|
|
4666
4666
|
size: "xs"
|
|
4667
4667
|
})
|
|
4668
|
-
}) : e.content === "people" ? /* @__PURE__ */ Z(
|
|
4668
|
+
}) : e.content === "people" ? /* @__PURE__ */ Z(Rt, {
|
|
4669
4669
|
type: "person",
|
|
4670
4670
|
avatars: e.avatars,
|
|
4671
4671
|
size: "md",
|
|
4672
4672
|
max: 3
|
|
4673
4673
|
}) : e.content === "team" ? /* @__PURE__ */ Z(ys, {
|
|
4674
4674
|
label: t,
|
|
4675
|
-
children: /* @__PURE__ */ Z(
|
|
4675
|
+
children: /* @__PURE__ */ Z(zt, {
|
|
4676
4676
|
name: e.avatar.name,
|
|
4677
4677
|
src: e.avatar.src,
|
|
4678
4678
|
size: "xs"
|
|
4679
4679
|
})
|
|
4680
4680
|
}) : e.content === "company" ? /* @__PURE__ */ Z(ys, {
|
|
4681
4681
|
label: t,
|
|
4682
|
-
children: /* @__PURE__ */ Z(
|
|
4682
|
+
children: /* @__PURE__ */ Z(Pt, {
|
|
4683
4683
|
name: e.avatar.name,
|
|
4684
4684
|
src: e.avatar.src,
|
|
4685
4685
|
size: "xs"
|
|
4686
4686
|
})
|
|
4687
|
-
}) : e.content === "alert" ? /* @__PURE__ */ Z(
|
|
4687
|
+
}) : e.content === "alert" ? /* @__PURE__ */ Z(Ut, {
|
|
4688
4688
|
text: e.alertLabel,
|
|
4689
4689
|
level: e.level
|
|
4690
4690
|
}) : e.content === "balance" ? /* @__PURE__ */ Z(bs, { balance: e.balance }) : null;
|
|
@@ -4789,7 +4789,7 @@ var Ts = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
|
|
|
4789
4789
|
hide: !0,
|
|
4790
4790
|
domain: ["dataMin - 1", "dataMax + 1"]
|
|
4791
4791
|
}),
|
|
4792
|
-
/* @__PURE__ */ Z(
|
|
4792
|
+
/* @__PURE__ */ Z(ee, {
|
|
4793
4793
|
type: "linear",
|
|
4794
4794
|
dataKey: "value",
|
|
4795
4795
|
stroke: a.stroke,
|
|
@@ -4910,7 +4910,7 @@ function Is(e) {
|
|
|
4910
4910
|
children: [
|
|
4911
4911
|
/* @__PURE__ */ Q("div", {
|
|
4912
4912
|
className: "flex items-center gap-3 px-4 py-3",
|
|
4913
|
-
children: [t ? /* @__PURE__ */ Z(
|
|
4913
|
+
children: [t ? /* @__PURE__ */ Z(Nt, {
|
|
4914
4914
|
module: t,
|
|
4915
4915
|
size: "md"
|
|
4916
4916
|
}) : null, /* @__PURE__ */ Q("div", {
|
|
@@ -4980,7 +4980,7 @@ var Ls = ({ icon: e, title: t, children: n }) => {
|
|
|
4980
4980
|
children: t
|
|
4981
4981
|
}),
|
|
4982
4982
|
/* @__PURE__ */ Z(G, {
|
|
4983
|
-
icon:
|
|
4983
|
+
icon: Kt,
|
|
4984
4984
|
className: "h-4 w-4 transition-transform duration-200"
|
|
4985
4985
|
})
|
|
4986
4986
|
]
|
|
@@ -5021,7 +5021,7 @@ function Bs({ sources: e, title: n }) {
|
|
|
5021
5021
|
if (!e || e.length === 0 || !Array.isArray(e)) return null;
|
|
5022
5022
|
let i = n ?? r.ai.resourcesGroupTitle;
|
|
5023
5023
|
return /* @__PURE__ */ Z(Ls, {
|
|
5024
|
-
icon:
|
|
5024
|
+
icon: At,
|
|
5025
5025
|
title: i,
|
|
5026
5026
|
children: /* @__PURE__ */ Z("div", {
|
|
5027
5027
|
className: "flex flex-col gap-1 rounded-lg border border-solid border-f1-border-secondary p-2",
|
|
@@ -5052,10 +5052,10 @@ Bs.displayName = "F0AiMessageSources";
|
|
|
5052
5052
|
//#endregion
|
|
5053
5053
|
//#region src/addons/ai/F0AiTableCard/F0AiTableCard.tsx
|
|
5054
5054
|
async function Vs(e, t, n) {
|
|
5055
|
-
let r =
|
|
5055
|
+
let r = Je(e), i = t === "xlsx" ? await ie([{
|
|
5056
5056
|
name: "Data",
|
|
5057
5057
|
rows: r
|
|
5058
|
-
}]) : await
|
|
5058
|
+
}]) : await Ze(r);
|
|
5059
5059
|
g(i, `${n}.${t}`);
|
|
5060
5060
|
}
|
|
5061
5061
|
function Hs({ dataset: e, title: n, filename: r }) {
|
|
@@ -5064,14 +5064,14 @@ function Hs({ dataset: e, title: n, filename: r }) {
|
|
|
5064
5064
|
let t = r ?? (s.replace(/\s+/g, "_").toLowerCase() || "table");
|
|
5065
5065
|
Vs(o.current, e, t);
|
|
5066
5066
|
}, [s, r]);
|
|
5067
|
-
return e.columns?.length ? /* @__PURE__ */ Q(
|
|
5067
|
+
return e.columns?.length ? /* @__PURE__ */ Q(Mt, {
|
|
5068
5068
|
display: "flex",
|
|
5069
5069
|
flexDirection: "column",
|
|
5070
5070
|
gap: "md",
|
|
5071
5071
|
borderRadius: "md",
|
|
5072
5072
|
border: "default",
|
|
5073
5073
|
borderColor: "secondary",
|
|
5074
|
-
children: [/* @__PURE__ */ Q(
|
|
5074
|
+
children: [/* @__PURE__ */ Q(Mt, {
|
|
5075
5075
|
display: "flex",
|
|
5076
5076
|
alignItems: "center",
|
|
5077
5077
|
justifyContent: "between",
|
|
@@ -5085,7 +5085,7 @@ function Hs({ dataset: e, title: n, filename: r }) {
|
|
|
5085
5085
|
tag: "h2",
|
|
5086
5086
|
className: "text-base font-medium capitalize text-f1-foreground",
|
|
5087
5087
|
children: s
|
|
5088
|
-
}), /* @__PURE__ */ Z(
|
|
5088
|
+
}), /* @__PURE__ */ Z(tt, {
|
|
5089
5089
|
icon: yt,
|
|
5090
5090
|
size: "md",
|
|
5091
5091
|
items: [{
|
|
@@ -5098,7 +5098,7 @@ function Hs({ dataset: e, title: n, filename: r }) {
|
|
|
5098
5098
|
onClick: () => c("csv")
|
|
5099
5099
|
}]
|
|
5100
5100
|
})]
|
|
5101
|
-
}), /* @__PURE__ */ Z(
|
|
5101
|
+
}), /* @__PURE__ */ Z(Mt, {
|
|
5102
5102
|
overflowX: "auto",
|
|
5103
5103
|
children: /* @__PURE__ */ Q("table", {
|
|
5104
5104
|
ref: o,
|
|
@@ -5153,7 +5153,7 @@ function Us({ credits: e, trigger: n }) {
|
|
|
5153
5153
|
className: "flex w-[324px] flex-col gap-3 rounded-md border border-solid border-f1-border-secondary p-3",
|
|
5154
5154
|
children: [v ? /* @__PURE__ */ Q("div", {
|
|
5155
5155
|
className: "flex min-w-0 max-w-full flex-1 items-center gap-2 overflow-hidden text-left text-lg text-f1-foreground",
|
|
5156
|
-
children: [/* @__PURE__ */ Z(
|
|
5156
|
+
children: [/* @__PURE__ */ Z(Pt, {
|
|
5157
5157
|
name: e.companyName ?? "",
|
|
5158
5158
|
src: e.companyLogoUrl,
|
|
5159
5159
|
size: "lg"
|
|
@@ -5355,7 +5355,7 @@ function Ks({ employeeCredits: e, trigger: n }) {
|
|
|
5355
5355
|
className: "flex w-[324px] flex-col gap-3 rounded-md border border-solid border-f1-border-secondary p-3",
|
|
5356
5356
|
children: [h ? /* @__PURE__ */ Q("div", {
|
|
5357
5357
|
className: "flex min-w-0 max-w-full flex-1 items-center gap-2 overflow-hidden text-left text-lg text-f1-foreground",
|
|
5358
|
-
children: [/* @__PURE__ */ Z(
|
|
5358
|
+
children: [/* @__PURE__ */ Z(Pt, {
|
|
5359
5359
|
name: e.companyName ?? "",
|
|
5360
5360
|
src: e.companyLogoUrl,
|
|
5361
5361
|
size: "lg"
|
|
@@ -5444,7 +5444,7 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
5444
5444
|
className: "min-w-0 text-left",
|
|
5445
5445
|
children: r ?? x.ai.newConversation
|
|
5446
5446
|
}), /* @__PURE__ */ Z(G, {
|
|
5447
|
-
icon:
|
|
5447
|
+
icon: Ft,
|
|
5448
5448
|
color: "default",
|
|
5449
5449
|
size: "md"
|
|
5450
5450
|
})]
|
|
@@ -5507,14 +5507,14 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
|
|
|
5507
5507
|
//#region src/addons/ai/F0AiChatHistory/utils.ts
|
|
5508
5508
|
function Xs(e) {
|
|
5509
5509
|
let t = new Date(e), n = /* @__PURE__ */ new Date();
|
|
5510
|
-
return Oe(t) ? "today" :
|
|
5510
|
+
return Oe(t) ? "today" : Ke(t) ? "yesterday" : tn(t, n) ? "thisMonth" : "older";
|
|
5511
5511
|
}
|
|
5512
5512
|
function Zs(e, t, n) {
|
|
5513
|
-
let r = new Date(e), i =
|
|
5513
|
+
let r = new Date(e), i = Zt(r, "p", { locale: n });
|
|
5514
5514
|
if (Oe(r)) return `${t.today}, ${i}`;
|
|
5515
|
-
if (
|
|
5516
|
-
let a =
|
|
5517
|
-
return `${
|
|
5515
|
+
if (Ke(r)) return `${t.yesterday}, ${i}`;
|
|
5516
|
+
let a = !Xt(r, /* @__PURE__ */ new Date());
|
|
5517
|
+
return `${Zt(r, a ? "MMM d yyyy" : "MMM d", { locale: n })}, ${i}`;
|
|
5518
5518
|
}
|
|
5519
5519
|
function Qs(e) {
|
|
5520
5520
|
let t = {
|
|
@@ -5537,9 +5537,9 @@ function Qs(e) {
|
|
|
5537
5537
|
//#endregion
|
|
5538
5538
|
//#region src/addons/ai/F0AiChatHistory/components/ThreadItem.tsx
|
|
5539
5539
|
function $s({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSelect: s, onPin: c, onUnpin: d, onDelete: f, className: p }) {
|
|
5540
|
-
let m = t(), h =
|
|
5540
|
+
let m = t(), h = Qt(), g = J(() => [{
|
|
5541
5541
|
label: n ? m.ai.unpinChat : m.ai.pinChat,
|
|
5542
|
-
icon: n ? Fe :
|
|
5542
|
+
icon: n ? Fe : ze,
|
|
5543
5543
|
onClick: () => n ? d(e.id) : c(e.id)
|
|
5544
5544
|
}, {
|
|
5545
5545
|
label: m.ai.deleteChat,
|
|
@@ -5598,10 +5598,10 @@ function $s({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
|
|
|
5598
5598
|
o ? /* @__PURE__ */ Z("div", {
|
|
5599
5599
|
className: "flex h-7 w-7 shrink-0 items-center justify-center",
|
|
5600
5600
|
"aria-label": m.ai.threadOptions,
|
|
5601
|
-
children: /* @__PURE__ */ Z(
|
|
5601
|
+
children: /* @__PURE__ */ Z(Wt, { size: "small" })
|
|
5602
5602
|
}) : /* @__PURE__ */ Z("div", {
|
|
5603
5603
|
className: i("hidden items-center", "group-hover:flex group-focus-within:flex", "has-[[aria-expanded=true]]:flex"),
|
|
5604
|
-
children: /* @__PURE__ */ Z(
|
|
5604
|
+
children: /* @__PURE__ */ Z(tt, {
|
|
5605
5605
|
items: g,
|
|
5606
5606
|
children: /* @__PURE__ */ Z(l, {
|
|
5607
5607
|
icon: on,
|
|
@@ -5633,7 +5633,7 @@ function ec({ label: e, threads: t, pinnedIds: n, onSelect: r, onPin: o, onUnpin
|
|
|
5633
5633
|
className: "text-sm font-medium capitalize tracking-wide text-f1-foreground-secondary",
|
|
5634
5634
|
children: e
|
|
5635
5635
|
}), /* @__PURE__ */ Z(G, {
|
|
5636
|
-
icon: l ?
|
|
5636
|
+
icon: l ? Ft : rn,
|
|
5637
5637
|
color: "secondary",
|
|
5638
5638
|
size: "xs"
|
|
5639
5639
|
})]
|
|
@@ -5726,7 +5726,7 @@ var ac = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading:
|
|
|
5726
5726
|
children: [/* @__PURE__ */ Q("div", {
|
|
5727
5727
|
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",
|
|
5728
5728
|
children: [/* @__PURE__ */ Z(G, {
|
|
5729
|
-
icon:
|
|
5729
|
+
icon: At,
|
|
5730
5730
|
color: "secondary",
|
|
5731
5731
|
size: "md"
|
|
5732
5732
|
}), /* @__PURE__ */ Z("input", {
|
|
@@ -5794,7 +5794,7 @@ function sc() {
|
|
|
5794
5794
|
return new Set(Array.isArray(e) ? e : []);
|
|
5795
5795
|
}
|
|
5796
5796
|
function cc(e) {
|
|
5797
|
-
|
|
5797
|
+
$e(oc, [...e]);
|
|
5798
5798
|
}
|
|
5799
5799
|
function lc({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, unpinThread: i }) {
|
|
5800
5800
|
let [a, o] = X([]), [s, c] = X(!1), [l, u] = X(null), [d, f] = X(sc), [p, m] = X(() => /* @__PURE__ */ new Set()), h = K(async () => {
|