{"version":3,"file":"sclaiJRI0.CKKDXm06.mjs","names":[],"sources":["https:/framerusercontent.com/modules/BXKkYLKoOZkV81PtBWVy/nUARjUMT0QgWwGZ01O93/sclaiJRI0.js"],"sourcesContent":["// Generated by Framer (98a2bb2)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addFonts,ComponentViewportProvider,cx,getFonts,SmartComponentScopedContainer,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";import Embed from\"https://framerusercontent.com/modules/o1PI5S8YtkA5bP5g4dFz/s801VqobGI0Gkh3K9b41/Embed.js\";const EmbedFonts=getFonts(Embed);const serializationHash=\"framer-0kBFi\";const variantClassNames={ZZtAyMzVT:\"framer-v-6q3ekk\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={bounce:.2,delay:0,duration:.4,type:\"spring\"};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion.create(React.Fragment);const getProps=({height,id,width,...props})=>{return{...props};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({defaultVariant:\"ZZtAyMzVT\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsx(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-6q3ekk\",className,classNames),\"data-framer-name\":\"Variant 1\",layoutDependency:layoutDependency,layoutId:\"ZZtAyMzVT\",ref:refBinding,style:{...style},children:/*#__PURE__*/_jsx(ComponentViewportProvider,{children:/*#__PURE__*/_jsx(SmartComponentScopedContainer,{className:\"framer-1i4wd5-container\",isAuthoredByUser:true,isModuleExternal:true,layoutDependency:layoutDependency,layoutId:\"Iyapj3_6k-container\",nodeId:\"Iyapj3_6k\",rendersWithMotion:true,scopeId:\"sclaiJRI0\",children:/*#__PURE__*/_jsx(Embed,{height:\"100%\",html:'\\n<script src=\"https://cdn.jsdelivr.net/npm/visitdata/dist/visitdata.umd.js\"></script>\\n<div class=\"filloutform\" style=\"width:100%; height:800px; min-height:800px; padding: 0; margin:0 auto\"\\n  data-utm_source=\"\" data-utm_medium=\"\" data-utm_campaign=\"\" data-utm_term=\"\" data-client_id=\"\" data-xgclid=\"\"\\n  data-fillout-id=\"nEwVnZrsBqus\" data-fillout-embed-type=\"standard\" data-fillout-inherit-parameters>\\n</div>\\n\\n<script>\\n  document.addEventListener(\\'DOMContentLoaded\\', function() {\\n    const filloutForm = document.querySelector(\\'.filloutform\\');\\n    // If multiple forms are possible, use querySelectorAll and loop\\n    if (!filloutForm) {\\n      console.error(\"Fillout container \\'.filloutform\\' not found.\");\\n      return;\\n    }\\n\\n    const filloutId = filloutForm.getAttribute(\\'data-fillout-id\\');\\n    if (!filloutId) {\\n       console.error(\"Fillout container missing \\'data-fillout-id\\'.\");\\n       return;\\n    }\\n\\n    console.log(`Initializing Fillout form: ${filloutId}`);\\n\\n    // --- Helper Functions ---\\n\\n    function getClientIdFromCookie() {\\n      const match = document.cookie.match(\\'(?:^|;)\\\\\\\\s*_ga=([^;]*)\\');\\n      let raw = match ? decodeURIComponent(match[1]) : null;\\n      if (raw) {\\n        const idMatch = raw.match(/(\\\\d+\\\\.\\\\d+)$/);\\n        return idMatch ? idMatch[1] : null;\\n      }\\n      return null;\\n    }\\n\\n    // Function to get GA data using Promises\\n    async function getGaData() {\\n      let clientId = getClientIdFromCookie();\\n      let gclid = null;\\n      let clientIdSource = clientId ? \\'cookie\\' : \\'none\\';\\n\\n      // Give gtag a brief moment to potentially load if not immediately available\\n      // Adjust timeout as needed, or remove if gtag should strictly be ready before this script\\n      await new Promise(resolve => setTimeout(resolve, 100));\\n\\n      if (typeof gtag === \\'function\\') {\\n        console.log(\"gtag function found. Attempting to get data.\");\\n        try {\\n          // Use Promise.allSettled to run calls concurrently and handle failures individually\\n          const results = await Promise.allSettled([\\n            // Get Client ID only if not found in cookie\\n            new Promise((resolve, reject) => {\\n              if (clientId) {\\n                 resolve(clientId); // Already have it from cookie\\n              } else {\\n                 // Use GA4 Property ID (G-XXXX) for client_id\\n                 gtag(\\'get\\', \\'G-6GBTBVN0F5\\', \\'client_id\\', (id) => {\\n                      console.log(\\'gtag client_id received:\\', id);\\n                      if (id) {\\n                         clientId = id;\\n                         clientIdSource = \\'gtag\\';\\n                      }\\n                      resolve(id); // Resolve even if undefined\\n                 });\\n                 // Add a timeout for the gtag call\\n                 setTimeout(() => reject(new Error(\\'gtag client_id timed out\\')), 1500);\\n              }\\n            }),\\n            // Get GCLID\\n            new Promise((resolve, reject) => {\\n              // Use Ads Property ID (AW-XXXX) for gclid\\n              gtag(\\'get\\', \\'AW-956445391\\', \\'gclid\\', (id) => {\\n                console.log(\\'gtag gclid received:\\', id);\\n                if (id) {\\n                    gclid = id;\\n                }\\n                resolve(id); // Resolve even if undefined\\n              });\\n              // Add a timeout for the gtag call\\n              setTimeout(() => reject(new Error(\\'gtag gclid timed out\\')), 1500);\\n            })\\n          ]);\\n\\n          // Log any rejections (timeouts/errors)\\n          results.forEach((result, index) => {\\n            if (result.status === \\'rejected\\') {\\n              console.warn(`gtag get call ${index === 0 ? \\'client_id\\' : \\'gclid\\'} failed:`, result.reason);\\n            }\\n          });\\n\\n        } catch (error) {\\n          console.error(\"Error occurred during gtag get calls:\", error);\\n        }\\n      } else {\\n        console.log(\"gtag function not available.\");\\n      }\\n\\n      return { clientId, gclid, clientIdSource };\\n    }\\n\\n    function setVisitDataParams() {\\n      let utmSource = visitData.get().source;\\n      if (!utmSource && document.referrer) {\\n           // Avoid setting referrer if it\\'s the same domain (internal navigation)\\n           if (!document.referrer.includes(window.location.hostname)) { // More robust check\\n              try {\\n                  const url = new URL(document.referrer);\\n                  utmSource = url.hostname; // Use hostname as source\\n              } catch (e) {\\n                  console.error(\"Error parsing referrer URL:\", e);\\n                  utmSource = \"direct\"; // Fallback if referrer is invalid or empty\\n              }\\n           } else {\\n               utmSource = \"direct\"; // Internal navigation or direct\\n           }\\n      } else if (!utmSource) {\\n           utmSource = \"direct\"; // No visitData source and no referrer\\n      }\\n\\n      filloutForm.setAttribute(\\'data-utm_source\\', utmSource || \"\"); // Use || \"\" as fallback\\n      filloutForm.setAttribute(\\'data-utm_medium\\', visitData.get().medium || \"\");\\n      filloutForm.setAttribute(\\'data-utm_campaign\\', visitData.get().campaign || \"\");\\n      filloutForm.setAttribute(\\'data-utm_term\\', visitData.get().term || \"\"); // Added utm_term\\n      console.log(\"VisitData/Referrer params set for form:\", { source: utmSource, medium: visitData.get().medium, campaign: visitData.get().campaign, term: visitData.get().term });\\n    }\\n\\n    function loadFilloutScript() {\\n      // Check if script already added (simple guard against race conditions)\\n      if (document.querySelector(\\'script[src=\"https://server.fillout.com/embed/v1/\"]\\')) {\\n          console.log(\"Fillout script tag already exists.\");\\n          return;\\n      }\\n\\n      const script = document.createElement(\\'script\\');\\n      script.src = \"https://server.fillout.com/embed/v1/\";\\n      script.async = true;\\n      script.onload = () => {\\n        console.log(\"Fillout embed script loaded successfully.\");\\n        // Start processing the iframe AFTER the script has loaded\\n        processIframe();\\n      };\\n      script.onerror = () => {\\n        console.error(\"Error loading Fillout embed script.\");\\n      };\\n      document.head.appendChild(script);\\n    }\\n\\n    function processIframe(retryCount = 0) {\\n        const maxRetries = 10; // Try for 5 seconds (10 * 500ms)\\n        const retryDelay = 500; // ms\\n\\n        // Select iframe specifically within this form instance\\n        const iframe = filloutForm.querySelector(\\'iframe\\');\\n\\n        if (iframe) {\\n            try {\\n                const currentSrc = new URL(iframe.src);\\n                // Only replace if the domain isn\\'t already the target domain\\n                if (currentSrc.hostname !== \"fillout.eventx.io\") {\\n                    const newDomain = \"fillout.eventx.io\";\\n                    currentSrc.hostname = newDomain;\\n                    iframe.src = currentSrc.href;\\n                    console.log(\"Iframe source domain replaced with:\", newDomain);\\n                } else {\\n                    console.log(\"Iframe source domain is already correct.\");\\n                }\\n            } catch (e) {\\n                console.error(\"Error processing iframe source:\", e);\\n            }\\n        } else if (retryCount < maxRetries) {\\n            console.log(`Iframe not found yet inside .filloutform. Retrying (${retryCount + 1}/${maxRetries})...`);\\n            setTimeout(() => processIframe(retryCount + 1), retryDelay);\\n        } else {\\n            console.error(\"Iframe not found inside .filloutform after multiple retries.\");\\n        }\\n    }\\n\\n    // --- Main Execution Logic ---\\n\\n    async function initializeForm() {\\n      // 1. Set UTM parameters (sync)\\n      setVisitDataParams();\\n\\n      // 2. Get GA data (async)\\n      const gaData = await getGaData();\\n\\n      // 3. Set GA parameters (sync)\\n      if (gaData.clientId) {\\n        filloutForm.setAttribute(\"data-client_id\", gaData.clientId);\\n        console.log(`client_id set for form (source: ${gaData.clientIdSource})`);\\n      } else {\\n        console.log(\"client_id could not be determined.\");\\n      }\\n      if (gaData.gclid) {\\n        filloutForm.setAttribute(\"data-xgclid\", gaData.gclid);\\n        console.log(\"gclid set for form from gtag.\");\\n      } else {\\n         console.log(\"gclid not available from gtag.\");\\n      }\\n\\n      // 4. Load the Fillout embed script (async load, triggers iframe processing on completion)\\n      // This happens *after* all data attributes are set.\\n      loadFilloutScript();\\n    }\\n\\n    // Start the initialization\\n    initializeForm().catch(error => {\\n        console.error(\"Error during Fillout form initialization:\", error);\\n        // Optionally, still try to load Fillout even if GA data fetching failed critically\\n        // loadFilloutScript();\\n    });\\n\\n  });\\n</script>',id:\"Iyapj3_6k\",layoutId:\"Iyapj3_6k\",radius:\"0px\",style:{height:\"100%\",maxWidth:\"100%\",width:\"100%\"},type:\"html\",url:\"\",width:\"100%\",zoom:1})})})})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-0kBFi.framer-15pjn7b, .framer-0kBFi .framer-15pjn7b { display: block; }\",\".framer-0kBFi.framer-6q3ekk { align-content: center; align-items: center; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0px; height: 820px; justify-content: center; overflow: visible; padding: 0px; position: relative; width: 1120px; }\",\".framer-0kBFi .framer-1i4wd5-container { flex: none; height: 100%; max-width: 1120px; position: relative; scroll-margin-top: 120px; width: 100%; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 820\n * @framerIntrinsicWidth 1120\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramersclaiJRI0=withCSS(Component,css,\"framer-0kBFi\");export default FramersclaiJRI0;FramersclaiJRI0.displayName=\"Form\";FramersclaiJRI0.defaultProps={height:820,width:1120};addFonts(FramersclaiJRI0,[{explicitInter:true,fonts:[]},...EmbedFonts],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"FramersclaiJRI0\",\"slots\":[],\"annotations\":{\"framerDisplayContentsDiv\":\"false\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"820\",\"framerIntrinsicWidth\":\"1120\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerAutoSizeImages\":\"true\",\"framerColorSyntax\":\"true\",\"framerImmutableVariables\":\"true\",\"framerComponentViewportWidth\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./sclaiJRI0.map"],"mappings":"+oBAWsL,AAVtL,GAA2C,IAA4J,IAAkE,IAA4B,CAA0B,GAA4G,CAAM,EAAW,EAAS,EAAM,CAAO,EAAkB,eAAqB,EAAkB,CAAC,UAAU,iBAAkB,EAA8L,EAAY,CAAC,OAAO,GAAG,MAAM,EAAE,SAAS,GAAG,KAAK,QAAS,EAAO,EAAW,CAAC,CAAC,QAAM,WAAS,GAAG,CAAC,IAAM,EAAO,EAAiB,EAAoB,CAAO,EAAW,GAAO,EAAO,WAAiB,EAAa,EAAc,KAAK,CAAC,GAAG,EAAO,YAAW,GAAE,CAAC,KAAK,UAAU,EAAW,AAAC,EAAC,CAAC,MAAoB,GAAK,EAAoB,SAAS,CAAC,MAAM,EAAsB,UAAS,EAAC,AAAE,EAAO,EAAS,EAAO,OAAA,EAAsB,CAAO,EAAS,CAAC,CAAC,SAAO,KAAG,QAAM,GAAG,EAAM,IAAU,CAAC,GAAG,CAAM,GAAS,EAAuB,CAAC,EAAM,IAAe,EAAM,iBAAwB,EAAS,KAAK,IAAI,CAAC,EAAM,iBAAwB,EAAS,KAAK,IAAI,CAAS,EAAuB,EAAiB,SAAS,EAAM,EAAI,CAAC,IAAM,EAAY,EAAO,KAAK,CAAO,EAAW,GAAK,EAAkB,EAAgB,GAAa,CAAM,CAAC,eAAa,YAAU,CAAC,GAAe,CAAO,EAAkB,GAAsB,CAAM,CAAC,QAAM,YA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