{"version":3,"file":"Lead_form.IFzeDs89.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","window","ce","init_jsx_runtime","c","_e","init_ssg_sandbox_shims","addPropertyControls","init_framer_BisrWwwE","ControlType","LeadForm","src","setSrc","height","setHeight","visit","kept","VISIT","q","props","PORTAL","onMessage","init_Lead_form"],"sources":["https:/framerusercontent.com/modules/5dgkAJjWfgHEZFGslykP/KHAnWFpEzpTijq9UcwZs/Lead_form.js"],"sourcesContent":["/**\n * Pup Scouts' lead form, from Growth House (apps/petcare-portal/src/app/lead-form), as a Framer code component\n * (Sami, 2026-11-06). Put it where the New Form was. It tells the form which page it's on (so the service is picked\n * and it asks \"You're in Maryland, correct?\"), and grows to the form's height so there's no box to scroll in.\n * Submits the lead to Airtable through pup-form-ingest and continues the intake in this iframe.\n *\n * In Framer: Assets > Code > New file \"LeadForm\", paste this, then drag LeadForm onto the page. On a page that's\n * about one place or service the URL already says it; the two settings in the right panel can set them by hand.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState}from\"react\";const PORTAL=\"https://pup-form-ingest.md-f59.workers.dev\";const VISIT=\"pupscouts-visit\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function LeadForm(props){const[src,setSrc]=useState(\"\");const[height,setHeight]=useState(640);useEffect(()=>{// The visit's first page and where it came from, kept for the tab: someone who lands from an ad's link\n// and clicks around before filling it in still counts as that ad.\nlet visit={page:window.location.href,ref:document.referrer||\"\"};try{const kept=JSON.parse(sessionStorage.getItem(VISIT)||\"null\");if(kept?.page)visit=kept;else sessionStorage.setItem(VISIT,JSON.stringify(visit));}catch{}const q=new URLSearchParams({page:window.location.href,ref:visit.ref,land:visit.page});if(props.state)q.set(\"state\",props.state);if(props.service)q.set(\"service\",props.service);setSrc(`${PORTAL}/start?${q}`);const onMessage=e=>{if(e.origin!==PORTAL)return;// New intake posts pupscouts-intake-height; keep the old name during cutover.\nif(e.data?.type===\"pupscouts-intake-height\"||e.data?.type===\"pupscouts-lead-height\")setHeight(Number(e.data.height)||640);// Do not follow pupscouts-lead-done: the iframe is already the intake.\n};window.addEventListener(\"message\",onMessage);return()=>window.removeEventListener(\"message\",onMessage);},[props.state,props.service]);return /*#__PURE__*/_jsx(\"iframe\",{src:src||undefined,title:\"Get started with Pup Scouts\",style:{width:\"100%\",height,border:0,borderRadius:10,display:\"block\",background:\"transparent\"},allow:\"clipboard-write\"});}addPropertyControls(LeadForm,{state:{type:ControlType.Enum,title:\"State\",options:[\"\",\"md\",\"oc\",\"clt\"],optionTitles:[\"From the page\",\"Maryland\",\"California\",\"North Carolina\"],defaultValue:\"\"},service:{type:ControlType.Enum,title:\"Service\",options:[\"\",\"Pack Walks\",\"Mobile Grooming\",\"Dog Training\",\"Private Walks\",\"Overnight Boarding\",\"Board and Train\"],optionTitles:[\"From the page\",\"Pack Walks\",\"Mobile Grooming\",\"Dog Training\",\"Private Walks\",\"Overnight Boarding\",\"Board and Train\"],defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LeadForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Lead_form.map"],"mappings":"A,gMAWG,SAAwBY,EAAS,EAAM,CAAC,GAAK,CAACC,EAAIC,GAAQd,EAAS,EAAE,EAAO,CAACe,EAAOC,GAAWhB,EAAS,GAAG,EAI0B,OAJxBI,MAAc,CAE9H,IAAIa,EAAM,CAAC,KAAKd,EAAO,SAAS,KAAK,IAAI,SAAS,UAAU,EAAE,EAAE,GAAG,CAAC,IAAMe,EAAK,KAAK,MAAM,eAAe,QAAQC,CAAK,GAAG,MAAM,EAAKD,GAAM,KAAK,EAAMA,EAAU,eAAe,QAAQC,EAAM,KAAK,UAAUF,CAAK,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