PageSourceSearch

https://www.franova.fr/_next/static/chunks/4803-24f2175d8afb7556.js

js franova.fr collected 2026-10-01 14:29:47 UTC 31,305 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0f32f-12ac-7382-9bf6-8444979f3252")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4803],{14562:(e,t,a)=>{a.d(t,{A:()=>u,x:()=>x});var r=a(54568);a(7620);var s=a(4644),n=a(12598),i=a(94600),l=a(74699);let o={blue:{bg:"bg-[var(--tint-blue-light)] dark:bg-[var(--tint-blue-dark)]",text:"text-[var(--color-franova-blue)] dark:text-[var(--color-franova-blue-vibrant)]"},green:{bg:"bg-[var(--tint-green-light)] dark:bg-[var(--tint-green-dark)]",text:"text-[var(--color-franova-green)] dark:text-[var(--color-franova-green-vibrant)]"},orange:{bg:"bg-[var(--tint-orange-light)] dark:bg-[var(--tint-orange-dark)]",text:"text-[var(--color-franova-orange)] dark:text-[var(--color-franova-orange-vibrant)]"},red:{bg:"bg-[var(--tint-red-light)] dark:bg-[var(--tint-red-dark)]",text:"text-[var(--color-franova-red)] dark:text-[var(--color-franova-red-vibrant)]"},purple:{bg:"bg-[var(--tint-purple-light)] dark:bg-[var(--tint-purple-dark)]",text:"text-[var(--color-franova-purple)] dark:text-[var(--color-franova-purple-vibrant)]"},teal:{bg:"bg-[var(--tint-teal-light)] dark:bg-[var(--tint-teal-dark)]",text:"text-[var(--color-franova-teal)] dark:text-[var(--color-franova-teal-vibrant)]"}},c={hidden:{opacity:0,scale:.95,y:20},visible:{opacity:1,scale:1,y:0,transition:{type:"spring",stiffness:300,damping:30,staggerChildren:.05}},exit:{opacity:0,scale:.95,y:20,transition:{duration:.2}}},d={hidden:{opacity:0,x:-16},visible:{opacity:1,x:0,transition:{type:"spring",stiffness:200,damping:25}}},u=e=>{let{title:t,description:a,icon:u,iconTheme:x="blue",children:m,primaryAction:p,secondaryAction:h,showCloseButton:b=!1,onClose:v,className:f}=e,g=o[x];return(0,r.jsxs)(s.P.div,{variants:c,initial:"hidden",animate:"visible",exit:"exit",className:(0,l.cn)("relative w-full max-w-[480px] mx-auto","bg-white/95 dark:bg-[var(--surface-elevated-dark)]","backdrop-blur-xl","rounded-[32px]","border border-white/40 dark:border-white/10","shadow-[0_8px_32px_rgba(0,0,0,0.12)] dark:shadow-[0_8px_32px_rgba(0,0,0,0.5)]","overflow-hidden",f),children:[b&&v&&(0,r.jsx)("button",{onClick:v,className:"absolute top-5 right-5 w-8 h-8 rounded-full bg-gray-100 dark:bg-white/10 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-white/20 transition-colors z-10","aria-label":"Fermer",children:(0,r.jsx)(n.A,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"})}),(0,r.jsxs)("div",{className:"p-8",children:[(0,r.jsxs)(s.P.div,{variants:d,className:"flex flex-col items-center text-center mb-6",children:[u&&(0,r.jsx)("div",{className:(0,l.cn)("w-14 h-14 rounded-full flex items-center justify-center mb-4 shadow-sm",g.bg,g.text),children:u}),(0,r.jsx)("h3",{className:"text-[24px] font-bold text-slate-900 dark:text-white mb-2 tracking-tight",children:t}),a&&(0,r.jsx)("div",{className:"text-[15px] text-gray-600 dark:text-gray-300 leading-relaxed",children:a})]}),(0,r.jsx)(s.P.div,{variants:d,children:m}),(p||h)&&(0,r.jsxs)(s.P.div,{variants:d,className:"mt-8 space-y-3",children:[p&&(0,r.jsx)(i.A,{variant:"danger"===p.variant?"danger":"primary",size:"lg",onClick:p.onClick,disabled:p.disabled,isLoading:p.isLoading,className:"w-full justify-center",children:p.label}),h&&(0,r.jsx)(i.A,{variant:"ghost",size:"lg",onClick:h.onClick,disabled:h.disabled,isLoading:h.isLoading,className:"w-full justify-center",children:h.label})]})]})]})},x=e=>{let{icon:t,title:a,description:n,index:i=0,theme:c="blue"}=e,d=o[c];return(0,r.jsxs)(s.P.div,{initial:{opacity:0,x:-24},animate:{opacity:1,x:0},transition:{delay:.08*i+.1,type:"spring",stiffness:200,damping:25},className:"flex gap-4 p-4 rounded-[20px] bg-white/50 dark:bg-white/5 border border-gray-200/50 dark:border-white/5 hover:bg-white/80 dark:hover:bg-white/10 transition-colors",children:[(0,r.jsx)("div",{className:(0,l.cn)("w-10 h-10 rounded-full flex-shrink-0 flex items-center justify-center mt-0.5",d.bg,d.text),children:t}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"text-[15px] font-bold text-slate-900 dark:text-white mb-0.5",children:a}),(0,r.jsx)("p",{className:"text-[13px] text-gray-500 dark:text-gray-400 leading-relaxed",children:n})]})]})}},33796:(e,t,a)=>{a.d(t,{A:()=>S});var r=a(54568),s=a(7620),n=a(4644),i=a(99100),l=a(32536),o=a(58997),c=a(48065),d=a(45234),u=a(32064),x=a(65390
1),m=a(62380),p=a(80229),h=a(18080),b=a(17023),v=a(99935),f=a(82078),g=a(69885),j=a(47115),k=a(94600),w=a(14562),y=a(50553),N=a(34047),C=a(98878),A=a(74699),_=a(40392),z=a(57792);let S=e=>{let{isOpen:t,onClose:a,onInstallSuccess:S}=e,{userPlatform:I,isStandalone:P,triggerInstallPrompt:F,installPromptEvent:D,installMethod:E,inAppBrowser:L}=(0,y.vf)(),[T,O]=(0,s.useState)("idle"),W="prompting"===T,M="success"===T,B=!!D&&"function"==typeof D.prompt,R=(0,s.useRef)(!1),q=(0,s.useRef)(null),G=(0,s.useMemo)(()=>(0,_.X5)(),[]);(0,s.useEffect)(()=>{t&&(O("idle"),R.current=!1,q.current&&(clearTimeout(q.current),q.current=null))},[t,D]),(0,s.useEffect)(()=>(!t&&q.current&&(clearTimeout(q.current),q.current=null),()=>{q.current&&(clearTimeout(q.current),q.current=null)}),[t]);let U=(0,s.useMemo)(()=>null,[D,t]),V="iOS"===I||"MacIntel"===I?"Safari":"Windows"===I?"Chrome ou Edge":"Chrome",$=(0,s.useCallback)(()=>{!R.current&&(R.current=!0,O("success"),null==S||S(),S||(q.current=setTimeout(()=>{a()},1200)))},[a,S]),J=(0,s.useCallback)(async()=>{let e=window.location.href;try{var t;if(null==(t=navigator.clipboard)?void 0:t.writeText)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}g.oR.success("Lien copi\xe9",{description:"Ouvrez-le dans ".concat(V," pour installer l'app."),duration:2500})}catch(e){C.vF.warn("[V2PWAInstallModal] Failed to copy install link:",e),g.oR.error("Impossible de copier le lien",{description:"Essayez de s\xe9lectionner l'URL et de la copier manuellement.",duration:3e3})}},[V]),X=(0,s.useCallback)(()=>{window.open(window.location.href,"_blank","noopener,noreferrer")},[]),H=async()=>{if(!B)return void O("fallback");try{O("prompting");let e=await F();if("not_available"===e)return void O("fallback");if("accepted"===e){N.analyticsService.trackPWAPromptAccepted(),$();return}if("dismissed"===e){localStorage.setItem("pwaInstallDismissed",Date.now().toString()),N.analyticsService.trackPWAPromptDismissed(),a();return}O("idle"),a()}catch(e){C.vF.error("[V2PWAInstallModal] Error in install click handler:",e),O("fallback")}},Q=()=>{a(),localStorage.setItem("pwaInstallDismissed",Date.now().toString()),N.analyticsService.trackPWAPromptDismissed()},Y=[{icon:(0,r.jsx)(o.A,{className:"w-5 h-5"}),title:"Acc\xe8s instantan\xe9",description:"Lancez l'app en un clic depuis votre \xe9cran d'accueil"},{icon:(0,r.jsx)(c.A,{className:"w-5 h-5"}),title:"Exp\xe9rience native",description:"Interface optimis\xe9e comme une vraie application"},{icon:(0,r.jsx)(d.A,{className:"w-5 h-5"}),title:"Toujours \xe0 jour",description:"Mises \xe0 jour automatiques sans effort"}],Z=(()=>{switch(I){case"iOS":return{title:"Ajoutez Franova \xe0 votre iPhone",subtitle:"Acc\xe9dez plus rapidement \xe0 votre pr\xe9paration",showAutoInstall:!1,showBenefits:!0,instructions:!(0,_.nr)()||L?[{step:1,icon:(0,r.jsx)(u.A,{className:"w-4 h-4"}),text:(0,r.jsxs)(r.Fragment,{children:["Ouvrez la page dans ",(0,r.jsx)("strong",{children:"Safari"})]})},{step:2,icon:(0,r.jsx)(x.A,{className:"w-4 h-4"}),text:(0,r.jsxs)(r.Fragment,{children:["Appuyez sur ",(0,r.jsx)("strong",{children:"Partager"})," ",(0,r.jsx)("span",{className:"text-slate-500 dark:text-slate-400",children:"(en bas de Safari)"})]})},{step:3,icon:(0,r.jsx)(m.A,{className:"w-4 h-4"}),text:(0,r.jsxs)(r.Fragment,{children:["S\xe9lectionnez ",(0,r.jsx)("strong",{children:"\"Sur l'\xe9cran d'accueil\""})]})}]:[{step:1,icon:(0,r.jsx)(x.A,{className:"w-4 h-4"}),text:(0,r.jsxs)(r.Fragment,{children:["Appuyez sur ",(0,r.jsx)("strong",{children:"Partager"})," ",(0,r.jsx)("span",{className:"text-slate-500 dark:text-slate-400",children:"(en bas de Safari)"})]})},{step:2,icon:(0,r.jsx)(m.A,{className:"w-4 h-4"}),text:(0,r.jsxs)(r.Fragment,{children:["S\xe9lectionnez ",(0,r.jsx)("strong",{children:"\"Sur l'\xe9cran d'accueil\""})]})},{step:3,text:(0,r.jsxs)(r.Fragment,{children:["Confirmez avec ",(0,r.jsx)("strong",{children:'"Ajouter"'})]})}],primaryButtonText:"Compris !"};case"MacIntel":return{title:"Ajoutez Franova \xe0 votre Dock",subtitle:(0,_.nr)()?"Acc\xe8s rapide depuis votre Mac":"Utilisez Safari pour ajouter au Dock",showAutoInstall:B&&!(0,_.nr)(),showBenefits:!1,instructions:(0,_.nr)()?[{step:1,icon:(0,r.jsx)(p.A,{className:"w-4 h-4"}),text:(0,r.jsxs)(r.Fragment,{children:["Cliquez sur ",(0,r.jsx)("strong",{children:'"Fichier"'})," dans la barre de menu"]})},{step:2,icon:(0,r.jsx)(h.A,{className:"w-4 h-4"}),text:(0,r.jsxs)(r.Fragment,{children:["S\xe9lectionnez ",(0,r.jsx)("strong",{children:'"Ajouter au Dock"'})]})}]:[{step:1,text:(0,r.jsxs)(r.Fragment,{children:["Cliquez sur l'ic\xf4ne ",(0,r.jsx)("strong",{children:"d'installation"})," dans la barre d'adresse"]})}],primaryButtonText:"Compris !"};case"Android":let e=!!L||"unavailable"===E;return{title:"Installez l'application",subtitle:B?"Installez en un clic":"Quelques \xe9tapes simples pour installer l'app",showAutoInstall:B&&!e,showBenefits:!0,instructions:e?[{step:1,text:(0,r.jsxs)(r.Fragment,{children:["Ouvrez la page dans ",(0,r.jsx)("strong",{children:V})]})},{step:2,text:(0,r.jsxs)(r.Fragment,{children:["Puis appuyez sur ",(0,r.jsx)("strong",{children:"Installer"})," dans le navigateur"]})}]:[{step:1,text:(0,r.jsxs)(r.Fragment,{children:["Appuyez sur le menu ",(0,r.jsx)("strong",{children:"⋮"})," ",(0,r.jsx)("span",{className:"text-slate-500 dark:text-slate-400",children:"(en haut \xe0 droite)"})]})},{step:2,text:(0,r.jsxs)(r.Fragment,{children:["S\xe9lectionnez"," ",(0,r.jsx)("strong",{children:"samsung"===G?"\"Ajouter \xe0 l'\xe9cran d'accueil\"":'"Installer l\'application"'})]})},{step:3,text:(0,r.jsx)(r.Fragment,{children:"Confirmez l'installation"})}],primaryButtonText:null};case"Windows":let t="unavailable"===E;return{title:"Installez Franova sur votre PC",subtitle:B?"Installez en un clic":"Acc\xe8s rapide depuis votre bureau",showAutoInstall:B&&!t,showBenefits:!1,instructions:t?[{step:1,text:(0,r.jsxs)(r.Fragment,{children:["Utilisez ",(0,r.jsx)("strong",{children:V})," pour installer l'application"]})},{step:2,text:(0,r.jsxs)(r.Fragment,{children:["Recherchez ",(0,r.jsx)("strong",{children:'"Installer"'})," dans la barre d'adresse"]})}]:[{step:1,text:(0,r.jsxs)(r.Fragment,{children:["Cliquez sur le menu ",(0,r.jsx)("strong",{children:"⋮"})," ou l'ic\xf4ne"," ",(0,r.jsx)("strong",{children:"d'installation"})," dans la barre d'adresse"]})},{step:2,text:(0,r.jsxs)(r.Fragment,{children:["S\xe9lectionnez ",(0,r.jsx)("strong",{children:'"Installer Franova"'})]})}],primaryButtonText:null};default:return{title:"Installez l'application",subtitle:"Utilisez les options de votre navigateur",showAutoInstall:B&&"unavailable"!==E,showBenefits:!0,instructions:[{step:1,text:(0,r.jsxs)(r.Fragment,{children:["Cherchez ",(0,r.jsx)("strong",{children:'"Installer"'})," ou"," ",(0,r.jsx)("strong",{children:"\"Ajouter \xe0 l'\xe9cran d'accueil\""})," dans le menu du navigateur"]})}],primaryButtonText:null}}})(),K=Z.showAutoInstall&&"fallback"!==T&&!M,ee=(e=>{switch(e){case"instagram":return"Instagram";case"facebook":return"Facebook";case"messenger":return"Messenger";case"whatsapp":return"WhatsApp";case"line":return"LINE";
1case"wechat":return"WeChat";case"tiktok":return"TikTok";case"twitter":return"X";case"linkedin":return"LinkedIn";case"pinterest":return"Pinterest";case"snapchat":return"Snapchat";default:return"votre application"}})(L),et="Chrome ou Edge"===V?"Ouvrir dans le navigateur":"Ouvrir dans ".concat(V);return((0,s.useEffect)(()=>{let e=()=>{$()};return t&&window.addEventListener("appinstalled",e),()=>{window.removeEventListener("appinstalled",e)}},[t,$]),!t||P)?null:(0,r.jsx)(j.A,{isOpen:t,onClose:a,category:"pwa",children:(0,r.jsxs)(n.P.div,{variants:z.HT,initial:"hidden",animate:"visible",className:"-mx-6 -mt-6 px-5 pt-5 sm:px-6 sm:pt-6",children:[(0,r.jsxs)(n.P.div,{variants:z.$,className:"flex flex-col items-center text-center mb-6",children:[(0,r.jsx)("div",{className:(0,A.cn)("w-20 h-20 rounded-[20px] flex items-center justify-center mb-4","bg-gradient-to-br from-[var(--tint-blue-light)] to-[var(--tint-purple-light)]","dark:from-[var(--tint-blue-dark)] dark:to-[var(--tint-purple-dark)]","shadow-lg"),children:(0,r.jsx)(l.default,{src:"/logo-light.svg",alt:"Franova",width:48,height:48,className:"w-12 h-12"})}),(0,r.jsx)("h2",{id:"pwa-install-title",className:"text-[22px] font-bold text-slate-900 dark:text-white mb-2",children:Z.title}),(0,r.jsx)("p",{id:"pwa-install-subtitle",className:"text-[15px] text-slate-600 dark:text-slate-300",children:Z.subtitle})]}),Z.showBenefits&&(0,r.jsx)(n.P.div,{variants:z.$,className:"space-y-3 mb-6",children:Y.map((e,t)=>(0,r.jsx)(w.x,{icon:e.icon,title:e.title,description:e.description,index:t,theme:"blue"},t))}),(!!L||"unavailable"===E&&!B)&&(0,r.jsxs)("div",{className:(0,A.cn)("mb-4 rounded-[16px] px-4 py-3 text-[13px] leading-relaxed","bg-[var(--tint-blue-light)] dark:bg-[var(--tint-blue-dark)]","border border-[var(--color-franova-blue)]/15 dark:border-[var(--color-franova-blue)]/25","text-slate-700 dark:text-slate-200"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-[14px] font-semibold text-slate-900 dark:text-white mb-1",children:[(0,r.jsx)(u.A,{className:"w-4 h-4 text-[var(--color-franova-blue)] dark:text-[var(--color-franova-blue-vibrant)]"}),L?"Ouverture dans ".concat(ee," d\xe9tect\xe9e"):"Installation non disponible sur ce navigateur"]}),(0,r.jsxs)("p",{children:[L?"L'installation n'est pas disponible dans ".concat(ee,"."):"Ce navigateur ne prend pas en charge l'installation."," ","Ouvrez Franova dans ",(0,r.jsx)("strong",{children:V})," pour installer l'app."]}),(0,r.jsxs)("div",{className:"mt-3 flex flex-col sm:flex-row gap-2",children:[(0,r.jsx)(k.A,{variant:"secondary",size:"sm",onClick:J,icon:(0,r.jsx)(b.A,{className:"w-4 h-4"}),children:"Copier le lien"}),(0,r.jsx)(k.A,{variant:"primary",size:"sm",onClick:X,icon:(0,r.jsx)(u.A,{className:"w-4 h-4"}),children:et})]})]}),M&&(0,r.jsxs)("div",{className:(0,A.cn)("mb-4 rounded-[16px] px-4 py-3 text-[13px] leading-relaxed","bg-[var(--tint-green-light)] dark:bg-[var(--tint-green-dark)]","border border-[var(--color-franova-green)]/15 dark:border-[var(--color-franova-green)]/25","text-slate-700 dark:text-slate-200"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-[14px] font-semibold text-slate-900 dark:text-white mb-1",children:[(0,r.jsx)(v.A,{className:"w-4 h-4 text-[var(--color-franova-green)] dark:text-[var(--color-franova-green-vibrant)]"}),"Installation r\xe9ussie"]}),(0,r.jsx)("p",{children:"Ouvrez Franova depuis votre \xe9cran d'accueil pour continuer."})]}),"fallback"===T&&(0,r.jsx)("div",{className:(0,A.cn)("mb-4 rounded-[16px] px-4 py-3 text-[13px] leading-relaxed","bg-[var(--tint-blue-light)] dark:bg-[var(--tint-blue-dark)]","border border-[var(--color-franova-blue)]/15 dark:border-[var(--color-franova-blue)]/25","text-slate-700 dark:text-slate-200"),children:"L'installation automatique n'est pas disponible. Suivez la m\xe9thode manuelle ci-dessous."}),(0,r.jsx)(i.N,{children:K&&(0,r.jsx)(n.P.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,height:0},className:"mb-4",children:(0,r.jsx)(k.A,{variant:"primary",size:"lg",onClick:H,fullWidth:!0,isLoading:W,icon:W?(0,r.jsx)(d.A,{className:"w-5 h-5 animate-spin"}):(0,r.jsx)(f.A,{className:"w-5 h-5"}),children:W?"Ouverture de l'installation...":"Installer maintenant"})})}),!M&&(0,r.jsxs)(n.P.div,{variants:z.$,className:(0,A.cn)("p-4 rounded-[20px] mb-6","bg-[var(--tint-blue-light)] dark:bg-[var(--tint-blue-dark)]","border border-[var(--color-franova-blue)]/10 dark:border-[var(--color-franova-blue)]/20"),children:[(0,r.jsxs)("h3",{className:"text-[14px] font-semibold text-slate-900 dark:text-white mb-3 flex items-center gap-2",children:[(0,r.jsx)("span",{className:(0,A.cn)("w-6 h-6 rounded-full flex items-center justify-center text-[11px] font-bold","bg-[var(--color-franova-blue)] text-white"),children:K?"?":"!"}),K?"Ou installez manuellement":"Comment installer"]}),(0,r.jsx)("ol",{className:"space-y-3",children:Z.instructions.map(e=>(0,r.jsxs)("li",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:(0,A.cn)("flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center","bg-white dark:bg-white/10 text-[var(--color-franova-blue)] dark:text-[var(--color-franova-blue-vibrant)]","text-[12px] font-semibold shadow-sm"),children:e.step}),(0,r.jsxs)("span",{className:"text-[14px] text-slate-700 dark:text-slate-200 pt-0.5 flex items-center gap-1.5 flex-wrap",children:["icon"in e&&e.
1icon&&(0,r.jsx)("span",{className:"text-[var(--color-franova-blue)] dark:text-[var(--color-franova-blue-vibrant)]",children:e.icon}),e.text]})]},e.step))})]}),(0,r.jsxs)(n.P.div,{variants:z.$,className:"space-y-3",children:[Z.primaryButtonText&&(0,r.jsx)(k.A,{variant:"primary",size:"lg",onClick:Q,fullWidth:!0,children:Z.primaryButtonText}),(0,r.jsx)("button",{onClick:Q,className:(0,A.cn)("w-full py-3 text-[14px] transition-colors","text-slate-500 dark:text-slate-400","hover:text-slate-700 dark:hover:text-slate-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-franova-blue)] focus-visible:ring-offset-2 rounded-lg"),children:"Plus tard"})]}),U&&(0,r.jsxs)("details",{className:"mt-4",children:[(0,r.jsxs)("summary",{className:"text-xs text-slate-400 cursor-pointer hover:text-slate-600",children:["Debug: ",I," - ",G," -"," ",D?"Auto available":"Manual only"]}),(0,r.jsx)("pre",{className:"mt-2 p-3 bg-slate-100 dark:bg-white/5 rounded-lg text-[10px] text-slate-500 overflow-auto max-h-32",children:JSON.stringify(U,null,2)})]}),(0,r.jsx)("div",{className:"pb-5 sm:pb-6"})]})})}},62300:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(54568),s=a(7620),n=a(27186),i=a(4644),l=a(74699);let o={sm:{container:"w-10 h-10",stroke:3,fontSize:"text-[12px]"},md:{container:"w-12 h-12",stroke:4,fontSize:"text-[14px]"},lg:{container:"w-14 h-14",stroke:4,fontSize:"text-[16px]"}},c=e=>{let{durationSeconds:t,onComplete:a,className:c,size:d="md"}
1=e,[u,x]=(0,s.useState)(t),[m,p]=(0,s.useState)(!1),h=(0,n.I)(),b=o[d],v="sm"===d?16:"md"===d?20:24,f=2*Math.PI*v,g=(0,s.useCallback)(()=>{m||(p(!0),a())},[m,a]);return((0,s.useEffect)(()=>{if(u<=0)return void g();let e=setInterval(()=>{x(e=>{let t=e-1;return t<=0?0:t})},1e3);return()=>clearInterval(e)},[u,g]),h)?(0,r.jsx)("div",{className:(0,l.cn)(b.container,"rounded-full flex items-center justify-center","bg-slate-100 dark:bg-slate-800","border border-slate-200 dark:border-slate-700",c),children:(0,r.jsx)("span",{className:(0,l.cn)(b.fontSize,"font-semibold tabular-nums","text-slate-500 dark:text-slate-400"),children:u})}):(0,r.jsxs)(i.P.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:300,damping:25},className:(0,l.cn)(b.container,"relative",c),children:[(0,r.jsxs)("svg",{className:"absolute inset-0 -rotate-90",viewBox:"0 0 56 56",children:[(0,r.jsx)("circle",{cx:"28",cy:"28",r:v,fill:"none",className:"stroke-slate-200 dark:stroke-slate-700",strokeWidth:b.stroke}),(0,r.jsx)(i.P.circle,{cx:"28",cy:"28",r:v,fill:"none",className:"stroke-slate-400 dark:stroke-slate-500",strokeWidth:b.stroke,strokeLinecap:"round",strokeDasharray:f,initial:{strokeDashoffset:0},animate:{strokeDashoffset:f},transition:{duration:t,ease:"linear"}})]}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("span",{className:(0,l.cn)(b.fontSize,"font-semibold tabular-nums","text-slate-500 dark:text-slate-400","transition-opacity duration-150"),children:u})})]})}},72858:(e,t,a)=>{a.d(t,{G:()=>h});var r=a(7620),s=a(99746),n=a(18375),i=a(63973),l=a(12824),o=a(64256),c=a(98878),d=a(57077),u=a(54951),x=a(34047);function m(e,t){switch(e){case"onboarding":return"onboarding";case"dashboard_modal":case"feature_gate":default:return"modal";case"upgrade_page":return"skipped"===t?"modal":"upgrade_page"}}function p(e){return{id:e.id,name:e.name,description:e.description,durationDays:e.durationDays,priceId:e.priceId}}function h(e){var t;let{context:a,onCheckoutStart:h,onSkip:b,enabled:v=!0,trackView:f=!0}=e,[g,j]=(0,r.useState)([]),[k,w]=(0,r.useState)(!0),[y,N]=(0,r.useState)(null),[C,A]=(0,r.useState)(null),[_,z]=(0,r.useState)(0),S=(0,l.i)(),{executeAction:I}=(0,i.NB)(),{user:P}=(0,n.useAuthStore)((0,s.k)(e=>({user:e.user}))),F=(0,r.useMemo)(()=>!!v&&!!P&&(0,u.lO)(P),[v,P]),D=v&&null!=(t=null==P?void 0:P.welcomeOfferExpiresAt)?t:null;(0,r.useEffect)(()=>{if(!v){w(!1),j([]);return}(async()=>{try{w(!0);let e=(await o.A.fetchProducts()).filter(e=>e.durationDays in u.pG);e.sort((e,t)=>e.durationDays-t.durationDays),j(e.map(p)),c.vF.debug("[useWelcomeOfferPrompt] Loaded eligible products:",e.length)}catch(e){c.vF.error("[useWelcomeOfferPrompt] Failed to load products:",e)}finally{w(!1)}})()},[v]),(0,r.useEffect)(()=>{if(!v||!P)return void z(0);let e=()=>{z((0,u.c9)(P))};e();let t=setInterval(e,6e4);return()=>clearInterval(t)},[v,P]),(0,r.useEffect)(()=>{if(v&&f&&F&&D){let e=Math.max(0,D-Date.now());x.analyticsService.trackWelcomeOfferViewed({context:m(a,"viewed"),timeRemainingMs:e})}},[v,f,F,D,a]);let E=(0,r.useCallback)(async(e,t)=>{if(!v)return;if(!S)return void A("Le syst\xe8me de paiement n'est pas disponible. Veuillez r\xe9essayer.");let r=g.find(t=>t.id===e);if(!r)return void A("Produit introuvable.");let s=(0,u.pX)(r.durationDays);if(!s)return void A("Ce produit n'est pas \xe9ligible \xe0 l'offre de bienvenue.");x.analyticsService.trackWelcomeOfferPackageClicked({productId:e,priceCents:s.discountedPriceCents,discountPercent:s.discountPercent,context:m(a,"clicked")}),null==h||h(),A(null),N(e),await I("welcome-offer-checkout-".concat(e),async()=>{let e={priceId:t,consentGiven:!0,promoCode:s.couponId,purchaseSource:a},r=(0,d.R3)();r&&(r.utm_source&&(e.utmSource=r.utm_source),r.utm_medium&&(e.utmMedium=r.utm_medium),r.utm_campaign&&(e.utmCampaign=r.utm_campaign),r.utm_content&&(e.utmContent=r.utm_content),r.utm_term&&(e.utmTerm=r.utm_term));let n=(0,d.mu)();n&&(n.utm_source&&(e.utmLastSource=n.utm_source),n.utm_medium&&(e.utmLastMedium=n.utm_medium),n.utm_campaign&&(e.utmLastCampaign=n.utm_campaign),n.utm_content&&(e.utmLastContent=n.utm_content),n.utm_term&&(e.utmLastTerm=n.utm_term));let{sessionId:i}=await o.A.createCheckoutSession(e);if(!i)throw Error("Impossible de cr\xe9er la session de paiement.");c.vF.info("[useWelcomeOfferPrompt] Redirecting to checkout: ".concat(i));let{error:l}=await S.redirectToCheckout({sessionId:i});if(l)throw Error(l.message||"Erreur lors de la redirection vers le paiement.")}
1,{context:"payment",onError:e=>{A(e),N(null)}})},[v,S,g,a,h,I]);return{isActive:F,expiresAt:D,timeRemainingMs:_,products:g,isLoadingProducts:k,handleSelectPackage:E,handleSkip:(0,r.useCallback)(()=>{if(!v)return;let e=m(a,"skipped");x.analyticsService.trackWelcomeOfferSkipped({skipDestination:"onboarding"===a?"dashboard":"explore",context:e}),null==b||b()},[a,b,v]),isCheckoutLoading:null!==y,checkoutLoadingProductId:y,checkoutError:C,clearCheckoutError:(0,r.useCallback)(()=>{A(null)},[])}}},74342:(e,t,a)=>{a.d(t,{A:()=>p});var r=a(54568),s=a(7620),n=a(98425),i=a(18493),l=a(99100),o=a(4644),c=a(69885),d=a(74624),u=a(73246),x=a(63973),m=a(94600);function p(e){let{currentPage:t,className:a="",onCodeCopied:p,onDismiss:h}=e,{executeNavigation:b,isNavigating:v}=(0,x.x_)(),{activePromo:f,isVisible:g,dismissPromo:j,copyPromoCode:k}=(0,x.NG)(t),[w,y]=(0,s.useState)(!1),[N,C]=(0,s.useState)(!1),A=function(e){let[t,a]=(0,s.useState)("");return(0,s.useEffect)(()=>{if(!e)return;let t=()=>{let t=new Date,r=new Date(e).getTime()-t.getTime();if(r<=0)return void a("Offre expir\xe9e");let s=Math.floor(r/864e5),n=Math.floor(r%864e5/36e5),i=Math.floor(r%36e5/6e4);s>0?a("".concat(s,"j ").concat(n,"h")):n>0?a("".concat(n,"h ").concat(i,"min")):a("".concat(i,"min"))};t();let r=setInterval(t,6e4);return()=>clearInterval(r)},[e]),t}(null==f?void 0:f.endDate),_=(0,n.d)(0),z=(0,i.G)(_,[0,100],[1,0]),S=(0,i.G)(_,[0,100],[1,.85]);if(!f||!g)return null;let I=async()=>{let e=f.upgradeUrl||"/upgrade";await b(e)},P=async()=>{if(!w)try{y(!0),await k(),c.oR.success("Code ".concat(f.code," copi\xe9 !"),{description:"Vous pouvez maintenant le coller lors du paiement",duration:3e3}),null==p||p(f.code),setTimeout(()=>y(!1),1e3)}catch(e){c.oR.error("Erreur lors de la copie",{description:"Impossible de copier le code. Essayez de le s\xe9lectionner manuellement.",duration:4e3}),y(!1)}},F=()=>{N||(C(!0),j(f.id),null==h||h(f.id))},D={idle:{scale:1},copying:{scale:.95},success:{scale:1.05}},E=f.socialProof?"✨ D\xe9j\xe0 ".concat(f.socialProof.baseCount).concat(f.socialProof.showAsRange?"+":""," ").concat(f.socialProof.message):null,L=f.endDate&&A&&"Offre expir\xe9e"!==A,T=v(f.upgradeUrl||"/upgrade");return(0,r.jsx)(l.N,{mode:"wait",children:(0,r.jsx)(o.P.div,{variants:{hidden:{opacity:0,y:100,scale:.98},visible:{opacity:1,y:0,scale:1,transition:{type:"spring",stiffness:300,damping:28,mass:.9}},exit:{opacity:0,y:100,scale:.96,transition:{duration:.4,ease:[.32,.72,0,1]}}},initial:"hidden",animate:"visible",exit:"exit",style:{y:_,opacity:z,scale:S,bottom:"upgrade"===t?"calc(20px + env(safe-area-inset-bottom, 0px))":"calc(60px + env(safe-area-inset-bottom, 0px))"},drag:"y",dragConstraints:{top:0,bottom:120},dragElastic:{top:0,bottom:.2},onDragEnd:(e,t)=>{let a=t.velocity.y;t.offset.y>60||a>500?F():_.set(0)},whileDrag:{cursor:"grabbing",transition:{duration:0}},className:"fixed left-0 right-0 z-[65] select-none ".concat(a),children:(0,r.jsxs)("div",{className:"container mx-auto px-4 py-4",children:[(0,r.jsx)("div",{className:"flex justify-center mb-3 opacity-40",children:(0,r.jsx)("div",{className:"w-10 h-1 bg-gray-400 rounded-full"})}),(0,r.jsx)("div",{className:"hidden sm:block max-w-4xl mx-auto",children:(0,r.jsxs)("div",{className:"rounded-2xl p-5 shadow-xl relative border border-french-blue/20",style:{backgroundColor:"rgba(255, 255, 255, 0.35)",backdropFilter:"blur(24px) saturate(180%)",WebkitBackdropFilter:"blur(24px) saturate(180%)"},children:[(0,r.jsx)("button",{onClick:F,disabled:N,className:"absolute top-4 right-4 text-gray-600 hover:text-off-black transition-colors duration-200 p-1.5 rounded-lg hover:bg-white/50 disabled:opacity-50","aria-label":"Fermer la promotion",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"pr-10",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-1.5",children:[f.title&&(0,r.jsx)("h3",{className:"text-lg font-semibold text-off-black",children:f.title}),L&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-medium text-french-blue bg-french-blue/10 rounded-full px-3 py-1.5",children:[(0,r.jsx)(d.A,{className:"w-4 h-4"}),(0,r.jsx)("span",{children:A})]})]}),(0,r.jsx)("p",{className:"text-[15px] text-gray-700 mb-4 leading-relaxed",children:f.message}),E&&(0,r.jsx)("p",{className:"text-[13px] text-gray-600 mb-4",children:E}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(m.A,{variant:"primary",size:"sm",onClick:I,disabled:N||T,className:"whitespace-nowrap",children:T?"Chargement...":f.upgradeButtonText||"Je profite de l'offre"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"bg-white/80 backdrop-blur-sm rounded-lg px-3 py-2 border border-white/60",children:(0,r.jsx)("span",{className:"font-semibold text-french-blue text-sm font-mono",children:f.code})}),(0,r.jsx)(o.P.button,{variants:D,animate:w?"copying":"idle",onClick:P,disabled:w||N,className:"p-2 bg-white/60 hover:bg-white/80 rounded-lg transition-all duration-200 border border-white/60 disabled:opacity-50","aria-label":"Copier le code ".concat(f.code),children:(0,r.jsx)(u.A,{className:"w-4 h-4 transition-colors duration-200 ".concat(w?"text-french-blue":"text-off-black")})})]})]})]})]})}),(0,r.jsx)("div",{className:"block sm:hidden",children:(0,r.jsxs)("div",{className:"rounded-2xl p-4 shadow-lg relative border border-french-blue/20",style:{backgroundColor:"rgba(255, 255, 255, 0.3)",backdropFilter:"blur(24px) saturate(180%)",WebkitBackdropFilter:"blur(24px) saturate(180%)"},children:[(0,r.jsx)("button",{onClick:F,disabled:N,className:"absolute top-3 right-3 text-gray-600 hover:text-off-black transition-colors duration-200 p-1 rounded-lg hover:bg-white/50 disabled:opacity-50","aria-label":"Fermer la promotion",children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("h3",{className:"text-base font-semibold text-off-black mb-2.5",children:[f.title||"Offre sp\xe9ciale"," \uD83C\uDF89"]}),L&&(0,r.jsxs)("div",{className:"inline-flex items-center gap-1.5 text-[13px] font-medium text-french-blue bg-french-blue/10 rounded-full px-3 py-1 mb-3",children:[(0,r.jsx)(d.A,{className:"w-3.5 h-3.5"}),(0,r.jsxs)("span",{children:["Plus que ",A]}
1)]}),E&&(0,r.jsx)("p",{className:"text-xs text-gray-600 mb-3",children:E}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("span",{className:"text-[13px] font-medium text-gray-700 flex-shrink-0",children:"Code :"}),(0,r.jsx)("div",{className:"flex-1 bg-white/80 backdrop-blur-sm rounded-lg px-3 py-2 border border-white/60 min-w-0",children:(0,r.jsx)("span",{className:"font-semibold text-french-blue text-sm font-mono truncate block",children:f.code})}),(0,r.jsx)(o.P.button,{variants:D,animate:w?"copying":"idle",onClick:P,disabled:w||N,className:"w-9 h-9 bg-white/70 hover:bg-white/90 rounded-full flex items-center justify-center transition-all duration-200 border border-white/60 disabled:opacity-50 flex-shrink-0","aria-label":"Copier le code ".concat(f.code),children:(0,r.jsx)(u.A,{className:"w-4 h-4 transition-colors duration-200 ".concat(w?"text-french-blue":"text-off-black")})})]}),"upgrade"!==t&&(0,r.jsx)(m.A,{variant:"primary",size:"sm",onClick:I,disabled:N||T,fullWidth:!0,children:T?"Chargement...":f.upgradeButtonText||"Je profite de l'offre"})]})]})})]})})})}},76629:(e,t,a)=>{a.d(t,{Iy:()=>r,Nn:()=>o,Zz:()=>s,cY:()=>i,kT:()=>n,xq:()=>l});let r="franova_v2_trial_granted",s="franova_v2_premium_granted",n="franova_v2_v1_migration",i="franova_v2_v1_welcome_seen",l="franova_v2_welcome_offer_dismissed",o="franova_v2_gift_animation_shown"}}]);
2//# chunkId=01a0f32f-12ac-7382-9bf6-8444979f3252

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.