(e=>{"use strict";let t,n,l,o=null;const i=new Set,a=new Set,r=e=>"zooming"===getComputedStyle(e).getPropertyValue("--tbBg"),s=(t,n)=>{const l=e=>{const t=e.currentTarget;t.style.transition="",t.tfOff("transitionend transitioncancel",l,{passive:!0,once:!0})};for(let e=t.length-1;e>-1;--e){let o=t[e],r=o.target.style;o.target.isConnected?o.isIntersecting&&(o.target.tfOn("transitionend transitioncancel",l,{passive:!0,once:!0}),r.transition="background-size 1.5s ease-in",r.backgroundSize="100%",n.unobserve(o.target)):(r.transition=r.backgroundSize="",i.delete(o.target),a.delete(o.target),n.unobserve(o.target))}!1===e.is_builder_active&&0===a.size&&0===i.size&&(e.off("tfsmartresize",c),o.disconnect(),o=null)},c=s=>{s&&(clearTimeout(l),l=setTimeout((()=>{cancelAnimationFrame(n),n=requestAnimationFrame((()=>{const m=(e=>{const t=themify_vars.breakpoints;let n="desktop";return e<=t.mobile?n="mobile":e<=t.tablet[1]?n="tablet":e<=t.tablet_landscape[1]&&(n="tablet_landscape"),n})(s.w);if(m!==t){t=m;for(let e of i)e.isConnected?r(e)?(e.style.backgroundSize="",o.observe(e)):(e.classList.contains("builder-parallax-scrolling")||e.classList.contains("builder-zoom-scrolling")||(e.style.backgroundSize=""),o.unobserve(e),a.add(e),i.delete(e)):i.delete(e);for(let e of a)e.isConnected?r(e)&&(e.style.backgroundSize="",i.add(e),a.delete(e),o.observe(e)):a.delete(e);!1===e.is_builder_active&&0===a.size&&0===i.size&&(e.off("tfsmartresize",c),o.disconnect(),o=null),n=l=null}}))}),80))};e.on("builder_load_module_partial",((t,n)=>{let l;if(!0===n){if(!t.hasAttribute("data-zooming-bg"))return;l=[t]}else l=e.selectWithParent("[data-zooming-bg]",t);if(l.length>0){null===o&&(o=new IntersectionObserver(s,{threshold:.3}),e.on("tfsmartresize",c));for(let t=l.length-1;t>-1;--t){let n=l[t];!1===e.is_builder_active&&n.removeAttribute("data-zooming-bg"),r(n)?(i.add(n),o.observe(n)):a.add(n)}}}))})(Themify);