{"version":3,"file":"ImageTicker.CEouW7WM.mjs","names":["useRef","useState","__esmMin","init_ssg_sandbox_shims","te","window","_e","p","ce","init_npm_react_18_3_1","de","useAnimationFrame","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_DDfsYcI0","ControlType","ImageTicker","props","column1Ref","column2Ref","column3Ref","containerRef","offset1","offset2","offset3","isMobile","setIsMobile","estimatedWidth","setEstimatedWidth","checkMobile","movement","delta","speed","child","totalSetHeight","gap","column1Images","normalizedOffset","column2Images","column3Images","renderColumn","repeatedImages","columnImages","image","index","tiltAngle","init_ImageTicker","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/l64yZelOWAFQuoaZeHuZ/CUSrxsDg9LLNkaYhFzCU/ImageTicker.js"],"sourcesContent":["// 15 degree tilted ticker with 12 images in a 4x3 grid\n// 1st and 3rd columns move down, middle column moves up\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,startTransition,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useAnimationFrame}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImageTicker(props){const{column1Images,column2Images,column3Images,speed=1,gap=16,tiltAngle=15,borderRadius=12}=props;const column1Ref=useRef(null);const column2Ref=useRef(null);const column3Ref=useRef(null);const containerRef=useRef(null);// Use refs instead of state for animation values to avoid re-renders\nconst offset1=useRef(0);const offset2=useRef(0);const offset3=useRef(0);const[isMobile,setIsMobile]=useState(false);const[estimatedWidth,setEstimatedWidth]=useState(500);useEffect(()=>{if(typeof window===\"undefined\")return;const checkMobile=()=>{startTransition(()=>{setIsMobile(window.innerWidth<768);setEstimatedWidth(window.innerWidth<768?window.innerWidth*.66:window.innerWidth*.5);});};checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);},[]);// Use direct DOM manipulation instead of state updates for better performance\nuseAnimationFrame((time,delta)=>{const movement=delta/1e3*speed*50;offset1.current+=movement;offset2.current-=movement;offset3.current+=movement;// Update DOM directly without triggering React re-renders\nif(column1Ref.current){const child=column1Ref.current.querySelector(\"[data-column-content]\");if(child){const aspectRatio=472/333.77;const imageHeight=estimatedWidth/aspectRatio;const totalSetHeight=(imageHeight+gap)*column1Images.length;const normalizedOffset=(offset1.current%totalSetHeight+totalSetHeight)%totalSetHeight;child.style.transform=`translateY(${-normalizedOffset}px)`;}}if(column2Ref.current){const child=column2Ref.current.querySelector(\"[data-column-content]\");if(child){const aspectRatio=472/333.77;const imageHeight=estimatedWidth/aspectRatio;const totalSetHeight=(imageHeight+gap)*column2Images.length;const normalizedOffset=(offset2.current%totalSetHeight+totalSetHeight)%totalSetHeight;child.style.transform=`translateY(${-normalizedOffset}px)`;}}if(column3Ref.current){const child=column3Ref.current.querySelector(\"[data-column-content]\");if(child){const aspectRatio=472/333.77;const imageHeight=estimatedWidth/aspectRatio;const totalSetHeight=(imageHeight+gap)*column3Images.length;const normalizedOffset=(offset3.current%totalSetHeight+totalSetHeight)%totalSetHeight;child.style.transform=`translateY(${-normalizedOffset}px)`;}}});const renderColumn=columnImages=>{// Calculate based on aspect ratio\nconst aspectRatio=472/333.77;// Only render 3 copies instead of 20 for seamless looping\nconst repeatedImages=Array(3).fill(columnImages).flat();return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",height:\"100%\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{\"data-column-content\":true,style:{position:\"absolute\",top:0,left:0,width:\"100%\",willChange:\"transform\"},children:repeatedImages.map((image,index)=>/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",aspectRatio:`${aspectRatio}`,marginBottom:gap,borderRadius:borderRadius},children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius:borderRadius}})},index))})});};return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\",position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:gap,transform:`rotate(${tiltAngle}deg)`,height:isMobile?\"150vh\":\"200vh\",width:isMobile?\"200vw\":\"200vw\",willChange:\"transform\"},children:[/*#__PURE__*/_jsx(\"div\",{ref:column1Ref,style:{flex:1,minWidth:isMobile?\"52.8vw\":\"39.6vw\"},children:renderColumn(column1Images)}),/*#__PURE__*/_jsx(\"div\",{ref:column2Ref,style:{flex:1,minWidth:isMobile?\"52.8vw\":\"39.6vw\"},children:renderColumn(column2Images)}),/*#__PURE__*/_jsx(\"div\",{ref:column3Ref,style:{flex:1,minWidth:isMobile?\"52.8vw\":\"39.6vw\"},children:renderColumn(column3Images)})]})});}addPropertyControls(ImageTicker,{column1Images:{type:ControlType.Array,control:{type:ControlType.ResponsiveImage},title:\"Column 1 Images\",defaultValue:[{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1\"},{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Gradient 2\"},{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Gradient 3\"}]},column2Images:{type:ControlType.Array,control:{type:ControlType.ResponsiveImage},title:\"Column 2 Images\",defaultValue:[{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Gradient 4\"},{src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Gradient 5\"},{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1\"}]},column3Images:{type:ControlType.Array,control:{type:ControlType.ResponsiveImage},title:\"Column 3 Images\",defaultValue:[{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Gradient 2\"},{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Gradient 3\"},{src:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",alt:\"Gradient 4\"}]},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.1,max:5,step:.1},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},tiltAngle:{type:ControlType.Number,title:\"Tilt Angle\",defaultValue:15,min:-45,max:45,step:1,unit:\"deg\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:50,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageTicker\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageTicker.map"],"mappings":"A,2PAKG,SAAwBgB,EAAY,EAAM,CAAC,GAAK,CAAC,gBAAc,gBAAc,gBAAc,QAAM,EAAE,MAAI,GAAG,YAAU,GAAG,eAAa,IAAIC,EAAYC,EAAWlB,EAAO,IAAI,EAAQmB,EAAWnB,EAAO,IAAI,EAAQoB,EAAWpB,EAAO,IAAI,EAAQqB,EAAarB,EAAO,IAAI,EACnQsB,EAAQtB,EAAO,CAAC,EAAQuB,EAAQvB,EAAO,CAAC,EAAQwB,EAAQxB,EAAO,CAAC,EAAO,CAACyB,EAASC,GAAazB,EAAS,EAAK,EAAO,CAAC0B,EAAeC,GAAmB3B,EAAS,GAAG,EAAEO,MAAc,CAAC,GAAUH,IAAS,OAAY,OAAO,IAAMwB,MAAgB,CAACzB,MAAoB,CAACsB,EAAYrB,EAAO,WAAW,GAAG,EAAEuB,EAAkBvB,EAAO,WAAW,IAAIA,EAAO,WAAW,IAAIA,EAAO,WA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