{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/16smsr5gT1aWXIeFia94/xqmwav6WBK6zArU57Tsl/siteMetadata.js"],
  "sourcesContent": ["// Generated by Framer (55cf326)\nexport default function metadata(params,activeLocale){return{customHTMLBodyEnd:'<!-- Google Tag Manager (noscript) -->\\n<noscript><iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-T87L49WQ\" height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe></noscript>\\n<!-- End Google Tag Manager (noscript) -->',customHTMLBodyStart:'<!-- Plugin: 33d9eb --> <script>window.hsConversationsSettings = {\"disableAttachment\":false,\"enableWidgetCookieBanner\":false};</script>',customHTMLHeadEnd:\"\\n\\n<!-- Google Tag Manager -->\\n<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\\nnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\\nj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\\n'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\\n})(window,document,'script','dataLayer','GTM-T87L49WQ');</script>\\n<!-- End Google Tag Manager -->\\n<!-- Chilipiper Scripts -->\\n<script>\\n    window.addEventListener(\\\"load\\\", function () {\\n        console.log(\\\"ChiliPiper available:\\\", typeof ChiliPiper !== \\\"undefined\\\");\\n    });\\n</script>\\n<script src=\\\"https://brownhavenhomes.chilipiper.com/concierge-js/cjs/concierge.js\\\" crossorigin=\\\"anonymous\\\" type=\\\"text/javascript\\\"></script>\\n<!-- Chilipiper URL Params -->\\n<script>\\n    window.addEventListener(\\\"load\\\", function () {\\n        // Handle builder pages with query parameters\\n        if (\\n            window.location.pathname.includes(\\\"/builder\\\") &&\\n            window.location.search\\n        ) {\\n            console.log(\\\"Checking URL parameters for Chili Piper...\\\");\\n\\n            // Parse URL parameters\\n            const urlParams = new URLSearchParams(window.location.search);\\n\\n            // Create lead object matching exact URL structure\\n            const leadData = {\\n                email: urlParams.get(\\\"email\\\"),\\n                first_name: urlParams.get(\\\"first_name\\\"),\\n                last_name: urlParams.get(\\\"last_name\\\"),\\n                primary_phone: urlParams.get(\\\"primary_phone\\\"),\\n                zip_code: urlParams.get(\\\"zip_code\\\"),\\n                opt_in: urlParams.get(\\\"opt_in\\\") === \\\"true\\\",\\n                design_center: urlParams.get(\\\"design_center\\\"),\\n                lot: urlParams.get(\\\"lot\\\"),\\n                price_range: urlParams.get(\\\"price_range\\\"),\\n                message: urlParams.get(\\\"message\\\"),\\n                page_url: window.location.href,\\n                lead_source:\\n                    \\\"/floorplans/\\\" + (window.location.pathname.split(\\\"/\\\")[2] || \\\"\\\"),\\n                form_name: \\\"Home Customizer Form\\\",\\n                plan_name: window.location.pathname.split(\\\"/\\\")[2] || \\\"\\\",\\n            };\\n\\n            // Check if we have an email (required)\\n            if (leadData.email && leadData.email.includes(\\\"@\\\")) {\\n                try {\\n                    ChiliPiper.submit(\\\"brownhavenhomes\\\", \\\"web-form-routing\\\", {\\n                        trigger: \\\"ThirdPartyForm\\\",\\n                        lead: leadData,\\n                        debug: true,\\n                        onSuccess: () => {\\n                            console.log(\\\"Successfully routed lead:\\\", leadData);\\n                        },\\n                        onError: (error) => {\\n                            console.error(\\\"Detailed error:\\\", error);\\n                            console.log(\\\"Lead data attempted:\\\", leadData);\\n                        },\\n                    });\\n                } catch (e) {\\n                    console.error(\\\"Error showing ChiliPiper scheduler:\\\", e);\\n                }\\n            }\\n        }\\n        \\n        // Handle realtor-referral page form submission\\n        if (window.location.pathname.includes(\\\"/realtor-referral\\\")) {\\n            // Wait for form to be available in DOM\\n            const checkForm = setInterval(function() {\\n                const form = document.querySelector('form[data-realtor-referral-form]');\\n                if (form) {\\n                    clearInterval(checkForm);\\n                    \\n                    // Add form submission handler\\n                    form.addEventListener('submit', function(event) {\\n                        event.preventDefault();\\n                        \\n                        // Collect form data\\n                        const formData = new FormData(form);\\n                        const urlParams = new URLSearchParams(window.location.search);\\n                        \\n                        const leadData = {\\n                            email: formData.get('email') || '',\\n                            first_name: formData.get('first_name') || '',\\n                            last_name: formData.get('last_name') || '',\\n                            primary_phone: formData.get('primary_phone') || '',\\n                            realtor_first_name: formData.get('realtor_first_name') || '',\\n                            realtor_last_name: formData.get('realtor_last_name') || '',\\n                            realtor_email: formData.get('realtor_email') || '',\\n                            realtor_phone: formData.get('realtor_phone') || '',\\n                            opt_in: formData.get('opt_in') || '',\\n                            page_url: window.location.href,\\n                            oi_form_id: formData.get('oi_form_id') || '',\\n                            utm_campaign: urlParams.get('utm_campaign') || '',\\n                            utm_medium: urlParams.get('utm_medium') || '',\\n                            utm_source: urlParams.get('utm_source') || '',\\n                            lead_source: \\\"realtor-referral\\\",\\n                            form_name: \\\"Realtor Referral Form\\\",\\n                            design_center: formData.get('design_center') || ''\\n                        };\\n                        \\n                        // Submit without showing calendar\\n                        try {\\n                            ChiliPiper.submit(\\\"brownhavenhomes\\\", \\\"web-form-routing\\\", {\\n                                map: true,\\n                                lead: leadData,\\n                                injectRootDomain: true,\\n                                formId: \\\"realtor-referral-form\\\",\\n                                debug: true,\\n                                noCalendar: true, // prevent showing calendar\\n                                handleSubmit: false, // Skip ChiliPiper's form submission handling\\n                                closeOnOutside: true, // Close any dialogs when clicking outside\\n                                onSuccess: () => {\\n                                    console.log(\\\"Successfully submitted realtor referral:\\\", leadData);\\n                                    // Show success message or redirect\\n                                    form.reset();\\n                                    const successMsg = document.querySelector('[data-success-message]');\\n                                    if (successMsg) successMsg.style.display = 'block';\\n                                    \\n                                    // Manually close any open ChiliPiper dialogs\\n                                    if (typeof ChiliPiper.dismiss === 'function') {\\n                                        ChiliPiper.dismiss();\\n                                    }\\n                                },\\n                                onError: (error) => {\\n                                    console.error(\\\"Detailed error:\\\", error);\\n                                    console.log(\\\"Lead data attempted:\\\", leadData);\\n                                    \\n                                    // Even on error, consider the form submission successful\\n                                    // since you mentioned data is getting through to ChiliPiper/Salesforce\\n                                    form.reset();\\n                                    const successMsg = document.querySelector('[data-success-message]');\\n                                    if (successMsg) successMsg.style.display = 'block';\\n                                    \\n                                    // Manually close any open ChiliPiper dialogs\\n                                    if (typeof ChiliPiper.dismiss === 'function') {\\n                                        ChiliPiper.dismiss();\\n                                    }\\n                                }\\n                            });\\n                        } catch (e) {\\n                            console.error(\\\"Error submitting realtor referral form:\\\", e);\\n                        }\\n                    });\\n                }\\n            }, 100);\\n        }\\n    });\\n</script>\\n\\n<style>\\n.hs-form-loading-indicator {\\n  text-align: center;\\n  padding: 20px;\\n  color: #888;\\n}\\n</style>\",customHTMLHeadStart:'<meta name=\"google-site-verification\" content=\"UxujvZbNQbwIHyA_PMcZKbabLMR4N50mP3VYuyIbeCg\">\\n',description:\"Discover your dream home with Brown Haven Homes. Explore floor plans designed to fit your lifestyle in GA, TN, SC, and NC.\",favicon:\"https://framerusercontent.com/assets/UvQnCHTBcj1vv8usk9zjowtIY.webp\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/ux2zopZBLh0RO4lMYjRNoNVVs.webp\",title:\" Brown Haven Homes - Your Custom Home Awaits\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "AACe,SAARA,EAA0BC,EAAOC,EAAa,CAAC,MAAM,CAAC,kBAAkB;AAAA;AAAA,4CAAwP,oBAAoB,2IAA0I,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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