PageSourceSearch

https://soukult.lovable.app/assets/auth-DI93h--q.js

js soukult.lovable.app collected 2026-10-03 03:45:28 UTC 8,352 bytes, 1 lines download raw bytes

vendor: 4,115 bytes, line 1
1import{r as o,j as e,P as W,l as P,m as X,n as q,o as L,p as V,q as A,b as Y,u as J,L as w,B as Q,v as Z,t as E,w as ee}from"./index-fhNmtqR0.js";import{a as I,I as S,L as te}from"./label-DW9JlLIS.js";import{u as se,a as ae,C as re}from"./index-C1vDxQLZ.js";import{B as oe}from"./BrandLogo-DdcqU5Cm.js";import{c as T,S as ne}from"./SocialAuthButtons-DIHQufrv.js";var j="Checkbox",[ie]=V(j),[ce,R]=ie(j);function de(s){const{__scopeCheckbox:r,checked:n,children:i,defaultChecked:c,disabled:a,form:h,name:m,onCheckedChange:u,required:f,value:x="on",internal_do_not_use_render:l}=s,[p,v]=X({prop:n,defaultProp:c??!1,onChange:u,caller:j}),[g,b]=o.useState(null),[C,t]=o.useState(null),d=o.useRef(!1),N=g?!!h||!!g.closest("form"):!0,y={checked:p,disabled:a,setChecked:v,control:g,setControl:b,name:m,form:h,value:x,hasConsumerStoppedPropagationRef:d,required:f,defaultChecked:k(c)?!1:c,isFormControl:N,bubbleInput:C,setBubbleInput:t};return e.jsx(ce,{scope:r,...y,children:le(l)?l(y):i})}var F="CheckboxTrigger",M=o.forwardRef(({__scopeCheckbox:s,onKeyDown:r,onClick:n,...i},c)=>{const{control:a,value:h,disabled:m,checked:u,required:f,setControl:x,setChecked:l,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:g}=R(F,s),b=q(c,x),C=o.useRef(u);return o.useEffect(()=>{const t=a?.form;if(t){const d=()=>l(C.current);return t.addEventListener("reset",d),()=>t.removeEventListener("reset",d)}},[a,l]),e.jsx(P.button,{type:"button",role:"checkbox","aria-checked":k(u)?"mixed":u,"aria-required":f,"data-state":H(u),"data-disabled":m?"":void 0,disabled:m,value:h,...i,ref:b,onKeyDown:L(r,t=>{t.key==="Enter"&&t.preventDefault()}),onClick:L(n,t=>{l(d=>k(d)?!0:!d),g&&v&&(p.current=t.isPropagationStopped(),p.current||t.stopPropagation())})})});M.displayName=F;var _=o.forwardRef((s,r)=>{const{__scopeCheckbox:n,name:i,checked:c,defaultChecked:a,required:h,disabled:m,value:u,onCheckedChange:f,form:x,...l}=s;return e.jsx(de,{__scopeCheckbox:n,checked:c,defaultChecked:a,disabled:m,required:h,onCheckedChange:f,name:i,form:x,value:u,internal_do_not_use_render:({isFormControl:p})=>e.jsxs(e.Fragment,{children:[e.jsx(M,{...l,ref:r,__scopeCheckbox:n}),p&&e.jsx(z,{__scopeCheckbox:n})]})})});_.displayName=j;var D="CheckboxIndicator",$=o.forwardRef((s,r)=>{const{__scopeCheckbox:n,forceMount:i,...c}=s,a=R(D,n);return e.jsx(W,{present:i||k(a.checked)||a.checked===!0,children:e.jsx(P.span,{"data-state":H(a.checked),"data-disabled":a.disabled?"":void 0,...c,ref:r,style:{pointerEvents:"none",...s.style}})})});$.displayName=D;var O="CheckboxBubbleInput",z=o.forwardRef(({__scopeCheckbox:s,...r},n)=>{const{control:i,hasConsumerStoppedPropagationRef:c,checked:a,defaultChecked:h,required:m,disabled:u,name:f,value:x,form:l,bubbleInput:p,setBubbleInput:v}=R(O,s),g=q(n,v),b=se(a),C=ae(i);o.useEffect(()=>{const d=p;if(!d)return;const N=window.HTMLInputElement.prototype,B=Object.getOwnPropertyDescriptor(N,"checked").set,U=!c.current;if(b!==a&&B){const G=new Event("click",{bubbles:U});d.indeterminate=k(a),B.call(d,k(a)?!1:a),d.dispatchEvent(G)}},[p,b,a,c]);const t=o.useRef(k(a)?!1:a);return e.jsx(P.input,{type:"checkbox","aria-hidden":!0,defaultChecked:h??t.current,required:m,disabled:u,name:f,value:x,form:l,...r,tabIndex:-1,ref:g,style:{...r.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});z.displayName=O;function le(s){return typeof s=="function"}function k(s){return s==="indeterminate"}function H(s){return k(s)?"indeterminate":s?"checked":"unchecked"}const K=o.forwardRef(({className:s,...r},n)=>e.jsx(_,{ref:n,className:A("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...r,children:e.jsx($,{className:A("grid place-content-center text-current"),children:e.jsx(re,{className:"h-4 w-4"})})}));K.displayName=_.displayName;function xe(){const s=Y(),[r,n]=o.useState("signup"),[i,c]=o.useState(""),[a,h]=o.use
1State(""),[m,u]=o.useState(""),[f,x]=o.useState(!1),[l,p]=o.useState(!1),{user:v}=J();o.useEffect(()=>{if(!v)return;const t=T();s(t?{to:"/video/$videoId",params:{videoId:t}}:{to:"/"})},[v,s]);const g=()=>{const t=T();s(t?{to:"/video/$videoId",params:{videoId:t}}:{to:"/"})},b=!l,C=async t=>{if(t.preventDefault(),!b){x(!0);try{r==="signup"?(await Z(m||i.split("@")[0],i,a),E.success("Bem-vindo(a) à Kult ✨"),g()):(await ee(i,a),E.success("Bom te ver de novo 😊"),g())}catch(d){E.error(d.message??"Falha na autenticação")}finally{x(!1)}}};return e.jsxs("div",{className:"relative min-h-screen overflow-hidden bg-gradient-hero",children:[e.jsx("div",{className:"absolute inset-0 opacity-40",style:{backgroundImage:"radial-gradient(circle at 30% 30%, oklch(0.82 0.13 175 / 0.35), transparent 45%), radial-gradient(circle at 70% 70%, oklch(0.78 0.2 300 / 0.4), transparent 45%)"}}),e.jsx("div",{className:"relative mx-auto flex min-h-screen max-w-6xl items-center justify-center px-4 py-12",style:{paddingTop:"max(3rem, env(safe-area-inset-top))"},children:e.jsxs("div",{className:"grid w-full gap-10 md:grid-cols-2 md:items-center",children:[e.jsxs("div",{className:"hidden md:block text-primary-foreground",children:[e.jsx(w,{to:"/",className:"inline-flex items-center gap-2",children:e.jsx(oe,{variant:"white",className:"h-10"})}),e.jsxs("h1",{className:"mt-10 font-display text-5xl font-bold leading-tight text-balance",children:["Seu canto da internet para"," ",e.jsx("span",{className:"italic text-[var(--mint)]",children:"conteúdo bom de verdade"}),"."]}),e.jsx("p",{className:"mt-4 max-w-md text-primary-foreground/80",children:"Entre numa comunidade que cura vídeos do YouTube, filmes e séries com notas e gosto de verdade."})]}),e.jsxs("div",{className:"rounded-3xl bg-card p-8 shadow-purple",children:[e.jsxs("div",{className:"mb-6 flex gap-1 rounded-full bg-muted p-1",children:[e.jsx("button",{onClick:()=>n("signup"),className:`flex-1 rounded-full py-2 text-sm font-medium transition ${r==="signup"?"bg-card shadow-soft text-foreground":"text-muted-foreground"}`,children:"Criar conta"}),e.jsx("button",{onClick:()=>n("signin"),className:`flex-1 rounded-full py-2 text-sm font-medium transition ${r==="signin"?"bg-card shadow-soft text-foreground":"text-muted-foreground"}`,children:"Entrar"})]}),e.jsxs("label",{className:"mb-4 flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(K,{checked:l,onCheckedChange:t=>p(t===!0),className:"mt-0.5"}),e.jsxs("span",{children:["Li e concordo com os"," ",e.jsx(w,{to:"/credits",target:"_blank",className:"underline underline-offset-2 hover:text-foreground",children:"Termos de Uso e a Política de Privacidade"}),", incluindo a tolerância zero para conteúdo objetável e usuários abusivos."]})]}),e.jsx(ne,{disabled:b}),e.jsxs("div",{className:"my-5 flex items-center gap-3 text-xs uppercase tracking-widest text-muted-foreground",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),"ou com email",e.jsx("div",{className:"h-px flex-1 bg-border"})]}),e.jsxs("form",{onSubmit:C,className:"space-y-4",children:[r==="signup"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"name",children:"Seu nome"}),e.jsx(S,{id:"name",value:m,onChange:t=>u(t.target.value),className:"rounded-xl",placeholder:"Ada Lovelace"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"email",children:"E-mail"}),e.jsx(S,{id:"email",type:"email",required:!0,value:i,onChange:t=>c(t.target.value),className:"rounded-xl"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"pw",children:"Senha"}),e.jsx(S,{id:"pw",type:"password",required:!0,minLength:6,value:a,onChange:t=>h(t.target.value),className:"rounded-xl"}),r==="signin"&&e.jsx("div",{className:"text-right",children:e.jsx(w,{to:"/esqueci-senha",className:"text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:"Esqueci minha senha"})})]}),e.jsxs(Q,{type:"submit",disabled:f||b,className:"w-full rounded-full bg-gradient-to-r from-primary to-primary-glow text-primary-foreground shadow-soft",children:[f&&e.jsx(te,{className:"h-4 w-4 animate-spin"}),r==="signup"?"Criar conta":"Entrar"]})]})]})]})})]})}export{xe as component};

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.