{"version":3,"file":"DownloadForm.BmVCmcCT.mjs","names":["useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/8eDK7CGRHogEtx0gL0Uy/rt9bJTAHL7cPSWM4Y7xO/DownloadForm.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useRef}from\"react\";const DEFAULTS={eyebrow:\"FREE DOWNLOAD\",heading:\"Your Students Want to Own Something. Give Them a Role to Own.\",body:\"The Broadcast Roles Worksheet gives you a simple starting point — define your crew's positions, set standards for each one, and assign students before the next event.\\n\\nNo overhaul. No 20-page manual. Just a printable worksheet you can use with your crew this week.\",checklist:\"✓ 3-page printable PDF\\n✓ Fillable role definition cards\\n✓ Starting lineup assignment table\\n✓ Role Reference Guide with examples\",formHeading:\"Get the Free Worksheet\",privacyNote:\"We'll send you the PDF and that's it. No spam. Unsubscribe anytime.\",hubspotFormId:\"def5490f-6d47-4b15-a26c-5d8976de0937\",hubspotPortalId:\"5900561\",hubspotRegion:\"na1\",submitButtonText:\"\"};function splitLines(str){return str.replace(/\\\\n/g,\"\\n\").split(\"\\n\").filter(s=>s.trim()!==\"\");}function splitParagraphs(str){return str.replace(/\\\\n/g,\"\\n\").split(/\\n\\n+/).filter(s=>s.trim()!==\"\");}export default function DownloadForm(props){const eyebrow=props.eyebrow||DEFAULTS.eyebrow;const heading=props.heading||DEFAULTS.heading;const body=props.body||DEFAULTS.body;const checklist=props.checklist||DEFAULTS.checklist;const formHeading=props.formHeading||DEFAULTS.formHeading;const privacyNote=props.privacyNote||DEFAULTS.privacyNote;const hubspotFormId=props.hubspotFormId||DEFAULTS.hubspotFormId;const hubspotPortalId=props.hubspotPortalId||DEFAULTS.hubspotPortalId;const hubspotRegion=props.hubspotRegion||DEFAULTS.hubspotRegion;const submitButtonText=props.submitButtonText||DEFAULTS.submitButtonText;const containerId=useRef(`hs-form-${Math.random().toString(36).slice(2,10)}`).current;const formCreated=useRef(false);useEffect(()=>{formCreated.current=false;const overrideButtonText=()=>{if(!submitButtonText)return;const el=document.getElementById(containerId);if(!el)return;const btn=el.querySelector(\".hs-button, input[type=submit], button[type=submit]\");if(!btn)return;if(btn.value!==undefined){btn.value=submitButtonText;}if(btn.tagName===\"BUTTON\"){btn.textContent=submitButtonText;}};const watchForButton=()=>{if(!submitButtonText)return;const el=document.getElementById(containerId);if(!el)return;// Try immediately\noverrideButtonText();// And on every mutation in case HubSpot re-renders\nconst mo=new MutationObserver(()=>overrideButtonText());mo.observe(el,{childList:true,subtree:true});// Stop observing after 15s — form should be settled by then\nsetTimeout(()=>mo.disconnect(),15e3);};const createForm=()=>{if(formCreated.current)return;const el=document.getElementById(containerId);if(!el)return;if(!window.hbspt)return;el.innerHTML=\"\";formCreated.current=true;try{window.hbspt.forms.create({portalId:hubspotPortalId,formId:hubspotFormId,region:hubspotRegion,target:`#${containerId}`,onFormReady:()=>{overrideButtonText();}});watchForButton();}catch(e){console.error(\"HubSpot form error:\",e);formCreated.current=false;}};// Remove any stray hs-form-frame elements outside our container\n// that might have been injected by a duplicate embed script\nsetTimeout(()=>{const strays=document.querySelectorAll(\".hs-form-frame\");strays.forEach(el=>{const container=document.getElementById(containerId);if(container&&!container.contains(el)&&el.closest(\".dl-card\")===null){el.remove();}});},1500);if(window.hbspt){createForm();return;}const existing=document.querySelector('script[src*=\"hsforms\"]');if(existing){const poll=setInterval(()=>{if(window.hbspt){clearInterval(poll);createForm();}},200);return()=>clearInterval(poll);}const script=document.createElement(\"script\");script.src=\"//js.hsforms.net/forms/embed/v2.js\";script.charset=\"utf-8\";script.async=true;script.onload=()=>{const poll=setInterval(()=>{if(window.hbspt){clearInterval(poll);createForm();}},200);setTimeout(()=>clearInterval(poll),1e4);};document.head.appendChild(script);},[hubspotFormId,hubspotPortalId,hubspotRegion,containerId,submitButtonText]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .dl-wrap { width: 100%; background: linear-gradient(to right, #262347, #6D24F7); padding: 80px 40px; box-sizing: border-box; display: flex; justify-content: center; }\n                .dl-grid { width: 100%; max-width: 1130px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }\n                .dl-left { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; }\n                .dl-eyebrow { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; color: #FEB466; }\n                .dl-h2 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 36px; line-height: 1.15; color: #FFFFFF; margin: 0; letter-spacing: -0.02em; }\n                .dl-body-wrap { display: flex; flex-direction: column; gap: 12px; }\n                .dl-body { font-family: Inter, sans-serif; font-weight: 400; font-size: 17px; line-height: 1.65; color: rgba(255,255,255,0.75); margin: 0; }\n                .dl-check-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }\n                .dl-check { font-family: Inter, sans-serif; font-weight: 400; font-size: 15px; color: rgba(255,255,255,0.9); line-height: 1.5; display: block; }\n                .dl-card { background-color: #FFFFFF; border-radius: 20px; padding: 32px; box-shadow: 0 8px 40px rgba(0,0,0,0.18); display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; width: 100%; overflow: hidden; }\n                .dl-form-heading { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 20px; color: #262347; text-align: center; margin: 0; }\n                .dl-form-embed { min-height: 300px; width: 100%; overflow: visible; }\n                .dl-form-embed .hs-form fieldset { max-width: 100% !important; }\n                .dl-form-embed .hs-form .hs-input { width: 100% !important; padding: 12px 16px !important; border: 1.5px solid #E0E0E0 !important; border-radius: 10px !important; font-family: Inter, sans-serif !important; font-size: 15px !important; color: #262347 !important; background: #FAFAFA !important; transition: border-color 0.2s !important; box-sizing: border-box !important; }\n                .dl-form-embed .hs-form .hs-input:focus { border-color: #9B5EFC !important; outline: none !important; background: #FFFFFF !important; }\n                .dl-form-embed .hs-form select.hs-input { appearance: auto !important; -webkit-appearance: auto !important; }\n                .dl-form-embed .hs-form label { font-family: 'Poppins', sans-serif !important; font-weight: 500 !important; font-size: 13px !important; color: #262347 !important; margin-bottom: 6px !important; display: block !important; }\n                .dl-form-embed .hs-form .hs-button { width: 100% !important; padding: 14px 32px !important; background-color: #9B5EFC !important; color: #FFFFFF !important; font-family: 'Poppins', sans-serif !important; font-weight: 600 !important; font-size: 16px !important; border: none !important; border-radius: 25px !important; cursor: pointer !important; transition: opacity 0.2s !important; }\n                .dl-form-embed .hs-form .hs-button:hover { opacity: 0.9 !important; }\n                .dl-form-embed .hs-form .hs-error-msgs { font-size: 12px !important; color: #e74c3c !important; margin-top: 4px !important; }\n                .dl-form-embed .hs-form .hs-form-field { margin-bottom: 16px !important; }\n                .dl-form-embed .hs-form .legal-consent-container { font-size: 12px !important; color: #888 !important; line-height: 1.5 !important; }\n                .dl-form-embed .hs-form .legal-consent-container p { font-size: 12px !important; color: #888 !important; line-height: 1.5 !important; margin: 8px 0 !important; }\n                .dl-form-embed .hs-form .legal-consent-container a { color: #9B5EFC !important; }\n                .dl-form-embed .hs-form .legal-consent-container .hs-form-booleancheckbox label { display: flex !important; align-items: flex-start !important; gap: 8px !important; font-size: 13px !important; }\n                .dl-form-embed .hs-form .legal-consent-container .hs-form-booleancheckbox input { margin-top: 3px !important; flex-shrink: 0 !important; }\n                .dl-form-embed .hs-form .hs-recaptcha { transform: scale(0.85); transform-origin: left top; }\n                .dl-privacy { font-family: Inter, sans-serif; font-weight: 400; font-size: 12px; color: #999999; text-align: center; margin: 0; }\n                @media (max-width: 810px) {\n                    .dl-wrap { padding: 48px 24px; background: linear-gradient(to bottom, #262347, #6D24F7); }\n                    .dl-grid { grid-template-columns: 1fr; gap: 28px; }\n                    .dl-left { padding-top: 0; }\n                    .dl-h2 { font-size: 26px; }\n                    .dl-body { font-size: 15px; }\n                    .dl-card { padding: 24px; }\n                    .dl-form-heading { font-size: 18px; }\n                }\n                @media (max-width: 500px) {\n                    .dl-wrap { padding: 36px 14px; }\n                    .dl-grid { gap: 24px; }\n                    .dl-left { gap: 16px; }\n                    .dl-h2 { font-size: 22px; line-height: 1.2; }\n                    .dl-body { font-size: 14px; line-height: 1.6; }\n                    .dl-check { font-size: 13px; }\n                    .dl-card { padding: 18px 16px; border-radius: 14px; }\n                    .dl-form-heading { font-size: 17px; }\n                    .dl-form-embed { min-height: 280px; }\n                    .dl-privacy { font-size: 11px; }\n                    .dl-eyebrow { font-size: 11px; }\n                    .dl-form-embed .hs-form .hs-recaptcha { transform: scale(0.75); }\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{id:\"download\",className:\"dl-wrap\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"dl-grid\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"dl-left\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"dl-eyebrow\",children:eyebrow}),/*#__PURE__*/_jsx(\"h2\",{className:\"dl-h2\",children:heading}),/*#__PURE__*/_jsx(\"div\",{className:\"dl-body-wrap\",children:splitParagraphs(body).map((para,i)=>/*#__PURE__*/_jsx(\"p\",{className:\"dl-body\",children:para},i))}),/*#__PURE__*/_jsx(\"div\",{className:\"dl-check-wrap\",children:splitLines(checklist).map((item,i)=>/*#__PURE__*/_jsx(\"span\",{className:\"dl-check\",children:item},i))})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"dl-card\",children:[/*#__PURE__*/_jsx(\"h3\",{className:\"dl-form-heading\",children:formHeading}),/*#__PURE__*/_jsx(\"div\",{id:containerId,className:\"dl-form-embed\"}),/*#__PURE__*/_jsx(\"p\",{className:\"dl-privacy\",children:privacyNote})]})]})})]});}addPropertyControls(DownloadForm,{eyebrow:{type:ControlType.String,title:\"Eyebrow\"},heading:{type:ControlType.String,title:\"Heading\"},body:{type:ControlType.String,title:\"Body\",displayTextArea:true},checklist:{type:ControlType.String,title:\"Checklist\",displayTextArea:true},formHeading:{type:ControlType.String,title:\"Form Heading\"},privacyNote:{type:ControlType.String,title:\"Privacy Note\"},hubspotFormId:{type:ControlType.String,title:\"HubSpot Form ID\"},hubspotPortalId:{type:ControlType.String,title:\"HubSpot Portal ID\"},hubspotRegion:{type:ControlType.String,title:\"HubSpot Region\"},submitButtonText:{type:ControlType.String,title:\"Submit Button Text\",description:\"Overrides HubSpot's button label. Leave blank to use HubSpot's setting.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DownloadForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DownloadForm.map"],"mappings":"6MAAu6B,SAAS,EAAW,EAAI,CAAC,OAAO,EAAI,QAAQ,OAAO;CAAI,CAAC,CAAC,MAAM;CAAI,CAAC,CAAC,OAAO,GAAG,EAAE,KAAK,IAAI,EAAE,CAAE,CAAC,SAAS,EAAgB,EAAI,CAAC,OAAO,EAAI,QAAQ,OAAO;CAAI,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,OAAO,GAAG,EAAE,KAAK,IAAI,EAAE,CAAE,CAAC,SAAwB,EAAa,EAAM,CAAC,IAAM,EAAQ,EAAM,SAAS,EAAS,QAAc,EAAQ,EAAM,SAAS,EAAS,QAAc,EAAK,EAAM,MAAM,EAAS,KAAW,EAAU,EAAM,WAAW,EAAS,UAAgB,EAAY,EAAM,aAAa,EAAS,YAAkB,EAAY,EAAM,aAAa,EAAS,YAAkB,EAAc,EAAM,eAAe,EAAS,cAAoB,EAAgB,EAAM,iBAAiB,EAAS,gBAAsB,EAAc,EAAM,eAAe,EAAS,cAAoB,EAAiB,EAAM,kBAAkB,EAAS,iBAAuB,EAAYA,EAAO,WAAW,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC,QAAc,EAAYA,EAAO,EAAK,EAKn+B,OALq+B,MAAc,CAAC,EAAY,QAAQ,GAAM,IAAM,MAAuB,CAAC,GAAG,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