@flamingo-stack/openframe-frontend-core 0.0.446 → 0.0.447
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-7IC2QCOL.cjs → chunk-2PNWAAU4.cjs} +73 -73
- package/dist/{chunk-7IC2QCOL.cjs.map → chunk-2PNWAAU4.cjs.map} +1 -1
- package/dist/{chunk-5YQSRQHP.js → chunk-3GBLPPSW.js} +6 -6
- package/dist/{chunk-SAV4U37G.js → chunk-4ONE3HQP.js} +2 -2
- package/dist/{chunk-N4CCB33C.js → chunk-5BJJRPDH.js} +3 -3
- package/dist/{chunk-K6JIBV3X.js → chunk-6TAIXSF5.js} +2 -2
- package/dist/{chunk-VIJARDBM.cjs → chunk-AN7MCJTV.cjs} +5 -3
- package/dist/chunk-AN7MCJTV.cjs.map +1 -0
- package/dist/{chunk-I7IOEXRJ.js → chunk-D2NLNBLH.js} +2 -2
- package/dist/{chunk-SA7AHDS6.cjs → chunk-E6HKLQ3Q.cjs} +7 -7
- package/dist/{chunk-SA7AHDS6.cjs.map → chunk-E6HKLQ3Q.cjs.map} +1 -1
- package/dist/{chunk-DH3DUY6Q.cjs → chunk-EZMM2OMP.cjs} +32 -32
- package/dist/{chunk-DH3DUY6Q.cjs.map → chunk-EZMM2OMP.cjs.map} +1 -1
- package/dist/{chunk-6XZNIPXP.cjs → chunk-FR6NVZVM.cjs} +18 -18
- package/dist/{chunk-6XZNIPXP.cjs.map → chunk-FR6NVZVM.cjs.map} +1 -1
- package/dist/{chunk-XB6D7B3I.js → chunk-G7QSLGMI.js} +3 -3
- package/dist/{chunk-L276GOMD.cjs → chunk-ITJMUH4Q.cjs} +40 -40
- package/dist/{chunk-L276GOMD.cjs.map → chunk-ITJMUH4Q.cjs.map} +1 -1
- package/dist/{chunk-ZKYEMGMD.cjs → chunk-KYLOPUIH.cjs} +29 -29
- package/dist/{chunk-ZKYEMGMD.cjs.map → chunk-KYLOPUIH.cjs.map} +1 -1
- package/dist/{chunk-MS5CEBBQ.cjs → chunk-PF6CKZIH.cjs} +5 -5
- package/dist/{chunk-MS5CEBBQ.cjs.map → chunk-PF6CKZIH.cjs.map} +1 -1
- package/dist/{chunk-BAUWT7PV.cjs → chunk-RNXMP7GB.cjs} +986 -941
- package/dist/chunk-RNXMP7GB.cjs.map +1 -0
- package/dist/{chunk-PTT4J5GF.cjs → chunk-ROCJMSJI.cjs} +3 -3
- package/dist/{chunk-PTT4J5GF.cjs.map → chunk-ROCJMSJI.cjs.map} +1 -1
- package/dist/{chunk-5WX2V6CY.cjs → chunk-S7VMUDUB.cjs} +12 -12
- package/dist/{chunk-5WX2V6CY.cjs.map → chunk-S7VMUDUB.cjs.map} +1 -1
- package/dist/{chunk-YLMD4UFA.js → chunk-SHC5NFOH.js} +3 -3
- package/dist/{chunk-5NYXGWBN.js → chunk-TKGCTDQY.js} +4 -2
- package/dist/{chunk-5NYXGWBN.js.map → chunk-TKGCTDQY.js.map} +1 -1
- package/dist/{chunk-GTHA2SYB.js → chunk-TMZYFYSS.js} +5 -5
- package/dist/{chunk-NQLY27GH.cjs → chunk-WLU37UZO.cjs} +73 -73
- package/dist/{chunk-NQLY27GH.cjs.map → chunk-WLU37UZO.cjs.map} +1 -1
- package/dist/{chunk-SCKAD2MY.js → chunk-WMOF3WQT.js} +5 -5
- package/dist/{chunk-3AFV2YIC.cjs → chunk-X4XHW3OV.cjs} +40 -40
- package/dist/{chunk-3AFV2YIC.cjs.map → chunk-X4XHW3OV.cjs.map} +1 -1
- package/dist/{chunk-N3Y6JYH5.cjs → chunk-XUS75SQW.cjs} +15 -15
- package/dist/{chunk-N3Y6JYH5.cjs.map → chunk-XUS75SQW.cjs.map} +1 -1
- package/dist/{chunk-MAB4TQCO.js → chunk-YCSNDUDE.js} +342 -297
- package/dist/chunk-YCSNDUDE.js.map +1 -0
- package/dist/{chunk-G2KXNMFQ.js → chunk-YHNBJ3F3.js} +2 -2
- package/dist/{chunk-MR7BMJHI.js → chunk-ZQVEB6KT.js} +6 -6
- package/dist/{chunk-BNYI2FVM.js → chunk-ZYB3BYBA.js} +4 -4
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/cards-strip.d.ts.map +1 -1
- package/dist/components/features/highlight-video-section.d.ts.map +1 -1
- package/dist/components/features/index.cjs +5 -3
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +4 -2
- package/dist/components/features/media-gallery-manager.d.ts.map +1 -1
- package/dist/components/features/mux-origins.cjs +14 -0
- package/dist/components/features/mux-origins.cjs.map +1 -1
- package/dist/components/features/mux-origins.d.ts +26 -2
- package/dist/components/features/mux-origins.d.ts.map +1 -1
- package/dist/components/features/mux-origins.js +14 -1
- package/dist/components/features/mux-origins.js.map +1 -1
- package/dist/components/features/release-media-manager.d.ts.map +1 -1
- package/dist/components/features/use-video-warmup.d.ts +12 -0
- package/dist/components/features/use-video-warmup.d.ts.map +1 -1
- package/dist/components/features/video-bites-strip.d.ts.map +1 -1
- package/dist/components/features/video-source-selector.d.ts +1 -11
- package/dist/components/features/video-source-selector.d.ts.map +1 -1
- package/dist/components/features/video.d.ts +14 -1
- package/dist/components/features/video.d.ts.map +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 +137 -135
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/hooks/index.cjs +4 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/use-near-viewport.d.ts +7 -0
- package/dist/hooks/use-near-viewport.d.ts.map +1 -1
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/package.json +1 -1
- package/src/components/features/cards-strip.tsx +2 -1
- package/src/components/features/highlight-video-section.tsx +10 -7
- package/src/components/features/media-gallery-manager.tsx +6 -8
- package/src/components/features/mux-origins.ts +40 -2
- package/src/components/features/release-media-manager.tsx +6 -8
- package/src/components/features/use-video-warmup.ts +19 -3
- package/src/components/features/video-bites-strip.tsx +24 -4
- package/src/components/features/video-source-selector.tsx +16 -56
- package/src/components/features/video.tsx +103 -8
- package/src/components/ui/rich-markdown-renderer.tsx +20 -0
- package/src/components/ui/simple-markdown-renderer.tsx +9 -5
- package/src/hooks/use-near-viewport.ts +9 -1
- package/dist/chunk-BAUWT7PV.cjs.map +0 -1
- package/dist/chunk-MAB4TQCO.js.map +0 -1
- package/dist/chunk-VIJARDBM.cjs.map +0 -1
- /package/dist/{chunk-5YQSRQHP.js.map → chunk-3GBLPPSW.js.map} +0 -0
- /package/dist/{chunk-SAV4U37G.js.map → chunk-4ONE3HQP.js.map} +0 -0
- /package/dist/{chunk-N4CCB33C.js.map → chunk-5BJJRPDH.js.map} +0 -0
- /package/dist/{chunk-K6JIBV3X.js.map → chunk-6TAIXSF5.js.map} +0 -0
- /package/dist/{chunk-I7IOEXRJ.js.map → chunk-D2NLNBLH.js.map} +0 -0
- /package/dist/{chunk-XB6D7B3I.js.map → chunk-G7QSLGMI.js.map} +0 -0
- /package/dist/{chunk-YLMD4UFA.js.map → chunk-SHC5NFOH.js.map} +0 -0
- /package/dist/{chunk-GTHA2SYB.js.map → chunk-TMZYFYSS.js.map} +0 -0
- /package/dist/{chunk-SCKAD2MY.js.map → chunk-WMOF3WQT.js.map} +0 -0
- /package/dist/{chunk-G2KXNMFQ.js.map → chunk-YHNBJ3F3.js.map} +0 -0
- /package/dist/{chunk-MR7BMJHI.js.map → chunk-ZQVEB6KT.js.map} +0 -0
- /package/dist/{chunk-BNYI2FVM.js.map → chunk-ZYB3BYBA.js.map} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
+
NEAR_VIEWPORT_ROOT_MARGIN,
|
|
3
4
|
STICKY_HEADER_OFFSET_PX,
|
|
4
5
|
ToolIcon,
|
|
5
6
|
dotColorByVariant,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
useOgPlaceholderUrl,
|
|
28
29
|
useOnboardingState,
|
|
29
30
|
useToast
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TKGCTDQY.js";
|
|
31
32
|
import {
|
|
32
33
|
AlertCircleIcon,
|
|
33
34
|
AnthropicLogoGreyIcon,
|
|
@@ -1284,12 +1285,11 @@ var SAFE_HTML_TAGS = /* @__PURE__ */ new Set([
|
|
|
1284
1285
|
"ul",
|
|
1285
1286
|
"var",
|
|
1286
1287
|
"wbr",
|
|
1287
|
-
// Media
|
|
1288
|
+
// Media ('video' intentionally excluded — see the header comment)
|
|
1288
1289
|
"img",
|
|
1289
1290
|
"picture",
|
|
1290
1291
|
"source",
|
|
1291
1292
|
"audio",
|
|
1292
|
-
"video",
|
|
1293
1293
|
"iframe",
|
|
1294
1294
|
"track",
|
|
1295
1295
|
// Forms (rehype-raw allows them; mostly harmless for chat output)
|
|
@@ -10170,7 +10170,7 @@ var TabsContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
10170
10170
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
10171
10171
|
|
|
10172
10172
|
// src/components/features/video.tsx
|
|
10173
|
-
import { useCallback as useCallback13, useEffect as
|
|
10173
|
+
import { useCallback as useCallback13, useEffect as useEffect18, useMemo as useMemo12, useRef as useRef13, useState as useState23 } from "react";
|
|
10174
10174
|
import MuxPlayer from "@mux/mux-player-react";
|
|
10175
10175
|
|
|
10176
10176
|
// src/components/features/video-center-badge.tsx
|
|
@@ -10216,8 +10216,96 @@ function fetchPriorityProp(priority) {
|
|
|
10216
10216
|
return USE_CAMEL_CASE_FETCH_PRIORITY ? { fetchPriority: value } : { fetchpriority: value };
|
|
10217
10217
|
}
|
|
10218
10218
|
|
|
10219
|
+
// src/components/features/use-video-warmup.ts
|
|
10220
|
+
import { useEffect as useEffect17 } from "react";
|
|
10221
|
+
import ReactDOM from "react-dom";
|
|
10222
|
+
|
|
10223
|
+
// src/components/features/mux-origins.ts
|
|
10224
|
+
var MUX_STREAM_ORIGIN = "https://stream.mux.com";
|
|
10225
|
+
var MUX_IMAGE_ORIGIN = "https://image.mux.com";
|
|
10226
|
+
function toMuxPreviewUrl(url, maxResolution = "720p") {
|
|
10227
|
+
let parsed;
|
|
10228
|
+
try {
|
|
10229
|
+
parsed = new URL(url);
|
|
10230
|
+
} catch {
|
|
10231
|
+
return url;
|
|
10232
|
+
}
|
|
10233
|
+
if (parsed.origin !== MUX_STREAM_ORIGIN) return url;
|
|
10234
|
+
if (!parsed.pathname.endsWith(".m3u8")) return url;
|
|
10235
|
+
if (parsed.searchParams.has("token")) return url;
|
|
10236
|
+
parsed.searchParams.set("max_resolution", maxResolution);
|
|
10237
|
+
return parsed.toString();
|
|
10238
|
+
}
|
|
10239
|
+
|
|
10240
|
+
// src/components/features/use-video-warmup.ts
|
|
10241
|
+
function saveDataEnabled() {
|
|
10242
|
+
if (typeof navigator === "undefined") return false;
|
|
10243
|
+
const conn = navigator.connection;
|
|
10244
|
+
return conn?.saveData === true;
|
|
10245
|
+
}
|
|
10246
|
+
function useVideoOriginPreconnect({
|
|
10247
|
+
supabaseStorageOrigin
|
|
10248
|
+
} = {}) {
|
|
10249
|
+
const runtime = useChatRuntime();
|
|
10250
|
+
const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
|
|
10251
|
+
try {
|
|
10252
|
+
ReactDOM.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
|
|
10253
|
+
ReactDOM.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
|
|
10254
|
+
if (resolvedOrigin) {
|
|
10255
|
+
ReactDOM.preconnect(resolvedOrigin, { crossOrigin: "anonymous" });
|
|
10256
|
+
}
|
|
10257
|
+
} catch (err) {
|
|
10258
|
+
if (process.env.NODE_ENV !== "production") {
|
|
10259
|
+
console.warn("[useVideoOriginPreconnect] preconnect failed:", err);
|
|
10260
|
+
}
|
|
10261
|
+
}
|
|
10262
|
+
}
|
|
10263
|
+
function useVideoWarmup({
|
|
10264
|
+
videoUrl,
|
|
10265
|
+
supabaseStorageOrigin,
|
|
10266
|
+
nearMargin = "1000px"
|
|
10267
|
+
} = {}) {
|
|
10268
|
+
const runtime = useChatRuntime();
|
|
10269
|
+
const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
|
|
10270
|
+
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
10271
|
+
const { ref, isNear } = useNearViewport(nearMargin);
|
|
10272
|
+
useEffect17(() => {
|
|
10273
|
+
if (!isNear || !videoUrl || !resolvedOrigin) return;
|
|
10274
|
+
if (saveDataEnabled()) return;
|
|
10275
|
+
let videoOrigin;
|
|
10276
|
+
try {
|
|
10277
|
+
videoOrigin = new URL(videoUrl, "http://placeholder.local").origin;
|
|
10278
|
+
} catch {
|
|
10279
|
+
return;
|
|
10280
|
+
}
|
|
10281
|
+
if (videoOrigin !== resolvedOrigin) return;
|
|
10282
|
+
const link = document.createElement("link");
|
|
10283
|
+
link.rel = "preload";
|
|
10284
|
+
link.as = "video";
|
|
10285
|
+
link.href = videoUrl;
|
|
10286
|
+
link.crossOrigin = "anonymous";
|
|
10287
|
+
if ("fetchPriority" in link) {
|
|
10288
|
+
;
|
|
10289
|
+
link.fetchPriority = "low";
|
|
10290
|
+
}
|
|
10291
|
+
document.head.appendChild(link);
|
|
10292
|
+
return () => {
|
|
10293
|
+
link.remove();
|
|
10294
|
+
};
|
|
10295
|
+
}, [isNear, videoUrl, resolvedOrigin]);
|
|
10296
|
+
return { ref, isNear };
|
|
10297
|
+
}
|
|
10298
|
+
|
|
10219
10299
|
// src/components/features/video.tsx
|
|
10220
10300
|
import { jsx as jsx75, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
10301
|
+
function videoPerfDebugEnabled() {
|
|
10302
|
+
if (process.env.NODE_ENV !== "production") return true;
|
|
10303
|
+
try {
|
|
10304
|
+
return typeof localStorage !== "undefined" && localStorage.getItem("VIDEO_PERF_DEBUG") !== null;
|
|
10305
|
+
} catch {
|
|
10306
|
+
return false;
|
|
10307
|
+
}
|
|
10308
|
+
}
|
|
10221
10309
|
if (typeof window !== "undefined") {
|
|
10222
10310
|
const w = window;
|
|
10223
10311
|
if (!w.chrome?.cast) {
|
|
@@ -10309,7 +10397,15 @@ function Video2(props) {
|
|
|
10309
10397
|
className: props.className,
|
|
10310
10398
|
minimalControls: props.minimalControls
|
|
10311
10399
|
}
|
|
10312
|
-
) : "firstFrameOnly" in props && props.firstFrameOnly ? /* @__PURE__ */ jsx75(
|
|
10400
|
+
) : "firstFrameOnly" in props && props.firstFrameOnly ? /* @__PURE__ */ jsx75(
|
|
10401
|
+
FirstFramePreview,
|
|
10402
|
+
{
|
|
10403
|
+
url,
|
|
10404
|
+
poster: props.poster,
|
|
10405
|
+
fit: "fit" in props ? props.fit : void 0,
|
|
10406
|
+
className: props.className
|
|
10407
|
+
}
|
|
10408
|
+
) : /* @__PURE__ */ jsx75(
|
|
10313
10409
|
FilePlayer,
|
|
10314
10410
|
{
|
|
10315
10411
|
url,
|
|
@@ -10322,6 +10418,8 @@ function Video2(props) {
|
|
|
10322
10418
|
chromeless: "chromeless" in props ? props.chromeless : void 0,
|
|
10323
10419
|
playOnHover: "playOnHover" in props ? props.playOnHover : void 0,
|
|
10324
10420
|
playWhenHovered: "playWhenHovered" in props ? props.playWhenHovered : void 0,
|
|
10421
|
+
preload: "preload" in props ? props.preload : void 0,
|
|
10422
|
+
fit: "fit" in props ? props.fit : void 0,
|
|
10325
10423
|
className: props.className
|
|
10326
10424
|
}
|
|
10327
10425
|
);
|
|
@@ -10346,7 +10444,12 @@ function wrapWithLayout(inner, layout) {
|
|
|
10346
10444
|
return inner;
|
|
10347
10445
|
}
|
|
10348
10446
|
}
|
|
10349
|
-
function FirstFramePreview({
|
|
10447
|
+
function FirstFramePreview({
|
|
10448
|
+
url,
|
|
10449
|
+
poster,
|
|
10450
|
+
fit,
|
|
10451
|
+
className
|
|
10452
|
+
}) {
|
|
10350
10453
|
return /* @__PURE__ */ jsx75(
|
|
10351
10454
|
"div",
|
|
10352
10455
|
{
|
|
@@ -10357,7 +10460,8 @@ function FirstFramePreview({ url, className }) {
|
|
|
10357
10460
|
FilePlayer,
|
|
10358
10461
|
{
|
|
10359
10462
|
url: `${url}#t=0.1`,
|
|
10360
|
-
|
|
10463
|
+
poster,
|
|
10464
|
+
fit,
|
|
10361
10465
|
muted: true,
|
|
10362
10466
|
chromeless: true,
|
|
10363
10467
|
className
|
|
@@ -10378,10 +10482,23 @@ function FilePlayer({
|
|
|
10378
10482
|
playOnHover,
|
|
10379
10483
|
playWhenHovered,
|
|
10380
10484
|
preload,
|
|
10485
|
+
fit,
|
|
10381
10486
|
className
|
|
10382
10487
|
}) {
|
|
10488
|
+
const effectivePreload = preload ?? (saveDataEnabled() ? "none" : "metadata");
|
|
10383
10489
|
const [hoverMutedFallback, setHoverMutedFallback] = useState23(false);
|
|
10384
10490
|
const hoverPlayerRef = useRef13(null);
|
|
10491
|
+
const perfListenerRef = useRef13(null);
|
|
10492
|
+
const clearPerfListener = useCallback13(() => {
|
|
10493
|
+
if (perfListenerRef.current) {
|
|
10494
|
+
try {
|
|
10495
|
+
hoverPlayerRef.current?.removeEventListener?.("playing", perfListenerRef.current);
|
|
10496
|
+
} catch {
|
|
10497
|
+
}
|
|
10498
|
+
perfListenerRef.current = null;
|
|
10499
|
+
}
|
|
10500
|
+
}, []);
|
|
10501
|
+
useEffect18(() => clearPerfListener, [clearPerfListener]);
|
|
10385
10502
|
const hoverActiveRef = useRef13(false);
|
|
10386
10503
|
const hoverGenerationRef = useRef13(0);
|
|
10387
10504
|
const activationWaiterRef = useRef13(null);
|
|
@@ -10391,12 +10508,25 @@ function FilePlayer({
|
|
|
10391
10508
|
activationWaiterRef.current = null;
|
|
10392
10509
|
}
|
|
10393
10510
|
}, []);
|
|
10394
|
-
|
|
10511
|
+
useEffect18(() => clearActivationWaiter, [clearActivationWaiter]);
|
|
10395
10512
|
const startHoverPlayback = useCallback13(() => {
|
|
10396
10513
|
hoverActiveRef.current = true;
|
|
10397
10514
|
const generation = ++hoverGenerationRef.current;
|
|
10398
10515
|
const el = hoverPlayerRef.current;
|
|
10399
10516
|
if (!el) return;
|
|
10517
|
+
if (videoPerfDebugEnabled()) {
|
|
10518
|
+
clearPerfListener();
|
|
10519
|
+
const startedAt = performance.now();
|
|
10520
|
+
const onPlaying = () => {
|
|
10521
|
+
clearPerfListener();
|
|
10522
|
+
console.debug("[Video] hover\u2192playing %dms", Math.round(performance.now() - startedAt));
|
|
10523
|
+
};
|
|
10524
|
+
perfListenerRef.current = onPlaying;
|
|
10525
|
+
try {
|
|
10526
|
+
el.addEventListener?.("playing", onPlaying);
|
|
10527
|
+
} catch {
|
|
10528
|
+
}
|
|
10529
|
+
}
|
|
10400
10530
|
try {
|
|
10401
10531
|
el.volume = 0.5;
|
|
10402
10532
|
if (userHasInteracted) {
|
|
@@ -10435,16 +10565,17 @@ function FilePlayer({
|
|
|
10435
10565
|
}
|
|
10436
10566
|
} catch {
|
|
10437
10567
|
}
|
|
10438
|
-
}, []);
|
|
10568
|
+
}, [clearActivationWaiter, clearPerfListener]);
|
|
10439
10569
|
const stopHoverPlayback = useCallback13(() => {
|
|
10440
10570
|
hoverActiveRef.current = false;
|
|
10441
10571
|
setHoverMutedFallback(false);
|
|
10442
10572
|
clearActivationWaiter();
|
|
10573
|
+
clearPerfListener();
|
|
10443
10574
|
try {
|
|
10444
10575
|
hoverPlayerRef.current?.pause?.();
|
|
10445
10576
|
} catch {
|
|
10446
10577
|
}
|
|
10447
|
-
}, [clearActivationWaiter]);
|
|
10578
|
+
}, [clearActivationWaiter, clearPerfListener]);
|
|
10448
10579
|
const unmuteNow = useCallback13((e) => {
|
|
10449
10580
|
e.stopPropagation();
|
|
10450
10581
|
e.preventDefault();
|
|
@@ -10461,7 +10592,7 @@ function FilePlayer({
|
|
|
10461
10592
|
setHoverMutedFallback(false);
|
|
10462
10593
|
}, []);
|
|
10463
10594
|
const hoverControlled = typeof playWhenHovered === "boolean";
|
|
10464
|
-
|
|
10595
|
+
useEffect18(() => {
|
|
10465
10596
|
if (!hoverControlled) return;
|
|
10466
10597
|
if (playWhenHovered) startHoverPlayback();
|
|
10467
10598
|
else stopHoverPlayback();
|
|
@@ -10480,7 +10611,7 @@ function FilePlayer({
|
|
|
10480
10611
|
src: url,
|
|
10481
10612
|
poster: poster || void 0,
|
|
10482
10613
|
streamType: "on-demand",
|
|
10483
|
-
preload,
|
|
10614
|
+
preload: effectivePreload,
|
|
10484
10615
|
playsInline: true,
|
|
10485
10616
|
muted,
|
|
10486
10617
|
preferCmcd: "header",
|
|
@@ -10491,7 +10622,8 @@ function FilePlayer({
|
|
|
10491
10622
|
style: {
|
|
10492
10623
|
width: "100%",
|
|
10493
10624
|
height: "100%",
|
|
10494
|
-
...chromeless ? { "--controls": "none" } : {}
|
|
10625
|
+
...chromeless ? { "--controls": "none" } : {},
|
|
10626
|
+
...fit === "cover" ? { "--media-object-fit": "cover" } : {}
|
|
10495
10627
|
},
|
|
10496
10628
|
children: captionsUrl ? /* @__PURE__ */ jsx75(
|
|
10497
10629
|
"track",
|
|
@@ -10584,14 +10716,14 @@ function YouTubeFacadeInner({
|
|
|
10584
10716
|
return `${YT_NOCOOKIE_ORIGIN}/embed/${videoId}?${params.toString()}`;
|
|
10585
10717
|
}, [videoId, minimalControls]);
|
|
10586
10718
|
const [posterTier, setPosterTier] = useState23(0);
|
|
10587
|
-
|
|
10719
|
+
useEffect18(() => {
|
|
10588
10720
|
setPosterTier(0);
|
|
10589
10721
|
}, [videoId]);
|
|
10590
10722
|
const posterQuality = YT_POSTER_TIERS[posterTier];
|
|
10591
10723
|
const posterJpg = `https://i.ytimg.com/vi/${videoId}/${posterQuality}.jpg`;
|
|
10592
10724
|
const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/${posterQuality}.webp`;
|
|
10593
10725
|
const handlePosterError = () => setPosterTier((tier) => Math.min(tier + 1, YT_POSTER_TIERS.length - 1));
|
|
10594
|
-
|
|
10726
|
+
useEffect18(() => {
|
|
10595
10727
|
if (!activated) return;
|
|
10596
10728
|
const iframe = iframeRef.current;
|
|
10597
10729
|
if (!iframe) return;
|
|
@@ -10684,69 +10816,6 @@ function YouTubeFacadeInner({
|
|
|
10684
10816
|
init_cn();
|
|
10685
10817
|
import { useMemo as useMemo14, useRef as useRef15, useState as useState25, useEffect as useEffect20 } from "react";
|
|
10686
10818
|
|
|
10687
|
-
// src/components/features/use-video-warmup.ts
|
|
10688
|
-
import { useEffect as useEffect18 } from "react";
|
|
10689
|
-
import ReactDOM from "react-dom";
|
|
10690
|
-
|
|
10691
|
-
// src/components/features/mux-origins.ts
|
|
10692
|
-
var MUX_STREAM_ORIGIN = "https://stream.mux.com";
|
|
10693
|
-
var MUX_IMAGE_ORIGIN = "https://image.mux.com";
|
|
10694
|
-
|
|
10695
|
-
// src/components/features/use-video-warmup.ts
|
|
10696
|
-
function useVideoOriginPreconnect({
|
|
10697
|
-
supabaseStorageOrigin
|
|
10698
|
-
} = {}) {
|
|
10699
|
-
const runtime = useChatRuntime();
|
|
10700
|
-
const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
|
|
10701
|
-
try {
|
|
10702
|
-
ReactDOM.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
|
|
10703
|
-
ReactDOM.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
|
|
10704
|
-
if (resolvedOrigin) {
|
|
10705
|
-
ReactDOM.preconnect(resolvedOrigin, { crossOrigin: "anonymous" });
|
|
10706
|
-
}
|
|
10707
|
-
} catch (err) {
|
|
10708
|
-
if (process.env.NODE_ENV !== "production") {
|
|
10709
|
-
console.warn("[useVideoOriginPreconnect] preconnect failed:", err);
|
|
10710
|
-
}
|
|
10711
|
-
}
|
|
10712
|
-
}
|
|
10713
|
-
function useVideoWarmup({
|
|
10714
|
-
videoUrl,
|
|
10715
|
-
supabaseStorageOrigin,
|
|
10716
|
-
nearMargin = "1000px"
|
|
10717
|
-
} = {}) {
|
|
10718
|
-
const runtime = useChatRuntime();
|
|
10719
|
-
const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
|
|
10720
|
-
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
10721
|
-
const { ref, isNear } = useNearViewport(nearMargin);
|
|
10722
|
-
useEffect18(() => {
|
|
10723
|
-
if (!isNear || !videoUrl || !resolvedOrigin) return;
|
|
10724
|
-
const conn = navigator.connection;
|
|
10725
|
-
if (conn?.saveData === true) return;
|
|
10726
|
-
let videoOrigin;
|
|
10727
|
-
try {
|
|
10728
|
-
videoOrigin = new URL(videoUrl, "http://placeholder.local").origin;
|
|
10729
|
-
} catch {
|
|
10730
|
-
return;
|
|
10731
|
-
}
|
|
10732
|
-
if (videoOrigin !== resolvedOrigin) return;
|
|
10733
|
-
const link = document.createElement("link");
|
|
10734
|
-
link.rel = "preload";
|
|
10735
|
-
link.as = "video";
|
|
10736
|
-
link.href = videoUrl;
|
|
10737
|
-
link.crossOrigin = "anonymous";
|
|
10738
|
-
if ("fetchPriority" in link) {
|
|
10739
|
-
;
|
|
10740
|
-
link.fetchPriority = "low";
|
|
10741
|
-
}
|
|
10742
|
-
document.head.appendChild(link);
|
|
10743
|
-
return () => {
|
|
10744
|
-
link.remove();
|
|
10745
|
-
};
|
|
10746
|
-
}, [isNear, videoUrl, resolvedOrigin]);
|
|
10747
|
-
return { ref, isNear };
|
|
10748
|
-
}
|
|
10749
|
-
|
|
10750
10819
|
// src/components/features/video-ratio-tabs.tsx
|
|
10751
10820
|
import { Fragment as Fragment17, jsx as jsx76, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
10752
10821
|
var TAB_TRIGGER_CLASS = "rounded-none border-b-2 border-transparent data-[state=active]:border-ods-accent data-[state=active]:bg-transparent data-[state=active]:shadow-none px-4 py-2 text-h6 text-ods-text-secondary data-[state=active]:text-ods-text-primary";
|
|
@@ -10843,8 +10912,8 @@ function sortBitesByCreatedAtDesc(a, b) {
|
|
|
10843
10912
|
|
|
10844
10913
|
// src/components/features/cards-strip.tsx
|
|
10845
10914
|
init_cn();
|
|
10846
|
-
init_button2();
|
|
10847
10915
|
import React35, { useCallback as useCallback14, useEffect as useEffect19, useMemo as useMemo13, useRef as useRef14, useState as useState24 } from "react";
|
|
10916
|
+
init_button2();
|
|
10848
10917
|
|
|
10849
10918
|
// src/components/layout/page-heading.tsx
|
|
10850
10919
|
import { Fragment as Fragment18, jsx as jsx77, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
@@ -11086,7 +11155,7 @@ function CardsStrip(props) {
|
|
|
11086
11155
|
}
|
|
11087
11156
|
return next;
|
|
11088
11157
|
});
|
|
11089
|
-
}, { rootMargin:
|
|
11158
|
+
}, { rootMargin: NEAR_VIEWPORT_ROOT_MARGIN });
|
|
11090
11159
|
cardObserverRef.current = io;
|
|
11091
11160
|
cardElIdxRef.current.forEach((_idx, el) => io.observe(el));
|
|
11092
11161
|
return () => {
|
|
@@ -11392,6 +11461,7 @@ function VideoBiteCard({
|
|
|
11392
11461
|
const targetHref = bite.href ?? sectionHref;
|
|
11393
11462
|
const hasTarget = !!(targetHref || bite.onNavigate || onBiteNavigate);
|
|
11394
11463
|
const key = cardKey ?? `${bite.url}__${index}`;
|
|
11464
|
+
const previewUrl = toMuxPreviewUrl(bite.url);
|
|
11395
11465
|
const controlled = active !== void 0;
|
|
11396
11466
|
const [selfActive, setSelfActive] = useState25(false);
|
|
11397
11467
|
const isActive = controlled ? !!active : selfActive;
|
|
@@ -11406,7 +11476,7 @@ function VideoBiteCard({
|
|
|
11406
11476
|
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
11407
11477
|
const io = new IntersectionObserver(
|
|
11408
11478
|
(entries) => setIsNear(entries[0]?.isIntersecting ?? false),
|
|
11409
|
-
{ rootMargin:
|
|
11479
|
+
{ rootMargin: NEAR_VIEWPORT_ROOT_MARGIN }
|
|
11410
11480
|
);
|
|
11411
11481
|
io.observe(el);
|
|
11412
11482
|
return () => io.disconnect();
|
|
@@ -11510,7 +11580,7 @@ function VideoBiteCard({
|
|
|
11510
11580
|
onError: onPosterError,
|
|
11511
11581
|
className: "object-cover"
|
|
11512
11582
|
}
|
|
11513
|
-
) : /* @__PURE__ */ jsx80(Video2, { kind: "file", url:
|
|
11583
|
+
) : /* @__PURE__ */ jsx80(Video2, { kind: "file", url: previewUrl, firstFrameOnly: true, layout: "fill" }),
|
|
11514
11584
|
!isActive && /* @__PURE__ */ jsx80(VideoPlayBadge, { className: "absolute inset-0 z-10 m-auto" }),
|
|
11515
11585
|
showPlayer && // `--media-background-color: transparent` (inherited into
|
|
11516
11586
|
// media-chrome) — the freshly-mounted player must not blank the
|
|
@@ -11524,7 +11594,7 @@ function VideoBiteCard({
|
|
|
11524
11594
|
Video2,
|
|
11525
11595
|
{
|
|
11526
11596
|
kind: "file",
|
|
11527
|
-
url:
|
|
11597
|
+
url: previewUrl,
|
|
11528
11598
|
poster: bite.thumbnail_url,
|
|
11529
11599
|
playWhenHovered: isActive,
|
|
11530
11600
|
chromeless: true,
|
|
@@ -13277,7 +13347,7 @@ function RoadmapVoteButton({
|
|
|
13277
13347
|
init_button();
|
|
13278
13348
|
|
|
13279
13349
|
// src/components/ui/image-gallery-modal.tsx
|
|
13280
|
-
import { useState as useState103, useEffect as
|
|
13350
|
+
import { useState as useState103, useEffect as useEffect76 } from "react";
|
|
13281
13351
|
|
|
13282
13352
|
// src/components/ui/allowed-domains-input.tsx
|
|
13283
13353
|
init_cn();
|
|
@@ -21224,6 +21294,19 @@ var RichMarkdownInner = ({
|
|
|
21224
21294
|
}
|
|
21225
21295
|
return /* @__PURE__ */ jsx147(MarkdownImage, { src: src.trim(), alt });
|
|
21226
21296
|
},
|
|
21297
|
+
// Raw <video> tags in stored content (e.g. the hub's blog publisher
|
|
21298
|
+
// injects `<video src class="w-full my-8 rounded-lg" controls>` via
|
|
21299
|
+
// injectVideoInBlogContent) pass through rehypeRaw — route them to the
|
|
21300
|
+
// <Video> SSOT (MuxPlayer) instead of a native element so Mux HLS
|
|
21301
|
+
// manifests play on every browser and playback UX is unified. The
|
|
21302
|
+
// incoming className is forwarded so existing embeds keep their
|
|
21303
|
+
// width/margin/rounding.
|
|
21304
|
+
video: ({ src, poster, className: className2 }) => {
|
|
21305
|
+
if (!src || typeof src !== "string" || src.trim() === "") {
|
|
21306
|
+
return null;
|
|
21307
|
+
}
|
|
21308
|
+
return /* @__PURE__ */ jsx147("div", { className: `overflow-hidden ${className2 || "w-full my-8 rounded-lg"}`, children: /* @__PURE__ */ jsx147("div", { className: "w-full aspect-video", children: /* @__PURE__ */ jsx147(Video2, { kind: "file", url: src.trim(), poster: typeof poster === "string" ? poster : void 0 }) }) });
|
|
21309
|
+
},
|
|
21227
21310
|
// Style lists
|
|
21228
21311
|
ul: ({ children }) => /* @__PURE__ */ jsx147("ul", { className: `list-disc list-outside my-4 ml-8 space-y-2 ${isDarkMode ? "text-ods-text-primary" : "text-[#374151]"}`, children }),
|
|
21229
21312
|
ol: ({ children }) => /* @__PURE__ */ jsx147("ol", { className: `list-decimal list-outside my-4 ml-8 space-y-2 ${isDarkMode ? "text-ods-text-primary" : "text-[#374151]"}`, children }),
|
|
@@ -28599,7 +28682,7 @@ import { useState as useState64, useRef as useRef34, useCallback as useCallback2
|
|
|
28599
28682
|
import {
|
|
28600
28683
|
Upload,
|
|
28601
28684
|
Image as ImageIcon2,
|
|
28602
|
-
Video as
|
|
28685
|
+
Video as VideoIcon,
|
|
28603
28686
|
Trash2 as Trash23,
|
|
28604
28687
|
Loader2 as Loader23,
|
|
28605
28688
|
GripVertical,
|
|
@@ -28691,14 +28774,10 @@ function MediaGalleryManager({
|
|
|
28691
28774
|
children: isDeleting ? /* @__PURE__ */ jsx219(Loader23, { className: "h-4 w-4 animate-spin text-ods-text-on-dark" }) : /* @__PURE__ */ jsx219(Trash23, { className: "h-4 w-4 text-ods-text-on-dark" })
|
|
28692
28775
|
}
|
|
28693
28776
|
) }),
|
|
28694
|
-
/* @__PURE__ */ jsx219("div", { className: "aspect-video relative bg-ods-bg rounded-lg overflow-hidden", children: mediaItem.media_type === "video" || mediaItem.media_type === "demo" ?
|
|
28695
|
-
|
|
28696
|
-
|
|
28697
|
-
|
|
28698
|
-
className: "w-full h-full object-cover",
|
|
28699
|
-
controls: true,
|
|
28700
|
-
preload: "metadata"
|
|
28701
|
-
}
|
|
28777
|
+
/* @__PURE__ */ jsx219("div", { className: "aspect-video relative bg-ods-bg rounded-lg overflow-hidden", children: mediaItem.media_type === "video" || mediaItem.media_type === "demo" ? (
|
|
28778
|
+
// <Video> SSOT (MuxPlayer) — plays Mux HLS + MP4 alike;
|
|
28779
|
+
// fit="cover" crops to the aspect-video cell.
|
|
28780
|
+
/* @__PURE__ */ jsx219(Video2, { kind: "file", url: mediaItem.media_url, fit: "cover", className: "w-full h-full" })
|
|
28702
28781
|
) : /* @__PURE__ */ jsx219(
|
|
28703
28782
|
next_image_default,
|
|
28704
28783
|
{
|
|
@@ -28711,7 +28790,7 @@ function MediaGalleryManager({
|
|
|
28711
28790
|
) }),
|
|
28712
28791
|
/* @__PURE__ */ jsxs170("div", { className: "p-3", children: [
|
|
28713
28792
|
/* @__PURE__ */ jsxs170("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
28714
|
-
mediaItem.media_type === "video" || mediaItem.media_type === "demo" ? /* @__PURE__ */ jsx219(
|
|
28793
|
+
mediaItem.media_type === "video" || mediaItem.media_type === "demo" ? /* @__PURE__ */ jsx219(VideoIcon, { className: "h-4 w-4 text-ods-text-secondary" }) : /* @__PURE__ */ jsx219(ImageIcon2, { className: "h-4 w-4 text-ods-text-secondary" }),
|
|
28715
28794
|
/* @__PURE__ */ jsx219("span", { className: "text-h6 text-ods-text-primary capitalize", children: mediaItem.media_type })
|
|
28716
28795
|
] }),
|
|
28717
28796
|
mediaItem.title && /* @__PURE__ */ jsx219("p", { className: "text-h6 text-ods-text-secondary truncate", children: mediaItem.title })
|
|
@@ -29387,7 +29466,7 @@ function PushButtonSelector({
|
|
|
29387
29466
|
|
|
29388
29467
|
// src/components/features/release-media-manager.tsx
|
|
29389
29468
|
import { useState as useState66, useRef as useRef36 } from "react";
|
|
29390
|
-
import { Trash2 as Trash24, Plus as Plus5, Image as ImageIcon3, Video as
|
|
29469
|
+
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";
|
|
29391
29470
|
import { jsx as jsx226, jsxs as jsxs176 } from "react/jsx-runtime";
|
|
29392
29471
|
function ReleaseMediaManager({
|
|
29393
29472
|
media,
|
|
@@ -29460,7 +29539,7 @@ function ReleaseMediaManager({
|
|
|
29460
29539
|
switch (type) {
|
|
29461
29540
|
case "video":
|
|
29462
29541
|
case "demo":
|
|
29463
|
-
return /* @__PURE__ */ jsx226(
|
|
29542
|
+
return /* @__PURE__ */ jsx226(VideoIcon2, { className: "w-5 h-5 text-ods-text-secondary" });
|
|
29464
29543
|
default:
|
|
29465
29544
|
return /* @__PURE__ */ jsx226(ImageIcon3, { className: "w-5 h-5 text-ods-text-secondary" });
|
|
29466
29545
|
}
|
|
@@ -29528,14 +29607,10 @@ function ReleaseMediaManager({
|
|
|
29528
29607
|
children: /* @__PURE__ */ jsx226(Trash24, { className: "h-4 w-4 text-ods-text-on-dark" })
|
|
29529
29608
|
}
|
|
29530
29609
|
) }),
|
|
29531
|
-
item.media_url && /* @__PURE__ */ jsx226("div", { className: "aspect-video relative bg-ods-bg", children: item.media_type === "video" || item.media_type === "demo" ?
|
|
29532
|
-
|
|
29533
|
-
|
|
29534
|
-
|
|
29535
|
-
className: "w-full h-full object-cover",
|
|
29536
|
-
controls: true,
|
|
29537
|
-
preload: "metadata"
|
|
29538
|
-
}
|
|
29610
|
+
item.media_url && /* @__PURE__ */ jsx226("div", { className: "aspect-video relative bg-ods-bg", children: item.media_type === "video" || item.media_type === "demo" ? (
|
|
29611
|
+
// <Video> SSOT (MuxPlayer) — plays Mux HLS + MP4 alike;
|
|
29612
|
+
// fit="cover" crops to the aspect-video cell.
|
|
29613
|
+
/* @__PURE__ */ jsx226(Video2, { kind: "file", url: item.media_url, fit: "cover", className: "w-full h-full" })
|
|
29539
29614
|
) : /* @__PURE__ */ jsx226(
|
|
29540
29615
|
next_image_default,
|
|
29541
29616
|
{
|
|
@@ -30409,8 +30484,8 @@ function getCaptionsUrl(entityType, entityId, srtContent) {
|
|
|
30409
30484
|
}
|
|
30410
30485
|
|
|
30411
30486
|
// src/components/features/video-source-selector.tsx
|
|
30412
|
-
import { useState as useState69, useCallback as useCallback27
|
|
30413
|
-
import { Upload as Upload4, X as X8, Video as
|
|
30487
|
+
import { useState as useState69, useCallback as useCallback27 } from "react";
|
|
30488
|
+
import { Upload as Upload4, X as X8, Video as VideoIcon3 } from "lucide-react";
|
|
30414
30489
|
init_button2();
|
|
30415
30490
|
import { jsx as jsx235, jsxs as jsxs183 } from "react/jsx-runtime";
|
|
30416
30491
|
function VideoSourceSelector({
|
|
@@ -30430,7 +30505,6 @@ function VideoSourceSelector({
|
|
|
30430
30505
|
uploadEmptyText = 'No video uploaded yet. Click "Upload Video" to add one.',
|
|
30431
30506
|
disabled = false,
|
|
30432
30507
|
VideoPreviewComponent,
|
|
30433
|
-
resolveVideoUrl,
|
|
30434
30508
|
UploadProgressComponent,
|
|
30435
30509
|
title = "Video",
|
|
30436
30510
|
showTitle = true,
|
|
@@ -30476,7 +30550,7 @@ function VideoSourceSelector({
|
|
|
30476
30550
|
}, [onMainVideoUrlChange]);
|
|
30477
30551
|
return /* @__PURE__ */ jsxs183("div", { className: `space-y-4 p-6 bg-ods-card border border-ods-border rounded-lg ${className}`, children: [
|
|
30478
30552
|
showTitle && /* @__PURE__ */ jsxs183("h3", { className: "text-h5 text-ods-text-primary flex items-center gap-2", children: [
|
|
30479
|
-
/* @__PURE__ */ jsx235(
|
|
30553
|
+
/* @__PURE__ */ jsx235(VideoIcon3, { className: "h-5 w-5" }),
|
|
30480
30554
|
title
|
|
30481
30555
|
] }),
|
|
30482
30556
|
/* @__PURE__ */ jsxs183("div", { className: "flex gap-2", children: [
|
|
@@ -30568,50 +30642,20 @@ function VideoSourceSelector({
|
|
|
30568
30642
|
onDelete: handleDeleteVideo,
|
|
30569
30643
|
isAIGenerated
|
|
30570
30644
|
}
|
|
30571
|
-
) : (
|
|
30572
|
-
|
|
30573
|
-
|
|
30574
|
-
|
|
30575
|
-
|
|
30576
|
-
|
|
30577
|
-
|
|
30578
|
-
onDelete: handleDeleteVideo,
|
|
30579
|
-
disabled
|
|
30580
|
-
}
|
|
30581
|
-
)
|
|
30645
|
+
) : /* @__PURE__ */ jsx235(
|
|
30646
|
+
DefaultVideoPreview,
|
|
30647
|
+
{
|
|
30648
|
+
videoUrl: mainVideoUrl,
|
|
30649
|
+
onDelete: handleDeleteVideo,
|
|
30650
|
+
disabled
|
|
30651
|
+
}
|
|
30582
30652
|
) : /* @__PURE__ */ jsx235("p", { className: "text-h6 text-ods-text-secondary italic", children: uploadEmptyText })
|
|
30583
30653
|
] })
|
|
30584
30654
|
] });
|
|
30585
30655
|
}
|
|
30586
|
-
function DefaultVideoPreview({ videoUrl,
|
|
30587
|
-
const [resolvedUrl, setResolvedUrl] = useState69(
|
|
30588
|
-
resolveVideoUrl ? void 0 : videoUrl
|
|
30589
|
-
);
|
|
30590
|
-
useEffect51(() => {
|
|
30591
|
-
if (!resolveVideoUrl) {
|
|
30592
|
-
setResolvedUrl(videoUrl);
|
|
30593
|
-
return;
|
|
30594
|
-
}
|
|
30595
|
-
let active = true;
|
|
30596
|
-
setResolvedUrl(void 0);
|
|
30597
|
-
resolveVideoUrl(videoUrl).then((url) => {
|
|
30598
|
-
if (active) setResolvedUrl(url);
|
|
30599
|
-
}).catch(() => {
|
|
30600
|
-
if (active) setResolvedUrl(videoUrl);
|
|
30601
|
-
});
|
|
30602
|
-
return () => {
|
|
30603
|
-
active = false;
|
|
30604
|
-
};
|
|
30605
|
-
}, [videoUrl, resolveVideoUrl]);
|
|
30656
|
+
function DefaultVideoPreview({ videoUrl, onDelete, disabled }) {
|
|
30606
30657
|
return /* @__PURE__ */ jsxs183("div", { className: "relative rounded-lg border border-ods-border overflow-hidden", children: [
|
|
30607
|
-
|
|
30608
|
-
"video",
|
|
30609
|
-
{
|
|
30610
|
-
src: resolvedUrl,
|
|
30611
|
-
className: "w-full h-auto max-h-[300px] object-contain bg-black",
|
|
30612
|
-
controls: true
|
|
30613
|
-
}
|
|
30614
|
-
),
|
|
30658
|
+
/* @__PURE__ */ jsx235("div", { className: "w-full aspect-video max-h-[300px]", children: /* @__PURE__ */ jsx235(Video2, { kind: "file", url: videoUrl }) }),
|
|
30615
30659
|
/* @__PURE__ */ jsx235(
|
|
30616
30660
|
"button",
|
|
30617
30661
|
{
|
|
@@ -30810,7 +30854,7 @@ function TranscriptSummaryEditor({
|
|
|
30810
30854
|
|
|
30811
30855
|
// src/components/features/highlight-video-section.tsx
|
|
30812
30856
|
import { useState as useState70 } from "react";
|
|
30813
|
-
import { Sparkles as
|
|
30857
|
+
import { Sparkles as Sparkles4, Upload as Upload5 } from "lucide-react";
|
|
30814
30858
|
init_button2();
|
|
30815
30859
|
|
|
30816
30860
|
// src/components/features/ai-enrich/AIEnrichSection.tsx
|
|
@@ -30911,7 +30955,7 @@ var AIWarningsSection = ({
|
|
|
30911
30955
|
|
|
30912
30956
|
// src/components/features/ai-enrich/AIEnrichSection.tsx
|
|
30913
30957
|
init_button2();
|
|
30914
|
-
import { CheckCircle as CheckCircle2, AlertCircle, Loader2 as
|
|
30958
|
+
import { CheckCircle as CheckCircle2, AlertCircle, Loader2 as Loader27, X as X9 } from "lucide-react";
|
|
30915
30959
|
import { jsx as jsx240, jsxs as jsxs187 } from "react/jsx-runtime";
|
|
30916
30960
|
var AIEnrichSection = ({
|
|
30917
30961
|
onEnrich,
|
|
@@ -31023,7 +31067,7 @@ var AIEnrichSection = ({
|
|
|
31023
31067
|
size: "small-legacy",
|
|
31024
31068
|
onClick: onCancel,
|
|
31025
31069
|
disabled: isCancelling,
|
|
31026
|
-
leftIcon: isCancelling ? /* @__PURE__ */ jsx240(
|
|
31070
|
+
leftIcon: isCancelling ? /* @__PURE__ */ jsx240(Loader27, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx240(X9, { className: "h-4 w-4" }),
|
|
31027
31071
|
className: "!w-full",
|
|
31028
31072
|
children: isCancelling ? "Cancelling..." : "Cancel Processing"
|
|
31029
31073
|
}
|
|
@@ -31044,7 +31088,7 @@ var AIEnrichSection = ({
|
|
|
31044
31088
|
)) })
|
|
31045
31089
|
] }),
|
|
31046
31090
|
loading && statusMessage && /* @__PURE__ */ jsxs187("div", { className: "flex items-center gap-3 p-3 rounded-lg bg-ods-bg-surface", children: [
|
|
31047
|
-
/* @__PURE__ */ jsx240(
|
|
31091
|
+
/* @__PURE__ */ jsx240(Loader27, { className: "h-5 w-5 text-ods-accent animate-spin" }),
|
|
31048
31092
|
/* @__PURE__ */ jsx240("span", { className: "text-h6 text-ods-text-primary", children: statusMessage })
|
|
31049
31093
|
] }),
|
|
31050
31094
|
hasResults && /* @__PURE__ */ jsxs187("div", { className: "space-y-4", children: [
|
|
@@ -31174,7 +31218,7 @@ function HighlightVideoSection({
|
|
|
31174
31218
|
{
|
|
31175
31219
|
title: "Highlight Video",
|
|
31176
31220
|
description: `Generate a ${Math.floor(targetDurationSeconds / 60)}-minute summary video using Claude AI + Shotstack`,
|
|
31177
|
-
icon: /* @__PURE__ */ jsx241(
|
|
31221
|
+
icon: /* @__PURE__ */ jsx241(Sparkles4, { className: "h-5 w-5" }),
|
|
31178
31222
|
buttonLabel: hasExistingHighlight ? "Regenerate Highlight" : "Generate Highlight",
|
|
31179
31223
|
loadingLabel: "Generating highlight...",
|
|
31180
31224
|
onEnrich: onGenerateHighlight,
|
|
@@ -31218,17 +31262,17 @@ function HighlightVideoSection({
|
|
|
31218
31262
|
onDelete: onDeleteHighlight
|
|
31219
31263
|
}
|
|
31220
31264
|
) : (
|
|
31221
|
-
// Default simple preview
|
|
31265
|
+
// Default simple preview — the <Video> SSOT (MuxPlayer) plays
|
|
31266
|
+
// MP4 and Mux HLS alike; aspect-video box reserves the height.
|
|
31222
31267
|
/* @__PURE__ */ jsxs188("div", { className: "relative rounded-lg border border-ods-border overflow-hidden bg-black", children: [
|
|
31223
|
-
/* @__PURE__ */ jsx241(
|
|
31224
|
-
|
|
31268
|
+
/* @__PURE__ */ jsx241("div", { className: "w-full aspect-video max-h-[300px]", children: /* @__PURE__ */ jsx241(
|
|
31269
|
+
Video2,
|
|
31225
31270
|
{
|
|
31226
|
-
|
|
31227
|
-
|
|
31228
|
-
|
|
31229
|
-
controls: true
|
|
31271
|
+
kind: "file",
|
|
31272
|
+
url: highlightVideoUrl,
|
|
31273
|
+
poster: highlightVideoThumbnail || void 0
|
|
31230
31274
|
}
|
|
31231
|
-
),
|
|
31275
|
+
) }),
|
|
31232
31276
|
onDeleteHighlight && /* @__PURE__ */ jsxs188(
|
|
31233
31277
|
"button",
|
|
31234
31278
|
{
|
|
@@ -31350,7 +31394,7 @@ function EntitySummaryEditor({
|
|
|
31350
31394
|
}
|
|
31351
31395
|
|
|
31352
31396
|
// src/components/features/transcribe-summarize-section.tsx
|
|
31353
|
-
import { Sparkles as
|
|
31397
|
+
import { Sparkles as Sparkles5 } from "lucide-react";
|
|
31354
31398
|
|
|
31355
31399
|
// src/components/features/ai-enrich/AIStatusIndicator.tsx
|
|
31356
31400
|
init_cn();
|
|
@@ -31482,7 +31526,7 @@ function TranscribeSummarizeSection({
|
|
|
31482
31526
|
{
|
|
31483
31527
|
title,
|
|
31484
31528
|
description,
|
|
31485
|
-
icon: /* @__PURE__ */ jsx246(
|
|
31529
|
+
icon: /* @__PURE__ */ jsx246(Sparkles5, { className: "h-5 w-5" }),
|
|
31486
31530
|
buttonLabel: buttonLabel || defaultButtonLabel,
|
|
31487
31531
|
loadingLabel,
|
|
31488
31532
|
onEnrich: onTranscribe,
|
|
@@ -31500,7 +31544,7 @@ function TranscribeSummarizeSection({
|
|
|
31500
31544
|
}
|
|
31501
31545
|
|
|
31502
31546
|
// src/components/features/video-clips-section.tsx
|
|
31503
|
-
import { Sparkles as
|
|
31547
|
+
import { Sparkles as Sparkles6 } from "lucide-react";
|
|
31504
31548
|
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
31505
31549
|
function VideoClipsSection({
|
|
31506
31550
|
onExtractClips,
|
|
@@ -31525,7 +31569,7 @@ function VideoClipsSection({
|
|
|
31525
31569
|
{
|
|
31526
31570
|
title,
|
|
31527
31571
|
description,
|
|
31528
|
-
icon: /* @__PURE__ */ jsx247(
|
|
31572
|
+
icon: /* @__PURE__ */ jsx247(Sparkles6, { className: "h-5 w-5" }),
|
|
31529
31573
|
buttonLabel: buttonLabel || defaultButtonLabel,
|
|
31530
31574
|
loadingLabel,
|
|
31531
31575
|
onEnrich: onExtractClips,
|
|
@@ -31543,7 +31587,7 @@ function VideoClipsSection({
|
|
|
31543
31587
|
}
|
|
31544
31588
|
|
|
31545
31589
|
// src/components/features/highlight-generation-section.tsx
|
|
31546
|
-
import { Sparkles as
|
|
31590
|
+
import { Sparkles as Sparkles7 } from "lucide-react";
|
|
31547
31591
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
31548
31592
|
function HighlightGenerationSection({
|
|
31549
31593
|
onGenerateHighlight,
|
|
@@ -31570,7 +31614,7 @@ function HighlightGenerationSection({
|
|
|
31570
31614
|
{
|
|
31571
31615
|
title,
|
|
31572
31616
|
description: description || defaultDescription,
|
|
31573
|
-
icon: /* @__PURE__ */ jsx248(
|
|
31617
|
+
icon: /* @__PURE__ */ jsx248(Sparkles7, { className: "h-5 w-5" }),
|
|
31574
31618
|
buttonLabel: buttonLabel || defaultButtonLabel,
|
|
31575
31619
|
loadingLabel,
|
|
31576
31620
|
onEnrich: onGenerateHighlight,
|
|
@@ -31652,7 +31696,7 @@ function HighlightVideoPreview({
|
|
|
31652
31696
|
}
|
|
31653
31697
|
|
|
31654
31698
|
// src/components/features/transcribe-and-summarize-combined-section.tsx
|
|
31655
|
-
import { Sparkles as
|
|
31699
|
+
import { Sparkles as Sparkles9 } from "lucide-react";
|
|
31656
31700
|
import { jsx as jsx250, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
31657
31701
|
function TranscribeAndSummarizeCombinedSection({
|
|
31658
31702
|
// AIEnrichSection props
|
|
@@ -31699,7 +31743,7 @@ function TranscribeAndSummarizeCombinedSection({
|
|
|
31699
31743
|
{
|
|
31700
31744
|
title,
|
|
31701
31745
|
description,
|
|
31702
|
-
icon: /* @__PURE__ */ jsx250(
|
|
31746
|
+
icon: /* @__PURE__ */ jsx250(Sparkles9, { className: "h-5 w-5" }),
|
|
31703
31747
|
buttonLabel: buttonLabel || defaultButtonLabel,
|
|
31704
31748
|
loadingLabel,
|
|
31705
31749
|
onEnrich: onTranscribe,
|
|
@@ -31740,7 +31784,7 @@ function TranscribeAndSummarizeCombinedSection({
|
|
|
31740
31784
|
}
|
|
31741
31785
|
|
|
31742
31786
|
// src/components/features/highlight-video-combined-section.tsx
|
|
31743
|
-
import { Sparkles as
|
|
31787
|
+
import { Sparkles as Sparkles10, Upload as Upload7 } from "lucide-react";
|
|
31744
31788
|
init_button2();
|
|
31745
31789
|
import { jsx as jsx251, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
31746
31790
|
function HighlightVideoCombinedSection({
|
|
@@ -31816,7 +31860,7 @@ function HighlightVideoCombinedSection({
|
|
|
31816
31860
|
{
|
|
31817
31861
|
title,
|
|
31818
31862
|
description: description || defaultDescription,
|
|
31819
|
-
icon: /* @__PURE__ */ jsx251(
|
|
31863
|
+
icon: /* @__PURE__ */ jsx251(Sparkles10, { className: "h-5 w-5" }),
|
|
31820
31864
|
buttonLabel: buttonLabel || defaultButtonLabel,
|
|
31821
31865
|
loadingLabel,
|
|
31822
31866
|
onEnrich: onGenerateHighlight,
|
|
@@ -31939,7 +31983,7 @@ function ViewToggle({
|
|
|
31939
31983
|
|
|
31940
31984
|
// src/components/features/policy-configuration-panel.tsx
|
|
31941
31985
|
init_cn();
|
|
31942
|
-
import { useEffect as
|
|
31986
|
+
import { useEffect as useEffect51, useState as useState71 } from "react";
|
|
31943
31987
|
import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
|
|
31944
31988
|
init_button2();
|
|
31945
31989
|
import { Fragment as Fragment43, jsx as jsx253, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
@@ -32117,7 +32161,7 @@ var PolicyConfigurationPanel = ({
|
|
|
32117
32161
|
}) => {
|
|
32118
32162
|
const [expandedIds, setExpandedIds] = useState71(/* @__PURE__ */ new Set());
|
|
32119
32163
|
const [bulkLevels, setBulkLevels] = useState71({});
|
|
32120
|
-
|
|
32164
|
+
useEffect51(() => {
|
|
32121
32165
|
setBulkLevels({});
|
|
32122
32166
|
}, [editMode]);
|
|
32123
32167
|
const handleToggle = (categoryId) => {
|
|
@@ -32157,7 +32201,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
32157
32201
|
init_button2();
|
|
32158
32202
|
|
|
32159
32203
|
// src/components/ui/phone-input.tsx
|
|
32160
|
-
import { useCallback as useCallback28, useEffect as
|
|
32204
|
+
import { useCallback as useCallback28, useEffect as useEffect52, useMemo as useMemo27, useRef as useRef37, useState as useState72 } from "react";
|
|
32161
32205
|
import { jsx as jsx254, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
32162
32206
|
function PhoneInput({
|
|
32163
32207
|
value,
|
|
@@ -32191,7 +32235,7 @@ function PhoneInput({
|
|
|
32191
32235
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
32192
32236
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
32193
32237
|
}, [runValidation]);
|
|
32194
|
-
|
|
32238
|
+
useEffect52(() => {
|
|
32195
32239
|
return () => {
|
|
32196
32240
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
32197
32241
|
};
|
|
@@ -32258,7 +32302,7 @@ function CountryOption({ country }) {
|
|
|
32258
32302
|
// src/components/features/waitlist-form.tsx
|
|
32259
32303
|
init_cn();
|
|
32260
32304
|
import { getCountries as getCountries2 } from "libphonenumber-js";
|
|
32261
|
-
import { useEffect as
|
|
32305
|
+
import { useEffect as useEffect53, useState as useState73 } from "react";
|
|
32262
32306
|
import { Fragment as Fragment44, jsx as jsx255, jsxs as jsxs199 } from "react/jsx-runtime";
|
|
32263
32307
|
function WaitlistForm({
|
|
32264
32308
|
id = "waitlist-form",
|
|
@@ -32288,12 +32332,12 @@ function WaitlistForm({
|
|
|
32288
32332
|
const [isPhoneInvalid, setIsPhoneInvalid] = useState73(false);
|
|
32289
32333
|
const [showConsentError, setShowConsentError] = useState73(false);
|
|
32290
32334
|
const isMailDomainGeneric = hasGenericEmailDomain(email);
|
|
32291
|
-
|
|
32335
|
+
useEffect53(() => {
|
|
32292
32336
|
if (defaultEmail) {
|
|
32293
32337
|
setEmail(defaultEmail);
|
|
32294
32338
|
}
|
|
32295
32339
|
}, [defaultEmail]);
|
|
32296
|
-
|
|
32340
|
+
useEffect53(() => {
|
|
32297
32341
|
setIsClient(true);
|
|
32298
32342
|
if (!geoApiUrl) return;
|
|
32299
32343
|
const supportedCountries = new Set(getCountries2());
|
|
@@ -32681,7 +32725,7 @@ function useOptionalNotifications() {
|
|
|
32681
32725
|
}
|
|
32682
32726
|
|
|
32683
32727
|
// src/components/features/notifications/notification-drawer.tsx
|
|
32684
|
-
import { useEffect as
|
|
32728
|
+
import { useEffect as useEffect57, useRef as useRef40 } from "react";
|
|
32685
32729
|
|
|
32686
32730
|
// src/components/navigation/app-layout-context.ts
|
|
32687
32731
|
import { createContext as createContext8, useContext as useContext8 } from "react";
|
|
@@ -33176,7 +33220,7 @@ init_button2();
|
|
|
33176
33220
|
init_cn();
|
|
33177
33221
|
|
|
33178
33222
|
// src/components/features/notifications/notification-tile.tsx
|
|
33179
|
-
import { useMemo as useMemo29, useEffect as
|
|
33223
|
+
import { useMemo as useMemo29, useEffect as useEffect56, useState as useState76 } from "react";
|
|
33180
33224
|
init_cn();
|
|
33181
33225
|
import { jsx as jsx258, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
33182
33226
|
var variantBySeverity = {
|
|
@@ -33224,7 +33268,7 @@ function NotificationTile({
|
|
|
33224
33268
|
const initialElapsed = useMemo29(() => Date.now() - createdAt, [createdAt]);
|
|
33225
33269
|
const isLive = !read && !settled && initialElapsed < liveDurationMs;
|
|
33226
33270
|
const counting = isLive && !paused;
|
|
33227
|
-
|
|
33271
|
+
useEffect56(() => {
|
|
33228
33272
|
if (!counting) return;
|
|
33229
33273
|
const remaining = Math.max(0, liveDurationMs - initialElapsed);
|
|
33230
33274
|
const timer = window.setTimeout(() => {
|
|
@@ -33453,7 +33497,7 @@ function DrawerScrollList({
|
|
|
33453
33497
|
const sentinelRef = useRef40(null);
|
|
33454
33498
|
const loadMoreRef = useRef40(loadMore);
|
|
33455
33499
|
loadMoreRef.current = loadMore;
|
|
33456
|
-
|
|
33500
|
+
useEffect57(() => {
|
|
33457
33501
|
if (!loadMore || !hasMore || isLoadingMore) return;
|
|
33458
33502
|
const sentinel = sentinelRef.current;
|
|
33459
33503
|
const root = scrollRef.current;
|
|
@@ -33993,12 +34037,12 @@ function useOptionalTimeTracker() {
|
|
|
33993
34037
|
|
|
33994
34038
|
// src/components/features/time-tracker/time-tracker-panel.tsx
|
|
33995
34039
|
init_cn();
|
|
33996
|
-
import { useEffect as
|
|
34040
|
+
import { useEffect as useEffect59, useState as useState80 } from "react";
|
|
33997
34041
|
init_button();
|
|
33998
34042
|
init_split_button();
|
|
33999
34043
|
|
|
34000
34044
|
// src/components/features/time-tracker/use-tracker-clock.ts
|
|
34001
|
-
import { useEffect as
|
|
34045
|
+
import { useEffect as useEffect58, useState as useState79 } from "react";
|
|
34002
34046
|
function formatElapsed(totalMs) {
|
|
34003
34047
|
const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
|
|
34004
34048
|
const hours = Math.floor(totalSeconds / 3600);
|
|
@@ -34009,7 +34053,7 @@ function formatElapsed(totalMs) {
|
|
|
34009
34053
|
}
|
|
34010
34054
|
function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
|
|
34011
34055
|
const [now, setNow] = useState79(() => Date.now());
|
|
34012
|
-
|
|
34056
|
+
useEffect58(() => {
|
|
34013
34057
|
if (status !== "tracking") return;
|
|
34014
34058
|
setNow(Date.now());
|
|
34015
34059
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -34069,7 +34113,7 @@ function TimeTrackerPanel({
|
|
|
34069
34113
|
const isActive = status !== "ready";
|
|
34070
34114
|
const hasContent = selectedTicketId != null || notes.trim() !== "";
|
|
34071
34115
|
const showFieldError = isActive && showValidationError && !hasContent;
|
|
34072
|
-
|
|
34116
|
+
useEffect59(() => {
|
|
34073
34117
|
if (status === "ready") setShowValidationError(false);
|
|
34074
34118
|
}, [status]);
|
|
34075
34119
|
const handleSubmit = () => {
|
|
@@ -34320,7 +34364,7 @@ function LastEntryRow({ entry, onClick }) {
|
|
|
34320
34364
|
// src/components/features/time-tracker/time-tracker-header-button.tsx
|
|
34321
34365
|
init_cn();
|
|
34322
34366
|
import * as PopoverPrimitive5 from "@radix-ui/react-popover";
|
|
34323
|
-
import { useEffect as
|
|
34367
|
+
import { useEffect as useEffect60, useRef as useRef41 } from "react";
|
|
34324
34368
|
|
|
34325
34369
|
// src/components/navigation/header-button.tsx
|
|
34326
34370
|
init_cn();
|
|
@@ -34371,10 +34415,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
34371
34415
|
}
|
|
34372
34416
|
};
|
|
34373
34417
|
}
|
|
34374
|
-
|
|
34418
|
+
useEffect60(() => {
|
|
34375
34419
|
if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
|
|
34376
34420
|
}, [isOpen, coordination]);
|
|
34377
|
-
|
|
34421
|
+
useEffect60(() => {
|
|
34378
34422
|
if (!selfHandleRef.current) return;
|
|
34379
34423
|
return coordination?.registerDrawer(selfHandleRef.current);
|
|
34380
34424
|
}, [coordination]);
|
|
@@ -35388,7 +35432,7 @@ function SortableRow({
|
|
|
35388
35432
|
|
|
35389
35433
|
// src/components/navigation/header.tsx
|
|
35390
35434
|
init_next_link();
|
|
35391
|
-
import React108, { useEffect as
|
|
35435
|
+
import React108, { useEffect as useEffect63, useRef as useRef45, useState as useState84 } from "react";
|
|
35392
35436
|
init_button2();
|
|
35393
35437
|
|
|
35394
35438
|
// src/components/navigation/mobile-nav-panel.tsx
|
|
@@ -35562,7 +35606,7 @@ function Header2({ config, platform }) {
|
|
|
35562
35606
|
const [openDropdowns, setOpenDropdowns] = useState84({});
|
|
35563
35607
|
const dropdownRefs = useRef45({});
|
|
35564
35608
|
const triggerRefs = useRef45({});
|
|
35565
|
-
|
|
35609
|
+
useEffect63(() => {
|
|
35566
35610
|
const handleClickOutside = (event) => {
|
|
35567
35611
|
const target = event.target;
|
|
35568
35612
|
if (!target) return;
|
|
@@ -35591,14 +35635,14 @@ function Header2({ config, platform }) {
|
|
|
35591
35635
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
35592
35636
|
};
|
|
35593
35637
|
}, [openDropdowns]);
|
|
35594
|
-
|
|
35638
|
+
useEffect63(() => {
|
|
35595
35639
|
return () => {
|
|
35596
35640
|
setOpenDropdowns({});
|
|
35597
35641
|
dropdownRefs.current = {};
|
|
35598
35642
|
triggerRefs.current = {};
|
|
35599
35643
|
};
|
|
35600
35644
|
}, []);
|
|
35601
|
-
|
|
35645
|
+
useEffect63(() => {
|
|
35602
35646
|
if (!config.autoHide) {
|
|
35603
35647
|
setShow(true);
|
|
35604
35648
|
return;
|
|
@@ -35828,7 +35872,7 @@ function Header2({ config, platform }) {
|
|
|
35828
35872
|
}
|
|
35829
35873
|
|
|
35830
35874
|
// src/components/navigation/client-only-header.tsx
|
|
35831
|
-
import { useState as useState85, useEffect as
|
|
35875
|
+
import { useState as useState85, useEffect as useEffect64 } from "react";
|
|
35832
35876
|
|
|
35833
35877
|
// src/components/navigation/header-skeleton.tsx
|
|
35834
35878
|
import { jsx as jsx276, jsxs as jsxs215 } from "react/jsx-runtime";
|
|
@@ -35877,7 +35921,7 @@ function HeaderSkeleton({ config }) {
|
|
|
35877
35921
|
import { jsx as jsx277 } from "react/jsx-runtime";
|
|
35878
35922
|
function ClientOnlyHeader({ config, skeleton }) {
|
|
35879
35923
|
const [isClient, setIsClient] = useState85(false);
|
|
35880
|
-
|
|
35924
|
+
useEffect64(() => {
|
|
35881
35925
|
setIsClient(true);
|
|
35882
35926
|
}, []);
|
|
35883
35927
|
if (!isClient) {
|
|
@@ -35887,7 +35931,7 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
35887
35931
|
}
|
|
35888
35932
|
|
|
35889
35933
|
// src/components/navigation/sliding-sidebar.tsx
|
|
35890
|
-
import { useState as useState86, useEffect as
|
|
35934
|
+
import { useState as useState86, useEffect as useEffect65, useRef as useRef46 } from "react";
|
|
35891
35935
|
import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
|
|
35892
35936
|
import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
|
|
35893
35937
|
init_button2();
|
|
@@ -35900,7 +35944,7 @@ function SlidingSidebar({ config }) {
|
|
|
35900
35944
|
const prefersReducedMotion2 = useReducedMotion();
|
|
35901
35945
|
usePreventScroll4({ isDisabled: !config.isOpen });
|
|
35902
35946
|
useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
|
|
35903
|
-
|
|
35947
|
+
useEffect65(() => {
|
|
35904
35948
|
setMounted(true);
|
|
35905
35949
|
}, []);
|
|
35906
35950
|
const toggleExpanded = (itemId) => {
|
|
@@ -36068,7 +36112,7 @@ function SlidingSidebar({ config }) {
|
|
|
36068
36112
|
}
|
|
36069
36113
|
|
|
36070
36114
|
// src/components/navigation/sticky-section-nav.tsx
|
|
36071
|
-
import { useEffect as
|
|
36115
|
+
import { useEffect as useEffect66, useState as useState87, useCallback as useCallback35, useRef as useRef47 } from "react";
|
|
36072
36116
|
import { jsx as jsx279, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
36073
36117
|
function StickySectionNav({
|
|
36074
36118
|
sections,
|
|
@@ -36142,14 +36186,14 @@ function useSectionNavigation(sections, options) {
|
|
|
36142
36186
|
isScrollingFromClick.current = false;
|
|
36143
36187
|
}, 500);
|
|
36144
36188
|
}, [offset2]);
|
|
36145
|
-
|
|
36189
|
+
useEffect66(() => {
|
|
36146
36190
|
sections.forEach((section) => {
|
|
36147
36191
|
if (section.ref.current && !section.ref.current.id) {
|
|
36148
36192
|
section.ref.current.id = section.id;
|
|
36149
36193
|
}
|
|
36150
36194
|
});
|
|
36151
36195
|
}, [sections]);
|
|
36152
|
-
|
|
36196
|
+
useEffect66(() => {
|
|
36153
36197
|
const handleScroll = () => {
|
|
36154
36198
|
if (isScrollingFromClick.current) return;
|
|
36155
36199
|
const scrollPosition = window.scrollY + offset2 + 50;
|
|
@@ -36182,7 +36226,7 @@ function useSectionNavigation(sections, options) {
|
|
|
36182
36226
|
}
|
|
36183
36227
|
|
|
36184
36228
|
// src/components/navigation/navigation-sidebar.tsx
|
|
36185
|
-
import { useCallback as useCallback36, useEffect as
|
|
36229
|
+
import { useCallback as useCallback36, useEffect as useEffect67, useLayoutEffect as useLayoutEffect6, useMemo as useMemo34, useState as useState88 } from "react";
|
|
36186
36230
|
|
|
36187
36231
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
36188
36232
|
import { jsx as jsx280, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
@@ -36331,7 +36375,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
36331
36375
|
config.minimized ?? false
|
|
36332
36376
|
);
|
|
36333
36377
|
const [tabletMinimized, setTabletMinimized] = useState88(true);
|
|
36334
|
-
|
|
36378
|
+
useEffect67(() => {
|
|
36335
36379
|
if (isTablet) setTabletMinimized(true);
|
|
36336
36380
|
}, [isTablet]);
|
|
36337
36381
|
const minimized = isTablet ? tabletMinimized : desktopMinimized;
|
|
@@ -36349,7 +36393,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
36349
36393
|
const closeOverlay = useCallback36(() => {
|
|
36350
36394
|
setTabletMinimized(true);
|
|
36351
36395
|
}, []);
|
|
36352
|
-
|
|
36396
|
+
useEffect67(() => {
|
|
36353
36397
|
if (!isOverlayOpen) return;
|
|
36354
36398
|
const handleKeyDown = (e) => {
|
|
36355
36399
|
if (e.key === "Escape") closeOverlay();
|
|
@@ -38476,7 +38520,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx307(ContentLoader, { ...props, va
|
|
|
38476
38520
|
|
|
38477
38521
|
// src/components/ui/table/table.tsx
|
|
38478
38522
|
init_cn();
|
|
38479
|
-
import { useEffect as
|
|
38523
|
+
import { useEffect as useEffect69, useRef as useRef52 } from "react";
|
|
38480
38524
|
init_pagination();
|
|
38481
38525
|
init_button2();
|
|
38482
38526
|
|
|
@@ -39087,10 +39131,10 @@ function TableRow({
|
|
|
39087
39131
|
}
|
|
39088
39132
|
|
|
39089
39133
|
// src/components/ui/table/use-table-motion.ts
|
|
39090
|
-
import { useEffect as
|
|
39134
|
+
import { useEffect as useEffect68, useState as useState91 } from "react";
|
|
39091
39135
|
function useTableMotion(enabled) {
|
|
39092
39136
|
const [runtime, setRuntime] = useState91(null);
|
|
39093
|
-
|
|
39137
|
+
useEffect68(() => {
|
|
39094
39138
|
if (!enabled || runtime) return;
|
|
39095
39139
|
let active = true;
|
|
39096
39140
|
import("framer-motion").then((m) => {
|
|
@@ -39239,7 +39283,7 @@ function Table({
|
|
|
39239
39283
|
const sentinelRef = useRef52(null);
|
|
39240
39284
|
const onLoadMoreRef = useRef52(infiniteScroll?.onLoadMore);
|
|
39241
39285
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
39242
|
-
|
|
39286
|
+
useEffect69(() => {
|
|
39243
39287
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
39244
39288
|
const sentinel = sentinelRef.current;
|
|
39245
39289
|
if (!sentinel) return;
|
|
@@ -40317,7 +40361,7 @@ function DataTableBody({
|
|
|
40317
40361
|
}
|
|
40318
40362
|
|
|
40319
40363
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
40320
|
-
import { useEffect as
|
|
40364
|
+
import { useEffect as useEffect70, useRef as useRef56 } from "react";
|
|
40321
40365
|
import { Fragment as Fragment63, jsx as jsx330, jsxs as jsxs261 } from "react/jsx-runtime";
|
|
40322
40366
|
function DataTableInfiniteFooter({
|
|
40323
40367
|
hasNextPage,
|
|
@@ -40329,7 +40373,7 @@ function DataTableInfiniteFooter({
|
|
|
40329
40373
|
const sentinelRef = useRef56(null);
|
|
40330
40374
|
const onLoadMoreRef = useRef56(onLoadMore);
|
|
40331
40375
|
onLoadMoreRef.current = onLoadMore;
|
|
40332
|
-
|
|
40376
|
+
useEffect70(() => {
|
|
40333
40377
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
40334
40378
|
const sentinel = sentinelRef.current;
|
|
40335
40379
|
if (!sentinel) return;
|
|
@@ -40963,7 +41007,7 @@ function FilterList({
|
|
|
40963
41007
|
|
|
40964
41008
|
// src/components/ui/tag-search-input.tsx
|
|
40965
41009
|
import {
|
|
40966
|
-
useEffect as
|
|
41010
|
+
useEffect as useEffect72,
|
|
40967
41011
|
useRef as useRef58,
|
|
40968
41012
|
useState as useState95
|
|
40969
41013
|
} from "react";
|
|
@@ -41003,7 +41047,7 @@ function TagSearchInput({
|
|
|
41003
41047
|
const hiddenTagsRef = useRef58(null);
|
|
41004
41048
|
const hiddenTagsPopupRef = useRef58(null);
|
|
41005
41049
|
const [showHiddenTags, setShowHiddenTags] = useState95(false);
|
|
41006
|
-
|
|
41050
|
+
useEffect72(() => {
|
|
41007
41051
|
if (!showHiddenTags) return;
|
|
41008
41052
|
const handleClick = (e) => {
|
|
41009
41053
|
const target = e.target;
|
|
@@ -41158,9 +41202,9 @@ function TagSearchInput({
|
|
|
41158
41202
|
}
|
|
41159
41203
|
|
|
41160
41204
|
// src/components/ui/markdown-editor.tsx
|
|
41161
|
-
import { useRef as useRef59, useCallback as useCallback44, useState as useState96, useEffect as
|
|
41205
|
+
import { useRef as useRef59, useCallback as useCallback44, useState as useState96, useEffect as useEffect73 } from "react";
|
|
41162
41206
|
init_cn();
|
|
41163
|
-
import { Loader2 as
|
|
41207
|
+
import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
|
|
41164
41208
|
import { jsx as jsx335, jsxs as jsxs266 } from "react/jsx-runtime";
|
|
41165
41209
|
var MDEditor = dynamic(() => import("@uiw/react-md-editor"), { ssr: false });
|
|
41166
41210
|
var MARKDOWN_EDITOR_STYLE_ID = "ods-markdown-editor-styles";
|
|
@@ -41189,7 +41233,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
|
|
|
41189
41233
|
body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
|
|
41190
41234
|
`;
|
|
41191
41235
|
function MarkdownEditorStyles() {
|
|
41192
|
-
|
|
41236
|
+
useEffect73(() => {
|
|
41193
41237
|
if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
|
|
41194
41238
|
const style = document.createElement("style");
|
|
41195
41239
|
style.id = MARKDOWN_EDITOR_STYLE_ID;
|
|
@@ -41217,7 +41261,7 @@ function MarkdownEditor({
|
|
|
41217
41261
|
const [isUploading, setIsUploading] = useState96(false);
|
|
41218
41262
|
const [uploadProgress, setUploadProgress] = useState96("");
|
|
41219
41263
|
const [defaultExtraCommands, setDefaultExtraCommands] = useState96([]);
|
|
41220
|
-
|
|
41264
|
+
useEffect73(() => {
|
|
41221
41265
|
import("@uiw/react-md-editor").then((mod) => {
|
|
41222
41266
|
if (mod.commands?.getExtraCommands) {
|
|
41223
41267
|
setDefaultExtraCommands(mod.commands.getExtraCommands());
|
|
@@ -41300,7 +41344,7 @@ function MarkdownEditor({
|
|
|
41300
41344
|
name: "upload",
|
|
41301
41345
|
keyCommand: "upload",
|
|
41302
41346
|
buttonProps: { "aria-label": "Upload file", title: "Upload file" },
|
|
41303
|
-
icon: isUploading ? /* @__PURE__ */ jsx335(
|
|
41347
|
+
icon: isUploading ? /* @__PURE__ */ jsx335(Loader28, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsx335(Upload8, { className: "w-3 h-3" }),
|
|
41304
41348
|
execute: () => {
|
|
41305
41349
|
fileInputRef.current?.click();
|
|
41306
41350
|
}
|
|
@@ -41340,7 +41384,7 @@ function MarkdownEditor({
|
|
|
41340
41384
|
}
|
|
41341
41385
|
rafRef.current = requestAnimationFrame(scrollLoop);
|
|
41342
41386
|
}, []);
|
|
41343
|
-
|
|
41387
|
+
useEffect73(() => {
|
|
41344
41388
|
const wrapper = wrapperRef.current;
|
|
41345
41389
|
if (!wrapper) return;
|
|
41346
41390
|
const onMouseMove = (e) => {
|
|
@@ -41388,7 +41432,7 @@ function MarkdownEditor({
|
|
|
41388
41432
|
accept: "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.zip,.txt"
|
|
41389
41433
|
}
|
|
41390
41434
|
),
|
|
41391
|
-
!MDEditor && /* @__PURE__ */ jsx335("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx335(
|
|
41435
|
+
!MDEditor && /* @__PURE__ */ jsx335("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx335(Loader28, { className: "h-8 w-8 animate-spin" }) }),
|
|
41392
41436
|
MDEditor && /* @__PURE__ */ jsx335(
|
|
41393
41437
|
MDEditor,
|
|
41394
41438
|
{
|
|
@@ -41434,7 +41478,7 @@ function MarkdownEditor({
|
|
|
41434
41478
|
|
|
41435
41479
|
// src/components/ui/file-upload.tsx
|
|
41436
41480
|
import * as React125 from "react";
|
|
41437
|
-
import { Loader2 as
|
|
41481
|
+
import { Loader2 as Loader29 } from "lucide-react";
|
|
41438
41482
|
init_cn();
|
|
41439
41483
|
import { jsx as jsx336, jsxs as jsxs267 } from "react/jsx-runtime";
|
|
41440
41484
|
function formatFileSize2(bytes) {
|
|
@@ -41662,7 +41706,7 @@ function FileUpload({
|
|
|
41662
41706
|
/* @__PURE__ */ jsxs267("div", { className: "flex items-center gap-[var(--spacing-system-xsf)]", children: [
|
|
41663
41707
|
/* @__PURE__ */ jsx336("span", { className: "text-h6 text-ods-text-secondary", children: formatFileSize2(entry.fileSize) }),
|
|
41664
41708
|
entry.status === "uploading" && /* @__PURE__ */ jsxs267("span", { className: "flex items-center gap-[var(--spacing-system-xxs)] text-h6 text-ods-text-secondary", children: [
|
|
41665
|
-
/* @__PURE__ */ jsx336(
|
|
41709
|
+
/* @__PURE__ */ jsx336(Loader29, { className: "size-3 animate-spin" }),
|
|
41666
41710
|
"Uploading..."
|
|
41667
41711
|
] }),
|
|
41668
41712
|
entry.status === "error" && /* @__PURE__ */ jsx336("span", { className: "text-h6 text-ods-error", children: entry.error || "Upload failed" })
|
|
@@ -41750,7 +41794,7 @@ function FileUpload({
|
|
|
41750
41794
|
|
|
41751
41795
|
// src/components/ui/image-uploader.tsx
|
|
41752
41796
|
import * as React126 from "react";
|
|
41753
|
-
import { Loader2 as
|
|
41797
|
+
import { Loader2 as Loader210 } from "lucide-react";
|
|
41754
41798
|
init_cn();
|
|
41755
41799
|
import { Fragment as Fragment65, jsx as jsx337, jsxs as jsxs268 } from "react/jsx-runtime";
|
|
41756
41800
|
var DEFAULT_MAX_SIZE = 25 * 1024 * 1024;
|
|
@@ -41916,8 +41960,8 @@ function ImageUploader({
|
|
|
41916
41960
|
}
|
|
41917
41961
|
)
|
|
41918
41962
|
] }),
|
|
41919
|
-
loading && /* @__PURE__ */ jsx337("div", { className: "absolute inset-0 flex items-center justify-center rounded-md bg-ods-overlay", children: /* @__PURE__ */ jsx337(
|
|
41920
|
-
] }) : loading ? /* @__PURE__ */ jsx337(
|
|
41963
|
+
loading && /* @__PURE__ */ jsx337("div", { className: "absolute inset-0 flex items-center justify-center rounded-md bg-ods-overlay", children: /* @__PURE__ */ jsx337(Loader210, { className: "size-8 animate-spin text-ods-text-on-dark" }) })
|
|
41964
|
+
] }) : loading ? /* @__PURE__ */ jsx337(Loader210, { className: "size-8 animate-spin text-ods-accent" }) : /* @__PURE__ */ jsxs268(Fragment65, { children: [
|
|
41921
41965
|
/* @__PURE__ */ jsx337("div", { className: "flex shrink-0 items-center justify-center rounded-full border border-ods-border bg-ods-card p-[var(--spacing-system-s)]", children: /* @__PURE__ */ jsx337(ImagePlusIcon, { className: "size-6 text-ods-text-primary" }) }),
|
|
41922
41966
|
/* @__PURE__ */ jsxs268("div", { className: "flex w-full flex-col items-center text-center", children: [
|
|
41923
41967
|
/* @__PURE__ */ jsx337("p", { className: "text-h4 text-ods-text-primary", children: label }),
|
|
@@ -42823,7 +42867,7 @@ function ImageGalleryModal({
|
|
|
42823
42867
|
initialIndex = 0
|
|
42824
42868
|
}) {
|
|
42825
42869
|
const [selectedImageIndex, setSelectedImageIndex] = useState103(initialIndex);
|
|
42826
|
-
|
|
42870
|
+
useEffect76(() => {
|
|
42827
42871
|
if (isOpen) {
|
|
42828
42872
|
setSelectedImageIndex(initialIndex);
|
|
42829
42873
|
}
|
|
@@ -42838,7 +42882,7 @@ function ImageGalleryModal({
|
|
|
42838
42882
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
42839
42883
|
}
|
|
42840
42884
|
};
|
|
42841
|
-
|
|
42885
|
+
useEffect76(() => {
|
|
42842
42886
|
const handleKeyPress = (event) => {
|
|
42843
42887
|
if (!isOpen) return;
|
|
42844
42888
|
switch (event.key) {
|
|
@@ -42937,7 +42981,7 @@ function ImageGalleryModal({
|
|
|
42937
42981
|
import {
|
|
42938
42982
|
Bug,
|
|
42939
42983
|
Inbox,
|
|
42940
|
-
Sparkles as
|
|
42984
|
+
Sparkles as Sparkles11,
|
|
42941
42985
|
BookOpen as BookOpen3,
|
|
42942
42986
|
Trophy,
|
|
42943
42987
|
Component as Component4,
|
|
@@ -42957,7 +43001,7 @@ function iconFor(customItemId) {
|
|
|
42957
43001
|
case CUSTOM_ITEM_ID.REQUEST:
|
|
42958
43002
|
return Inbox;
|
|
42959
43003
|
case CUSTOM_ITEM_ID.FEATURE:
|
|
42960
|
-
return
|
|
43004
|
+
return Sparkles11;
|
|
42961
43005
|
case CUSTOM_ITEM_ID.STORY:
|
|
42962
43006
|
return BookOpen3;
|
|
42963
43007
|
case CUSTOM_ITEM_ID.EPIC:
|
|
@@ -45248,7 +45292,7 @@ function cleanEscapedString(input) {
|
|
|
45248
45292
|
|
|
45249
45293
|
// src/components/chat/entity-cards/program-card.tsx
|
|
45250
45294
|
init_button();
|
|
45251
|
-
import { ExternalLink as ExternalLink12, Clock as Clock2, Play as Play4, Video as
|
|
45295
|
+
import { ExternalLink as ExternalLink12, Clock as Clock2, Play as Play4, Video as Video5 } from "lucide-react";
|
|
45252
45296
|
init_cn();
|
|
45253
45297
|
import { Fragment as Fragment75, jsx as jsx354, jsxs as jsxs283 } from "react/jsx-runtime";
|
|
45254
45298
|
function formatUtc(date, fmt) {
|
|
@@ -45452,7 +45496,7 @@ function ProgramCard({
|
|
|
45452
45496
|
className: "object-contain",
|
|
45453
45497
|
unoptimized: true
|
|
45454
45498
|
}
|
|
45455
|
-
) : /* @__PURE__ */ jsx354("span", { className: "flex h-full w-full items-center justify-center text-ods-accent", children: config.type === "podcast" ? /* @__PURE__ */ jsx354(Play4, { className: "w-4 h-4" }) : config.type === "webinar" ? /* @__PURE__ */ jsx354(
|
|
45499
|
+
) : /* @__PURE__ */ jsx354("span", { className: "flex h-full w-full items-center justify-center text-ods-accent", children: config.type === "podcast" ? /* @__PURE__ */ jsx354(Play4, { className: "w-4 h-4" }) : config.type === "webinar" ? /* @__PURE__ */ jsx354(Video5, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx354(Clock2, { className: "w-4 h-4" }) }),
|
|
45456
45500
|
config.type === "podcast" && !isScheduled && compactCover && /* @__PURE__ */ jsx354("span", { className: "absolute inset-0 flex items-center justify-center bg-black/30", children: /* @__PURE__ */ jsx354(Play4, { className: "w-4 h-4 text-ods-text-on-dark", fill: "white" }) })
|
|
45457
45501
|
] }),
|
|
45458
45502
|
/* @__PURE__ */ jsxs283("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
@@ -45479,7 +45523,7 @@ function ProgramCard({
|
|
|
45479
45523
|
const webinarItem = item;
|
|
45480
45524
|
const duration = formatDurationFromRange(webinarItem.start_at, webinarItem.end_at);
|
|
45481
45525
|
return /* @__PURE__ */ jsxs283(Fragment75, { children: [
|
|
45482
|
-
/* @__PURE__ */ jsx354(
|
|
45526
|
+
/* @__PURE__ */ jsx354(Video5, { className: "w-4 h-4 text-ods-text-secondary" }),
|
|
45483
45527
|
/* @__PURE__ */ jsxs283("span", { className: "font-body text-ods-text-secondary", children: [
|
|
45484
45528
|
formatTimeWithTimezone(webinarItem.start_at, webinarItem.timezone ?? null),
|
|
45485
45529
|
duration && ` \xB7 ${duration}`
|
|
@@ -47191,7 +47235,7 @@ function useChunkCatchup({
|
|
|
47191
47235
|
}
|
|
47192
47236
|
|
|
47193
47237
|
// src/components/chat/hooks/use-scripted-stream.ts
|
|
47194
|
-
import { useEffect as
|
|
47238
|
+
import { useEffect as useEffect77, useState as useState106 } from "react";
|
|
47195
47239
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
47196
47240
|
function prefersReducedMotion() {
|
|
47197
47241
|
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
@@ -47204,7 +47248,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
47204
47248
|
setPrevKey(resetKey);
|
|
47205
47249
|
setIndex(0);
|
|
47206
47250
|
}
|
|
47207
|
-
|
|
47251
|
+
useEffect77(() => {
|
|
47208
47252
|
setReducedMotion(prefersReducedMotion());
|
|
47209
47253
|
const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
47210
47254
|
if (!mq) return;
|
|
@@ -47214,7 +47258,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
47214
47258
|
}, []);
|
|
47215
47259
|
const playing = enabled && !reducedMotion && frames.length > 0;
|
|
47216
47260
|
const lastIndex = Math.max(0, frames.length - 1);
|
|
47217
|
-
|
|
47261
|
+
useEffect77(() => {
|
|
47218
47262
|
if (!playing || index >= lastIndex) return;
|
|
47219
47263
|
const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
|
|
47220
47264
|
const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
|
|
@@ -47226,7 +47270,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
47226
47270
|
}
|
|
47227
47271
|
|
|
47228
47272
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
47229
|
-
import { useEffect as
|
|
47273
|
+
import { useEffect as useEffect78, useRef as useRef64, useState as useState107 } from "react";
|
|
47230
47274
|
var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
|
|
47231
47275
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
47232
47276
|
function useJetStreamDialogSubscription({
|
|
@@ -47253,49 +47297,49 @@ function useJetStreamDialogSubscription({
|
|
|
47253
47297
|
const subscriptionRef = useRef64(null);
|
|
47254
47298
|
const highestStreamSeqRef = useRef64(null);
|
|
47255
47299
|
const onEventRef = useRef64(onEvent);
|
|
47256
|
-
|
|
47300
|
+
useEffect78(() => {
|
|
47257
47301
|
onEventRef.current = onEvent;
|
|
47258
47302
|
}, [onEvent]);
|
|
47259
47303
|
const onConnectRef = useRef64(onConnect);
|
|
47260
|
-
|
|
47304
|
+
useEffect78(() => {
|
|
47261
47305
|
onConnectRef.current = onConnect;
|
|
47262
47306
|
}, [onConnect]);
|
|
47263
47307
|
const onDisconnectRef = useRef64(onDisconnect);
|
|
47264
|
-
|
|
47308
|
+
useEffect78(() => {
|
|
47265
47309
|
onDisconnectRef.current = onDisconnect;
|
|
47266
47310
|
}, [onDisconnect]);
|
|
47267
47311
|
const onSubscribedRef = useRef64(onSubscribed);
|
|
47268
|
-
|
|
47312
|
+
useEffect78(() => {
|
|
47269
47313
|
onSubscribedRef.current = onSubscribed;
|
|
47270
47314
|
}, [onSubscribed]);
|
|
47271
47315
|
const onBeforeReconnectRef = useRef64(onBeforeReconnect);
|
|
47272
|
-
|
|
47316
|
+
useEffect78(() => {
|
|
47273
47317
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
47274
47318
|
}, [onBeforeReconnect]);
|
|
47275
47319
|
const getNatsWsUrlRef = useRef64(getNatsWsUrl);
|
|
47276
|
-
|
|
47320
|
+
useEffect78(() => {
|
|
47277
47321
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
47278
47322
|
}, [getNatsWsUrl]);
|
|
47279
47323
|
const reconnectionBackoffRef = useRef64(reconnectionBackoff);
|
|
47280
|
-
|
|
47324
|
+
useEffect78(() => {
|
|
47281
47325
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
47282
47326
|
}, [reconnectionBackoff]);
|
|
47283
47327
|
const optStartSeqRef = useRef64(optStartSeq);
|
|
47284
|
-
|
|
47328
|
+
useEffect78(() => {
|
|
47285
47329
|
optStartSeqRef.current = optStartSeq;
|
|
47286
47330
|
}, [optStartSeq]);
|
|
47287
47331
|
const inactiveThresholdRef = useRef64(inactiveThresholdMs);
|
|
47288
|
-
|
|
47332
|
+
useEffect78(() => {
|
|
47289
47333
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
47290
47334
|
}, [inactiveThresholdMs]);
|
|
47291
47335
|
const hadConnectionBeforeRef = useRef64(false);
|
|
47292
47336
|
const clientConfigRef = useRef64(clientConfig);
|
|
47293
|
-
|
|
47337
|
+
useEffect78(() => {
|
|
47294
47338
|
clientConfigRef.current = clientConfig;
|
|
47295
47339
|
}, [clientConfig]);
|
|
47296
47340
|
const currentWsUrlRef = useRef64("");
|
|
47297
47341
|
const wsUrl = getNatsWsUrl();
|
|
47298
|
-
|
|
47342
|
+
useEffect78(() => {
|
|
47299
47343
|
if (!enabled || !wsUrl) {
|
|
47300
47344
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
47301
47345
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -47376,11 +47420,11 @@ function useJetStreamDialogSubscription({
|
|
|
47376
47420
|
}
|
|
47377
47421
|
};
|
|
47378
47422
|
}, [enabled, wsUrl]);
|
|
47379
|
-
|
|
47423
|
+
useEffect78(() => {
|
|
47380
47424
|
highestStreamSeqRef.current = null;
|
|
47381
47425
|
setCurrentStreamSeq(null);
|
|
47382
47426
|
}, [dialogId]);
|
|
47383
|
-
|
|
47427
|
+
useEffect78(() => {
|
|
47384
47428
|
if (!enabled || !dialogId || !isConnected) {
|
|
47385
47429
|
if (subscriptionRef.current) {
|
|
47386
47430
|
try {
|
|
@@ -47467,7 +47511,7 @@ function useJetStreamDialogSubscription({
|
|
|
47467
47511
|
}
|
|
47468
47512
|
|
|
47469
47513
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
47470
|
-
import { useEffect as
|
|
47514
|
+
import { useEffect as useEffect79, useRef as useRef65, useState as useState108 } from "react";
|
|
47471
47515
|
function useNatsDialogSubscription({
|
|
47472
47516
|
enabled,
|
|
47473
47517
|
dialogId,
|
|
@@ -47487,41 +47531,41 @@ function useNatsDialogSubscription({
|
|
|
47487
47531
|
const clientRef = useRef65(null);
|
|
47488
47532
|
const subscriptionRefs = useRef65(/* @__PURE__ */ new Map());
|
|
47489
47533
|
const onEventRef = useRef65(onEvent);
|
|
47490
|
-
|
|
47534
|
+
useEffect79(() => {
|
|
47491
47535
|
onEventRef.current = onEvent;
|
|
47492
47536
|
}, [onEvent]);
|
|
47493
47537
|
const onConnectRef = useRef65(onConnect);
|
|
47494
|
-
|
|
47538
|
+
useEffect79(() => {
|
|
47495
47539
|
onConnectRef.current = onConnect;
|
|
47496
47540
|
}, [onConnect]);
|
|
47497
47541
|
const onDisconnectRef = useRef65(onDisconnect);
|
|
47498
|
-
|
|
47542
|
+
useEffect79(() => {
|
|
47499
47543
|
onDisconnectRef.current = onDisconnect;
|
|
47500
47544
|
}, [onDisconnect]);
|
|
47501
47545
|
const onSubscribedRef = useRef65(onSubscribed);
|
|
47502
|
-
|
|
47546
|
+
useEffect79(() => {
|
|
47503
47547
|
onSubscribedRef.current = onSubscribed;
|
|
47504
47548
|
}, [onSubscribed]);
|
|
47505
47549
|
const onBeforeReconnectRef = useRef65(onBeforeReconnect);
|
|
47506
|
-
|
|
47550
|
+
useEffect79(() => {
|
|
47507
47551
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
47508
47552
|
}, [onBeforeReconnect]);
|
|
47509
47553
|
const hadConnectionBeforeRef = useRef65(false);
|
|
47510
47554
|
const getNatsWsUrlRef = useRef65(getNatsWsUrl);
|
|
47511
|
-
|
|
47555
|
+
useEffect79(() => {
|
|
47512
47556
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
47513
47557
|
}, [getNatsWsUrl]);
|
|
47514
47558
|
const reconnectionBackoffRef = useRef65(reconnectionBackoff);
|
|
47515
|
-
|
|
47559
|
+
useEffect79(() => {
|
|
47516
47560
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
47517
47561
|
}, [reconnectionBackoff]);
|
|
47518
47562
|
const clientConfigRef = useRef65(clientConfig);
|
|
47519
|
-
|
|
47563
|
+
useEffect79(() => {
|
|
47520
47564
|
clientConfigRef.current = clientConfig;
|
|
47521
47565
|
}, [clientConfig]);
|
|
47522
47566
|
const currentWsUrlRef = useRef65("");
|
|
47523
47567
|
const wsUrl = getNatsWsUrl();
|
|
47524
|
-
|
|
47568
|
+
useEffect79(() => {
|
|
47525
47569
|
if (!enabled || !wsUrl) {
|
|
47526
47570
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
47527
47571
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -47607,12 +47651,12 @@ function useNatsDialogSubscription({
|
|
|
47607
47651
|
topicsRef.current = topics;
|
|
47608
47652
|
const lastSubscribedDialogIdRef = useRef65(null);
|
|
47609
47653
|
const isConnectedRef = useRef65(isConnected);
|
|
47610
|
-
|
|
47654
|
+
useEffect79(() => {
|
|
47611
47655
|
isConnectedRef.current = isConnected;
|
|
47612
47656
|
}, [isConnected]);
|
|
47613
47657
|
const currentDialogIdRef = useRef65(null);
|
|
47614
47658
|
const abortControllerRef = useRef65(null);
|
|
47615
|
-
|
|
47659
|
+
useEffect79(() => {
|
|
47616
47660
|
currentDialogIdRef.current = dialogId;
|
|
47617
47661
|
if (!enabled || !dialogId) {
|
|
47618
47662
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -47693,7 +47737,7 @@ function useNatsDialogSubscription({
|
|
|
47693
47737
|
abortControllerRef.current = null;
|
|
47694
47738
|
};
|
|
47695
47739
|
}, [enabled, dialogId, topicsKey]);
|
|
47696
|
-
|
|
47740
|
+
useEffect79(() => {
|
|
47697
47741
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
47698
47742
|
return;
|
|
47699
47743
|
}
|
|
@@ -47743,7 +47787,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
47743
47787
|
}
|
|
47744
47788
|
|
|
47745
47789
|
// src/components/chat/hooks/use-realtime-chunk-processor.ts
|
|
47746
|
-
import { useCallback as useCallback47, useRef as useRef66, useEffect as
|
|
47790
|
+
import { useCallback as useCallback47, useRef as useRef66, useEffect as useEffect80 } from "react";
|
|
47747
47791
|
|
|
47748
47792
|
// src/components/chat/utils/chunk-parser.ts
|
|
47749
47793
|
function normalizeToolCalls(raw) {
|
|
@@ -48405,7 +48449,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48405
48449
|
})
|
|
48406
48450
|
);
|
|
48407
48451
|
const hasInitializedWithData = useRef66(false);
|
|
48408
|
-
|
|
48452
|
+
useEffect80(() => {
|
|
48409
48453
|
if (initialState && !hasInitializedWithData.current) {
|
|
48410
48454
|
accumulatorRef.current.initializeWithState(initialState);
|
|
48411
48455
|
if (initialState.escalatedApprovals) {
|
|
@@ -48423,7 +48467,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48423
48467
|
const directModeFlagRef = useRef66(isDirectMode);
|
|
48424
48468
|
const sawDirectMessageRef = useRef66(false);
|
|
48425
48469
|
const directTeardownFiredRef = useRef66(false);
|
|
48426
|
-
|
|
48470
|
+
useEffect80(() => {
|
|
48427
48471
|
directModeFlagRef.current = isDirectMode;
|
|
48428
48472
|
}, [isDirectMode]);
|
|
48429
48473
|
const pendingEscalatedRef = useRef66(/* @__PURE__ */ new Map());
|
|
@@ -48702,7 +48746,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48702
48746
|
}
|
|
48703
48747
|
|
|
48704
48748
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
48705
|
-
import { useEffect as
|
|
48749
|
+
import { useEffect as useEffect81, useState as useState109 } from "react";
|
|
48706
48750
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
48707
48751
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
48708
48752
|
try {
|
|
@@ -48721,7 +48765,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
48721
48765
|
function useSlashCommands(prefix, commandsUrl) {
|
|
48722
48766
|
const [commands, setCommands] = useState109([]);
|
|
48723
48767
|
const [loading, setLoading] = useState109(false);
|
|
48724
|
-
|
|
48768
|
+
useEffect81(() => {
|
|
48725
48769
|
if (prefix == null) {
|
|
48726
48770
|
setCommands([]);
|
|
48727
48771
|
return;
|
|
@@ -49070,7 +49114,7 @@ function useChatAttachments() {
|
|
|
49070
49114
|
}
|
|
49071
49115
|
|
|
49072
49116
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
49073
|
-
import { useCallback as useCallback49, useEffect as
|
|
49117
|
+
import { useCallback as useCallback49, useEffect as useEffect82, useRef as useRef68, useState as useState111 } from "react";
|
|
49074
49118
|
import { jsx as jsx359 } from "react/jsx-runtime";
|
|
49075
49119
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
49076
49120
|
function useChatAttachmentImageGallery() {
|
|
@@ -49079,7 +49123,7 @@ function useChatAttachmentImageGallery() {
|
|
|
49079
49123
|
const panelRef = useRef68(null);
|
|
49080
49124
|
const [state, setState] = useState111(CLOSED);
|
|
49081
49125
|
const handleClose = useCallback49(() => setState(CLOSED), []);
|
|
49082
|
-
|
|
49126
|
+
useEffect82(() => {
|
|
49083
49127
|
const root = panelRef.current;
|
|
49084
49128
|
if (!root) return;
|
|
49085
49129
|
const onClick = (ev) => {
|
|
@@ -49125,7 +49169,7 @@ function absolutize(prefix) {
|
|
|
49125
49169
|
}
|
|
49126
49170
|
|
|
49127
49171
|
// src/components/chat/hooks/use-chat-identity.ts
|
|
49128
|
-
import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as
|
|
49172
|
+
import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect83, useState as useState112 } from "react";
|
|
49129
49173
|
var ANON_DEFAULTS = {
|
|
49130
49174
|
authTier: "anon",
|
|
49131
49175
|
source: null,
|
|
@@ -49138,7 +49182,7 @@ function useResolveChatIdentity(enabled) {
|
|
|
49138
49182
|
const proxyEmail = getEmbedProxyAuth()?.email ?? null;
|
|
49139
49183
|
const [data, setData] = useState112(ANON_DEFAULTS);
|
|
49140
49184
|
const [isLoading, setIsLoading] = useState112(enabled);
|
|
49141
|
-
|
|
49185
|
+
useEffect83(() => {
|
|
49142
49186
|
if (!enabled) return;
|
|
49143
49187
|
let cancelled = false;
|
|
49144
49188
|
const ctrl = new AbortController();
|
|
@@ -49180,11 +49224,11 @@ function useChatIdentity() {
|
|
|
49180
49224
|
}
|
|
49181
49225
|
|
|
49182
49226
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
49183
|
-
import { useEffect as
|
|
49227
|
+
import { useEffect as useEffect84, useRef as useRef69 } from "react";
|
|
49184
49228
|
function useCloseOnNavigation(close, pathname) {
|
|
49185
49229
|
const prevPathnameRef = useRef69(null);
|
|
49186
49230
|
const initializedRef = useRef69(false);
|
|
49187
|
-
|
|
49231
|
+
useEffect84(() => {
|
|
49188
49232
|
if (!initializedRef.current) {
|
|
49189
49233
|
initializedRef.current = true;
|
|
49190
49234
|
prevPathnameRef.current = pathname;
|
|
@@ -49198,7 +49242,7 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
49198
49242
|
}
|
|
49199
49243
|
|
|
49200
49244
|
// src/components/chat/hooks/use-chat.ts
|
|
49201
|
-
import { useState as useState114, useCallback as useCallback51, useEffect as
|
|
49245
|
+
import { useState as useState114, useCallback as useCallback51, useEffect as useEffect85, useRef as useRef71 } from "react";
|
|
49202
49246
|
|
|
49203
49247
|
// src/components/chat/hooks/use-sse.ts
|
|
49204
49248
|
import { useState as useState113, useCallback as useCallback50, useRef as useRef70 } from "react";
|
|
@@ -49276,7 +49320,7 @@ function useChat({
|
|
|
49276
49320
|
const currentAssistantSegmentsRef = useRef71([]);
|
|
49277
49321
|
const onMessagesChangeRef = useRef71(onMessagesChange);
|
|
49278
49322
|
onMessagesChangeRef.current = onMessagesChange;
|
|
49279
|
-
|
|
49323
|
+
useEffect85(() => {
|
|
49280
49324
|
onMessagesChangeRef.current?.(messages);
|
|
49281
49325
|
}, [messages]);
|
|
49282
49326
|
const {
|
|
@@ -49565,7 +49609,7 @@ function useChat({
|
|
|
49565
49609
|
}
|
|
49566
49610
|
|
|
49567
49611
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
49568
|
-
import { useState as useState115, useEffect as
|
|
49612
|
+
import { useState as useState115, useEffect as useEffect86, useCallback as useCallback52, useMemo as useMemo42, useRef as useRef72 } from "react";
|
|
49569
49613
|
function createEmptyTurnMeta() {
|
|
49570
49614
|
return {
|
|
49571
49615
|
provider: null,
|
|
@@ -50089,7 +50133,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
50089
50133
|
}
|
|
50090
50134
|
}
|
|
50091
50135
|
}, [chatClearMessages, source, bumpMetaTick]);
|
|
50092
|
-
|
|
50136
|
+
useEffect86(() => {
|
|
50093
50137
|
if (!isTyping && !isStreaming && streamingPhase !== "idle") {
|
|
50094
50138
|
setStreamingPhase("idle");
|
|
50095
50139
|
}
|
|
@@ -50171,7 +50215,7 @@ var noopRejectRequest = async (_id, _reason) => {
|
|
|
50171
50215
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
50172
50216
|
import {
|
|
50173
50217
|
useCallback as useCallback53,
|
|
50174
|
-
useEffect as
|
|
50218
|
+
useEffect as useEffect87,
|
|
50175
50219
|
useMemo as useMemo43,
|
|
50176
50220
|
useRef as useRef73,
|
|
50177
50221
|
useState as useState116
|
|
@@ -51211,7 +51255,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
51211
51255
|
]
|
|
51212
51256
|
);
|
|
51213
51257
|
const prevDialogIdRef = useRef73(void 0);
|
|
51214
|
-
|
|
51258
|
+
useEffect87(() => {
|
|
51215
51259
|
if (prevDialogIdRef.current === dialogId) return;
|
|
51216
51260
|
prevDialogIdRef.current = dialogId;
|
|
51217
51261
|
historyLoadSeqRef.current += 1;
|
|
@@ -51228,7 +51272,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
51228
51272
|
if (!active || !dialogId) return;
|
|
51229
51273
|
void loadDialogHistory(dialogId);
|
|
51230
51274
|
}, [active, dialogId, loadDialogHistory, resetAccumulator]);
|
|
51231
|
-
|
|
51275
|
+
useEffect87(() => {
|
|
51232
51276
|
if (!active || !dialogId) return;
|
|
51233
51277
|
suppressAgentBusyRef.current += 1;
|
|
51234
51278
|
resetChunkTracking();
|
|
@@ -51280,7 +51324,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
51280
51324
|
})();
|
|
51281
51325
|
}
|
|
51282
51326
|
});
|
|
51283
|
-
|
|
51327
|
+
useEffect87(() => {
|
|
51284
51328
|
if (!active || !dialogId) {
|
|
51285
51329
|
setConnectionState("connected");
|
|
51286
51330
|
return;
|
|
@@ -51319,7 +51363,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
51319
51363
|
const reloadDialogs = useCallback53(() => {
|
|
51320
51364
|
void loadDialogsPage();
|
|
51321
51365
|
}, [loadDialogsPage]);
|
|
51322
|
-
|
|
51366
|
+
useEffect87(() => {
|
|
51323
51367
|
if (!fetchDialogs) return;
|
|
51324
51368
|
if (!active) return;
|
|
51325
51369
|
if (initialDialogsLoadedRef.current) return;
|
|
@@ -51901,7 +51945,7 @@ function buildStreamFrames(messages) {
|
|
|
51901
51945
|
|
|
51902
51946
|
// src/components/chat/embeddable-chat.tsx
|
|
51903
51947
|
init_cn();
|
|
51904
|
-
import { useCallback as useCallback56, useEffect as
|
|
51948
|
+
import { useCallback as useCallback56, useEffect as useEffect88, useMemo as useMemo46, useRef as useRef76, useState as useState118 } from "react";
|
|
51905
51949
|
import * as DialogPrimitive4 from "@radix-ui/react-dialog";
|
|
51906
51950
|
import { usePreventScroll as usePreventScroll6 } from "@react-aria/overlays";
|
|
51907
51951
|
import { isIOS } from "@react-aria/utils";
|
|
@@ -52173,7 +52217,7 @@ var RAIL_ANIM_MS = 320;
|
|
|
52173
52217
|
function useRailPresence(open) {
|
|
52174
52218
|
const [mounted, setMounted] = useState118(open);
|
|
52175
52219
|
const [active, setActive] = useState118(false);
|
|
52176
|
-
|
|
52220
|
+
useEffect88(() => {
|
|
52177
52221
|
if (open) {
|
|
52178
52222
|
setMounted(true);
|
|
52179
52223
|
let raf2 = 0;
|
|
@@ -52498,7 +52542,7 @@ function EmbeddableChatInner({
|
|
|
52498
52542
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
52499
52543
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
52500
52544
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
52501
|
-
|
|
52545
|
+
useEffect88(() => {
|
|
52502
52546
|
if (process.env.NODE_ENV !== "production") {
|
|
52503
52547
|
const hasOpen = open !== void 0;
|
|
52504
52548
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -52520,7 +52564,7 @@ function EmbeddableChatInner({
|
|
|
52520
52564
|
});
|
|
52521
52565
|
usePreventScroll6({ isDisabled: !isOpen || shellLess });
|
|
52522
52566
|
const navigatingAwayRef = useRef76(false);
|
|
52523
|
-
|
|
52567
|
+
useEffect88(() => {
|
|
52524
52568
|
if (!isOpen) return;
|
|
52525
52569
|
if (shellLess) return;
|
|
52526
52570
|
if (typeof window === "undefined") return;
|
|
@@ -52651,7 +52695,7 @@ function EmbeddableChatInner({
|
|
|
52651
52695
|
loadMoreMessages
|
|
52652
52696
|
} = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
|
|
52653
52697
|
const guidePromptSentRef = useRef76(false);
|
|
52654
|
-
|
|
52698
|
+
useEffect88(() => {
|
|
52655
52699
|
if (!guidePendingPrompt) {
|
|
52656
52700
|
guidePromptSentRef.current = false;
|
|
52657
52701
|
return;
|
|
@@ -52676,11 +52720,11 @@ function EmbeddableChatInner({
|
|
|
52676
52720
|
const [contextPickerOpen, setContextPickerOpen] = useState118(false);
|
|
52677
52721
|
const [mentionQuery, setMentionQuery] = useState118(null);
|
|
52678
52722
|
const mentionActiveRef = useRef76(false);
|
|
52679
|
-
|
|
52723
|
+
useEffect88(() => {
|
|
52680
52724
|
mentionActiveRef.current = mentionQuery !== null;
|
|
52681
52725
|
}, [mentionQuery]);
|
|
52682
52726
|
const mentionKeysRef = useRef76(/* @__PURE__ */ new Set());
|
|
52683
|
-
|
|
52727
|
+
useEffect88(() => {
|
|
52684
52728
|
setContextItems([]);
|
|
52685
52729
|
setMentionQuery(null);
|
|
52686
52730
|
mentionKeysRef.current.clear();
|
|
@@ -52903,7 +52947,7 @@ function EmbeddableChatInner({
|
|
|
52903
52947
|
});
|
|
52904
52948
|
const handleOpen = useCallback56(() => setIsOpen(true), [setIsOpen]);
|
|
52905
52949
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
52906
|
-
|
|
52950
|
+
useEffect88(() => {
|
|
52907
52951
|
const handler = (e) => {
|
|
52908
52952
|
const detail = e.detail;
|
|
52909
52953
|
if (!detail || detail.source !== source) return;
|
|
@@ -52913,7 +52957,7 @@ function EmbeddableChatInner({
|
|
|
52913
52957
|
window.addEventListener("ask-ai:open-with-ref", handler);
|
|
52914
52958
|
return () => window.removeEventListener("ask-ai:open-with-ref", handler);
|
|
52915
52959
|
}, [source, discussRef, setIsOpen]);
|
|
52916
|
-
|
|
52960
|
+
useEffect88(() => {
|
|
52917
52961
|
const handler = (e) => {
|
|
52918
52962
|
const detail = e.detail;
|
|
52919
52963
|
if (!detail || detail.source !== source) return;
|
|
@@ -52930,7 +52974,7 @@ function EmbeddableChatInner({
|
|
|
52930
52974
|
const contentViewKey = hasConversation ? "conversation" : activeMode;
|
|
52931
52975
|
const isGuideEmpty = !hasConversation && activeMode === "guide";
|
|
52932
52976
|
const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
|
|
52933
|
-
|
|
52977
|
+
useEffect88(() => {
|
|
52934
52978
|
if (!isQuickActionEmpty) setQuickActionPreview(null);
|
|
52935
52979
|
}, [isQuickActionEmpty]);
|
|
52936
52980
|
const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
|
|
@@ -52975,7 +53019,7 @@ function EmbeddableChatInner({
|
|
|
52975
53019
|
const [portalHost, setPortalHost] = useState118(null);
|
|
52976
53020
|
const [panelWidth, setPanelWidth] = useState118(0);
|
|
52977
53021
|
const panelMeasureRef = useRef76(null);
|
|
52978
|
-
|
|
53022
|
+
useEffect88(() => {
|
|
52979
53023
|
const el = panelMeasureRef.current;
|
|
52980
53024
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
52981
53025
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -52987,7 +53031,7 @@ function EmbeddableChatInner({
|
|
|
52987
53031
|
return () => ro.disconnect();
|
|
52988
53032
|
}, []);
|
|
52989
53033
|
const [railCollapsed, setRailCollapsed] = useState118(false);
|
|
52990
|
-
|
|
53034
|
+
useEffect88(() => {
|
|
52991
53035
|
try {
|
|
52992
53036
|
if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
|
|
52993
53037
|
setRailCollapsed(true);
|
|
@@ -53012,7 +53056,7 @@ function EmbeddableChatInner({
|
|
|
53012
53056
|
const railPresence = useRailPresence(splitActive);
|
|
53013
53057
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
53014
53058
|
const [composeOpen, setComposeOpen] = useState118(false);
|
|
53015
|
-
|
|
53059
|
+
useEffect88(() => {
|
|
53016
53060
|
if (hasConversation) setComposeOpen(false);
|
|
53017
53061
|
}, [hasConversation]);
|
|
53018
53062
|
const isMingoMode = activeMode === "mingo";
|
|
@@ -53760,6 +53804,11 @@ export {
|
|
|
53760
53804
|
VideoPlayBadge,
|
|
53761
53805
|
VideoUnmuteGlyph,
|
|
53762
53806
|
fetchPriorityProp,
|
|
53807
|
+
MUX_STREAM_ORIGIN,
|
|
53808
|
+
MUX_IMAGE_ORIGIN,
|
|
53809
|
+
saveDataEnabled,
|
|
53810
|
+
useVideoOriginPreconnect,
|
|
53811
|
+
useVideoWarmup,
|
|
53763
53812
|
extractYouTubeId,
|
|
53764
53813
|
Video2 as Video,
|
|
53765
53814
|
MediaCarousel,
|
|
@@ -53947,10 +53996,6 @@ export {
|
|
|
53947
53996
|
getProxiedImageUrl2,
|
|
53948
53997
|
WhatIShippedCard,
|
|
53949
53998
|
WhatIShippedCardSkeleton,
|
|
53950
|
-
MUX_STREAM_ORIGIN,
|
|
53951
|
-
MUX_IMAGE_ORIGIN,
|
|
53952
|
-
useVideoOriginPreconnect,
|
|
53953
|
-
useVideoWarmup,
|
|
53954
53999
|
RATIO_GRID_CLASS,
|
|
53955
54000
|
RATIO_TO_CSS_ASPECT,
|
|
53956
54001
|
RatioTabs,
|
|
@@ -54519,4 +54564,4 @@ export {
|
|
|
54519
54564
|
LogsList,
|
|
54520
54565
|
assets
|
|
54521
54566
|
};
|
|
54522
|
-
//# sourceMappingURL=chunk-
|
|
54567
|
+
//# sourceMappingURL=chunk-YCSNDUDE.js.map
|