{"version":3,"file":"SplashGradientButton.DG1FSEn2.mjs","names":["useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/f2Mz9OAz9y480bvujFfr/CqbP9e7RyOKJREqhkJPw/SplashGradientButton.js"],"sourcesContent":["// Button that navigates to pricing section with smooth scrolling on all device sizes\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo,useCallback}from\"react\";const blobTransition={repeat:Infinity,repeatType:\"mirror\",ease:\"easeInOut\"};const patterns=[{x:[\"-20%\",\"20%\",\"-10%\",\"10%\",\"-20%\"],y:[\"-20%\",\"10%\",\"20%\",\"-10%\",\"-20%\"],scale:[1,1.5,.8,1.2,1]},{x:[\"20%\",\"-20%\",\"10%\",\"-10%\",\"20%\"],y:[\"20%\",\"-10%\",\"-20%\",\"10%\",\"20%\"],scale:[.8,1.2,1.5,1,.8]},{x:[\"0%\",\"20%\",\"-20%\",\"0%\",\"0%\"],y:[\"-20%\",\"20%\",\"0%\",\"-20%\",\"-20%\"],scale:[1.2,.8,1.2,1.2,1.2]},{x:[\"-15%\",\"15%\",\"-15%\",\"15%\",\"-15%\"],y:[\"15%\",\"-15%\",\"15%\",\"-15%\",\"15%\"],scale:[.9,1.3,.9,1.3,.9]}];function getHashTargetId(link){if(!link)return\"\";const decodeHash=hash=>{if(!hash)return\"\";try{return decodeURIComponent(hash);}catch{return hash;}};try{const base=typeof window!==\"undefined\"?window.location.href:\"https://example.com\";const resolvedLink=new URL(link,base);return decodeHash(resolvedLink.hash.replace(/^#/,\"\"));}catch{const hashIndex=link.indexOf(\"#\");if(hashIndex===-1||hashIndex===link.length-1)return\"\";return decodeHash(link.slice(hashIndex+1));}}function normalizePathname(pathname){const normalized=pathname.replace(/\\/+$/,\"\");return normalized===\"\"?\"/\":normalized;}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function SplashGradientButton(props){const{text=\"Hover Me\",fontStyle={fontFamily:\"Inter\",fontSize:\"16px\",fontWeight:600,letterSpacing:\"-0.01em\",lineHeight:\"1.5em\"},textColor=\"#FFFFFF\",hoverTextColor=\"#FFFFFF\",gradientColors=[\"#FF0080\",\"#7928CA\",\"#FF4D4D\"],buttonBackgroundColor=\"#000000\",paddingTop=16,paddingRight=32,paddingBottom=16,paddingLeft=32,borderRadius=12,showIcon=false,icon='<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line><polyline points=\"12 5 19 12 12 19\"></polyline></svg>',iconPosition=\"Left\",gap=8,iconSize=20,link=\"#pricing\",style,onClick,...rest}=props;const safeColors=useMemo(()=>gradientColors&&gradientColors.length>0?gradientColors:[\"#FF0080\",\"#7928CA\",\"#FF4D4D\"],[gradientColors]);const hashTargetId=useMemo(()=>getHashTargetId(link),[link]);const resolvedHref=useMemo(()=>{if(!link)return link;if(!hashTargetId)return link;const isLocalHashOnly=link.trim().startsWith(\"#\")||/^\\/#.+/.test(link.trim());if(isLocalHashOnly){return`#${encodeURIComponent(hashTargetId)}`;}return link;},[hashTargetId,link]);const handleClick=useCallback(e=>{if(onClick){onClick(e);}if(typeof window===\"undefined\")return;if(!link||!hashTargetId)return;let resolvedLink;try{resolvedLink=new URL(link,window.location.href);}catch{return;}const currentUrl=new URL(window.location.href);const isSamePage=resolvedLink.origin===currentUrl.origin&&normalizePathname(resolvedLink.pathname)===normalizePathname(currentUrl.pathname);if(!isSamePage)return;const targetElement=document.getElementById(hashTargetId);if(targetElement){e.preventDefault();targetElement.scrollIntoView({behavior:\"smooth\",block:\"start\",inline:\"nearest\"});if(window.history&&window.history.pushState){window.history.pushState(null,\"\",`#${encodeURIComponent(hashTargetId)}`);}}},[hashTargetId,link,onClick]);const renderIcon=()=>{if(!showIcon||!icon)return null;const formattedIcon=icon.includes(\"<svg\")?icon.replace(/<svg/,'<svg style=\"width: 100%; height: 100%;\"'):icon;return /*#__PURE__*/_jsx(motion.div,{variants:{hover:{color:hoverTextColor}},transition:{duration:.3},style:{color:textColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:iconSize,height:iconSize,zIndex:2,flexShrink:0,userSelect:\"none\",WebkitUserSelect:\"none\"},dangerouslySetInnerHTML:{__html:formattedIcon}});};return /*#__PURE__*/_jsxs(motion.a,{href:resolvedHref,onClick:handleClick,whileHover:\"hover\",initial:\"rest\",animate:\"rest\",style:{...style,textDecoration:\"none\",position:\"relative\",overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",backgroundColor:buttonBackgroundColor,paddingTop,paddingRight,paddingBottom,paddingLeft,borderRadius:borderRadius,WebkitTapHighlightColor:\"transparent\",touchAction:\"manipulation\"},...rest,children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,zIndex:0,overflow:\"hidden\",borderRadius:borderRadius},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,overflow:\"hidden\",borderRadius:borderRadius},children:safeColors.map((color,index)=>/*#__PURE__*/_jsx(motion.div,{animate:patterns[index%patterns.length],transition:{...blobTransition,duration:4+index%4},style:{position:\"absolute\",top:\"-50%\",left:\"-50%\",width:\"200%\",height:\"200%\",background:`radial-gradient(circle at 50% 50%, ${color}, transparent 50%)`,filter:\"blur(20px)\"}},index))})}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:1,display:\"flex\",flexDirection:\"row\",gap:gap,alignItems:\"center\",justifyContent:\"center\"},children:[iconPosition===\"Left\"&&renderIcon(),/*#__PURE__*/_jsx(motion.span,{variants:{hover:{color:hoverTextColor}},transition:{duration:.3},style:{...fontStyle,color:textColor,position:\"relative\",zIndex:2,whiteSpace:\"nowrap\",userSelect:\"none\",WebkitUserSelect:\"none\"},children:text}),iconPosition===\"Right\"&&renderIcon()]})]});}addPropertyControls(SplashGradientButton,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hover Me\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"#pricing\"},fontStyle:{type:ControlType.Font,title:\"Typography\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:16,variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.5em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#FFFFFF\"},gradientColors:{type:ControlType.Array,title:\"Blob Colors\",defaultValue:[\"#FF0080\",\"#7928CA\",\"#FF4D4D\"],control:{type:ControlType.Color}},buttonBackgroundColor:{type:ControlType.Color,title:\"Bg Color\",defaultValue:\"#000000\"},showIcon:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:false},iconPosition:{type:ControlType.Enum,title:\"Position\",options:[\"Left\",\"Right\"],defaultValue:\"Left\",hidden:props=>!props.showIcon},icon:{type:ControlType.String,title:\"SVG Code\",displayTextArea:true,defaultValue:'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line><polyline points=\"12 5 19 12 12 19\"></polyline></svg>',hidden:props=>!props.showIcon},iconSize:{type:ControlType.Number,title:\"Icon Size\",min:8,max:100,defaultValue:20,displayStepper:true,hidden:props=>!props.showIcon},gap:{type:ControlType.Number,title:\"Gap\",min:0,max:100,defaultValue:8,displayStepper:true,hidden:props=>!props.showIcon},paddingTop:{type:ControlType.Number,title:\"Top Pad\",min:0,max:100,defaultValue:16,displayStepper:true},paddingRight:{type:ControlType.Number,title:\"Right Pad\",min:0,max:100,defaultValue:32,displayStepper:true},paddingBottom:{type:ControlType.Number,title:\"Bottom Pad\",min:0,max:100,defaultValue:16,displayStepper:true},paddingLeft:{type:ControlType.Number,title:\"Left Pad\",min:0,max:100,defaultValue:32,displayStepper:true},borderRadius:{type:ControlType.Number,title:\"Radius\",min:0,max:999,defaultValue:12,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SplashGradientButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SplashGradientButton.map"],"mappings":"kPAC6pB,SAAS,EAAgB,EAAK,CAAC,GAAG,CAAC,EAAK,MAAM,GAAG,IAAM,EAAW,GAAM,CAAC,GAAG,CAAC,EAAK,MAAM,GAAG,GAAG,CAAC,OAAO,mBAAmB,CAAI,CAAE,MAAM,CAAC,OAAO,CAAK,CAAC,EAAE,GAAG,CAAC,IAAM,EAAY,IAAS,OAAiC,sBAArB,EAAO,SAAS,KAAiE,OAAO,EAAW,IAAjC,IAAI,EAAK,CAAmC,CAAC,CAAC,KAAK,QAAQ,KAAK,EAAE,CAAC,CAAE,MAAM,CAAC,IAAM,EAAU,EAAK,QAAQ,GAAG,EAAwD,OAAnD,IAAY,IAAI,IAAY,EAAK,OAAO,EAAQ,GAAU,EAAW,EAAK,MAAM,EAAU,CAAC,CAAC,CAAE,CAAC,CAAC,SAAS,EAAkB,EAAS,CAAC,IAAM,EAAW,EAAS,QAAQ,OAAO,EAAE,EAAE,OAAO,IAAa,GAAG,IAAI,CAAW,CAGruC,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,OAAK,WAAW,YAAU,CAAC,WAAW,QAAQ,SAAS,OAAO,WAAW,IAAI,cAAc,UAAU,WAAW,OAAO,EAAE,YAAU,UAAU,iBAAe,UAAU,iBAAe,CAAC,UAAU,UAAU,SAAS,EAAE,wBAAsB,UA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