{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/rz6NkQ78vr1Ql2eLSLkY/oHwptYUJYcBNmrA8IB7H/Framebeam.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";import{motion,useAnimation}from\"framer-motion\";//Code component provided by Eleveight Supply\u2122. All rights reserved 2024.\n/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth 100%\n * @framerSupportedLayoutHeight 100%\n */export default function Framebeam({speed,borderWidth,beamLength,firstColor,secondColor,appearDelay,connectedFrame,radius,colorMode,rotationDirection,sizeBehaviour}){const animationControl=useAnimation();const getGradientDefinition=(firstColor,secondColor,beamLength)=>{const fadeStart=100-beamLength;return`transparent ${fadeStart}%, ${secondColor}, ${firstColor} 100%`;};React.useEffect(()=>{const effectiveSecondColor=colorMode===\"Solid\"?firstColor:secondColor;const gradientDefinition=getGradientDefinition(firstColor,effectiveSecondColor,beamLength);animationControl.set({opacity:0});setTimeout(()=>{animationControl.start({opacity:[0,1],transition:{duration:1,ease:\"ease-in\"}});animationControl.start({background:[`conic-gradient(from 0deg at 50% 50%, ${gradientDefinition})`,`conic-gradient(from ${rotationDirection===\"CounterClockwise\"?\"360deg\":\"360deg\"} at 50% 50%, ${gradientDefinition})`],transition:{duration:31-speed,ease:\"linear\",repeat:Infinity}});},appearDelay*1e3);return()=>animationControl.stop();},[animationControl,speed,appearDelay,firstColor,secondColor,beamLength,colorMode,rotationDirection]);const renderContent=()=>{if(!connectedFrame||connectedFrame.length===0){return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:\"#221A34\",color:\"#fff\",borderRadius:\"20px\",zIndex:2,flexDirection:\"column\",textAlign:\"center\",padding:\"35px\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"80\",height:\"100\",viewBox:\"0 0 305 241\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M0 39C0 17.4609 17.4609 0 39 0H266C287.539 0 305 17.4609 305 39V202C305 223.539 287.539 241 266 241H39C17.4609 241 0 223.539 0 202V39Z\",fill:\"#9A66FF\",\"fill-opacity\":\"0.22\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M3 135L3 37C3 18.2223 18.2223 3.00004 37 3.00004L154.827 3.00003L251 3.00004\",stroke:\"url(#paint0_linear_830_1907)\",\"stroke-width\":\"5\",\"stroke-linecap\":\"square\"}),/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"linearGradient\",{id:\"paint0_linear_830_1907\",x1:\"251\",y1:\"5.85924\",x2:\"7.84388\",y2:\"105.944\",gradientUnits:\"userSpaceOnUse\",children:[/*#__PURE__*/_jsx(\"stop\",{\"stop-color\":\"#9A66FF\"}),/*#__PURE__*/_jsx(\"stop\",{offset:\"0.699384\",\"stop-color\":\"#E11FED\"}),/*#__PURE__*/_jsx(\"stop\",{offset:\"1\",\"stop-color\":\"#FF00E6\",\"stop-opacity\":\"0\"})]})})]}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"8px\",color:\"#8658D8\",fontWeight:\"normal\",fontSize:\"12px\",fontFamily:\"Inter, sans-serif\",textAlign:\"center\",width:\"300px\"},children:\"Connect to your frame, then adjust the various styling options from the property controls panel.\"})]});}else{const frameStyle=sizeBehaviour===\"Fit Frame\"?{}// No additional styling to fit frame\n:{width:\"100%\",height:\"100%\"}// Ensure connected frame fills the container\n;return connectedFrame.map((child,index)=>/*#__PURE__*/React.cloneElement(child,{key:index,style:{...frameStyle,...child.props.style}}));}};return /*#__PURE__*/_jsxs(Frame,{background:\"\",style:{width:sizeBehaviour===\"Fit Frame\"?\"auto\":\"100%\",height:sizeBehaviour===\"Fit Frame\"?\"auto\":\"100%\",overflow:\"hidden\",position:\"relative\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",borderRadius:`${radius}px`,padding:`${borderWidth}px`,boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",position:\"absolute\",top:0,left:0,right:0,bottom:0,backgroundSize:\"cover\",transform:rotationDirection===\"CounterClockwise\"?\"scaleX(-1)\":\"none\"},animate:animationControl}),renderContent()]});}Framebeam.defaultProps={speed:21,borderWidth:0,beamLength:50,firstColor:\"#8658D8\",secondColor:\"#E81CFF\",appearDelay:0,radius:20,direction:\"Right\",colorMode:\"Gradient\",rotationDirection:\"Clockwise\",sizeBehaviour:\"Fit Frame\"};addPropertyControls(Framebeam,{colorMode:{type:ControlType.SegmentedEnum,title:\"Color Mode\",options:[\"Solid\",\"Gradient\"],defaultValue:\"Gradient\"},firstColor:{type:ControlType.Color,title:\"First Color\"},secondColor:{type:ControlType.Color,title:\"Second Color\",hidden:({colorMode})=>colorMode===\"Solid\"},speed:{type:ControlType.Number,title:\"Speed\",min:1,max:30,displayStepper:true},rotationDirection:{type:ControlType.SegmentedEnum,title:\"Rotation\",options:[\"CounterClockwise\",\"Clockwise\"],optionTitles:[\"\u2190\",\"\u2192\"],defaultValue:\"Clockwise\"},beamLength:{type:ControlType.Number,title:\"Length\",min:0,max:100,unit:\"%\",displayStepper:true,defaultValue:50},borderWidth:{type:ControlType.Number,title:\"Thickness\",min:1,max:20,unit:\"px\",displayStepper:true},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:200,displayStepper:true,description:\"Set to (main frame radius *+* thickness)\"},appearDelay:{type:ControlType.Number,title:\"Appear\",min:0,max:10,step:.1,unit:\"s\",displayStepper:true,description:\"Set a delay before the beam appears.\"},connectedFrame:{type:ControlType.Array,title:\"Main Frame\",propertyControl:{type:ControlType.ComponentInstance}},sizeBehaviour:{type:ControlType.Enum,title:\"Sizing\",options:[\"Fill Container\",\"Fit Frame\"],optionTitles:[\"Fill Container\",\"Fit Frame\"],defaultValue:\"Fit Frame\",description:\"*Fit* has the component size itself based on the connected Frame while *Fill* has the connected Fame cover the entire component area\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Framebeam\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"200\",\"framerDisableUnlink\":\"*\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutWidth\":\"100%\",\"framerSupportedLayoutHeight\":\"100%\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Framebeam.map"],
  "mappings": "oGASkB,SAARA,EAA2B,CAAC,MAAAC,EAAM,YAAAC,EAAY,WAAAC,EAAW,WAAAC,EAAW,YAAAC,EAAY,YAAAC,EAAY,eAAAC,EAAe,OAAAC,EAAO,UAAAC,EAAU,kBAAAC,EAAkB,cAAAC,CAAa,EAAE,CAAC,IAAMC,EAAiBC,EAAa,EAAQC,EAAsB,CAACV,EAAWC,EAAYF,IAAmD,eAArB,IAAIA,CAAyC,MAAME,CAAW,KAAKD,CAAU,QAAgBW,EAAU,IAAI,CAAuE,IAAMC,EAAmBF,EAAsBV,EAA1FK,IAAY,QAAQL,EAAWC,EAA2FF,CAAU,EAAE,OAAAS,EAAiB,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,WAAW,IAAI,CAACA,EAAiB,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,KAAK,SAAS,CAAC,CAAC,EAAEA,EAAiB,MAAM,CAAC,WAAW,CAAC,wCAAwCI,CAAkB,IAAI,0CAA+FA,CAAkB,GAAG,EAAE,WAAW,CAAC,SAAS,GAAGf,EAAM,KAAK,SAAS,OAAO,GAAQ,CAAC,CAAC,CAAE,EAAEK,EAAY,GAAG,EAAQ,IAAIM,EAAiB,KAAK,CAAE,EAAE,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AAW,EAAE,aAAa,CAAC,SAAI,QAAG,EAAE,aAAa,WAAW,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,IAAI,EAAE,IAAI,IAAI,KAAK,IAAI,eAAe,GAAK,aAAa,EAAE,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,YAAY,IAAI,EAAE,IAAI,GAAG,KAAK,KAAK,eAAe,EAAI,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,IAAI,EAAE,IAAI,IAAI,eAAe,GAAK,YAAY,0CAA0C,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,IAAI,eAAe,GAAK,YAAY,sCAAsC,EAAE,eAAe,CAAC,KAAKA,EAAY,MAAM,MAAM,aAAa,gBAAgB,CAAC,KAAKA,EAAY,iBAAiB,CAAC,EAAE,cAAc,CAAC,KAAKA,EAAY,KAAK,MAAM,SAAS,QAAQ,CAAC,iBAAiB,WAAW,EAAE,aAAa,CAAC,iBAAiB,WAAW,EAAE,aAAa,YAAY,YAAY,uIAAuI,wBAAwB,GAAK,0BAA0B,UAAU,CAAC,CAAC",
  "names": ["Framebeam", "speed", "borderWidth", "beamLength", "firstColor", "secondColor", "appearDelay", "connectedFrame", "radius", "colorMode", "rotationDirection", "sizeBehaviour", "animationControl", "useAnimation", "getGradientDefinition", "ue", "gradientDefinition", "renderContent", "u", "p", "frameStyle", "child", "index", "q", "Frame", "motion", "addPropertyControls", "ControlType"]
}
