diff --git a/public/assets/js/smoothscroll.min.js b/public/assets/js/smoothscroll.min.js new file mode 100644 index 0000000..9f8b7e2 --- /dev/null +++ b/public/assets/js/smoothscroll.min.js @@ -0,0 +1 @@ +!function(){var e,t,o,n,r={frameRate:150,animationTime:400,stepSize:100,pulseAlgorithm:!0,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:!0,arrowScroll:50,fixedBackground:!0,excluded:""},a=r,i=!1,l=!1,c={x:0,y:0},s=!1,u=document.documentElement,d=[];if("userAgentData"in navigator)var f=/^Mac/i.test(window.navigator.userAgentData.platform);else f=/^Mac/i.test(window.navigator.platform);var w={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},m={37:1,38:1,39:1,40:1};function h(){if(!s&&document.body){s=!0;var n=document.body,r=document.documentElement,c=window.innerHeight,d=n.scrollHeight;if(u=document.compatMode.indexOf("CSS")>=0?r:n,e=n,a.keyboardSupport&&Y("keydown",D),top!=self)l=!0;else if(U&&d>c&&(n.offsetHeight<=c||r.offsetHeight<=c)){var f,w=document.createElement("div");w.style.cssText="position:absolute; z-index:-10000; top:0; left:0; right:0; height:"+u.scrollHeight+"px",document.body.appendChild(w),o=function(){f||(f=setTimeout(function(){i||(w.style.height="0",w.style.height=u.scrollHeight+"px",f=null)},500))},setTimeout(o,10),Y("resize",o);if((t=new q(o)).observe(n,{attributes:!0,childList:!0,characterData:!1}),u.offsetHeight<=c){var m=document.createElement("div");m.style.clear="both",n.appendChild(m)}}a.fixedBackground||i||(n.style.backgroundAttachment="scroll",r.style.backgroundAttachment="scroll")}}var v=[],g=!1,p=Date.now();function b(e,t,o){var n,r;if(n=(n=t)>0?1:-1,r=(r=o)>0?1:-1,(c.x!==n||c.y!==r)&&(c.x=n,c.y=r,v=[],p=0),1!=a.accelerationMax){var i=Date.now()-p;if(i1&&(l=Math.min(l,a.accelerationMax),t*=l,o*=l)}p=Date.now()}if(v.push({x:t,y:o,lastX:t<0?.99:-.99,lastY:o<0?.99:-.99,start:Date.now()}),!g){var s=V(),u=e===s||e===document.body;null==e.$scrollBehavior&&function(e){var t=A(e);if(null==T[t]){var o=getComputedStyle(e,"")["scroll-behavior"];T[t]="smooth"==o}return T[t]}(e)&&(e.$scrollBehavior=e.style.scrollBehavior,e.style.scrollBehavior="auto");var d=function(n){for(var r=Date.now(),i=0,l=0,c=0;c=a.animationTime,m=w?1:f/a.animationTime;a.pulseAlgorithm&&(m=I(m));var h=s.x*m-s.lastX>>0,p=s.y*m-s.lastY>>0;i+=h,l+=p,s.lastX+=h,s.lastY+=p,w&&(v.splice(c,1),c--)}u?window.scrollBy(i,l):(i&&(e.scrollLeft+=i),l&&(e.scrollTop+=l)),t||o||(v=[]),v.length?R(d,e,1e3/a.frameRate+1):(g=!1,null!=e.$scrollBehavior&&(e.style.scrollBehavior=e.$scrollBehavior,e.$scrollBehavior=null))};R(d,e,0),g=!0}}function y(t){s||h();var o=t.target;if(t.defaultPrevented||t.ctrlKey)return!0;if(N(e,"embed")||N(o,"embed")&&/\.pdf/i.test(o.src)||N(e,"object")||o.shadowRoot)return!0;var r=-t.wheelDeltaX||t.deltaX||0,i=-t.wheelDeltaY||t.deltaY||0;f&&(t.wheelDeltaX&&P(t.wheelDeltaX,120)&&(r=t.wheelDeltaX/Math.abs(t.wheelDeltaX)*-120),t.wheelDeltaY&&P(t.wheelDeltaY,120)&&(i=t.wheelDeltaY/Math.abs(t.wheelDeltaY)*-120)),r||i||(i=-t.wheelDelta||0),1===t.deltaMode&&(r*=40,i*=40);var c=z(o);return c?!!function(e){if(!e)return;d.length||(d=[e,e,e]);e=Math.abs(e),d.push(e),d.shift(),clearTimeout(n),n=setTimeout(function(){try{localStorage.SS_deltaBuffer=d.join(",")}catch(e){}},1e3);var t=e>120&&$(e),o=!$(120)&&!$(100)&&!t;return e<50||o}(i)||(Math.abs(r)>1.2&&(r*=a.stepSize/120),Math.abs(i)>1.2&&(i*=a.stepSize/120),b(c,r,i),t.preventDefault(),void B()):!l||!W||(Object.defineProperty(t,"target",{value:window.frameElement}),parent.wheel(t))}function D(t){var o=t.target,n=t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&t.keyCode!==w.spacebar;document.body.contains(e)||(e=document.activeElement);var r=/^(button|submit|radio|checkbox|file|color|image)$/i;if(t.defaultPrevented||/^(textarea|select|embed|object)$/i.test(o.nodeName)||N(o,"input")&&!r.test(o.type)||N(e,"video")||function(e){var t=e.target,o=!1;if(-1!=document.URL.indexOf("www.youtube.com/watch"))do{if(o=t.classList&&t.classList.contains("html5-video-controls"))break}while(t=t.parentNode);return o}(t)||o.isContentEditable||n)return!0;if((N(o,"button")||N(o,"input")&&r.test(o.type))&&t.keyCode===w.spacebar)return!0;if(N(o,"input")&&"radio"==o.type&&m[t.keyCode])return!0;var i=0,c=0,s=z(e);if(!s)return!l||!W||parent.keydown(t);var u=s.clientHeight;switch(s==document.body&&(u=window.innerHeight),t.keyCode){case w.up:c=-a.arrowScroll;break;case w.down:c=a.arrowScroll;break;case w.spacebar:c=-(t.shiftKey?1:-1)*u*.9;break;case w.pageup:c=.9*-u;break;case w.pagedown:c=.9*u;break;case w.home:s==document.body&&document.scrollingElement&&(s=document.scrollingElement),c=-s.scrollTop;break;case w.end:var d=s.scrollHeight-s.scrollTop-u;c=d>0?d+10:0;break;case w.left:i=-a.arrowScroll;break;case w.right:i=a.arrowScroll;break;default:return!0}b(s,i,c),t.preventDefault(),B()}function S(t){e=t.target}var x,k,A=(x=0,function(e){return e.uniqueID||(e.uniqueID=x++)}),M={},E={},T={};function B(){clearTimeout(k),k=setInterval(function(){M=E=T={}},1e3)}function C(e,t,o){for(var n=o?M:E,r=e.length;r--;)n[A(e[r])]=t;return t}function H(e,t){return(t?M:E)[A(e)]}function z(e){var t=[],o=document.body,n=u.scrollHeight;do{var r=H(e,!1);if(r)return C(t,r);if(t.push(e),n===e.scrollHeight){var a=O(u)&&O(o)||X(u);if(l&&L(u)||!l&&a)return C(t,V())}else if(L(e)&&X(e))return C(t,e)}while(e=e.parentElement)}function L(e){return e.clientHeight+10=1?1:e<=0?0:(1==a.pulseNormalize&&(a.pulseNormalize/=F(1)),F(e))}if("userAgentData"in navigator){var _=!1,U=!1;for(let e=0;e