{"version":3,"file":"scrollToController-6485958c.js","sources":["../../../../app/frontend/components/shared/controllers/scrollToController.js"],"sourcesContent":["import { isElementVisible } from \"../utilities\";\n(function () {\n document.querySelectorAll('[data-scroll-to-controller]').forEach(controller => {\n controller.querySelectorAll('[data-scroll-to-target]').forEach(el => {\n el.addEventListener('click', (e) => {\n e.preventDefault();\n const href = el.dataset.scrollToTarget;\n const scrollTarget = document.querySelector(href);\n if (isElementVisible(scrollTarget)) {\n scrollTarget.scrollIntoView({ behavior: 'smooth' });\n }\n });\n });\n });\n})();\n"],"names":["controller","el","e","href","scrollTarget","isElementVisible"],"mappings":"6CACC,UAAY,CACX,SAAS,iBAAiB,6BAA6B,EAAE,QAAQA,GAAc,CAC7EA,EAAW,iBAAiB,yBAAyB,EAAE,QAAQC,GAAM,CACnEA,EAAG,iBAAiB,QAAUC,GAAM,CAClCA,EAAE,eAAc,EAChB,MAAMC,EAAOF,EAAG,QAAQ,eAClBG,EAAe,SAAS,cAAcD,CAAI,EAC5CE,EAAiBD,CAAY,GAC/BA,EAAa,eAAe,CAAE,SAAU,QAAU,CAAA,CAE5D,CAAO,CACP,CAAK,CACL,CAAG,CACH,GAAI"}