{"version":3,"file":"responsibilities-axoH0Vjz.js","sources":["../../../_frontend/entrypoints/js/responsibilities.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 resHeaderSlider = document.querySelector(\".responsibility-header\");\n const resTableSlider = document.querySelector(\".responsibility-table\");\n if (!resHeaderSlider || !resTableSlider) {\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 let mySwiper2;\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n const breakpointChecker = function () {\n // if larger viewport and multi-row layout needed\n if (breakpoint.matches === true) {\n // clean up old instances and inline styles when available\n if (mySwiper !== undefined) mySwiper.destroy(true, true);\n if (mySwiper2 !== undefined) mySwiper2.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 // fire small viewport version of swiper\n return enableSwiper();\n }\n };\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n const enableSwiper = function () {\n mySwiper = new Swiper(\".responsibility-header\", {\n loop: true,\n slidesPerView: 1,\n spaceBetween: \"30%\",\n navigation: {\n nextEl: \".swiper-button-next\",\n prevEl: \".swiper-button-prev\",\n },\n });\n mySwiper2 = new Swiper(\".responsibility-table\", {\n loop: true,\n slidesPerView: 1,\n spaceBetween: \"30%\",\n controller: {\n control: mySwiper,\n },\n });\n mySwiper.controller.control = mySwiper2;\n };\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n //////////////////////////////////////////////////////////////////\n // keep an eye on viewport size changes\n breakpoint.addEventListener(\"change\", breakpointChecker);\n // kickstart\n breakpointChecker();\n})();\n"],"names":["SwiperCore","Navigation","Controller","Autoplay","resHeaderSlider","resTableSlider","breakpoint","mySwiper","mySwiper2","breakpointChecker","enableSwiper","Swiper"],"mappings":"gEAGAA,EAAW,IAAI,CAACC,EAAYC,EAAYC,CAAQ,CAAC,GAEhD,UAAY,CACX,MAAMC,EAAkB,SAAS,cAAc,wBAAwB,EACjEC,EAAiB,SAAS,cAAc,uBAAuB,EACrE,GAAI,CAACD,GAAmB,CAACC,EACvB,OAKF,MAAMC,EAAa,OAAO,WAAW,mBAAmB,EAExD,IAAIC,EACAC,EAIJ,MAAMC,EAAoB,UAAY,CAEpC,GAAIH,EAAW,UAAY,GAAM,CAE3BC,IAAa,QAAWA,EAAS,QAAQ,GAAM,EAAI,EACnDC,IAAc,QAAWA,EAAU,QAAQ,GAAM,EAAI,EAEzD,MAEN,SAAeF,EAAW,UAAY,GAEhC,OAAOI,EAAY,CAEzB,EAIQA,EAAe,UAAY,CAC/BH,EAAW,IAAII,EAAO,yBAA0B,CAC9C,KAAM,GACN,cAAe,EACf,aAAc,MACd,WAAY,CACV,OAAQ,sBACR,OAAQ,qBACT,CACP,CAAK,EACDH,EAAY,IAAIG,EAAO,wBAAyB,CAC9C,KAAM,GACN,cAAe,EACf,aAAc,MACd,WAAY,CACV,QAASJ,CACV,CACP,CAAK,EACDA,EAAS,WAAW,QAAUC,CAClC,EAKEF,EAAW,iBAAiB,SAAUG,CAAiB,EAEvDA,GACF,GAAI"}