@flamingo-stack/openframe-frontend-core 0.0.551 → 0.0.552

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 (96) hide show
  1. package/dist/{chunk-V5PDJFZS.js → chunk-4DD3223G.js} +6 -6
  2. package/dist/{chunk-MEY3PYOL.cjs → chunk-4XG7TG7B.cjs} +7 -7
  3. package/dist/{chunk-MEY3PYOL.cjs.map → chunk-4XG7TG7B.cjs.map} +1 -1
  4. package/dist/{chunk-ZYQAFJLF.cjs → chunk-6J6Q5QEM.cjs} +4 -4
  5. package/dist/{chunk-ZYQAFJLF.cjs.map → chunk-6J6Q5QEM.cjs.map} +1 -1
  6. package/dist/{chunk-AK4LW6PF.cjs → chunk-6MHMEF5W.cjs} +39 -39
  7. package/dist/{chunk-AK4LW6PF.cjs.map → chunk-6MHMEF5W.cjs.map} +1 -1
  8. package/dist/{chunk-2YLMNXLB.js → chunk-6XOJTTWY.js} +2 -2
  9. package/dist/{chunk-RJFD55SK.js → chunk-7MPOW46J.js} +2 -2
  10. package/dist/{chunk-SWDTM5O6.js → chunk-7TRIUG7Q.js} +5 -5
  11. package/dist/{chunk-TXFJFO4A.js → chunk-BFOXIIM4.js} +2 -2
  12. package/dist/{chunk-EFNDA2CG.js → chunk-CMDPARDV.js} +2 -2
  13. package/dist/{chunk-ZDWWXME5.cjs → chunk-DOPZ5LCH.cjs} +14 -14
  14. package/dist/{chunk-ZDWWXME5.cjs.map → chunk-DOPZ5LCH.cjs.map} +1 -1
  15. package/dist/{chunk-PPPIBTCO.cjs → chunk-HK5YRHEN.cjs} +9 -9
  16. package/dist/{chunk-PPPIBTCO.cjs.map → chunk-HK5YRHEN.cjs.map} +1 -1
  17. package/dist/{chunk-IFH47QXW.js → chunk-KSGQG6WU.js} +2 -2
  18. package/dist/{chunk-V3HNIPTE.cjs → chunk-MVE2YQVG.cjs} +20 -20
  19. package/dist/{chunk-V3HNIPTE.cjs.map → chunk-MVE2YQVG.cjs.map} +1 -1
  20. package/dist/{chunk-T2JKOG6K.cjs → chunk-OVQ3O66O.cjs} +5 -5
  21. package/dist/{chunk-T2JKOG6K.cjs.map → chunk-OVQ3O66O.cjs.map} +1 -1
  22. package/dist/{chunk-O24VSDVN.cjs → chunk-PVPXI5V6.cjs} +31 -31
  23. package/dist/{chunk-O24VSDVN.cjs.map → chunk-PVPXI5V6.cjs.map} +1 -1
  24. package/dist/{chunk-NVK7YZHN.js → chunk-RJEP74Z4.js} +2 -2
  25. package/dist/{chunk-H4RHXJHF.js → chunk-RJSDYOFD.js} +2 -2
  26. package/dist/{chunk-H4OIDXP4.cjs → chunk-RMTTW7LG.cjs} +27 -27
  27. package/dist/{chunk-H4OIDXP4.cjs.map → chunk-RMTTW7LG.cjs.map} +1 -1
  28. package/dist/{chunk-NRTKEPUX.cjs → chunk-RMWLUKTC.cjs} +11 -11
  29. package/dist/{chunk-NRTKEPUX.cjs.map → chunk-RMWLUKTC.cjs.map} +1 -1
  30. package/dist/{chunk-EZIKNMYV.js → chunk-SIXNMDYY.js} +2 -2
  31. package/dist/{chunk-YA5JDHWE.cjs → chunk-SXXIV7IL.cjs} +86 -86
  32. package/dist/{chunk-YA5JDHWE.cjs.map → chunk-SXXIV7IL.cjs.map} +1 -1
  33. package/dist/{chunk-JI4JR3KC.js → chunk-TI75367M.js} +234 -205
  34. package/dist/{chunk-JI4JR3KC.js.map → chunk-TI75367M.js.map} +1 -1
  35. package/dist/{chunk-YEXTFNVE.js → chunk-WXDDPK7T.js} +4 -4
  36. package/dist/{chunk-CPADTPX4.cjs → chunk-X4RCWYYF.cjs} +825 -796
  37. package/dist/chunk-X4RCWYYF.cjs.map +1 -0
  38. package/dist/{chunk-MKDL3S4U.cjs → chunk-XEOZB5DX.cjs} +3 -3
  39. package/dist/{chunk-MKDL3S4U.cjs.map → chunk-XEOZB5DX.cjs.map} +1 -1
  40. package/dist/{chunk-72ZPQTPN.cjs → chunk-Y64725GI.cjs} +61 -61
  41. package/dist/{chunk-72ZPQTPN.cjs.map → chunk-Y64725GI.cjs.map} +1 -1
  42. package/dist/{chunk-OMSEQDCU.js → chunk-Y6PD76R6.js} +2 -2
  43. package/dist/{chunk-MVK7SNVO.js → chunk-Z5UK7SKC.js} +4 -4
  44. package/dist/components/case-studies/index.cjs +8 -8
  45. package/dist/components/case-studies/index.js +2 -2
  46. package/dist/components/chat/index.cjs +2 -2
  47. package/dist/components/chat/index.js +1 -1
  48. package/dist/components/contact/index.cjs +3 -3
  49. package/dist/components/contact/index.js +2 -2
  50. package/dist/components/docs/index.cjs +5 -5
  51. package/dist/components/docs/index.js +4 -4
  52. package/dist/components/embeds/index.cjs +3 -3
  53. package/dist/components/embeds/index.js +2 -2
  54. package/dist/components/faq/index.cjs +3 -3
  55. package/dist/components/faq/index.js +2 -2
  56. package/dist/components/features/index.cjs +2 -2
  57. package/dist/components/features/index.js +1 -1
  58. package/dist/components/features/use-ios-native-video-fullscreen.d.ts +4 -0
  59. package/dist/components/features/use-ios-native-video-fullscreen.d.ts.map +1 -0
  60. package/dist/components/features/video.d.ts.map +1 -1
  61. package/dist/components/help-center-pages/index.cjs +22 -22
  62. package/dist/components/help-center-pages/index.js +13 -13
  63. package/dist/components/index.cjs +131 -131
  64. package/dist/components/index.js +11 -11
  65. package/dist/components/meeting-scheduler/index.cjs +28 -28
  66. package/dist/components/meeting-scheduler/index.js +3 -3
  67. package/dist/components/navigation/index.cjs +2 -2
  68. package/dist/components/navigation/index.js +1 -1
  69. package/dist/components/onboarding-guides/index.cjs +5 -5
  70. package/dist/components/onboarding-guides/index.js +4 -4
  71. package/dist/components/related-content/index.cjs +3 -3
  72. package/dist/components/related-content/index.js +2 -2
  73. package/dist/components/tickets/index.cjs +6 -6
  74. package/dist/components/tickets/index.js +5 -5
  75. package/dist/components/ui/index.cjs +2 -2
  76. package/dist/components/ui/index.js +1 -1
  77. package/dist/index.cjs +2 -2
  78. package/dist/index.js +1 -1
  79. package/package.json +1 -1
  80. package/src/components/features/__tests__/use-ios-native-video-fullscreen.test.tsx +116 -0
  81. package/src/components/features/use-ios-native-video-fullscreen.ts +89 -0
  82. package/src/components/features/video.tsx +5 -0
  83. package/dist/chunk-CPADTPX4.cjs.map +0 -1
  84. /package/dist/{chunk-V5PDJFZS.js.map → chunk-4DD3223G.js.map} +0 -0
  85. /package/dist/{chunk-2YLMNXLB.js.map → chunk-6XOJTTWY.js.map} +0 -0
  86. /package/dist/{chunk-RJFD55SK.js.map → chunk-7MPOW46J.js.map} +0 -0
  87. /package/dist/{chunk-SWDTM5O6.js.map → chunk-7TRIUG7Q.js.map} +0 -0
  88. /package/dist/{chunk-TXFJFO4A.js.map → chunk-BFOXIIM4.js.map} +0 -0
  89. /package/dist/{chunk-EFNDA2CG.js.map → chunk-CMDPARDV.js.map} +0 -0
  90. /package/dist/{chunk-IFH47QXW.js.map → chunk-KSGQG6WU.js.map} +0 -0
  91. /package/dist/{chunk-NVK7YZHN.js.map → chunk-RJEP74Z4.js.map} +0 -0
  92. /package/dist/{chunk-H4RHXJHF.js.map → chunk-RJSDYOFD.js.map} +0 -0
  93. /package/dist/{chunk-EZIKNMYV.js.map → chunk-SIXNMDYY.js.map} +0 -0
  94. /package/dist/{chunk-YEXTFNVE.js.map → chunk-WXDDPK7T.js.map} +0 -0
  95. /package/dist/{chunk-OMSEQDCU.js.map → chunk-Y6PD76R6.js.map} +0 -0
  96. /package/dist/{chunk-MVK7SNVO.js.map → chunk-Z5UK7SKC.js.map} +0 -0
@@ -13615,7 +13615,7 @@ var TabsContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PUR
13615
13615
  TabsContent.displayName = TabsPrimitive.Content.displayName;
13616
13616
 
13617
13617
  // src/components/features/video.tsx
13618
- import { useCallback as useCallback13, useEffect as useEffect24, useImperativeHandle as useImperativeHandle3, useMemo as useMemo19, useRef as useRef20, useState as useState29 } from "react";
13618
+ import { useCallback as useCallback13, useEffect as useEffect25, useImperativeHandle as useImperativeHandle3, useMemo as useMemo19, useRef as useRef20, useState as useState29 } from "react";
13619
13619
  import MuxPlayer from "@mux/mux-player-react";
13620
13620
 
13621
13621
  // src/components/features/video-center-badge.tsx
@@ -13670,8 +13670,36 @@ function fetchPriorityProp(priority) {
13670
13670
  return USE_CAMEL_CASE_FETCH_PRIORITY ? { fetchPriority: value } : { fetchpriority: value };
13671
13671
  }
13672
13672
 
13673
- // src/components/features/use-video-warmup.ts
13673
+ // src/components/features/use-ios-native-video-fullscreen.ts
13674
13674
  import { useEffect as useEffect23 } from "react";
13675
+ var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
13676
+ function isIosAppShell() {
13677
+ const capacitor = globalThis.Capacitor;
13678
+ return capacitor?.isNativePlatform?.() === true && capacitor.getPlatform?.() === "ios";
13679
+ }
13680
+ function nativeVideoElement(player) {
13681
+ const media = player.media;
13682
+ const element = media?.nativeEl ?? media;
13683
+ return element instanceof HTMLVideoElement ? element : null;
13684
+ }
13685
+ function useIosNativeVideoFullscreen(playerRef) {
13686
+ useEffect23(() => {
13687
+ if (!isIosAppShell()) return;
13688
+ const player = playerRef.current;
13689
+ if (!(player instanceof EventTarget)) return;
13690
+ const takeOver = (event) => {
13691
+ const video = nativeVideoElement(player);
13692
+ if (!video?.webkitSupportsFullscreen || typeof video.webkitEnterFullscreen !== "function") return;
13693
+ event.stopImmediatePropagation();
13694
+ video.webkitEnterFullscreen();
13695
+ };
13696
+ player.addEventListener(ENTER_FULLSCREEN_REQUEST, takeOver, true);
13697
+ return () => player.removeEventListener(ENTER_FULLSCREEN_REQUEST, takeOver, true);
13698
+ }, [playerRef]);
13699
+ }
13700
+
13701
+ // src/components/features/use-video-warmup.ts
13702
+ import { useEffect as useEffect24 } from "react";
13675
13703
  import ReactDOM from "react-dom";
13676
13704
 
13677
13705
  // src/components/features/mux-origins.ts
