{"version":3,"sources":["webpack://@verndale/toolkit/./src/js/modules/accordion.js"],"names":["Module","Accordion","trigger","content","height","el","x","y"],"mappings":"kJAEA,MAAMA,UAAeC,IAAU,CAI7B,SAASC,EAAS,CAChB,KAAK,iBAAiB,EACtB,MAAMC,EAAU,SAAS,eAAeD,EAAQ,aAAa,eAAe,CAAC,EAC7EA,EAAQ,aAAa,gBAAiB,EAAI,EAC1CC,EAAQ,MAAM,WAAa,UAC3B,MAAMC,EAASD,EAAQ,cAAc,0BAA0B,EAAE,aACjEA,EAAQ,MAAM,UAAY,GAAGC,MAC7BD,EAAQ,MAAM,WAAa,UAC3B,KAAK,KAAKA,CAAO,EACjB,WAAW,IAAM,CACb,KAAK,gBAAgB,CACzB,EAAG,KAAK,CACV,CAEA,MAAME,EAAI,CACRA,EAAG,MAAM,OAAS,GAAGA,EAAG,iBACxBA,EAAG,MAAM,OAAS,EAClBA,EAAG,MAAM,UAAY,CACvB,CAEA,kBAAkB,CAChB,MAAMC,EAAI,OAAO,QACXC,EAAI,OAAO,QACjB,OAAO,SAAS,IAAI,OAAO,SAASD,EAAGC,CAAC,CAC5C,CAEE,iBAAiB,CACf,OAAO,SAAS,IAAI,CAAC,CACzB,CAGA,CAEA,UAAeP,C","file":"scripts/489.454f7210.js","sourcesContent":["import { Accordion } from '@verndale/front-end-components';\n\nclass Module extends Accordion {\n\n\n\n openItem(trigger) {\n this.disableScrolling();\n const content = document.getElementById(trigger.getAttribute('aria-controls'));\n trigger.setAttribute('aria-expanded', true);\n content.style.visibility = 'visible';\n const height = content.querySelector('.accordion__item-content').offsetHeight;\n content.style.maxHeight = `${height}px`;\n content.style.visibility = 'visible';\n this.open(content);\n setTimeout(() => {\n this.enableScrolling();\n }, \"150\")\n }\n\n close(el) {\n el.style.height = `${el.scrollHeight}px`;\n el.style.height = 0;\n el.style.maxHeight = 0;\n }\n \n disableScrolling(){\n const x = window.scrollX;\n const y = window.scrollY;\n window.onscroll=()=>window.scrollTo(x, y);;\n}\n\n enableScrolling(){\n window.onscroll=()=>{};\n}\n\n\n}\n\nexport default Module;\n"],"sourceRoot":""}