{"version":3,"file":"ParameterBasedVisibility.PbCEBilj.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/LA8IuKFeIGs7OO2wYCQK/WDSGdgTHriL1HVby7bTy/ParameterBasedVisibility.js"],"sourcesContent":["// This module shows or hides elements based on specific UTM source and medium parameters.\n// Last updated by @joshua on 2025-07-18.\n//\n// Visibility is enabled if:\n// - utm_source=google\n// - OR utm_source=gp8fuyk\n// - OR utm_medium=cpc\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";function evaluateTrackingCondition(){if(typeof window===\"undefined\")return false;const params=new URLSearchParams(window.location.search);const utmSource=params.get(\"utm_source\")?.toLowerCase();const utmMedium=params.get(\"utm_medium\")?.toLowerCase();const isValidSource=utmSource===\"google\"||utmSource===\"gp8fuyk\";const isValidMedium=utmMedium===\"cpc\";const path=window.location.pathname.toLowerCase();const isValidPath=path.includes(\"/partners/\")||path.includes(\"/business-account/banking-features/integrations/\");return isValidSource||isValidMedium||isValidPath;}// ✅ Show the component if the condition is matched\nexport function withShowOnTrackingMatch(WrappedComponent){return props=>{const[visible,setVisible]=useState(false);useEffect(()=>{setVisible(evaluateTrackingCondition());},[]);const componentStyle={...props.style,display:visible?\"block\":\"none\"};return /*#__PURE__*/_jsx(WrappedComponent,{...props,style:componentStyle});};}// ❌ Hide the component if the condition is matched\nexport function withHideOnTrackingMatch(WrappedComponent){return props=>{const[visible,setVisible]=useState(true);useEffect(()=>{setVisible(!evaluateTrackingCondition());},[]);const componentStyle={...props.style,display:visible?\"block\":\"none\"};return /*#__PURE__*/_jsx(WrappedComponent,{...props,style:componentStyle});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withShowOnTrackingMatch\":{\"type\":\"reactHoc\",\"name\":\"withShowOnTrackingMatch\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHideOnTrackingMatch\":{\"type\":\"reactHoc\",\"name\":\"withHideOnTrackingMatch\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ParameterBasedVisibility.map"],"mappings":"2MAOiF,SAAS,GAA2B,CAAC,GAAU,IAAS,OAAY,MAAO,GAAM,IAAM,EAAO,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAO,EAAU,EAAO,IAAI,aAAa,EAAE,aAAa,CAAO,EAAU,EAAO,IAAI,aAAa,EAAE,aAAa,CAAO,EAAc,IAAY,UAAU,IAAY,UAAgB,EAAc,IAAY,MAAY,EAAK,EAAO,SAAS,SAAS,aAAa,CAAO,EAAY,EAAK,SAAS,aAAa,EAAE,EAAK,SAAS,mDAAmD,CAAC,OAAO,GAAe,GAAe,EACznB,SAAgB,EAAwB,EAAiB,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAC,MAAc,CAAC,EAAW,GAA2B,CAAC,EAAG,EAAE,CAAC,CAAC,IAAM,EAAe,CAAC,GAAG,EAAM,MAAM,QAAQ,EAAQ,QAAQ,OAAO,CAAC,OAAoB,EAAK,EAAiB,CAAC,GAAG,EAAM,MAAM,EAAe,CAAC,EAC/T,SAAgB,EAAwB,EAAiB,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,GAAK,CAAC,MAAc,CAAC,EAAW,CAAC,GAA2B,CAAC,EAAG,EAAE,CAAC,CAAC,IAAM,EAAe,CAAC,GAAG,EAAM,MAAM,QAAQ,EAAQ,QAAQ,OAAO,CAAC,OAAoB,EAAK,EAAiB,CAAC,GAAG,EAAM,MAAM,EAAe,CAAC,uBAFpR,IAAsC"}