{"version":3,"file":"240.6fa859b1f571174d3a58.js","mappings":"oMA0CCA,EAAAA,QA1Cc,MACXC,WAAAA,CAAYC,GACRC,KAAKC,WAAY,EACjBD,KAAKE,cAAgB,EACrBF,KAAKG,MAAQ,EACbH,KAAKI,OAASL,EACdC,KAAKK,OAASL,KAAKI,OAAOE,aAE1BC,OAAOC,SAAW,KACdR,KAAKC,WAAY,CAAI,EAGzBQ,aAAY,KACJT,KAAKC,YACLD,KAAKU,cACLV,KAAKC,WAAY,EACrB,GACD,KAECU,SAASC,KAAKC,UAAUC,SAAS,sBACjCH,SAASC,KAAKC,UAAUE,IAAI,8BAC5BR,OAAOS,QAAQC,aAAa,KAAM,KAAMV,OAAOW,SAASC,WAG5DnB,KAAKI,OAAOgB,cAAc,wBAAwBC,iBAAiB,SAASC,IACxEA,EAAEC,iBACFZ,SAASC,KAAKC,UAAUE,IAAI,oBAC5BJ,SAASC,KAAKC,UAAUE,IAAI,6BAA6B,GAEjE,CAEAL,WAAAA,GACI,MAAMc,OAA6BC,IAAvBlB,OAAOmB,YAA6BnB,OAAOmB,aAAef,SAASgB,iBAAmBhB,SAASC,KAAKgB,YAAcjB,SAASC,MAAMiB,UAEzIC,KAAKC,IAAI/B,KAAKE,cAAgBsB,IAAOxB,KAAKG,QAE9CH,KAAKI,OAAOS,UAAUmB,OAAO,WAAYR,EAAKxB,KAAKK,QACnDL,KAAKI,OAAOS,UAAUmB,OAAO,WAAaR,EAAKxB,KAAKE,eAAiBsB,GACrExB,KAAKI,OAAOS,UAAUmB,OAAO,SAAWR,EAAKxB,KAAKE,eAAiBsB,GAEnExB,KAAKE,cAAgBsB,EACzB,E","sources":["webpack://frontendplaceholder/./Src/Scripts/components/top-navigation.js"],"sourcesContent":["export default class TopNavigation {\n constructor(elm) {\n this.didScroll = false;\n this.lastScrollTop = 0;\n this.delta = 5;\n this.header = elm;\n this.offset = this.header.offsetHeight;\n\n window.onscroll = () => {\n this.didScroll = true;\n };\n\n setInterval(() => {\n if (this.didScroll) {\n this.hasScrolled();\n this.didScroll = false;\n }\n }, 250);\n\n if (document.body.classList.contains('mobile-menu-open')) {\n document.body.classList.add('mobile-animate-menu-points');\n window.history.replaceState(null, null, window.location.pathname);\n }\n\n this.header.querySelector('.header__burger-menu').addEventListener('click', e => {\n e.preventDefault();\n document.body.classList.add('mobile-menu-open');\n document.body.classList.add('mobile-animate-menu-points');\n });\n }\n\n hasScrolled() {\n const st = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;\n\n if (Math.abs(this.lastScrollTop - st) <= this.delta) return;\n\n this.header.classList.toggle('scrolled', st > this.offset);\n this.header.classList.toggle('nav-down', (st > this.lastScrollTop && st));\n this.header.classList.toggle('nav-up', (st > this.lastScrollTop && st));\n\n this.lastScrollTop = st;\n }\n}\n"],"names":["exports","constructor","elm","this","didScroll","lastScrollTop","delta","header","offset","offsetHeight","window","onscroll","setInterval","hasScrolled","document","body","classList","contains","add","history","replaceState","location","pathname","querySelector","addEventListener","e","preventDefault","st","undefined","pageYOffset","documentElement","parentNode","scrollTop","Math","abs","toggle"],"sourceRoot":""}