text: !function(){"use strict";var e,t,n,o=300,s=!1,a=pageYOffset,r=pageYOffset,i=function(o){var s=Math.round(pageYOffset+(o-n)*t);t>0&&s>=e||t<0&&s<=e?(a=r=pageYOffset,scrollTo(pageXOffset,e),window.addEventListener("scroll",l,!1)):(n=o,scrollTo(pageXOffset,s),s===pageYOffset&&requestAnimationFrame(i))},f=function(){var r;scrollTo(pageXOffset,a),e=!1,"#"===location.hash||!location.hash.length&&"#"===location.href.substr(-1)?e=0:(r=document.getElementById(location.hash.substr(1)),r&&(e=r.getBoundingClientRect().top+a)),e!==!1&&(t=(e-pageYOffset)/o,s=!0,window.removeEventListener("scroll",l,!1),requestAnimationFrame(function(e){n=e,scrollTo(pageXOffset,a),requestAnimationFrame(i)}))},c=function(){s?s=!1:(a=r,f())},l=function(){r=a,a=pageYOffset},d=function(){"requestAnimationFrame"in window?(window.addEventListener("scroll",l,!1),window.addEventListener("popstate",f,!1),window.addEventListener("hashchange",c,!1)):console.error("scrollr: unsupported browser")};d()}();