1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,772382,580860,e=>{"use strict";var t=e.i(456420);let r=(0,t.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,r],772382);let s=(0,t.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",0,s],580860)},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])},806537,e=>{"use strict";let t=(0,e.i(456420).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",0,t],806537)},605500,(e,t,r)=>{"use strict";e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let s=e.r(555682),a=e.r(190809),i=e.r(843476),n=a._(e.r(271645)),l=s._(e.r(174080)),o=s._(e.r(325633)),c=e.r(908927),d=e.r(987690),u=e.r(918556),m=e.r(65856),p=s._(e.r(1948)),h=e.r(818581),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function x(e,t,r,s,a,i,n){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let s=!1,a=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>s,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{s=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}s?.current&&s.current(e)}}))}function g(e){return n.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b="u"<typeof window?n.useEffect:n.useLayoutEffect,j=(0,n.forwardRef)(({src:e,srcSet:t,sizes:r,height:s,width:a,decoding:l,className:o,style:c,fetchPriority:d,placeholder:u,loading:m,unoptimized:p,fill:f,onLoadRef:j,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:w,sizesInput:k,onLoad:N,onError:S,...C},z)=>{let _=(0,n.useRef)(!1),L=(0,n.useRef)(null);b(()=>{let{current:e}=_,{current:t}=L;e||null===t||(S&&(t.src=t.src),t.complete&&x(t,u,j,y,v,p,k),_.current=!0)},[e,u,j,y,S,p,k]);let P=(0,h.useMergedRef)(z,L);return(0,i.jsx)("img",{...C,...g(d),loading:m,width:a,height:s,decoding:l,"data-nimg":f?"fill":"1",className:o,style:c,sizes:r,srcSet:t,src:e,ref:P,onLoad:e=>{x(e.currentTarget,u,j,y,v,p,k)},onError:e=>{w(!0),"empty"!==u&&v(!0),S&&S(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,i.jsx)(o.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,n.forwardRef)((e,t)=>{let r=(0,n.useContext)(m.RouterContext),s=(0,n.useContext)(u.ImageConfigContext),a=(0,n.useMemo)(()=>{let e=f||s||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:a,localPatterns:"u"<typeof window?s?.localPatterns:e.localPatterns}},[s]),{onLoad:l,onLoadingComplete:o}=e,h=(0,n.useRef)(l);(0,n.useEffect)(()=>{h.current=l},[l]);let x=(0,n.useRef)(o);(0,n.useEffect)(()=>{x.current=o},[o]);let[g,b]=(0,n.useState)(!1),[v,w]=(0,n.useState)(!1),{props:k,meta:N}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:a,blurComplete:g,showAltText:v});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j,{...k,unoptimized:N.unoptimized,placeholder:N.placeholder,fill:N.fill,onLoadRef:h,onLoadingCompleteRef:x,setBlurComplete:b,setShowAltText:w,sizesInput:e.sizes,ref:t}),N.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},794909,(e,t,r)=>{"use strict";e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return d},getImageProps:function(){return c}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(555682),n=e.r(908927),l=e.r(605500),o=i._(e.r(1948));function c(e){let{props:t}=(0,n.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=l.Image},657688,(e,t,r)=>{t.exports=e.r(794909)},325633,(e,t,r)=>{"use strict";e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return f},defaultHead:function(){return u}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(555682),n=e.r(190809),l=e.r(843476),o=n._(e.r(271645)),c=i._(e.r(898879)),d=e.r(742732);function u(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let p=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,s,a;return e.reduce(m,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,s=new Set,a={},e=>{let i=!0,n=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){n=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)s.has(r)?i=!1:s.add(r);else{let t=e.props[r],s=a[r]||new Set;("name"!==r||!n)&&s.has(t)?i=!1:(s.add(t),a[r]=s)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let f=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);return(0,l.jsx)(c.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},918556,(e,t,r)=>{"use strict";e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let s=e.r(555682)._(e.r(271645)),a=e.r(987690),i=s.default.createContext(a.imageConfigDefault)},65856,(e,t,r)=>{"use strict";e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return s}});let s=e.r(555682)._(e.r(271645)).default.createContext(null)},670965,(e,t,r)=>{"use strict";function s(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return s}})},1948,(e,t,r)=>{"use strict";e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let s=e.r(670965),a=e.r(543369);function i({config:e,src:t,width:r,quality:n}){let l=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,a.getAssetToken)())l=void 0;else{let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),s=r.get("dpl");if(s){l=s,r.delete("dpl");let a=r.toString();t=t.slice(0,e)+(a?"?"+a:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns. 2Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,
2configurable:!0});let o=(0,s.findClosestQuality)(n,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}i.__next_img_default=!0;let n=i},488143,(e,t,r)=>{"use strict";function s({widthInt:e,heightInt:t,blurWidth:r,blurHeight:a,blurDataURL:i,objectFit:n}){let l=r?40*r:e,o=a?40*a:t,c=l&&o?`viewBox='0 0 ${l} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===n?"xMidYMid":"cover"===n?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${i}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return s}})},987690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return n}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},908927,(e,t,r)=>{"use strict";e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return c}});let s=e.r(543369),a=e.r(488143),i=e.r(987690),n=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:r=!1,priority:d=!1,preload:u=!1,loading:m,className:p,quality:h,width:f,height:x,fill:g=!1,style:b,overrideSrc:j,onLoad:y,onLoadingComplete:v,placeholder:w="empty",blurDataURL:k,fetchPriority:N,decoding:S="async",layout:C,objectFit:z,objectPosition:_,lazyBoundary:L,lazyRoot:P,...M},T){var E;let O,R,A,{imgConf:I,showAltText:$,blurComplete:W,defaultLoader:D}=T,B=I||i.imageConfigDefault;if("allSizes"in B)O=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),r=B.qualities?.sort((e,t)=>e-t);O={...B,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===D)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let q=M.loader||D;delete M.loader,delete M.srcSet;let F="__next_img_default"in q;if(F){if("custom"===O.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop. 3Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=q;q=t=>{let{config:r,...s}=t;return e(s)}}if(C){"fill"===C&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[C];e&&(b={...b,...e});let r={responsive:"100vw",fill:"100vw"}[C];r&&!t&&(t=r)}let U="",V=o(f),G=o(x);if((E=e)&&"object"==typeof E&&(l(E)||void 0!==E.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}
3`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(R=t.blurWidth,A=t.blurHeight,k=k||t.blurDataURL,U=t.src,!g)if(V||G){if(V&&!G){let e=V/t.width;G=Math.round(t.height*e)}else if(!V&&G){let e=G/t.height;V=Math.round(t.width*e)}}else V=t.width,G=t.height}let H=!d&&!u&&("lazy"===m||void 0===m);(!(e="string"==typeof e?e:U)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,H=!1),O.unoptimized&&(r=!0),F&&!O.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let X=o(h),Y=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:z,objectPosition:_}:{},$?{}:{color:"transparent"},b),J=W||"empty"===w?null:"blur"===w?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:V,heightInt:G,blurWidth:R,blurHeight:A,blurDataURL:k||"",objectFit:Y.objectFit})}")`:`url("${w}")`,K=n.includes(Y.objectFit)?"fill"===Y.objectFit?"100% 100%":"cover":Y.objectFit,Q=J?{backgroundSize:K,backgroundPosition:Y.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:J}:{},Z=function({config:e,src:t,unoptimized:r,width:a,quality:i,sizes:n,loader:l}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,s.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,s.getAssetToken)())e=void 0;else if(e){let r=t.indexOf("?");if(-1!==r){let s=new URLSearchParams(t.slice(r+1));s.get("dpl")||(s.append("dpl",e),t=t.slice(0,r)+"?"+s.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},r,s){if(s){let r=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=r.exec(s);)a.push(parseInt(e[2]));if(a.length){let r=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,n),d=o.length-1;return{sizes:n||"w"!==c?n:"100vw",srcSet:o.map((r,s)=>`${l({config:e,src:t,quality:i,width:r})} ${"w"===c?r:s+1}${c}`).join(", "),src:l({config:e,src:t,quality:i,width:o[d]})}}({config:O,src:e,unoptimized:r,width:V,quality:X,sizes:t,loader:q}),ee=H?"lazy":m;return{props:{...M,loading:ee,fetchPriority:N,width:V,height:G,decoding:S,className:p,style:{...Y,...Q},sizes:Z.sizes,srcSet:Z.srcSet,src:j||Z.src},meta:{unoptimized:r,preload:u||d,placeholder:w,fill:g}}}},898879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let s=e.r(271645),a="u"<typeof window,i=a?()=>{}:s.useLayoutEffect,n=a?()=>{}:s.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=s.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return a&&(t?.mountedInstances?.add(e.children),l()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),n(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},345131,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(618566),a=e.i(744705),i=e.i(107471),n=e.i(657688),l=e.i(948148),o=e.i(632781),c=e.i(806537),d=e.i(678976),u=e.i(772382),m=e.i(580860),p=e.i(861745),h=e.i(846696),f=e.i(292779),x=e.i(851411),g=e.i(778497);let b={async login(e,t){try{let{data:r,error:s}=await i.supabase.auth.signInWithPassword({email:e,password:t});return{data:r,error:s}}catch(e){return g.Logger.error("Web",String(e)),{data:null,error:e}}},async signup(e,t,r){try{let{data:s,error:a}=await i.supabase.auth.signUp({email:e,password:t,options:{data:{locale:r||"en"}}});return{data:s,error:a}}catch(e){return g.Logger.error("Web",String(e)),{data:null,error:e}}},async updateProfileMetadata(e,t,r){try{let{data:{user:s}}=await i.supabase.auth.getUser();if(!s)return{data:null,error:"No user found"};let a=i.supabase.auth.updateUser({data:{prenom:e,nom:t,company_name:r||null}}),n=i.supabase.from("profiles").update({prenom:e,nom:t,company_name:r||null}).eq("id",s.id),[l,o]=await Promise.all([a,n]);return o.error&&g.Logger.error("Web","Error updating public.profiles: "+o.error.message),{data:l.data,error:l.error}}catch(e){return g.Logger.error("Web",String(e)),{data:null,error:e}}},async verifyOtp(e,t){try{let{data:r,error:s}=await i.supabase.auth.verifyOtp({email:e,token:t,type:"signup"});return{data:r,error:s}}catch(e){return g.Logger.error("Web",String(e)),{data:null,error:e}}},async resendOtp(e){try{let{data:t,error:r}=await i.supabase.auth.resend({type:"signup",email:e});return{data:t,error:r}}catch(e){return g.Logger.error("Web",String(e)),{data:null,error:e}}},async loginWithGoogle(e){try{let{data:t,error:r}=await i.supabase.auth.signInWithIdToken({provider:"google",token:e});return{data:t,error:r}}catch(e){return g.Logger.error("Web",String(e)),{data:null,error:e}}},async forgotPassword(e){try{let{data:t,error:r}=await i.supabase.auth.resetPasswordForEmail(e,{redirectTo:`${window.location.origin}/settings`});return{data:t,error:r}}catch(e){return g.Logger.error("Web",String(e)),{data:null,error:e}}}},j=()=>(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white dark:text-black absolute left-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),y=({text:e})=>(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm font-medium text-zinc-500",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"h-px flex-1 bg-zinc-200 dark:bg-zinc-800"}),e,(0,t.jsx)("span",{"aria-hidden":"true",className:"h-px flex-1 bg-zinc-200 dark:bg-zinc-800"})]}),v="w-full h-12 pl-4 rounded-xl text-sm font-medium field text-black dark:text-white placeholder:text-zinc-500 focus:outline-none transition-all duration-200",w="block text-sm font-medium text-zinc-700 dark:text-zinc-300";function k({label:e,...s}){let a=(0,r.useId)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:a,className:`${w} mb-2`,children:e}),(0,t.jsx)("input",{id:a,className:`${v} pr-4`,...s})]})}function N({label:e,labelAction:s,visible:a,onToggleVisible:i,children:n,...o}){let c=(0,l.useTranslations)("Auth"),d=(0,r.useId)();return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center gap-3 mb-2",children:[(0,t.jsx)("label",{htmlFor:d,className:w,children:e}),s]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:d,type:a?"text":"password",className:`${v} pr-11`,...o}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":c("showPassword"),"aria-pressed":a,"aria-controls":d,className:"absolute inset-y-0 right-0 w-11 flex items-center justify-center text-zinc-400 hover:text-black dark:hover:text-white focus-visible:text-black dark:focus-visible:text-white transition-colors focus:outline-none",children:a?(0,t.jsx)(m.EyeOff,{className:"w-4 h-4"}):(0,t.jsx)(u.Eye,{className:"w-4 h-4"})})]}),n]})}function S({children:e}){return(0,t.jsx)("div",{role:"alert",className:"px-4 py-3 rounded-xl text-xs font-medium bg-red-50 dark:bg-red-500/10 text-red-600 dark:text-red-400 animate-in fade-in",children:e})}let C=({isSignup:e,isLoading:r,onClick:s})=>{let a=(0,l.useTranslations)("Auth");return(0,t.jsxs)("button",{type:"button",onClick:s,disabled:r,className:"btn btn-lg btn-secondary w-full",children:[r?(0,t.jsx)(o.Loader2,{className:"w-5 h-5 animate-spin"}):(0,t.jsxs)("svg",{className:"w-5 h-5",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),a(e?"signup_with":"continue_with")]})},z=(e,t="success")=>{"success"===t?h.toast.success(e):h.toast.error(e)};function _({onSwitchMode:e}){let n=(0,l.useTranslations)("Auth"),o=(0,a.useRouter)(),c=(0,s.use
3SearchParams)(),[d,u]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),[h,f]=(0,r.useState)(!1),[x,g]=(0,r.useState)(!1),[v,w]=(0,r.useState)(null),L=async t=>{if(t.preventDefault(),w(null),!d||!m)return w(n("fillAllFields"));g(!0);let{error:r}=await b.login(d,m);if(g(!1),r){if(r.message.toLowerCase().includes("email not confirmed")||"email_not_confirmed"===r.code||r.message.toLowerCase().includes("not confirmed"))return e("signup");r.message.includes("Invalid login credentials")||r.message.includes("invalid login credentials")?z(n("invalidCredentials"),"error"):z(n("errorGeneric"),"error")}else z(n("loginSuccess"),"success"),setTimeout(()=>o.push(c.get("redirect")||"/dashboard"),1e3)},P=async()=>{g(!0);let{error:e}=await i.supabase.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/api/auth/callback`}});e&&(g(!1),z(n("errorGeneric"),"error"))};return(0,t.jsxs)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300 space-y-4",children:[v&&(0,t.jsx)(S,{children:v}),(0,t.jsx)(C,{isLoading:x,onClick:P}),(0,t.jsx)(y,{text:n("or")}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:L,children:[(0,t.jsx)(k,{label:n("emailLabel"),type:"email",autoComplete:"username",required:!0,value:d,onChange:e=>u(e.target.value)}),(0,t.jsx)(N,{label:n("passwordLabel"),autoComplete:"current-password",required:!0,value:m,onChange:e=>p(e.target.value),visible:h,onToggleVisible:()=>f(!h),labelAction:(0,t.jsx)("button",{type:"button",onClick:()=>e("forgot"),className:"font-medium text-zinc-500 hover:text-black dark:hover:text-white text-sm",children:n("forgotPasswordLink")})}),(0,t.jsxs)("button",{type:"submit",disabled:x,className:"btn btn-lg btn-primary w-full relative",children:[x&&(0,t.jsx)(j,{}),(0,t.jsx)("span",{className:x?"opacity-70":"",children:n("signInButton")})]})]}),(0,t.jsx)("div",{className:"mt-6 pt-4 text-center",children:(0,t.jsxs)("p",{className:"text-xs sm:text-sm text-zinc-500 font-medium",children:[n("noAccountText")," ",(0,t.jsx)("button",{type:"button",onClick:()=>e("signup"),className:"font-semibold text-black dark:text-white hover:underline ml-1 text-sm",children:n("signUpButton")})]})})]})}function L({onSwitchMode:e}){let s=(0,l.useTranslations)("Auth"),[a,i]=(0,r.useState)(""),[n,o]=(0,r.useState)(!1),[c,d]=(0,r.useState)(null),u=async t=>{if(t.preventDefault(),d(null),!a)return d(s("enterEmail"));o(!0);let{error:r}=await b.forgotPassword(a);o(!1),r?z(String(r),"error"):(z(s("linkSentCheckEmail"),"success"),setTimeout(()=>e("login"),2e3))};return(0,t.jsxs)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300 space-y-4",children:[c&&(0,t.jsx)(S,{children:c}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:u,children:[(0,t.jsx)(k,{label:s("emailLabel"),type:"email",autoComplete:"email",required:!0,value:a,onChange:e=>i(e.target.value)}),(0,t.jsxs)("button",{type:"submit",disabled:n,className:"btn btn-lg btn-primary w-full relative",children:[n&&(0,t.jsx)(j,{}),(0,t.jsx)("span",{className:n?"opacity-70":"",children:s("sendForgotPasswordLink")})]})]}),(0,t.jsx)("div",{className:"mt-6 pt-4 text-center",children:(0,t.jsx)("p",{className:"text-xs sm:text-sm text-zinc-500 font-medium",children:(0,t.jsx)("button",{type:"button",onClick:()=>e("login"),className:"font-semibold text-black dark:text-white hover:underline text-sm",children:s("backToLogin")})})})]})}function P({email:e,onSwitchMode:s}){let a=(0,l.useTranslations)("Auth"),[i,n]=(0,r.useState)(""),[o,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e;return m>0&&(e=setTimeout(()=>p(m-1),1e3)),()=>clearTimeout(e)},[m]);let h=async t=>{if(t.preventDefault(),!i||8!==i.length)return z(a("enterValidOtp"),"error");c(!0);let{error:r}=await b.verifyOtp(e,i);c(!1),r?r.message?.includes("expired")||r.message?.includes("invalid")?z(a("otpExpiredOrInvalid"),"error"):z(String(r),"error"):(z(a("accountVerified"),"success"),setTimeout(()=>s("profile"),1500))},f=async()=>{if(m>0)return;u(!0);let{error:t}=await b.resendOtp(e);u(!1),t?z(a("errorGeneric"),"error"):(z(a("emailResent"),"success"),p(60))};return(0,t.jsxs)("div",{className:"animate-in fade-in slide-in-from-right-2 duration-300 text-center space-y-4",children:[(0,t.jsx)("div",{className:"mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-zinc-100 dark:bg-[#1a1a1a]",children:(0,t.jsx)("svg",{className:"h-6 w-6 text-black dark:text-zinc-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 19v-8.93a2 2 0 01.89-1.664l7-4.666a2 2 0 012.22 0l7 4.666A2 2 0 0121 10.07V19M3 19a2 2 0 002 2h14a2 2 0 002-2M3 19l6.75-4.5M21 19l-6.75-4.5M3 10l6.75 4.5M21 10l-6.75 4.5m0 0l-1.14.76a2 2 0 01-2.22 0l-1.14-.76"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"type-app-card-title",children:a("verificationTitle")}),(0,t.jsxs)("p",{className:"text-xs sm:text-sm text-zinc-500 mt-1 leading-relaxed",children:[a("verificationDesc")," ",(0,t.jsx)("span",{className:"font-semibold text-zinc-900 dark:text-zinc-400",children:e}),"."]})]}),(0,t.jsx)(x.default,{className:"mt-2"}),(0,t.jsxs)("form",{onSubmit:h,children:[(0,t.jsx)("input",{type:"text",inputMode:"numeric",autoComplete:"one-time-code","aria-label":a("otpLabel"),maxLength:8,value:i,onChange:e=>n(e.target.value.replace(/[^0-9]/g,"")),className:"w-full px-4 h-12 rounded-xl text-center text-xl tracking-[0.4em] font-mono font-bold field text-zinc-900 dark:text-zinc-100 mt-1 focus:outline-none transition-all duration-200",placeholder:a("passwordPlaceholder")}),(0,t.jsxs)("button",{type:"submit",disabled:o,className:"btn btn-lg btn-primary w-full relative mt-4",children:[o&&(0,t.jsx)(j,{}),(0,t.jsx)("span",{className:o?"opacity-70":"",children:a("verifyCta")})]})]}),(0,t.jsx)("div",{className:"pt-1 text-center",children:(0,t.jsx)("button",{type:"button",disabled:m>0||d,onClick:f,className:"font-semibold text-zinc-600 dark:text-zinc-400 hover:text-black dark:hover:text-white disabled:opacity-50 transition-colors text-sm",children:d?a("sending"):m>0?`${a("resendCooldown")} ${m}s`:a("resendCode")})})]})}function M({onSwitchMode:e,onGoToOtp:s}){let a=(0,l.useTranslations)("Auth"),n=(0,p.useLocale)(),[o,c]=(0,r.useState)(1),[d,u]=(0,r.useState)(""),[m,h]=(0,r.useState)(""),[x,v]=(0,r.useState)(""),[w,_]=(0,r.useState)(!1),[L,P]=(0,r.useState)(!1),[T,E]=(0,r.useState)(!1),[O,R]=(0,r.useState)(null),A=async()=>{E(!0);let{error:e}=await i.supabase.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/api/auth/callback`}});e&&(E(!1),z(a("errorGeneric"),"error"))},I=async t=>{if(t.preventDefault(),T)return;if(R(null),1===o)return d?c(2):R(a("enterEmail"));if(!m||!x)return R(a("fillAllFields"));if(m!==x)return R(a("passwordsMismatch"));
3if(!w)return R(a("chooseSecurePassword"));E(!0);let{data:r,error:i}=await b.signup(d,m,n);if(E(!1),i?.code==="user_already_exists"||i?.message?.toLowerCase().includes("already registered")||r?.user&&r.user.identities&&0===r.user.identities.length){z(a("emailAlreadyExists"),"error"),e("login");return}if(i){g.Logger.error("Web","Inscription refusée :",i),R(a("signupError")),z(a("signupError"),"error");return}s(d)};return(0,t.jsxs)("div",{className:"w-full relative",children:[(0,t.jsxs)("div",{className:"flex gap-2 mb-6",children:[(0,t.jsx)("div",{className:`h-1.5 flex-1 rounded-full transition-colors duration-300 ${o>=1?"bg-black dark:bg-white":"bg-zinc-200 dark:bg-zinc-800"}`}),(0,t.jsx)("div",{className:`h-1.5 flex-1 rounded-full transition-colors duration-300 ${o>=2?"bg-black dark:bg-white":"bg-zinc-200 dark:bg-zinc-800"}`})]}),O&&(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(S,{children:O})}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:I,children:[1===o&&(0,t.jsxs)("div",{className:"animate-in fade-in slide-in-from-right-2 duration-300 space-y-4",children:[(0,t.jsx)(C,{isLoading:T,onClick:A,isSignup:!0}),(0,t.jsx)(y,{text:a("or")}),(0,t.jsx)(k,{label:a("emailLabel"),type:"email",autoComplete:"username",required:!0,value:d,onChange:e=>u(e.target.value)}),(0,t.jsx)("button",{type:"submit",className:"btn btn-lg btn-primary w-full",children:a("nextButton")})]}),2===o&&(0,t.jsxs)("div",{className:"animate-in fade-in slide-in-from-right-2 duration-300 space-y-4",children:[(0,t.jsx)(N,{label:a("passwordLabel"),autoComplete:"new-password",required:!0,value:m,onChange:e=>h(e.target.value),visible:L,onToggleVisible:()=>P(!L),children:(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(f.default,{password:m,onValidationChange:_})})}),(0,t.jsx)(N,{label:a("confirmPasswordLabel"),autoComplete:"new-password",required:!0,value:x,onChange:e=>v(e.target.value),visible:L,onToggleVisible:()=>P(!L)}),(0,t.jsxs)("div",{className:"pt-2 flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>c(1),className:"btn btn-lg btn-secondary w-1/3",children:a("prevButton")}),(0,t.jsxs)("button",{type:"submit",disabled:!w||T,className:"btn btn-lg btn-primary w-2/3 relative",children:[T&&(0,t.jsx)(j,{}),(0,t.jsx)("span",{className:T?"opacity-70":"",children:a("signUpButton")})]})]})]})]}),(0,t.jsx)("div",{className:"mt-6 text-center",children:(0,t.jsxs)("p",{className:"text-xs sm:text-sm text-zinc-600 dark:text-zinc-400 font-medium",children:[a("haveAccountText")," ",(0,t.jsx)("button",{type:"button",onClick:()=>e("login"),className:"font-bold text-black dark:text-white hover:underline underline-offset-4 decoration-2 text-sm",children:a("signInButton")})]})})]})}function T(){let e=(0,l.useTranslations)("Auth"),i=(0,l.useTranslations)("Settings"),n=(0,a.useRouter)(),o=(0,s.useSearchParams)(),[c,d]=(0,r.useState)(""),[u,m]=(0,r.useState)(""),[p,h]=(0,r.useState)(""),[f,x]=(0,r.useState)(!1),g=async t=>{if(t.preventDefault(),!c||!u)return z(e("enterFirstLast"),"error");if(!p)return z(i("formEmptyFields"),"error");x(!0);let{error:r}=await b.updateProfileMetadata(c,u,p);x(!1),r?z(String(r),"error"):n.push(o.get("redirect")||"/dashboard")};return(0,t.jsxs)("div",{className:"animate-in fade-in slide-in-from-right-2 duration-300 space-y-4",children:[(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsx)("h1",{className:"type-app-section",children:e("setupProfileTitle")}),(0,t.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 mt-1",children:e("setupProfileSubtitle")})]}),(0,t.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,t.jsx)(k,{label:e("firstNameLabel"),type:"text",autoComplete:"given-name",required:!0,value:c,onChange:e=>d(e.target.value)}),(0,t.jsx)(k,{label:e("lastNameLabel"),type:"text",autoComplete:"family-name",required:!0,value:u,onChange:e=>m(e.target.value)}),(0,t.jsx)(k,{label:i("companyName"),type:"text",autoComplete:"organization",required:!0,value:p,onChange:e=>h(e.target.value),placeholder:i("companyNamePlaceholder")}),(0,t.jsxs)("button",{type:"submit",disabled:f,className:"btn btn-lg btn-primary w-full relative mt-4",children:[f&&(0,t.jsx)(j,{}),(0,t.jsx)("span",{className:f?"opacity-70":"",children:e("setupProfileSubmit")})]})]})]})}function E(){let e=(0,l.useTranslations)("Auth"),s=(0,a.useRouter)(),[n,o]=(0,r.useState)(""),[c,d]=(0,r.useState)(""),[u,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),[x,b]=(0,r.useState)(!1),y=async t=>{if(t.preventDefault(),!n||!c)return z(e("fillAllFields"),"error");
3if(n!==c)return z(e("passwordsMismatch"),"error");if(!u)return z(e("chooseSecurePassword"),"error");b(!0);let{error:r}=await i.supabase.auth.updateUser({password:n});b(!1),r?(g.Logger.error("Web","Définition du mot de passe refusée :",r),z(e("genericError"),"error")):(z(e("passwordSetSuccess"),"success"),setTimeout(()=>s.push("/dashboard"),1500))};return(0,t.jsxs)("div",{className:"animate-in fade-in slide-in-from-right-2 duration-300 space-y-4",children:[(0,t.jsxs)("div",{className:"text-center mb-4",children:[(0,t.jsx)("div",{className:"mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100 dark:bg-green-500/15 mb-3",children:(0,t.jsx)("svg",{className:"h-6 w-6 text-green-600 dark:text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),(0,t.jsx)("h1",{className:"type-app-section",children:e("welcomeTeamTitle")}),(0,t.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 mt-1",children:e("welcomeTeamSubtitle")})]}),(0,t.jsxs)("form",{onSubmit:y,className:"space-y-4",children:[(0,t.jsx)(N,{label:e("passwordLabel"),autoComplete:"new-password",required:!0,value:n,onChange:e=>o(e.target.value),visible:p,onToggleVisible:()=>h(!p),children:(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(f.default,{password:n,onValidationChange:m})})}),(0,t.jsx)(N,{label:e("confirmPasswordLabel"),autoComplete:"new-password",required:!0,value:c,onChange:e=>d(e.target.value),visible:p,onToggleVisible:()=>h(!p)}),(0,t.jsxs)("button",{type:"submit",disabled:!u||x,className:"btn btn-lg btn-primary w-full relative",children:[x&&(0,t.jsx)(j,{}),(0,t.jsx)("span",{className:x?"opacity-70":"",children:e("setPasswordCta")})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>{s.push("/dashboard")},className:"w-full text-center font-medium text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors py-2 px-4 text-sm",children:[e("skipStep")," â"]})]})]})}function O(){return(0,t.jsx)("header",{children:(0,t.jsxs)("div",{className:"mx-auto flex h-14 w-full max-w-7xl items-center justify-between px-4 sm:px-6 lg:h-15 lg:px-8",children:[(0,t.jsx)(a.Link,{href:"/",className:"flex items-center transition-opacity hover:opacity-80",children:(0,t.jsx)("div",{className:"relative w-[112px] md:w-[136px] aspect-[4898/937]",children:(0,t.jsx)(n.default,{src:"/replytop_logo_black.svg",alt:"ReplyTop",className:"object-contain dark:invert",fill:!0,priority:!0})})}),(0,t.jsx)(d.ThemeToggle,{})]})})}let R=[{href:"/legal/terms",key:"cgu"},{href:"/legal/privacy",key:"privacy"},{href:"/legal/legal-notice",key:"legalNotice"},{href:"/contact",key:"contact"}];function A(){let e=(0,l.useTranslations)("Footer");return(0,t.jsx)("footer",{children:(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-7xl flex-col items-center gap-2 px-4 py-6 text-xs text-zinc-500 dark:text-zinc-400 sm:flex-row sm:justify-between sm:px-6 lg:px-8",children:[(0,t.jsx)("nav",{"aria-label":e("legal"),children:(0,t.jsx)("ul",{className:"flex flex-wrap items-center justify-center gap-y-1",children:R.map(({href:r,key:s},i)=>(0,t.jsxs)("li",{className:"flex items-center",children:[i>0&&(0,t.jsx)("span",{"aria-hidden":"true",className:"mx-3 h-3 w-px bg-zinc-300 dark:bg-zinc-700"}),(0,t.jsx)(a.Link,{href:r,className:"transition-colors hover:text-zinc-900 dark:hover:text-white",children:e(s)})]},r))})}),(0,t.jsxs)("p",{children:["© ",new Date().getFullYear()," ReplyTop. ",e("copyright")]})]})})}function I(){let e=(0,l.useTranslations)("Auth");return(0,t.jsxs)("div",{role:"status",className:"flex min-h-[420px] items-center justify-center",children:[(0,t.jsx)(o.Loader2,{"aria-hidden":"true",className:"h-5 w-5 animate-spin text-zinc-400"}),(0,t.jsx)("span",{className:"sr-only",children:e("loading")})]})}function $({isSignup:e}){let r=(0,l.useTranslations)("Auth"),s="font-medium text-zinc-900 dark:text-white underline-offset-4 hover:underline";return(0,t.jsxs)("div",{className:"mt-8 flex gap-3 border-t border-zinc-100 dark:border-zinc-800 pt-6",children:[(0,t.jsx)(c.Lock,{"aria-hidden":"true",className:"mt-0.5 h-4 w-4 shrink-0 text-zinc-400 dark:text-zinc-500"}),(0,t.jsxs)("div",{className:"space-y-2 text-xs leading-relaxed text-zinc-500 dark:text-zinc-400",children:[(0,t.jsx)("p",{children:r("trustNote")}),(0,t.jsx)("p",{children:e?r.rich("signupConsent",{terms:e=>(0,t.jsx)(a.Link,{href:"/legal/terms",className:s,children:e}
3),privacy:e=>(0,t.jsx)(a.Link,{href:"/legal/privacy",className:s,children:e})}):(0,t.jsx)(a.Link,{href:"/legal/privacy",className:s,children:r("privacyLink")})})]})]})}function W(){let e=(0,l.useTranslations)("Auth"),n=(0,a.useRouter)(),o=(0,s.useSearchParams)(),[c,d]=(0,r.useState)(()=>"signup"===o.get("mode")?"signup":"login"),[u,m]=(0,r.useState)(""),p=o.get("error"),h="provider_denied"===p?e("callbackProviderDenied"):"session_lost"===p?e("callbackSessionLost"):p?e("callbackInvalidLink"):null;(0,r.useEffect)(()=>{let e=o.get("redirect")||"/dashboard",t=o.get("hook");i.supabase.auth.getSession().then(({data:{session:r}})=>{r&&i.supabase.auth.getUser().then(({data:{user:r},error:s})=>{s||!r?i.supabase.auth.signOut():"invite"===t?d("setPassword"):n.push(e)})})},[n,o]);let f="login"===c?{title:e("loginTitle"),lead:e("loginSubtitle")}:"signup"===c?{title:e("signupTitle"),lead:e("signupSubtitle")}:"forgot"===c?{title:e("forgotTitle"),lead:e("forgotSubtitle")}:null;return(0,t.jsxs)(t.Fragment,{children:[f&&(0,t.jsxs)("div",{className:"mb-8 text-center",children:[(0,t.jsx)("h1",{className:"type-app-title",children:f.title}),(0,t.jsx)("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:f.lead})]}),h&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(S,{children:h})}),"login"===c&&(0,t.jsx)(_,{onSwitchMode:d}),"signup"===c&&(0,t.jsx)(M,{onSwitchMode:d,onGoToOtp:e=>{m(e),d("otp")}}),"forgot"===c&&(0,t.jsx)(L,{onSwitchMode:d}),"otp"===c&&(0,t.jsx)(P,{email:u,onSwitchMode:d}),"profile"===c&&(0,t.jsx)(T,{}),"setPassword"===c&&(0,t.jsx)(E,{}),f&&(0,t.jsx)($,{isSignup:"signup"===c})]})}e.s(["default",0,function(){return(0,t.jsxs)("div",{className:"flex flex-1 flex-col sm:bg-zinc-100 dark:bg-transparent",children:[(0,t.jsx)(O,{}),(0,t.jsx)("main",{className:"flex flex-1 flex-col items-center px-5 pt-6 pb-10 sm:justify-center sm:px-6 sm:py-10",children:(0,t.jsx)("div",{className:"w-full max-w-[480px] sm:rounded-[2rem] sm:bg-white sm:p-12 sm:shadow-[0_11px_34px_rgba(120,120,128,0.10)] sm:dark:bg-[#111111] sm:dark:shadow-[0_11px_34px_rgba(0,0,0,0.6)] sm:dark:ring-1 sm:dark:ring-white/[0.07]",children:(0,t.jsx)(r.default.Suspense,{fallback:(0,t.jsx)(I,{}),children:(0,t.jsx)(W,{})})})}),(0,t.jsx)(A,{})]})}],345131)},292779,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(948148);e.s(["default",0,function({password:e,onValidationChange:a}){let i=(0,s.useTranslations)("PasswordValidator"),n=e.length>=10,l=/[a-z]/.test(e)&&/[A-Z]/.test(e),o=/[0-9]/.test(e),c=/[^A-Za-z0-9]/.test(e),d=e.toLowerCase(),u=["azerty","qwerty","12345","password","motdepasse","admin"].some(e=>d.includes(e)),m=0;n&&m++,l&&m++,o&&m++,c&&m++,u&&(m=Math.min(m,1));let p=4===m&&!u&&e.length>0;(0,r.useEffect)(()=>{a(p)},[p,a]);let h="0%",f="bg-zinc-200";return e.length>0&&(m<=1||u?(h="33%",f="bg-red-500"):2===m||3===m?(h="66%",f="bg-orange-500"):p&&(h="100%",f="bg-green-500")),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full h-1.5 bg-zinc-200 dark:bg-[#3a3a40] rounded-full mt-3 overflow-hidden",children:(0,t.jsx)("div",{className:`h-full transition-all duration-300 ${f}`,style:{width:h}})}),e.length>0&&(0,t.jsxs)("div",{className:"mt-3 text-xs space-y-1.5",children:[(0,t.jsxs)("p",{className:`flex items-center gap-1.5 ${n?"text-green-600 dark:text-green-400":"text-zinc-500 dark:text-zinc-200"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),i("minChars")]}),(0,t.jsxs)("p",{className:`flex items-center gap-1.5 ${l?"text-green-600 dark:text-green-400":"text-zinc-500 dark:text-zinc-200"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),i("upperLower")]}),(0,t.jsxs)("p",{className:`flex items-center gap-1.5 ${o?"text-green-600 dark:text-green-400":"text-zinc-500 dark:text-zinc-200"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),i("oneNumber")]}),(0,t.jsxs)("p",{className:`flex items-center gap-1.5 ${c?"text-green-600 dark:text-green-400":"text-zinc-500 dark:text-zinc-200"}`,children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c?(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"}):(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),i("oneSpecial")]}),u&&(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-red-500 dark:text-red-400",children:[(0,t.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),i("commonPass")]})]})]})}])},851411,e=>{"use strict";var t=e.i(843476),r=e.i(948148),s=e.i(466787);e.s(["default",0,function({className:e=""}){let a=(0,r.useTranslations)("Common");return(0,t.jsxs)("div",{className:`flex items-start gap-2 p-3 bg-amber-50 dark:bg-amber-500/10 text-amber-900 dark:text-amber-300 rounded-xl text-xs text-left ${e}`,children:[(0,t.jsx)(s.TriangleAlert,{"aria-hidden":"true",className:"mt-px h-3.5 w-3.5 shrink-0 text-amber-600 dar
3k:text-amber-400"}),(0,t.jsx)("span",{children:a("spamHint")})]})}])},678976,e=>{"use strict";var t=e.i(843476),r=e.i(456420);let s=(0,r.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),a=(0,r.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var i=e.i(363178),n=e.i(948148),l=e.i(43601);e.s(["ThemeToggle",0,function(){let e=(0,n.useTranslations)("Common"),{theme:r,setTheme:o}=(0,i.useTheme)();return(0,l.useIsClient)()?(0,t.jsxs)("button",{onClick:()=>o("dark"===r?"light":"dark"),className:"relative flex items-center justify-center w-11 h-11 lg:w-9 lg:h-9 rounded-full hover:surface-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400","aria-label":e("toggleTheme"),children:[(0,t.jsx)(a,{className:"h-4 w-4 text-zinc-600 dark:text-zinc-400 transition-all scale-100 rotate-0 dark:scale-0 dark:-rotate-90 absolute"}),(0,t.jsx)(s,{className:"h-4 w-4 text-zinc-600 dark:text-zinc-400 transition-all scale-0 rotate-90 dark:scale-100 dark:rotate-0 absolute"})]}):(0,t.jsx)("div",{className:"w-11 h-11 lg:w-9 lg:h-9 rounded-full surface-2 animate-pulse"})}],678976)},43601,e=>{"use strict";var t=e.i(271645);let r=()=>()=>{};e.s(["useIsClient",0,function(){return(0,t.useSyncExternalStore)(r,()=>!0,()=>!1)}])}]);
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.