/* * HC-Sticky * ========= * Version: 2.2.6 * Author: Some Web Media * Author URL: https://github.com/somewebmedia * Plugin URL: https://github.com/somewebmedia/hc-sticky * Description: JavaScript library that makes any element on your page visible while you scroll * License: MIT */ "use strict";!function(t,e){if("object"==typeof module&&"object"==typeof module.exports){if(!t.document)throw new Error("HC-Sticky requires a browser to run.");module.exports=e(t)}else"function"==typeof define&&define.amd?define("hcSticky",[],e(t)):e(t)}("undefined"!=typeof window?window:this,function(U){var Y=U.document,$={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1},Q=function(t,e,o){console.warn("%cHC Sticky:%c "+o+"%c '"+t+"'%c is now deprecated and will be removed. Use%c '"+e+"'%c instead.","color: #fa253b","color: default","color: #5595c6","color: default","color: #5595c6","color: default")},X=function(n,f){var o=this;if(f=f||{},"string"==typeof n&&(n=Y.querySelector(n)),!n)return!1;f.queries&&Q("queries","responsive","option"),f.queryFlow&&Q("queryFlow","mobileFirst","option");var p={},u=X.Helpers,s=n.parentNode;"static"===u.getStyle(s,"position")&&(s.style.position="relative");function d(t){t=t||{},u.isEmptyObject(t)&&!u.isEmptyObject(p)||(p=Object.assign({},$,p,t))}function t(){return p.disable}function e(){var t,e=p.responsive||p.queries;if(e){var o=U.innerWidth;if(t=f,(p=Object.assign({},$,t||{})).mobileFirst)for(var i in e)i<=o&&!u.isEmptyObject(e[i])&&d(e[i]);else{var n=[];for(var s in e){var r={};r[s]=e[s],n.push(r)}for(var l=n.length-1;0<=l;l--){var a=n[l],c=Object.keys(a)[0];o<=c&&!u.isEmptyObject(a[c])&&d(a[c])}}}}function i(){var t,e,o,i;P.css=(t=n,e=u.getCascadedStyle(t),o=u.getStyle(t),i={height:t.offsetHeight+"px",left:e.left,right:e.right,top:e.top,bottom:e.bottom,position:o.position,display:o.display,verticalAlign:o.verticalAlign,boxSizing:o.boxSizing,marginLeft:e.marginLeft,marginRight:e.marginRight,marginTop:e.marginTop,marginBottom:e.marginBottom,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight},e.float&&(i.float=e.float||"none"),e.cssFloat&&(i.cssFloat=e.cssFloat||"none"),o.MozBoxSizing&&(i.MozBoxSizing=o.MozBoxSizing),i.width="auto"!==e.width?e.width:"border-box"===i.boxSizing||"border-box"===i.MozBoxSizing?t.offsetWidth+"px":o.width,i),F.init(),b=!(!p.stickTo||!("document"===p.stickTo||p.stickTo.nodeType&&9===p.stickTo.nodeType||"object"==typeof p.stickTo&&p.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),v=p.stickTo?b?Y:"string"==typeof p.stickTo?Y.querySelector(p.stickTo):p.stickTo:s,H=(B=function(){var t=n.offsetHeight+(parseInt(P.css.marginTop)||0)+(parseInt(P.css.marginBottom)||0),e=(H||0)-t;return-1<=e&&e<=1?H:t})(),w=(A=function(){return b?Math.max(Y.documentElement.clientHeight,Y.body.scrollHeight,Y.documentElement.scrollHeight,Y.body.offsetHeight,Y.documentElement.offsetHeight):v.offsetHeight})(),k=b?0:u.offset(v).top,L=p.stickTo?b?0:u.offset(s).top:k,x=U.innerHeight,R=n.offsetTop-(parseInt(P.css.marginTop)||0),S=p.innerSticker?"string"==typeof p.innerSticker?Y.querySelector(p.innerSticker):p.innerSticker:null,T=isNaN(p.top)&&-1>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1