{"version":3,"file":"RandomGraphicsBackground.CwKeOxc4.mjs","names":["useState","__esmMin","init_ssg_sandbox_shims","te","window","_e","c","init_jsx_runtime","ce","init_npm_react_18_3_1","motion","AnimatePresence","addPropertyControls","init_framer_D6uXRwWs","ControlType","RandomGraphicsBackground","props","activeGraphic","setActiveGraphic","graphics","currentId","showGraphic","randomSrc","randomX","randomY","newGraphic","hideDelay","fadeDuration","interval","fadeOutTimer","totalCycleDuration","cycleTimer","graphicSize","init_RandomGraphicsBackground"],"sources":["https:/framerusercontent.com/modules/SOjBqazYyHgkblHcgBkK/8HM637PFJnOkf2wB6Fln/RandomGraphicsBackground.js"],"sourcesContent":["// Background module that displays random PNG or SVG graphics at random positions every few seconds with fade effect\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,motion,AnimatePresence}from\"framer\";/**\n * Random Graphics Background\n * \n * Displays random graphics at random positions across the entire background with fade effects\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function RandomGraphicsBackground(props){const{graphics=[\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\"],interval=3,fadeDuration=1,graphicSize=100}=props;const[activeGraphic,setActiveGraphic]=useState(null);useEffect(()=>{if(typeof window===\"undefined\"||graphics.length===0)return;let currentId=0;const showGraphic=()=>{const randomSrc=graphics[Math.floor(Math.random()*graphics.length)];const randomX=Math.random()*100;const randomY=Math.random()*100;const newGraphic={id:currentId++,src:randomSrc,x:randomX,y:randomY};startTransition(()=>{setActiveGraphic(newGraphic);});// Hide graphic after: fade-in + display time + fade-out\nconst hideDelay=(fadeDuration+interval)*1e3;const fadeOutTimer=setTimeout(()=>{startTransition(()=>{setActiveGraphic(null);});},hideDelay);return()=>clearTimeout(fadeOutTimer);};// Show first graphic immediately\nshowGraphic();// Then cycle: fade-in + display + fade-out + next graphic\nconst totalCycleDuration=(fadeDuration*2+interval)*1e3;const cycleTimer=setInterval(showGraphic,totalCycleDuration);return()=>{clearInterval(cycleTimer);};},[graphics,interval,fadeDuration]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(AnimatePresence,{children:activeGraphic&&/*#__PURE__*/_jsx(motion.img,{src:activeGraphic.src,alt:\"\",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:fadeDuration,ease:\"easeInOut\"},style:{position:\"absolute\",left:`${activeGraphic.x}%`,top:`${activeGraphic.y}%`,width:graphicSize,height:graphicSize,objectFit:\"contain\",transform:`translate(-50%, -50%)`}},activeGraphic.id)})});}addPropertyControls(RandomGraphicsBackground,{graphics:{type:ControlType.Array,title:\"Graphics\",control:{type:ControlType.File,allowedFileTypes:[\"png\",\"svg\",\"jpg\",\"jpeg\",\"gif\",\"webp\"]},defaultValue:[\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\"],maxCount:10},interval:{type:ControlType.Number,title:\"Interval\",defaultValue:3,min:.5,max:10,step:.5,unit:\"s\"},fadeDuration:{type:ControlType.Number,title:\"Fade Duration\",defaultValue:1,min:.5,max:5,step:.5,unit:\"s\"},graphicSize:{type:ControlType.Number,title:\"Graphic Size\",defaultValue:100,min:50,max:500,step:10,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RandomGraphicsBackground\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth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