{"version":3,"file":"projects-IPM7Qv5F.js","sources":["../../../_frontend/entrypoints/js/projects.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 projectsSlider = document.querySelector(\".projects-slider\");\n if (!projectsSlider) {\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(\".projects-slider\", {\n loop: true,\n slidesPerView: 1,\n spaceBetween: \"17%\",\n navigation: {\n nextEl: \".swiper-button-next\",\n prevEl: \".swiper-button-prev\",\n },\n breakpoints: {\n 768: {\n loop: false,\n slidesPerView: 4,\n spaceBetween: \"17%\",\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,CADmB,SAAS,cAAc,kBAAkB,EAE9D,QA6BmB,UAAY,CACpB,IAAIC,EAAO,mBAAoB,CACxC,KAAM,GACN,cAAe,EACf,aAAc,MACd,WAAY,CACV,OAAQ,sBACR,OAAQ,qBACT,EACD,YAAa,CACX,IAAK,CACH,KAAM,GACN,cAAe,EACf,aAAc,KACf,CACF,CACP,CAAK,CACL,IASA,GAAI"}