@everymatrix/casino-most-played-section-nd 1.77.7 → 1.77.9

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.
@@ -2476,8 +2476,8 @@ function Pi(i, e, a) {
2476
2476
  let { endpoint: o = "" } = e, { datasource: s = "" } = e, { lang: r = "" } = e, { session: m = "" } = e, { userid: c = "" } = e, { favorites: u = "" } = e, { mbsource: f } = e, { clientstyling: p = "" } = e, { clientstylingurl: b = "" } = e, { translationurl: M = "" } = e, { currency: I = "" } = e, { categoryid: g = "" } = e, { showgamename: d = "" } = e, { livecasino: O = "false" } = e, { gamepagemodalurl: U = "true" } = e, { integratedgameframedesktop: v = "false" } = e, { integratedgameframemobile: Q = "false" } = e, { casinomygames: me = "false" } = e, { addfilterselector: ye = "false" } = e, { addsortingselector: ke = "false" } = e, { filterbylogo: Ke = "" } = e, { casinogamesgridslider: Xe = "false" } = e, { fetchviaevent: ce = "false" } = e, { showallpage: je = "casino" } = e, { actionevent: Te = "CategoryChange" } = e, { displayedgamecount: Ge = "10" } = e, { showallbuttongamescount: Ce = "10" } = e, { lobbyscreen: Pe = "true" } = e, { usesinglevendorfilter: Se = "false" } = e, { visiblegames: De = "10" } = e, x = !0, Ue = !1, Fe, ze, K = !0, Ze = window.navigator.userAgent, j, F = [], $ = !0, ne = 40, X = !1, Me = !1, ge = !1, Oe = !1, Be = !0, de = !1, ue, Ve, fe, he = !1, Y, Ie = !1, _e = new Array(1e4), pe = {}, He = "", te = "", Ee, qe, R, B = [], Re = new AbortController(), oe = { items: [], count: 0, name: "" };
2477
2477
  const ka = () => {
2478
2478
  fetch(M).then((_) => _.json()).then((_) => {
2479
- Object.keys(_).forEach((k) => {
2480
- na(k, _[k]);
2479
+ Object.keys(_).forEach((y) => {
2480
+ na(y, _[y]);
2481
2481
  });
2482
2482
  }).catch((_) => {
2483
2483
  console.log(_);
@@ -2488,20 +2488,20 @@ function Pi(i, e, a) {
2488
2488
  }), typeof document.hidden != "undefined" ? Ee = "hidden" : typeof document.msHidden != "undefined" ? Ee = "msHidden" : typeof document.webkitHidden != "undefined" && (Ee = "webkitHidden");
2489
2489
  let Ae = new IntersectionObserver((l) => {
2490
2490
  l.forEach((_) => Ne(this, null, function* () {
2491
- let k = _.target.gameid, E = _.target.elems_index;
2492
- _.isIntersecting ? (E * 1.2 > ne && Ia(g), a(40, pe[k] = 1, pe)) : a(40, pe[k] = 0, pe);
2491
+ let y = _.target.gameid, E = _.target.elems_index;
2492
+ _.isIntersecting ? (E * 1.2 > ne && Ia(g), a(40, pe[y] = 1, pe)) : a(40, pe[y] = 0, pe);
2493
2493
  }));
2494
2494
  });
2495
- const Ga = (l, _) => new Promise((k, E) => {
2495
+ const Ga = (l, _) => new Promise((y, E) => {
2496
2496
  if (l && _) {
2497
2497
  let N = `${o}/v1/player/${_}/favorites/`;
2498
2498
  fetch(N, {
2499
2499
  method: "GET",
2500
2500
  headers: { "X-SessionID": l }
2501
- }).then((y) => y.json()).then((y) => {
2501
+ }).then((k) => k.json()).then((k) => {
2502
2502
  var J, T;
2503
- if (R = [], y) {
2504
- (J = y.items) == null || J.forEach((q) => {
2503
+ if (R = [], k) {
2504
+ (J = k.items) == null || J.forEach((q) => {
2505
2505
  q.gameModel && (R.push(q), B.includes(q.id) || B.push(q.id));
2506
2506
  });
2507
2507
  const H = (T = Le(R)) == null ? void 0 : T.length;
@@ -2511,24 +2511,24 @@ function Pi(i, e, a) {
2511
2511
  });
2512
2512
  } else
2513
2513
  R = [];
2514
- g === "FAVORITES" && Je(R), k(R);
2515
- }).catch((y) => {
2516
- console.error(y), E(y);
2514
+ g === "FAVORITES" && Je(R), y(R);
2515
+ }).catch((k) => {
2516
+ console.error(k), E(k);
2517
2517
  });
2518
2518
  } else
2519
- k([]);
2519
+ y([]);
2520
2520
  }), We = (l, _) => {
2521
- let k = `${o}/v1/player/${_}/favorites/`;
2521
+ let y = `${o}/v1/player/${_}/favorites/`;
2522
2522
  a(25, x = !0);
2523
2523
  let E = {
2524
2524
  method: "GET",
2525
2525
  headers: { "X-SessionID": l }
2526
2526
  };
2527
2527
  return new Promise((N, A) => {
2528
- fetch(k, E).then((y) => y.json()).then((y) => {
2528
+ fetch(y, E).then((k) => k.json()).then((k) => {
2529
2529
  var T, H;
2530
- if (a(25, x = !1), R = [], y) {
2531
- (T = y.items) == null || T.forEach((se) => {
2530
+ if (a(25, x = !1), R = [], k) {
2531
+ (T = k.items) == null || T.forEach((se) => {
2532
2532
  se.gameModel && (R.push(se), B.includes(se.id) || B.push(se.id));
2533
2533
  });
2534
2534
  const q = (H = Le(R)) == null ? void 0 : H.length;
@@ -2543,27 +2543,27 @@ function Pi(i, e, a) {
2543
2543
  });
2544
2544
  let J = F;
2545
2545
  a(29, F = void 0), a(29, F = J), N(R);
2546
- }).catch((y) => {
2547
- console.error(y), A(y);
2546
+ }).catch((k) => {
2547
+ console.error(k), A(k);
2548
2548
  });
2549
2549
  });
2550
- }, Qe = (l, _, k, E) => {
2550
+ }, Qe = (l, _, y, E) => {
2551
2551
  Re && Re.abort(), Re = new AbortController();
2552
2552
  const N = Re.signal;
2553
2553
  a(25, x = !0);
2554
- let A = "", y = "", J = JSON.parse(localStorage.getItem("vendorFiltersByCategory")), T = JSON.parse(localStorage.getItem("vendorSortingBy"));
2554
+ let A = "", k = "", J = JSON.parse(localStorage.getItem("vendorFiltersByCategory")), T = JSON.parse(localStorage.getItem("vendorSortingBy"));
2555
2555
  const H = Se === "true" ? "*" : l;
2556
- return (l.match(/\$/g) || []).length > 1 ? (A = l.split("$").slice(0, 2).join("$"), y = new URL(`${o}/v1/casino/groups/${s}/${A}/subGroups`)) : y = new URL(`${o}/v1/casino/groups/${s}/${l}`), new Promise((q, se) => {
2556
+ return (l.match(/\$/g) || []).length > 1 ? (A = l.split("$").slice(0, 2).join("$"), k = new URL(`${o}/v1/casino/groups/${s}/${A}/subGroups`)) : k = new URL(`${o}/v1/casino/groups/${s}/${l}`), new Promise((q, se) => {
2557
2557
  var aa;
2558
- if (y.searchParams.delete("pagination"), y.searchParams.append("expand", "games(vendor)"), y.searchParams.append("fields", "id,name,games"), y.searchParams.append("platform", Qa(Ze)), y.searchParams.append("pagination", `games(offset=${_},limit=${k})`), y.searchParams.append("language", r), window.postMessage({ type: "CategoryVendors", categoryid: l }, window.location.href), J && ((aa = J[H]) != null && aa.length))
2558
+ if (k.searchParams.delete("pagination"), k.searchParams.append("expand", "games(vendor)"), k.searchParams.append("fields", "id,name,games"), k.searchParams.append("platform", Qa(Ze)), k.searchParams.append("pagination", `games(offset=${_},limit=${y})`), k.searchParams.append("language", r), window.postMessage({ type: "CategoryVendors", categoryid: l }, window.location.href), J && ((aa = J[H]) != null && aa.length))
2559
2559
  if (Se === "true" || K === !1 && he === !1) {
2560
2560
  let P = "";
2561
2561
  a(34, Oe = !0), J[H].forEach((ee) => {
2562
2562
  P = P + (P ? `,games(vendor(id=${ee}))` : `games(vendor(id=${ee}))`);
2563
- }), y.searchParams.append("filter", `${P}`);
2563
+ }), k.searchParams.append("filter", `${P}`);
2564
2564
  } else
2565
2565
  a(34, Oe = !1);
2566
- T && (T[l] ? T[l] && T[l] != "All" && (T[l] == "isNew" || T[l] == "advancedTags(name(hot))" ? (y.searchParams.append("sortedField", `games(${T[l]})`), y.searchParams.append("orderBy", "DES")) : y.searchParams.append("sortedField", `games(${T[l]})`)) : te && te != "All" && (te == "advancedTags(name(hot))" || te == "isNew" ? (y.searchParams.append("sortedField", `games(${te})`), y.searchParams.append("orderBy", "DES")) : y.searchParams.append("sortedField", `games(${te})`))), fetch(y, { signal: N }).then((P) => P.json()).then((P) => {
2566
+ T && (T[l] ? T[l] && T[l] != "All" && (T[l] == "isNew" || T[l] == "advancedTags(name(hot))" ? (k.searchParams.append("sortedField", `games(${T[l]})`), k.searchParams.append("orderBy", "DES")) : k.searchParams.append("sortedField", `games(${T[l]})`)) : te && te != "All" && (te == "advancedTags(name(hot))" || te == "isNew" ? (k.searchParams.append("sortedField", `games(${te})`), k.searchParams.append("orderBy", "DES")) : k.searchParams.append("sortedField", `games(${te})`))), fetch(k, { signal: N }).then((P) => P.json()).then((P) => {
2567
2567
  N.aborted || (a(25, x = !1), (l.match(/\$/g) || []).length > 1 && (P = P.items.filter((ee) => {
2568
2568
  if (ee.id == l)
2569
2569
  return ee;
@@ -2576,19 +2576,19 @@ function Pi(i, e, a) {
2576
2576
  Ca();
2577
2577
  });
2578
2578
  });
2579
- }, ve = (l, _, k) => new Promise((E, N) => {
2579
+ }, ve = (l, _, y) => new Promise((E, N) => {
2580
2580
  u == "true" ? Ga(m, c).then((A) => {
2581
- Qe(l, _, k, A).then((y) => {
2582
- E(y);
2581
+ Qe(l, _, y, A).then((k) => {
2582
+ E(k);
2583
2583
  });
2584
- }) : Qe(l, _, k, null).then((A) => {
2584
+ }) : Qe(l, _, y, null).then((A) => {
2585
2585
  E(A);
2586
2586
  });
2587
2587
  }), Ca = () => {
2588
2588
  const l = Y.getRootNode().host;
2589
2589
  l.dispatchEvent(new CustomEvent("data-loaded", { bubbles: !0, detail: { target: l } }));
2590
- }, Sa = (l, _, k) => {
2591
- l !== "" && (a(31, X = !1), a(27, K = !0), a(1, ye = "false"), a(2, ke = "false"), a(33, ge = !1), Ie = !1, a(30, $ = +_ > +k), ve(l, 0, +_).then((E) => {
2590
+ }, Sa = (l, _, y) => {
2591
+ l !== "" && (a(31, X = !1), a(27, K = !0), a(1, ye = "false"), a(2, ke = "false"), a(33, ge = !1), Ie = !1, a(30, $ = +_ > +y), ve(l, 0, +_).then((E) => {
2592
2592
  a(28, j = E), a(29, F = j.games.items), F && F.forEach((N) => {
2593
2593
  N.isFavorite = V(N.id);
2594
2594
  });
@@ -2637,8 +2637,8 @@ function Pi(i, e, a) {
2637
2637
  break;
2638
2638
  case `CategoryData_${g}`:
2639
2639
  a(31, X = !1), a(27, K = !0), a(1, ye = "false"), a(2, ke = "false"), a(33, ge = !1), Ie = !1, ve(l.data.categoryId, 0, l.data.visiblegames).then((_) => {
2640
- a(28, j = _), a(29, F = j.games.items), a(30, $ = !!(Ve <= l.data.visiblegames && K)), F && F.forEach((k) => {
2641
- k.isFavorite = V(k.id);
2640
+ a(28, j = _), a(29, F = j.games.items), a(30, $ = !!(Ve <= l.data.visiblegames && K)), F && F.forEach((y) => {
2641
+ y.isFavorite = V(y.id);
2642
2642
  });
2643
2643
  });
2644
2644
  break;
@@ -2666,9 +2666,9 @@ function Pi(i, e, a) {
2666
2666
  g === "FAVORITES" && $e(l.data.url, l.data.sessionID);
2667
2667
  break;
2668
2668
  }
2669
- }, xe = (l) => {
2670
- a(31, X = !1), a(27, K = Pe === "true"), a(33, ge = !1), Ie = !0, a(36, de = !1), a(0, g = l), g !== "MOSTPLAYED" && a(30, $ = !1), me !== "true" && (!R && m && We(m, c), ve(g, 0, ne).then((_) => {
2671
- a(28, j = _), a(29, F = j.games.items);
2669
+ }, xe = (l, _ = !1) => {
2670
+ a(31, X = !1), a(27, K = Pe === "true"), a(33, ge = !1), Ie = !0, a(36, de = !1), a(0, g = l), g !== "MOSTPLAYED" && !_ && a(30, $ = !1), me !== "true" && (!R && m && We(m, c), ve(g, 0, ne).then((y) => {
2671
+ a(28, j = y), a(29, F = j.games.items);
2672
2672
  }).finally(
2673
2673
  /*// @TODO: replace this quick fix - when there are only a few category games, the view scrolls to the footer
2674
2674
  if (shownCategoryData.length < 10 && e.data.origin ==! 'filters') {
@@ -2694,10 +2694,10 @@ function Pi(i, e, a) {
2694
2694
  }));
2695
2695
  }, V = (l) => {
2696
2696
  var _;
2697
- return (_ = R == null ? void 0 : R.some((k) => k.id === l)) != null ? _ : !1;
2697
+ return (_ = R == null ? void 0 : R.some((y) => y.id === l)) != null ? _ : !1;
2698
2698
  };
2699
- let za = (l, _, k) => Ne(this, null, function* () {
2700
- yield $e(l, _), B.includes(k) || B.push(k);
2699
+ let za = (l, _, y) => Ne(this, null, function* () {
2700
+ yield $e(l, _), B.includes(y) || B.push(y);
2701
2701
  let N = {
2702
2702
  method: "POST",
2703
2703
  headers: {
@@ -2708,7 +2708,7 @@ function Pi(i, e, a) {
2708
2708
  body: JSON.stringify({ items: B })
2709
2709
  };
2710
2710
  fetch(l, N).then((A) => A.json()).then((A) => {
2711
- window.postMessage({ type: `AddFavoriteThumbnail_${k}` }, window.location.href), window.postMessage({
2711
+ window.postMessage({ type: `AddFavoriteThumbnail_${y}` }, window.location.href), window.postMessage({
2712
2712
  type: "UpdateFavoredList",
2713
2713
  url: l,
2714
2714
  sessionID: _
@@ -2717,15 +2717,15 @@ function Pi(i, e, a) {
2717
2717
  console.error("Err", A);
2718
2718
  });
2719
2719
  });
2720
- const Ma = (l, _, k) => {
2720
+ const Ma = (l, _, y) => {
2721
2721
  let E = {
2722
2722
  method: "DELETE",
2723
2723
  headers: { "X-SessionID": _ }
2724
2724
  };
2725
- fetch(`${l}/${k}`, E).then((N) => N.json()).then(() => {
2725
+ fetch(`${l}/${y}`, E).then((N) => N.json()).then(() => {
2726
2726
  window.postMessage(
2727
2727
  {
2728
- type: `RemoveFavoriteThumbnail_${k}`
2728
+ type: `RemoveFavoriteThumbnail_${y}`
2729
2729
  },
2730
2730
  window.location.href
2731
2731
  ), window.postMessage({
@@ -2733,17 +2733,17 @@ function Pi(i, e, a) {
2733
2733
  url: l,
2734
2734
  sessionID: _
2735
2735
  });
2736
- }), B.includes(k) && (B = B.filter((N) => N != k));
2736
+ }), B.includes(y) && (B = B.filter((N) => N != y));
2737
2737
  }, $e = (l, _) => Ne(this, null, function* () {
2738
2738
  return fetch(l, {
2739
2739
  method: "GET",
2740
2740
  headers: { "X-SessionID": _ }
2741
2741
  }).then((E) => E.json()).then((E) => {
2742
2742
  var A;
2743
- R = E.items, ce ? (R.forEach((y) => {
2744
- B.includes(y.id) || B.push(y.id);
2745
- }), Fa()) : R.forEach((y) => {
2746
- y.isFavorite = V(y.id);
2743
+ R = E.items, ce ? (R.forEach((k) => {
2744
+ B.includes(k.id) || B.push(k.id);
2745
+ }), Fa()) : R.forEach((k) => {
2746
+ k.isFavorite = V(k.id);
2747
2747
  });
2748
2748
  const N = (A = Le(R)) == null ? void 0 : A.length;
2749
2749
  g === "FAVORITES" && (window.postMessage({
@@ -2757,25 +2757,25 @@ function Pi(i, e, a) {
2757
2757
  if (!l)
2758
2758
  return;
2759
2759
  let _;
2760
- _ = (l == null ? void 0 : l.items) || l || [], _.length > 0 && _.forEach((k) => {
2761
- k.gameModel && (k.gameModel.isFavorite = !0);
2760
+ _ = (l == null ? void 0 : l.items) || l || [], _.length > 0 && _.forEach((y) => {
2761
+ y.gameModel && (y.gameModel.isFavorite = !0);
2762
2762
  }), a(42, oe.items = Le(_, oe.items), oe), a(42, oe.name = "Favorites", oe), a(25, x = !1);
2763
2763
  }, Ia = (l) => {
2764
2764
  ne += 1, a(36, de = !0), ne <= Ve && ve(l, Ti, ne).then((_) => {
2765
- a(28, j = _), j.games.items.length > F.length && (a(29, F = j.games.items), F.forEach((k) => {
2766
- k.isFavorite = V(k.id);
2765
+ a(28, j = _), j.games.items.length > F.length && (a(29, F = j.games.items), F.forEach((y) => {
2766
+ y.isFavorite = V(y.id);
2767
2767
  })), a(36, de = !1);
2768
2768
  });
2769
2769
  }, Ea = (l) => {
2770
2770
  const _ = l != null ? l : [];
2771
2771
  if ((_ == null ? void 0 : _.length) === 0)
2772
2772
  return "";
2773
- let k = "", E = 999999999999, N;
2773
+ let y = "", E = 999999999999, N;
2774
2774
  const A = new Date(Date.now());
2775
- return _.forEach((y, J) => {
2776
- const T = new Date(y.schedules[0].startTime), H = new Date(y.schedules[0].endTime);
2777
- ia(new Date(H), new Date(A)) < E && (E = ia(new Date(H), new Date(A)), N = J), oi(new Date(A), new Date(T)) && si(new Date(A), new Date(H)) && (k = _[N].name);
2778
- }), k;
2775
+ return _.forEach((k, J) => {
2776
+ const T = new Date(k.schedules[0].startTime), H = new Date(k.schedules[0].endTime);
2777
+ ia(new Date(H), new Date(A)) < E && (E = ia(new Date(H), new Date(A)), N = J), oi(new Date(A), new Date(T)) && si(new Date(A), new Date(H)) && (y = _[N].name);
2778
+ }), y;
2779
2779
  }, ea = (l) => {
2780
2780
  a(30, $ = !1), window.postMessage(
2781
2781
  {
@@ -2797,7 +2797,7 @@ function Pi(i, e, a) {
2797
2797
  me === "false" && c && m && a(39, he = !1);
2798
2798
  break;
2799
2799
  default:
2800
- xe(g);
2800
+ xe(g, !0);
2801
2801
  break;
2802
2802
  }
2803
2803
  }, Aa = () => {