@golstats/gsc-landing 1.0.100 → 1.0.101
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/gsc-landing.js +134 -134
- package/dist/gsc-landing.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gsc-landing.js
CHANGED
|
@@ -4908,7 +4908,7 @@ var Lg = lt({
|
|
|
4908
4908
|
})));
|
|
4909
4909
|
}
|
|
4910
4910
|
Ie(() => {
|
|
4911
|
-
Ba(() => W()), setTimeout(() => W(), 1e3), Y(),
|
|
4911
|
+
Ba(() => W()), setTimeout(() => W(), 1e3), Y(), K(), window.addEventListener("resize", X, { passive: !0 }), t("init");
|
|
4912
4912
|
}), ft(() => {
|
|
4913
4913
|
B && clearTimeout(B), C && clearInterval(C), window.removeEventListener("resize", X, {
|
|
4914
4914
|
passive: !0
|
|
@@ -4938,13 +4938,13 @@ var Lg = lt({
|
|
|
4938
4938
|
}
|
|
4939
4939
|
E(y.value - I), le.x = 0, le.y = 0, Ee.value = !1, document.removeEventListener(Z ? "touchmove" : "mousemove", ot, !0), document.removeEventListener(Z ? "touchend" : "mouseup", nt, !0);
|
|
4940
4940
|
}
|
|
4941
|
-
function
|
|
4941
|
+
function K() {
|
|
4942
4942
|
!l.autoplay || l.autoplay <= 0 || (C = setInterval(() => {
|
|
4943
4943
|
l.pauseAutoplayOnHover && Te.value || G();
|
|
4944
4944
|
}, l.autoplay));
|
|
4945
4945
|
}
|
|
4946
4946
|
function q() {
|
|
4947
|
-
C && (clearInterval(C), C = null),
|
|
4947
|
+
C && (clearInterval(C), C = null), K();
|
|
4948
4948
|
}
|
|
4949
4949
|
const j = O(!1);
|
|
4950
4950
|
function E(A) {
|
|
@@ -9609,7 +9609,7 @@ var J1 = lt({
|
|
|
9609
9609
|
})));
|
|
9610
9610
|
}
|
|
9611
9611
|
Ie(() => {
|
|
9612
|
-
Ba(() => W()), setTimeout(() => W(), 1e3), Y(),
|
|
9612
|
+
Ba(() => W()), setTimeout(() => W(), 1e3), Y(), K(), window.addEventListener("resize", X, { passive: !0 }), t("init");
|
|
9613
9613
|
}), ft(() => {
|
|
9614
9614
|
B && clearTimeout(B), C && clearInterval(C), window.removeEventListener("resize", X, {
|
|
9615
9615
|
passive: !0
|
|
@@ -9639,13 +9639,13 @@ var J1 = lt({
|
|
|
9639
9639
|
}
|
|
9640
9640
|
E(y.value - I), le.x = 0, le.y = 0, Ee.value = !1, document.removeEventListener(Z ? "touchmove" : "mousemove", ot, !0), document.removeEventListener(Z ? "touchend" : "mouseup", nt, !0);
|
|
9641
9641
|
}
|
|
9642
|
-
function
|
|
9642
|
+
function K() {
|
|
9643
9643
|
!l.autoplay || l.autoplay <= 0 || (C = setInterval(() => {
|
|
9644
9644
|
l.pauseAutoplayOnHover && Te.value || G();
|
|
9645
9645
|
}, l.autoplay));
|
|
9646
9646
|
}
|
|
9647
9647
|
function q() {
|
|
9648
|
-
C && (clearInterval(C), C = null),
|
|
9648
|
+
C && (clearInterval(C), C = null), K();
|
|
9649
9649
|
}
|
|
9650
9650
|
const j = O(!1);
|
|
9651
9651
|
function E(A) {
|
|
@@ -10434,7 +10434,7 @@ var Tb = lt({
|
|
|
10434
10434
|
})));
|
|
10435
10435
|
}
|
|
10436
10436
|
Ie(() => {
|
|
10437
|
-
Ba(() => W()), setTimeout(() => W(), 1e3), Y(),
|
|
10437
|
+
Ba(() => W()), setTimeout(() => W(), 1e3), Y(), K(), window.addEventListener("resize", X, { passive: !0 }), t("init");
|
|
10438
10438
|
}), ft(() => {
|
|
10439
10439
|
B && clearTimeout(B), C && clearInterval(C), window.removeEventListener("resize", X, {
|
|
10440
10440
|
passive: !0
|
|
@@ -10464,13 +10464,13 @@ var Tb = lt({
|
|
|
10464
10464
|
}
|
|
10465
10465
|
E(y.value - I), le.x = 0, le.y = 0, Ee.value = !1, document.removeEventListener(Z ? "touchmove" : "mousemove", ot, !0), document.removeEventListener(Z ? "touchend" : "mouseup", nt, !0);
|
|
10466
10466
|
}
|
|
10467
|
-
function
|
|
10467
|
+
function K() {
|
|
10468
10468
|
!l.autoplay || l.autoplay <= 0 || (C = setInterval(() => {
|
|
10469
10469
|
l.pauseAutoplayOnHover && Te.value || G();
|
|
10470
10470
|
}, l.autoplay));
|
|
10471
10471
|
}
|
|
10472
10472
|
function q() {
|
|
10473
|
-
C && (clearInterval(C), C = null),
|
|
10473
|
+
C && (clearInterval(C), C = null), K();
|
|
10474
10474
|
}
|
|
10475
10475
|
const j = O(!1);
|
|
10476
10476
|
function E(A) {
|
|
@@ -12319,26 +12319,26 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12319
12319
|
if (t.games)
|
|
12320
12320
|
return le(t.games, t.isTeamGamePerPage);
|
|
12321
12321
|
{
|
|
12322
|
-
const
|
|
12323
|
-
return
|
|
12324
|
-
|
|
12325
|
-
] :
|
|
12322
|
+
const K = l.value.get(u.value.key);
|
|
12323
|
+
return K && t.isTeamGamePerPage && t.onlyGamesTeamId ? [
|
|
12324
|
+
K[0].filter((q) => q.home_team.team_id === t.onlyGamesTeamId || q.visiting_team.team_id === t.onlyGamesTeamId)
|
|
12325
|
+
] : K || [];
|
|
12326
12326
|
}
|
|
12327
12327
|
}), B = O([]), R = O([]), Y = N(() => {
|
|
12328
|
-
const
|
|
12329
|
-
return q && c.value && ($(!1), ut(q)),
|
|
12328
|
+
const K = R.value && R.value.length ? W(n.value) : X(n.value), q = B.value.find((j) => j.key === K);
|
|
12329
|
+
return q && c.value && ($(!1), ut(q)), K;
|
|
12330
12330
|
});
|
|
12331
12331
|
ne(
|
|
12332
12332
|
() => t.seasons,
|
|
12333
|
-
(
|
|
12334
|
-
|
|
12333
|
+
(K) => {
|
|
12334
|
+
K && K.length && ($(!0), i.value = K.map((q) => q.id), Ce(K, !0));
|
|
12335
12335
|
},
|
|
12336
12336
|
{ immediate: !0, deep: !0 }
|
|
12337
12337
|
), ne(
|
|
12338
12338
|
l,
|
|
12339
|
-
(
|
|
12340
|
-
if (t.onlyGamesTeamId &&
|
|
12341
|
-
const q = Array.from(
|
|
12339
|
+
(K) => {
|
|
12340
|
+
if (t.onlyGamesTeamId && K.size) {
|
|
12341
|
+
const q = Array.from(K.values()).reduce((j, E) => (E.forEach((G) => {
|
|
12342
12342
|
const Q = G.find((_) => _.home_team.team_id === t.onlyGamesTeamId || _.visiting_team.team_id === t.onlyGamesTeamId);
|
|
12343
12343
|
Q && j.push(Q);
|
|
12344
12344
|
}), j), []);
|
|
@@ -12347,12 +12347,12 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12347
12347
|
},
|
|
12348
12348
|
{ immediate: !0 }
|
|
12349
12349
|
);
|
|
12350
|
-
function $(
|
|
12351
|
-
|
|
12350
|
+
function $(K) {
|
|
12351
|
+
c.value = K;
|
|
12352
12352
|
}
|
|
12353
|
-
function X(
|
|
12353
|
+
function X(K) {
|
|
12354
12354
|
const q = Object.entries(
|
|
12355
|
-
Object.entries(
|
|
12355
|
+
Object.entries(K).reduce((G, [Q, _]) => (G[Q] = [], _.forEach((ue) => {
|
|
12356
12356
|
ue.games.forEach((ze) => {
|
|
12357
12357
|
const Pe = new Date(ze.date_time_utc).getTime() + 66e5;
|
|
12358
12358
|
G[Q].push(Pe);
|
|
@@ -12373,11 +12373,11 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12373
12373
|
);
|
|
12374
12374
|
return E.shortestTime !== null ? E.round : q[q.length - 1][0];
|
|
12375
12375
|
}
|
|
12376
|
-
function W(
|
|
12376
|
+
function W(K) {
|
|
12377
12377
|
let q = 1;
|
|
12378
12378
|
if (R.value.length) {
|
|
12379
12379
|
const j = R.value[0];
|
|
12380
|
-
for (const [E, G] of Object.entries(
|
|
12380
|
+
for (const [E, G] of Object.entries(K))
|
|
12381
12381
|
for (const Q of G)
|
|
12382
12382
|
if (Q.games.find((_) => _.game_id === j.game_id))
|
|
12383
12383
|
return E;
|
|
@@ -12391,11 +12391,11 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12391
12391
|
},
|
|
12392
12392
|
{ immediate: !0 }
|
|
12393
12393
|
);
|
|
12394
|
-
async function ge(
|
|
12394
|
+
async function ge(K, q, j = "") {
|
|
12395
12395
|
let E = j;
|
|
12396
12396
|
try {
|
|
12397
12397
|
const G = {};
|
|
12398
|
-
t.token && (G.Authorization = t.token), E || (E = "https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",
|
|
12398
|
+
t.token && (G.Authorization = t.token), E || (E = "https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?", K.forEach((ue, ze) => {
|
|
12399
12399
|
E += `${ze === 0 ? "" : "&"}seasons=${ue}`;
|
|
12400
12400
|
}));
|
|
12401
12401
|
const {
|
|
@@ -12404,28 +12404,28 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12404
12404
|
return { seasonsAndGames: Q, seasonsAndTeams: _ };
|
|
12405
12405
|
} catch (G) {
|
|
12406
12406
|
if (q > 0)
|
|
12407
|
-
return ge(
|
|
12407
|
+
return ge(K, q - 1, E);
|
|
12408
12408
|
throw new Error(G);
|
|
12409
12409
|
}
|
|
12410
12410
|
}
|
|
12411
|
-
function Z(
|
|
12412
|
-
for (const q of
|
|
12411
|
+
function Z(K) {
|
|
12412
|
+
for (const q of K)
|
|
12413
12413
|
if (!i.value.includes(q.season_id))
|
|
12414
12414
|
return !0;
|
|
12415
12415
|
return !1;
|
|
12416
12416
|
}
|
|
12417
|
-
async function Ce(
|
|
12417
|
+
async function Ce(K, q) {
|
|
12418
12418
|
try {
|
|
12419
12419
|
n.value = {};
|
|
12420
12420
|
let j = 0;
|
|
12421
12421
|
const { seasonsAndGames: E, seasonsAndTeams: G } = await ge(
|
|
12422
|
-
|
|
12422
|
+
K.map((_) => _.id),
|
|
12423
12423
|
3
|
|
12424
12424
|
);
|
|
12425
12425
|
if (q && Z(E))
|
|
12426
12426
|
return;
|
|
12427
12427
|
E.forEach((_) => {
|
|
12428
|
-
const { type: ue } =
|
|
12428
|
+
const { type: ue } = K.find((ze) => ze.id === _.season_id);
|
|
12429
12429
|
_.type = ue, _.games.forEach((ze) => {
|
|
12430
12430
|
ze.season_id = _.season_id;
|
|
12431
12431
|
}), ue === 0 && (j = _.season_id);
|
|
@@ -12442,7 +12442,7 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12442
12442
|
if (!y.value)
|
|
12443
12443
|
return;
|
|
12444
12444
|
R.value = [];
|
|
12445
|
-
const
|
|
12445
|
+
const K = g.value && g.value.seasonsGames ? g.value.seasonsGames.map((q) => {
|
|
12446
12446
|
const j = q.games.reduce((E, G) => {
|
|
12447
12447
|
if (t.onlyGamesTeamId && t.onlyGamesTeamId !== G.home_team && t.onlyGamesTeamId !== G.visiting_team)
|
|
12448
12448
|
return E;
|
|
@@ -12466,7 +12466,7 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12466
12466
|
schedule: j
|
|
12467
12467
|
};
|
|
12468
12468
|
}) : [];
|
|
12469
|
-
|
|
12469
|
+
K.sort((q, j) => q.weight - j.weight), n.value = K.reduce((q, j) => {
|
|
12470
12470
|
for (const [E, G] of Object.entries(j.schedule))
|
|
12471
12471
|
if (j.type === 0)
|
|
12472
12472
|
if ([1, 2].includes(t.tournamentType)) {
|
|
@@ -12502,26 +12502,26 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12502
12502
|
}, /* @__PURE__ */ new Map()).values()
|
|
12503
12503
|
);
|
|
12504
12504
|
}
|
|
12505
|
-
function le(
|
|
12505
|
+
function le(K, q = !1) {
|
|
12506
12506
|
const j = [];
|
|
12507
12507
|
if (t.gamesPerMatchDay > 0) {
|
|
12508
12508
|
let E = [];
|
|
12509
|
-
|
|
12509
|
+
K.forEach((G, Q) => {
|
|
12510
12510
|
E.push(G), (Q + 1) % t.gamesPerMatchDay === 0 && (j.push([...E]), E = []);
|
|
12511
12511
|
}), E.length && j.push([...E]);
|
|
12512
12512
|
} else
|
|
12513
|
-
j.push(
|
|
12513
|
+
j.push(K);
|
|
12514
12514
|
return q && t.isTeamGamePerPage && t.defaultGameId ? j.filter((E) => E.game_id === t.defaultGameId || E.gameId === t.defaultGameId) : j;
|
|
12515
12515
|
}
|
|
12516
|
-
async function Te(
|
|
12516
|
+
async function Te(K) {
|
|
12517
12517
|
try {
|
|
12518
12518
|
const { data: q } = await mr.get(
|
|
12519
12519
|
"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"
|
|
12520
12520
|
);
|
|
12521
12521
|
return q;
|
|
12522
12522
|
} catch (q) {
|
|
12523
|
-
if (
|
|
12524
|
-
return Te(
|
|
12523
|
+
if (K > 0)
|
|
12524
|
+
return Te(K - 1);
|
|
12525
12525
|
throw new Error(q);
|
|
12526
12526
|
}
|
|
12527
12527
|
}
|
|
@@ -12533,17 +12533,17 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12533
12533
|
else
|
|
12534
12534
|
throw new Error("Resize observer not supported!");
|
|
12535
12535
|
}
|
|
12536
|
-
function ut(
|
|
12537
|
-
u.value.value !==
|
|
12536
|
+
function ut(K) {
|
|
12537
|
+
u.value.value !== K.value && (u.value = K, a("change-round", K));
|
|
12538
12538
|
}
|
|
12539
|
-
function yt(
|
|
12540
|
-
t.areGamesCarouselType && a("change-game-carousel",
|
|
12539
|
+
function yt(K) {
|
|
12540
|
+
t.areGamesCarouselType && a("change-game-carousel", K.selectedItem);
|
|
12541
12541
|
}
|
|
12542
|
-
function Xe(
|
|
12543
|
-
a("action",
|
|
12542
|
+
function Xe(K) {
|
|
12543
|
+
a("action", K), ot(K);
|
|
12544
12544
|
}
|
|
12545
|
-
function ot(
|
|
12546
|
-
const q = "PLAY_RESUME", j = "PLAY_GOALS", E = [607, 608, 12, 55, 54, 35, 14, 52, 15, 53, 466, 477], G = [12, 55, "35_r", "54_r"], { game_id: Q, season_id: _ } =
|
|
12545
|
+
function ot(K) {
|
|
12546
|
+
const q = "PLAY_RESUME", j = "PLAY_GOALS", E = [607, 608, 12, 55, 54, 35, 14, 52, 15, 53, 466, 477], G = [12, 55, "35_r", "54_r"], { game_id: Q, season_id: _ } = K.game;
|
|
12547
12547
|
let ue = {
|
|
12548
12548
|
seasonId: _,
|
|
12549
12549
|
tournaments: [],
|
|
@@ -12582,26 +12582,26 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12582
12582
|
objectPlaySync: null
|
|
12583
12583
|
// sync play seconds between media players { numberPlayId, numberCurrentTime }
|
|
12584
12584
|
};
|
|
12585
|
-
|
|
12585
|
+
K.action === q ? (ue.categoryIds = E, ue.advancedFilter.playListTitle = "Resumen", a("openmedia", ue)) : K.action === j && (ue.categoryIds = G, ue.advancedFilter.playListTitle = "Goles", a("openmedia", ue));
|
|
12586
12586
|
}
|
|
12587
12587
|
async function nt() {
|
|
12588
12588
|
try {
|
|
12589
12589
|
if (!t.awaitForSeasons && !t.games) {
|
|
12590
|
-
const
|
|
12591
|
-
|
|
12590
|
+
const K = (await Te(3)).find((E) => E._id === 1), q = K.seasons[0], j = [{ id: q.id, type: q.type }];
|
|
12591
|
+
K && K.tournament && a("tournament-selected", K.tournament), q.related_seasons && q.related_seasons.length && j.push(
|
|
12592
12592
|
...q.related_seasons.map((E) => ({
|
|
12593
12593
|
id: E.id,
|
|
12594
12594
|
type: E.type
|
|
12595
12595
|
}))
|
|
12596
12596
|
), await Ce(j, !1);
|
|
12597
12597
|
}
|
|
12598
|
-
} catch (
|
|
12599
|
-
throw new Error(
|
|
12598
|
+
} catch (K) {
|
|
12599
|
+
throw new Error(K);
|
|
12600
12600
|
}
|
|
12601
12601
|
}
|
|
12602
12602
|
return Ie(() => {
|
|
12603
12603
|
Ee();
|
|
12604
|
-
}), nt(), (
|
|
12604
|
+
}), nt(), (K, q) => (h(), b("div", {
|
|
12605
12605
|
ref_key: "calendarByGame",
|
|
12606
12606
|
ref: r,
|
|
12607
12607
|
class: "calendar-by-game",
|
|
@@ -12668,7 +12668,7 @@ const Db = { class: "game-info__teams" }, Hb = { class: "game-info__teams__team_
|
|
|
12668
12668
|
], 64))
|
|
12669
12669
|
], 4));
|
|
12670
12670
|
}
|
|
12671
|
-
}, Nv = /* @__PURE__ */ Bt(Uv, [["__scopeId", "data-v-
|
|
12671
|
+
}, Nv = /* @__PURE__ */ Bt(Uv, [["__scopeId", "data-v-643489dd"]]), Gv = ["Mi posición", "Tabla General", "Fases", "Play Off"], Dv = {
|
|
12672
12672
|
components: {
|
|
12673
12673
|
GscSwitchComponent: Mi,
|
|
12674
12674
|
GSCGeneraltable: ny,
|
|
@@ -13347,7 +13347,7 @@ var x2 = lt({
|
|
|
13347
13347
|
})));
|
|
13348
13348
|
}
|
|
13349
13349
|
Ie(() => {
|
|
13350
|
-
Ba(() => W()), setTimeout(() => W(), 1e3), Y(),
|
|
13350
|
+
Ba(() => W()), setTimeout(() => W(), 1e3), Y(), K(), window.addEventListener("resize", X, { passive: !0 }), t("init");
|
|
13351
13351
|
}), ft(() => {
|
|
13352
13352
|
B && clearTimeout(B), C && clearInterval(C), window.removeEventListener("resize", X, {
|
|
13353
13353
|
passive: !0
|
|
@@ -13377,13 +13377,13 @@ var x2 = lt({
|
|
|
13377
13377
|
}
|
|
13378
13378
|
E(y.value - I), le.x = 0, le.y = 0, Ee.value = !1, document.removeEventListener(Z ? "touchmove" : "mousemove", ot, !0), document.removeEventListener(Z ? "touchend" : "mouseup", nt, !0);
|
|
13379
13379
|
}
|
|
13380
|
-
function
|
|
13380
|
+
function K() {
|
|
13381
13381
|
!l.autoplay || l.autoplay <= 0 || (C = setInterval(() => {
|
|
13382
13382
|
l.pauseAutoplayOnHover && Te.value || G();
|
|
13383
13383
|
}, l.autoplay));
|
|
13384
13384
|
}
|
|
13385
13385
|
function q() {
|
|
13386
|
-
C && (clearInterval(C), C = null),
|
|
13386
|
+
C && (clearInterval(C), C = null), K();
|
|
13387
13387
|
}
|
|
13388
13388
|
const j = O(!1);
|
|
13389
13389
|
function E(A) {
|
|
@@ -15627,7 +15627,7 @@ var u5 = lt({
|
|
|
15627
15627
|
})));
|
|
15628
15628
|
}
|
|
15629
15629
|
Ie(() => {
|
|
15630
|
-
Ba(() => W()), setTimeout(() => W(), 1e3), Y(),
|
|
15630
|
+
Ba(() => W()), setTimeout(() => W(), 1e3), Y(), K(), window.addEventListener("resize", X, { passive: !0 }), t("init");
|
|
15631
15631
|
}), ft(() => {
|
|
15632
15632
|
B && clearTimeout(B), C && clearInterval(C), window.removeEventListener("resize", X, {
|
|
15633
15633
|
passive: !0
|
|
@@ -15657,13 +15657,13 @@ var u5 = lt({
|
|
|
15657
15657
|
}
|
|
15658
15658
|
E(y.value - I), le.x = 0, le.y = 0, Ee.value = !1, document.removeEventListener(Z ? "touchmove" : "mousemove", ot, !0), document.removeEventListener(Z ? "touchend" : "mouseup", nt, !0);
|
|
15659
15659
|
}
|
|
15660
|
-
function
|
|
15660
|
+
function K() {
|
|
15661
15661
|
!l.autoplay || l.autoplay <= 0 || (C = setInterval(() => {
|
|
15662
15662
|
l.pauseAutoplayOnHover && Te.value || G();
|
|
15663
15663
|
}, l.autoplay));
|
|
15664
15664
|
}
|
|
15665
15665
|
function q() {
|
|
15666
|
-
C && (clearInterval(C), C = null),
|
|
15666
|
+
C && (clearInterval(C), C = null), K();
|
|
15667
15667
|
}
|
|
15668
15668
|
const j = O(!1);
|
|
15669
15669
|
function E(A) {
|
|
@@ -16169,7 +16169,7 @@ const j5 = [
|
|
|
16169
16169
|
"nov",
|
|
16170
16170
|
"dic"
|
|
16171
16171
|
];
|
|
16172
|
-
function
|
|
16172
|
+
function L(e, a, t) {
|
|
16173
16173
|
return (a = U5(a)) in e ? Object.defineProperty(e, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[a] = t, e;
|
|
16174
16174
|
}
|
|
16175
16175
|
function V5(e, a) {
|
|
@@ -16620,13 +16620,13 @@ const Er = { pip: "PIP", airplay: "AirPlay", html5: "HTML5", vimeo: "Vimeo", you
|
|
|
16620
16620
|
} };
|
|
16621
16621
|
class Sa {
|
|
16622
16622
|
constructor(a) {
|
|
16623
|
-
|
|
16623
|
+
L(this, "get", (t) => {
|
|
16624
16624
|
if (!Sa.supported || !this.enabled) return null;
|
|
16625
16625
|
const o = window.localStorage.getItem(this.key);
|
|
16626
16626
|
if (w.empty(o)) return null;
|
|
16627
16627
|
const i = JSON.parse(o);
|
|
16628
16628
|
return w.string(t) && t.length ? i[t] : i;
|
|
16629
|
-
}),
|
|
16629
|
+
}), L(this, "set", (t) => {
|
|
16630
16630
|
if (!Sa.supported || !this.enabled || !w.object(t)) return;
|
|
16631
16631
|
let o = this.get();
|
|
16632
16632
|
w.empty(o) && (o = {}), je(o, t);
|
|
@@ -17196,13 +17196,13 @@ class P4 {
|
|
|
17196
17196
|
}
|
|
17197
17197
|
class wt {
|
|
17198
17198
|
constructor(a) {
|
|
17199
|
-
|
|
17199
|
+
L(this, "onChange", () => {
|
|
17200
17200
|
if (!this.supported) return;
|
|
17201
17201
|
const t = this.player.elements.buttons.fullscreen;
|
|
17202
17202
|
w.element(t) && (t.pressed = this.active);
|
|
17203
17203
|
const o = this.target === this.player.media ? this.target : this.player.elements.container;
|
|
17204
17204
|
ae.call(this.player, o, this.active ? "enterfullscreen" : "exitfullscreen", !0);
|
|
17205
|
-
}),
|
|
17205
|
+
}), L(this, "toggleFallback", (t = !1) => {
|
|
17206
17206
|
if (t ? this.scrollPosition = { x: window.scrollX ?? 0, y: window.scrollY ?? 0 } : window.scrollTo(this.scrollPosition.x, this.scrollPosition.y), document.body.style.overflow = t ? "hidden" : "", ve(this.target, this.player.config.classNames.fullscreen.fallback, t), Je.isIos) {
|
|
17207
17207
|
let o = document.head.querySelector('meta[name="viewport"]');
|
|
17208
17208
|
const i = "viewport-fit=cover";
|
|
@@ -17211,19 +17211,19 @@ class wt {
|
|
|
17211
17211
|
t ? (this.cleanupViewport = !n, n || (o.content += `,${i}`)) : this.cleanupViewport && (o.content = o.content.split(",").filter((s) => s.trim() !== i).join(","));
|
|
17212
17212
|
}
|
|
17213
17213
|
this.onChange();
|
|
17214
|
-
}),
|
|
17214
|
+
}), L(this, "trapFocus", (t) => {
|
|
17215
17215
|
if (Je.isIos || Je.isIPadOS || !this.active || t.key !== "Tab") return;
|
|
17216
17216
|
const o = document.activeElement, i = Aa.call(this.player, "a[href], button:not(:disabled), input:not(:disabled), [tabindex]"), [n] = i, s = i[i.length - 1];
|
|
17217
17217
|
o !== s || t.shiftKey ? o === n && t.shiftKey && (s.focus(), t.preventDefault()) : (n.focus(), t.preventDefault());
|
|
17218
|
-
}),
|
|
17218
|
+
}), L(this, "update", () => {
|
|
17219
17219
|
if (this.supported) {
|
|
17220
17220
|
let t;
|
|
17221
17221
|
t = this.forceFallback ? "Fallback (forced)" : wt.nativeSupported ? "Native" : "Fallback", this.player.debug.log(`${t} fullscreen enabled`);
|
|
17222
17222
|
} else this.player.debug.log("Fullscreen not supported and fallback disabled");
|
|
17223
17223
|
ve(this.player.elements.container, this.player.config.classNames.fullscreen.enabled, this.supported);
|
|
17224
|
-
}),
|
|
17224
|
+
}), L(this, "enter", () => {
|
|
17225
17225
|
this.supported && (Je.isIos && this.player.config.fullscreen.iosNative ? this.player.isVimeo ? this.player.embed.requestFullscreen() : this.target.webkitEnterFullscreen() : !wt.nativeSupported || this.forceFallback ? this.toggleFallback(!0) : this.prefix ? w.empty(this.prefix) || this.target[`${this.prefix}Request${this.property}`]() : this.target.requestFullscreen({ navigationUI: "hide" }));
|
|
17226
|
-
}),
|
|
17226
|
+
}), L(this, "exit", () => {
|
|
17227
17227
|
if (this.supported) if (Je.isIos && this.player.config.fullscreen.iosNative) this.player.isVimeo ? this.player.embed.exitFullscreen() : this.target.webkitEnterFullscreen(), xt(this.player.play());
|
|
17228
17228
|
else if (!wt.nativeSupported || this.forceFallback) this.toggleFallback(!1);
|
|
17229
17229
|
else if (this.prefix) {
|
|
@@ -17232,7 +17232,7 @@ class wt {
|
|
|
17232
17232
|
document[`${this.prefix}${t}${this.property}`]();
|
|
17233
17233
|
}
|
|
17234
17234
|
} else (document.cancelFullScreen || document.exitFullscreen).call(document);
|
|
17235
|
-
}),
|
|
17235
|
+
}), L(this, "toggle", () => {
|
|
17236
17236
|
this.active ? this.exit() : this.enter();
|
|
17237
17237
|
}), this.player = a, this.prefix = wt.prefix, this.property = wt.property, this.scrollPosition = { x: 0, y: 0 }, this.forceFallback = a.config.fullscreen.fallback === "force", this.player.elements.fullscreen = a.config.fullscreen.container && b4(this.player.elements.container, a.config.fullscreen.container), be.call(this.player, document, this.prefix === "ms" ? "MSFullscreenChange" : `${this.prefix}fullscreenchange`, () => {
|
|
17238
17238
|
this.onChange();
|
|
@@ -17324,13 +17324,13 @@ const Be = { addStyleHook() {
|
|
|
17324
17324
|
} };
|
|
17325
17325
|
class z4 {
|
|
17326
17326
|
constructor(a) {
|
|
17327
|
-
|
|
17327
|
+
L(this, "firstTouch", () => {
|
|
17328
17328
|
const { player: t } = this, { elements: o } = t;
|
|
17329
17329
|
t.touch = !0, ve(o.container, t.config.classNames.isTouch, !0);
|
|
17330
|
-
}),
|
|
17330
|
+
}), L(this, "global", (t = !0) => {
|
|
17331
17331
|
const { player: o } = this;
|
|
17332
17332
|
o.config.keyboard.global && Ca.call(o, window, "keydown keyup", this.handleKey, t, !1), Ca.call(o, document.body, "click", this.toggleMenu, t), Ni.call(o, document.body, "touchstart", this.firstTouch);
|
|
17333
|
-
}),
|
|
17333
|
+
}), L(this, "container", () => {
|
|
17334
17334
|
const { player: t } = this, { config: o, elements: i, timers: n } = t;
|
|
17335
17335
|
!o.keyboard.global && o.keyboard.focused && be.call(t, i.container, "keydown keyup", this.handleKey, !1), be.call(t, i.container, "mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen", (u) => {
|
|
17336
17336
|
const { controls: l } = i;
|
|
@@ -17351,7 +17351,7 @@ class z4 {
|
|
|
17351
17351
|
const { target: l } = t.fullscreen;
|
|
17352
17352
|
l === i.container && (!t.isEmbed && w.empty(t.config.ratio) || (s(), (u.type === "enterfullscreen" ? be : Fo).call(t, window, "resize", r)));
|
|
17353
17353
|
});
|
|
17354
|
-
}),
|
|
17354
|
+
}), L(this, "media", () => {
|
|
17355
17355
|
const { player: t } = this, { elements: o } = t;
|
|
17356
17356
|
if (be.call(t, t.media, "timeupdate seeking seeked", (n) => D.timeUpdate.call(t, n)), be.call(t, t.media, "durationchange loadeddata loadedmetadata", (n) => D.durationUpdate.call(t, n)), be.call(t, t.media, "ended", () => {
|
|
17357
17357
|
t.isHTML5 && t.isVideo && t.config.resetOnEnd && (t.restart(), t.pause());
|
|
@@ -17382,14 +17382,14 @@ class z4 {
|
|
|
17382
17382
|
let { detail: s = {} } = n;
|
|
17383
17383
|
n.type === "error" && (s = t.media.error), ae.call(t, o.container, n.type, !0, s);
|
|
17384
17384
|
});
|
|
17385
|
-
}),
|
|
17385
|
+
}), L(this, "proxy", (t, o, i) => {
|
|
17386
17386
|
const { player: n } = this, s = n.config.listeners[i];
|
|
17387
17387
|
let r = !0;
|
|
17388
17388
|
w.function(s) && (r = s.call(n, t)), r !== !1 && w.function(o) && o.call(n, t);
|
|
17389
|
-
}),
|
|
17389
|
+
}), L(this, "bind", (t, o, i, n, s = !0) => {
|
|
17390
17390
|
const { player: r } = this, u = r.config.listeners[n], l = w.function(u);
|
|
17391
17391
|
be.call(r, t, o, (c) => this.proxy(c, i, n), s && !l);
|
|
17392
|
-
}),
|
|
17392
|
+
}), L(this, "controls", () => {
|
|
17393
17393
|
const { player: t } = this, { elements: o } = t, i = Je.isIE ? "change" : "input";
|
|
17394
17394
|
if (o.buttons.play && Array.from(o.buttons.play).forEach((n) => {
|
|
17395
17395
|
this.bind(n, "click", () => {
|
|
@@ -17828,20 +17828,20 @@ const Ja = { setup() {
|
|
|
17828
17828
|
} };
|
|
17829
17829
|
class G4 {
|
|
17830
17830
|
constructor(a) {
|
|
17831
|
-
|
|
17831
|
+
L(this, "load", () => {
|
|
17832
17832
|
this.enabled && (w.object(window.google) && w.object(window.google.ima) ? this.ready() : Di(this.player.config.urls.googleIMA.sdk).then(() => {
|
|
17833
17833
|
this.ready();
|
|
17834
17834
|
}).catch(() => {
|
|
17835
17835
|
this.trigger("error", new Error("Google IMA SDK failed to load"));
|
|
17836
17836
|
}));
|
|
17837
|
-
}),
|
|
17837
|
+
}), L(this, "ready", () => {
|
|
17838
17838
|
var t;
|
|
17839
17839
|
this.enabled || ((t = this).manager && t.manager.destroy(), t.elements.displayContainer && t.elements.displayContainer.destroy(), t.elements.container.remove()), this.startSafetyTimer(12e3, "ready()"), this.managerPromise.then(() => {
|
|
17840
17840
|
this.clearSafetyTimer("onAdsManagerLoaded()");
|
|
17841
17841
|
}), this.listeners(), this.setupIMA();
|
|
17842
|
-
}),
|
|
17842
|
+
}), L(this, "setupIMA", () => {
|
|
17843
17843
|
this.elements.container = te("div", { class: this.player.config.classNames.ads }), this.player.elements.container.appendChild(this.elements.container), google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED), google.ima.settings.setLocale(this.player.config.ads.language), google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline), this.elements.displayContainer = new google.ima.AdDisplayContainer(this.elements.container, this.player.media), this.loader = new google.ima.AdsLoader(this.elements.displayContainer), this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, (t) => this.onAdsManagerLoaded(t), !1), this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, (t) => this.onAdError(t), !1), this.requestAds();
|
|
17844
|
-
}),
|
|
17844
|
+
}), L(this, "requestAds", () => {
|
|
17845
17845
|
const { container: t } = this.player.elements;
|
|
17846
17846
|
try {
|
|
17847
17847
|
const o = new google.ima.AdsRequest();
|
|
@@ -17849,19 +17849,19 @@ class G4 {
|
|
|
17849
17849
|
} catch (o) {
|
|
17850
17850
|
this.onAdError(o);
|
|
17851
17851
|
}
|
|
17852
|
-
}),
|
|
17852
|
+
}), L(this, "pollCountdown", (t = !1) => {
|
|
17853
17853
|
if (!t) return clearInterval(this.countdownTimer), void this.elements.container.removeAttribute("data-badge-text");
|
|
17854
17854
|
this.countdownTimer = setInterval(() => {
|
|
17855
17855
|
const o = Po(Math.max(this.manager.getRemainingTime(), 0)), i = `${We.get("advertisement", this.player.config)} - ${o}`;
|
|
17856
17856
|
this.elements.container.setAttribute("data-badge-text", i);
|
|
17857
17857
|
}, 100);
|
|
17858
|
-
}),
|
|
17858
|
+
}), L(this, "onAdsManagerLoaded", (t) => {
|
|
17859
17859
|
if (!this.enabled) return;
|
|
17860
17860
|
const o = new google.ima.AdsRenderingSettings();
|
|
17861
17861
|
o.restoreCustomPlaybackStateOnAdBreakComplete = !0, o.enablePreloading = !0, this.manager = t.getAdsManager(this.player, o), this.cuePoints = this.manager.getCuePoints(), this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, (i) => this.onAdError(i)), Object.keys(google.ima.AdEvent.Type).forEach((i) => {
|
|
17862
17862
|
this.manager.addEventListener(google.ima.AdEvent.Type[i], (n) => this.onAdEvent(n));
|
|
17863
17863
|
}), this.trigger("loaded");
|
|
17864
|
-
}),
|
|
17864
|
+
}), L(this, "addCuePoints", () => {
|
|
17865
17865
|
w.empty(this.cuePoints) || this.cuePoints.forEach((t) => {
|
|
17866
17866
|
if (t !== 0 && t !== -1 && t < this.player.duration) {
|
|
17867
17867
|
const o = this.player.elements.progress;
|
|
@@ -17871,7 +17871,7 @@ class G4 {
|
|
|
17871
17871
|
}
|
|
17872
17872
|
}
|
|
17873
17873
|
});
|
|
17874
|
-
}),
|
|
17874
|
+
}), L(this, "onAdEvent", (t) => {
|
|
17875
17875
|
const { container: o } = this.player.elements, i = t.getAd(), n = t.getAdData();
|
|
17876
17876
|
switch (((s) => {
|
|
17877
17877
|
ae.call(this.player, this.player.media, `ads${s.replace(/_/g, "").toLowerCase()}`);
|
|
@@ -17894,9 +17894,9 @@ class G4 {
|
|
|
17894
17894
|
case google.ima.AdEvent.Type.LOG:
|
|
17895
17895
|
n.adError && this.player.debug.warn(`Non-fatal ad error: ${n.adError.getMessage()}`);
|
|
17896
17896
|
}
|
|
17897
|
-
}),
|
|
17897
|
+
}), L(this, "onAdError", (t) => {
|
|
17898
17898
|
this.cancel(), this.player.debug.warn("Ads error", t);
|
|
17899
|
-
}),
|
|
17899
|
+
}), L(this, "listeners", () => {
|
|
17900
17900
|
const { container: t } = this.player.elements;
|
|
17901
17901
|
let o;
|
|
17902
17902
|
this.player.on("canplay", () => {
|
|
@@ -17913,7 +17913,7 @@ class G4 {
|
|
|
17913
17913
|
}), window.addEventListener("resize", () => {
|
|
17914
17914
|
this.manager && this.manager.resize(t.offsetWidth, t.offsetHeight, google.ima.ViewMode.NORMAL);
|
|
17915
17915
|
});
|
|
17916
|
-
}),
|
|
17916
|
+
}), L(this, "play", () => {
|
|
17917
17917
|
const { container: t } = this.player.elements;
|
|
17918
17918
|
this.managerPromise || this.resumeContent(), this.managerPromise.then(() => {
|
|
17919
17919
|
this.manager.setVolume(this.player.volume), this.elements.displayContainer.initialize();
|
|
@@ -17924,29 +17924,29 @@ class G4 {
|
|
|
17924
17924
|
}
|
|
17925
17925
|
}).catch(() => {
|
|
17926
17926
|
});
|
|
17927
|
-
}),
|
|
17927
|
+
}), L(this, "resumeContent", () => {
|
|
17928
17928
|
this.elements.container.style.zIndex = "", this.playing = !1, xt(this.player.media.play());
|
|
17929
|
-
}),
|
|
17929
|
+
}), L(this, "pauseContent", () => {
|
|
17930
17930
|
this.elements.container.style.zIndex = 3, this.playing = !0, this.player.media.pause();
|
|
17931
|
-
}),
|
|
17931
|
+
}), L(this, "cancel", () => {
|
|
17932
17932
|
this.initialized && this.resumeContent(), this.trigger("error"), this.loadAds();
|
|
17933
|
-
}),
|
|
17933
|
+
}), L(this, "loadAds", () => {
|
|
17934
17934
|
this.managerPromise.then(() => {
|
|
17935
17935
|
this.manager && this.manager.destroy(), this.managerPromise = new Promise((t) => {
|
|
17936
17936
|
this.on("loaded", t), this.player.debug.log(this.manager);
|
|
17937
17937
|
}), this.initialized = !1, this.requestAds();
|
|
17938
17938
|
}).catch(() => {
|
|
17939
17939
|
});
|
|
17940
|
-
}),
|
|
17940
|
+
}), L(this, "trigger", (t, ...o) => {
|
|
17941
17941
|
const i = this.events[t];
|
|
17942
17942
|
w.array(i) && i.forEach((n) => {
|
|
17943
17943
|
w.function(n) && n.apply(this, o);
|
|
17944
17944
|
});
|
|
17945
|
-
}),
|
|
17945
|
+
}), L(this, "on", (t, o) => (w.array(this.events[t]) || (this.events[t] = []), this.events[t].push(o), this)), L(this, "startSafetyTimer", (t, o) => {
|
|
17946
17946
|
this.player.debug.log(`Safety timer invoked from: ${o}`), this.safetyTimer = setTimeout(() => {
|
|
17947
17947
|
this.cancel(), this.clearSafetyTimer("startSafetyTimer()");
|
|
17948
17948
|
}, t);
|
|
17949
|
-
}),
|
|
17949
|
+
}), L(this, "clearSafetyTimer", (t) => {
|
|
17950
17950
|
w.nullOrUndefined(this.safetyTimer) || (this.player.debug.log(`Safety timer cleared from: ${t}`), clearTimeout(this.safetyTimer), this.safetyTimer = null);
|
|
17951
17951
|
}), this.player = a, this.config = a.config.ads, this.playing = !1, this.initialized = !1, this.elements = { container: null, displayContainer: null }, this.manager = null, this.loader = null, this.cuePoints = null, this.events = {}, this.safetyTimer = null, this.countdownTimer = null, this.managerPromise = new Promise((t, o) => {
|
|
17952
17952
|
this.on("loaded", t), this.on("error", o);
|
|
@@ -17986,11 +17986,11 @@ const D4 = (e) => {
|
|
|
17986
17986
|
};
|
|
17987
17987
|
class _n {
|
|
17988
17988
|
constructor(a) {
|
|
17989
|
-
|
|
17989
|
+
L(this, "load", () => {
|
|
17990
17990
|
this.player.elements.display.seekTooltip && (this.player.elements.display.seekTooltip.hidden = this.enabled), this.enabled && this.getThumbnails().then(() => {
|
|
17991
17991
|
this.enabled && (this.render(), this.determineContainerAutoSizing(), this.listeners(), this.loaded = !0);
|
|
17992
17992
|
});
|
|
17993
|
-
}),
|
|
17993
|
+
}), L(this, "getThumbnails", () => new Promise((t) => {
|
|
17994
17994
|
const { src: o } = this.player.config.previewThumbnails;
|
|
17995
17995
|
if (w.empty(o)) throw new Error("Missing previewThumbnails.src config attribute");
|
|
17996
17996
|
const i = () => {
|
|
@@ -18003,7 +18003,7 @@ class _n {
|
|
|
18003
18003
|
const n = (w.string(o) ? [o] : o).map((s) => this.getThumbnail(s));
|
|
18004
18004
|
Promise.all(n).then(i);
|
|
18005
18005
|
}
|
|
18006
|
-
})),
|
|
18006
|
+
})), L(this, "getThumbnail", (t) => new Promise((o) => {
|
|
18007
18007
|
Ea(t).then((i) => {
|
|
18008
18008
|
const n = { frames: D4(i), height: null, urlPrefix: "" };
|
|
18009
18009
|
n.frames[0].text.startsWith("/") || n.frames[0].text.startsWith("http://") || n.frames[0].text.startsWith("https://") || (n.urlPrefix = t.substring(0, t.lastIndexOf("/") + 1));
|
|
@@ -18012,7 +18012,7 @@ class _n {
|
|
|
18012
18012
|
n.height = s.naturalHeight, n.width = s.naturalWidth, this.thumbnails.push(n), o();
|
|
18013
18013
|
}, s.src = n.urlPrefix + n.frames[0].text;
|
|
18014
18014
|
});
|
|
18015
|
-
})),
|
|
18015
|
+
})), L(this, "startMove", (t) => {
|
|
18016
18016
|
if (this.loaded && w.event(t) && ["touchmove", "mousemove"].includes(t.type) && this.player.media.duration) {
|
|
18017
18017
|
if (t.type === "touchmove") this.seekTime = this.player.media.duration * (this.player.elements.inputs.seek.value / 100);
|
|
18018
18018
|
else {
|
|
@@ -18024,15 +18024,15 @@ class _n {
|
|
|
18024
18024
|
}
|
|
18025
18025
|
this.showImageAtCurrentTime();
|
|
18026
18026
|
}
|
|
18027
|
-
}),
|
|
18027
|
+
}), L(this, "endMove", () => {
|
|
18028
18028
|
this.toggleThumbContainer(!1, !0);
|
|
18029
|
-
}),
|
|
18029
|
+
}), L(this, "startScrubbing", (t) => {
|
|
18030
18030
|
(w.nullOrUndefined(t.button) || t.button === !1 || t.button === 0) && (this.mouseDown = !0, this.player.media.duration && (this.toggleScrubbingContainer(!0), this.toggleThumbContainer(!1, !0), this.showImageAtCurrentTime()));
|
|
18031
|
-
}),
|
|
18031
|
+
}), L(this, "endScrubbing", () => {
|
|
18032
18032
|
this.mouseDown = !1, Math.ceil(this.lastTime) === Math.ceil(this.player.media.currentTime) ? this.toggleScrubbingContainer(!1) : Ni.call(this.player, this.player.media, "timeupdate", () => {
|
|
18033
18033
|
this.mouseDown || this.toggleScrubbingContainer(!1);
|
|
18034
18034
|
});
|
|
18035
|
-
}),
|
|
18035
|
+
}), L(this, "listeners", () => {
|
|
18036
18036
|
this.player.on("play", () => {
|
|
18037
18037
|
this.toggleThumbContainer(!1, !0);
|
|
18038
18038
|
}), this.player.on("seeked", () => {
|
|
@@ -18040,20 +18040,20 @@ class _n {
|
|
|
18040
18040
|
}), this.player.on("timeupdate", () => {
|
|
18041
18041
|
this.lastTime = this.player.media.currentTime;
|
|
18042
18042
|
});
|
|
18043
|
-
}),
|
|
18043
|
+
}), L(this, "render", () => {
|
|
18044
18044
|
this.elements.thumb.container = te("div", { class: this.player.config.classNames.previewThumbnails.thumbContainer }), this.elements.thumb.imageContainer = te("div", { class: this.player.config.classNames.previewThumbnails.imageContainer }), this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);
|
|
18045
18045
|
const t = te("div", { class: this.player.config.classNames.previewThumbnails.timeContainer });
|
|
18046
18046
|
this.elements.thumb.time = te("span", {}, "00:00"), t.appendChild(this.elements.thumb.time), this.elements.thumb.imageContainer.appendChild(t), w.element(this.player.elements.progress) && this.player.elements.progress.appendChild(this.elements.thumb.container), this.elements.scrubbing.container = te("div", { class: this.player.config.classNames.previewThumbnails.scrubbingContainer }), this.player.elements.wrapper.appendChild(this.elements.scrubbing.container);
|
|
18047
|
-
}),
|
|
18047
|
+
}), L(this, "destroy", () => {
|
|
18048
18048
|
this.elements.thumb.container && this.elements.thumb.container.remove(), this.elements.scrubbing.container && this.elements.scrubbing.container.remove();
|
|
18049
|
-
}),
|
|
18049
|
+
}), L(this, "showImageAtCurrentTime", () => {
|
|
18050
18050
|
this.mouseDown ? this.setScrubbingContainerSize() : this.setThumbContainerSizeAndPos();
|
|
18051
18051
|
const t = this.thumbnails[0].frames.findIndex((n) => this.seekTime >= n.startTime && this.seekTime <= n.endTime), o = t >= 0;
|
|
18052
18052
|
let i = 0;
|
|
18053
18053
|
this.mouseDown || this.toggleThumbContainer(o), o && (this.thumbnails.forEach((n, s) => {
|
|
18054
18054
|
this.loadedImages.includes(n.frames[t].text) && (i = s);
|
|
18055
18055
|
}), t !== this.showingThumb && (this.showingThumb = t, this.loadImage(i)));
|
|
18056
|
-
}),
|
|
18056
|
+
}), L(this, "loadImage", (t = 0) => {
|
|
18057
18057
|
const o = this.showingThumb, i = this.thumbnails[t], { urlPrefix: n } = i, s = i.frames[o], r = i.frames[o].text, u = n + r;
|
|
18058
18058
|
if (this.currentImageElement && this.currentImageElement.dataset.filename === r) this.showImage(this.currentImageElement, s, t, o, r, !1), this.currentImageElement.dataset.index = o, this.removeOldImages(this.currentImageElement);
|
|
18059
18059
|
else {
|
|
@@ -18061,9 +18061,9 @@ class _n {
|
|
|
18061
18061
|
const l = new Image();
|
|
18062
18062
|
l.src = u, l.dataset.index = o, l.dataset.filename = r, this.showingThumbFilename = r, this.player.debug.log(`Loading image: ${u}`), l.onload = () => this.showImage(l, s, t, o, r, !0), this.loadingImage = l, this.removeOldImages(l);
|
|
18063
18063
|
}
|
|
18064
|
-
}),
|
|
18064
|
+
}), L(this, "showImage", (t, o, i, n, s, r = !0) => {
|
|
18065
18065
|
this.player.debug.log(`Showing thumb: ${s}. num: ${n}. qual: ${i}. newimg: ${r}`), this.setImageSizeAndOffset(t, o), r && (this.currentImageContainer.appendChild(t), this.currentImageElement = t, this.loadedImages.includes(s) || this.loadedImages.push(s)), this.preloadNearby(n, !0).then(this.preloadNearby(n, !1)).then(this.getHigherQuality(i, t, o, s));
|
|
18066
|
-
}),
|
|
18066
|
+
}), L(this, "removeOldImages", (t) => {
|
|
18067
18067
|
Array.from(this.currentImageContainer.children).forEach((o) => {
|
|
18068
18068
|
if (o.tagName.toLowerCase() !== "img") return;
|
|
18069
18069
|
const i = this.usingSprites ? 500 : 1e3;
|
|
@@ -18075,7 +18075,7 @@ class _n {
|
|
|
18075
18075
|
}, i);
|
|
18076
18076
|
}
|
|
18077
18077
|
});
|
|
18078
|
-
}),
|
|
18078
|
+
}), L(this, "preloadNearby", (t, o = !0) => new Promise((i) => {
|
|
18079
18079
|
setTimeout(() => {
|
|
18080
18080
|
const n = this.thumbnails[0].frames[t].text;
|
|
18081
18081
|
if (this.showingThumbFilename === n) {
|
|
@@ -18094,22 +18094,22 @@ class _n {
|
|
|
18094
18094
|
}), r || i();
|
|
18095
18095
|
}
|
|
18096
18096
|
}, 300);
|
|
18097
|
-
})),
|
|
18097
|
+
})), L(this, "getHigherQuality", (t, o, i, n) => {
|
|
18098
18098
|
if (t < this.thumbnails.length - 1) {
|
|
18099
18099
|
let s = o.naturalHeight;
|
|
18100
18100
|
this.usingSprites && (s = i.h), s < this.thumbContainerHeight && setTimeout(() => {
|
|
18101
18101
|
this.showingThumbFilename === n && (this.player.debug.log(`Showing higher quality thumb for: ${n}`), this.loadImage(t + 1));
|
|
18102
18102
|
}, 300);
|
|
18103
18103
|
}
|
|
18104
|
-
}),
|
|
18104
|
+
}), L(this, "toggleThumbContainer", (t = !1, o = !1) => {
|
|
18105
18105
|
const i = this.player.config.classNames.previewThumbnails.thumbContainerShown;
|
|
18106
18106
|
this.elements.thumb.container.classList.toggle(i, t), !t && o && (this.showingThumb = null, this.showingThumbFilename = null);
|
|
18107
|
-
}),
|
|
18107
|
+
}), L(this, "toggleScrubbingContainer", (t = !1) => {
|
|
18108
18108
|
const o = this.player.config.classNames.previewThumbnails.scrubbingContainerShown;
|
|
18109
18109
|
this.elements.scrubbing.container.classList.toggle(o, t), t || (this.showingThumb = null, this.showingThumbFilename = null);
|
|
18110
|
-
}),
|
|
18110
|
+
}), L(this, "determineContainerAutoSizing", () => {
|
|
18111
18111
|
(this.elements.thumb.imageContainer.clientHeight > 20 || this.elements.thumb.imageContainer.clientWidth > 20) && (this.sizeSpecifiedInCSS = !0);
|
|
18112
|
-
}),
|
|
18112
|
+
}), L(this, "setThumbContainerSizeAndPos", () => {
|
|
18113
18113
|
const { imageContainer: t } = this.elements.thumb;
|
|
18114
18114
|
if (this.sizeSpecifiedInCSS) {
|
|
18115
18115
|
if (t.clientHeight > 20 && t.clientWidth < 20) {
|
|
@@ -18124,13 +18124,13 @@ class _n {
|
|
|
18124
18124
|
t.style.height = `${this.thumbContainerHeight}px`, t.style.width = `${o}px`;
|
|
18125
18125
|
}
|
|
18126
18126
|
this.setThumbContainerPos();
|
|
18127
|
-
}),
|
|
18127
|
+
}), L(this, "setThumbContainerPos", () => {
|
|
18128
18128
|
const t = this.player.elements.progress.getBoundingClientRect(), o = this.player.elements.container.getBoundingClientRect(), { container: i } = this.elements.thumb, n = o.left - t.left + 10, s = o.right - t.left - i.clientWidth - 10, r = this.mousePosX - t.left - i.clientWidth / 2, u = Md(r, n, s);
|
|
18129
18129
|
i.style.left = `${u}px`, i.style.setProperty("--preview-arrow-offset", r - u + "px");
|
|
18130
|
-
}),
|
|
18130
|
+
}), L(this, "setScrubbingContainerSize", () => {
|
|
18131
18131
|
const { width: t, height: o } = jr(this.thumbAspectRatio, { width: this.player.media.clientWidth, height: this.player.media.clientHeight });
|
|
18132
18132
|
this.elements.scrubbing.container.style.width = `${t}px`, this.elements.scrubbing.container.style.height = `${o}px`;
|
|
18133
|
-
}),
|
|
18133
|
+
}), L(this, "setImageSizeAndOffset", (t, o) => {
|
|
18134
18134
|
if (!this.usingSprites) return;
|
|
18135
18135
|
const i = this.thumbContainerHeight / o.h;
|
|
18136
18136
|
t.style.height = t.naturalHeight * i + "px", t.style.width = t.naturalWidth * i + "px", t.style.left = `-${o.x * i}px`, t.style.top = `-${o.y * i}px`;
|
|
@@ -18175,22 +18175,22 @@ const $n = { insertElements(e, a) {
|
|
|
18175
18175
|
} };
|
|
18176
18176
|
class ka {
|
|
18177
18177
|
constructor(a, t) {
|
|
18178
|
-
if (
|
|
18178
|
+
if (L(this, "play", () => w.function(this.media.play) ? (this.ads && this.ads.enabled && this.ads.managerPromise.then(() => this.ads.play()).catch(() => xt(this.media.play())), this.media.play()) : null), L(this, "pause", () => this.playing && w.function(this.media.pause) ? this.media.pause() : null), L(this, "togglePlay", (r) => (w.boolean(r) ? r : !this.playing) ? this.play() : this.pause()), L(this, "stop", () => {
|
|
18179
18179
|
this.isHTML5 ? (this.pause(), this.restart()) : w.function(this.media.stop) && this.media.stop();
|
|
18180
|
-
}),
|
|
18180
|
+
}), L(this, "restart", () => {
|
|
18181
18181
|
this.currentTime = 0;
|
|
18182
|
-
}),
|
|
18182
|
+
}), L(this, "rewind", (r) => {
|
|
18183
18183
|
this.currentTime -= w.number(r) ? r : this.config.seekTime;
|
|
18184
|
-
}),
|
|
18184
|
+
}), L(this, "forward", (r) => {
|
|
18185
18185
|
this.currentTime += w.number(r) ? r : this.config.seekTime;
|
|
18186
|
-
}),
|
|
18186
|
+
}), L(this, "increaseVolume", (r) => {
|
|
18187
18187
|
const u = this.media.muted ? 0 : this.volume;
|
|
18188
18188
|
this.volume = u + (w.number(r) ? r : 0);
|
|
18189
|
-
}),
|
|
18189
|
+
}), L(this, "decreaseVolume", (r) => {
|
|
18190
18190
|
this.increaseVolume(-r);
|
|
18191
|
-
}),
|
|
18191
|
+
}), L(this, "airplay", () => {
|
|
18192
18192
|
Ve.airplay && this.media.webkitShowPlaybackTargetPicker();
|
|
18193
|
-
}),
|
|
18193
|
+
}), L(this, "toggleControls", (r) => {
|
|
18194
18194
|
if (this.supported.ui && !this.isAudio) {
|
|
18195
18195
|
const u = lo(this.elements.container, this.config.classNames.hideControls), l = r === void 0 ? void 0 : !r, c = ve(this.elements.container, this.config.classNames.hideControls, l);
|
|
18196
18196
|
if (c && w.array(this.config.controls) && this.config.controls.includes("settings") && !w.empty(this.config.settings) && D.toggleMenu.call(this, !1), c !== u) {
|
|
@@ -18200,13 +18200,13 @@ class ka {
|
|
|
18200
18200
|
return !c;
|
|
18201
18201
|
}
|
|
18202
18202
|
return !1;
|
|
18203
|
-
}),
|
|
18203
|
+
}), L(this, "on", (r, u) => {
|
|
18204
18204
|
be.call(this, this.elements.container, r, u);
|
|
18205
|
-
}),
|
|
18205
|
+
}), L(this, "once", (r, u) => {
|
|
18206
18206
|
Ni.call(this, this.elements.container, r, u);
|
|
18207
|
-
}),
|
|
18207
|
+
}), L(this, "off", (r, u) => {
|
|
18208
18208
|
Fo(this.elements.container, r, u);
|
|
18209
|
-
}),
|
|
18209
|
+
}), L(this, "destroy", (r, u = !1) => {
|
|
18210
18210
|
if (!this.ready) return;
|
|
18211
18211
|
const l = () => {
|
|
18212
18212
|
document.body.style.overflow = "", this.embed = null, u ? (Object.keys(this.elements).length && (It(this.elements.buttons.play), It(this.elements.captions), It(this.elements.controls), It(this.elements.wrapper), this.elements.buttons.play = null, this.elements.captions = null, this.elements.controls = null, this.elements.wrapper = null), w.function(r) && r()) : (v4.call(this), Kt.cancelRequests.call(this), ro(this.elements.original, this.elements.container), ae.call(this, this.elements.original, "destroyed", !0), w.function(r) && r.call(this.elements.original), this.ready = !1, setTimeout(() => {
|
|
@@ -18214,7 +18214,7 @@ class ka {
|
|
|
18214
18214
|
}, 200));
|
|
18215
18215
|
};
|
|
18216
18216
|
this.stop(), clearTimeout(this.timers.loading), clearTimeout(this.timers.controls), clearTimeout(this.timers.resized), this.isHTML5 ? (Be.toggleNativeControls.call(this, !0), l()) : this.isYouTube ? (clearInterval(this.timers.buffering), clearInterval(this.timers.playing), this.embed !== null && w.function(this.embed.destroy) && this.embed.destroy(), l()) : this.isVimeo && (this.embed !== null && this.embed.unload().then(l), setTimeout(l, 200));
|
|
18217
|
-
}),
|
|
18217
|
+
}), L(this, "supports", (r) => Ve.mime.call(this, r)), this.timers = {}, this.ready = !1, this.loading = !1, this.failed = !1, this.touch = Ve.touch, this.media = a, w.string(this.media) && (this.media = document.querySelectorAll(this.media)), (window.jQuery && this.media instanceof jQuery || w.nodeList(this.media) || w.array(this.media)) && (this.media = this.media[0]), this.config = je({}, Od, ka.defaults, t || {}, (() => {
|
|
18218
18218
|
try {
|
|
18219
18219
|
return JSON.parse(this.media.getAttribute("data-plyr-config"));
|
|
18220
18220
|
} catch {
|