{"version":3,"sources":["webpack://frontendplaceholder/./Src/Scripts/components/column-slider.js"],"names":["constructor","elm","args","container","parentNode","ignoreSlider","controls","querySelector","slidesPerViewMobile","eventSlider","options","loop","slidesPerView","spaceBetween","observer","observeParents","watchSlidesVisibility","watchOverflow","pagination","el","type","formatFractionCurrent","number","formatFractionTotal","navigation","nextEl","prevEl","scrollbar","draggable","snapOnRelease","breakpoints","slidesPerViewDesktop","on","beforeResize","e","classList","toggle","isLocked","init","initializeSwiper","then","Swiper","Navigation","Pagination","Scrollbar","use","this","swiper","enabledBreakpoint","throttleImport","onWindowResize","window","innerWidth","destroyed","destroy","throttledOnWindowResize","default","addEventListener","infoLinksElms","querySelectorAll","infoSlideInModalElm","closest","openInOverlay","SlideInModal","infoSlideInModal","forEach","le","sectionKey","getAttribute","open"],"mappings":"kNAAe,MACXA,YAAYC,EAAKC,GACb,MAAMC,EAAYF,EAAIG,WACtB,IAAKF,EAAKG,aAAc,CACpB,MAAMC,EAAWH,EAAUI,cAAc,4BACzC,IAAIC,EAAsBN,EAAKM,oBAAsBN,EAAKM,oBAAsB,IAChFA,EAAsBN,EAAKO,YAAc,IAAMD,EAE/C,MAAME,EAAU,CACZC,MAAM,EACNC,cAAeJ,EACfK,aAAc,GACdC,UAAU,EACVC,gBAAgB,EAChBC,uBAAuB,EACvBC,eAAe,EACfC,WAAY,CACRC,GAAIhB,EAAUI,cAAc,sBAC5Ba,KAAM,WACNC,sBAAuBC,IAAWA,EAAS,GAAK,IAAM,IAAMA,EAC5DC,oBAAqBD,IAAWA,EAAS,GAAK,IAAM,IAAMA,GAE9DE,WAAY,CACRC,OAAQtB,EAAUI,cAAc,uBAChCmB,OAAQvB,EAAUI,cAAc,wBAEpCoB,UAAW,CACPR,GAAIhB,EAAUI,cAAc,qBAC5BqB,WAAW,EACXC,eAAe,GAEnBC,YAAa,CACT,IAAK,CACDlB,cAAe,KAEnB,IAAK,CACDA,cAAe,EACfC,aAAc,IAElB,IAAK,CACDD,cAAe,EACfC,aAAc,IAElB,KAAM,CACFD,cAAeV,EAAK6B,qBAAuB7B,EAAK6B,qBAAuB,EACvElB,aAAc,KAGtBmB,GAAI,CACAC,aAAeC,IACX5B,EAAS6B,UAAUC,OAAO,kCAAmCF,EAAEG,WAEnEC,KAAOJ,IACH5B,EAAS6B,UAAUC,OAAO,kCAAmCF,EAAEG,aAKrEE,EAAmB,KACrB,+BAAiBC,MAAK,EAAGC,SAAQC,aAAYC,aAAYC,gBACrDH,EAAOI,IAAI,CAACH,EAAYC,EAAYC,IACpCE,KAAKC,OAAS,IAAIN,EAAOxC,EAAKS,OAIjCR,EAAK8C,kBAGN,mCAA0BR,MAAKS,IAC3B,MAAMC,EAAiB,KACfC,OAAOC,WAAalD,EAAK8C,kBACpBF,KAAKC,SAAUD,KAAKC,OAAOM,WAC5Bd,IAEGO,KAAKC,QACZD,KAAKC,OAAOO,WAGdC,EAA0BN,EAAeO,QAAQN,EAAgB,KACvEC,OAAOM,iBAAiB,SAAUF,GAClCL,OAdJX,IAmBR,MAAMmB,EAAgBvD,EAAUwD,iBAAiB,gCAC3CC,EAAsBzD,EAAUC,WAAWyD,QAAQ,+BAA+BtD,cAAc,0CAElGmD,GAAiBxD,EAAK4D,eACtB,+BAAuCtB,MAAK,EAAGgB,QAASO,MACpD,IAAIC,EACJN,EAAcO,SAAQC,IAClB,MAAMC,EAAaD,EAAGE,aAAa,8BACnCF,EAAGT,iBAAiB,SAAS,KACrBO,EACAA,EAAiBK,KAAKF,GACfP,IACPI,EAAmB,IAAID,EAAaH,GACpCI,EAAiBK,KAAKF","file":"4582.23868fbec1bcc974215b.js","sourcesContent":["export default class ColumnSlider {\n constructor(elm, args) {\n const container = elm.parentNode;\n if (!args.ignoreSlider) {\n const controls = container.querySelector('.column-slider__controls');\n let slidesPerViewMobile = args.slidesPerViewMobile ? args.slidesPerViewMobile : 1.5;\n slidesPerViewMobile = args.eventSlider ? 1.2 : slidesPerViewMobile;\n\n const options = {\n loop: false,\n slidesPerView: slidesPerViewMobile,\n spaceBetween: 15,\n observer: true,\n observeParents: true,\n watchSlidesVisibility: true,\n watchOverflow: true,\n pagination: {\n el: container.querySelector('.swiper-pagination'),\n type: 'fraction',\n formatFractionCurrent: number => (number < 10 ? '0' : '') + number,\n formatFractionTotal: number => (number < 10 ? '0' : '') + number,\n },\n navigation: {\n nextEl: container.querySelector('.swiper-button-next'),\n prevEl: container.querySelector('.swiper-button-prev'),\n },\n scrollbar: {\n el: container.querySelector('.swiper-scrollbar'),\n draggable: true,\n snapOnRelease: true,\n },\n breakpoints: {\n 500: {\n slidesPerView: 1.5,\n },\n 768: {\n slidesPerView: 2,\n spaceBetween: 20,\n },\n 992: {\n slidesPerView: 3,\n spaceBetween: 30,\n },\n 1837: {\n slidesPerView: args.slidesPerViewDesktop ? args.slidesPerViewDesktop : 4,\n spaceBetween: 30,\n },\n },\n on: {\n beforeResize: (e) => {\n controls.classList.toggle('column-slider__controls--locked', e.isLocked);\n },\n init: (e) => {\n controls.classList.toggle('column-slider__controls--locked', e.isLocked);\n },\n },\n };\n\n const initializeSwiper = () => {\n import('swiper').then(({ Swiper, Navigation, Pagination, Scrollbar }) => {\n Swiper.use([Navigation, Pagination, Scrollbar]);\n this.swiper = new Swiper(elm, options);\n });\n };\n\n if (!args.enabledBreakpoint) {\n initializeSwiper();\n } else {\n import('lodash/throttle').then(throttleImport => {\n const onWindowResize = () => {\n if (window.innerWidth < args.enabledBreakpoint) {\n if (!this.swiper || this.swiper.destroyed) {\n initializeSwiper();\n }\n } else if (this.swiper) {\n this.swiper.destroy();\n }\n };\n const throttledOnWindowResize = throttleImport.default(onWindowResize, 100);\n window.addEventListener('resize', throttledOnWindowResize);\n onWindowResize();\n });\n }\n }\n\n const infoLinksElms = container.querySelectorAll('[data-event-page__info-link]');\n const infoSlideInModalElm = container.parentNode.closest('.page-container, .container').querySelector('[data-event-page__info-slide-in-modal]');\n\n if (infoLinksElms && args.openInOverlay) {\n import('../components/slide-in-modal').then(({ default: SlideInModal }) => {\n let infoSlideInModal;\n infoLinksElms.forEach(le => {\n const sectionKey = le.getAttribute('data-event-page__info-link');\n le.addEventListener('click', () => {\n if (infoSlideInModal) {\n infoSlideInModal.open(sectionKey);\n } else if (infoSlideInModalElm) {\n infoSlideInModal = new SlideInModal(infoSlideInModalElm);\n infoSlideInModal.open(sectionKey);\n }\n });\n });\n });\n }\n }\n}\n"],"sourceRoot":""}