{"version":3,"file":"Form_v2.BMuFPYck.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/X8lJBrTmhhKx8fiL0yzG/pOw34FIBhZ4tX4WNi3TB/Form_v2.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function SocialCircleWaitlist(props){const{showName,nameLabel,emailLabel,namePlaceholder,emailPlaceholder,buttonLabel,submittingLabel,successMessage,redirectUrl,fontFamily,fontSize,radius,gap,textColor,labelColor,placeholderColor,inputBackground,inputBorderColor,focusBorderColor,buttonBackground,buttonTextColor,errorColor}=props;const[name,setName]=useState(\"\");const[email,setEmail]=useState(\"\");const[status,setStatus]=useState(\"idle\")// idle | submitting | success | error\n;const[error,setError]=useState(\"\");const[uid]=useState(()=>\"ac\"+Math.random().toString(36).slice(2,9));const submittingRef=useRef(false);const isValidEmail=value=>/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value);const handleSubmit=async e=>{e.preventDefault();if(submittingRef.current)return;if(!email||!isValidEmail(email)){setError(\"Please enter a valid email address.\");return;}setError(\"\");submittingRef.current=true;const params=new URLSearchParams;params.append(\"u\",\"15\");params.append(\"f\",\"15\");params.append(\"s\",\"\");params.append(\"c\",\"0\");params.append(\"m\",\"0\");params.append(\"act\",\"sub\");params.append(\"v\",\"2\");params.append(\"or\",\"cd632d68-adec-4302-9ccb-3ab7ac8ddac0\");if(showName)params.append(\"fullname\",name);params.append(\"email\",email);params.append(\"jsonp\",\"true\");const endpoint=\"https://scasey.activehosted.com/proc.php?\"+params.toString();try{if(redirectUrl){// Redirect flow: fire the subscription, then navigate.\n// No status change, so the button stays still until the\n// page actually changes — no flicker on press.\nawait fetch(endpoint,{method:\"GET\",mode:\"no-cors\"});window.location.href=redirectUrl;return;}// Inline flow (no redirect URL set): show submitting + success.\nsetStatus(\"submitting\");await fetch(endpoint,{method:\"GET\",mode:\"no-cors\"});setStatus(\"success\");}catch(err){submittingRef.current=false;setStatus(\"error\");setError(\"Something went wrong. Please try again.\");}};const baseFont=fontFamily||`\"Inter\", -apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"Helvetica Neue\", Helvetica, Arial, sans-serif`;const containerStyle={width:\"100%\",fontFamily:baseFont};const formStyle={display:\"flex\",flexDirection:\"column\",gap:gap,width:\"100%\",margin:0};const fieldStyle={display:\"flex\",flexDirection:\"column\",gap:8,width:\"100%\"};const labelStyle={fontSize:13,fontFamily:baseFont,fontWeight:500,lineHeight:1.2,color:labelColor,paddingLeft:2};const inputStyle={width:\"100%\",boxSizing:\"border-box\",padding:\"16px 18px\",fontSize:fontSize,fontFamily:baseFont,lineHeight:1.2,color:textColor,background:inputBackground,border:`1px solid ${inputBorderColor}`,borderRadius:radius,WebkitAppearance:\"none\",appearance:\"none\",outline:\"none\",transition:\"border-color 0.2s ease, background 0.2s ease\"};const buttonStyle={width:\"100%\",boxSizing:\"border-box\",padding:\"16px 18px\",marginTop:2,fontSize:fontSize,fontFamily:baseFont,fontWeight:600,lineHeight:1.2,color:buttonTextColor,background:buttonBackground,border:\"none\",borderRadius:radius,cursor:status===\"submitting\"?\"default\":\"pointer\",opacity:status===\"submitting\"?.6:1,WebkitAppearance:\"none\",appearance:\"none\",transition:\"opacity 0.2s ease\"};const errorStyle={color:errorColor,fontSize:13,lineHeight:1.4,paddingLeft:2,marginTop:-2};const successStyle={width:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",gap:10,color:textColor,fontSize:fontSize,fontFamily:baseFont,lineHeight:1.4};if(status===\"success\"){return /*#__PURE__*/_jsxs(\"div\",{style:successStyle,children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",fill:\"none\",style:{flexShrink:0},children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"10\",cy:\"10\",r:\"10\",fill:textColor}),/*#__PURE__*/_jsx(\"path\",{d:\"M5.5 10.2l3 3 6-6.4\",stroke:\"#000\",strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\",fill:\"none\"})]}),/*#__PURE__*/_jsx(\"span\",{children:successMessage})]});}return /*#__PURE__*/_jsxs(\"div\",{className:uid,style:containerStyle,children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .${uid} input::placeholder { color: ${placeholderColor}; opacity: 1; }\n                .${uid} input:focus { border-color: ${focusBorderColor} !important; }\n                @media (hover: hover) {\n                    .${uid} button:not(:disabled):hover { opacity: 0.85; }\n                }\n            `}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:formStyle,noValidate:true,children:[showName&&/*#__PURE__*/_jsxs(\"div\",{style:fieldStyle,children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:uid+\"-name\",style:labelStyle,children:nameLabel}),/*#__PURE__*/_jsx(\"input\",{id:uid+\"-name\",type:\"text\",value:name,onChange:e=>setName(e.target.value),placeholder:namePlaceholder,\"aria-label\":nameLabel,autoComplete:\"name\",style:inputStyle})]}),/*#__PURE__*/_jsxs(\"div\",{style:fieldStyle,children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:uid+\"-email\",style:labelStyle,children:emailLabel}),/*#__PURE__*/_jsx(\"input\",{id:uid+\"-email\",type:\"email\",inputMode:\"email\",value:email,onChange:e=>{setEmail(e.target.value);if(error)setError(\"\");},placeholder:emailPlaceholder,\"aria-label\":emailLabel,autoComplete:\"email\",style:inputStyle})]}),error&&/*#__PURE__*/_jsx(\"div\",{style:errorStyle,children:error}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:buttonStyle,disabled:status===\"submitting\",children:status===\"submitting\"?submittingLabel:buttonLabel})]})]});}SocialCircleWaitlist.defaultProps={showName:true,nameLabel:\"Full Name\",emailLabel:\"Email Address\",namePlaceholder:\"Type your name\",emailPlaceholder:\"Type your email\",buttonLabel:\"Join the waitlist\",submittingLabel:\"Joining…\",successMessage:\"You're on the list — check your inbox to confirm.\",redirectUrl:\"\",fontFamily:\"\",fontSize:15,radius:12,gap:14,textColor:\"#FFFFFF\",labelColor:\"#FFFFFF\",placeholderColor:\"rgba(255,255,255,0.4)\",inputBackground:\"rgba(255,255,255,0.05)\",inputBorderColor:\"rgba(255,255,255,0.14)\",focusBorderColor:\"rgba(255,255,255,0.5)\",buttonBackground:\"#FFFFFF\",buttonTextColor:\"#000000\",errorColor:\"#FF6B6B\"};addPropertyControls(SocialCircleWaitlist,{showName:{type:ControlType.Boolean,title:\"Name field\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},nameLabel:{type:ControlType.String,title:\"Name label\",defaultValue:\"Full Name\",hidden:props=>!props.showName},namePlaceholder:{type:ControlType.String,title:\"Name hint\",defaultValue:\"Type your name\",hidden:props=>!props.showName},emailLabel:{type:ControlType.String,title:\"Email label\",defaultValue:\"Email Address\"},emailPlaceholder:{type:ControlType.String,title:\"Email hint\",defaultValue:\"Type your email\"},buttonLabel:{type:ControlType.String,title:\"Button\",defaultValue:\"Join the waitlist\"},submittingLabel:{type:ControlType.String,title:\"Submitting\",defaultValue:\"Joining…\"},successMessage:{type:ControlType.String,title:\"Success\",defaultValue:\"You're on the list — check your inbox to confirm.\",displayTextArea:true},redirectUrl:{type:ControlType.String,title:\"Redirect URL\",defaultValue:\"\",placeholder:\"Optional thank-you page\"},fontFamily:{type:ControlType.String,title:\"Font\",defaultValue:\"\",placeholder:\"System (SF Pro)\"},fontSize:{type:ControlType.Number,title:\"Font size\",defaultValue:15,min:12,max:24,step:1,displayStepper:true},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:12,min:0,max:40,step:1},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:14,min:0,max:40,step:1},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},labelColor:{type:ControlType.Color,title:\"Label\",defaultValue:\"#FFFFFF\"},placeholderColor:{type:ControlType.Color,title:\"Placeholder\",defaultValue:\"rgba(255,255,255,0.4)\"},inputBackground:{type:ControlType.Color,title:\"Input fill\",defaultValue:\"rgba(255,255,255,0.05)\"},inputBorderColor:{type:ControlType.Color,title:\"Input border\",defaultValue:\"rgba(255,255,255,0.14)\"},focusBorderColor:{type:ControlType.Color,title:\"Focus border\",defaultValue:\"rgba(255,255,255,0.5)\"},buttonBackground:{type:ControlType.Color,title:\"Button fill\",defaultValue:\"#FFFFFF\"},buttonTextColor:{type:ControlType.Color,title:\"Button text\",defaultValue:\"#000000\"},errorColor:{type:ControlType.Color,title:\"Error\",defaultValue:\"#FF6B6B\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SocialCircleWaitlist\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Form_v2.map"],"mappings":"sMAAgJ,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,WAAS,YAAU,aAAW,kBAAgB,mBAAiB,cAAY,kBAAgB,iBAAe,cAAY,aAAW,WAAS,SAAO,MAAI,YAAU,aAAW,mBAAiB,kBAAgB,mBAAiB,mBAAiB,mBAAiB,kBAAgB,cAAY,EAAW,CAAC,EAAK,GAASA,EAAS,GAAG,CAAM,CAAC,EAAM,GAAUA,EAAS,GAAG,CAAM,CAAC,EAAO,GAAWA,EAAS,OAAO,CAChlB,CAAC,EAAM,GAAUA,EAAS,GAAG,CAAM,CAAC,GAAKA,MAAa,KAAK,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAO,EAAcC,EAAO,GAAM,CAAO,EAAa,GAAO,6BAA6B,KAAK,EAAM,CAAO,EAAa,KAAM,IAAG,CAAoB,GAAnB,EAAE,gBAAgB,CAAI,EAAc,QAAQ,OAAO,GAAG,CAAC,GAAO,CAAC,EAAa,EAAM,CAAC,CAAC,EAAS,sCAAsC,CAAC,OAAQ,EAAS,GAAG,CAAC,EAAc,QAAQ,GAA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