"use strict";const GSscrollHorizontal=(t,o="right",l=500,e=2500,r=1200)=>{"rtl"==document.dir?"right"==o?t.scrollLeft>=0?t.scrollTo({top:0,left:-e,behavior:"smooth"}):t.scrollTo({top:0,left:t.scrollLeft+l,behavior:"smooth"}):Math.abs(t.scrollLeft)>=e-r-1?t.scrollTo({top:0,left:0,behavior:"smooth"}):t.scrollTo({top:0,left:t.scrollLeft-l,behavior:"smooth"}):"right"==o?t.scrollLeft>=e-r-1?t.scrollTo({top:0,left:0,behavior:"smooth"}):t.scrollTo({top:0,left:t.scrollLeft+l,behavior:"smooth"}):t.scrollLeft<=0?t.scrollTo({top:0,left:e,behavior:"smooth"}):t.scrollTo({top:0,left:t.scrollLeft-l,behavior:"smooth"})};var gsscrollcarousel=document.getElementsByClassName("gspb_smartscroll_btns");for(let i=0;i<gsscrollcarousel.length;i++){let t=gsscrollcarousel[i],o="";o=t.previousSibling&&t.previousSibling.classList&&t.previousSibling.classList.contains("gspb_scrollcarousel")?t.previousSibling:t.closest(".gspb_scrollcarousel");let l=t.getAttribute("data-carouselWrapper"),e=l?o.querySelector("."+l):o,r=JSON.parse(t.getAttribute("data-groupCells")),s="",c=JSON.parse(t.getAttribute("data-autoPlay")),a=parseInt(t.getAttribute("data-autoPlaySpeed"));c&&"false"!=c&&(s=a||4500);let n=JSON.parse(t.getAttribute("data-disableButtons"));if(e){let u=e.scrollWidth,f=e.firstChild,g=o.offsetWidth,b=r?g:f.offsetWidth;if(n||(t.querySelector(".gs-prev-next-button.next").onclick=function(){GSscrollHorizontal(e,"right",b,u,g)},t.querySelector(".gs-prev-next-button.previous").onclick=function(){GSscrollHorizontal(e,"left",b,u,g)}),s){let h=setInterval(()=>GSscrollHorizontal(e,"right",b,u,g),s);e.addEventListener("mouseenter",function(t){clearInterval(h)},!1),e.addEventListener("mouseleave",function(t){h=setInterval(()=>GSscrollHorizontal(e,"right",b,u,g),s)},!1)}let p=e.closest(".gs-scrollbtn-wrapper");if(p){let v=p.querySelector(".gs-scrollbtn-prev"),$=p.querySelector(".gs-scrollbtn-next");v&&(v.onclick=function(){GSscrollHorizontal(e,"left",b,u,g)}),$&&($.onclick=function(){GSscrollHorizontal(e,"right",b,u,g)})}}else t.remove()}