/home/bonphmya/topcontenedor.com/wp-content/themes/digitaz/assets/js/vendor/jarallax.min.js
!function(){"use strict";var e=function(e,t,i){return t&&o(e.prototype,t),i&&o(e,i),e};function o(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var n=function(){for(var e="transform WebkitTransform MozTransform".split(" "),t=document.createElement("div"),i=0;i<e.length;i++)if(t&&void 0!==t.style[e[i]])return e[i];return!1}(),t=navigator.userAgent,l=-1<t.toLowerCase().indexOf("android"),s=/iPad|iPhone|iPod/.test(t)&&!window.MSStream,a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};function i(e,t,i){e.addEventListener(t,i)}var g=void 0,f=void 0,c=void 0,m=!1;function p(e){g=window.innerWidth||document.documentElement.clientWidth,f=window.innerHeight||document.documentElement.clientHeight,"object"!==(void 0===e?"undefined":r(e))||"load"!==e.type&&"DOMContentLoaded"!==e.type||(m=!0)}p(),i(window,"resize",p),i(window,"orientationchange",p),i(window,"load",p),i(window,"DOMContentLoaded",p);var d=[],u=!1;function y(){var t,i;d.length&&(c=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,t=m||!u||u.width!==g||u.height!==f,i=t||!u||u.y!==c,m=!1,(t||i)&&(d.forEach(function(e){t&&e.onResize(),i&&e.onScroll()}),u={width:g,height:f,y:c}),a(y))}var h=0,v=(e(b,[{key:"css",value:function(t,i){return"string"==typeof i?window.getComputedStyle(t).getPropertyValue(i):(i.transform&&n&&(i[n]=i.transform),Object.keys(i).forEach(function(e){t.style[e]=i[e]}),t)}},{key:"extend",value:function(i){var o=arguments;return i=i||{},Object.keys(arguments).forEach(function(t){o[t]&&Object.keys(o[t]).forEach(function(e){i[e]=o[t][e]})}),i}},{key:"getWindowData",value:function(){return{width:g,height:f,y:c}}},{key:"initImg",value:function(){var e=this,t=e.options.imgElement;return(t=!((t=t&&"string"==typeof t?e.$item.querySelector(t):t)instanceof Element)?null:t)&&(e.options.keepImg?e.image.$item=t.cloneNode(!0):(e.image.$item=t,e.image.$itemParent=t.parentNode),e.image.useImgTag=!0),!!e.image.$item||(null===e.image.src&&(e.image.src=e.css(e.$item,"background-image").replace(/^url\(['"]?/g,"").replace(/['"]?\)$/g,"")),!(!e.image.src||"none"===e.image.src))}},{key:"canInitParallax",value:function(){return n&&!(l&&this.options.noAndroid)&&!(s&&this.options.noIos)}},{key:"init",value:function(){var e,t=this,i={position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",pointerEvents:"none"},o={};if(t.options.keepImg||((e=t.$item.getAttribute("style"))&&t.$item.setAttribute("data-jarallax-original-styles",e),!t.image.useImgTag||(e=t.image.$item.getAttribute("style"))&&t.image.$item.setAttribute("data-jarallax-original-styles",e)),"static"===t.css(t.$item,"position")&&t.css(t.$item,{position:"relative"}),"auto"===t.css(t.$item,"z-index")&&t.css(t.$item,{zIndex:0}),t.image.$container=document.createElement("div"),t.css(t.image.$container,i),t.css(t.image.$container,{"z-index":t.options.zIndex}),t.image.$container.setAttribute("id","jarallax-container-"+t.instanceID),t.$item.appendChild(t.image.$container),o=t.image.useImgTag?t.extend({"object-fit":t.options.imgSize,"object-position":t.options.imgPosition,"font-family":"object-fit: "+t.options.imgSize+"; object-position: "+t.options.imgPosition+";","max-width":"none"},i,o):(t.image.$item=document.createElement("div"),t.extend({"background-position":t.options.imgPosition,"background-size":t.options.imgSize,"background-repeat":t.options.imgRepeat,"background-image":'url("'+t.image.src+'")'},i,o)),"opacity"!==t.options.type&&"scale"!==t.options.type&&"scale-opacity"!==t.options.type&&1!==t.options.speed||(t.image.position="absolute"),"fixed"===t.image.position)for(var n=0,a=t.$item;null!==a&&a!==document&&0===n;){var r=t.css(a,"-webkit-transform")||t.css(a,"-moz-transform")||t.css(a,"transform");r&&"none"!==r&&(n=1,t.image.position="absolute"),a=a.parentNode}o.position=t.image.position,t.css(t.image.$item,o),t.image.$container.appendChild(t.image.$item),t.coverImage(),t.clipContainer(),t.onScroll(!0),t.options.onInit&&t.options.onInit.call(t),"none"!==t.css(t.$item,"background-image")&&t.css(t.$item,{"background-image":"none"}),t.addToParallaxList()}},{key:"addToParallaxList",value:function(){d.push(this),1===d.length&&y()}},{key:"removeFromParallaxList",value:function(){var i=this;d.forEach(function(e,t){e.instanceID===i.instanceID&&d.splice(t,1)})}},{key:"destroy",value:function(){var e=this;e.removeFromParallaxList();var t,i=e.$item.getAttribute("data-jarallax-original-styles");e.$item.removeAttribute("data-jarallax-original-styles"),i?e.$item.setAttribute("style",i):e.$item.removeAttribute("style"),e.image.useImgTag&&(t=e.image.$item.getAttribute("data-jarallax-original-styles"),e.image.$item.removeAttribute("data-jarallax-original-styles"),t?e.image.$item.setAttribute("style",i):e.image.$item.removeAttribute("style"),e.image.$itemParent&&e.image.$itemParent.appendChild(e.image.$item)),e.$clipStyles&&e.$clipStyles.parentNode.removeChild(e.$clipStyles),e.image.$container&&e.image.$container.parentNode.removeChild(e.image.$container),e.options.onDestroy&&e.options.onDestroy.call(e),delete e.$item.jarallax}},{key:"clipContainer",value:function(){var e,t,i;"fixed"===this.image.position&&(t=(i=(e=this).image.$container.getBoundingClientRect()).width,i=i.height,e.$clipStyles||(e.$clipStyles=document.createElement("style"),e.$clipStyles.setAttribute("type","text/css"),e.$clipStyles.setAttribute("id","jarallax-clip-"+e.instanceID),(document.head||document.getElementsByTagName("head")[0]).appendChild(e.$clipStyles)),i="#jarallax-container-"+e.instanceID+" {\n clip: rect(0 "+t+"px "+i+"px 0);\n clip: rect(0, "+t+"px, "+i+"px, 0);\n }",e.$clipStyles.styleSheet?e.$clipStyles.styleSheet.cssText=i:e.$clipStyles.innerHTML=i)}},{key:"coverImage",value:function(){var e=this,t=e.image.$container.getBoundingClientRect(),i=t.height,o=e.options.speed,n="scroll"===e.options.type||"scroll-opacity"===e.options.type,a=0,r=i,l=0;return n&&(a=o<0?o*Math.max(i,f):o*(i+f),1<o?r=Math.abs(a-f):o<0?r=a/o+Math.abs(a):r+=Math.abs(f-i)*(1-o),a/=2),e.parallaxScrollDistance=a,l=n?(f-r)/2:(i-r)/2,e.css(e.image.$item,{height:r+"px",marginTop:l+"px",left:"fixed"===e.image.position?t.left+"px":"0",width:t.width+"px"}),e.options.onCoverImage&&e.options.onCoverImage.call(e),{image:{height:r,marginTop:l},container:t}}},{key:"isVisible",value:function(){return this.isElementInViewport||!1}},{key:"onScroll",value:function(e){var t,i,o,n,a,r,l,s=this,c=s.$item.getBoundingClientRect(),m=c.top,p=c.height,d={},u=c;s.options.elementInViewport&&(u=s.options.elementInViewport.getBoundingClientRect()),s.isElementInViewport=0<=u.bottom&&0<=u.right&&u.top<=f&&u.left<=g,(e||s.isElementInViewport)&&(t=Math.max(0,m),i=Math.max(0,p+m),o=Math.max(0,-m),n=Math.max(0,m+p-f),a=Math.max(0,p-(m+p-f)),r=Math.max(0,-m+f-p),u=1-2*(f-m)/(f+p),e=1,p<f?e=1-(o||n)/p:i<=f?e=i/f:a<=f&&(e=a/f),"opacity"!==s.options.type&&"scale-opacity"!==s.options.type&&"scroll-opacity"!==s.options.type||(d.transform="translate3d(0,0,0)",d.opacity=e),"scale"!==s.options.type&&"scale-opacity"!==s.options.type||(l=1,s.options.speed<0?l-=s.options.speed*e:l+=s.options.speed*(1-e),d.transform="scale("+l+") translate3d(0,0,0)"),"scroll"!==s.options.type&&"scroll-opacity"!==s.options.type||(l=s.parallaxScrollDistance*u,"absolute"===s.image.position&&(l-=m),d.transform="translate3d(0,"+l+"px,0)"),s.css(s.image.$item,d),s.options.onScroll&&s.options.onScroll.call(s,{section:c,beforeTop:t,beforeTopEnd:i,afterTop:o,beforeBottom:n,beforeBottomEnd:a,afterBottom:r,visiblePercent:e,fromViewportCenter:u}))}},{key:"onResize",value:function(){this.coverImage(),this.clipContainer()}}]),b);function b(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b);var i=this;i.instanceID=h++,i.$item=e,i.defaults={type:"scroll",speed:.5,imgSrc:null,imgElement:".jarallax-img",imgSize:"cover",imgPosition:"50% 50%",imgRepeat:"no-repeat",keepImg:!1,elementInViewport:null,zIndex:-100,noAndroid:!1,noIos:!1,videoSrc:null,videoStartTime:0,videoEndTime:0,videoVolume:0,videoPlayOnlyVisible:!0,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null};var o=i.$item.getAttribute("data-jarallax"),e=JSON.parse(o||"{}");o&&console.warn("Detected usage of deprecated data-jarallax JSON options, you should use pure data-attribute options. See info here - https://github.com/nk-o/jarallax/issues/53");var n=i.$item.dataset||{},a={};Object.keys(n).forEach(function(e){var t=e.substr(0,1).toLowerCase()+e.substr(1);t&&void 0!==i.defaults[t]&&(a[t]=n[e])}),i.options=i.extend({},i.defaults,e,a,t),i.pureOptions=i.extend({},i.options),Object.keys(i.options).forEach(function(e){"true"===i.options[e]?i.options[e]=!0:"false"===i.options[e]&&(i.options[e]=!1)}),i.options.speed=Math.min(2,Math.max(-1,parseFloat(i.options.speed)));t=i.options.elementInViewport;(t=t&&"object"===(void 0===t?"undefined":r(t))&&void 0!==t.length?t[0]:t)instanceof Element||(t=null),i.options.elementInViewport=t,i.image={src:i.options.imgSrc||null,$container:null,useImgTag:!1,position:l||s?"absolute":"fixed"},i.initImg()&&i.canInitParallax()&&i.init()}function x(e){("object"===("undefined"==typeof HTMLElement?"undefined":r(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":r(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)&&(e=[e]);for(var t=arguments[1],i=Array.prototype.slice.call(arguments,2),o=e.length,n=0,a=void 0;n<o;n++)if("object"===(void 0===t?"undefined":r(t))||void 0===t?e[n].jarallax||(e[n].jarallax=new v(e[n],t)):e[n].jarallax&&(a=e[n].jarallax[t].apply(e[n].jarallax,i)),void 0!==a)return a;return e}x.constructor=v;var w,$=window.jarallax;window.jarallax=x,window.jarallax.noConflict=function(){return window.jarallax=$,this},"undefined"!=typeof jQuery&&((e=function(){var e=arguments||[];Array.prototype.unshift.call(e,this);e=x.apply(window,e);return"object"!==(void 0===e?"undefined":r(e))?e:this}).constructor=v,w=jQuery.fn.jarallax,jQuery.fn.jarallax=e,jQuery.fn.jarallax.noConflict=function(){return jQuery.fn.jarallax=w,this}),i(window,"DOMContentLoaded",function(){x(document.querySelectorAll("[data-jarallax]"))})}(),function(t){t(document).ready(function(){t(".custom-elementor-parallax").each(function(){var e=t(this);t(".elementor-element-"+e.data("id")).jarallax(e.data("settings")),e.remove()})})}(jQuery);