((e,t)=>{"use strict";let l,o,a,r=e.h,i=null;const s="builder-zoom-scrolling",n=new Set,m=new Set,u=()=>{requestAnimationFrame((()=>{for(let e of n)e.isConnected?e.classList.contains(s)&&d(e):n.delete(e)}))},c=e=>"zoom"===getComputedStyle(e).getPropertyValue("--tbBg"),f=b=>{b&&(r=b.h,clearTimeout(a),a=setTimeout((()=>{cancelAnimationFrame(o),o=requestAnimationFrame((()=>{const r=(e=>{const t=themify_vars.breakpoints;let l="desktop";return e<=t.mobile?l="mobile":e<=t.tablet[1]?l="tablet":e<=t.tablet_landscape[1]&&(l="tablet_landscape"),l})(b.w);if(r!==l){l=r;for(let e of n)e.isConnected?c(e)?d(e):(e.classList.remove(s),e.classList.contains("builder-parallax-scrolling")||(e.style.backgroundSize=""),m.add(e),n.delete(e)):n.delete(e);for(let e of m)e.isConnected?c(e)&&(e.classList.add(s),n.add(e),m.delete(e),d(e)):m.delete(e);!1===e.is_builder_active&&0===m.size&&0===n.size&&(e.off("tfsmartresize",f),t.tfOff("scroll",u,{passive:!0,capture:!0}),i=null),o=a=null}}))}),40))},d=e=>{const t=e.getBoundingClientRect();t.bottom>=0&&t.top<=r&&(e.style.backgroundSize=140-(t.top+t.height)/(r+t.height)*40+"%")};e.on("builder_load_module_partial",((l,o)=>{let a;if(!0===o){if(!l.hasAttribute("data-zoom-bg"))return;a=[l]}else a=e.selectWithParent("[data-zoom-bg]",l);if(a.length>0){for(let t=a.length-1;t>-1;--t){let l=a[t];!1===e.is_builder_active&&l.removeAttribute("data-zoom-bg"),c(l)?(l.classList.add(s),n.add(l),d(l)):m.add(l)}null===i&&(i=!0,t.tfOn("scroll",u,{passive:!0,capture:!0}),e.on("tfsmartresize",f))}}))})(Themify,window);