@@ -13723,7 +13751,7 @@ function useVideoWarmup({
13723
13751
  const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
13724
13752
  useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
13725
13753
  const { ref, isNear } = useNearViewport(nearMargin);
13726
- useEffect23(() => {
13754
+ useEffect24(() => {
13727
13755
  if (!isNear || !videoUrl || !resolvedOrigin) return;
13728
13756
  if (saveDataEnabled()) return;
13729
13757
  let videoOrigin;
@@ -14007,7 +14035,7 @@ function FilePlayer({
14007
14035
  perfListenerRef.current = null;
14008
14036
  }
14009
14037
  }, []);
14010
- useEffect24(() => clearPerfListener, [clearPerfListener]);
14038
+ useEffect25(() => clearPerfListener, [clearPerfListener]);
14011
14039
  const hoverActiveRef = useRef20(false);
14012
14040
  const hoverGenerationRef = useRef20(0);
14013
14041
  const activationWaiterRef = useRef20(null);
@@ -14017,7 +14045,7 @@ function FilePlayer({
14017
14045
  activationWaiterRef.current = null;
14018
14046
  }
14019
14047
  }, []);
14020
- useEffect24(() => clearActivationWaiter, [clearActivationWaiter]);
14048
+ useEffect25(() => clearActivationWaiter, [clearActivationWaiter]);
14021
14049
  const startHoverPlayback = useCallback13(() => {
14022
14050
  hoverActiveRef.current = true;
14023
14051
  const generation = ++hoverGenerationRef.current;
@@ -14107,7 +14135,7 @@ function FilePlayer({
14107
14135
  setHoverMutedFallback(false);
14108
14136
  }, []);
14109
14137
  const hoverControlled = typeof playWhenHovered === "boolean";
14110
- useEffect24(() => {
14138
+ useEffect25(() => {
14111
14139
  if (!hoverControlled) return;
14112
14140
  if (playWhenHovered) startHoverPlayback();
14113
14141
  else stopHoverPlayback();
@@ -14118,14 +14146,14 @@ function FilePlayer({
14118
14146
  mutedIntentRef.current = mutedIntent;
14119
14147
  const onMutedFallbackChangeRef = useRef20(onMutedFallbackChange);
14120
14148
  onMutedFallbackChangeRef.current = onMutedFallbackChange;
14121
- useEffect24(() => {
14149
+ useEffect25(() => {
14122
14150
  onMutedFallbackChangeRef.current?.({
14123
14151
  muted: hoverMutedFallback,
14124
14152
  blocked: hoverMutedFallback && mutedFallbackBlocked
14125
14153
  });
14126
14154
  }, [hoverMutedFallback, mutedFallbackBlocked]);
14127
14155
  const autoPlayKickedRef = useRef20(false);
14128
- useEffect24(() => {
14156
+ useEffect25(() => {
14129
14157
  if (autoPlayKickedRef.current) return;
14130
14158
  if (startMuted) {
14131
14159
  const mutedEl = hoverPlayerRef.current;
@@ -14172,7 +14200,7 @@ function FilePlayer({
14172
14200
  } catch {
14173
14201
  }
14174
14202
  }, [autoPlayUnmuted, startMuted, autoPlay]);
14175
- useEffect24(() => {
14203
+ useEffect25(() => {
14176
14204
  const el = hoverPlayerRef.current;
14177
14205
  if (!el?.addEventListener) return;
14178
14206
  const onVolumeChange = () => {
@@ -14192,7 +14220,7 @@ function FilePlayer({
14192
14220
  }
14193
14221
  };
14194
14222
  }, []);
14195
- useEffect24(() => {
14223
+ useEffect25(() => {
14196
14224
  const el = hoverPlayerRef.current;
14197
14225
  if (!el?.addEventListener) return;
14198
14226
  const onPlaying = () => setMutedFallbackBlocked(false);
@@ -14209,7 +14237,7 @@ function FilePlayer({
14209
14237
  }, []);
14210
14238
  const onEndedRef = useRef20(onEnded);
14211
14239
  onEndedRef.current = onEnded;
14212
- useEffect24(() => {
14240
+ useEffect25(() => {
14213
14241
  const el = hoverPlayerRef.current;
14214
14242
  if (!el?.addEventListener) return;
14215
14243
  const handler = () => onEndedRef.current?.();
@@ -14224,6 +14252,7 @@ function FilePlayer({
14224
14252
  }
14225
14253
  };
14226
14254
  }, []);
14255
+ useIosNativeVideoFullscreen(hoverPlayerRef);
14227
14256
  useImperativeHandle3(playerHandleRef, () => ({
14228
14257
  getCurrentTime: () => hoverPlayerRef.current?.currentTime ?? 0,
14229
14258
  getDuration: () => {
@@ -14386,14 +14415,14 @@ function YouTubeFacadeInner({
14386
14415
  return `${YT_NOCOOKIE_ORIGIN}/embed/${videoId}?${params.toString()}`;
14387
14416
  }, [videoId, minimalControls]);
14388
14417
  const [posterTier, setPosterTier] = useState29(0);
14389
- useEffect24(() => {
14418
+ useEffect25(() => {
14390
14419
  setPosterTier(0);
14391
14420
  }, [videoId]);
14392
14421
  const posterQuality = YT_POSTER_TIERS[posterTier];
14393
14422
  const posterJpg = `https://i.ytimg.com/vi/${videoId}/${posterQuality}.jpg`;
14394
14423
  const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/${posterQuality}.webp`;
14395
14424
  const handlePosterError = () => setPosterTier((tier) => Math.min(tier + 1, YT_POSTER_TIERS.length - 1));
14396
- useEffect24(() => {
14425
+ useEffect25(() => {
14397
14426
  if (!activated) return;
14398
14427
  const iframe = iframeRef.current;
14399
14428
  if (!iframe) return;
@@ -14438,7 +14467,7 @@ function YouTubeFacadeInner({
14438
14467
  };
14439
14468
  }, [activated]);
14440
14469
  const prevSuspendedRef = useRef20(false);
14441
- useEffect24(() => {
14470
+ useEffect25(() => {
14442
14471
  const wasSuspended = prevSuspendedRef.current;
14443
14472
  prevSuspendedRef.current = Boolean(suspended);
14444
14473
  if (!activated) return;
@@ -14500,7 +14529,7 @@ import { useMemo as useMemo21, useState as useState32 } from "react";
14500
14529
 
14501
14530
  // src/components/features/video-hover-preview.tsx
14502
14531
  init_cn();
14503
- import { useEffect as useEffect25, useRef as useRef21, useState as useState30 } from "react";
14532
+ import { useEffect as useEffect26, useRef as useRef21, useState as useState30 } from "react";
14504
14533
  import { Fragment as Fragment21, jsx as jsx90, jsxs as jsxs66 } from "react/jsx-runtime";
14505
14534
  function VideoHoverPreviewSurface({
14506
14535
  url,
@@ -14527,7 +14556,7 @@ function VideoHoverPreviewSurface({
14527
14556
  const gateControlled = playerMounted !== void 0;
14528
14557
  const rootElRef = useRef21(null);
14529
14558
  const [isNear, setIsNear] = useState30(false);
14530
- useEffect25(() => {
14559
+ useEffect26(() => {
14531
14560
  if (gateControlled) return;
14532
14561
  const el = rootElRef.current;
14533
14562
  if (!el || typeof IntersectionObserver === "undefined") return;
@@ -14722,7 +14751,7 @@ function sortBitesByCreatedAtDesc(a, b) {
14722
14751
 
14723
14752
  // src/components/features/cards-strip.tsx
14724
14753
  init_cn();
14725
- import React41, { useCallback as useCallback14, useEffect as useEffect26, useMemo as useMemo20, useRef as useRef22, useState as useState31 } from "react";
14754
+ import React41, { useCallback as useCallback14, useEffect as useEffect27, useMemo as useMemo20, useRef as useRef22, useState as useState31 } from "react";
14726
14755
  init_button2();
14727
14756
 
14728
14757
  // src/components/layout/page-heading.tsx
@@ -14809,7 +14838,7 @@ function CardsStrip(props) {
14809
14838
  const items = childrenMode ? childItems : props.items;
14810
14839
  const cardWidthDesktop = childrenMode ? props.cardWidthDesktop ?? 400 : 0;
14811
14840
  const cardWidthMobile = childrenMode ? props.cardWidthMobile ?? 320 : 0;
14812
- useEffect26(() => {
14841
+ useEffect27(() => {
14813
14842
  if (process.env.NODE_ENV === "production" || !childrenMode) return;
14814
14843
  const only = childItems.length === 1 ? childItems[0] : null;
14815
14844
  if (React41.isValidElement(only) && only.type === React41.Fragment) {
@@ -14830,7 +14859,7 @@ function CardsStrip(props) {
14830
14859
  const [reducedMotion, setReducedMotion] = useState31(false);
14831
14860
  const [isTouch, setIsTouch] = useState31(false);
14832
14861
  const [isMobile, setIsMobile] = useState31(false);
14833
- useEffect26(() => {
14862
+ useEffect27(() => {
14834
14863
  const subs = [];
14835
14864
  const watch = (query, set) => {
14836
14865
  const mq = window.matchMedia(query);
@@ -14858,7 +14887,7 @@ function CardsStrip(props) {
14858
14887
  setOverflows(singleCopy > scroller.clientWidth + 1);
14859
14888
  setMarqueeEligible(singleCopy > scroller.clientWidth + TRACK_GAP_PX);
14860
14889
  }, []);
14861
- useEffect26(() => {
14890
+ useEffect27(() => {
14862
14891
  measure();
14863
14892
  const scroller = scrollerRef.current;
14864
14893
  const track = trackRef.current;
@@ -14871,7 +14900,7 @@ function CardsStrip(props) {
14871
14900
  const chevronSuppressUntilRef = useRef22(0);
14872
14901
  const userScrollSuppressUntilRef = useRef22(0);
14873
14902
  const [nearViewport, setNearViewport] = useState31(true);
14874
- useEffect26(() => {
14903
+ useEffect27(() => {
14875
14904
  const el = wrapperRef.current;
14876
14905
  if (!el || typeof IntersectionObserver === "undefined") return;
14877
14906
  const io = new IntersectionObserver(
@@ -14957,7 +14986,7 @@ function CardsStrip(props) {
14957
14986
  const cardObserverRef = useRef22(null);
14958
14987
  const cardElIdxRef = useRef22(/* @__PURE__ */ new Map());
14959
14988
  const cardElNearRef = useRef22(/* @__PURE__ */ new Map());
14960
- useEffect26(() => {
14989
+ useEffect27(() => {
14961
14990
  if (typeof IntersectionObserver === "undefined") return;
14962
14991
  const io = new IntersectionObserver((entries) => {
14963
14992
  for (const e of entries) cardElNearRef.current.set(e.target, e.isIntersecting);
@@ -17174,7 +17203,7 @@ function AvatarStack({
17174
17203
  init_button();
17175
17204
 
17176
17205
  // src/components/ui/image-gallery-modal.tsx
17177
- import { useState as useState115, useEffect as useEffect87 } from "react";
17206
+ import { useState as useState115, useEffect as useEffect88 } from "react";
17178
17207
 
17179
17208
  // src/components/ui/allowed-domains-input.tsx
17180
17209
  init_cn();
@@ -17343,7 +17372,7 @@ function AnnouncementBarView({
17343
17372
  // src/components/ui/autocomplete.tsx
17344
17373
  import {
17345
17374
  forwardRef as forwardRef31,
17346
- useEffect as useEffect27,
17375
+ useEffect as useEffect28,
17347
17376
  useImperativeHandle as useImperativeHandle4,
17348
17377
  useMemo as useMemo23,
17349
17378
  useRef as useRef24,
@@ -17542,7 +17571,7 @@ function AutocompleteInner(props, ref) {
17542
17571
  const hiddenTagsCount = multiple ? selectedOptions.length - visibleCount : 0;
17543
17572
  const [showHiddenTags, setShowHiddenTags] = useState34(false);
17544
17573
  const hiddenTagsRef = useRef24(null);
17545
- useEffect27(() => {
17574
+ useEffect28(() => {
17546
17575
  if (!showHiddenTags) return;
17547
17576
  const handleClick = (e) => {
17548
17577
  const target = e.target;
@@ -17594,7 +17623,7 @@ function AutocompleteInner(props, ref) {
17594
17623
  setIsOpen(false);
17595
17624
  onCreateOption?.(trimmed);
17596
17625
  };
17597
- useEffect27(() => {
17626
+ useEffect28(() => {
17598
17627
  setHighlightedIndex(-1);
17599
17628
  }, [filteredOptions.length]);
17600
17629
  const handleInputChange = (e) => {
@@ -19230,7 +19259,7 @@ function DateFilterMenu({
19230
19259
 
19231
19260
  // src/components/ui/duration-input.tsx
19232
19261
  init_cn();
19233
- import { Fragment as Fragment31, useEffect as useEffect29, useRef as useRef25, useState as useState36 } from "react";
19262
+ import { Fragment as Fragment31, useEffect as useEffect30, useRef as useRef25, useState as useState36 } from "react";
19234
19263
  import { jsx as jsx118, jsxs as jsxs89 } from "react/jsx-runtime";
19235
19264
  var SEGMENT_META = [
19236
19265
  { label: "Hours", placeholder: "HH", max: 99 },
@@ -19246,7 +19275,7 @@ var split = (value) => {
19246
19275
  function DurationInput({ value, onChange, invalid, className }) {
19247
19276
  const [segments, setSegments] = useState36(() => split(value));
19248
19277
  const refs = [useRef25(null), useRef25(null), useRef25(null)];
19249
- useEffect29(() => {
19278
+ useEffect30(() => {
19250
19279
  setSegments((prev) => compose(prev) === value ? prev : split(value));
19251
19280
  }, [value]);
19252
19281
  const focusSegment = (i) => {
@@ -19491,7 +19520,7 @@ init_cn();
19491
19520
  import React52 from "react";
19492
19521
 
19493
19522
  // src/components/ui/progress-bar.tsx
19494
- import { useEffect as useEffect30, useRef as useRef26, useState as useState37 } from "react";
19523
+ import { useEffect as useEffect31, useRef as useRef26, useState as useState37 } from "react";
19495
19524
  import { jsx as jsx123 } from "react/jsx-runtime";
19496
19525
  var ProgressBar = ({
19497
19526
  progress,
@@ -19509,7 +19538,7 @@ var ProgressBar = ({
19509
19538
  const effectiveHeight = isMdUp ? height : mobileHeight;
19510
19539
  const containerRef = useRef26(null);
19511
19540
  const [segmentCount, setSegmentCount] = useState37(0);
19512
- useEffect30(() => {
19541
+ useEffect31(() => {
19513
19542
  if (!containerRef.current) return;
19514
19543
  const resizeObserver = new ResizeObserver(() => {
19515
19544
  if (containerRef.current) {
@@ -21652,13 +21681,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
21652
21681
  // src/components/ui/modal.tsx
21653
21682
  init_cn();
21654
21683
  import * as React68 from "react";
21655
- import { useEffect as useEffect35 } from "react";
21684
+ import { useEffect as useEffect36 } from "react";
21656
21685
  import { usePreventScroll } from "@react-aria/overlays";
21657
21686
  import { jsx as jsx145, jsxs as jsxs111 } from "react/jsx-runtime";
21658
21687
  var Modal2 = React68.forwardRef(
21659
21688
  ({ isOpen, onClose, children, className }, ref) => {
21660
21689
  usePreventScroll({ isDisabled: !isOpen });
21661
- useEffect35(() => {
21690
+ useEffect36(() => {
21662
21691
  const handleKeyDown = (event) => {
21663
21692
  if (event.key === "Escape") {
21664
21693
  onClose();
@@ -22888,7 +22917,7 @@ function TabContent({
22888
22917
  // src/components/ui/tab-navigation.tsx
22889
22918
  init_next_navigation();
22890
22919
  init_cn();
22891
- import { useState as useState47, useEffect as useEffect38, useLayoutEffect as useLayoutEffect7, useDeferredValue, useMemo as useMemo28, useRef as useRef30, useCallback as useCallback20, memo as memo4, startTransition } from "react";
22920
+ import { useState as useState47, useEffect as useEffect39, useLayoutEffect as useLayoutEffect7, useDeferredValue, useMemo as useMemo28, useRef as useRef30, useCallback as useCallback20, memo as memo4, startTransition } from "react";
22892
22921
  import { Fragment as Fragment34, jsx as jsx157, jsxs as jsxs121 } from "react/jsx-runtime";
22893
22922
  var HIDDEN_INDICATOR = { left: 0, width: 0 };
22894
22923
  var StatusDot = ({ indicator, className }) => /* @__PURE__ */ jsx157("div", { className: cn(
@@ -22932,7 +22961,7 @@ var TabBar = memo4(function TabBar2({
22932
22961
  useLayoutEffect7(() => {
22933
22962
  if (indicator.width > 0) hasPlacedIndicatorRef.current = true;
22934
22963
  }, [indicator]);
22935
- useEffect38(() => {
22964
+ useEffect39(() => {
22936
22965
  const el = scrollRef.current;
22937
22966
  if (!el) return;
22938
22967
  updateScrollShadows();
@@ -22965,7 +22994,7 @@ var TabBar = memo4(function TabBar2({
22965
22994
  ro.disconnect();
22966
22995
  };
22967
22996
  }, [updateScrollShadows, measureIndicator]);
22968
- useEffect38(() => {
22997
+ useEffect39(() => {
22969
22998
  const el = scrollRef.current;
22970
22999
  const active = activeTabRef.current;
22971
23000
  if (!el || !active) return;
@@ -23101,7 +23130,7 @@ function TabNavigation({
23101
23130
  const activeTab = isUrlSyncEnabled ? internalActiveTab : controlledActiveTab || "";
23102
23131
  const lastSyncedUrlTabRef = useRef30(urlTab);
23103
23132
  const inFlightUrlTabsRef = useRef30([]);
23104
- useEffect38(() => {
23133
+ useEffect39(() => {
23105
23134
  if (!isUrlSyncEnabled) return;
23106
23135
  const landed = inFlightUrlTabsRef.current.indexOf(urlTab);
23107
23136
  if (landed !== -1) {
@@ -23120,7 +23149,7 @@ function TabNavigation({
23120
23149
  setInternalActiveTab(validTabIds.has(urlTab) ? urlTab : fallbackTab);
23121
23150
  }, [isUrlSyncEnabled, urlTab, validTabIds, fallbackTab]);
23122
23151
  const navRef = useRef30({ isUrlSyncEnabled, controlledOnTabChange, searchParams, pathname, paramName, replaceState });
23123
- useEffect38(() => {
23152
+ useEffect39(() => {
23124
23153
  navRef.current = { isUrlSyncEnabled, controlledOnTabChange, searchParams, pathname, paramName, replaceState };
23125
23154
  });
23126
23155
  const handleTabChange = useCallback20((tabId) => {
@@ -23225,7 +23254,7 @@ function AIGeneratedBadge({ className }) {
23225
23254
  }
23226
23255
 
23227
23256
  // src/components/ui/fade-preview.tsx
23228
- import { useState as useState48, useRef as useRef31, useEffect as useEffect39 } from "react";
23257
+ import { useState as useState48, useRef as useRef31, useEffect as useEffect40 } from "react";
23229
23258
  import { ChevronDown as ChevronDown4 } from "lucide-react";
23230
23259
  import { Fragment as Fragment35, jsx as jsx160, jsxs as jsxs123 } from "react/jsx-runtime";
23231
23260
  function FadePreview({
@@ -23236,7 +23265,7 @@ function FadePreview({
23236
23265
  }) {
23237
23266
  const [expanded, setExpanded] = useState48(false);
23238
23267
  const contentRef = useRef31(null);
23239
- useEffect39(() => {
23268
+ useEffect40(() => {
23240
23269
  setExpanded(false);
23241
23270
  }, [resetKey]);
23242
23271
  const needsFade = hiddenCount > 0;
@@ -23340,7 +23369,7 @@ function useRichMarkdownRuntime() {
23340
23369
  }
23341
23370
 
23342
23371
  // src/components/embeds/reddit-embed-client.tsx
23343
- import { useState as useState50, useEffect as useEffect41, useRef as useRef33 } from "react";
23372
+ import { useState as useState50, useEffect as useEffect42, useRef as useRef33 } from "react";
23344
23373
 
23345
23374
  // src/utils/social-embed-cache.ts
23346
23375
  var dataCache = /* @__PURE__ */ new Map();
@@ -23416,7 +23445,7 @@ var socialCache = SocialEmbedCache.getInstance();
23416
23445
 
23417
23446
  // src/components/media-carousel.tsx
23418
23447
  init_cn();
23419
- import { useState as useState49, useRef as useRef32, useEffect as useEffect40, memo as memo5, useCallback as useCallback21 } from "react";
23448
+ import { useState as useState49, useRef as useRef32, useEffect as useEffect41, memo as memo5, useCallback as useCallback21 } from "react";
23420
23449
  init_button2();
23421
23450
  import { Fragment as Fragment36, jsx as jsx163, jsxs as jsxs124 } from "react/jsx-runtime";
23422
23451
  var ChevronLeftIcon = () => /* @__PURE__ */ jsx163("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx163("polyline", { points: "15,18 9,12 15,6" }) });
@@ -23441,7 +23470,7 @@ var MediaCarousel = memo5(function MediaCarousel2({
23441
23470
  const key = originalUrl.trim() || "__missing_src__";
23442
23471
  setBrokenResourceUrls((b) => b[key] ? b : { ...b, [key]: true });
23443
23472
  }, []);
23444
- useEffect40(() => {
23473
+ useEffect41(() => {
23445
23474
  if (currentIndex >= media.length && media.length > 0) {
23446
23475
  setCurrentIndex(media.length - 1);
23447
23476
  }
@@ -23730,7 +23759,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
23730
23759
  const [loading, setLoading] = useState50(true);
23731
23760
  const [error, setError] = useState50(null);
23732
23761
  const initializationDone = useRef33(false);
23733
- useEffect41(() => {
23762
+ useEffect42(() => {
23734
23763
  if (initializationDone.current) return;
23735
23764
  initializationDone.current = true;
23736
23765
  const jsonUrl = url.endsWith(".json") ? url : `${url.replace(/\/$/, "")}.json`;
@@ -24036,7 +24065,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
24036
24065
  }
24037
24066
 
24038
24067
  // src/components/embeds/twitter-embed-client.tsx
24039
- import { useState as useState51, useEffect as useEffect42, useRef as useRef34 } from "react";
24068
+ import { useState as useState51, useEffect as useEffect43, useRef as useRef34 } from "react";
24040
24069
  import { jsx as jsx166, jsxs as jsxs126 } from "react/jsx-runtime";
24041
24070
  var MessageCircleIcon2 = () => /* @__PURE__ */ jsx166("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx166("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) });
24042
24071
  var ExternalLinkIcon3 = () => /* @__PURE__ */ jsxs126("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
@@ -24068,7 +24097,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
24068
24097
  const initializationDone = useRef34(false);
24069
24098
  const extractedTweetId = tweetId || url.match(/status\/(\d+)/)?.[1];
24070
24099
  const tweetUrl = url.includes("twitter.com") || url.includes("x.com") ? url : `https://twitter.com/twitter/status/${extractedTweetId}`;
24071
- useEffect42(() => {
24100
+ useEffect43(() => {
24072
24101
  if (initializationDone.current) return;
24073
24102
  initializationDone.current = true;
24074
24103
  if (!extractedTweetId) {
@@ -24316,7 +24345,7 @@ function LinkedInEmbedClient({ url, height = 600 }) {
24316
24345
  }
24317
24346
 
24318
24347
  // src/components/embeds/og-link-preview.tsx
24319
- import { useState as useState53, useEffect as useEffect43, Component as Component2 } from "react";
24348
+ import { useState as useState53, useEffect as useEffect44, Component as Component2 } from "react";
24320
24349
  import { jsx as jsx168, jsxs as jsxs128 } from "react/jsx-runtime";
24321
24350
  var OGLinkErrorBoundary = class extends Component2 {
24322
24351
  constructor(props) {
@@ -24381,7 +24410,7 @@ var OGLinkPreview = ({
24381
24410
  } catch {
24382
24411
  isValidUrl = false;
24383
24412
  }
24384
- useEffect43(() => {
24413
+ useEffect44(() => {
24385
24414
  if (!isValidUrl || isLocalhost) return;
24386
24415
  const fetchOGData = async () => {
24387
24416
  try {
@@ -24694,7 +24723,7 @@ function toFigmaOriginalUrl(url) {
24694
24723
  init_cn();
24695
24724
 
24696
24725
  // src/components/embeds/embed-iframe.tsx
24697
- import { useState as useState54, useCallback as useCallback22, useRef as useRef35, useEffect as useEffect44 } from "react";
24726
+ import { useState as useState54, useCallback as useCallback22, useRef as useRef35, useEffect as useEffect45 } from "react";
24698
24727
  import { Fragment as Fragment37, jsx as jsx169, jsxs as jsxs129 } from "react/jsx-runtime";
24699
24728
  function EmbedLoadingSkeleton({ height }) {
24700
24729
  return /* @__PURE__ */ jsx169(
@@ -24718,10 +24747,10 @@ function EmbedIframe({
24718
24747
  const [isLoaded, setIsLoaded] = useState54(false);
24719
24748
  const iframeRef = useRef35(null);
24720
24749
  const handleLoad = useCallback22(() => setIsLoaded(true), []);
24721
- useEffect44(() => {
24750
+ useEffect45(() => {
24722
24751
  setIsLoaded(false);
24723
24752
  }, [src]);
24724
- useEffect44(() => {
24753
+ useEffect45(() => {
24725
24754
  const iframe = iframeRef.current;
24726
24755
  return () => {
24727
24756
  if (iframe) {
@@ -24892,14 +24921,14 @@ function FigmaEmbed({ url, title, height, loading = "lazy" }) {
24892
24921
  }
24893
24922
 
24894
24923
  // src/components/embeds/markdown-image.tsx
24895
- import { useEffect as useEffect45, useState as useState56 } from "react";
24924
+ import { useEffect as useEffect46, useState as useState56 } from "react";
24896
24925
  import { jsx as jsx172 } from "react/jsx-runtime";
24897
24926
  var MAX_H_REM = 32;
24898
24927
  var DISPLAY_W = 768;
24899
24928
  function MarkdownImage({ src, alt }) {
24900
24929
  const { transformImageSrc } = useRichMarkdownRuntime();
24901
24930
  const [ratio, setRatio] = useState56(null);
24902
- useEffect45(() => {
24931
+ useEffect46(() => {
24903
24932
  let cancelled = false;
24904
24933
  setRatio(null);
24905
24934
  const probeSrc = transformImageSrc(src, { width: 48, resize: "contain", quality: 20 }) ?? src;
@@ -25713,11 +25742,11 @@ function BackButton({ label = "Back", className, type = "button", ...props }) {
25713
25742
 
25714
25743
  // src/components/layout/list-page-layout.tsx
25715
25744
  init_cn();
25716
- import { useEffect as useEffect47, useState as useState60 } from "react";
25745
+ import { useEffect as useEffect48, useState as useState60 } from "react";
25717
25746
 
25718
25747
  // src/components/ui/filter-modal.tsx
25719
25748
  init_cn();
25720
- import { useEffect as useEffect46, useState as useState59 } from "react";
25749
+ import { useEffect as useEffect47, useState as useState59 } from "react";
25721
25750
  init_button2();
25722
25751
 
25723
25752
  // src/components/ui/filter-checkbox-item.tsx
@@ -25922,7 +25951,7 @@ function FilterModal({
25922
25951
  const [draftDateSort, setDraftDateSort] = useState59(dateFilter?.sort ?? dateDefaultSort);
25923
25952
  const [draftDateRange, setDraftDateRange] = useState59(dateFilter?.range);
25924
25953
  const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
25925
- useEffect46(() => {
25954
+ useEffect47(() => {
25926
25955
  if (isOpen) {
25927
25956
  setSelectedFilters({ ...currentFilters });
25928
25957
  setPendingTags(selectedTags ?? []);
@@ -26547,10 +26576,10 @@ function ListPageLayout({
26547
26576
  const [mobileFilterOpen, setMobileFilterOpen] = useState60(false);
26548
26577
  const [localSearchValue, setLocalSearchValue] = useState60(searchValue);
26549
26578
  const debouncedSearchValue = useDebounce(localSearchValue, 500);
26550
- useEffect47(() => {
26579
+ useEffect48(() => {
26551
26580
  setLocalSearchValue(searchValue);
26552
26581
  }, [searchValue]);
26553
- useEffect47(() => {
26582
+ useEffect48(() => {
26554
26583
  if (debouncedSearchValue !== searchValue) {
26555
26584
  onSearch(debouncedSearchValue);
26556
26585
  }
@@ -30224,7 +30253,7 @@ import { ExternalLink as ExternalLink8 } from "lucide-react";
30224
30253
  import { createContext as createContext7, useContext as useContext7 } from "react";
30225
30254
 
30226
30255
  // src/hooks/use-dynamic-theming.ts
30227
- import { useState as useState61, useEffect as useEffect48 } from "react";
30256
+ import { useState as useState61, useEffect as useEffect49 } from "react";
30228
30257
  var defaultTheme = {
30229
30258
  primaryColor: "#FFC008",
30230
30259
  secondaryColor: "#161616",
@@ -30235,7 +30264,7 @@ var defaultTheme = {
30235
30264
  function useDynamicTheming() {
30236
30265
  const [theme, setTheme] = useState61(defaultTheme);
30237
30266
  const [isDark, setIsDark] = useState61(false);
30238
- useEffect48(() => {
30267
+ useEffect49(() => {
30239
30268
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
30240
30269
  setIsDark(mediaQuery.matches);
30241
30270
  const handleChange = (e) => {
@@ -30323,7 +30352,7 @@ function useThemeToggle() {
30323
30352
  }
30324
30353
 
30325
30354
  // src/components/features/array-entry-manager.tsx
30326
- import { useState as useState63, useEffect as useEffect50 } from "react";
30355
+ import { useState as useState63, useEffect as useEffect51 } from "react";
30327
30356
  import { Trash2, Plus as Plus2, Save, Loader2 as Loader22 } from "lucide-react";
30328
30357
  import { jsx as jsx216, jsxs as jsxs165 } from "react/jsx-runtime";
30329
30358
  function ArrayEntryManager({
@@ -30344,12 +30373,12 @@ function ArrayEntryManager({
30344
30373
  }) {
30345
30374
  const [draftItems, setDraftItems] = useState63(items);
30346
30375
  const [isDirty, setIsDirty] = useState63(false);
30347
- useEffect50(() => {
30376
+ useEffect51(() => {
30348
30377
  if (!isDirty && !isSaving) {
30349
30378
  setDraftItems(items);
30350
30379
  }
30351
30380
  }, [items, isDirty, isSaving]);
30352
- useEffect50(() => {
30381
+ useEffect51(() => {
30353
30382
  if (onDirtyChange) {
30354
30383
  onDirtyChange(isDirty);
30355
30384
  }
@@ -31584,7 +31613,7 @@ function AuthProvidersList({
31584
31613
 
31585
31614
  // src/components/features/changelog-manager.tsx
31586
31615
  import { Trash2 as Trash22, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye as Eye3, EyeOff } from "lucide-react";
31587
- import { useState as useState66, useEffect as useEffect51 } from "react";
31616
+ import { useState as useState66, useEffect as useEffect52 } from "react";
31588
31617
  import { jsx as jsx234, jsxs as jsxs179 } from "react/jsx-runtime";
31589
31618
  function ChangelogManager({
31590
31619
  title,
@@ -31595,7 +31624,7 @@ function ChangelogManager({
31595
31624
  showVisibilityToggle = false
31596
31625
  }) {
31597
31626
  const [expandedIndices, setExpandedIndices] = useState66(/* @__PURE__ */ new Set());
31598
- useEffect51(() => {
31627
+ useEffect52(() => {
31599
31628
  if (expandAll && entries.length > 0) {
31600
31629
  setExpandedIndices(new Set(entries.map((_, i) => i)));
31601
31630
  }
@@ -31938,7 +31967,7 @@ var ErrorBoundary = class extends Component3 {
31938
31967
 
31939
31968
  // src/components/features/figma-prototype-viewer.tsx
31940
31969
  init_cn();
31941
- import { useState as useState67, useRef as useRef37, useEffect as useEffect52, useCallback as useCallback26, useMemo as useMemo33 } from "react";
31970
+ import { useState as useState67, useRef as useRef37, useEffect as useEffect53, useCallback as useCallback26, useMemo as useMemo33 } from "react";
31942
31971
 
31943
31972
  // src/components/features/section-selector.tsx
31944
31973
  init_cn();
@@ -32376,7 +32405,7 @@ var FigmaPrototypeViewer = ({
32376
32405
  embedUrl,
32377
32406
  iframeKey
32378
32407
  ]);
32379
- useEffect52(() => {
32408
+ useEffect53(() => {
32380
32409
  const handleResize = () => {
32381
32410
  const newWidth = window.innerWidth;
32382
32411
  setScreenWidth(newWidth);
@@ -32390,7 +32419,7 @@ var FigmaPrototypeViewer = ({
32390
32419
  return () => window.removeEventListener("resize", handleResize);
32391
32420
  }, []);
32392
32421
  const [lastViewMode, setLastViewMode] = useState67(viewMode);
32393
- useEffect52(() => {
32422
+ useEffect53(() => {
32394
32423
  if (lastViewMode !== viewMode && iframeState === "READY") {
32395
32424
  console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
32396
32425
  setIframeState("RELOADING");
@@ -32398,7 +32427,7 @@ var FigmaPrototypeViewer = ({
32398
32427
  }
32399
32428
  setLastViewMode(viewMode);
32400
32429
  }, [viewMode, lastViewMode, iframeState]);
32401
- useEffect52(() => {
32430
+ useEffect53(() => {
32402
32431
  const handleVisibilityChange = () => {
32403
32432
  if (document.visibilityState === "visible" && iframeState === "READY") {
32404
32433
  console.log("[Sleep Recovery] Reloading iframe after sleep");
@@ -32409,7 +32438,7 @@ var FigmaPrototypeViewer = ({
32409
32438
  document.addEventListener("visibilitychange", handleVisibilityChange);
32410
32439
  return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
32411
32440
  }, [iframeState]);
32412
- useEffect52(() => {
32441
+ useEffect53(() => {
32413
32442
  const handleMessage = (event) => {
32414
32443
  if (event.origin !== "https://www.figma.com") return;
32415
32444
  const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
@@ -32493,12 +32522,12 @@ var FigmaPrototypeViewer = ({
32493
32522
  }
32494
32523
  }, 500);
32495
32524
  }, []);
32496
- useEffect52(() => {
32525
+ useEffect53(() => {
32497
32526
  if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
32498
32527
  navigateToSection(externalActiveSection);
32499
32528
  }
32500
32529
  }, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
32501
- useEffect52(() => {
32530
+ useEffect53(() => {
32502
32531
  return () => {
32503
32532
  if (navTimerRef.current) clearTimeout(navTimerRef.current);
32504
32533
  if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
@@ -32601,7 +32630,7 @@ var FigmaPrototypeViewer = ({
32601
32630
 
32602
32631
  // src/components/features/filters-dropdown.tsx
32603
32632
  init_cn();
32604
- import { useEffect as useEffect53, useRef as useRef38, useState as useState68 } from "react";
32633
+ import { useEffect as useEffect54, useRef as useRef38, useState as useState68 } from "react";
32605
32634
  import { jsx as jsx241, jsxs as jsxs185 } from "react/jsx-runtime";
32606
32635
  var FilterCheckbox = ({ checked, disabled = false, className }) => {
32607
32636
  return /* @__PURE__ */ jsx241(
@@ -32641,7 +32670,7 @@ var FiltersDropdown = ({
32641
32670
  const dropdownRef = useRef38(null);
32642
32671
  const triggerRef = useRef38(null);
32643
32672
  const containerRef = useRef38(null);
32644
- useEffect53(() => {
32673
+ useEffect54(() => {
32645
32674
  if (isOpen) {
32646
32675
  setShouldRender(true);
32647
32676
  let id2 = 0;
@@ -32657,7 +32686,7 @@ var FiltersDropdown = ({
32657
32686
  const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
32658
32687
  return () => clearTimeout(t);
32659
32688
  }, [isOpen]);
32660
- useEffect53(() => {
32689
+ useEffect54(() => {
32661
32690
  if (!responsive) {
32662
32691
  setIsMobile(false);
32663
32692
  return;
@@ -32669,7 +32698,7 @@ var FiltersDropdown = ({
32669
32698
  window.addEventListener("resize", checkMobile);
32670
32699
  return () => window.removeEventListener("resize", checkMobile);
32671
32700
  }, [responsive]);
32672
- useEffect53(() => {
32701
+ useEffect54(() => {
32673
32702
  if (!isOpen || isMobile || !triggerRef.current) return;
32674
32703
  const calculateOptimalPlacement = () => {
32675
32704
  const trigger = triggerRef.current;
@@ -32706,12 +32735,12 @@ var FiltersDropdown = ({
32706
32735
  return initial;
32707
32736
  });
32708
32737
  const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
32709
- useEffect53(() => {
32738
+ useEffect54(() => {
32710
32739
  if (currentFilters) {
32711
32740
  setSelectedFilters({ ...currentFilters });
32712
32741
  }
32713
32742
  }, [currentFiltersStr]);
32714
- useEffect53(() => {
32743
+ useEffect54(() => {
32715
32744
  const handleClickOutside = (event) => {
32716
32745
  if (containerRef.current && !containerRef.current.contains(event.target)) {
32717
32746
  setIsOpen(false);
@@ -32727,7 +32756,7 @@ var FiltersDropdown = ({
32727
32756
  };
32728
32757
  }
32729
32758
  }, [isOpen]);
32730
- useEffect53(() => {
32759
+ useEffect54(() => {
32731
32760
  const handleEscape = (e) => {
32732
32761
  if (e.key === "Escape" && isOpen) {
32733
32762
  setIsOpen(false);
@@ -32991,13 +33020,13 @@ function KnowledgeBaseLinksManager({
32991
33020
  }
32992
33021
 
32993
33022
  // src/components/features/loading-provider.tsx
32994
- import { createContext as createContext8, useContext as useContext8, useState as useState69, useEffect as useEffect54 } from "react";
33023
+ import { createContext as createContext8, useContext as useContext8, useState as useState69, useEffect as useEffect55 } from "react";
32995
33024
  import { jsx as jsx244, jsxs as jsxs186 } from "react/jsx-runtime";
32996
33025
  var LoadingContext = createContext8(void 0);
32997
33026
  function LoadingProvider({ children }) {
32998
33027
  const [isLoading, setIsLoading] = useState69(false);
32999
33028
  const [progress, setProgress] = useState69(0);
33000
- useEffect54(() => {
33029
+ useEffect55(() => {
33001
33030
  let interval;
33002
33031
  if (isLoading) {
33003
33032
  setProgress(10);
@@ -33270,7 +33299,7 @@ function OSTypeBadgeGroup({
33270
33299
  }
33271
33300
 
33272
33301
  // src/components/features/parallax-image-showcase.tsx
33273
- import { useEffect as useEffect55, useState as useState71, useRef as useRef40 } from "react";
33302
+ import { useEffect as useEffect56, useState as useState71, useRef as useRef40 } from "react";
33274
33303
  import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
33275
33304
  import { jsx as jsx248, jsxs as jsxs189 } from "react/jsx-runtime";
33276
33305
  var ParallaxImageShowcase = ({
@@ -33290,7 +33319,7 @@ var ParallaxImageShowcase = ({
33290
33319
  const mouseYSpring = useSpring(mouseY, springConfig);
33291
33320
  const [componentRect, setComponentRect] = useState71(null);
33292
33321
  const componentRef = useRef40(null);
33293
- useEffect55(() => {
33322
+ useEffect56(() => {
33294
33323
  const updateRect = () => {
33295
33324
  if (componentRef.current) {
33296
33325
  setComponentRect(componentRef.current.getBoundingClientRect());
@@ -33304,7 +33333,7 @@ var ParallaxImageShowcase = ({
33304
33333
  window.removeEventListener("scroll", updateRect);
33305
33334
  };
33306
33335
  }, []);
33307
- useEffect55(() => {
33336
+ useEffect56(() => {
33308
33337
  const handleGlobalMouseMove = (e) => {
33309
33338
  if (!componentRect) return;
33310
33339
  const centerX = componentRect.left + componentRect.width / 2;
@@ -34812,7 +34841,7 @@ function VideoBitesDisplay({
34812
34841
  // src/components/features/floating-walkthrough-video.tsx
34813
34842
  init_cn();
34814
34843
  init_button2();
34815
- import { useCallback as useCallback28, useEffect as useEffect56, useMemo as useMemo34, useRef as useRef42, useState as useState75 } from "react";
34844
+ import { useCallback as useCallback28, useEffect as useEffect57, useMemo as useMemo34, useRef as useRef42, useState as useState75 } from "react";
34816
34845
  import * as DialogPrimitive3 from "@radix-ui/react-dialog";
34817
34846
  import { Fragment as Fragment48, jsx as jsx261, jsxs as jsxs200 } from "react/jsx-runtime";
34818
34847
  var isAtEnd = (duration, time) => duration > 0 && duration - time < 1;
@@ -34836,7 +34865,7 @@ function FloatingWalkthroughVideo({
34836
34865
  const dismissalId = video?.id != null ? String(video.id) : "dismissed";
34837
34866
  const [mounted, setMounted] = useState75(false);
34838
34867
  const [dismissed, setDismissed] = useState75(false);
34839
- useEffect56(() => {
34868
+ useEffect57(() => {
34840
34869
  let idleHandle = null;
34841
34870
  if (!video) return;
34842
34871
  const timer = setTimeout(() => {
@@ -34859,7 +34888,7 @@ function FloatingWalkthroughVideo({
34859
34888
  };
34860
34889
  }, [appearDelayMs, dismissEnabled, storageKey, dismissalId, video?.id]);
34861
34890
  const [previewSuppressed, setPreviewSuppressed] = useState75(false);
34862
- useEffect56(() => {
34891
+ useEffect57(() => {
34863
34892
  try {
34864
34893
  const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
34865
34894
  const conn = navigator.connection;
@@ -34900,7 +34929,7 @@ function FloatingWalkthroughVideo({
34900
34929
  const isYouTube = Boolean(video?.youtubeUrl);
34901
34930
  const resumeMode = !open && handoff !== null && !isYouTube;
34902
34931
  const previewAllowed = !previewSuppressed && !isYouTube;
34903
- useEffect56(() => {
34932
+ useEffect57(() => {
34904
34933
  if (!mounted) return;
34905
34934
  const el = typeof document !== "undefined" ? document.querySelector(hideNearSelector) : null;
34906
34935
  if (!el || typeof IntersectionObserver === "undefined") {
@@ -34914,7 +34943,7 @@ function FloatingWalkthroughVideo({
34914
34943
  io.observe(el);
34915
34944
  return () => io.disconnect();
34916
34945
  }, [mounted, hideNearSelector, pathname]);
34917
- useEffect56(() => {
34946
+ useEffect57(() => {
34918
34947
  if (!resumeMode) return;
34919
34948
  const onVis = () => {
34920
34949
  if (document.visibilityState === "hidden") {
@@ -34928,7 +34957,7 @@ function FloatingWalkthroughVideo({
34928
34957
  document.addEventListener("visibilitychange", onVis);
34929
34958
  return () => document.removeEventListener("visibilitychange", onVis);
34930
34959
  }, [resumeMode]);
34931
- useEffect56(() => {
34960
+ useEffect57(() => {
34932
34961
  if (!footerHidden) return;
34933
34962
  const h = resumeHandleRef.current ?? previewHandleRef.current;
34934
34963
  try {
@@ -35076,13 +35105,13 @@ function FloatingWalkthroughVideo({
35076
35105
  setCardFallback(s);
35077
35106
  setCardMuted(s.muted);
35078
35107
  }, []);
35079
- useEffect56(() => {
35108
+ useEffect57(() => {
35080
35109
  if (resumeMode) {
35081
35110
  setCardMuted(handoff?.muted ?? false);
35082
35111
  setCardPaused(handoff?.playing === false);
35083
35112
  }
35084
35113
  }, [resumeMode]);
35085
- useEffect56(() => {
35114
+ useEffect57(() => {
35086
35115
  if (hovered) {
35087
35116
  setCardPaused(false);
35088
35117
  setCardMuted(userMutedRef.current);
@@ -36943,7 +36972,7 @@ function ViewToggle({
36943
36972
 
36944
36973
  // src/components/features/policy-configuration-panel.tsx
36945
36974
  init_cn();
36946
- import { useEffect as useEffect57, useState as useState78 } from "react";
36975
+ import { useEffect as useEffect58, useState as useState78 } from "react";
36947
36976
  import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
36948
36977
  init_button2();
36949
36978
  import { Fragment as Fragment49, jsx as jsx281, jsxs as jsxs216 } from "react/jsx-runtime";
@@ -37121,7 +37150,7 @@ var PolicyConfigurationPanel = ({
37121
37150
  }) => {
37122
37151
  const [expandedIds, setExpandedIds] = useState78(/* @__PURE__ */ new Set());
37123
37152
  const [bulkLevels, setBulkLevels] = useState78({});
37124
- useEffect57(() => {
37153
+ useEffect58(() => {
37125
37154
  setBulkLevels({});
37126
37155
  }, [editMode]);
37127
37156
  const handleToggle = (categoryId) => {
@@ -37161,7 +37190,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
37161
37190
  init_button2();
37162
37191
 
37163
37192
  // src/components/ui/phone-input.tsx
37164
- import { useCallback as useCallback30, useEffect as useEffect58, useMemo as useMemo35, useRef as useRef43, useState as useState79 } from "react";
37193
+ import { useCallback as useCallback30, useEffect as useEffect59, useMemo as useMemo35, useRef as useRef43, useState as useState79 } from "react";
37165
37194
  import { jsx as jsx282, jsxs as jsxs217 } from "react/jsx-runtime";
37166
37195
  function PhoneInput({
37167
37196
  value,
@@ -37195,7 +37224,7 @@ function PhoneInput({
37195
37224
  if (debounceRef.current) clearTimeout(debounceRef.current);
37196
37225
  debounceRef.current = setTimeout(() => runValidation(phone), 300);
37197
37226
  }, [runValidation]);
37198
- useEffect58(() => {
37227
+ useEffect59(() => {
37199
37228
  return () => {
37200
37229
  if (debounceRef.current) clearTimeout(debounceRef.current);
37201
37230
  };
@@ -37262,7 +37291,7 @@ function CountryOption({ country }) {
37262
37291
  // src/components/features/waitlist-form.tsx
37263
37292
  init_cn();
37264
37293
  import { getCountries as getCountries2 } from "libphonenumber-js";
37265
- import { useEffect as useEffect59, useState as useState80 } from "react";
37294
+ import { useEffect as useEffect60, useState as useState80 } from "react";
37266
37295
  import { Fragment as Fragment50, jsx as jsx283, jsxs as jsxs218 } from "react/jsx-runtime";
37267
37296
  function WaitlistForm({
37268
37297
  id = "waitlist-form",
@@ -37292,12 +37321,12 @@ function WaitlistForm({
37292
37321
  const [isPhoneInvalid, setIsPhoneInvalid] = useState80(false);
37293
37322
  const [showConsentError, setShowConsentError] = useState80(false);
37294
37323
  const isMailDomainGeneric = hasGenericEmailDomain(email);
37295
- useEffect59(() => {
37324
+ useEffect60(() => {
37296
37325
  if (defaultEmail) {
37297
37326
  setEmail(defaultEmail);
37298
37327
  }
37299
37328
  }, [defaultEmail]);
37300
- useEffect59(() => {
37329
+ useEffect60(() => {
37301
37330
  setIsClient(true);
37302
37331
  if (!geoApiUrl) return;
37303
37332
  const supportedCountries = new Set(getCountries2());
@@ -37685,7 +37714,7 @@ function useOptionalNotifications() {
37685
37714
  }
37686
37715
 
37687
37716
  // src/components/features/notifications/notification-drawer.tsx
37688
- import { useEffect as useEffect63, useRef as useRef46 } from "react";
37717
+ import { useEffect as useEffect64, useRef as useRef46 } from "react";
37689
37718
 
37690
37719
  // src/components/navigation/app-layout-context.ts
37691
37720
  import { createContext as createContext10, useContext as useContext10 } from "react";
@@ -38180,7 +38209,7 @@ init_button2();
38180
38209
  init_cn();
38181
38210
 
38182
38211
  // src/components/features/notifications/notification-tile.tsx
38183
- import { useMemo as useMemo37, useEffect as useEffect62, useState as useState83 } from "react";
38212
+ import { useMemo as useMemo37, useEffect as useEffect63, useState as useState83 } from "react";
38184
38213
  init_cn();
38185
38214
  import { jsx as jsx286, jsxs as jsxs220 } from "react/jsx-runtime";
38186
38215
  var variantBySeverity = {
@@ -38228,7 +38257,7 @@ function NotificationTile({
38228
38257
  const initialElapsed = useMemo37(() => Date.now() - createdAt, [createdAt]);
38229
38258
  const isLive = !read && !settled && initialElapsed < liveDurationMs;
38230
38259
  const counting = isLive && !paused;
38231
- useEffect62(() => {
38260
+ useEffect63(() => {
38232
38261
  if (!counting) return;
38233
38262
  const remaining = Math.max(0, liveDurationMs - initialElapsed);
38234
38263
  const timer = window.setTimeout(() => {
@@ -38457,7 +38486,7 @@ function DrawerScrollList({
38457
38486
  const sentinelRef = useRef46(null);
38458
38487
  const loadMoreRef = useRef46(loadMore);
38459
38488
  loadMoreRef.current = loadMore;
38460
- useEffect63(() => {
38489
+ useEffect64(() => {
38461
38490
  if (!loadMore || !hasMore || isLoadingMore) return;
38462
38491
  const sentinel = sentinelRef.current;
38463
38492
  const root = scrollRef.current;
@@ -38994,12 +39023,12 @@ function useOptionalTimeTracker() {
38994
39023
 
38995
39024
  // src/components/features/time-tracker/time-tracker-panel.tsx
38996
39025
  init_cn();
38997
- import { useEffect as useEffect65, useState as useState87 } from "react";
39026
+ import { useEffect as useEffect66, useState as useState87 } from "react";
38998
39027
  init_button();
38999
39028
  init_split_button();
39000
39029
 
39001
39030
  // src/components/features/time-tracker/use-tracker-clock.ts
39002
- import { useEffect as useEffect64, useState as useState86 } from "react";
39031
+ import { useEffect as useEffect65, useState as useState86 } from "react";
39003
39032
  function formatElapsed(totalMs) {
39004
39033
  const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
39005
39034
  const hours = Math.floor(totalSeconds / 3600);
@@ -39010,7 +39039,7 @@ function formatElapsed(totalMs) {
39010
39039
  }
39011
39040
  function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
39012
39041
  const [now, setNow] = useState86(() => Date.now());
39013
- useEffect64(() => {
39042
+ useEffect65(() => {
39014
39043
  if (status !== "tracking") return;
39015
39044
  setNow(Date.now());
39016
39045
  const id = setInterval(() => setNow(Date.now()), 1e3);
@@ -39070,7 +39099,7 @@ function TimeTrackerPanel({
39070
39099
  const isActive = status !== "ready";
39071
39100
  const hasContent2 = selectedTicketId != null || notes.trim() !== "";
39072
39101
  const showFieldError = isActive && showValidationError && !hasContent2;
39073
- useEffect65(() => {
39102
+ useEffect66(() => {
39074
39103
  if (status === "ready") setShowValidationError(false);
39075
39104
  }, [status]);
39076
39105
  const handleSubmit = () => {
@@ -39321,7 +39350,7 @@ function LastEntryRow({ entry, onClick }) {
39321
39350
  // src/components/features/time-tracker/time-tracker-header-button.tsx
39322
39351
  init_cn();
39323
39352
  import * as PopoverPrimitive5 from "@radix-ui/react-popover";
39324
- import { useEffect as useEffect66, useRef as useRef47 } from "react";
39353
+ import { useEffect as useEffect67, useRef as useRef47 } from "react";
39325
39354
 
39326
39355
  // src/components/navigation/header-button.tsx
39327
39356
  init_cn();
@@ -39416,10 +39445,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
39416
39445
  }
39417
39446
  };
39418
39447
  }
39419
- useEffect66(() => {
39448
+ useEffect67(() => {
39420
39449
  if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
39421
39450
  }, [isOpen, coordination]);
39422
- useEffect66(() => {
39451
+ useEffect67(() => {
39423
39452
  if (!selfHandleRef.current) return;
39424
39453
  return coordination?.registerDrawer(selfHandleRef.current);
39425
39454
  }, [coordination]);
@@ -40465,7 +40494,7 @@ function SortableRow({
40465
40494
 
40466
40495
  // src/components/navigation/header.tsx
40467
40496
  init_next_link();
40468
- import React117, { useEffect as useEffect70, useRef as useRef51, useState as useState92 } from "react";
40497
+ import React117, { useEffect as useEffect71, useRef as useRef51, useState as useState92 } from "react";
40469
40498
  init_button2();
40470
40499
 
40471
40500
  // src/components/navigation/mingo-ai-button.tsx
@@ -40646,7 +40675,7 @@ import React116 from "react";
40646
40675
  import { useQueryClient } from "@tanstack/react-query";
40647
40676
 
40648
40677
  // src/components/chat/hooks/use-chat-identity.ts
40649
- import { createContext as createContext13, createElement as createElement2, useContext as useContext13, useEffect as useEffect69, useState as useState91 } from "react";
40678
+ import { createContext as createContext13, createElement as createElement2, useContext as useContext13, useEffect as useEffect70, useState as useState91 } from "react";
40650
40679
  var ANON_DEFAULTS = {
40651
40680
  authTier: "anon",
40652
40681
  source: null,
@@ -40659,7 +40688,7 @@ function useResolveChatIdentity(enabled) {
40659
40688
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
40660
40689
  const [data, setData] = useState91(ANON_DEFAULTS);
40661
40690
  const [isLoading, setIsLoading] = useState91(enabled);
40662
- useEffect69(() => {
40691
+ useEffect70(() => {
40663
40692
  if (!enabled) return;
40664
40693
  let cancelled = false;
40665
40694
  const ctrl = new AbortController();
@@ -41074,7 +41103,7 @@ function Header2({ config, platform }) {
41074
41103
  const [openDropdowns, setOpenDropdowns] = useState92({});
41075
41104
  const dropdownRefs = useRef51({});
41076
41105
  const triggerRefs = useRef51({});
41077
- useEffect70(() => {
41106
+ useEffect71(() => {
41078
41107
  const handleClickOutside = (event) => {
41079
41108
  const target = event.target;
41080
41109
  if (!target) return;
@@ -41103,14 +41132,14 @@ function Header2({ config, platform }) {
41103
41132
  document.removeEventListener("keydown", handleEscapeKey);
41104
41133
  };
41105
41134
  }, [openDropdowns]);
41106
- useEffect70(() => {
41135
+ useEffect71(() => {
41107
41136
  return () => {
41108
41137
  setOpenDropdowns({});
41109
41138
  dropdownRefs.current = {};
41110
41139
  triggerRefs.current = {};
41111
41140
  };
41112
41141
  }, []);
41113
- useEffect70(() => {
41142
+ useEffect71(() => {
41114
41143
  if (!config.autoHide) {
41115
41144
  setShow(true);
41116
41145
  return;
@@ -41364,7 +41393,7 @@ function Header2({ config, platform }) {
41364
41393
  }
41365
41394
 
41366
41395
  // src/components/navigation/client-only-header.tsx
41367
- import { useState as useState93, useEffect as useEffect71 } from "react";
41396
+ import { useState as useState93, useEffect as useEffect72 } from "react";
41368
41397
 
41369
41398
  // src/components/navigation/header-skeleton.tsx
41370
41399
  import { Fragment as Fragment59, jsx as jsx308, jsxs as jsxs237 } from "react/jsx-runtime";
@@ -41404,7 +41433,7 @@ function HeaderSkeleton({ config }) {
41404
41433
  import { jsx as jsx309 } from "react/jsx-runtime";
41405
41434
  function ClientOnlyHeader({ config, skeleton }) {
41406
41435
  const [isClient, setIsClient] = useState93(false);
41407
- useEffect71(() => {
41436
+ useEffect72(() => {
41408
41437
  setIsClient(true);
41409
41438
  }, []);
41410
41439
  if (!isClient) {
@@ -41414,7 +41443,7 @@ function ClientOnlyHeader({ config, skeleton }) {
41414
41443
  }
41415
41444
 
41416
41445
  // src/components/navigation/sliding-sidebar.tsx
41417
- import { useState as useState94, useEffect as useEffect72, useRef as useRef52 } from "react";
41446
+ import { useState as useState94, useEffect as useEffect73, useRef as useRef52 } from "react";
41418
41447
  import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
41419
41448
  import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
41420
41449
  init_button2();
@@ -41427,7 +41456,7 @@ function SlidingSidebar({ config }) {
41427
41456
  const prefersReducedMotion2 = useReducedMotion();
41428
41457
  usePreventScroll3({ isDisabled: !config.isOpen });
41429
41458
  useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
41430
- useEffect72(() => {
41459
+ useEffect73(() => {
41431
41460
  setMounted(true);
41432
41461
  }, []);
41433
41462
  const toggleExpanded = (itemId) => {
@@ -41595,7 +41624,7 @@ function SlidingSidebar({ config }) {
41595
41624
  }
41596
41625
 
41597
41626
  // src/components/navigation/sticky-section-nav.tsx
41598
- import { useEffect as useEffect73, useState as useState95, useCallback as useCallback37, useRef as useRef53 } from "react";
41627
+ import { useEffect as useEffect74, useState as useState95, useCallback as useCallback37, useRef as useRef53 } from "react";
41599
41628
  import { jsx as jsx311, jsxs as jsxs239 } from "react/jsx-runtime";
41600
41629
  function StickySectionNav({
41601
41630
  sections,
@@ -41669,14 +41698,14 @@ function useSectionNavigation(sections, options) {
41669
41698
  isScrollingFromClick.current = false;
41670
41699
  }, 500);
41671
41700
  }, [offset2]);
41672
- useEffect73(() => {
41701
+ useEffect74(() => {
41673
41702
  sections.forEach((section) => {
41674
41703
  if (section.ref.current && !section.ref.current.id) {
41675
41704
  section.ref.current.id = section.id;
41676
41705
  }
41677
41706
  });
41678
41707
  }, [sections]);
41679
- useEffect73(() => {
41708
+ useEffect74(() => {
41680
41709
  const handleScroll = () => {
41681
41710
  if (isScrollingFromClick.current) return;
41682
41711
  const scrollPosition = window.scrollY + offset2 + 50;
@@ -41709,7 +41738,7 @@ function useSectionNavigation(sections, options) {
41709
41738
  }
41710
41739
 
41711
41740
  // src/components/navigation/navigation-sidebar.tsx
41712
- import { useCallback as useCallback38, useEffect as useEffect74, useMemo as useMemo42, useState as useState96 } from "react";
41741
+ import { useCallback as useCallback38, useEffect as useEffect75, useMemo as useMemo42, useState as useState96 } from "react";
41713
41742
 
41714
41743
  // src/components/navigation/navigation-sidebar-header.tsx
41715
41744
  import { jsx as jsx312, jsxs as jsxs240 } from "react/jsx-runtime";
@@ -41881,11 +41910,11 @@ function NavigationSidebar({ config, disabled = false }) {
41881
41910
  config.minimized ?? false
41882
41911
  );
41883
41912
  const [tabletMinimized, setTabletMinimized] = useState96(true);
41884
- useEffect74(() => {
41913
+ useEffect75(() => {
41885
41914
  if (isTablet) setTabletMinimized(true);
41886
41915
  }, [isTablet]);
41887
41916
  const [hydrated, setHydrated] = useState96(false);
41888
- useEffect74(() => setHydrated(true), []);
41917
+ useEffect75(() => setHydrated(true), []);
41889
41918
  const minimized = hydrated ? isTablet ? tabletMinimized : desktopMinimized : config.minimized ?? false;
41890
41919
  const [transitionsEnabled, setTransitionsEnabled] = useState96(false);
41891
41920
  const isOverlayOpen = isTablet && !minimized;
@@ -41901,7 +41930,7 @@ function NavigationSidebar({ config, disabled = false }) {
41901
41930
  const closeOverlay = useCallback38(() => {
41902
41931
  setTabletMinimized(true);
41903
41932
  }, []);
41904
- useEffect74(() => {
41933
+ useEffect75(() => {
41905
41934
  if (!isOverlayOpen) return;
41906
41935
  const handleKeyDown = (e) => {
41907
41936
  if (e.key === "Escape") closeOverlay();
@@ -41914,7 +41943,7 @@ function NavigationSidebar({ config, disabled = false }) {
41914
41943
  () => config.items.find((item) => item.isActive)?.id ?? null,
41915
41944
  [config.items]
41916
41945
  );
41917
- useEffect74(() => {
41946
+ useEffect75(() => {
41918
41947
  setPendingItemId(null);
41919
41948
  }, [committedActiveId]);
41920
41949
  const handleItemClick = useCallback38((item, event) => {
@@ -44097,7 +44126,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx338(ContentLoader, { ...props, va
44097
44126
 
44098
44127
  // src/components/ui/table/table.tsx
44099
44128
  init_cn();
44100
- import { useEffect as useEffect76, useRef as useRef58 } from "react";
44129
+ import { useEffect as useEffect77, useRef as useRef58 } from "react";
44101
44130
  init_pagination();
44102
44131
  init_button2();
44103
44132
 
@@ -44708,10 +44737,10 @@ function TableRow({
44708
44737
  }
44709
44738
 
44710
44739
  // src/components/ui/table/use-table-motion.ts
44711
- import { useEffect as useEffect75, useState as useState99 } from "react";
44740
+ import { useEffect as useEffect76, useState as useState99 } from "react";
44712
44741
  function useTableMotion(enabled) {
44713
44742
  const [runtime, setRuntime] = useState99(null);
44714
- useEffect75(() => {
44743
+ useEffect76(() => {
44715
44744
  if (!enabled || runtime) return;
44716
44745
  let active = true;
44717
44746
  import("framer-motion").then((m) => {
@@ -44860,7 +44889,7 @@ function Table({
44860
44889
  const sentinelRef = useRef58(null);
44861
44890
  const onLoadMoreRef = useRef58(infiniteScroll?.onLoadMore);
44862
44891
  onLoadMoreRef.current = infiniteScroll?.onLoadMore;
44863
- useEffect76(() => {
44892
+ useEffect77(() => {
44864
44893
  if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
44865
44894
  const sentinel = sentinelRef.current;
44866
44895
  if (!sentinel) return;
@@ -46054,7 +46083,7 @@ function DataTableBody({
46054
46083
  }
46055
46084
 
46056
46085
  // src/components/ui/data-table/data-table-infinite-footer.tsx
46057
- import { useEffect as useEffect77, useRef as useRef62 } from "react";
46086
+ import { useEffect as useEffect78, useRef as useRef62 } from "react";
46058
46087
  import { Fragment as Fragment72, jsx as jsx361, jsxs as jsxs282 } from "react/jsx-runtime";
46059
46088
  function DataTableInfiniteFooter({
46060
46089
  hasNextPage,
@@ -46066,7 +46095,7 @@ function DataTableInfiniteFooter({
46066
46095
  const sentinelRef = useRef62(null);
46067
46096
  const onLoadMoreRef = useRef62(onLoadMore);
46068
46097
  onLoadMoreRef.current = onLoadMore;
46069
- useEffect77(() => {
46098
+ useEffect78(() => {
46070
46099
  if (!hasNextPage || isFetchingNextPage) return;
46071
46100
  const sentinel = sentinelRef.current;
46072
46101
  if (!sentinel) return;
@@ -46704,7 +46733,7 @@ function FilterList({
46704
46733
 
46705
46734
  // src/components/ui/tag-search-input.tsx
46706
46735
  import {
46707
- useEffect as useEffect79,
46736
+ useEffect as useEffect80,
46708
46737
  useRef as useRef64,
46709
46738
  useState as useState103
46710
46739
  } from "react";
@@ -46744,7 +46773,7 @@ function TagSearchInput({
46744
46773
  const hiddenTagsRef = useRef64(null);
46745
46774
  const hiddenTagsPopupRef = useRef64(null);
46746
46775
  const [showHiddenTags, setShowHiddenTags] = useState103(false);
46747
- useEffect79(() => {
46776
+ useEffect80(() => {
46748
46777
  if (!showHiddenTags) return;
46749
46778
  const handleClick = (e) => {
46750
46779
  const target = e.target;
@@ -46906,7 +46935,7 @@ function TagSearchInput({
46906
46935
  }
46907
46936
 
46908
46937
  // src/components/ui/markdown-editor.tsx
46909
- import { useRef as useRef65, useCallback as useCallback46, useState as useState104, useEffect as useEffect80 } from "react";
46938
+ import { useRef as useRef65, useCallback as useCallback46, useState as useState104, useEffect as useEffect81 } from "react";
46910
46939
  init_cn();
46911
46940
  import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
46912
46941
  import { jsx as jsx366, jsxs as jsxs287 } from "react/jsx-runtime";
@@ -46937,7 +46966,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
46937
46966
  body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
46938
46967
  `;
46939
46968
  function MarkdownEditorStyles() {
46940
- useEffect80(() => {
46969
+ useEffect81(() => {
46941
46970
  if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
46942
46971
  const style = document.createElement("style");
46943
46972
  style.id = MARKDOWN_EDITOR_STYLE_ID;
@@ -46965,7 +46994,7 @@ function MarkdownEditor({
46965
46994
  const [isUploading, setIsUploading] = useState104(false);
46966
46995
  const [uploadProgress, setUploadProgress] = useState104("");
46967
46996
  const [defaultExtraCommands, setDefaultExtraCommands] = useState104([]);
46968
- useEffect80(() => {
46997
+ useEffect81(() => {
46969
46998
  import("@uiw/react-md-editor").then((mod) => {
46970
46999
  if (mod.commands?.getExtraCommands) {
46971
47000
  setDefaultExtraCommands(mod.commands.getExtraCommands());
@@ -47088,7 +47117,7 @@ function MarkdownEditor({
47088
47117
  }
47089
47118
  rafRef.current = requestAnimationFrame(scrollLoop);
47090
47119
  }, []);
47091
- useEffect80(() => {
47120
+ useEffect81(() => {
47092
47121
  const wrapper = wrapperRef.current;
47093
47122
  if (!wrapper) return;
47094
47123
  const onMouseMove = (e) => {
@@ -49051,7 +49080,7 @@ function ImageGalleryModal({
49051
49080
  initialIndex = 0
49052
49081
  }) {
49053
49082
  const [selectedImageIndex, setSelectedImageIndex] = useState115(initialIndex);
49054
- useEffect87(() => {
49083
+ useEffect88(() => {
49055
49084
  if (isOpen) {
49056
49085
  setSelectedImageIndex(initialIndex);
49057
49086
  }
@@ -49066,7 +49095,7 @@ function ImageGalleryModal({
49066
49095
  setSelectedImageIndex(selectedImageIndex + 1);
49067
49096
  }
49068
49097
  };
49069
- useEffect87(() => {
49098
+ useEffect88(() => {
49070
49099
  const handleKeyPress = (event) => {
49071
49100
  if (!isOpen) return;
49072
49101
  switch (event.key) {
@@ -53655,7 +53684,7 @@ function useChunkCatchup({
53655
53684
  }
53656
53685
 
53657
53686
  // src/components/chat/hooks/use-scripted-stream.ts
53658
- import { useEffect as useEffect88, useState as useState118 } from "react";
53687
+ import { useEffect as useEffect89, useState as useState118 } from "react";
53659
53688
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
53660
53689
  function prefersReducedMotion() {
53661
53690
  return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
@@ -53668,7 +53697,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
53668
53697
  setPrevKey(resetKey);
53669
53698
  setIndex(0);
53670
53699
  }
53671
- useEffect88(() => {
53700
+ useEffect89(() => {
53672
53701
  setReducedMotion(prefersReducedMotion());
53673
53702
  const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
53674
53703
  if (!mq) return;
@@ -53678,7 +53707,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
53678
53707
  }, []);
53679
53708
  const playing = enabled && !reducedMotion && frames.length > 0;
53680
53709
  const lastIndex = Math.max(0, frames.length - 1);
53681
- useEffect88(() => {
53710
+ useEffect89(() => {
53682
53711
  if (!playing || index >= lastIndex) return;
53683
53712
  const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
53684
53713
  const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
@@ -53690,7 +53719,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
53690
53719
  }
53691
53720
 
53692
53721
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
53693
- import { useCallback as useCallback50, useEffect as useEffect89, useRef as useRef70, useState as useState119 } from "react";
53722
+ import { useCallback as useCallback50, useEffect as useEffect90, useRef as useRef70, useState as useState119 } from "react";
53694
53723
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
53695
53724
  var RESYNC_AFTER_HIDDEN_MS = 1e4;
53696
53725
  var RESYNC_COALESCE_MS = 1e3;
@@ -53724,49 +53753,49 @@ function useJetStreamDialogSubscription({
53724
53753
  const subscriptionRef = useRef70(null);
53725
53754
  const highestStreamSeqRef = useRef70(null);
53726
53755
  const onEventRef = useRef70(onEvent);
53727
- useEffect89(() => {
53756
+ useEffect90(() => {
53728
53757
  onEventRef.current = onEvent;
53729
53758
  }, [onEvent]);
53730
53759
  const onConnectRef = useRef70(onConnect);
53731
- useEffect89(() => {
53760
+ useEffect90(() => {
53732
53761
  onConnectRef.current = onConnect;
53733
53762
  }, [onConnect]);
53734
53763
  const onDisconnectRef = useRef70(onDisconnect);
53735
- useEffect89(() => {
53764
+ useEffect90(() => {
53736
53765
  onDisconnectRef.current = onDisconnect;
53737
53766
  }, [onDisconnect]);
53738
53767
  const onSubscribedRef = useRef70(onSubscribed);
53739
- useEffect89(() => {
53768
+ useEffect90(() => {
53740
53769
  onSubscribedRef.current = onSubscribed;
53741
53770
  }, [onSubscribed]);
53742
53771
  const onBeforeReconnectRef = useRef70(onBeforeReconnect);
53743
- useEffect89(() => {
53772
+ useEffect90(() => {
53744
53773
  onBeforeReconnectRef.current = onBeforeReconnect;
53745
53774
  }, [onBeforeReconnect]);
53746
53775
  const getNatsWsUrlRef = useRef70(getNatsWsUrl);
53747
- useEffect89(() => {
53776
+ useEffect90(() => {
53748
53777
  getNatsWsUrlRef.current = getNatsWsUrl;
53749
53778
  }, [getNatsWsUrl]);
53750
53779
  const reconnectionBackoffRef = useRef70(reconnectionBackoff);
53751
- useEffect89(() => {
53780
+ useEffect90(() => {
53752
53781
  reconnectionBackoffRef.current = reconnectionBackoff;
53753
53782
  }, [reconnectionBackoff]);
53754
53783
  const optStartSeqRef = useRef70(optStartSeq);
53755
- useEffect89(() => {
53784
+ useEffect90(() => {
53756
53785
  optStartSeqRef.current = optStartSeq;
53757
53786
  }, [optStartSeq]);
53758
53787
  const inactiveThresholdRef = useRef70(inactiveThresholdMs);
53759
- useEffect89(() => {
53788
+ useEffect90(() => {
53760
53789
  inactiveThresholdRef.current = inactiveThresholdMs;
53761
53790
  }, [inactiveThresholdMs]);
53762
53791
  const hadConnectionBeforeRef = useRef70(false);
53763
53792
  const clientConfigRef = useRef70(clientConfig);
53764
- useEffect89(() => {
53793
+ useEffect90(() => {
53765
53794
  clientConfigRef.current = clientConfig;
53766
53795
  }, [clientConfig]);
53767
53796
  const currentWsUrlRef = useRef70("");
53768
53797
  const wsUrl = getNatsWsUrl();
53769
- useEffect89(() => {
53798
+ useEffect90(() => {
53770
53799
  if (!enabled || !wsUrl) {
53771
53800
  if (currentWsUrlRef.current && clientRef.current) {
53772
53801
  releaseClient(currentWsUrlRef.current);
@@ -53847,7 +53876,7 @@ function useJetStreamDialogSubscription({
53847
53876
  }
53848
53877
  };
53849
53878
  }, [enabled, wsUrl]);
53850
- useEffect89(() => {
53879
+ useEffect90(() => {
53851
53880
  highestStreamSeqRef.current = null;
53852
53881
  lastResyncSignalRef.current = resyncSignal;
53853
53882
  setCurrentStreamSeq(null);
@@ -53865,7 +53894,7 @@ function useJetStreamDialogSubscription({
53865
53894
  setReconnectionCount((c) => c + 1);
53866
53895
  }, RESYNC_COALESCE_MS);
53867
53896
  }, []);
53868
- useEffect89(() => {
53897
+ useEffect90(() => {
53869
53898
  if (!enabled) return;
53870
53899
  let hiddenSince = document.visibilityState === "hidden" ? Date.now() : 0;
53871
53900
  const onVisibilityChange = () => {
@@ -53882,13 +53911,13 @@ function useJetStreamDialogSubscription({
53882
53911
  document.addEventListener("visibilitychange", onVisibilityChange);
53883
53912
  return () => document.removeEventListener("visibilitychange", onVisibilityChange);
53884
53913
  }, [enabled, requestResync]);
53885
- useEffect89(() => {
53914
+ useEffect90(() => {
53886
53915
  if (!enabled) return;
53887
53916
  if (resyncSignal <= lastResyncSignalRef.current) return;
53888
53917
  lastResyncSignalRef.current = resyncSignal;
53889
53918
  requestResync();
53890
53919
  }, [enabled, resyncSignal, requestResync]);
53891
- useEffect89(() => {
53920
+ useEffect90(() => {
53892
53921
  if (!enabled || !dialogId || !isConnected) {
53893
53922
  if (subscriptionRef.current) {
53894
53923
  try {
@@ -53989,7 +54018,7 @@ function useJetStreamDialogSubscription({
53989
54018
  }
53990
54019
 
53991
54020
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
53992
- import { useEffect as useEffect90, useRef as useRef71, useState as useState120 } from "react";
54021
+ import { useEffect as useEffect91, useRef as useRef71, useState as useState120 } from "react";
53993
54022
  function useNatsDialogSubscription({
53994
54023
  enabled,
53995
54024
  dialogId,
@@ -54009,41 +54038,41 @@ function useNatsDialogSubscription({
54009
54038
  const clientRef = useRef71(null);
54010
54039
  const subscriptionRefs = useRef71(/* @__PURE__ */ new Map());
54011
54040
  const onEventRef = useRef71(onEvent);
54012
- useEffect90(() => {
54041
+ useEffect91(() => {
54013
54042
  onEventRef.current = onEvent;
54014
54043
  }, [onEvent]);
54015
54044
  const onConnectRef = useRef71(onConnect);
54016
- useEffect90(() => {
54045
+ useEffect91(() => {
54017
54046
  onConnectRef.current = onConnect;
54018
54047
  }, [onConnect]);
54019
54048
  const onDisconnectRef = useRef71(onDisconnect);
54020
- useEffect90(() => {
54049
+ useEffect91(() => {
54021
54050
  onDisconnectRef.current = onDisconnect;
54022
54051
  }, [onDisconnect]);
54023
54052
  const onSubscribedRef = useRef71(onSubscribed);
54024
- useEffect90(() => {
54053
+ useEffect91(() => {
54025
54054
  onSubscribedRef.current = onSubscribed;
54026
54055
  }, [onSubscribed]);
54027
54056
  const onBeforeReconnectRef = useRef71(onBeforeReconnect);
54028
- useEffect90(() => {
54057
+ useEffect91(() => {
54029
54058
  onBeforeReconnectRef.current = onBeforeReconnect;
54030
54059
  }, [onBeforeReconnect]);
54031
54060
  const hadConnectionBeforeRef = useRef71(false);
54032
54061
  const getNatsWsUrlRef = useRef71(getNatsWsUrl);
54033
- useEffect90(() => {
54062
+ useEffect91(() => {
54034
54063
  getNatsWsUrlRef.current = getNatsWsUrl;
54035
54064
  }, [getNatsWsUrl]);
54036
54065
  const reconnectionBackoffRef = useRef71(reconnectionBackoff);
54037
- useEffect90(() => {
54066
+ useEffect91(() => {
54038
54067
  reconnectionBackoffRef.current = reconnectionBackoff;
54039
54068
  }, [reconnectionBackoff]);
54040
54069
  const clientConfigRef = useRef71(clientConfig);
54041
- useEffect90(() => {
54070
+ useEffect91(() => {
54042
54071
  clientConfigRef.current = clientConfig;
54043
54072
  }, [clientConfig]);
54044
54073
  const currentWsUrlRef = useRef71("");
54045
54074
  const wsUrl = getNatsWsUrl();
54046
- useEffect90(() => {
54075
+ useEffect91(() => {
54047
54076
  if (!enabled || !wsUrl) {
54048
54077
  if (currentWsUrlRef.current && clientRef.current) {
54049
54078
  releaseClient(currentWsUrlRef.current);
@@ -54129,12 +54158,12 @@ function useNatsDialogSubscription({
54129
54158
  topicsRef.current = topics;
54130
54159
  const lastSubscribedDialogIdRef = useRef71(null);
54131
54160
  const isConnectedRef = useRef71(isConnected);
54132
- useEffect90(() => {
54161
+ useEffect91(() => {
54133
54162
  isConnectedRef.current = isConnected;
54134
54163
  }, [isConnected]);
54135
54164
  const currentDialogIdRef = useRef71(null);
54136
54165
  const abortControllerRef = useRef71(null);
54137
- useEffect90(() => {
54166
+ useEffect91(() => {
54138
54167
  currentDialogIdRef.current = dialogId;
54139
54168
  if (!enabled || !dialogId) {
54140
54169
  if (subscriptionRefs.current.size > 0) {
@@ -54215,7 +54244,7 @@ function useNatsDialogSubscription({
54215
54244
  abortControllerRef.current = null;
54216
54245
  };
54217
54246
  }, [enabled, dialogId, topicsKey]);
54218
- useEffect90(() => {
54247
+ useEffect91(() => {
54219
54248
  if (!enabled || !currentDialogIdRef.current || !isConnected) {
54220
54249
  return;
54221
54250
  }
@@ -54265,7 +54294,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
54265
54294
  }
54266
54295
 
54267
54296
  // src/components/chat/hooks/use-slash-commands.ts
54268
- import { useEffect as useEffect91, useState as useState121 } from "react";
54297
+ import { useEffect as useEffect92, useState as useState121 } from "react";
54269
54298
  import { useQuery as useQuery3 } from "@tanstack/react-query";
54270
54299
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
54271
54300
  try {
@@ -54284,7 +54313,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
54284
54313
  function useSlashCommands(prefix, commandsUrl) {
54285
54314
  const [commands, setCommands] = useState121([]);
54286
54315
  const [loading, setLoading] = useState121(false);
54287
- useEffect91(() => {
54316
+ useEffect92(() => {
54288
54317
  if (prefix == null) {
54289
54318
  setCommands([]);
54290
54319
  return;
@@ -54633,7 +54662,7 @@ function useChatAttachments() {
54633
54662
  }
54634
54663
 
54635
54664
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
54636
- import { useCallback as useCallback52, useEffect as useEffect92, useRef as useRef73, useState as useState123 } from "react";
54665
+ import { useCallback as useCallback52, useEffect as useEffect93, useRef as useRef73, useState as useState123 } from "react";
54637
54666
  import { jsx as jsx395 } from "react/jsx-runtime";
54638
54667
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
54639
54668
  function useChatAttachmentImageGallery() {
@@ -54642,7 +54671,7 @@ function useChatAttachmentImageGallery() {
54642
54671
  const panelRef = useRef73(null);
54643
54672
  const [state, setState] = useState123(CLOSED);
54644
54673
  const handleClose = useCallback52(() => setState(CLOSED), []);
54645
- useEffect92(() => {
54674
+ useEffect93(() => {
54646
54675
  const root = panelRef.current;
54647
54676
  if (!root) return;
54648
54677
  const onClick = (ev) => {
@@ -54688,11 +54717,11 @@ function absolutize(prefix) {
54688
54717
  }
54689
54718
 
54690
54719
  // src/components/chat/hooks/use-close-on-navigation.ts
54691
- import { useEffect as useEffect93, useRef as useRef74 } from "react";
54720
+ import { useEffect as useEffect94, useRef as useRef74 } from "react";
54692
54721
  function useCloseOnNavigation(close, pathname) {
54693
54722
  const prevPathnameRef = useRef74(null);
54694
54723
  const initializedRef = useRef74(false);
54695
- useEffect93(() => {
54724
+ useEffect94(() => {
54696
54725
  if (!initializedRef.current) {
54697
54726
  initializedRef.current = true;
54698
54727
  prevPathnameRef.current = pathname;
@@ -54706,7 +54735,7 @@ function useCloseOnNavigation(close, pathname) {
54706
54735
  }
54707
54736
 
54708
54737
  // src/components/chat/hooks/use-chat.ts
54709
- import { useState as useState125, useCallback as useCallback54, useEffect as useEffect94, useRef as useRef76 } from "react";
54738
+ import { useState as useState125, useCallback as useCallback54, useEffect as useEffect95, useRef as useRef76 } from "react";
54710
54739
 
54711
54740
  // src/components/chat/hooks/use-sse.ts
54712
54741
  import { useState as useState124, useCallback as useCallback53, useRef as useRef75 } from "react";
@@ -54784,7 +54813,7 @@ function useChat({
54784
54813
  const currentAssistantSegmentsRef = useRef76([]);
54785
54814
  const onMessagesChangeRef = useRef76(onMessagesChange);
54786
54815
  onMessagesChangeRef.current = onMessagesChange;
54787
- useEffect94(() => {
54816
+ useEffect95(() => {
54788
54817
  onMessagesChangeRef.current?.(messages);
54789
54818
  }, [messages]);
54790
54819
  const {
@@ -55321,7 +55350,7 @@ function pruneStaleChatConversationStorage(source) {
55321
55350
  }
55322
55351
 
55323
55352
  // src/components/chat/hooks/use-chat-history-hydration.ts
55324
- import { useEffect as useEffect95, useRef as useRef77, useState as useState126 } from "react";
55353
+ import { useEffect as useEffect96, useRef as useRef77, useState as useState126 } from "react";
55325
55354
  function useChatHistoryHydration({
55326
55355
  active,
55327
55356
  source,
@@ -55333,7 +55362,7 @@ function useChatHistoryHydration({
55333
55362
  }) {
55334
55363
  const [isHydratingHistory, setIsHydratingHistory] = useState126(false);
55335
55364
  const hydratedKeyRef = useRef77(null);
55336
- useEffect95(() => {
55365
+ useEffect96(() => {
55337
55366
  if (!active) return;
55338
55367
  const conversationId = conversationIdRef.current;
55339
55368
  if (!conversationId) return;
@@ -57519,7 +57548,7 @@ function createChatDialogStore(options = {}) {
57519
57548
  }
57520
57549
 
57521
57550
  // src/components/chat/stream/use-chat-stream-reducer.ts
57522
- import { useCallback as useCallback55, useEffect as useEffect96, useMemo as useMemo51, useRef as useRef78, useSyncExternalStore } from "react";
57551
+ import { useCallback as useCallback55, useEffect as useEffect97, useMemo as useMemo51, useRef as useRef78, useSyncExternalStore } from "react";
57523
57552
 
57524
57553
  // src/components/chat/stream/delta-batcher.ts
57525
57554
  var DELTA_FLUSH_FALLBACK_MS = 50;
@@ -57615,7 +57644,7 @@ function useChatStreamReducer({
57615
57644
  const getServerSnapshot = useCallback55(() => store.getServerSnapshot(), [store]);
57616
57645
  const subscribe = useCallback55((listener) => store.subscribe(listener), [store]);
57617
57646
  const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
57618
- useEffect96(() => store.retain(dialogId, side), [store, dialogId, side]);
57647
+ useEffect97(() => store.retain(dialogId, side), [store, dialogId, side]);
57619
57648
  const keyRef = useRef78({ dialogId, side });
57620
57649
  if (keyRef.current.dialogId !== dialogId || keyRef.current.side !== side) {
57621
57650
  keyRef.current = { dialogId, side };
@@ -57640,7 +57669,7 @@ function useChatStreamReducer({
57640
57669
  },
57641
57670
  [batcher, store, dialogId, side]
57642
57671
  );
57643
- useEffect96(() => () => batcher.dispose(), [batcher]);
57672
+ useEffect97(() => () => batcher.dispose(), [batcher]);
57644
57673
  const mutate = useCallback55(
57645
57674
  (fn) => store.mutate(dialogId, side, fn),
57646
57675
  [store, dialogId, side]
@@ -58021,7 +58050,7 @@ var noopBumpMetaTick = () => {
58021
58050
  };
58022
58051
 
58023
58052
  // src/components/chat/hooks/use-nats-chat-adapter.ts
58024
- import { useCallback as useCallback57, useEffect as useEffect97, useMemo as useMemo53, useRef as useRef80, useState as useState127 } from "react";
58053
+ import { useCallback as useCallback57, useEffect as useEffect98, useMemo as useMemo53, useRef as useRef80, useState as useState127 } from "react";
58025
58054
 
58026
58055
  // src/chat-protocol/nats-decoder.ts
58027
58056
  function normalizeToolCalls(raw) {
@@ -59206,7 +59235,7 @@ function useNatsChatAdapter(config, options = {}) {
59206
59235
  ]
59207
59236
  );
59208
59237
  const prevDialogIdRef = useRef80(void 0);
59209
- useEffect97(() => {
59238
+ useEffect98(() => {
59210
59239
  if (prevDialogIdRef.current === dialogId) return;
59211
59240
  prevDialogIdRef.current = dialogId;
59212
59241
  historyLoadSeqRef.current += 1;
@@ -59219,7 +59248,7 @@ function useNatsChatAdapter(config, options = {}) {
59219
59248
  if (!active || !dialogId) return;
59220
59249
  void loadDialogHistory(dialogId);
59221
59250
  }, [active, dialogId, dialogKey, loadDialogHistory]);
59222
- useEffect97(() => {
59251
+ useEffect98(() => {
59223
59252
  if (!active || !dialogId) return;
59224
59253
  const store = storeRef.current;
59225
59254
  store.mutate(dialogId, DEFAULT_DIALOG_SIDE, (r) => r.adjustAgentBusySuppression(1));
@@ -59282,7 +59311,7 @@ function useNatsChatAdapter(config, options = {}) {
59282
59311
  })();
59283
59312
  }
59284
59313
  });
59285
- useEffect97(() => {
59314
+ useEffect98(() => {
59286
59315
  if (!active || !dialogId) {
59287
59316
  setConnectionState("connected");
59288
59317
  return;
@@ -59321,7 +59350,7 @@ function useNatsChatAdapter(config, options = {}) {
59321
59350
  const reloadDialogs = useCallback57(() => {
59322
59351
  void loadDialogsPage();
59323
59352
  }, [loadDialogsPage]);
59324
- useEffect97(() => {
59353
+ useEffect98(() => {
59325
59354
  if (!fetchDialogs) return;
59326
59355
  if (!active) return;
59327
59356
  if (initialDialogsLoadedRef.current) return;
@@ -59985,7 +60014,7 @@ function buildStreamFrames(messages) {
59985
60014
 
59986
60015
  // src/components/chat/embeddable-chat.tsx
59987
60016
  init_cn();
59988
- import { useCallback as useCallback60, useEffect as useEffect98, useMemo as useMemo56, useRef as useRef83, useState as useState129 } from "react";
60017
+ import { useCallback as useCallback60, useEffect as useEffect99, useMemo as useMemo56, useRef as useRef83, useState as useState129 } from "react";
59989
60018
  import * as DialogPrimitive5 from "@radix-ui/react-dialog";
59990
60019
  import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
59991
60020
  import { isIOS } from "@react-aria/utils";
@@ -60270,7 +60299,7 @@ var RAIL_ANIM_MS = 320;
60270
60299
  function useRailPresence(open) {
60271
60300
  const [mounted, setMounted] = useState129(open);
60272
60301
  const [active, setActive] = useState129(false);
60273
- useEffect98(() => {
60302
+ useEffect99(() => {
60274
60303
  if (open) {
60275
60304
  setMounted(true);
60276
60305
  let raf2 = 0;
@@ -60597,7 +60626,7 @@ function EmbeddableChatInner({
60597
60626
  const commandsUrl = runtime.endpoints.commandsUrl;
60598
60627
  const { attachmentsEnabled, user: identityUser } = useChatIdentity();
60599
60628
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
60600
- useEffect98(() => {
60629
+ useEffect99(() => {
60601
60630
  if (process.env.NODE_ENV !== "production") {
60602
60631
  const hasOpen = open !== void 0;
60603
60632
  const hasHandler = onOpenChange !== void 0;
@@ -60619,7 +60648,7 @@ function EmbeddableChatInner({
60619
60648
  });
60620
60649
  usePreventScroll5({ isDisabled: !isOpen || shellLess });
60621
60650
  const navigatingAwayRef = useRef83(false);
60622
- useEffect98(() => {
60651
+ useEffect99(() => {
60623
60652
  if (!isOpen) return;
60624
60653
  if (shellLess) return;
60625
60654
  if (typeof window === "undefined") return;
@@ -60752,7 +60781,7 @@ function EmbeddableChatInner({
60752
60781
  loadMoreMessages
60753
60782
  } = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
60754
60783
  const guidePromptSentRef = useRef83(false);
60755
- useEffect98(() => {
60784
+ useEffect99(() => {
60756
60785
  if (!guidePendingPrompt) {
60757
60786
  guidePromptSentRef.current = false;
60758
60787
  return;
@@ -60777,11 +60806,11 @@ function EmbeddableChatInner({
60777
60806
  const [contextPickerOpen, setContextPickerOpen] = useState129(false);
60778
60807
  const [mentionQuery, setMentionQuery] = useState129(null);
60779
60808
  const mentionActiveRef = useRef83(false);
60780
- useEffect98(() => {
60809
+ useEffect99(() => {
60781
60810
  mentionActiveRef.current = mentionQuery !== null;
60782
60811
  }, [mentionQuery]);
60783
60812
  const mentionKeysRef = useRef83(/* @__PURE__ */ new Set());
60784
- useEffect98(() => {
60813
+ useEffect99(() => {
60785
60814
  setContextItems([]);
60786
60815
  setMentionQuery(null);
60787
60816
  mentionKeysRef.current.clear();
@@ -61015,7 +61044,7 @@ function EmbeddableChatInner({
61015
61044
  });
61016
61045
  const handleOpen = useCallback60(() => setIsOpen(true), [setIsOpen]);
61017
61046
  useCloseOnNavigation(handleNavigationClose, null);
61018
- useEffect98(() => {
61047
+ useEffect99(() => {
61019
61048
  const handler = (e) => {
61020
61049
  const detail = e.detail;
61021
61050
  if (!detail || detail.source !== source) return;
@@ -61025,7 +61054,7 @@ function EmbeddableChatInner({
61025
61054
  window.addEventListener("ask-ai:open-with-ref", handler);
61026
61055
  return () => window.removeEventListener("ask-ai:open-with-ref", handler);
61027
61056
  }, [source, discussRef, setIsOpen]);
61028
- useEffect98(() => {
61057
+ useEffect99(() => {
61029
61058
  const handler = (e) => {
61030
61059
  const detail = e.detail;
61031
61060
  if (!detail || detail.source !== source) return;
@@ -61042,7 +61071,7 @@ function EmbeddableChatInner({
61042
61071
  const contentViewKey = hasConversation ? "conversation" : activeMode;
61043
61072
  const isGuideEmpty = !hasConversation && activeMode === "guide";
61044
61073
  const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
61045
- useEffect98(() => {
61074
+ useEffect99(() => {
61046
61075
  if (!isQuickActionEmpty) setQuickActionPreview(null);
61047
61076
  }, [isQuickActionEmpty]);
61048
61077
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
@@ -61088,7 +61117,7 @@ function EmbeddableChatInner({
61088
61117
  const [panelBoundary, setPanelBoundary] = useState129(null);
61089
61118
  const [panelWidth, setPanelWidth] = useState129(0);
61090
61119
  const panelMeasureRef = useRef83(null);
61091
- useEffect98(() => {
61120
+ useEffect99(() => {
61092
61121
  const el = panelMeasureRef.current;
61093
61122
  if (!el || typeof ResizeObserver === "undefined") return;
61094
61123
  const ro = new ResizeObserver((entries) => {
@@ -61104,7 +61133,7 @@ function EmbeddableChatInner({
61104
61133
  setPanelBoundary(node);
61105
61134
  }, []);
61106
61135
  const [railCollapsed, setRailCollapsed] = useState129(false);
61107
- useEffect98(() => {
61136
+ useEffect99(() => {
61108
61137
  try {
61109
61138
  if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
61110
61139
  setRailCollapsed(true);
@@ -61129,7 +61158,7 @@ function EmbeddableChatInner({
61129
61158
  const railPresence = useRailPresence(splitActive);
61130
61159
  const showWideHeader = wideMingo || railPresence.mounted;
61131
61160
  const [composeOpen, setComposeOpen] = useState129(false);
61132
- useEffect98(() => {
61161
+ useEffect99(() => {
61133
61162
  if (hasConversation) setComposeOpen(false);
61134
61163
  }, [hasConversation]);
61135
61164
  const isMingoMode = activeMode === "mingo";
@@ -62793,4 +62822,4 @@ export {
62793
62822
  LogsList,
62794
62823
  assets
62795
62824
  };
62796
- //# sourceMappingURL=chunk-JI4JR3KC.js.map
62825
+ //# sourceMappingURL=chunk-TI75367M.js.map