{"version":3,"file":"years-c-8njCx1.js","sources":["../../../_frontend/entrypoints/js/years.js"],"sourcesContent":["import Swiper from \"swiper\";\nimport SwiperCore, { Navigation, Controller, Autoplay } from \"swiper/core\";\n\nSwiperCore.use([Navigation, Controller, Autoplay]);\n\n(function () {\n const yearsSlider = document.querySelector(\".year-cards\");\n if (!yearsSlider) {\n return;\n }\n\n // breakpoint where swiper will be destroyed\n // and switches to a dual-column layout\n // const breakpoint = window.matchMedia(\"(min-width:767px)\");\n // keep track of swiper instances to destroy later\n let mySwiper;\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n // const breakpointChecker = function () {\n // // if larger viewport and multi-row layout needed\n // if (breakpoint.matches === true) {\n // console.log(\"matches\", mySwiper);\n // // clean up old instances and inline styles when available\n // if (mySwiper !== undefined) mySwiper.destroy(true, true);\n // // or/and do nothing\n // return;\n // // else if a small viewport and single column layout needed\n // } else if (breakpoint.matches === false) {\n // console.log(\"not matches\");\n // // fire small viewport version of swiper\n // return enableSwiper();\n // }\n // };\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n const enableSwiper = function () {\n mySwiper = new Swiper(\".year-cards\", {\n loop: true,\n slidesPerView: 1,\n spaceBetween: \"17%\",\n navigation: {\n nextEl: \".swiper-button-next-years\",\n prevEl: \".swiper-button-prev-years\",\n },\n breakpoints: {\n 768: {\n slidesPerView: 4,\n spaceBetween: 20,\n },\n },\n });\n };\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n // keep an eye on viewport size changes\n // breakpoint.addEventListener(\"change\", breakpointChecker);\n // kickstart\n // breakpointChecker();\n enableSwiper();\n})();\n"],"names":["SwiperCore","Navigation","Controller","Autoplay","Swiper"],"mappings":"gEAGAA,EAAW,IAAI,CAACC,EAAYC,EAAYC,CAAQ,CAAC,GAEhD,UAAY,CAEX,GAAI,CADgB,SAAS,cAAc,aAAa,EAEtD,QA6BmB,UAAY,CACpB,IAAIC,EAAO,cAAe,CACnC,KAAM,GACN,cAAe,EACf,aAAc,MACd,WAAY,CACV,OAAQ,4BACR,OAAQ,2BACT,EACD,YAAa,CACX,IAAK,CACH,cAAe,EACf,aAAc,EACf,CACF,CACP,CAAK,CACL,IASA,GAAI"}