document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".swiper").forEach((e=>{const t=e.closest(".cb-carousel-block");if(!t)return;const a=parseInt(t.getAttribute("data-cb-slides-per-view")),r=parseInt(t.getAttribute("data-cb-slides-per-group")),n=parseInt(t.getAttribute("data-cb-space-between")),i=parseInt(t.getAttribute("data-cb-speed")),b="true"===t.getAttribute("data-cb-navigation"),o="true"===t.getAttribute("data-cb-pagination"),s="true"===t.getAttribute("data-cb-loop"),c="true"===t.getAttribute("data-cb-autoplay")&&{delay:parseInt(t.getAttribute("data-cb-autoplay-speed")),disableOnInteraction:!1},u=JSON.parse(t.getAttribute("data-cb-breakpoints")||"{}");new Swiper(e,{slidesPerView:a,slidesPerGroup:r,spaceBetween:n,speed:i,loop:s,autoplay:c,navigation:!!b&&{nextEl:t.querySelector(".cb-button-next"),prevEl:t.querySelector(".cb-button-prev")},pagination:!!o&&{el:t.querySelector(".cb-pagination"),clickable:!0,renderBullet:function(e,t){return`<span class="${t} cb-pagination-bullet"></span>`}},breakpoints:u,resizeObserver:!1})}))}));