1/*! 2 * skrollr core 3 * 4 * Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr 5 * 6 * Free to use under terms of MIT license 7 */(function(e,t,n){"use strict";var c,m,ne,G,te,J,we,g,_,L,Q,Z,ee,A,R,Y,se,he,s,r,l,p,v,b,x,B,ye,o,f,S,M,V,$,ae,h,D,H,W,K,ve,k,z,P,me,d,w,T,y=e.skrollr={get:function(){return s},init:function(e){return s||new u(e)},VERSION:"0.6.10"},q=Object.prototype.hasOwnProperty,i=e.Math,U=e.getComputedStyle,oe="touchstart",ie="touchmove",ue="touchcancel",fe="touchend",E="skrollable",I=E+"-before",pe=E+"-between",N=E+"-after",C="skrollr",ge="no-"+C,Se=C+"-desktop",ke=C+"-mobile",X="linear",Oe=1e3,xe=6e-4,Ce=200,Ee="start",_e="end",je="center",be="bottom",O="___skrollable_id",Ae=/^\s+|\s+$/g,Me=/^data(?:-(_\w+))?(?:-?(-?\d+))?(?:-?(start|end|top|center|bottom))?(?:-?(top|center|bottom))?$/,Fe=/\s*([\w\-[\]]+)\s*:\s*(.+?)\s*(?:;|$)/gi,Te=/^([a-z-]+)\[(\w+)\]$/,ze=/-([a-z])/g,De=function(e,t){return t.toUpperCase()},de=/[-+]?[\d]*\.?[\d]+/g,le=/\{\?\}/g,ce=/rgba?\(\s*-?\d+\s*,\s*-?\d+\s*,\s*-?\d+/g,re=/[a-z-]+-gradient/g,a="",j="",Ne=function(){var e,t,n=/^(?:O|Moz|webkit|ms)|(?:-(?:o|moz|webkit|ms)-)/;if(!U)return;t=U(m,null);for(e in t)if(a=e.match(n)||+e==e&&t[e].match(n),a)break;if(!a){a=j="";return}a=a[0],a.slice(0,1)==="-"?(j=a,a={"-webkit-":"webkit","-moz-":"Moz","-ms-":"ms","-o-":"O"}[a]):j="-"+a.toLowerCase()+"-"},Le=function(){var t=e.requestAnimationFrame||e[a.toLowerCase()+"RequestAnimationFrame"],n=g();return(d||!t)&&(t=function(t){var s=g()-n,o=i.max(0,1e3/60-s);e.setTimeout(function(){n=g(),t()},o)}),t},F={begin:function(){return 0},end:function(){return 1},linear:function(e){return e},quadratic:function(e){return e*e},cubic:function(e){return e*e*e},swing:function(e){return-i.cos(e*i.PI)/2+.5},sqrt:function(e){return e**.5},outCubic:function(e){return(e-1)**3+1},bounce:function(e){var t;if(e<=.5083)t=3;else if(e<=.8489)t=9;else if(e<=.96208)t=27;else if(e<=.99981)t=91;else return 1;return 1-i.abs(3*i.cos(e*t*1.028)/t)}};function u(n){if(c=t.documentElement,m=t.body,Ne(),s=this,n=n||{},ye=n.constants||{},n.easing)for(o in n.easing)F[o]=n.easing[o];me=n.edgeStrategy||"set",v={beforerender:n.beforerender,render:n.render},x=n.forceHeight!==!1,x&&(B=n.scale||1),ve=n.smoothScrolling!==!1,z=n.smoothScrollingDuration||Ce,b={targetTop:s.getScrollTop()},d=(n.mobileCheck||function(){return/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i.test(navigator.userAgent||navigator.vendor||e.opera)})(),d?(p=t.getElementById("skrollr-body"),p&&se(),ne(),h(c,[C,ke],[ge])):h(c,[C,Se],[ge]),s.refresh(),$(e,"resize orientationchange",function(){var e=c.clientWidth,t=c.clientHeight;(t!==D||e!==K)&&(D=t,K=e,M=!0)});var o,i=Le();return function e(){J(),i(e)}(),s}u.prototype.refresh=function(e){var o,i,a,r,c,d,u,m,f,p,g,v,b,j,y,_,w,x,C,k,A=!1;for(e===n?(A=!0,l=[],P=0,e=t.getElementsByTagName("*")):e=[].concat(e),r=0,v=e.length;r<v;r++){if(o=e[r],g=o,f=[],y=ve,j=me,!o.attributes)continue;for(p=0,C=o.attributes.length;p<C;p++){if(i=o.attributes[p],i.name==="data-anchor-target"){if(g=t.querySelector(i.value),g===null)throw'Unable to find anchor target "'+i.value+'"';continue}if(i.name==="data-smooth-scrolling"){y=i.value!=="off";continue}if(i.name==="data-edge-strategy"){j=i.value;continue}if(d=i.name.match(Me),d===null)continue;m=d[1],m=m&&ye[m.substr(1)]||0,_=(d[2]|0)+m,c=d[3],k=d[4]||c,a={offset:_,props:i.value,element:o},f.push(a),!c||c===Ee||c===_e?(a.mode="absolute",c===_e?a.isEnd=!0:(a.frame=_*B,delete a.offset)):(a.mode="relative",a.anchors=[c,k])}if(!f.length)continue;!A&&O in o?(u=o[O],w=l[u].styleAttr,x=l[u].classAttr):(u=o[O]=P++,w=o.style.cssText,x=H(o)),l[u]={element:o,styleAttr:w,classAttr:x,anchorTarget:g,keyFrames:f,smoothScrolling:y,edgeStrategy:j},h(o,[E],[])}for(V(),r=0,v=e.length;r<v;r++){if(b=l[e[r][O]],b===n)continue;we(b),Z(b)}return s},u.prototype.relativeToAbsolute=function(e,t,n){var a=c.clientHeight,i=e.getBoundingClientRect(),o=i.top,r=i.bottom-i.top;return t===be?o-=a:t===je&&(o-=a/2),n===be?o+=r:n===je&&(o+=r/2),o+=s.getScrollTop(),o+.5|0},u.prototype.animateTo=function(e,t){t=t||{};
7var i=g(),a=s.getScrollTop(),o={startTop:a,topDiff:e-a,targetTop:e,duration:t.duration||Oe,startTime:i,endTime:i+(t.duration||Oe),easing:F[t.easing||X],done:t.done};return o.topDiff||(o.done&&o.done.call(s,!1),o=n),s},u.prototype.stopAnimateTo=function(){o&&o.done&&o.done.call(s,!0),o=n},u.prototype.isAnimatingTo=function(){return!!o},u.prototype.setScrollTop=function(t,n){return n===!0&&(f=t,k=!0),d?w=i.min(i.max(t,0),r):e.scrollTo(0,t),s},u.prototype.getScrollTop=function(){return d?w:e.pageYOffset||c.scrollTop||m.scrollTop||0},u.prototype.on=function(e,t){return v[e]=t,s},u.prototype.off=function(e){return delete v[e],s},ne=function(){var t,o,a,l,d,u,h,f,p,g,v;$(c,[oe,ie,ue,fe].join(" "),function(e){e.preventDefault();var c,m,b,j,y,_,O,C,x=e.changedTouches[0];switch(o=x.clientY,l=x.clientX,a=e.timeStamp,e.type){case oe:t&&t.blur(),s.stopAnimateTo(),t=e.target,h=d=o,f=l,v=a;break;case ie:u=o-d,g=a-p,s.setScrollTop(w-u,!0),d=o,p=a;break;default:case ue:case fe:if(_=h-o,O=f-l,C=O*O+_*_,C<49){t.focus(),t.click();return}t=n,b=u/g,b=i.max(i.min(b,3),-3),m=i.abs(b/xe),j=b*m+.5*xe*m*m,c=s.getScrollTop()-j,y=0,c>r?(y=(r-c)/j,c=r):c<0&&(y=-c/j,c=0),m=m*(1-y),s.animateTo(c,{easing:"outCubic",duration:m});break}}),e.scrollTo(0,0),c.style.overflow=m.style.overflow="hidden"},G=function(){for(n=0,d=l.length;n<d;n++){o=l[n],u=o.element,h=o.anchorTarget,a=o.keyFrames,t=0,c=a.length;for(var e,t,n,o,a,c,d,u,h;t<c;t++)e=a[t],e.mode==="relative"&&(A(u),e.frame=s.relativeToAbsolute(h,e.anchors[0],e.anchors[1])-e.offset,A(u,!0)),x&&!e.isEnd&&e.frame>r&&(r=e.frame)}for(r=i.max(r,ae()),n=0,d=l.length;n<d;n++){for(o=l[n],a=o.keyFrames,t=0,c=a.length;t<c;t++)e=a[t],e.isEnd&&(e.frame=r-e.offset);o.keyFrames.sort(he)}},te=function(e,t){for(var n,s,o,i,a,r,c,d,u,m,f,g,v,b,j,_,w,p=0,O=l.length;p<O;p++){if(o=l[p],u=o.element,r=o.smoothScrolling?e:t,n=o.keyFrames,_=n[0].frame,j=n[n.length-1].frame,c=r<_,g=r>j,v=n[c?0:n.length-1],c||g){if(c&&o.edge===-1||g&&o.edge===1)continue;switch(h(u,[c?I:N],[I,pe,N]),o.edge=c?-1:1,o.edgeStrategy){case"reset":A(u);continue;case"ease":r=v.frame;break;default:case"set":m=v.props;for(s in m)q.call(m,s)&&(d=Y(m[s].value),y.setStyle(u,s,d));continue}}else o.edge!==0&&(h(u,[E,pe],[I,N]),o.edge=0);for(a=0,w=n.length-1;a<w;a++)if(r>=n[a].frame&&r<=n[a+1].frame){i=n[a],b=n[a+1];for(s in i.props)q.call(i.props,s)&&(f=(r-i.frame)/(b.frame-i.frame),f=i.props[s].easing(f),d=ee(i.props[s].value,b.props[s].value,f),d=Y(d),y.setStyle(u,s,d));break}}},J=function(){M&&(M=!1,V());var i,a,c,l,u,e=s.getScrollTop(),t=g();o?(t>=o.endTime?(e=o.targetTop,a=o.done,o=n):(i=o.easing((t-o.startTime)/o.duration),e=o.startTop+i*o.topDiff|0),s.setScrollTop(e,!0)):d||(l=b.targetTop-e,l&&(b={startTop:f,topDiff:e-f,targetTop:e,startTime:S,endTime:S+z}),t<=b.endTime&&(i=F.sqrt((t-b.startTime)/z),e=b.startTop+i*b.topDiff|0)),d&&p&&y.setStyle(p,"transform","translate(0, "+-w+"px) "+T),(k||f!==e)&&(W=e>=f?"down":"up",k=!1,c={curTop:e,lastTop:f,maxTop:r,direction:W},u=v.beforerender&&v.beforerender.call(s,c),u!==!1&&(te(e,s.getScrollTop()),f=e,v.render&&v.render.call(s,c)),a&&a.call(s,!1)),S=t},we=function(e){for(var t,n,s,i,a,r,o=0,c=e.keyFrames.length;o<c;o++){for(i=e.keyFrames[o],a={};(r=Fe.exec(i.props))!==null;)s=r[1],n=r[2],t=s.match(Te),t!==null?(s=t[1],t=t[2]):t=X,n=n.indexOf("!")?Q(n):[n.slice(1)],a[s]={value:n,easing:F[t]};i.props=a}},Q=function(e){var t=[];return ce.lastIndex=0,e=e.replace(ce,function(e){return e.replace(de,function(e){return e/255*100+"%"})}),j&&(re.lastIndex=0,e=e.replace(re,function(e){return j+e})),e=e.replace(de,function(e){return t.push(+e),"{?}"}),t.unshift(e),t},Z=function(e){for(var n={},t=0,s=e.keyFrames.length;t<s;t++)L(e.keyFrames[t],n);for(n={},t=e.keyFrames.length-1;t>=0;t--)L(e.keyFrames[t],n)},L=function(e,t){var n;for(n in t)q.call(e.props,n)||(e.props[n]=t[n]);for(n in e.props)t[n]=e.props[n]},ee=function(e,t,n){var s,o,i=e.length;if(i!==t.length)throw`Can't interpolate between "`+e[0]+'" and "'+t[0]+'"';for(o=[e[0]],s=1;s<i;s++)o[s]=e[s]+(t[s]-e[s])*n;return o},Y=function(e){var t=1;return le.lastIndex=0,e[0].replace(le,function(){return e[t++]})},A=function(e,t){e=[].concat(e);for(var n,s,o=0,i=e.length;o<i;o++){if(s=e[o],n=l[s[O]],!n)continue;t?(s.style.cssText=n.dirtyStyleAttr,h(s,n.dirtyClassAttr)):(n.dirtyStyleAttr=s.style.cssText,n.dirtyClassAttr=H(s),s.style.cssText=n.styleAttr,h(s,n.classAttr))}},se=function(){T="translateZ(0)",y.setStyle(p,"transform",T);var e=U(p),t=e.getPropertyValue("transform"),n=e.getPropertyValue(j+"transform"),s=t&&t!=="none"||n&&n!=="none";s||(T="")},y.setStyle=function(e,t,n){var s=e.style;if(t=t.replace(ze,De).replace("-",""),t==="zIndex")s[t]=""+(n|0);else if(t==="float")s.styleFloat=s.cssFloat=n;else try{a&&(s[a+t.slice(0,1).toUpperCase()+t.slice(1)]=n),s[t]=n}catch{}},$=y.addEvent=function(t,n,s){var o,i,a=function(t){return t=t||e.event,t.target||(t.target=t.srcElement),t.preventDefault||(t.preventDefault=function(){t.returnValue=!1}),s.call(this,t)};for(n=n.split(" "),o=0,i=n.length;o<i;o++)t.addEventListener?t.addEventListener(n[o],s,!1):t.attachEvent("on"+n[o],a)},V=function(){var e=s.getScrollTop();r=0,x&&!d&&(m.style.height="auto"),G(),x&&!d&&(m.style.height=r+c.clientHeight+"px"),d?s.setScrollTop(i.min(s.getScrollTop(),r)):s.setScrollTop(e,!0),k=!0},ae=function(){var e=p&&p.offsetHeight||0,t=i.max(e,m.scrollHeight,m.offsetHeight,c.scrollHeight,c.offsetHeight,c.clientHeight);return t-c.clientHeight},H=function(t){var n="className";return e.SVGElement&&t instanceof e.SVGElement&&(t=t[n],n="baseVal"),t[n]},h=function(t,s,o){var i,r,c,l,d,a="className";if(e.SVGElement&&t instanceof e.SVGElement&&(t=t[a],a="baseVal"),o===n){t[a]=s;return}for(i=t[a],c=0,l=o.length;c<l;c++)i=_(i).replace(_(o[c])," ");for(i=R(i),r=0,d=s.length;r<d;r++)_(i).indexOf(_(s[r]))===-1&&(i+=" "+s[r]);t[a]=R(i)},R=function(e){return e.replace(Ae,"")},_=function(e){return" "+e+" "}
7,g=Date.now||function(){return+new Date},he=function(e,t){return e.frame-t.frame},r=0,B=1,W="down",f=-1,S=g(),K=0,D=0,M=!1,P=0,d=!1,w=0})(window,document)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.