!function(n){"use strict";var t=(o.prototype.getDefaultOptions=function(){return{minScrollAmount:30,animationDuration:300,tooltipText:"Scroll to top"}},o.prototype.createStructure=function(){var t=n('<button class="fst-scrolltop-button"></button>'),o=n("<span />").text(this.settings.tooltipText);return t.append('<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor" class="bi bi-chevron-up" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"/></svg>').append(o),t},o.prototype.scrolltopButtonAppendToDOM=function(t){n(document.body).append(this.scrolltopButton)},o.prototype.listenScroll=function(){n(window).on("scroll",function(){n(window).scrollTop()>this.settings.minScrollAmount?this.showScrollTopButton():this.hideScrollTopButton()}.bind(this))},o.prototype.handleScrolltopButtonClick=function(){this.scrolltopButton.on("click",function(){this.scrollToTop()}.bind(this))},o.prototype.showScrollTopButton=function(){this.scrolltopButton.addClass(this.activeClassName)},o.prototype.hideScrollTopButton=function(){this.scrolltopButton.removeClass(this.activeClassName)},o.prototype.scrollToTop=function(){n("body, html").stop().animate({scrollTop:0},this.settings.animationDuration,"linear")},o);function o(t){var o=this.getDefaultOptions();this.settings=n.extend({},o,t),this.activeClassName="active",this.scrolltopButton=this.createStructure(),this.scrolltopButtonAppendToDOM(),this.listenScroll(),this.handleScrolltopButtonClick()}window.FstScrolltop=t}(jQuery);