Viewing File: /home/maglabs/bambinos/wp-content/themes/juliette/assets/addon/js/novaworks-element.min.js
!function(e,t){"use strict";window.NovaworksElementTools={debounce:function(e,t){var a;return function(o){a&&clearTimeout(a),a=setTimeout((function(){t.call(this,o),a=null}),e)}},getObjectNextKey:function(e,t){var a=Object.keys(e),o=a.indexOf(t),r=o+=1;return!(r>=a.length)&&a[r]},getObjectPrevKey:function(e,t){var a=Object.keys(e),o=a.indexOf(t),r=o-=1;return!(0>o)&&a[r]},getObjectFirstKey:function(e){return Object.keys(e)[0]},getObjectLastKey:function(e){return Object.keys(e)[Object.keys(e).length-1]},validateEmail:function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},makeImageAsLoaded:function(t){var a=t.getAttribute("data-src")||t.getAttribute("data-lazy")||t.getAttribute("data-lazy-src")||t.getAttribute("data-lazy-original"),o=t.getAttribute("data-src")||t.getAttribute("data-lazy-srcset"),r=t.getAttribute("data-sizes")||t.getAttribute("data-lazy-sizes");"true"==t.getAttribute("data-lanolazy")&&(a=o=r=""),a&&(t.src=a),o&&(t.srcset=o),r&&(t.sizes=r),t.setAttribute("data-element-loaded",!0),e(t).hasClass("jetpack-lazy-image")&&e(t).addClass("jetpack-lazy-image--handled")},getCurrentDevice:function(){var e=window.innerWidth;return e>1700?"desktop":e>1280?"laptop":e>800||e>786?"tablet":"mobile"}},e(window).on("elementor/frontend/init",(function(){t.hooks.addAction("frontend/element_ready/widget",(function(t){try{if(e(".slick-carousel").length>0)e(".slick-carousel").each((function(){nova_slick_slider(e(this))})),e(window).on("load",(function(){setTimeout((function(){e(".slick-carousel").hasClass("nova-slick-centerMode")&&e(".nova-lazyload-image",e(".slick-carousel")).each((function(){NovaworksElementTools.makeImageAsLoaded(this)}))}),100)}))}catch(e){console.log(e)}})),t.hooks.addAction("frontend/element_ready/image-gallery.default",(function(e){e.find("br").remove()})),t.hooks.addAction("frontend/element_ready/image-carousel.default",(function(t){var a=t.attr("id")||!1;a&&e("#"+a+"_dots").length&&t.find(".elementor-image-carousel").slick("slickSetOption","appendDots",e("#"+a+"_dots"),!0)}),500),t.hooks.addAction("frontend/element_ready/novaworks-tabs.default",(function(t){var a,o=e(".novaworks-tabs",t).first(),r=e(".novaworks-tabs__control-wrapper",o).first(),n=e(".novaworks-tabs__content-wrapper",o).first(),i=e("> .novaworks-tabs__control",r),s=e("> .novaworks-tabs__content",n),c=o.data("settings")||{},l=null,d=window.location.hash||!1,u=!!d&&d.replace("#","").split("&");if("click"===c.event?i.on("click.NovaworksTabs",(function(){var t=+e(this).data("tab")-1;clearInterval(l),h(t)})):"ontouchend"in window||"ontouchstart"in window?(i.on("touchstart",(function(t){a=e(window).scrollTop()})),i.on("touchend",(function(t){var o=+e(this).data("tab")-1;if(a!==e(window).scrollTop())return!1;clearInterval(l),h(o)}))):i.on("mouseenter",(function(t){var a=+e(this).data("tab")-1;clearInterval(l),h(a)})),c.autoSwitch){var f=c.activeIndex,v=i.length;l=setInterval((function(){f<v-1?f++:f=0,h(f)}),+c.autoSwitchDelay)}function h(t){var a,c=i.eq(t),l=s.eq(t),d="auto";if(n.css({height:n.outerHeight(!0)}),i.removeClass("active-tab"),c.addClass("active-tab"),e("html,body").animate({scrollTop:o.offset().top-130},300),r.removeClass("open"),s.removeClass("active-content"),d=l.outerHeight(!0),d+=parseInt(n.css("border-top-width"))+parseInt(n.css("border-bottom-width")),l.addClass("active-content"),n.css({height:d}),e(".slick-slider",l).length>0)try{e(".slick-slider",l).slick("setPosition")}catch(e){}a&&clearTimeout(a),a=setTimeout((function(){n.css({height:"auto"})}),500)}i.each((function(){e(this).attr("data-tab_name",e(this).text().toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")+"_"+t.attr("data-id"))})),e(window).on("resize.NovaworksTabs orientationchange.NovaworksTabs",(function(){n.css({height:"auto"})})),e(window).on("hashchange",(function(){var t=window.location.hash.replace("#","").toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"");if(""!==t){var a=e('.novaworks-tabs__control[data-tab_name="'+t+'"]');if(a.length){var o=window.location.href.replace(window.location.hash,"");history.pushState(null,null,o),h(a.data("tab")-1)}}})),u&&i.each((function(t){var a=e(this).attr("id"),o=t;u.forEach((function(e,t){e===a&&h(o)}))})),o.on("click",".novaworks-tabs__control-wrapper-mobile a",(function(e){e.preventDefault(),"mobile"==NovaworksElementTools.getCurrentDevice()&&(r.hasClass("open")?r.removeClass("open"):r.addClass("open"))}))})),t.hooks.addAction("frontend/element_ready/Novaworks-circle-progress.default",(function(t){var a=t.find(".circle-progress");if(a.length){var o=a.find(".circle-progress__value"),r=a.find(".circle-progress__meter"),n=parseInt(o.data("value"))/100,i=t.find(".circle-progress-wrap").data("duration"),s=a.data("responsive-sizes"),c=s.desktop,l=s.tablet,d=s.mobile,u=NovaworksElementTools.getCurrentDevice(),f=u,v=!1;"tablet"===u&&h(l.size,l.viewBox,l.center,l.radius,l.valStroke,l.bgStroke,l.circumference),"mobile"===u&&h(d.size,d.viewBox,d.center,d.radius,d.valStroke,d.bgStroke,d.circumference),elementorFrontend.waypoint(t,(function(){var e=t.find(".circle-counter__number"),r=e.data(),s=r.toValue.toString().match(/\.(.*)/);s&&(r.rounding=s[1].length),r.duration=i,e.numerator(r);var c=parseInt(a.data("circumference"))*(1-n);o.css({transitionDuration:i+"ms",strokeDashoffset:c}),v=!0}),{offset:"bottom-in-view"}),e(window).on("resize.NovaworksCircleProgress orientationchange.NovaworksCircleProgress",(function(e){"desktop"===(u=NovaworksElementTools.getCurrentDevice())&&"desktop"!==f&&(h(c.size,c.viewBox,c.center,c.radius,c.valStroke,c.bgStroke,c.circumference),f="desktop");"tablet"===u&&"tablet"!==f&&(h(l.size,l.viewBox,l.center,l.radius,l.valStroke,l.bgStroke,l.circumference),f="tablet");"mobile"===u&&"mobile"!==f&&(h(d.size,d.viewBox,d.center,d.radius,d.valStroke,d.bgStroke,d.circumference),f="mobile")}))}function h(e,t,i,s,c,l,d){var u=d*(1-n);a.attr({width:e,height:e,"data-radius":s,"data-circumference":d}),a[0].setAttribute("viewBox",t),r.attr({cx:i,cy:i,r:s,"stroke-width":l}),v&&o.css({transitionDuration:""}),o.attr({cx:i,cy:i,r:s,"stroke-width":c}),o.css({strokeDasharray:d,strokeDashoffset:v?u:d})}}))}))}(jQuery,window.elementorFrontend);
Back to Directory
File Manager