PageSourceSearch

https://tvrmoldova.md/assets/js/app.js?v=568514

js tvrmoldova.md collected 2026-10-02 03:39:48 UTC 35,448 bytes, 1,160 lines download raw bytes

1(function($) {
2  "use strict";
3
4    window.yodaLog = (s,t) => {
5        if (t == 'banner') {
6            return console.log('%c' + s, 'color:#fff; font-size:30px; font-weight:bold; background: linear-gradient(#4f6995, #957b4f); border-radius: 5px; padding: 15px')
7        }
8
9        if (t == 'banner-small') {
10            return console.log('%c' + s, 'color:#fff; font-size:12px; background: linear-gradient(#4f6995, #957b4f); border-radius: 5px; padding: 15px')
11        }
12
13        if (t == 'info') {
14            return console.log('%c Yoda.md %c '+s+' ', 'background: #af9568; color: #fff; font-weight:bold;', 'background: #446D8C; color: #fff;');
15        }
16    }
17
18  const $baseUrl = 'https://tvrmoldova.md/';
19
20  let isMobile = window.matchMedia("only screen and (max-width: 760px)").matches;
21
22  jQuery.LoadingOverlaySetup({
23      image: "",
24      zIndex: 1029,
25      fontawesome: "fa fa-spinner fa-pulse"
26  });
27  /*
28  if ($("#top-news-section").length) {
29      if (!isMobile) {
30          $("#top-news-section").LoadingOverlay("show");
31      }
32  }
33  */
34
35  yodaLog('This is a Yoda.md project!', 'banner');
36  yodaLog('Project name: TVR Moldova Web Platform | Project lead: Ion (Nalyk) Calmîș <[email protected]> | Executed for: DIGITA MEDIA S.R.L.', 'banner-small');
37
38  /*------------------------------------
39  // Header
40  ------------------------------------*/
41  // Fixed header
42  $(window).on("scroll", function() {
43      if ($("header").hasClass("sticky-on")) {
44          const stickyPlaceHolder = $("#sticky-placeholder"),
45              menu = $("#navbar-wrap"),
46              menuH = menu.outerHeight(),
47              topbarH = $("#topbar-wrap").outerHeight() || 0,
48              targrtScroll = topbarH,
49              header = $("header");
50          if ($(window).scrollTop() > targrtScroll) {
51              header.addClass("sticky");
52              stickyPlaceHolder.height(menuH);
53          } else {
54              header.removeClass("sticky");
55              stickyPlaceHolder.height(0);
56          }
57      }
58  });
59
60  // Fixed header mobile
61  $(window).on("scroll", function() {
62      if ($(".rt-mobile-header").hasClass("mobile-sticky-on")) {
63          const stickyPlaceHolder = $("#mobile-sticky-placeholder"),
64              menu = $("#mobile-menu-bar-wrap"),
65              menuH = menu.outerHeight(),
66              topbarH = $("#mobile-top-bar").outerHeight() || 0,
67              targrtScroll = topbarH,
68              header = $(".rt-mobile-header");
69          if ($(window).scrollTop() > targrtScroll) {
70              header.addClass("mobile-sticky");
71              stickyPlaceHolder.height(menuH);
72          } else {
73              header.removeClass("mobile-sticky");
74              stickyPlaceHolder.height(0);
75          }
76      }
77  });
78
79  // humburger
80  $(".humburger").on("click", function() {
81      $(".humburger").toggleClass("active");
82  });
83
84  /*-------------------------------------
85  //  Mobile Menu Toggle
86  -------------------------------------*/
87  $(".sidebarBtn").on("click", function(e) {
88      e.preventDefault();
89      if ($(".rt-slide-nav").is(":visible")) {
90          $(".rt-slide-nav").slideUp();
91          $("body").removeClass("slidemenuon");
92      } else {
93          $(".rt-slide-nav").slideDown();
94          $("body").addClass("slidemenuon");
95      }
96  });
97
98  /*-------------------------------------
99    Mobile Menu Dropdown
100    -------------------------------------*/
101  const rtMobileMenu = $(".offscreen-navigation .menu");
102
103  if (rtMobileMenu.length) {
104      rtMobileMenu.children("li").addClass("menu-item-parent");
105      rtMobileMenu.find(".menu-item-has-children > a").on("click", function(e) {
106          e.preventDefault();
107          $(this).toggleClass("opened");
108          const n = $(this).next(".sub-menu"),
109              s = $(this).closest(".menu-item-parent").find(".sub-menu");
110          rtMobileMenu
111              .find(".sub-menu")
112              .not(s)
113              .slideUp(250)
114              .prev("a")
115              .removeClass("opened"),
116              n.slideToggle(250);
117      });
118      rtMobileMenu
119          .find(".menu-item:not(.menu-item-has-children) > a")
120          .on("click", function(e) {
121              $(".rt-slide-nav").slideUp();
122              $("body").removeClass("slidemenuon");
123          });
124  }
125
126  /*-------------------------------------
127  // Trending slider
128  ------------------------------------*/
129  const rtTrendingSlider1 = new Swiper(".rt-treding-slider1", {
130      slidesPerView: 1,
131      loop: true,
132      slideToClickedSlide: true,
133      direction: "vertical",
134      autoplay: {
135          delay: 4000,
136      },
137      speed: 800,
138  });
139
140  /*-------------------------------------
141  // banner-slider-thumbnail-style-2
142  ------------------------------------*/
143
144  const bannerSliderThumbnailStyle2 = new Swiper(
145      ".banner-slider-thumbnail-style-2", {
146          slidesPerView: 3,
147          slideToClickedSlide: true,
148          spaceBetween: 20,
149          loop: true,
150          speed: 1000,
151          autoplay: {
152            delay: 4000,
153          },
154          direction: "horizontal",
155          mousewheel: true,
156
157          breakpoints: {
158              0: {
159                  slidesPerView: 1,
160              },
161              576: {
162                  slidesPerView: 1,
163              },
164              768: {
165                  slidesPerView: 2,
166              },
167              992: {
168                  slidesPerView: 2,
169                  direction: "vertical",
170                  pagination: {
171                      el: ".swiper-pagination",
172                      type: "progressbar",
173                  },
174                  // centeredSlides: true,
175              },
176              1200: {
177                  slidesPerView: 3,
178                  direction: "vertical",
179                  pagination: {
180                      el: ".swiper-pagination",
181                      type: "progressbar",
182                  },
183              },
184          },
185      }
186  );
187  const bannerSliderStyle2 = new Swiper(".banner-slider-style-2", {
188      loop: true,
189      speed: 1000,
190      autoplay: {
191        delay: 4000,
192      },
193      thumbs: {
194          swiper: bannerSliderThumbnailStyle2,
195      },
196  });
197
198  /*-------------------------------------
199  // banner-slider-thumbnail-style-2
200  ------------------------------------*/
201
202  var bannerSliderThumbnailStyle3 = new Swiper(
203      ".banner-slider-thumbnail-style-3", {
204          slidesPerView: 3,
205          spaceBetween: 20,
206          loop: true,
207          speed: 1000,
208
209          breakpoints: {
210              0: {
211                  slidesPerView: 1,
212              },
213              576: {
214                  slidesPerView: 1,
215              },
216              768: {
217                  slidesPerView: 2,
218              },
219              1025: {
220                  slidesPerView: 2,
221              },
222              1400: {
223                  slidesPerView: 3,
224                  centeredSlides: true,
225              },
226          },
227      }
228  );
229  var bannerSliderStyle3 = new Swiper(".banner-slider-style-3", {
230      loop: true,
231      speed: 1000,
232      thumbs: {
233          swiper: bannerSliderThumbnailStyle3,
234      },
235      navigation: {
236          nextEl: ".btn-next-thumb",
237          prevEl: ".btn-prev-thumb",
238      },
239      effect: 'fade',
240      autoplay: {
241          delay: 6000
242      }
243  });
244
245
246  /*-------------------------------------
247  // video Thumbnail slider
248  ------------------------------------*/
249
250  const videoSliderThumbnailStyle1 = new Swiper(
251      ".video-slider-thumbnail-style-1", {
252          loop: true,
253          spaceBetween: 10,
254          slidesPerView: 4,
255          watchSlidesVisibility: true,
256          watchSlidesProgress: true,
257          speed: 800,
258          pagination: {
259              el: ".swiper-pagination",
260              type: "progressbar",
261          },
262          breakpoints: {
263              0: {
264                  slidesPerView: 1,
265              },
266              576: {
267                  slidesPerView: 1,
268              },
269              768: {
270                  slidesPerView: 2,
271              },
272              992: {
273                  slidesPerView: 2,
274              },
275              1200: {
276                  slidesPerView: 3,
277              },
278              1400: {
279                  slidesPerView: 3,
280              },
281          },
282      }
283  );
284  const videoSliderStyle1 = new Swiper(".video-slider-style-1", {
285      loop: true,
286      speed: 800,
287      thumbs: {
288          swiper: videoSliderThumbnailStyle1,
289      },
290  });
291
292  /*---------------------------------------
293  //	rt-post-slider-style-1
294  ---------------------------------------*/
295  const rtPostSliderStyle1 = new Swiper(".rt-post-slider-style-1", {
296      slidesPerView: 4,
297      loop: true,
298      spaceBetween: 24,
299      slideToClickedSlide: true,
300      autoplay: {
301          delay: 5000,
302      },
303      navigation: {
304          nextEl: ".btn-next",
305          prevEl: ".btn-prev",
306      },
307      speed: 800,
308      breakpoints: {
309          0: {
310              slidesPerView: 1,
311          },
312          576: {
313              slidesPerView: 2,
314          },
315          768: {
316              slidesPerView: 2,
317          },
318          992: {
319              slidesPerView: 3,
320          },
321          1200: {
322              slidesPerView: 4,
323          },
324      },
325  });
326
327  /*--------------------------------------
328//rt-post-slider-style-2
329-----------------------------------------*/
330  const rtPostSliderStyle2 = new Swiper(".rt-post-slider-style-2", {
331      slidesPerView: 3,
332      spaceBetween: 24,
333      slidesPerColumn: 3,
334      slidesPerColumnFill: "row",
335      loop: true,
336      slideToClickedSlide: true,
337      autoplay: {
338          delay: 4000,
339      },
340      navigation: {
341          nextEl: ".btn-next",
342          prevEl: ".btn-prev",
343      },
344      speed: 800,
345      breakpoints: {
346          0: {
347              slidesPerView: 1,
348              slidesPerColumn: 2,
349              slidesPerColumnFill: "row",
350          },
351          576: {
352              slidesPerView: 1,
353              slidesPerColumn: 2,
354              slidesPerColumnFill: "row",
355          },
356          768: {
357              slidesPerView: 2,
358              slidesPerColumn: 2,
359              slidesPerColumnFill: "row",
360          },
361          992: {
362              slidesPerView: 2,
363              slidesPerColumn: 2,
364              slidesPerColumnFill: "row",
365          },
366          1200: {
367              slidesPerView: 3,
368              slidesPerColumn: 3,
369              slidesPerColumnFill: "row",
370          },
371      },
372  });
373
374  /*---------------------------------------
375  // rt-post-slider-style-3
376  ----------------------------------------*/
377  const rtPostSliderStyle3 = new Swiper(".rt-post-slider-style-3", {
378      slidesPerView: 4,
379      spaceBetween: 24,
380      loop: true,
381      slideToClickedSlide: true,
382      autoplay: {
383          delay: 4000,
384      },
385      navigation: {
386          nextEl: ".btn-next",
387          prevEl: ".btn-prev",
388      },
389      speed: 800,
390      breakpoints: {
391          0: {
392              slidesPerView: 1,
393          },
394          576: {
395              slidesPerView: 1,
396          },
397          768: {
398              slidesPerView: 2,
399          },
400          992: {
401              slidesPerView: 3,
402          },
403          1200: {
404              slidesPerView: 4,
405          },
406      },
407  });
408
409  /*---------------------------------------
410  // rt-post-slider-style-4
411  ----------------------------------------*/
412  const rtPostSliderStyle4 = new Swiper(".rt-post-slider-style-4", {
413      slidesPerView: 5,
414      spaceBetween: 24,
415      loop: true,
416      slideToClickedSlide: true,
417      autoplay: {
418          delay: 4000,
419      },
420      navigation: {
421          nextEl: ".btn-next",
422          prevEl: ".btn-prev",
423      },
424      speed: 800,
425      breakpoints: {
426          0: {
427              slidesPerView: 1,
428          },
429          576: {
430              slidesPerView: 2,
431          },
432          768: {
433              slidesPerView: 2,
434          },
435          992: {
436              slidesPerView: 3,
437          },
438          1200: {
439              slidesPerView: 4,
440          },
441          1600: {
442              slidesPerView: 5,
443          },
444      },
445  });
446
447  /*---------------------------------------
448  // rt-post-slider-style-5
449  ----------------------------------------*/
450  const rtPostSliderStyle5 = new Swiper(".rt-post-slider-style-5", {
451      slidesPerView: 3,
452      spaceBetween: 24,
453      loop: true,
454      slideToClickedSlide: true,
455      autoplay: {
456          delay: 4000,
457      },
458      navigation: {
459          nextEl: ".btn-next",
460          prevEl: ".btn-prev",
461      },
462      speed: 800,
463      breakpoints: {
464          0: {
465              slidesPerView: 1,
466          },
467          576: {
468              slidesPerView: 2,
469          },
470          768: {
471              slidesPerView: 2,
472          },
473          992: {
474              slidesPerView: 3,
475          },
476      },
477  });
478
479  /*---------------------------------------
480  // rt-post-slider-style-6
481  -----------------------------------------*/
482  const rtPostSliderStyle6 = new Swiper(".rt-post-slider-style-6", {
483      slidesPerView: 4,
484      loop: true,
485      spaceBetween: 0,
486      slideToClickedSlide: true,
487      autoplay: {
488          delay: 5000,
489      },
490      speed: 800,
491      breakpoints: {
492          0: {
493              slidesPerView: 1,
494          },
495          576: {
496              slidesPerView: 1,
497          },
498          768: {
499              slidesPerView: 2,
500          },
501          992: {
502              slidesPerView: 3,
503          },
504          1200: {
505              slidesPerView: 3,
506          },
507          1400: {
508              slidesPerView: 3,
509          },
510          1600: {
511              slidesPerView: 4,
512          },
513      },
514  });
515
516  /*--------------------------------------
517  //	rt-post-slider-style-7
518  --------------------------------------*/
519  const rtPostSliderStyle7 = new Swiper(".rt-post-slider-style-7", {
520      slidesPerView: 1,
521      loop: true,
522      slideToClickedSlide: true,
523      autoplay: {
524          delay: 5000,
525      },
526      speed: 800,
527      pagination: {
528          el: ".swiper-pagination",
529          clickable: true,
530      },
531  });
532
533  // rt-post-slider-style-6
534  const yodaTopSliderStyle = new Swiper(".top-slider-style", {
535      slidesPerView: 1,
536      loop: true,
537      spaceBetween: 0,
538      slideToClickedSlide: true,
539      autoplay: {
540          delay: 5000,
541      },
542      navigation: {
543          nextEl: ".btn-next",
544          prevEl: ".btn-prev",
545      },
546      speed: 800,
547      breakpoints: {
548          0: {
549              slidesPerView: 1,
550          },
551          576: {
552              slidesPerView: 1,
553          },
554          768: {
555              slidesPerView: 1,
556          },
557          992: {
558              slidesPerView: 1,
559          },
560          1200: {
561              slidesPerView: 1,
562          },
563          1400: {
564              slidesPerView: 1,
565          },
566          1600: {
567              slidesPerView: 1,
568          },
569      },
570      on: {
571          init: function() {
572              //console.log('yodaTopSliderStyle init');
573          },
574          afterInit: function() {
575              console.log('yodaTopSliderStyle afterInit');
576              resizeDesktopLandingHeader();
577          },
578      },
579  });
580/*
581  // Set 16:9 aspect ratio
582function setHomeSwiperAspectRatio() {
583    const swiperContainer = document.querySelector('.top-slider-style');
584    const width = swiperContainer.offsetWidth;
585    const height = width * 9 / 16;
586    swiperContainer.style.height = height + 'px';
587  }
588  
589  // Set initial aspect ratio
590  setHomeSwiperAspectRatio();
591  
592  // Update on window resize
593  window.addEventListener('resize', setHomeSwiperAspectRatio);
594*/
595  function resizeDesktopLandingHeader() {
596      if (!isMobile) {
597        /*
598          var topColumnNewsHeight = $('#top-news-section .top-mainnews-column').height();
599          var topColumnRecomendationsHeight = $('#top-news-section .top-recomandari-column').height();
600          var topSwiperHeight = $('#top-news-section .top-mainnews-column .swiper-container').height();
601          var topSwiperRestHeight = parseInt(topColumnRecomendationsHeight - topSwiperHeight);
602          var topColumnNewsTitleHeight = $('#top-news-section .top-mainnews-column .topNewsTitleRow').height();
603          var topSwiperNewHeight = parseInt(topSwiperHeight + topSwiperRestHeight - topColumnNewsTitleHeight);
604
605          //console.log('Inaltime recomandata: ', topColumnRecomendationsHeight);
606          //console.log('Inaltime slider: ', topSwiperHeight);
607          //console.log('Inaltime slider recalculata: ', topSwiperNewHeight);
608
609          if (topColumnRecomendationsHeight > topSwiperHeight) {
610              $('#top-news-section .top-mainnews-column .swiper-container').css('height', topSwiperNewHeight);
611
612              $('#top-news-section .top-mainnews-column .swiper-container .swiper-slide').css('height', topSwiperNewHeight);
613
614              $('#top-news-section .top-mainnews-column .swiper-container .swiper-slide .slide-item').css('height', topSwiperNewHeight);
615          }
616        */
617
618          var topColumnNewsHeight = $('#top-news-section .top-mainnews-column').height();
619          var topColumnRecomendationsHeight = $('#top-news-section .top-recomandari-column').height();
620          var topSwiperHeight = $('#top-news-section .top-mainnews-column .swiper-container').height();
621          var topSwiperRestHeight = parseInt(topColumnRecomendationsHeight - topSwiperHeight);
622          var topColumnNewsTitleHeight = $('#top-news-section .top-mainnews-column .topNewsTitleRow').height();
623          var topSwiperNewHeight = parseInt(topSwiperHeight + topSwiperRestHeight - topColumnNewsTitleHeight);
624        
625          if (topColumnRecomendationsHeight > topSwiperHeight) {
626            // Adjust the container heights
627            $('#top-news-section .top-mainnews-column .swiper-container').css('height', topSwiperNewHeight);
628            $('#top-news-section .top-mainnews-column .swiper-container .swiper-slide').css('height', topSwiperNewHeight);
629            $('#top-news-section .top-mainnews-column .swiper-container .swiper-slide .slide-item').css('height', topSwiperNewHeight);
630            
631            // Calculate 16:9 image height based on available slide width
632            var slideWidth = $('#top-news-section .top-mainnews-column .swiper-container .swiper-slide').width();
633            var imageHeight = Math.round(slideWidth * (9/16));
634            
635            // Set consistent heights for all images while preserving 16:9 ratio
636            $('.post-img').css('height', 'auto');  // Reset height first
637            $('.post-img > a > div').css('padding-top', '56.25%');  // Maintain 16:9 aspect ratio
638          }
639
640          // $("#top-news-section").LoadingOverlay("hide", true);
641      }
642  }
643
644
645  const yodaMobileTvNetworksSwiper = new Swiper(".mobile-tvnetwork-swiper", {
646      slidesPerView: 1,
647      loop: false,
648      slideToClickedSlide: true,
649      autoplay: {
650          delay: 5000,
651      },
652      speed: 800,
653  });
654
655  /*-----------------------------------
656  // counter up
657  ----------------------------------*/
658  let counter = true;
659  $(".counter-appear").appear();
660  $(".counter-appear").on("appear", function() {
661      if (counter) {
662          // with skill bar
663          $(".skill-per").each(function() {
664              const $this = $(this);
665              const per = $this.attr("data-per");
666              $this.css("width", per + "%");
667              $({
668                  animatedValue: 0
669              }).animate({
670                  animatedValue: per
671              }, {
672                  duration: 1000,
673                  step: function() {
674                      $this.attr("data-per", Math.floor(this.animatedValue) + "%");
675                  },
676                  complete: function() {
677                      $this.attr("data-per", Math.floor(this.animatedValue) + "%");
678                  },
679              });
680          });
681          counter = false;
682      }
683  });
684
685  /*-------------------------------------
686  //Contact Form initiating
687  -------------------------------------*/
688  const contactForm = $(".rt-contact-form");
689  if (contactForm.length) {
690      contactForm.each(function() {
691          const innerContactForm = $(this);
692          innerContactForm.validator().on("submit", function(e) {
693              const $this = $(this),
694                  $target = innerContactForm.find(".form-response");
695              if (e.isDefaultPrevented()) {
696                  $target.html(
697                      "<div class='alert alert-danger'><p>Please select all required field.</p></div>"
698                  );
699              } else {
700                  $.ajax({
701                      url: "php/mailer.php",
702                      type: "POST",
703                      data: innerContactForm.serialize(),
704                      beforeSend: function() {
705                          $target.html(
706                              "<div class='alert alert-info'><p>Loading ...</p></div>"
707                          );
708                      },
709                      success: function(response) {
710                          if (response === "success") {
711                              $this[0].reset();
712                              $target.html(
713                                  "<div class='alert alert-success'><p>Message has been sent successfully.</p></div>"
714                              );
715                          } else {
716                              res = JSON.parse(response);
717                              if (res.message.length) {
718                                  const messages = null;
719                                  res.message.forEach(function(message) {
720                                      messages += "<p>" + message + "</p>";
721                                  });
722                                  $target.html(
723                                      "<div class='alert alert-success'><p>" +
724                                      messages +
725                                      "</p></div>"
726                                  );
727                              }
728                          }
729                      },
730                      error: function() {
731                          $target.html(
732                              "<div class='alert alert-success'><p>Error !!!</p></div>"
733                          );
734                      },
735                  });
736                  return false;
737              }
738          });
739      });
740  }
741
742  /*-------------------------------------
743     Input Quantity Up & Down activation code
744     -------------------------------------*/
745  $("#quantity-holder,#quantity-holder2")
746      .on("click", ".quantity-plus", function() {
747          const $holder = $(this).parents(".quantity-holder");
748          const $target = $holder.find("input.quantity-input");
749          let $quantity = parseInt($target.val(), 10) | 0;
750          if ($.isNumeric($quantity)) {
751              $quantity = $quantity + 1;
752              $target.val($quantity);
753          } else {
754              $target.val($quantity);
755          }
756      })
757      .on("click", ".quantity-minus", function() {
758          const $holder = $(this).parents(".quantity-holder");
759          const $target = $holder.find("input.quantity-input");
760          let $quantity = parseInt($target.val(), 10) | 0;
761          if ($.isNumeric($quantity) && $quantity >= 2) {
762              $quantity = $quantity - 1;
763              $target.val($quantity);
764          } else {
765              $target.val(1);
766          }
767      });
768
769  /*================================== start Utilities ========================================*/
770  /*
771  window.onload = function () {
772    // Dark
773    const toggleSwitch = document.querySelector(
774      '.theme-switch-box__input'
775    );
776    const currentTheme = localStorage.getItem("theme");
777    if (currentTheme) {
778      document.documentElement.setAttribute("data-theme", currentTheme);
779      if (currentTheme === "dark") {
780        toggleSwitch.checked = true;
781      }
782    }
783    function switchTheme(e) {
784      if (e.target.checked) {
785        document.documentElement.setAttribute("data-theme", "dark");
786        localStorage.setItem("theme", "dark");
787      } else {
788        document.documentElement.setAttribute("data-theme", "light");
789        localStorage.setItem("theme", "light");
790      }
791    }
792    if (toggleSwitch) {
793      toggleSwitch.addEventListener("change", switchTheme, false);
794    }
795  };
796  */
797
798  /*----------------------------------
799  //TweenMax Mouse Effect
800  -----------------------------------*/
801  $(".motion-effects-wrap").mousemove(function(e) {
802      parallaxIt(e, ".motion-effects1", -100);
803      parallaxIt(e, ".motion-effects2", -200);
804      parallaxIt(e, ".motion-effects3", 100);
805      parallaxIt(e, ".motion-effects4", 200);
806      parallaxIt(e, ".motion-effects5", -50);
807      parallaxIt(e, ".motion-effects6", 50);
808  });
809
810  function parallaxIt(e, target_class, movement) {
811      const $wrap = $(e.target).parents(".motion-effects-wrap");
812      if (!$wrap.length) return;
813      const $target = $wrap.find(target_class);
814      const relX = e.pageX - $wrap.offset().left;
815      const relY = e.pageY - $wrap.offset().top;
816      TweenMax.to($target, 1, {
817          x: ((relX - $wrap.width() / 2) / $wrap.width()) * movement,
818          y: ((relY - $wrap.height() / 2) / $wrap.height()) * movement,
819      });
820  }
821
822  /*-------------------------------------
823    Theia Side Bar
824    -------------------------------------*/
825  if (typeof $.fn.theiaStickySidebar !== "undefined") {
826      $(".sticky-coloum-wrap .sticky-coloum-item").theiaStickySidebar({
827          additionalMarginTop: 130,
828      });
829  }
830  /*-------------------------------------
831  // Read more button
832  ------------------------------------*/
833  $(".rt-read-more").hover(
834      function() {
835          $(this).removeClass("rt-button-animation-out");
836      },
837      function() {
838          $(this).addClass("rt-button-animation-out");
839      }
840  );
841
842  /*------------------------------
843   // Tooltip
844   ------------------------------*/
845  $(function() {
846      $('[data-bs-toggle="tooltip"]').tooltip({
847          offset: [0, 5],
848      });
849  });
850
851  /*------------------------------------
852  //  Offcanvas Menu activation code
853  -----------------------------------*/
854  $("#wrapper").on("click", ".offcanvas-menu-btn", function(e) {
855      e.preventDefault();
856      const $this = $(this),
857          wrapper = $(this).parents("body").find(">#wrapper"),
858          wrapMask = $("<div />").addClass("offcanvas-mask"),
859          offCancas = $("#offcanvas-wrap"),
860          position = offCancas.data("position") || "left";
861
862      if ($this.hasClass("menu-status-open")) {
863          wrapper.addClass("open").append(wrapMask);
864          $this.removeClass("menu-status-open").addClass("menu-status-close");
865          offCancas.css({
866              transform: "translateX(0)",
867          });
868      } else {
869          removeOffcanvas();
870      }
871
872      function removeOffcanvas() {
873          wrapper.removeClass("open").find("> .offcanvas-mask").remove();
874          $this.removeClass("menu-status-close").addClass("menu-status-open");
875          if (position === "left") {
876              offCancas.css({
877                  transform: "translateX(-105%)",
878              });
879          } else {
880              offCancas.css({
881                  transform: "translateX(105%)",
882              });
883          }
884      }
885      $(".offcanvas-mask, .offcanvas-close").on("click", function() {
886          removeOffcanvas();
887      });
888
889      return false;
890  });
891
892  /*-------------------------------------
893  //	Offcanvas cart  activation code
894  -------------------------------------*/
895  $("#wrapper").on("click", ".cart-menu-btn", function(e) {
896      e.preventDefault();
897      const $this = $(this),
898          wrapper = $(this).parents("body").find(">#wrapper"),
899          wrapMask = $("<div />").addClass("offcanvas-mask"),
900          offCancas = $("#cart-wrap"),
901          position = offCancas.data("position") || "left";
902
903      if ($this.hasClass("menu-open-btn")) {
904          wrapper.addClass("open-cart").append(wrapMask);
905          offCancas.css({
906              transform: "translateX(0)",
907          });
908      } else {
909          removeOffcanvas();
910      }
911
912      function removeOffcanvas() {
913          wrapper.removeClass("open-cart").find("> .offcanvas-mask").remove();
914          if (position === "left") {
915              offCancas.css({
916                  transform: "translateX(-105%)",
917              });
918          } else {
919              offCancas.css({
920                  transform: "translateX(105%)",
921              });
922          }
923      }
924      $(".offcanvas-mask, .offcanvas-close").on("click", function() {
925          removeOffcanvas();
926      });
927
928      return false;
929  });
930
931  /*-----------------------------------
932  //	Jquery Serch Box
933  -----------------------------------*/
934  $('a[href="#template-search"]').on("click", function(event) {
935      event.preventDefault();
936      const target = $("#template-search");
937      target.addClass("open");
938      setTimeout(function() {
939          target.find("input").focus();
940      }, 600);
941      return false;
942  });
943
944  $("#template-search, #template-search button.close").on(
945      "click keyup",
946      function(event) {
947          if (
948              event.target === this ||
949              event.target.className === "close" ||
950              event.keyCode === 27
951          ) {
952              $(this).removeClass("open");
953          }
954      }
955  );
956
957  /*-------------------------------
958   //  WOW
959  -------------------------------*/
960  const wow = new WOW({
961      boxClass: "wow",
962      animateClass: "animated",
963      offset: 0,
964      mobile: false,
965      live: true,
966      scrollContainer: null,
967  });
968  wow.init();
969
970  /*-------------------------------
971   //  Back to Top
972  -------------------------------*/
973  const backToTop = document.getElementById("back-to-top");
974  window.onscroll = function() {
975      scrollFunction();
976  };
977
978  function scrollFunction() {
979      if (backToTop !== null) {
980          if (
981              document.body.scrollTop > 80 ||
982              document.documentElement.scrollTop > 80
983          ) {
984              backToTop.style.display = "block";
985          } else {
986              backToTop.style.display = "none";
987          }
988      }
989  }
990  if (backToTop !== null) {
991      backToTop.addEventListener("click", (e) => {
992          e.preventDefault();
993          document.body.scrollTop = 0; // For Safari
994          document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
995      });
996  }
997
998  /*-------------------------------------
999    Window Load and Resize
1000    -------------------------------------*/
1001  $(window).on("load", function() {
1002      // Modal
1003      if ($(window).width() > 992) {
1004          $("#rtModal").modal("show");
1005      }
1006
1007      // Page Preloader
1008      /*
1009      const preloader = $("#preloader");
1010      preloader &&
1011        $("#preloader").fadeOut("slow", function () {
1012          $(this).remove();
1013        });
1014      */
1015
1016      // video pop up
1017      const videoPopUp = $(".play-btn");
1018      if (videoPopUp.length) {
1019          videoPopUp.magnificPopup({
1020              type: "iframe",
1021              iframe: {
1022                  markup: '<div class="mfp-iframe-scaler">' +
1023                      '<div class="mfp-close"></div>' +
1024                      '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +
1025                      "</div>",
1026                  patterns: {
1027                      youtube: {
1028                          index: "youtube.com/",
1029                          id: "v=",
1030                          src: "https://www.youtube.com/embed/%id%?autoplay=1",
1031                      },
1032                      vimeo: {
1033                          index: "vimeo.com/",
1034                          id: "/",
1035                          src: "//player.vimeo.com/video/%id%?autoplay=1",
1036                      },
1037                      gmaps: {
1038                          index: "//maps.google.",
1039                          src: "%id%&output=embed",
1040                      },
1041                      rapoarte: {
1042                        index: "//tvrm-s3.fra1.cdn.digitaloceanspaces.com/rapoarte/",
1043                        id: function(url) {        
1044                            var m = url.match(/^.+digitaloceanspaces.com\/rapoarte\/(.+
1044)$/);
1045                            if (m !== null) {
1046                                return m[1];
1047                            }
1048                            return null;
1049                        },
1050                        src: 'https://docs.google.com/viewer?url=https://tvrm-s3.fra1.cdn.digitaloceanspaces.com/rapoarte/%id%?v='+Math.floor(Date.now() % 1000)+'&embedded=true',
1051                      },
1052                  },
1053                  srcAction: "iframe_src",
1054              },
1055          });
1056      }
1057  });
1058
1059  $(window).on("load resize", function() {
1060      // Masonry
1061      $(".masonry-items").masonry({
1062          itemSelector: ".masonry-item",
1063          columnWidth: ".masonry-item",
1064      });
1065  });
1066
1067  /*-------------------------------------
1068    Article Read Count
1069  -------------------------------------*/
1070  window.readCount = function readCount(id)
1071  {
1072    var articleId = null;
1073    articleId = id;
1074
1075    $.ajax({
1076      url: $baseUrl+'article/count/'+articleId,
1077      dataType: 'json',
1078      type: 'post',
1079      contentType: 'application/json',
1080      data: JSON.stringify( {} ),
1081      processData: false,
1082      success: function( data, textStatus, jQxhr ){
1083        // console.log(data);
1084        $('#articleReadCounter').text(data.readCounter);
1085      },
1086      error: function( jqXhr, textStatus, errorThrown ){
1087          console.log( errorThrown );
1088      }
1089    });
1090  }
1091
1092  $.fn.iframeResponsify = function() {
1093    if (this.length > 0) {
1094      this.each(function(){
1095        var width = $(this).width();
1096        var height = $(this).height();
1097
1098        var defaultRatio = 'ratio-1x1';
1099        if (width > height) {
1100          defaultRatio = 'ratio-16x9';
1101        } else if (width < height) {
1102          defaultRatio = 'ratio-9x16';
1103        } else {
1104          defaultRatio = 'ratio-1x1';
1105        }
1106
1107        $(this).wrap('<div class="ratio '+defaultRatio+' mb-3"></div>');
1108      });
1109    }
1110  };
1111
1112  $(document).ready(function() {
1113    yodaLog('app.js -> document ready!', 'info');
1114    $('[data-vbg]').youtube_background();
1115  });
1116
1117  /*-----------------------------------
1118   // Section background image 
1119  ----------------------------------*/
1120  imageFunction();
1121
1122  function imageFunction() {
1123      $("[data-bg-image]").each(function() {
1124          const img = $(this).data("bg-image");
1125          $(this).css({
1126              backgroundImage: "url(" + img + ")",
1127          });
1128      });
1129  }
1130  /*================================== end Utilities ========================================*/
1131
1132  /*--------------------------------
1133   // Date
1134   -------------------------------*/
1135  const currentYear = document.querySelectorAll(".currentYear");
1136  if (currentYear.length > 0) {
1137      const date = new Date();
1138      const currYear = date.getFullYear();
1139      currentYear.forEach((ele) => {
1140          ele.innerText = currYear;
1141      });
1142  }
1143
1144  const currentDate = document.querySelectorAll(".currentDate");
1145  if (currentDate.length > 0) {
1146      const date = new Date().toLocaleDateString("ro-RO", {
1147          weekday: "long",
1148          year: "numeric",
1149          month: "short",
1150          day: "numeric",
1151      });
1152      currentDate.forEach((ele) => {
1153          ele.innerText = date;
1154      });
1155  }
1156  
1157    var allCookies = Cookies.get();
1158    //console.log(allCookies);
1159
1160})(jQuery);

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.