!function(e){"use strict";var t=function(){var e=this;this.wrapperClass="--colorize-active-",this.init=function(){if(this.canvas=document.querySelector(".rey-siteMain > .elementor, .rey-siteMain .rey-pageContent > .elementor, .page-template-elementor_canvas > .elementor, .rey-siteContent > .elementor"),this.canvas){var t=document.querySelectorAll(".elementor-element.rey-sectionScroll--colorize");t.length&&(this.canvas.classList.add("--will-colorize"),[".do-colorize",".elementor-widget-text-editor",".elementor-widget-heading",".elementor-widget-button:not(.elementor-button-info, .elementor-button-success, .elementor-button-warning, .elementor-button-danger, .elementor-button-primary, .elementor-button-secondary)"].forEach((t=>{e.canvas.querySelectorAll(`${t}:not(.no-colorize):not( .no-colorize ${t} )`).forEach((e=>{e.classList.add("colorized-element")}))})),t.forEach((t=>{e.initiateSection(t)})))}},this.initiateSection=function(t){var o,i=t.getAttribute("data-id"),n=JSON.parse(t.getAttribute("data-colorize-config")||"{}");if(!rey.validation.isEmptyObject(n)){var r="rey-colorize-section-css",a=document.getElementById(r);a||((a=document.createElement("style")).setAttribute("id",r),document.getElementsByTagName("head")[0].appendChild(a));var l,s="";if(n.bg){var c=document.createElement("div");c.classList.add("__colorize-bg"),c.setAttribute("data-section-id",i),c.style.setProperty("--body-bg-color",n.bg),this.canvas.prepend(c)}if(n.text&&(s+="--colorized-color:"+n.text+";"),n.link&&(s+="--colorized-link-color:"+n.link+";"),n.link_hover&&(s+="--colorized-link-color-hover:"+n.link_hover+";"),s){var d=`.elementor.--will-colorize.${this.wrapperClass}${i}{${s}}`;n.bg&&(d+=`.elementor.--will-colorize.${this.wrapperClass}${i} .elementor-element[data-id="${i}"]{background-color:rgba(0,0,0,0)}`),a.textContent=d}var m={target:t,once:!1,cssProp:!0,offset:.5,disableHideDownwards:void 0!==n.disable_downwards,cb:function(){l=setTimeout((()=>{e.activate(i),o=!0,n.bg&&(c.style.opacity=1)}),200)},onHide:function(){clearTimeout(l),o&&(e.deactivate(i),o=!1,n.bg&&(c.style.opacity=0))}};n.threshold&&(m.offset=parseFloat(n.threshold)),rey.frontend.inView(m)}},this.activate=function(e){this.canvas.classList.add(this.wrapperClass+e)},this.deactivate=function(e){this.canvas.classList.remove(this.wrapperClass+e)},this.init()};document.addEventListener("rey-DOMContentLoaded",(function(e){new t}))}(jQuery);