@factorialco/f0-react 4.70.0 → 4.70.1

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.
@@ -3,8 +3,8 @@ import { cR as Sx, cQ as Tx, d1 as Rx, cN as Ex, cO as zx, cH as Lx, cI as Ax, c
3
3
  import { jsx as n, jsxs as p, Fragment as _e } from "react/jsx-runtime";
4
4
  import q, { forwardRef as Oe, useRef as D, useTransition as ru, useState as B, useLayoutEffect as Dn, useId as Rn, useContext as Lt, createContext as ht, useEffect as K, useCallback as j, useMemo as le, Fragment as _t, isValidElement as ou, cloneElement as rs, Suspense as Sr, lazy as an, createElement as er, memo as os, Children as is } from "react";
5
5
  import { d as S, T as iu, a as au, b as su, f as qe, c as lu, u as cu } from "./tooltip-Cik7KBQT.js";
6
- import { C as du, P as uu, E as fu, a as _o, b as Bn, M as mu, p as hu, c as pu, R as xi, e as as, u as gu, f as bu, g as vu, h as xu, i as yu, j as wu, O as ss, k as ls, S as Nu, A as Cu, B as Iu, L as ku, l as Su, V as Tu, m as Ru, n as Eu, o as zu } from "./index-BZPUbw4M.js";
7
- import { a5 as r1, a6 as o1, v as i1, w as a1, s as s1, N as l1, x as c1, H as d1, ag as u1, K as f1, t as m1, a3 as h1, ai as p1, ah as g1, X as b1, al as v1, F as x1, a0 as y1, Z as w1, T as N1, an as C1, U as I1, a1 as k1, a2 as S1, y as T1, aj as R1, ak as E1, W as z1, a4 as L1, ad as A1, af as F1, z as P1, G as O1, I as M1, _ as D1, am as B1, $ as _1, Y as $1, ao as H1, D as W1, J as j1, q as U1, r as V1, a9 as G1, aa as K1, a7 as q1, ae as Y1, Q as X1, ab as J1, a8 as Q1, ac as Z1 } from "./index-BZPUbw4M.js";
6
+ import { C as du, P as uu, E as fu, a as _o, b as Bn, M as mu, p as hu, c as pu, R as xi, e as as, u as gu, f as bu, g as vu, h as xu, i as yu, j as wu, O as ss, k as ls, S as Nu, A as Cu, B as Iu, L as ku, l as Su, V as Tu, m as Ru, n as Eu, o as zu } from "./index-Dq9rNx0D.js";
7
+ import { a5 as r1, a6 as o1, v as i1, w as a1, s as s1, N as l1, x as c1, H as d1, ag as u1, K as f1, t as m1, a3 as h1, ai as p1, ah as g1, X as b1, al as v1, F as x1, a0 as y1, Z as w1, T as N1, an as C1, U as I1, a1 as k1, a2 as S1, y as T1, aj as R1, ak as E1, W as z1, a4 as L1, ad as A1, af as F1, z as P1, G as O1, I as M1, _ as D1, am as B1, $ as _1, Y as $1, ao as H1, D as W1, J as j1, q as U1, r as V1, a9 as G1, aa as K1, a7 as q1, ae as Y1, Q as X1, ab as J1, a8 as Q1, ac as Z1 } from "./index-Dq9rNx0D.js";
8
8
  import Lu from "react-dom";
9
9
  const Au = Zl("Search", [
10
10
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
@@ -7563,7 +7563,7 @@ const Js = () => Ut(js, "useChatJump"), yh = () => Ut(Us, "useChatHighlightedId"
7563
7563
  }, Lr = (e, t) => {
7564
7564
  const r = document.createElement("a");
7565
7565
  r.href = e, r.download = t, r.rel = "noreferrer", r.click();
7566
- }, Ih = an(() => import("./ChatPdfThumbnail-CaG1phtP.js")), kh = an(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), Sh = an(() => import("./ChatDocxThumbnail-DzNPNFya.js")), Th = an(() => import("./ChatTextThumbnail-yVt_iYi7.js")), Rh = 288, Eh = 160, zh = (e) => {
7566
+ }, Ih = an(() => import("./ChatPdfThumbnail-Di-RSqfO.js")), kh = an(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), Sh = an(() => import("./ChatDocxThumbnail-DzNPNFya.js")), Th = an(() => import("./ChatTextThumbnail-yVt_iYi7.js")), Rh = 288, Eh = 160, zh = (e) => {
7567
7567
  const [t, r] = B(!1);
7568
7568
  return K(() => {
7569
7569
  const o = e.current;
@@ -9606,7 +9606,7 @@ const qh = {
9606
9606
  ] })
9607
9607
  ] }) });
