@factorialco/f0-react 12.10.0 → 12.11.0
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/ArchiveThumbnail-cs8kx5Zf.js +70 -0
- package/dist/ArchiveViewer-BXUH8Lm5.js +172 -0
- package/dist/{ChatPostComposerDialog-DcmLrQk6.js → ChatPostComposerDialog-CGil1xkf.js} +4 -4
- package/dist/{CoachmarkProvider-XfLjB3dH.js → CoachmarkProvider-cZnuTk79.js} +29938 -29932
- package/dist/CodeThumbnail-Dcer4AyK.js +31 -0
- package/dist/CodeViewer-DFBwdIFm.js +98 -0
- package/dist/DocumentToolbar-vZEyzJ89.js +74 -0
- package/dist/{DocxThumbnail-kHTNnwW0.js → DocxThumbnail-CK9vFoTB.js} +2 -2
- package/dist/{DocxViewer-CqHgSExq.js → DocxViewer-DQV5Kv1n.js} +25 -23
- package/dist/ExternalLink-RdKU698E.js +22 -0
- package/dist/{F0AiProcessingOverlay-H23WHd7F.js → F0AiProcessingOverlay-DjGkQ2Nc.js} +1349 -1345
- package/dist/{popover-BjrPOMeQ.js → F0Button-FXkThQ9H.js} +3164 -8587
- package/dist/{F0CanvasPanel--hLKeQvg.js → F0CanvasPanel-BgDo2LWP.js} +9436 -9008
- package/dist/F0DocumentViewer-BXifXzUW.js +79 -0
- package/dist/F0DocumentViewer-DWuIFBHu.js +3 -0
- package/dist/F0Icon-Cj0USbCF.js +202 -0
- package/dist/{F0Map-hvgCUGk8.js → F0Map-Dwev4u-_.js} +189 -188
- package/dist/{F0Select-B-ZxVjXG.js → F0Select-BWWdEd7l.js} +6696 -6726
- package/dist/{F0Text-D92NWQRd.js → F0Text-DMZW7dhN.js} +25 -41
- package/dist/{F0VideoPlayer-CNp5hXgp.js → F0VideoPlayer-BmCmHG87.js} +412 -408
- package/dist/F0VideoPlayer-C8oYUUZM.js +1 -0
- package/dist/HtmlThumbnail-BAgkBH2r.js +60 -0
- package/dist/HtmlViewer-FRfNoxhP.js +208 -0
- package/dist/LockLocked-gdodYvT_.js +41 -0
- package/dist/{Map-eIXVKc1x.js → Map-BxGPElF2.js} +57 -54
- package/dist/{PdfThumbnail-CCSmwxQU.js → PdfThumbnail-CpGZz5Kq.js} +5 -5
- package/dist/PdfViewer-C81MK43i.js +296 -0
- package/dist/SandboxedHtmlFrame-B6YWhgyg.js +309 -0
- package/dist/{SheetViewer-BN5UYkEZ.js → SheetViewer-DPGpMNqq.js} +36 -26
- package/dist/TextThumbnail-DKNxh344.js +15 -0
- package/dist/{TextViewer-Bt0_dYB-.js → TextViewer-BH42AeG8.js} +44 -41
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +5 -5
- package/dist/bash-BcZBmoDA.js +169 -0
- package/dist/c-Dv-5_kUQ.js +187 -0
- package/dist/component-status.js +2 -2
- package/dist/core-C0MCmPil.js +842 -0
- package/dist/cpp-CMQhucZt.js +236 -0
- package/dist/csharp-CuDKSCf2.js +260 -0
- package/dist/css-Dta7Q4Li.js +145 -0
- package/dist/dart-po7Eq73d.js +134 -0
- package/dist/diff-IgsQP-8T.js +39 -0
- package/dist/dist-D-MJbPvE.js +59 -0
- package/dist/dockerfile-B4Bz9I5u.js +34 -0
- package/dist/dos-1TcyLtUq.js +57 -0
- package/dist/elixir-BnEjyLGa.js +189 -0
- package/dist/erlang-tgri7ZSv.js +218 -0
- package/dist/experimental.d.ts +24 -4
- package/dist/experimental.js +2711 -2702
- package/dist/{exports-BByQBwpi.d.ts → exports-C0yM5usu.d.ts} +1 -1
- package/dist/f0.d.ts +130 -8
- package/dist/f0.js +751 -745
- package/dist/fetchText-o_GOtiv3.js +54 -0
- package/dist/go-CEVmppuo.js +144 -0
- package/dist/graphql-BWwc-u8d.js +67 -0
- package/dist/groovy-BELuqtd6.js +127 -0
- package/dist/haskell-Cxh7aaFM.js +138 -0
- package/dist/highlight-CyebkDAD.js +114 -0
- package/dist/i18n-provider-BBhzYHef.js +150 -0
- package/dist/{i18n-provider-defaults-p0UGTA_k.js → i18n-provider-defaults-BUagKwGN.js} +32 -1
- package/dist/{i18n-provider-defaults-DQxuUMpU.d.ts → i18n-provider-defaults-CTDMMs-y.d.ts} +31 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-D3nEDg8x.d.ts → index-CduxMW5L.d.ts} +1 -1
- package/dist/ini-DA-F0rRr.js +88 -0
- package/dist/java-Bujnoc_f.js +174 -0
- package/dist/javascript-BeEhpXRE.js +431 -0
- package/dist/json-CxvE7tEw.js +42 -0
- package/dist/kotlin-DOwDGI_m.js +206 -0
- package/dist/less-DWlR-e-o.js +196 -0
- package/dist/lua-BlZiakwh.js +46 -0
- package/dist/makefile-D3841Yg4.js +57 -0
- package/dist/{maplibre-Bywi9z2G.js → maplibre-g-8NG-3q.js} +1 -1
- package/dist/markdown-D1wNG79U.js +178 -0
- package/dist/objectivec-DxtRzTBy.js +117 -0
- package/dist/ownValue-D4uSXt0d.js +4 -0
- package/dist/{pdfWorker-CKgxOaCl.js → pdfWorker-D5NB2V5s.js} +12 -9
- package/dist/pdfWorkerConfig-BwllKt1K.js +8 -0
- package/dist/perl-BWRmkuyz.js +192 -0
- package/dist/php-CjwybYSP.js +300 -0
- package/dist/popover-CQztsDta.js +4486 -0
- package/dist/{posts-DGtDUrKT.js → posts-BHRBUAYJ.js} +2 -0
- package/dist/powershell-CgKcNA5Q.js +188 -0
- package/dist/properties-Bc45MTzW.js +38 -0
- package/dist/protobuf-Bv_xSUaI.js +61 -0
- package/dist/purify.es-ZpfdAuNV.js +545 -0
- package/dist/python-D8PdGjgy.js +238 -0
- package/dist/r-DA-9ZIdU.js +140 -0
- package/dist/{renderDocx-_UmnE-yc.js → renderDocx-BW-uDyaZ.js} +2 -0
- package/dist/ruby-Bqr16BpN.js +262 -0
- package/dist/rust-BCvJMwk8.js +182 -0
- package/dist/scala-Du8mOD2z.js +162 -0
- package/dist/scss-AMxHqh46.js +155 -0
- package/dist/skeleton-DqejhQgn.js +72 -0
- package/dist/sql-BbYSgcOA.js +118 -0
- package/dist/styles.css +1 -1
- package/dist/swift-DRKtalPn.js +575 -0
- package/dist/toolbarStyles-0IygMI4H.js +52 -0
- package/dist/{types-UMYBr8Mi.d.ts → types-DlwD3i9z.d.ts} +3 -95
- package/dist/typescript-Bv8uKU6V.js +516 -0
- package/dist/{useData-B7LYSzh0.js → useData-Dkq5W4r6.js} +4917 -4876
- package/dist/useFetchedText-BR3_KLXx.js +38 -0
- package/dist/useThumbnailText-DwXQvLIe.js +22 -0
- package/dist/xml-BVpP05uE.js +162 -0
- package/dist/yaml-BNe2WG-i.js +144 -0
- package/dist/zipTree-B2zUYl6b.js +247 -0
- package/package.json +2 -1
- package/dist/DocumentToolbar-CqbY6eID.js +0 -70
- package/dist/F0DocumentViewer-BN-2IVgz.js +0 -400
- package/dist/F0DocumentViewer-D1G3M2J_.js +0 -3
- package/dist/F0VideoPlayer-D4bZBBLK.js +0 -1
- package/dist/TextThumbnail-X04JgaNI.js +0 -26
- package/dist/dist-DvxtFKDL.js +0 -78
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { a as e, r as t } from "./i18n-provider-BBhzYHef.js";
|
|
2
|
+
import { n } from "./skeleton-DqejhQgn.js";
|
|
3
|
+
import { L as r, R as i } from "./tooltip-BX4dSfeL.js";
|
|
4
|
+
import { t as a } from "./F0Button-FXkThQ9H.js";
|
|
5
|
+
import { Ja as o, Ns as s, Xa as c, Ya as l, _o as u, _s as d, bo as f, es as p, go as m, qo as h } from "./F0CanvasPanel-BgDo2LWP.js";
|
|
6
|
+
import { n as g, t as _ } from "./F0Icon-Cj0USbCF.js";
|
|
7
|
+
import { t as v } from "./Check-DAp9gCRh.js";
|
|
8
|
+
import { A as y, B as b, F as x, H as S, I as C, P as w, R as ee, a as T, i as E, k as D, t as te, z as O } from "./popover-CQztsDta.js";
|
|
9
|
+
import { t as k } from "./useFullscreen-CNwpzjpz.js";
|
|
10
|
+
import { forwardRef as A, useCallback as j, useEffect as M, useId as N, useMemo as P, useRef as F, useState as I } from "react";
|
|
11
|
+
import { jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
8
12
|
//#region src/elements/lib/localized.ts
|
|
9
|
-
function
|
|
13
|
+
function z(e) {
|
|
10
14
|
return Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && "locale" in e && "value" in e);
|
|
11
15
|
}
|
|
12
|
-
function
|
|
16
|
+
function B(e, t) {
|
|
13
17
|
if (e !== void 0) {
|
|
14
|
-
if (!
|
|
18
|
+
if (!z(e)) return e;
|
|
15
19
|
if (e.length !== 0) return ((t ? e.find((e) => e.locale === t) : void 0) ?? e[0]).value;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
function
|
|
22
|
+
function V(...e) {
|
|
19
23
|
let t = /* @__PURE__ */ new Map();
|
|
20
|
-
for (let n of e) if (
|
|
24
|
+
for (let n of e) if (z(n)) for (let e of n) {
|
|
21
25
|
let n = t.get(e.locale);
|
|
22
26
|
n ? !n.label && e.label && (n.label = e.label) : t.set(e.locale, {
|
|
23
27
|
locale: e.locale,
|
|
@@ -26,7 +30,7 @@ function z(...e) {
|
|
|
26
30
|
}
|
|
27
31
|
return Array.from(t.values());
|
|
28
32
|
}
|
|
29
|
-
function
|
|
33
|
+
function H(e, t) {
|
|
30
34
|
if (e.label) return e.label;
|
|
31
35
|
try {
|
|
32
36
|
let n = t ?? e.locale, r = new Intl.DisplayNames([n], { type: "language" }).of(e.locale) ?? e.locale;
|
|
@@ -35,7 +39,7 @@ function B(e, t) {
|
|
|
35
39
|
return e.locale;
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
|
-
function
|
|
42
|
+
function U(e, t) {
|
|
39
43
|
if (e.length === 0) return;
|
|
40
44
|
let n = e.map((e) => e.locale), r = (e) => e.split("-")[0], i = (e) => n.find((t) => t === e) ?? n.find((t) => r(t) === r(e));
|
|
41
45
|
if (t) {
|
|
@@ -51,29 +55,29 @@ function V(e, t) {
|
|
|
51
55
|
}
|
|
52
56
|
//#endregion
|
|
53
57
|
//#region src/blocks/F0VideoPlayer/utils.ts
|
|
54
|
-
var
|
|
58
|
+
var W = [
|
|
55
59
|
.5,
|
|
56
60
|
.75,
|
|
57
61
|
1,
|
|
58
62
|
1.25,
|
|
59
63
|
1.5
|
|
60
|
-
],
|
|
64
|
+
], G = .1, K = [
|
|
61
65
|
25,
|
|
62
66
|
50,
|
|
63
67
|
75
|
|
64
|
-
],
|
|
65
|
-
function
|
|
68
|
+
], q = 3e5, J = .03;
|
|
69
|
+
function Y(e) {
|
|
66
70
|
return !Number.isFinite(e) || e < 0 ? "0:00" : `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
67
71
|
}
|
|
68
|
-
function
|
|
72
|
+
function X(e) {
|
|
69
73
|
return `${e}x`;
|
|
70
74
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
75
|
+
function Z(e) {
|
|
76
|
+
return W.includes(e);
|
|
73
77
|
}
|
|
74
78
|
//#endregion
|
|
75
79
|
//#region src/blocks/F0VideoPlayer/components/AudioDescriptionToggleIcons.tsx
|
|
76
|
-
var
|
|
80
|
+
var Q = {
|
|
77
81
|
x: 12,
|
|
78
82
|
y: 15,
|
|
79
83
|
textAnchor: "middle",
|
|
@@ -81,14 +85,14 @@ var X = {
|
|
|
81
85
|
fontWeight: 700,
|
|
82
86
|
fontFamily: "inherit",
|
|
83
87
|
letterSpacing: -.4
|
|
84
|
-
},
|
|
88
|
+
}, $ = A(({ animate: e, ...t }, n) => /* @__PURE__ */ R("svg", {
|
|
85
89
|
xmlns: "http://www.w3.org/2000/svg",
|
|
86
90
|
viewBox: "0 0 24 24",
|
|
87
91
|
fill: "none",
|
|
88
92
|
ref: n,
|
|
89
93
|
...t,
|
|
90
94
|
"aria-hidden": "true",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ L("rect", {
|
|
92
96
|
x: 3.5,
|
|
93
97
|
y: 6.5,
|
|
94
98
|
width: 17,
|
|
@@ -96,38 +100,38 @@ var X = {
|
|
|
96
100
|
rx: 2.5,
|
|
97
101
|
stroke: "currentColor",
|
|
98
102
|
vectorEffect: "non-scaling-stroke"
|
|
99
|
-
}), /* @__PURE__ */
|
|
100
|
-
...
|
|
103
|
+
}), /* @__PURE__ */ L("text", {
|
|
104
|
+
...Q,
|
|
101
105
|
fill: "currentColor",
|
|
102
106
|
children: "AD"
|
|
103
107
|
})]
|
|
104
108
|
}));
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
let r = `ad-mask-${
|
|
108
|
-
return /* @__PURE__ */
|
|
109
|
+
$.displayName = "AudioDescriptionLineIcon";
|
|
110
|
+
var ne = A(({ animate: e, ...t }, n) => {
|
|
111
|
+
let r = `ad-mask-${N().replace(/:/g, "")}`;
|
|
112
|
+
return /* @__PURE__ */ R("svg", {
|
|
109
113
|
xmlns: "http://www.w3.org/2000/svg",
|
|
110
114
|
viewBox: "0 0 24 24",
|
|
111
115
|
fill: "none",
|
|
112
116
|
ref: n,
|
|
113
117
|
...t,
|
|
114
118
|
"aria-hidden": "true",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ R("mask", {
|
|
116
120
|
id: r,
|
|
117
121
|
maskUnits: "userSpaceOnUse",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ L("rect", {
|
|
119
123
|
x: 3,
|
|
120
124
|
y: 6,
|
|
121
125
|
width: 18,
|
|
122
126
|
height: 12,
|
|
123
127
|
rx: 3,
|
|
124
128
|
fill: "white"
|
|
125
|
-
}), /* @__PURE__ */
|
|
126
|
-
...
|
|
129
|
+
}), /* @__PURE__ */ L("text", {
|
|
130
|
+
...Q,
|
|
127
131
|
fill: "black",
|
|
128
132
|
children: "AD"
|
|
129
133
|
})]
|
|
130
|
-
}), /* @__PURE__ */
|
|
134
|
+
}), /* @__PURE__ */ L("rect", {
|
|
131
135
|
x: 3,
|
|
132
136
|
y: 6,
|
|
133
137
|
width: 18,
|
|
@@ -138,17 +142,17 @@ var ie = O(({ animate: e, ...t }, n) => {
|
|
|
138
142
|
})]
|
|
139
143
|
});
|
|
140
144
|
});
|
|
141
|
-
|
|
145
|
+
ne.displayName = "AudioDescriptionFilledIcon";
|
|
142
146
|
//#endregion
|
|
143
147
|
//#region src/blocks/F0VideoPlayer/components/CaptionsToggleIcons.tsx
|
|
144
|
-
var
|
|
148
|
+
var re = A(({ animate: e, ...t }, n) => /* @__PURE__ */ R("svg", {
|
|
145
149
|
xmlns: "http://www.w3.org/2000/svg",
|
|
146
150
|
fill: "none",
|
|
147
151
|
viewBox: "0 0 24 24",
|
|
148
152
|
ref: n,
|
|
149
153
|
...t,
|
|
150
154
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ L("rect", {
|
|
152
156
|
x: 3.5,
|
|
153
157
|
y: 6.5,
|
|
154
158
|
width: 17,
|
|
@@ -157,13 +161,13 @@ var Q = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
|
|
|
157
161
|
stroke: "currentColor",
|
|
158
162
|
vectorEffect: "non-scaling-stroke"
|
|
159
163
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ L("path", {
|
|
161
165
|
stroke: "currentColor",
|
|
162
166
|
strokeLinecap: "round",
|
|
163
167
|
d: "M7 10.75h8",
|
|
164
168
|
vectorEffect: "non-scaling-stroke"
|
|
165
169
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ L("path", {
|
|
167
171
|
stroke: "currentColor",
|
|
168
172
|
strokeLinecap: "round",
|
|
169
173
|
d: "M7 13.75h4.5",
|
|
@@ -171,14 +175,14 @@ var Q = O(({ animate: e, ...t }, n) => /* @__PURE__ */ I("svg", {
|
|
|
171
175
|
})
|
|
172
176
|
]
|
|
173
177
|
}));
|
|
174
|
-
|
|
175
|
-
var
|
|
178
|
+
re.displayName = "CaptionsLineIcon";
|
|
179
|
+
var ie = A(({ animate: e, ...t }, n) => /* @__PURE__ */ L("svg", {
|
|
176
180
|
xmlns: "http://www.w3.org/2000/svg",
|
|
177
181
|
fill: "none",
|
|
178
182
|
viewBox: "0 0 24 24",
|
|
179
183
|
ref: n,
|
|
180
184
|
...t,
|
|
181
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ L("path", {
|
|
182
186
|
fill: "currentColor",
|
|
183
187
|
fillRule: "evenodd",
|
|
184
188
|
clipRule: "evenodd",
|
|
@@ -186,30 +190,30 @@ var ae = O(({ animate: e, ...t }, n) => /* @__PURE__ */ F("svg", {
|
|
|
186
190
|
vectorEffect: "non-scaling-stroke"
|
|
187
191
|
})
|
|
188
192
|
}));
|
|
189
|
-
|
|
193
|
+
ie.displayName = "CaptionsFilledIcon";
|
|
190
194
|
//#endregion
|
|
191
195
|
//#region src/blocks/F0VideoPlayer/components/PlaybackRateMenu.tsx
|
|
192
|
-
function
|
|
193
|
-
let { t:
|
|
194
|
-
return /* @__PURE__ */
|
|
195
|
-
open:
|
|
196
|
-
onOpenChange:
|
|
197
|
-
children: [/* @__PURE__ */
|
|
196
|
+
function ae({ value: e, onChange: n, containerRef: i }) {
|
|
197
|
+
let { t: o } = t(), [s, c] = I(!1);
|
|
198
|
+
return /* @__PURE__ */ R(te, {
|
|
199
|
+
open: s,
|
|
200
|
+
onOpenChange: c,
|
|
201
|
+
children: [/* @__PURE__ */ L(T, {
|
|
198
202
|
asChild: !0,
|
|
199
|
-
children: /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ L(a, {
|
|
200
204
|
variant: "ghost",
|
|
201
205
|
size: "sm",
|
|
202
|
-
label:
|
|
203
|
-
"aria-label":
|
|
206
|
+
label: X(e),
|
|
207
|
+
"aria-label": o("videoPlayer.playbackSpeed", { rate: X(e) })
|
|
204
208
|
})
|
|
205
|
-
}), /* @__PURE__ */
|
|
206
|
-
container:
|
|
209
|
+
}), /* @__PURE__ */ L(E, {
|
|
210
|
+
container: i.current,
|
|
207
211
|
side: "top",
|
|
208
212
|
align: "end",
|
|
209
213
|
sideOffset: 8,
|
|
210
|
-
className:
|
|
214
|
+
className: r("flex w-auto min-w-[7rem] flex-col gap-0.5 rounded-md border", "border-solid border-f1-border-secondary bg-f1-background p-1 shadow-md"),
|
|
211
215
|
role: "menu",
|
|
212
|
-
"aria-label":
|
|
216
|
+
"aria-label": o("videoPlayer.playbackSpeedLabel"),
|
|
213
217
|
onKeyDown: (e) => {
|
|
214
218
|
let t = Array.from(e.currentTarget.querySelectorAll("[role=\"menuitemradio\"]"));
|
|
215
219
|
if (t.length === 0) return;
|
|
@@ -231,184 +235,184 @@ function oe({ value: e, onChange: t, containerRef: n }) {
|
|
|
231
235
|
}
|
|
232
236
|
e.preventDefault(), t[r]?.focus();
|
|
233
237
|
},
|
|
234
|
-
children:
|
|
235
|
-
let
|
|
236
|
-
return /* @__PURE__ */
|
|
238
|
+
children: W.map((t) => {
|
|
239
|
+
let i = t === e;
|
|
240
|
+
return /* @__PURE__ */ R("button", {
|
|
237
241
|
type: "button",
|
|
238
242
|
role: "menuitemradio",
|
|
239
|
-
"aria-checked":
|
|
240
|
-
className:
|
|
243
|
+
"aria-checked": i,
|
|
244
|
+
className: r("relative flex items-center rounded-xs py-1.5 pl-8 pr-3", "cursor-pointer border-none bg-transparent text-left text-sm font-medium tabular-nums", "text-f1-foreground transition-colors hover:bg-f1-background-secondary", "focus-visible:bg-f1-background-secondary focus-visible:outline-none", "[&_svg]:h-3.5 [&_svg]:w-3.5"),
|
|
241
245
|
onClick: () => {
|
|
242
|
-
t
|
|
246
|
+
n(t), c(!1);
|
|
243
247
|
},
|
|
244
|
-
children: [
|
|
248
|
+
children: [i ? /* @__PURE__ */ L("span", {
|
|
245
249
|
className: "absolute left-2.5 inline-flex items-center",
|
|
246
|
-
children: /* @__PURE__ */
|
|
247
|
-
}) : null,
|
|
248
|
-
},
|
|
250
|
+
children: /* @__PURE__ */ L(v, {})
|
|
251
|
+
}) : null, X(t)]
|
|
252
|
+
}, t);
|
|
249
253
|
})
|
|
250
254
|
})]
|
|
251
255
|
});
|
|
252
256
|
}
|
|
253
257
|
//#endregion
|
|
254
258
|
//#region src/blocks/F0VideoPlayer/components/Seekbar.tsx
|
|
255
|
-
function
|
|
256
|
-
let { t:
|
|
257
|
-
let t =
|
|
259
|
+
function oe({ currentTime: e, duration: n, markerTime: a, blockSeekPastMarker: o = !1, onSeek: s }) {
|
|
260
|
+
let { t: c } = t(), l = F(null), [u, d] = I(!1), [f, p] = I(null), m = n > 0 ? Math.min(1, e / n) : 0, h = a !== void 0 && n > 0 ? Math.min(1, a / n) : 0, g = a !== void 0 && n > 0 && a > 0 && a < n - .25 && e < a - .25, _ = (e) => {
|
|
261
|
+
let t = l.current;
|
|
258
262
|
if (!t) return 0;
|
|
259
263
|
let n = t.getBoundingClientRect();
|
|
260
264
|
return Math.max(0, Math.min(1, (e - n.left) / n.width));
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
+
}, v = (e) => {
|
|
266
|
+
n && s(_(e) * n);
|
|
267
|
+
}, y = (e) => {
|
|
268
|
+
n && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), d(!0), v(e.clientX));
|
|
265
269
|
}, b = (e) => {
|
|
266
|
-
|
|
270
|
+
n && (p(_(e.clientX)), u && v(e.clientX));
|
|
267
271
|
}, x = (e) => {
|
|
268
|
-
|
|
269
|
-
}, S =
|
|
270
|
-
return /* @__PURE__ */
|
|
271
|
-
ref:
|
|
272
|
-
className:
|
|
272
|
+
u && (d(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
|
|
273
|
+
}, S = f !== null && o && a !== void 0 && f > h;
|
|
274
|
+
return /* @__PURE__ */ R("div", {
|
|
275
|
+
ref: l,
|
|
276
|
+
className: r("relative flex h-4 flex-1 items-center rounded-sm", "cursor-pointer touch-none", i()),
|
|
273
277
|
role: "slider",
|
|
274
278
|
tabIndex: 0,
|
|
275
|
-
"aria-label":
|
|
279
|
+
"aria-label": c("videoPlayer.seekLabel"),
|
|
276
280
|
"aria-valuemin": 0,
|
|
277
|
-
"aria-valuemax":
|
|
281
|
+
"aria-valuemax": n || 0,
|
|
278
282
|
"aria-valuenow": e,
|
|
279
|
-
"aria-valuetext":
|
|
280
|
-
current:
|
|
281
|
-
total:
|
|
283
|
+
"aria-valuetext": c("videoPlayer.timeProgress", {
|
|
284
|
+
current: Y(e),
|
|
285
|
+
total: Y(n)
|
|
282
286
|
}),
|
|
283
|
-
onPointerDown:
|
|
287
|
+
onPointerDown: y,
|
|
284
288
|
onPointerMove: b,
|
|
285
289
|
onPointerUp: x,
|
|
286
290
|
onPointerCancel: x,
|
|
287
|
-
onLostPointerCapture: () =>
|
|
288
|
-
onPointerLeave: () =>
|
|
289
|
-
onKeyDown: (
|
|
290
|
-
if (!
|
|
291
|
+
onLostPointerCapture: () => d(!1),
|
|
292
|
+
onPointerLeave: () => p(null),
|
|
293
|
+
onKeyDown: (t) => {
|
|
294
|
+
if (!n) return;
|
|
291
295
|
let r = null;
|
|
292
|
-
switch (
|
|
296
|
+
switch (t.key) {
|
|
293
297
|
case "ArrowLeft":
|
|
294
298
|
r = Math.max(0, e - 5);
|
|
295
299
|
break;
|
|
296
300
|
case "ArrowRight":
|
|
297
|
-
r = Math.min(
|
|
301
|
+
r = Math.min(n, e + 5);
|
|
298
302
|
break;
|
|
299
303
|
case "Home":
|
|
300
304
|
r = 0;
|
|
301
305
|
break;
|
|
302
306
|
case "End":
|
|
303
|
-
r =
|
|
307
|
+
r = n;
|
|
304
308
|
break;
|
|
305
309
|
default: return;
|
|
306
310
|
}
|
|
307
|
-
|
|
311
|
+
t.preventDefault(), t.stopPropagation(), s(r);
|
|
308
312
|
},
|
|
309
313
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ L("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
|
|
315
|
+
/* @__PURE__ */ L("div", {
|
|
312
316
|
className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
|
|
313
|
-
style: { width: `${
|
|
317
|
+
style: { width: `${m * 100}%` }
|
|
314
318
|
}),
|
|
315
|
-
|
|
319
|
+
g ? /* @__PURE__ */ L("div", {
|
|
316
320
|
className: "pointer-events-none absolute z-[1] h-2.5 w-0.5 -translate-x-px bg-f1-foreground/95",
|
|
317
|
-
style: { left: `${
|
|
321
|
+
style: { left: `${h * 100}%` },
|
|
318
322
|
"aria-hidden": "true"
|
|
319
323
|
}) : null,
|
|
320
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ L("div", {
|
|
321
325
|
className: "pointer-events-none absolute z-[2] h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
|
|
322
|
-
style: { left: `${
|
|
326
|
+
style: { left: `${m * 100}%` }
|
|
323
327
|
}),
|
|
324
|
-
S ? /* @__PURE__ */
|
|
328
|
+
S ? /* @__PURE__ */ L("div", { className: "absolute inset-0 cursor-not-allowed" }) : null
|
|
325
329
|
]
|
|
326
330
|
});
|
|
327
331
|
}
|
|
328
332
|
//#endregion
|
|
329
333
|
//#region src/blocks/F0VideoPlayer/components/SettingsMenu.tsx
|
|
330
|
-
var
|
|
331
|
-
function de({ icon: e, label:
|
|
332
|
-
let
|
|
333
|
-
return /* @__PURE__ */
|
|
334
|
+
var se = "off", ce = "py-2 pr-4 text-base font-medium", le = "gap-2 py-2 pl-3 pr-2 text-base font-medium", ue = "max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[13rem] overflow-y-auto p-1";
|
|
335
|
+
function de({ icon: e, label: t, container: n, options: r, value: i, onLanguageChange: a, on: o, onOff: s, offLabel: c }) {
|
|
336
|
+
let l = s !== void 0, u = r.find((e) => e.locale === i), d = l && !o ? c : u ? H(u) : c;
|
|
337
|
+
return /* @__PURE__ */ R(ee, { children: [/* @__PURE__ */ R(b, {
|
|
334
338
|
className: le,
|
|
335
339
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ L(g, { icon: e }),
|
|
341
|
+
/* @__PURE__ */ L("span", {
|
|
338
342
|
className: "flex-1",
|
|
339
|
-
children:
|
|
343
|
+
children: t
|
|
340
344
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ L("span", {
|
|
342
346
|
className: "text-f1-foreground-secondary",
|
|
343
|
-
children:
|
|
347
|
+
children: d
|
|
344
348
|
})
|
|
345
349
|
]
|
|
346
|
-
}), /* @__PURE__ */
|
|
347
|
-
container:
|
|
348
|
-
children: /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ L(w, {
|
|
351
|
+
container: n ?? void 0,
|
|
352
|
+
children: /* @__PURE__ */ L(O, {
|
|
349
353
|
className: ue,
|
|
350
|
-
children: /* @__PURE__ */
|
|
351
|
-
value:
|
|
352
|
-
onValueChange: (e) =>
|
|
353
|
-
children: [
|
|
354
|
+
children: /* @__PURE__ */ R(x, {
|
|
355
|
+
value: l ? o ? i : se : i,
|
|
356
|
+
onValueChange: (e) => l && e === se ? s() : a(e),
|
|
357
|
+
children: [r.map((e) => /* @__PURE__ */ L(C, {
|
|
354
358
|
value: e.locale,
|
|
355
359
|
className: ce,
|
|
356
|
-
children:
|
|
357
|
-
}, e.locale)),
|
|
358
|
-
value:
|
|
360
|
+
children: H(e)
|
|
361
|
+
}, e.locale)), l ? /* @__PURE__ */ L(C, {
|
|
362
|
+
value: se,
|
|
359
363
|
className: ce,
|
|
360
|
-
children:
|
|
364
|
+
children: c
|
|
361
365
|
}) : null]
|
|
362
366
|
})
|
|
363
367
|
})
|
|
364
368
|
})] });
|
|
365
369
|
}
|
|
366
|
-
function fe({ containerRef:
|
|
367
|
-
let { t:
|
|
368
|
-
return /* @__PURE__ */
|
|
370
|
+
function fe({ containerRef: e, audioLanguages: n, audioLanguage: r, onAudioLanguageChange: i, captionLanguages: o, captionLanguage: s, captionsOn: c, onCaptionLanguageChange: l, onCaptionsOff: u, audioDescriptionLanguages: p, audioDescriptionLanguage: m, audioDescriptionOn: h, onAudioDescriptionLanguageChange: g, onAudioDescriptionOff: _ }) {
|
|
371
|
+
let { t: v } = t(), b = e.current, x = v("videoPlayer.off");
|
|
372
|
+
return /* @__PURE__ */ R(D, { children: [/* @__PURE__ */ L(S, {
|
|
369
373
|
asChild: !0,
|
|
370
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ L(a, {
|
|
371
375
|
variant: "ghost",
|
|
372
376
|
size: "sm",
|
|
373
377
|
hideLabel: !0,
|
|
374
|
-
icon:
|
|
375
|
-
label:
|
|
378
|
+
icon: f,
|
|
379
|
+
label: v("videoPlayer.settings")
|
|
376
380
|
})
|
|
377
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ R(y, {
|
|
378
382
|
container: b,
|
|
379
383
|
side: "top",
|
|
380
384
|
align: "end",
|
|
381
385
|
className: ue,
|
|
382
386
|
children: [
|
|
383
|
-
n.length > 1 ? /* @__PURE__ */
|
|
384
|
-
icon:
|
|
385
|
-
label:
|
|
387
|
+
n.length > 1 ? /* @__PURE__ */ L(de, {
|
|
388
|
+
icon: d,
|
|
389
|
+
label: v("videoPlayer.audio"),
|
|
386
390
|
container: b,
|
|
387
391
|
options: n,
|
|
388
392
|
value: r,
|
|
389
393
|
onLanguageChange: i,
|
|
390
394
|
offLabel: x
|
|
391
395
|
}) : null,
|
|
392
|
-
o.length > 1 ? /* @__PURE__ */
|
|
393
|
-
icon:
|
|
394
|
-
label:
|
|
396
|
+
o.length > 1 ? /* @__PURE__ */ L(de, {
|
|
397
|
+
icon: re,
|
|
398
|
+
label: v("videoPlayer.subtitles"),
|
|
395
399
|
container: b,
|
|
396
400
|
options: o,
|
|
397
401
|
value: s,
|
|
398
402
|
on: c,
|
|
399
403
|
onLanguageChange: l,
|
|
400
|
-
onOff:
|
|
404
|
+
onOff: u,
|
|
401
405
|
offLabel: x
|
|
402
406
|
}) : null,
|
|
403
|
-
|
|
404
|
-
icon:
|
|
405
|
-
label:
|
|
407
|
+
p.length > 1 ? /* @__PURE__ */ L(de, {
|
|
408
|
+
icon: $,
|
|
409
|
+
label: v("videoPlayer.audioDescription"),
|
|
406
410
|
container: b,
|
|
407
|
-
options:
|
|
408
|
-
value:
|
|
409
|
-
on:
|
|
410
|
-
onLanguageChange:
|
|
411
|
-
onOff:
|
|
411
|
+
options: p,
|
|
412
|
+
value: m,
|
|
413
|
+
on: h,
|
|
414
|
+
onLanguageChange: g,
|
|
415
|
+
onOff: _,
|
|
412
416
|
offLabel: x
|
|
413
417
|
}) : null
|
|
414
418
|
]
|
|
@@ -420,189 +424,189 @@ function pe(e) {
|
|
|
420
424
|
//#endregion
|
|
421
425
|
//#region src/blocks/F0VideoPlayer/components/VolumeControl.tsx
|
|
422
426
|
function me(e, t) {
|
|
423
|
-
return t || e === 0 ?
|
|
427
|
+
return t || e === 0 ? o : e <= .5 ? l : c;
|
|
424
428
|
}
|
|
425
|
-
function he({ volume: e, isMuted:
|
|
426
|
-
let { t:
|
|
427
|
-
return
|
|
429
|
+
function he({ volume: e, isMuted: n, onToggleMute: r, onVolumeChange: i, silent: s = !1 }) {
|
|
430
|
+
let { t: c } = t(), l = n || e === 0;
|
|
431
|
+
return s ? /* @__PURE__ */ L(a, {
|
|
428
432
|
variant: "ghost",
|
|
429
433
|
size: "sm",
|
|
430
434
|
hideLabel: !0,
|
|
431
435
|
disabled: !0,
|
|
432
|
-
icon:
|
|
433
|
-
label:
|
|
434
|
-
}) : /* @__PURE__ */
|
|
436
|
+
icon: o,
|
|
437
|
+
label: c("videoPlayer.noAudio")
|
|
438
|
+
}) : /* @__PURE__ */ R("div", {
|
|
435
439
|
className: "flex items-center gap-1",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ L(a, {
|
|
437
441
|
variant: "ghost",
|
|
438
442
|
size: "sm",
|
|
439
443
|
hideLabel: !0,
|
|
440
|
-
icon: me(e,
|
|
441
|
-
label:
|
|
442
|
-
onClick:
|
|
443
|
-
}), /* @__PURE__ */
|
|
444
|
-
value:
|
|
445
|
-
onChange:
|
|
444
|
+
icon: me(e, l),
|
|
445
|
+
label: c(l ? "videoPlayer.unmute" : "videoPlayer.mute"),
|
|
446
|
+
onClick: r
|
|
447
|
+
}), /* @__PURE__ */ L(ge, {
|
|
448
|
+
value: l ? 0 : e,
|
|
449
|
+
onChange: i
|
|
446
450
|
})]
|
|
447
451
|
});
|
|
448
452
|
}
|
|
449
|
-
function ge({ value: e, onChange:
|
|
450
|
-
let { t:
|
|
451
|
-
let t =
|
|
453
|
+
function ge({ value: e, onChange: n }) {
|
|
454
|
+
let { t: a } = t(), o = F(null), [s, c] = I(!1), l = Math.max(0, Math.min(1, e)), u = (e) => {
|
|
455
|
+
let t = o.current;
|
|
452
456
|
if (!t) return 0;
|
|
453
|
-
let n = t.getBoundingClientRect(),
|
|
454
|
-
return
|
|
455
|
-
},
|
|
456
|
-
e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId),
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
},
|
|
460
|
-
|
|
457
|
+
let n = t.getBoundingClientRect(), r = n.width - 12;
|
|
458
|
+
return r <= 0 ? 0 : Math.max(0, Math.min(1, (e - n.left - 6) / r));
|
|
459
|
+
}, d = (e) => {
|
|
460
|
+
e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), c(!0), n(u(e.clientX));
|
|
461
|
+
}, f = (e) => {
|
|
462
|
+
s && n(u(e.clientX));
|
|
463
|
+
}, p = (e) => {
|
|
464
|
+
s && (c(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
|
|
461
465
|
};
|
|
462
|
-
return /* @__PURE__ */
|
|
463
|
-
ref:
|
|
464
|
-
className:
|
|
466
|
+
return /* @__PURE__ */ R("div", {
|
|
467
|
+
ref: o,
|
|
468
|
+
className: r("relative flex h-4 w-[60px] items-center rounded-sm", "cursor-pointer touch-none", i()),
|
|
465
469
|
role: "slider",
|
|
466
470
|
tabIndex: 0,
|
|
467
|
-
"aria-label":
|
|
471
|
+
"aria-label": a("videoPlayer.volume"),
|
|
468
472
|
"aria-valuemin": 0,
|
|
469
473
|
"aria-valuemax": 1,
|
|
470
|
-
"aria-valuenow": Number(
|
|
471
|
-
"aria-valuetext": `${Math.round(
|
|
472
|
-
onPointerDown:
|
|
473
|
-
onPointerMove:
|
|
474
|
-
onPointerUp:
|
|
475
|
-
onPointerCancel:
|
|
476
|
-
onLostPointerCapture: () =>
|
|
474
|
+
"aria-valuenow": Number(l.toFixed(2)),
|
|
475
|
+
"aria-valuetext": `${Math.round(l * 100)}%`,
|
|
476
|
+
onPointerDown: d,
|
|
477
|
+
onPointerMove: f,
|
|
478
|
+
onPointerUp: p,
|
|
479
|
+
onPointerCancel: p,
|
|
480
|
+
onLostPointerCapture: () => c(!1),
|
|
477
481
|
onKeyDown: (e) => {
|
|
478
|
-
let
|
|
482
|
+
let t = null;
|
|
479
483
|
switch (e.key) {
|
|
480
484
|
case "ArrowRight":
|
|
481
485
|
case "ArrowUp":
|
|
482
|
-
|
|
486
|
+
t = Math.min(1, l + G);
|
|
483
487
|
break;
|
|
484
488
|
case "ArrowLeft":
|
|
485
489
|
case "ArrowDown":
|
|
486
|
-
|
|
490
|
+
t = Math.max(0, l - G);
|
|
487
491
|
break;
|
|
488
492
|
case "Home":
|
|
489
|
-
|
|
493
|
+
t = 0;
|
|
490
494
|
break;
|
|
491
495
|
case "End":
|
|
492
|
-
|
|
496
|
+
t = 1;
|
|
493
497
|
break;
|
|
494
498
|
default: return;
|
|
495
499
|
}
|
|
496
|
-
e.preventDefault(), e.stopPropagation(), t
|
|
500
|
+
e.preventDefault(), e.stopPropagation(), n(t);
|
|
497
501
|
},
|
|
498
502
|
children: [
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ L("div", { className: "absolute inset-x-0 h-1 rounded-sm bg-f1-foreground/30" }),
|
|
504
|
+
/* @__PURE__ */ L("div", {
|
|
501
505
|
className: "pointer-events-none absolute left-0 h-1 rounded-sm bg-f1-foreground",
|
|
502
|
-
style: { width: `calc(12px + (100% - 12px) * ${
|
|
506
|
+
style: { width: `calc(12px + (100% - 12px) * ${l})` }
|
|
503
507
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ L("div", {
|
|
505
509
|
className: "pointer-events-none absolute h-3 w-3 -translate-x-1/2 rounded-full bg-f1-foreground shadow-[0_0_4px_rgba(0,0,0,0.4)]",
|
|
506
|
-
style: { left: `calc(6px + (100% - 12px) * ${
|
|
510
|
+
style: { left: `calc(6px + (100% - 12px) * ${l})` }
|
|
507
511
|
})
|
|
508
512
|
]
|
|
509
513
|
});
|
|
510
514
|
}
|
|
511
515
|
//#endregion
|
|
512
516
|
//#region src/blocks/F0VideoPlayer/components/Controls.tsx
|
|
513
|
-
function _e({ isPlaying: e, currentTime:
|
|
514
|
-
let { t:
|
|
515
|
-
audioLanguages:
|
|
516
|
-
captionLanguages:
|
|
517
|
-
audioDescriptionLanguages:
|
|
517
|
+
function _e({ isPlaying: e, currentTime: n, duration: i, volume: o, isMuted: c, playbackRate: l, isFullscreen: d, markerTime: f, blockSeekPastMarker: g, containerRef: _, captionsAvailable: v, captionsOn: y, audioDescriptionAvailable: b, audioDescriptionOn: x, silent: S, persist: C, audioLanguages: w, audioLanguage: ee, onAudioLanguageChange: T, captionLanguages: E, captionLanguage: D, onCaptionLanguageChange: te, onCaptionsOff: O, audioDescriptionLanguages: k, audioDescriptionLanguage: A, onAudioDescriptionLanguageChange: j, onAudioDescriptionOff: M, onTogglePlay: N, onToggleMute: P, onVolumeChange: F, onPlaybackRateChange: I, onToggleFullscreen: z, onToggleCaptions: B, onToggleAudioDescription: V, onSeek: H, download: U }) {
|
|
518
|
+
let { t: W } = t(), G = v && E.length <= 1, K = b && k.length <= 1, q = pe({
|
|
519
|
+
audioLanguages: w.length,
|
|
520
|
+
captionLanguages: E.length,
|
|
521
|
+
audioDescriptionLanguages: k.length
|
|
518
522
|
});
|
|
519
|
-
return /* @__PURE__ */
|
|
520
|
-
className:
|
|
523
|
+
return /* @__PURE__ */ R("div", {
|
|
524
|
+
className: r("dark absolute inset-x-0 bottom-0 z-[2] flex select-none items-center gap-2", "rounded-b-[inherit] bg-gradient-to-t from-[#000000f2] via-[#000000b3] to-transparent px-3 py-3", "[text-shadow:0_1px_2px_rgba(0,0,0,0.55)] [&_svg]:drop-shadow-[0_1px_2px_rgba(0,0,0,0.55)]", "transition-opacity duration-200 motion-reduce:transition-none", !e || C ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),
|
|
521
525
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ L(a, {
|
|
523
527
|
variant: "ghost",
|
|
524
528
|
size: "sm",
|
|
525
529
|
hideLabel: !0,
|
|
526
|
-
icon: e ?
|
|
527
|
-
label:
|
|
528
|
-
onClick:
|
|
530
|
+
icon: e ? u : m,
|
|
531
|
+
label: W(e ? "videoPlayer.pause" : "videoPlayer.play"),
|
|
532
|
+
onClick: N
|
|
529
533
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
currentTime:
|
|
532
|
-
duration:
|
|
533
|
-
markerTime:
|
|
534
|
-
blockSeekPastMarker:
|
|
535
|
-
onSeek:
|
|
534
|
+
/* @__PURE__ */ L(oe, {
|
|
535
|
+
currentTime: n,
|
|
536
|
+
duration: i,
|
|
537
|
+
markerTime: f,
|
|
538
|
+
blockSeekPastMarker: g,
|
|
539
|
+
onSeek: H
|
|
536
540
|
}),
|
|
537
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ R("span", {
|
|
538
542
|
className: "min-w-[80px] whitespace-nowrap text-center text-base font-medium tabular-nums text-f1-foreground",
|
|
539
543
|
children: [
|
|
540
|
-
|
|
544
|
+
Y(n),
|
|
541
545
|
" / ",
|
|
542
|
-
|
|
546
|
+
Y(i)
|
|
543
547
|
]
|
|
544
548
|
}),
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
volume:
|
|
547
|
-
isMuted:
|
|
548
|
-
onToggleMute:
|
|
549
|
-
onVolumeChange:
|
|
550
|
-
silent:
|
|
549
|
+
/* @__PURE__ */ L(he, {
|
|
550
|
+
volume: o,
|
|
551
|
+
isMuted: c,
|
|
552
|
+
onToggleMute: P,
|
|
553
|
+
onVolumeChange: F,
|
|
554
|
+
silent: S
|
|
551
555
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
value:
|
|
554
|
-
onChange:
|
|
555
|
-
containerRef:
|
|
556
|
+
/* @__PURE__ */ L(ae, {
|
|
557
|
+
value: l,
|
|
558
|
+
onChange: I,
|
|
559
|
+
containerRef: _
|
|
556
560
|
}),
|
|
557
|
-
|
|
561
|
+
G ? /* @__PURE__ */ L(a, {
|
|
558
562
|
variant: "ghost",
|
|
559
563
|
size: "sm",
|
|
560
564
|
hideLabel: !0,
|
|
561
|
-
icon:
|
|
562
|
-
label:
|
|
563
|
-
"aria-pressed":
|
|
564
|
-
onClick:
|
|
565
|
+
icon: y ? ie : re,
|
|
566
|
+
label: W("videoPlayer.captions"),
|
|
567
|
+
"aria-pressed": y,
|
|
568
|
+
onClick: B
|
|
565
569
|
}) : null,
|
|
566
|
-
|
|
570
|
+
K ? /* @__PURE__ */ L(a, {
|
|
567
571
|
variant: "ghost",
|
|
568
572
|
size: "sm",
|
|
569
573
|
hideLabel: !0,
|
|
570
|
-
icon:
|
|
571
|
-
label:
|
|
572
|
-
"aria-pressed":
|
|
573
|
-
onClick:
|
|
574
|
+
icon: x ? ne : $,
|
|
575
|
+
label: W("videoPlayer.audioDescription"),
|
|
576
|
+
"aria-pressed": x,
|
|
577
|
+
onClick: V
|
|
574
578
|
}) : null,
|
|
575
|
-
|
|
576
|
-
containerRef:
|
|
577
|
-
audioLanguages:
|
|
578
|
-
audioLanguage:
|
|
579
|
-
onAudioLanguageChange:
|
|
580
|
-
captionLanguages:
|
|
581
|
-
captionLanguage:
|
|
582
|
-
captionsOn:
|
|
583
|
-
onCaptionLanguageChange:
|
|
584
|
-
onCaptionsOff:
|
|
585
|
-
audioDescriptionLanguages:
|
|
586
|
-
audioDescriptionLanguage:
|
|
587
|
-
audioDescriptionOn:
|
|
588
|
-
onAudioDescriptionLanguageChange:
|
|
589
|
-
onAudioDescriptionOff:
|
|
579
|
+
q ? /* @__PURE__ */ L(fe, {
|
|
580
|
+
containerRef: _,
|
|
581
|
+
audioLanguages: w,
|
|
582
|
+
audioLanguage: ee,
|
|
583
|
+
onAudioLanguageChange: T,
|
|
584
|
+
captionLanguages: E,
|
|
585
|
+
captionLanguage: D,
|
|
586
|
+
captionsOn: y,
|
|
587
|
+
onCaptionLanguageChange: te,
|
|
588
|
+
onCaptionsOff: O,
|
|
589
|
+
audioDescriptionLanguages: k,
|
|
590
|
+
audioDescriptionLanguage: A,
|
|
591
|
+
audioDescriptionOn: x,
|
|
592
|
+
onAudioDescriptionLanguageChange: j,
|
|
593
|
+
onAudioDescriptionOff: M
|
|
590
594
|
}) : null,
|
|
591
|
-
|
|
595
|
+
U ? /* @__PURE__ */ L(a, {
|
|
592
596
|
variant: "ghost",
|
|
593
597
|
size: "sm",
|
|
594
598
|
hideLabel: !0,
|
|
595
|
-
icon:
|
|
596
|
-
label:
|
|
597
|
-
onClick:
|
|
599
|
+
icon: s,
|
|
600
|
+
label: U.label,
|
|
601
|
+
onClick: U.onClick
|
|
598
602
|
}) : null,
|
|
599
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ L(a, {
|
|
600
604
|
variant: "ghost",
|
|
601
605
|
size: "sm",
|
|
602
606
|
hideLabel: !0,
|
|
603
|
-
icon:
|
|
604
|
-
label:
|
|
605
|
-
onClick:
|
|
607
|
+
icon: d ? h : p,
|
|
608
|
+
label: W(d ? "videoPlayer.exitFullscreen" : "videoPlayer.enterFullscreen"),
|
|
609
|
+
onClick: z
|
|
606
610
|
})
|
|
607
611
|
]
|
|
608
612
|
});
|
|
@@ -611,8 +615,8 @@ function _e({ isPlaying: e, currentTime: t, duration: n, volume: r, isMuted: i,
|
|
|
611
615
|
//#region src/blocks/F0VideoPlayer/hooks/useVttSource.ts
|
|
612
616
|
var ve = (e) => e.trimStart().startsWith("WEBVTT");
|
|
613
617
|
function ye(e) {
|
|
614
|
-
let t = e !== void 0 && ve(e), [n, r] =
|
|
615
|
-
return
|
|
618
|
+
let t = e !== void 0 && ve(e), [n, r] = I();
|
|
619
|
+
return M(() => {
|
|
616
620
|
if (e === void 0 || !ve(e)) {
|
|
617
621
|
r(void 0);
|
|
618
622
|
return;
|
|
@@ -628,8 +632,8 @@ function ye(e) {
|
|
|
628
632
|
//#region src/blocks/F0VideoPlayer/hooks/useAudioDescription.ts
|
|
629
633
|
var be = "descriptions";
|
|
630
634
|
function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
|
|
631
|
-
let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ye(r), [s, c] =
|
|
632
|
-
return
|
|
635
|
+
let i = n !== void 0, { trackSrc: a, needsCrossOrigin: o } = ye(r), [s, c] = I(!1), l = i || r !== void 0 || s, [u, d] = I(), f = F(!1);
|
|
636
|
+
return M(() => {
|
|
633
637
|
if (!e) return;
|
|
634
638
|
let n = e.textTracks, a = typeof window < "u" && "speechSynthesis" in window, o = t && !i && a, s = () => {
|
|
635
639
|
f.current && (f.current = !1, e.play().catch(() => {}));
|
|
@@ -661,7 +665,7 @@ function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
|
|
|
661
665
|
i,
|
|
662
666
|
r,
|
|
663
667
|
a
|
|
664
|
-
]),
|
|
668
|
+
]), P(() => ({
|
|
665
669
|
trackSrc: a,
|
|
666
670
|
needsCrossOrigin: o,
|
|
667
671
|
available: l,
|
|
@@ -676,7 +680,7 @@ function xe(e, { enabled: t, describedSrc: n, descriptions: r }) {
|
|
|
676
680
|
//#endregion
|
|
677
681
|
//#region src/blocks/F0VideoPlayer/hooks/useKeyboardShortcuts.ts
|
|
678
682
|
function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscreen: i, setVolume: a }) {
|
|
679
|
-
return
|
|
683
|
+
return j((o) => {
|
|
680
684
|
let s = o.target;
|
|
681
685
|
if (s instanceof HTMLElement && (s.closest("button, a, input, textarea, select, [role=\"button\"], [contenteditable=\"true\"]") || s.closest("[role=\"menu\"], [role^=\"menuitem\"]") || s.getAttribute("role") === "slider")) return;
|
|
682
686
|
let c = e.current;
|
|
@@ -694,10 +698,10 @@ function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
|
|
|
694
698
|
return;
|
|
695
699
|
}
|
|
696
700
|
case "ArrowUp":
|
|
697
|
-
o.preventDefault(), a(Math.min(1, c.volume +
|
|
701
|
+
o.preventDefault(), a(Math.min(1, c.volume + G));
|
|
698
702
|
return;
|
|
699
703
|
case "ArrowDown":
|
|
700
|
-
o.preventDefault(), a(Math.max(0, c.volume -
|
|
704
|
+
o.preventDefault(), a(Math.max(0, c.volume - G));
|
|
701
705
|
return;
|
|
702
706
|
case "m":
|
|
703
707
|
o.preventDefault(), r();
|
|
@@ -719,12 +723,12 @@ function Se({ videoRef: e, seek: t, togglePlay: n, toggleMute: r, toggleFullscre
|
|
|
719
723
|
//#endregion
|
|
720
724
|
//#region src/blocks/F0VideoPlayer/hooks/useRestrictForwardSeek.ts
|
|
721
725
|
function Ce({ video: e, enabled: t, resetKey: n }) {
|
|
722
|
-
let r =
|
|
726
|
+
let r = F(0), i = F(0), a = F(t);
|
|
723
727
|
a.current = t;
|
|
724
|
-
let [o, s] =
|
|
725
|
-
return
|
|
728
|
+
let [o, s] = I(0);
|
|
729
|
+
return M(() => {
|
|
726
730
|
r.current = 0, i.current = 0, s(0);
|
|
727
|
-
}, [n]),
|
|
731
|
+
}, [n]), M(() => {
|
|
728
732
|
if (!e) return;
|
|
729
733
|
let t = () => {
|
|
730
734
|
a.current && e.currentTime > r.current + .25 && (e.currentTime = r.current);
|
|
@@ -746,17 +750,17 @@ function Ce({ video: e, enabled: t, resetKey: n }) {
|
|
|
746
750
|
};
|
|
747
751
|
}, [e]), {
|
|
748
752
|
maxWatchedTime: o,
|
|
749
|
-
clampSeek:
|
|
753
|
+
clampSeek: j((e) => a.current ? Math.min(e, r.current) : e, [])
|
|
750
754
|
};
|
|
751
755
|
}
|
|
752
756
|
//#endregion
|
|
753
757
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoCaptions.ts
|
|
754
758
|
var we = /* @__PURE__ */ new Set(["captions", "subtitles"]), Te = 2, Ee = 3;
|
|
755
759
|
function De(e, t) {
|
|
756
|
-
let { trackSrc: n, needsCrossOrigin: r } = ye(t), [i, a] =
|
|
757
|
-
return
|
|
760
|
+
let { trackSrc: n, needsCrossOrigin: r } = ye(t), [i, a] = I(!1), [o, s] = I(!1), [c, l] = I(!1), u = o || t !== void 0 && !c;
|
|
761
|
+
return M(() => {
|
|
758
762
|
l(!1), s(!1);
|
|
759
|
-
}, [n]),
|
|
763
|
+
}, [n]), M(() => {
|
|
760
764
|
if (!e) return;
|
|
761
765
|
let t = e.textTracks, n = e.querySelector("track[kind=\"captions\"]"), r = () => {
|
|
762
766
|
let e = !1;
|
|
@@ -791,7 +795,7 @@ function De(e, t) {
|
|
|
791
795
|
t,
|
|
792
796
|
i,
|
|
793
797
|
n
|
|
794
|
-
]),
|
|
798
|
+
]), P(() => ({
|
|
795
799
|
trackSrc: n,
|
|
796
800
|
needsCrossOrigin: r,
|
|
797
801
|
available: u,
|
|
@@ -807,15 +811,15 @@ function De(e, t) {
|
|
|
807
811
|
//#endregion
|
|
808
812
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoCompletion.ts
|
|
809
813
|
function Oe(e) {
|
|
810
|
-
return e - Math.min(10, e *
|
|
814
|
+
return e - Math.min(10, e * J);
|
|
811
815
|
}
|
|
812
816
|
function ke({ video: e, onComplete: t, resetKey: n }) {
|
|
813
|
-
let r =
|
|
817
|
+
let r = F(t);
|
|
814
818
|
r.current = t;
|
|
815
|
-
let i =
|
|
816
|
-
|
|
819
|
+
let i = F(!1), a = !!t;
|
|
820
|
+
M(() => {
|
|
817
821
|
i.current = !1;
|
|
818
|
-
}, [n]),
|
|
822
|
+
}, [n]), M(() => {
|
|
819
823
|
if (!e || !a) return;
|
|
820
824
|
let t = () => {
|
|
821
825
|
!i.current && e.duration && e.currentTime >= Oe(e.duration) && (i.current = !0, r.current?.(e));
|
|
@@ -828,17 +832,17 @@ function ke({ video: e, onComplete: t, resetKey: n }) {
|
|
|
828
832
|
//#endregion
|
|
829
833
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoMilestones.ts
|
|
830
834
|
function Ae({ video: e, onMilestone: t, resetKey: n }) {
|
|
831
|
-
let r =
|
|
835
|
+
let r = F(t);
|
|
832
836
|
r.current = t;
|
|
833
|
-
let i =
|
|
834
|
-
|
|
837
|
+
let i = F(/* @__PURE__ */ new Set()), a = !!t;
|
|
838
|
+
M(() => {
|
|
835
839
|
i.current.clear();
|
|
836
|
-
}, [n]),
|
|
840
|
+
}, [n]), M(() => {
|
|
837
841
|
if (!e || !a) return;
|
|
838
842
|
let t = () => {
|
|
839
843
|
if (!e.duration) return;
|
|
840
844
|
let t = Math.round(e.currentTime / e.duration * 100);
|
|
841
|
-
for (let n of
|
|
845
|
+
for (let n of K) i.current.has(n) || t >= n && (i.current.add(n), r.current?.(n, e));
|
|
842
846
|
};
|
|
843
847
|
return e.addEventListener("timeupdate", t), () => {
|
|
844
848
|
e.removeEventListener("timeupdate", t);
|
|
@@ -848,18 +852,18 @@ function Ae({ video: e, onMilestone: t, resetKey: n }) {
|
|
|
848
852
|
//#endregion
|
|
849
853
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoState.ts
|
|
850
854
|
function je(e) {
|
|
851
|
-
let t =
|
|
855
|
+
let t = F(null), [n, r] = I(null), i = F(0), a = j((e) => {
|
|
852
856
|
t.current = e, r(e);
|
|
853
|
-
}, []), [o, s] =
|
|
854
|
-
return
|
|
857
|
+
}, []), [o, s] = I(!1), [c, l] = I(!1), [u, d] = I(0), [f, p] = I(0), [m, h] = I(1), [g, _] = I(!1), [v, y] = I(1);
|
|
858
|
+
return M(() => {
|
|
855
859
|
i.current = 0, t.current && (t.current.playbackRate = 1), s(!1), l(!1), d(0), p(0), y(1);
|
|
856
|
-
}, [e]),
|
|
860
|
+
}, [e]), M(() => {
|
|
857
861
|
let e = n;
|
|
858
862
|
if (!e) return;
|
|
859
863
|
let t = () => l(!0), r = () => l(!1), a = () => l(!1), o = () => {
|
|
860
864
|
h(e.volume), _(e.muted);
|
|
861
865
|
}, s = () => p(e.duration || 0), c = () => {
|
|
862
|
-
|
|
866
|
+
Z(e.playbackRate) && y(e.playbackRate);
|
|
863
867
|
}, u = () => {
|
|
864
868
|
let t = performance.now();
|
|
865
869
|
t - i.current >= 250 && (i.current = t, d(e.currentTime));
|
|
@@ -879,25 +883,25 @@ function je(e) {
|
|
|
879
883
|
isMuted: g,
|
|
880
884
|
playbackRate: v,
|
|
881
885
|
setVideoLoaded: s,
|
|
882
|
-
togglePlay:
|
|
886
|
+
togglePlay: j(() => {
|
|
883
887
|
let e = t.current;
|
|
884
888
|
e && (e.paused || e.ended ? e.play().catch(() => {}) : e.pause());
|
|
885
889
|
}, []),
|
|
886
|
-
toggleMute:
|
|
890
|
+
toggleMute: j(() => {
|
|
887
891
|
let e = t.current;
|
|
888
892
|
e && (e.muted = !e.muted);
|
|
889
893
|
}, []),
|
|
890
|
-
setVolume:
|
|
894
|
+
setVolume: j((e) => {
|
|
891
895
|
let n = t.current;
|
|
892
896
|
if (!n) return;
|
|
893
897
|
let r = Math.max(0, Math.min(1, e));
|
|
894
898
|
n.volume = r, n.muted = r === 0;
|
|
895
899
|
}, []),
|
|
896
|
-
setPlaybackRate:
|
|
900
|
+
setPlaybackRate: j((e) => {
|
|
897
901
|
let n = t.current;
|
|
898
902
|
n && (n.playbackRate = e);
|
|
899
903
|
}, []),
|
|
900
|
-
seekTo:
|
|
904
|
+
seekTo: j((e) => {
|
|
901
905
|
let n = t.current;
|
|
902
906
|
if (!n) return;
|
|
903
907
|
let r = Math.max(0, Math.min(e, n.duration || e));
|
|
@@ -908,17 +912,17 @@ function je(e) {
|
|
|
908
912
|
//#endregion
|
|
909
913
|
//#region src/blocks/F0VideoPlayer/hooks/useVideoTracking.ts
|
|
910
914
|
function Me({ video: e, onTrackAction: t }) {
|
|
911
|
-
let n =
|
|
915
|
+
let n = F(t);
|
|
912
916
|
n.current = t;
|
|
913
917
|
let r = !!t;
|
|
914
|
-
|
|
918
|
+
M(() => {
|
|
915
919
|
if (!e || !r) return;
|
|
916
920
|
let t = null, i = () => {
|
|
917
921
|
t &&= (clearInterval(t), null);
|
|
918
922
|
}, a = () => {
|
|
919
923
|
n.current?.(), i(), t = setInterval(() => {
|
|
920
924
|
n.current?.();
|
|
921
|
-
},
|
|
925
|
+
}, q);
|
|
922
926
|
}, o = () => {
|
|
923
927
|
n.current?.(), i();
|
|
924
928
|
}, s = () => i();
|
|
@@ -929,185 +933,185 @@ function Me({ video: e, onTrackAction: t }) {
|
|
|
929
933
|
}
|
|
930
934
|
//#endregion
|
|
931
935
|
//#region src/blocks/F0VideoPlayer/internal.tsx
|
|
932
|
-
function Ne({ src: e, poster:
|
|
933
|
-
let { t:
|
|
934
|
-
enabled:
|
|
935
|
-
describedSrc:
|
|
936
|
-
descriptions:
|
|
937
|
-
}),
|
|
938
|
-
let e =
|
|
936
|
+
function Ne({ src: e, poster: n, ariaLabel: a, silent: o = !1, persistControls: s = !1, content: c, defaultLanguage: l, autoPlay: u = !1, autoFocus: d = !1, download: f, restrictForwardSeek: p = !1, onTrackAction: h, onMilestone: g, onComplete: v, ...y }) {
|
|
937
|
+
let { t: b } = t(), x = F(null), S = P(() => V(e), [e]), [C, w] = I(() => U(S, l)), ee = S.some((e) => e.locale === C) ? C : U(S, l), T = B(e, ee) ?? "", E = P(() => V(c?.captions), [c?.captions]), [D, te] = I(() => U(E, l)), O = E.some((e) => e.locale === D) ? D : U(E, l), A = B(c?.captions, O), N = P(() => V(c?.descriptions, c?.describedSrc), [c?.descriptions, c?.describedSrc]), [z, H] = I(() => U(N, l)), W = N.some((e) => e.locale === z) ? z : U(N, l), G = B(c?.descriptions, W), K = B(c?.describedSrc, W), [q, J] = I(!1), Y = q && K ? K : T, X = je(Y), Z = De(X.videoElement, A), Q = xe(X.videoElement, {
|
|
938
|
+
enabled: q,
|
|
939
|
+
describedSrc: K,
|
|
940
|
+
descriptions: G
|
|
941
|
+
}), $ = j(() => {
|
|
942
|
+
let e = X.videoRef.current;
|
|
939
943
|
if (!e) return;
|
|
940
944
|
let t = e.currentTime, n = !e.paused, r = () => {
|
|
941
945
|
e.currentTime = t, n && e.play().catch(() => {}), e.removeEventListener("loadedmetadata", r);
|
|
942
946
|
};
|
|
943
947
|
e.addEventListener("loadedmetadata", r);
|
|
944
|
-
}, [
|
|
945
|
-
|
|
946
|
-
}, [
|
|
947
|
-
|
|
948
|
-
}, [
|
|
949
|
-
|
|
950
|
-
}, [
|
|
951
|
-
|
|
952
|
-
}, [
|
|
953
|
-
|
|
954
|
-
}, [
|
|
955
|
-
|
|
956
|
-
}, [
|
|
948
|
+
}, [X.videoRef]), ne = j((e) => {
|
|
949
|
+
$(), w(e);
|
|
950
|
+
}, [$]), re = j(() => {
|
|
951
|
+
K && $(), J((e) => !e);
|
|
952
|
+
}, [K, $]), ie = j((e) => {
|
|
953
|
+
te(e), Z.showing || Z.toggle();
|
|
954
|
+
}, [Z]), ae = j(() => {
|
|
955
|
+
Z.showing && Z.toggle();
|
|
956
|
+
}, [Z]), oe = j((e) => {
|
|
957
|
+
K && $(), H(e), J(!0);
|
|
958
|
+
}, [K, $]), se = j(() => {
|
|
959
|
+
K && $(), J(!1);
|
|
960
|
+
}, [K, $]);
|
|
957
961
|
Me({
|
|
958
|
-
video:
|
|
959
|
-
onTrackAction:
|
|
962
|
+
video: X.videoElement,
|
|
963
|
+
onTrackAction: h
|
|
960
964
|
}), Ae({
|
|
961
|
-
video:
|
|
962
|
-
onMilestone:
|
|
963
|
-
resetKey:
|
|
965
|
+
video: X.videoElement,
|
|
966
|
+
onMilestone: g,
|
|
967
|
+
resetKey: T
|
|
964
968
|
}), ke({
|
|
965
|
-
video:
|
|
966
|
-
onComplete:
|
|
967
|
-
resetKey:
|
|
969
|
+
video: X.videoElement,
|
|
970
|
+
onComplete: v,
|
|
971
|
+
resetKey: T
|
|
968
972
|
});
|
|
969
973
|
let { maxWatchedTime: ce, clampSeek: le } = Ce({
|
|
970
|
-
video:
|
|
971
|
-
enabled:
|
|
972
|
-
resetKey:
|
|
973
|
-
}), ue =
|
|
974
|
-
|
|
975
|
-
let e =
|
|
976
|
-
|
|
974
|
+
video: X.videoElement,
|
|
975
|
+
enabled: p,
|
|
976
|
+
resetKey: T
|
|
977
|
+
}), ue = j((e) => X.seekTo(le(e)), [X, le]), { isFullscreen: de, toggleFullscreen: fe } = k({ targetRef: x }), pe = j(() => {}, []), me = !!(q && K);
|
|
978
|
+
M(() => {
|
|
979
|
+
let e = X.videoRef.current;
|
|
980
|
+
o && e && (e.muted = !me);
|
|
977
981
|
}, [
|
|
978
|
-
|
|
982
|
+
o,
|
|
979
983
|
me,
|
|
980
|
-
|
|
981
|
-
|
|
984
|
+
X.videoElement,
|
|
985
|
+
X.videoRef
|
|
982
986
|
]);
|
|
983
987
|
let he = Se({
|
|
984
|
-
videoRef:
|
|
988
|
+
videoRef: X.videoRef,
|
|
985
989
|
seek: ue,
|
|
986
|
-
togglePlay:
|
|
987
|
-
toggleMute:
|
|
990
|
+
togglePlay: X.togglePlay,
|
|
991
|
+
toggleMute: o ? pe : X.toggleMute,
|
|
988
992
|
toggleFullscreen: fe,
|
|
989
|
-
setVolume:
|
|
993
|
+
setVolume: o ? pe : X.setVolume
|
|
990
994
|
});
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
}, [
|
|
995
|
+
M(() => {
|
|
996
|
+
d && x.current?.focus({ preventScroll: !0 });
|
|
997
|
+
}, [d]);
|
|
994
998
|
let ge = (e) => e.preventDefault();
|
|
995
|
-
return /* @__PURE__ */
|
|
996
|
-
ref:
|
|
997
|
-
className:
|
|
999
|
+
return /* @__PURE__ */ R("div", {
|
|
1000
|
+
ref: x,
|
|
1001
|
+
className: r("group relative h-full w-full overflow-hidden rounded-[inherit] bg-f1-foreground dark:bg-f1-background", "[&:fullscreen]:h-screen [&:fullscreen]:w-screen [&:fullscreen]:rounded-none", i()),
|
|
998
1002
|
role: "region",
|
|
999
|
-
"aria-label":
|
|
1003
|
+
"aria-label": a ?? b("videoPlayer.regionLabel"),
|
|
1000
1004
|
tabIndex: 0,
|
|
1001
1005
|
onKeyDown: he,
|
|
1002
|
-
"data-video-captions":
|
|
1003
|
-
...
|
|
1006
|
+
"data-video-captions": o ? "no-audio" : Z.available ? "available" : "missing",
|
|
1007
|
+
...y,
|
|
1004
1008
|
children: [
|
|
1005
|
-
/* @__PURE__ */
|
|
1006
|
-
ref:
|
|
1007
|
-
autoPlay:
|
|
1009
|
+
/* @__PURE__ */ R("video", {
|
|
1010
|
+
ref: X.setVideoNode,
|
|
1011
|
+
autoPlay: u,
|
|
1008
1012
|
playsInline: !0,
|
|
1009
1013
|
disablePictureInPicture: !0,
|
|
1010
1014
|
disableRemotePlayback: !0,
|
|
1011
1015
|
draggable: !1,
|
|
1012
1016
|
onContextMenu: ge,
|
|
1013
|
-
onClick:
|
|
1014
|
-
src:
|
|
1015
|
-
poster:
|
|
1016
|
-
crossOrigin:
|
|
1017
|
-
onLoadedData: () =>
|
|
1018
|
-
className:
|
|
1019
|
-
style: { opacity:
|
|
1020
|
-
children: [
|
|
1017
|
+
onClick: X.togglePlay,
|
|
1018
|
+
src: Y,
|
|
1019
|
+
poster: n,
|
|
1020
|
+
crossOrigin: Z.needsCrossOrigin || Q.needsCrossOrigin ? "anonymous" : void 0,
|
|
1021
|
+
onLoadedData: () => X.setVideoLoaded(!0),
|
|
1022
|
+
className: r("block h-full w-full cursor-pointer rounded-[inherit] object-contain transition-opacity duration-300", "[&::-webkit-media-text-track-container]:![transform:translateY(-3.5rem)]"),
|
|
1023
|
+
style: { opacity: X.videoLoaded || n ? 1 : 0 },
|
|
1024
|
+
children: [Z.trackSrc ? /* @__PURE__ */ L("track", {
|
|
1021
1025
|
kind: "captions",
|
|
1022
|
-
src:
|
|
1023
|
-
label:
|
|
1026
|
+
src: Z.trackSrc,
|
|
1027
|
+
label: b("videoPlayer.captions"),
|
|
1024
1028
|
default: !1
|
|
1025
|
-
}) : null,
|
|
1029
|
+
}) : null, Q.trackSrc ? /* @__PURE__ */ L("track", {
|
|
1026
1030
|
kind: "descriptions",
|
|
1027
|
-
src:
|
|
1028
|
-
label:
|
|
1031
|
+
src: Q.trackSrc,
|
|
1032
|
+
label: b("videoPlayer.audioDescription"),
|
|
1029
1033
|
default: !1
|
|
1030
1034
|
}) : null]
|
|
1031
1035
|
}),
|
|
1032
|
-
|
|
1036
|
+
X.isPlaying ? null : /* @__PURE__ */ L("div", {
|
|
1033
1037
|
"aria-hidden": !0,
|
|
1034
1038
|
"data-video-play-overlay": !0,
|
|
1035
1039
|
className: "pointer-events-none absolute inset-0 z-[1] flex items-center justify-center",
|
|
1036
|
-
children: /* @__PURE__ */
|
|
1040
|
+
children: /* @__PURE__ */ L("button", {
|
|
1037
1041
|
type: "button",
|
|
1038
1042
|
tabIndex: -1,
|
|
1039
|
-
onClick:
|
|
1043
|
+
onClick: X.togglePlay,
|
|
1040
1044
|
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",
|
|
1041
|
-
children: /* @__PURE__ */
|
|
1042
|
-
icon:
|
|
1045
|
+
children: /* @__PURE__ */ L(_, {
|
|
1046
|
+
icon: m,
|
|
1043
1047
|
size: "lg",
|
|
1044
1048
|
color: "#fff"
|
|
1045
1049
|
})
|
|
1046
1050
|
})
|
|
1047
1051
|
}),
|
|
1048
|
-
|
|
1052
|
+
Z.showing && Q.activeCue ? /* @__PURE__ */ L("div", {
|
|
1049
1053
|
"aria-hidden": !0,
|
|
1050
1054
|
className: "dark pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-center p-3",
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1055
|
+
children: /* @__PURE__ */ R("p", {
|
|
1052
1056
|
className: "max-w-[90%] rounded-md bg-f1-background/70 px-2 py-1 text-center text-base italic text-f1-foreground [text-shadow:0_1px_2px_rgba(0,0,0,0.55)]",
|
|
1053
|
-
children: [/* @__PURE__ */
|
|
1057
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1054
1058
|
className: "pr-1 font-medium not-italic opacity-70",
|
|
1055
1059
|
children: [
|
|
1056
1060
|
"[",
|
|
1057
|
-
|
|
1061
|
+
b("videoPlayer.audioDescription"),
|
|
1058
1062
|
"]"
|
|
1059
1063
|
]
|
|
1060
|
-
}),
|
|
1064
|
+
}), Q.activeCue]
|
|
1061
1065
|
})
|
|
1062
1066
|
}) : null,
|
|
1063
|
-
/* @__PURE__ */
|
|
1067
|
+
/* @__PURE__ */ L("span", {
|
|
1064
1068
|
className: "sr-only",
|
|
1065
1069
|
"aria-live": "polite",
|
|
1066
|
-
children:
|
|
1070
|
+
children: X.isPlaying ? b("videoPlayer.playing") : b("videoPlayer.paused")
|
|
1067
1071
|
}),
|
|
1068
|
-
|
|
1069
|
-
isPlaying:
|
|
1070
|
-
currentTime:
|
|
1071
|
-
duration:
|
|
1072
|
-
volume:
|
|
1073
|
-
isMuted:
|
|
1074
|
-
playbackRate:
|
|
1072
|
+
X.videoLoaded ? /* @__PURE__ */ L(_e, {
|
|
1073
|
+
isPlaying: X.isPlaying,
|
|
1074
|
+
currentTime: X.currentTime,
|
|
1075
|
+
duration: X.duration,
|
|
1076
|
+
volume: X.volume,
|
|
1077
|
+
isMuted: X.isMuted,
|
|
1078
|
+
playbackRate: X.playbackRate,
|
|
1075
1079
|
isFullscreen: de,
|
|
1076
|
-
markerTime:
|
|
1077
|
-
blockSeekPastMarker:
|
|
1078
|
-
containerRef:
|
|
1079
|
-
captionsAvailable:
|
|
1080
|
-
captionsOn:
|
|
1081
|
-
audioDescriptionAvailable:
|
|
1082
|
-
audioDescriptionOn:
|
|
1083
|
-
silent:
|
|
1084
|
-
persist:
|
|
1085
|
-
audioLanguages:
|
|
1080
|
+
markerTime: p ? ce : void 0,
|
|
1081
|
+
blockSeekPastMarker: p,
|
|
1082
|
+
containerRef: x,
|
|
1083
|
+
captionsAvailable: Z.available,
|
|
1084
|
+
captionsOn: Z.showing,
|
|
1085
|
+
audioDescriptionAvailable: Q.available,
|
|
1086
|
+
audioDescriptionOn: q,
|
|
1087
|
+
silent: o,
|
|
1088
|
+
persist: s,
|
|
1089
|
+
audioLanguages: S,
|
|
1086
1090
|
audioLanguage: ee,
|
|
1087
|
-
onAudioLanguageChange:
|
|
1088
|
-
captionLanguages:
|
|
1089
|
-
captionLanguage:
|
|
1090
|
-
onCaptionLanguageChange:
|
|
1091
|
-
onCaptionsOff:
|
|
1092
|
-
audioDescriptionLanguages:
|
|
1093
|
-
audioDescriptionLanguage:
|
|
1094
|
-
onAudioDescriptionLanguageChange:
|
|
1095
|
-
onAudioDescriptionOff:
|
|
1096
|
-
onTogglePlay:
|
|
1097
|
-
onToggleMute:
|
|
1098
|
-
onVolumeChange:
|
|
1099
|
-
onPlaybackRateChange:
|
|
1091
|
+
onAudioLanguageChange: ne,
|
|
1092
|
+
captionLanguages: E,
|
|
1093
|
+
captionLanguage: O,
|
|
1094
|
+
onCaptionLanguageChange: ie,
|
|
1095
|
+
onCaptionsOff: ae,
|
|
1096
|
+
audioDescriptionLanguages: N,
|
|
1097
|
+
audioDescriptionLanguage: W,
|
|
1098
|
+
onAudioDescriptionLanguageChange: oe,
|
|
1099
|
+
onAudioDescriptionOff: se,
|
|
1100
|
+
onTogglePlay: X.togglePlay,
|
|
1101
|
+
onToggleMute: X.toggleMute,
|
|
1102
|
+
onVolumeChange: X.setVolume,
|
|
1103
|
+
onPlaybackRateChange: X.setPlaybackRate,
|
|
1100
1104
|
onToggleFullscreen: () => void fe(),
|
|
1101
|
-
onToggleCaptions:
|
|
1102
|
-
onToggleAudioDescription:
|
|
1105
|
+
onToggleCaptions: Z.toggle,
|
|
1106
|
+
onToggleAudioDescription: re,
|
|
1103
1107
|
onSeek: ue,
|
|
1104
|
-
download:
|
|
1108
|
+
download: f
|
|
1105
1109
|
}) : null
|
|
1106
1110
|
]
|
|
1107
1111
|
});
|
|
1108
1112
|
}
|
|
1109
1113
|
//#endregion
|
|
1110
1114
|
//#region src/blocks/F0VideoPlayer/F0VideoPlayer.tsx
|
|
1111
|
-
var Pe =
|
|
1115
|
+
var Pe = e(n("F0VideoPlayer", Ne));
|
|
1112
1116
|
//#endregion
|
|
1113
|
-
export {
|
|
1117
|
+
export { B as a, H as i, V as n, U as r, Pe as t };
|