@flamingo-stack/openframe-frontend-core 0.0.519 → 0.0.520-snapshot.20260807064659
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-UBT2KBK7.js → chunk-5NQTT7D5.js} +5 -5
- package/dist/{chunk-QGLEI6T2.cjs → chunk-67R53SBT.cjs} +5 -5
- package/dist/{chunk-QGLEI6T2.cjs.map → chunk-67R53SBT.cjs.map} +1 -1
- package/dist/{chunk-ZA5PFNHR.js → chunk-6AQKSCZ5.js} +326 -251
- package/dist/chunk-6AQKSCZ5.js.map +1 -0
- package/dist/{chunk-OBJSXQ67.cjs → chunk-6Q55DOM2.cjs} +3 -3
- package/dist/{chunk-OBJSXQ67.cjs.map → chunk-6Q55DOM2.cjs.map} +1 -1
- package/dist/{chunk-JMGVYERE.js → chunk-7QEBK5ZY.js} +2 -2
- package/dist/{chunk-KCDKQXE5.cjs → chunk-AAM6IP3G.cjs} +7 -7
- package/dist/{chunk-KCDKQXE5.cjs.map → chunk-AAM6IP3G.cjs.map} +1 -1
- package/dist/{chunk-HWA3NZPK.js → chunk-AIVZKRDL.js} +2 -2
- package/dist/{chunk-HVXGSQ4V.js → chunk-ATN5CTEP.js} +6 -6
- package/dist/{chunk-ZGGI4XMF.cjs → chunk-BFGMIDQN.cjs} +9 -9
- package/dist/{chunk-ZGGI4XMF.cjs.map → chunk-BFGMIDQN.cjs.map} +1 -1
- package/dist/{chunk-QQZWLTYU.cjs → chunk-BSJAHSOO.cjs} +4 -4
- package/dist/{chunk-QQZWLTYU.cjs.map → chunk-BSJAHSOO.cjs.map} +1 -1
- package/dist/{chunk-FWCENA3G.cjs → chunk-FBK7CPXN.cjs} +31 -31
- package/dist/{chunk-FWCENA3G.cjs.map → chunk-FBK7CPXN.cjs.map} +1 -1
- package/dist/{chunk-OQHHJDUB.js → chunk-FHSZYVS5.js} +4 -4
- package/dist/{chunk-BFCBR277.cjs → chunk-GAU637M2.cjs} +11 -11
- package/dist/{chunk-BFCBR277.cjs.map → chunk-GAU637M2.cjs.map} +1 -1
- package/dist/{chunk-VH7BOHRG.js → chunk-GGHXEEYL.js} +2 -2
- package/dist/{chunk-QEGGWVFV.cjs → chunk-KKQX7YWX.cjs} +26 -26
- package/dist/{chunk-QEGGWVFV.cjs.map → chunk-KKQX7YWX.cjs.map} +1 -1
- package/dist/{chunk-V3MAG3G5.cjs → chunk-KSV7S3XR.cjs} +87 -87
- package/dist/{chunk-V3MAG3G5.cjs.map → chunk-KSV7S3XR.cjs.map} +1 -1
- package/dist/{chunk-6WQN7NLD.js → chunk-NP62VGRO.js} +4 -4
- package/dist/{chunk-MEWHQVOU.js → chunk-R63KHYFN.js} +2 -2
- package/dist/{chunk-WEPJKF65.cjs → chunk-RDGUBROF.cjs} +37 -37
- package/dist/{chunk-WEPJKF65.cjs.map → chunk-RDGUBROF.cjs.map} +1 -1
- package/dist/{chunk-6FLRFCK4.cjs → chunk-SX7V35WT.cjs} +872 -797
- package/dist/chunk-SX7V35WT.cjs.map +1 -0
- package/dist/{chunk-BUZOZOQ2.js → chunk-TFUSHMTY.js} +2 -2
- package/dist/{chunk-YACGPO7I.js → chunk-TXO7WK2L.js} +2 -2
- package/dist/{chunk-SAPKMN4W.js → chunk-VFYIFHJ3.js} +2 -2
- package/dist/{chunk-5PMRHRMM.cjs → chunk-WK5Z2Z5T.cjs} +14 -14
- package/dist/{chunk-5PMRHRMM.cjs.map → chunk-WK5Z2Z5T.cjs.map} +1 -1
- package/dist/{chunk-CCK2MFIQ.cjs → chunk-XYVJKPUW.cjs} +26 -26
- package/dist/{chunk-CCK2MFIQ.cjs.map → chunk-XYVJKPUW.cjs.map} +1 -1
- package/dist/{chunk-S4OAWVKF.js → chunk-Y3ES77KJ.js} +2 -2
- package/dist/{chunk-CRJRVUWB.js → chunk-YJ4VCBRT.js} +2 -2
- package/dist/{chunk-GLFQSFYV.cjs → chunk-YPT3CBFR.cjs} +61 -61
- package/dist/{chunk-GLFQSFYV.cjs.map → chunk-YPT3CBFR.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/auth/sso-providers.d.ts +1 -1
- package/dist/components/features/auth/sso-providers.d.ts.map +1 -1
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +132 -132
- package/dist/components/index.js +11 -11
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/modal-v2.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/features/auth/sso-providers.tsx +3 -1
- package/src/components/ui/modal-v2.tsx +95 -1
- package/src/stories/auth/Login.stories.tsx +1 -1
- package/dist/chunk-6FLRFCK4.cjs.map +0 -1
- package/dist/chunk-ZA5PFNHR.js.map +0 -1
- /package/dist/{chunk-UBT2KBK7.js.map → chunk-5NQTT7D5.js.map} +0 -0
- /package/dist/{chunk-JMGVYERE.js.map → chunk-7QEBK5ZY.js.map} +0 -0
- /package/dist/{chunk-HWA3NZPK.js.map → chunk-AIVZKRDL.js.map} +0 -0
- /package/dist/{chunk-HVXGSQ4V.js.map → chunk-ATN5CTEP.js.map} +0 -0
- /package/dist/{chunk-OQHHJDUB.js.map → chunk-FHSZYVS5.js.map} +0 -0
- /package/dist/{chunk-VH7BOHRG.js.map → chunk-GGHXEEYL.js.map} +0 -0
- /package/dist/{chunk-6WQN7NLD.js.map → chunk-NP62VGRO.js.map} +0 -0
- /package/dist/{chunk-MEWHQVOU.js.map → chunk-R63KHYFN.js.map} +0 -0
- /package/dist/{chunk-BUZOZOQ2.js.map → chunk-TFUSHMTY.js.map} +0 -0
- /package/dist/{chunk-YACGPO7I.js.map → chunk-TXO7WK2L.js.map} +0 -0
- /package/dist/{chunk-SAPKMN4W.js.map → chunk-VFYIFHJ3.js.map} +0 -0
- /package/dist/{chunk-S4OAWVKF.js.map → chunk-Y3ES77KJ.js.map} +0 -0
- /package/dist/{chunk-CRJRVUWB.js.map → chunk-YJ4VCBRT.js.map} +0 -0
|
@@ -10696,9 +10696,78 @@ init_cn();
|
|
|
10696
10696
|
import { jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
10697
10697
|
var ANIMATION_DURATION = 200;
|
|
10698
10698
|
var ModalContext = React26.createContext({});
|
|
10699
|
+
var modalStack = [];
|
|
10699
10700
|
var Modal = React26.forwardRef(
|
|
10700
10701
|
({ isOpen, onClose, children, className }, ref) => {
|
|
10701
10702
|
const [isMounted, setIsMounted] = useState21(isOpen);
|
|
10703
|
+
const panelRef = React26.useRef(null);
|
|
10704
|
+
const restoreFocusRef = React26.useRef(null);
|
|
10705
|
+
const stackIdRef = React26.useRef(/* @__PURE__ */ Symbol("modal"));
|
|
10706
|
+
useEffect15(() => {
|
|
10707
|
+
if (!isOpen) return;
|
|
10708
|
+
const stackId = stackIdRef.current;
|
|
10709
|
+
modalStack.push(stackId);
|
|
10710
|
+
restoreFocusRef.current = document.activeElement;
|
|
10711
|
+
const raf = requestAnimationFrame(() => {
|
|
10712
|
+
const panel = panelRef.current;
|
|
10713
|
+
if (!panel) return;
|
|
10714
|
+
if (panel.contains(document.activeElement)) return;
|
|
10715
|
+
panel.focus();
|
|
10716
|
+
});
|
|
10717
|
+
const containFocus = (event) => {
|
|
10718
|
+
if (modalStack[modalStack.length - 1] !== stackId) return;
|
|
10719
|
+
const panel = panelRef.current;
|
|
10720
|
+
if (!panel) return;
|
|
10721
|
+
const target = event.target;
|
|
10722
|
+
if (target && panel.contains(target)) return;
|
|
10723
|
+
panel.focus();
|
|
10724
|
+
};
|
|
10725
|
+
document.addEventListener("focusin", containFocus);
|
|
10726
|
+
const reasserts = [80, 240, 500].map(
|
|
10727
|
+
(ms) => setTimeout(() => {
|
|
10728
|
+
if (modalStack[modalStack.length - 1] !== stackId) return;
|
|
10729
|
+
const panel = panelRef.current;
|
|
10730
|
+
if (!panel) return;
|
|
10731
|
+
if (!panel.contains(document.activeElement)) panel.focus();
|
|
10732
|
+
}, ms)
|
|
10733
|
+
);
|
|
10734
|
+
return () => {
|
|
10735
|
+
cancelAnimationFrame(raf);
|
|
10736
|
+
reasserts.forEach(clearTimeout);
|
|
10737
|
+
document.removeEventListener("focusin", containFocus);
|
|
10738
|
+
const idx = modalStack.lastIndexOf(stackId);
|
|
10739
|
+
if (idx !== -1) modalStack.splice(idx, 1);
|
|
10740
|
+
restoreFocusRef.current?.focus?.();
|
|
10741
|
+
};
|
|
10742
|
+
}, [isOpen]);
|
|
10743
|
+
useEffect15(() => {
|
|
10744
|
+
if (!isOpen) return;
|
|
10745
|
+
const handleTab = (event) => {
|
|
10746
|
+
if (event.key !== "Tab") return;
|
|
10747
|
+
const panel = panelRef.current;
|
|
10748
|
+
if (!panel) return;
|
|
10749
|
+
const focusables = Array.from(
|
|
10750
|
+
panel.querySelectorAll(
|
|
10751
|
+
'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
10752
|
+
)
|
|
10753
|
+
).filter((el) => el.getAttribute("aria-hidden") !== "true" && el.offsetParent !== null);
|
|
10754
|
+
if (focusables.length === 0) return;
|
|
10755
|
+
const first = focusables[0];
|
|
10756
|
+
const last = focusables[focusables.length - 1];
|
|
10757
|
+
const active = document.activeElement;
|
|
10758
|
+
if (event.shiftKey) {
|
|
10759
|
+
if (active === first || !panel.contains(active)) {
|
|
10760
|
+
event.preventDefault();
|
|
10761
|
+
last.focus();
|
|
10762
|
+
}
|
|
10763
|
+
} else if (active === last || !panel.contains(active)) {
|
|
10764
|
+
event.preventDefault();
|
|
10765
|
+
first.focus();
|
|
10766
|
+
}
|
|
10767
|
+
};
|
|
10768
|
+
document.addEventListener("keydown", handleTab);
|
|
10769
|
+
return () => document.removeEventListener("keydown", handleTab);
|
|
10770
|
+
}, [isOpen]);
|
|
10702
10771
|
useEffect15(() => {
|
|
10703
10772
|
if (isOpen) {
|
|
10704
10773
|
setIsMounted(true);
|
|
@@ -10743,7 +10812,12 @@ var Modal = React26.forwardRef(
|
|
|
10743
10812
|
/* @__PURE__ */ jsx55(
|
|
10744
10813
|
"div",
|
|
10745
10814
|
{
|
|
10746
|
-
ref
|
|
10815
|
+
ref: (node) => {
|
|
10816
|
+
panelRef.current = node;
|
|
10817
|
+
if (typeof ref === "function") ref(node);
|
|
10818
|
+
else if (ref) ref.current = node;
|
|
10819
|
+
},
|
|
10820
|
+
tabIndex: -1,
|
|
10747
10821
|
"data-state": state,
|
|
10748
10822
|
className: cn(
|
|
10749
10823
|
// min() keeps the desktop cap at 28rem while never letting content
|
|
@@ -11267,7 +11341,7 @@ function ChatPanelHeader({
|
|
|
11267
11341
|
import * as React32 from "react";
|
|
11268
11342
|
|
|
11269
11343
|
// src/components/chat/chat-attachment-bar.tsx
|
|
11270
|
-
import { useEffect as useEffect18, useRef as
|
|
11344
|
+
import { useEffect as useEffect18, useRef as useRef17, useState as useState24 } from "react";
|
|
11271
11345
|
init_button2();
|
|
11272
11346
|
init_cn();
|
|
11273
11347
|
|
|
@@ -11345,7 +11419,7 @@ function ChatAttachmentAddButton({
|
|
|
11345
11419
|
disabled = false,
|
|
11346
11420
|
size: size2 = "default"
|
|
11347
11421
|
}) {
|
|
11348
|
-
const fileInputRef =
|
|
11422
|
+
const fileInputRef = useRef17(null);
|
|
11349
11423
|
const compact = size2 === "compact";
|
|
11350
11424
|
const boxClass = compact ? "h-6 w-6" : "h-7 w-7";
|
|
11351
11425
|
if (!attachmentsEnabled) {
|
|
@@ -11498,7 +11572,7 @@ function useObjectUrl(file) {
|
|
|
11498
11572
|
}
|
|
11499
11573
|
|
|
11500
11574
|
// src/components/chat/chat-context-memory-bar.tsx
|
|
11501
|
-
import { useEffect as useEffect19, useRef as
|
|
11575
|
+
import { useEffect as useEffect19, useRef as useRef18, useState as useState25 } from "react";
|
|
11502
11576
|
init_cn();
|
|
11503
11577
|
import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
11504
11578
|
var itemKey3 = (item) => `${item.type}:${item.id}`;
|
|
@@ -11510,7 +11584,7 @@ function ChatContextMemoryBar({
|
|
|
11510
11584
|
className
|
|
11511
11585
|
}) {
|
|
11512
11586
|
const [open, setOpen] = useState25(false);
|
|
11513
|
-
const rootRef =
|
|
11587
|
+
const rootRef = useRef18(null);
|
|
11514
11588
|
useEffect19(() => {
|
|
11515
11589
|
if (items.length === 0) setOpen(false);
|
|
11516
11590
|
}, [items.length]);
|
|
@@ -12014,7 +12088,7 @@ function ChatArchivePage(props) {
|
|
|
12014
12088
|
// src/components/chat/chat-sidebar.tsx
|
|
12015
12089
|
init_cn();
|
|
12016
12090
|
init_button2();
|
|
12017
|
-
import { forwardRef as forwardRef22, useRef as
|
|
12091
|
+
import { forwardRef as forwardRef22, useRef as useRef19, useEffect as useEffect20 } from "react";
|
|
12018
12092
|
|
|
12019
12093
|
// src/components/chat/chat-sidebar-skeleton.tsx
|
|
12020
12094
|
init_cn();
|
|
@@ -12130,11 +12204,11 @@ DialogListItem.displayName = "DialogListItem";
|
|
|
12130
12204
|
var ChatSidebar = forwardRef22(
|
|
12131
12205
|
({ className, onNewChat, onDialogSelect, dialogs = [], activeDialogId, isLoading, isCreatingDialog, children, hasNextPage, isFetchingNextPage, onLoadMore, ...props }, ref) => {
|
|
12132
12206
|
const showEmptyState = dialogs.length === 0 && !children;
|
|
12133
|
-
const scrollContainerRef =
|
|
12134
|
-
const loadMoreRef =
|
|
12135
|
-
const onLoadMoreRef =
|
|
12207
|
+
const scrollContainerRef = useRef19(null);
|
|
12208
|
+
const loadMoreRef = useRef19(null);
|
|
12209
|
+
const onLoadMoreRef = useRef19(onLoadMore);
|
|
12136
12210
|
onLoadMoreRef.current = onLoadMore;
|
|
12137
|
-
const isFetchingRef =
|
|
12211
|
+
const isFetchingRef = useRef19(isFetchingNextPage);
|
|
12138
12212
|
isFetchingRef.current = isFetchingNextPage;
|
|
12139
12213
|
useEffect20(() => {
|
|
12140
12214
|
const scrollContainer = scrollContainerRef.current;
|
|
@@ -13278,7 +13352,7 @@ var TabsContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
13278
13352
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
13279
13353
|
|
|
13280
13354
|
// src/components/features/video.tsx
|
|
13281
|
-
import { useCallback as useCallback13, useEffect as useEffect24, useImperativeHandle as useImperativeHandle3, useMemo as useMemo19, useRef as
|
|
13355
|
+
import { useCallback as useCallback13, useEffect as useEffect24, useImperativeHandle as useImperativeHandle3, useMemo as useMemo19, useRef as useRef20, useState as useState29 } from "react";
|
|
13282
13356
|
import MuxPlayer from "@mux/mux-player-react";
|
|
13283
13357
|
|
|
13284
13358
|
// src/components/features/video-center-badge.tsx
|
|
@@ -13639,9 +13713,9 @@ function FilePlayer({
|
|
|
13639
13713
|
}) {
|
|
13640
13714
|
const effectivePreload = preload ?? (saveDataEnabled() ? "none" : "metadata");
|
|
13641
13715
|
const [hoverMutedFallback, setHoverMutedFallback] = useState29(false);
|
|
13642
|
-
const hoverPlayerRef =
|
|
13716
|
+
const hoverPlayerRef = useRef20(null);
|
|
13643
13717
|
const [mutedFallbackBlocked, setMutedFallbackBlocked] = useState29(false);
|
|
13644
|
-
const perfListenerRef =
|
|
13718
|
+
const perfListenerRef = useRef20(null);
|
|
13645
13719
|
const clearPerfListener = useCallback13(() => {
|
|
13646
13720
|
if (perfListenerRef.current) {
|
|
13647
13721
|
try {
|
|
@@ -13652,9 +13726,9 @@ function FilePlayer({
|
|
|
13652
13726
|
}
|
|
13653
13727
|
}, []);
|
|
13654
13728
|
useEffect24(() => clearPerfListener, [clearPerfListener]);
|
|
13655
|
-
const hoverActiveRef =
|
|
13656
|
-
const hoverGenerationRef =
|
|
13657
|
-
const activationWaiterRef =
|
|
13729
|
+
const hoverActiveRef = useRef20(false);
|
|
13730
|
+
const hoverGenerationRef = useRef20(0);
|
|
13731
|
+
const activationWaiterRef = useRef20(null);
|
|
13658
13732
|
const clearActivationWaiter = useCallback13(() => {
|
|
13659
13733
|
if (activationWaiterRef.current) {
|
|
13660
13734
|
activationWaiters.delete(activationWaiterRef.current);
|
|
@@ -13758,9 +13832,9 @@ function FilePlayer({
|
|
|
13758
13832
|
}, [hoverControlled, playWhenHovered, startHoverPlayback, stopHoverPlayback]);
|
|
13759
13833
|
const handleHoverEnter = playOnHover && !hoverControlled ? startHoverPlayback : void 0;
|
|
13760
13834
|
const handleHoverLeave = playOnHover && !hoverControlled ? stopHoverPlayback : void 0;
|
|
13761
|
-
const mutedIntentRef =
|
|
13835
|
+
const mutedIntentRef = useRef20(mutedIntent);
|
|
13762
13836
|
mutedIntentRef.current = mutedIntent;
|
|
13763
|
-
const onMutedFallbackChangeRef =
|
|
13837
|
+
const onMutedFallbackChangeRef = useRef20(onMutedFallbackChange);
|
|
13764
13838
|
onMutedFallbackChangeRef.current = onMutedFallbackChange;
|
|
13765
13839
|
useEffect24(() => {
|
|
13766
13840
|
onMutedFallbackChangeRef.current?.({
|
|
@@ -13768,7 +13842,7 @@ function FilePlayer({
|
|
|
13768
13842
|
blocked: hoverMutedFallback && mutedFallbackBlocked
|
|
13769
13843
|
});
|
|
13770
13844
|
}, [hoverMutedFallback, mutedFallbackBlocked]);
|
|
13771
|
-
const autoPlayKickedRef =
|
|
13845
|
+
const autoPlayKickedRef = useRef20(false);
|
|
13772
13846
|
useEffect24(() => {
|
|
13773
13847
|
if (autoPlayKickedRef.current) return;
|
|
13774
13848
|
if (startMuted) {
|
|
@@ -13851,7 +13925,7 @@ function FilePlayer({
|
|
|
13851
13925
|
}
|
|
13852
13926
|
};
|
|
13853
13927
|
}, []);
|
|
13854
|
-
const onEndedRef =
|
|
13928
|
+
const onEndedRef = useRef20(onEnded);
|
|
13855
13929
|
onEndedRef.current = onEnded;
|
|
13856
13930
|
useEffect24(() => {
|
|
13857
13931
|
const el = hoverPlayerRef.current;
|
|
@@ -14006,7 +14080,7 @@ function YouTubeFacadeInner({
|
|
|
14006
14080
|
suspended
|
|
14007
14081
|
}) {
|
|
14008
14082
|
const [activated, setActivated] = useState29(Boolean(autoActivate));
|
|
14009
|
-
const iframeRef =
|
|
14083
|
+
const iframeRef = useRef20(null);
|
|
14010
14084
|
const embedUrl = useMemo19(() => {
|
|
14011
14085
|
const params = new URLSearchParams({
|
|
14012
14086
|
autoplay: "1",
|
|
@@ -14079,7 +14153,7 @@ function YouTubeFacadeInner({
|
|
|
14079
14153
|
if (blurTimer !== null) clearTimeout(blurTimer);
|
|
14080
14154
|
};
|
|
14081
14155
|
}, [activated]);
|
|
14082
|
-
const prevSuspendedRef =
|
|
14156
|
+
const prevSuspendedRef = useRef20(false);
|
|
14083
14157
|
useEffect24(() => {
|
|
14084
14158
|
const wasSuspended = prevSuspendedRef.current;
|
|
14085
14159
|
prevSuspendedRef.current = Boolean(suspended);
|
|
@@ -14142,7 +14216,7 @@ import { useMemo as useMemo21, useState as useState32 } from "react";
|
|
|
14142
14216
|
|
|
14143
14217
|
// src/components/features/video-hover-preview.tsx
|
|
14144
14218
|
init_cn();
|
|
14145
|
-
import { useEffect as useEffect25, useRef as
|
|
14219
|
+
import { useEffect as useEffect25, useRef as useRef21, useState as useState30 } from "react";
|
|
14146
14220
|
import { Fragment as Fragment21, jsx as jsx84, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
14147
14221
|
function VideoHoverPreviewSurface({
|
|
14148
14222
|
url,
|
|
@@ -14167,7 +14241,7 @@ function VideoHoverPreviewSurface({
|
|
|
14167
14241
|
}) {
|
|
14168
14242
|
const previewUrl = toMuxPreviewUrl(url);
|
|
14169
14243
|
const gateControlled = playerMounted !== void 0;
|
|
14170
|
-
const rootElRef =
|
|
14244
|
+
const rootElRef = useRef21(null);
|
|
14171
14245
|
const [isNear, setIsNear] = useState30(false);
|
|
14172
14246
|
useEffect25(() => {
|
|
14173
14247
|
if (gateControlled) return;
|
|
@@ -14364,7 +14438,7 @@ function sortBitesByCreatedAtDesc(a, b) {
|
|
|
14364
14438
|
|
|
14365
14439
|
// src/components/features/cards-strip.tsx
|
|
14366
14440
|
init_cn();
|
|
14367
|
-
import React41, { useCallback as useCallback14, useEffect as useEffect26, useMemo as useMemo20, useRef as
|
|
14441
|
+
import React41, { useCallback as useCallback14, useEffect as useEffect26, useMemo as useMemo20, useRef as useRef22, useState as useState31 } from "react";
|
|
14368
14442
|
init_button2();
|
|
14369
14443
|
|
|
14370
14444
|
// src/components/layout/page-heading.tsx
|
|
@@ -14466,9 +14540,9 @@ function CardsStrip(props) {
|
|
|
14466
14540
|
}
|
|
14467
14541
|
return React41.isValidElement(item) && item.key != null ? String(item.key) : String(index);
|
|
14468
14542
|
};
|
|
14469
|
-
const wrapperRef =
|
|
14470
|
-
const scrollerRef =
|
|
14471
|
-
const trackRef =
|
|
14543
|
+
const wrapperRef = useRef22(null);
|
|
14544
|
+
const scrollerRef = useRef22(null);
|
|
14545
|
+
const trackRef = useRef22(null);
|
|
14472
14546
|
const [reducedMotion, setReducedMotion] = useState31(false);
|
|
14473
14547
|
const [isTouch, setIsTouch] = useState31(false);
|
|
14474
14548
|
const [isMobile, setIsMobile] = useState31(false);
|
|
@@ -14488,7 +14562,7 @@ function CardsStrip(props) {
|
|
|
14488
14562
|
}, []);
|
|
14489
14563
|
const [overflows, setOverflows] = useState31(false);
|
|
14490
14564
|
const [marqueeEligible, setMarqueeEligible] = useState31(false);
|
|
14491
|
-
const singleCopyWidthRef =
|
|
14565
|
+
const singleCopyWidthRef = useRef22(0);
|
|
14492
14566
|
const marqueeActive = autoScroll && !reducedMotion && marqueeEligible && items.length > 0;
|
|
14493
14567
|
const measure = useCallback14(() => {
|
|
14494
14568
|
const scroller = scrollerRef.current;
|
|
@@ -14510,8 +14584,8 @@ function CardsStrip(props) {
|
|
|
14510
14584
|
ro.observe(track);
|
|
14511
14585
|
return () => ro.disconnect();
|
|
14512
14586
|
}, [measure, items.length, marqueeActive, isMobile]);
|
|
14513
|
-
const chevronSuppressUntilRef =
|
|
14514
|
-
const userScrollSuppressUntilRef =
|
|
14587
|
+
const chevronSuppressUntilRef = useRef22(0);
|
|
14588
|
+
const userScrollSuppressUntilRef = useRef22(0);
|
|
14515
14589
|
const [nearViewport, setNearViewport] = useState31(true);
|
|
14516
14590
|
useEffect26(() => {
|
|
14517
14591
|
const el = wrapperRef.current;
|
|
@@ -14524,7 +14598,7 @@ function CardsStrip(props) {
|
|
|
14524
14598
|
return () => io.disconnect();
|
|
14525
14599
|
}, []);
|
|
14526
14600
|
const [activeKey, setActiveKey] = useState31(null);
|
|
14527
|
-
const activeKeyRef =
|
|
14601
|
+
const activeKeyRef = useRef22(null);
|
|
14528
14602
|
const activate = useCallback14((key) => {
|
|
14529
14603
|
activeKeyRef.current = key;
|
|
14530
14604
|
setActiveKey(key);
|
|
@@ -14533,8 +14607,8 @@ function CardsStrip(props) {
|
|
|
14533
14607
|
if (activeKeyRef.current === key) activeKeyRef.current = null;
|
|
14534
14608
|
setActiveKey((current) => current === key ? null : current);
|
|
14535
14609
|
}, []);
|
|
14536
|
-
const hoverPointerRef =
|
|
14537
|
-
const lastHoverSyncScrollRef =
|
|
14610
|
+
const hoverPointerRef = useRef22({ x: 0, y: 0, inside: false });
|
|
14611
|
+
const lastHoverSyncScrollRef = useRef22(-1);
|
|
14538
14612
|
const syncHoverToPointer = useCallback14(() => {
|
|
14539
14613
|
const p = hoverPointerRef.current;
|
|
14540
14614
|
if (!p.inside) return;
|
|
@@ -14596,9 +14670,9 @@ function CardsStrip(props) {
|
|
|
14596
14670
|
onAfterFrame: syncHoverIfScrolled
|
|
14597
14671
|
});
|
|
14598
14672
|
const [mountedIdx, setMountedIdx] = useState31(() => /* @__PURE__ */ new Set());
|
|
14599
|
-
const cardObserverRef =
|
|
14600
|
-
const cardElIdxRef =
|
|
14601
|
-
const cardElNearRef =
|
|
14673
|
+
const cardObserverRef = useRef22(null);
|
|
14674
|
+
const cardElIdxRef = useRef22(/* @__PURE__ */ new Map());
|
|
14675
|
+
const cardElNearRef = useRef22(/* @__PURE__ */ new Map());
|
|
14602
14676
|
useEffect26(() => {
|
|
14603
14677
|
if (typeof IntersectionObserver === "undefined") return;
|
|
14604
14678
|
const io = new IntersectionObserver((entries) => {
|
|
@@ -14627,7 +14701,7 @@ function CardsStrip(props) {
|
|
|
14627
14701
|
cardObserverRef.current = null;
|
|
14628
14702
|
};
|
|
14629
14703
|
}, []);
|
|
14630
|
-
const cardRefFnsRef =
|
|
14704
|
+
const cardRefFnsRef = useRef22(/* @__PURE__ */ new Map());
|
|
14631
14705
|
const getCardRef = useCallback14((idx) => {
|
|
14632
14706
|
let fn = cardRefFnsRef.current.get(idx);
|
|
14633
14707
|
if (!fn) {
|
|
@@ -14667,7 +14741,7 @@ function CardsStrip(props) {
|
|
|
14667
14741
|
const onPointerDownIntent = useCallback14((e) => {
|
|
14668
14742
|
if (e.pointerType === "touch") onUserScrollIntent();
|
|
14669
14743
|
}, [onUserScrollIntent]);
|
|
14670
|
-
const marqueeActiveRef =
|
|
14744
|
+
const marqueeActiveRef = useRef22(false);
|
|
14671
14745
|
marqueeActiveRef.current = marqueeActive;
|
|
14672
14746
|
const onSeamWarp = useCallback14(() => {
|
|
14673
14747
|
const scroller = scrollerRef.current;
|
|
@@ -17026,7 +17100,7 @@ import {
|
|
|
17026
17100
|
useEffect as useEffect27,
|
|
17027
17101
|
useImperativeHandle as useImperativeHandle4,
|
|
17028
17102
|
useMemo as useMemo23,
|
|
17029
|
-
useRef as
|
|
17103
|
+
useRef as useRef24,
|
|
17030
17104
|
useState as useState34
|
|
17031
17105
|
} from "react";
|
|
17032
17106
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
@@ -17201,8 +17275,8 @@ function AutocompleteInner(props, ref) {
|
|
|
17201
17275
|
};
|
|
17202
17276
|
const [isOpen, setIsOpen] = useState34(false);
|
|
17203
17277
|
const [highlightedIndex, setHighlightedIndex] = useState34(-1);
|
|
17204
|
-
const containerRef =
|
|
17205
|
-
const hiddenTagsPopupRef =
|
|
17278
|
+
const containerRef = useRef24(null);
|
|
17279
|
+
const hiddenTagsPopupRef = useRef24(null);
|
|
17206
17280
|
const isInvalid = invalid || !!error;
|
|
17207
17281
|
useImperativeHandle4(ref, () => containerRef.current);
|
|
17208
17282
|
const selectedOptions = useMemo23(() => {
|
|
@@ -17220,7 +17294,7 @@ function AutocompleteInner(props, ref) {
|
|
|
17220
17294
|
const hiddenTags = multiple ? selectedOptions.slice(visibleCount) : [];
|
|
17221
17295
|
const hiddenTagsCount = multiple ? selectedOptions.length - visibleCount : 0;
|
|
17222
17296
|
const [showHiddenTags, setShowHiddenTags] = useState34(false);
|
|
17223
|
-
const hiddenTagsRef =
|
|
17297
|
+
const hiddenTagsRef = useRef24(null);
|
|
17224
17298
|
useEffect27(() => {
|
|
17225
17299
|
if (!showHiddenTags) return;
|
|
17226
17300
|
const handleClick = (e) => {
|
|
@@ -18908,7 +18982,7 @@ function DateFilterMenu({
|
|
|
18908
18982
|
|
|
18909
18983
|
// src/components/ui/duration-input.tsx
|
|
18910
18984
|
init_cn();
|
|
18911
|
-
import { Fragment as Fragment31, useEffect as useEffect29, useRef as
|
|
18985
|
+
import { Fragment as Fragment31, useEffect as useEffect29, useRef as useRef25, useState as useState36 } from "react";
|
|
18912
18986
|
import { jsx as jsx113, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
18913
18987
|
var SEGMENT_META = [
|
|
18914
18988
|
{ label: "Hours", placeholder: "HH", max: 99 },
|
|
@@ -18923,7 +18997,7 @@ var split = (value) => {
|
|
|
18923
18997
|
};
|
|
18924
18998
|
function DurationInput({ value, onChange, invalid, className }) {
|
|
18925
18999
|
const [segments, setSegments] = useState36(() => split(value));
|
|
18926
|
-
const refs = [
|
|
19000
|
+
const refs = [useRef25(null), useRef25(null), useRef25(null)];
|
|
18927
19001
|
useEffect29(() => {
|
|
18928
19002
|
setSegments((prev) => compose(prev) === value ? prev : split(value));
|
|
18929
19003
|
}, [value]);
|
|
@@ -19041,7 +19115,7 @@ init_cn();
|
|
|
19041
19115
|
import React51 from "react";
|
|
19042
19116
|
|
|
19043
19117
|
// src/components/ui/progress-bar.tsx
|
|
19044
|
-
import { useEffect as useEffect30, useRef as
|
|
19118
|
+
import { useEffect as useEffect30, useRef as useRef26, useState as useState37 } from "react";
|
|
19045
19119
|
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
19046
19120
|
var ProgressBar = ({
|
|
19047
19121
|
progress,
|
|
@@ -19057,7 +19131,7 @@ var ProgressBar = ({
|
|
|
19057
19131
|
const isMdUp = useMdUp() ?? true;
|
|
19058
19132
|
const effectiveSegmentWidth = isMdUp ? segmentWidth : mobileSegmentWidth;
|
|
19059
19133
|
const effectiveHeight = isMdUp ? height : mobileHeight;
|
|
19060
|
-
const containerRef =
|
|
19134
|
+
const containerRef = useRef26(null);
|
|
19061
19135
|
const [segmentCount, setSegmentCount] = useState37(0);
|
|
19062
19136
|
useEffect30(() => {
|
|
19063
19137
|
if (!containerRef.current) return;
|
|
@@ -22205,7 +22279,7 @@ function TabContent({
|
|
|
22205
22279
|
// src/components/ui/tab-navigation.tsx
|
|
22206
22280
|
init_next_navigation();
|
|
22207
22281
|
init_cn();
|
|
22208
|
-
import { useState as useState46, useEffect as useEffect37, useLayoutEffect as useLayoutEffect7, useDeferredValue, useMemo as useMemo28, useRef as
|
|
22282
|
+
import { useState as useState46, useEffect as useEffect37, useLayoutEffect as useLayoutEffect7, useDeferredValue, useMemo as useMemo28, useRef as useRef29, useCallback as useCallback19, memo as memo4, startTransition } from "react";
|
|
22209
22283
|
import { Fragment as Fragment34, jsx as jsx147, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
22210
22284
|
var HIDDEN_INDICATOR = { left: 0, width: 0 };
|
|
22211
22285
|
var StatusDot = ({ indicator, className }) => /* @__PURE__ */ jsx147("div", { className: cn(
|
|
@@ -22225,13 +22299,13 @@ var TabBar = memo4(function TabBar2({
|
|
|
22225
22299
|
showRightGradient,
|
|
22226
22300
|
stretchTabs
|
|
22227
22301
|
}) {
|
|
22228
|
-
const scrollRef =
|
|
22229
|
-
const activeTabRef =
|
|
22230
|
-
const isFirstActiveScrollRef =
|
|
22302
|
+
const scrollRef = useRef29(null);
|
|
22303
|
+
const activeTabRef = useRef29(null);
|
|
22304
|
+
const isFirstActiveScrollRef = useRef29(true);
|
|
22231
22305
|
const [canScrollLeft, setCanScrollLeft] = useState46(false);
|
|
22232
22306
|
const [canScrollRight, setCanScrollRight] = useState46(false);
|
|
22233
22307
|
const [indicator, setIndicator] = useState46(HIDDEN_INDICATOR);
|
|
22234
|
-
const hasPlacedIndicatorRef =
|
|
22308
|
+
const hasPlacedIndicatorRef = useRef29(false);
|
|
22235
22309
|
const measureIndicator = useCallback19(() => {
|
|
22236
22310
|
const active = activeTabRef.current;
|
|
22237
22311
|
const next = active ? { left: active.offsetLeft, width: active.offsetWidth } : HIDDEN_INDICATOR;
|
|
@@ -22415,8 +22489,8 @@ function TabNavigation({
|
|
|
22415
22489
|
};
|
|
22416
22490
|
const [internalActiveTab, setInternalActiveTab] = useState46(getInitialTab);
|
|
22417
22491
|
const activeTab = isUrlSyncEnabled ? internalActiveTab : controlledActiveTab || "";
|
|
22418
|
-
const lastSyncedUrlTabRef =
|
|
22419
|
-
const inFlightUrlTabsRef =
|
|
22492
|
+
const lastSyncedUrlTabRef = useRef29(urlTab);
|
|
22493
|
+
const inFlightUrlTabsRef = useRef29([]);
|
|
22420
22494
|
useEffect37(() => {
|
|
22421
22495
|
if (!isUrlSyncEnabled) return;
|
|
22422
22496
|
const landed = inFlightUrlTabsRef.current.indexOf(urlTab);
|
|
@@ -22435,7 +22509,7 @@ function TabNavigation({
|
|
|
22435
22509
|
lastSyncedUrlTabRef.current = urlTab;
|
|
22436
22510
|
setInternalActiveTab(validTabIds.has(urlTab) ? urlTab : fallbackTab);
|
|
22437
22511
|
}, [isUrlSyncEnabled, urlTab, validTabIds, fallbackTab]);
|
|
22438
|
-
const navRef =
|
|
22512
|
+
const navRef = useRef29({ isUrlSyncEnabled, controlledOnTabChange, searchParams, pathname, paramName, replaceState });
|
|
22439
22513
|
useEffect37(() => {
|
|
22440
22514
|
navRef.current = { isUrlSyncEnabled, controlledOnTabChange, searchParams, pathname, paramName, replaceState };
|
|
22441
22515
|
});
|
|
@@ -22541,7 +22615,7 @@ function AIGeneratedBadge({ className }) {
|
|
|
22541
22615
|
}
|
|
22542
22616
|
|
|
22543
22617
|
// src/components/ui/fade-preview.tsx
|
|
22544
|
-
import { useState as useState47, useRef as
|
|
22618
|
+
import { useState as useState47, useRef as useRef30, useEffect as useEffect38 } from "react";
|
|
22545
22619
|
import { ChevronDown as ChevronDown4 } from "lucide-react";
|
|
22546
22620
|
import { Fragment as Fragment35, jsx as jsx150, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
22547
22621
|
function FadePreview({
|
|
@@ -22551,7 +22625,7 @@ function FadePreview({
|
|
|
22551
22625
|
children
|
|
22552
22626
|
}) {
|
|
22553
22627
|
const [expanded, setExpanded] = useState47(false);
|
|
22554
|
-
const contentRef =
|
|
22628
|
+
const contentRef = useRef30(null);
|
|
22555
22629
|
useEffect38(() => {
|
|
22556
22630
|
setExpanded(false);
|
|
22557
22631
|
}, [resetKey]);
|
|
@@ -22656,7 +22730,7 @@ function useRichMarkdownRuntime() {
|
|
|
22656
22730
|
}
|
|
22657
22731
|
|
|
22658
22732
|
// src/components/embeds/reddit-embed-client.tsx
|
|
22659
|
-
import { useState as useState49, useEffect as useEffect40, useRef as
|
|
22733
|
+
import { useState as useState49, useEffect as useEffect40, useRef as useRef32 } from "react";
|
|
22660
22734
|
|
|
22661
22735
|
// src/utils/social-embed-cache.ts
|
|
22662
22736
|
var cachingRequests = /* @__PURE__ */ new Map();
|
|
@@ -22938,7 +23012,7 @@ var socialCache = SocialEmbedCache.getInstance();
|
|
|
22938
23012
|
|
|
22939
23013
|
// src/components/media-carousel.tsx
|
|
22940
23014
|
init_cn();
|
|
22941
|
-
import { useState as useState48, useRef as
|
|
23015
|
+
import { useState as useState48, useRef as useRef31, useEffect as useEffect39, memo as memo5, useCallback as useCallback20 } from "react";
|
|
22942
23016
|
init_button2();
|
|
22943
23017
|
import { Fragment as Fragment36, jsx as jsx153, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
22944
23018
|
var ChevronLeftIcon = () => /* @__PURE__ */ jsx153("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx153("polyline", { points: "15,18 9,12 15,6" }) });
|
|
@@ -22958,7 +23032,7 @@ var MediaCarousel = memo5(function MediaCarousel2({
|
|
|
22958
23032
|
const [touchEnd, setTouchEnd] = useState48(null);
|
|
22959
23033
|
const [brokenResourceUrls, setBrokenResourceUrls] = useState48({});
|
|
22960
23034
|
const [loadedImageSrc, setLoadedImageSrc] = useState48(null);
|
|
22961
|
-
const carouselRef =
|
|
23035
|
+
const carouselRef = useRef31(null);
|
|
22962
23036
|
const onImageError = useCallback20((originalUrl) => {
|
|
22963
23037
|
const key = originalUrl.trim() || "__missing_src__";
|
|
22964
23038
|
setBrokenResourceUrls((b) => b[key] ? b : { ...b, [key]: true });
|
|
@@ -23251,7 +23325,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
|
|
|
23251
23325
|
const [redditData, setRedditData] = useState49(null);
|
|
23252
23326
|
const [loading, setLoading] = useState49(true);
|
|
23253
23327
|
const [error, setError] = useState49(null);
|
|
23254
|
-
const initializationDone =
|
|
23328
|
+
const initializationDone = useRef32(false);
|
|
23255
23329
|
useEffect40(() => {
|
|
23256
23330
|
if (initializationDone.current) return;
|
|
23257
23331
|
initializationDone.current = true;
|
|
@@ -23558,7 +23632,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
|
|
|
23558
23632
|
}
|
|
23559
23633
|
|
|
23560
23634
|
// src/components/embeds/twitter-embed-client.tsx
|
|
23561
|
-
import { useState as useState50, useEffect as useEffect41, useRef as
|
|
23635
|
+
import { useState as useState50, useEffect as useEffect41, useRef as useRef33 } from "react";
|
|
23562
23636
|
import { jsx as jsx156, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
23563
23637
|
var MessageCircleIcon2 = () => /* @__PURE__ */ jsx156("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx156("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) });
|
|
23564
23638
|
var ExternalLinkIcon3 = () => /* @__PURE__ */ jsxs120("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
|
|
@@ -23587,7 +23661,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
|
|
|
23587
23661
|
const [tweetData, setTweetData] = useState50(null);
|
|
23588
23662
|
const [loading, setLoading] = useState50(true);
|
|
23589
23663
|
const [error, setError] = useState50(null);
|
|
23590
|
-
const initializationDone =
|
|
23664
|
+
const initializationDone = useRef33(false);
|
|
23591
23665
|
const extractedTweetId = tweetId || url.match(/status\/(\d+)/)?.[1];
|
|
23592
23666
|
const tweetUrl = url.includes("twitter.com") || url.includes("x.com") ? url : `https://twitter.com/twitter/status/${extractedTweetId}`;
|
|
23593
23667
|
useEffect41(() => {
|
|
@@ -24216,7 +24290,7 @@ function toFigmaOriginalUrl(url) {
|
|
|
24216
24290
|
init_cn();
|
|
24217
24291
|
|
|
24218
24292
|
// src/components/embeds/embed-iframe.tsx
|
|
24219
|
-
import { useState as useState53, useCallback as useCallback21, useRef as
|
|
24293
|
+
import { useState as useState53, useCallback as useCallback21, useRef as useRef34, useEffect as useEffect43 } from "react";
|
|
24220
24294
|
import { Fragment as Fragment37, jsx as jsx159, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
24221
24295
|
function EmbedLoadingSkeleton({ height }) {
|
|
24222
24296
|
return /* @__PURE__ */ jsx159(
|
|
@@ -24238,7 +24312,7 @@ function EmbedIframe({
|
|
|
24238
24312
|
allowFullScreen
|
|
24239
24313
|
}) {
|
|
24240
24314
|
const [isLoaded, setIsLoaded] = useState53(false);
|
|
24241
|
-
const iframeRef =
|
|
24315
|
+
const iframeRef = useRef34(null);
|
|
24242
24316
|
const handleLoad = useCallback21(() => setIsLoaded(true), []);
|
|
24243
24317
|
useEffect43(() => {
|
|
24244
24318
|
setIsLoaded(false);
|
|
@@ -25073,7 +25147,7 @@ function StatusIndicator({ status, label, href }) {
|
|
|
25073
25147
|
}
|
|
25074
25148
|
|
|
25075
25149
|
// src/components/ui/hover-dropdown.tsx
|
|
25076
|
-
import { useState as useState57, useRef as
|
|
25150
|
+
import { useState as useState57, useRef as useRef35, useCallback as useCallback23 } from "react";
|
|
25077
25151
|
import { Fragment as Fragment39, jsx as jsx169, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
25078
25152
|
function DefaultAnchor({
|
|
25079
25153
|
href,
|
|
@@ -25091,8 +25165,8 @@ function HoverDropdown({
|
|
|
25091
25165
|
renderAnchor
|
|
25092
25166
|
}) {
|
|
25093
25167
|
const [open, setOpen] = useState57(false);
|
|
25094
|
-
const timeoutRef =
|
|
25095
|
-
const containerRef =
|
|
25168
|
+
const timeoutRef = useRef35(void 0);
|
|
25169
|
+
const containerRef = useRef35(null);
|
|
25096
25170
|
const show = useCallback23(() => {
|
|
25097
25171
|
clearTimeout(timeoutRef.current);
|
|
25098
25172
|
setOpen(true);
|
|
@@ -30068,7 +30142,8 @@ var PROVIDER_META = {
|
|
|
30068
30142
|
)
|
|
30069
30143
|
},
|
|
30070
30144
|
google: { name: "Google", Icon: GoogleLogoIcon },
|
|
30071
|
-
microsoft: { name: "Microsoft", Icon: MicrosoftLogoIcon }
|
|
30145
|
+
microsoft: { name: "Microsoft", Icon: MicrosoftLogoIcon },
|
|
30146
|
+
apple: { name: "Apple", Icon: AppleLogoIcon }
|
|
30072
30147
|
};
|
|
30073
30148
|
function SsoProviderButtons({
|
|
30074
30149
|
providers,
|
|
@@ -31370,7 +31445,7 @@ var ErrorBoundary = class extends Component3 {
|
|
|
31370
31445
|
|
|
31371
31446
|
// src/components/features/figma-prototype-viewer.tsx
|
|
31372
31447
|
init_cn();
|
|
31373
|
-
import { useState as useState66, useRef as
|
|
31448
|
+
import { useState as useState66, useRef as useRef36, useEffect as useEffect51, useCallback as useCallback25, useMemo as useMemo33 } from "react";
|
|
31374
31449
|
|
|
31375
31450
|
// src/components/features/section-selector.tsx
|
|
31376
31451
|
init_cn();
|
|
@@ -31739,10 +31814,10 @@ var FigmaPrototypeViewer = ({
|
|
|
31739
31814
|
}) => {
|
|
31740
31815
|
const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID || "UTQPwZHR9OZp68TTGPFFi5";
|
|
31741
31816
|
const showDebugPanel = process.env.NEXT_PUBLIC_FIGMA_DEBUG === "true";
|
|
31742
|
-
const iframeRef =
|
|
31743
|
-
const containerRef =
|
|
31744
|
-
const navTimerRef =
|
|
31745
|
-
const touchTimerRef =
|
|
31817
|
+
const iframeRef = useRef36(null);
|
|
31818
|
+
const containerRef = useRef36(null);
|
|
31819
|
+
const navTimerRef = useRef36(null);
|
|
31820
|
+
const touchTimerRef = useRef36(null);
|
|
31746
31821
|
const [screenWidth, setScreenWidth] = useState66(
|
|
31747
31822
|
typeof window !== "undefined" ? window.innerWidth : DESKTOP_BREAKPOINT
|
|
31748
31823
|
);
|
|
@@ -32033,7 +32108,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32033
32108
|
|
|
32034
32109
|
// src/components/features/filters-dropdown.tsx
|
|
32035
32110
|
init_cn();
|
|
32036
|
-
import { useEffect as useEffect52, useRef as
|
|
32111
|
+
import { useEffect as useEffect52, useRef as useRef37, useState as useState67 } from "react";
|
|
32037
32112
|
import { jsx as jsx230, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
32038
32113
|
var FilterCheckbox = ({ checked, disabled = false, className }) => {
|
|
32039
32114
|
return /* @__PURE__ */ jsx230(
|
|
@@ -32070,9 +32145,9 @@ var FiltersDropdown = ({
|
|
|
32070
32145
|
const [isVisible, setIsVisible] = useState67(false);
|
|
32071
32146
|
const [isMobile, setIsMobile] = useState67(false);
|
|
32072
32147
|
const [actualPlacement, setActualPlacement] = useState67(placement);
|
|
32073
|
-
const dropdownRef =
|
|
32074
|
-
const triggerRef =
|
|
32075
|
-
const containerRef =
|
|
32148
|
+
const dropdownRef = useRef37(null);
|
|
32149
|
+
const triggerRef = useRef37(null);
|
|
32150
|
+
const containerRef = useRef37(null);
|
|
32076
32151
|
useEffect52(() => {
|
|
32077
32152
|
if (isOpen) {
|
|
32078
32153
|
setShouldRender(true);
|
|
@@ -32474,7 +32549,7 @@ function useLoading() {
|
|
|
32474
32549
|
}
|
|
32475
32550
|
|
|
32476
32551
|
// src/components/features/media-gallery-manager.tsx
|
|
32477
|
-
import { useState as useState69, useRef as
|
|
32552
|
+
import { useState as useState69, useRef as useRef38, useCallback as useCallback26 } from "react";
|
|
32478
32553
|
import {
|
|
32479
32554
|
Upload,
|
|
32480
32555
|
Image as ImageIcon2,
|
|
@@ -32494,7 +32569,7 @@ function MediaGalleryManager({
|
|
|
32494
32569
|
modalTitle = "Media Gallery",
|
|
32495
32570
|
className = ""
|
|
32496
32571
|
}) {
|
|
32497
|
-
const fileInputRef =
|
|
32572
|
+
const fileInputRef = useRef38(null);
|
|
32498
32573
|
const [deletingIndex, setDeletingIndex] = useState69(null);
|
|
32499
32574
|
const [draggedIndex, setDraggedIndex] = useState69(null);
|
|
32500
32575
|
const handleFileSelect = useCallback26(async (event) => {
|
|
@@ -32702,7 +32777,7 @@ function OSTypeBadgeGroup({
|
|
|
32702
32777
|
}
|
|
32703
32778
|
|
|
32704
32779
|
// src/components/features/parallax-image-showcase.tsx
|
|
32705
|
-
import { useEffect as useEffect54, useState as useState70, useRef as
|
|
32780
|
+
import { useEffect as useEffect54, useState as useState70, useRef as useRef39 } from "react";
|
|
32706
32781
|
import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
|
|
32707
32782
|
import { jsx as jsx237, jsxs as jsxs183 } from "react/jsx-runtime";
|
|
32708
32783
|
var ParallaxImageShowcase = ({
|
|
@@ -32721,7 +32796,7 @@ var ParallaxImageShowcase = ({
|
|
|
32721
32796
|
const mouseXSpring = useSpring(mouseX, springConfig);
|
|
32722
32797
|
const mouseYSpring = useSpring(mouseY, springConfig);
|
|
32723
32798
|
const [componentRect, setComponentRect] = useState70(null);
|
|
32724
|
-
const componentRef =
|
|
32799
|
+
const componentRef = useRef39(null);
|
|
32725
32800
|
useEffect54(() => {
|
|
32726
32801
|
const updateRect = () => {
|
|
32727
32802
|
if (componentRef.current) {
|
|
@@ -33261,7 +33336,7 @@ function PushButtonSelector({
|
|
|
33261
33336
|
}
|
|
33262
33337
|
|
|
33263
33338
|
// src/components/features/release-media-manager.tsx
|
|
33264
|
-
import { useState as useState71, useRef as
|
|
33339
|
+
import { useState as useState71, useRef as useRef40 } from "react";
|
|
33265
33340
|
import { Trash2 as Trash24, Plus as Plus5, Image as ImageIcon3, Video as VideoIcon2, Upload as Upload2, Loader2 as Loader24, GripVertical as GripVertical2 } from "lucide-react";
|
|
33266
33341
|
import { jsx as jsx241, jsxs as jsxs187 } from "react/jsx-runtime";
|
|
33267
33342
|
function ReleaseMediaManager({
|
|
@@ -33270,7 +33345,7 @@ function ReleaseMediaManager({
|
|
|
33270
33345
|
onUpload,
|
|
33271
33346
|
className = ""
|
|
33272
33347
|
}) {
|
|
33273
|
-
const fileInputRef =
|
|
33348
|
+
const fileInputRef = useRef40(null);
|
|
33274
33349
|
const [uploadingIndex, setUploadingIndex] = useState71(null);
|
|
33275
33350
|
const handleFileSelect = async (event) => {
|
|
33276
33351
|
const file = event.target.files?.[0];
|
|
@@ -34278,7 +34353,7 @@ function VideoBitesDisplay({
|
|
|
34278
34353
|
// src/components/features/floating-walkthrough-video.tsx
|
|
34279
34354
|
init_cn();
|
|
34280
34355
|
init_button2();
|
|
34281
|
-
import { useCallback as useCallback27, useEffect as useEffect55, useMemo as useMemo34, useRef as
|
|
34356
|
+
import { useCallback as useCallback27, useEffect as useEffect55, useMemo as useMemo34, useRef as useRef41, useState as useState74 } from "react";
|
|
34282
34357
|
import * as DialogPrimitive3 from "@radix-ui/react-dialog";
|
|
34283
34358
|
import { Fragment as Fragment48, jsx as jsx250, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
34284
34359
|
var isAtEnd = (duration, time) => duration > 0 && duration - time < 1;
|
|
@@ -34347,13 +34422,13 @@ function FloatingWalkthroughVideo({
|
|
|
34347
34422
|
const [pausedOpenSession, setPausedOpenSession] = useState74(
|
|
34348
34423
|
Boolean(defaultOpen && defaultOpenPaused) || deepLinkHit
|
|
34349
34424
|
);
|
|
34350
|
-
const previewHandleRef =
|
|
34351
|
-
const theaterHandleRef =
|
|
34352
|
-
const theaterForcedMuteRef =
|
|
34353
|
-
const resumeHandleRef =
|
|
34354
|
-
const closeButtonRef =
|
|
34355
|
-
const userMutedRef =
|
|
34356
|
-
const endedLatchRef =
|
|
34425
|
+
const previewHandleRef = useRef41(null);
|
|
34426
|
+
const theaterHandleRef = useRef41(null);
|
|
34427
|
+
const theaterForcedMuteRef = useRef41(false);
|
|
34428
|
+
const resumeHandleRef = useRef41(null);
|
|
34429
|
+
const closeButtonRef = useRef41(null);
|
|
34430
|
+
const userMutedRef = useRef41(false);
|
|
34431
|
+
const endedLatchRef = useRef41(false);
|
|
34357
34432
|
const [hovered, setHovered] = useState74(false);
|
|
34358
34433
|
const [handoff, setHandoff] = useState74(null);
|
|
34359
34434
|
const [suspended, setSuspended] = useState74(false);
|
|
@@ -34404,10 +34479,10 @@ function FloatingWalkthroughVideo({
|
|
|
34404
34479
|
setCardPaused(true);
|
|
34405
34480
|
setHovered(false);
|
|
34406
34481
|
}, [footerHidden, resumeMode, hovered]);
|
|
34407
|
-
const cardModeRef =
|
|
34408
|
-
const selfDrivenForRef =
|
|
34409
|
-
const justClosedRef =
|
|
34410
|
-
const justClosedTimerRef =
|
|
34482
|
+
const cardModeRef = useRef41("poster");
|
|
34483
|
+
const selfDrivenForRef = useRef41(null);
|
|
34484
|
+
const justClosedRef = useRef41(false);
|
|
34485
|
+
const justClosedTimerRef = useRef41(null);
|
|
34411
34486
|
const commitOpen = useCallback27((next) => {
|
|
34412
34487
|
if (!next) {
|
|
34413
34488
|
justClosedRef.current = true;
|
|
@@ -36619,7 +36694,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
36619
36694
|
init_button2();
|
|
36620
36695
|
|
|
36621
36696
|
// src/components/ui/phone-input.tsx
|
|
36622
|
-
import { useCallback as useCallback29, useEffect as useEffect57, useMemo as useMemo35, useRef as
|
|
36697
|
+
import { useCallback as useCallback29, useEffect as useEffect57, useMemo as useMemo35, useRef as useRef42, useState as useState78 } from "react";
|
|
36623
36698
|
import { jsx as jsx270, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
36624
36699
|
function PhoneInput({
|
|
36625
36700
|
value,
|
|
@@ -36637,7 +36712,7 @@ function PhoneInput({
|
|
|
36637
36712
|
[countryCode, priority, others]
|
|
36638
36713
|
);
|
|
36639
36714
|
const [isInvalid, setIsInvalid] = useState78(false);
|
|
36640
|
-
const debounceRef =
|
|
36715
|
+
const debounceRef = useRef42(null);
|
|
36641
36716
|
const digitCount = useCallback29((val) => val.replace(/[^0-9]/g, "").length, []);
|
|
36642
36717
|
const runValidation = useCallback29((phone) => {
|
|
36643
36718
|
if (!phone || digitCount(phone) === 0) {
|
|
@@ -37143,7 +37218,7 @@ function useOptionalNotifications() {
|
|
|
37143
37218
|
}
|
|
37144
37219
|
|
|
37145
37220
|
// src/components/features/notifications/notification-drawer.tsx
|
|
37146
|
-
import { useEffect as useEffect62, useRef as
|
|
37221
|
+
import { useEffect as useEffect62, useRef as useRef45 } from "react";
|
|
37147
37222
|
|
|
37148
37223
|
// src/components/navigation/app-layout-context.ts
|
|
37149
37224
|
import { createContext as createContext10, useContext as useContext10 } from "react";
|
|
@@ -37911,9 +37986,9 @@ function DrawerScrollList({
|
|
|
37911
37986
|
loadMoreRootMargin,
|
|
37912
37987
|
renderTile
|
|
37913
37988
|
}) {
|
|
37914
|
-
const scrollRef =
|
|
37915
|
-
const sentinelRef =
|
|
37916
|
-
const loadMoreRef =
|
|
37989
|
+
const scrollRef = useRef45(null);
|
|
37990
|
+
const sentinelRef = useRef45(null);
|
|
37991
|
+
const loadMoreRef = useRef45(loadMore);
|
|
37917
37992
|
loadMoreRef.current = loadMore;
|
|
37918
37993
|
useEffect62(() => {
|
|
37919
37994
|
if (!loadMore || !hasMore || isLoadingMore) return;
|
|
@@ -38782,7 +38857,7 @@ function LastEntryRow({ entry, onClick }) {
|
|
|
38782
38857
|
// src/components/features/time-tracker/time-tracker-header-button.tsx
|
|
38783
38858
|
init_cn();
|
|
38784
38859
|
import * as PopoverPrimitive5 from "@radix-ui/react-popover";
|
|
38785
|
-
import { useEffect as useEffect65, useRef as
|
|
38860
|
+
import { useEffect as useEffect65, useRef as useRef46 } from "react";
|
|
38786
38861
|
|
|
38787
38862
|
// src/components/navigation/header-button.tsx
|
|
38788
38863
|
init_cn();
|
|
@@ -38865,11 +38940,11 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
38865
38940
|
const layoutContainer = useAppLayoutDrawerContainer();
|
|
38866
38941
|
const coordination = useAppLayoutDrawerCoordination();
|
|
38867
38942
|
const isOpen = ctx?.isOpen ?? false;
|
|
38868
|
-
const isOpenRef =
|
|
38943
|
+
const isOpenRef = useRef46(isOpen);
|
|
38869
38944
|
isOpenRef.current = isOpen;
|
|
38870
|
-
const closeRef =
|
|
38945
|
+
const closeRef = useRef46(ctx?.close);
|
|
38871
38946
|
closeRef.current = ctx?.close;
|
|
38872
|
-
const selfHandleRef =
|
|
38947
|
+
const selfHandleRef = useRef46(null);
|
|
38873
38948
|
if (!selfHandleRef.current) {
|
|
38874
38949
|
selfHandleRef.current = {
|
|
38875
38950
|
close: () => {
|
|
@@ -39903,7 +39978,7 @@ function SortableRow({
|
|
|
39903
39978
|
|
|
39904
39979
|
// src/components/navigation/header.tsx
|
|
39905
39980
|
init_next_link();
|
|
39906
|
-
import React115, { useEffect as useEffect69, useRef as
|
|
39981
|
+
import React115, { useEffect as useEffect69, useRef as useRef50, useState as useState91 } from "react";
|
|
39907
39982
|
init_button2();
|
|
39908
39983
|
|
|
39909
39984
|
// src/components/navigation/mingo-ai-button.tsx
|
|
@@ -39957,14 +40032,14 @@ function MingoAiButton({ source, icon, label = "Mingo AI", className, onClick, .
|
|
|
39957
40032
|
}
|
|
39958
40033
|
|
|
39959
40034
|
// src/components/navigation/mobile-nav-panel.tsx
|
|
39960
|
-
import { useRef as
|
|
40035
|
+
import { useRef as useRef49 } from "react";
|
|
39961
40036
|
import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
|
|
39962
40037
|
init_button2();
|
|
39963
40038
|
import { X as X10 } from "lucide-react";
|
|
39964
40039
|
import { Fragment as Fragment57, jsx as jsx291, jsxs as jsxs226 } from "react/jsx-runtime";
|
|
39965
40040
|
var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
|
|
39966
40041
|
function MobileNavPanel({ isOpen, config }) {
|
|
39967
|
-
const panelRef =
|
|
40042
|
+
const panelRef = useRef49(null);
|
|
39968
40043
|
usePreventScroll3({ isDisabled: !isOpen });
|
|
39969
40044
|
useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
|
|
39970
40045
|
const headerHeight = useHeaderHeight(64, { enabled: isOpen });
|
|
@@ -40510,8 +40585,8 @@ function Header2({ config, platform }) {
|
|
|
40510
40585
|
const [show, setShow] = useState91(true);
|
|
40511
40586
|
const [lastScrollY, setLastScrollY] = useState91(0);
|
|
40512
40587
|
const [openDropdowns, setOpenDropdowns] = useState91({});
|
|
40513
|
-
const dropdownRefs =
|
|
40514
|
-
const triggerRefs =
|
|
40588
|
+
const dropdownRefs = useRef50({});
|
|
40589
|
+
const triggerRefs = useRef50({});
|
|
40515
40590
|
useEffect69(() => {
|
|
40516
40591
|
const handleClickOutside = (event) => {
|
|
40517
40592
|
const target = event.target;
|
|
@@ -40852,7 +40927,7 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
40852
40927
|
}
|
|
40853
40928
|
|
|
40854
40929
|
// src/components/navigation/sliding-sidebar.tsx
|
|
40855
|
-
import { useState as useState93, useEffect as useEffect71, useRef as
|
|
40930
|
+
import { useState as useState93, useEffect as useEffect71, useRef as useRef51 } from "react";
|
|
40856
40931
|
import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
|
|
40857
40932
|
import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
|
|
40858
40933
|
init_button2();
|
|
@@ -40861,7 +40936,7 @@ function SlidingSidebar({ config }) {
|
|
|
40861
40936
|
const [expandedItems, setExpandedItems] = useState93(/* @__PURE__ */ new Set());
|
|
40862
40937
|
const [mounted, setMounted] = useState93(false);
|
|
40863
40938
|
const headerHeight = useHeaderHeight();
|
|
40864
|
-
const asideRef =
|
|
40939
|
+
const asideRef = useRef51(null);
|
|
40865
40940
|
const prefersReducedMotion2 = useReducedMotion();
|
|
40866
40941
|
usePreventScroll4({ isDisabled: !config.isOpen });
|
|
40867
40942
|
useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
|
|
@@ -41033,7 +41108,7 @@ function SlidingSidebar({ config }) {
|
|
|
41033
41108
|
}
|
|
41034
41109
|
|
|
41035
41110
|
// src/components/navigation/sticky-section-nav.tsx
|
|
41036
|
-
import { useEffect as useEffect72, useState as useState94, useCallback as useCallback36, useRef as
|
|
41111
|
+
import { useEffect as useEffect72, useState as useState94, useCallback as useCallback36, useRef as useRef52 } from "react";
|
|
41037
41112
|
import { jsx as jsx299, jsxs as jsxs232 } from "react/jsx-runtime";
|
|
41038
41113
|
function StickySectionNav({
|
|
41039
41114
|
sections,
|
|
@@ -41095,7 +41170,7 @@ function StickySectionNav({
|
|
|
41095
41170
|
}
|
|
41096
41171
|
function useSectionNavigation(sections, options) {
|
|
41097
41172
|
const [activeSection, setActiveSection] = useState94(sections[0]?.id || "");
|
|
41098
|
-
const isScrollingFromClick =
|
|
41173
|
+
const isScrollingFromClick = useRef52(false);
|
|
41099
41174
|
const { offset: offset2 = 100 } = options || {};
|
|
41100
41175
|
const handleSectionClick = useCallback36((sectionId) => {
|
|
41101
41176
|
const targetElement = document.getElementById(sectionId);
|
|
@@ -41930,10 +42005,10 @@ function AppHeaderSkeleton({
|
|
|
41930
42005
|
}
|
|
41931
42006
|
|
|
41932
42007
|
// src/components/navigation/app-layout.tsx
|
|
41933
|
-
import { useCallback as useCallback39, useMemo as useMemo43, useRef as
|
|
42008
|
+
import { useCallback as useCallback39, useMemo as useMemo43, useRef as useRef54, useState as useState96 } from "react";
|
|
41934
42009
|
|
|
41935
42010
|
// src/components/navigation/mobile-burger-menu.tsx
|
|
41936
|
-
import React120, { useCallback as useCallback38, useRef as
|
|
42011
|
+
import React120, { useCallback as useCallback38, useRef as useRef53 } from "react";
|
|
41937
42012
|
import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
|
|
41938
42013
|
import { Fragment as Fragment64, jsx as jsx308, jsxs as jsxs241 } from "react/jsx-runtime";
|
|
41939
42014
|
var HEADER_HEIGHT = 56;
|
|
@@ -41947,7 +42022,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
41947
42022
|
onLogout,
|
|
41948
42023
|
disabled = false
|
|
41949
42024
|
}) {
|
|
41950
|
-
const panelRef =
|
|
42025
|
+
const panelRef = useRef53(null);
|
|
41951
42026
|
usePreventScroll5({ isDisabled: !isOpen });
|
|
41952
42027
|
useFocusTrap(panelRef, isOpen, { onEscape: onClose });
|
|
41953
42028
|
const handleItemClick = useCallback38((item) => {
|
|
@@ -42123,9 +42198,9 @@ function AppLayout({
|
|
|
42123
42198
|
}) {
|
|
42124
42199
|
const [mobileMenuOpen, setMobileMenuOpen] = useState96(false);
|
|
42125
42200
|
const [drawerContainer, setDrawerContainer] = useState96(null);
|
|
42126
|
-
const mobileMenuOpenRef =
|
|
42201
|
+
const mobileMenuOpenRef = useRef54(mobileMenuOpen);
|
|
42127
42202
|
mobileMenuOpenRef.current = mobileMenuOpen;
|
|
42128
|
-
const drawerHandlesRef =
|
|
42203
|
+
const drawerHandlesRef = useRef54(/* @__PURE__ */ new Set());
|
|
42129
42204
|
const handleToggleMobileMenu = useCallback39(() => {
|
|
42130
42205
|
const opening = !mobileMenuOpenRef.current;
|
|
42131
42206
|
if (opening) {
|
|
@@ -42752,7 +42827,7 @@ ScriptArguments.displayName = "ScriptArguments";
|
|
|
42752
42827
|
|
|
42753
42828
|
// src/components/shared/onboarding/onboarding-walkthrough.tsx
|
|
42754
42829
|
init_button2();
|
|
42755
|
-
import React122, { useRef as
|
|
42830
|
+
import React122, { useRef as useRef55, useCallback as useCallback40 } from "react";
|
|
42756
42831
|
|
|
42757
42832
|
// src/components/shared/onboarding/onboarding-step-card.tsx
|
|
42758
42833
|
import React121 from "react";
|
|
@@ -42876,10 +42951,10 @@ function OnboardingWalkthrough({
|
|
|
42876
42951
|
allStepsComplete,
|
|
42877
42952
|
markMultipleComplete
|
|
42878
42953
|
} = useOnboardingState(storageKey);
|
|
42879
|
-
const hasAutoMarkedRef =
|
|
42880
|
-
const autoMarkingInProgressRef =
|
|
42881
|
-
const lastCompletionStatusRef =
|
|
42882
|
-
const actionInProgressRef =
|
|
42954
|
+
const hasAutoMarkedRef = useRef55(false);
|
|
42955
|
+
const autoMarkingInProgressRef = useRef55(false);
|
|
42956
|
+
const lastCompletionStatusRef = useRef55(null);
|
|
42957
|
+
const actionInProgressRef = useRef55(/* @__PURE__ */ new Set());
|
|
42883
42958
|
React122.useEffect(() => {
|
|
42884
42959
|
if (isLoadingCompletion) {
|
|
42885
42960
|
hasAutoMarkedRef.current = false;
|
|
@@ -43531,7 +43606,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx326(ContentLoader, { ...props, va
|
|
|
43531
43606
|
|
|
43532
43607
|
// src/components/ui/table/table.tsx
|
|
43533
43608
|
init_cn();
|
|
43534
|
-
import { useEffect as useEffect75, useRef as
|
|
43609
|
+
import { useEffect as useEffect75, useRef as useRef57 } from "react";
|
|
43535
43610
|
init_pagination();
|
|
43536
43611
|
init_button2();
|
|
43537
43612
|
|
|
@@ -44291,8 +44366,8 @@ function Table({
|
|
|
44291
44366
|
};
|
|
44292
44367
|
const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
|
|
44293
44368
|
const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
|
|
44294
|
-
const sentinelRef =
|
|
44295
|
-
const onLoadMoreRef =
|
|
44369
|
+
const sentinelRef = useRef57(null);
|
|
44370
|
+
const onLoadMoreRef = useRef57(infiniteScroll?.onLoadMore);
|
|
44296
44371
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
44297
44372
|
useEffect75(() => {
|
|
44298
44373
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
@@ -44512,7 +44587,7 @@ import { useMemo as useMemo45 } from "react";
|
|
|
44512
44587
|
|
|
44513
44588
|
// src/components/ui/query-report-table/query-report-table-header.tsx
|
|
44514
44589
|
init_cn();
|
|
44515
|
-
import { useRef as
|
|
44590
|
+
import { useRef as useRef58, useState as useState99, useCallback as useCallback41 } from "react";
|
|
44516
44591
|
import { jsx as jsx338, jsxs as jsxs266 } from "react/jsx-runtime";
|
|
44517
44592
|
function QueryReportTableHeader({
|
|
44518
44593
|
columns,
|
|
@@ -44541,7 +44616,7 @@ function QueryReportTableHeader({
|
|
|
44541
44616
|
);
|
|
44542
44617
|
}
|
|
44543
44618
|
function TruncatedHeaderCell({ value, width }) {
|
|
44544
|
-
const textRef =
|
|
44619
|
+
const textRef = useRef58(null);
|
|
44545
44620
|
const [isTruncated, setIsTruncated] = useState99(false);
|
|
44546
44621
|
const checkTruncation = useCallback41(() => {
|
|
44547
44622
|
const el = textRef.current;
|
|
@@ -44571,7 +44646,7 @@ function TruncatedHeaderCell({ value, width }) {
|
|
|
44571
44646
|
|
|
44572
44647
|
// src/components/ui/query-report-table/query-report-table-row.tsx
|
|
44573
44648
|
init_cn();
|
|
44574
|
-
import { useRef as
|
|
44649
|
+
import { useRef as useRef59, useState as useState100, useCallback as useCallback42 } from "react";
|
|
44575
44650
|
import { jsx as jsx339, jsxs as jsxs267 } from "react/jsx-runtime";
|
|
44576
44651
|
function QueryReportTableRow({
|
|
44577
44652
|
row,
|
|
@@ -44617,7 +44692,7 @@ function QueryReportTableRow({
|
|
|
44617
44692
|
);
|
|
44618
44693
|
}
|
|
44619
44694
|
function TruncatedCell({ value, className }) {
|
|
44620
|
-
const textRef =
|
|
44695
|
+
const textRef = useRef59(null);
|
|
44621
44696
|
const [isTruncated, setIsTruncated] = useState100(false);
|
|
44622
44697
|
const checkTruncation = useCallback42(() => {
|
|
44623
44698
|
const el = textRef.current;
|
|
@@ -45223,7 +45298,7 @@ function DataTableEmpty({ className, ...props }) {
|
|
|
45223
45298
|
// src/components/ui/data-table/data-table-row.tsx
|
|
45224
45299
|
init_next_link();
|
|
45225
45300
|
init_cn();
|
|
45226
|
-
import { memo as memo8, useCallback as useCallback44, useRef as
|
|
45301
|
+
import { memo as memo8, useCallback as useCallback44, useRef as useRef60 } from "react";
|
|
45227
45302
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
45228
45303
|
|
|
45229
45304
|
// src/components/ui/data-table/data-table-skeleton.tsx
|
|
@@ -45317,7 +45392,7 @@ function DataTableRowImpl({
|
|
|
45317
45392
|
const hasSubRow = subRow != null && subRow !== false;
|
|
45318
45393
|
const isLinkMode = Boolean(href) && !onClick;
|
|
45319
45394
|
const isWholeCardLink = isLinkMode && !hasSubRow;
|
|
45320
|
-
const containerRef =
|
|
45395
|
+
const containerRef = useRef60(null);
|
|
45321
45396
|
const handleClick = useCallback44(
|
|
45322
45397
|
(e) => {
|
|
45323
45398
|
const target = e.target;
|
|
@@ -45488,7 +45563,7 @@ function DataTableBody({
|
|
|
45488
45563
|
}
|
|
45489
45564
|
|
|
45490
45565
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
45491
|
-
import { useEffect as useEffect76, useRef as
|
|
45566
|
+
import { useEffect as useEffect76, useRef as useRef61 } from "react";
|
|
45492
45567
|
import { Fragment as Fragment72, jsx as jsx349, jsxs as jsxs275 } from "react/jsx-runtime";
|
|
45493
45568
|
function DataTableInfiniteFooter({
|
|
45494
45569
|
hasNextPage,
|
|
@@ -45497,8 +45572,8 @@ function DataTableInfiniteFooter({
|
|
|
45497
45572
|
skeletonRows = 3,
|
|
45498
45573
|
rootMargin = "200px"
|
|
45499
45574
|
}) {
|
|
45500
|
-
const sentinelRef =
|
|
45501
|
-
const onLoadMoreRef =
|
|
45575
|
+
const sentinelRef = useRef61(null);
|
|
45576
|
+
const onLoadMoreRef = useRef61(onLoadMore);
|
|
45502
45577
|
onLoadMoreRef.current = onLoadMore;
|
|
45503
45578
|
useEffect76(() => {
|
|
45504
45579
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
@@ -46136,7 +46211,7 @@ function FilterList({
|
|
|
46136
46211
|
// src/components/ui/tag-search-input.tsx
|
|
46137
46212
|
import {
|
|
46138
46213
|
useEffect as useEffect78,
|
|
46139
|
-
useRef as
|
|
46214
|
+
useRef as useRef63,
|
|
46140
46215
|
useState as useState102
|
|
46141
46216
|
} from "react";
|
|
46142
46217
|
init_cn();
|
|
@@ -46171,9 +46246,9 @@ function TagSearchInput({
|
|
|
46171
46246
|
limitTags,
|
|
46172
46247
|
placeholder: currentPlaceholder
|
|
46173
46248
|
});
|
|
46174
|
-
const wrapperRef =
|
|
46175
|
-
const hiddenTagsRef =
|
|
46176
|
-
const hiddenTagsPopupRef =
|
|
46249
|
+
const wrapperRef = useRef63(null);
|
|
46250
|
+
const hiddenTagsRef = useRef63(null);
|
|
46251
|
+
const hiddenTagsPopupRef = useRef63(null);
|
|
46177
46252
|
const [showHiddenTags, setShowHiddenTags] = useState102(false);
|
|
46178
46253
|
useEffect78(() => {
|
|
46179
46254
|
if (!showHiddenTags) return;
|
|
@@ -46337,7 +46412,7 @@ function TagSearchInput({
|
|
|
46337
46412
|
}
|
|
46338
46413
|
|
|
46339
46414
|
// src/components/ui/markdown-editor.tsx
|
|
46340
|
-
import { useRef as
|
|
46415
|
+
import { useRef as useRef64, useCallback as useCallback45, useState as useState103, useEffect as useEffect79 } from "react";
|
|
46341
46416
|
init_cn();
|
|
46342
46417
|
import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
|
|
46343
46418
|
import { jsx as jsx354, jsxs as jsxs280 } from "react/jsx-runtime";
|
|
@@ -46392,7 +46467,7 @@ function MarkdownEditor({
|
|
|
46392
46467
|
onFileUploaded,
|
|
46393
46468
|
renderPreview
|
|
46394
46469
|
}) {
|
|
46395
|
-
const fileInputRef =
|
|
46470
|
+
const fileInputRef = useRef64(null);
|
|
46396
46471
|
const [isUploading, setIsUploading] = useState103(false);
|
|
46397
46472
|
const [uploadProgress, setUploadProgress] = useState103("");
|
|
46398
46473
|
const [defaultExtraCommands, setDefaultExtraCommands] = useState103([]);
|
|
@@ -46485,11 +46560,11 @@ function MarkdownEditor({
|
|
|
46485
46560
|
}
|
|
46486
46561
|
} : null;
|
|
46487
46562
|
const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
|
|
46488
|
-
const wrapperRef =
|
|
46489
|
-
const isDraggingRef =
|
|
46490
|
-
const mouseYRef =
|
|
46491
|
-
const rafRef =
|
|
46492
|
-
const scrollParentRef =
|
|
46563
|
+
const wrapperRef = useRef64(null);
|
|
46564
|
+
const isDraggingRef = useRef64(false);
|
|
46565
|
+
const mouseYRef = useRef64(0);
|
|
46566
|
+
const rafRef = useRef64(0);
|
|
46567
|
+
const scrollParentRef = useRef64(window);
|
|
46493
46568
|
const EDGE_ZONE = 60;
|
|
46494
46569
|
const MAX_SCROLL_SPEED = 15;
|
|
46495
46570
|
const findScrollParent = useCallback45((el) => {
|
|
@@ -52376,7 +52451,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
|
|
|
52376
52451
|
}
|
|
52377
52452
|
|
|
52378
52453
|
// src/components/chat/hooks/use-chunk-catchup.ts
|
|
52379
|
-
import { useCallback as useCallback48, useRef as
|
|
52454
|
+
import { useCallback as useCallback48, useRef as useRef68 } from "react";
|
|
52380
52455
|
function makeSeqKey(messageType, chunkType, sequenceId) {
|
|
52381
52456
|
return `${messageType}:${chunkType}:${sequenceId}`;
|
|
52382
52457
|
}
|
|
@@ -52398,22 +52473,22 @@ function useChunkCatchup({
|
|
|
52398
52473
|
chatTypes = [CHAT_TYPE.CLIENT],
|
|
52399
52474
|
fetchChunks
|
|
52400
52475
|
}) {
|
|
52401
|
-
const processedSequenceKeys =
|
|
52402
|
-
const lastSequenceId =
|
|
52403
|
-
const lastSequenceIdByType =
|
|
52404
|
-
const fetchingInProgress =
|
|
52405
|
-
const lastFetchParams =
|
|
52406
|
-
const pendingCatchupRef =
|
|
52407
|
-
const chunkBuffer =
|
|
52408
|
-
const bufferUntilInitialCatchupComplete =
|
|
52409
|
-
const hasCompletedInitialCatchup =
|
|
52410
|
-
const dialogIdRef =
|
|
52476
|
+
const processedSequenceKeys = useRef68(/* @__PURE__ */ new Set());
|
|
52477
|
+
const lastSequenceId = useRef68(null);
|
|
52478
|
+
const lastSequenceIdByType = useRef68(/* @__PURE__ */ new Map());
|
|
52479
|
+
const fetchingInProgress = useRef68(false);
|
|
52480
|
+
const lastFetchParams = useRef68(null);
|
|
52481
|
+
const pendingCatchupRef = useRef68(null);
|
|
52482
|
+
const chunkBuffer = useRef68([]);
|
|
52483
|
+
const bufferUntilInitialCatchupComplete = useRef68(false);
|
|
52484
|
+
const hasCompletedInitialCatchup = useRef68(false);
|
|
52485
|
+
const dialogIdRef = useRef68(dialogId);
|
|
52411
52486
|
dialogIdRef.current = dialogId;
|
|
52412
|
-
const chatTypesRef =
|
|
52487
|
+
const chatTypesRef = useRef68(chatTypes);
|
|
52413
52488
|
chatTypesRef.current = chatTypes;
|
|
52414
|
-
const fetchChunksRef =
|
|
52489
|
+
const fetchChunksRef = useRef68(fetchChunks);
|
|
52415
52490
|
fetchChunksRef.current = fetchChunks;
|
|
52416
|
-
const onChunkReceivedRef =
|
|
52491
|
+
const onChunkReceivedRef = useRef68(onChunkReceived);
|
|
52417
52492
|
onChunkReceivedRef.current = onChunkReceived;
|
|
52418
52493
|
const processChunk = useCallback48((chunk, messageType, forceProcess = false) => {
|
|
52419
52494
|
if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
|
|
@@ -52611,7 +52686,7 @@ function useChunkCatchup({
|
|
|
52611
52686
|
}
|
|
52612
52687
|
}
|
|
52613
52688
|
}, [flushBufferedRealtimeChunks]);
|
|
52614
|
-
const catchUpChunksRef =
|
|
52689
|
+
const catchUpChunksRef = useRef68(null);
|
|
52615
52690
|
catchUpChunksRef.current = catchUpChunks;
|
|
52616
52691
|
const resetChunkTracking = useCallback48(() => {
|
|
52617
52692
|
processedSequenceKeys.current.clear();
|
|
@@ -52690,7 +52765,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
52690
52765
|
}
|
|
52691
52766
|
|
|
52692
52767
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
52693
|
-
import { useEffect as useEffect85, useRef as
|
|
52768
|
+
import { useEffect as useEffect85, useRef as useRef69, useState as useState115 } from "react";
|
|
52694
52769
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
52695
52770
|
var RESYNC_AFTER_HIDDEN_MS = 1e4;
|
|
52696
52771
|
var RECOVERY_REPORT_FLOOR_MS = 5e3;
|
|
@@ -52715,52 +52790,52 @@ function useJetStreamDialogSubscription({
|
|
|
52715
52790
|
const [reconnectionCount, setReconnectionCount] = useState115(0);
|
|
52716
52791
|
const [recoveryCount, setRecoveryCount] = useState115(0);
|
|
52717
52792
|
const [currentStreamSeq, setCurrentStreamSeq] = useState115(null);
|
|
52718
|
-
const lastRecoveryReportRef =
|
|
52719
|
-
const clientRef =
|
|
52720
|
-
const subscriptionRef =
|
|
52721
|
-
const highestStreamSeqRef =
|
|
52722
|
-
const onEventRef =
|
|
52793
|
+
const lastRecoveryReportRef = useRef69(0);
|
|
52794
|
+
const clientRef = useRef69(null);
|
|
52795
|
+
const subscriptionRef = useRef69(null);
|
|
52796
|
+
const highestStreamSeqRef = useRef69(null);
|
|
52797
|
+
const onEventRef = useRef69(onEvent);
|
|
52723
52798
|
useEffect85(() => {
|
|
52724
52799
|
onEventRef.current = onEvent;
|
|
52725
52800
|
}, [onEvent]);
|
|
52726
|
-
const onConnectRef =
|
|
52801
|
+
const onConnectRef = useRef69(onConnect);
|
|
52727
52802
|
useEffect85(() => {
|
|
52728
52803
|
onConnectRef.current = onConnect;
|
|
52729
52804
|
}, [onConnect]);
|
|
52730
|
-
const onDisconnectRef =
|
|
52805
|
+
const onDisconnectRef = useRef69(onDisconnect);
|
|
52731
52806
|
useEffect85(() => {
|
|
52732
52807
|
onDisconnectRef.current = onDisconnect;
|
|
52733
52808
|
}, [onDisconnect]);
|
|
52734
|
-
const onSubscribedRef =
|
|
52809
|
+
const onSubscribedRef = useRef69(onSubscribed);
|
|
52735
52810
|
useEffect85(() => {
|
|
52736
52811
|
onSubscribedRef.current = onSubscribed;
|
|
52737
52812
|
}, [onSubscribed]);
|
|
52738
|
-
const onBeforeReconnectRef =
|
|
52813
|
+
const onBeforeReconnectRef = useRef69(onBeforeReconnect);
|
|
52739
52814
|
useEffect85(() => {
|
|
52740
52815
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
52741
52816
|
}, [onBeforeReconnect]);
|
|
52742
|
-
const getNatsWsUrlRef =
|
|
52817
|
+
const getNatsWsUrlRef = useRef69(getNatsWsUrl);
|
|
52743
52818
|
useEffect85(() => {
|
|
52744
52819
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
52745
52820
|
}, [getNatsWsUrl]);
|
|
52746
|
-
const reconnectionBackoffRef =
|
|
52821
|
+
const reconnectionBackoffRef = useRef69(reconnectionBackoff);
|
|
52747
52822
|
useEffect85(() => {
|
|
52748
52823
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
52749
52824
|
}, [reconnectionBackoff]);
|
|
52750
|
-
const optStartSeqRef =
|
|
52825
|
+
const optStartSeqRef = useRef69(optStartSeq);
|
|
52751
52826
|
useEffect85(() => {
|
|
52752
52827
|
optStartSeqRef.current = optStartSeq;
|
|
52753
52828
|
}, [optStartSeq]);
|
|
52754
|
-
const inactiveThresholdRef =
|
|
52829
|
+
const inactiveThresholdRef = useRef69(inactiveThresholdMs);
|
|
52755
52830
|
useEffect85(() => {
|
|
52756
52831
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
52757
52832
|
}, [inactiveThresholdMs]);
|
|
52758
|
-
const hadConnectionBeforeRef =
|
|
52759
|
-
const clientConfigRef =
|
|
52833
|
+
const hadConnectionBeforeRef = useRef69(false);
|
|
52834
|
+
const clientConfigRef = useRef69(clientConfig);
|
|
52760
52835
|
useEffect85(() => {
|
|
52761
52836
|
clientConfigRef.current = clientConfig;
|
|
52762
52837
|
}, [clientConfig]);
|
|
52763
|
-
const currentWsUrlRef =
|
|
52838
|
+
const currentWsUrlRef = useRef69("");
|
|
52764
52839
|
const wsUrl = getNatsWsUrl();
|
|
52765
52840
|
useEffect85(() => {
|
|
52766
52841
|
if (!enabled || !wsUrl) {
|
|
@@ -52965,7 +53040,7 @@ function useJetStreamDialogSubscription({
|
|
|
52965
53040
|
}
|
|
52966
53041
|
|
|
52967
53042
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
52968
|
-
import { useEffect as useEffect86, useRef as
|
|
53043
|
+
import { useEffect as useEffect86, useRef as useRef70, useState as useState116 } from "react";
|
|
52969
53044
|
function useNatsDialogSubscription({
|
|
52970
53045
|
enabled,
|
|
52971
53046
|
dialogId,
|
|
@@ -52982,42 +53057,42 @@ function useNatsDialogSubscription({
|
|
|
52982
53057
|
const [isConnected, setIsConnected] = useState116(false);
|
|
52983
53058
|
const [isSubscribed, setIsSubscribed] = useState116(false);
|
|
52984
53059
|
const [reconnectionCount, setReconnectionCount] = useState116(0);
|
|
52985
|
-
const clientRef =
|
|
52986
|
-
const subscriptionRefs =
|
|
52987
|
-
const onEventRef =
|
|
53060
|
+
const clientRef = useRef70(null);
|
|
53061
|
+
const subscriptionRefs = useRef70(/* @__PURE__ */ new Map());
|
|
53062
|
+
const onEventRef = useRef70(onEvent);
|
|
52988
53063
|
useEffect86(() => {
|
|
52989
53064
|
onEventRef.current = onEvent;
|
|
52990
53065
|
}, [onEvent]);
|
|
52991
|
-
const onConnectRef =
|
|
53066
|
+
const onConnectRef = useRef70(onConnect);
|
|
52992
53067
|
useEffect86(() => {
|
|
52993
53068
|
onConnectRef.current = onConnect;
|
|
52994
53069
|
}, [onConnect]);
|
|
52995
|
-
const onDisconnectRef =
|
|
53070
|
+
const onDisconnectRef = useRef70(onDisconnect);
|
|
52996
53071
|
useEffect86(() => {
|
|
52997
53072
|
onDisconnectRef.current = onDisconnect;
|
|
52998
53073
|
}, [onDisconnect]);
|
|
52999
|
-
const onSubscribedRef =
|
|
53074
|
+
const onSubscribedRef = useRef70(onSubscribed);
|
|
53000
53075
|
useEffect86(() => {
|
|
53001
53076
|
onSubscribedRef.current = onSubscribed;
|
|
53002
53077
|
}, [onSubscribed]);
|
|
53003
|
-
const onBeforeReconnectRef =
|
|
53078
|
+
const onBeforeReconnectRef = useRef70(onBeforeReconnect);
|
|
53004
53079
|
useEffect86(() => {
|
|
53005
53080
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
53006
53081
|
}, [onBeforeReconnect]);
|
|
53007
|
-
const hadConnectionBeforeRef =
|
|
53008
|
-
const getNatsWsUrlRef =
|
|
53082
|
+
const hadConnectionBeforeRef = useRef70(false);
|
|
53083
|
+
const getNatsWsUrlRef = useRef70(getNatsWsUrl);
|
|
53009
53084
|
useEffect86(() => {
|
|
53010
53085
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
53011
53086
|
}, [getNatsWsUrl]);
|
|
53012
|
-
const reconnectionBackoffRef =
|
|
53087
|
+
const reconnectionBackoffRef = useRef70(reconnectionBackoff);
|
|
53013
53088
|
useEffect86(() => {
|
|
53014
53089
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
53015
53090
|
}, [reconnectionBackoff]);
|
|
53016
|
-
const clientConfigRef =
|
|
53091
|
+
const clientConfigRef = useRef70(clientConfig);
|
|
53017
53092
|
useEffect86(() => {
|
|
53018
53093
|
clientConfigRef.current = clientConfig;
|
|
53019
53094
|
}, [clientConfig]);
|
|
53020
|
-
const currentWsUrlRef =
|
|
53095
|
+
const currentWsUrlRef = useRef70("");
|
|
53021
53096
|
const wsUrl = getNatsWsUrl();
|
|
53022
53097
|
useEffect86(() => {
|
|
53023
53098
|
if (!enabled || !wsUrl) {
|
|
@@ -53101,15 +53176,15 @@ function useNatsDialogSubscription({
|
|
|
53101
53176
|
};
|
|
53102
53177
|
}, [enabled, wsUrl]);
|
|
53103
53178
|
const topicsKey = topics.join(",");
|
|
53104
|
-
const topicsRef =
|
|
53179
|
+
const topicsRef = useRef70(topics);
|
|
53105
53180
|
topicsRef.current = topics;
|
|
53106
|
-
const lastSubscribedDialogIdRef =
|
|
53107
|
-
const isConnectedRef =
|
|
53181
|
+
const lastSubscribedDialogIdRef = useRef70(null);
|
|
53182
|
+
const isConnectedRef = useRef70(isConnected);
|
|
53108
53183
|
useEffect86(() => {
|
|
53109
53184
|
isConnectedRef.current = isConnected;
|
|
53110
53185
|
}, [isConnected]);
|
|
53111
|
-
const currentDialogIdRef =
|
|
53112
|
-
const abortControllerRef =
|
|
53186
|
+
const currentDialogIdRef = useRef70(null);
|
|
53187
|
+
const abortControllerRef = useRef70(null);
|
|
53113
53188
|
useEffect86(() => {
|
|
53114
53189
|
currentDialogIdRef.current = dialogId;
|
|
53115
53190
|
if (!enabled || !dialogId) {
|
|
@@ -53366,7 +53441,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
|
|
|
53366
53441
|
}
|
|
53367
53442
|
|
|
53368
53443
|
// src/components/chat/hooks/use-chat-attachments.ts
|
|
53369
|
-
import { useCallback as useCallback49, useMemo as useMemo50, useRef as
|
|
53444
|
+
import { useCallback as useCallback49, useMemo as useMemo50, useRef as useRef71, useState as useState118 } from "react";
|
|
53370
53445
|
import { fileTypeFromBlob } from "file-type";
|
|
53371
53446
|
var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
|
|
53372
53447
|
var CHAT_ATTACHMENTS_FOLDER = "chat";
|
|
@@ -53443,7 +53518,7 @@ function useChatAttachments() {
|
|
|
53443
53518
|
const runtime = useRequiredChatRuntime();
|
|
53444
53519
|
const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
|
|
53445
53520
|
const [attachments, setAttachments] = useState118([]);
|
|
53446
|
-
const controllersRef =
|
|
53521
|
+
const controllersRef = useRef71(/* @__PURE__ */ new Map());
|
|
53447
53522
|
const updateOne = useCallback49((id, patch) => {
|
|
53448
53523
|
setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
|
|
53449
53524
|
}, []);
|
|
@@ -53532,7 +53607,7 @@ function useChatAttachments() {
|
|
|
53532
53607
|
},
|
|
53533
53608
|
[uploadUrlEndpoint, updateOne]
|
|
53534
53609
|
);
|
|
53535
|
-
const attachmentsRef =
|
|
53610
|
+
const attachmentsRef = useRef71([]);
|
|
53536
53611
|
attachmentsRef.current = attachments;
|
|
53537
53612
|
const addFiles = useCallback49(
|
|
53538
53613
|
(files) => {
|
|
@@ -53609,13 +53684,13 @@ function useChatAttachments() {
|
|
|
53609
53684
|
}
|
|
53610
53685
|
|
|
53611
53686
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
53612
|
-
import { useCallback as useCallback50, useEffect as useEffect88, useRef as
|
|
53687
|
+
import { useCallback as useCallback50, useEffect as useEffect88, useRef as useRef72, useState as useState119 } from "react";
|
|
53613
53688
|
import { jsx as jsx380 } from "react/jsx-runtime";
|
|
53614
53689
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
53615
53690
|
function useChatAttachmentImageGallery() {
|
|
53616
53691
|
const runtime = useRequiredChatRuntime();
|
|
53617
53692
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
53618
|
-
const panelRef =
|
|
53693
|
+
const panelRef = useRef72(null);
|
|
53619
53694
|
const [state, setState] = useState119(CLOSED);
|
|
53620
53695
|
const handleClose = useCallback50(() => setState(CLOSED), []);
|
|
53621
53696
|
useEffect88(() => {
|
|
@@ -53664,10 +53739,10 @@ function absolutize(prefix) {
|
|
|
53664
53739
|
}
|
|
53665
53740
|
|
|
53666
53741
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
53667
|
-
import { useEffect as useEffect89, useRef as
|
|
53742
|
+
import { useEffect as useEffect89, useRef as useRef73 } from "react";
|
|
53668
53743
|
function useCloseOnNavigation(close, pathname) {
|
|
53669
|
-
const prevPathnameRef =
|
|
53670
|
-
const initializedRef =
|
|
53744
|
+
const prevPathnameRef = useRef73(null);
|
|
53745
|
+
const initializedRef = useRef73(false);
|
|
53671
53746
|
useEffect89(() => {
|
|
53672
53747
|
if (!initializedRef.current) {
|
|
53673
53748
|
initializedRef.current = true;
|
|
@@ -53682,14 +53757,14 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
53682
53757
|
}
|
|
53683
53758
|
|
|
53684
53759
|
// src/components/chat/hooks/use-chat.ts
|
|
53685
|
-
import { useState as useState121, useCallback as useCallback52, useEffect as useEffect90, useRef as
|
|
53760
|
+
import { useState as useState121, useCallback as useCallback52, useEffect as useEffect90, useRef as useRef75 } from "react";
|
|
53686
53761
|
|
|
53687
53762
|
// src/components/chat/hooks/use-sse.ts
|
|
53688
|
-
import { useState as useState120, useCallback as useCallback51, useRef as
|
|
53763
|
+
import { useState as useState120, useCallback as useCallback51, useRef as useRef74 } from "react";
|
|
53689
53764
|
function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
|
|
53690
53765
|
const [isStreaming, setIsStreaming] = useState120(false);
|
|
53691
53766
|
const [error, setError] = useState120(null);
|
|
53692
|
-
const abortControllerRef =
|
|
53767
|
+
const abortControllerRef = useRef74(null);
|
|
53693
53768
|
const fallbackStream = useCallback51(async function* () {
|
|
53694
53769
|
throw new Error(
|
|
53695
53770
|
"[useSSE] No streamFn provided and `useMock: true` is no longer wired into the lib. Supply a `streamFn` (see `createDocStreamFn` in use-embedded-chat) or migrate the mock to your host code."
|
|
@@ -53757,8 +53832,8 @@ function useChat({
|
|
|
53757
53832
|
} = {}) {
|
|
53758
53833
|
const [messages, setMessages] = useState121(() => initialMessages ?? []);
|
|
53759
53834
|
const [isTyping, setIsTyping] = useState121(false);
|
|
53760
|
-
const currentAssistantSegmentsRef =
|
|
53761
|
-
const onMessagesChangeRef =
|
|
53835
|
+
const currentAssistantSegmentsRef = useRef75([]);
|
|
53836
|
+
const onMessagesChangeRef = useRef75(onMessagesChange);
|
|
53762
53837
|
onMessagesChangeRef.current = onMessagesChange;
|
|
53763
53838
|
useEffect90(() => {
|
|
53764
53839
|
onMessagesChangeRef.current?.(messages);
|
|
@@ -54053,7 +54128,7 @@ function useChat({
|
|
|
54053
54128
|
}
|
|
54054
54129
|
|
|
54055
54130
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
54056
|
-
import { useCallback as useCallback54, useMemo as useMemo52, useRef as
|
|
54131
|
+
import { useCallback as useCallback54, useMemo as useMemo52, useRef as useRef78 } from "react";
|
|
54057
54132
|
|
|
54058
54133
|
// src/chat-protocol/frames.ts
|
|
54059
54134
|
var FRAME_TERMINATOR = "\0";
|
|
@@ -54306,7 +54381,7 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
54306
54381
|
}
|
|
54307
54382
|
|
|
54308
54383
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
54309
|
-
import { useEffect as useEffect91, useRef as
|
|
54384
|
+
import { useEffect as useEffect91, useRef as useRef76, useState as useState122 } from "react";
|
|
54310
54385
|
function useChatHistoryHydration({
|
|
54311
54386
|
active,
|
|
54312
54387
|
source,
|
|
@@ -54318,7 +54393,7 @@ function useChatHistoryHydration({
|
|
|
54318
54393
|
bumpMetaTick
|
|
54319
54394
|
}) {
|
|
54320
54395
|
const [isHydratingHistory, setIsHydratingHistory] = useState122(false);
|
|
54321
|
-
const hydratedKeyRef =
|
|
54396
|
+
const hydratedKeyRef = useRef76(null);
|
|
54322
54397
|
useEffect91(() => {
|
|
54323
54398
|
if (!active) return;
|
|
54324
54399
|
const conversationId = conversationIdRef.current;
|
|
@@ -56307,7 +56382,7 @@ function createChatDialogStore(options = {}) {
|
|
|
56307
56382
|
}
|
|
56308
56383
|
|
|
56309
56384
|
// src/components/chat/stream/use-chat-stream-reducer.ts
|
|
56310
|
-
import { useCallback as useCallback53, useEffect as useEffect92, useMemo as useMemo51, useRef as
|
|
56385
|
+
import { useCallback as useCallback53, useEffect as useEffect92, useMemo as useMemo51, useRef as useRef77, useSyncExternalStore } from "react";
|
|
56311
56386
|
|
|
56312
56387
|
// src/components/chat/stream/delta-batcher.ts
|
|
56313
56388
|
var DELTA_FLUSH_FALLBACK_MS = 50;
|
|
@@ -56396,7 +56471,7 @@ function useChatStreamReducer({
|
|
|
56396
56471
|
side = DEFAULT_DIALOG_SIDE,
|
|
56397
56472
|
createReducerOptions
|
|
56398
56473
|
}) {
|
|
56399
|
-
const optionsRef =
|
|
56474
|
+
const optionsRef = useRef77(createReducerOptions);
|
|
56400
56475
|
optionsRef.current = createReducerOptions;
|
|
56401
56476
|
const reducer2 = store.getReducer(dialogId, side, () => optionsRef.current?.() ?? {});
|
|
56402
56477
|
const getSnapshot = useCallback53(() => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
@@ -56404,13 +56479,13 @@ function useChatStreamReducer({
|
|
|
56404
56479
|
const subscribe = useCallback53((listener) => store.subscribe(listener), [store]);
|
|
56405
56480
|
const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
56406
56481
|
useEffect92(() => store.retain(dialogId, side), [store, dialogId, side]);
|
|
56407
|
-
const keyRef =
|
|
56482
|
+
const keyRef = useRef77({ dialogId, side });
|
|
56408
56483
|
if (keyRef.current.dialogId !== dialogId || keyRef.current.side !== side) {
|
|
56409
56484
|
keyRef.current = { dialogId, side };
|
|
56410
56485
|
}
|
|
56411
|
-
const storeRef =
|
|
56486
|
+
const storeRef = useRef77(store);
|
|
56412
56487
|
storeRef.current = store;
|
|
56413
|
-
const batcherRef =
|
|
56488
|
+
const batcherRef = useRef77(null);
|
|
56414
56489
|
if (batcherRef.current === null) {
|
|
56415
56490
|
batcherRef.current = createDeltaBatcher({
|
|
56416
56491
|
applyOne: (event, key) => {
|
|
@@ -56460,7 +56535,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
56460
56535
|
const runtime = useRequiredChatRuntime();
|
|
56461
56536
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
56462
56537
|
const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
|
|
56463
|
-
const sendMessageRef =
|
|
56538
|
+
const sendMessageRef = useRef78(async () => true);
|
|
56464
56539
|
const cardResolve = useCallback54(
|
|
56465
56540
|
(action) => (reqId) => {
|
|
56466
56541
|
if (!reqId) return;
|
|
@@ -56480,17 +56555,17 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
56480
56555
|
}),
|
|
56481
56556
|
[cardApprove, cardReject]
|
|
56482
56557
|
);
|
|
56483
|
-
const storeRef =
|
|
56558
|
+
const storeRef = useRef78(null);
|
|
56484
56559
|
if (storeRef.current === null) storeRef.current = createChatDialogStore();
|
|
56485
56560
|
const { state, applyEvent, flushDeltas, mutate, reducer: reducer2 } = useChatStreamReducer({
|
|
56486
56561
|
store: storeRef.current,
|
|
56487
56562
|
dialogId: source,
|
|
56488
56563
|
createReducerOptions
|
|
56489
56564
|
});
|
|
56490
|
-
const abortControllerRef =
|
|
56565
|
+
const abortControllerRef = useRef78(null);
|
|
56491
56566
|
const conversationStorage = useMemo52(() => createChatConversationStorage(source), [source]);
|
|
56492
|
-
const conversationIdRef =
|
|
56493
|
-
const restoredConversationRef =
|
|
56567
|
+
const conversationIdRef = useRef78(null);
|
|
56568
|
+
const restoredConversationRef = useRef78(false);
|
|
56494
56569
|
if (!restoredConversationRef.current) {
|
|
56495
56570
|
restoredConversationRef.current = true;
|
|
56496
56571
|
pruneStaleChatConversationStorage(source);
|
|
@@ -56521,8 +56596,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
56521
56596
|
return map;
|
|
56522
56597
|
}, [slashCommands]);
|
|
56523
56598
|
const historyUrl = runtime.endpoints.chatHistoryUrl ?? `${runtime.endpoints.chatStreamUrl.replace(/\/+$/, "")}/history`;
|
|
56524
|
-
const hydrationRefsMapRef =
|
|
56525
|
-
const hydrationSendCountRef =
|
|
56599
|
+
const hydrationRefsMapRef = useRef78(/* @__PURE__ */ new Map());
|
|
56600
|
+
const hydrationSendCountRef = useRef78(0);
|
|
56526
56601
|
const hydrateMessages = useCallback54(
|
|
56527
56602
|
(history) => {
|
|
56528
56603
|
mutate((r) => {
|
|
@@ -56553,7 +56628,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
56553
56628
|
// `hydrateMessages` above) already invalidates the snapshot.
|
|
56554
56629
|
bumpMetaTick: noopBumpMetaTick
|
|
56555
56630
|
});
|
|
56556
|
-
const endpointsRef =
|
|
56631
|
+
const endpointsRef = useRef78(runtime.endpoints);
|
|
56557
56632
|
endpointsRef.current = runtime.endpoints;
|
|
56558
56633
|
const captureConversationId = useCallback54(
|
|
56559
56634
|
(event) => {
|
|
@@ -56820,7 +56895,7 @@ var noopBumpMetaTick = () => {
|
|
|
56820
56895
|
};
|
|
56821
56896
|
|
|
56822
56897
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
56823
|
-
import { useCallback as useCallback55, useEffect as useEffect93, useMemo as useMemo53, useRef as
|
|
56898
|
+
import { useCallback as useCallback55, useEffect as useEffect93, useMemo as useMemo53, useRef as useRef79, useState as useState123 } from "react";
|
|
56824
56899
|
|
|
56825
56900
|
// src/chat-protocol/nats-decoder.ts
|
|
56826
56901
|
function normalizeToolCalls(raw) {
|
|
@@ -57612,11 +57687,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
57612
57687
|
const isManagedMode = fetchDialogs !== void 0;
|
|
57613
57688
|
const [internalDialogId, setInternalDialogId] = useState123(null);
|
|
57614
57689
|
const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
|
|
57615
|
-
const currentDialogIdRef =
|
|
57690
|
+
const currentDialogIdRef = useRef79(dialogId);
|
|
57616
57691
|
currentDialogIdRef.current = dialogId;
|
|
57617
|
-
const handleApproveRef =
|
|
57692
|
+
const handleApproveRef = useRef79(async () => {
|
|
57618
57693
|
});
|
|
57619
|
-
const handleRejectRef =
|
|
57694
|
+
const handleRejectRef = useRef79(
|
|
57620
57695
|
async () => {
|
|
57621
57696
|
}
|
|
57622
57697
|
);
|
|
@@ -57628,8 +57703,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
57628
57703
|
if (!requestId) return;
|
|
57629
57704
|
return handleRejectRef.current(requestId);
|
|
57630
57705
|
}, []);
|
|
57631
|
-
const storeRef =
|
|
57632
|
-
const globalApprovalStatusesRef =
|
|
57706
|
+
const storeRef = useRef79(createChatDialogStore());
|
|
57707
|
+
const globalApprovalStatusesRef = useRef79({});
|
|
57633
57708
|
const dialogKey = dialogId ?? DRAFT_DIALOG_KEY;
|
|
57634
57709
|
const { state, applyEvent, mutate } = useChatStreamReducer({
|
|
57635
57710
|
store: storeRef.current,
|
|
@@ -57693,7 +57768,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
57693
57768
|
const [messagesNextCursor, setMessagesNextCursor] = useState123(null);
|
|
57694
57769
|
const [isMessagesLoading, setIsMessagesLoading] = useState123(false);
|
|
57695
57770
|
const [connectionState, setConnectionState] = useState123("connecting");
|
|
57696
|
-
const hasConnectedOnceRef =
|
|
57771
|
+
const hasConnectedOnceRef = useRef79(false);
|
|
57697
57772
|
const {
|
|
57698
57773
|
processChunk: catchupProcessChunk,
|
|
57699
57774
|
catchUpChunks,
|
|
@@ -57706,7 +57781,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
57706
57781
|
onChunkReceived: (chunk) => processChunk(chunk),
|
|
57707
57782
|
fetchChunks
|
|
57708
57783
|
});
|
|
57709
|
-
const historyLoadSeqRef =
|
|
57784
|
+
const historyLoadSeqRef = useRef79(0);
|
|
57710
57785
|
const loadDialogHistory = useCallback55(
|
|
57711
57786
|
async (id, cursor) => {
|
|
57712
57787
|
if (!fetchDialogMessages) return;
|
|
@@ -57769,7 +57844,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
57769
57844
|
isBufferingActive
|
|
57770
57845
|
]
|
|
57771
57846
|
);
|
|
57772
|
-
const prevDialogIdRef =
|
|
57847
|
+
const prevDialogIdRef = useRef79(void 0);
|
|
57773
57848
|
useEffect93(() => {
|
|
57774
57849
|
if (prevDialogIdRef.current === dialogId) return;
|
|
57775
57850
|
prevDialogIdRef.current = dialogId;
|
|
@@ -57853,7 +57928,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
57853
57928
|
}
|
|
57854
57929
|
setConnectionState("connecting");
|
|
57855
57930
|
}, [active, dialogId]);
|
|
57856
|
-
const initialDialogsLoadedRef =
|
|
57931
|
+
const initialDialogsLoadedRef = useRef79(false);
|
|
57857
57932
|
const loadDialogsPage = useCallback55(
|
|
57858
57933
|
async (cursor) => {
|
|
57859
57934
|
if (!fetchDialogs) return;
|
|
@@ -58118,7 +58193,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
58118
58193
|
}
|
|
58119
58194
|
|
|
58120
58195
|
// src/components/chat/hooks/use-unified-chat.ts
|
|
58121
|
-
import { useCallback as useCallback56, useMemo as useMemo54, useRef as
|
|
58196
|
+
import { useCallback as useCallback56, useMemo as useMemo54, useRef as useRef80 } from "react";
|
|
58122
58197
|
var EMPTY_SSE_OPTIONS = {};
|
|
58123
58198
|
function createDisabledNatsConfig() {
|
|
58124
58199
|
return {
|
|
@@ -58133,7 +58208,7 @@ function createDisabledNatsConfig() {
|
|
|
58133
58208
|
}
|
|
58134
58209
|
function useUnifiedChat(options) {
|
|
58135
58210
|
const { modes, activeMode, mingoStateOverride } = options;
|
|
58136
|
-
const disabledNatsRef =
|
|
58211
|
+
const disabledNatsRef = useRef80(null);
|
|
58137
58212
|
if (disabledNatsRef.current === null) {
|
|
58138
58213
|
disabledNatsRef.current = createDisabledNatsConfig();
|
|
58139
58214
|
}
|
|
@@ -58147,7 +58222,7 @@ function useUnifiedChat(options) {
|
|
|
58147
58222
|
{ active: natsActive }
|
|
58148
58223
|
);
|
|
58149
58224
|
const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
|
|
58150
|
-
const activeStateRef =
|
|
58225
|
+
const activeStateRef = useRef80(activeState);
|
|
58151
58226
|
activeStateRef.current = activeState;
|
|
58152
58227
|
const stopMessage = useCallback56(() => activeStateRef.current.stopMessage(), []);
|
|
58153
58228
|
const clearMessages = useCallback56(
|
|
@@ -58546,7 +58621,7 @@ function buildStreamFrames(messages) {
|
|
|
58546
58621
|
|
|
58547
58622
|
// src/components/chat/embeddable-chat.tsx
|
|
58548
58623
|
init_cn();
|
|
58549
|
-
import { useCallback as useCallback58, useEffect as useEffect94, useMemo as useMemo56, useRef as
|
|
58624
|
+
import { useCallback as useCallback58, useEffect as useEffect94, useMemo as useMemo56, useRef as useRef82, useState as useState125 } from "react";
|
|
58550
58625
|
import * as DialogPrimitive5 from "@radix-ui/react-dialog";
|
|
58551
58626
|
import { usePreventScroll as usePreventScroll6 } from "@react-aria/overlays";
|
|
58552
58627
|
import { isIOS } from "@react-aria/utils";
|
|
@@ -58633,7 +58708,7 @@ init_button2();
|
|
|
58633
58708
|
import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
|
|
58634
58709
|
|
|
58635
58710
|
// src/components/chat/hooks/use-chat-dialog-manager.ts
|
|
58636
|
-
import { useCallback as useCallback57, useMemo as useMemo55, useRef as
|
|
58711
|
+
import { useCallback as useCallback57, useMemo as useMemo55, useRef as useRef81, useState as useState124 } from "react";
|
|
58637
58712
|
function useChatDialogManager({
|
|
58638
58713
|
dialogs,
|
|
58639
58714
|
activeDialogId,
|
|
@@ -58673,7 +58748,7 @@ function useChatDialogManager({
|
|
|
58673
58748
|
const [archivedCursor, setArchivedCursor] = useState124(null);
|
|
58674
58749
|
const [archivedLoading, setArchivedLoading] = useState124(false);
|
|
58675
58750
|
const [archivedPending, setArchivedPending] = useState124(false);
|
|
58676
|
-
const archivedRequestIdRef =
|
|
58751
|
+
const archivedRequestIdRef = useRef81(0);
|
|
58677
58752
|
const loadArchivedPage = useCallback57(
|
|
58678
58753
|
async (cursor) => {
|
|
58679
58754
|
if (!fetchArchivedDialogs) return;
|
|
@@ -59178,7 +59253,7 @@ function EmbeddableChatInner({
|
|
|
59178
59253
|
return !window.matchMedia("(pointer: coarse)").matches;
|
|
59179
59254
|
});
|
|
59180
59255
|
usePreventScroll6({ isDisabled: !isOpen || shellLess });
|
|
59181
|
-
const navigatingAwayRef =
|
|
59256
|
+
const navigatingAwayRef = useRef82(false);
|
|
59182
59257
|
useEffect94(() => {
|
|
59183
59258
|
if (!isOpen) return;
|
|
59184
59259
|
if (shellLess) return;
|
|
@@ -59205,7 +59280,7 @@ function EmbeddableChatInner({
|
|
|
59205
59280
|
window.scrollTo(0, scrollY);
|
|
59206
59281
|
};
|
|
59207
59282
|
}, [isOpen, shellLess]);
|
|
59208
|
-
const chatInputRef =
|
|
59283
|
+
const chatInputRef = useRef82(null);
|
|
59209
59284
|
const [quickActionPreview, setQuickActionPreview] = useState125(null);
|
|
59210
59285
|
const slashCommandsProp = useMemo56(
|
|
59211
59286
|
() => ({
|
|
@@ -59311,7 +59386,7 @@ function EmbeddableChatInner({
|
|
|
59311
59386
|
hasMoreMessages,
|
|
59312
59387
|
loadMoreMessages
|
|
59313
59388
|
} = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
|
|
59314
|
-
const guidePromptSentRef =
|
|
59389
|
+
const guidePromptSentRef = useRef82(false);
|
|
59315
59390
|
useEffect94(() => {
|
|
59316
59391
|
if (!guidePendingPrompt) {
|
|
59317
59392
|
guidePromptSentRef.current = false;
|
|
@@ -59336,11 +59411,11 @@ function EmbeddableChatInner({
|
|
|
59336
59411
|
const [contextItems, setContextItems] = useState125([]);
|
|
59337
59412
|
const [contextPickerOpen, setContextPickerOpen] = useState125(false);
|
|
59338
59413
|
const [mentionQuery, setMentionQuery] = useState125(null);
|
|
59339
|
-
const mentionActiveRef =
|
|
59414
|
+
const mentionActiveRef = useRef82(false);
|
|
59340
59415
|
useEffect94(() => {
|
|
59341
59416
|
mentionActiveRef.current = mentionQuery !== null;
|
|
59342
59417
|
}, [mentionQuery]);
|
|
59343
|
-
const mentionKeysRef =
|
|
59418
|
+
const mentionKeysRef = useRef82(/* @__PURE__ */ new Set());
|
|
59344
59419
|
useEffect94(() => {
|
|
59345
59420
|
setContextItems([]);
|
|
59346
59421
|
setMentionQuery(null);
|
|
@@ -59437,7 +59512,7 @@ function EmbeddableChatInner({
|
|
|
59437
59512
|
() => effectiveAssistantIcon ? /* @__PURE__ */ jsx383(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx383(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
|
|
59438
59513
|
[effectiveAssistantIcon]
|
|
59439
59514
|
);
|
|
59440
|
-
const timestampCacheRef =
|
|
59515
|
+
const timestampCacheRef = useRef82(/* @__PURE__ */ new Map());
|
|
59441
59516
|
const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
|
|
59442
59517
|
const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
|
|
59443
59518
|
const messages = useMemo56(() => {
|
|
@@ -59648,7 +59723,7 @@ function EmbeddableChatInner({
|
|
|
59648
59723
|
const [portalHost, setPortalHost] = useState125(null);
|
|
59649
59724
|
const [panelBoundary, setPanelBoundary] = useState125(null);
|
|
59650
59725
|
const [panelWidth, setPanelWidth] = useState125(0);
|
|
59651
|
-
const panelMeasureRef =
|
|
59726
|
+
const panelMeasureRef = useRef82(null);
|
|
59652
59727
|
useEffect94(() => {
|
|
59653
59728
|
const el = panelMeasureRef.current;
|
|
59654
59729
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
@@ -61325,4 +61400,4 @@ export {
|
|
|
61325
61400
|
LogsList,
|
|
61326
61401
|
assets
|
|
61327
61402
|
};
|
|
61328
|
-
//# sourceMappingURL=chunk-
|
|
61403
|
+
//# sourceMappingURL=chunk-6AQKSCZ5.js.map
|