1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67881,25913,86011,e=>{"use strict";var r=e.i(18050),t=e.i(7670);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=t.clsx,n=(e,r)=>t=>{var n;if((null==r?void 0:r.variants)==null)return s(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:i,defaultVariants:o}=r,l=Object.keys(i).map(e=>{let r=null==t?void 0:t[e],s=null==o?void 0:o[e];if(null===r)return null;let n=a(r)||a(s);return i[e][n]}),d=t&&Object.entries(t).reduce((e,r)=>{let[t,a]=r;return void 0===a||(e[t]=a),e},{});return s(e,l,null==r||null==(n=r.compoundVariants)?void 0:n.reduce((e,r)=>{let{class:t,className:a,...s}=r;return Object.entries(s).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...o,...d}[r]):({...o,...d})[r]===t})?[...e,t,a]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)};e.s(["cva",0,n],25913);var i=e.i(91918);e.s(["Slot",0,i],86011);var i=i,o=e.i(47163);let l=n("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:t="default",size:a="default",asChild:s=!1,...n}){let d=s?i.Root:"button";return(0,r.jsx)(d,{"data-slot":"button","data-variant":t,"data-size":a,className:(0,o.cn)(l({variant:t,size:a,className:e})),...n})}],67881)},95057,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={formatUrl:function(){return o},formatWithValidation:function(){return d},urlObjectKeys:function(){return l}};for(var s in a)Object.defineProperty(t,s,{enumerable:!0,get:a[s]});let n=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function o(e){let{auth:r,hostname:t}=e,a=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",d=!1;r=r?encodeURIComponent(r).replace(/%3A/i,":")+"@":"",e.host?d=r+e.host:t&&(d=r+(~t.indexOf(":")?`[${t}]`:t),e.port&&(d+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==d?(d="//"+(d||""),s&&"/"!==s[0]&&(s="/"+s)):d||(d=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${d}${s}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return o(e)}},18581,(e,r,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return s}});let a=e.r(71645);function s(e,r){let t=(0,a.useRef)(null),s=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=t.current;e&&(t.current=null,e());let r=s.current;r&&(s.current=null,r())}else e&&(t.current=n(e,a)),r&&(s.current=n(r,a))},[e,r])}function n(e,r){if("function"!=typeof e)return e.current=r,()=>{e.current=null};{let t=e(r);return"function"==typeof t?t:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},73668,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return n}});let a=e.r(18967),s=e.r(52817);function n(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let r=(0,a.getLocationOrigin)(),t=new URL(e,r);return t.origin===r&&(0,s.hasBasePath)(t.pathname)}catch(e){return!1}}},84508,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={default:function(){return g},useLinkStatus:function(){return x}};for(var s in a)Object.defineProperty(t,s,{enumerable:!0,get:a[s]});let n=e.r(90809),i=e.r(18050),o=n._(e.r(71645)),l=e.r(95057),d=e.r(8372),u=e.r(18581),c=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),m=e.r(91949),h=e.r(73668),v=e.r(9396);function g(r){var t,a;let s,n,g,[x,y]=(0,o.useOptimistic)(m.IDLE_LINK_STATUS),w=(0,o.useRef)(null),{href:j,as:N,children:S,prefetch:k=null,passHref:z,replace:P,shallow:C,scroll:E,onClick:M,onMouseEnter:_,onTouchStart:F,legacyBehavior:R=!1,onNavigate:L,transitionTypes:O,ref:B,unstable_dynamicOnHover:I,...T}=r;s=S,R&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let D=o.default.useContext(d.AppRouterContext),A=!1!==k,U=!1!==k?null===(a=k)||"auto"===a?v.FetchStrategy.PPR:v.FetchStrategy.Full:v.FetchStrategy.PPR,$="string"==typeof(t=N||j)?t:(0,l.formatUrl)(t);if(R){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=o.default.Children.only(s)}let K=R?n&&"object"==typeof n&&n.ref:B,W=o.default.useCallback(e=>(null!==D&&(w.current=(0,m.mountLinkInstance)(e,$,D,U,A,y)),()=>{w.current&&((0,m.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,m.unmountPrefetchableInstance)(e)}),[A,$,D,U,y]),q={ref:(0,u.useMergedRef)(W,K),onClick(r){R||"function"!=typeof M||M(r),R&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(r),!D||r.defaultPrevented||function(r,t,a,s,n,i,l){if("u">typeof window){let d,{nodeName:u}=r.currentTarget;if("A"===u.toUpperCase()&&((d=r.currentTarget.getAttribute("target"))&&"_self"!==d||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey||r.nativeEvent&&2===r.nativeEvent.which)||r.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(t)){s&&(r.preventDefault(),location.replace(t));return}if(r.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:c}=e.r(99781);o.default.startTransition(()=>{c(t,s?"replace":"push",!1===n?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,l)})}}(r,$,w,P,E,L,O)},onMouseEnter(e){R||"function"!=typeof _||_(e),R&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),D&&A&&(0,m.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){R||"function"!=typeof F||F(e),R&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),D&&A&&(0,m.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,c.isAbsoluteUrl)($)?q.href=$:R&&!z&&("a"!==n.type||"href"in n.props)||(q.href=(0,p.addBasePath)($)),g=R?o.default.cloneElement(n,q):(0,i.jsx)("a",{...T,...q,children:s}),(0,i.jsx)(b.Provider,{value:x,children:g})}e.r(84508);let b=(0,o.createContext)(m.IDLE_LINK_STATUS),x=()=>(0,o.useContext)(b);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},69035,e=>{"use strict";var r=e.i(18050),t=e.i(71645),a=e.i(48425),s="horizontal",n=["horizontal","vertical"],i=t.forwardRef((e,t)=>{var i;let{decorative:o,orientation:l=s,...d}=e,u=(i=l,n.includes(i))?l:s;return(0,r.jsx)(a.Primitive.div,{"data-orientation":u,...o?{role:"none"}:{"aria-orientation":"vertical"===u?u:void 0,role:"separator"},...d,ref:t})});i.displayName="Separator",e.s(["Root",0,i,"Separator",0,i],86392);var o=e.i(86392),o=o,l=e.i(47163);e.s(["Separator",0,function({className:e,orientation:t="horizontal",decorative:a=!0,...s}){return(0,r.jsx)(o.Root,{"data-slot":"separator",decorative:a,orientation:t,className:(0,l.cn)("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...s})}],69035)},23750,e=>{"use strict";var r=e.i(18050),t=e.i(47163);e.s(["Input",0,function({className:e,type:a,...s}){return(0,r.jsx)("input",{type:a,"data-slot":"input",className:(0,t.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...s})}])},50216,e=>{"use strict";var r=e.i(18050),t=e.i(47163),a=e.i(57778);e.s(["Spinner",0,function({className:e,...s}){return(0,r.jsx)(a.Loader2Icon,{role:"status","aria-label":"Loading",className:(0,t.cn)("size-4 animate-spin",e),...s})}])},18566,(e,r,t)=>{r.exports=e.r(76562)},10708,e=>{"use strict";var r=e.i(18050),t=e.i(71645),a=e.i(48425),s=t.forwardRef((e,t)=>(0,r.jsx)(a.Primitive.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));s.displayName="Label",e.s(["Label",0,s,"Root",0,s],73741);var n=e.i(73741),n=n,i=e.i(47163);e.s(["Label",0,function({className:e,...t}){return(0,r.jsx)(n.Root,{"data-slot":"label",className:(0,i.cn)("text-xs font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}],10708)},52112,e=>{"use strict";var r=e.i(18050),t=e.i(47163);e.s(["FieldMessage",0,function({id:e,children:a,className:s,variant:n="hint"}){return(0,r.jsx)("p",{id:e,role:"error"===n?"alert":void 0,className:(0,t.cn)("text-xs","error"===n?"text-destructive":"text-muted-foreground",s),children:a})}])},89954,e=>{"use strict";var r=e.i(18050),t=e.i(66347),a=e.i(67881),s=e.i(52112),n=e.i(23750),i=e.i(10708),o=e.i(69035),l=e.i(50216),d=e.i(22016),u=e.i(75254);let c=(0,u.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"}]]),p=(0,u.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"}]]),f=(0,u.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);var m=e.i(18566),h=e.i(71645),v=e.i(46696),g=e.i(81307),b=e.i(3922);let x=g.z.object({email:g.z.email("Enter a valid email address."),password:g.z.string().min(8,"Password must be at least 8 characters.")}),y=g.z.object({email:g.z.email("Enter a valid email address.")}),w=g.z.object({email:g.z.email("Enter a valid email address.")}),j=g.z.object({code:g.z.string().regex(/^\d{8}$/,"Enter the 8-digit code we sent you.")}),N=g.z.object({newPassword:g.z.string().min(8,"Password must be at least 8 characters."),confirmNewPassword:g.z.string().min(8,"Password must be at least 8 characters.")}).refine(e=>e.newPassword===e.confirmNewPassword,{message:"Passwords do not match.",path:["confirmNewPassword"]});function S(){var e;let u=(0,m.useRouter)(),g=!(e=(0,m.useSearchParams)().get("next"))||!e.startsWith("/")||e.startsWith("//")?"/dashboard":e,{user:S,isLoading:k,signInWithOtp:z,signInWithPassword:P}=(0,t.useAuth)(),[C,E]=(0,h.useState)(""),[M,_]=(0,h.useState)(""),[F,R]=(0,h.useState)(!1),[L,O]=(0,h.useState)(!1),[B,I]=(0,h.useState)({}),[T,D]=(0,h.useState)("login"),[A,U]=(0,h.useState)(""),[$,K]=(0,h.useState)(""),[W,q]=(0,h.useState)(""),[V,H]=(0,h.useState)(""),[X,J]=(0,h.useState)(!1),[Q,G]=(0,h.useState)(null),[Y,Z]=(0,h.useState)(null),[ee,er]=(0,h.useState)(null),[et,ea]=(0,h.useState)(null),[es,en]=(0,h.useState)(null);async function ei(e){e.preventDefault();let r=x.safeParse({email:C,password:M});if(!r.success){let e=r.error.flatten().fieldErrors;I({email:e.email?.[0],password:e.password?.[0]});return}I({}),O(!0);try{await P(r.data.email,r.data.password),v.toast.success("Login successful. Welcome back."),u.replace(g)}catch(r){let e=r instanceof Error?r.message:"Login failed";v.toast.error(e)}finally{O(!1)}}async function eo(){let e=y.safeParse({email:C}
1);if(!e.success){let r=e.error.flatten().fieldErrors;I({email:r.email?.[0]});return}I(e=>({...e,email:void 0})),O(!0);try{await z(e.data.email),v.toast.success("Sign-in link sent. Check your inbox.")}catch(r){let e=r instanceof Error?r.message:"Request failed";v.toast.error(e)}finally{O(!1)}}function el(){G(null),Z(null),er(null),ea(null),en(null)}async function ed(e){e?.preventDefault();let r=w.safeParse({email:A});if(!r.success){G(r.error.flatten().fieldErrors.email?.[0]??"Invalid email"),en(null);return}el(),J(!0);try{let{error:e}=await b.supabase.auth.resetPasswordForEmail(r.data.email);if(e)throw e;v.toast.success("Check your email for the 8-digit code."),D("verify")}catch(e){en(e instanceof Error?e.message:"Failed to send code")}finally{J(!1)}}async function eu(e){e?.preventDefault();let r=j.safeParse({code:$});if(!r.success){Z(r.error.flatten().fieldErrors.code?.[0]??"Invalid code"),en(null);return}el(),J(!0);try{let{error:e}=await b.supabase.auth.verifyOtp({email:A.trim(),token:r.data.code,type:"recovery"});if(e)throw e;v.toast.success("Code verified. Set a new password."),D("reset")}catch(e){en(e instanceof Error?e.message:"Invalid or expired code")}finally{J(!1)}}async function ec(e){e?.preventDefault();let r=N.safeParse({newPassword:W,confirmNewPassword:V});if(!r.success){let e=r.error.flatten().fieldErrors;er(e.newPassword?.[0]??null),ea(e.confirmNewPassword?.[0]??null),en(null);return}el(),J(!0);try{let{error:e}=await b.supabase.auth.updateUser({password:r.data.newPassword});if(e)throw e;await P(A.trim(),r.data.newPassword),v.toast.success("Password updated. Welcome back!"),u.replace(g)}catch(e){en(e instanceof Error?e.message:"Failed to reset password")}finally{J(!1)}}return(0,h.useEffect)(()=>{!k&&S&&u.replace(g)},[k,S,u,g]),(0,r.jsxs)("div",{className:"flex min-h-svh items-center justify-center bg-muted/20 p-4",children:[(0,r.jsx)("div",{className:"absolute left-4 top-4",children:(0,r.jsx)(a.Button,{asChild:!0,variant:"ghost",size:"icon-sm",children:(0,r.jsxs)(d.default,{href:"/",children:[(0,r.jsx)(f,{className:"size-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Home"})]})})}),(0,r.jsxs)("div",{className:"w-full max-w-sm rounded-xl border bg-card p-5 shadow-xs",children:["login"===T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("img",{src:"/base-logo.png",alt:"",className:"size-6 rounded object-contain"}),(0,r.jsx)("h1",{className:"text-lg font-semibold tracking-tight",children:"Sign in"})]}),(0,r.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Sign in to open communities, spaces, and DMs."}),(0,r.jsxs)("form",{className:"mt-4 space-y-3",onSubmit:ei,children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(i.Label,{htmlFor:"login-email",children:"Email"}),(0,r.jsx)(n.Input,{id:"login-email",type:"email",autoComplete:"email",placeholder:"[email protected]",value:C,onChange:e=>{E(e.target.value),B.email&&I(e=>({...e,email:void 0}))},required:!0,"aria-invalid":!!B.email,"aria-describedby":B.email?"login-email-error":void 0}),B.email?(0,r.jsx)(s.FieldMessage,{id:"login-email-error",variant:"error",children:B.email}):null]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(i.Label,{htmlFor:"login-password",children:"Password"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(n.Input,{id:"login-password",type:F?"text":"password",autoComplete:"current-password",placeholder:"Password",value:M,onChange:e=>{_(e.target.value),B.password&&I(e=>({...e,password:void 0}))},required:!0,"aria-invalid":!!B.password,"aria-describedby":B.password?"login-password-error":void 0,className:"pr-9"}),(0,r.jsx)(a.Button,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute top-1/2 right-1 -translate-y-1/2 text-muted-foreground",onClick:()=>R(e=>!e),"aria-label":F?"Hide password":"Show password",children:F?(0,r.jsx)(p,{className:"size-3.5","aria-hidden":!0}):(0,r.jsx)(c,{className:"size-3.5","aria-hidden":!0})})]}),B.password?(0,r.jsx)(s.FieldMessage,{id:"login-password-error",variant:"error",children:B.password}):null]}),(0,r.jsx)(a.Button,{type:"submit",className:"w-full",size:"sm",disabled:L,children:L?(0,r.jsx)(l.Spinner,{}):"Sign in"})]}),(0,r.jsx)("div",{className:"my-3",children:(0,r.jsx)(o.Separator,{})}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(a.Button,{variant:"outline",size:"sm",className:"w-full",onClick:()=>void eo(),disabled:L||!C,children:"Send sign-in link"}),(0,r.jsx)(a.Button,{variant:"link",size:"sm",className:"w-full justify-start",onClick:function(){el(),J(!1),K(""),q(""),H(""),U(C.trim()),D("forgot")},disabled:L,children:"Forgot password?"})]})]}):null,"forgot"===T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"text-lg font-semibold",children:"Forgot password"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your email and we'll send you an 8-digit code."}),(0,r.jsxs)("form",{className:"mt-4 space-y-3",onSubmit:ed,children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(i.Label,{htmlFor:"recovery-email",children:"Email"}),(0,r.jsx)(n.Input,{id:"recovery-email",type:"email",autoComplete:"email",placeholder:"[email protected]",value:A,onChange:e=>{U(e.target.value),G(null),en(null)},required:!0,"aria-invalid":!!Q,"aria-describedby":Q?"recovery-email-error":es?"recovery-form-error":void 0}),Q?(0,r.jsx)(s.FieldMessage,{id:"recovery-email-error",variant:"error",children:Q}):null]}),es?(0,r.jsx)(s.FieldMessage,{id:"recovery-form-error",variant:"error",children:es}):null,(0,r.jsx)(a.Button,{type:"submit",className:"w-full",size:"sm",disabled:X,children:X?(0,r.jsx)(l.Spinner,{}):"Send code"}),(0,r.jsx)(a.Button,{type:"button",variant:"ghost",size:"sm",className:"w-full",disabled:X,onClick:()=>D("login"),children:"Back to sign in"})]})]}):null,"verify"===T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"text-lg font-semibold",children:"Verify code"}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["We sent a code to ",A,". Enter it below."]}),(0,r.jsxs)("form",{className:"mt-4 space-y-3",onSubmit:eu,children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(i.Label,{htmlFor:"recovery-code",children:"Verification code"}),(0,r.jsx)(n.Input,{id:"recovery-code",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"12345678",value:$,onChange:e=>{K(e.target.value.replace(/\D/g,"").slice(0,8)),Z(null),en(null)},"aria-invalid":!!Y,"aria-describedby":Y?"recovery-code-error":es?"recovery-form-error":void 0}),Y?(0,r.jsx)(s.FieldMessage,{id:"recovery-code-error",variant:"error",children:Y}):null]}),es?(0,r.jsx)(s.FieldMessage,{id:"recovery-form-error",variant:"error",children:es}):null,(0,r.jsx)(a.Button,{type:"submit",className:"w-full",size:"sm",disabled:X,children:X?(0,r.jsx)(l.Spinner,{}):"Verify code"}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)(a.Button,{type:"button",variant:"outline",size:"sm",disabled:X,onClick:()=>{K(""),ed()},children:"Resend"}),(0,r.jsx)(a.Button,{type:"button",variant:"ghost",size:"sm",disabled:X,onClick:()=>D("forgot"),children:"Edit email"})]})]})]}):null,"reset"===T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h1",{className:"text-lg font-semibold",children:"New password"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Set your new password, then we'll sign you back in."}),(0,r.jsxs)("form",{className:"mt-4 space-y-3",onSubmit:ec,children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(i.Label,{htmlFor:"new-password",children:"New password"}),(0,r.jsx)(n.Input,{id:"new-password",type:"password",autoComplete:"new-password",placeholder:"New password",value:W,onChange:e=>{q(e.target.value),er(null),en(null)},"aria-invalid":!!ee,"aria-describedby":ee?"new-password-error":void 0}),ee?(0,r.jsx)(s.FieldMessage,{id:"new-password-error",variant:"error",children:ee}):null]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(i.Label,{htmlFor:"confirm-new-password",children:"Confirm new password"}),(0,r.jsx)(n.Input,{id:"confirm-new-password",type:"password",autoComplete:"new-password",placeholder:"Confirm new password",value:V,onChange:e=>{H(e.target.value),ea(null),en(null)},"aria-invalid":!!et,"aria-describedby":et?"confirm-new-password-error":void 0}),et?(0,r.jsx)(s.FieldMessage,{id:"confirm-new-password-error",variant:"error",children:et}):null]}),es?(0,r.jsx)(s.FieldMessage,{variant:"error",children:es}):null,(0,r.jsx)(a.Button,{type:"submit",className:"w-full",size:"sm",disabled:X,children:X?(0,r.jsx)(l.Spinner,{}):"Reset & sign in"}),(0,r.jsx)(a.Button,{type:"button",variant:"ghost",size:"sm",className:"w-full",disabled:X,onClick:()=>D("login"),children:"Cancel"})]})]}):null]})]})}e.s(["default",0,function(){return(0,r.jsx)(h.Suspense,{fallback:(0,r.jsx)("div",{className:"flex min-h-svh items-center justify-center",children:(0,r.jsx)(l.Spinner,{className:"size-5"})}),children:(0,r.jsx)(S,{})})}],89954)}]);
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.