9608
9608
  }, ap = an(
9609
- () => import("./index-Cql9uxeA.js").then((e) => e.i).then((e) => ({
9609
+ () => import("./index-eDEEXSHh.js").then((e) => e.i).then((e) => ({
9610
9610
  default: e.F0PdfViewer
9611
9611
  }))
9612
9612
  ), sp = () => {
package/dist/f0.js CHANGED
@@ -7,12 +7,12 @@ import { D as HF, E as WF, G as UF, H as _d, I as Ab, J as DN, K as AN, L as Zn,
7
7
  import { A as vde, C as pde, t as gde, s as mde, v as yde, y as _de, l as bde, i as xde, q as wde, z as Sde, B as Cde, p as Tde, r as Dde, j as Ade, e as Mde, g as Ede, k as Lde, T as Nde, w as Ide, h as kde, a as Pde, n as Rde, m as Ode, o as Bde, b as zde, f as Vde, x as Fde, c as Gde, d as Hde, u as Wde } from "./F0AiProcessingOverlay-C0NmG1vV.js";
8
8
  import { d as te, u as rf, h as KF, i as Ys, P as nf, g as Vl, j as QF, f as Pa } from "./tooltip-Cik7KBQT.js";
9
9
  import { createPortal as qv } from "react-dom";
10
- import { C as JF, ap as e5, aq as t5, ar as r5, as as Tw, at as n5, au as i5, av as a5, aw as o5, ax as s5, ay as l5, az as u5, j as c5, F as MN, aA as f5, aB as h5, aC as d5, aD as v5, aE as p5, aF as EN, aG as g5, aH as Zv, aI as Va, aJ as m5, aK as Mb, aL as Eb, K as y5, aM as _5, aN as hs, aO as LN, aP as b5, aQ as x5, aR as w5, aS as S5, aT as C5, aU as T5, a0 as D5, ag as A5, aV as M5, X as E5, E as L5, a as N5, e as jv, R as Lb, u as Nb, _ as NN, O as Ib, aW as IN, aX as Dw, aY as kb, s as I5, f as kN, a4 as PN, aZ as k5, a_ as P5, a$ as R5, b0 as O5, M as B5 } from "./index-BZPUbw4M.js";
11
- import { v as $de, w as Yde, N as Xde, x as qde, H as Zde, bm as jde, bl as Kde, bf as Qde, b2 as Jde, b1 as eve, b3 as tve, b4 as rve, b6 as nve, b7 as ive, ai as ave, ah as ove, al as sve, Z as lve, T as uve, an as cve, U as fve, y as hve, bn as dve, aj as vve, ak as pve, W as gve, z as mve, P as yve, G as _ve, I as bve, am as xve, Y as wve, ao as Sve, D as Cve, J as Tve, bp as Dve, q as Ave, r as Mve, be as Eve, bj as Lve, bj as Nve, bk as Ive, ba as kve, b9 as Pve, bo as Rve, ae as Ove, bc as Bve, bd as zve, Q as Vve, bq as Fve, br as Gve, g as Hve, bg as Wve, bh as Uve, bi as $ve, b5 as Yve, bb as Xve, h as qve, k as Zve, b8 as jve, bs as Kve } from "./index-BZPUbw4M.js";
10
+ import { C as JF, ap as e5, aq as t5, ar as r5, as as Tw, at as n5, au as i5, av as a5, aw as o5, ax as s5, ay as l5, az as u5, j as c5, F as MN, aA as f5, aB as h5, aC as d5, aD as v5, aE as p5, aF as EN, aG as g5, aH as Zv, aI as Va, aJ as m5, aK as Mb, aL as Eb, K as y5, aM as _5, aN as hs, aO as LN, aP as b5, aQ as x5, aR as w5, aS as S5, aT as C5, aU as T5, a0 as D5, ag as A5, aV as M5, X as E5, E as L5, a as N5, e as jv, R as Lb, u as Nb, _ as NN, O as Ib, aW as IN, aX as Dw, aY as kb, s as I5, f as kN, a4 as PN, aZ as k5, a_ as P5, a$ as R5, b0 as O5, M as B5 } from "./index-Dq9rNx0D.js";
11
+ import { v as $de, w as Yde, N as Xde, x as qde, H as Zde, bm as jde, bl as Kde, bf as Qde, b2 as Jde, b1 as eve, b3 as tve, b4 as rve, b6 as nve, b7 as ive, ai as ave, ah as ove, al as sve, Z as lve, T as uve, an as cve, U as fve, y as hve, bn as dve, aj as vve, ak as pve, W as gve, z as mve, P as yve, G as _ve, I as bve, am as xve, Y as wve, ao as Sve, D as Cve, J as Tve, bp as Dve, q as Ave, r as Mve, be as Eve, bj as Lve, bj as Nve, bk as Ive, ba as kve, b9 as Pve, bo as Rve, ae as Ove, bc as Bve, bd as zve, Q as Vve, bq as Fve, br as Gve, g as Hve, bg as Wve, bh as Uve, bi as $ve, b5 as Yve, bb as Xve, h as qve, k as Zve, b8 as jve, bs as Kve } from "./index-Dq9rNx0D.js";
12
12
  import { l as Wy, c as RN, d as bd, r as Uy } from "./F0VideoPlayer-BWRlLaGW.js";
13
13
  import { F as Jve } from "./F0VideoPlayer-BWRlLaGW.js";
14
- import { F as tpe, p as rpe } from "./index-Cql9uxeA.js";
15
- import { c as ipe } from "./pdfWorker-CMiWD9U2.js";
14
+ import { F as tpe, p as rpe } from "./index-eDEEXSHh.js";
15
+ import { c as ipe } from "./pdfWorker-CuZhyFDG.js";
16
16
  import { g as z5 } from "./_commonjsHelpers-ByX85dGu.js";
17
17
  import { utils as al, write as ON } from "./xlsx-CzlURDDb.js";
18
18
  import { defaultTranslations as ope } from "./i18n-provider-defaults.js";
@@ -52826,51 +52826,49 @@ function sb(r, e) {
52826
52826
  return r ? e ? [0, 0, ra, ra] : [ra, ra, 0, 0] : e ? [ra, 0, 0, ra] : [0, ra, ra, 0];
52827
52827
  }
52828
52828
  function Aae(r, e, t) {
52829
- if (!r.some(
52830
- (o) => o.data.some((s) => Il(s) < 0)
52831
- ))
52832
- return;
52833
52829
  if (!t)
52834
- return (o, s, l) => sb(e, l < 0);
52835
- const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
52836
- return r.forEach((o, s) => {
52837
- o.data.forEach((l, u) => {
52838
- const c = Il(l);
52839
- c > 0 ? i.set(u, s) : c < 0 && a.set(u, s);
52830
+ return r.some(
52831
+ (o) => o.data.some((s) => Il(s) < 0)
52832
+ ) ? (o, s, l) => sb(e, l < 0) : void 0;
52833
+ const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
52834
+ return r.forEach((a, o) => {
52835
+ a.data.forEach((s, l) => {
52836
+ const u = Il(s);
52837
+ u > 0 ? n.set(l, o) : u < 0 && i.set(l, o);
52840
52838
  });
52841
- }), (o, s, l) => {
52842
- if (l === 0) return 0;
52843
- const u = l < 0;
52844
- return (u ? a : i).get(s) === o ? sb(e, u) : 0;
52839
+ }), (a, o, s) => {
52840
+ if (s === 0) return 0;
52841
+ const l = s < 0;
52842
+ return (l ? i : n).get(o) === a ? sb(e, l) : 0;
52845
52843
  };
52846
52844
  }
52847
- function Mae(r, e, t, n, i, a, o, s, l, u, c) {
52848
- const f = Tae(r, e), h = Dae(r), d = i ? h ? `stacked-${e}` : "stacked" : h ? `stack-${e}` : void 0, v = r.data.map((b, S) => {
52849
- const x = Il(b), C = xL(b), T = l?.(e, S, x);
52850
- if (C === void 0 && T === void 0)
52851
- return x;
52852
- const D = C !== void 0 ? Dy(C) : void 0;
52845
+ function Mae(r, e, t, n, i, a, o, s, l, u) {
52846
+ const c = Tae(r, e), f = Dae(r), h = i ? f ? `stacked-${e}` : "stacked" : f ? `stack-${e}` : void 0, d = r.data.map((y, _) => {
52847
+ const b = Il(y), S = xL(y), x = s?.(e, _, b);
52848
+ if (S === void 0 && x === void 0)
52849
+ return b;
52850
+ const C = S !== void 0 ? Dy(S) : void 0;
52853
52851
  return {
52854
- value: x,
52852
+ value: b,
52855
52853
  itemStyle: {
52856
- ...C !== void 0 && { color: C },
52857
- ...T !== void 0 && {
52858
- borderRadius: T
52854
+ ...S !== void 0 && { color: S },
52855
+ ...x !== void 0 && {
52856
+ borderRadius: x
52859
52857
  }
52860
52858
  },
52861
- ...i && D !== void 0 ? {
52862
- label: { color: D },
52863
- emphasis: { label: { color: D } }
52859
+ ...i && C !== void 0 ? {
52860
+ label: { color: C },
52861
+ emphasis: { label: { color: C } }
52864
52862
  } : {}
52865
52863
  };
52866
- }), p = sb(t, !1), g = i && !a ? 0 : p, m = {
52864
+ }), v = sb(t, !1), p = {
52867
52865
  name: r.name,
52868
52866
  type: "bar",
52869
- data: v,
52870
- stack: d,
52867
+ data: d,
52868
+ stack: h,
52871
52869
  itemStyle: {
52872
- color: f,
52873
- borderRadius: g
52870
+ color: c,
52871
+ borderRadius: v
52874
52872
  },
52875
52873
  label: {
52876
52874
  show: n,
@@ -52880,15 +52878,15 @@ function Mae(r, e, t, n, i, a, o, s, l, u, c) {
52880
52878
  // Inside a coloured segment, choose black or white per fill so small
52881
52879
  // canvas text retains WCAG AA contrast. Outside labels use the semantic
52882
52880
  // secondary foreground colour from the active theme.
52883
- color: i ? Dy(f) : o,
52881
+ color: i ? Dy(c) : a,
52884
52882
  fontWeight: "bold",
52885
- fontSize: s,
52883
+ fontSize: o,
52886
52884
  overflow: "truncate",
52887
52885
  ellipsis: "...",
52888
52886
  // Labels use the same value formatter as the axis/tooltip (e.g. "100K").
52889
- formatter: c ? (b) => c(Number(b.value)) : void 0
52887
+ formatter: u ? (y) => u(Number(y.value)) : void 0
52890
52888
  },
52891
- labelLayout: u,
52889
+ labelLayout: l,
52892
52890
  emphasis: {
52893
52891
  itemStyle: {
52894
52892
  shadowBlur: 0,
@@ -52898,34 +52896,34 @@ function Mae(r, e, t, n, i, a, o, s, l, u, c) {
52898
52896
  // Keep the same contrast-safe colour on hover. With labels off, add
52899
52897
  // nothing here — otherwise hovering a stacked bar would reveal numbers
52900
52898
  // that are meant to stay off.
52901
- ...i && n ? { label: { show: !0, color: Dy(f) } } : {}
52899
+ ...i && n ? { label: { show: !0, color: Dy(c) } } : {}
52902
52900
  }
52903
52901
  };
52904
- if (!h)
52905
- return [m];
52906
- const y = r.data.map((b) => {
52907
- const S = Il(b), x = ob(b);
52908
- if (x === void 0 || x <= S)
52902
+ if (!f)
52903
+ return [p];
52904
+ const g = r.data.map((y) => {
52905
+ const _ = Il(y), b = ob(y);
52906
+ if (b === void 0 || b <= _)
52909
52907
  return 0;
52910
- const C = xL(b);
52911
- return C !== void 0 ? {
52912
- value: x - S,
52908
+ const S = xL(y);
52909
+ return S !== void 0 ? {
52910
+ value: b - _,
52913
52911
  itemStyle: {
52914
52912
  color: new zi(
52915
52913
  ...t ? [0, 0, 0, 1] : [1, 0, 0, 0],
52916
52914
  [
52917
- { offset: 0, color: `${C}33` },
52918
- { offset: 1, color: `${C}00` }
52915
+ { offset: 0, color: `${S}33` },
52916
+ { offset: 1, color: `${S}00` }
52919
52917
  ]
52920
52918
  ),
52921
- borderRadius: p
52919
+ borderRadius: v
52922
52920
  }
52923
- } : x - S;
52924
- }), _ = {
52921
+ } : b - _;
52922
+ }), m = {
52925
52923
  name: `${r.name} (target)`,
52926
52924
  type: "bar",
52927
- data: y,
52928
- stack: d,
52925
+ data: g,
52926
+ stack: h,
52929
52927
  // Hide from legend and tooltip
52930
52928
  legendHoverLink: !1,
52931
52929
  tooltip: {
@@ -52936,13 +52934,13 @@ function Mae(r, e, t, n, i, a, o, s, l, u, c) {
52936
52934
  ...t ? [0, 0, 0, 1] : [1, 0, 0, 0],
52937
52935
  [
52938
52936
  // offset 0 = far end from the solid bar → more opaque (darker)
52939
- { offset: 0, color: `${f}33` },
52937
+ { offset: 0, color: `${c}33` },
52940
52938
  // offset 1 = near the solid bar → transparent
52941
- { offset: 1, color: `${f}00` }
52939
+ { offset: 1, color: `${c}00` }
52942
52940
  ]
52943
52941
  ),
52944
52942
  // Only round the far end (away from the solid bar)
52945
- borderRadius: p
52943
+ borderRadius: v
52946
52944
  },
52947
52945
  label: {
52948
52946
  show: !1
@@ -52951,7 +52949,7 @@ function Mae(r, e, t, n, i, a, o, s, l, u, c) {
52951
52949
  disabled: !0
52952
52950
  }
52953
52951
  };
52954
- return [m, _];
52952
+ return [p, m];
52955
52953
  }
52956
52954
  function Eae(r) {
52957
52955
  return {
@@ -53017,7 +53015,6 @@ function Lae(r, {
53017
53015
  S,
53018
53016
  s,
53019
53017
  i,
53020
- U === t.length - 1,
53021
53018
  y.colors.foregroundSecondary,
53022
53019
  x,
53023
53020
  E,