{"version":3,"file":"AddCustomID.BInQALhS.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","init_ssg_sandbox_shims","e","init_npm_react_18_3_1","window","oe","init_jsx_runtime","init_framer_DxfB3JJo","withOneToOneID","newProps","props","Component","withAcceleratorID","withPodcastID","withWebsiteID","withBookCallIDAndUtm","event","baseExternalUrl","target","fullUrl","createFullUrl","getUTMParams","params","utmParams","key","value","url","withiPhoneButtonFix","withwithBookCallIDAndUtm","DataObserverContext","c","C","init_AddCustomID"],"sources":["https:/framerusercontent.com/modules/hu4zHwMIYqEpIPcU8Ccj/L7CamFqiboxhhX0f0qMW/AddCustomID.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import React from\"react\";export function withOneToOneID(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const newProps={...props,id:\"One-to-one coaching\"};return /*#__PURE__*/_jsx(Component,{...newProps,ref:ref});});}export function withAcceleratorID(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const newProps={...props,id:\"Leadership Accelerator\"};return /*#__PURE__*/_jsx(Component,{...newProps,ref:ref});});}export function withHTLBookID(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const newProps={...props,id:\"How To Lead Book\"};return /*#__PURE__*/_jsx(Component,{...newProps,ref:ref});});}export function withHabitsChecklistID(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const newProps={...props,id:\"Leadership Habits Checklist\"};return /*#__PURE__*/_jsx(Component,{...newProps,ref:ref});});}export function withPodcastID(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const newProps={...props,id:\"Podcast\"};return /*#__PURE__*/_jsx(Component,{...newProps,ref:ref});});}export function withWebsiteID(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const newProps={...props,id:\"Website\"};return /*#__PURE__*/_jsx(Component,{...newProps,ref:ref});});}// Code override to modify the behavior of an element\nexport function withBookCallIDAndUtm(){return{id:\"Book a call\",onClick:event=>{event.preventDefault()// Prevent the default click behavior\n;// Get the href and target attributes from the clicked element\nconst baseExternalUrl=event.currentTarget.getAttribute(\"href\");const target=event.currentTarget.getAttribute(\"target\");if(!baseExternalUrl){console.error(\"Base URL is not provided or href attribute is missing.\");return;}const utmParams=getUTMParams();const fullUrl=createFullUrl(baseExternalUrl,utmParams);// Check if the link should open in a new tab\nif(target===\"_blank\"){window.open(fullUrl,\"_blank\");}else{window.location.href=fullUrl// Navigate to the external link in the same tab\n;}}};}// Helper function to extract UTM parameters from the URL\nfunction getUTMParams(){const params=new URLSearchParams(window.location.search);const utmParams={};params.forEach((value,key)=>{if(key.startsWith(\"utm_\")){utmParams[key]=value;}});return utmParams;}// Function to create the full URL with UTM parameters\nfunction createFullUrl(baseExternalUrl,utmParams){const url=new URL(baseExternalUrl);Object.keys(utmParams).forEach(key=>url.searchParams.append(key,utmParams[key]));return url.toString();}export function withiPhoneButtonFix(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{...props,ref:ref});});}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withwithBookCallIDAndUtm(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...withBookCallIDAndUtm(props)});};}withwithBookCallIDAndUtm.displayName=\"withBookCallIDAndUtm\";\nexport const __FramerMetadata__ = {\"exports\":{\"withwithBookCallIDAndUtm\":{\"type\":\"reactHoc\",\"name\":\"withwithBookCallIDAndUtm\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAcceleratorID\":{\"type\":\"reactHoc\",\"name\":\"withAcceleratorID\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOneToOneID\":{\"type\":\"reactHoc\",\"name\":\"withOneToOneID\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPodcastID\":{\"type\":\"reactHoc\",\"name\":\"withPodcastID\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withWebsiteID\":{\"type\":\"reactHoc\",\"name\":\"withWebsiteID\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHTLBookID\":{\"type\":\"reactHoc\",\"name\":\"withHTLBookID\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBookCallIDAndUtm\":{\"type\":\"override\",\"name\":\"withBookCallIDAndUtm\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHabitsChecklistID\":{\"type\":\"reactHoc\",\"name\":\"withHabitsChecklistID\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withiPhoneButtonFix\":{\"type\":\"reactHoc\",\"name\":\"withiPhoneButtonFix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AddCustomID.map"],"mappings":"A,8KAAoE,SAAgBU,EAAe,EAAU,CAAC,MAAoB,gBAAM,YAAY,EAAM,IAAM,CAAC,IAAMC,EAAS,CAAC,GAAGC,EAAM,GAAG,qBAAqB,EAAE,MAAoB,gBAAKC,EAAU,CAAC,GAAGF,EAAa,KAAG,CAAC,CAAE,CAAC,CAAE,CAAC,SAAgBG,EAAkB,EAAU,CAAC,MAAoB,gBAAM,YAAY,EAAM,IAAM,CAAC,IAAMH,EAAS,CAAC,GAAGC,EAAM,GAAG,wBAAwB,EAAE,MAAoB,gBAAKC,EAAU,CAAC,GAAGF,EAAa,KAAG,CAAC,CAAE,CAAC,CAAE,CAAwa,SAAgBI,EAAc,EAAU,CAAC,MAAoB,gBAAM,YAAY,EAAM,IAAM,CAAC,IAAMJ,EAAS,CAAC,GAAGC,EAAM,GAAG,SAAS,EAAE,MAAoB,gBAAKC,EAAU,CAAC,GAAGF,EAAa,KAAG,CAAC,CAAE,CAAC,CAAE,CAAC,SAAgBK,EAAc,EAAU,CAAC,MAAoB,gBAAM,YAAY,EAAM,IAAM,CAAC,IAAML,EAAS,CAAC,GAAGC,EAAM,GAAG,SAAS,EAAE,MAAoB,gBAAKC,EAAU,CAA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