{"version":3,"file":"Lazyload.HiGRjeBk.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,IAAI,EAA+5B,OAA75B,MAAc,CAAC,IAAM,MAAqB,CAAK,EAAW,SAAgF,EAAxC,QAAQ,iBAAiB,aAAqB,CAAC,CAAC,QAAQ,GAAQ,CAAY,EAAO,sBAA6C,CAAC,CAAC,IAAI,EAAO,YAAY,KAAoB,EAAO,aAAa,UAAU,MAAM,EAAE,EAAO,aAAa,WAAW,OAAO,GAAQ,EAAO,aAAa,UAAU,OAAO,CAAG,CAAC,CAAE,EAAE,EAAiB,EAAE,IAAM,EAAS,IAAI,qBAAqB,CAAC,EAAiB,CAAE,CAAC,EAAoP,OAA/O,EAAW,SAAS,EAAS,QAAQ,EAAW,QAAQ,CAAC,UAAU,GAAK,QAAQ,EAAI,CAAC,EAAG,EAAO,iBAAiB,OAAO,CAAgB,EAAE,EAAO,iBAAiB,SAAS,CAAgB,EAAE,EAAO,iBAAiB,SAAS,CAAgB,MAAY,CAAC,EAAS,WAAW,EAAE,EAAO,oBAAoB,OAAO,CAAgB,EAAE,EAAO,oBAAoB,SAAS,CAAgB,EAAE,EAAO,oBAAoB,SAAS,CAAgB,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,MAAM,CAAC,IAAI,EAAW,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAE,CAAE,qBAA9nC,IAAoC"}