{"version":3,"file":"Performance_Optimise.BnbYG9VT.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/0u9aPgZwTxM37IJCQRPE/5RBUNFEihaG9uedhip2H/Performance_Optimise.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";export function LazyLoadOnView(Component){return props=>{const ref=useRef(null);const[shouldRender,setShouldRender]=useState(false);useEffect(()=>{if(!ref.current||shouldRender)return;const observer=new IntersectionObserver(([entry])=>{if(entry.isIntersecting){setShouldRender(true);observer.disconnect();}},{root:null,rootMargin:\"300px 0px\",threshold:.01});observer.observe(ref.current);return()=>observer.disconnect();},[shouldRender]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{width:\"100%\",height:\"100%\"},children:shouldRender?/*#__PURE__*/_jsx(Component,{...props}):null});};}\nexport const __FramerMetadata__ = {\"exports\":{\"LazyLoadOnView\":{\"type\":\"reactHoc\",\"name\":\"LazyLoadOnView\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Performance_Optimise.map"],"mappings":"2HAAwF,SAAgB,EAAe,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAM,CAAC,EAAa,GAAiBC,EAAS,GAAM,CAAmT,OAAlT,MAAc,CAAC,GAAG,CAAC,EAAI,SAAS,EAAa,OAAO,IAAM,EAAS,IAAI,sBAAsB,CAAC,KAAS,CAAI,EAAM,iBAAgB,EAAgB,GAAK,CAAC,EAAS,YAAY,GAAI,CAAC,KAAK,KAAK,WAAW,YAAY,UAAU,IAAI,CAAC,CAA+B,OAA9B,EAAS,QAAQ,EAAI,QAAQ,KAAW,EAAS,YAAY,EAAG,CAAC,EAAa,CAAC,CAAqB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,CAAC,SAAS,EAA0B,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,KAAK,CAAC,mBAAlnB,IAA6C"}