File: /home/dacusvillerec/public_html/wp-content/themes/exponent/js/vendor/beSlider.min.js
!function(t,e,i){"function"==typeof define&&define.amd?define("beSlider",e):"object"==typeof module&&module.exports?module.exports=e(i):t.BeSlider=e(i)}(window,function(s){function t(t){null==t||t.hasClass("exp-slider-initialized")||(s.fn.hasOwnProperty("slick")?null!=t&&t instanceof s?(this.ele=t,this.bindMethods(),this.setSlickSettings(),this.initLazyLoad(),this.initFullscreenSlider(),this.initVariableSlider(),this.initEqualHeightSlider(),this.initEvents(),this.adjustArrows(),this.initSlick()):console.error("Invalid Arg passed to BeSlider"):console.error("Slick is not added. BeSlider depends on slick"))}var l=s(window);return t.prototype.initFullscreenSlider=function(){var t,e,i,a;"1"===this.ele.attr("data-fullscreen")&&(t=this.ele.attr("data-fullscreen-offset"),e=l.height(),i=this.ele.find(".exp-image-slide-inner"),a=0,"string"==typeof t&&t.split(",").forEach(function(t){var e=s(t);0<t.length&&(a+=e.height())}),i.css("height",e-a+"px"))},t.prototype.updateFullscreenSlider=function(){var t=this.ele.attr("data-fullscreen-offset"),e=l.height(),i=this.ele.find(".exp-image-slide-inner"),a=0;"string"==typeof t&&t.split(",").forEach(function(t){var e=s(t);0<t.length&&(a+=e.height())}),i.css("height",e-a+"px")},t.prototype.adjustArrows=function(){var t;!0===this.settings.arrows&&null!=this.ele.attr("data-outer-arrows")&&(t=(isNaN(parseInt(this.ele.attr("data-gutter")))?0:parseInt(this.ele.attr("data-gutter")))/2+50,this.ele.css({margin:"0 -"+t+"px",padding:"0 50px"}))},t.prototype.bindMethods=function(){this.lazyLoad=this.lazyLoad.bind(this),this.updateDoppelgangers=this.updateDoppelgangers.bind(this),this.updateEqualHeightSliders=this.updateEqualHeightSliders.bind(this),this.updateVariableSlider=this.updateVariableSlider.bind(this),this.updateGutter=this.updateGutter.bind(this),this.updateFullscreenSlider=this.updateFullscreenSlider.bind(this)},t.prototype.buildResponsiveSetting=function(a,s,l){var t={};return Object.keys(s).reduce(function(t,e){var i;return a.hasOwnProperty(e)&&(i=a[e],"number"==typeof s[e].d&&(i=parseInt(i)),t[e]="d"==l||"boolean"!=typeof i&&parseInt(i)<parseInt(s[e][l])?i:s[e][l]),t},t),t},t.prototype.addResponsiveOptions=function(i){var a={variableWidth:{d:!0,l:!0,t:!0,m:!(i.responsive=[])},centerMode:{d:!0,l:!0,t:!0,m:!1},centerPadding:{d:"200px",l:"100px",t:"50px",m:"10px"},adaptiveHeight:{d:!1,l:!1,t:!1,m:!0===i.variableWidth}};"1"!==this.ele.attr("data-slides-to-show-prevent-responsive")&&(a.slidesToShow={d:3,l:"1"===this.ele.attr("data-client-carousel")?i.slidesToShow:i.centerMode?2:3,t:"1"===this.ele.attr("data-client-carousel")?i.slidesToShow:i.centerMode?1:2,m:"1"===this.ele.attr("data-client-carousel")?2:1}),["l","t","m","d"].forEach(function(t){var e;"d"==t?(e=this.buildResponsiveSetting(i,a,"d"),s.extend(i,e)):i.responsive.push({breakpoint:"l"==t?1377:"t"==t?1024:768,settings:this.buildResponsiveSetting(i,a,t)})}.bind(this))},t.prototype.setSlickSettings=function(){this.settings=null;var t=this.ele.find(".exp-slide").length,e={};"undefined"!=typeof tatsuFrontendConfig&&null!=tatsuFrontendConfig.slider_icons&&(e.prevArrow='<div class="exp-slick-arrow exp-prev">'+tatsuFrontendConfig.slider_icons.left+"</div>",e.nextArrow='<div class="exp-slick-arrow exp-next">'+tatsuFrontendConfig.slider_icons.right+"</div>"),null!=this.ele.attr("data-variable-width")&&(e.variableWidth="1"===this.ele.attr("data-variable-width"),e.variableWidth&&(e.adaptiveHeight=!1)),null!=this.ele.attr("data-slides-to-show")&&(e.variableWidth?console.warn("Slides to Show and Variable Width Slider cannot coexist"):"1"!==this.ele.attr("data-slides-to-show-retain-count")?e.slidesToShow=t<this.ele.attr("data-slides-to-show")?t:this.ele.attr("data-slides-to-show"):e.slidesToShow=this.ele.attr("data-slides-to-show")),null!=this.ele.attr("data-center-mode")&&(null!=e.slidesToShow||null!=e.variableWidth?(e.centerMode=!0,null!=this.ele.attr("data-center-pad")&&(e.centerPadding=isNaN(parseInt(this.ele.attr("data-center-pad")))?"100px":this.ele.attr("data-center-pad"))):console.warn("CenterMode needs slidesToShow or variableWidth option to work")),null!=this.ele.attr("data-autoplay")&&(e.autoplay=this.ele.attr("data-autoplay"),e.autoplaySpeed=isNaN(this.ele.attr("data-autoplay-speed"))?2e3:this.ele.attr("data-autoplay-speed")),null!=this.ele.attr("data-dots")&&(e.dots="1"===this.ele.attr("data-dots")),null!=this.ele.attr("data-arrows")&&this.ele.width()<1200&&(e.arrows="1"===this.ele.attr("data-arrows")),e.variableWidth||e.slidesToShow&&1!==e.slidesToShow?console.warn("Adaptive Height works only when slidesToShow and VariableHeight are not set"):e.adaptiveHeight="1"===this.ele.attr("data-adaptive-height"),null!=this.ele.attr("data-as-nav-for")&&0<s(this.ele.attr("data-as-nav-for")).length&&(e.asNavFor=this.ele.attr("data-as-nav-for")),null!=this.ele.attr("data-finite")&&(e.infinite=!1),null!=this.ele.attr("data-swipe-to-slide")&&(e.swipeToSlide="1"===this.ele.attr("data-swipe-to-slide")),null!=this.ele.attr("data-focus-on-select")&&(e.focusOnSelect=!0),this.addResponsiveOptions(e),console.log(e),this.settings=s.extend({slidesToShow:1,centerMode:!1,adaptiveHeight:!1,dots:!1,arrows:!1,autoplay:!1,autoPlaySpeed:2e3,swipeToSlide:!1,variableWidth:!1},e)},t.prototype.getMaxHeight=function(){var e=0;return this.ele.find(".exp-slide").each(function(){var t=s(this);e<t.height()&&(e=t.height())}),e},t.prototype.initEqualHeightSlider=function(){var t;"1"===this.ele.attr("data-equal-height")&&(t=this.getMaxHeight(),this.ele.find(".exp-slide").height(t),this.ele.addClass("exp-equal-height-slider"))},t.prototype.updateEqualHeightSliders=function(){var t=this.getMaxHeight();this.ele.find(".exp-slide").height(t),this.ele.slick("setPosition")},t.prototype.initVariableSlider=function(){var t;"1"===this.ele.attr("data-variable-width")&&(t=this.ele.find(".exp-slide"),768<=l.width()?"1"===this.ele.attr("data-lazy-load")?t.each(function(){var t=s(this),e=t.find(".exp-image-slide-inner"),t=t.find(".exp-slider-lazy-load").attr("data-aspect-ratio");null!=t&&(e.css("height",""),e.width(e.height()*t))}):t.find(".exp-image-slide-inner").css("height",""):l.width()<768&&t.each(function(){var t=s(this),e=t.find(".exp-image-slide-inner"),t=t.find(".exp-carousel-img").attr("data-aspect-ratio");null!=t&&(e.css("width",""),e.height(e.width()/t))}))},t.prototype.updateVariableSlider=function(){setTimeout(function(){var t=this.ele.find(".exp-slide");768<=l.width()?"1"===this.ele.attr("data-lazy-load")?t.each(function(){var t=s(this),e=t.find(".exp-image-slide-inner"),t=t.find(".exp-slider-lazy-load").attr("data-aspect-ratio");null!=t&&(e.css("height",""),e.width(e.height()*t))}):t.find(".exp-image-slide-inner").css("height",""):l.width()<768&&t.each(function(){var t=s(this),e=t.find(".exp-image-slide-inner"),t=t.find(".exp-carousel-img").attr("data-aspect-ratio");null!=t&&(e.css("width",""),e.height(e.width()/t))}),this.ele.slick("setPosition")}.bind(this),10)},t.prototype.initEvents=function(){this.ele.on("init",function(){null!=this.imagesToLazyLoad&&(this.addDoppelgangers(),this.lazyLoad()),this.ele.addClass("exp-slider-initialized")}.bind(this)),null!=this.imagesToLazyLoad&&(this.ele.on("afterChange",this.lazyLoad),this.ele.on("breakpoint",this.updateDoppelgangers)),"number"==typeof this.settings.slidesToShow&&0<this.settings.slidesToShow&&this.ele.on("breakpoint",this.updateGutter),this.ele.hasClass("exp-equal-height-slider")&&this.ele.on("breakpoint",this.updateEqualHeightSliders),"1"===this.ele.attr("data-fullscreen")&&this.ele.on("breakpoint",this.updateFullscreenSlider),"1"===this.ele.attr("data-variable-width")&&this.ele.on("breakpoint",this.updateVariableSlider)},t.prototype.updateGutter=function(t,e,i){768==i?this.ele.find(".exp-slide").css("padding",""):0<(i=isNaN(parseInt(this.ele.attr("data-gutter")))?0:parseInt(this.ele.attr("data-gutter")))&&(i/=2,this.ele.find(".exp-slide").css("padding","0 "+i+"px"))},t.prototype.initLazyLoad=function(){this.imagesToLazyLoad=null,"1"===this.ele.attr("data-lazy-load")&&(this.imagesToLazyLoad=this.ele.find(".exp-slider-lazy-load"))},t.prototype.addDoppelgangers=function(){null!=this.imagesToLazyLoad&&(this.imagesToLazyLoad=this.ele.find(".exp-slider-lazy-load"))},t.prototype.getDoppelgangers=function(t){var e=[],i=s();return 0<this.imagesToLazyLoad.length&&(t.each(function(){e.push(s(this).attr("data-src"))}),this.imagesToLazyLoad.each(function(){var t=s(this);0<t.length&&null==t.attr("src")&&-1<e.indexOf(t.attr("data-src"))&&(i=i.add(t))})),i},t.prototype.updateDoppelgangers=function(){var t;0<this.imagesToLazyLoad.length&&(t=this.imagesToLazyLoad.filter(function(){return s(this).closest(".slick-slide").hasClass("slick-cloned")}),this.imagesToLazyLoad=this.imagesToLazyLoad.not(t),0<(t=this.ele.find(".slick-cloned .exp-slider-lazy-load").filter(function(){return null==s(this).attr("src")})).length&&(this.imagesToLazyLoad=this.imagesToLazyLoad.add(t)))},t.prototype.loadImages=function(t){var e=this.getDoppelgangers(t);0<e.length&&(t=t.add(e)),t.one("load",function(){s(this).addClass("exp-lazy-loaded")}).each(function(){var t=s(this);t.attr("src",t.attr("data-src"))}),this.imagesToLazyLoad=this.imagesToLazyLoad.not(t),0==this.imagesToLazyLoad.length&&(this.ele.off("afterChange",this.lazyLoad),this.ele.off("breakpoint",this.updateDoppelgangers))},t.prototype.getVisibleSlides=function(){var t=this.ele.find(".slick-list"),e=t.offset().left,i=e,a=e+t.width();return this.imagesToLazyLoad.filter(function(){var t=s(this).parent(),e=t.offset().left,t=t.offset().left+t.outerWidth(!0);return i<t&&t<=a||e<a&&i<=e})},t.prototype.lazyLoad=function(){0<this.imagesToLazyLoad.length&&setTimeout(function(){var t=this.getVisibleSlides();null!=t&&0<t.length&&this.loadImages(t)}.bind(this),0)},t.prototype.initSlick=function(){this.ele.slick(this.settings)},t},jQuery);