{"version":3,"sources":["webpack:///./src/js/modules/scrollToContent.js"],"names":["Module","this","dom","el","scroll","window","URLSearchParams","document","location","search","get","targetTopPosition","getBoundingClientRect","top","pageYOffset","scrollTo","behavior","Component"],"mappings":"0oBAEMA,E,ieAEFC,KAAKC,IAAM,CACTC,GAAIF,KAAKE,IAGXF,KAAKG,W,+BAQL,GAA8B,OAJA,IAAIC,OAAOC,gBACvCC,SAASC,SAASC,QAClBC,IAAI,mBAEN,CAEA,IAAMC,EACJV,KAAKC,IAAIC,GAAGS,wBAAwBC,IAAMR,OAAOS,YAEnDT,OAAOU,SAAS,CACdF,IAAKF,EACLK,SAAU,gB,GAvBhB,MAEqBC,W,UA0BNjB","file":"70.2f82b81930895918724e.js","sourcesContent":["import { Component } from '@verndale/core';\n\nclass Module extends Component {\n setupDefaults() {\n this.dom = {\n el: this.el\n };\n\n this.scroll();\n }\n\n scroll() {\n const shouldScrollToContent = new window.URLSearchParams(\n document.location.search\n ).get('scrolltocontent');\n\n if (shouldScrollToContent === null) return;\n\n const targetTopPosition =\n this.dom.el.getBoundingClientRect().top + window.pageYOffset;\n\n window.scrollTo({\n top: targetTopPosition,\n behavior: 'smooth'\n });\n }\n}\n\nexport default Module;\n"],"sourceRoot":""}