{"version":3,"file":"js/5651-5fc499acfe6d61baed3d.chunk.js","mappings":"wIAEAA,GAAE,KACA,MAAMC,EAAiBD,EAAE,kBAEnBE,GAAcC,EAAAA,EAAAA,KAAS,KACG,IAA1BH,EAAEI,QAAQC,YAIVJ,EAAeK,SAAS,WAAWL,EAAeM,SAAS,UAAUC,YAAY,UAAUC,QAAQ,CAAEC,QAAS,GAAK,CAAEC,OAAO,IAHzHV,EAAeK,SAAS,WAAWL,EAAeQ,QAAQ,CAAEC,QAAS,GAAK,CAAEC,OAAO,EAAOC,SAAUA,KAAQX,EAAeM,SAAS,UAAUC,YAAY,SAAS,GAGlC,GACvI,KAEHR,EAAEI,QAAQS,GAAG,SAAUX,GAEvBD,EAAea,OAAM,KAAQd,EAAE,cAAcS,QAAQ,CAACJ,UAAW,GAAI,IAAK,GAAI,G","sources":["webpack://lionwheel/./app/javascript/src/scroll_to_top.js"],"sourcesContent":["import { debounce } from \"./helpers/utils\";\n\n$(() => {\n const scrollToTopBtn = $('.scroll-to-top')\n\n const checkScroll = debounce(() => {\n if ($(window).scrollTop() === 0) {\n if (!scrollToTopBtn.hasClass('d-none')) scrollToTopBtn.animate({ opacity: 0 }, { queue: false, complete: () => { scrollToTopBtn.addClass('d-none').removeClass('d-flex') }})\n return\n }\n if (scrollToTopBtn.hasClass('d-none')) scrollToTopBtn.addClass('d-flex').removeClass('d-none').animate({ opacity: 1 }, { queue: false })\n }, 100)\n\n $(window).on('scroll', checkScroll)\n\n scrollToTopBtn.click(() => { $(\"html, body\").animate({scrollTop: 0}, 1000); });\n});\n"],"names":["$","scrollToTopBtn","checkScroll","debounce","window","scrollTop","hasClass","addClass","removeClass","animate","opacity","queue","complete","on","click"],"sourceRoot":""}