{"version":3,"file":"UserActions.fKdzpaTK.mjs","names":["__esmMin","window","init_ssg_sandbox_shims","init_jsx_runtime","c","withRedirectToCrossroadsUsingSourceAndUserAction","Component","props","today","userId","source","url","withRedirectToCrossroadsUsingBlogHrefAsSource","init_UserActions"],"sources":["https:/framerusercontent.com/modules/khlDmMUm1V8ju0RLNz3u/czY398EmcIJ6HnhIXo0C/UserActions.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";// Learn more: https://www.framer.com/developers/overrides/\nexport function withCustomClick(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{}});};}export function withRedirectToCrossroadsUsingSource(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const queryParams=new URLSearchParams(window.location.search);let source=queryParams.get(\"source\");if(source==null){source=\"siteCefin\";}const url=`https://finsearch.fr/crossroads/#/authentification-automate?source=${source}`;window.open(url,\"_blank\");}});};}export function withRedirectToCrossroadsUsingSourceAndUserAction(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const today=new Date().toISOString().slice(0,10)// Get the current date (YYYY-MM-DD)\n;// Try to get the UUID from localStorage\nlet userId=localStorage.getItem(`userUUID_${today}`);fetch(\"https://back.finsearch.fr/finalgo/crossroads/logSpecificUserAction\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({action:\"LANDING_PAGE_CLICK\",message:\"googleAds-finsearch , window.location.href: \"+window.location.href+\" , uuid: \"+userId})});const queryParams=new URLSearchParams(window.location.search);let source=queryParams.get(\"source\");if(source==null){source=\"siteCefin\";}const url=`https://finsearch.fr/crossroads/#/authentification-automate?source=${source}`;window.open(url,\"_blank\");}});};}export function withRedirectToAdvisorGetMagicLink(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const url=`https://finsearch.fr/financement/#/authentification`;window.open(url,\"_blank\");}});};}export function withMakkerUserAction(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const today=new Date().toISOString().slice(0,10)// Get the current date (YYYY-MM-DD)\n;// Try to get the UUID from localStorage\nlet userId=localStorage.getItem(`userUUID_${today}`);fetch(\"https://back.finsearch.fr/finalgo/crossroads/logSpecificUserAction\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({action:\"FRAMER_NAVIGATION_CLICK_ON_MAKKER_BUTTON\",message:\"window.location.href: \"+window.location.href+\" , uuid: \"+userId})});window.open(\"https://app.makker.fr/auth/inscription/?campain=cefin\",\"_blank\");}});};}export function withRedirectToCrossroadsUsingBlogHrefAsSource(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const url=`https://finsearch.fr/crossroads/#/authentification-automate?source=${window.location.href.split(\"?\")[0].split(\"/\").pop()}`;window.open(url,\"_blank\");}});};}export function withRedirectToCefinUsingBlogHrefAsSource(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const url=`https://cefin.fr?source=${window.location.href.split(\"?\")[0].split(\"/\").pop()}`;window.open(url,\"_blank\");}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withMakkerUserAction\":{\"type\":\"reactHoc\",\"name\":\"withMakkerUserAction\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedirectToAdvisorGetMagicLink\":{\"type\":\"reactHoc\",\"name\":\"withRedirectToAdvisorGetMagicLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedirectToCrossroadsUsingSourceAndUserAction\":{\"type\":\"reactHoc\",\"name\":\"withRedirectToCrossroadsUsingSourceAndUserAction\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedirectToCefinUsingBlogHrefAsSource\":{\"type\":\"reactHoc\",\"name\":\"withRedirectToCefinUsingBlogHrefAsSource\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedirectToCrossroadsUsingSource\":{\"type\":\"reactHoc\",\"name\":\"withRedirectToCrossroadsUsingSource\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCustomClick\":{\"type\":\"reactHoc\",\"name\":\"withCustomClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedirectToCrossroadsUsingBlogHrefAsSource\":{\"type\":\"reactHoc\",\"name\":\"withRedirectToCrossroadsUsingBlogHrefAsSource\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UserActions.map"],"mappings":"A,kHACqgB,SAAgBK,EAAiD,EAAU,CAAC,MAAO,IAA4B,gBAAKC,EAAU,CAAC,GAAGC,EAAM,YAAY,CAAC,IAAMC,mBAAM,IAAI,KAAK,EAAA,CAAE,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE,EAErsBC,EAAO,aAAa,QAAQ,YAAYD,GAAO,EAAE,MAAM,qEAAqE,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,kBAAkB,EAAE,KAAK,KAAK,UAAU,CAAC,OAAO,qBAAqB,QAAQ,+CAA+CP,EAAO,SAAS,KAAK,YAAYQ,CAAM,CAAC,CAAC,CAAC,EAAgE,IAAIC,EAAO,IAAnD,gBAAgBT,EAAO,SAAS,MAA6B,CAAC,CAAC,IAAI,QAAQ,EAAE,AAAiBS,IAAO,YAAa,IAAMC,EAAI,sEAAsED,IAAST,EAAO,KAAKU,EAAI,QAAQ,CAAE,CAAC,CAAC,CAAI,CAE5K,SAAgBC,EAA8C,EAAU,CAAC,MAAO,IAA4B,gBAAKN,EAAU,CAAC,GAAGC,EAAM,YAAY,CAAC,IAAMI,EAAI,sEAAsEV,EAAO,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAIA,EAAO,KAAKU,EAAI,QAAQ,CAAE,CAAC,CAAC,CAAI,C"}