{"version":3,"file":"Lazyload.CXSVPR3O.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/LlPAAuFkHWtpSTZo21eg/c7fgsZHQ90AKdStDfkyC/Lazyload.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";export function withLazyLoading(Component){return props=>{const wrapperRef=useRef(null);useEffect(()=>{const applyLazyLoading=()=>{if(!wrapperRef.current)return;const targets=wrapperRef.current.querySelectorAll(\"img, iframe\");targets.forEach(target=>{const rect=target.getBoundingClientRect();const isOffscreen=rect.top>window.innerHeight+100;if(isOffscreen){target.setAttribute(\"loading\",\"lazy\");target.setAttribute(\"decoding\",\"async\");}else{target.setAttribute(\"loading\",\"eager\");}});};applyLazyLoading();const observer=new MutationObserver(()=>{applyLazyLoading();});if(wrapperRef.current){observer.observe(wrapperRef.current,{childList:true,subtree:true});}window.addEventListener(\"load\",applyLazyLoading);window.addEventListener(\"resize\",applyLazyLoading);window.addEventListener(\"scroll\",applyLazyLoading);return()=>{observer.disconnect();window.removeEventListener(\"load\",applyLazyLoading);window.removeEventListener(\"resize\",applyLazyLoading);window.removeEventListener(\"scroll\",applyLazyLoading);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:wrapperRef,children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withLazyLoading\":{\"type\":\"reactHoc\",\"name\":\"withLazyLoading\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Lazyload.map"],"mappings":"kIAA+E,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAWA,EAAO,KAAK,CAA85B,OAA75B,MAAc,CAAC,IAAM,MAAqB,CAAK,EAAW,SAA6B,EAAW,QAAQ,iBAAiB,cAAc,CAAS,QAAQ,GAAQ,CAAY,EAAO,uBAAuB,CAAwB,IAAI,EAAO,YAAY,KAAoB,EAAO,aAAa,UAAU,OAAO,CAAC,EAAO,aAAa,WAAW,QAAQ,EAAO,EAAO,aAAa,UAAU,QAAQ,EAAI,EAAG,GAAkB,CAAC,IAAM,EAAS,IAAI,qBAAqB,CAAC,GAAkB,EAAG,CAAmP,OAA/O,EAAW,SAAS,EAAS,QAAQ,EAAW,QAAQ,CAAC,UAAU,GAAK,QAAQ,GAAK,CAAC,CAAE,EAAO,iBAAiB,OAAO,EAAiB,CAAC,EAAO,iBAAiB,SAAS,EAAiB,CAAC,EAAO,iBAAiB,SAAS,EAAiB,KAAW,CAAC,EAAS,YAAY,CAAC,EAAO,oBAAoB,OAAO,EAAiB,CAAC,EAAO,oBAAoB,SAAS,EAAiB,CAAC,EAAO,oBAAoB,SAAS,EAAiB,GAAK,EAAE,CAAC,CAAqB,EAAK,MAAM,CAAC,IAAI,EAAW,SAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,CAAC,uBAA1nC,IAAoC"}