@golstats/gsc-landing 1.0.143 → 1.0.145
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 +61 -38
- 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
|
@@ -44601,6 +44601,7 @@ const Kt = $6(), _F = {
|
|
|
44601
44601
|
isCupTournament: !1,
|
|
44602
44602
|
retries: 3,
|
|
44603
44603
|
userTeamGames: [],
|
|
44604
|
+
userTeamGamesForVideos: [],
|
|
44604
44605
|
isCupLegacyTournament: !1,
|
|
44605
44606
|
tournamentScheduleKeys: [],
|
|
44606
44607
|
tournamentScheduleKeysGoals: [],
|
|
@@ -44685,6 +44686,9 @@ const Kt = $6(), _F = {
|
|
|
44685
44686
|
closestRound() {
|
|
44686
44687
|
return this.userTeamGames && this.userTeamGames.length ? this.getUserTeamClosestRound(this.fullTournamentScheduleFull) : this.getNormalClosestRound(this.fullTournamentScheduleFull);
|
|
44687
44688
|
},
|
|
44689
|
+
closestRoundVideos() {
|
|
44690
|
+
return this.userTeamGames && this.userTeamGames.length ? this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals, !0) : this.getNormalClosestRound(this.fullTournamentScheduleFullGoals, !0);
|
|
44691
|
+
},
|
|
44688
44692
|
containerGridCalendarTable() {
|
|
44689
44693
|
return this.elementSize.width <= 1e3 ? "container-grid-calendar-table-mobile" : "container-grid-calendar-table";
|
|
44690
44694
|
},
|
|
@@ -44791,6 +44795,18 @@ const Kt = $6(), _F = {
|
|
|
44791
44795
|
}
|
|
44792
44796
|
},
|
|
44793
44797
|
methods: {
|
|
44798
|
+
getOnlyGamesWithGoals(s) {
|
|
44799
|
+
return Object.entries(s).reduce((e, [t, i]) => {
|
|
44800
|
+
const a = i.reduce((n, r) => {
|
|
44801
|
+
const o = r.games.filter((c) => (c.is_live || c.game_status !== 4) && c.score[0] + c.score[1] > 0);
|
|
44802
|
+
return o.length && n.push({
|
|
44803
|
+
...r,
|
|
44804
|
+
games: o
|
|
44805
|
+
}), n;
|
|
44806
|
+
}, []);
|
|
44807
|
+
return a.length && (e[t] = a), e;
|
|
44808
|
+
}, {});
|
|
44809
|
+
},
|
|
44794
44810
|
async onClickPlaySeeker() {
|
|
44795
44811
|
try {
|
|
44796
44812
|
const e = await (await fetch(
|
|
@@ -45141,7 +45157,7 @@ const Kt = $6(), _F = {
|
|
|
45141
45157
|
},
|
|
45142
45158
|
async createFullTournamentScheme(s, e) {
|
|
45143
45159
|
try {
|
|
45144
|
-
this.seasonsGamesMap = /* @__PURE__ */ new Map(), this.userTeamGames = [], this.gamesOfTheDayPreMatchIds.clear();
|
|
45160
|
+
this.seasonsGamesMap = /* @__PURE__ */ new Map(), this.userTeamGames = [], this.userTeamGamesForVideos = [], this.gamesOfTheDayPreMatchIds.clear();
|
|
45145
45161
|
let t = 0;
|
|
45146
45162
|
const { seasonsAndGames: i, seasonsAndTeams: a } = await this.fetchSeasonsGamesAndTeams(
|
|
45147
45163
|
s.map((d) => d.id),
|
|
@@ -45170,7 +45186,7 @@ const Kt = $6(), _F = {
|
|
|
45170
45186
|
);
|
|
45171
45187
|
return u.dateTimeMillis = R.valueOf(), u.home_team = r.find((k) => k.team_id === f.home_team), u.visiting_team = r.find((k) => k.team_id === f.visiting_team), u.game_status === 4 && g.getFullYear() === R.getFullYear() && g.getMonth() === R.getMonth() && g.getDate() === R.getDate() && this.gamesOfTheDayPreMatchIds.add(u.game_id), this.seasonsGamesMap.set(u.game_id, u), m[f.matchday_abbreviation] ? m[f.matchday_abbreviation][f.game_status === 3 ? "canceled" : f.date] ? m[f.matchday_abbreviation][f.game_status === 3 ? "canceled" : f.date].push(u) : m[f.matchday_abbreviation][f.game_status === 3 ? "canceled" : f.date] = [u] : m[f.matchday_abbreviation] = {
|
|
45172
45188
|
[f.game_status === 3 ? "canceled" : f.date]: [u]
|
|
45173
|
-
}, this.gsData && this.gsData.teamId && u.game_status === 4 && (u.home_team.team_id === this.gsData.teamId || u.visiting_team.team_id === this.gsData.teamId) && this.userTeamGames.push(u), m;
|
|
45189
|
+
}, this.gsData && this.gsData.teamId && u.game_status === 4 && (u.home_team.team_id === this.gsData.teamId || u.visiting_team.team_id === this.gsData.teamId) && (this.userTeamGames.push(u), u.score && u.score[0] + u.score[1] > 0 && this.userTeamGamesForVideos.push(u)), m;
|
|
45174
45190
|
}, {});
|
|
45175
45191
|
this.userTeamGames.sort((m, f) => m.dateTimeMillis - f.dateTimeMillis);
|
|
45176
45192
|
for (let [m, f] of Object.entries(h))
|
|
@@ -45234,7 +45250,7 @@ const Kt = $6(), _F = {
|
|
|
45234
45250
|
}
|
|
45235
45251
|
} else if (this.isCup) {
|
|
45236
45252
|
const u = m.replace("M", ""), g = `Jornada ${u}`;
|
|
45237
|
-
this.isCupLegacy ? d[Zd[u] || g] = f : d[Xd[m] || g] =
|
|
45253
|
+
this.isCupLegacy ? d[Zd[u] || g] = f : d[Xd[m] || g] = [];
|
|
45238
45254
|
} else
|
|
45239
45255
|
d[Number(m.replace("M", "")).toString()] = f;
|
|
45240
45256
|
else h.type === 2 ? ["PI1", "PI2"].includes(m) ? d[m] = f : d[`R${Number(m.replace("PO", ""))}`] = f : h.type === 1 && (d[Jd[m]] = f);
|
|
@@ -45280,7 +45296,7 @@ const Kt = $6(), _F = {
|
|
|
45280
45296
|
avaible: g
|
|
45281
45297
|
}), d;
|
|
45282
45298
|
}, /* @__PURE__ */ new Map()).values()
|
|
45283
|
-
), this.gamesOfTheDayPreMatchIds.size
|
|
45299
|
+
), await this.checkLiveGames(), this.gamesOfTheDayPreMatchIds.size && this.createGameOfTheDayTimeouts();
|
|
45284
45300
|
} catch (t) {
|
|
45285
45301
|
throw new Error(t);
|
|
45286
45302
|
} finally {
|
|
@@ -45291,10 +45307,16 @@ const Kt = $6(), _F = {
|
|
|
45291
45307
|
this.gamesOfTheDayPreMatchIds.size && this.gamesOfTheDayPreMatchIds.forEach((s) => {
|
|
45292
45308
|
const e = this.seasonsGamesMap.get(s);
|
|
45293
45309
|
if (e) {
|
|
45294
|
-
const t = (/* @__PURE__ */ new Date()).valueOf()
|
|
45295
|
-
|
|
45296
|
-
|
|
45297
|
-
|
|
45310
|
+
const t = (/* @__PURE__ */ new Date()).valueOf();
|
|
45311
|
+
if (60 * 1e3 * 30 + e.dateTimeMillis - t > 0) {
|
|
45312
|
+
const a = e.dateTimeMillis - t - 3e5;
|
|
45313
|
+
setTimeout(
|
|
45314
|
+
() => {
|
|
45315
|
+
this.createCheckLiveGamesInterval();
|
|
45316
|
+
},
|
|
45317
|
+
a > 0 ? a : 0
|
|
45318
|
+
);
|
|
45319
|
+
}
|
|
45298
45320
|
}
|
|
45299
45321
|
});
|
|
45300
45322
|
},
|
|
@@ -45378,41 +45400,42 @@ const Kt = $6(), _F = {
|
|
|
45378
45400
|
e.push(s);
|
|
45379
45401
|
return e;
|
|
45380
45402
|
},
|
|
45381
|
-
getNormalClosestRound(s) {
|
|
45382
|
-
const
|
|
45383
|
-
Object.entries(
|
|
45384
|
-
|
|
45385
|
-
const
|
|
45386
|
-
|
|
45403
|
+
getNormalClosestRound(s, e = !1) {
|
|
45404
|
+
const i = e ? this.getOnlyGamesWithGoals(s) : s, a = Object.entries(
|
|
45405
|
+
Object.entries(i).reduce((o, [c, l]) => (o[c] = [], l.forEach((d) => {
|
|
45406
|
+
d.games.forEach((h) => {
|
|
45407
|
+
const m = new Date(h.date_time_utc).getTime() + 66e5;
|
|
45408
|
+
o[c].push(m);
|
|
45387
45409
|
});
|
|
45388
|
-
}),
|
|
45410
|
+
}), o), {})
|
|
45389
45411
|
);
|
|
45390
|
-
if (!
|
|
45412
|
+
if (!a.length)
|
|
45391
45413
|
return "1";
|
|
45392
|
-
const
|
|
45393
|
-
(
|
|
45394
|
-
let
|
|
45395
|
-
return
|
|
45396
|
-
const
|
|
45397
|
-
|
|
45398
|
-
}),
|
|
45414
|
+
const n = (/* @__PURE__ */ new Date()).getTime(), r = a.reduce(
|
|
45415
|
+
(o, [c, l]) => {
|
|
45416
|
+
let d = null;
|
|
45417
|
+
return l.forEach((h) => {
|
|
45418
|
+
const m = e ? n - h : h - n;
|
|
45419
|
+
m >= 0 && (d === null || m < d) && (d = m);
|
|
45420
|
+
}), d && (o.shortestTime === null || d < o.shortestTime) && (o.round = c, o.shortestTime = d), o;
|
|
45399
45421
|
},
|
|
45400
45422
|
{ round: "", shortestTime: null }
|
|
45401
45423
|
);
|
|
45402
|
-
return
|
|
45403
|
-
},
|
|
45404
|
-
getUserTeamClosestRound(s) {
|
|
45405
|
-
let
|
|
45406
|
-
|
|
45407
|
-
|
|
45408
|
-
|
|
45409
|
-
|
|
45410
|
-
|
|
45411
|
-
|
|
45424
|
+
return r.shortestTime !== null ? r.round : a[a.length - 1][0];
|
|
45425
|
+
},
|
|
45426
|
+
getUserTeamClosestRound(s, e = !1) {
|
|
45427
|
+
let t = 1;
|
|
45428
|
+
const i = e ? this.userTeamGamesForVideos : this.userTeamGames;
|
|
45429
|
+
if (i.length) {
|
|
45430
|
+
const a = i[0];
|
|
45431
|
+
for (const [n, r] of Object.entries(s))
|
|
45432
|
+
for (const o of r)
|
|
45433
|
+
if (o.games.find(
|
|
45434
|
+
(l) => l.game_id === a.game_id
|
|
45412
45435
|
))
|
|
45413
|
-
return
|
|
45436
|
+
return n;
|
|
45414
45437
|
}
|
|
45415
|
-
return
|
|
45438
|
+
return t;
|
|
45416
45439
|
},
|
|
45417
45440
|
async changeIndexStory(s) {
|
|
45418
45441
|
if (this.arrayGamesAdd.length > 0) {
|
|
@@ -45540,7 +45563,7 @@ const Kt = $6(), _F = {
|
|
|
45540
45563
|
beforeUnmount() {
|
|
45541
45564
|
this.resetGamesLiveInterval();
|
|
45542
45565
|
}
|
|
45543
|
-
}, Kn = (s) => (Ze("data-v-
|
|
45566
|
+
}, Kn = (s) => (Ze("data-v-1092b9ab"), s = s(), Qe(), s), TF = {
|
|
45544
45567
|
class: "gsclanding",
|
|
45545
45568
|
ref: "landingref"
|
|
45546
45569
|
}, xF = {
|
|
@@ -45782,7 +45805,7 @@ function s7(s, e, t, i, a, n) {
|
|
|
45782
45805
|
nextRivalTeam: n.isGenericLike || !a.nextRivalId ? { id: 0 } : { id: a.nextRivalId },
|
|
45783
45806
|
user: t.user,
|
|
45784
45807
|
"tournament-schedule-keys": a.tournamentScheduleKeys,
|
|
45785
|
-
"default-match-day-key":
|
|
45808
|
+
"default-match-day-key": n.closestRoundVideos,
|
|
45786
45809
|
seasonSelected: a.seasonSelected,
|
|
45787
45810
|
tournamentSelected: a.tournamentSelected,
|
|
45788
45811
|
myTournament: t.user.tournament,
|
|
@@ -45868,7 +45891,7 @@ function s7(s, e, t, i, a, n) {
|
|
|
45868
45891
|
], 2)
|
|
45869
45892
|
], 512);
|
|
45870
45893
|
}
|
|
45871
|
-
const h7 = /* @__PURE__ */ xt(_F, [["render", s7], ["__scopeId", "data-v-
|
|
45894
|
+
const h7 = /* @__PURE__ */ xt(_F, [["render", s7], ["__scopeId", "data-v-1092b9ab"]]);
|
|
45872
45895
|
export {
|
|
45873
45896
|
h7 as GSCLanding
|
|
45874
45897
|
};
|