{"version":3,"file":"Background.BNLuthMI.mjs","names":["React.useRef","React.useMemo","p"],"sources":["https:/framerusercontent.com/modules/gA4zV88ml64E2ibPDoH9/qWHKjczUHF0i9eKnTOQN/Background.js"],"sourcesContent":["// BackgroundGradientAnimation.framer.tsx\n// Framer-ready version of Aceternity's Background Gradient Animation\n// - Keeps the same props (colors, size, blendingValue, interactive)\n// - Cursor-follow works (smooth RAF loop)\n// - Works on Canvas + Preview (no Tailwind required)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const STYLE_ID=\"aceternity-bgga-styles\";function injectStylesOnce(){if(typeof document===\"undefined\")return;if(document.getElementById(STYLE_ID))return;const style=document.createElement(\"style\");style.id=STYLE_ID;style.innerHTML=`\n  /* Keyframes that mirror Aceternity's motion intents */\n  @keyframes bgga-moveHorizontal {\n    0%   { transform: translateX(-50%) translateY(-10%); }\n    50%  { transform: translateX(50%)  translateY(10%);  }\n    100% { transform: translateX(-50%) translateY(-10%); }\n  }\n  @keyframes bgga-moveInCircle {\n    0%   { transform: rotate(0deg); }\n    50%  { transform: rotate(180deg); }\n    100% { transform: rotate(360deg); }\n  }\n  @keyframes bgga-moveVertical {\n    0%   { transform: translateY(-50%); }\n    50%  { transform: translateY(50%);  }\n    100% { transform: translateY(-50%); }\n  }\n\n  .bgga_container {\n    position: relative;\n    width: 100%;\n    height: 100%;\n    overflow: hidden;\n    isolation: isolate;\n    background: linear-gradient(40deg, var(--gradient-background-start), var(--gradient-background-end));\n    flex: none; /* avoid auto-stacks collapsing height */\n  }\n\n  /* Blurred layer that holds all blobs + pointer */\n  .bgga_layer {\n    position: absolute;\n    inset: 0;\n    filter: url(#bgga-blur) blur(40px);\n    pointer-events: none;\n  }\n  /* Safari/Preview fallback: rely on plain blur if filter reference is flaky */\n  @supports (-webkit-hyphens:none) and (not (filter:url(#x))) {\n    .bgga_layer { filter: blur(60px); }\n  }\n\n  .bgga_dot {\n    position: absolute;\n    width: var(--size);\n    height: var(--size);\n    top: calc(50% - var(--size) / 2);\n    left: calc(50% - var(--size) / 2);\n    background-repeat: no-repeat;\n    mix-blend-mode: var(--blending-value);\n    transform-origin: center center;\n    opacity: 1;\n  }\n\n  /* Match Aceternity's 5 animated blobs */\n  .bgga_first  { animation: bgga-moveVertical 30s ease infinite; }\n  .bgga_second { animation: bgga-moveInCircle 20s reverse infinite; transform-origin: calc(50% - 400px); }\n  .bgga_third  { animation: bgga-moveInCircle 40s linear  infinite; transform-origin: calc(50% + 400px); }\n  .bgga_fourth { animation: bgga-moveHorizontal 40s ease infinite; transform-origin: calc(50% - 200px); opacity: 0.7; }\n  .bgga_fifth  { animation: bgga-moveInCircle 20s ease  infinite; transform-origin: calc(50% - 800px) calc(50% + 800px); }\n\n  .bgga_pointer {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    top: -50%;\n    left: -50%;\n    mix-blend-mode: var(--blending-value);\n    opacity: 0.7;\n    will-change: transform, background;\n    pointer-events: none;\n  }\n\n  .bgga_content {\n    position: relative;\n    z-index: 1; /* keep your text/images above the blobs */\n    width: 100%;\n    height: 100%;\n  }\n  `;document.head.appendChild(style);}export default function BackgroundGradientAnimation(props){const{width=1200,height=600,asTopHero=true,heroHeightVH=100,// SAME DEFAULTS as Aceternity UI component\ngradientBackgroundStart=\"rgb(108, 0, 162)\",gradientBackgroundEnd=\"rgb(0, 17, 82)\",firstColor=\"18, 113, 255\",secondColor=\"221, 74, 255\",thirdColor=\"100, 220, 255\",fourthColor=\"200, 50, 50\",fifthColor=\"180, 180, 50\",pointerColor=\"140, 100, 255\",size=\"80%\",blendingValue=\"hard-light\",interactive=true,children}=props;const containerRef=React.useRef(null);const pointerRef=React.useRef(null);React.useEffect(()=>{injectStylesOnce();},[]);// Per-instance CSS variables (instead of writing to document.body)\nconst cssVars=React.useMemo(()=>({[\"--gradient-background-start\"]:gradientBackgroundStart,[\"--gradient-background-end\"]:gradientBackgroundEnd,[\"--first-color\"]:firstColor,[\"--second-color\"]:secondColor,[\"--third-color\"]:thirdColor,[\"--fourth-color\"]:fourthColor,[\"--fifth-color\"]:fifthColor,[\"--pointer-color\"]:pointerColor,[\"--size\"]:size,[\"--blending-value\"]:blendingValue}),[gradientBackgroundStart,gradientBackgroundEnd,firstColor,secondColor,thirdColor,fourthColor,fifthColor,pointerColor,size,blendingValue]);// Cursor-follow (smooth RAF loop) — fixes the “doesn't move” issue\nconst target=React.useRef({x:0,y:0})// pixels relative to container\n;const cur=React.useRef({x:0,y:0});const onMouseMove=e=>{if(!interactive||!containerRef.current)return;const rect=containerRef.current.getBoundingClientRect();target.current.x=e.clientX-rect.left;target.current.y=e.clientY-rect.top;};React.useEffect(()=>{if(!interactive)return;let raf=0;const tick=()=>{// ease toward target\ncur.current.x+=(target.current.x-cur.current.x)/20;cur.current.y+=(target.current.y-cur.current.y)/20;if(pointerRef.current){pointerRef.current.style.transform=`translate(${Math.round(cur.current.x)}px, ${Math.round(cur.current.y)}px)`;}raf=requestAnimationFrame(tick);};raf=requestAnimationFrame(tick);return()=>cancelAnimationFrame(raf);},[interactive]);// Layout: full-width hero (scrolls away) or draggable frame size\nconst containerStyle={...cssVars,width:asTopHero?\"100%\":width,height:asTopHero?`${heroHeightVH}svh`:height};return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,className:\"bgga_container\",style:containerStyle,onMouseMove:onMouseMove,onMouseLeave:()=>{target.current={x:(containerRef.current?.clientWidth||0)/2,y:(containerRef.current?.clientHeight||0)/2};},children:[/*#__PURE__*/_jsx(\"svg\",{width:\"0\",height:\"0\",style:{position:\"absolute\"},children:/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"filter\",{id:\"bgga-blur\",children:[/*#__PURE__*/_jsx(\"feGaussianBlur\",{in:\"SourceGraphic\",stdDeviation:\"10\",result:\"blur\"}),/*#__PURE__*/_jsx(\"feColorMatrix\",{in:\"blur\",mode:\"matrix\",values:\"1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 18 -8\",result:\"goo\"}),/*#__PURE__*/_jsx(\"feBlend\",{in:\"SourceGraphic\",in2:\"goo\"})]})})}),/*#__PURE__*/_jsx(\"div\",{className:\"bgga_content\",children:children}),/*#__PURE__*/_jsxs(\"div\",{className:\"bgga_layer\",\"aria-hidden\":true,children:[/*#__PURE__*/_jsx(\"div\",{className:\"bgga_dot bgga_first\",style:{background:`radial-gradient(circle at center, rgb(var(--first-color)) 0, rgb(var(--first-color)) 50%)`}}),/*#__PURE__*/_jsx(\"div\",{className:\"bgga_dot bgga_second\",style:{background:`radial-gradient(circle at center, rgba(var(--second-color), 0.8) 0, rgba(var(--second-color), 0) 50%)`}}),/*#__PURE__*/_jsx(\"div\",{className:\"bgga_dot bgga_third\",style:{background:`radial-gradient(circle at center, rgba(var(--third-color), 0.8) 0, rgba(var(--third-color), 0) 50%)`}}),/*#__PURE__*/_jsx(\"div\",{className:\"bgga_dot bgga_fourth\",style:{background:`radial-gradient(circle at center, rgba(var(--fourth-color), 0.8) 0, rgba(var(--fourth-color), 0) 50%)`}}),/*#__PURE__*/_jsx(\"div\",{className:\"bgga_dot bgga_fifth\",style:{background:`radial-gradient(circle at center, rgba(var(--fifth-color), 0.8) 0, rgba(var(--fifth-color), 0) 50%)`}}),interactive&&/*#__PURE__*/_jsx(\"div\",{ref:pointerRef,className:\"bgga_pointer\",style:{background:`radial-gradient(circle at center, rgba(var(--pointer-color), 0.8) 0, rgba(var(--pointer-color), 0) 50%)`}})]})]});}/* Draggable by default on Canvas */BackgroundGradientAnimation.defaultProps={width:1200,height:600,asTopHero:true,heroHeightVH:100,// Aceternity defaults\ngradientBackgroundStart:\"rgb(108, 0, 162)\",gradientBackgroundEnd:\"rgb(0, 17, 82)\",firstColor:\"18, 113, 255\",secondColor:\"221, 74, 255\",thirdColor:\"100, 220, 255\",fourthColor:\"200, 50, 50\",fifthColor:\"180, 180, 50\",pointerColor:\"140, 100, 255\",size:\"80%\",blendingValue:\"hard-light\",interactive:true};addPropertyControls(BackgroundGradientAnimation,{asTopHero:{type:ControlType.Boolean,title:\"Top Hero Section\",defaultValue:true},heroHeightVH:{type:ControlType.Number,title:\"Hero Height (vh)\",min:40,max:200,defaultValue:100,hidden:p=>!p.asTopHero},interactive:{type:ControlType.Boolean,title:\"Cursor Reactive\",defaultValue:true},gradientBackgroundStart:{type:ControlType.Color,title:\"BG Start\",defaultValue:\"#6C00A2\"},gradientBackgroundEnd:{type:ControlType.Color,title:\"BG End\",defaultValue:\"#001152\"},firstColor:{type:ControlType.String,title:\"Blob 1 (r,g,b)\",defaultValue:\"18, 113, 255\"},secondColor:{type:ControlType.String,title:\"Blob 2 (r,g,b)\",defaultValue:\"221, 74, 255\"},thirdColor:{type:ControlType.String,title:\"Blob 3 (r,g,b)\",defaultValue:\"100, 220, 255\"},fourthColor:{type:ControlType.String,title:\"Blob 4 (r,g,b)\",defaultValue:\"200, 50, 50\"},fifthColor:{type:ControlType.String,title:\"Blob 5 (r,g,b)\",defaultValue:\"180, 180, 50\"},pointerColor:{type:ControlType.String,title:\"Pointer (r,g,b)\",defaultValue:\"140, 100, 255\"},size:{type:ControlType.String,title:\"Blob Size\",defaultValue:\"80%\"},blendingValue:{type:ControlType.Enum,title:\"Blend\",options:[\"hard-light\",\"soft-light\",\"screen\",\"overlay\",\"normal\"],optionTitles:[\"Hard Light\",\"Soft Light\",\"Screen\",\"Overlay\",\"Normal\"],defaultValue:\"hard-light\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackgroundGradientAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Background.map"],"mappings":"yRAKiL,SAAS,GAAkB,CAAyC,GAArC,OAAO,SAAW,KAAsB,SAAS,eAAe,EAAS,CAAC,OAAO,IAAM,EAAM,SAAS,cAAc,QAAQ,CAAC,EAAM,GAAG,EAAS,EAAM,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