teodor-new-chat-ui 3.0.76 → 3.0.77

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/index.esm.js CHANGED
@@ -8438,7 +8438,7 @@ const Nw = K.memo(function({
8438
8438
  message: t,
8439
8439
  messageIndex: n,
8440
8440
  isStreamingMessage: r = !1,
8441
- streamingDebounceMs: o = 500,
8441
+ streamingDebounceMs: o = 800,
8442
8442
  isEditing: s = !1,
8443
8443
  showActions: i = !0,
8444
8444
  showTimestamp: a = !0,
@@ -9070,7 +9070,7 @@ function Hw({
9070
9070
  var C;
9071
9071
  if (!m.current && v.current) {
9072
9072
  if (t) {
9073
- if (Date.now() - E.current < 100) return;
9073
+ if (Date.now() - E.current < 200) return;
9074
9074
  y.current && cancelAnimationFrame(y.current), y.current = requestAnimationFrame(() => {
9075
9075
  var j;
9076
9076
  (j = x.current) == null || j.scrollToIndex({
@@ -9082,7 +9082,7 @@ function Hw({
9082
9082
  } else
9083
9083
  (C = x.current) == null || C.scrollToIndex({
9084
9084
  index: Math.max(0, e.length - 1),
9085
- behavior: "auto",
9085
+ behavior: "smooth",
9086
9086
  align: "end"
9087
9087
  });
9088
9088
  return () => {
@@ -9127,17 +9127,23 @@ function Hw({
9127
9127
  x.current = C;
9128
9128
  },
9129
9129
  data: e,
9130
- followOutput: t ? !1 : "smooth",
9131
- overscan: { main: 300, reverse: 300 },
9132
- increaseViewportBy: { top: 600, bottom: 600 },
9133
- defaultItemHeight: 100,
9130
+ followOutput: !1,
9131
+ alignToBottom: !t,
9132
+ overscan: { main: 400, reverse: 400 },
9133
+ increaseViewportBy: { top: 800, bottom: 800 },
9134
+ defaultItemHeight: 150,
9135
+ fixedItemHeight: t ? 150 : void 0,
9134
9136
  startReached: () => {
9135
9137
  S && S();
9136
9138
  },
9137
9139
  atBottomStateChange: (C) => {
9138
9140
  v.current = C;
9139
9141
  },
9140
- style: { height: "100%", overscrollBehavior: "contain" },
9142
+ style: {
9143
+ height: "100%",
9144
+ overscrollBehavior: "contain",
9145
+ scrollBehavior: t ? "auto" : "smooth"
9146
+ },
9141
9147
  computeItemKey: (C, I) => I.id ?? `message-${C}`,
9142
9148
  components: {
9143
9149
  Scroller: K.forwardRef((C, I) => /* @__PURE__ */ l.jsx(
@@ -9147,8 +9153,9 @@ function Hw({
9147
9153
  ref: (N) => T(N, I),
9148
9154
  style: {
9149
9155
  overflowAnchor: "none",
9150
- willChange: t ? "scroll-position" : "transform",
9151
- contain: "layout style paint",
9156
+ willChange: t ? "contents" : "transform",
9157
+ contain: t ? "strict" : "layout style paint",
9158
+ contentVisibility: t ? "auto" : "visible",
9152
9159
  ...(C == null ? void 0 : C.style) ?? {}
9153
9160
  }
9154
9161
  }
@@ -9160,9 +9167,12 @@ function Hw({
9160
9167
  className: "mb-4 last:mb-0",
9161
9168
  style: {
9162
9169
  contentVisibility: "auto",
9163
- containIntrinsicSize: "auto 150px",
9170
+ containIntrinsicSize: t ? "1px 200px" : "auto 150px",
9171
+ contain: t ? "size layout style paint" : "layout style paint",
9164
9172
  transform: "translateZ(0)",
9165
- isolation: "isolate"
9173
+ isolation: "isolate",
9174
+ minHeight: t && n === I.id ? "200px" : void 0,
9175
+ maxHeight: t && n === I.id ? "none" : void 0
9166
9176
  },
9167
9177
  children: /* @__PURE__ */ l.jsx(
9168
9178
  Nw,
@@ -10579,11 +10589,11 @@ const Ky = (e) => {
10579
10589
  }), Qy = (e, t) => ({
10580
10590
  ...$y(e),
10581
10591
  options: [e, t]
10582
- }), eS = (e, t) => ({
10592
+ }), e0 = (e, t) => ({
10583
10593
  ...Ky(e),
10584
10594
  options: [e, t]
10585
10595
  });
10586
- var tS = "Arrow", Nd = f.forwardRef((e, t) => {
10596
+ var t0 = "Arrow", Nd = f.forwardRef((e, t) => {
10587
10597
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
10588
10598
  return /* @__PURE__ */ l.jsx(
10589
10599
  me.svg,
@@ -10598,8 +10608,8 @@ var tS = "Arrow", Nd = f.forwardRef((e, t) => {
10598
10608
  }
10599
10609
  );
10600
10610
  });
10601
- Nd.displayName = tS;
10602
- var nS = Nd;
10611
+ Nd.displayName = t0;
10612
+ var n0 = Nd;
10603
10613
  function jd(e) {
10604
10614
  const [t, n] = f.useState(void 0);
10605
10615
  return nt(() => {
@@ -10622,9 +10632,9 @@ function jd(e) {
10622
10632
  n(void 0);
10623
10633
  }, [e]), t;
10624
10634
  }
10625
- var ma = "Popper", [Ad, ar] = $t(ma), [rS, kd] = Ad(ma), Pd = (e) => {
10635
+ var ma = "Popper", [Ad, ar] = $t(ma), [r0, kd] = Ad(ma), Pd = (e) => {
10626
10636
  const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
10627
- return /* @__PURE__ */ l.jsx(rS, { scope: t, anchor: r, onAnchorChange: o, children: n });
10637
+ return /* @__PURE__ */ l.jsx(r0, { scope: t, anchor: r, onAnchorChange: o, children: n });
10628
10638
  };
10629
10639
  Pd.displayName = ma;
10630
10640
  var _d = "PopperAnchor", Od = f.forwardRef(
@@ -10637,7 +10647,7 @@ var _d = "PopperAnchor", Od = f.forwardRef(
10637
10647
  }
10638
10648
  );
10639
10649
  Od.displayName = _d;
10640
- var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10650
+ var ga = "PopperContent", [o0, s0] = Ad(ga), Md = f.forwardRef(
10641
10651
  (e, t) => {
10642
10652
  var Y, P, Z, ne, ae, se;
10643
10653
  const {
@@ -10657,7 +10667,7 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10657
10667
  ...x
10658
10668
  } = e, m = kd(ga, n), [v, w] = f.useState(null), y = Ce(t, (je) => w(je)), [E, S] = f.useState(null), T = jd(E), C = (T == null ? void 0 : T.width) ?? 0, I = (T == null ? void 0 : T.height) ?? 0, N = r + (s !== "center" ? "-" + s : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
10659
10669
  padding: j,
10660
- boundary: M.filter(aS),
10670
+ boundary: M.filter(a0),
10661
10671
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
10662
10672
  altBoundary: W
10663
10673
  }, { refs: A, floatingStyles: H, placement: L, isPositioned: q, middlewareData: O } = Gy({
@@ -10686,8 +10696,8 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10686
10696
  $.setProperty("--radix-popper-available-width", `${Oe}px`), $.setProperty("--radix-popper-available-height", `${ue}px`), $.setProperty("--radix-popper-anchor-width", `${Pe}px`), $.setProperty("--radix-popper-anchor-height", `${xe}px`);
10687
10697
  }
10688
10698
  }),
10689
- E && eS({ element: E, padding: a }),
10690
- lS({ arrowWidth: C, arrowHeight: I }),
10699
+ E && e0({ element: E, padding: a }),
10700
+ l0({ arrowWidth: C, arrowHeight: I }),
10691
10701
  p && Qy({ strategy: "referenceHidden", ...G })
10692
10702
  ]
10693
10703
  }), [_, z] = Fd(L), X = ot(g);
@@ -10722,7 +10732,7 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10722
10732
  },
10723
10733
  dir: e.dir,
10724
10734
  children: /* @__PURE__ */ l.jsx(
10725
- oS,
10735
+ o0,
10726
10736
  {
10727
10737
  scope: n,
10728
10738
  placedSide: _,
@@ -10752,13 +10762,13 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
10752
10762
  }
10753
10763
  );
10754
10764
  Md.displayName = ga;
10755
- var Dd = "PopperArrow", iS = {
10765
+ var Dd = "PopperArrow", i0 = {
10756
10766
  top: "bottom",
10757
10767
  right: "left",
10758
10768
  bottom: "top",
10759
10769
  left: "right"
10760
10770
  }, Ld = f.forwardRef(function(t, n) {
10761
- const { __scopePopper: r, ...o } = t, s = sS(Dd, r), i = iS[s.placedSide];
10771
+ const { __scopePopper: r, ...o } = t, s = s0(Dd, r), i = i0[s.placedSide];
10762
10772
  return (
10763
10773
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
10764
10774
  // doesn't report size as we'd expect on SVG elements.
@@ -10787,7 +10797,7 @@ var Dd = "PopperArrow", iS = {
10787
10797
  visibility: s.shouldHideArrow ? "hidden" : void 0
10788
10798
  },
10789
10799
  children: /* @__PURE__ */ l.jsx(
10790
- nS,
10800
+ n0,
10791
10801
  {
10792
10802
  ...o,
10793
10803
  ref: n,
@@ -10803,10 +10813,10 @@ var Dd = "PopperArrow", iS = {
10803
10813
  );
10804
10814
  });
10805
10815
  Ld.displayName = Dd;
10806
- function aS(e) {
10816
+ function a0(e) {
10807
10817
  return e !== null;
10808
10818
  }
10809
- var lS = (e) => ({
10819
+ var l0 = (e) => ({
10810
10820
  name: "transformOrigin",
10811
10821
  options: e,
10812
10822
  fn(t) {
@@ -10820,14 +10830,14 @@ function Fd(e) {
10820
10830
  const [t, n = "center"] = e.split("-");
10821
10831
  return [t, n];
10822
10832
  }
10823
- var xa = Pd, va = Od, ba = Md, wa = Ld, Ys = "rovingFocusGroup.onEntryFocus", cS = { bubbles: !1, cancelable: !0 }, $r = "RovingFocusGroup", [wi, Bd, uS] = la($r), [dS, Hd] = $t(
10833
+ var xa = Pd, va = Od, ba = Md, wa = Ld, Ys = "rovingFocusGroup.onEntryFocus", c0 = { bubbles: !1, cancelable: !0 }, $r = "RovingFocusGroup", [wi, Bd, u0] = la($r), [d0, Hd] = $t(
10824
10834
  $r,
10825
- [uS]
10826
- ), [fS, hS] = dS($r), $d = f.forwardRef(
10827
- (e, t) => /* @__PURE__ */ l.jsx(wi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(wi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(pS, { ...e, ref: t }) }) })
10835
+ [u0]
10836
+ ), [f0, h0] = d0($r), $d = f.forwardRef(
10837
+ (e, t) => /* @__PURE__ */ l.jsx(wi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(wi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(p0, { ...e, ref: t }) }) })
10828
10838
  );
10829
10839
  $d.displayName = $r;
10830
- var pS = f.forwardRef((e, t) => {
10840
+ var p0 = f.forwardRef((e, t) => {
10831
10841
  const {
10832
10842
  __scopeRovingFocusGroup: n,
10833
10843
  orientation: r,
@@ -10850,7 +10860,7 @@ var pS = f.forwardRef((e, t) => {
10850
10860
  if (I)
10851
10861
  return I.addEventListener(Ys, y), () => I.removeEventListener(Ys, y);
10852
10862
  }, [y]), /* @__PURE__ */ l.jsx(
10853
- fS,
10863
+ f0,
10854
10864
  {
10855
10865
  scope: n,
10856
10866
  orientation: r,
@@ -10884,7 +10894,7 @@ var pS = f.forwardRef((e, t) => {
10884
10894
  onFocus: Q(e.onFocus, (I) => {
10885
10895
  const N = !S.current;
10886
10896
  if (I.target === I.currentTarget && N && !v) {
10887
- const j = new CustomEvent(Ys, cS);
10897
+ const j = new CustomEvent(Ys, c0);
10888
10898
  if (I.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
10889
10899
  const M = E().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === x), H = [W, G, ...M].filter(
10890
10900
  Boolean
@@ -10908,7 +10918,7 @@ var pS = f.forwardRef((e, t) => {
10908
10918
  tabStopId: s,
10909
10919
  children: i,
10910
10920
  ...a
10911
- } = e, c = Dt(), u = s || c, d = hS(zd, n), h = d.currentTabStopId === u, p = Bd(n), { onFocusableItemAdd: b, onFocusableItemRemove: g, currentTabStopId: x } = d;
10921
+ } = e, c = Dt(), u = s || c, d = h0(zd, n), h = d.currentTabStopId === u, p = Bd(n), { onFocusableItemAdd: b, onFocusableItemRemove: g, currentTabStopId: x } = d;
10912
10922
  return f.useEffect(() => {
10913
10923
  if (r)
10914
10924
  return b(), () => g();
@@ -10936,7 +10946,7 @@ var pS = f.forwardRef((e, t) => {
10936
10946
  return;
10937
10947
  }
10938
10948
  if (m.target !== m.currentTarget) return;
10939
- const v = xS(m, d.orientation, d.dir);
10949
+ const v = x0(m, d.orientation, d.dir);
10940
10950
  if (v !== void 0) {
10941
10951
  if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
10942
10952
  m.preventDefault();
@@ -10945,7 +10955,7 @@ var pS = f.forwardRef((e, t) => {
10945
10955
  else if (v === "prev" || v === "next") {
10946
10956
  v === "prev" && y.reverse();
10947
10957
  const E = y.indexOf(m.currentTarget);
10948
- y = d.loop ? vS(y, E + 1) : y.slice(E + 1);
10958
+ y = d.loop ? v0(y, E + 1) : y.slice(E + 1);
10949
10959
  }
10950
10960
  setTimeout(() => Wd(y));
10951
10961
  }
@@ -10958,7 +10968,7 @@ var pS = f.forwardRef((e, t) => {
10958
10968
  }
10959
10969
  );
10960
10970
  Ud.displayName = zd;
10961
- var mS = {
10971
+ var m0 = {
10962
10972
  ArrowLeft: "prev",
10963
10973
  ArrowUp: "prev",
10964
10974
  ArrowRight: "next",
@@ -10968,33 +10978,33 @@ var mS = {
10968
10978
  PageDown: "last",
10969
10979
  End: "last"
10970
10980
  };
10971
- function gS(e, t) {
10981
+ function g0(e, t) {
10972
10982
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
10973
10983
  }
10974
- function xS(e, t, n) {
10975
- const r = gS(e.key, n);
10984
+ function x0(e, t, n) {
10985
+ const r = g0(e.key, n);
10976
10986
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
10977
- return mS[r];
10987
+ return m0[r];
10978
10988
  }
10979
10989
  function Wd(e, t = !1) {
10980
10990
  const n = document.activeElement;
10981
10991
  for (const r of e)
10982
10992
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
10983
10993
  }
10984
- function vS(e, t) {
10994
+ function v0(e, t) {
10985
10995
  return e.map((n, r) => e[(t + r) % e.length]);
10986
10996
  }
10987
- var bS = $d, wS = Ud, yi = ["Enter", " "], yS = ["ArrowDown", "PageUp", "Home"], Vd = ["ArrowUp", "PageDown", "End"], SS = [...yS, ...Vd], CS = {
10997
+ var b0 = $d, w0 = Ud, yi = ["Enter", " "], y0 = ["ArrowDown", "PageUp", "Home"], Vd = ["ArrowUp", "PageDown", "End"], S0 = [...y0, ...Vd], C0 = {
10988
10998
  ltr: [...yi, "ArrowRight"],
10989
10999
  rtl: [...yi, "ArrowLeft"]
10990
- }, TS = {
11000
+ }, T0 = {
10991
11001
  ltr: ["ArrowLeft"],
10992
11002
  rtl: ["ArrowRight"]
10993
- }, zr = "Menu", [Ir, RS, ES] = la(zr), [Pn, Gd] = $t(zr, [
10994
- ES,
11003
+ }, zr = "Menu", [Ir, R0, E0] = la(zr), [Pn, Gd] = $t(zr, [
11004
+ E0,
10995
11005
  ar,
10996
11006
  Hd
10997
- ]), us = ar(), Kd = Hd(), [IS, _n] = Pn(zr), [NS, Ur] = Pn(zr), Yd = (e) => {
11007
+ ]), us = ar(), Kd = Hd(), [I0, _n] = Pn(zr), [N0, Ur] = Pn(zr), Yd = (e) => {
10998
11008
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = us(t), [c, u] = f.useState(null), d = f.useRef(!1), h = ot(s), p = ss(o);
10999
11009
  return f.useEffect(() => {
11000
11010
  const b = () => {
@@ -11004,7 +11014,7 @@ var bS = $d, wS = Ud, yi = ["Enter", " "], yS = ["ArrowDown", "PageUp", "Home"],
11004
11014
  document.removeEventListener("keydown", b, { capture: !0 }), document.removeEventListener("pointerdown", g, { capture: !0 }), document.removeEventListener("pointermove", g, { capture: !0 });
11005
11015
  };
11006
11016
  }, []), /* @__PURE__ */ l.jsx(xa, { ...a, children: /* @__PURE__ */ l.jsx(
11007
- IS,
11017
+ I0,
11008
11018
  {
11009
11019
  scope: t,
11010
11020
  open: n,
@@ -11012,7 +11022,7 @@ var bS = $d, wS = Ud, yi = ["Enter", " "], yS = ["ArrowDown", "PageUp", "Home"],
11012
11022
  content: c,
11013
11023
  onContentChange: u,
11014
11024
  children: /* @__PURE__ */ l.jsx(
11015
- NS,
11025
+ N0,
11016
11026
  {
11017
11027
  scope: t,
11018
11028
  onClose: f.useCallback(() => h(!1), [h]),
@@ -11026,26 +11036,26 @@ var bS = $d, wS = Ud, yi = ["Enter", " "], yS = ["ArrowDown", "PageUp", "Home"],
11026
11036
  ) });
11027
11037
  };
11028
11038
  Yd.displayName = zr;
11029
- var jS = "MenuAnchor", ya = f.forwardRef(
11039
+ var j0 = "MenuAnchor", ya = f.forwardRef(
11030
11040
  (e, t) => {
11031
11041
  const { __scopeMenu: n, ...r } = e, o = us(n);
11032
11042
  return /* @__PURE__ */ l.jsx(va, { ...o, ...r, ref: t });
11033
11043
  }
11034
11044
  );
11035
- ya.displayName = jS;
11036
- var Sa = "MenuPortal", [AS, qd] = Pn(Sa, {
11045
+ ya.displayName = j0;
11046
+ var Sa = "MenuPortal", [A0, qd] = Pn(Sa, {
11037
11047
  forceMount: void 0
11038
11048
  }), Xd = (e) => {
11039
11049
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = _n(Sa, t);
11040
- return /* @__PURE__ */ l.jsx(AS, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: r }) }) });
11050
+ return /* @__PURE__ */ l.jsx(A0, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: r }) }) });
11041
11051
  };
11042
11052
  Xd.displayName = Sa;
11043
- var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11053
+ var It = "MenuContent", [k0, Ca] = Pn(It), Jd = f.forwardRef(
11044
11054
  (e, t) => {
11045
11055
  const n = qd(It, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(It, e.__scopeMenu), i = Ur(It, e.__scopeMenu);
11046
- return /* @__PURE__ */ l.jsx(Ir.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Ir.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(PS, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(_S, { ...o, ref: t }) }) }) });
11056
+ return /* @__PURE__ */ l.jsx(Ir.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Ir.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(P0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(_0, { ...o, ref: t }) }) }) });
11047
11057
  }
11048
- ), PS = f.forwardRef(
11058
+ ), P0 = f.forwardRef(
11049
11059
  (e, t) => {
11050
11060
  const n = _n(It, e.__scopeMenu), r = f.useRef(null), o = Ce(t, r);
11051
11061
  return f.useEffect(() => {
@@ -11068,7 +11078,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11068
11078
  }
11069
11079
  );
11070
11080
  }
11071
- ), _S = f.forwardRef((e, t) => {
11081
+ ), _0 = f.forwardRef((e, t) => {
11072
11082
  const n = _n(It, e.__scopeMenu);
11073
11083
  return /* @__PURE__ */ l.jsx(
11074
11084
  Ta,
@@ -11081,7 +11091,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11081
11091
  onDismiss: () => n.onOpenChange(!1)
11082
11092
  }
11083
11093
  );
11084
- }), OS = qn("MenuContent.ScrollLock"), Ta = f.forwardRef(
11094
+ }), O0 = qn("MenuContent.ScrollLock"), Ta = f.forwardRef(
11085
11095
  (e, t) => {
11086
11096
  const {
11087
11097
  __scopeMenu: n,
@@ -11098,9 +11108,9 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11098
11108
  onDismiss: b,
11099
11109
  disableOutsideScroll: g,
11100
11110
  ...x
11101
- } = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n), E = RS(n), [S, T] = f.useState(null), C = f.useRef(null), I = Ce(t, C, m.onContentChange), N = f.useRef(0), j = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), A = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: OS, allowPinchZoom: !0 } : void 0, q = (_) => {
11111
+ } = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n), E = R0(n), [S, T] = f.useState(null), C = f.useRef(null), I = Ce(t, C, m.onContentChange), N = f.useRef(0), j = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), A = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: O0, allowPinchZoom: !0 } : void 0, q = (_) => {
11102
11112
  var Y, P;
11103
- const z = j.current + _, X = E().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = X.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, ee = X.map((Z) => Z.textValue), he = GS(ee, z, F), be = (P = X.find((Z) => Z.textValue === he)) == null ? void 0 : P.ref.current;
11113
+ const z = j.current + _, X = E().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = X.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, ee = X.map((Z) => Z.textValue), he = G0(ee, z, F), be = (P = X.find((Z) => Z.textValue === he)) == null ? void 0 : P.ref.current;
11104
11114
  (function Z(ne) {
11105
11115
  j.current = ne, window.clearTimeout(N.current), ne !== "" && (N.current = window.setTimeout(() => Z(""), 1e3));
11106
11116
  })(z), be && setTimeout(() => be.focus());
@@ -11108,10 +11118,10 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11108
11118
  f.useEffect(() => () => window.clearTimeout(N.current), []), ra();
11109
11119
  const O = f.useCallback((_) => {
11110
11120
  var X, oe;
11111
- return G.current === ((X = W.current) == null ? void 0 : X.side) && YS(_, (oe = W.current) == null ? void 0 : oe.area);
11121
+ return G.current === ((X = W.current) == null ? void 0 : X.side) && Y0(_, (oe = W.current) == null ? void 0 : oe.area);
11112
11122
  }, []);
11113
11123
  return /* @__PURE__ */ l.jsx(
11114
- kS,
11124
+ k0,
11115
11125
  {
11116
11126
  scope: n,
11117
11127
  searchRef: j,
@@ -11159,7 +11169,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11159
11169
  onInteractOutside: p,
11160
11170
  onDismiss: b,
11161
11171
  children: /* @__PURE__ */ l.jsx(
11162
- bS,
11172
+ b0,
11163
11173
  {
11164
11174
  asChild: !0,
11165
11175
  ...y,
@@ -11188,10 +11198,10 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11188
11198
  const X = _.target.closest("[data-radix-menu-content]") === _.currentTarget, oe = _.ctrlKey || _.altKey || _.metaKey, F = _.key.length === 1;
11189
11199
  X && (_.key === "Tab" && _.preventDefault(), !oe && F && q(_.key));
11190
11200
  const ee = C.current;
11191
- if (_.target !== ee || !SS.includes(_.key)) return;
11201
+ if (_.target !== ee || !S0.includes(_.key)) return;
11192
11202
  _.preventDefault();
11193
11203
  const be = E().filter((Y) => !Y.disabled).map((Y) => Y.ref.current);
11194
- Vd.includes(_.key) && be.reverse(), WS(be);
11204
+ Vd.includes(_.key) && be.reverse(), W0(be);
11195
11205
  }),
11196
11206
  onBlur: Q(e.onBlur, (_) => {
11197
11207
  _.currentTarget.contains(_.target) || (window.clearTimeout(N.current), j.current = "");
@@ -11219,20 +11229,20 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
11219
11229
  }
11220
11230
  );
11221
11231
  Jd.displayName = It;
11222
- var MS = "MenuGroup", Ra = f.forwardRef(
11232
+ var M0 = "MenuGroup", Ra = f.forwardRef(
11223
11233
  (e, t) => {
11224
11234
  const { __scopeMenu: n, ...r } = e;
11225
11235
  return /* @__PURE__ */ l.jsx(me.div, { role: "group", ...r, ref: t });
11226
11236
  }
11227
11237
  );
11228
- Ra.displayName = MS;
11229
- var DS = "MenuLabel", Zd = f.forwardRef(
11238
+ Ra.displayName = M0;
11239
+ var D0 = "MenuLabel", Zd = f.forwardRef(
11230
11240
  (e, t) => {
11231
11241
  const { __scopeMenu: n, ...r } = e;
11232
11242
  return /* @__PURE__ */ l.jsx(me.div, { ...r, ref: t });
11233
11243
  }
11234
11244
  );
11235
- Zd.displayName = DS;
11245
+ Zd.displayName = D0;
11236
11246
  var _o = "MenuItem", dc = "menu.itemSelect", ds = f.forwardRef(
11237
11247
  (e, t) => {
11238
11248
  const { disabled: n = !1, onSelect: r, ...o } = e, s = f.useRef(null), i = Ur(_o, e.__scopeMenu), a = Ca(_o, e.__scopeMenu), c = Ce(t, s), u = f.useRef(!1), d = () => {
@@ -11278,7 +11288,7 @@ var Qd = f.forwardRef(
11278
11288
  scope: n,
11279
11289
  disabled: r,
11280
11290
  textValue: o ?? p,
11281
- children: /* @__PURE__ */ l.jsx(wS, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ l.jsx(
11291
+ children: /* @__PURE__ */ l.jsx(w0, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ l.jsx(
11282
11292
  me.div,
11283
11293
  {
11284
11294
  role: "menuitem",
@@ -11304,7 +11314,7 @@ var Qd = f.forwardRef(
11304
11314
  }
11305
11315
  );
11306
11316
  }
11307
- ), LS = "MenuCheckboxItem", ef = f.forwardRef(
11317
+ ), L0 = "MenuCheckboxItem", ef = f.forwardRef(
11308
11318
  (e, t) => {
11309
11319
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
11310
11320
  return /* @__PURE__ */ l.jsx(sf, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ l.jsx(
@@ -11324,21 +11334,21 @@ var Qd = f.forwardRef(
11324
11334
  ) });
11325
11335
  }
11326
11336
  );
11327
- ef.displayName = LS;
11328
- var tf = "MenuRadioGroup", [FS, BS] = Pn(
11337
+ ef.displayName = L0;
11338
+ var tf = "MenuRadioGroup", [F0, B0] = Pn(
11329
11339
  tf,
11330
11340
  { value: void 0, onValueChange: () => {
11331
11341
  } }
11332
11342
  ), nf = f.forwardRef(
11333
11343
  (e, t) => {
11334
11344
  const { value: n, onValueChange: r, ...o } = e, s = ot(r);
11335
- return /* @__PURE__ */ l.jsx(FS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(Ra, { ...o, ref: t }) });
11345
+ return /* @__PURE__ */ l.jsx(F0, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(Ra, { ...o, ref: t }) });
11336
11346
  }
11337
11347
  );
11338
11348
  nf.displayName = tf;
11339
11349
  var rf = "MenuRadioItem", of = f.forwardRef(
11340
11350
  (e, t) => {
11341
- const { value: n, ...r } = e, o = BS(rf, e.__scopeMenu), s = n === o.value;
11351
+ const { value: n, ...r } = e, o = B0(rf, e.__scopeMenu), s = n === o.value;
11342
11352
  return /* @__PURE__ */ l.jsx(sf, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ l.jsx(
11343
11353
  ds,
11344
11354
  {
@@ -11360,12 +11370,12 @@ var rf = "MenuRadioItem", of = f.forwardRef(
11360
11370
  }
11361
11371
  );
11362
11372
  of.displayName = rf;
11363
- var Ea = "MenuItemIndicator", [sf, HS] = Pn(
11373
+ var Ea = "MenuItemIndicator", [sf, H0] = Pn(
11364
11374
  Ea,
11365
11375
  { checked: !1 }
11366
11376
  ), af = f.forwardRef(
11367
11377
  (e, t) => {
11368
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = HS(Ea, n);
11378
+ const { __scopeMenu: n, forceMount: r, ...o } = e, s = H0(Ea, n);
11369
11379
  return /* @__PURE__ */ l.jsx(
11370
11380
  xt,
11371
11381
  {
@@ -11383,7 +11393,7 @@ var Ea = "MenuItemIndicator", [sf, HS] = Pn(
11383
11393
  }
11384
11394
  );
11385
11395
  af.displayName = Ea;
11386
- var $S = "MenuSeparator", lf = f.forwardRef(
11396
+ var $0 = "MenuSeparator", lf = f.forwardRef(
11387
11397
  (e, t) => {
11388
11398
  const { __scopeMenu: n, ...r } = e;
11389
11399
  return /* @__PURE__ */ l.jsx(
@@ -11397,15 +11407,15 @@ var $S = "MenuSeparator", lf = f.forwardRef(
11397
11407
  );
11398
11408
  }
11399
11409
  );
11400
- lf.displayName = $S;
11401
- var zS = "MenuArrow", cf = f.forwardRef(
11410
+ lf.displayName = $0;
11411
+ var z0 = "MenuArrow", cf = f.forwardRef(
11402
11412
  (e, t) => {
11403
11413
  const { __scopeMenu: n, ...r } = e, o = us(n);
11404
11414
  return /* @__PURE__ */ l.jsx(wa, { ...o, ...r, ref: t });
11405
11415
  }
11406
11416
  );
11407
- cf.displayName = zS;
11408
- var US = "MenuSub", [dR, uf] = Pn(US), hr = "MenuSubTrigger", df = f.forwardRef(
11417
+ cf.displayName = z0;
11418
+ var U0 = "MenuSub", [dR, uf] = Pn(U0), hr = "MenuSubTrigger", df = f.forwardRef(
11409
11419
  (e, t) => {
11410
11420
  const n = _n(hr, e.__scopeMenu), r = Ur(hr, e.__scopeMenu), o = uf(hr, e.__scopeMenu), s = Ca(hr, e.__scopeMenu), i = f.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, u = { __scopeMenu: e.__scopeMenu }, d = f.useCallback(() => {
11411
11421
  i.current && window.clearTimeout(i.current), i.current = null;
@@ -11469,7 +11479,7 @@ var US = "MenuSub", [dR, uf] = Pn(US), hr = "MenuSubTrigger", df = f.forwardRef(
11469
11479
  onKeyDown: Q(e.onKeyDown, (h) => {
11470
11480
  var b;
11471
11481
  const p = s.searchRef.current !== "";
11472
- e.disabled || p && h.key === " " || CS[r.dir].includes(h.key) && (n.onOpenChange(!0), (b = n.content) == null || b.focus(), h.preventDefault());
11482
+ e.disabled || p && h.key === " " || C0[r.dir].includes(h.key) && (n.onOpenChange(!0), (b = n.content) == null || b.focus(), h.preventDefault());
11473
11483
  })
11474
11484
  }
11475
11485
  ) });
@@ -11504,7 +11514,7 @@ var ff = "MenuSubContent", hf = f.forwardRef(
11504
11514
  }),
11505
11515
  onKeyDown: Q(e.onKeyDown, (d) => {
11506
11516
  var b;
11507
- const h = d.currentTarget.contains(d.target), p = TS[i.dir].includes(d.key);
11517
+ const h = d.currentTarget.contains(d.target), p = T0[i.dir].includes(d.key);
11508
11518
  h && p && (s.onOpenChange(!1), (b = a.trigger) == null || b.focus(), d.preventDefault());
11509
11519
  })
11510
11520
  }
@@ -11521,24 +11531,24 @@ function Oo(e) {
11521
11531
  function Ia(e) {
11522
11532
  return Oo(e) ? "indeterminate" : e ? "checked" : "unchecked";
11523
11533
  }
11524
- function WS(e) {
11534
+ function W0(e) {
11525
11535
  const t = document.activeElement;
11526
11536
  for (const n of e)
11527
11537
  if (n === t || (n.focus(), document.activeElement !== t)) return;
11528
11538
  }
11529
- function VS(e, t) {
11539
+ function V0(e, t) {
11530
11540
  return e.map((n, r) => e[(t + r) % e.length]);
11531
11541
  }
11532
- function GS(e, t, n) {
11542
+ function G0(e, t, n) {
11533
11543
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
11534
- let i = VS(e, Math.max(s, 0));
11544
+ let i = V0(e, Math.max(s, 0));
11535
11545
  o.length === 1 && (i = i.filter((u) => u !== n));
11536
11546
  const c = i.find(
11537
11547
  (u) => u.toLowerCase().startsWith(o.toLowerCase())
11538
11548
  );
11539
11549
  return c !== n ? c : void 0;
11540
11550
  }
11541
- function KS(e, t) {
11551
+ function K0(e, t) {
11542
11552
  const { x: n, y: r } = e;
11543
11553
  let o = !1;
11544
11554
  for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
@@ -11547,18 +11557,18 @@ function KS(e, t) {
11547
11557
  }
11548
11558
  return o;
11549
11559
  }
11550
- function YS(e, t) {
11560
+ function Y0(e, t) {
11551
11561
  if (!t) return !1;
11552
11562
  const n = { x: e.clientX, y: e.clientY };
11553
- return KS(n, t);
11563
+ return K0(n, t);
11554
11564
  }
11555
11565
  function Nr(e) {
11556
11566
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
11557
11567
  }
11558
- var qS = Yd, XS = ya, JS = Xd, ZS = Jd, QS = Ra, e0 = Zd, t0 = ds, n0 = ef, r0 = nf, o0 = of, s0 = af, i0 = lf, a0 = cf, l0 = df, c0 = hf, fs = "DropdownMenu", [u0, fR] = $t(
11568
+ var q0 = Yd, X0 = ya, J0 = Xd, Z0 = Jd, Q0 = Ra, eS = Zd, tS = ds, nS = ef, rS = nf, oS = of, sS = af, iS = lf, aS = cf, lS = df, cS = hf, fs = "DropdownMenu", [uS, fR] = $t(
11559
11569
  fs,
11560
11570
  [Gd]
11561
- ), ht = Gd(), [d0, mf] = u0(fs), gf = (e) => {
11571
+ ), ht = Gd(), [dS, mf] = uS(fs), gf = (e) => {
11562
11572
  const {
11563
11573
  __scopeDropdownMenu: t,
11564
11574
  children: n,
@@ -11574,7 +11584,7 @@ var qS = Yd, XS = ya, JS = Xd, ZS = Jd, QS = Ra, e0 = Zd, t0 = ds, n0 = ef, r0 =
11574
11584
  caller: fs
11575
11585
  });
11576
11586
  return /* @__PURE__ */ l.jsx(
11577
- d0,
11587
+ dS,
11578
11588
  {
11579
11589
  scope: t,
11580
11590
  triggerId: Dt(),
@@ -11584,7 +11594,7 @@ var qS = Yd, XS = ya, JS = Xd, ZS = Jd, QS = Ra, e0 = Zd, t0 = ds, n0 = ef, r0 =
11584
11594
  onOpenChange: h,
11585
11595
  onOpenToggle: f.useCallback(() => h((p) => !p), [h]),
11586
11596
  modal: a,
11587
- children: /* @__PURE__ */ l.jsx(qS, { ...c, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11597
+ children: /* @__PURE__ */ l.jsx(q0, { ...c, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11588
11598
  }
11589
11599
  );
11590
11600
  };
@@ -11592,7 +11602,7 @@ gf.displayName = fs;
11592
11602
  var xf = "DropdownMenuTrigger", vf = f.forwardRef(
11593
11603
  (e, t) => {
11594
11604
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = mf(xf, n), i = ht(n);
11595
- return /* @__PURE__ */ l.jsx(XS, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
11605
+ return /* @__PURE__ */ l.jsx(X0, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
11596
11606
  me.button,
11597
11607
  {
11598
11608
  type: "button",
@@ -11616,16 +11626,16 @@ var xf = "DropdownMenuTrigger", vf = f.forwardRef(
11616
11626
  }
11617
11627
  );
11618
11628
  vf.displayName = xf;
11619
- var f0 = "DropdownMenuPortal", bf = (e) => {
11629
+ var fS = "DropdownMenuPortal", bf = (e) => {
11620
11630
  const { __scopeDropdownMenu: t, ...n } = e, r = ht(t);
11621
- return /* @__PURE__ */ l.jsx(JS, { ...r, ...n });
11631
+ return /* @__PURE__ */ l.jsx(J0, { ...r, ...n });
11622
11632
  };
11623
- bf.displayName = f0;
11633
+ bf.displayName = fS;
11624
11634
  var wf = "DropdownMenuContent", yf = f.forwardRef(
11625
11635
  (e, t) => {
11626
11636
  const { __scopeDropdownMenu: n, ...r } = e, o = mf(wf, n), s = ht(n), i = f.useRef(!1);
11627
11637
  return /* @__PURE__ */ l.jsx(
11628
- ZS,
11638
+ Z0,
11629
11639
  {
11630
11640
  id: o.contentId,
11631
11641
  "aria-labelledby": o.triggerId,
@@ -11653,68 +11663,68 @@ var wf = "DropdownMenuContent", yf = f.forwardRef(
11653
11663
  }
11654
11664
  );
11655
11665
  yf.displayName = wf;
11656
- var h0 = "DropdownMenuGroup", p0 = f.forwardRef(
11666
+ var hS = "DropdownMenuGroup", pS = f.forwardRef(
11657
11667
  (e, t) => {
11658
11668
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11659
- return /* @__PURE__ */ l.jsx(QS, { ...o, ...r, ref: t });
11669
+ return /* @__PURE__ */ l.jsx(Q0, { ...o, ...r, ref: t });
11660
11670
  }
11661
11671
  );
11662
- p0.displayName = h0;
11663
- var m0 = "DropdownMenuLabel", Sf = f.forwardRef(
11672
+ pS.displayName = hS;
11673
+ var mS = "DropdownMenuLabel", Sf = f.forwardRef(
11664
11674
  (e, t) => {
11665
11675
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11666
- return /* @__PURE__ */ l.jsx(e0, { ...o, ...r, ref: t });
11676
+ return /* @__PURE__ */ l.jsx(eS, { ...o, ...r, ref: t });
11667
11677
  }
11668
11678
  );
11669
- Sf.displayName = m0;
11670
- var g0 = "DropdownMenuItem", Cf = f.forwardRef(
11679
+ Sf.displayName = mS;
11680
+ var gS = "DropdownMenuItem", Cf = f.forwardRef(
11671
11681
  (e, t) => {
11672
11682
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11673
- return /* @__PURE__ */ l.jsx(t0, { ...o, ...r, ref: t });
11683
+ return /* @__PURE__ */ l.jsx(tS, { ...o, ...r, ref: t });
11674
11684
  }
11675
11685
  );
11676
- Cf.displayName = g0;
11677
- var x0 = "DropdownMenuCheckboxItem", Tf = f.forwardRef((e, t) => {
11686
+ Cf.displayName = gS;
11687
+ var xS = "DropdownMenuCheckboxItem", Tf = f.forwardRef((e, t) => {
11678
11688
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11679
- return /* @__PURE__ */ l.jsx(n0, { ...o, ...r, ref: t });
11689
+ return /* @__PURE__ */ l.jsx(nS, { ...o, ...r, ref: t });
11680
11690
  });
11681
- Tf.displayName = x0;
11682
- var v0 = "DropdownMenuRadioGroup", b0 = f.forwardRef((e, t) => {
11691
+ Tf.displayName = xS;
11692
+ var vS = "DropdownMenuRadioGroup", bS = f.forwardRef((e, t) => {
11683
11693
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11684
- return /* @__PURE__ */ l.jsx(r0, { ...o, ...r, ref: t });
11694
+ return /* @__PURE__ */ l.jsx(rS, { ...o, ...r, ref: t });
11685
11695
  });
11686
- b0.displayName = v0;
11687
- var w0 = "DropdownMenuRadioItem", Rf = f.forwardRef((e, t) => {
11696
+ bS.displayName = vS;
11697
+ var wS = "DropdownMenuRadioItem", Rf = f.forwardRef((e, t) => {
11688
11698
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11689
- return /* @__PURE__ */ l.jsx(o0, { ...o, ...r, ref: t });
11699
+ return /* @__PURE__ */ l.jsx(oS, { ...o, ...r, ref: t });
11690
11700
  });
11691
- Rf.displayName = w0;
11692
- var y0 = "DropdownMenuItemIndicator", Ef = f.forwardRef((e, t) => {
11701
+ Rf.displayName = wS;
11702
+ var yS = "DropdownMenuItemIndicator", Ef = f.forwardRef((e, t) => {
11693
11703
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11694
- return /* @__PURE__ */ l.jsx(s0, { ...o, ...r, ref: t });
11704
+ return /* @__PURE__ */ l.jsx(sS, { ...o, ...r, ref: t });
11695
11705
  });
11696
- Ef.displayName = y0;
11697
- var S0 = "DropdownMenuSeparator", If = f.forwardRef((e, t) => {
11706
+ Ef.displayName = yS;
11707
+ var SS = "DropdownMenuSeparator", If = f.forwardRef((e, t) => {
11698
11708
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11699
- return /* @__PURE__ */ l.jsx(i0, { ...o, ...r, ref: t });
11709
+ return /* @__PURE__ */ l.jsx(iS, { ...o, ...r, ref: t });
11700
11710
  });
11701
- If.displayName = S0;
11702
- var C0 = "DropdownMenuArrow", T0 = f.forwardRef(
11711
+ If.displayName = SS;
11712
+ var CS = "DropdownMenuArrow", TS = f.forwardRef(
11703
11713
  (e, t) => {
11704
11714
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11705
- return /* @__PURE__ */ l.jsx(a0, { ...o, ...r, ref: t });
11715
+ return /* @__PURE__ */ l.jsx(aS, { ...o, ...r, ref: t });
11706
11716
  }
11707
11717
  );
11708
- T0.displayName = C0;
11709
- var R0 = "DropdownMenuSubTrigger", Nf = f.forwardRef((e, t) => {
11718
+ TS.displayName = CS;
11719
+ var RS = "DropdownMenuSubTrigger", Nf = f.forwardRef((e, t) => {
11710
11720
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11711
- return /* @__PURE__ */ l.jsx(l0, { ...o, ...r, ref: t });
11721
+ return /* @__PURE__ */ l.jsx(lS, { ...o, ...r, ref: t });
11712
11722
  });
11713
- Nf.displayName = R0;
11714
- var E0 = "DropdownMenuSubContent", jf = f.forwardRef((e, t) => {
11723
+ Nf.displayName = RS;
11724
+ var ES = "DropdownMenuSubContent", jf = f.forwardRef((e, t) => {
11715
11725
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11716
11726
  return /* @__PURE__ */ l.jsx(
11717
- c0,
11727
+ cS,
11718
11728
  {
11719
11729
  ...o,
11720
11730
  ...r,
@@ -11730,9 +11740,9 @@ var E0 = "DropdownMenuSubContent", jf = f.forwardRef((e, t) => {
11730
11740
  }
11731
11741
  );
11732
11742
  });
11733
- jf.displayName = E0;
11734
- var I0 = gf, N0 = vf, j0 = bf, Af = yf, kf = Sf, Pf = Cf, _f = Tf, Of = Rf, Mf = Ef, Df = If, Lf = Nf, Ff = jf;
11735
- const A0 = I0, k0 = N0, P0 = f.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
11743
+ jf.displayName = ES;
11744
+ var IS = gf, NS = vf, jS = bf, Af = yf, kf = Sf, Pf = Cf, _f = Tf, Of = Rf, Mf = Ef, Df = If, Lf = Nf, Ff = jf;
11745
+ const AS = IS, kS = NS, PS = f.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
11736
11746
  Lf,
11737
11747
  {
11738
11748
  ref: o,
@@ -11748,8 +11758,8 @@ const A0 = I0, k0 = N0, P0 = f.forwardRef(({ className: e, inset: t, children: n
11748
11758
  ]
11749
11759
  }
11750
11760
  ));
11751
- P0.displayName = Lf.displayName;
11752
- const _0 = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
11761
+ PS.displayName = Lf.displayName;
11762
+ const _S = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
11753
11763
  Ff,
11754
11764
  {
11755
11765
  ref: n,
@@ -11760,8 +11770,8 @@ const _0 = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
11760
11770
  ...t
11761
11771
  }
11762
11772
  ));
11763
- _0.displayName = Ff.displayName;
11764
- const Bf = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ l.jsx(j0, { children: /* @__PURE__ */ l.jsx(
11773
+ _S.displayName = Ff.displayName;
11774
+ const Bf = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ l.jsx(jS, { children: /* @__PURE__ */ l.jsx(
11765
11775
  Af,
11766
11776
  {
11767
11777
  ref: r,
@@ -11787,7 +11797,7 @@ const Si = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11787
11797
  }
11788
11798
  ));
11789
11799
  Si.displayName = Pf.displayName;
11790
- const O0 = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
11800
+ const OS = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
11791
11801
  _f,
11792
11802
  {
11793
11803
  ref: o,
@@ -11803,8 +11813,8 @@ const O0 = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
11803
11813
  ]
11804
11814
  }
11805
11815
  ));
11806
- O0.displayName = _f.displayName;
11807
- const M0 = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
11816
+ OS.displayName = _f.displayName;
11817
+ const MS = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
11808
11818
  Of,
11809
11819
  {
11810
11820
  ref: r,
@@ -11819,8 +11829,8 @@ const M0 = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
11819
11829
  ]
11820
11830
  }
11821
11831
  ));
11822
- M0.displayName = Of.displayName;
11823
- const D0 = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ l.jsx(
11832
+ MS.displayName = Of.displayName;
11833
+ const DS = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ l.jsx(
11824
11834
  kf,
11825
11835
  {
11826
11836
  ref: r,
@@ -11832,8 +11842,8 @@ const D0 = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11832
11842
  ...n
11833
11843
  }
11834
11844
  ));
11835
- D0.displayName = kf.displayName;
11836
- const L0 = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
11845
+ DS.displayName = kf.displayName;
11846
+ const LS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
11837
11847
  Df,
11838
11848
  {
11839
11849
  ref: n,
@@ -11841,13 +11851,13 @@ const L0 = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
11841
11851
  ...t
11842
11852
  }
11843
11853
  ));
11844
- L0.displayName = Df.displayName;
11854
+ LS.displayName = Df.displayName;
11845
11855
  function go({
11846
11856
  className: e = "",
11847
11857
  placeholder: t = "Type your message...",
11848
11858
  autoFocus: n = !0,
11849
11859
  maxHeight: r = void 0,
11850
- streamingDebounceMs: o = 500,
11860
+ streamingDebounceMs: o = 800,
11851
11861
  enableFileUpload: s = !0,
11852
11862
  enableExcelUpload: i = !1,
11853
11863
  enableMessageEditing: a = !0,
@@ -12128,8 +12138,8 @@ function go({
12128
12138
  ] }),
12129
12139
  H && /* @__PURE__ */ l.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: H }),
12130
12140
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
12131
- (s || i) && /* @__PURE__ */ l.jsxs(A0, { children: [
12132
- /* @__PURE__ */ l.jsx(k0, { asChild: !0, children: /* @__PURE__ */ l.jsx(
12141
+ (s || i) && /* @__PURE__ */ l.jsxs(AS, { children: [
12142
+ /* @__PURE__ */ l.jsx(kS, { asChild: !0, children: /* @__PURE__ */ l.jsx(
12133
12143
  Ne,
12134
12144
  {
12135
12145
  type: "button",
@@ -12203,10 +12213,10 @@ jr.displayName = "Input";
12203
12213
  function Ci(e, [t, n]) {
12204
12214
  return Math.min(n, Math.max(t, e));
12205
12215
  }
12206
- function F0(e, t) {
12216
+ function FS(e, t) {
12207
12217
  return f.useReducer((n, r) => t[n][r] ?? n, e);
12208
12218
  }
12209
- var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
12219
+ var Na = "ScrollArea", [Hf, hR] = $t(Na), [BS, jt] = Hf(Na), $f = f.forwardRef(
12210
12220
  (e, t) => {
12211
12221
  const {
12212
12222
  __scopeScrollArea: n,
@@ -12216,7 +12226,7 @@ var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
12216
12226
  ...i
12217
12227
  } = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, p] = f.useState(null), [b, g] = f.useState(null), [x, m] = f.useState(null), [v, w] = f.useState(0), [y, E] = f.useState(0), [S, T] = f.useState(!1), [C, I] = f.useState(!1), N = Ce(t, (M) => c(M)), j = ss(o);
12218
12228
  return /* @__PURE__ */ l.jsx(
12219
- B0,
12229
+ BS,
12220
12230
  {
12221
12231
  scope: n,
12222
12232
  type: r,
@@ -12304,11 +12314,11 @@ var Zt = "ScrollAreaScrollbar", ja = f.forwardRef(
12304
12314
  const { forceMount: n, ...r } = e, o = jt(Zt, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
12305
12315
  return f.useEffect(() => (a ? s(!0) : i(!0), () => {
12306
12316
  a ? s(!1) : i(!1);
12307
- }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(H0, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx($0, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(Wf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx(Aa, { ...r, ref: t }) : null;
12317
+ }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(HS, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx($S, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(Wf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx(Aa, { ...r, ref: t }) : null;
12308
12318
  }
12309
12319
  );
12310
12320
  ja.displayName = Zt;
12311
- var H0 = f.forwardRef((e, t) => {
12321
+ var HS = f.forwardRef((e, t) => {
12312
12322
  const { forceMount: n, ...r } = e, o = jt(Zt, e.__scopeScrollArea), [s, i] = f.useState(!1);
12313
12323
  return f.useEffect(() => {
12314
12324
  const a = o.scrollArea;
@@ -12331,8 +12341,8 @@ var H0 = f.forwardRef((e, t) => {
12331
12341
  ref: t
12332
12342
  }
12333
12343
  ) });
12334
- }), $0 = f.forwardRef((e, t) => {
12335
- const { forceMount: n, ...r } = e, o = jt(Zt, e.__scopeScrollArea), s = e.orientation === "horizontal", i = ps(() => c("SCROLL_END"), 100), [a, c] = F0("hidden", {
12344
+ }), $S = f.forwardRef((e, t) => {
12345
+ const { forceMount: n, ...r } = e, o = jt(Zt, e.__scopeScrollArea), s = e.orientation === "horizontal", i = ps(() => c("SCROLL_END"), 100), [a, c] = FS("hidden", {
12336
12346
  hidden: {
12337
12347
  SCROLL: "scrolling"
12338
12348
  },
@@ -12405,10 +12415,10 @@ var H0 = f.forwardRef((e, t) => {
12405
12415
  onThumbPointerDown: (p) => i.current = p
12406
12416
  };
12407
12417
  function h(p, b) {
12408
- return K0(p, i.current, a, b);
12418
+ return KS(p, i.current, a, b);
12409
12419
  }
12410
12420
  return n === "horizontal" ? /* @__PURE__ */ l.jsx(
12411
- z0,
12421
+ zS,
12412
12422
  {
12413
12423
  ...d,
12414
12424
  ref: t,
@@ -12426,7 +12436,7 @@ var H0 = f.forwardRef((e, t) => {
12426
12436
  }
12427
12437
  }
12428
12438
  ) : n === "vertical" ? /* @__PURE__ */ l.jsx(
12429
- U0,
12439
+ US,
12430
12440
  {
12431
12441
  ...d,
12432
12442
  ref: t,
@@ -12444,7 +12454,7 @@ var H0 = f.forwardRef((e, t) => {
12444
12454
  }
12445
12455
  }
12446
12456
  ) : null;
12447
- }), z0 = f.forwardRef((e, t) => {
12457
+ }), zS = f.forwardRef((e, t) => {
12448
12458
  const { sizes: n, onSizesChange: r, ...o } = e, s = jt(Zt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Ce(t, c, s.onScrollbarXChange);
12449
12459
  return f.useEffect(() => {
12450
12460
  c.current && a(getComputedStyle(c.current));
@@ -12483,7 +12493,7 @@ var H0 = f.forwardRef((e, t) => {
12483
12493
  }
12484
12494
  }
12485
12495
  );
12486
- }), U0 = f.forwardRef((e, t) => {
12496
+ }), US = f.forwardRef((e, t) => {
12487
12497
  const { sizes: n, onSizesChange: r, ...o } = e, s = jt(Zt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Ce(t, c, s.onScrollbarYChange);
12488
12498
  return f.useEffect(() => {
12489
12499
  c.current && a(getComputedStyle(c.current));
@@ -12523,7 +12533,7 @@ var H0 = f.forwardRef((e, t) => {
12523
12533
  }
12524
12534
  }
12525
12535
  );
12526
- }), [W0, Vf] = Hf(Zt), Gf = f.forwardRef((e, t) => {
12536
+ }), [WS, Vf] = Hf(Zt), Gf = f.forwardRef((e, t) => {
12527
12537
  const {
12528
12538
  __scopeScrollArea: n,
12529
12539
  sizes: r,
@@ -12550,7 +12560,7 @@ var H0 = f.forwardRef((e, t) => {
12550
12560
  };
12551
12561
  return document.addEventListener("wheel", N, { passive: !1 }), () => document.removeEventListener("wheel", N, { passive: !1 });
12552
12562
  }, [y, g, E, S]), f.useEffect(T, [r, T]), Zn(g, C), Zn(b.content, C), /* @__PURE__ */ l.jsx(
12553
- W0,
12563
+ WS,
12554
12564
  {
12555
12565
  scope: n,
12556
12566
  scrollbar: g,
@@ -12580,9 +12590,9 @@ var H0 = f.forwardRef((e, t) => {
12580
12590
  }), Mo = "ScrollAreaThumb", Kf = f.forwardRef(
12581
12591
  (e, t) => {
12582
12592
  const { forceMount: n, ...r } = e, o = Vf(Mo, e.__scopeScrollArea);
12583
- return /* @__PURE__ */ l.jsx(xt, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(V0, { ref: t, ...r }) });
12593
+ return /* @__PURE__ */ l.jsx(xt, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(VS, { ref: t, ...r }) });
12584
12594
  }
12585
- ), V0 = f.forwardRef(
12595
+ ), VS = f.forwardRef(
12586
12596
  (e, t) => {
12587
12597
  const { __scopeScrollArea: n, style: r, ...o } = e, s = jt(Mo, n), i = Vf(Mo, n), { onThumbPositionChange: a } = i, c = Ce(
12588
12598
  t,
@@ -12595,7 +12605,7 @@ var H0 = f.forwardRef((e, t) => {
12595
12605
  if (h) {
12596
12606
  const p = () => {
12597
12607
  if (d(), !u.current) {
12598
- const b = Y0(h, a);
12608
+ const b = YS(h, a);
12599
12609
  u.current = b, a();
12600
12610
  }
12601
12611
  };
@@ -12625,11 +12635,11 @@ Kf.displayName = Mo;
12625
12635
  var ka = "ScrollAreaCorner", Yf = f.forwardRef(
12626
12636
  (e, t) => {
12627
12637
  const n = jt(ka, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
12628
- return n.type !== "scroll" && r ? /* @__PURE__ */ l.jsx(G0, { ...e, ref: t }) : null;
12638
+ return n.type !== "scroll" && r ? /* @__PURE__ */ l.jsx(GS, { ...e, ref: t }) : null;
12629
12639
  }
12630
12640
  );
12631
12641
  Yf.displayName = ka;
12632
- var G0 = f.forwardRef((e, t) => {
12642
+ var GS = f.forwardRef((e, t) => {
12633
12643
  const { __scopeScrollArea: n, ...r } = e, o = jt(ka, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
12634
12644
  return Zn(o.scrollbarX, () => {
12635
12645
  var h;
@@ -12667,7 +12677,7 @@ function hs(e) {
12667
12677
  const t = qf(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
12668
12678
  return Math.max(r, 18);
12669
12679
  }
12670
- function K0(e, t, n, r = "ltr") {
12680
+ function KS(e, t, n, r = "ltr") {
12671
12681
  const o = hs(n), s = o / 2, i = t || s, a = o - i, c = n.scrollbar.paddingStart + i, u = n.scrollbar.size - n.scrollbar.paddingEnd - a, d = n.content - n.viewport, h = r === "ltr" ? [0, d] : [d * -1, 0];
12672
12682
  return Xf([c, u], h)(e);
12673
12683
  }
@@ -12685,7 +12695,7 @@ function Xf(e, t) {
12685
12695
  function Jf(e, t) {
12686
12696
  return e > 0 && e < t;
12687
12697
  }
12688
- var Y0 = (e, t = () => {
12698
+ var YS = (e, t = () => {
12689
12699
  }) => {
12690
12700
  let n = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
12691
12701
  return function o() {
@@ -12713,7 +12723,7 @@ function Zn(e, t) {
12713
12723
  }
12714
12724
  }, [e, n]);
12715
12725
  }
12716
- var Zf = $f, q0 = Uf, X0 = Yf;
12726
+ var Zf = $f, qS = Uf, XS = Yf;
12717
12727
  const Qf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
12718
12728
  Zf,
12719
12729
  {
@@ -12721,9 +12731,9 @@ const Qf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
12721
12731
  className: D("relative overflow-hidden", e),
12722
12732
  ...n,
12723
12733
  children: [
12724
- /* @__PURE__ */ l.jsx(q0, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12734
+ /* @__PURE__ */ l.jsx(qS, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12725
12735
  /* @__PURE__ */ l.jsx(eh, {}),
12726
- /* @__PURE__ */ l.jsx(X0, {})
12736
+ /* @__PURE__ */ l.jsx(XS, {})
12727
12737
  ]
12728
12738
  }
12729
12739
  ));
@@ -12898,7 +12908,7 @@ function Yn(e) {
12898
12908
  if (!(typeof globalThis > "u"))
12899
12909
  return globalThis[e];
12900
12910
  }
12901
- function J0(e) {
12911
+ function JS(e) {
12902
12912
  if (typeof e != "string") return;
12903
12913
  const t = e.trim();
12904
12914
  if (t)
@@ -12911,7 +12921,7 @@ function nh() {
12911
12921
  Yn("__CHAT_API_URL__")
12912
12922
  ];
12913
12923
  for (const t of e) {
12914
- const n = J0(t);
12924
+ const n = JS(t);
12915
12925
  if (n) return n;
12916
12926
  }
12917
12927
  }
@@ -12925,12 +12935,12 @@ function rh() {
12925
12935
  if (typeof t == "string" && t.trim())
12926
12936
  return t.trim();
12927
12937
  }
12928
- function Z0() {
12938
+ function ZS() {
12929
12939
  const e = {}, t = nh(), n = rh();
12930
12940
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
12931
12941
  }
12932
- function Q0() {
12933
- const e = Z0(), t = Tn.getAuthToken(), n = nh();
12942
+ function QS() {
12943
+ const e = ZS(), t = Tn.getAuthToken(), n = nh();
12934
12944
  return {
12935
12945
  apiBaseUrl: e.baseUrl || Tn.baseUrl || n || "http://localhost:8000",
12936
12946
  apiKey: t || e.apiKey || rh() || "",
@@ -12964,7 +12974,7 @@ function tC(e) {
12964
12974
  }
12965
12975
  }
12966
12976
  function gR() {
12967
- const e = Q0(), t = eC(), n = Tn.getAuthToken();
12977
+ const e = QS(), t = eC(), n = Tn.getAuthToken();
12968
12978
  return {
12969
12979
  ...e,
12970
12980
  ...t,
@@ -15517,8 +15527,8 @@ export {
15517
15527
  _t as get,
15518
15528
  $g as getChatToken,
15519
15529
  gR as getCurrentSettings,
15520
- Z0 as getDefaultApiConfig,
15521
- Q0 as getDefaultChatSettings,
15530
+ ZS as getDefaultApiConfig,
15531
+ QS as getDefaultChatSettings,
15522
15532
  zg as onChatTokenChanged,
15523
15533
  Ug as post,
15524
15534
  Wg as put,