{"version":3,"file":"PreloaderConnector.DTYR7TTz.mjs","names":["React.useState","__esmMin","z","init_npm_react_18_3_1","_e","K","c","init_jsx_runtime","ce","RenderTarget","init_framer_Bf4_tcb2","addPropertyControls","ControlType","PreLoaderConnector","props","renderKey","setRenderKey","isInteractive","setIsInteractive","handleVisibilityChange","prev","timer","containerStyle","frameWrapperStyle","frameStyle","safeFrames","connectedFrame","hasFrames","frame","index","init_PreloaderConnector"],"sources":["https:/framerusercontent.com/modules/gEGIzbUkGRw5sApmwpxD/GOtNJ449FuI9tzHtHBqs/PreloaderConnector.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";export function PreLoaderConnector(props){const{connectedFrame}=props;const[renderKey,setRenderKey]=React.useState(0);const[isInteractive,setIsInteractive]=React.useState(true);React.useEffect(()=>{if(RenderTarget.current()===RenderTarget.canvas)return;const handleVisibilityChange=()=>{if(document.visibilityState===\"visible\"){setRenderKey(prev=>prev+1);const timer=setTimeout(()=>{setIsInteractive(false);},2e3);document.removeEventListener(\"visibilitychange\",handleVisibilityChange);return()=>clearTimeout(timer);}};if(document.visibilityState===\"visible\"){const timer=setTimeout(()=>setIsInteractive(false),2e3);return()=>clearTimeout(timer);}else{document.addEventListener(\"visibilitychange\",handleVisibilityChange);}return()=>document.removeEventListener(\"visibilitychange\",handleVisibilityChange);},[]);if(RenderTarget.current()===RenderTarget.canvas){return null;}const containerStyle={position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:9999,background:\"transparent\",pointerEvents:isInteractive?\"all\":\"none\"};const frameWrapperStyle={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"};const frameStyle={width:\"100%\",height:\"100%\",objectFit:\"cover\"};const safeFrames=Array.isArray(connectedFrame)?connectedFrame:[];const hasFrames=safeFrames.length>0;return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:hasFrames&&safeFrames.map((frame,index)=>{if(!/*#__PURE__*/React.isValidElement(frame))return null;return /*#__PURE__*/_jsx(\"div\",{style:frameWrapperStyle,children:/*#__PURE__*/React.cloneElement(frame,{style:frameStyle})},`frame-${index}-${renderKey}`);})});}addPropertyControls(PreLoaderConnector,{connectedFrame:{type:ControlType.Array,title:\"Connect Frame\",propertyControl:{type:ControlType.ComponentInstance}}});\nexport const __FramerMetadata__ = {\"exports\":{\"PreLoaderConnector\":{\"type\":\"reactComponent\",\"name\":\"PreLoaderConnector\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PreloaderConnector.map"],"mappings":"A,uMAAwI,SAAgBa,EAAmB,EAAM,CAAC,GAAK,CAAC,kBAAgBC,EAAW,CAACC,EAAUC,GAAchB,EAAe,CAAC,EAAO,CAACiB,EAAcC,GAAkBlB,EAAe,EAAI,EAA2nB,GAAznBQ,MAAoB,CAAC,GAAGC,EAAa,QAAQ,IAAIA,EAAa,OAAO,OAAO,IAAMU,MAA2B,CAAC,GAAG,SAAS,kBAAkB,UAAU,CAACH,EAAa,GAAMI,EAAK,CAAC,EAAE,IAAMC,EAAM,eAAe,CAACH,EAAiB,EAAK,CAAE,EAAE,GAAG,EAA0E,OAAxE,SAAS,oBAAoB,mBAAmBC,CAAsB,MAAY,aAAaE,CAAK,CAAE,CAAC,EAAE,GAAG,SAAS,kBAAkB,UAAU,CAAC,IAAMA,EAAM,eAAeH,EAAiB,EAAK,EAAE,GAAG,EAAE,UAAU,aAAaG,CAAK,CAAE,CAA4E,OAAtE,SAAS,iBAAiB,mBAAmBF,CAAsB,MAAa,SAAS,oBAAoB,mBAAmBA,CAAsB,CAAE,EAAE,CAAC,CAAC,EAAKV,EAAa,QAAQ,IAAIA,EAAa,OAAQ,OAAO,KAAM,IAAMa,EAAe,CAAC,SAAS,QAAQ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