{"version":3,"file":"../carousel.js","names":["carousel","name","autoplay","interval","centerMode","document","querySelectorAll","forEach","standardCarousel","Splide","pagination","arrows","pauseOnHover","mediaQuery","gap","focus","autoWidth","type","flickMaxPages","flickPower","breakpoints","perPage","mount","slideArrows","querySelector","slice","ariaControlsId","id","setAttribute","addEventListener","e","contains","target","go"],"sources":["carousel.js"],"sourcesContent":["function carousel(name, autoplay, interval, centerMode) {\r\n document.querySelectorAll(name).forEach((carousel) => {\r\n var focusValue = centerMode ? 'center' : 0;\r\n\r\n var standardCarousel = new Splide(carousel, {\r\n pagination: true,\r\n arrows: false,\r\n autoplay: autoplay,\r\n interval: interval,\r\n pauseOnHover: true,\r\n mediaQuery: 'min',\r\n gap: '32px',\r\n focus: focusValue,\r\n autoWidth: true,\r\n type: 'loop',\r\n flickMaxPages: 1,\r\n flickPower: 400,\r\n breakpoints: {\r\n 0: {\r\n perPage: 1\r\n },\r\n 481: {\r\n perPage: 2,\r\n }\r\n }\r\n });\r\n\r\n standardCarousel.mount()\r\n\r\n var slideArrows = document.querySelector(`.splide__arrows[data-slider=\"${name.slice(1)}\"]`);\r\n if (slideArrows) {\r\n\r\n // update aria-controls\r\n var ariaControlsId = document.querySelector(name).querySelector('.splide__track').id;\r\n slideArrows.querySelector('.splide__arrow--prev').setAttribute('aria-controls', ariaControlsId);\r\n slideArrows.querySelector('.splide__arrow--next').setAttribute('aria-controls', ariaControlsId);\r\n\r\n slideArrows.addEventListener('click', function (e) {\r\n if (slideArrows.querySelector('.splide__arrow--prev').contains(e.target)) {\r\n standardCarousel.go('<');\r\n }\r\n\r\n if (slideArrows.querySelector('.splide__arrow--next').contains(e.target)) {\r\n standardCarousel.go('>');\r\n };\r\n });\r\n }\r\n });\r\n\r\n}"],"mappings":"AAAA,SAASA,SAASC,EAAMC,EAAUC,EAAUC,GACxCC,SAASC,iBAAiBL,GAAMM,SAASP,IACrC,IAEIQ,EAAmB,IAAIC,OAAOT,EAAU,CACxCU,YAAY,EACZC,QAAQ,EACRT,SAAUA,EACVC,SAAUA,EACVS,cAAc,EACdC,WAAY,MACZC,IAAK,OACLC,MAVaX,EAAa,SAAW,EAWrCY,WAAW,EACXC,KAAM,OACNC,cAAe,EACfC,WAAY,IACZC,YAAa,CACT,EAAG,CACCC,QAAS,GAEb,IAAK,CACDA,QAAS,MAKrBb,EAAiBc,QAEjB,IAAIC,EAAclB,SAASmB,cAAc,gCAAgCvB,EAAKwB,MAAM,QACpF,GAAIF,EAAa,CAGb,IAAIG,EAAiBrB,SAASmB,cAAcvB,GAAMuB,cAAc,kBAAkBG,GAClFJ,EAAYC,cAAc,wBAAwBI,aAAa,gBAAiBF,GAChFH,EAAYC,cAAc,wBAAwBI,aAAa,gBAAiBF,GAEhFH,EAAYM,iBAAiB,SAAS,SAAUC,GACxCP,EAAYC,cAAc,wBAAwBO,SAASD,EAAEE,SAC7DxB,EAAiByB,GAAG,KAGpBV,EAAYC,cAAc,wBAAwBO,SAASD,EAAEE,SAC7DxB,EAAiByB,GAAG,IAE5B,GACJ,IAGR"}