@latest-thinking/lt-player 3.0.0-beta.6 → 3.0.0-beta.8
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/player.js +295 -291
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/player.js
CHANGED
|
@@ -17539,6 +17539,7 @@ function Cp({ interaction: e, module: t }) {
|
|
|
17539
17539
|
"aria-labelledby": i,
|
|
17540
17540
|
"aria-modal": "true",
|
|
17541
17541
|
className: "ltp-share-dialog ltp-share-dialog--page",
|
|
17542
|
+
"data-interactive": !0,
|
|
17542
17543
|
onCancel: (e) => {
|
|
17543
17544
|
e.preventDefault(), t.close();
|
|
17544
17545
|
},
|
|
@@ -20464,15 +20465,18 @@ function Yg({ children: e, intentQueue: t, mediaRef: n, sources: r, ...i }) {
|
|
|
20464
20465
|
}
|
|
20465
20466
|
//#endregion
|
|
20466
20467
|
//#region src/core/media-engine.tsx
|
|
20467
|
-
function Xg(
|
|
20468
|
+
function Xg(e) {
|
|
20469
|
+
return !e || typeof navigator < "u" && /\bFirefox\//u.test(navigator.userAgent);
|
|
20470
|
+
}
|
|
20471
|
+
function Zg(...e) {
|
|
20468
20472
|
return e;
|
|
20469
20473
|
}
|
|
20470
|
-
var { Player:
|
|
20471
|
-
features:
|
|
20474
|
+
var { Player: Qg, usePlayer: $g } = mc({
|
|
20475
|
+
features: Zg(fr, mr, Mr, Ar, xr, Cn, er, dr, Bn, Or, Hn, ur),
|
|
20472
20476
|
displayName: "LTMediaEnginePlayer"
|
|
20473
|
-
}),
|
|
20474
|
-
function
|
|
20475
|
-
let t =
|
|
20477
|
+
}), e_ = P(fr), t_ = P(xr), n_ = P(Hn), r_ = P(Ar), i_ = P(Mr), a_ = P(mr), o_ = P(Or), s_ = P(dr), c_ = P(Bn), l_ = P(ur);
|
|
20478
|
+
function u_(e) {
|
|
20479
|
+
let t = e_(e), n = t_(e), r = n_(e), i = r_(e);
|
|
20476
20480
|
if (t === void 0 || n === void 0 || r === void 0 || i === void 0) throw Error("The LT media engine state features are not configured");
|
|
20477
20481
|
return {
|
|
20478
20482
|
paused: t.paused,
|
|
@@ -20485,10 +20489,10 @@ function l_(e) {
|
|
|
20485
20489
|
currentTime: i.currentTime
|
|
20486
20490
|
};
|
|
20487
20491
|
}
|
|
20488
|
-
function
|
|
20489
|
-
let r =
|
|
20492
|
+
function d_({ children: e, mediaRef: t, userStateSession: n }) {
|
|
20493
|
+
let r = $g(), i = Et((e) => r.subscribe(e), () => r.state, u_), a = (0, w.useCallback)((e, t) => {
|
|
20490
20494
|
if (e.source === null) return Promise.reject(/* @__PURE__ */ Error("Cannot recover media without a selected source"));
|
|
20491
|
-
let n = r.state, i =
|
|
20495
|
+
let n = r.state, i = n_(n), a = t_(n);
|
|
20492
20496
|
return i === void 0 || a === void 0 ? Promise.reject(/* @__PURE__ */ Error("The LT media recovery features are not configured")) : (i.dismissError(), a.loadSource(e.source), new Promise((n, i) => {
|
|
20493
20497
|
let a = !1, o = !1, s = !1, c = () => void 0, l = (e) => {
|
|
20494
20498
|
s || (s = !0, c(), t.removeEventListener("abort", u), e === void 0 ? n() : i(e));
|
|
@@ -20497,7 +20501,7 @@ function u_({ children: e, mediaRef: t, userStateSession: n }) {
|
|
|
20497
20501
|
u();
|
|
20498
20502
|
return;
|
|
20499
20503
|
}
|
|
20500
|
-
let n = r.state, i =
|
|
20504
|
+
let n = r.state, i = e_(n), s = t_(n), c = n_(n), f = r_(n);
|
|
20501
20505
|
if (i === void 0 || s === void 0 || c === void 0 || f === void 0) {
|
|
20502
20506
|
l(/* @__PURE__ */ Error("The LT media recovery features are not configured"));
|
|
20503
20507
|
return;
|
|
@@ -20518,7 +20522,7 @@ function u_({ children: e, mediaRef: t, userStateSession: n }) {
|
|
|
20518
20522
|
}));
|
|
20519
20523
|
}, [r]), o = (0, w.useCallback)(() => eg({ recoverMedia: a }), [a]), s = (0, w.useMemo)(() => ({
|
|
20520
20524
|
getSnapshot: () => {
|
|
20521
|
-
let e = r.state, n =
|
|
20525
|
+
let e = r.state, n = i_(e), i = a_(e), a = t_(e), o = o_(e);
|
|
20522
20526
|
if (n === void 0 || i === void 0 || a === void 0 || o === void 0) throw Error("The LT user-state media features are not configured");
|
|
20523
20527
|
return {
|
|
20524
20528
|
attached: !!r.target,
|
|
@@ -20538,7 +20542,7 @@ function u_({ children: e, mediaRef: t, userStateSession: n }) {
|
|
|
20538
20542
|
},
|
|
20539
20543
|
subscribe: (e) => r.subscribe(e),
|
|
20540
20544
|
setVolume(e) {
|
|
20541
|
-
|
|
20545
|
+
i_(r.state)?.setVolume(e);
|
|
20542
20546
|
},
|
|
20543
20547
|
setMuted(e) {
|
|
20544
20548
|
let n = t?.current;
|
|
@@ -20546,14 +20550,14 @@ function u_({ children: e, mediaRef: t, userStateSession: n }) {
|
|
|
20546
20550
|
n.muted !== e && (n.muted = e);
|
|
20547
20551
|
return;
|
|
20548
20552
|
}
|
|
20549
|
-
let i =
|
|
20553
|
+
let i = i_(r.state);
|
|
20550
20554
|
i !== void 0 && i.muted !== e && i.toggleMuted();
|
|
20551
20555
|
},
|
|
20552
20556
|
setPlaybackRate(e) {
|
|
20553
|
-
|
|
20557
|
+
a_(r.state)?.setPlaybackRate(e);
|
|
20554
20558
|
},
|
|
20555
20559
|
selectSubtitlesTrack(e) {
|
|
20556
|
-
if (
|
|
20560
|
+
if (o_(r.state)?.selectSubtitlesTrack(e), e === "off") return;
|
|
20557
20561
|
let n = kf(t?.current ?? null).find((t) => t.id === e);
|
|
20558
20562
|
n !== void 0 && (n.mode = "hidden");
|
|
20559
20563
|
}
|
|
@@ -20581,16 +20585,16 @@ function u_({ children: e, mediaRef: t, userStateSession: n }) {
|
|
|
20581
20585
|
})
|
|
20582
20586
|
});
|
|
20583
20587
|
}
|
|
20584
|
-
function
|
|
20588
|
+
function f_({ children: e, mediaRef: t, poster: n, stringCatalog: r = hh, title: i, userStateSession: a }) {
|
|
20585
20589
|
return /* @__PURE__ */ (0, N.jsx)(Vd, {
|
|
20586
20590
|
value: r,
|
|
20587
20591
|
children: /* @__PURE__ */ (0, N.jsx)(ch, {
|
|
20588
20592
|
language: r.selectedLanguage,
|
|
20589
20593
|
strings: r.strings,
|
|
20590
|
-
children: /* @__PURE__ */ (0, N.jsx)(
|
|
20594
|
+
children: /* @__PURE__ */ (0, N.jsx)(Qg, {
|
|
20591
20595
|
poster: n,
|
|
20592
20596
|
title: i,
|
|
20593
|
-
children: /* @__PURE__ */ (0, N.jsx)(
|
|
20597
|
+
children: /* @__PURE__ */ (0, N.jsx)(d_, {
|
|
20594
20598
|
mediaRef: t,
|
|
20595
20599
|
userStateSession: a,
|
|
20596
20600
|
children: e
|
|
@@ -20599,8 +20603,8 @@ function d_({ children: e, mediaRef: t, poster: n, stringCatalog: r = hh, title:
|
|
|
20599
20603
|
})
|
|
20600
20604
|
});
|
|
20601
20605
|
}
|
|
20602
|
-
function
|
|
20603
|
-
let n =
|
|
20606
|
+
function p_(e, t) {
|
|
20607
|
+
let n = r_(e), r = i_(e), i = a_(e), a = o_(e), o = s_(e);
|
|
20604
20608
|
if (n === void 0 || r === void 0 || i === void 0 || a === void 0 || o === void 0) throw Error("The LT page API media features are not configured");
|
|
20605
20609
|
let s = kf(t).find((e) => Ff(e.kind) && If(e.mode));
|
|
20606
20610
|
return Object.freeze({
|
|
@@ -20616,8 +20620,8 @@ function f_(e, t) {
|
|
|
20616
20620
|
pip: o.pip
|
|
20617
20621
|
});
|
|
20618
20622
|
}
|
|
20619
|
-
function
|
|
20620
|
-
let i =
|
|
20623
|
+
function m_({ application: e, intentQueue: t, mediaRef: n, runtime: r }) {
|
|
20624
|
+
let i = $g(), a = rg(), o = Pf(), s = (0, w.useMemo)(() => ({
|
|
20621
20625
|
get media() {
|
|
20622
20626
|
let e = n.current;
|
|
20623
20627
|
if (e === null) throw Error("The LT media element is not attached");
|
|
@@ -20625,16 +20629,16 @@ function p_({ application: e, intentQueue: t, mediaRef: n, runtime: r }) {
|
|
|
20625
20629
|
},
|
|
20626
20630
|
playerState: a,
|
|
20627
20631
|
userState: o,
|
|
20628
|
-
getSnapshot: () =>
|
|
20632
|
+
getSnapshot: () => p_(i.state, n.current),
|
|
20629
20633
|
subscribe: (e) => i.subscribe(e),
|
|
20630
20634
|
play() {
|
|
20631
|
-
t.play(() =>
|
|
20635
|
+
t.play(() => e_(i.state)?.play().catch(() => void 0));
|
|
20632
20636
|
},
|
|
20633
20637
|
pause() {
|
|
20634
|
-
t.pause(() =>
|
|
20638
|
+
t.pause(() => e_(i.state)?.pause());
|
|
20635
20639
|
},
|
|
20636
20640
|
seek(e) {
|
|
20637
|
-
|
|
20641
|
+
r_(i.state)?.seek(e).catch(() => void 0);
|
|
20638
20642
|
},
|
|
20639
20643
|
load() {
|
|
20640
20644
|
n.current?.load();
|
|
@@ -20654,9 +20658,9 @@ function p_({ application: e, intentQueue: t, mediaRef: n, runtime: r }) {
|
|
|
20654
20658
|
r
|
|
20655
20659
|
]), null;
|
|
20656
20660
|
}
|
|
20657
|
-
function
|
|
20658
|
-
let n =
|
|
20659
|
-
let e =
|
|
20661
|
+
function h_({ application: e, visible: t }) {
|
|
20662
|
+
let n = $g(), { playback: r } = ig(), i = Wd("coverButton"), { config: a } = e, o = a.controls.cover, s = (0, w.useCallback)(() => {
|
|
20663
|
+
let e = e_(n.state);
|
|
20660
20664
|
return e === void 0 ? Promise.reject(/* @__PURE__ */ Error("The LT media playback feature is not configured")) : e.play();
|
|
20661
20665
|
}, [n]);
|
|
20662
20666
|
if (!o.enabled) return null;
|
|
@@ -20675,7 +20679,7 @@ function m_({ application: e, visible: t }) {
|
|
|
20675
20679
|
visibleButtonLabel: c
|
|
20676
20680
|
});
|
|
20677
20681
|
}
|
|
20678
|
-
function
|
|
20682
|
+
function g_({ application: e, runtime: t }) {
|
|
20679
20683
|
let { config: n, strings: r } = e;
|
|
20680
20684
|
if (e.initialError) {
|
|
20681
20685
|
let e = n.layout === "landscape" ? "ltp-landscape" : "ltp-portrait";
|
|
@@ -20687,12 +20691,12 @@ function h_({ application: e, runtime: t }) {
|
|
|
20687
20691
|
children: [/* @__PURE__ */ (0, N.jsx)(bd, {}), /* @__PURE__ */ (0, N.jsx)(Bg, { message: r.strings.configErrorMessage })]
|
|
20688
20692
|
});
|
|
20689
20693
|
}
|
|
20690
|
-
return /* @__PURE__ */ (0, N.jsx)(
|
|
20694
|
+
return /* @__PURE__ */ (0, N.jsx)(__, {
|
|
20691
20695
|
application: e,
|
|
20692
20696
|
runtime: t
|
|
20693
20697
|
});
|
|
20694
20698
|
}
|
|
20695
|
-
function
|
|
20699
|
+
function __({ application: e, runtime: t }) {
|
|
20696
20700
|
let n = (0, w.useRef)(null), [r, i] = (0, w.useState)(null), a = (0, w.useRef)(null), o = (0, w.useRef)(null);
|
|
20697
20701
|
a.current ??= Gg();
|
|
20698
20702
|
let s = a.current, c = (0, w.useCallback)((e) => {
|
|
@@ -20704,7 +20708,7 @@ function g_({ application: e, runtime: t }) {
|
|
|
20704
20708
|
"aria-label": l.content.title,
|
|
20705
20709
|
className: "ltp-media-engine__video",
|
|
20706
20710
|
crossOrigin: "anonymous",
|
|
20707
|
-
disablePictureInPicture:
|
|
20711
|
+
disablePictureInPicture: Xg(l.controls.pip.enabled),
|
|
20708
20712
|
intentQueue: s,
|
|
20709
20713
|
playsInline: !0,
|
|
20710
20714
|
preload: "metadata",
|
|
@@ -20713,7 +20717,7 @@ function g_({ application: e, runtime: t }) {
|
|
|
20713
20717
|
index: n,
|
|
20714
20718
|
track: t
|
|
20715
20719
|
}, `${e.generation}:${t.src}:${t.kind ?? ""}:${n}`))
|
|
20716
|
-
}), f = e.configurationError ? /* @__PURE__ */ (0, N.jsx)(Bg, { message: u.strings.configErrorMessage }) : void 0, p = /* @__PURE__ */ (0, N.jsx)(
|
|
20720
|
+
}), f = e.configurationError ? /* @__PURE__ */ (0, N.jsx)(Bg, { message: u.strings.configErrorMessage }) : void 0, p = /* @__PURE__ */ (0, N.jsx)(m_, {
|
|
20717
20721
|
application: e,
|
|
20718
20722
|
intentQueue: s,
|
|
20719
20723
|
mediaRef: n,
|
|
@@ -20723,7 +20727,7 @@ function g_({ application: e, runtime: t }) {
|
|
|
20723
20727
|
value: l,
|
|
20724
20728
|
children: /* @__PURE__ */ (0, N.jsx)(Wm, {
|
|
20725
20729
|
registry: e.registry,
|
|
20726
|
-
children: /* @__PURE__ */ (0, N.jsx)(
|
|
20730
|
+
children: /* @__PURE__ */ (0, N.jsx)(f_, {
|
|
20727
20731
|
mediaRef: n,
|
|
20728
20732
|
poster: l.content.poster ?? null,
|
|
20729
20733
|
stringCatalog: u,
|
|
@@ -20732,7 +20736,7 @@ function g_({ application: e, runtime: t }) {
|
|
|
20732
20736
|
children: /* @__PURE__ */ (0, N.jsx)(qf, {
|
|
20733
20737
|
generation: e.generation,
|
|
20734
20738
|
media: r,
|
|
20735
|
-
children: /* @__PURE__ */ (0, N.jsx)(
|
|
20739
|
+
children: /* @__PURE__ */ (0, N.jsx)(x_, {
|
|
20736
20740
|
application: e,
|
|
20737
20741
|
configurationError: f,
|
|
20738
20742
|
media: d,
|
|
@@ -20743,17 +20747,17 @@ function g_({ application: e, runtime: t }) {
|
|
|
20743
20747
|
})
|
|
20744
20748
|
});
|
|
20745
20749
|
}
|
|
20746
|
-
function
|
|
20747
|
-
let t =
|
|
20750
|
+
function v_(e) {
|
|
20751
|
+
let t = y_(e), n = r_(e);
|
|
20748
20752
|
if (t === void 0 || n === void 0) throw Error("The LT core control media features are not configured");
|
|
20749
20753
|
return {
|
|
20750
20754
|
buffered: t.buffered,
|
|
20751
20755
|
duration: n.duration
|
|
20752
20756
|
};
|
|
20753
20757
|
}
|
|
20754
|
-
var
|
|
20755
|
-
function
|
|
20756
|
-
let t =
|
|
20758
|
+
var y_ = P(Cn);
|
|
20759
|
+
function b_(e) {
|
|
20760
|
+
let t = c_(e);
|
|
20757
20761
|
if (t === void 0) throw Error("The LT control visibility media feature is not configured");
|
|
20758
20762
|
return {
|
|
20759
20763
|
controlsVisible: t.controlsVisible,
|
|
@@ -20761,8 +20765,8 @@ function y_(e) {
|
|
|
20761
20765
|
userActive: t.userActive
|
|
20762
20766
|
};
|
|
20763
20767
|
}
|
|
20764
|
-
function
|
|
20765
|
-
let i =
|
|
20768
|
+
function x_({ application: e, configurationError: t, media: n, runtimeBridge: r }) {
|
|
20769
|
+
let i = $g(), { playback: a } = ig(), { config: o } = e, s = Et((e) => i.subscribe(e), () => i.state, b_), c = (0, w.useRef)(null), l = (0, w.useRef)({
|
|
20766
20770
|
configurationError: t !== void 0,
|
|
20767
20771
|
engine: s,
|
|
20768
20772
|
generation: e.generation,
|
|
@@ -20791,7 +20795,7 @@ function b_({ application: e, configurationError: t, media: n, runtimeBridge: r
|
|
|
20791
20795
|
a
|
|
20792
20796
|
]), /* @__PURE__ */ (0, N.jsx)(gg, {
|
|
20793
20797
|
controller: d,
|
|
20794
|
-
children: /* @__PURE__ */ (0, N.jsx)(
|
|
20798
|
+
children: /* @__PURE__ */ (0, N.jsx)(T_, {
|
|
20795
20799
|
application: e,
|
|
20796
20800
|
configurationError: t,
|
|
20797
20801
|
media: n,
|
|
@@ -20799,12 +20803,12 @@ function b_({ application: e, configurationError: t, media: n, runtimeBridge: r
|
|
|
20799
20803
|
})
|
|
20800
20804
|
});
|
|
20801
20805
|
}
|
|
20802
|
-
function
|
|
20806
|
+
function S_() {
|
|
20803
20807
|
let e = Gm().getModule("share"), t = (0, w.useSyncExternalStore)(e.subscribeInteraction, e.getInteractionSnapshot, e.getInteractionSnapshot).open;
|
|
20804
20808
|
return yg(t), null;
|
|
20805
20809
|
}
|
|
20806
|
-
function
|
|
20807
|
-
let t =
|
|
20810
|
+
function C_(e) {
|
|
20811
|
+
let t = l_(e), n = e_(e), r = a_(e), i = r_(e);
|
|
20808
20812
|
if (t === void 0 || n === void 0 || r === void 0 || i === void 0) throw Error("The LT Media Session features are not configured");
|
|
20809
20813
|
return {
|
|
20810
20814
|
currentTime: i.currentTime,
|
|
@@ -20815,16 +20819,16 @@ function S_(e) {
|
|
|
20815
20819
|
title: t.title
|
|
20816
20820
|
};
|
|
20817
20821
|
}
|
|
20818
|
-
function
|
|
20819
|
-
let t =
|
|
20822
|
+
function w_({ application: e }) {
|
|
20823
|
+
let t = $g(), n = ig(), r = Et((e) => t.subscribe(e), () => t.state, C_), i = (0, w.useMemo)(() => ({
|
|
20820
20824
|
play() {
|
|
20821
|
-
|
|
20825
|
+
e_(t.state)?.play().catch(() => void 0);
|
|
20822
20826
|
},
|
|
20823
20827
|
pause() {
|
|
20824
|
-
|
|
20828
|
+
e_(t.state)?.pause();
|
|
20825
20829
|
},
|
|
20826
20830
|
seek(e) {
|
|
20827
|
-
|
|
20831
|
+
r_(t.state)?.seek(e).catch(() => void 0);
|
|
20828
20832
|
},
|
|
20829
20833
|
...e.mediaSessionTrackCommands === void 0 ? {} : {
|
|
20830
20834
|
previousTrack: e.mediaSessionTrackCommands.previousTrack,
|
|
@@ -20851,8 +20855,8 @@ function C_({ application: e }) {
|
|
|
20851
20855
|
};
|
|
20852
20856
|
}, [i]), (0, w.useLayoutEffect)(() => s.current?.update(a), [a]), null;
|
|
20853
20857
|
}
|
|
20854
|
-
function
|
|
20855
|
-
let i =
|
|
20858
|
+
function T_({ application: e, configurationError: t, media: n, runtimeBridge: r }) {
|
|
20859
|
+
let i = $g(), a = ig(), { playback: o } = a, { config: s, strings: c } = e, l = vg(), u = Km(), d = Gm().getModule("share"), f = Gm().getModule("contextPanel"), p = Wf(), m = Et((e) => i.subscribe(e), () => i.state, v_), h = p.available ? u.capabilities.captions.state : "dormant", g = u.capabilities.speed.state, _ = (0, w.useMemo)(() => Gd(s, {
|
|
20856
20860
|
captions: h,
|
|
20857
20861
|
speed: g
|
|
20858
20862
|
}), [
|
|
@@ -20860,11 +20864,11 @@ function w_({ application: e, configurationError: t, media: n, runtimeBridge: r
|
|
|
20860
20864
|
s,
|
|
20861
20865
|
g
|
|
20862
20866
|
]), v = t !== void 0 || o === "error", y = (0, w.useCallback)((e) => {
|
|
20863
|
-
|
|
20867
|
+
r_(i.state)?.seek(e).catch(() => void 0);
|
|
20864
20868
|
}, [i]), b = wg(_.gestures && !v), x = t === void 0 && a.playback === "error" && a.errorKind === "media" ? /* @__PURE__ */ (0, N.jsx)(Vg, {}) : void 0, { chromeVisible: S, coverVisible: C } = sg(o, e.generation, s.controls.cover.enabled), T = {
|
|
20865
20869
|
configurationError: t,
|
|
20866
20870
|
core: {
|
|
20867
|
-
cover: s.controls.cover.enabled && C ? /* @__PURE__ */ (0, N.jsx)(
|
|
20871
|
+
cover: s.controls.cover.enabled && C ? /* @__PURE__ */ (0, N.jsx)(h_, {
|
|
20868
20872
|
application: e,
|
|
20869
20873
|
visible: C
|
|
20870
20874
|
}, e.generation) : void 0,
|
|
@@ -20894,7 +20898,7 @@ function w_({ application: e, configurationError: t, media: n, runtimeBridge: r
|
|
|
20894
20898
|
runtimeBridge: r
|
|
20895
20899
|
};
|
|
20896
20900
|
return /* @__PURE__ */ (0, N.jsxs)(N.Fragment, { children: [
|
|
20897
|
-
/* @__PURE__ */ (0, N.jsx)(
|
|
20901
|
+
/* @__PURE__ */ (0, N.jsx)(w_, { application: e }),
|
|
20898
20902
|
/* @__PURE__ */ (0, N.jsx)(Eg, {
|
|
20899
20903
|
disabled: v,
|
|
20900
20904
|
layout: s.layout,
|
|
@@ -20908,7 +20912,7 @@ function w_({ application: e, configurationError: t, media: n, runtimeBridge: r
|
|
|
20908
20912
|
module: f,
|
|
20909
20913
|
children: /* @__PURE__ */ (0, N.jsx)(pp, {
|
|
20910
20914
|
module: d,
|
|
20911
|
-
children: s.layout === "landscape" ? /* @__PURE__ */ (0, N.jsxs)(N.Fragment, { children: [/* @__PURE__ */ (0, N.jsx)(
|
|
20915
|
+
children: s.layout === "landscape" ? /* @__PURE__ */ (0, N.jsxs)(N.Fragment, { children: [/* @__PURE__ */ (0, N.jsx)(S_, {}), /* @__PURE__ */ (0, N.jsx)(Qm, {
|
|
20912
20916
|
...T,
|
|
20913
20917
|
controlsMounted: S,
|
|
20914
20918
|
controlsVisible: l.visible,
|
|
@@ -20925,8 +20929,8 @@ function w_({ application: e, configurationError: t, media: n, runtimeBridge: r
|
|
|
20925
20929
|
}
|
|
20926
20930
|
//#endregion
|
|
20927
20931
|
//#region src/player-application-mode.ts
|
|
20928
|
-
var
|
|
20929
|
-
function
|
|
20932
|
+
var E_ = Object.freeze({ mode: "standalone" }), D_ = /* @__PURE__ */ new WeakMap();
|
|
20933
|
+
function O_(e, t, n) {
|
|
20930
20934
|
let r = Object.freeze({
|
|
20931
20935
|
mode: t.mode,
|
|
20932
20936
|
...t.mediaSessionTrackCommands === void 0 ? {} : { mediaSessionTrackCommands: Object.freeze({
|
|
@@ -20934,32 +20938,32 @@ function D_(e, t, n) {
|
|
|
20934
20938
|
nextTrack: t.mediaSessionTrackCommands.nextTrack
|
|
20935
20939
|
}) }
|
|
20936
20940
|
});
|
|
20937
|
-
|
|
20941
|
+
D_.set(e, r);
|
|
20938
20942
|
try {
|
|
20939
20943
|
return n();
|
|
20940
20944
|
} finally {
|
|
20941
|
-
|
|
20945
|
+
D_.delete(e);
|
|
20942
20946
|
}
|
|
20943
20947
|
}
|
|
20944
|
-
function
|
|
20945
|
-
return
|
|
20948
|
+
function k_(e) {
|
|
20949
|
+
return D_.get(e) ?? E_;
|
|
20946
20950
|
}
|
|
20947
20951
|
//#endregion
|
|
20948
20952
|
//#region src/config/diagnostics.ts
|
|
20949
|
-
function
|
|
20953
|
+
function A_(e) {
|
|
20950
20954
|
return e.length === 0 ? null : {
|
|
20951
20955
|
level: "warning",
|
|
20952
20956
|
code: "config-soft-degrade",
|
|
20953
20957
|
message: `[lt-player] Configuration soft-degraded:\n${e.map((e) => `- ${e.path}: ${e.message}`).join("\n")}`
|
|
20954
20958
|
};
|
|
20955
20959
|
}
|
|
20956
|
-
function
|
|
20957
|
-
let n =
|
|
20960
|
+
function j_(e, t) {
|
|
20961
|
+
let n = A_(e);
|
|
20958
20962
|
return n !== null && t(n), n;
|
|
20959
20963
|
}
|
|
20960
20964
|
//#endregion
|
|
20961
20965
|
//#region src/config/parse-config.ts
|
|
20962
|
-
var
|
|
20966
|
+
var M_ = [
|
|
20963
20967
|
"version",
|
|
20964
20968
|
"layout",
|
|
20965
20969
|
"language",
|
|
@@ -20967,7 +20971,7 @@ var j_ = [
|
|
|
20967
20971
|
"controls",
|
|
20968
20972
|
"capabilities",
|
|
20969
20973
|
"strings"
|
|
20970
|
-
],
|
|
20974
|
+
], N_ = [
|
|
20971
20975
|
"title",
|
|
20972
20976
|
"author",
|
|
20973
20977
|
"description",
|
|
@@ -20977,14 +20981,14 @@ var j_ = [
|
|
|
20977
20981
|
"tracks",
|
|
20978
20982
|
"chapters",
|
|
20979
20983
|
"metadata"
|
|
20980
|
-
],
|
|
20984
|
+
], P_ = [
|
|
20981
20985
|
"inANutshell",
|
|
20982
20986
|
"keyConcepts",
|
|
20983
20987
|
"researchField",
|
|
20984
20988
|
"transcript",
|
|
20985
20989
|
"underlyingPublication",
|
|
20986
20990
|
"relatedVideos"
|
|
20987
|
-
],
|
|
20991
|
+
], F_ = [
|
|
20988
20992
|
"cover",
|
|
20989
20993
|
"playPause",
|
|
20990
20994
|
"timeline",
|
|
@@ -20997,27 +21001,27 @@ var j_ = [
|
|
|
20997
21001
|
"logo",
|
|
20998
21002
|
"gestures",
|
|
20999
21003
|
"hotkeys"
|
|
21000
|
-
],
|
|
21004
|
+
], I_ = [
|
|
21001
21005
|
"chapters",
|
|
21002
21006
|
"captions",
|
|
21003
21007
|
"speed",
|
|
21004
21008
|
"share",
|
|
21005
21009
|
"contextPanel"
|
|
21006
21010
|
];
|
|
21007
|
-
function
|
|
21011
|
+
function L_(e) {
|
|
21008
21012
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
21009
21013
|
}
|
|
21010
|
-
function
|
|
21014
|
+
function R_(e, t) {
|
|
21011
21015
|
return Object.hasOwn(e, t);
|
|
21012
21016
|
}
|
|
21013
|
-
function
|
|
21017
|
+
function z_(e) {
|
|
21014
21018
|
return e === "landscape" || e === "portrait";
|
|
21015
21019
|
}
|
|
21016
|
-
function
|
|
21020
|
+
function B_(e) {
|
|
21017
21021
|
return typeof e == "number" && Number.isFinite(e);
|
|
21018
21022
|
}
|
|
21019
|
-
function
|
|
21020
|
-
return
|
|
21023
|
+
function V_(e) {
|
|
21024
|
+
return B_(e) && e > 0;
|
|
21021
21025
|
}
|
|
21022
21026
|
function $(e, t, n, r, i) {
|
|
21023
21027
|
e.push({
|
|
@@ -21027,46 +21031,46 @@ function $(e, t, n, r, i) {
|
|
|
21027
21031
|
message: i
|
|
21028
21032
|
});
|
|
21029
21033
|
}
|
|
21030
|
-
function
|
|
21034
|
+
function H_(e, t, n, r) {
|
|
21031
21035
|
let i = new Set(t);
|
|
21032
21036
|
for (let t of Object.keys(e)) i.has(t) || $(r, "unknown-key", `${n}.${t}`, "omitted", "unknown key was ignored");
|
|
21033
21037
|
}
|
|
21034
|
-
function
|
|
21035
|
-
if (!
|
|
21038
|
+
function U_(e, t, n, r) {
|
|
21039
|
+
if (!R_(e, t)) return;
|
|
21036
21040
|
let i = e[t];
|
|
21037
21041
|
if (typeof i == "string") return i;
|
|
21038
21042
|
$(r, "wrong-type", `${n}.${t}`, "omitted", "expected a string");
|
|
21039
21043
|
}
|
|
21040
|
-
function
|
|
21041
|
-
if (!
|
|
21044
|
+
function W_(e, t, n, r) {
|
|
21045
|
+
if (!R_(e, t)) return;
|
|
21042
21046
|
let i = e[t];
|
|
21043
21047
|
if (typeof i == "boolean") return i;
|
|
21044
21048
|
$(r, "wrong-type", `${n}.${t}`, "omitted", "expected a boolean");
|
|
21045
21049
|
}
|
|
21046
|
-
function W_(e, t, n, r) {
|
|
21047
|
-
if (!L_(e, t)) return;
|
|
21048
|
-
let i = e[t];
|
|
21049
|
-
if (z_(i) && i >= 0) return i;
|
|
21050
|
-
$(r, z_(i) ? "invalid-value" : "wrong-type", `${n}.${t}`, "omitted", "expected a finite nonnegative number");
|
|
21051
|
-
}
|
|
21052
21050
|
function G_(e, t, n, r) {
|
|
21053
|
-
if (!
|
|
21051
|
+
if (!R_(e, t)) return;
|
|
21054
21052
|
let i = e[t];
|
|
21055
|
-
if (
|
|
21056
|
-
$(r,
|
|
21053
|
+
if (B_(i) && i >= 0) return i;
|
|
21054
|
+
$(r, B_(i) ? "invalid-value" : "wrong-type", `${n}.${t}`, "omitted", "expected a finite nonnegative number");
|
|
21057
21055
|
}
|
|
21058
21056
|
function K_(e, t, n, r) {
|
|
21057
|
+
if (!R_(e, t)) return;
|
|
21059
21058
|
let i = e[t];
|
|
21060
|
-
if (
|
|
21061
|
-
$(r,
|
|
21059
|
+
if (B_(i) && i > 0) return i;
|
|
21060
|
+
$(r, B_(i) ? "invalid-value" : "wrong-type", `${n}.${t}`, "omitted", "expected a finite positive number");
|
|
21062
21061
|
}
|
|
21063
21062
|
function q_(e, t, n, r) {
|
|
21064
21063
|
let i = e[t];
|
|
21065
|
-
if (
|
|
21066
|
-
$(r,
|
|
21064
|
+
if (typeof i == "string" && i.length > 0) return i;
|
|
21065
|
+
$(r, R_(e, t) ? typeof i == "string" ? "invalid-value" : "wrong-type" : "missing-value", `${n}.${t}`, "dropped", "entry requires a non-empty string");
|
|
21066
|
+
}
|
|
21067
|
+
function J_(e, t, n, r) {
|
|
21068
|
+
let i = e[t];
|
|
21069
|
+
if (B_(i) && i >= 0) return i;
|
|
21070
|
+
$(r, R_(e, t) ? B_(i) ? "invalid-value" : "wrong-type" : "missing-value", `${n}.${t}`, "dropped", "entry requires a finite nonnegative number");
|
|
21067
21071
|
}
|
|
21068
|
-
function
|
|
21069
|
-
if (!
|
|
21072
|
+
function Y_(e, t, n, r, i) {
|
|
21073
|
+
if (!R_(e, t)) return;
|
|
21070
21074
|
let a = e[t];
|
|
21071
21075
|
if (!Array.isArray(a)) {
|
|
21072
21076
|
$(r, "wrong-type", `${n}.${t}`, "omitted", "expected an array");
|
|
@@ -21078,30 +21082,30 @@ function J_(e, t, n, r, i) {
|
|
|
21078
21082
|
s !== void 0 && o.push(s);
|
|
21079
21083
|
}), o;
|
|
21080
21084
|
}
|
|
21081
|
-
function
|
|
21082
|
-
if (!
|
|
21085
|
+
function X_(e, t, n) {
|
|
21086
|
+
if (!L_(e)) {
|
|
21083
21087
|
$(n, "dropped-entry", t, "dropped", "source entry must be an object");
|
|
21084
21088
|
return;
|
|
21085
21089
|
}
|
|
21086
|
-
|
|
21087
|
-
let r =
|
|
21090
|
+
H_(e, ["src", "type"], t, n);
|
|
21091
|
+
let r = q_(e, "src", t, n);
|
|
21088
21092
|
if (r === void 0) return;
|
|
21089
|
-
let i = { src: r }, a =
|
|
21093
|
+
let i = { src: r }, a = U_(e, "type", t, n);
|
|
21090
21094
|
return a !== void 0 && (i.type = a), i;
|
|
21091
21095
|
}
|
|
21092
|
-
function
|
|
21093
|
-
if (!
|
|
21096
|
+
function Z_(e, t, n) {
|
|
21097
|
+
if (!L_(e)) {
|
|
21094
21098
|
$(n, "dropped-entry", t, "dropped", "track entry must be an object");
|
|
21095
21099
|
return;
|
|
21096
21100
|
}
|
|
21097
|
-
|
|
21101
|
+
H_(e, [
|
|
21098
21102
|
"src",
|
|
21099
21103
|
"kind",
|
|
21100
21104
|
"label",
|
|
21101
21105
|
"srclang",
|
|
21102
21106
|
"default"
|
|
21103
21107
|
], t, n);
|
|
21104
|
-
let r =
|
|
21108
|
+
let r = q_(e, "src", t, n);
|
|
21105
21109
|
if (r === void 0) return;
|
|
21106
21110
|
let i = { src: r };
|
|
21107
21111
|
for (let r of [
|
|
@@ -21109,19 +21113,19 @@ function X_(e, t, n) {
|
|
|
21109
21113
|
"label",
|
|
21110
21114
|
"srclang"
|
|
21111
21115
|
]) {
|
|
21112
|
-
let a =
|
|
21116
|
+
let a = U_(e, r, t, n);
|
|
21113
21117
|
a !== void 0 && (i[r] = a);
|
|
21114
21118
|
}
|
|
21115
|
-
let a =
|
|
21119
|
+
let a = W_(e, "default", t, n);
|
|
21116
21120
|
return a !== void 0 && (i.default = a), i;
|
|
21117
21121
|
}
|
|
21118
|
-
function
|
|
21119
|
-
if (!
|
|
21122
|
+
function Q_(e, t, n) {
|
|
21123
|
+
if (!L_(e)) {
|
|
21120
21124
|
$(n, "dropped-entry", t, "dropped", "chapter entry must be an object");
|
|
21121
21125
|
return;
|
|
21122
21126
|
}
|
|
21123
|
-
|
|
21124
|
-
let r =
|
|
21127
|
+
H_(e, ["name", "start"], t, n);
|
|
21128
|
+
let r = q_(e, "name", t, n), i = J_(e, "start", t, n);
|
|
21125
21129
|
if (r === void 0 || i === void 0) return;
|
|
21126
21130
|
let a = t.match(/\[(\d+)\]$/u);
|
|
21127
21131
|
return {
|
|
@@ -21132,8 +21136,8 @@ function Z_(e, t, n) {
|
|
|
21132
21136
|
index: Number(a?.[1] ?? 0)
|
|
21133
21137
|
};
|
|
21134
21138
|
}
|
|
21135
|
-
function
|
|
21136
|
-
let n =
|
|
21139
|
+
function $_(e, t) {
|
|
21140
|
+
let n = Y_(e, "chapters", "$.content", t, Q_);
|
|
21137
21141
|
if (n === void 0) return;
|
|
21138
21142
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
21139
21143
|
for (let { chapter: e, index: a } of n) {
|
|
@@ -21145,99 +21149,99 @@ function Q_(e, t) {
|
|
|
21145
21149
|
}
|
|
21146
21150
|
return i.sort((e, t) => e.start - t.start);
|
|
21147
21151
|
}
|
|
21148
|
-
function
|
|
21149
|
-
let r = {}, i =
|
|
21152
|
+
function ev(e, t, n) {
|
|
21153
|
+
let r = {}, i = W_(e, "generatedByAi", t, n);
|
|
21150
21154
|
return i !== void 0 && (r.generatedByAi = i), r;
|
|
21151
21155
|
}
|
|
21152
|
-
function
|
|
21153
|
-
if (!
|
|
21156
|
+
function tv(e, t, n) {
|
|
21157
|
+
if (!L_(e)) {
|
|
21154
21158
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21155
21159
|
return;
|
|
21156
21160
|
}
|
|
21157
|
-
|
|
21161
|
+
H_(e, [
|
|
21158
21162
|
"generatedByAi",
|
|
21159
21163
|
"keyTakeaway",
|
|
21160
21164
|
"summary"
|
|
21161
21165
|
], t, n);
|
|
21162
|
-
let r =
|
|
21166
|
+
let r = ev(e, t, n);
|
|
21163
21167
|
for (let i of ["keyTakeaway", "summary"]) {
|
|
21164
|
-
let a =
|
|
21168
|
+
let a = U_(e, i, t, n);
|
|
21165
21169
|
a !== void 0 && (r[i] = a);
|
|
21166
21170
|
}
|
|
21167
21171
|
return r;
|
|
21168
21172
|
}
|
|
21169
|
-
function
|
|
21170
|
-
if (!
|
|
21173
|
+
function nv(e, t, n) {
|
|
21174
|
+
if (!L_(e)) {
|
|
21171
21175
|
$(n, "dropped-entry", t, "dropped", "key-concept entry must be an object");
|
|
21172
21176
|
return;
|
|
21173
21177
|
}
|
|
21174
|
-
|
|
21178
|
+
H_(e, [
|
|
21175
21179
|
"label",
|
|
21176
21180
|
"description",
|
|
21177
21181
|
"start"
|
|
21178
21182
|
], t, n);
|
|
21179
|
-
let r =
|
|
21183
|
+
let r = q_(e, "label", t, n), i = q_(e, "description", t, n);
|
|
21180
21184
|
if (r === void 0 || i === void 0) return;
|
|
21181
21185
|
let a = {
|
|
21182
21186
|
label: r,
|
|
21183
21187
|
description: i
|
|
21184
|
-
}, o =
|
|
21188
|
+
}, o = G_(e, "start", t, n);
|
|
21185
21189
|
return o !== void 0 && (a.start = o), a;
|
|
21186
21190
|
}
|
|
21187
|
-
function
|
|
21188
|
-
if (!
|
|
21191
|
+
function rv(e, t, n) {
|
|
21192
|
+
if (!L_(e)) {
|
|
21189
21193
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21190
21194
|
return;
|
|
21191
21195
|
}
|
|
21192
|
-
|
|
21193
|
-
let r =
|
|
21196
|
+
H_(e, ["generatedByAi", "items"], t, n);
|
|
21197
|
+
let r = ev(e, t, n), i = Y_(e, "items", t, n, nv);
|
|
21194
21198
|
return i !== void 0 && (r.items = i), r;
|
|
21195
21199
|
}
|
|
21196
|
-
function
|
|
21197
|
-
if (!
|
|
21200
|
+
function iv(e, t, n) {
|
|
21201
|
+
if (!L_(e)) {
|
|
21198
21202
|
$(n, "dropped-entry", t, "dropped", "research-field entry must be an object");
|
|
21199
21203
|
return;
|
|
21200
21204
|
}
|
|
21201
|
-
|
|
21202
|
-
let r =
|
|
21205
|
+
H_(e, ["title", "description"], t, n);
|
|
21206
|
+
let r = q_(e, "title", t, n), i = q_(e, "description", t, n);
|
|
21203
21207
|
return r === void 0 || i === void 0 ? void 0 : {
|
|
21204
21208
|
title: r,
|
|
21205
21209
|
description: i
|
|
21206
21210
|
};
|
|
21207
21211
|
}
|
|
21208
|
-
function
|
|
21209
|
-
if (!
|
|
21212
|
+
function av(e, t, n) {
|
|
21213
|
+
if (!L_(e)) {
|
|
21210
21214
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21211
21215
|
return;
|
|
21212
21216
|
}
|
|
21213
|
-
|
|
21214
|
-
let r =
|
|
21217
|
+
H_(e, ["generatedByAi", "sections"], t, n);
|
|
21218
|
+
let r = ev(e, t, n), i = Y_(e, "sections", t, n, iv);
|
|
21215
21219
|
return i !== void 0 && (r.sections = i), r;
|
|
21216
21220
|
}
|
|
21217
|
-
function
|
|
21218
|
-
if (!
|
|
21221
|
+
function ov(e, t, n) {
|
|
21222
|
+
if (!L_(e)) {
|
|
21219
21223
|
$(n, "dropped-entry", t, "dropped", "transcript entry must be an object");
|
|
21220
21224
|
return;
|
|
21221
21225
|
}
|
|
21222
|
-
|
|
21223
|
-
let r =
|
|
21226
|
+
H_(e, ["start", "text"], t, n);
|
|
21227
|
+
let r = J_(e, "start", t, n), i = q_(e, "text", t, n);
|
|
21224
21228
|
return r === void 0 || i === void 0 ? void 0 : {
|
|
21225
21229
|
start: r,
|
|
21226
21230
|
text: i
|
|
21227
21231
|
};
|
|
21228
21232
|
}
|
|
21229
|
-
function
|
|
21230
|
-
if (!
|
|
21233
|
+
function sv(e, t, n) {
|
|
21234
|
+
if (!L_(e)) {
|
|
21231
21235
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21232
21236
|
return;
|
|
21233
21237
|
}
|
|
21234
|
-
|
|
21235
|
-
let r =
|
|
21238
|
+
H_(e, ["generatedByAi", "entries"], t, n);
|
|
21239
|
+
let r = ev(e, t, n), i = Y_(e, "entries", t, n, ov);
|
|
21236
21240
|
return i !== void 0 && (r.entries = i), r;
|
|
21237
21241
|
}
|
|
21238
|
-
function
|
|
21239
|
-
if (!
|
|
21240
|
-
$(r,
|
|
21242
|
+
function cv(e, t, n, r) {
|
|
21243
|
+
if (!R_(e, t) || !Array.isArray(e[t])) {
|
|
21244
|
+
$(r, R_(e, t) ? "wrong-type" : "missing-value", `${n}.${t}`, "dropped", "entry requires an array of strings");
|
|
21241
21245
|
return;
|
|
21242
21246
|
}
|
|
21243
21247
|
let i = [];
|
|
@@ -21245,19 +21249,19 @@ function sv(e, t, n, r) {
|
|
|
21245
21249
|
typeof e == "string" ? i.push(e) : $(r, "dropped-entry", `${n}.${t}[${a}]`, "dropped", "expected a string");
|
|
21246
21250
|
}), i;
|
|
21247
21251
|
}
|
|
21248
|
-
function
|
|
21249
|
-
if (!
|
|
21252
|
+
function lv(e, t, n) {
|
|
21253
|
+
if (!L_(e)) {
|
|
21250
21254
|
$(n, "dropped-entry", t, "dropped", "publication entry must be an object");
|
|
21251
21255
|
return;
|
|
21252
21256
|
}
|
|
21253
|
-
|
|
21257
|
+
H_(e, [
|
|
21254
21258
|
"title",
|
|
21255
21259
|
"authors",
|
|
21256
21260
|
"journal",
|
|
21257
21261
|
"abstract",
|
|
21258
21262
|
"url"
|
|
21259
21263
|
], t, n);
|
|
21260
|
-
let r =
|
|
21264
|
+
let r = q_(e, "title", t, n), i = cv(e, "authors", t, n), a = q_(e, "journal", t, n), o = q_(e, "abstract", t, n), s = q_(e, "url", t, n);
|
|
21261
21265
|
if (r !== void 0 && i !== void 0 && a !== void 0 && o !== void 0 && s !== void 0) return {
|
|
21262
21266
|
title: r,
|
|
21263
21267
|
authors: i,
|
|
@@ -21266,92 +21270,92 @@ function cv(e, t, n) {
|
|
|
21266
21270
|
url: s
|
|
21267
21271
|
};
|
|
21268
21272
|
}
|
|
21269
|
-
function
|
|
21270
|
-
if (!
|
|
21273
|
+
function uv(e, t, n) {
|
|
21274
|
+
if (!L_(e)) {
|
|
21271
21275
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21272
21276
|
return;
|
|
21273
21277
|
}
|
|
21274
|
-
|
|
21275
|
-
let r =
|
|
21278
|
+
H_(e, ["generatedByAi", "items"], t, n);
|
|
21279
|
+
let r = ev(e, t, n), i = Y_(e, "items", t, n, lv);
|
|
21276
21280
|
return i !== void 0 && (r.items = i), r;
|
|
21277
21281
|
}
|
|
21278
|
-
function
|
|
21279
|
-
if (!
|
|
21282
|
+
function dv(e, t, n) {
|
|
21283
|
+
if (!L_(e)) {
|
|
21280
21284
|
$(n, "dropped-entry", t, "dropped", "related-video entry must be an object");
|
|
21281
21285
|
return;
|
|
21282
21286
|
}
|
|
21283
|
-
|
|
21287
|
+
H_(e, [
|
|
21284
21288
|
"title",
|
|
21285
21289
|
"poster",
|
|
21286
21290
|
"url"
|
|
21287
21291
|
], t, n);
|
|
21288
|
-
let r =
|
|
21292
|
+
let r = q_(e, "title", t, n), i = q_(e, "poster", t, n), a = q_(e, "url", t, n);
|
|
21289
21293
|
return r === void 0 || i === void 0 || a === void 0 ? void 0 : {
|
|
21290
21294
|
title: r,
|
|
21291
21295
|
poster: i,
|
|
21292
21296
|
url: a
|
|
21293
21297
|
};
|
|
21294
21298
|
}
|
|
21295
|
-
function
|
|
21296
|
-
if (!
|
|
21299
|
+
function fv(e, t, n) {
|
|
21300
|
+
if (!L_(e)) {
|
|
21297
21301
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21298
21302
|
return;
|
|
21299
21303
|
}
|
|
21300
|
-
|
|
21304
|
+
H_(e, [
|
|
21301
21305
|
"generatedByAi",
|
|
21302
21306
|
"related",
|
|
21303
21307
|
"forYou"
|
|
21304
21308
|
], t, n);
|
|
21305
|
-
let r =
|
|
21309
|
+
let r = ev(e, t, n);
|
|
21306
21310
|
for (let i of ["related", "forYou"]) {
|
|
21307
|
-
let a =
|
|
21311
|
+
let a = Y_(e, i, t, n, dv);
|
|
21308
21312
|
a !== void 0 && (r[i] = a);
|
|
21309
21313
|
}
|
|
21310
21314
|
return r;
|
|
21311
21315
|
}
|
|
21312
|
-
function
|
|
21313
|
-
if (!
|
|
21316
|
+
function pv(e, t, n) {
|
|
21317
|
+
if (!L_(e)) {
|
|
21314
21318
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21315
21319
|
return;
|
|
21316
21320
|
}
|
|
21317
|
-
|
|
21321
|
+
H_(e, P_, t, n);
|
|
21318
21322
|
let r = {}, i = {
|
|
21319
|
-
inANutshell:
|
|
21320
|
-
keyConcepts:
|
|
21321
|
-
researchField:
|
|
21322
|
-
transcript:
|
|
21323
|
-
underlyingPublication:
|
|
21324
|
-
relatedVideos:
|
|
21323
|
+
inANutshell: tv,
|
|
21324
|
+
keyConcepts: rv,
|
|
21325
|
+
researchField: av,
|
|
21326
|
+
transcript: sv,
|
|
21327
|
+
underlyingPublication: uv,
|
|
21328
|
+
relatedVideos: fv
|
|
21325
21329
|
};
|
|
21326
|
-
for (let a of
|
|
21327
|
-
if (!
|
|
21330
|
+
for (let a of P_) {
|
|
21331
|
+
if (!R_(e, a)) continue;
|
|
21328
21332
|
let o = i[a](e[a], `${t}.${a}`, n);
|
|
21329
21333
|
o !== void 0 && Object.assign(r, { [a]: o });
|
|
21330
21334
|
}
|
|
21331
21335
|
return r;
|
|
21332
21336
|
}
|
|
21333
|
-
function
|
|
21337
|
+
function mv(e, t, n) {
|
|
21334
21338
|
if (typeof e == "boolean") return e;
|
|
21335
|
-
if (
|
|
21339
|
+
if (L_(e)) return H_(e, [], t, n), {};
|
|
21336
21340
|
$(n, "wrong-type", t, "omitted", "expected a boolean or object");
|
|
21337
21341
|
}
|
|
21338
|
-
function
|
|
21342
|
+
function hv(e, t, n) {
|
|
21339
21343
|
if (typeof e == "boolean") return e;
|
|
21340
|
-
if (!
|
|
21344
|
+
if (!L_(e)) {
|
|
21341
21345
|
$(n, "wrong-type", t, "omitted", "expected a boolean or object");
|
|
21342
21346
|
return;
|
|
21343
21347
|
}
|
|
21344
|
-
|
|
21345
|
-
let r = {}, i =
|
|
21348
|
+
H_(e, ["label"], t, n);
|
|
21349
|
+
let r = {}, i = U_(e, "label", t, n);
|
|
21346
21350
|
return i !== void 0 && (r.label = i), r;
|
|
21347
21351
|
}
|
|
21348
|
-
function
|
|
21352
|
+
function gv(e, t, n) {
|
|
21349
21353
|
if (typeof e == "boolean") return e;
|
|
21350
|
-
if (!
|
|
21354
|
+
if (!L_(e)) {
|
|
21351
21355
|
$(n, "wrong-type", t, "omitted", "expected a boolean or object");
|
|
21352
21356
|
return;
|
|
21353
21357
|
}
|
|
21354
|
-
|
|
21358
|
+
H_(e, [
|
|
21355
21359
|
"image",
|
|
21356
21360
|
"title",
|
|
21357
21361
|
"author",
|
|
@@ -21363,62 +21367,62 @@ function hv(e, t, n) {
|
|
|
21363
21367
|
"title",
|
|
21364
21368
|
"author"
|
|
21365
21369
|
]) {
|
|
21366
|
-
let a =
|
|
21370
|
+
let a = W_(e, i, t, n);
|
|
21367
21371
|
a !== void 0 && (r[i] = a);
|
|
21368
21372
|
}
|
|
21369
|
-
if (
|
|
21370
|
-
let i =
|
|
21373
|
+
if (R_(e, "button")) {
|
|
21374
|
+
let i = hv(e.button, `${t}.button`, n);
|
|
21371
21375
|
i !== void 0 && (r.button = i);
|
|
21372
21376
|
}
|
|
21373
21377
|
return r;
|
|
21374
21378
|
}
|
|
21375
|
-
function
|
|
21379
|
+
function _v(e, t, n) {
|
|
21376
21380
|
if (typeof e == "boolean") return e;
|
|
21377
|
-
if (!
|
|
21381
|
+
if (!L_(e)) {
|
|
21378
21382
|
$(n, "wrong-type", t, "omitted", "expected a boolean or object");
|
|
21379
21383
|
return;
|
|
21380
21384
|
}
|
|
21381
|
-
|
|
21385
|
+
H_(e, ["seekStep"], t, n);
|
|
21382
21386
|
let r = {};
|
|
21383
|
-
if (
|
|
21387
|
+
if (R_(e, "seekStep")) {
|
|
21384
21388
|
let i = e.seekStep;
|
|
21385
|
-
|
|
21389
|
+
B_(i) && i > 0 ? r.seekStep = i : $(n, B_(i) ? "invalid-value" : "wrong-type", `${t}.seekStep`, "omitted", "expected a finite positive number");
|
|
21386
21390
|
}
|
|
21387
21391
|
return r;
|
|
21388
21392
|
}
|
|
21389
|
-
function
|
|
21390
|
-
if (!
|
|
21393
|
+
function vv(e, t, n) {
|
|
21394
|
+
if (!L_(e)) {
|
|
21391
21395
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21392
21396
|
return;
|
|
21393
21397
|
}
|
|
21394
|
-
|
|
21398
|
+
H_(e, F_, t, n);
|
|
21395
21399
|
let r = {};
|
|
21396
|
-
for (let i of
|
|
21397
|
-
if (!
|
|
21398
|
-
let a = i === "cover" ?
|
|
21400
|
+
for (let i of F_) {
|
|
21401
|
+
if (!R_(e, i)) continue;
|
|
21402
|
+
let a = i === "cover" ? gv(e[i], `${t}.${i}`, n) : i === "timeline" ? _v(e[i], `${t}.${i}`, n) : mv(e[i], `${t}.${i}`, n);
|
|
21399
21403
|
a !== void 0 && Object.assign(r, { [i]: a });
|
|
21400
21404
|
}
|
|
21401
21405
|
return r;
|
|
21402
21406
|
}
|
|
21403
|
-
function
|
|
21407
|
+
function yv(e, t, n) {
|
|
21404
21408
|
if (typeof e == "boolean") return e;
|
|
21405
|
-
if (!
|
|
21409
|
+
if (!L_(e)) {
|
|
21406
21410
|
$(n, "wrong-type", t, "omitted", "expected a boolean or object");
|
|
21407
21411
|
return;
|
|
21408
21412
|
}
|
|
21409
|
-
|
|
21413
|
+
H_(e, ["options"], t, n);
|
|
21410
21414
|
let r = {};
|
|
21411
|
-
if (!
|
|
21415
|
+
if (!R_(e, "options")) return r;
|
|
21412
21416
|
let i = e.options;
|
|
21413
|
-
return Array.isArray(i) && i.length > 0 && i.every((e) =>
|
|
21417
|
+
return Array.isArray(i) && i.length > 0 && i.every((e) => B_(e) && e > 0) && i.every((e, t) => t === 0 || e > i[t - 1]) ? r.options = [...i] : $(n, Array.isArray(i) ? "invalid-value" : "wrong-type", `${t}.options`, "omitted", "expected a non-empty strictly ascending list of positive rates"), r;
|
|
21414
21418
|
}
|
|
21415
|
-
function
|
|
21419
|
+
function bv(e, t, n) {
|
|
21416
21420
|
if (typeof e == "boolean") return e;
|
|
21417
|
-
if (!
|
|
21421
|
+
if (!L_(e)) {
|
|
21418
21422
|
$(n, "wrong-type", t, "omitted", "expected a boolean or object");
|
|
21419
21423
|
return;
|
|
21420
21424
|
}
|
|
21421
|
-
|
|
21425
|
+
H_(e, [
|
|
21422
21426
|
"canonicalUrl",
|
|
21423
21427
|
"embedUrl",
|
|
21424
21428
|
"targets",
|
|
@@ -21426,10 +21430,10 @@ function yv(e, t, n) {
|
|
|
21426
21430
|
], t, n);
|
|
21427
21431
|
let r = {};
|
|
21428
21432
|
for (let i of ["canonicalUrl", "embedUrl"]) {
|
|
21429
|
-
let a =
|
|
21433
|
+
let a = U_(e, i, t, n);
|
|
21430
21434
|
a !== void 0 && (r[i] = a);
|
|
21431
21435
|
}
|
|
21432
|
-
if (
|
|
21436
|
+
if (R_(e, "targets")) {
|
|
21433
21437
|
let i = e.targets;
|
|
21434
21438
|
if (!Array.isArray(i)) $(n, "wrong-type", `${t}.targets`, "omitted", "expected an array");
|
|
21435
21439
|
else {
|
|
@@ -21461,13 +21465,13 @@ function yv(e, t, n) {
|
|
|
21461
21465
|
}), r.targets = o;
|
|
21462
21466
|
}
|
|
21463
21467
|
}
|
|
21464
|
-
if (
|
|
21465
|
-
if (!
|
|
21468
|
+
if (R_(e, "templates")) {
|
|
21469
|
+
if (!L_(e.templates)) $(n, "wrong-type", `${t}.templates`, "omitted", "expected an object");
|
|
21466
21470
|
else {
|
|
21467
|
-
|
|
21471
|
+
H_(e.templates, ["message"], `${t}.templates`, n);
|
|
21468
21472
|
let i = {};
|
|
21469
21473
|
for (let r of ["message"]) {
|
|
21470
|
-
let a =
|
|
21474
|
+
let a = U_(e.templates, r, `${t}.templates`, n);
|
|
21471
21475
|
a !== void 0 && (i[r] = a);
|
|
21472
21476
|
}
|
|
21473
21477
|
r.templates = i;
|
|
@@ -21475,22 +21479,22 @@ function yv(e, t, n) {
|
|
|
21475
21479
|
}
|
|
21476
21480
|
return r;
|
|
21477
21481
|
}
|
|
21478
|
-
function
|
|
21479
|
-
if (!
|
|
21482
|
+
function xv(e, t, n) {
|
|
21483
|
+
if (!L_(e)) {
|
|
21480
21484
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21481
21485
|
return;
|
|
21482
21486
|
}
|
|
21483
|
-
|
|
21487
|
+
H_(e, I_, t, n);
|
|
21484
21488
|
let r = {};
|
|
21485
|
-
for (let i of
|
|
21486
|
-
if (!
|
|
21487
|
-
let a = i === "speed" ?
|
|
21489
|
+
for (let i of I_) {
|
|
21490
|
+
if (!R_(e, i)) continue;
|
|
21491
|
+
let a = i === "speed" ? yv(e[i], `${t}.${i}`, n) : i === "share" ? bv(e[i], `${t}.${i}`, n) : W_(e, i, t, n);
|
|
21488
21492
|
a !== void 0 && Object.assign(r, { [i]: a });
|
|
21489
21493
|
}
|
|
21490
21494
|
return r;
|
|
21491
21495
|
}
|
|
21492
|
-
function
|
|
21493
|
-
if (!
|
|
21496
|
+
function Sv(e, t, n) {
|
|
21497
|
+
if (!L_(e)) {
|
|
21494
21498
|
$(n, "wrong-type", t, "omitted", "expected an object");
|
|
21495
21499
|
return;
|
|
21496
21500
|
}
|
|
@@ -21498,7 +21502,7 @@ function xv(e, t, n) {
|
|
|
21498
21502
|
for (let [i, a] of Object.entries(e)) typeof a == "string" ? r[i] = a : $(n, "wrong-type", `${t}.${i}`, "omitted", "expected a string");
|
|
21499
21503
|
return r;
|
|
21500
21504
|
}
|
|
21501
|
-
function
|
|
21505
|
+
function Cv(e, t, n) {
|
|
21502
21506
|
if (typeof e == "string") return e;
|
|
21503
21507
|
if (!Array.isArray(e)) {
|
|
21504
21508
|
$(n, "wrong-type", t, "omitted", "expected a string or string array");
|
|
@@ -21513,50 +21517,50 @@ function Sv(e, t, n) {
|
|
|
21513
21517
|
typeof e == "string" ? r.push(e) : $(n, "dropped-entry", `${t}[${i}]`, "dropped", "expected a string");
|
|
21514
21518
|
}), r.length > 0 ? r : void 0;
|
|
21515
21519
|
}
|
|
21516
|
-
function
|
|
21517
|
-
|
|
21518
|
-
let n = { sources: e.sources.map((e, n) =>
|
|
21520
|
+
function wv(e, t) {
|
|
21521
|
+
H_(e, N_, "$.content", t);
|
|
21522
|
+
let n = { sources: e.sources.map((e, n) => X_(e, `$.content.sources[${n}]`, t)).filter((e) => e !== void 0) };
|
|
21519
21523
|
for (let r of [
|
|
21520
21524
|
"title",
|
|
21521
21525
|
"author",
|
|
21522
21526
|
"description",
|
|
21523
21527
|
"poster"
|
|
21524
21528
|
]) {
|
|
21525
|
-
let i =
|
|
21529
|
+
let i = U_(e, r, "$.content", t);
|
|
21526
21530
|
i !== void 0 && (n[r] = i);
|
|
21527
21531
|
}
|
|
21528
|
-
let r =
|
|
21532
|
+
let r = K_(e, "duration", "$.content", t);
|
|
21529
21533
|
r !== void 0 && (n.duration = r);
|
|
21530
|
-
let i =
|
|
21534
|
+
let i = Y_(e, "tracks", "$.content", t, Z_);
|
|
21531
21535
|
i !== void 0 && (n.tracks = i);
|
|
21532
|
-
let a =
|
|
21533
|
-
if (a !== void 0 && (n.chapters = a),
|
|
21534
|
-
let r =
|
|
21536
|
+
let a = $_(e, t);
|
|
21537
|
+
if (a !== void 0 && (n.chapters = a), R_(e, "metadata")) {
|
|
21538
|
+
let r = pv(e.metadata, "$.content.metadata", t);
|
|
21535
21539
|
r !== void 0 && (n.metadata = r);
|
|
21536
21540
|
}
|
|
21537
21541
|
return n;
|
|
21538
21542
|
}
|
|
21539
|
-
function
|
|
21543
|
+
function Tv(e, t) {
|
|
21540
21544
|
return {
|
|
21541
21545
|
level: "error",
|
|
21542
21546
|
code: t ? "legacy-config-invalid" : "config-invalid",
|
|
21543
21547
|
message: `${t ? "[lt-player] Legacy pre-v3 configuration rejected" : "[lt-player] Configuration rejected"}:\n${e.map((e) => `- ${e.path}: ${e.message}`).join("\n")}`
|
|
21544
21548
|
};
|
|
21545
21549
|
}
|
|
21546
|
-
function
|
|
21550
|
+
function Ev(e, t) {
|
|
21547
21551
|
return {
|
|
21548
21552
|
status: "valid",
|
|
21549
21553
|
config: e,
|
|
21550
21554
|
findings: t,
|
|
21551
|
-
diagnostic:
|
|
21555
|
+
diagnostic: A_(t)
|
|
21552
21556
|
};
|
|
21553
21557
|
}
|
|
21554
|
-
function
|
|
21558
|
+
function Dv(e, t, n) {
|
|
21555
21559
|
return e.filter((e) => e.start <= t || ($(n, "chapter-beyond-duration", "$.content.chapters", "dropped", `chapter "${e.name}" at ${e.start} seconds exceeds duration ${t}`), !1));
|
|
21556
21560
|
}
|
|
21557
|
-
function
|
|
21558
|
-
let n =
|
|
21559
|
-
if (
|
|
21561
|
+
function Ov(e, t) {
|
|
21562
|
+
let n = L_(e) ? e : {}, r = L_(n.content) ? n.content : void 0, i = n.layout, a = [];
|
|
21563
|
+
if (z_(i) || a.push({
|
|
21560
21564
|
code: "invalid-layout",
|
|
21561
21565
|
path: "$.layout",
|
|
21562
21566
|
message: "layout must be landscape or portrait"
|
|
@@ -21564,54 +21568,54 @@ function Dv(e, t) {
|
|
|
21564
21568
|
code: "missing-sources",
|
|
21565
21569
|
path: "$.content.sources",
|
|
21566
21570
|
message: "content.sources must be a non-empty array"
|
|
21567
|
-
}), t.application === "update" &&
|
|
21571
|
+
}), t.application === "update" && z_(i) && i !== t.instanceLayout && a.push({
|
|
21568
21572
|
code: "layout-change",
|
|
21569
21573
|
path: "$.layout",
|
|
21570
21574
|
message: `layout cannot change from ${t.instanceLayout} to ${i}`
|
|
21571
21575
|
}), a.length > 0) {
|
|
21572
|
-
let e =
|
|
21576
|
+
let e = R_(n, "body");
|
|
21573
21577
|
return {
|
|
21574
21578
|
status: "invalid",
|
|
21575
21579
|
violations: a,
|
|
21576
21580
|
legacy: e,
|
|
21577
|
-
diagnostic:
|
|
21581
|
+
diagnostic: Tv(a, e)
|
|
21578
21582
|
};
|
|
21579
21583
|
}
|
|
21580
21584
|
let o = [];
|
|
21581
|
-
|
|
21585
|
+
H_(n, M_, "$", o);
|
|
21582
21586
|
let s = {
|
|
21583
21587
|
version: 3,
|
|
21584
21588
|
layout: i,
|
|
21585
|
-
content:
|
|
21589
|
+
content: wv(r, o)
|
|
21586
21590
|
};
|
|
21587
|
-
if (
|
|
21588
|
-
let e =
|
|
21591
|
+
if (R_(n, "version") && n.version !== 3 && $(o, typeof n.version == "number" ? "invalid-value" : "wrong-type", "$.version", "omitted", "version was normalized to 3"), R_(n, "language")) {
|
|
21592
|
+
let e = Cv(n.language, "$.language", o);
|
|
21589
21593
|
e !== void 0 && (s.language = e);
|
|
21590
21594
|
}
|
|
21591
|
-
if (
|
|
21592
|
-
let e =
|
|
21595
|
+
if (R_(n, "controls")) {
|
|
21596
|
+
let e = vv(n.controls, "$.controls", o);
|
|
21593
21597
|
e !== void 0 && (s.controls = e);
|
|
21594
21598
|
}
|
|
21595
|
-
if (
|
|
21596
|
-
let e =
|
|
21599
|
+
if (R_(n, "capabilities")) {
|
|
21600
|
+
let e = xv(n.capabilities, "$.capabilities", o);
|
|
21597
21601
|
e !== void 0 && (s.capabilities = e);
|
|
21598
21602
|
}
|
|
21599
|
-
if (
|
|
21600
|
-
let e =
|
|
21603
|
+
if (R_(n, "strings")) {
|
|
21604
|
+
let e = Sv(n.strings, "$.strings", o);
|
|
21601
21605
|
e !== void 0 && (s.strings = e);
|
|
21602
21606
|
}
|
|
21603
|
-
let c = s.content.chapters, l = s.content.duration ?? (
|
|
21607
|
+
let c = s.content.chapters, l = s.content.duration ?? (V_(t.engineDuration) ? t.engineDuration : void 0);
|
|
21604
21608
|
return c !== void 0 && c.length > 0 && l === void 0 ? {
|
|
21605
21609
|
status: "pending-duration",
|
|
21606
21610
|
config: s,
|
|
21607
21611
|
findings: o,
|
|
21608
21612
|
diagnostic: null
|
|
21609
|
-
} : (c !== void 0 && l !== void 0 && (s.content.chapters =
|
|
21613
|
+
} : (c !== void 0 && l !== void 0 && (s.content.chapters = Dv(c, l, o)), Ev(s, o));
|
|
21610
21614
|
}
|
|
21611
|
-
function
|
|
21612
|
-
if (!
|
|
21613
|
-
let n = [...e.findings], r =
|
|
21614
|
-
return
|
|
21615
|
+
function kv(e, t) {
|
|
21616
|
+
if (!V_(t)) return e;
|
|
21617
|
+
let n = [...e.findings], r = Dv(e.config.content.chapters ?? [], t, n);
|
|
21618
|
+
return Ev({
|
|
21615
21619
|
...e.config,
|
|
21616
21620
|
content: {
|
|
21617
21621
|
...e.config.content,
|
|
@@ -21619,16 +21623,16 @@ function Ov(e, t) {
|
|
|
21619
21623
|
}
|
|
21620
21624
|
}, n);
|
|
21621
21625
|
}
|
|
21622
|
-
function
|
|
21623
|
-
return
|
|
21626
|
+
function Av(e) {
|
|
21627
|
+
return Ev(e.config, e.findings);
|
|
21624
21628
|
}
|
|
21625
21629
|
//#endregion
|
|
21626
21630
|
//#region src/page-api/player-runtime.ts
|
|
21627
|
-
var
|
|
21628
|
-
function
|
|
21631
|
+
var jv = Symbol("chapter-unset"), Mv = () => void 0;
|
|
21632
|
+
function Nv(e) {
|
|
21629
21633
|
return Number.isFinite(e) && e >= 0 ? e : 0;
|
|
21630
21634
|
}
|
|
21631
|
-
function
|
|
21635
|
+
function Pv(e) {
|
|
21632
21636
|
return Eh({
|
|
21633
21637
|
version: 3,
|
|
21634
21638
|
layout: e,
|
|
@@ -21642,14 +21646,14 @@ function Nv(e) {
|
|
|
21642
21646
|
}
|
|
21643
21647
|
});
|
|
21644
21648
|
}
|
|
21645
|
-
function
|
|
21649
|
+
function Fv(e) {
|
|
21646
21650
|
if (typeof e == "object" && e && "layout" in e) {
|
|
21647
21651
|
let t = e.layout;
|
|
21648
21652
|
if (t === "landscape" || t === "portrait") return t;
|
|
21649
21653
|
}
|
|
21650
21654
|
return "landscape";
|
|
21651
21655
|
}
|
|
21652
|
-
var
|
|
21656
|
+
var Iv = class {
|
|
21653
21657
|
#e;
|
|
21654
21658
|
#t;
|
|
21655
21659
|
#n;
|
|
@@ -21668,7 +21672,7 @@ var Fv = class {
|
|
|
21668
21672
|
#h = 0;
|
|
21669
21673
|
#g = "";
|
|
21670
21674
|
#_ = -1;
|
|
21671
|
-
#v =
|
|
21675
|
+
#v = jv;
|
|
21672
21676
|
#y = Object.freeze({
|
|
21673
21677
|
playback: "idle",
|
|
21674
21678
|
currentTime: 0,
|
|
@@ -21721,9 +21725,9 @@ var Fv = class {
|
|
|
21721
21725
|
return this.#x;
|
|
21722
21726
|
}
|
|
21723
21727
|
mount(e) {
|
|
21724
|
-
let t =
|
|
21728
|
+
let t = Ov(e, { application: "mount" });
|
|
21725
21729
|
if (t.status === "invalid") {
|
|
21726
|
-
let n =
|
|
21730
|
+
let n = Fv(e), r = Pv(n), i = mh(), a = Hm(r);
|
|
21727
21731
|
throw this.#m += 1, this.#l = Object.freeze({
|
|
21728
21732
|
generation: this.#m,
|
|
21729
21733
|
revision: ++this.#h,
|
|
@@ -21746,7 +21750,7 @@ var Fv = class {
|
|
|
21746
21750
|
if (this.#b) return;
|
|
21747
21751
|
let t = this.application;
|
|
21748
21752
|
this.#E();
|
|
21749
|
-
let n =
|
|
21753
|
+
let n = Ov(e, {
|
|
21750
21754
|
application: "update",
|
|
21751
21755
|
instanceLayout: t.config.layout
|
|
21752
21756
|
});
|
|
@@ -21770,8 +21774,8 @@ var Fv = class {
|
|
|
21770
21774
|
});
|
|
21771
21775
|
let e = this.#d.getSnapshot(), t = this.#d.playerState.getSnapshot().playback, n = Object.freeze({
|
|
21772
21776
|
playback: t,
|
|
21773
|
-
currentTime:
|
|
21774
|
-
duration:
|
|
21777
|
+
currentTime: Nv(e.currentTime),
|
|
21778
|
+
duration: Nv(e.duration),
|
|
21775
21779
|
volume: e.volume,
|
|
21776
21780
|
muted: e.muted,
|
|
21777
21781
|
rate: e.rate,
|
|
@@ -21782,7 +21786,7 @@ var Fv = class {
|
|
|
21782
21786
|
return this.#y = n, n;
|
|
21783
21787
|
}
|
|
21784
21788
|
on(e, t) {
|
|
21785
|
-
if (this.#b) return
|
|
21789
|
+
if (this.#b) return Mv;
|
|
21786
21790
|
let n = this.#s.get(e) ?? /* @__PURE__ */ new Set();
|
|
21787
21791
|
this.#s.set(e, n);
|
|
21788
21792
|
let r = t;
|
|
@@ -21793,7 +21797,7 @@ var Fv = class {
|
|
|
21793
21797
|
};
|
|
21794
21798
|
}
|
|
21795
21799
|
attachEngine(e) {
|
|
21796
|
-
if (this.#b) return
|
|
21800
|
+
if (this.#b) return Mv;
|
|
21797
21801
|
this.#f?.(), this.#d = e;
|
|
21798
21802
|
let t = e.media, n = e.getSnapshot(), r = e.playerState.getSnapshot(), i = e.subscribe(() => {
|
|
21799
21803
|
let t = e.getSnapshot();
|
|
@@ -21823,7 +21827,7 @@ var Fv = class {
|
|
|
21823
21827
|
let n = this.application;
|
|
21824
21828
|
if (n.generation !== e || n.revision !== t) return;
|
|
21825
21829
|
let r = `${e}:${t}`;
|
|
21826
|
-
this.#g !== r && (this.#g = r, n.commit !== "duration" && (this.#S = !0, this.#_ = -1, this.#v =
|
|
21830
|
+
this.#g !== r && (this.#g = r, n.commit !== "duration" && (this.#S = !0, this.#_ = -1, this.#v = jv, n.configurationError ? (this.#d.pause(), this.#d.playerState.enterConfigurationError()) : (this.#C = n.generation, this.#d.playerState.resetForApplication(this.#r), this.#d.userState.applyResolvedConfig(n.config, this.#r), this.#d.load()), this.#S = !1, n.commit === "update" && this.#I("videoChange", {})));
|
|
21827
21831
|
}
|
|
21828
21832
|
#w(e, t) {
|
|
21829
21833
|
let n = this.#d?.userState.getSnapshot() ?? this.#a.hydrate(), r = Eh(e.config, n), i = mh(typeof r.language == "string" ? r.language : [...r.language], r.strings), a = this.#l?.registry ?? Hm(r);
|
|
@@ -21846,7 +21850,7 @@ var Fv = class {
|
|
|
21846
21850
|
#T(e) {
|
|
21847
21851
|
let t = this.#u;
|
|
21848
21852
|
if (t === null || t.generation !== this.application.generation || this.#C !== -1 || !Number.isFinite(e) || e <= 0) return;
|
|
21849
|
-
let n =
|
|
21853
|
+
let n = kv(t.result, e);
|
|
21850
21854
|
if (n.status === "pending-duration") return;
|
|
21851
21855
|
this.#u = null;
|
|
21852
21856
|
let r = this.#d?.userState.getSnapshot() ?? this.#a.hydrate(), i = Eh(n.config, r);
|
|
@@ -21861,7 +21865,7 @@ var Fv = class {
|
|
|
21861
21865
|
let e = this.#u;
|
|
21862
21866
|
if (e === null) return;
|
|
21863
21867
|
this.#u = null;
|
|
21864
|
-
let t =
|
|
21868
|
+
let t = Av(e.result);
|
|
21865
21869
|
this.#L([...t.findings, ...e.stringFindings]);
|
|
21866
21870
|
}
|
|
21867
21871
|
#D(e) {
|
|
@@ -21891,7 +21895,7 @@ var Fv = class {
|
|
|
21891
21895
|
#M(e) {
|
|
21892
21896
|
if (!(this.#b || this.#S || this.#d === null)) {
|
|
21893
21897
|
if (e === "canplay") {
|
|
21894
|
-
this.#C = -1, this.#T(this.#d.getSnapshot().duration), this.#_ !== this.application.generation && (this.#_ = this.application.generation, this.#I("ready", { duration:
|
|
21898
|
+
this.#C = -1, this.#T(this.#d.getSnapshot().duration), this.#_ !== this.application.generation && (this.#_ = this.application.generation, this.#I("ready", { duration: Nv(this.#d.getSnapshot().duration) }));
|
|
21895
21899
|
return;
|
|
21896
21900
|
}
|
|
21897
21901
|
if (this.#C === -1) {
|
|
@@ -21926,33 +21930,33 @@ var Fv = class {
|
|
|
21926
21930
|
}
|
|
21927
21931
|
#I(e, t) {
|
|
21928
21932
|
if (this.#b) return;
|
|
21929
|
-
let n =
|
|
21933
|
+
let n = Nv(this.#d?.getSnapshot().currentTime ?? 0), r = Object.freeze({
|
|
21930
21934
|
currentTime: n,
|
|
21931
21935
|
...t
|
|
21932
21936
|
});
|
|
21933
21937
|
for (let t of [...this.#s.get(e) ?? []]) t(r);
|
|
21934
21938
|
}
|
|
21935
21939
|
#L(e) {
|
|
21936
|
-
|
|
21940
|
+
j_(e, (e) => this.#R(e));
|
|
21937
21941
|
}
|
|
21938
21942
|
#R(e) {
|
|
21939
21943
|
e.level === "error" ? console.error(e.message) : console.warn(e.message);
|
|
21940
21944
|
}
|
|
21941
|
-
},
|
|
21942
|
-
function
|
|
21945
|
+
}, Lv = /* @__PURE__ */ new WeakMap();
|
|
21946
|
+
function Rv(e) {
|
|
21943
21947
|
return e.id ? `#${e.id}` : e.tagName.toLowerCase();
|
|
21944
21948
|
}
|
|
21945
|
-
function
|
|
21946
|
-
let n =
|
|
21949
|
+
function zv(e, t) {
|
|
21950
|
+
let n = Lv.get(e);
|
|
21947
21951
|
if (n !== void 0) {
|
|
21948
|
-
if (!n.isFailedMount()) throw Error(`Cannot create player: host ${
|
|
21952
|
+
if (!n.isFailedMount()) throw Error(`Cannot create player: host ${Rv(e)} is already owned`);
|
|
21949
21953
|
n.destroy();
|
|
21950
21954
|
}
|
|
21951
|
-
let r = (0, od.createRoot)(e), i = new
|
|
21952
|
-
applicationContext:
|
|
21955
|
+
let r = (0, od.createRoot)(e), i = new Iv({
|
|
21956
|
+
applicationContext: k_(e),
|
|
21953
21957
|
render(e) {
|
|
21954
21958
|
r !== null && (0, Cl.flushSync)(() => {
|
|
21955
|
-
r?.render((0, w.createElement)(
|
|
21959
|
+
r?.render((0, w.createElement)(g_, {
|
|
21956
21960
|
application: e,
|
|
21957
21961
|
runtime: i
|
|
21958
21962
|
}));
|
|
@@ -21964,10 +21968,10 @@ function Rv(e, t) {
|
|
|
21964
21968
|
r = null, (0, Cl.flushSync)(() => e.unmount());
|
|
21965
21969
|
},
|
|
21966
21970
|
releaseHost() {
|
|
21967
|
-
|
|
21971
|
+
Lv.get(e) === i && Lv.delete(e);
|
|
21968
21972
|
}
|
|
21969
21973
|
});
|
|
21970
|
-
return
|
|
21974
|
+
return Lv.set(e, i), i.mount(t);
|
|
21971
21975
|
}
|
|
21972
21976
|
//#endregion
|
|
21973
|
-
export { m as _, jp as a, Qt as c, bt as d, ht as f, v as g, f as h, kp as i, Zt as l, _ as m,
|
|
21977
|
+
export { m as _, jp as a, Qt as c, bt as d, ht as f, v as g, f as h, kp as i, Zt as l, _ as m, O_ as n, Nd as o, M as p, Ep as r, yn as s, zv as t, Xt as u };
|