@factorialco/f0-react 6.88.3 → 6.88.5
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/{ChatPdfThumbnail-DdrOp7Rm.js → ChatPdfThumbnail-DTUuStMh.js} +1 -1
- package/dist/{CoachmarkProvider-CoPINK6_.js → CoachmarkProvider-FhruFtJe.js} +2701 -2711
- package/dist/{DocumentToolbar-p4qZSVUD.js → DocumentToolbar-DUvkpuLz.js} +29 -29
- package/dist/{DocxViewer-_Z59Wr2S.js → DocxViewer-CcY7eUEM.js} +10 -10
- package/dist/{F0AiProcessingOverlay-CwJG6TgU.js → F0AiProcessingOverlay-ByIJjCN4.js} +408 -402
- package/dist/{F0CanvasPanel-CpgOQnbI.js → F0CanvasPanel-VDUWMSmw.js} +1426 -1416
- package/dist/{F0VideoPlayer-CXAjfSnS.js → F0VideoPlayer-CxWjT4fA.js} +143 -139
- package/dist/{LocationMap-Bp7gglCx.js → LocationMap-D6lqT6Gn.js} +1 -1
- package/dist/{SheetViewer-DSbC_CR2.js → SheetViewer-CrvzW594.js} +12 -12
- package/dist/{TextViewer-BkgAiijZ.js → TextViewer-GmdvBh9P.js} +2 -2
- package/dist/ai.d.ts +9 -9
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +9 -9
- package/dist/component-status.js +72 -70
- package/dist/{experimental-Crt7EEav.js → experimental-CLNsFHrX.js} +583 -569
- package/dist/experimental.d.ts +9 -9
- package/dist/experimental.js +3 -3
- package/dist/f0.d.ts +9 -9
- package/dist/f0.js +396 -388
- package/dist/i18n-provider-defaults.d.ts +9 -9
- package/dist/index-DJGcz9TP.js +4 -0
- package/dist/{index-BP9845Kl.js → index-DfeNTo6-.js} +49 -49
- package/dist/{pdfWorker-wHv_aPH2.js → pdfWorker-38_nmvOc.js} +2 -2
- package/package.json +2 -1
- package/dist/index-uG8opRj1.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u as W, t as je, v as Ge, m as $, x as Xe, y as Ze, z as qe, A as Ye, B as Je, E as Qe, G as et, H as tt, J as nt, K as rt, L as at, M as ot, N as ye, O as st, Q as Ce, l as it, R as ct, U as lt, V as
|
|
1
|
+
import { u as W, t as je, v as Ge, m as $, x as Xe, y as Ze, z as qe, A as Ye, B as Je, E as Qe, G as et, H as tt, J as nt, K as rt, L as at, M as ot, N as ye, O as st, Q as Ce, l as it, R as ct, U as lt, V as ut, w as dt, r as ft } from "./F0CanvasPanel-VDUWMSmw.js";
|
|
2
2
|
import { jsxs as S, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as re, useId as mt, useState as x, useRef as F, useEffect as N, useMemo as J, useCallback as T } from "react";
|
|
4
|
-
import { d as H, f as
|
|
4
|
+
import { d as H, f as ue } from "./tooltip-CMBdJvJA.js";
|
|
5
5
|
import { F as pt, a as Pe, b as ht, c as gt } from "./VolumeMuted-DKLKhxyd.js";
|
|
6
6
|
function Se(e) {
|
|
7
7
|
return Array.isArray(e) && e.every(
|
|
@@ -37,7 +37,7 @@ function Le(e, t) {
|
|
|
37
37
|
function Z(e, t) {
|
|
38
38
|
if (e.length === 0)
|
|
39
39
|
return;
|
|
40
|
-
const a = e.map((r) => r.locale), n = (r) => r.split("-")[0], o = (r) => a.find((
|
|
40
|
+
const a = e.map((r) => r.locale), n = (r) => r.split("-")[0], o = (r) => a.find((d) => d === r) ?? a.find((d) => n(d) === n(r));
|
|
41
41
|
if (t) {
|
|
42
42
|
const r = o(t);
|
|
43
43
|
if (r)
|
|
@@ -72,7 +72,7 @@ const De = {
|
|
|
72
72
|
fontWeight: 700,
|
|
73
73
|
fontFamily: "inherit",
|
|
74
74
|
letterSpacing: -0.4
|
|
75
|
-
},
|
|
75
|
+
}, de = re(({ animate: e, ...t }, a) => /* @__PURE__ */ S(
|
|
76
76
|
"svg",
|
|
77
77
|
{
|
|
78
78
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -98,7 +98,7 @@ const De = {
|
|
|
98
98
|
]
|
|
99
99
|
}
|
|
100
100
|
));
|
|
101
|
-
|
|
101
|
+
de.displayName = "AudioDescriptionLineIcon";
|
|
102
102
|
const Te = re(({ animate: e, ...t }, a) => {
|
|
103
103
|
const n = `ad-mask-${mt().replace(/:/g, "")}`;
|
|
104
104
|
return /* @__PURE__ */ S(
|
|
@@ -205,33 +205,33 @@ function Et({
|
|
|
205
205
|
onChange: t,
|
|
206
206
|
containerRef: a
|
|
207
207
|
}) {
|
|
208
|
-
const { t: n } = W(), [o, s] = x(!1), r = (
|
|
209
|
-
const
|
|
210
|
-
|
|
208
|
+
const { t: n } = W(), [o, s] = x(!1), r = (d) => {
|
|
209
|
+
const u = Array.from(
|
|
210
|
+
d.currentTarget.querySelectorAll(
|
|
211
211
|
'[role="menuitemradio"]'
|
|
212
212
|
)
|
|
213
213
|
);
|
|
214
|
-
if (
|
|
214
|
+
if (u.length === 0)
|
|
215
215
|
return;
|
|
216
|
-
const m =
|
|
216
|
+
const m = u.indexOf(document.activeElement);
|
|
217
217
|
let g;
|
|
218
|
-
switch (
|
|
218
|
+
switch (d.key) {
|
|
219
219
|
case "ArrowDown":
|
|
220
|
-
g = m < 0 ? 0 : (m + 1) %
|
|
220
|
+
g = m < 0 ? 0 : (m + 1) % u.length;
|
|
221
221
|
break;
|
|
222
222
|
case "ArrowUp":
|
|
223
|
-
g = m <= 0 ?
|
|
223
|
+
g = m <= 0 ? u.length - 1 : m - 1;
|
|
224
224
|
break;
|
|
225
225
|
case "Home":
|
|
226
226
|
g = 0;
|
|
227
227
|
break;
|
|
228
228
|
case "End":
|
|
229
|
-
g =
|
|
229
|
+
g = u.length - 1;
|
|
230
230
|
break;
|
|
231
231
|
default:
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
|
|
234
|
+
d.preventDefault(), u[g]?.focus();
|
|
235
235
|
};
|
|
236
236
|
return /* @__PURE__ */ S(je, { open: o, onOpenChange: s, children: [
|
|
237
237
|
/* @__PURE__ */ c(Ge, { asChild: !0, children: /* @__PURE__ */ c(
|
|
@@ -259,14 +259,14 @@ function Et({
|
|
|
259
259
|
role: "menu",
|
|
260
260
|
"aria-label": n("videoPlayer.playbackSpeedLabel"),
|
|
261
261
|
onKeyDown: r,
|
|
262
|
-
children: Re.map((
|
|
263
|
-
const
|
|
262
|
+
children: Re.map((d) => {
|
|
263
|
+
const u = d === e;
|
|
264
264
|
return /* @__PURE__ */ S(
|
|
265
265
|
"button",
|
|
266
266
|
{
|
|
267
267
|
type: "button",
|
|
268
268
|
role: "menuitemradio",
|
|
269
|
-
"aria-checked":
|
|
269
|
+
"aria-checked": u,
|
|
270
270
|
className: H(
|
|
271
271
|
"relative flex items-center rounded-xs py-1.5 pl-8 pr-3",
|
|
272
272
|
"cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums",
|
|
@@ -275,14 +275,14 @@ function Et({
|
|
|
275
275
|
"[&_svg]:h-3.5 [&_svg]:w-3.5"
|
|
276
276
|
),
|
|
277
277
|
onClick: () => {
|
|
278
|
-
t(
|
|
278
|
+
t(d), s(!1);
|
|
279
279
|
},
|
|
280
280
|
children: [
|
|
281
|
-
|
|
282
|
-
se(
|
|
281
|
+
u ? /* @__PURE__ */ c("span", { className: "absolute left-2.5 inline-flex items-center", children: /* @__PURE__ */ c(Ze, {}) }) : null,
|
|
282
|
+
se(d)
|
|
283
283
|
]
|
|
284
284
|
},
|
|
285
|
-
|
|
285
|
+
d
|
|
286
286
|
);
|
|
287
287
|
})
|
|
288
288
|
}
|
|
@@ -296,7 +296,7 @@ function Ct({
|
|
|
296
296
|
blockSeekPastMarker: n = !1,
|
|
297
297
|
onSeek: o
|
|
298
298
|
}) {
|
|
299
|
-
const { t: s } = W(), r = F(null), [
|
|
299
|
+
const { t: s } = W(), r = F(null), [d, u] = x(!1), [m, g] = x(null), y = t > 0 ? Math.min(1, e / t) : 0, l = a !== void 0 && t > 0 ? Math.min(1, a / t) : 0, f = a !== void 0 && t > 0 && a > 0 && a < t - le && e < a - le, h = (v) => {
|
|
300
300
|
const P = r.current;
|
|
301
301
|
if (!P)
|
|
302
302
|
return 0;
|
|
@@ -305,11 +305,11 @@ function Ct({
|
|
|
305
305
|
}, b = (v) => {
|
|
306
306
|
t && o(h(v) * t);
|
|
307
307
|
}, E = (v) => {
|
|
308
|
-
t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId),
|
|
308
|
+
t && (v.preventDefault(), v.currentTarget.setPointerCapture(v.pointerId), u(!0), b(v.clientX));
|
|
309
309
|
}, A = (v) => {
|
|
310
|
-
t && (g(h(v.clientX)),
|
|
310
|
+
t && (g(h(v.clientX)), d && b(v.clientX));
|
|
311
311
|
}, k = (v) => {
|
|
312
|
-
|
|
312
|
+
d && (u(!1), v.currentTarget.hasPointerCapture(v.pointerId) && v.currentTarget.releasePointerCapture(v.pointerId));
|
|
313
313
|
}, w = m !== null && n && a !== void 0 && m > l, O = (v) => {
|
|
314
314
|
if (!t)
|
|
315
315
|
return;
|
|
@@ -339,7 +339,7 @@ function Ct({
|
|
|
339
339
|
className: H(
|
|
340
340
|
"relative flex h-4 flex-1 items-center rounded-sm",
|
|
341
341
|
"cursor-pointer touch-none",
|
|
342
|
-
|
|
342
|
+
ue()
|
|
343
343
|
),
|
|
344
344
|
role: "slider",
|
|
345
345
|
tabIndex: 0,
|
|
@@ -355,7 +355,7 @@ function Ct({
|
|
|
355
355
|
onPointerMove: A,
|
|
356
356
|
onPointerUp: k,
|
|
357
357
|
onPointerCancel: k,
|
|
358
|
-
onLostPointerCapture: () =>
|
|
358
|
+
onLostPointerCapture: () => u(!1),
|
|
359
359
|
onPointerLeave: () => g(null),
|
|
360
360
|
onKeyDown: O,
|
|
361
361
|
children: [
|
|
@@ -367,14 +367,14 @@ function Ct({
|
|
|
367
367
|
style: { width: `${y * 100}%` }
|
|
368
368
|
}
|
|
369
369
|
),
|
|
370
|
-
f
|
|
370
|
+
f ? /* @__PURE__ */ c(
|
|
371
371
|
"div",
|
|
372
372
|
{
|
|
373
373
|
className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
|
|
374
374
|
style: { left: `${l * 100}%` },
|
|
375
375
|
"aria-hidden": "true"
|
|
376
376
|
}
|
|
377
|
-
),
|
|
377
|
+
) : null,
|
|
378
378
|
/* @__PURE__ */ c(
|
|
379
379
|
"div",
|
|
380
380
|
{
|
|
@@ -382,7 +382,7 @@ function Ct({
|
|
|
382
382
|
style: { left: `${y * 100}%` }
|
|
383
383
|
}
|
|
384
384
|
),
|
|
385
|
-
w
|
|
385
|
+
w ? /* @__PURE__ */ c("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
|
|
386
386
|
]
|
|
387
387
|
}
|
|
388
388
|
);
|
|
@@ -396,10 +396,10 @@ function ce({
|
|
|
396
396
|
value: o,
|
|
397
397
|
onLanguageChange: s,
|
|
398
398
|
on: r,
|
|
399
|
-
onOff:
|
|
400
|
-
offLabel:
|
|
399
|
+
onOff: d,
|
|
400
|
+
offLabel: u
|
|
401
401
|
}) {
|
|
402
|
-
const m =
|
|
402
|
+
const m = d !== void 0, g = n.find((l) => l.locale === o), y = m && !r ? u : g ? Le(g) : u;
|
|
403
403
|
return /* @__PURE__ */ S(et, { children: [
|
|
404
404
|
/* @__PURE__ */ S(tt, { className: Pt, children: [
|
|
405
405
|
/* @__PURE__ */ c(nt, { icon: e }),
|
|
@@ -410,7 +410,7 @@ function ce({
|
|
|
410
410
|
ot,
|
|
411
411
|
{
|
|
412
412
|
value: m ? r ? o : ie : o,
|
|
413
|
-
onValueChange: (l) => m && l === ie ?
|
|
413
|
+
onValueChange: (l) => m && l === ie ? d() : s(l),
|
|
414
414
|
children: [
|
|
415
415
|
n.map((l) => /* @__PURE__ */ c(
|
|
416
416
|
ye,
|
|
@@ -421,7 +421,7 @@ function ce({
|
|
|
421
421
|
},
|
|
422
422
|
l.locale
|
|
423
423
|
)),
|
|
424
|
-
m
|
|
424
|
+
m ? /* @__PURE__ */ c(ye, { value: ie, className: we, children: u }) : null
|
|
425
425
|
]
|
|
426
426
|
}
|
|
427
427
|
) }) })
|
|
@@ -435,8 +435,8 @@ function St({
|
|
|
435
435
|
captionLanguages: o,
|
|
436
436
|
captionLanguage: s,
|
|
437
437
|
captionsOn: r,
|
|
438
|
-
onCaptionLanguageChange:
|
|
439
|
-
onCaptionsOff:
|
|
438
|
+
onCaptionLanguageChange: d,
|
|
439
|
+
onCaptionsOff: u,
|
|
440
440
|
audioDescriptionLanguages: m,
|
|
441
441
|
audioDescriptionLanguage: g,
|
|
442
442
|
audioDescriptionOn: y,
|
|
@@ -463,7 +463,7 @@ function St({
|
|
|
463
463
|
align: "end",
|
|
464
464
|
className: Me,
|
|
465
465
|
children: [
|
|
466
|
-
t.length > 1
|
|
466
|
+
t.length > 1 ? /* @__PURE__ */ c(
|
|
467
467
|
ce,
|
|
468
468
|
{
|
|
469
469
|
icon: Qe,
|
|
@@ -474,8 +474,8 @@ function St({
|
|
|
474
474
|
onLanguageChange: n,
|
|
475
475
|
offLabel: E
|
|
476
476
|
}
|
|
477
|
-
),
|
|
478
|
-
o.length > 1
|
|
477
|
+
) : null,
|
|
478
|
+
o.length > 1 ? /* @__PURE__ */ c(
|
|
479
479
|
ce,
|
|
480
480
|
{
|
|
481
481
|
icon: fe,
|
|
@@ -484,15 +484,15 @@ function St({
|
|
|
484
484
|
options: o,
|
|
485
485
|
value: s,
|
|
486
486
|
on: r,
|
|
487
|
-
onLanguageChange:
|
|
488
|
-
onOff:
|
|
487
|
+
onLanguageChange: d,
|
|
488
|
+
onOff: u,
|
|
489
489
|
offLabel: E
|
|
490
490
|
}
|
|
491
|
-
),
|
|
492
|
-
m.length > 1
|
|
491
|
+
) : null,
|
|
492
|
+
m.length > 1 ? /* @__PURE__ */ c(
|
|
493
493
|
ce,
|
|
494
494
|
{
|
|
495
|
-
icon:
|
|
495
|
+
icon: de,
|
|
496
496
|
label: h("videoPlayer.audioDescription"),
|
|
497
497
|
container: b,
|
|
498
498
|
options: m,
|
|
@@ -502,7 +502,7 @@ function St({
|
|
|
502
502
|
onOff: f,
|
|
503
503
|
offLabel: E
|
|
504
504
|
}
|
|
505
|
-
)
|
|
505
|
+
) : null
|
|
506
506
|
]
|
|
507
507
|
}
|
|
508
508
|
)
|
|
@@ -548,7 +548,7 @@ function Tt({
|
|
|
548
548
|
] });
|
|
549
549
|
}
|
|
550
550
|
function At({ value: e, onChange: t }) {
|
|
551
|
-
const { t: a } = W(), n = F(null), [o, s] = x(!1), r = Math.max(0, Math.min(1, e)),
|
|
551
|
+
const { t: a } = W(), n = F(null), [o, s] = x(!1), r = Math.max(0, Math.min(1, e)), d = (l) => {
|
|
552
552
|
const f = n.current;
|
|
553
553
|
if (!f)
|
|
554
554
|
return 0;
|
|
@@ -557,10 +557,10 @@ function At({ value: e, onChange: t }) {
|
|
|
557
557
|
0,
|
|
558
558
|
Math.min(1, (l - h.left - q / 2) / b)
|
|
559
559
|
);
|
|
560
|
-
},
|
|
561
|
-
l.preventDefault(), l.currentTarget.setPointerCapture(l.pointerId), s(!0), t(
|
|
560
|
+
}, u = (l) => {
|
|
561
|
+
l.preventDefault(), l.currentTarget.setPointerCapture(l.pointerId), s(!0), t(d(l.clientX));
|
|
562
562
|
}, m = (l) => {
|
|
563
|
-
o && t(
|
|
563
|
+
o && t(d(l.clientX));
|
|
564
564
|
}, g = (l) => {
|
|
565
565
|
o && (s(!1), l.currentTarget.hasPointerCapture(l.pointerId) && l.currentTarget.releasePointerCapture(l.pointerId));
|
|
566
566
|
}, y = (l) => {
|
|
@@ -592,7 +592,7 @@ function At({ value: e, onChange: t }) {
|
|
|
592
592
|
className: H(
|
|
593
593
|
"relative flex h-4 w-[60px] items-center rounded-sm",
|
|
594
594
|
"cursor-pointer touch-none",
|
|
595
|
-
|
|
595
|
+
ue()
|
|
596
596
|
),
|
|
597
597
|
role: "slider",
|
|
598
598
|
tabIndex: 0,
|
|
@@ -601,7 +601,7 @@ function At({ value: e, onChange: t }) {
|
|
|
601
601
|
"aria-valuemax": 1,
|
|
602
602
|
"aria-valuenow": Number(r.toFixed(2)),
|
|
603
603
|
"aria-valuetext": `${Math.round(r * 100)}%`,
|
|
604
|
-
onPointerDown:
|
|
604
|
+
onPointerDown: u,
|
|
605
605
|
onPointerMove: m,
|
|
606
606
|
onPointerUp: g,
|
|
607
607
|
onPointerCancel: g,
|
|
@@ -639,8 +639,8 @@ function Mt({
|
|
|
639
639
|
isMuted: o,
|
|
640
640
|
playbackRate: s,
|
|
641
641
|
isFullscreen: r,
|
|
642
|
-
markerTime:
|
|
643
|
-
blockSeekPastMarker:
|
|
642
|
+
markerTime: d,
|
|
643
|
+
blockSeekPastMarker: u,
|
|
644
644
|
containerRef: m,
|
|
645
645
|
captionsAvailable: g,
|
|
646
646
|
captionsOn: y,
|
|
@@ -711,8 +711,8 @@ function Mt({
|
|
|
711
711
|
{
|
|
712
712
|
currentTime: t,
|
|
713
713
|
duration: a,
|
|
714
|
-
markerTime:
|
|
715
|
-
blockSeekPastMarker:
|
|
714
|
+
markerTime: d,
|
|
715
|
+
blockSeekPastMarker: u,
|
|
716
716
|
onSeek: Y
|
|
717
717
|
}
|
|
718
718
|
),
|
|
@@ -739,36 +739,40 @@ function Mt({
|
|
|
739
739
|
containerRef: m
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
I
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
742
|
+
I ? (
|
|
743
|
+
// Filled glyph when captions are on, line glyph when off; `aria-pressed`
|
|
744
|
+
// conveys the state to assistive tech (the label stays stable).
|
|
745
|
+
/* @__PURE__ */ c(
|
|
746
|
+
$,
|
|
747
|
+
{
|
|
748
|
+
variant: "ghost",
|
|
749
|
+
size: "sm",
|
|
750
|
+
hideLabel: !0,
|
|
751
|
+
icon: y ? Ae : fe,
|
|
752
|
+
label: p("videoPlayer.captions"),
|
|
753
|
+
"aria-pressed": y,
|
|
754
|
+
onClick: _
|
|
755
|
+
}
|
|
756
|
+
)
|
|
757
|
+
) : null,
|
|
758
|
+
z ? (
|
|
759
|
+
// Filled "AD" badge when on, line badge when off — the same on/off
|
|
760
|
+
// language as captions, legible over video. `hideLabel` gives the
|
|
761
|
+
// captions-style tooltip from the label; `aria-pressed` conveys state.
|
|
762
|
+
/* @__PURE__ */ c(
|
|
763
|
+
$,
|
|
764
|
+
{
|
|
765
|
+
variant: "ghost",
|
|
766
|
+
size: "sm",
|
|
767
|
+
hideLabel: !0,
|
|
768
|
+
icon: f ? Te : de,
|
|
769
|
+
label: p("videoPlayer.audioDescription"),
|
|
770
|
+
"aria-pressed": f,
|
|
771
|
+
onClick: U
|
|
772
|
+
}
|
|
773
|
+
)
|
|
774
|
+
) : null,
|
|
775
|
+
V ? /* @__PURE__ */ c(
|
|
772
776
|
St,
|
|
773
777
|
{
|
|
774
778
|
containerRef: m,
|
|
@@ -786,8 +790,8 @@ function Mt({
|
|
|
786
790
|
onAudioDescriptionLanguageChange: i,
|
|
787
791
|
onAudioDescriptionOff: D
|
|
788
792
|
}
|
|
789
|
-
),
|
|
790
|
-
X
|
|
793
|
+
) : null,
|
|
794
|
+
X ? /* @__PURE__ */ c(
|
|
791
795
|
$,
|
|
792
796
|
{
|
|
793
797
|
variant: "ghost",
|
|
@@ -797,7 +801,7 @@ function Mt({
|
|
|
797
801
|
label: X.label,
|
|
798
802
|
onClick: X.onClick
|
|
799
803
|
}
|
|
800
|
-
),
|
|
804
|
+
) : null,
|
|
801
805
|
/* @__PURE__ */ c(
|
|
802
806
|
$,
|
|
803
807
|
{
|
|
@@ -830,7 +834,7 @@ function Ie(e) {
|
|
|
830
834
|
}
|
|
831
835
|
const xe = "descriptions";
|
|
832
836
|
function It(e, { enabled: t, describedSrc: a, descriptions: n }) {
|
|
833
|
-
const o = a !== void 0, { trackSrc: s, needsCrossOrigin: r } = Ie(n), [
|
|
837
|
+
const o = a !== void 0, { trackSrc: s, needsCrossOrigin: r } = Ie(n), [d, u] = x(!1), m = o || n !== void 0 || d, [g, y] = x(), l = F(!1);
|
|
834
838
|
return N(() => {
|
|
835
839
|
if (!e)
|
|
836
840
|
return;
|
|
@@ -854,7 +858,7 @@ function It(e, { enabled: t, describedSrc: a, descriptions: n }) {
|
|
|
854
858
|
let C = !1;
|
|
855
859
|
for (const i of Array.from(f))
|
|
856
860
|
i.kind === xe && (n === void 0 && (C = !0), O(i));
|
|
857
|
-
|
|
861
|
+
u(C);
|
|
858
862
|
};
|
|
859
863
|
v();
|
|
860
864
|
const P = typeof f.addEventListener == "function", M = () => v();
|
|
@@ -898,32 +902,32 @@ function _t({
|
|
|
898
902
|
}) {
|
|
899
903
|
return T(
|
|
900
904
|
(r) => {
|
|
901
|
-
const
|
|
902
|
-
if (
|
|
905
|
+
const d = r.target;
|
|
906
|
+
if (d instanceof HTMLElement && (d.closest(
|
|
903
907
|
'button, a, input, textarea, select, [role="button"], [contenteditable="true"]'
|
|
904
|
-
) ||
|
|
908
|
+
) || d.closest('[role="menu"], [role^="menuitem"]') || d.getAttribute("role") === "slider"))
|
|
905
909
|
return;
|
|
906
|
-
const
|
|
907
|
-
if (!
|
|
910
|
+
const u = e.current;
|
|
911
|
+
if (!u)
|
|
908
912
|
return;
|
|
909
913
|
switch (r.key.length === 1 ? r.key.toLowerCase() : r.key) {
|
|
910
914
|
case " ":
|
|
911
915
|
r.preventDefault(), a();
|
|
912
916
|
return;
|
|
913
917
|
case "ArrowLeft":
|
|
914
|
-
r.preventDefault(), t(Math.max(0,
|
|
918
|
+
r.preventDefault(), t(Math.max(0, u.currentTime - Q));
|
|
915
919
|
return;
|
|
916
920
|
case "ArrowRight": {
|
|
917
921
|
r.preventDefault();
|
|
918
|
-
const g =
|
|
919
|
-
t(Math.min(g,
|
|
922
|
+
const g = u.duration || u.currentTime + Q;
|
|
923
|
+
t(Math.min(g, u.currentTime + Q));
|
|
920
924
|
return;
|
|
921
925
|
}
|
|
922
926
|
case "ArrowUp":
|
|
923
|
-
r.preventDefault(), s(Math.min(1,
|
|
927
|
+
r.preventDefault(), s(Math.min(1, u.volume + te));
|
|
924
928
|
return;
|
|
925
929
|
case "ArrowDown":
|
|
926
|
-
r.preventDefault(), s(Math.max(0,
|
|
930
|
+
r.preventDefault(), s(Math.max(0, u.volume - te));
|
|
927
931
|
return;
|
|
928
932
|
case "m":
|
|
929
933
|
r.preventDefault(), n();
|
|
@@ -945,21 +949,21 @@ function Ft({
|
|
|
945
949
|
}) {
|
|
946
950
|
const n = F(0), o = F(0), s = F(t);
|
|
947
951
|
s.current = t;
|
|
948
|
-
const [r,
|
|
952
|
+
const [r, d] = x(0);
|
|
949
953
|
N(() => {
|
|
950
|
-
n.current = 0, o.current = 0,
|
|
954
|
+
n.current = 0, o.current = 0, d(0);
|
|
951
955
|
}, [a]), N(() => {
|
|
952
956
|
if (!e)
|
|
953
957
|
return;
|
|
954
958
|
const m = () => {
|
|
955
959
|
s.current && e.currentTime > n.current + le && (e.currentTime = n.current);
|
|
956
960
|
}, g = () => {
|
|
957
|
-
|
|
961
|
+
d((h) => {
|
|
958
962
|
const b = n.current;
|
|
959
963
|
return b - h >= 1 ? b : h;
|
|
960
964
|
});
|
|
961
965
|
}, y = () => {
|
|
962
|
-
|
|
966
|
+
d((h) => Math.max(h, n.current));
|
|
963
967
|
}, l = () => {
|
|
964
968
|
const h = e.currentTime - o.current;
|
|
965
969
|
h >= 0 && h < vt && e.currentTime > n.current && (n.current = e.currentTime, g()), m(), o.current = e.currentTime;
|
|
@@ -970,17 +974,17 @@ function Ft({
|
|
|
970
974
|
e.removeEventListener("timeupdate", l), e.removeEventListener("seeking", f), e.removeEventListener("seeked", f), e.removeEventListener("pause", y), e.removeEventListener("ended", y);
|
|
971
975
|
};
|
|
972
976
|
}, [e]);
|
|
973
|
-
const
|
|
974
|
-
return { maxWatchedTime: r, clampSeek:
|
|
977
|
+
const u = T((m) => s.current ? Math.min(m, n.current) : m, []);
|
|
978
|
+
return { maxWatchedTime: r, clampSeek: u };
|
|
975
979
|
}
|
|
976
980
|
const Ee = /* @__PURE__ */ new Set([
|
|
977
981
|
"captions",
|
|
978
982
|
"subtitles"
|
|
979
983
|
]), Ot = 2, Vt = 3;
|
|
980
984
|
function Ut(e, t) {
|
|
981
|
-
const { trackSrc: a, needsCrossOrigin: n } = Ie(t), [o, s] = x(!1), [r,
|
|
985
|
+
const { trackSrc: a, needsCrossOrigin: n } = Ie(t), [o, s] = x(!1), [r, d] = x(!1), [u, m] = x(!1), y = r || t !== void 0 && !u;
|
|
982
986
|
return N(() => {
|
|
983
|
-
m(!1),
|
|
987
|
+
m(!1), d(!1);
|
|
984
988
|
}, [a]), N(() => {
|
|
985
989
|
if (!e)
|
|
986
990
|
return;
|
|
@@ -990,7 +994,7 @@ function Ut(e, t) {
|
|
|
990
994
|
let k = !1;
|
|
991
995
|
for (const w of Array.from(l))
|
|
992
996
|
Ee.has(w.kind) && (w.mode = o ? "showing" : "hidden", w.cues && w.cues.length > 0 && (k = !0));
|
|
993
|
-
if (
|
|
997
|
+
if (d(k), f) {
|
|
994
998
|
if (f.readyState === Vt)
|
|
995
999
|
m(!0);
|
|
996
1000
|
else if (f.readyState === Ot) {
|
|
@@ -1072,9 +1076,9 @@ function zt({
|
|
|
1072
1076
|
const r = () => {
|
|
1073
1077
|
if (!e.duration)
|
|
1074
1078
|
return;
|
|
1075
|
-
const
|
|
1076
|
-
for (const
|
|
1077
|
-
o.current.has(
|
|
1079
|
+
const d = Math.round(e.currentTime / e.duration * 100);
|
|
1080
|
+
for (const u of yt)
|
|
1081
|
+
o.current.has(u) || d >= u && (o.current.add(u), n.current?.(u, e));
|
|
1078
1082
|
};
|
|
1079
1083
|
return e.addEventListener("timeupdate", r), () => {
|
|
1080
1084
|
e.removeEventListener("timeupdate", r);
|
|
@@ -1086,11 +1090,11 @@ function Bt(e) {
|
|
|
1086
1090
|
null
|
|
1087
1091
|
), o = F(0), s = T((i) => {
|
|
1088
1092
|
t.current = i, n(i);
|
|
1089
|
-
}, []), [r,
|
|
1093
|
+
}, []), [r, d] = x(!1), [u, m] = x(!1), [g, y] = x(0), [l, f] = x(0), [h, b] = x(1), [E, A] = x(!1), [k, w] = x(
|
|
1090
1094
|
oe
|
|
1091
1095
|
);
|
|
1092
1096
|
N(() => {
|
|
1093
|
-
o.current = 0, t.current && (t.current.playbackRate = oe),
|
|
1097
|
+
o.current = 0, t.current && (t.current.playbackRate = oe), d(!1), m(!1), y(0), f(0), w(oe);
|
|
1094
1098
|
}, [e]), N(() => {
|
|
1095
1099
|
const i = a;
|
|
1096
1100
|
if (!i)
|
|
@@ -1135,13 +1139,13 @@ function Bt(e) {
|
|
|
1135
1139
|
videoElement: a,
|
|
1136
1140
|
setVideoNode: s,
|
|
1137
1141
|
videoLoaded: r,
|
|
1138
|
-
isPlaying:
|
|
1142
|
+
isPlaying: u,
|
|
1139
1143
|
currentTime: g,
|
|
1140
1144
|
duration: l,
|
|
1141
1145
|
volume: h,
|
|
1142
1146
|
isMuted: E,
|
|
1143
1147
|
playbackRate: k,
|
|
1144
|
-
setVideoLoaded:
|
|
1148
|
+
setVideoLoaded: d,
|
|
1145
1149
|
togglePlay: O,
|
|
1146
1150
|
toggleMute: v,
|
|
1147
1151
|
setVolume: P,
|
|
@@ -1166,11 +1170,11 @@ function Ht({
|
|
|
1166
1170
|
a.current?.(), s(), o = setInterval(() => {
|
|
1167
1171
|
a.current?.();
|
|
1168
1172
|
}, Lt);
|
|
1169
|
-
},
|
|
1173
|
+
}, d = () => {
|
|
1170
1174
|
a.current?.(), s();
|
|
1171
|
-
},
|
|
1172
|
-
return e.addEventListener("play", r), e.addEventListener("pause",
|
|
1173
|
-
s(), e.removeEventListener("play", r), e.removeEventListener("pause",
|
|
1175
|
+
}, u = () => s();
|
|
1176
|
+
return e.addEventListener("play", r), e.addEventListener("pause", d), e.addEventListener("ended", u), () => {
|
|
1177
|
+
s(), e.removeEventListener("play", r), e.removeEventListener("pause", d), e.removeEventListener("ended", u);
|
|
1174
1178
|
};
|
|
1175
1179
|
}, [e, n]);
|
|
1176
1180
|
}
|
|
@@ -1182,8 +1186,8 @@ function Wt({
|
|
|
1182
1186
|
persistControls: o = !1,
|
|
1183
1187
|
content: s,
|
|
1184
1188
|
defaultLanguage: r,
|
|
1185
|
-
autoPlay:
|
|
1186
|
-
autoFocus:
|
|
1189
|
+
autoPlay: d = !1,
|
|
1190
|
+
autoFocus: u = !1,
|
|
1187
1191
|
download: m,
|
|
1188
1192
|
restrictForwardSeek: g = !1,
|
|
1189
1193
|
onTrackAction: y,
|
|
@@ -1281,8 +1285,8 @@ function Wt({
|
|
|
1281
1285
|
setVolume: n ? ge : p.setVolume
|
|
1282
1286
|
});
|
|
1283
1287
|
N(() => {
|
|
1284
|
-
|
|
1285
|
-
}, [
|
|
1288
|
+
u && E.current?.focus({ preventScroll: !0 });
|
|
1289
|
+
}, [u]);
|
|
1286
1290
|
const Be = (L) => L.preventDefault();
|
|
1287
1291
|
return /* @__PURE__ */ S(
|
|
1288
1292
|
"div",
|
|
@@ -1291,7 +1295,7 @@ function Wt({
|
|
|
1291
1295
|
className: H(
|
|
1292
1296
|
"group relative h-full w-full overflow-hidden rounded-[inherit] bg-f1-foreground dark:bg-f1-background",
|
|
1293
1297
|
"[&:fullscreen]:h-screen [&:fullscreen]:w-screen [&:fullscreen]:rounded-none",
|
|
1294
|
-
|
|
1298
|
+
ue()
|
|
1295
1299
|
),
|
|
1296
1300
|
role: "region",
|
|
1297
1301
|
"aria-label": a ?? b("videoPlayer.regionLabel"),
|
|
@@ -1304,7 +1308,7 @@ function Wt({
|
|
|
1304
1308
|
"video",
|
|
1305
1309
|
{
|
|
1306
1310
|
ref: p.setVideoNode,
|
|
1307
|
-
autoPlay:
|
|
1311
|
+
autoPlay: d,
|
|
1308
1312
|
playsInline: !0,
|
|
1309
1313
|
disablePictureInPicture: !0,
|
|
1310
1314
|
disableRemotePlayback: !0,
|
|
@@ -1324,7 +1328,7 @@ function Wt({
|
|
|
1324
1328
|
),
|
|
1325
1329
|
style: { opacity: p.videoLoaded || t ? 1 : 0 },
|
|
1326
1330
|
children: [
|
|
1327
|
-
I.trackSrc
|
|
1331
|
+
I.trackSrc ? /* @__PURE__ */ c(
|
|
1328
1332
|
"track",
|
|
1329
1333
|
{
|
|
1330
1334
|
kind: "captions",
|
|
@@ -1332,8 +1336,8 @@ function Wt({
|
|
|
1332
1336
|
label: b("videoPlayer.captions"),
|
|
1333
1337
|
default: !1
|
|
1334
1338
|
}
|
|
1335
|
-
),
|
|
1336
|
-
z.trackSrc
|
|
1339
|
+
) : null,
|
|
1340
|
+
z.trackSrc ? /* @__PURE__ */ c(
|
|
1337
1341
|
"track",
|
|
1338
1342
|
{
|
|
1339
1343
|
kind: "descriptions",
|
|
@@ -1341,11 +1345,11 @@ function Wt({
|
|
|
1341
1345
|
label: b("videoPlayer.audioDescription"),
|
|
1342
1346
|
default: !1
|
|
1343
1347
|
}
|
|
1344
|
-
)
|
|
1348
|
+
) : null
|
|
1345
1349
|
]
|
|
1346
1350
|
}
|
|
1347
1351
|
),
|
|
1348
|
-
|
|
1352
|
+
p.isPlaying ? null : /* @__PURE__ */ c(
|
|
1349
1353
|
"div",
|
|
1350
1354
|
{
|
|
1351
1355
|
"aria-hidden": !0,
|
|
@@ -1358,12 +1362,12 @@ function Wt({
|
|
|
1358
1362
|
tabIndex: -1,
|
|
1359
1363
|
onClick: p.togglePlay,
|
|
1360
1364
|
className: "pointer-events-auto flex size-14 items-center justify-center rounded-full bg-f1-foreground/70 pl-0.5 shadow-[0_2px_8px_rgba(0,0,0,0.45)] transition-transform duration-150 hover:scale-105 motion-reduce:transition-none dark:bg-f1-background/70 [&_svg]:size-7",
|
|
1361
|
-
children: /* @__PURE__ */ c(
|
|
1365
|
+
children: /* @__PURE__ */ c(ut, { icon: Ce, size: "lg", color: "#fff" })
|
|
1362
1366
|
}
|
|
1363
1367
|
)
|
|
1364
1368
|
}
|
|
1365
1369
|
),
|
|
1366
|
-
I.showing && z.activeCue
|
|
1370
|
+
I.showing && z.activeCue ? /* @__PURE__ */ c(
|
|
1367
1371
|
"div",
|
|
1368
1372
|
{
|
|
1369
1373
|
"aria-hidden": !0,
|
|
@@ -1377,9 +1381,9 @@ function Wt({
|
|
|
1377
1381
|
z.activeCue
|
|
1378
1382
|
] })
|
|
1379
1383
|
}
|
|
1380
|
-
),
|
|
1384
|
+
) : null,
|
|
1381
1385
|
/* @__PURE__ */ c("span", { className: "sr-only", "aria-live": "polite", children: p.isPlaying ? b("videoPlayer.playing") : b("videoPlayer.paused") }),
|
|
1382
|
-
p.videoLoaded
|
|
1386
|
+
p.videoLoaded ? /* @__PURE__ */ c(
|
|
1383
1387
|
Mt,
|
|
1384
1388
|
{
|
|
1385
1389
|
isPlaying: p.isPlaying,
|
|
@@ -1421,12 +1425,12 @@ function Wt({
|
|
|
1421
1425
|
onSeek: pe,
|
|
1422
1426
|
download: m
|
|
1423
1427
|
}
|
|
1424
|
-
)
|
|
1428
|
+
) : null
|
|
1425
1429
|
]
|
|
1426
1430
|
}
|
|
1427
1431
|
);
|
|
1428
1432
|
}
|
|
1429
|
-
const Yt =
|
|
1433
|
+
const Yt = dt(
|
|
1430
1434
|
ft("F0VideoPlayer", Wt)
|
|
1431
1435
|
);
|
|
1432
1436
|
export {
|