{"version":3,"file":"LocaleLogos.r-SWTLlP.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/L2OUeVNXhvbrX7kYRJ2b/pXvoG0OUUuYaWBTnLJYo/LocaleLogos.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";/**\n * Locale-aware logo strip override.\n *\n * Switches the \"Logos New\" component variant based on visitor location:\n * - US visitors → LogosUs variant\n * - Everyone else → LogosGlobal variant\n *\n * Detection logic (priority order):\n * 1. URL path - e.g. /us/... triggers US\n * 2. IP geolocation via ipinfo.io - detects visitor's actual country\n *\n * Default: Global logos (shown while loading and for non-US countries)\n *\n * Apply `LocaleLogos` override to the Logos New component instance.\n */const VARIANT_GLOBAL=\"UMriFXbCu\";const VARIANT_US=\"AHNxRa3zm\";// Shared geolocation cache so we only call the API once per page load\nlet geoCache=null;let geoPromise=null;function detectCountryByIP(){if(geoCache)return Promise.resolve(geoCache.country);if(!geoPromise){geoPromise=fetch(\"https://ipinfo.io/json\",{signal:AbortSignal.timeout(3e3)}).then(res=>{if(!res.ok)return\"unknown\";return res.json().then(data=>{const country=(data.country||\"\").toUpperCase();geoCache={country};return country;});}).catch(()=>\"unknown\");}return geoPromise;}function isUSFromURL(){if(typeof window===\"undefined\")return false;const path=window.location.pathname.toLowerCase();return path.startsWith(\"/us/\")||path.startsWith(\"/en-us/\")||path===\"/us\";}/**\n * Apply this override to the \"Logos New\" component instance.\n * It swaps between LogosGlobal and LogosUs based on visitor location.\n */export function LocaleLogos(){const[isUS,setIsUS]=useState(false);useEffect(()=>{let cancelled=false;// Check URL first\nif(isUSFromURL()){setIsUS(true);return;}// Fall back to IP geolocation\ndetectCountryByIP().then(country=>{if(!cancelled&&country===\"US\"){setIsUS(true);}});return()=>{cancelled=true;};},[]);return{variant:isUS?VARIANT_US:VARIANT_GLOBAL};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withLocaleLogos(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...LocaleLogos(props)});};}withLocaleLogos.displayName=\"LocaleLogos\";\nexport const __FramerMetadata__ = {\"exports\":{\"LocaleLogos\":{\"type\":\"override\",\"name\":\"LocaleLogos\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLocaleLogos\":{\"type\":\"reactHoc\",\"name\":\"withLocaleLogos\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LocaleLogos.map"],"mappings":"sLAesC,SAAS,GAAmB,CAAoU,OAAhU,EAAgB,QAAQ,QAAQ,EAAS,QAAQ,EAAC,AAAgB,IAAW,MAAM,yBAAyB,CAAC,OAAO,YAAY,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,GAAU,EAAI,GAA0B,EAAI,MAAM,CAAC,KAAK,GAAM,CAAC,IAAM,GAAS,EAAK,SAAS,IAAI,aAAa,CAAoB,MAAnB,GAAS,CAAC,UAAQ,CAAQ,GAAU,CAA3H,UAA8H,CAAC,UAAU,UAAU,CAAS,GAAY,SAAS,GAAa,CAAC,GAAU,IAAS,OAAY,MAAO,GAAM,IAAM,EAAK,EAAO,SAAS,SAAS,aAAa,CAAC,OAAO,EAAK,WAAW,OAAO,EAAE,EAAK,WAAW,UAAU,EAAE,IAAO,MAG9kB,SAAgB,GAAa,CAAC,GAAK,CAAC,EAAK,GAASA,EAAS,GAAM,CAEkD,OAFjD,MAAc,CAAC,IAAI,EAAU,GAClG,GAAG,GAAa,CAAC,CAAC,EAAQ,GAAK,CAAC,OACoD,OAApF,GAAmB,CAAC,KAAK,GAAS,CAAI,CAAC,GAAW,IAAU,MAAM,EAAQ,GAAK,EAAI,KAAW,CAAC,EAAU,KAAS,EAAE,CAAC,CAAO,CAAC,QAAQ,EAAK,EAAW,EAAe,CAAqJ,SAAgB,EAAgB,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAY,EAAM,CAAC,CAAC,+BApBvb,IAAsC,IAoBwO,CANhT,EAAe,YAAkB,EAAW,YACjD,EAAS,KAAS,EAAW,KAKqc,EAAgB,YAAY"}