{"version":3,"file":"FloatingCTA.2H82yind.mjs","names":["useState","p"],"sources":["https:/framerusercontent.com/modules/fD114FPEFyQRwylU9uts/ejdpj7X3GEdTt9aMd62c/FloatingCTA.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createPortal}from\"react-dom\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";const ORANGE=\"rgb(255, 73, 1)\";const ORANGE_HOVER=\"rgb(230, 64, 0)\";const WHITE=\"rgb(255, 255, 255)\";const FONT='\"Clash Display\", \"DM Sans\", sans-serif';const HIDDEN_PATHS=[\"/waiting-list\",\"/privacy\",\"/terms\",\"/faq\"];const SCROLL_THRESHOLD=300;const MOBILE_BREAKPOINT=768;export default function FloatingCTA(props){const{hidden:forceHidden=false,target=\"/waiting-list\",messages=[\"Beta sign-up\",\"Join the waitlist\",\"Limited seats\"],speed=40}=props;const[mounted,setMounted]=useState(false);const[scrolled,setScrolled]=useState(false);const[pathHidden,setPathHidden]=useState(false);const[isMobile,setIsMobile]=useState(false);const[hovered,setHovered]=useState(false);useEffect(()=>{setMounted(true);const checkPath=()=>{const raw=window.location.pathname;const path=raw.replace(/\\/$/,\"\")||\"/\";setPathHidden(HIDDEN_PATHS.some(p=>path===p||path.startsWith(p+\"/\")));};const checkMobile=()=>setIsMobile(window.innerWidth<MOBILE_BREAKPOINT);const onScroll=()=>setScrolled(window.scrollY>SCROLL_THRESHOLD);checkPath();checkMobile();onScroll();window.addEventListener(\"popstate\",checkPath);window.addEventListener(\"resize\",checkMobile);window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>{window.removeEventListener(\"popstate\",checkPath);window.removeEventListener(\"resize\",checkMobile);window.removeEventListener(\"scroll\",onScroll);};},[]);if(!mounted)return null;if(pathHidden||forceHidden)return null;const height=isMobile?48:56;const fontSize=isMobile?12:14;const gap=isMobile?20:32;const liveWidth=isMobile?88:112;const arrowWidth=isMobile?52:64;const bg=hovered?ORANGE_HOVER:ORANGE;const list=Array.isArray(messages)&&messages.length>0?messages:[\"Join the waitlist\"];const row=/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap,paddingRight:gap},children:list.map((msg,i)=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:FONT,fontSize,fontWeight:700,letterSpacing:\"0.05em\",textTransform:\"uppercase\",color:WHITE,whiteSpace:\"nowrap\"},children:msg}),/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:FONT,fontSize,fontWeight:500,color:WHITE,opacity:.65,flexShrink:0},children:\"—\"})]},i))});const handleClick=e=>{if(/^https?:\\/\\//i.test(target))return;e.preventDefault();window.location.assign(target);};const arrow=/*#__PURE__*/_jsx(\"svg\",{width:isMobile?18:22,height:isMobile?18:22,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":true,children:/*#__PURE__*/_jsx(\"path\",{d:\"M4 12H20M20 12L14 6M20 12L14 18\",stroke:WHITE,strokeWidth:\"1.75\",strokeLinecap:\"square\"})});const bar=/*#__PURE__*/_jsxs(\"a\",{href:target,onClick:handleClick,onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),\"aria-label\":\"Join the Seen Live waitlist\",style:{position:\"fixed\",left:0,right:0,bottom:0,height,backgroundColor:bg,textDecoration:\"none\",zIndex:9999,opacity:scrolled?1:0,pointerEvents:scrolled?\"auto\":\"none\",transition:\"opacity 0.35s ease, background-color 0.2s ease\",boxShadow:\"0 -4px 16px rgba(0,0,0,0.08)\",overflow:\"hidden\",display:\"block\",cursor:\"pointer\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",height:\"100%\",width:\"max-content\",paddingLeft:liveWidth+16,paddingRight:arrowWidth+16},children:/*#__PURE__*/_jsxs(motion.div,{style:{display:\"flex\",alignItems:\"center\"},animate:{x:[\"0%\",\"-50%\"]},transition:{duration:speed,ease:\"linear\",repeat:Infinity},children:[row,row,row,row]})}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",left:0,top:0,bottom:0,width:liveWidth,backgroundColor:bg,display:\"flex\",alignItems:\"center\",paddingLeft:isMobile?16:20,gap:10,zIndex:2,transition:\"background-color 0.2s ease\"},children:[/*#__PURE__*/_jsx(motion.span,{style:{display:\"inline-block\",width:9,height:9,borderRadius:\"50%\",backgroundColor:WHITE,flexShrink:0,boxShadow:\"0 0 8px rgba(255,255,255,0.55)\"},animate:{opacity:[1,.35,1]},transition:{duration:1.2,repeat:Infinity,ease:\"easeInOut\"}}),/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:FONT,fontSize:isMobile?11:12,fontWeight:700,letterSpacing:\"0.12em\",textTransform:\"uppercase\",color:WHITE},children:\"Live\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",right:0,top:0,bottom:0,width:arrowWidth,backgroundColor:bg,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:2,transition:\"background-color 0.2s ease, transform 0.2s ease\",transform:hovered?\"translateX(-2px)\":\"translateX(0)\"},children:arrow})]});return /*#__PURE__*/createPortal(bar,document.body);}addPropertyControls(FloatingCTA,{hidden:{type:ControlType.Boolean,title:\"Force hidden\",defaultValue:false},target:{type:ControlType.Link,title:\"Target\"},messages:{type:ControlType.Array,title:\"Messages\",control:{type:ControlType.String},defaultValue:[\"Beta sign-up\",\"Join the waitlist\",\"Limited seats\"]},speed:{type:ControlType.Number,title:\"Scroll duration (s)\",defaultValue:40,min:10,max:120,step:5}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FloatingCTA\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FloatingCTA.map"],"mappings":"2PAAye,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,OAAO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