1import{j as e}from"./vendor-editor-BX0sR0z-.js";import{f as ae,r as X,R as re}from"./vendor-react-BPk9u-w4.js";import{L as oe,u as le,S as B}from"./useTranslation-CEw6dDWV.js";import{i as ce,u as de,j as xe,m as s,O as me}from"./index-Cou2G-4q.js";import{s as pe}from"./sanitize-BQ1fYstp.js";import{u as ue,t as he}from"./useAuthFlow-CkqjmiUw.js";import{p as ge}from"./inviteParams-CQoxTKTX.js";import{u as fe,b as be}from"./useTestimonials-DNpfoaT5.js";import{A as o}from"./index-D3H0nlay.js";import{z as ve,ae as z,L as _,ah as k,J as ye}from"./vendor-icons-CQ1bz0aB.js";import"./vendor-charts-Cf-ruFca.js";import"./vendor-ui-utils-Bbg69IUi.js";import"./vendor-graph-Df3mHyA7.js";import"./vendor-supabase-UBwEW4nm.js";import"./vendor-sonner-DPZ7yCFm.js";import"./vendor-helmet-C74EPpLp.js";import"./passwordSetup-B8fVwXvJ.js";import"./buildAuthCallbackUrl-2OiZ4JSe.js";import"./mfaStepUp-Co6_3HmI.js";import"./testimonialService-Lte117wm.js";import"./normalizeUserText-a7mcOw55.js";const je="",m=i=>be("cattive",`${je}${i}`);function we(){var U,q;const{t:i,locale:H,setLocale:V}=le("utility");ae();const{openFeedbackModal:$}=ce(),{user:C,isLoading:L}=de();X.useEffect(()=>{if(L||!C)return;const t=new URLSearchParams(window.location.search),a=t.get("redirect_to"),r=t.get("state");if(a&&r&&xe(a)){window.location.href=a;return}window.location.hostname.startsWith("auth.cattive.")&&(window.location.href="https://painel.cattive.com")},[C,L]);const K=ue({portalId:"cattive",translateError:t=>{const a={"Invalid login credentials":"login.errors.invalid_login","Email not confirmed":"login.errors.email_not_confirmed","User already registered":"login.errors.user_registered","Signup requires a valid password":"login.errors.invalid_password","Password should be at least 6 characters":"login.errors.password_min_6","Password should be at least 8 characters":"login.errors.password_min_8","Email rate limit exceeded":"login.errors.rate_limit","For security purposes, you can only request this once every 60 seconds":"login.errors.wait_60s","Unable to validate email address: invalid format":"login.errors.invalid_email_format","New password should be different from the old password.":"login.errors.new_password_diff","User not found":"login.errors.user_not_found","Invalid Refresh Token: Refresh Token Not Found":"login.errors.session_expired","Too many requests":"login.errors.too_many_requests","Password is known to be weak and easy to guess, please choose a different one.":"login.errors.weak_password","Auth session missing!":"login.errors.session_missing","Email link is invalid or has expired":"login.errors.invalid_link","Token has expired or is invalid":"login.errors.invalid_link","User banned":"login.errors.banned"};if(a[t])return i(a[t]);const r=t.toLowerCase();return r.includes("rate limit")?i("login.errors.rate_limit"):r.includes("invalid login")?i("login.errors.invalid_login"):r.includes("email not confirmed")?i("login.errors.email_not_confirmed"):r.includes("already registered")?i("login.errors.user_registered"):r.includes("weak")&&r.includes("password")?i("login.errors.weak_password"):r.includes("network")||r.includes("fetch")?i("login.errors.network_error"):r.includes("session")&&r.includes("missing")?i("login.errors.session_missing"):r.includes("token")&&(r.includes("expired")||r.includes("invalid"))?i("login.errors.invalid_link"):he(t)}}),{view:n,setView:p,isLoading:l,showEmailForm:F,setShowEmailForm:W,isDev:v,email:y,setEmail:A,preferredOAuth:g,errorMsg:E,setErrorMsg:G,emailInputRef:j,otpCode:I,setOtpCode:J,mfa2faError:u,setMfa2faError:T,trustDevice:h,setTrustDevice:Y,recoveryCodeInput:S,setRecoveryCodeInput:M,recoveryLoading:R,handleMagicLink:f,handleForgotSubmit:Q,handle2FASubmit:w,handleRecoveryCodeSubmit:D,handleGoogleLogin:Z,handleAppleLogin:ee}=K,{displayTestimonials:P,currentIndex:b,isFromDatabase:ie}=fe("cattive"),O=i("login.testimonials",{returnObjects:!0}),N=ie?P:Array.isArray(O)?O:P,te=new URLSearchParams(window.location.search).get("redirect_to"),{isInvite:c,email:d}=ge(window.location.search),x=c&&!!d;X.useEffect(()=>{x&&d&&y!==d&&A(d)},[x,d]);const ne=()=>{if(c&&(n==="login"||n==="register"))return"Ative seu acesso";switch(n){case"login":return i("login.titles.login");case"register":return i("login.titles.register");case"forgot-password":return i("login.titles.forgot_password");case"2fa":return i("login.titles.2fa");
1case"2fa-recovery":return i("login.titles.2fa_recovery");case"magic-link-sent":return i("login.titles.magic_link_sent")}},se=()=>{if(c&&(n==="login"||n==="register"))return"Sem senha e sem cadastro â você recebe um link de entrada no seu e-mail.";switch(n){case"login":return i("login.descriptions.login");case"register":return i("login.descriptions.register");case"forgot-password":return i("login.descriptions.forgot_password");case"2fa":return i("login.descriptions.2fa");case"2fa-recovery":return i("login.descriptions.2fa_recovery");case"magic-link-sent":return null}};return e.jsxs("div",{className:"min-h-[100dvh] flex flex-col md:flex-row relative font-sans selection:bg-violet-200 bg-white",style:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},children:[e.jsxs("div",{className:"hidden md:flex relative w-1/2 flex-col justify-between p-8 lg:p-12 overflow-hidden bg-[#F0F2F5] border-r border-zinc-200/50",children:[e.jsxs("div",{className:"absolute inset-0 z-0",children:[e.jsx(s.div,{animate:{scale:[1,1.1,1],x:[0,40,0],y:[0,30,0]},transition:{duration:15,repeat:1/0,ease:"easeInOut"},className:"absolute top-[-10%] left-[-10%] w-[50vw] h-[50vw] rounded-full filter blur-[100px] bg-violet-400/30 mix-blend-multiply opacity-80"}),e.jsx(s.div,{animate:{scale:[1,1.2,1],x:[0,-50,0],y:[0,40,0]},transition:{duration:20,repeat:1/0,ease:"easeInOut",delay:2},className:"absolute top-[10%] right-[-10%] w-[45vw] h-[45vw] rounded-full filter blur-[100px] bg-indigo-300/30 mix-blend-multiply opacity-80"}),e.jsx(s.div,{animate:{scale:[1,1.15,1],x:[0,30,0],y:[0,-40,0]},transition:{duration:18,repeat:1/0,ease:"easeInOut",delay:4},className:"absolute bottom-[-10%] left-[20%] w-[55vw] h-[55vw] rounded-full filter blur-[100px] bg-fuchsia-300/20 mix-blend-multiply opacity-80"})]}),e.jsx("div",{className:"absolute inset-0 z-0 backdrop-blur-[80px] bg-white/40"}),e.jsxs("div",{className:"relative z-10 flex flex-col h-full justify-between",children:[e.jsxs("div",{children:[e.jsx(s.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"mb-4 lg:mb-6",children:e.jsxs("span",{className:"text-[22px] font-bold tracking-[-0.02em] text-zinc-900",children:["cattive",e.jsx("span",{className:"text-violet-500",children:"."})]})}),e.jsx(s.h1,{className:"text-[1.75rem] lg:text-[2.5rem] leading-[1.1] font-bold tracking-tight mb-3 lg:mb-5 max-w-lg text-zinc-900",initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},children:i("login.hero.title")}),e.jsx(s.p,{className:"text-[15px] lg:text-[17px] font-medium max-w-md leading-relaxed text-zinc-600",initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},children:i("login.hero.desc")})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"relative h-[100px]",children:e.jsx(o,{mode:"wait",children:e.jsxs(s.blockquote,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"absolute inset-0 space-y-3 max-w-md border-l-4 pl-5 border-violet-400/30",children:[e.jsxs("p",{className:"text-[16px] font-medium leading-relaxed italic text-zinc-800",children:['"',(U=N[b])==null?void 0:U.quote,'"']}),e.jsx("footer",{className:"text-[14px] font-semibold text-zinc-500",children:(q=N[b])==null?void 0:q.author})]},b)})}),e.jsxs("div",{className:"flex items-center gap-4 mt-4 pl-5",children:[e.jsx("div",{className:"flex gap-1.5",children:N.map((t,a)=>e.jsx("div",{className:`h-1.5 rounded-full transition-all duration-300 ${a===b?"w-5 bg-violet-400":"w-1.5 bg-zinc-300"}`},a))}),e.jsx("div",{className:"h-3 w-px bg-zinc-300"}),e.jsx("button",{type:"button",onClick:()=>$("other",void 0,void 0,"depoimento"),className:"text-[13px] font-medium transition-colors text-zinc-400 hover:text-zinc-700",children:i("login.hero.testimonial_cta")})]})]})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col relative items-center justify-center p-4 bg-white",children:[!te&&!c&&e.jsxs("a",{href:m("/"),className:"absolute top-6 left-6 inline-flex items-center gap-2 transition-colors z-20 group text-zinc-500 hover:text-zinc-900",children:[e.jsx(ve,{className:"w-4 h-4 group-hover:-translate-x-1 transition-transform"}),e.jsx("span",{className:"text-sm font-semibold tracking-tight",children:i("login.hero.back")})]}),e.jsxs("div",{className:"w-full max-w-[440px] flex-1 sm:flex-none flex flex-col justify-center sm:block relative z-10",children:[e.jsx("div",{className:"flex justify-center mb-8",children:e.jsx(o,{mode:"wait",children:n==="magic-link-sent"?e.jsx(s.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{type:"spring",stiffness:200,damping:15},className:"w-16 h-16 bg-emerald-50 rounded-full flex items-center justify-center",children:e.jsx(s.svg,{className:"w-8 h-8 text-emerald-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:e.jsx(s.path,{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.8,delay:.3}})})},"email-sent-icon"):e.jsx(s.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},children:e.jsxs("span",{className:"text-[24px] font-bold tracking-[-0.02em] text-zinc-900",children:["cattive",e.jsx("span",{className:"text-violet-500",children:"."})]})},"cattive-logo")})}),e.jsx("div",{className:"text-center mb-10",children:e.jsx(o,{mode:"wait",children:e.jsxs(s.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{duration:.15},children:[e.jsx("h2",{className:"text-[26px] font-semibold tracking-tight leading-tight text-zinc-900",children:ne()}),n==="magic-link-sent"?e.jsxs("div",{className:"mt-4 space-y-3",children:[e.jsx("p",{className:"text-[15px] font-medium text-zinc-600",children:i("login.ui.magic_link_sent_to")}),e.jsx("p",{className:"text-[16px] font-bold inline-block px-4 py-2 rounded-xl text-zinc-900 bg-zinc-50",children:y}),c?e.jsx("div",{className:"text-left mx-auto max-w-[320px] rounded-2xl px-5 py-4 bg-zinc-50",children:["Abra sua caixa de entrada","Clique no link de acesso","Pronto â seu acesso ativa sozinho"].map((t,a)=>e.jsxs("p",{className:`text-[13.5px] font-medium leading-relaxed ${a<2?"mb-1.5":""} text-zinc-600`,children:[e.jsxs("span",{className:"font-bold mr-1.5 text-violet-600",children:[a+1,"."]}),t]},a))}):e.jsx("p",{className:"text-[14px] font-medium leading-relaxed text-zinc-500",children:i("login.ui.magic_link_instructions")}),e.jsxs("div",{className:"pt-2 flex items-center justify-center gap-2 text-[13px] text-zinc-400",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75
1a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),e.jsx("span",{children:i("login.ui.check_spam")})]}),e.jsxs("div",{className:"pt-3 flex flex-col items-center gap-2.5",children:[e.jsx("button",{type:"button",disabled:l,onClick:()=>f(),className:"text-[13.5px] font-semibold transition-colors disabled:opacity-50 text-violet-600 hover:text-violet-700",children:l?"Reenviandoâ¦":"Reenviar link"}),!x&&e.jsx("button",{type:"button",onClick:()=>{p("login"),G(null),setTimeout(()=>{var t;return(t=j.current)==null?void 0:t.focus()},200)},className:"text-[13px] font-medium transition-colors text-zinc-400 hover:text-zinc-700",children:"Não é esse e-mail? Corrigir"})]})]}):e.jsx("p",{className:"text-[15px] mt-2 font-medium text-zinc-500",children:se()})]},n+"-header")})}),c&&["login","register"].includes(n)&&e.jsxs(s.div,{initial:{opacity:0,y:-6},animate:{opacity:1,y:0},transition:{duration:.3},className:"mb-6 p-4 rounded-2xl border flex items-start gap-3 bg-violet-50 border-violet-100",children:[e.jsx("div",{className:"shrink-0 w-9 h-9 rounded-full flex items-center justify-center bg-violet-100",children:e.jsx(z,{className:"w-4 h-4 text-violet-600"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[14px] font-semibold text-violet-900",children:"Você recebeu um convite de equipe"}),e.jsx("p",{className:"text-[13px] mt-0.5 leading-relaxed text-violet-700/90",children:x?"Confirme abaixo para entrar â sem senha e sem cadastro. Seu acesso ativa sozinho.":"Entre com o mesmo e-mail que recebeu o convite â seu acesso é ativado automaticamente."})]})]}),e.jsx(o,{children:E&&e.jsx(s.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:e.jsx("div",{className:"mb-6 p-4 rounded-2xl text-[14px] font-medium text-center bg-red-50 border border-red-100 text-red-600",children:E})})}),x&&["login","register"].includes(n)&&e.jsxs(s.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.3},children:[e.jsxs("div",{className:"mb-5 rounded-2xl px-4 py-3 flex items-center gap-3 border bg-zinc-50 border-zinc-200/70",children:[e.jsx("div",{className:"shrink-0 w-9 h-9 rounded-full flex items-center justify-center border bg-white border-zinc-200",children:e.jsx(z,{className:"w-4 h-4 text-zinc-500"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-zinc-400",children:"Entrar como"}),e.jsx("p",{className:"text-[15px] font-bold break-all leading-tight text-zinc-900",children:d})]})]}),e.jsx("button",{type:"button",disabled:l,onClick:()=>f(),className:"w-full py-3.5 rounded-2xl font-semibold text-[15px] transition-all flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed bg-zinc-900 text-white hover:bg-zinc-800",children:l?e.jsx("div",{className:"w-5 h-5 border-[2.5px] rounded-full animate-spin border-white/30 border-t-white"}):e.jsx(e.Fragment,{children:"Ativar meu acesso â"})}),e.jsx("p",{className:"mt-3 text-[12px] leading-relaxed text-center text-zinc-400",children:"Este convite é pessoal e vinculado a este e-mail. Você recebe um link seguro de acesso â sem senha."})]}),e.jsx(o,{children:!c&&["login","register"].includes(n)&&e.jsxs(s.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"space-y-3 mb-6",children:[e.jsx(s.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},children:e.jsxs("button",{type:"button",onClick:Z,disabled:l,className:`group w-full flex items-center justify-center gap-3 h-[52px] border rounded-[14px] transition-all duration-200 text-[15px] font-semibold focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed ${`bg-white text-zinc-700 ${g==="google"?"border-violet-400 shadow-[0_0_0_3px_rgba(139,92,246,0.08)]":"border-zinc-200/80 hover:border-zinc-300"} hover:bg-zinc-50/80`}`,children:[l?e.jsx(_,{className:"w-[18px] h-[18px] animate-spin text-zinc-400"}):e.jsxs("svg",{className:"w-[18px] h-[18px]",viewBox:"0 0 24 24",children:[e.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"}),e.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"}),e.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.24.81-.6z",fill:"#FBBC05"}),e.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"})]}),e.jsx("span",{children:i("login.ui.continue_google")})]})}),e.jsx(s.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.12},children:e.jsxs("button",{type:"button",onClick:ee,disabled:l,className:`group w-full flex items-center justify-center gap-3 h-[52px] border rounded-[14px] transition-all duration-200 text-[15px] font-semibold focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed ${`bg-white text-zinc-700 ${g==="apple"?"border-zinc-400 shadow-[0_0_0_3px_rgba(0,0,0,0.06)]":"border-zinc-200/80 hover:border-zinc-300"} hover:bg-zinc-50/80`}`,children:[l?e.jsx(_,{className:"w-[17px] h-[17px] animate-spin text-zinc-400"}):e.jsx("svg",{className:"w-[17px] h-[17px] text-zinc-800",viewBox:"0 0 814.3 1000",fill:"currentColor",children:e.jsx("path",{d:"M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57.8-155.5-127.4c-58.3-81.8-105.3-209.4-105.3-330.2 0-194.3 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8.6 15.6 1.3 18.2 2.6.6 6.5 1.3 10.4 1.3 45.3 0 103.2-30.4 139.3-71.4z"})}),e.jsx("span",{children:"Continuar com Apple"})]})}),e.jsx(o,{children:g&&e.jsx(s.p,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"text-[12px] text-zinc-400 text-center font-medium pt-1 overflow-hidden",children:i(g==="google"?"login.ui.google_hint":"login.ui.apple_hint")})}),e.jsx(o,{mode:"wait",children:F?e.jsx(s.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:e.jsxs("div",{className:"flex items-center gap-3 py-3",children:[e.jsx("div",{className:"h-[1px] flex-1 bg-zinc-200"}),e.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-wider text-zinc-400",children:i("login.ui.or_with_email")}),e.jsx("div",{className:"h-[1px] flex-1 bg-zinc-200"})]})},"email-divider"):e.jsxs(s.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 py-6",children:[e.jsx("div",{className:"h-[1px] flex-1 bg-zinc-200"}),e.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-wider text-zinc-400",children:i("login.ui.or")}),e.jsx("div",{className:"h-[1px] flex-1 bg-zinc-200"})]}),e.jsxs("button",{type:"button",onClick:()=>{W(!0),setTimeout(()=>{var t;return(t=j.current)==null?void 0:t.focus()},350)},className:"w-full flex items-center justify-center gap-3 h-[52px] rounded-[14px] transition-all duration-200 text-[15px] font-semibold focus:outline-none bg-zinc-100/70 hover:bg-zinc-200/70 text-zinc-700",children:[e.jsx(z,{className:"w-[17px] h-[17px] text-zinc-500"}),i(n==="login"?"login.ui.continue_email":"login.ui.create_account_email")]})]},"show-email-btn")})]},"social-actions")}),e.jsx(o,{initial:!1,mode:"wait",children:n!=="magic-link-sent"&&!x&&(F||!["login","register"].includes(n))&&e.jsxs(s.form,{initial:{opacity:0,height:0}
1,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-5 overflow-hidden",onSubmit:n==="login"?t=>{t.preventDefault(),f()}:n==="register"?t=>{t.preventDefault(),f()}:n==="forgot-password"?Q:n==="2fa-recovery"?t=>{t.preventDefault(),D()}:t=>{t.preventDefault(),w()},children:[e.jsxs(o,{mode:"wait",initial:!1,children:[["login","register","forgot-password"].includes(n)&&e.jsxs(s.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("label",{className:"text-[13px] font-semibold text-zinc-900",children:i("login.ui.email_label")})}),e.jsx("input",{ref:j,type:"email",value:y,onChange:t=>A(t.target.value),onKeyDown:t=>{t.key==="Tab"&&t.shiftKey},required:!0,className:"w-full px-4 py-3.5 border border-transparent focus:border-violet-500 focus:ring-[3px] focus:ring-inset focus:ring-violet-500/10 rounded-xl transition-all text-[15px] font-medium outline-none bg-zinc-100/70 focus:bg-white text-zinc-900 placeholder:text-zinc-400",placeholder:i("login.ui.email_placeholder")})]}),n!=="forgot-password"&&v]},"standard-fields"),n==="2fa"&&e.jsxs(s.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"space-y-6",children:[e.jsx(me,{value:I,onChange:J,onComplete:t=>w(t),disabled:l,error:!!u,showCountdown:!1,autoFocus:!0}),u&&e.jsx("div",{className:"p-4 bg-red-50 border border-red-100 rounded-2xl text-red-600 text-[14px] font-medium text-center",children:u}),e.jsxs("button",{type:"button",onClick:()=>{p("2fa-recovery"),T(null)},className:"w-full text-center text-[13px] text-zinc-500 hover:text-violet-600 font-semibold transition-colors flex items-center justify-center gap-1.5",children:[e.jsx(k,{size:13})," ",i("login.ui.lost_app_access")]}),e.jsxs("label",{className:`flex items-center gap-3 px-4 py-3 rounded-xl cursor-pointer group transition-all duration-200 ${h?"bg-violet-50/80 border border-violet-200/60":"bg-zinc-50/70 border border-zinc-200/50 hover:bg-zinc-100/70"}`,children:[e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"checkbox",checked:h,onChange:t=>Y(t.target.checked),className:"sr-only peer"}),e.jsx("div",{className:`w-10 h-[22px] rounded-full transition-colors duration-200 ${h?"bg-violet-500":"bg-zinc-300"}`,children:e.jsx("div",{className:`absolute top-[3px] w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-200 ${h?"translate-x-[21px]":"translate-x-[3px]"}`})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:`text-[13px] font-semibold transition-colors ${h?"text-violet-700":"text-zinc-600"}`,children:i("login.ui.trust_device")}),e.jsx("span",{className:"text-[11px] text-zinc-400 font-medium",children:i("login.ui.trust_device_desc")})]})]})]},"2fa-fields"),n==="2fa-recovery"&&e.jsxs(s.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[13px] font-semibold text-zinc-900",children:i("login.ui.recovery_code_label")}),e.jsx("input",{type:"text",value:S,onChange:t=>M(t.target.value.toUpperCase()),placeholder:"XXXX-XXXX",maxLength:9,className:"w-full px-4 py-3.5 bg-zinc-100/70 border border-transparent focus:bg-white focus:border-violet-500 focus:ring-[3px] focus:ring-inset focus:ring-violet-500/10 rounded-xl transition-all text-[17px] font-mono font-bold text-zinc-900 placeholder:text-zinc-400 outline-none text-center tracking-[0.2em]",autoFocus:!0})]}),e.jsxs("div",{className:"bg-amber-50 border border-amber-100 rounded-xl p-3 flex gap-2",children:[e.jsx(k,{size:15,className:"text-amber-600 shrink-0 mt-0.5"}),e.jsx("p",{className:"text-[12px] text-amber-800 leading-relaxed font-medium",dangerouslySetInnerHTML:{__html:pe(i("login.ui.recovery_code_hint"))}})]}),u&&e.jsx("div",{className:"p-4 bg-red-50 border border-red-100 rounded-2xl text-red-600 text-[14px] font-medium text-center",children:u})]}
1,"2fa-recovery-fields")]}),e.jsxs("div",{className:"space-y-3 mt-4",children:[n!=="2fa-recovery"&&n!=="2fa"&&e.jsx("button",{type:"submit",disabled:l,className:"w-full py-3.5 rounded-2xl font-semibold text-[15px] transition-all flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed bg-zinc-100 hover:bg-zinc-200 text-zinc-900",children:l?e.jsx("div",{className:"w-5 h-5 border-[2.5px] border-zinc-900/20 border-t-zinc-900 rounded-full animate-spin"}):e.jsx(o,{mode:"wait",children:e.jsx(s.span,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.15},children:n==="login"||n==="register"?c?"Ativar meu acesso":i("login.ui.btn_magic_link"):i("login.ui.btn_send_instructions")},n)})}),n==="2fa"&&e.jsx("button",{type:"button",onClick:()=>w(),disabled:l||I.length!==6,className:"w-full py-3.5 rounded-2xl font-semibold text-[15px] transition-all flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed bg-zinc-100 hover:bg-zinc-200 text-zinc-900",children:l?e.jsx("div",{className:"w-5 h-5 border-[2.5px] border-zinc-900/20 border-t-zinc-900 rounded-full animate-spin"}):e.jsxs(e.Fragment,{children:[i("login.ui.btn_verify_login"),e.jsx(ye,{className:"w-4 h-4 ml-1"})]})}),n==="2fa-recovery"&&e.jsx("button",{type:"button",onClick:()=>D(),disabled:R||S.trim().length<4,className:"w-full py-3.5 rounded-2xl font-semibold text-[15px] transition-all flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed bg-zinc-100 hover:bg-zinc-200 text-zinc-900",children:R?e.jsx(_,{size:18,className:"animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(k,{size:16})," ",i("login.ui.btn_verify_recovery")]})}),e.jsx(o,{children:v})]}),e.jsxs(o,{children:[(n==="forgot-password"||n==="2fa")&&e.jsx(s.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-4 text-center overflow-hidden",children:e.jsx("button",{type:"button",onClick:()=>p("login"),className:"py-2 text-zinc-500 hover:text-black text-[14px] font-semibold transition-colors focus:outline-none",children:i("login.ui.back_to_login")})}),n==="2fa-recovery"&&e.jsx(s.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-4 text-center overflow-hidden",children:e.jsx("button",{type:"button",onClick:()=>{p("2fa"),T(null),M("")},className:"py-2 text-zinc-500 hover:text-black text-[14px] font-semibold transition-colors focus:outline-none",children:i("login.ui.back_to_app_code")})})]})]},"email-form")}),e.jsx(o,{children:["login","register"].includes(n)&&e.jsxs(s.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"mt-8 text-center",children:[e.jsxs("div",{className:`flex flex-col sm:flex-row items-center justify-center text-[14px] font-medium text-zinc-500 ${c?"hidden":""}`,children:[e.jsx(o,{mode:"wait",children:e.jsx(s.span,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.15},children:i(n==="login"?"login.ui.no_account":"login.ui.has_account")},n)}),e.jsx("button",{onClick:()=>p(n==="login"?"register":"login"),className:"font-semibold hover:underline transition-colors mt-1 sm:mt-0 sm:ml-1 focus:outline-none text-black",children:e.jsx(o,{mode:"wait",children:e.jsx(s.span,{initial:{opacity:0,x:5},animate:{opacity:1,x:0},exit:{opacity:0,x:-5},transition:{duration:.15},children:i(n==="login"?"login.ui.create_account":"login.ui.do_login")},n)})})]}),e.jsxs("p",{className:"mt-4 text-[12px] font-medium leading-relaxed text-zinc-400",children:[i("login.ui.terms_agree")," ",e.jsx("a",{href:m("/terms"),target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors text-zinc-500 hover:text-zinc-700",children:i("login.ui.terms_of_use")})," ",i("login.ui.and")," ",e.jsx("a",{href:m("/privacy"),target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 transition-colors text-zinc-500 hover:text-zinc-700",children:i("login.ui.privacy_policy")}),"."]})]},"footer-toggle")})]}),e.jsx("div",{className:"relative sm:absolute sm:bottom-4 sm:left-0 sm:right-0 px-4 sm:px-6 py-3 sm:py-0",children:e.jsxs("div",{className:"flex flex-col items-center text-[11px] font-medium gap-2 text-zinc-400",children:[e.jsxs("span",{className:"text-center",children:["© ",new Date().getFullYear()," ",e.jsx("strong",{className:"text-zinc-600",children:"Cattive"}),"."," ",i("login.ui.copyright")]}),e.jsxs("nav",{className:"flex items-center gap-3 flex-wrap justify-center text-zinc-400",children:[e.jsx("a",{href:m("/contact"),target:"_blank",rel:"noopener noreferrer",className:"transition hover:text-zinc-600",children:i("login.ui.support")}),e.jsx("span",{className:"text-zinc-200",children:"·"}),e.jsx("button",{type:"button",onClick:()=>$(),className:"transition hover:text-zinc-600",children:i("login.ui.feedback")}),e.jsx("span",{className:"text-zinc-200",children:"·"}),e.jsx("a",{href:m("/terms"),target:"_blank",rel:"noopener noreferrer",className:"transition hover:text-zinc-600",children:i("login.ui.terms")}),e.jsx("span",{className:"text-zinc-200",children:"·"}),e.jsx("a",{href:m("/privacy"),target:"_blank",rel:"noopener noreferrer",className:"transition hover:text-zinc-600",children:i("login.ui.privacy")}),e.jsx("span",{className:"text-zinc-200",children:"·"}),e.jsx("div",{className:"inline-flex items-center gap-1",children:B.map((t,a)=>e.jsxs(re.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>V(t.code),className:`text-[10px] font-bold uppercase tracking-[0.05em] transition-colors ${H===t.code?"text-zinc-700":"text-zinc-400 hover:text-zinc-600"}`,title:t.name,children:t.code}),a<B.length-1&&e.jsx("span",{className:"text-[9px] text-zinc-300",children:"/"})]},t.code))})]})]})})]})]})}function He(){return e.jsx(oe,{children:e.jsx(we,{})})}export{He as default};
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.