@flamingo-stack/openframe-frontend-core 0.0.460-snapshot.20260721124036 → 0.0.460

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{chunk-2T5MXXTK.cjs → chunk-2KRAHL2J.cjs} +31 -31
  2. package/dist/{chunk-2T5MXXTK.cjs.map → chunk-2KRAHL2J.cjs.map} +1 -1
  3. package/dist/{chunk-BFEMQ2XC.cjs → chunk-32N6U2Z2.cjs} +26 -26
  4. package/dist/{chunk-BFEMQ2XC.cjs.map → chunk-32N6U2Z2.cjs.map} +1 -1
  5. package/dist/{chunk-IQU6ZIZR.js → chunk-3SFYW3J7.js} +2 -2
  6. package/dist/{chunk-EXSLPPEY.js → chunk-5AUOHZWP.js} +4 -4
  7. package/dist/{chunk-ZYHO7WAW.js → chunk-5IX4BNIY.js} +2 -2
  8. package/dist/{chunk-WHXYDEAM.cjs → chunk-6NACOLUM.cjs} +37 -37
  9. package/dist/{chunk-WHXYDEAM.cjs.map → chunk-6NACOLUM.cjs.map} +1 -1
  10. package/dist/{chunk-HHKLSJ5Y.js → chunk-6R3NA5WS.js} +2 -2
  11. package/dist/{chunk-PLJSN3SR.js → chunk-722A62GL.js} +4 -4
  12. package/dist/{chunk-3H5XD5UD.cjs → chunk-7VNAK2TM.cjs} +7 -7
  13. package/dist/{chunk-3H5XD5UD.cjs.map → chunk-7VNAK2TM.cjs.map} +1 -1
  14. package/dist/{chunk-RTLYVFFQ.js → chunk-AQNZOW6H.js} +2 -2
  15. package/dist/{chunk-7NUTHK3A.js → chunk-BOPT23N4.js} +4 -4
  16. package/dist/{chunk-6IA5TD7O.cjs → chunk-GTJJ4Y7Z.cjs} +15 -15
  17. package/dist/{chunk-6IA5TD7O.cjs.map → chunk-GTJJ4Y7Z.cjs.map} +1 -1
  18. package/dist/{chunk-TFVBIOSB.cjs → chunk-HFTBMWAO.cjs} +728 -747
  19. package/dist/chunk-HFTBMWAO.cjs.map +1 -0
  20. package/dist/{chunk-5D3UPZIM.cjs → chunk-IMG46R5G.cjs} +59 -59
  21. package/dist/{chunk-5D3UPZIM.cjs.map → chunk-IMG46R5G.cjs.map} +1 -1
  22. package/dist/{chunk-CDARBFPL.js → chunk-ITCV37Q2.js} +2 -2
  23. package/dist/{chunk-NFILBHXY.cjs → chunk-KG6VKWRF.cjs} +9 -9
  24. package/dist/{chunk-NFILBHXY.cjs.map → chunk-KG6VKWRF.cjs.map} +1 -1
  25. package/dist/{chunk-FQKLIGV3.cjs → chunk-KJOM3JWD.cjs} +62 -62
  26. package/dist/{chunk-FQKLIGV3.cjs.map → chunk-KJOM3JWD.cjs.map} +1 -1
  27. package/dist/{chunk-QLLXI554.cjs → chunk-MK5PLTDE.cjs} +26 -26
  28. package/dist/{chunk-QLLXI554.cjs.map → chunk-MK5PLTDE.cjs.map} +1 -1
  29. package/dist/{chunk-S2KZZVJF.js → chunk-NWHCBXRQ.js} +2 -2
  30. package/dist/{chunk-HWJWRQGV.cjs → chunk-NZNF7RCQ.cjs} +5 -5
  31. package/dist/{chunk-HWJWRQGV.cjs.map → chunk-NZNF7RCQ.cjs.map} +1 -1
  32. package/dist/{chunk-4TKGFC7I.js → chunk-OMY4PRE3.js} +2 -2
  33. package/dist/{chunk-KUVFE5WC.js → chunk-XFH7PMGS.js} +622 -641
  34. package/dist/chunk-XFH7PMGS.js.map +1 -0
  35. package/dist/{chunk-FYIX7RTZ.js → chunk-YWMHHI3V.js} +4 -4
  36. package/dist/{chunk-UNGRKZ65.cjs → chunk-ZODNSYZC.cjs} +11 -11
  37. package/dist/{chunk-UNGRKZ65.cjs.map → chunk-ZODNSYZC.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/index.cjs +2 -2
  41. package/dist/components/chat/index.js +1 -1
  42. package/dist/components/chat/quick-action-wall.d.ts.map +1 -1
  43. package/dist/components/contact/index.cjs +3 -3
  44. package/dist/components/contact/index.js +2 -2
  45. package/dist/components/docs/index.cjs +5 -5
  46. package/dist/components/docs/index.js +4 -4
  47. package/dist/components/embeds/index.cjs +3 -3
  48. package/dist/components/embeds/index.js +2 -2
  49. package/dist/components/faq/index.cjs +3 -3
  50. package/dist/components/faq/index.js +2 -2
  51. package/dist/components/features/index.cjs +2 -2
  52. package/dist/components/features/index.js +1 -1
  53. package/dist/components/help-center-pages/index.cjs +20 -20
  54. package/dist/components/help-center-pages/index.js +11 -11
  55. package/dist/components/index.cjs +129 -129
  56. package/dist/components/index.js +9 -9
  57. package/dist/components/navigation/index.cjs +2 -2
  58. package/dist/components/navigation/index.js +1 -1
  59. package/dist/components/onboarding-guides/index.cjs +5 -5
  60. package/dist/components/onboarding-guides/index.js +4 -4
  61. package/dist/components/related-content/index.cjs +3 -3
  62. package/dist/components/related-content/index.js +2 -2
  63. package/dist/components/tickets/index.cjs +5 -5
  64. package/dist/components/tickets/index.js +4 -4
  65. package/dist/components/ui/index.cjs +2 -2
  66. package/dist/components/ui/index.js +1 -1
  67. package/dist/index.cjs +2 -2
  68. package/dist/index.js +1 -1
  69. package/package.json +1 -1
  70. package/src/components/chat/quick-action-wall.tsx +6 -49
  71. package/src/stories/QuickActionWall.stories.tsx +0 -24
  72. package/dist/chunk-KUVFE5WC.js.map +0 -1
  73. package/dist/chunk-TFVBIOSB.cjs.map +0 -1
  74. /package/dist/{chunk-IQU6ZIZR.js.map → chunk-3SFYW3J7.js.map} +0 -0
  75. /package/dist/{chunk-EXSLPPEY.js.map → chunk-5AUOHZWP.js.map} +0 -0
  76. /package/dist/{chunk-ZYHO7WAW.js.map → chunk-5IX4BNIY.js.map} +0 -0
  77. /package/dist/{chunk-HHKLSJ5Y.js.map → chunk-6R3NA5WS.js.map} +0 -0
  78. /package/dist/{chunk-PLJSN3SR.js.map → chunk-722A62GL.js.map} +0 -0
  79. /package/dist/{chunk-RTLYVFFQ.js.map → chunk-AQNZOW6H.js.map} +0 -0
  80. /package/dist/{chunk-7NUTHK3A.js.map → chunk-BOPT23N4.js.map} +0 -0
  81. /package/dist/{chunk-CDARBFPL.js.map → chunk-ITCV37Q2.js.map} +0 -0
  82. /package/dist/{chunk-S2KZZVJF.js.map → chunk-NWHCBXRQ.js.map} +0 -0
  83. /package/dist/{chunk-4TKGFC7I.js.map → chunk-OMY4PRE3.js.map} +0 -0
  84. /package/dist/{chunk-FYIX7RTZ.js.map → chunk-YWMHHI3V.js.map} +0 -0
@@ -7056,9 +7056,6 @@ function interleave(a, b) {
7056
7056
  return out;
7057
7057
  }
7058
7058
  var DEFAULT_MIN_CHIPS_PER_ROW = 14;
7059
- var MIN_CHIP_PX = 72;
7060
- var ADAPTIVE_PAD_MARGIN = 2;
7061
- var MIN_ADAPTIVE_PAD = 4;
7062
7059
  var AGENT_MAX_ROWS = 2;
7063
7060
  function QuickActionWall({
7064
7061
  chips,
@@ -7084,18 +7081,6 @@ function QuickActionWall({
7084
7081
  contentClassName,
7085
7082
  sync
7086
7083
  }) {
7087
- const brickRef = React13.useRef(null);
7088
- const [brickWidth, setBrickWidth] = React13.useState(0);
7089
- React13.useEffect(() => {
7090
- const el = brickRef.current;
7091
- if (!el || typeof ResizeObserver === "undefined") return;
7092
- const ro = new ResizeObserver((entries) => {
7093
- const w = entries[0]?.contentRect.width ?? 0;
7094
- if (w > 0) setBrickWidth(w);
7095
- });
7096
- ro.observe(el);
7097
- return () => ro.disconnect();
7098
- }, []);
7099
7084
  const padTarget = rows ? void 0 : minChips;
7100
7085
  const track = React13.useMemo(() => {
7101
7086
  if (!padTarget || chips.length === 0 || chips.length >= padTarget) return chips;
@@ -7131,11 +7116,7 @@ function QuickActionWall({
7131
7116
  const rowCap = agentCapped ? Math.min(rows, AGENT_MAX_ROWS) : rows;
7132
7117
  const dataRows = agentCapped ? Math.min(Math.max(1, Math.ceil(chips.length / DEFAULT_MIN_CHIPS_PER_ROW)), rowCap) : rows;
7133
7118
  const stackRows = loading ? rowCap : dataRows;
7134
- const adaptivePerRow = brickWidth > 0 ? Math.min(
7135
- Math.max(Math.ceil(brickWidth / MIN_CHIP_PX) + ADAPTIVE_PAD_MARGIN, MIN_ADAPTIVE_PAD),
7136
- DEFAULT_MIN_CHIPS_PER_ROW
7137
- ) : DEFAULT_MIN_CHIPS_PER_ROW;
7138
- const perRowTarget = minChips ? Math.ceil(minChips / stackRows) : adaptivePerRow;
7119
+ const perRowTarget = minChips ? Math.ceil(minChips / stackRows) : DEFAULT_MIN_CHIPS_PER_ROW;
7139
7120
  const rowLists = Array.from({ length: stackRows }, (_, r) => {
7140
7121
  const base = chips.filter((_2, i) => i % stackRows === r);
7141
7122
  if (base.length === 0 || base.length >= perRowTarget) return base;
@@ -7146,7 +7127,7 @@ function QuickActionWall({
7146
7127
  ).flat();
7147
7128
  });
7148
7129
  const skelPerRow = Math.ceil(skeletonCount / stackRows);
7149
- return /* @__PURE__ */ jsxs29("div", { ref: brickRef, className: cn("relative flex flex-col overflow-hidden", className), style: { gap }, children: [
7130
+ return /* @__PURE__ */ jsxs29("div", { className: cn("relative flex flex-col overflow-hidden", className), style: { gap }, children: [
7150
7131
  rowLists.map((list, r) => /* @__PURE__ */ jsx35(
7151
7132
  MarqueeWall,
7152
7133
  {
@@ -8225,7 +8206,7 @@ import * as React24 from "react";
8225
8206
 
8226
8207
  // src/components/ui/modal-v2.tsx
8227
8208
  import * as React23 from "react";
8228
- import { useEffect as useEffect12, useState as useState18 } from "react";
8209
+ import { useEffect as useEffect11, useState as useState17 } from "react";
8229
8210
  import { usePreventScroll } from "@react-aria/overlays";
8230
8211
  init_cn();
8231
8212
  import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -8233,8 +8214,8 @@ var ANIMATION_DURATION = 200;
8233
8214
  var ModalContext = React23.createContext({});
8234
8215
  var Modal = React23.forwardRef(
8235
8216
  ({ isOpen, onClose, children, className }, ref) => {
8236
- const [isMounted, setIsMounted] = useState18(isOpen);
8237
- useEffect12(() => {
8217
+ const [isMounted, setIsMounted] = useState17(isOpen);
8218
+ useEffect11(() => {
8238
8219
  if (isOpen) {
8239
8220
  setIsMounted(true);
8240
8221
  return;
@@ -8243,7 +8224,7 @@ var Modal = React23.forwardRef(
8243
8224
  return () => clearTimeout(timeout);
8244
8225
  }, [isOpen]);
8245
8226
  usePreventScroll({ isDisabled: !isOpen });
8246
- useEffect12(() => {
8227
+ useEffect11(() => {
8247
8228
  const handleKeyDown = (event) => {
8248
8229
  if (event.key === "Escape") {
8249
8230
  onClose();
@@ -8783,7 +8764,7 @@ function ChatPanelHeader({
8783
8764
  import * as React29 from "react";
8784
8765
 
8785
8766
  // src/components/chat/chat-attachment-bar.tsx
8786
- import { useEffect as useEffect15, useRef as useRef14, useState as useState21 } from "react";
8767
+ import { useEffect as useEffect14, useRef as useRef13, useState as useState20 } from "react";
8787
8768
  init_button2();
8788
8769
  init_cn();
8789
8770
 
@@ -8861,7 +8842,7 @@ function ChatAttachmentAddButton({
8861
8842
  disabled = false,
8862
8843
  size: size2 = "default"
8863
8844
  }) {
8864
- const fileInputRef = useRef14(null);
8845
+ const fileInputRef = useRef13(null);
8865
8846
  const compact = size2 === "compact";
8866
8847
  const boxClass = compact ? "h-6 w-6" : "h-7 w-7";
8867
8848
  if (!attachmentsEnabled) {
@@ -9000,8 +8981,8 @@ function extLabel(fileName) {
9000
8981
  return fileName.slice(dot + 1, dot + 4).toLowerCase();
9001
8982
  }
9002
8983
  function useObjectUrl(file) {
9003
- const [url, setUrl] = useState21(null);
9004
- useEffect15(() => {
8984
+ const [url, setUrl] = useState20(null);
8985
+ useEffect14(() => {
9005
8986
  if (!file) {
9006
8987
  setUrl(null);
9007
8988
  return;
@@ -9406,7 +9387,7 @@ function ChatArchivePage(props) {
9406
9387
  // src/components/chat/chat-sidebar.tsx
9407
9388
  init_cn();
9408
9389
  init_button2();
9409
- import { forwardRef as forwardRef20, useRef as useRef15, useEffect as useEffect16 } from "react";
9390
+ import { forwardRef as forwardRef20, useRef as useRef14, useEffect as useEffect15 } from "react";
9410
9391
 
9411
9392
  // src/components/chat/chat-sidebar-skeleton.tsx
9412
9393
  init_cn();
@@ -9522,13 +9503,13 @@ DialogListItem.displayName = "DialogListItem";
9522
9503
  var ChatSidebar = forwardRef20(
9523
9504
  ({ className, onNewChat, onDialogSelect, dialogs = [], activeDialogId, isLoading, isCreatingDialog, children, hasNextPage, isFetchingNextPage, onLoadMore, ...props }, ref) => {
9524
9505
  const showEmptyState = dialogs.length === 0 && !children;
9525
- const scrollContainerRef = useRef15(null);
9526
- const loadMoreRef = useRef15(null);
9527
- const onLoadMoreRef = useRef15(onLoadMore);
9506
+ const scrollContainerRef = useRef14(null);
9507
+ const loadMoreRef = useRef14(null);
9508
+ const onLoadMoreRef = useRef14(onLoadMore);
9528
9509
  onLoadMoreRef.current = onLoadMore;
9529
- const isFetchingRef = useRef15(isFetchingNextPage);
9510
+ const isFetchingRef = useRef14(isFetchingNextPage);
9530
9511
  isFetchingRef.current = isFetchingNextPage;
9531
- useEffect16(() => {
9512
+ useEffect15(() => {
9532
9513
  const scrollContainer = scrollContainerRef.current;
9533
9514
  const loadMoreElement = loadMoreRef.current;
9534
9515
  if (!scrollContainer || !loadMoreElement || !hasNextPage) return;
@@ -9978,7 +9959,7 @@ function BlogImagePlaceholder({
9978
9959
  }
9979
9960
 
9980
9961
  // src/components/chat/entity-cards/entity-portrait-card.tsx
9981
- import { useEffect as useEffect17, useState as useState23 } from "react";
9962
+ import { useEffect as useEffect16, useState as useState22 } from "react";
9982
9963
 
9983
9964
  // src/components/ui/card.tsx
9984
9965
  init_cn();
@@ -10139,9 +10120,9 @@ function StatusBadge({
10139
10120
  }
10140
10121
 
10141
10122
  // src/components/chat/entity-cards/use-cover-image-fallback.ts
10142
- import { useCallback as useCallback12, useState as useState22 } from "react";
10123
+ import { useCallback as useCallback12, useState as useState21 } from "react";
10143
10124
  function useCoverImageFallback(imageUrl, placeholderUrl) {
10144
- const [failed, setFailed] = useState22(() => /* @__PURE__ */ new Set());
10125
+ const [failed, setFailed] = useState21(() => /* @__PURE__ */ new Set());
10145
10126
  const src = imageUrl && !failed.has(imageUrl) ? imageUrl : placeholderUrl && !failed.has(placeholderUrl) ? placeholderUrl : null;
10146
10127
  const onError = useCallback12(() => {
10147
10128
  if (!src) return;
@@ -10172,8 +10153,8 @@ function EntityPortraitCard({
10172
10153
  className
10173
10154
  }) {
10174
10155
  const { src, onError: onMediaError } = useCoverImageFallback(imageUrl, placeholderUrl);
10175
- const [isWide, setIsWide] = useState23(null);
10176
- useEffect17(() => {
10156
+ const [isWide, setIsWide] = useState22(null);
10157
+ useEffect16(() => {
10177
10158
  setIsWide(null);
10178
10159
  }, [src]);
10179
10160
  const onMediaLoad = (e) => {
@@ -10261,7 +10242,7 @@ function EntityPortraitCard({
10261
10242
  }
10262
10243
 
10263
10244
  // src/components/chat/entity-cards/admin-content-card.tsx
10264
- import { useState as useState24, useEffect as useEffect18 } from "react";
10245
+ import { useState as useState23, useEffect as useEffect17 } from "react";
10265
10246
  init_cn();
10266
10247
 
10267
10248
  // src/components/features/platform-badge.tsx
@@ -10486,11 +10467,11 @@ function AdminContentCard({
10486
10467
  actions,
10487
10468
  className
10488
10469
  }) {
10489
- const [imageError, setImageError] = useState24(false);
10490
- const [imageLoaded, setImageLoaded] = useState24(false);
10470
+ const [imageError, setImageError] = useState23(false);
10471
+ const [imageLoaded, setImageLoaded] = useState23(false);
10491
10472
  const displayUrl = imageUrl && !imageError ? imageUrl : placeholderUrl;
10492
10473
  const imageBgColor = useImageEdgeColor(displayUrl || null, "transparent");
10493
- useEffect18(() => {
10474
+ useEffect17(() => {
10494
10475
  setImageLoaded(false);
10495
10476
  }, [displayUrl]);
10496
10477
  return /* @__PURE__ */ jsxs55("article", { className: cn(
@@ -10661,7 +10642,7 @@ var TabsContent = React34.forwardRef(({ className, ...props }, ref) => /* @__PUR
10661
10642
  TabsContent.displayName = TabsPrimitive.Content.displayName;
10662
10643
 
10663
10644
  // src/components/features/video.tsx
10664
- import { useCallback as useCallback13, useEffect as useEffect20, useMemo as useMemo15, useRef as useRef16, useState as useState25 } from "react";
10645
+ import { useCallback as useCallback13, useEffect as useEffect19, useMemo as useMemo15, useRef as useRef15, useState as useState24 } from "react";
10665
10646
  import MuxPlayer from "@mux/mux-player-react";
10666
10647
 
10667
10648
  // src/components/features/video-center-badge.tsx
@@ -10708,7 +10689,7 @@ function fetchPriorityProp(priority) {
10708
10689
  }
10709
10690
 
10710
10691
  // src/components/features/use-video-warmup.ts
10711
- import { useEffect as useEffect19 } from "react";
10692
+ import { useEffect as useEffect18 } from "react";
10712
10693
  import ReactDOM from "react-dom";
10713
10694
 
10714
10695
  // src/components/features/mux-origins.ts
@@ -10760,7 +10741,7 @@ function useVideoWarmup({
10760
10741
  const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
10761
10742
  useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
10762
10743
  const { ref, isNear } = useNearViewport(nearMargin);
10763
- useEffect19(() => {
10744
+ useEffect18(() => {
10764
10745
  if (!isNear || !videoUrl || !resolvedOrigin) return;
10765
10746
  if (saveDataEnabled()) return;
10766
10747
  let videoOrigin;
@@ -10977,9 +10958,9 @@ function FilePlayer({
10977
10958
  className
10978
10959
  }) {
10979
10960
  const effectivePreload = preload ?? (saveDataEnabled() ? "none" : "metadata");
10980
- const [hoverMutedFallback, setHoverMutedFallback] = useState25(false);
10981
- const hoverPlayerRef = useRef16(null);
10982
- const perfListenerRef = useRef16(null);
10961
+ const [hoverMutedFallback, setHoverMutedFallback] = useState24(false);
10962
+ const hoverPlayerRef = useRef15(null);
10963
+ const perfListenerRef = useRef15(null);
10983
10964
  const clearPerfListener = useCallback13(() => {
10984
10965
  if (perfListenerRef.current) {
10985
10966
  try {
@@ -10989,17 +10970,17 @@ function FilePlayer({
10989
10970
  perfListenerRef.current = null;
10990
10971
  }
10991
10972
  }, []);
10992
- useEffect20(() => clearPerfListener, [clearPerfListener]);
10993
- const hoverActiveRef = useRef16(false);
10994
- const hoverGenerationRef = useRef16(0);
10995
- const activationWaiterRef = useRef16(null);
10973
+ useEffect19(() => clearPerfListener, [clearPerfListener]);
10974
+ const hoverActiveRef = useRef15(false);
10975
+ const hoverGenerationRef = useRef15(0);
10976
+ const activationWaiterRef = useRef15(null);
10996
10977
  const clearActivationWaiter = useCallback13(() => {
10997
10978
  if (activationWaiterRef.current) {
10998
10979
  activationWaiters.delete(activationWaiterRef.current);
10999
10980
  activationWaiterRef.current = null;
11000
10981
  }
11001
10982
  }, []);
11002
- useEffect20(() => clearActivationWaiter, [clearActivationWaiter]);
10983
+ useEffect19(() => clearActivationWaiter, [clearActivationWaiter]);
11003
10984
  const startHoverPlayback = useCallback13(() => {
11004
10985
  hoverActiveRef.current = true;
11005
10986
  const generation = ++hoverGenerationRef.current;
@@ -11083,7 +11064,7 @@ function FilePlayer({
11083
11064
  setHoverMutedFallback(false);
11084
11065
  }, []);
11085
11066
  const hoverControlled = typeof playWhenHovered === "boolean";
11086
- useEffect20(() => {
11067
+ useEffect19(() => {
11087
11068
  if (!hoverControlled) return;
11088
11069
  if (playWhenHovered) startHoverPlayback();
11089
11070
  else stopHoverPlayback();
@@ -11184,8 +11165,8 @@ function YouTubeFacadeInner({
11184
11165
  className,
11185
11166
  minimalControls
11186
11167
  }) {
11187
- const [activated, setActivated] = useState25(false);
11188
- const iframeRef = useRef16(null);
11168
+ const [activated, setActivated] = useState24(false);
11169
+ const iframeRef = useRef15(null);
11189
11170
  const embedUrl = useMemo15(() => {
11190
11171
  const params = new URLSearchParams({
11191
11172
  autoplay: "1",
@@ -11206,15 +11187,15 @@ function YouTubeFacadeInner({
11206
11187
  }
11207
11188
  return `${YT_NOCOOKIE_ORIGIN}/embed/${videoId}?${params.toString()}`;
11208
11189
  }, [videoId, minimalControls]);
11209
- const [posterTier, setPosterTier] = useState25(0);
11210
- useEffect20(() => {
11190
+ const [posterTier, setPosterTier] = useState24(0);
11191
+ useEffect19(() => {
11211
11192
  setPosterTier(0);
11212
11193
  }, [videoId]);
11213
11194
  const posterQuality = YT_POSTER_TIERS[posterTier];
11214
11195
  const posterJpg = `https://i.ytimg.com/vi/${videoId}/${posterQuality}.jpg`;
11215
11196
  const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/${posterQuality}.webp`;
11216
11197
  const handlePosterError = () => setPosterTier((tier) => Math.min(tier + 1, YT_POSTER_TIERS.length - 1));
11217
- useEffect20(() => {
11198
+ useEffect19(() => {
11218
11199
  if (!activated) return;
11219
11200
  const iframe = iframeRef.current;
11220
11201
  if (!iframe) return;
@@ -11305,7 +11286,7 @@ function YouTubeFacadeInner({
11305
11286
 
11306
11287
  // src/components/features/video-bites-strip.tsx
11307
11288
  init_cn();
11308
- import { useMemo as useMemo17, useRef as useRef18, useState as useState27, useEffect as useEffect22 } from "react";
11289
+ import { useMemo as useMemo17, useRef as useRef17, useState as useState26, useEffect as useEffect21 } from "react";
11309
11290
 
11310
11291
  // src/components/features/video-ratio-tabs.tsx
11311
11292
  import { Fragment as Fragment18, jsx as jsx76, jsxs as jsxs58 } from "react/jsx-runtime";
@@ -11403,7 +11384,7 @@ function sortBitesByCreatedAtDesc(a, b) {
11403
11384
 
11404
11385
  // src/components/features/cards-strip.tsx
11405
11386
  init_cn();
11406
- import React37, { useCallback as useCallback14, useEffect as useEffect21, useMemo as useMemo16, useRef as useRef17, useState as useState26 } from "react";
11387
+ import React37, { useCallback as useCallback14, useEffect as useEffect20, useMemo as useMemo16, useRef as useRef16, useState as useState25 } from "react";
11407
11388
  init_button2();
11408
11389
 
11409
11390
  // src/components/layout/page-heading.tsx
@@ -11490,7 +11471,7 @@ function CardsStrip(props) {
11490
11471
  const items = childrenMode ? childItems : props.items;
11491
11472
  const cardWidthDesktop = childrenMode ? props.cardWidthDesktop ?? 400 : 0;
11492
11473
  const cardWidthMobile = childrenMode ? props.cardWidthMobile ?? 320 : 0;
11493
- useEffect21(() => {
11474
+ useEffect20(() => {
11494
11475
  if (process.env.NODE_ENV === "production" || !childrenMode) return;
11495
11476
  const only = childItems.length === 1 ? childItems[0] : null;
11496
11477
  if (React37.isValidElement(only) && only.type === React37.Fragment) {
@@ -11505,13 +11486,13 @@ function CardsStrip(props) {
11505
11486
  }
11506
11487
  return React37.isValidElement(item) && item.key != null ? String(item.key) : String(index);
11507
11488
  };
11508
- const wrapperRef = useRef17(null);
11509
- const scrollerRef = useRef17(null);
11510
- const trackRef = useRef17(null);
11511
- const [reducedMotion, setReducedMotion] = useState26(false);
11512
- const [isTouch, setIsTouch] = useState26(false);
11513
- const [isMobile, setIsMobile] = useState26(false);
11514
- useEffect21(() => {
11489
+ const wrapperRef = useRef16(null);
11490
+ const scrollerRef = useRef16(null);
11491
+ const trackRef = useRef16(null);
11492
+ const [reducedMotion, setReducedMotion] = useState25(false);
11493
+ const [isTouch, setIsTouch] = useState25(false);
11494
+ const [isMobile, setIsMobile] = useState25(false);
11495
+ useEffect20(() => {
11515
11496
  const subs = [];
11516
11497
  const watch = (query, set) => {
11517
11498
  const mq = window.matchMedia(query);
@@ -11525,9 +11506,9 @@ function CardsStrip(props) {
11525
11506
  watch("(max-width: 767px)", setIsMobile);
11526
11507
  return () => subs.forEach((fn) => fn());
11527
11508
  }, []);
11528
- const [overflows, setOverflows] = useState26(false);
11529
- const [marqueeEligible, setMarqueeEligible] = useState26(false);
11530
- const singleCopyWidthRef = useRef17(0);
11509
+ const [overflows, setOverflows] = useState25(false);
11510
+ const [marqueeEligible, setMarqueeEligible] = useState25(false);
11511
+ const singleCopyWidthRef = useRef16(0);
11531
11512
  const marqueeActive = autoScroll && !reducedMotion && marqueeEligible && items.length > 0;
11532
11513
  const measure = useCallback14(() => {
11533
11514
  const scroller = scrollerRef.current;
@@ -11539,7 +11520,7 @@ function CardsStrip(props) {
11539
11520
  setOverflows(singleCopy > scroller.clientWidth + 1);
11540
11521
  setMarqueeEligible(singleCopy > scroller.clientWidth + TRACK_GAP_PX);
11541
11522
  }, []);
11542
- useEffect21(() => {
11523
+ useEffect20(() => {
11543
11524
  measure();
11544
11525
  const scroller = scrollerRef.current;
11545
11526
  const track = trackRef.current;
@@ -11549,10 +11530,10 @@ function CardsStrip(props) {
11549
11530
  ro.observe(track);
11550
11531
  return () => ro.disconnect();
11551
11532
  }, [measure, items.length, marqueeActive, isMobile]);
11552
- const chevronSuppressUntilRef = useRef17(0);
11553
- const userScrollSuppressUntilRef = useRef17(0);
11554
- const [nearViewport, setNearViewport] = useState26(true);
11555
- useEffect21(() => {
11533
+ const chevronSuppressUntilRef = useRef16(0);
11534
+ const userScrollSuppressUntilRef = useRef16(0);
11535
+ const [nearViewport, setNearViewport] = useState25(true);
11536
+ useEffect20(() => {
11556
11537
  const el = wrapperRef.current;
11557
11538
  if (!el || typeof IntersectionObserver === "undefined") return;
11558
11539
  const io = new IntersectionObserver(
@@ -11562,8 +11543,8 @@ function CardsStrip(props) {
11562
11543
  io.observe(el);
11563
11544
  return () => io.disconnect();
11564
11545
  }, []);
11565
- const [activeKey, setActiveKey] = useState26(null);
11566
- const activeKeyRef = useRef17(null);
11546
+ const [activeKey, setActiveKey] = useState25(null);
11547
+ const activeKeyRef = useRef16(null);
11567
11548
  const activate = useCallback14((key) => {
11568
11549
  activeKeyRef.current = key;
11569
11550
  setActiveKey(key);
@@ -11572,8 +11553,8 @@ function CardsStrip(props) {
11572
11553
  if (activeKeyRef.current === key) activeKeyRef.current = null;
11573
11554
  setActiveKey((current) => current === key ? null : current);
11574
11555
  }, []);
11575
- const hoverPointerRef = useRef17({ x: 0, y: 0, inside: false });
11576
- const lastHoverSyncScrollRef = useRef17(-1);
11556
+ const hoverPointerRef = useRef16({ x: 0, y: 0, inside: false });
11557
+ const lastHoverSyncScrollRef = useRef16(-1);
11577
11558
  const syncHoverToPointer = useCallback14(() => {
11578
11559
  const p = hoverPointerRef.current;
11579
11560
  if (!p.inside) return;
@@ -11634,11 +11615,11 @@ function CardsStrip(props) {
11634
11615
  readBack: () => scrollerRef.current?.scrollLeft ?? 0,
11635
11616
  onAfterFrame: syncHoverIfScrolled
11636
11617
  });
11637
- const [mountedIdx, setMountedIdx] = useState26(() => /* @__PURE__ */ new Set());
11638
- const cardObserverRef = useRef17(null);
11639
- const cardElIdxRef = useRef17(/* @__PURE__ */ new Map());
11640
- const cardElNearRef = useRef17(/* @__PURE__ */ new Map());
11641
- useEffect21(() => {
11618
+ const [mountedIdx, setMountedIdx] = useState25(() => /* @__PURE__ */ new Set());
11619
+ const cardObserverRef = useRef16(null);
11620
+ const cardElIdxRef = useRef16(/* @__PURE__ */ new Map());
11621
+ const cardElNearRef = useRef16(/* @__PURE__ */ new Map());
11622
+ useEffect20(() => {
11642
11623
  if (typeof IntersectionObserver === "undefined") return;
11643
11624
  const io = new IntersectionObserver((entries) => {
11644
11625
  for (const e of entries) cardElNearRef.current.set(e.target, e.isIntersecting);
@@ -11666,7 +11647,7 @@ function CardsStrip(props) {
11666
11647
  cardObserverRef.current = null;
11667
11648
  };
11668
11649
  }, []);
11669
- const cardRefFnsRef = useRef17(/* @__PURE__ */ new Map());
11650
+ const cardRefFnsRef = useRef16(/* @__PURE__ */ new Map());
11670
11651
  const getCardRef = useCallback14((idx) => {
11671
11652
  let fn = cardRefFnsRef.current.get(idx);
11672
11653
  if (!fn) {
@@ -11706,7 +11687,7 @@ function CardsStrip(props) {
11706
11687
  const onPointerDownIntent = useCallback14((e) => {
11707
11688
  if (e.pointerType === "touch") onUserScrollIntent();
11708
11689
  }, [onUserScrollIntent]);
11709
- const marqueeActiveRef = useRef17(false);
11690
+ const marqueeActiveRef = useRef16(false);
11710
11691
  marqueeActiveRef.current = marqueeActive;
11711
11692
  const onSeamWarp = useCallback14(() => {
11712
11693
  const scroller = scrollerRef.current;
@@ -11944,14 +11925,14 @@ function VideoBiteCard({
11944
11925
  const key = cardKey ?? `${bite.url}__${index}`;
11945
11926
  const previewUrl = toMuxPreviewUrl(bite.url);
11946
11927
  const controlled = active !== void 0;
11947
- const [selfActive, setSelfActive] = useState27(false);
11928
+ const [selfActive, setSelfActive] = useState26(false);
11948
11929
  const isActive = controlled ? !!active : selfActive;
11949
11930
  const activate = () => controlled ? onActivate?.(key) : setSelfActive(true);
11950
11931
  const deactivate = () => controlled ? onDeactivate?.(key) : setSelfActive(false);
11951
11932
  const gateControlled = playerMounted !== void 0;
11952
- const rootElRef = useRef18(null);
11953
- const [isNear, setIsNear] = useState27(false);
11954
- useEffect22(() => {
11933
+ const rootElRef = useRef17(null);
11934
+ const [isNear, setIsNear] = useState26(false);
11935
+ useEffect21(() => {
11955
11936
  if (gateControlled) return;
11956
11937
  const el = rootElRef.current;
11957
11938
  if (!el || typeof IntersectionObserver === "undefined") return;
@@ -13787,7 +13768,7 @@ function OnboardingGuideCard({
13787
13768
  }
13788
13769
 
13789
13770
  // src/components/chat/entity-cards/roadmap-card.tsx
13790
- import { useState as useState106 } from "react";
13771
+ import { useState as useState105 } from "react";
13791
13772
  import { ThumbsUp, ThumbsDown } from "lucide-react";
13792
13773
 
13793
13774
  // src/components/chat/entity-cards/roadmap-vote-button.tsx
@@ -13828,7 +13809,7 @@ function RoadmapVoteButton({
13828
13809
  init_button();
13829
13810
 
13830
13811
  // src/components/ui/image-gallery-modal.tsx
13831
- import { useState as useState105, useEffect as useEffect78 } from "react";
13812
+ import { useState as useState104, useEffect as useEffect77 } from "react";
13832
13813
 
13833
13814
  // src/components/ui/allowed-domains-input.tsx
13834
13815
  init_cn();
@@ -13989,11 +13970,11 @@ AllowedDomainsInput.displayName = "AllowedDomainsInput";
13989
13970
  // src/components/ui/autocomplete.tsx
13990
13971
  import {
13991
13972
  forwardRef as forwardRef26,
13992
- useEffect as useEffect23,
13973
+ useEffect as useEffect22,
13993
13974
  useImperativeHandle as useImperativeHandle3,
13994
13975
  useMemo as useMemo19,
13995
- useRef as useRef20,
13996
- useState as useState29
13976
+ useRef as useRef19,
13977
+ useState as useState28
13997
13978
  } from "react";
13998
13979
  import * as PopoverPrimitive from "@radix-ui/react-popover";
13999
13980
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
@@ -14091,7 +14072,7 @@ function AutocompleteInner(props, ref) {
14091
14072
  const limitTagsProp = multiple ? props.limitTags ?? "auto" : "auto";
14092
14073
  const getLimitTagsText = multiple ? props.getLimitTagsText ?? ((more) => `+${more}`) : ((more) => `+${more}`);
14093
14074
  const valueArray = multiple ? props.value : props.value != null ? [props.value] : [];
14094
- const [internalInputValue, setInternalInputValue] = useState29("");
14075
+ const [internalInputValue, setInternalInputValue] = useState28("");
14095
14076
  const isInputControlled = inputValueProp !== void 0;
14096
14077
  const inputValue = isInputControlled ? inputValueProp : internalInputValue;
14097
14078
  const updateInputValue = (value, reason) => {
@@ -14100,10 +14081,10 @@ function AutocompleteInner(props, ref) {
14100
14081
  }
14101
14082
  onInputChange?.(value, reason);
14102
14083
  };
14103
- const [isOpen, setIsOpen] = useState29(false);
14104
- const [highlightedIndex, setHighlightedIndex] = useState29(-1);
14105
- const containerRef = useRef20(null);
14106
- const hiddenTagsPopupRef = useRef20(null);
14084
+ const [isOpen, setIsOpen] = useState28(false);
14085
+ const [highlightedIndex, setHighlightedIndex] = useState28(-1);
14086
+ const containerRef = useRef19(null);
14087
+ const hiddenTagsPopupRef = useRef19(null);
14107
14088
  const isInvalid = invalid || !!error;
14108
14089
  useImperativeHandle3(ref, () => containerRef.current);
14109
14090
  const selectedOptions = useMemo19(() => {
@@ -14120,9 +14101,9 @@ function AutocompleteInner(props, ref) {
14120
14101
  const visibleTags = multiple ? selectedOptions.slice(0, visibleCount) : [];
14121
14102
  const hiddenTags = multiple ? selectedOptions.slice(visibleCount) : [];
14122
14103
  const hiddenTagsCount = multiple ? selectedOptions.length - visibleCount : 0;
14123
- const [showHiddenTags, setShowHiddenTags] = useState29(false);
14124
- const hiddenTagsRef = useRef20(null);
14125
- useEffect23(() => {
14104
+ const [showHiddenTags, setShowHiddenTags] = useState28(false);
14105
+ const hiddenTagsRef = useRef19(null);
14106
+ useEffect22(() => {
14126
14107
  if (!showHiddenTags) return;
14127
14108
  const handleClick = (e) => {
14128
14109
  const target = e.target;
@@ -14174,7 +14155,7 @@ function AutocompleteInner(props, ref) {
14174
14155
  setIsOpen(false);
14175
14156
  onCreateOption?.(trimmed);
14176
14157
  };
14177
- useEffect23(() => {
14158
+ useEffect22(() => {
14178
14159
  setHighlightedIndex(-1);
14179
14160
  }, [filteredOptions.length]);
14180
14161
  const handleInputChange = (e) => {
@@ -15733,7 +15714,7 @@ function DateFilterMenu({
15733
15714
 
15734
15715
  // src/components/ui/duration-input.tsx
15735
15716
  init_cn();
15736
- import { Fragment as Fragment27, useEffect as useEffect25, useRef as useRef21, useState as useState31 } from "react";
15717
+ import { Fragment as Fragment27, useEffect as useEffect24, useRef as useRef20, useState as useState30 } from "react";
15737
15718
  import { jsx as jsx100, jsxs as jsxs78 } from "react/jsx-runtime";
15738
15719
  var SEGMENT_META = [
15739
15720
  { label: "Hours", placeholder: "HH", max: 99 },
@@ -15747,9 +15728,9 @@ var split = (value) => {
15747
15728
  return [parts[0] || "00", parts[1] || "00", parts[2] || "00"];
15748
15729
  };
15749
15730
  function DurationInput({ value, onChange, invalid, className }) {
15750
- const [segments, setSegments] = useState31(() => split(value));
15751
- const refs = [useRef21(null), useRef21(null), useRef21(null)];
15752
- useEffect25(() => {
15731
+ const [segments, setSegments] = useState30(() => split(value));
15732
+ const refs = [useRef20(null), useRef20(null), useRef20(null)];
15733
+ useEffect24(() => {
15753
15734
  setSegments((prev) => compose(prev) === value ? prev : split(value));
15754
15735
  }, [value]);
15755
15736
  const focusSegment = (i) => {
@@ -15866,7 +15847,7 @@ init_cn();
15866
15847
  import React47 from "react";
15867
15848
 
15868
15849
  // src/components/ui/progress-bar.tsx
15869
- import { useEffect as useEffect26, useRef as useRef22, useState as useState32 } from "react";
15850
+ import { useEffect as useEffect25, useRef as useRef21, useState as useState31 } from "react";
15870
15851
  import { jsx as jsx102 } from "react/jsx-runtime";
15871
15852
  var ProgressBar = ({
15872
15853
  progress,
@@ -15882,9 +15863,9 @@ var ProgressBar = ({
15882
15863
  const isMdUp = useMdUp() ?? true;
15883
15864
  const effectiveSegmentWidth = isMdUp ? segmentWidth : mobileSegmentWidth;
15884
15865
  const effectiveHeight = isMdUp ? height : mobileHeight;
15885
- const containerRef = useRef22(null);
15886
- const [segmentCount, setSegmentCount] = useState32(0);
15887
- useEffect26(() => {
15866
+ const containerRef = useRef21(null);
15867
+ const [segmentCount, setSegmentCount] = useState31(0);
15868
+ useEffect25(() => {
15888
15869
  if (!containerRef.current) return;
15889
15870
  const resizeObserver = new ResizeObserver(() => {
15890
15871
  if (containerRef.current) {
@@ -17817,13 +17798,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
17817
17798
  // src/components/ui/modal.tsx
17818
17799
  init_cn();
17819
17800
  import * as React62 from "react";
17820
- import { useEffect as useEffect31 } from "react";
17801
+ import { useEffect as useEffect30 } from "react";
17821
17802
  import { usePreventScroll as usePreventScroll2 } from "@react-aria/overlays";
17822
17803
  import { jsx as jsx122, jsxs as jsxs96 } from "react/jsx-runtime";
17823
17804
  var Modal2 = React62.forwardRef(
17824
17805
  ({ isOpen, onClose, children, className }, ref) => {
17825
17806
  usePreventScroll2({ isDisabled: !isOpen });
17826
- useEffect31(() => {
17807
+ useEffect30(() => {
17827
17808
  const handleKeyDown = (event) => {
17828
17809
  if (event.key === "Escape") {
17829
17810
  onClose();
@@ -18866,7 +18847,7 @@ function TabContent({
18866
18847
  // src/components/ui/tab-navigation.tsx
18867
18848
  init_next_navigation();
18868
18849
  init_cn();
18869
- import { useState as useState40, useEffect as useEffect33, useMemo as useMemo23, useRef as useRef25, useCallback as useCallback19 } from "react";
18850
+ import { useState as useState39, useEffect as useEffect32, useMemo as useMemo23, useRef as useRef24, useCallback as useCallback19 } from "react";
18870
18851
  import { Fragment as Fragment29, jsx as jsx132, jsxs as jsxs104 } from "react/jsx-runtime";
18871
18852
  function TabNavigation({
18872
18853
  activeTab: controlledActiveTab,
@@ -18897,9 +18878,9 @@ function TabNavigation({
18897
18878
  }
18898
18879
  return defaultTab || tabs[0]?.id || "";
18899
18880
  };
18900
- const [internalActiveTab, setInternalActiveTab] = useState40(getInitialTab);
18881
+ const [internalActiveTab, setInternalActiveTab] = useState39(getInitialTab);
18901
18882
  const activeTab = isUrlSyncEnabled ? internalActiveTab : controlledActiveTab || "";
18902
- useEffect33(() => {
18883
+ useEffect32(() => {
18903
18884
  if (!isUrlSyncEnabled) return;
18904
18885
  const fromUrl = searchParams?.get(paramName) || "";
18905
18886
  const nextTab = validTabIds.has(fromUrl) ? fromUrl : defaultTab || tabs[0]?.id || "";
@@ -18919,18 +18900,18 @@ function TabNavigation({
18919
18900
  controlledOnTabChange?.(tabId);
18920
18901
  }
18921
18902
  };
18922
- const scrollRef = useRef25(null);
18923
- const activeTabRef = useRef25(null);
18924
- const isFirstActiveScrollRef = useRef25(true);
18925
- const [canScrollLeft, setCanScrollLeft] = useState40(false);
18926
- const [canScrollRight, setCanScrollRight] = useState40(false);
18903
+ const scrollRef = useRef24(null);
18904
+ const activeTabRef = useRef24(null);
18905
+ const isFirstActiveScrollRef = useRef24(true);
18906
+ const [canScrollLeft, setCanScrollLeft] = useState39(false);
18907
+ const [canScrollRight, setCanScrollRight] = useState39(false);
18927
18908
  const updateScrollShadows = useCallback19(() => {
18928
18909
  const el = scrollRef.current;
18929
18910
  if (!el) return;
18930
18911
  setCanScrollLeft(el.scrollLeft > 0);
18931
18912
  setCanScrollRight(el.scrollLeft + el.clientWidth < el.scrollWidth - 1);
18932
18913
  }, []);
18933
- useEffect33(() => {
18914
+ useEffect32(() => {
18934
18915
  const el = scrollRef.current;
18935
18916
  if (!el) return;
18936
18917
  updateScrollShadows();
@@ -18954,7 +18935,7 @@ function TabNavigation({
18954
18935
  ro.disconnect();
18955
18936
  };
18956
18937
  }, [updateScrollShadows]);
18957
- useEffect33(() => {
18938
+ useEffect32(() => {
18958
18939
  const el = scrollRef.current;
18959
18940
  const active = activeTabRef.current;
18960
18941
  if (!el || !active) return;
@@ -19109,7 +19090,7 @@ function AIGeneratedBadge({ className }) {
19109
19090
  }
19110
19091
 
19111
19092
  // src/components/ui/fade-preview.tsx
19112
- import { useState as useState41, useRef as useRef26, useEffect as useEffect34 } from "react";
19093
+ import { useState as useState40, useRef as useRef25, useEffect as useEffect33 } from "react";
19113
19094
  import { ChevronDown as ChevronDown4 } from "lucide-react";
19114
19095
  import { Fragment as Fragment30, jsx as jsx135, jsxs as jsxs106 } from "react/jsx-runtime";
19115
19096
  function FadePreview({
@@ -19118,9 +19099,9 @@ function FadePreview({
19118
19099
  resetKey,
19119
19100
  children
19120
19101
  }) {
19121
- const [expanded, setExpanded] = useState41(false);
19122
- const contentRef = useRef26(null);
19123
- useEffect34(() => {
19102
+ const [expanded, setExpanded] = useState40(false);
19103
+ const contentRef = useRef25(null);
19104
+ useEffect33(() => {
19124
19105
  setExpanded(false);
19125
19106
  }, [resetKey]);
19126
19107
  const needsFade = hiddenCount > 0;
@@ -19185,11 +19166,11 @@ var Progress = React73.forwardRef(({ className, value, indicatorClassName, ...pr
19185
19166
  Progress.displayName = ProgressPrimitive.Root.displayName;
19186
19167
 
19187
19168
  // src/components/ui/release-changelog-section.tsx
19188
- import { useState as useState51 } from "react";
19169
+ import { useState as useState50 } from "react";
19189
19170
  import { ChevronDown as ChevronDown5 } from "lucide-react";
19190
19171
 
19191
19172
  // src/components/ui/rich-markdown-renderer.tsx
19192
- import { useEffect as useEffect41, useState as useState50, useRef as useRef31, useMemo as useMemo26, useCallback as useCallback22 } from "react";
19173
+ import { useEffect as useEffect40, useState as useState49, useRef as useRef30, useMemo as useMemo26, useCallback as useCallback22 } from "react";
19193
19174
  import ReactMarkdown2 from "react-markdown";
19194
19175
  import remarkGfm2 from "remark-gfm";
19195
19176
  import remarkBreaks2 from "remark-breaks";
@@ -19197,7 +19178,7 @@ import rehypeHighlight2 from "rehype-highlight";
19197
19178
  import rehypeRaw2 from "rehype-raw";
19198
19179
 
19199
19180
  // src/components/embeds/reddit-embed-client.tsx
19200
- import { useState as useState43, useEffect as useEffect36, useRef as useRef28 } from "react";
19181
+ import { useState as useState42, useEffect as useEffect35, useRef as useRef27 } from "react";
19201
19182
 
19202
19183
  // src/utils/social-embed-cache.ts
19203
19184
  var cachingRequests = /* @__PURE__ */ new Map();
@@ -19479,7 +19460,7 @@ var socialCache = SocialEmbedCache.getInstance();
19479
19460
 
19480
19461
  // src/components/media-carousel.tsx
19481
19462
  init_cn();
19482
- import { useState as useState42, useRef as useRef27, useEffect as useEffect35, memo as memo4, useCallback as useCallback20 } from "react";
19463
+ import { useState as useState41, useRef as useRef26, useEffect as useEffect34, memo as memo4, useCallback as useCallback20 } from "react";
19483
19464
  init_button2();
19484
19465
  import { Fragment as Fragment31, jsx as jsx137, jsxs as jsxs107 } from "react/jsx-runtime";
19485
19466
  var ChevronLeftIcon = () => /* @__PURE__ */ jsx137("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx137("polyline", { points: "15,18 9,12 15,6" }) });
@@ -19494,17 +19475,17 @@ var MediaCarousel = memo4(function MediaCarousel2({
19494
19475
  transformImageSrc,
19495
19476
  reserveDotRow = false
19496
19477
  }) {
19497
- const [currentIndex, setCurrentIndex] = useState42(0);
19498
- const [touchStart, setTouchStart] = useState42(null);
19499
- const [touchEnd, setTouchEnd] = useState42(null);
19500
- const [brokenResourceUrls, setBrokenResourceUrls] = useState42({});
19501
- const [loadedImageSrc, setLoadedImageSrc] = useState42(null);
19502
- const carouselRef = useRef27(null);
19478
+ const [currentIndex, setCurrentIndex] = useState41(0);
19479
+ const [touchStart, setTouchStart] = useState41(null);
19480
+ const [touchEnd, setTouchEnd] = useState41(null);
19481
+ const [brokenResourceUrls, setBrokenResourceUrls] = useState41({});
19482
+ const [loadedImageSrc, setLoadedImageSrc] = useState41(null);
19483
+ const carouselRef = useRef26(null);
19503
19484
  const onImageError = useCallback20((originalUrl) => {
19504
19485
  const key = originalUrl.trim() || "__missing_src__";
19505
19486
  setBrokenResourceUrls((b) => b[key] ? b : { ...b, [key]: true });
19506
19487
  }, []);
19507
- useEffect35(() => {
19488
+ useEffect34(() => {
19508
19489
  if (currentIndex >= media.length && media.length > 0) {
19509
19490
  setCurrentIndex(media.length - 1);
19510
19491
  }
@@ -19821,11 +19802,11 @@ var RedditProfilePic = ({ username }) => {
19821
19802
  };
19822
19803
  function RedditEmbedClient({ url, maxWidth = 700 }) {
19823
19804
  const { redditProxyUrl } = useRichMarkdownRuntime();
19824
- const [redditData, setRedditData] = useState43(null);
19825
- const [loading, setLoading] = useState43(true);
19826
- const [error, setError] = useState43(null);
19827
- const initializationDone = useRef28(false);
19828
- useEffect36(() => {
19805
+ const [redditData, setRedditData] = useState42(null);
19806
+ const [loading, setLoading] = useState42(true);
19807
+ const [error, setError] = useState42(null);
19808
+ const initializationDone = useRef27(false);
19809
+ useEffect35(() => {
19829
19810
  if (initializationDone.current) return;
19830
19811
  initializationDone.current = true;
19831
19812
  const jsonUrl = url.endsWith(".json") ? url : `${url.replace(/\/$/, "")}.json`;
@@ -20131,7 +20112,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
20131
20112
  }
20132
20113
 
20133
20114
  // src/components/embeds/twitter-embed-client.tsx
20134
- import { useState as useState44, useEffect as useEffect37, useRef as useRef29 } from "react";
20115
+ import { useState as useState43, useEffect as useEffect36, useRef as useRef28 } from "react";
20135
20116
  import { jsx as jsx141, jsxs as jsxs109 } from "react/jsx-runtime";
20136
20117
  var MessageCircleIcon2 = () => /* @__PURE__ */ jsx141("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx141("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) });
20137
20118
  var ExternalLinkIcon3 = () => /* @__PURE__ */ jsxs109("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
@@ -20157,13 +20138,13 @@ var UserIcon4 = () => /* @__PURE__ */ jsxs109("svg", { width: "12", height: "12"
20157
20138
  var XIcon = () => /* @__PURE__ */ jsx141(XLogo, { className: "w-5 h-5", color: "currentColor" });
20158
20139
  function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
20159
20140
  const { twitterProxyUrl } = useRichMarkdownRuntime();
20160
- const [tweetData, setTweetData] = useState44(null);
20161
- const [loading, setLoading] = useState44(true);
20162
- const [error, setError] = useState44(null);
20163
- const initializationDone = useRef29(false);
20141
+ const [tweetData, setTweetData] = useState43(null);
20142
+ const [loading, setLoading] = useState43(true);
20143
+ const [error, setError] = useState43(null);
20144
+ const initializationDone = useRef28(false);
20164
20145
  const extractedTweetId = tweetId || url.match(/status\/(\d+)/)?.[1];
20165
20146
  const tweetUrl = url.includes("twitter.com") || url.includes("x.com") ? url : `https://twitter.com/twitter/status/${extractedTweetId}`;
20166
- useEffect37(() => {
20147
+ useEffect36(() => {
20167
20148
  if (initializationDone.current) return;
20168
20149
  initializationDone.current = true;
20169
20150
  if (!extractedTweetId) {
@@ -20328,7 +20309,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
20328
20309
  }
20329
20310
 
20330
20311
  // src/components/embeds/linkedin-embed-client.tsx
20331
- import { useMemo as useMemo25, useState as useState45 } from "react";
20312
+ import { useMemo as useMemo25, useState as useState44 } from "react";
20332
20313
  import { ExternalLink as ExternalLink2 } from "lucide-react";
20333
20314
  import { jsx as jsx142, jsxs as jsxs110 } from "react/jsx-runtime";
20334
20315
  function toLinkedInEmbedUrl(url) {
@@ -20344,7 +20325,7 @@ function toLinkedInEmbedUrl(url) {
20344
20325
  }
20345
20326
  function LinkedInEmbedClient({ url, height = 600 }) {
20346
20327
  const embedUrl = useMemo25(() => toLinkedInEmbedUrl(url), [url]);
20347
- const [loaded, setLoaded] = useState45(false);
20328
+ const [loaded, setLoaded] = useState44(false);
20348
20329
  if (!embedUrl) {
20349
20330
  return /* @__PURE__ */ jsx142(LinkedInContainer, { children: /* @__PURE__ */ jsxs110("div", { className: "p-6", children: [
20350
20331
  /* @__PURE__ */ jsxs110("div", { className: "flex items-center space-x-3 text-ods-text-secondary mb-4", children: [
@@ -20411,7 +20392,7 @@ function LinkedInEmbedClient({ url, height = 600 }) {
20411
20392
  }
20412
20393
 
20413
20394
  // src/components/embeds/og-link-preview.tsx
20414
- import { useState as useState46, useEffect as useEffect38, Component as Component2 } from "react";
20395
+ import { useState as useState45, useEffect as useEffect37, Component as Component2 } from "react";
20415
20396
  import { jsx as jsx143, jsxs as jsxs111 } from "react/jsx-runtime";
20416
20397
  var OGLinkErrorBoundary = class extends Component2 {
20417
20398
  constructor(props) {
@@ -20456,12 +20437,12 @@ var OGLinkPreview = ({
20456
20437
  variant = "default",
20457
20438
  enablePlaceholder = true
20458
20439
  }) => {
20459
- const [ogData, setOgData] = useState46(null);
20460
- const [loading, setLoading] = useState46(true);
20461
- const [error, setError] = useState46(false);
20462
- const [imageError, setImageError] = useState46(false);
20463
- const [originalImageError, setOriginalImageError] = useState46(false);
20464
- const [fallbackImageError, setFallbackImageError] = useState46(false);
20440
+ const [ogData, setOgData] = useState45(null);
20441
+ const [loading, setLoading] = useState45(true);
20442
+ const [error, setError] = useState45(false);
20443
+ const [imageError, setImageError] = useState45(false);
20444
+ const [originalImageError, setOriginalImageError] = useState45(false);
20445
+ const [fallbackImageError, setFallbackImageError] = useState45(false);
20465
20446
  let isValidUrl = true;
20466
20447
  let isLocalhost = false;
20467
20448
  try {
@@ -20476,7 +20457,7 @@ var OGLinkPreview = ({
20476
20457
  } catch {
20477
20458
  isValidUrl = false;
20478
20459
  }
20479
- useEffect38(() => {
20460
+ useEffect37(() => {
20480
20461
  if (!isValidUrl || isLocalhost) return;
20481
20462
  const fetchOGData = async () => {
20482
20463
  try {
@@ -20732,7 +20713,7 @@ var OGLinkPreview = ({
20732
20713
  };
20733
20714
 
20734
20715
  // src/components/embeds/figma-embed.tsx
20735
- import { useState as useState48 } from "react";
20716
+ import { useState as useState47 } from "react";
20736
20717
  import { ExternalLink as ExternalLink3, Play as Play3, LayoutGrid } from "lucide-react";
20737
20718
 
20738
20719
  // src/utils/embed-url-converters.ts
@@ -20786,7 +20767,7 @@ function toFigmaOriginalUrl(url) {
20786
20767
  }
20787
20768
 
20788
20769
  // src/components/embeds/embed-iframe.tsx
20789
- import { useState as useState47, useCallback as useCallback21, useRef as useRef30, useEffect as useEffect39 } from "react";
20770
+ import { useState as useState46, useCallback as useCallback21, useRef as useRef29, useEffect as useEffect38 } from "react";
20790
20771
  import { Fragment as Fragment32, jsx as jsx144, jsxs as jsxs112 } from "react/jsx-runtime";
20791
20772
  function EmbedLoadingSkeleton({ height }) {
20792
20773
  return /* @__PURE__ */ jsx144(
@@ -20807,13 +20788,13 @@ function EmbedIframe({
20807
20788
  loading,
20808
20789
  allowFullScreen
20809
20790
  }) {
20810
- const [isLoaded, setIsLoaded] = useState47(false);
20811
- const iframeRef = useRef30(null);
20791
+ const [isLoaded, setIsLoaded] = useState46(false);
20792
+ const iframeRef = useRef29(null);
20812
20793
  const handleLoad = useCallback21(() => setIsLoaded(true), []);
20813
- useEffect39(() => {
20794
+ useEffect38(() => {
20814
20795
  setIsLoaded(false);
20815
20796
  }, [src]);
20816
- useEffect39(() => {
20797
+ useEffect38(() => {
20817
20798
  const iframe = iframeRef.current;
20818
20799
  return () => {
20819
20800
  if (iframe) {
@@ -20892,7 +20873,7 @@ function SlidesViewToggle({
20892
20873
  );
20893
20874
  }
20894
20875
  function FigmaEmbed({ url, title, height, loading = "lazy" }) {
20895
- const [view, setView] = useState48("present");
20876
+ const [view, setView] = useState47("present");
20896
20877
  const isSlides = url ? isFigmaSlidesUrl(url) : false;
20897
20878
  const embedSrc = url ? toFigmaEmbedUrl(url, { slidesView: view }) : null;
20898
20879
  const originalUrl = (() => {
@@ -20949,14 +20930,14 @@ function FigmaEmbed({ url, title, height, loading = "lazy" }) {
20949
20930
  }
20950
20931
 
20951
20932
  // src/components/embeds/markdown-image.tsx
20952
- import { useEffect as useEffect40, useState as useState49 } from "react";
20933
+ import { useEffect as useEffect39, useState as useState48 } from "react";
20953
20934
  import { jsx as jsx146 } from "react/jsx-runtime";
20954
20935
  var MAX_H_REM = 32;
20955
20936
  var DISPLAY_W = 768;
20956
20937
  function MarkdownImage({ src, alt }) {
20957
20938
  const { transformImageSrc } = useRichMarkdownRuntime();
20958
- const [ratio, setRatio] = useState49(null);
20959
- useEffect40(() => {
20939
+ const [ratio, setRatio] = useState48(null);
20940
+ useEffect39(() => {
20960
20941
  let cancelled = false;
20961
20942
  setRatio(null);
20962
20943
  const probeSrc = transformImageSrc(src, { width: 48, resize: "contain", quality: 20 }) ?? src;
@@ -21071,15 +21052,15 @@ var mermaidStyles2 = `
21071
21052
  }
21072
21053
  `;
21073
21054
  var MermaidDiagram2 = ({ chart }) => {
21074
- const [svg, setSvg] = useState50("");
21075
- const [error, setError] = useState50("");
21076
- const [isLoading, setIsLoading] = useState50(true);
21077
- const [mounted, setMounted] = useState50(false);
21078
- useEffect41(() => {
21055
+ const [svg, setSvg] = useState49("");
21056
+ const [error, setError] = useState49("");
21057
+ const [isLoading, setIsLoading] = useState49(true);
21058
+ const [mounted, setMounted] = useState49(false);
21059
+ useEffect40(() => {
21079
21060
  setMounted(true);
21080
21061
  }, []);
21081
21062
  const isDarkMode = true;
21082
- useEffect41(() => {
21063
+ useEffect40(() => {
21083
21064
  const renderMermaid = async () => {
21084
21065
  try {
21085
21066
  setIsLoading(true);
@@ -21418,7 +21399,7 @@ var RichMarkdownInner = ({
21418
21399
  resolveLinkEndpointUrl,
21419
21400
  demoteMarkdownH1ToH2
21420
21401
  }) => {
21421
- const idCountsRef = useRef31({});
21402
+ const idCountsRef = useRef30({});
21422
21403
  const { ogScraperUrl } = useRichMarkdownRuntime();
21423
21404
  const { ogApiBaseUrl, ogEndpointPath } = useMemo26(() => {
21424
21405
  try {
@@ -21845,7 +21826,7 @@ function ReleaseChangelogSection({
21845
21826
  icon,
21846
21827
  MarkdownRenderer = RichMarkdownRenderer
21847
21828
  }) {
21848
- const [collapsed, setCollapsed] = useState51(collapsible ? defaultCollapsed : false);
21829
+ const [collapsed, setCollapsed] = useState50(collapsible ? defaultCollapsed : false);
21849
21830
  if (!entries || entries.length === 0) return null;
21850
21831
  const inPreviewMode = previewFirst && !collapsible;
21851
21832
  const showEntries = !collapsible || !collapsed;
@@ -22041,7 +22022,7 @@ function StatusIndicator({ status, label, href }) {
22041
22022
  }
22042
22023
 
22043
22024
  // src/components/ui/hover-dropdown.tsx
22044
- import { useState as useState52, useRef as useRef32, useCallback as useCallback23 } from "react";
22025
+ import { useState as useState51, useRef as useRef31, useCallback as useCallback23 } from "react";
22045
22026
  import { Fragment as Fragment34, jsx as jsx152, jsxs as jsxs119 } from "react/jsx-runtime";
22046
22027
  function DefaultAnchor({
22047
22028
  href,
@@ -22058,9 +22039,9 @@ function HoverDropdown({
22058
22039
  className,
22059
22040
  renderAnchor
22060
22041
  }) {
22061
- const [open, setOpen] = useState52(false);
22062
- const timeoutRef = useRef32(void 0);
22063
- const containerRef = useRef32(null);
22042
+ const [open, setOpen] = useState51(false);
22043
+ const timeoutRef = useRef31(void 0);
22044
+ const containerRef = useRef31(null);
22064
22045
  const show = useCallback23(() => {
22065
22046
  clearTimeout(timeoutRef.current);
22066
22047
  setOpen(true);
@@ -22168,11 +22149,11 @@ function HoverDropdown({
22168
22149
 
22169
22150
  // src/components/layout/list-page-layout.tsx
22170
22151
  init_cn();
22171
- import { useEffect as useEffect43, useState as useState54 } from "react";
22152
+ import { useEffect as useEffect42, useState as useState53 } from "react";
22172
22153
 
22173
22154
  // src/components/ui/filter-modal.tsx
22174
22155
  init_cn();
22175
- import { useEffect as useEffect42, useState as useState53 } from "react";
22156
+ import { useEffect as useEffect41, useState as useState52 } from "react";
22176
22157
  init_button2();
22177
22158
 
22178
22159
  // src/components/ui/filter-checkbox-item.tsx
@@ -22369,15 +22350,15 @@ function FilterModal({
22369
22350
  emptyStateTitle = "No filters available",
22370
22351
  emptyStateDescription = "There are no filter options to display at the moment"
22371
22352
  }) {
22372
- const [selectedFilters, setSelectedFilters] = useState53(() => {
22353
+ const [selectedFilters, setSelectedFilters] = useState52(() => {
22373
22354
  return { ...currentFilters };
22374
22355
  });
22375
- const [pendingTags, setPendingTags] = useState53(selectedTags ?? []);
22356
+ const [pendingTags, setPendingTags] = useState52(selectedTags ?? []);
22376
22357
  const dateDefaultSort = dateFilter?.defaultSort ?? "desc";
22377
- const [draftDateSort, setDraftDateSort] = useState53(dateFilter?.sort ?? dateDefaultSort);
22378
- const [draftDateRange, setDraftDateRange] = useState53(dateFilter?.range);
22358
+ const [draftDateSort, setDraftDateSort] = useState52(dateFilter?.sort ?? dateDefaultSort);
22359
+ const [draftDateRange, setDraftDateRange] = useState52(dateFilter?.range);
22379
22360
  const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
22380
- useEffect42(() => {
22361
+ useEffect41(() => {
22381
22362
  if (isOpen) {
22382
22363
  setSelectedFilters({ ...currentFilters });
22383
22364
  setPendingTags(selectedTags ?? []);
@@ -22980,13 +22961,13 @@ function ListPageLayout({
22980
22961
  mobileFilterTitle,
22981
22962
  stickyHeader = false
22982
22963
  }) {
22983
- const [mobileFilterOpen, setMobileFilterOpen] = useState54(false);
22984
- const [localSearchValue, setLocalSearchValue] = useState54(searchValue);
22964
+ const [mobileFilterOpen, setMobileFilterOpen] = useState53(false);
22965
+ const [localSearchValue, setLocalSearchValue] = useState53(searchValue);
22985
22966
  const debouncedSearchValue = useDebounce(localSearchValue, 500);
22986
- useEffect43(() => {
22967
+ useEffect42(() => {
22987
22968
  setLocalSearchValue(searchValue);
22988
22969
  }, [searchValue]);
22989
- useEffect43(() => {
22970
+ useEffect42(() => {
22990
22971
  if (debouncedSearchValue !== searchValue) {
22991
22972
  onSearch(debouncedSearchValue);
22992
22973
  }
@@ -25901,7 +25882,7 @@ function FeatureList({
25901
25882
 
25902
25883
  // src/components/ui/truncate-text.tsx
25903
25884
  init_cn();
25904
- import { useEffect as useEffect44, useRef as useRef34, useState as useState56 } from "react";
25885
+ import { useEffect as useEffect43, useRef as useRef33, useState as useState55 } from "react";
25905
25886
  import { jsx as jsx182 } from "react/jsx-runtime";
25906
25887
  var VARIANT_CLASS = {
25907
25888
  h1: "text-h1",
@@ -25932,10 +25913,10 @@ function TruncateText({
25932
25913
  tone = "primary",
25933
25914
  mono = false
25934
25915
  }) {
25935
- const ref = useRef34(null);
25936
- const [isTruncated, setIsTruncated] = useState56(false);
25916
+ const ref = useRef33(null);
25917
+ const [isTruncated, setIsTruncated] = useState55(false);
25937
25918
  const isMultiLine = lines > 1;
25938
- useEffect44(() => {
25919
+ useEffect43(() => {
25939
25920
  const el = ref.current;
25940
25921
  if (!el) return;
25941
25922
  const check = () => {
@@ -26335,14 +26316,14 @@ function OrganizationCard({
26335
26316
 
26336
26317
  // src/components/ui/service-card.tsx
26337
26318
  init_cn();
26338
- import { useMemo as useMemo39, useState as useState92 } from "react";
26319
+ import { useMemo as useMemo39, useState as useState91 } from "react";
26339
26320
  import { ExternalLink as ExternalLink7 } from "lucide-react";
26340
26321
 
26341
26322
  // src/components/providers/dynamic-theme-provider.tsx
26342
26323
  import { createContext as createContext5, useContext as useContext5 } from "react";
26343
26324
 
26344
26325
  // src/hooks/use-dynamic-theming.ts
26345
- import { useState as useState57, useEffect as useEffect45 } from "react";
26326
+ import { useState as useState56, useEffect as useEffect44 } from "react";
26346
26327
  var defaultTheme = {
26347
26328
  primaryColor: "#FFC008",
26348
26329
  secondaryColor: "#161616",
@@ -26351,9 +26332,9 @@ var defaultTheme = {
26351
26332
  textColor: "#161616"
26352
26333
  };
26353
26334
  function useDynamicTheming() {
26354
- const [theme, setTheme] = useState57(defaultTheme);
26355
- const [isDark, setIsDark] = useState57(false);
26356
- useEffect45(() => {
26335
+ const [theme, setTheme] = useState56(defaultTheme);
26336
+ const [isDark, setIsDark] = useState56(false);
26337
+ useEffect44(() => {
26357
26338
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
26358
26339
  setIsDark(mediaQuery.matches);
26359
26340
  const handleChange = (e) => {
@@ -26441,7 +26422,7 @@ function useThemeToggle() {
26441
26422
  }
26442
26423
 
26443
26424
  // src/components/features/array-entry-manager.tsx
26444
- import { useState as useState59, useEffect as useEffect47 } from "react";
26425
+ import { useState as useState58, useEffect as useEffect46 } from "react";
26445
26426
  import { Trash2, Plus as Plus2, Save, Loader2 as Loader22 } from "lucide-react";
26446
26427
  import { jsx as jsx190, jsxs as jsxs148 } from "react/jsx-runtime";
26447
26428
  function ArrayEntryManager({
@@ -26460,14 +26441,14 @@ function ArrayEntryManager({
26460
26441
  renderLabel,
26461
26442
  isSaving = false
26462
26443
  }) {
26463
- const [draftItems, setDraftItems] = useState59(items);
26464
- const [isDirty, setIsDirty] = useState59(false);
26465
- useEffect47(() => {
26444
+ const [draftItems, setDraftItems] = useState58(items);
26445
+ const [isDirty, setIsDirty] = useState58(false);
26446
+ useEffect46(() => {
26466
26447
  if (!isDirty && !isSaving) {
26467
26448
  setDraftItems(items);
26468
26449
  }
26469
26450
  }, [items, isDirty, isSaving]);
26470
- useEffect47(() => {
26451
+ useEffect46(() => {
26471
26452
  if (onDirtyChange) {
26472
26453
  onDirtyChange(isDirty);
26473
26454
  }
@@ -27593,7 +27574,7 @@ function SsoAuthShell({ children, className }) {
27593
27574
 
27594
27575
  // src/components/features/provider-button.tsx
27595
27576
  init_button2();
27596
- import { useState as useState61 } from "react";
27577
+ import { useState as useState60 } from "react";
27597
27578
  import { jsx as jsx206 } from "react/jsx-runtime";
27598
27579
  var PROVIDER_CONFIG = {
27599
27580
  microsoft: {
@@ -27614,7 +27595,7 @@ var PROVIDER_CONFIG = {
27614
27595
  }
27615
27596
  };
27616
27597
  function ProviderButton({ provider, onClick, disabled = false, loading = false }) {
27617
- const [internalLoading, setInternalLoading] = useState61(false);
27598
+ const [internalLoading, setInternalLoading] = useState60(false);
27618
27599
  const config = PROVIDER_CONFIG[provider];
27619
27600
  const IconComponent = config.icon;
27620
27601
  const isLoading = loading || internalLoading;
@@ -27698,7 +27679,7 @@ function AuthProvidersList({
27698
27679
 
27699
27680
  // src/components/features/changelog-manager.tsx
27700
27681
  import { Trash2 as Trash22, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye as Eye3, EyeOff } from "lucide-react";
27701
- import { useState as useState62, useEffect as useEffect48 } from "react";
27682
+ import { useState as useState61, useEffect as useEffect47 } from "react";
27702
27683
  import { jsx as jsx208, jsxs as jsxs162 } from "react/jsx-runtime";
27703
27684
  function ChangelogManager({
27704
27685
  title,
@@ -27708,8 +27689,8 @@ function ChangelogManager({
27708
27689
  expandAll = false,
27709
27690
  showVisibilityToggle = false
27710
27691
  }) {
27711
- const [expandedIndices, setExpandedIndices] = useState62(/* @__PURE__ */ new Set());
27712
- useEffect48(() => {
27692
+ const [expandedIndices, setExpandedIndices] = useState61(/* @__PURE__ */ new Set());
27693
+ useEffect47(() => {
27713
27694
  if (expandAll && entries.length > 0) {
27714
27695
  setExpandedIndices(new Set(entries.map((_, i) => i)));
27715
27696
  }
@@ -28052,7 +28033,7 @@ var ErrorBoundary = class extends Component3 {
28052
28033
 
28053
28034
  // src/components/features/figma-prototype-viewer.tsx
28054
28035
  init_cn();
28055
- import { useState as useState63, useRef as useRef35, useEffect as useEffect49, useCallback as useCallback25, useMemo as useMemo29 } from "react";
28036
+ import { useState as useState62, useRef as useRef34, useEffect as useEffect48, useCallback as useCallback25, useMemo as useMemo29 } from "react";
28056
28037
 
28057
28038
  // src/components/features/section-selector.tsx
28058
28039
  init_cn();
@@ -28421,27 +28402,27 @@ var FigmaPrototypeViewer = ({
28421
28402
  }) => {
28422
28403
  const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID || "UTQPwZHR9OZp68TTGPFFi5";
28423
28404
  const showDebugPanel = process.env.NEXT_PUBLIC_FIGMA_DEBUG === "true";
28424
- const iframeRef = useRef35(null);
28425
- const containerRef = useRef35(null);
28426
- const navTimerRef = useRef35(null);
28427
- const touchTimerRef = useRef35(null);
28428
- const [screenWidth, setScreenWidth] = useState63(
28405
+ const iframeRef = useRef34(null);
28406
+ const containerRef = useRef34(null);
28407
+ const navTimerRef = useRef34(null);
28408
+ const touchTimerRef = useRef34(null);
28409
+ const [screenWidth, setScreenWidth] = useState62(
28429
28410
  typeof window !== "undefined" ? window.innerWidth : DESKTOP_BREAKPOINT
28430
28411
  );
28431
- const [isTouchDevice, setIsTouchDevice] = useState63(() => {
28412
+ const [isTouchDevice, setIsTouchDevice] = useState62(() => {
28432
28413
  if (typeof window === "undefined") return false;
28433
28414
  return "ontouchstart" in window;
28434
28415
  });
28435
- const [iframeState, setIframeState] = useState63("INITIAL");
28436
- const [iframeKey, setIframeKey] = useState63(0);
28437
- const [isInitialized, setIsInitialized] = useState63(false);
28438
- const [currentNodeId, setCurrentNodeId] = useState63(null);
28439
- const [internalActiveSection, setInternalActiveSection] = useState63(
28416
+ const [iframeState, setIframeState] = useState62("INITIAL");
28417
+ const [iframeKey, setIframeKey] = useState62(0);
28418
+ const [isInitialized, setIsInitialized] = useState62(false);
28419
+ const [currentNodeId, setCurrentNodeId] = useState62(null);
28420
+ const [internalActiveSection, setInternalActiveSection] = useState62(
28440
28421
  config.defaultSectionId || config.sections[0]?.id || ""
28441
28422
  );
28442
28423
  const activeSection = externalActiveSection || internalActiveSection;
28443
- const [isNavigating, setIsNavigating] = useState63(false);
28444
- const [containerDimensions, setContainerDimensions] = useState63({ width: 1200, height: 800 });
28424
+ const [isNavigating, setIsNavigating] = useState62(false);
28425
+ const [containerDimensions, setContainerDimensions] = useState62({ width: 1200, height: 800 });
28445
28426
  const viewMode = useMemo29(
28446
28427
  () => getViewMode(screenWidth, isTouchDevice),
28447
28428
  [screenWidth, isTouchDevice]
@@ -28490,7 +28471,7 @@ var FigmaPrototypeViewer = ({
28490
28471
  embedUrl,
28491
28472
  iframeKey
28492
28473
  ]);
28493
- useEffect49(() => {
28474
+ useEffect48(() => {
28494
28475
  const handleResize = () => {
28495
28476
  const newWidth = window.innerWidth;
28496
28477
  setScreenWidth(newWidth);
@@ -28503,8 +28484,8 @@ var FigmaPrototypeViewer = ({
28503
28484
  window.addEventListener("resize", handleResize);
28504
28485
  return () => window.removeEventListener("resize", handleResize);
28505
28486
  }, []);
28506
- const [lastViewMode, setLastViewMode] = useState63(viewMode);
28507
- useEffect49(() => {
28487
+ const [lastViewMode, setLastViewMode] = useState62(viewMode);
28488
+ useEffect48(() => {
28508
28489
  if (lastViewMode !== viewMode && iframeState === "READY") {
28509
28490
  console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
28510
28491
  setIframeState("RELOADING");
@@ -28512,7 +28493,7 @@ var FigmaPrototypeViewer = ({
28512
28493
  }
28513
28494
  setLastViewMode(viewMode);
28514
28495
  }, [viewMode, lastViewMode, iframeState]);
28515
- useEffect49(() => {
28496
+ useEffect48(() => {
28516
28497
  const handleVisibilityChange = () => {
28517
28498
  if (document.visibilityState === "visible" && iframeState === "READY") {
28518
28499
  console.log("[Sleep Recovery] Reloading iframe after sleep");
@@ -28523,7 +28504,7 @@ var FigmaPrototypeViewer = ({
28523
28504
  document.addEventListener("visibilitychange", handleVisibilityChange);
28524
28505
  return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
28525
28506
  }, [iframeState]);
28526
- useEffect49(() => {
28507
+ useEffect48(() => {
28527
28508
  const handleMessage = (event) => {
28528
28509
  if (event.origin !== "https://www.figma.com") return;
28529
28510
  const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
@@ -28607,12 +28588,12 @@ var FigmaPrototypeViewer = ({
28607
28588
  }
28608
28589
  }, 500);
28609
28590
  }, []);
28610
- useEffect49(() => {
28591
+ useEffect48(() => {
28611
28592
  if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
28612
28593
  navigateToSection(externalActiveSection);
28613
28594
  }
28614
28595
  }, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
28615
- useEffect49(() => {
28596
+ useEffect48(() => {
28616
28597
  return () => {
28617
28598
  if (navTimerRef.current) clearTimeout(navTimerRef.current);
28618
28599
  if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
@@ -28715,7 +28696,7 @@ var FigmaPrototypeViewer = ({
28715
28696
 
28716
28697
  // src/components/features/filters-dropdown.tsx
28717
28698
  init_cn();
28718
- import { useEffect as useEffect50, useRef as useRef36, useState as useState64 } from "react";
28699
+ import { useEffect as useEffect49, useRef as useRef35, useState as useState63 } from "react";
28719
28700
  import { jsx as jsx215, jsxs as jsxs168 } from "react/jsx-runtime";
28720
28701
  var FilterCheckbox = ({ checked, disabled = false, className }) => {
28721
28702
  return /* @__PURE__ */ jsx215(
@@ -28747,15 +28728,15 @@ var FiltersDropdown = ({
28747
28728
  placement = "bottom-start",
28748
28729
  responsive = true
28749
28730
  }) => {
28750
- const [isOpen, setIsOpen] = useState64(false);
28751
- const [shouldRender, setShouldRender] = useState64(false);
28752
- const [isVisible, setIsVisible] = useState64(false);
28753
- const [isMobile, setIsMobile] = useState64(false);
28754
- const [actualPlacement, setActualPlacement] = useState64(placement);
28755
- const dropdownRef = useRef36(null);
28756
- const triggerRef = useRef36(null);
28757
- const containerRef = useRef36(null);
28758
- useEffect50(() => {
28731
+ const [isOpen, setIsOpen] = useState63(false);
28732
+ const [shouldRender, setShouldRender] = useState63(false);
28733
+ const [isVisible, setIsVisible] = useState63(false);
28734
+ const [isMobile, setIsMobile] = useState63(false);
28735
+ const [actualPlacement, setActualPlacement] = useState63(placement);
28736
+ const dropdownRef = useRef35(null);
28737
+ const triggerRef = useRef35(null);
28738
+ const containerRef = useRef35(null);
28739
+ useEffect49(() => {
28759
28740
  if (isOpen) {
28760
28741
  setShouldRender(true);
28761
28742
  let id2 = 0;
@@ -28771,7 +28752,7 @@ var FiltersDropdown = ({
28771
28752
  const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
28772
28753
  return () => clearTimeout(t);
28773
28754
  }, [isOpen]);
28774
- useEffect50(() => {
28755
+ useEffect49(() => {
28775
28756
  if (!responsive) {
28776
28757
  setIsMobile(false);
28777
28758
  return;
@@ -28783,7 +28764,7 @@ var FiltersDropdown = ({
28783
28764
  window.addEventListener("resize", checkMobile);
28784
28765
  return () => window.removeEventListener("resize", checkMobile);
28785
28766
  }, [responsive]);
28786
- useEffect50(() => {
28767
+ useEffect49(() => {
28787
28768
  if (!isOpen || isMobile || !triggerRef.current) return;
28788
28769
  const calculateOptimalPlacement = () => {
28789
28770
  const trigger = triggerRef.current;
@@ -28809,7 +28790,7 @@ var FiltersDropdown = ({
28809
28790
  window.addEventListener("resize", calculateOptimalPlacement);
28810
28791
  return () => window.removeEventListener("resize", calculateOptimalPlacement);
28811
28792
  }, [isOpen, isMobile, placement]);
28812
- const [selectedFilters, setSelectedFilters] = useState64(() => {
28793
+ const [selectedFilters, setSelectedFilters] = useState63(() => {
28813
28794
  if (currentFilters) {
28814
28795
  return { ...currentFilters };
28815
28796
  }
@@ -28820,12 +28801,12 @@ var FiltersDropdown = ({
28820
28801
  return initial;
28821
28802
  });
28822
28803
  const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
28823
- useEffect50(() => {
28804
+ useEffect49(() => {
28824
28805
  if (currentFilters) {
28825
28806
  setSelectedFilters({ ...currentFilters });
28826
28807
  }
28827
28808
  }, [currentFiltersStr]);
28828
- useEffect50(() => {
28809
+ useEffect49(() => {
28829
28810
  const handleClickOutside = (event) => {
28830
28811
  if (containerRef.current && !containerRef.current.contains(event.target)) {
28831
28812
  setIsOpen(false);
@@ -28842,7 +28823,7 @@ var FiltersDropdown = ({
28842
28823
  };
28843
28824
  }
28844
28825
  }, [isOpen, placement]);
28845
- useEffect50(() => {
28826
+ useEffect49(() => {
28846
28827
  const handleEscape = (e) => {
28847
28828
  if (e.key === "Escape" && isOpen) {
28848
28829
  setIsOpen(false);
@@ -29029,7 +29010,7 @@ var FiltersDropdown = ({
29029
29010
  ] });
29030
29011
  };
29031
29012
  var useFiltersDropdown = (initialSections) => {
29032
- const [appliedFilters, setAppliedFilters] = useState64(() => {
29013
+ const [appliedFilters, setAppliedFilters] = useState63(() => {
29033
29014
  const initial = {};
29034
29015
  initialSections.forEach((section) => {
29035
29016
  if (section.defaultSelected) {
@@ -29108,13 +29089,13 @@ function KnowledgeBaseLinksManager({
29108
29089
  }
29109
29090
 
29110
29091
  // src/components/features/loading-provider.tsx
29111
- import { createContext as createContext6, useContext as useContext6, useState as useState65, useEffect as useEffect51 } from "react";
29092
+ import { createContext as createContext6, useContext as useContext6, useState as useState64, useEffect as useEffect50 } from "react";
29112
29093
  import { jsx as jsx218, jsxs as jsxs169 } from "react/jsx-runtime";
29113
29094
  var LoadingContext = createContext6(void 0);
29114
29095
  function LoadingProvider({ children }) {
29115
- const [isLoading, setIsLoading] = useState65(false);
29116
- const [progress, setProgress] = useState65(0);
29117
- useEffect51(() => {
29096
+ const [isLoading, setIsLoading] = useState64(false);
29097
+ const [progress, setProgress] = useState64(0);
29098
+ useEffect50(() => {
29118
29099
  let interval;
29119
29100
  if (isLoading) {
29120
29101
  setProgress(10);
@@ -29159,7 +29140,7 @@ function useLoading() {
29159
29140
  }
29160
29141
 
29161
29142
  // src/components/features/media-gallery-manager.tsx
29162
- import { useState as useState66, useRef as useRef37, useCallback as useCallback26 } from "react";
29143
+ import { useState as useState65, useRef as useRef36, useCallback as useCallback26 } from "react";
29163
29144
  import {
29164
29145
  Upload,
29165
29146
  Image as ImageIcon2,
@@ -29179,9 +29160,9 @@ function MediaGalleryManager({
29179
29160
  modalTitle = "Media Gallery",
29180
29161
  className = ""
29181
29162
  }) {
29182
- const fileInputRef = useRef37(null);
29183
- const [deletingIndex, setDeletingIndex] = useState66(null);
29184
- const [draggedIndex, setDraggedIndex] = useState66(null);
29163
+ const fileInputRef = useRef36(null);
29164
+ const [deletingIndex, setDeletingIndex] = useState65(null);
29165
+ const [draggedIndex, setDraggedIndex] = useState65(null);
29185
29166
  const handleFileSelect = useCallback26(async (event) => {
29186
29167
  const file = event.target.files?.[0];
29187
29168
  if (!file) return;
@@ -29387,7 +29368,7 @@ function OSTypeBadgeGroup({
29387
29368
  }
29388
29369
 
29389
29370
  // src/components/features/parallax-image-showcase.tsx
29390
- import { useEffect as useEffect52, useState as useState67, useRef as useRef38 } from "react";
29371
+ import { useEffect as useEffect51, useState as useState66, useRef as useRef37 } from "react";
29391
29372
  import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
29392
29373
  import { jsx as jsx222, jsxs as jsxs172 } from "react/jsx-runtime";
29393
29374
  var ParallaxImageShowcase = ({
@@ -29405,9 +29386,9 @@ var ParallaxImageShowcase = ({
29405
29386
  const springConfig = { stiffness: 100, damping: 30 };
29406
29387
  const mouseXSpring = useSpring(mouseX, springConfig);
29407
29388
  const mouseYSpring = useSpring(mouseY, springConfig);
29408
- const [componentRect, setComponentRect] = useState67(null);
29409
- const componentRef = useRef38(null);
29410
- useEffect52(() => {
29389
+ const [componentRect, setComponentRect] = useState66(null);
29390
+ const componentRef = useRef37(null);
29391
+ useEffect51(() => {
29411
29392
  const updateRect = () => {
29412
29393
  if (componentRef.current) {
29413
29394
  setComponentRect(componentRef.current.getBoundingClientRect());
@@ -29421,7 +29402,7 @@ var ParallaxImageShowcase = ({
29421
29402
  window.removeEventListener("scroll", updateRect);
29422
29403
  };
29423
29404
  }, []);
29424
- useEffect52(() => {
29405
+ useEffect51(() => {
29425
29406
  const handleGlobalMouseMove = (e) => {
29426
29407
  if (!componentRect) return;
29427
29408
  const centerX = componentRect.left + componentRect.width / 2;
@@ -29946,7 +29927,7 @@ function PushButtonSelector({
29946
29927
  }
29947
29928
 
29948
29929
  // src/components/features/release-media-manager.tsx
29949
- import { useState as useState68, useRef as useRef39 } from "react";
29930
+ import { useState as useState67, useRef as useRef38 } from "react";
29950
29931
  import { Trash2 as Trash24, Plus as Plus5, Image as ImageIcon3, Video as VideoIcon2, Upload as Upload2, Loader2 as Loader24, GripVertical as GripVertical2 } from "lucide-react";
29951
29932
  import { jsx as jsx226, jsxs as jsxs176 } from "react/jsx-runtime";
29952
29933
  function ReleaseMediaManager({
@@ -29955,8 +29936,8 @@ function ReleaseMediaManager({
29955
29936
  onUpload,
29956
29937
  className = ""
29957
29938
  }) {
29958
- const fileInputRef = useRef39(null);
29959
- const [uploadingIndex, setUploadingIndex] = useState68(null);
29939
+ const fileInputRef = useRef38(null);
29940
+ const [uploadingIndex, setUploadingIndex] = useState67(null);
29960
29941
  const handleFileSelect = async (event) => {
29961
29942
  const file = event.target.files?.[0];
29962
29943
  if (!file) return;
@@ -30214,7 +30195,7 @@ var SelectButton = React96.forwardRef(
30214
30195
  SelectButton.displayName = "SelectButton";
30215
30196
 
30216
30197
  // src/components/features/seo-editor-preview.tsx
30217
- import { useState as useState69 } from "react";
30198
+ import { useState as useState68 } from "react";
30218
30199
  import { Globe as Globe3, ExternalLink as ExternalLink6, Upload as Upload3, X as X6, Loader2 as Loader25 } from "lucide-react";
30219
30200
  import { Fragment as Fragment43, jsx as jsx228, jsxs as jsxs178 } from "react/jsx-runtime";
30220
30201
  function SEOEditorPreview({
@@ -30237,9 +30218,9 @@ function SEOEditorPreview({
30237
30218
  disabled = false,
30238
30219
  className = ""
30239
30220
  }) {
30240
- const [imageError, setImageError] = useState69(false);
30241
- const [isUploading, setIsUploading] = useState69(false);
30242
- const [fileInputRef, setFileInputRef] = useState69(null);
30221
+ const [imageError, setImageError] = useState68(false);
30222
+ const [isUploading, setIsUploading] = useState68(false);
30223
+ const [fileInputRef, setFileInputRef] = useState68(null);
30243
30224
  const seoTitleLength = (seoTitle || "").length;
30244
30225
  const seoTitleTooLong = seoTitleLength > SEO_TITLE_MAX_LENGTH;
30245
30226
  const seoDescriptionLength = (seoDescription || "").length;
@@ -30735,7 +30716,7 @@ function StatusFilterComponent({
30735
30716
  }
30736
30717
 
30737
30718
  // src/components/features/tags-selector.tsx
30738
- import { useState as useState70 } from "react";
30719
+ import { useState as useState69 } from "react";
30739
30720
  import { Search as Search2, X as X7, Plus as Plus6, Loader2 as Loader26 } from "lucide-react";
30740
30721
  import { jsx as jsx232, jsxs as jsxs181 } from "react/jsx-runtime";
30741
30722
  function TagsSelector({
@@ -30749,9 +30730,9 @@ function TagsSelector({
30749
30730
  disabled = false,
30750
30731
  allowCreate = true
30751
30732
  }) {
30752
- const [searchQuery, setSearchQuery] = useState70("");
30753
- const [showDropdown, setShowDropdown] = useState70(false);
30754
- const [isCreating, setIsCreating] = useState70(false);
30733
+ const [searchQuery, setSearchQuery] = useState69("");
30734
+ const [showDropdown, setShowDropdown] = useState69(false);
30735
+ const [isCreating, setIsCreating] = useState69(false);
30755
30736
  const handleTagAdd = (tagId) => {
30756
30737
  if (!selectedTagIds.includes(tagId) && selectedTagIds.length < maxTags) {
30757
30738
  onTagsChange([...selectedTagIds, tagId]);
@@ -30965,7 +30946,7 @@ function getCaptionsUrl(entityType, entityId, srtContent) {
30965
30946
  }
30966
30947
 
30967
30948
  // src/components/features/video-source-selector.tsx
30968
- import { useState as useState71, useCallback as useCallback27 } from "react";
30949
+ import { useState as useState70, useCallback as useCallback27 } from "react";
30969
30950
  import { Upload as Upload4, X as X8, Video as VideoIcon3 } from "lucide-react";
30970
30951
  init_button2();
30971
30952
  import { jsx as jsx235, jsxs as jsxs183 } from "react/jsx-runtime";
@@ -30991,10 +30972,10 @@ function VideoSourceSelector({
30991
30972
  showTitle = true,
30992
30973
  className = ""
30993
30974
  }) {
30994
- const [isUploading, setIsUploading] = useState71(false);
30995
- const [uploadProgress, setUploadProgress] = useState71(0);
30996
- const [uploadMessage, setUploadMessage] = useState71("");
30997
- const [uploadError, setUploadError] = useState71(null);
30975
+ const [isUploading, setIsUploading] = useState70(false);
30976
+ const [uploadProgress, setUploadProgress] = useState70(0);
30977
+ const [uploadMessage, setUploadMessage] = useState70("");
30978
+ const [uploadError, setUploadError] = useState70(null);
30998
30979
  const handleUploadClick = useCallback27(() => {
30999
30980
  const input = document.createElement("input");
31000
30981
  input.type = "file";
@@ -31334,7 +31315,7 @@ function TranscriptSummaryEditor({
31334
31315
  }
31335
31316
 
31336
31317
  // src/components/features/highlight-video-section.tsx
31337
- import { useState as useState72 } from "react";
31318
+ import { useState as useState71 } from "react";
31338
31319
  import { Sparkles as Sparkles4, Upload as Upload5 } from "lucide-react";
31339
31320
  init_button2();
31340
31321
 
@@ -31633,7 +31614,7 @@ function HighlightVideoSection({
31633
31614
  disabled = false,
31634
31615
  className = ""
31635
31616
  }) {
31636
- const [uploadError, setUploadError] = useState72(null);
31617
+ const [uploadError, setUploadError] = useState71(null);
31637
31618
  const handleUploadClick = () => {
31638
31619
  const input = document.createElement("input");
31639
31620
  input.type = "file";
@@ -32464,7 +32445,7 @@ function ViewToggle({
32464
32445
 
32465
32446
  // src/components/features/policy-configuration-panel.tsx
32466
32447
  init_cn();
32467
- import { useEffect as useEffect53, useState as useState73 } from "react";
32448
+ import { useEffect as useEffect52, useState as useState72 } from "react";
32468
32449
  import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
32469
32450
  init_button2();
32470
32451
  import { Fragment as Fragment44, jsx as jsx253, jsxs as jsxs197 } from "react/jsx-runtime";
@@ -32640,9 +32621,9 @@ var PolicyConfigurationPanel = ({
32640
32621
  onCategoryPermissionChange,
32641
32622
  className
32642
32623
  }) => {
32643
- const [expandedIds, setExpandedIds] = useState73(/* @__PURE__ */ new Set());
32644
- const [bulkLevels, setBulkLevels] = useState73({});
32645
- useEffect53(() => {
32624
+ const [expandedIds, setExpandedIds] = useState72(/* @__PURE__ */ new Set());
32625
+ const [bulkLevels, setBulkLevels] = useState72({});
32626
+ useEffect52(() => {
32646
32627
  setBulkLevels({});
32647
32628
  }, [editMode]);
32648
32629
  const handleToggle = (categoryId) => {
@@ -32682,7 +32663,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
32682
32663
  init_button2();
32683
32664
 
32684
32665
  // src/components/ui/phone-input.tsx
32685
- import { useCallback as useCallback28, useEffect as useEffect54, useMemo as useMemo30, useRef as useRef40, useState as useState74 } from "react";
32666
+ import { useCallback as useCallback28, useEffect as useEffect53, useMemo as useMemo30, useRef as useRef39, useState as useState73 } from "react";
32686
32667
  import { jsx as jsx254, jsxs as jsxs198 } from "react/jsx-runtime";
32687
32668
  function PhoneInput({
32688
32669
  value,
@@ -32699,8 +32680,8 @@ function PhoneInput({
32699
32680
  () => [...priority, ...others].find((c) => c.code === countryCode),
32700
32681
  [countryCode, priority, others]
32701
32682
  );
32702
- const [isInvalid, setIsInvalid] = useState74(false);
32703
- const debounceRef = useRef40(null);
32683
+ const [isInvalid, setIsInvalid] = useState73(false);
32684
+ const debounceRef = useRef39(null);
32704
32685
  const digitCount = useCallback28((val) => val.replace(/[^0-9]/g, "").length, []);
32705
32686
  const runValidation = useCallback28((phone) => {
32706
32687
  if (!phone || digitCount(phone) === 0) {
@@ -32716,7 +32697,7 @@ function PhoneInput({
32716
32697
  if (debounceRef.current) clearTimeout(debounceRef.current);
32717
32698
  debounceRef.current = setTimeout(() => runValidation(phone), 300);
32718
32699
  }, [runValidation]);
32719
- useEffect54(() => {
32700
+ useEffect53(() => {
32720
32701
  return () => {
32721
32702
  if (debounceRef.current) clearTimeout(debounceRef.current);
32722
32703
  };
@@ -32783,7 +32764,7 @@ function CountryOption({ country }) {
32783
32764
  // src/components/features/waitlist-form.tsx
32784
32765
  init_cn();
32785
32766
  import { getCountries as getCountries2 } from "libphonenumber-js";
32786
- import { useEffect as useEffect55, useState as useState75 } from "react";
32767
+ import { useEffect as useEffect54, useState as useState74 } from "react";
32787
32768
  import { Fragment as Fragment45, jsx as jsx255, jsxs as jsxs199 } from "react/jsx-runtime";
32788
32769
  function WaitlistForm({
32789
32770
  id = "waitlist-form",
@@ -32803,22 +32784,22 @@ function WaitlistForm({
32803
32784
  privacyPolicyUrl,
32804
32785
  consentText = "I agree to receive recurring automated text messages at the phone number provided. Msg & data rates may apply. Msg frequency varies. Reply HELP for help and STOP to cancel."
32805
32786
  }) {
32806
- const [email, setEmail] = useState75(defaultEmail);
32807
- const [phone, setPhone] = useState75(defaultPhone);
32808
- const [countryCode, setCountryCode] = useState75("US");
32787
+ const [email, setEmail] = useState74(defaultEmail);
32788
+ const [phone, setPhone] = useState74(defaultPhone);
32789
+ const [countryCode, setCountryCode] = useState74("US");
32809
32790
  const { toast } = useToast();
32810
32791
  const { honeypotInputProps, getSignals, resetSignals } = useHumanitySignals();
32811
- const [smsConsent, setSmsConsent] = useState75(false);
32812
- const [isClient, setIsClient] = useState75(false);
32813
- const [isPhoneInvalid, setIsPhoneInvalid] = useState75(false);
32814
- const [showConsentError, setShowConsentError] = useState75(false);
32792
+ const [smsConsent, setSmsConsent] = useState74(false);
32793
+ const [isClient, setIsClient] = useState74(false);
32794
+ const [isPhoneInvalid, setIsPhoneInvalid] = useState74(false);
32795
+ const [showConsentError, setShowConsentError] = useState74(false);
32815
32796
  const isMailDomainGeneric = hasGenericEmailDomain(email);
32816
- useEffect55(() => {
32797
+ useEffect54(() => {
32817
32798
  if (defaultEmail) {
32818
32799
  setEmail(defaultEmail);
32819
32800
  }
32820
32801
  }, [defaultEmail]);
32821
- useEffect55(() => {
32802
+ useEffect54(() => {
32822
32803
  setIsClient(true);
32823
32804
  if (!geoApiUrl) return;
32824
32805
  const supportedCountries = new Set(getCountries2());
@@ -33206,7 +33187,7 @@ function useOptionalNotifications() {
33206
33187
  }
33207
33188
 
33208
33189
  // src/components/features/notifications/notification-drawer.tsx
33209
- import { useEffect as useEffect59, useRef as useRef43 } from "react";
33190
+ import { useEffect as useEffect58, useRef as useRef42 } from "react";
33210
33191
 
33211
33192
  // src/components/navigation/app-layout-context.ts
33212
33193
  import { createContext as createContext8, useContext as useContext8 } from "react";
@@ -33701,7 +33682,7 @@ init_button2();
33701
33682
  init_cn();
33702
33683
 
33703
33684
  // src/components/features/notifications/notification-tile.tsx
33704
- import { useMemo as useMemo32, useEffect as useEffect58, useState as useState78 } from "react";
33685
+ import { useMemo as useMemo32, useEffect as useEffect57, useState as useState77 } from "react";
33705
33686
  init_cn();
33706
33687
  import { jsx as jsx258, jsxs as jsxs201 } from "react/jsx-runtime";
33707
33688
  var variantBySeverity = {
@@ -33742,14 +33723,14 @@ function NotificationTile({
33742
33723
  settled
33743
33724
  } = notification;
33744
33725
  const accentVariant = (severity ? variantBySeverity[severity] : void 0) ?? variant;
33745
- const [failedImageUrl, setFailedImageUrl] = useState78(null);
33726
+ const [failedImageUrl, setFailedImageUrl] = useState77(null);
33746
33727
  const image = imageUrl && imageUrl !== failedImageUrl ? imageUrl : void 0;
33747
33728
  const createdAtDate = new Date(createdAt);
33748
33729
  const createdAtIso = Number.isNaN(createdAtDate.getTime()) ? null : createdAtDate.toISOString();
33749
33730
  const initialElapsed = useMemo32(() => Date.now() - createdAt, [createdAt]);
33750
33731
  const isLive = !read && !settled && initialElapsed < liveDurationMs;
33751
33732
  const counting = isLive && !paused;
33752
- useEffect58(() => {
33733
+ useEffect57(() => {
33753
33734
  if (!counting) return;
33754
33735
  const remaining = Math.max(0, liveDurationMs - initialElapsed);
33755
33736
  const timer = window.setTimeout(() => {
@@ -33974,11 +33955,11 @@ function DrawerScrollList({
33974
33955
  loadMoreRootMargin,
33975
33956
  renderTile
33976
33957
  }) {
33977
- const scrollRef = useRef43(null);
33978
- const sentinelRef = useRef43(null);
33979
- const loadMoreRef = useRef43(loadMore);
33958
+ const scrollRef = useRef42(null);
33959
+ const sentinelRef = useRef42(null);
33960
+ const loadMoreRef = useRef42(loadMore);
33980
33961
  loadMoreRef.current = loadMore;
33981
- useEffect59(() => {
33962
+ useEffect58(() => {
33982
33963
  if (!loadMore || !hasMore || isLoadingMore) return;
33983
33964
  const sentinel = sentinelRef.current;
33984
33965
  const root = scrollRef.current;
@@ -34198,7 +34179,7 @@ function NotificationPopups({
34198
34179
 
34199
34180
  // src/components/features/notifications/approval-request-notification-tile.tsx
34200
34181
  init_button2();
34201
- import { useMemo as useMemo33, useState as useState79 } from "react";
34182
+ import { useMemo as useMemo33, useState as useState78 } from "react";
34202
34183
 
34203
34184
  // src/components/chat/types/chat.types.ts
34204
34185
  var CHAT_TYPE = {
@@ -34414,10 +34395,10 @@ function ApprovalRequestNotificationTile({
34414
34395
  defaultExpanded = false,
34415
34396
  className
34416
34397
  }) {
34417
- const [expanded, setExpanded] = useState79(defaultExpanded);
34418
- const [pinned, setPinned] = useState79(defaultExpanded);
34419
- const [processing, setProcessing] = useState79(false);
34420
- const [localStatus, setLocalStatus] = useState79(null);
34398
+ const [expanded, setExpanded] = useState78(defaultExpanded);
34399
+ const [pinned, setPinned] = useState78(defaultExpanded);
34400
+ const [processing, setProcessing] = useState78(false);
34401
+ const [localStatus, setLocalStatus] = useState78(null);
34421
34402
  const approval = getApprovalMeta(notification);
34422
34403
  const resolvedStatus = resolutionToStatus(approval?.resolution);
34423
34404
  const status = resolvedStatus !== "pending" ? resolvedStatus : localStatus ?? "pending";
@@ -34518,12 +34499,12 @@ function useOptionalTimeTracker() {
34518
34499
 
34519
34500
  // src/components/features/time-tracker/time-tracker-panel.tsx
34520
34501
  init_cn();
34521
- import { useEffect as useEffect61, useState as useState82 } from "react";
34502
+ import { useEffect as useEffect60, useState as useState81 } from "react";
34522
34503
  init_button();
34523
34504
  init_split_button();
34524
34505
 
34525
34506
  // src/components/features/time-tracker/use-tracker-clock.ts
34526
- import { useEffect as useEffect60, useState as useState81 } from "react";
34507
+ import { useEffect as useEffect59, useState as useState80 } from "react";
34527
34508
  function formatElapsed(totalMs) {
34528
34509
  const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
34529
34510
  const hours = Math.floor(totalSeconds / 3600);
@@ -34533,8 +34514,8 @@ function formatElapsed(totalMs) {
34533
34514
  return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
34534
34515
  }
34535
34516
  function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
34536
- const [now, setNow] = useState81(() => Date.now());
34537
- useEffect60(() => {
34517
+ const [now, setNow] = useState80(() => Date.now());
34518
+ useEffect59(() => {
34538
34519
  if (status !== "tracking") return;
34539
34520
  setNow(Date.now());
34540
34521
  const id = setInterval(() => setNow(Date.now()), 1e3);
@@ -34589,12 +34570,12 @@ function TimeTrackerPanel({
34589
34570
  className
34590
34571
  }) {
34591
34572
  const elapsedLabel = useTrackerClock({ status, runningSince, accumulatedMs });
34592
- const [showValidationError, setShowValidationError] = useState82(false);
34573
+ const [showValidationError, setShowValidationError] = useState81(false);
34593
34574
  const isRunning = status === "tracking";
34594
34575
  const isActive = status !== "ready";
34595
34576
  const hasContent = selectedTicketId != null || notes.trim() !== "";
34596
34577
  const showFieldError = isActive && showValidationError && !hasContent;
34597
- useEffect61(() => {
34578
+ useEffect60(() => {
34598
34579
  if (status === "ready") setShowValidationError(false);
34599
34580
  }, [status]);
34600
34581
  const handleSubmit = () => {
@@ -34845,7 +34826,7 @@ function LastEntryRow({ entry, onClick }) {
34845
34826
  // src/components/features/time-tracker/time-tracker-header-button.tsx
34846
34827
  init_cn();
34847
34828
  import * as PopoverPrimitive5 from "@radix-ui/react-popover";
34848
- import { useEffect as useEffect62, useRef as useRef44 } from "react";
34829
+ import { useEffect as useEffect61, useRef as useRef43 } from "react";
34849
34830
 
34850
34831
  // src/components/navigation/header-button.tsx
34851
34832
  init_cn();
@@ -34884,11 +34865,11 @@ function TimeTrackerHeaderButton({ className, disabled }) {
34884
34865
  const layoutContainer = useAppLayoutDrawerContainer();
34885
34866
  const coordination = useAppLayoutDrawerCoordination();
34886
34867
  const isOpen = ctx?.isOpen ?? false;
34887
- const isOpenRef = useRef44(isOpen);
34868
+ const isOpenRef = useRef43(isOpen);
34888
34869
  isOpenRef.current = isOpen;
34889
- const closeRef = useRef44(ctx?.close);
34870
+ const closeRef = useRef43(ctx?.close);
34890
34871
  closeRef.current = ctx?.close;
34891
- const selfHandleRef = useRef44(null);
34872
+ const selfHandleRef = useRef43(null);
34892
34873
  if (!selfHandleRef.current) {
34893
34874
  selfHandleRef.current = {
34894
34875
  close: () => {
@@ -34896,10 +34877,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
34896
34877
  }
34897
34878
  };
34898
34879
  }
34899
- useEffect62(() => {
34880
+ useEffect61(() => {
34900
34881
  if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
34901
34882
  }, [isOpen, coordination]);
34902
- useEffect62(() => {
34883
+ useEffect61(() => {
34903
34884
  if (!selfHandleRef.current) return;
34904
34885
  return coordination?.registerDrawer(selfHandleRef.current);
34905
34886
  }, [coordination]);
@@ -35516,13 +35497,13 @@ function EmptyState2() {
35516
35497
  }
35517
35498
 
35518
35499
  // src/components/features/board/use-board-collapse.ts
35519
- import { useCallback as useCallback33, useState as useState84 } from "react";
35500
+ import { useCallback as useCallback33, useState as useState83 } from "react";
35520
35501
  function useBoardCollapse(storageKey) {
35521
35502
  const [persisted, setPersisted] = useLocalStorage(
35522
35503
  storageKey ?? "__board_collapse_unused__",
35523
35504
  {}
35524
35505
  );
35525
- const [memory, setMemory] = useState84({});
35506
+ const [memory, setMemory] = useState83({});
35526
35507
  const collapsed = storageKey ? persisted : memory;
35527
35508
  const setMap = storageKey ? setPersisted : setMemory;
35528
35509
  const toggle = useCallback33(
@@ -35913,18 +35894,18 @@ function SortableRow({
35913
35894
 
35914
35895
  // src/components/navigation/header.tsx
35915
35896
  init_next_link();
35916
- import React110, { useEffect as useEffect65, useRef as useRef48, useState as useState86 } from "react";
35897
+ import React110, { useEffect as useEffect64, useRef as useRef47, useState as useState85 } from "react";
35917
35898
  init_button2();
35918
35899
 
35919
35900
  // src/components/navigation/mobile-nav-panel.tsx
35920
- import { useRef as useRef47 } from "react";
35901
+ import { useRef as useRef46 } from "react";
35921
35902
  import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
35922
35903
  init_button2();
35923
35904
  import { X as X10 } from "lucide-react";
35924
35905
  import { Fragment as Fragment52, jsx as jsx273, jsxs as jsxs212 } from "react/jsx-runtime";
35925
35906
  var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
35926
35907
  function MobileNavPanel({ isOpen, config }) {
35927
- const panelRef = useRef47(null);
35908
+ const panelRef = useRef46(null);
35928
35909
  usePreventScroll3({ isDisabled: !isOpen });
35929
35910
  useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
35930
35911
  const headerHeight = useHeaderHeight(64, { enabled: isOpen });
@@ -36082,12 +36063,12 @@ function MingoAiButton({ source, icon, label = "Mingo AI", className, onClick, .
36082
36063
  // src/components/navigation/header.tsx
36083
36064
  import { Fragment as Fragment53, jsx as jsx275, jsxs as jsxs214 } from "react/jsx-runtime";
36084
36065
  function Header2({ config, platform }) {
36085
- const [show, setShow] = useState86(true);
36086
- const [lastScrollY, setLastScrollY] = useState86(0);
36087
- const [openDropdowns, setOpenDropdowns] = useState86({});
36088
- const dropdownRefs = useRef48({});
36089
- const triggerRefs = useRef48({});
36090
- useEffect65(() => {
36066
+ const [show, setShow] = useState85(true);
36067
+ const [lastScrollY, setLastScrollY] = useState85(0);
36068
+ const [openDropdowns, setOpenDropdowns] = useState85({});
36069
+ const dropdownRefs = useRef47({});
36070
+ const triggerRefs = useRef47({});
36071
+ useEffect64(() => {
36091
36072
  const handleClickOutside = (event) => {
36092
36073
  const target = event.target;
36093
36074
  if (!target) return;
@@ -36116,14 +36097,14 @@ function Header2({ config, platform }) {
36116
36097
  document.removeEventListener("keydown", handleEscapeKey);
36117
36098
  };
36118
36099
  }, [openDropdowns]);
36119
- useEffect65(() => {
36100
+ useEffect64(() => {
36120
36101
  return () => {
36121
36102
  setOpenDropdowns({});
36122
36103
  dropdownRefs.current = {};
36123
36104
  triggerRefs.current = {};
36124
36105
  };
36125
36106
  }, []);
36126
- useEffect65(() => {
36107
+ useEffect64(() => {
36127
36108
  if (!config.autoHide) {
36128
36109
  setShow(true);
36129
36110
  return;
@@ -36364,7 +36345,7 @@ function Header2({ config, platform }) {
36364
36345
  }
36365
36346
 
36366
36347
  // src/components/navigation/client-only-header.tsx
36367
- import { useState as useState87, useEffect as useEffect66 } from "react";
36348
+ import { useState as useState86, useEffect as useEffect65 } from "react";
36368
36349
 
36369
36350
  // src/components/navigation/header-skeleton.tsx
36370
36351
  import { jsx as jsx276, jsxs as jsxs215 } from "react/jsx-runtime";
@@ -36412,8 +36393,8 @@ function HeaderSkeleton({ config }) {
36412
36393
  // src/components/navigation/client-only-header.tsx
36413
36394
  import { jsx as jsx277 } from "react/jsx-runtime";
36414
36395
  function ClientOnlyHeader({ config, skeleton }) {
36415
- const [isClient, setIsClient] = useState87(false);
36416
- useEffect66(() => {
36396
+ const [isClient, setIsClient] = useState86(false);
36397
+ useEffect65(() => {
36417
36398
  setIsClient(true);
36418
36399
  }, []);
36419
36400
  if (!isClient) {
@@ -36423,20 +36404,20 @@ function ClientOnlyHeader({ config, skeleton }) {
36423
36404
  }
36424
36405
 
36425
36406
  // src/components/navigation/sliding-sidebar.tsx
36426
- import { useState as useState88, useEffect as useEffect67, useRef as useRef49 } from "react";
36407
+ import { useState as useState87, useEffect as useEffect66, useRef as useRef48 } from "react";
36427
36408
  import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
36428
36409
  import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
36429
36410
  init_button2();
36430
36411
  import { Fragment as Fragment54, jsx as jsx278, jsxs as jsxs216 } from "react/jsx-runtime";
36431
36412
  function SlidingSidebar({ config }) {
36432
- const [expandedItems, setExpandedItems] = useState88(/* @__PURE__ */ new Set());
36433
- const [mounted, setMounted] = useState88(false);
36413
+ const [expandedItems, setExpandedItems] = useState87(/* @__PURE__ */ new Set());
36414
+ const [mounted, setMounted] = useState87(false);
36434
36415
  const headerHeight = useHeaderHeight();
36435
- const asideRef = useRef49(null);
36416
+ const asideRef = useRef48(null);
36436
36417
  const prefersReducedMotion2 = useReducedMotion();
36437
36418
  usePreventScroll4({ isDisabled: !config.isOpen });
36438
36419
  useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
36439
- useEffect67(() => {
36420
+ useEffect66(() => {
36440
36421
  setMounted(true);
36441
36422
  }, []);
36442
36423
  const toggleExpanded = (itemId) => {
@@ -36604,7 +36585,7 @@ function SlidingSidebar({ config }) {
36604
36585
  }
36605
36586
 
36606
36587
  // src/components/navigation/sticky-section-nav.tsx
36607
- import { useEffect as useEffect68, useState as useState89, useCallback as useCallback35, useRef as useRef50 } from "react";
36588
+ import { useEffect as useEffect67, useState as useState88, useCallback as useCallback35, useRef as useRef49 } from "react";
36608
36589
  import { jsx as jsx279, jsxs as jsxs217 } from "react/jsx-runtime";
36609
36590
  function StickySectionNav({
36610
36591
  sections,
@@ -36665,8 +36646,8 @@ function StickySectionNav({
36665
36646
  ] });
36666
36647
  }
36667
36648
  function useSectionNavigation(sections, options) {
36668
- const [activeSection, setActiveSection] = useState89(sections[0]?.id || "");
36669
- const isScrollingFromClick = useRef50(false);
36649
+ const [activeSection, setActiveSection] = useState88(sections[0]?.id || "");
36650
+ const isScrollingFromClick = useRef49(false);
36670
36651
  const { offset: offset2 = 100 } = options || {};
36671
36652
  const handleSectionClick = useCallback35((sectionId) => {
36672
36653
  const targetElement = document.getElementById(sectionId);
@@ -36678,14 +36659,14 @@ function useSectionNavigation(sections, options) {
36678
36659
  isScrollingFromClick.current = false;
36679
36660
  }, 500);
36680
36661
  }, [offset2]);
36681
- useEffect68(() => {
36662
+ useEffect67(() => {
36682
36663
  sections.forEach((section) => {
36683
36664
  if (section.ref.current && !section.ref.current.id) {
36684
36665
  section.ref.current.id = section.id;
36685
36666
  }
36686
36667
  });
36687
36668
  }, [sections]);
36688
- useEffect68(() => {
36669
+ useEffect67(() => {
36689
36670
  const handleScroll = () => {
36690
36671
  if (isScrollingFromClick.current) return;
36691
36672
  const scrollPosition = window.scrollY + offset2 + 50;
@@ -36718,7 +36699,7 @@ function useSectionNavigation(sections, options) {
36718
36699
  }
36719
36700
 
36720
36701
  // src/components/navigation/navigation-sidebar.tsx
36721
- import { useCallback as useCallback36, useEffect as useEffect69, useLayoutEffect as useLayoutEffect7, useMemo as useMemo37, useState as useState90 } from "react";
36702
+ import { useCallback as useCallback36, useEffect as useEffect68, useLayoutEffect as useLayoutEffect7, useMemo as useMemo37, useState as useState89 } from "react";
36722
36703
 
36723
36704
  // src/components/navigation/navigation-sidebar-header.tsx
36724
36705
  import { jsx as jsx280, jsxs as jsxs218 } from "react/jsx-runtime";
@@ -36866,12 +36847,12 @@ function NavigationSidebar({ config, disabled = false }) {
36866
36847
  STORAGE_KEY,
36867
36848
  config.minimized ?? false
36868
36849
  );
36869
- const [tabletMinimized, setTabletMinimized] = useState90(true);
36870
- useEffect69(() => {
36850
+ const [tabletMinimized, setTabletMinimized] = useState89(true);
36851
+ useEffect68(() => {
36871
36852
  if (isTablet) setTabletMinimized(true);
36872
36853
  }, [isTablet]);
36873
36854
  const minimized = isTablet ? tabletMinimized : desktopMinimized;
36874
- const [transitionsEnabled, setTransitionsEnabled] = useState90(false);
36855
+ const [transitionsEnabled, setTransitionsEnabled] = useState89(false);
36875
36856
  const isOverlayOpen = isTablet && !minimized;
36876
36857
  const showLabel = !minimized;
36877
36858
  const handleToggle = useCallback36(() => {
@@ -36885,7 +36866,7 @@ function NavigationSidebar({ config, disabled = false }) {
36885
36866
  const closeOverlay = useCallback36(() => {
36886
36867
  setTabletMinimized(true);
36887
36868
  }, []);
36888
- useEffect69(() => {
36869
+ useEffect68(() => {
36889
36870
  if (!isOverlayOpen) return;
36890
36871
  const handleKeyDown = (e) => {
36891
36872
  if (e.key === "Escape") closeOverlay();
@@ -37366,10 +37347,10 @@ function NotificationsHeaderButton({
37366
37347
  }
37367
37348
 
37368
37349
  // src/components/navigation/app-layout.tsx
37369
- import { Suspense as Suspense2, useCallback as useCallback38, useMemo as useMemo38, useRef as useRef52, useState as useState91 } from "react";
37350
+ import { Suspense as Suspense2, useCallback as useCallback38, useMemo as useMemo38, useRef as useRef51, useState as useState90 } from "react";
37370
37351
 
37371
37352
  // src/components/navigation/mobile-burger-menu.tsx
37372
- import React115, { useCallback as useCallback37, useRef as useRef51 } from "react";
37353
+ import React115, { useCallback as useCallback37, useRef as useRef50 } from "react";
37373
37354
  import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
37374
37355
  import { Fragment as Fragment56, jsx as jsx288, jsxs as jsxs226 } from "react/jsx-runtime";
37375
37356
  var HEADER_HEIGHT = 48;
@@ -37383,7 +37364,7 @@ var MobileBurgerMenu = React115.memo(function MobileBurgerMenu2({
37383
37364
  onLogout,
37384
37365
  disabled = false
37385
37366
  }) {
37386
- const panelRef = useRef51(null);
37367
+ const panelRef = useRef50(null);
37387
37368
  usePreventScroll5({ isDisabled: !isOpen });
37388
37369
  useFocusTrap(panelRef, isOpen, { onEscape: onClose });
37389
37370
  const handleItemClick = useCallback37((item) => {
@@ -37566,11 +37547,11 @@ function AppLayout({
37566
37547
  drawer,
37567
37548
  topBar
37568
37549
  }) {
37569
- const [mobileMenuOpen, setMobileMenuOpen] = useState91(false);
37570
- const [drawerContainer, setDrawerContainer] = useState91(null);
37571
- const mobileMenuOpenRef = useRef52(mobileMenuOpen);
37550
+ const [mobileMenuOpen, setMobileMenuOpen] = useState90(false);
37551
+ const [drawerContainer, setDrawerContainer] = useState90(null);
37552
+ const mobileMenuOpenRef = useRef51(mobileMenuOpen);
37572
37553
  mobileMenuOpenRef.current = mobileMenuOpen;
37573
- const drawerHandlesRef = useRef52(/* @__PURE__ */ new Set());
37554
+ const drawerHandlesRef = useRef51(/* @__PURE__ */ new Set());
37574
37555
  const handleToggleMobileMenu = useCallback38(() => {
37575
37556
  const opening = !mobileMenuOpenRef.current;
37576
37557
  if (opening) {
@@ -38197,7 +38178,7 @@ ScriptArguments.displayName = "ScriptArguments";
38197
38178
 
38198
38179
  // src/components/shared/onboarding/onboarding-walkthrough.tsx
38199
38180
  init_button2();
38200
- import React117, { useRef as useRef53, useCallback as useCallback39 } from "react";
38181
+ import React117, { useRef as useRef52, useCallback as useCallback39 } from "react";
38201
38182
 
38202
38183
  // src/components/shared/onboarding/onboarding-step-card.tsx
38203
38184
  import React116 from "react";
@@ -38321,10 +38302,10 @@ function OnboardingWalkthrough({
38321
38302
  allStepsComplete,
38322
38303
  markMultipleComplete
38323
38304
  } = useOnboardingState(storageKey);
38324
- const hasAutoMarkedRef = useRef53(false);
38325
- const autoMarkingInProgressRef = useRef53(false);
38326
- const lastCompletionStatusRef = useRef53(null);
38327
- const actionInProgressRef = useRef53(/* @__PURE__ */ new Set());
38305
+ const hasAutoMarkedRef = useRef52(false);
38306
+ const autoMarkingInProgressRef = useRef52(false);
38307
+ const lastCompletionStatusRef = useRef52(null);
38308
+ const actionInProgressRef = useRef52(/* @__PURE__ */ new Set());
38328
38309
  React117.useEffect(() => {
38329
38310
  if (isLoadingCompletion) {
38330
38311
  hasAutoMarkedRef.current = false;
@@ -38663,7 +38644,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
38663
38644
  ] });
38664
38645
  }
38665
38646
  function ServiceCardRowItem({ row }) {
38666
- const [revealed, setRevealed] = useState92(false);
38647
+ const [revealed, setRevealed] = useState91(false);
38667
38648
  const { copy, copied } = useCopyToClipboard();
38668
38649
  const actions = useMemo39(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
38669
38650
  const displayValue = row.isSecret ? /* @__PURE__ */ jsx302(MaskedValue, { value: row.value, isRevealed: revealed }) : /* @__PURE__ */ jsx302("span", { children: row.value });
@@ -39012,7 +38993,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx307(ContentLoader, { ...props, va
39012
38993
 
39013
38994
  // src/components/ui/table/table.tsx
39014
38995
  init_cn();
39015
- import { useEffect as useEffect71, useRef as useRef55 } from "react";
38996
+ import { useEffect as useEffect70, useRef as useRef54 } from "react";
39016
38997
  init_pagination();
39017
38998
  init_button2();
39018
38999
 
@@ -39623,10 +39604,10 @@ function TableRow({
39623
39604
  }
39624
39605
 
39625
39606
  // src/components/ui/table/use-table-motion.ts
39626
- import { useEffect as useEffect70, useState as useState93 } from "react";
39607
+ import { useEffect as useEffect69, useState as useState92 } from "react";
39627
39608
  function useTableMotion(enabled) {
39628
- const [runtime, setRuntime] = useState93(null);
39629
- useEffect70(() => {
39609
+ const [runtime, setRuntime] = useState92(null);
39610
+ useEffect69(() => {
39630
39611
  if (!enabled || runtime) return;
39631
39612
  let active = true;
39632
39613
  import("framer-motion").then((m) => {
@@ -39772,10 +39753,10 @@ function Table({
39772
39753
  };
39773
39754
  const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
39774
39755
  const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
39775
- const sentinelRef = useRef55(null);
39776
- const onLoadMoreRef = useRef55(infiniteScroll?.onLoadMore);
39756
+ const sentinelRef = useRef54(null);
39757
+ const onLoadMoreRef = useRef54(infiniteScroll?.onLoadMore);
39777
39758
  onLoadMoreRef.current = infiniteScroll?.onLoadMore;
39778
- useEffect71(() => {
39759
+ useEffect70(() => {
39779
39760
  if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
39780
39761
  const sentinel = sentinelRef.current;
39781
39762
  if (!sentinel) return;
@@ -39993,7 +39974,7 @@ import { useMemo as useMemo40 } from "react";
39993
39974
 
39994
39975
  // src/components/ui/query-report-table/query-report-table-header.tsx
39995
39976
  init_cn();
39996
- import { useRef as useRef56, useState as useState94, useCallback as useCallback40 } from "react";
39977
+ import { useRef as useRef55, useState as useState93, useCallback as useCallback40 } from "react";
39997
39978
  import { jsx as jsx319, jsxs as jsxs252 } from "react/jsx-runtime";
39998
39979
  function QueryReportTableHeader({
39999
39980
  columns,
@@ -40022,8 +40003,8 @@ function QueryReportTableHeader({
40022
40003
  );
40023
40004
  }
40024
40005
  function TruncatedHeaderCell({ value, width }) {
40025
- const textRef = useRef56(null);
40026
- const [isTruncated, setIsTruncated] = useState94(false);
40006
+ const textRef = useRef55(null);
40007
+ const [isTruncated, setIsTruncated] = useState93(false);
40027
40008
  const checkTruncation = useCallback40(() => {
40028
40009
  const el = textRef.current;
40029
40010
  if (el) {
@@ -40052,7 +40033,7 @@ function TruncatedHeaderCell({ value, width }) {
40052
40033
 
40053
40034
  // src/components/ui/query-report-table/query-report-table-row.tsx
40054
40035
  init_cn();
40055
- import { useRef as useRef57, useState as useState95, useCallback as useCallback41 } from "react";
40036
+ import { useRef as useRef56, useState as useState94, useCallback as useCallback41 } from "react";
40056
40037
  import { jsx as jsx320, jsxs as jsxs253 } from "react/jsx-runtime";
40057
40038
  function QueryReportTableRow({
40058
40039
  row,
@@ -40098,8 +40079,8 @@ function QueryReportTableRow({
40098
40079
  );
40099
40080
  }
40100
40081
  function TruncatedCell({ value, className }) {
40101
- const textRef = useRef57(null);
40102
- const [isTruncated, setIsTruncated] = useState95(false);
40082
+ const textRef = useRef56(null);
40083
+ const [isTruncated, setIsTruncated] = useState94(false);
40103
40084
  const checkTruncation = useCallback41(() => {
40104
40085
  const el = textRef.current;
40105
40086
  if (el) {
@@ -40600,7 +40581,7 @@ function DataTableEmpty({ className, ...props }) {
40600
40581
  // src/components/ui/data-table/data-table-row.tsx
40601
40582
  init_next_link();
40602
40583
  init_cn();
40603
- import { memo as memo5, useCallback as useCallback43, useRef as useRef58 } from "react";
40584
+ import { memo as memo5, useCallback as useCallback43, useRef as useRef57 } from "react";
40604
40585
  import { flexRender as flexRender2 } from "@tanstack/react-table";
40605
40586
 
40606
40587
  // src/components/ui/data-table/data-table-skeleton.tsx
@@ -40685,7 +40666,7 @@ function DataTableRowImpl({
40685
40666
  const hasSubRow = subRow != null && subRow !== false;
40686
40667
  const isLinkMode = Boolean(href) && !onClick;
40687
40668
  const isWholeCardLink = isLinkMode && !hasSubRow;
40688
- const containerRef = useRef58(null);
40669
+ const containerRef = useRef57(null);
40689
40670
  const handleClick = useCallback43(
40690
40671
  (e) => {
40691
40672
  const target = e.target;
@@ -40853,7 +40834,7 @@ function DataTableBody({
40853
40834
  }
40854
40835
 
40855
40836
  // src/components/ui/data-table/data-table-infinite-footer.tsx
40856
- import { useEffect as useEffect72, useRef as useRef59 } from "react";
40837
+ import { useEffect as useEffect71, useRef as useRef58 } from "react";
40857
40838
  import { Fragment as Fragment64, jsx as jsx330, jsxs as jsxs261 } from "react/jsx-runtime";
40858
40839
  function DataTableInfiniteFooter({
40859
40840
  hasNextPage,
@@ -40862,10 +40843,10 @@ function DataTableInfiniteFooter({
40862
40843
  skeletonRows = 3,
40863
40844
  rootMargin = "200px"
40864
40845
  }) {
40865
- const sentinelRef = useRef59(null);
40866
- const onLoadMoreRef = useRef59(onLoadMore);
40846
+ const sentinelRef = useRef58(null);
40847
+ const onLoadMoreRef = useRef58(onLoadMore);
40867
40848
  onLoadMoreRef.current = onLoadMore;
40868
- useEffect72(() => {
40849
+ useEffect71(() => {
40869
40850
  if (!hasNextPage || isFetchingNextPage) return;
40870
40851
  const sentinel = sentinelRef.current;
40871
40852
  if (!sentinel) return;
@@ -41499,9 +41480,9 @@ function FilterList({
41499
41480
 
41500
41481
  // src/components/ui/tag-search-input.tsx
41501
41482
  import {
41502
- useEffect as useEffect74,
41503
- useRef as useRef61,
41504
- useState as useState97
41483
+ useEffect as useEffect73,
41484
+ useRef as useRef60,
41485
+ useState as useState96
41505
41486
  } from "react";
41506
41487
  init_cn();
41507
41488
  import { jsx as jsx334, jsxs as jsxs265 } from "react/jsx-runtime";
@@ -41535,11 +41516,11 @@ function TagSearchInput({
41535
41516
  limitTags,
41536
41517
  placeholder: currentPlaceholder
41537
41518
  });
41538
- const wrapperRef = useRef61(null);
41539
- const hiddenTagsRef = useRef61(null);
41540
- const hiddenTagsPopupRef = useRef61(null);
41541
- const [showHiddenTags, setShowHiddenTags] = useState97(false);
41542
- useEffect74(() => {
41519
+ const wrapperRef = useRef60(null);
41520
+ const hiddenTagsRef = useRef60(null);
41521
+ const hiddenTagsPopupRef = useRef60(null);
41522
+ const [showHiddenTags, setShowHiddenTags] = useState96(false);
41523
+ useEffect73(() => {
41543
41524
  if (!showHiddenTags) return;
41544
41525
  const handleClick = (e) => {
41545
41526
  const target = e.target;
@@ -41694,7 +41675,7 @@ function TagSearchInput({
41694
41675
  }
41695
41676
 
41696
41677
  // src/components/ui/markdown-editor.tsx
41697
- import { useRef as useRef62, useCallback as useCallback44, useState as useState98, useEffect as useEffect75 } from "react";
41678
+ import { useRef as useRef61, useCallback as useCallback44, useState as useState97, useEffect as useEffect74 } from "react";
41698
41679
  init_cn();
41699
41680
  import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
41700
41681
  import { jsx as jsx335, jsxs as jsxs266 } from "react/jsx-runtime";
@@ -41725,7 +41706,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
41725
41706
  body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
41726
41707
  `;
41727
41708
  function MarkdownEditorStyles() {
41728
- useEffect75(() => {
41709
+ useEffect74(() => {
41729
41710
  if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
41730
41711
  const style = document.createElement("style");
41731
41712
  style.id = MARKDOWN_EDITOR_STYLE_ID;
@@ -41749,11 +41730,11 @@ function MarkdownEditor({
41749
41730
  onFileUploaded,
41750
41731
  renderPreview
41751
41732
  }) {
41752
- const fileInputRef = useRef62(null);
41753
- const [isUploading, setIsUploading] = useState98(false);
41754
- const [uploadProgress, setUploadProgress] = useState98("");
41755
- const [defaultExtraCommands, setDefaultExtraCommands] = useState98([]);
41756
- useEffect75(() => {
41733
+ const fileInputRef = useRef61(null);
41734
+ const [isUploading, setIsUploading] = useState97(false);
41735
+ const [uploadProgress, setUploadProgress] = useState97("");
41736
+ const [defaultExtraCommands, setDefaultExtraCommands] = useState97([]);
41737
+ useEffect74(() => {
41757
41738
  import("@uiw/react-md-editor").then((mod) => {
41758
41739
  if (mod.commands?.getExtraCommands) {
41759
41740
  setDefaultExtraCommands(mod.commands.getExtraCommands());
@@ -41842,11 +41823,11 @@ function MarkdownEditor({
41842
41823
  }
41843
41824
  } : null;
41844
41825
  const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
41845
- const wrapperRef = useRef62(null);
41846
- const isDraggingRef = useRef62(false);
41847
- const mouseYRef = useRef62(0);
41848
- const rafRef = useRef62(0);
41849
- const scrollParentRef = useRef62(window);
41826
+ const wrapperRef = useRef61(null);
41827
+ const isDraggingRef = useRef61(false);
41828
+ const mouseYRef = useRef61(0);
41829
+ const rafRef = useRef61(0);
41830
+ const scrollParentRef = useRef61(window);
41850
41831
  const EDGE_ZONE = 60;
41851
41832
  const MAX_SCROLL_SPEED = 15;
41852
41833
  const findScrollParent = useCallback44((el) => {
@@ -41876,7 +41857,7 @@ function MarkdownEditor({
41876
41857
  }
41877
41858
  rafRef.current = requestAnimationFrame(scrollLoop);
41878
41859
  }, []);
41879
- useEffect75(() => {
41860
+ useEffect74(() => {
41880
41861
  const wrapper = wrapperRef.current;
41881
41862
  if (!wrapper) return;
41882
41863
  const onMouseMove = (e) => {
@@ -43358,8 +43339,8 @@ function ImageGalleryModal({
43358
43339
  onClose,
43359
43340
  initialIndex = 0
43360
43341
  }) {
43361
- const [selectedImageIndex, setSelectedImageIndex] = useState105(initialIndex);
43362
- useEffect78(() => {
43342
+ const [selectedImageIndex, setSelectedImageIndex] = useState104(initialIndex);
43343
+ useEffect77(() => {
43363
43344
  if (isOpen) {
43364
43345
  setSelectedImageIndex(initialIndex);
43365
43346
  }
@@ -43374,7 +43355,7 @@ function ImageGalleryModal({
43374
43355
  setSelectedImageIndex(selectedImageIndex + 1);
43375
43356
  }
43376
43357
  };
43377
- useEffect78(() => {
43358
+ useEffect77(() => {
43378
43359
  const handleKeyPress = (event) => {
43379
43360
  if (!isOpen) return;
43380
43361
  switch (event.key) {
@@ -43577,7 +43558,7 @@ function RoadmapCard({
43577
43558
  onVote,
43578
43559
  isVoting = false
43579
43560
  }) {
43580
- const [showScreenshots, setShowScreenshots] = useState106(false);
43561
+ const [showScreenshots, setShowScreenshots] = useState105(false);
43581
43562
  const logoUrl = item.icon && item.icon.startsWith("http") ? item.icon : null;
43582
43563
  const iconSrc = logoUrl ? getProxiedImageUrl(logoUrl, { directHttps: true }) || logoUrl : null;
43583
43564
  if (size2 === "sm") {
@@ -44213,7 +44194,7 @@ function DataRoomDocCardSkeleton({ className }) {
44213
44194
  }
44214
44195
 
44215
44196
  // src/components/chat/entity-cards/program-card.tsx
44216
- import { useState as useState107 } from "react";
44197
+ import { useState as useState106 } from "react";
44217
44198
 
44218
44199
  // node_modules/date-fns/toDate.mjs
44219
44200
  function toDate2(argument) {
@@ -45850,8 +45831,8 @@ function getHosts(hosts) {
45850
45831
  return [];
45851
45832
  }
45852
45833
  function MediaGallery({ images, title }) {
45853
- const [selectedImageIndex, setSelectedImageIndex] = useState107(null);
45854
- const [isModalOpen, setIsModalOpen] = useState107(false);
45834
+ const [selectedImageIndex, setSelectedImageIndex] = useState106(null);
45835
+ const [isModalOpen, setIsModalOpen] = useState106(false);
45855
45836
  const openImageModal = (index, event) => {
45856
45837
  if (event) event.stopPropagation();
45857
45838
  setSelectedImageIndex(index);
@@ -47449,7 +47430,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
47449
47430
  }
47450
47431
 
47451
47432
  // src/components/chat/hooks/use-chunk-catchup.ts
47452
- import { useCallback as useCallback46, useRef as useRef66 } from "react";
47433
+ import { useCallback as useCallback46, useRef as useRef65 } from "react";
47453
47434
  function makeSeqKey(messageType, chunkType, sequenceId) {
47454
47435
  return `${messageType}:${chunkType}:${sequenceId}`;
47455
47436
  }
@@ -47471,22 +47452,22 @@ function useChunkCatchup({
47471
47452
  chatTypes = [CHAT_TYPE.CLIENT],
47472
47453
  fetchChunks
47473
47454
  }) {
47474
- const processedSequenceKeys = useRef66(/* @__PURE__ */ new Set());
47475
- const lastSequenceId = useRef66(null);
47476
- const lastSequenceIdByType = useRef66(/* @__PURE__ */ new Map());
47477
- const fetchingInProgress = useRef66(false);
47478
- const lastFetchParams = useRef66(null);
47479
- const pendingCatchupRef = useRef66(null);
47480
- const chunkBuffer = useRef66([]);
47481
- const bufferUntilInitialCatchupComplete = useRef66(false);
47482
- const hasCompletedInitialCatchup = useRef66(false);
47483
- const dialogIdRef = useRef66(dialogId);
47455
+ const processedSequenceKeys = useRef65(/* @__PURE__ */ new Set());
47456
+ const lastSequenceId = useRef65(null);
47457
+ const lastSequenceIdByType = useRef65(/* @__PURE__ */ new Map());
47458
+ const fetchingInProgress = useRef65(false);
47459
+ const lastFetchParams = useRef65(null);
47460
+ const pendingCatchupRef = useRef65(null);
47461
+ const chunkBuffer = useRef65([]);
47462
+ const bufferUntilInitialCatchupComplete = useRef65(false);
47463
+ const hasCompletedInitialCatchup = useRef65(false);
47464
+ const dialogIdRef = useRef65(dialogId);
47484
47465
  dialogIdRef.current = dialogId;
47485
- const chatTypesRef = useRef66(chatTypes);
47466
+ const chatTypesRef = useRef65(chatTypes);
47486
47467
  chatTypesRef.current = chatTypes;
47487
- const fetchChunksRef = useRef66(fetchChunks);
47468
+ const fetchChunksRef = useRef65(fetchChunks);
47488
47469
  fetchChunksRef.current = fetchChunks;
47489
- const onChunkReceivedRef = useRef66(onChunkReceived);
47470
+ const onChunkReceivedRef = useRef65(onChunkReceived);
47490
47471
  onChunkReceivedRef.current = onChunkReceived;
47491
47472
  const processChunk = useCallback46((chunk, messageType, forceProcess = false) => {
47492
47473
  if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
@@ -47683,7 +47664,7 @@ function useChunkCatchup({
47683
47664
  }
47684
47665
  }
47685
47666
  }, [flushBufferedRealtimeChunks]);
47686
- const catchUpChunksRef = useRef66(null);
47667
+ const catchUpChunksRef = useRef65(null);
47687
47668
  catchUpChunksRef.current = catchUpChunks;
47688
47669
  const resetChunkTracking = useCallback46(() => {
47689
47670
  processedSequenceKeys.current.clear();
@@ -47727,20 +47708,20 @@ function useChunkCatchup({
47727
47708
  }
47728
47709
 
47729
47710
  // src/components/chat/hooks/use-scripted-stream.ts
47730
- import { useEffect as useEffect79, useState as useState108 } from "react";
47711
+ import { useEffect as useEffect78, useState as useState107 } from "react";
47731
47712
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
47732
47713
  function prefersReducedMotion() {
47733
47714
  return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
47734
47715
  }
47735
47716
  function useScriptedStream(frames, resetKey, enabled = true) {
47736
- const [index, setIndex] = useState108(0);
47737
- const [reducedMotion, setReducedMotion] = useState108(false);
47738
- const [prevKey, setPrevKey] = useState108(resetKey);
47717
+ const [index, setIndex] = useState107(0);
47718
+ const [reducedMotion, setReducedMotion] = useState107(false);
47719
+ const [prevKey, setPrevKey] = useState107(resetKey);
47739
47720
  if (resetKey !== prevKey) {
47740
47721
  setPrevKey(resetKey);
47741
47722
  setIndex(0);
47742
47723
  }
47743
- useEffect79(() => {
47724
+ useEffect78(() => {
47744
47725
  setReducedMotion(prefersReducedMotion());
47745
47726
  const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
47746
47727
  if (!mq) return;
@@ -47750,7 +47731,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
47750
47731
  }, []);
47751
47732
  const playing = enabled && !reducedMotion && frames.length > 0;
47752
47733
  const lastIndex = Math.max(0, frames.length - 1);
47753
- useEffect79(() => {
47734
+ useEffect78(() => {
47754
47735
  if (!playing || index >= lastIndex) return;
47755
47736
  const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
47756
47737
  const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
@@ -47762,7 +47743,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
47762
47743
  }
47763
47744
 
47764
47745
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
47765
- import { useEffect as useEffect80, useRef as useRef67, useState as useState109 } from "react";
47746
+ import { useEffect as useEffect79, useRef as useRef66, useState as useState108 } from "react";
47766
47747
  var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
47767
47748
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
47768
47749
  function useJetStreamDialogSubscription({
@@ -47781,57 +47762,57 @@ function useJetStreamDialogSubscription({
47781
47762
  reconnectionBackoff,
47782
47763
  inactiveThresholdMs
47783
47764
  }) {
47784
- const [isConnected, setIsConnected] = useState109(false);
47785
- const [isSubscribed, setIsSubscribed] = useState109(false);
47786
- const [reconnectionCount, setReconnectionCount] = useState109(0);
47787
- const [currentStreamSeq, setCurrentStreamSeq] = useState109(null);
47788
- const clientRef = useRef67(null);
47789
- const subscriptionRef = useRef67(null);
47790
- const highestStreamSeqRef = useRef67(null);
47791
- const onEventRef = useRef67(onEvent);
47792
- useEffect80(() => {
47765
+ const [isConnected, setIsConnected] = useState108(false);
47766
+ const [isSubscribed, setIsSubscribed] = useState108(false);
47767
+ const [reconnectionCount, setReconnectionCount] = useState108(0);
47768
+ const [currentStreamSeq, setCurrentStreamSeq] = useState108(null);
47769
+ const clientRef = useRef66(null);
47770
+ const subscriptionRef = useRef66(null);
47771
+ const highestStreamSeqRef = useRef66(null);
47772
+ const onEventRef = useRef66(onEvent);
47773
+ useEffect79(() => {
47793
47774
  onEventRef.current = onEvent;
47794
47775
  }, [onEvent]);
47795
- const onConnectRef = useRef67(onConnect);
47796
- useEffect80(() => {
47776
+ const onConnectRef = useRef66(onConnect);
47777
+ useEffect79(() => {
47797
47778
  onConnectRef.current = onConnect;
47798
47779
  }, [onConnect]);
47799
- const onDisconnectRef = useRef67(onDisconnect);
47800
- useEffect80(() => {
47780
+ const onDisconnectRef = useRef66(onDisconnect);
47781
+ useEffect79(() => {
47801
47782
  onDisconnectRef.current = onDisconnect;
47802
47783
  }, [onDisconnect]);
47803
- const onSubscribedRef = useRef67(onSubscribed);
47804
- useEffect80(() => {
47784
+ const onSubscribedRef = useRef66(onSubscribed);
47785
+ useEffect79(() => {
47805
47786
  onSubscribedRef.current = onSubscribed;
47806
47787
  }, [onSubscribed]);
47807
- const onBeforeReconnectRef = useRef67(onBeforeReconnect);
47808
- useEffect80(() => {
47788
+ const onBeforeReconnectRef = useRef66(onBeforeReconnect);
47789
+ useEffect79(() => {
47809
47790
  onBeforeReconnectRef.current = onBeforeReconnect;
47810
47791
  }, [onBeforeReconnect]);
47811
- const getNatsWsUrlRef = useRef67(getNatsWsUrl);
47812
- useEffect80(() => {
47792
+ const getNatsWsUrlRef = useRef66(getNatsWsUrl);
47793
+ useEffect79(() => {
47813
47794
  getNatsWsUrlRef.current = getNatsWsUrl;
47814
47795
  }, [getNatsWsUrl]);
47815
- const reconnectionBackoffRef = useRef67(reconnectionBackoff);
47816
- useEffect80(() => {
47796
+ const reconnectionBackoffRef = useRef66(reconnectionBackoff);
47797
+ useEffect79(() => {
47817
47798
  reconnectionBackoffRef.current = reconnectionBackoff;
47818
47799
  }, [reconnectionBackoff]);
47819
- const optStartSeqRef = useRef67(optStartSeq);
47820
- useEffect80(() => {
47800
+ const optStartSeqRef = useRef66(optStartSeq);
47801
+ useEffect79(() => {
47821
47802
  optStartSeqRef.current = optStartSeq;
47822
47803
  }, [optStartSeq]);
47823
- const inactiveThresholdRef = useRef67(inactiveThresholdMs);
47824
- useEffect80(() => {
47804
+ const inactiveThresholdRef = useRef66(inactiveThresholdMs);
47805
+ useEffect79(() => {
47825
47806
  inactiveThresholdRef.current = inactiveThresholdMs;
47826
47807
  }, [inactiveThresholdMs]);
47827
- const hadConnectionBeforeRef = useRef67(false);
47828
- const clientConfigRef = useRef67(clientConfig);
47829
- useEffect80(() => {
47808
+ const hadConnectionBeforeRef = useRef66(false);
47809
+ const clientConfigRef = useRef66(clientConfig);
47810
+ useEffect79(() => {
47830
47811
  clientConfigRef.current = clientConfig;
47831
47812
  }, [clientConfig]);
47832
- const currentWsUrlRef = useRef67("");
47813
+ const currentWsUrlRef = useRef66("");
47833
47814
  const wsUrl = getNatsWsUrl();
47834
- useEffect80(() => {
47815
+ useEffect79(() => {
47835
47816
  if (!enabled || !wsUrl) {
47836
47817
  if (currentWsUrlRef.current && clientRef.current) {
47837
47818
  releaseClient(currentWsUrlRef.current);
@@ -47912,11 +47893,11 @@ function useJetStreamDialogSubscription({
47912
47893
  }
47913
47894
  };
47914
47895
  }, [enabled, wsUrl]);
47915
- useEffect80(() => {
47896
+ useEffect79(() => {
47916
47897
  highestStreamSeqRef.current = null;
47917
47898
  setCurrentStreamSeq(null);
47918
47899
  }, [dialogId]);
47919
- useEffect80(() => {
47900
+ useEffect79(() => {
47920
47901
  if (!enabled || !dialogId || !isConnected) {
47921
47902
  if (subscriptionRef.current) {
47922
47903
  try {
@@ -48003,7 +47984,7 @@ function useJetStreamDialogSubscription({
48003
47984
  }
48004
47985
 
48005
47986
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
48006
- import { useEffect as useEffect81, useRef as useRef68, useState as useState110 } from "react";
47987
+ import { useEffect as useEffect80, useRef as useRef67, useState as useState109 } from "react";
48007
47988
  function useNatsDialogSubscription({
48008
47989
  enabled,
48009
47990
  dialogId,
@@ -48017,47 +47998,47 @@ function useNatsDialogSubscription({
48017
47998
  clientConfig = {},
48018
47999
  reconnectionBackoff
48019
48000
  }) {
48020
- const [isConnected, setIsConnected] = useState110(false);
48021
- const [isSubscribed, setIsSubscribed] = useState110(false);
48022
- const [reconnectionCount, setReconnectionCount] = useState110(0);
48023
- const clientRef = useRef68(null);
48024
- const subscriptionRefs = useRef68(/* @__PURE__ */ new Map());
48025
- const onEventRef = useRef68(onEvent);
48026
- useEffect81(() => {
48001
+ const [isConnected, setIsConnected] = useState109(false);
48002
+ const [isSubscribed, setIsSubscribed] = useState109(false);
48003
+ const [reconnectionCount, setReconnectionCount] = useState109(0);
48004
+ const clientRef = useRef67(null);
48005
+ const subscriptionRefs = useRef67(/* @__PURE__ */ new Map());
48006
+ const onEventRef = useRef67(onEvent);
48007
+ useEffect80(() => {
48027
48008
  onEventRef.current = onEvent;
48028
48009
  }, [onEvent]);
48029
- const onConnectRef = useRef68(onConnect);
48030
- useEffect81(() => {
48010
+ const onConnectRef = useRef67(onConnect);
48011
+ useEffect80(() => {
48031
48012
  onConnectRef.current = onConnect;
48032
48013
  }, [onConnect]);
48033
- const onDisconnectRef = useRef68(onDisconnect);
48034
- useEffect81(() => {
48014
+ const onDisconnectRef = useRef67(onDisconnect);
48015
+ useEffect80(() => {
48035
48016
  onDisconnectRef.current = onDisconnect;
48036
48017
  }, [onDisconnect]);
48037
- const onSubscribedRef = useRef68(onSubscribed);
48038
- useEffect81(() => {
48018
+ const onSubscribedRef = useRef67(onSubscribed);
48019
+ useEffect80(() => {
48039
48020
  onSubscribedRef.current = onSubscribed;
48040
48021
  }, [onSubscribed]);
48041
- const onBeforeReconnectRef = useRef68(onBeforeReconnect);
48042
- useEffect81(() => {
48022
+ const onBeforeReconnectRef = useRef67(onBeforeReconnect);
48023
+ useEffect80(() => {
48043
48024
  onBeforeReconnectRef.current = onBeforeReconnect;
48044
48025
  }, [onBeforeReconnect]);
48045
- const hadConnectionBeforeRef = useRef68(false);
48046
- const getNatsWsUrlRef = useRef68(getNatsWsUrl);
48047
- useEffect81(() => {
48026
+ const hadConnectionBeforeRef = useRef67(false);
48027
+ const getNatsWsUrlRef = useRef67(getNatsWsUrl);
48028
+ useEffect80(() => {
48048
48029
  getNatsWsUrlRef.current = getNatsWsUrl;
48049
48030
  }, [getNatsWsUrl]);
48050
- const reconnectionBackoffRef = useRef68(reconnectionBackoff);
48051
- useEffect81(() => {
48031
+ const reconnectionBackoffRef = useRef67(reconnectionBackoff);
48032
+ useEffect80(() => {
48052
48033
  reconnectionBackoffRef.current = reconnectionBackoff;
48053
48034
  }, [reconnectionBackoff]);
48054
- const clientConfigRef = useRef68(clientConfig);
48055
- useEffect81(() => {
48035
+ const clientConfigRef = useRef67(clientConfig);
48036
+ useEffect80(() => {
48056
48037
  clientConfigRef.current = clientConfig;
48057
48038
  }, [clientConfig]);
48058
- const currentWsUrlRef = useRef68("");
48039
+ const currentWsUrlRef = useRef67("");
48059
48040
  const wsUrl = getNatsWsUrl();
48060
- useEffect81(() => {
48041
+ useEffect80(() => {
48061
48042
  if (!enabled || !wsUrl) {
48062
48043
  if (currentWsUrlRef.current && clientRef.current) {
48063
48044
  releaseClient(currentWsUrlRef.current);
@@ -48139,16 +48120,16 @@ function useNatsDialogSubscription({
48139
48120
  };
48140
48121
  }, [enabled, wsUrl]);
48141
48122
  const topicsKey = topics.join(",");
48142
- const topicsRef = useRef68(topics);
48123
+ const topicsRef = useRef67(topics);
48143
48124
  topicsRef.current = topics;
48144
- const lastSubscribedDialogIdRef = useRef68(null);
48145
- const isConnectedRef = useRef68(isConnected);
48146
- useEffect81(() => {
48125
+ const lastSubscribedDialogIdRef = useRef67(null);
48126
+ const isConnectedRef = useRef67(isConnected);
48127
+ useEffect80(() => {
48147
48128
  isConnectedRef.current = isConnected;
48148
48129
  }, [isConnected]);
48149
- const currentDialogIdRef = useRef68(null);
48150
- const abortControllerRef = useRef68(null);
48151
- useEffect81(() => {
48130
+ const currentDialogIdRef = useRef67(null);
48131
+ const abortControllerRef = useRef67(null);
48132
+ useEffect80(() => {
48152
48133
  currentDialogIdRef.current = dialogId;
48153
48134
  if (!enabled || !dialogId) {
48154
48135
  if (subscriptionRefs.current.size > 0) {
@@ -48229,7 +48210,7 @@ function useNatsDialogSubscription({
48229
48210
  abortControllerRef.current = null;
48230
48211
  };
48231
48212
  }, [enabled, dialogId, topicsKey]);
48232
- useEffect81(() => {
48213
+ useEffect80(() => {
48233
48214
  if (!enabled || !currentDialogIdRef.current || !isConnected) {
48234
48215
  return;
48235
48216
  }
@@ -48279,7 +48260,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
48279
48260
  }
48280
48261
 
48281
48262
  // src/components/chat/hooks/use-realtime-chunk-processor.ts
48282
- import { useCallback as useCallback47, useRef as useRef69, useEffect as useEffect82 } from "react";
48263
+ import { useCallback as useCallback47, useRef as useRef68, useEffect as useEffect81 } from "react";
48283
48264
 
48284
48265
  // src/components/chat/utils/chunk-parser.ts
48285
48266
  function normalizeToolCalls(raw) {
@@ -48934,14 +48915,14 @@ function useRealtimeChunkProcessor(options) {
48934
48915
  batchApprovalsEnabled = true,
48935
48916
  isDirectMode = false
48936
48917
  } = options;
48937
- const accumulatorRef = useRef69(
48918
+ const accumulatorRef = useRef68(
48938
48919
  createMessageSegmentAccumulator({
48939
48920
  onApprove: callbacks.onApprove,
48940
48921
  onReject: callbacks.onReject
48941
48922
  })
48942
48923
  );
48943
- const hasInitializedWithData = useRef69(false);
48944
- useEffect82(() => {
48924
+ const hasInitializedWithData = useRef68(false);
48925
+ useEffect81(() => {
48945
48926
  if (initialState && !hasInitializedWithData.current) {
48946
48927
  accumulatorRef.current.initializeWithState(initialState);
48947
48928
  if (initialState.escalatedApprovals) {
@@ -48954,15 +48935,15 @@ function useRealtimeChunkProcessor(options) {
48954
48935
  hasInitializedWithData.current = true;
48955
48936
  }
48956
48937
  }, [initialState, callbacks]);
48957
- const isInStreamRef = useRef69(false);
48958
- const hasEverStreamedRef = useRef69(false);
48959
- const directModeFlagRef = useRef69(isDirectMode);
48960
- const sawDirectMessageRef = useRef69(false);
48961
- const directTeardownFiredRef = useRef69(false);
48962
- useEffect82(() => {
48938
+ const isInStreamRef = useRef68(false);
48939
+ const hasEverStreamedRef = useRef68(false);
48940
+ const directModeFlagRef = useRef68(isDirectMode);
48941
+ const sawDirectMessageRef = useRef68(false);
48942
+ const directTeardownFiredRef = useRef68(false);
48943
+ useEffect81(() => {
48963
48944
  directModeFlagRef.current = isDirectMode;
48964
48945
  }, [isDirectMode]);
48965
- const pendingEscalatedRef = useRef69(/* @__PURE__ */ new Map());
48946
+ const pendingEscalatedRef = useRef68(/* @__PURE__ */ new Map());
48966
48947
  const processChunk = useCallback47(
48967
48948
  (chunk) => {
48968
48949
  const action = parseChunkToAction(chunk);
@@ -49238,7 +49219,7 @@ function useRealtimeChunkProcessor(options) {
49238
49219
  }
49239
49220
 
49240
49221
  // src/components/chat/hooks/use-slash-commands.ts
49241
- import { useEffect as useEffect83, useState as useState111 } from "react";
49222
+ import { useEffect as useEffect82, useState as useState110 } from "react";
49242
49223
  import { useQuery as useQuery2 } from "@tanstack/react-query";
49243
49224
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
49244
49225
  try {
@@ -49255,9 +49236,9 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
49255
49236
  }
49256
49237
  }
49257
49238
  function useSlashCommands(prefix, commandsUrl) {
49258
- const [commands, setCommands] = useState111([]);
49259
- const [loading, setLoading] = useState111(false);
49260
- useEffect83(() => {
49239
+ const [commands, setCommands] = useState110([]);
49240
+ const [loading, setLoading] = useState110(false);
49241
+ useEffect82(() => {
49261
49242
  if (prefix == null) {
49262
49243
  setCommands([]);
49263
49244
  return;
@@ -49363,7 +49344,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
49363
49344
  }
49364
49345
 
49365
49346
  // src/components/chat/hooks/use-chat-attachments.ts
49366
- import { useCallback as useCallback48, useMemo as useMemo44, useRef as useRef70, useState as useState112 } from "react";
49347
+ import { useCallback as useCallback48, useMemo as useMemo44, useRef as useRef69, useState as useState111 } from "react";
49367
49348
  import { fileTypeFromBlob } from "file-type";
49368
49349
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
49369
49350
  var CHAT_ATTACHMENTS_FOLDER = "chat";
@@ -49439,8 +49420,8 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
49439
49420
  function useChatAttachments() {
49440
49421
  const runtime = useRequiredChatRuntime();
49441
49422
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
49442
- const [attachments, setAttachments] = useState112([]);
49443
- const controllersRef = useRef70(/* @__PURE__ */ new Map());
49423
+ const [attachments, setAttachments] = useState111([]);
49424
+ const controllersRef = useRef69(/* @__PURE__ */ new Map());
49444
49425
  const updateOne = useCallback48((id, patch) => {
49445
49426
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
49446
49427
  }, []);
@@ -49529,7 +49510,7 @@ function useChatAttachments() {
49529
49510
  },
49530
49511
  [uploadUrlEndpoint, updateOne]
49531
49512
  );
49532
- const attachmentsRef = useRef70([]);
49513
+ const attachmentsRef = useRef69([]);
49533
49514
  attachmentsRef.current = attachments;
49534
49515
  const addFiles = useCallback48(
49535
49516
  (files) => {
@@ -49606,16 +49587,16 @@ function useChatAttachments() {
49606
49587
  }
49607
49588
 
49608
49589
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
49609
- import { useCallback as useCallback49, useEffect as useEffect84, useRef as useRef71, useState as useState113 } from "react";
49590
+ import { useCallback as useCallback49, useEffect as useEffect83, useRef as useRef70, useState as useState112 } from "react";
49610
49591
  import { jsx as jsx359 } from "react/jsx-runtime";
49611
49592
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
49612
49593
  function useChatAttachmentImageGallery() {
49613
49594
  const runtime = useRequiredChatRuntime();
49614
49595
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
49615
- const panelRef = useRef71(null);
49616
- const [state, setState] = useState113(CLOSED);
49596
+ const panelRef = useRef70(null);
49597
+ const [state, setState] = useState112(CLOSED);
49617
49598
  const handleClose = useCallback49(() => setState(CLOSED), []);
49618
- useEffect84(() => {
49599
+ useEffect83(() => {
49619
49600
  const root = panelRef.current;
49620
49601
  if (!root) return;
49621
49602
  const onClick = (ev) => {
@@ -49661,7 +49642,7 @@ function absolutize(prefix) {
49661
49642
  }
49662
49643
 
49663
49644
  // src/components/chat/hooks/use-chat-identity.ts
49664
- import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect85, useState as useState114 } from "react";
49645
+ import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect84, useState as useState113 } from "react";
49665
49646
  var ANON_DEFAULTS = {
49666
49647
  authTier: "anon",
49667
49648
  source: null,
@@ -49672,9 +49653,9 @@ function useResolveChatIdentity(enabled) {
49672
49653
  const runtime = useRequiredChatRuntime();
49673
49654
  const url = runtime.endpoints.identityUrl;
49674
49655
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
49675
- const [data, setData] = useState114(ANON_DEFAULTS);
49676
- const [isLoading, setIsLoading] = useState114(enabled);
49677
- useEffect85(() => {
49656
+ const [data, setData] = useState113(ANON_DEFAULTS);
49657
+ const [isLoading, setIsLoading] = useState113(enabled);
49658
+ useEffect84(() => {
49678
49659
  if (!enabled) return;
49679
49660
  let cancelled = false;
49680
49661
  const ctrl = new AbortController();
@@ -49716,11 +49697,11 @@ function useChatIdentity() {
49716
49697
  }
49717
49698
 
49718
49699
  // src/components/chat/hooks/use-close-on-navigation.ts
49719
- import { useEffect as useEffect86, useRef as useRef72 } from "react";
49700
+ import { useEffect as useEffect85, useRef as useRef71 } from "react";
49720
49701
  function useCloseOnNavigation(close, pathname) {
49721
- const prevPathnameRef = useRef72(null);
49722
- const initializedRef = useRef72(false);
49723
- useEffect86(() => {
49702
+ const prevPathnameRef = useRef71(null);
49703
+ const initializedRef = useRef71(false);
49704
+ useEffect85(() => {
49724
49705
  if (!initializedRef.current) {
49725
49706
  initializedRef.current = true;
49726
49707
  prevPathnameRef.current = pathname;
@@ -49734,14 +49715,14 @@ function useCloseOnNavigation(close, pathname) {
49734
49715
  }
49735
49716
 
49736
49717
  // src/components/chat/hooks/use-chat.ts
49737
- import { useState as useState116, useCallback as useCallback51, useEffect as useEffect87, useRef as useRef74 } from "react";
49718
+ import { useState as useState115, useCallback as useCallback51, useEffect as useEffect86, useRef as useRef73 } from "react";
49738
49719
 
49739
49720
  // src/components/chat/hooks/use-sse.ts
49740
- import { useState as useState115, useCallback as useCallback50, useRef as useRef73 } from "react";
49721
+ import { useState as useState114, useCallback as useCallback50, useRef as useRef72 } from "react";
49741
49722
  function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
49742
- const [isStreaming, setIsStreaming] = useState115(false);
49743
- const [error, setError] = useState115(null);
49744
- const abortControllerRef = useRef73(null);
49723
+ const [isStreaming, setIsStreaming] = useState114(false);
49724
+ const [error, setError] = useState114(null);
49725
+ const abortControllerRef = useRef72(null);
49745
49726
  const fallbackStream = useCallback50(async function* () {
49746
49727
  throw new Error(
49747
49728
  "[useSSE] No streamFn provided and `useMock: true` is no longer wired into the lib. Supply a `streamFn` (see `createDocStreamFn` in use-embedded-chat) or migrate the mock to your host code."
@@ -49807,12 +49788,12 @@ function useChat({
49807
49788
  initialMessages,
49808
49789
  onMessagesChange
49809
49790
  } = {}) {
49810
- const [messages, setMessages] = useState116(() => initialMessages ?? []);
49811
- const [isTyping, setIsTyping] = useState116(false);
49812
- const currentAssistantSegmentsRef = useRef74([]);
49813
- const onMessagesChangeRef = useRef74(onMessagesChange);
49791
+ const [messages, setMessages] = useState115(() => initialMessages ?? []);
49792
+ const [isTyping, setIsTyping] = useState115(false);
49793
+ const currentAssistantSegmentsRef = useRef73([]);
49794
+ const onMessagesChangeRef = useRef73(onMessagesChange);
49814
49795
  onMessagesChangeRef.current = onMessagesChange;
49815
- useEffect87(() => {
49796
+ useEffect86(() => {
49816
49797
  onMessagesChangeRef.current?.(messages);
49817
49798
  }, [messages]);
49818
49799
  const {
@@ -50101,7 +50082,7 @@ function useChat({
50101
50082
  }
50102
50083
 
50103
50084
  // src/components/chat/hooks/use-sse-chat-adapter.ts
50104
- import { useState as useState117, useEffect as useEffect88, useCallback as useCallback52, useMemo as useMemo45, useRef as useRef75 } from "react";
50085
+ import { useState as useState116, useEffect as useEffect87, useCallback as useCallback52, useMemo as useMemo45, useRef as useRef74 } from "react";
50105
50086
  function createEmptyTurnMeta() {
50106
50087
  return {
50107
50088
  provider: null,
@@ -50422,22 +50403,22 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
50422
50403
  const runtime = useRequiredChatRuntime();
50423
50404
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
50424
50405
  const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
50425
- const persistedRef = useRef75(null);
50406
+ const persistedRef = useRef74(null);
50426
50407
  if (persistedRef.current === null) {
50427
50408
  pruneStaleChatStorage(source);
50428
50409
  persistedRef.current = loadPersistedChat(source) || { messages: [], sources: [], sendCount: 0 };
50429
50410
  }
50430
- const sourcesMapRef = useRef75(
50411
+ const sourcesMapRef = useRef74(
50431
50412
  new Map(persistedRef.current.sources)
50432
50413
  );
50433
- const refsMapRef = useRef75(
50414
+ const refsMapRef = useRef74(
50434
50415
  new Map(persistedRef.current.refs ?? [])
50435
50416
  );
50436
- const metaMapRef = useRef75(/* @__PURE__ */ new Map());
50437
- const messagesRef = useRef75(persistedRef.current.messages);
50438
- const sendCountRef = useRef75(persistedRef.current.sendCount);
50439
- const [streamingPhase, setStreamingPhase] = useState117("idle");
50440
- const [metaTick, setMetaTick] = useState117(0);
50417
+ const metaMapRef = useRef74(/* @__PURE__ */ new Map());
50418
+ const messagesRef = useRef74(persistedRef.current.messages);
50419
+ const sendCountRef = useRef74(persistedRef.current.sendCount);
50420
+ const [streamingPhase, setStreamingPhase] = useState116("idle");
50421
+ const [metaTick, setMetaTick] = useState116(0);
50441
50422
  const bumpMetaTick = useCallback52(() => setMetaTick((t) => t + 1), []);
50442
50423
  const streamFn = useMemo45(
50443
50424
  () => createDocStreamFn(
@@ -50625,7 +50606,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
50625
50606
  }
50626
50607
  }
50627
50608
  }, [chatClearMessages, source, bumpMetaTick]);
50628
- useEffect88(() => {
50609
+ useEffect87(() => {
50629
50610
  if (!isTyping && !isStreaming && streamingPhase !== "idle") {
50630
50611
  setStreamingPhase("idle");
50631
50612
  }
@@ -50707,10 +50688,10 @@ var noopRejectRequest = async (_id, _reason) => {
50707
50688
  // src/components/chat/hooks/use-nats-chat-adapter.ts
50708
50689
  import {
50709
50690
  useCallback as useCallback53,
50710
- useEffect as useEffect89,
50691
+ useEffect as useEffect88,
50711
50692
  useMemo as useMemo46,
50712
- useRef as useRef76,
50713
- useState as useState118
50693
+ useRef as useRef75,
50694
+ useState as useState117
50714
50695
  } from "react";
50715
50696
 
50716
50697
  // src/components/chat/utils/process-historical-messages.ts
@@ -51407,32 +51388,32 @@ function useNatsChatAdapter(config, options = {}) {
51407
51388
  modelLabel = null
51408
51389
  } = config;
51409
51390
  const isManagedMode = fetchDialogs !== void 0;
51410
- const [internalDialogId, setInternalDialogId] = useState118(null);
51391
+ const [internalDialogId, setInternalDialogId] = useState117(null);
51411
51392
  const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
51412
- const currentDialogIdRef = useRef76(dialogId);
51393
+ const currentDialogIdRef = useRef75(dialogId);
51413
51394
  currentDialogIdRef.current = dialogId;
51414
- const [messages, setMessages] = useState118([]);
51415
- const [streamingPhase, setStreamingPhase] = useState118("idle");
51416
- const streamingPhaseRef = useRef76(streamingPhase);
51395
+ const [messages, setMessages] = useState117([]);
51396
+ const [streamingPhase, setStreamingPhase] = useState117("idle");
51397
+ const streamingPhaseRef = useRef75(streamingPhase);
51417
51398
  streamingPhaseRef.current = streamingPhase;
51418
- const suppressAgentBusyRef = useRef76(0);
51419
- const adoptTrailingAssistantRef = useRef76(false);
51420
- const hasConnectedOnceRef = useRef76(false);
51421
- const seenParticipantSeqsRef = useRef76(/* @__PURE__ */ new Set());
51422
- const pendingEchoTextsRef = useRef76([]);
51423
- const [approvalStatuses, setApprovalStatuses] = useState118({});
51424
- const [dialogs, setDialogs] = useState118([]);
51425
- const [dialogsNextCursor, setDialogsNextCursor] = useState118(null);
51426
- const [isDialogsLoading, setIsDialogsLoading] = useState118(false);
51427
- const [dialogsError, setDialogsError] = useState118(false);
51428
- const [isCreatingDialog, setIsCreatingDialog] = useState118(false);
51429
- const [messagesNextCursor, setMessagesNextCursor] = useState118(null);
51430
- const [isMessagesLoading, setIsMessagesLoading] = useState118(false);
51431
- const [dialogTokenUsage, setDialogTokenUsage] = useState118(
51399
+ const suppressAgentBusyRef = useRef75(0);
51400
+ const adoptTrailingAssistantRef = useRef75(false);
51401
+ const hasConnectedOnceRef = useRef75(false);
51402
+ const seenParticipantSeqsRef = useRef75(/* @__PURE__ */ new Set());
51403
+ const pendingEchoTextsRef = useRef75([]);
51404
+ const [approvalStatuses, setApprovalStatuses] = useState117({});
51405
+ const [dialogs, setDialogs] = useState117([]);
51406
+ const [dialogsNextCursor, setDialogsNextCursor] = useState117(null);
51407
+ const [isDialogsLoading, setIsDialogsLoading] = useState117(false);
51408
+ const [dialogsError, setDialogsError] = useState117(false);
51409
+ const [isCreatingDialog, setIsCreatingDialog] = useState117(false);
51410
+ const [messagesNextCursor, setMessagesNextCursor] = useState117(null);
51411
+ const [isMessagesLoading, setIsMessagesLoading] = useState117(false);
51412
+ const [dialogTokenUsage, setDialogTokenUsage] = useState117(
51432
51413
  null
51433
51414
  );
51434
- const [liveModel, setLiveModel] = useState118(null);
51435
- const [connectionState, setConnectionState] = useState118("connecting");
51415
+ const [liveModel, setLiveModel] = useState117(null);
51416
+ const [connectionState, setConnectionState] = useState117("connecting");
51436
51417
  const handleApprove = useCallback53(
51437
51418
  async (requestId) => {
51438
51419
  if (!approveRequestCallback) return;
@@ -51472,9 +51453,9 @@ function useNatsChatAdapter(config, options = {}) {
51472
51453
  },
51473
51454
  [rejectRequestCallback]
51474
51455
  );
51475
- const handleApproveRef = useRef76(handleApprove);
51456
+ const handleApproveRef = useRef75(handleApprove);
51476
51457
  handleApproveRef.current = handleApprove;
51477
- const handleRejectRef = useRef76(handleReject);
51458
+ const handleRejectRef = useRef75(handleReject);
51478
51459
  handleRejectRef.current = handleReject;
51479
51460
  const accumApprove = useCallback53((requestId) => {
51480
51461
  if (!requestId) return;
@@ -51484,7 +51465,7 @@ function useNatsChatAdapter(config, options = {}) {
51484
51465
  if (!requestId) return;
51485
51466
  return handleRejectRef.current(requestId);
51486
51467
  }, []);
51487
- const callbacksRef = useRef76({
51468
+ const callbacksRef = useRef75({
51488
51469
  onSegmentsUpdate: (segments, meta) => {
51489
51470
  if (meta?.append && meta.isCompacting) {
51490
51471
  setMessages((prev) => upsertTrailingCompaction(prev, segments));
@@ -51702,7 +51683,7 @@ function useNatsChatAdapter(config, options = {}) {
51702
51683
  onChunkReceived: (chunk) => processChunk(chunk),
51703
51684
  fetchChunks
51704
51685
  });
51705
- const historyLoadSeqRef = useRef76(0);
51686
+ const historyLoadSeqRef = useRef75(0);
51706
51687
  const loadDialogHistory = useCallback53(
51707
51688
  async (id, cursor) => {
51708
51689
  if (!fetchDialogMessages) return;
@@ -51761,8 +51742,8 @@ function useNatsChatAdapter(config, options = {}) {
51761
51742
  isBufferingActive
51762
51743
  ]
51763
51744
  );
51764
- const prevDialogIdRef = useRef76(void 0);
51765
- useEffect89(() => {
51745
+ const prevDialogIdRef = useRef75(void 0);
51746
+ useEffect88(() => {
51766
51747
  if (prevDialogIdRef.current === dialogId) return;
51767
51748
  prevDialogIdRef.current = dialogId;
51768
51749
  historyLoadSeqRef.current += 1;
@@ -51779,7 +51760,7 @@ function useNatsChatAdapter(config, options = {}) {
51779
51760
  if (!active || !dialogId) return;
51780
51761
  void loadDialogHistory(dialogId);
51781
51762
  }, [active, dialogId, loadDialogHistory, resetAccumulator]);
51782
- useEffect89(() => {
51763
+ useEffect88(() => {
51783
51764
  if (!active || !dialogId) return;
51784
51765
  suppressAgentBusyRef.current += 1;
51785
51766
  resetChunkTracking();
@@ -51831,14 +51812,14 @@ function useNatsChatAdapter(config, options = {}) {
51831
51812
  })();
51832
51813
  }
51833
51814
  });
51834
- useEffect89(() => {
51815
+ useEffect88(() => {
51835
51816
  if (!active || !dialogId) {
51836
51817
  setConnectionState("connected");
51837
51818
  return;
51838
51819
  }
51839
51820
  setConnectionState("connecting");
51840
51821
  }, [active, dialogId]);
51841
- const initialDialogsLoadedRef = useRef76(false);
51822
+ const initialDialogsLoadedRef = useRef75(false);
51842
51823
  const loadDialogsPage = useCallback53(
51843
51824
  async (cursor) => {
51844
51825
  if (!fetchDialogs) return;
@@ -51870,7 +51851,7 @@ function useNatsChatAdapter(config, options = {}) {
51870
51851
  const reloadDialogs = useCallback53(() => {
51871
51852
  void loadDialogsPage();
51872
51853
  }, [loadDialogsPage]);
51873
- useEffect89(() => {
51854
+ useEffect88(() => {
51874
51855
  if (!fetchDialogs) return;
51875
51856
  if (!active) return;
51876
51857
  if (initialDialogsLoadedRef.current) return;
@@ -52113,7 +52094,7 @@ function useNatsChatAdapter(config, options = {}) {
52113
52094
  }
52114
52095
 
52115
52096
  // src/components/chat/hooks/use-unified-chat.ts
52116
- import { useCallback as useCallback54, useMemo as useMemo47, useRef as useRef77 } from "react";
52097
+ import { useCallback as useCallback54, useMemo as useMemo47, useRef as useRef76 } from "react";
52117
52098
  var EMPTY_SSE_OPTIONS = {};
52118
52099
  function createDisabledNatsConfig() {
52119
52100
  return {
@@ -52128,7 +52109,7 @@ function createDisabledNatsConfig() {
52128
52109
  }
52129
52110
  function useUnifiedChat(options) {
52130
52111
  const { modes, activeMode, mingoStateOverride } = options;
52131
- const disabledNatsRef = useRef77(null);
52112
+ const disabledNatsRef = useRef76(null);
52132
52113
  if (disabledNatsRef.current === null) {
52133
52114
  disabledNatsRef.current = createDisabledNatsConfig();
52134
52115
  }
@@ -52142,7 +52123,7 @@ function useUnifiedChat(options) {
52142
52123
  { active: natsActive }
52143
52124
  );
52144
52125
  const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
52145
- const activeStateRef = useRef77(activeState);
52126
+ const activeStateRef = useRef76(activeState);
52146
52127
  activeStateRef.current = activeState;
52147
52128
  const stopMessage = useCallback54(() => activeStateRef.current.stopMessage(), []);
52148
52129
  const clearMessages = useCallback54(
@@ -52497,7 +52478,7 @@ function buildStreamFrames(messages) {
52497
52478
 
52498
52479
  // src/components/chat/embeddable-chat.tsx
52499
52480
  init_cn();
52500
- import { useCallback as useCallback56, useEffect as useEffect90, useMemo as useMemo49, useRef as useRef79, useState as useState120 } from "react";
52481
+ import { useCallback as useCallback56, useEffect as useEffect89, useMemo as useMemo49, useRef as useRef78, useState as useState119 } from "react";
52501
52482
  import * as DialogPrimitive4 from "@radix-ui/react-dialog";
52502
52483
  import { usePreventScroll as usePreventScroll6 } from "@react-aria/overlays";
52503
52484
  import { isIOS } from "@react-aria/utils";
@@ -52578,7 +52559,7 @@ init_button2();
52578
52559
  import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
52579
52560
 
52580
52561
  // src/components/chat/hooks/use-chat-dialog-manager.ts
52581
- import { useCallback as useCallback55, useMemo as useMemo48, useRef as useRef78, useState as useState119 } from "react";
52562
+ import { useCallback as useCallback55, useMemo as useMemo48, useRef as useRef77, useState as useState118 } from "react";
52582
52563
  function useChatDialogManager({
52583
52564
  dialogs,
52584
52565
  activeDialogId,
@@ -52589,8 +52570,8 @@ function useChatDialogManager({
52589
52570
  fetchArchivedDialogs,
52590
52571
  unarchiveDialog
52591
52572
  }) {
52592
- const [renameTarget, setRenameTarget] = useState119(null);
52593
- const [archiveTarget, setArchiveTarget] = useState119(null);
52573
+ const [renameTarget, setRenameTarget] = useState118(null);
52574
+ const [archiveTarget, setArchiveTarget] = useState118(null);
52594
52575
  const handleConfirmRename = useCallback55(
52595
52576
  (name) => {
52596
52577
  if (renameTarget) void renameDialog(renameTarget.id, name);
@@ -52613,12 +52594,12 @@ function useChatDialogManager({
52613
52594
  }
52614
52595
  setArchiveTarget(null);
52615
52596
  }, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
52616
- const [archiveOpen, setArchiveOpen] = useState119(false);
52617
- const [archivedDialogs, setArchivedDialogs] = useState119([]);
52618
- const [archivedCursor, setArchivedCursor] = useState119(null);
52619
- const [archivedLoading, setArchivedLoading] = useState119(false);
52620
- const [archivedPending, setArchivedPending] = useState119(false);
52621
- const archivedRequestIdRef = useRef78(0);
52597
+ const [archiveOpen, setArchiveOpen] = useState118(false);
52598
+ const [archivedDialogs, setArchivedDialogs] = useState118([]);
52599
+ const [archivedCursor, setArchivedCursor] = useState118(null);
52600
+ const [archivedLoading, setArchivedLoading] = useState118(false);
52601
+ const [archivedPending, setArchivedPending] = useState118(false);
52602
+ const archivedRequestIdRef = useRef77(0);
52622
52603
  const loadArchivedPage = useCallback55(
52623
52604
  async (cursor) => {
52624
52605
  if (!fetchArchivedDialogs) return;
@@ -52659,10 +52640,10 @@ function useChatDialogManager({
52659
52640
  void loadArchivedPage();
52660
52641
  }, [loadArchivedPage]);
52661
52642
  const closeArchive = useCallback55(() => setArchiveOpen(false), []);
52662
- const [viewingArchivedId, setViewingArchivedId] = useState119(
52643
+ const [viewingArchivedId, setViewingArchivedId] = useState118(
52663
52644
  null
52664
52645
  );
52665
- const [openingDialogId, setOpeningDialogId] = useState119(null);
52646
+ const [openingDialogId, setOpeningDialogId] = useState118(null);
52666
52647
  const handleSelectDialog = useCallback55(
52667
52648
  (id) => {
52668
52649
  setViewingArchivedId(null);
@@ -52681,7 +52662,7 @@ function useChatDialogManager({
52681
52662
  },
52682
52663
  [selectDialog]
52683
52664
  );
52684
- const [restoreTarget, setRestoreTarget] = useState119(null);
52665
+ const [restoreTarget, setRestoreTarget] = useState118(null);
52685
52666
  const handleConfirmRestore = useCallback55(async () => {
52686
52667
  if (restoreTarget) {
52687
52668
  try {
@@ -52774,9 +52755,9 @@ var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
52774
52755
  var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
52775
52756
  var RAIL_ANIM_MS = 320;
52776
52757
  function useRailPresence(open) {
52777
- const [mounted, setMounted] = useState120(open);
52778
- const [active, setActive] = useState120(false);
52779
- useEffect90(() => {
52758
+ const [mounted, setMounted] = useState119(open);
52759
+ const [active, setActive] = useState119(false);
52760
+ useEffect89(() => {
52780
52761
  if (open) {
52781
52762
  setMounted(true);
52782
52763
  let raf2 = 0;
@@ -52994,7 +52975,7 @@ function SourceChips({
52994
52975
  onClose,
52995
52976
  onDiscuss
52996
52977
  }) {
52997
- const [expanded, setExpanded] = useState120(false);
52978
+ const [expanded, setExpanded] = useState119(false);
52998
52979
  if (cited.length === 0) {
52999
52980
  const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
53000
52981
  if (fallback.length === 0) return null;
@@ -53101,7 +53082,7 @@ function EmbeddableChatInner({
53101
53082
  const commandsUrl = runtime.endpoints.commandsUrl;
53102
53083
  const { attachmentsEnabled, user: identityUser } = useChatIdentity();
53103
53084
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
53104
- useEffect90(() => {
53085
+ useEffect89(() => {
53105
53086
  if (process.env.NODE_ENV !== "production") {
53106
53087
  const hasOpen = open !== void 0;
53107
53088
  const hasHandler = onOpenChange !== void 0;
@@ -53117,13 +53098,13 @@ function EmbeddableChatInner({
53117
53098
  defaultProp: defaultOpen ?? false,
53118
53099
  onChange: onOpenChange
53119
53100
  });
53120
- const [autoFocusInput] = useState120(() => {
53101
+ const [autoFocusInput] = useState119(() => {
53121
53102
  if (typeof window === "undefined") return false;
53122
53103
  return !window.matchMedia("(pointer: coarse)").matches;
53123
53104
  });
53124
53105
  usePreventScroll6({ isDisabled: !isOpen || shellLess });
53125
- const navigatingAwayRef = useRef79(false);
53126
- useEffect90(() => {
53106
+ const navigatingAwayRef = useRef78(false);
53107
+ useEffect89(() => {
53127
53108
  if (!isOpen) return;
53128
53109
  if (shellLess) return;
53129
53110
  if (typeof window === "undefined") return;
@@ -53149,8 +53130,8 @@ function EmbeddableChatInner({
53149
53130
  window.scrollTo(0, scrollY);
53150
53131
  };
53151
53132
  }, [isOpen, shellLess]);
53152
- const chatInputRef = useRef79(null);
53153
- const [quickActionPreview, setQuickActionPreview] = useState120(null);
53133
+ const chatInputRef = useRef78(null);
53134
+ const [quickActionPreview, setQuickActionPreview] = useState119(null);
53154
53135
  const slashCommandsProp = useMemo49(
53155
53136
  () => ({
53156
53137
  fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
@@ -53193,7 +53174,7 @@ function EmbeddableChatInner({
53193
53174
  }, [mingoState, mingoDialogCapabilities, effectiveModes]);
53194
53175
  const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
53195
53176
  const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
53196
- const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState120(initialActiveMode);
53177
+ const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState119(initialActiveMode);
53197
53178
  const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
53198
53179
  const handleActiveModeChange = useCallback56(
53199
53180
  (next) => {
@@ -53253,8 +53234,8 @@ function EmbeddableChatInner({
53253
53234
  hasMoreMessages,
53254
53235
  loadMoreMessages
53255
53236
  } = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
53256
- const guidePromptSentRef = useRef79(false);
53257
- useEffect90(() => {
53237
+ const guidePromptSentRef = useRef78(false);
53238
+ useEffect89(() => {
53258
53239
  if (!guidePendingPrompt) {
53259
53240
  guidePromptSentRef.current = false;
53260
53241
  return;
@@ -53275,15 +53256,15 @@ function EmbeddableChatInner({
53275
53256
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
53276
53257
  const contextMaxItems = contextPicker?.maxItems ?? 10;
53277
53258
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
53278
- const [contextItems, setContextItems] = useState120([]);
53279
- const [contextPickerOpen, setContextPickerOpen] = useState120(false);
53280
- const [mentionQuery, setMentionQuery] = useState120(null);
53281
- const mentionActiveRef = useRef79(false);
53282
- useEffect90(() => {
53259
+ const [contextItems, setContextItems] = useState119([]);
53260
+ const [contextPickerOpen, setContextPickerOpen] = useState119(false);
53261
+ const [mentionQuery, setMentionQuery] = useState119(null);
53262
+ const mentionActiveRef = useRef78(false);
53263
+ useEffect89(() => {
53283
53264
  mentionActiveRef.current = mentionQuery !== null;
53284
53265
  }, [mentionQuery]);
53285
- const mentionKeysRef = useRef79(/* @__PURE__ */ new Set());
53286
- useEffect90(() => {
53266
+ const mentionKeysRef = useRef78(/* @__PURE__ */ new Set());
53267
+ useEffect89(() => {
53287
53268
  setContextItems([]);
53288
53269
  setMentionQuery(null);
53289
53270
  mentionKeysRef.current.clear();
@@ -53379,7 +53360,7 @@ function EmbeddableChatInner({
53379
53360
  () => effectiveAssistantIcon ? /* @__PURE__ */ jsx362(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx362(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
53380
53361
  [effectiveAssistantIcon]
53381
53362
  );
53382
- const timestampCacheRef = useRef79(/* @__PURE__ */ new Map());
53363
+ const timestampCacheRef = useRef78(/* @__PURE__ */ new Map());
53383
53364
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
53384
53365
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
53385
53366
  const messages = useMemo49(() => {
@@ -53506,7 +53487,7 @@ function EmbeddableChatInner({
53506
53487
  });
53507
53488
  const handleOpen = useCallback56(() => setIsOpen(true), [setIsOpen]);
53508
53489
  useCloseOnNavigation(handleNavigationClose, null);
53509
- useEffect90(() => {
53490
+ useEffect89(() => {
53510
53491
  const handler = (e) => {
53511
53492
  const detail = e.detail;
53512
53493
  if (!detail || detail.source !== source) return;
@@ -53516,7 +53497,7 @@ function EmbeddableChatInner({
53516
53497
  window.addEventListener("ask-ai:open-with-ref", handler);
53517
53498
  return () => window.removeEventListener("ask-ai:open-with-ref", handler);
53518
53499
  }, [source, discussRef, setIsOpen]);
53519
- useEffect90(() => {
53500
+ useEffect89(() => {
53520
53501
  const handler = (e) => {
53521
53502
  const detail = e.detail;
53522
53503
  if (!detail || detail.source !== source) return;
@@ -53533,7 +53514,7 @@ function EmbeddableChatInner({
53533
53514
  const contentViewKey = hasConversation ? "conversation" : activeMode;
53534
53515
  const isGuideEmpty = !hasConversation && activeMode === "guide";
53535
53516
  const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
53536
- useEffect90(() => {
53517
+ useEffect89(() => {
53537
53518
  if (!isQuickActionEmpty) setQuickActionPreview(null);
53538
53519
  }, [isQuickActionEmpty]);
53539
53520
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
@@ -53575,10 +53556,10 @@ function EmbeddableChatInner({
53575
53556
  const uncited = sources.filter((s) => !seenOrder.has(s.index));
53576
53557
  return { cited, uncited };
53577
53558
  }, [lastAssistantMsg, chatLoading]);
53578
- const [portalHost, setPortalHost] = useState120(null);
53579
- const [panelWidth, setPanelWidth] = useState120(0);
53580
- const panelMeasureRef = useRef79(null);
53581
- useEffect90(() => {
53559
+ const [portalHost, setPortalHost] = useState119(null);
53560
+ const [panelWidth, setPanelWidth] = useState119(0);
53561
+ const panelMeasureRef = useRef78(null);
53562
+ useEffect89(() => {
53582
53563
  const el = panelMeasureRef.current;
53583
53564
  if (!el || typeof ResizeObserver === "undefined") return;
53584
53565
  const ro = new ResizeObserver((entries) => {
@@ -53589,8 +53570,8 @@ function EmbeddableChatInner({
53589
53570
  setPanelWidth(el.clientWidth);
53590
53571
  return () => ro.disconnect();
53591
53572
  }, []);
53592
- const [railCollapsed, setRailCollapsed] = useState120(false);
53593
- useEffect90(() => {
53573
+ const [railCollapsed, setRailCollapsed] = useState119(false);
53574
+ useEffect89(() => {
53594
53575
  try {
53595
53576
  if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
53596
53577
  setRailCollapsed(true);
@@ -53607,15 +53588,15 @@ function EmbeddableChatInner({
53607
53588
  return next;
53608
53589
  });
53609
53590
  }, []);
53610
- const [railSearchOpen, setRailSearchOpen] = useState120(false);
53591
+ const [railSearchOpen, setRailSearchOpen] = useState119(false);
53611
53592
  const splitEligible = activeMode === "mingo";
53612
53593
  const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
53613
53594
  const wideMingo = splitEligible && canSplit && !previewMode;
53614
53595
  const splitActive = wideMingo && !railCollapsed;
53615
53596
  const railPresence = useRailPresence(splitActive);
53616
53597
  const showWideHeader = wideMingo || railPresence.mounted;
53617
- const [composeOpen, setComposeOpen] = useState120(false);
53618
- useEffect90(() => {
53598
+ const [composeOpen, setComposeOpen] = useState119(false);
53599
+ useEffect89(() => {
53619
53600
  if (hasConversation) setComposeOpen(false);
53620
53601
  }, [hasConversation]);
53621
53602
  const isMingoMode = activeMode === "mingo";
@@ -55135,4 +55116,4 @@ export {
55135
55116
  LogsList,
55136
55117
  assets
55137
55118
  };
55138
- //# sourceMappingURL=chunk-KUVFE5WC.js.map
55119
+ //# sourceMappingURL=chunk-XFH7PMGS.js.map