{"version":3,"file":"LoadingAnimation.z8snsnVQ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/f9JBQhL8NV2GQN5br84P/as4lAIby3D7jGS99mv9K/LoadingAnimation.js"],"sourcesContent":["// Loading animation with logo fill effect that animates for a few seconds then disappears\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion,useAnimate}from\"framer-motion\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function LoadingAnimation(props){const{logo={src:\"https://framerusercontent.com/images/58Izwdf0QpKm528X84SdtuDHpnE.png\",alt:\"Logo\"},backgroundColor,logoColor,duration}=props;const[scope,animate]=useAnimate();const[isVisible,setIsVisible]=useState(true);useEffect(()=>{// Reset visibility when component mounts or props change\nstartTransition(()=>setIsVisible(true));const runAnimation=async()=>{// Animate the fill from 0% to 100% in 1.3 seconds\nawait animate(\"#logo-fill\",{clipPath:[\"inset(100% 0 0 0)\",\"inset(0% 0 0 0)\"]},{duration:1.3,ease:[.16,1,.3,1]});// Exit animation - slide sections up sequentially with logo synced to middle section\nconst sections=[0,1,2,3,4];// Animate all sections\nawait Promise.all([...sections.map(index=>animate(`#section-${index}`,{y:[0,\"-100vh\"]},{duration:.8,delay:index*.08,ease:[.85,0,.15,1]})),// Sync logo with section 2 (middle section)\nanimate(\"#logo-container\",{y:[0,\"-100vh\"]},{duration:.8,delay:2*.08,ease:[.85,0,.15,1]})]);// Wait for 3 seconds total from start, then fade to 0 opacity\nconst elapsed=1.3+.8+4*.08;const remainingTime=Math.max(0,3-elapsed);await new Promise(resolve=>setTimeout(resolve,remainingTime*1e3));// Fade entire component to 0 opacity\nawait animate(scope.current,{opacity:0},{duration:.5,ease:\"easeOut\"});// Hide the component after fade completes\nstartTransition(()=>setIsVisible(false));};runAnimation();},[animate,scope,duration,backgroundColor,logoColor,logo.src]);if(!isVisible)return null;return /*#__PURE__*/_jsxs(motion.div,{ref:scope,style:{position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\"},children:[[0,1,2,3,4].map(index=>/*#__PURE__*/_jsx(motion.div,{id:`section-${index}`,style:{position:\"absolute\",top:0,left:`${index*20}%`,width:\"20.5%\",height:\"100%\",backgroundColor,zIndex:1}},index)),/*#__PURE__*/_jsxs(\"div\",{id:\"logo-container\",style:{position:\"relative\",width:\"20%\",height:\"20%\",maxWidth:\"150px\",maxHeight:\"150px\",zIndex:2},children:[/*#__PURE__*/_jsx(\"img\",{src:logo.src,alt:logo.alt,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"contain\",opacity:.3}}),/*#__PURE__*/_jsx(motion.div,{id:\"logo-fill\",style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:logoColor,clipPath:\"inset(100% 0 0 0)\",WebkitMaskImage:`url(${logo.src})`,WebkitMaskSize:\"contain\",WebkitMaskRepeat:\"no-repeat\",WebkitMaskPosition:\"center\",maskImage:`url(${logo.src})`,maskSize:\"contain\",maskRepeat:\"no-repeat\",maskPosition:\"center\"}})]})]});}// Helper function to convert hex color to CSS filter\nfunction getColorFilter(color){// For simplicity, we'll use a basic approach\n// In production, you might want a more sophisticated color conversion\nreturn`drop-shadow(0 0 0 ${color})`;}addPropertyControls(LoadingAnimation,{logo:{type:ControlType.ResponsiveImage,title:\"Logo\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},logoColor:{type:ControlType.Color,title:\"Logo Color\",defaultValue:\"#FFFFFF\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:3,min:1,max:10,step:.5,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LoadingAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerS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