{"version":3,"file":"shared.PH37cTYb.mjs","names":["useStore","useState","useState","fonts","css","className"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/Sm3iMbEMKMfudoHG3xjk/NNNQ330b4psbftAMAvI8/SignupButton.js","https:/framerusercontent.com/modules/8jkKvyrRQzgPQIU8JhhM/oX0GwVTZxpb0eQZQVvVe/GEqgOH2Eq.js","https:/framerusercontent.com/modules/QyGCtFXDyVoEc2X4LuQR/cgfFfJdeVJDQQkmVyHCs/Os5ILs6f2.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";import{useEffect,useState}from\"react\";// Learn more: https://www.framer.com/docs/guides/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withTracking(Component){return props=>{const[fullUrl,setFullUrl]=useState(\"\");useEffect(()=>{const signupUrl=new URL(\"https://app.magicpost.in/signup\");// Vérifier s'il y a des paramètres UTM dans l'URL courante\nconst currentUrl=new URL(window.location.href);const urlParams=new URLSearchParams(currentUrl.search);const hasUrlUTMParams=Array.from(urlParams.keys()).some(key=>key.startsWith(\"utm_\"));let utmParams;if(hasUrlUTMParams){// Priorité 1: Utiliser les paramètres UTM de l'URL courante\nutmParams={};urlParams.forEach((value,key)=>{if(key.startsWith(\"utm_\")){utmParams[key]=value;}});}else{// Vérifier s'il y a des paramètres UTM stockés en sessionStorage\n// OU si utm_source est différent de \"direct\" et utm_medium est différent de \"none\"\nconst hasStoredUTMParams=sessionStorage.getItem(\"utm_source\")||sessionStorage.getItem(\"utm_medium\")||sessionStorage.getItem(\"utm_campaign\")||sessionStorage.getItem(\"utm_content\")||sessionStorage.getItem(\"utm_term\");const storedUtmSource=sessionStorage.getItem(\"utm_source\");const storedUtmMedium=sessionStorage.getItem(\"utm_medium\");const hasNonDefaultParams=storedUtmSource&&storedUtmSource!==\"direct\"||storedUtmMedium&&storedUtmMedium!==\"none\";if(hasStoredUTMParams||hasNonDefaultParams){// Priorité 2: Utiliser les paramètres UTM stockés\nutmParams=getStoredUTMParameters();}else{// Priorité 3: Fallback sur les paramètres basés sur le referrer\nutmParams=getUTMParametersBasedOnReferrer();}}Object.entries(utmParams).forEach(([key,value])=>{if(value){signupUrl.searchParams.append(key,value);}});// Mise à jour de l'URL complète dans l'état\nsetFullUrl(signupUrl.toString());},[]);return /*#__PURE__*/_jsx(Component,{...props,href:fullUrl,style:{textDecoration:\"none\",...props.style}});};}export function withTrackingOld(Component){return props=>{// Utilisation des hooks useState pour stocker l'URL complète\nconst[fullUrl,setFullUrl]=useState(\"\");// Utilisation de useEffect pour capturer tous les paramètres de l'URL lors du chargement du composant\nuseEffect(()=>{const currentUrl=new URL(window.location.href);const params=new URLSearchParams(currentUrl.search);const signupUrl=new URL(\"https://app.magicpost.in/signup\");if(!params.toString()){// Aucun paramètre existant, donc on génère les paramètres UTM selon le referrer\nconst utmParams=getUTMParametersBasedOnReferrer();Object.entries(utmParams).forEach(([key,value])=>{signupUrl.searchParams.append(key,value);});}else{// Ajout de tous les paramètres existants\nparams.forEach((value,key)=>{signupUrl.searchParams.append(key,value);});}// Mise à jour de l'URL complète dans l'état\nsetFullUrl(signupUrl.toString());},[]);return /*#__PURE__*/_jsx(Component,{...props,href:fullUrl});};}function getStoredUTMParameters(){const params=new URLSearchParams(window.location.search);return{utm_source:sessionStorage.getItem(\"utm_source\")||\"direct\",utm_medium:sessionStorage.getItem(\"utm_medium\")||\"none\",utm_campaign:sessionStorage.getItem(\"utm_campaign\")||\"\",utm_content:sessionStorage.getItem(\"utm_content\")||\"/\",utm_credits:params.get(\"utm_credits\")||\"5\",utm_term:sessionStorage.getItem(\"utm_term\")||window.location.pathname};}function getUTMParametersBasedOnReferrer(){var referrer=document.referrer||window.location.hostname;console.log(\"Referrer: \"+referrer);const currentHost=window.location.hostname;let utmSource=\"direct\"// Valeur par défaut si aucun referrer\n;let regex=new RegExp(`https?://${currentHost}([^?]*)`);let match=referrer.match(regex);let utmMedium=match?match[1]:\"none\";let currentPathName=window.location.pathname;let utmTerm=window.location.pathname;if(!sessionStorage.getItem(\"firstPage\")){// If not, set the key with the current URL\nsessionStorage.setItem(\"firstPage\",currentPathName);}// Retrieve the first page visited\nconst firstPage=sessionStorage.getItem(\"firstPage\");let utmContent=firstPage;// Gérer les référents externes\nconst refDomains={\"google.\":[\"google\",\"organic\"],\"facebook.\":[\"facebook\",\"social\"],\"twitter.\":[\"twitter\",\"social\"],\"linkedin.\":[\"linkedin\",\"social\"],\"youtube.\":[\"youtube\",\"social\"]};let found=false;for(const domain in refDomains){if(referrer.includes(domain)){[utmSource,utmMedium]=refDomains[domain];found=true;break;}}return{utm_source:utmSource,utm_medium:utmMedium,utm_campaign:\"referral_tracking\",utm_content:utmContent,utm_term:utmTerm};}export function withHover(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTracking\":{\"type\":\"reactHoc\",\"name\":\"withTracking\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTrackingOld\":{\"type\":\"reactHoc\",\"name\":\"withTrackingOld\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SignupButton.map","// Generated by Framer (5753dbc)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=['.framer-CG4D0 .framer-styles-preset-1m8ccwk:not(.rich-text-wrapper), .framer-CG4D0 .framer-styles-preset-1m8ccwk.rich-text-wrapper a { --framer-link-current-text-color: var(--token-799d00dd-6ade-4633-b8c1-291a361934ee, #7e4efd) /* {\"name\":\"Purple\"} */; --framer-link-current-text-decoration: none; --framer-link-hover-text-color: var(--token-799d00dd-6ade-4633-b8c1-291a361934ee, #7e4efd) /* {\"name\":\"Purple\"} */; --framer-link-hover-text-decoration: underline; --framer-link-text-color: var(--token-799d00dd-6ade-4633-b8c1-291a361934ee, #7e4efd); --framer-link-text-decoration: none; }'];export const className=\"framer-CG4D0\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (5753dbc)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Be Vietnam Pro-regular\",\"GF;Be Vietnam Pro-700\",\"GF;Be Vietnam Pro-700italic\",\"GF;Be Vietnam Pro-italic\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Be Vietnam Pro\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/bevietnampro/v11/QdVPSTAyLFyeg_IDWvOJmVES_Ew1D3s6ZKAi.woff2\",weight:\"400\"},{family:\"Be Vietnam Pro\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/bevietnampro/v11/QdVMSTAyLFyeg_IDWvOJmVES_HSMIF83T7wrcwap.woff2\",weight:\"700\"},{family:\"Be Vietnam Pro\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/bevietnampro/v11/QdVKSTAyLFyeg_IDWvOJmVES_HwyPcM3Rb0JdhapcUU.woff2\",weight:\"700\"},{family:\"Be Vietnam Pro\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/bevietnampro/v11/QdVNSTAyLFyeg_IDWvOJmVES_HwyBXoYYbAiah8.woff2\",weight:\"400\"}]}];export const css=['.framer-5kZTa .framer-styles-preset-1cqixcx:not(.rich-text-wrapper), .framer-5kZTa .framer-styles-preset-1cqixcx.rich-text-wrapper p { --framer-font-family: \"Be Vietnam Pro\", \"Be Vietnam Pro Placeholder\", sans-serif; --framer-font-family-bold: \"Be Vietnam Pro\", \"Be Vietnam Pro Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Be Vietnam Pro\", \"Be Vietnam Pro Placeholder\", sans-serif; --framer-font-family-italic: \"Be Vietnam Pro\", \"Be Vietnam Pro Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 18px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: 0em; --framer-line-height: 1.6em; --framer-paragraph-spacing: 17px; --framer-text-alignment: left; --framer-text-color: var(--token-5b863af1-2e9c-4f56-bede-6e156947edbf, #002050); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-5kZTa\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"qTAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,EAAO,CAAC,CAAC,CAAC,CAClD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAU,MAAM,EAAE,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,EAAS,CAAC,EAChI,EAAW,OAAO,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,EAAO,CAAC,CAAC,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAC3B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAW,EAAE,EAAW,OAAO,GAAW,SAAS,OAAO,OAAO,CAAC,GAAG,EAAW,GAAG,EAAS,CAAC,CAAC,EACjJ,EAAa,QAAQ,GAAQ,EAAO,EAAW,CAAC,EAChD,SAASA,GAAU,CACnB,GAAK,CAAC,EAAM,GAAUE,EAAS,EAAW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