PageSourceSearch

https://voyo.bg/assets/build/front/default-XSJH2MQR.js?v=3a98675b

js voyo.bg collected 2026-09-25 05:56:31 UTC 4,819 bytes, 135 lines download raw bytes

1"use strict";
2(() => {
3  var __defProp = Object.defineProperty;
4  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5  let streamsSplide = null;
6  document.addEventListener("started", () => {
7    mountSplashSlider();
8    mountSubmenuSlide();
9    mountOtherSliders();
10    if (document.readyState === "complete") {
11      scrollToRequestedBox();
12    } else {
13      window.addEventListener("load", scrollToRequestedBox, { once: true });
14    }
15    startLiveStreamsUpdater();
16  });
17  function scrollToRequestedBox() {
18    const scrollSection = new URLSearchParams(window.location.search).get("scrollSection");
19    if (!scrollSection) {
20      return;
21    }
22    const box = app.html.qAll("[data-box-id]").find((box2) => box2.getAttribute("data-box-id") === scrollSection);
23    if (!box) {
24      return;
25    }
26    const scrollToBox = /* @__PURE__ */ __name(() => {
27      var _a;
28      const startY = window.pageYOffset;
29      const headerHeight = ((_a = app.html.q("#menu")) == null ? void 0 : _a.getBoundingClientRect().height) || 0;
30      const targetY = Math.max(0, startY + box.getBoundingClientRect().top - headerHeight);
31      window.scrollTo({ top: targetY, behavior: "smooth" });
32    }, "scrollToBox");
33    const content = app.html.q("#content");
34    if (!content || !window.ResizeObserver) {
35      scrollToBox();
36      return;
37    }
38    const observer = new ResizeObserver(scrollToBox);
39    observer.observe(content);
40    window.setTimeout(() => observer.disconnect(), 3e3);
41  }
42  __name(scrollToRequestedBox, "scrollToRequestedBox");
43  document.addEventListener("started-bookmarks", () => {
44    app.voyo.tagMyVoyoBookmarks();
45  });
46  function startLiveStreamsUpdater() {
47    const liveStreamsBox = app.html.q("#voyobox_streams");
48    if (!liveStreamsBox) {
49      return;
50    }
51    setTimeout(refreshLiveStreams, 3e4);
52  }
53  __name(startLiveStreamsUpdater, "startLiveStreamsUpdater");
54  function refreshLiveStreams() {
55    app.voyo.refreshStreams().then(([needsUpdate, html]) => {
56      const dest = app.html.q("#voyobox_streams .track");
57      if (needsUpdate && dest) {
58        streamsSplide == null ? void 0 : streamsSplide.destroy(true);
59        app.html.writeHTML(dest, html);
60        streamsSplide = new Splide("#voyobox_streams").mount();
61      }
62      setTimeout(refreshLiveStreams, 3e4);
63    });
64  }
65  __name(refreshLiveStreams, "refreshLiveStreams");
66  function mountOtherSliders() {
67    app.html.qAll(".splide").filter((el) =>
67 !el.classList.contains("splide-no-auto-mount")).forEach((splideEl, i) => {
68      i < 6 ? mountSplideEl(splideEl) : app.observer.observe(splideEl, { task: "mountVoyoSplide", params: {} });
69    });
70  }
71  __name(mountOtherSliders, "mountOtherSliders");
72  function mountSplideEl(el) {
73    const splide = new Splide(el).mount();
74    if (el.id === "voyobox_streams") {
75      streamsSplide = splide;
76    }
77  }
78  __name(mountSplideEl, "mountSplideEl");
79  function mountSplashSlider() {
80    const splashEl = app.html.q(".splash");
81    const thumbnailsEl = app.html.q(".splash-thumbnails");
82    if (!splashEl || !thumbnailsEl) {
83      return;
84    }
85    const splash = new Splide(splashEl);
86    const thumbnails = new Splide(thumbnailsEl);
87    splash.on("active", playActiveTrailer);
88    splash.sync(thumbnails);
89    splash.mount();
90    thumbnails.mount();
91  }
92  __name(mountSplashSlider, "mountSplashSlider");
93  function mountSubmenuSlide() {
94    app.html.qAll(".submenu.splide").forEach((splideEl) => {
95      const splide = new Splide(splideEl);
96      splide.on("mounted", () => {
97        app.html.removeClass(splideEl, "hidden");
98        const i = app.html.qAll(".splide__slide", splideEl).findIndex((slide) => app.html.hasClass(slide, "selected"));
99        if (i > -1) {
100          splide.go(i);
101        }
102      });
103      splide.mount();
104    });
105  }
106  __name(mountSubmenuSlide, "mountSubmenuSlide");
107  function playActiveTrailer(slideComponent) {
108    const slide = slideComponent == null ? void 0 : slideComponent.slide;
109    if (!slide) {
110      return;
111    }
112    app.voyoVideo.stopVideoPlayers();
113    app.voyo.playTrailer(slide);
114  }
115  __name(playActiveTrailer, "playActiveTrailer");
116  function mountVoyoSplide(item) {
117    mountSplideEl(item.element);
118  }
119  __name(mountVoyoSplide, "mountVoyoSplide");
120  function muteUnmuteTrailerVolume(event) {
121    app.voyoVideo.muteUnmuteTrailerVolume(event);
122  }
123  __name(muteUnmuteTrailerVolume, "muteUnmuteTrailerVolume");
124  function trailerInView(task) {
125    if (task.isVisible) {
126      app.voyoVideo.stopVideoPlayers();
127      app.voyo.playTrailer(task.element);
128    }
129  }
130  __name(trailerInView, "trailerInView");
131  window.muteUnmuteTrailerVolume = muteUnmuteTrailerVolume;
132  window.mountVoyoSplide = mountVoyoSplide;
133  window.trailerInView = trailerInView;
134})();
135//# sourceMappingURL=default-XSJH2MQR.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.