{"version":3,"file":"shared-lib.D5tYDQYC.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/L0Yd8I2D361CPSkyO1jH/HSU0iZNZ5c2vksnfEus6/ParticlesAnimation.js","https:/framerusercontent.com/modules/2eXt3CiFtyZqp3tRqg53/OONSE3NVvXnl1T7D0UUL/siteMetadata.js"],"sourcesContent":["// Moving particles component with customizable count, shape, colors, speed, size and opacity\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useInView}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ParticlesAnimation(props){const{particleCount=50,useImage=false,particleImage={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Particle\"},particleShape=\"circle\",colors=[\"#0099FF\",\"#8855FF\",\"#FF5588\"],speed=1,particleSize=4,opacity=.8}=props;const canvasRef=useRef(null);const animationRef=useRef();const particlesRef=useRef([]);const isStatic=useIsStaticRenderer();const isInView=useInView(canvasRef);const[imageLoaded,setImageLoaded]=useState(false);const imageRef=useRef();// Load image if using image particles\nuseEffect(()=>{if(useImage&&particleImage.src){const img=new Image;img.crossOrigin=\"anonymous\";img.onload=()=>{imageRef.current=img;startTransition(()=>setImageLoaded(true));};img.onerror=()=>{startTransition(()=>setImageLoaded(false));};img.src=particleImage.src;}},[useImage,particleImage.src]);// Initialize particles\nconst initializeParticles=(width,height)=>{const particles=[];for(let i=0;i<particleCount;i++){particles.push({id:i,x:Math.random()*width,y:Math.random()*height,vx:(Math.random()-.5)*speed,vy:(Math.random()-.5)*speed,size:particleSize+Math.random()*particleSize*.5,color:colors[Math.floor(Math.random()*colors.length)],opacity:opacity});}particlesRef.current=particles;};// Draw particle based on shape/image\nconst drawParticle=(ctx,particle)=>{ctx.save();ctx.globalAlpha=particle.opacity;if(useImage&&imageRef.current&&imageLoaded){try{ctx.drawImage(imageRef.current,particle.x-particle.size/2,particle.y-particle.size/2,particle.size,particle.size);}catch(error){// Fallback to circle if image fails\ndrawShape(ctx,particle);}}else{drawShape(ctx,particle);}ctx.restore();};const drawShape=(ctx,particle)=>{ctx.fillStyle=particle.color;switch(particleShape){case\"circle\":ctx.beginPath();ctx.arc(particle.x,particle.y,particle.size/2,0,Math.PI*2);ctx.fill();break;case\"square\":ctx.fillRect(particle.x-particle.size/2,particle.y-particle.size/2,particle.size,particle.size);break;case\"triangle\":ctx.beginPath();ctx.moveTo(particle.x,particle.y-particle.size/2);ctx.lineTo(particle.x-particle.size/2,particle.y+particle.size/2);ctx.lineTo(particle.x+particle.size/2,particle.y+particle.size/2);ctx.closePath();ctx.fill();break;case\"star\":ctx.beginPath();const outerRadius=particle.size/2;const innerRadius=outerRadius*.4;const spikes=5;let rot=Math.PI/2*3;let x=particle.x;let y=particle.y;const step=Math.PI/spikes;ctx.moveTo(particle.x,particle.y-outerRadius);for(let i=0;i<spikes;i++){x=particle.x+Math.cos(rot)*outerRadius;y=particle.y+Math.sin(rot)*outerRadius;ctx.lineTo(x,y);rot+=step;x=particle.x+Math.cos(rot)*innerRadius;y=particle.y+Math.sin(rot)*innerRadius;ctx.lineTo(x,y);rot+=step;}ctx.lineTo(particle.x,particle.y-outerRadius);ctx.closePath();ctx.fill();break;}};// Animation loop\nconst animate=()=>{const canvas=canvasRef.current;if(!canvas)return;const ctx=canvas.getContext(\"2d\");if(!ctx)return;const{width,height}=canvas;// Clear canvas\nctx.clearRect(0,0,width,height);// Update and draw particles\nparticlesRef.current.forEach(particle=>{// Update position\nparticle.x+=particle.vx;particle.y+=particle.vy;// Wrap around edges\nif(particle.x<0)particle.x=width;if(particle.x>width)particle.x=0;if(particle.y<0)particle.y=height;if(particle.y>height)particle.y=0;// Draw particle\ndrawParticle(ctx,particle);});if(isInView&&!isStatic){animationRef.current=requestAnimationFrame(animate);}};// Setup canvas and start animation\nuseEffect(()=>{const canvas=canvasRef.current;if(!canvas)return;const updateCanvasSize=()=>{const rect=canvas.getBoundingClientRect();canvas.width=rect.width;canvas.height=rect.height;initializeParticles(rect.width,rect.height);};updateCanvasSize();if(!isStatic&&isInView){animate();}else if(isStatic){// Draw static preview\nconst ctx=canvas.getContext(\"2d\");if(ctx){ctx.clearRect(0,0,canvas.width,canvas.height);particlesRef.current.forEach(particle=>{drawParticle(ctx,particle);});}}const resizeObserver=new ResizeObserver(updateCanvasSize);resizeObserver.observe(canvas);return()=>{if(animationRef.current){cancelAnimationFrame(animationRef.current);}resizeObserver.disconnect();};},[particleCount,speed,particleSize,opacity,colors,particleShape,useImage,imageLoaded,isInView,isStatic]);// Restart animation when in view changes\nuseEffect(()=>{if(isInView&&!isStatic&&!animationRef.current){animate();}else if(!isInView&&animationRef.current){cancelAnimationFrame(animationRef.current);animationRef.current=undefined;}},[isInView,isStatic]);return /*#__PURE__*/_jsx(\"canvas\",{ref:canvasRef,style:{width:\"100%\",height:\"100%\",display:\"block\",...props.style},\"aria-label\":\"Moving particles animation\"});}addPropertyControls(ParticlesAnimation,{particleCount:{type:ControlType.Number,title:\"Particle Count\",defaultValue:50,min:1,max:200,step:1},useImage:{type:ControlType.Boolean,title:\"Use Image\",defaultValue:false,enabledTitle:\"Image\",disabledTitle:\"Shape\"},particleImage:{type:ControlType.ResponsiveImage,title:\"Particle Image\",hidden:({useImage})=>!useImage},particleShape:{type:ControlType.Enum,title:\"Particle Shape\",options:[\"circle\",\"square\",\"triangle\",\"star\"],optionTitles:[\"Circle\",\"Square\",\"Triangle\",\"Star\"],defaultValue:\"circle\",displaySegmentedControl:true,hidden:({useImage})=>useImage},colors:{type:ControlType.Array,title:\"Colors\",control:{type:ControlType.Color},defaultValue:[\"#0099FF\",\"#8855FF\",\"#FF5588\"],maxCount:10,hidden:({useImage})=>useImage},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.1,max:5,step:.1},particleSize:{type:ControlType.Number,title:\"Particle Size\",defaultValue:4,min:.1,max:50,step:.1,unit:\"px\"},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.8,min:.1,max:1,step:.1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ParticlesAnimation\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ParticlesAnimation.map","// Generated by Framer (c2a8602)\nexport default function metadata(params,activeLocale){return{description:\"Revora AI is a modern Framer template for AI startups, B2B SaaS, sales analytics tools, CRM platforms, and data-driven businesses. Perfect for founders, startups, enterprises, and agencies who need a fast, credible online presence.\",favicon:\"https://framerusercontent.com/assets/N768BJsG2hPAGHS0HTygT6AS50.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/qmz9Rdtjrf5mMigled3sNYb2iDw.jpg\",title:\"Revora — AI SaaS & Sales Framer Template\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"qYAIG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,gBAAc,GAAG,WAAS,GAAM,gBAAc,CAAC,IAAI,sEAAsE,IAAI,WAAW,CAAC,gBAAc,SAAS,SAAO,CAAC,UAAU,UAAU,UAAU,CAAC,QAAM,EAAE,eAAa,EAAE,UAAQ,IAAI,EAAY,EAAUA,EAAO,KAAK,CAAO,EAAaA,GAAQ,CAAO,EAAaA,EAAO,EAAE,CAAC,CAAO,EAAS,GAAqB,CAAO,EAAS,EAAU,EAAU,CAAM,CAAC,EAAY,GAAgBC,EAAS,GAAM,CAAO,EAASD,GAAQ,CACphB,MAAc,CAAC,GA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