{"version":3,"file":"LineageAIHero.C5iO2AWm.mjs","names":["useRef","gsap"],"sources":["https:/framerusercontent.com/modules/vKbUpMI6LTo222JUXRND/BT6L1fuwGQlFgnrf7Gkg/LineageAIHero.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{gsap}from\"gsap\";import{addPropertyControls,ControlType}from\"framer\";export default function ExpandingAnimation({shape=\"square\"}){const containerRef=useRef(null);const animationRef=useRef(null);const colors={blue:\"#5095EE\",navy:\"#1F1C41\",gold:\"#A57A3A\",red:\"#DB1A4D\",gray:\"rgba(190, 190, 202, 1)\"};// Define elements with different sizes and positions\nconst elements=[{color:colors.red,size:\"20%\",top:\"18%\",left:\"22%\"},{color:colors.gold,size:\"15%\",top:\"70%\",left:\"30%\"},{color:\"rgba(190, 190, 202, 0.4)\",size:\"25%\",top:\"36%\",left:\"45%\"},{color:colors.navy,size:\"28%\",top:\"12%\",left:\"65%\"},{color:colors.blue,size:\"34%\",top:\"55%\",left:\"55%\"},{color:\"rgba(190, 190, 202, 0.25)\",size:\"22%\",top:\"55%\",left:\"15%\"}];useEffect(()=>{// Initialize animation\nconst initAnimation=()=>{const shapeElements=document.querySelectorAll(\".shape\");if(shape===\"square\"){// Square animation (bar to square)\n// Set initial state\ngsap.set(shapeElements,{width:\"6px\",opacity:0,y:60});// Create animation timeline\nconst tl=gsap.timeline();animationRef.current=tl;// First bring in the squares\ntl.to(shapeElements,{opacity:1,y:0,duration:.4,ease:\"power3.out\"});// Then expand them to squares all at once\ntl.to(shapeElements,{width:(i,target)=>{// Get the height of each square from its computed style\nconst computedStyle=window.getComputedStyle(target);return computedStyle.height;},duration:.5,ease:\"power3.inOut\",stagger:.08},\"<0.1\");}else{// Circle animation (scale and opacity)\n// Set initial state\ngsap.set(shapeElements,{scale:.2,opacity:0});// Create animation timeline\nconst tl=gsap.timeline();animationRef.current=tl;// Animate circles with scale and opacity\ntl.to(shapeElements,{scale:1,opacity:1,duration:1.2,ease:\"power2.out\",stagger:.08});}};// Cleanup previous animations\nconst cleanup=()=>{if(animationRef.current){animationRef.current.kill();}gsap.killTweensOf(\".shape\");};// Add resize observer to handle container size changes\nconst resizeObserver=new ResizeObserver(()=>{cleanup();gsap.delayedCall(.1,initAnimation);});const container=containerRef.current;if(container){resizeObserver.observe(container);gsap.delayedCall(.5,initAnimation);}return()=>{cleanup();if(container){resizeObserver.unobserve(container);}};},[shape])// Re-run effect when shape changes\n;return /*#__PURE__*/_jsxs(\"div\",{className:\"animation-wrapper\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"shapes-container\",ref:containerRef,children:elements.map((element,index)=>{// For circles, we need to calculate dimensions that maintain aspect ratio\nconst circleStyle=shape===\"circle\"?{// Size based on the smaller dimension of the container (min of width/height)\nwidth:element.size,// Use vmin units to ensure circles stay circular regardless of container aspect ratio\npaddingBottom:shape===\"circle\"?element.size:null,borderRadius:\"50%\"}:{// Square styling\nheight:element.size,width:\"6px\",borderRadius:\"2px\"};return /*#__PURE__*/_jsx(\"div\",{className:\"shape\",style:{...circleStyle,backgroundColor:element.color,position:\"absolute\",top:element.top,left:element.left}},index);})}),/*#__PURE__*/_jsx(\"style\",{jsx:true,children:`\n        .animation-wrapper {\n          width: 100%;\n          height: 100%;\n          min-width: 300px;\n          min-height: 300px;\n          display: flex;\n          justify-content: center;\n          align-items: center;\n        }\n        \n        .shapes-container {\n          position: relative;\n          width: 100%;\n          height: 100%;\n          aspect-ratio: 1 / 1;\n          min-width: 300px;\n          min-height: 300px;\n          border-radius: 4px;\n          overflow: hidden;\n        }\n        \n        .shape {\n          position: absolute;\n          transition: border-radius 0.3s ease;\n        }\n        \n        .square {\n          border-radius: 2px;\n        }\n        \n        .circle {\n          border-radius: 50%;\n        }\n        \n        .shape:hover {\n          opacity: 0.9;\n          transform: scale(1.05);\n          transition: transform 0.3s ease, opacity 0.3s ease;\n        }\n        \n        @media (max-width: 768px) {\n          .square {\n            border-radius: 1px;\n          }\n        }\n      `})]});}// Add Framer property controls\naddPropertyControls(ExpandingAnimation,{shape:{type:ControlType.Enum,title:\"Shape\",options:[\"square\",\"circle\"],defaultValue:\"square\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ExpandingAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LineageAIHero.map"],"mappings":"8PAAwK,SAAwB,EAAmB,CAAC,QAAM,UAAU,CAAC,IAAM,EAAaA,EAAO,KAAK,CAAO,EAAaA,EAAO,KAAK,CAAO,EAAO,CAAC,KAAK,UAAU,KAAK,UAAU,KAAK,UAAU,IAAI,UAAU,KAAK,yBAAyB,CACtY,EAAS,CAAC,CAAC,MAAM,EAAO,IAAI,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,EAAO,KAAK,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,2BAA2B,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,EAAO,KAAK,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,EAAO,KAAK,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,4BAA4B,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAcrW,OAdsW,MAAc,CACrX,IAAM,MAAkB,CAAC,IAAM,EAAc,SAAS,iBAAiB,SAAS,CAAC,GAAG,IAAQ,SAAS,CAErG,EAAK,IAAI,EAAc,CAAC,MAAM,MAAM,QAAQ,EAAE,EAAE,GAAG,CAAC,CACpD,IAAM,EAAGC,EAAK,UAAU,CAAC,EAAa,QAAQ,EAC9C,EAAG,GAAG,EAAc,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,GAAG,KAAK,aAAa,CAAC,CAClE,EAAG,GAAG,EAAc,CAAC,OA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