{"version":3,"file":"Performance_Optimise.eRoa7gAM.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,IAAI,EAAO,CAAC,EAAa,GAAiBC,EAAS,EAAK,EAAoT,OAAlT,MAAc,CAAC,GAAG,CAAC,EAAI,SAAS,EAAa,OAAO,IAAM,EAAS,IAAI,sBAAsB,CAAC,KAAS,CAAI,EAAM,iBAAgB,EAAgB,EAAI,EAAE,EAAS,WAAW,EAAG,EAAE,CAAC,KAAK,KAAK,WAAW,YAAY,UAAU,GAAG,CAAC,EAAgC,OAA9B,EAAS,QAAQ,EAAI,OAAO,MAAY,EAAS,WAAW,CAAE,EAAE,CAAC,CAAY,CAAC,EAAsB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,MAAM,OAAO,OAAO,MAAM,EAAE,SAAS,EAA0B,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,EAAE,IAAI,CAAC,CAAE,CAAE,iBAAtnB,IAA6C"}