{"version":3,"file":"components/chunks/chunk-num-8.c243801518878055716a.js","mappings":"uFACAA,OAAOC,IAAIC,OAAOC,cAAcC,UAAS,WACvC,IAAIC,EAAcC,SAASC,cAAc,WACrCC,EAAkBH,EAAYI,YAUlC,SAASC,IACP,IAAIC,EAAoBL,SAASC,cAAc,cAC3CP,OAAOY,YAAcZ,OAAOa,aAAeP,SAASQ,KAAKC,aAAe,EAC1EV,EAAYW,UAAUC,IAAI,iBACjBN,GACTN,EAAYW,UAAUE,OAAO,cAE3BlB,OAAOY,YAAcZ,OAAOa,aAAeP,SAASQ,KAAKC,cAC3DV,EAAYW,UAAUC,IAAI,SAC1BZ,EAAYW,UAAUC,IAAI,cAC1BZ,EAAYI,YAAcD,EAC1BH,EAAYc,aAAa,WAAY,OAErCd,EAAYW,UAAUE,OAAO,SAC7Bb,EAAYI,YAAc,GAE9B,CACAC,IACAL,EAAYe,iBAAiB,SA3B7B,SAAqBC,GACnBA,EAAEC,iBACFjB,EAAYW,UAAUE,OAAO,iBAC7BlB,OAAOuB,SAAS,CACdC,IAAK,EACLC,KAAM,EACNC,SAAU,UAEd,IAoBA1B,OAAOoB,iBAAiB,SAAUV,EACpC,G","sources":["webpack://bernafon/./js/custom-to-top.js"],"sourcesContent":["/* eslint-disable linebreak-style */\nwindow.DGS.OnLoad.getInstance().register(function () {\n var goTopButton = document.querySelector('.cd-top');\n var buttonInnerText = goTopButton.textContent;\n function scrollToTop(e) {\n e.preventDefault();\n goTopButton.classList.remove('cd-is-visible');\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n }\n function displayButton() {\n var userIsScrollingUp = document.querySelector('.navIsOpen');\n if (window.innerHeight + window.pageYOffset >= document.body.scrollHeight / 2) {\n goTopButton.classList.add('cd-is-visible');\n } else if (userIsScrollingUp) {\n goTopButton.classList.remove('cd-fade-in');\n }\n if (window.innerHeight + window.pageYOffset >= document.body.scrollHeight) {\n goTopButton.classList.add('go-up');\n goTopButton.classList.add('cd-fade-in');\n goTopButton.textContent = buttonInnerText;\n goTopButton.setAttribute('tabindex', '0');\n } else {\n goTopButton.classList.remove('go-up');\n goTopButton.textContent = '';\n }\n }\n displayButton();\n goTopButton.addEventListener('click', scrollToTop);\n window.addEventListener('scroll', displayButton);\n});"],"names":["window","DGS","OnLoad","getInstance","register","goTopButton","document","querySelector","buttonInnerText","textContent","displayButton","userIsScrollingUp","innerHeight","pageYOffset","body","scrollHeight","classList","add","remove","setAttribute","addEventListener","e","preventDefault","scrollTo","top","left","behavior"],"sourceRoot":""}