{"version":3,"file":"Dynamic_Text_SEA.Cuog4WhX.mjs","names":[],"sources":["https:/framerusercontent.com/modules/lhpxlJjTMOxbbxQ3tnsV/OSYiFQKQKuXg50UkhtgK/Dynamic_Text_SEA.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function withDynamicKeyword(Component){return props=>{// 1. On récupère le texte initial défini dans le canvas Framer (Texte de secours)\nlet dynamicText=props.text;// 2. On s'assure que le code s'exécute uniquement dans le navigateur\nif(typeof window!==\"undefined\"){const params=new URLSearchParams(window.location.search);// 3. On cherche les paramètres de l'URL\nconst keyword=params.get(\"keyword\");const utmTerm=params.get(\"utm_term\");// Priorité à \"keyword\", sinon on prend \"utm_term\"\nlet matchedParam=keyword||utmTerm;if(matchedParam){// 4. Nettoyage : décodage de l'URL et remplacement des \"+\" par des espaces\nmatchedParam=decodeURIComponent(matchedParam.replace(/\\+/g,\" \"));// 5. Formatage : on met la première lettre en majuscule\ndynamicText=matchedParam.charAt(0).toUpperCase()+matchedParam.slice(1);}}// 6. On injecte le texte dynamique dans le composant\nreturn /*#__PURE__*/_jsx(Component,{...props,text:dynamicText});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDynamicKeyword\":{\"type\":\"reactHoc\",\"name\":\"withDynamicKeyword\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Dynamic_Text_SEA.map"],"mappings":"kHAA2C,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAAO,CACvG,IAAI,EAAY,EAAM,KACtB,GAAU,IAAS,OAAY,CAAC,IAAM,EAAO,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAClF,EAAQ,EAAO,IAAI,UAAU,CAAO,EAAQ,EAAO,IAAI,WAAW,CACpE,EAAa,GAAS,EAAW,IACrC,EAAa,mBAAmB,EAAa,QAAQ,MAAM,IAAI,CAAC,CAChE,EAAY,EAAa,OAAO,EAAE,CAAC,aAAa,CAAC,EAAa,MAAM,EAAE,EACtE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,EAAY,CAAC,uBAPpB"}