1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="d119ec31-bc78-64d5-066a-f5886e0b09e8")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,675467,764760,661372,e=>{"use strict";var t=e.i(190898),a=e.i(226201),r=e.i(355152),n=e.i(238029),l=e.i(470733),i=e.i(578791);e.s(["AuthShell",0,({align:e="center",children:s,className:o,columns:c,enterFromColumns:d,hero:u,panelFooter:m})=>{let[x,h]=(0,i.useState)(d??c),p=!!u&&"caption"!==u.titleAs;return(0,i.useEffect)(()=>{if(!c)return;let e=requestAnimationFrame(()=>h(c));return()=>cancelAnimationFrame(e)},[c]),(0,t.jsxs)("div",{className:(0,l.clsx)("relative grid min-h-dvh w-full grid-cols-1 lg:grid-rows-none",p?"grid-rows-[auto_1fr]":"grid-rows-[1fr]",c?"lg:transition-[grid-template-columns] lg:duration-700 lg:ease-out lg:[grid-template-columns:var(--auth-cols)]":"lg:grid-cols-[3fr_2fr]",o),style:c?{"--auth-cols":x}:void 0,children:[(0,t.jsx)("a",{"aria-label":"Molecule home",className:"absolute left-10 top-8 z-20 hidden rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-600 focus-visible:ring-offset-4 lg:block",href:a.routes.home,children:(0,t.jsx)(n.MoleculeLogo,{className:"w-32"})}),u?(0,t.jsxs)(t.Fragment,{children:[p?(0,t.jsx)("div",{className:"flex flex-col gap-2 px-6 pb-2 pt-20 lg:hidden",children:(0,t.jsx)(r.Heading,{className:"!text-[20px] md:!text-[28px]",level:3,noNaturalSpacing:!0,children:u.title})}):null,(0,t.jsxs)("div",{className:"relative hidden overflow-hidden bg-gradient-to-b from-[#f4f8fc] to-[#e1eefc] lg:block",children:[(0,t.jsxs)("div",{className:"relative z-10 flex h-full flex-col items-center justify-center gap-8 overflow-y-auto px-10 py-16 xl:gap-10",children:[(0,t.jsx)("div",{className:(0,l.clsx)("flex w-full max-w-[480px] flex-col gap-3","caption"===u.titleAs?"hidden":null),children:(0,t.jsx)(r.Heading,{className:"!text-[18px]",level:3,noNaturalSpacing:!0,children:u.title})}),u.children]}),"caption"===u.titleAs?(0,t.jsx)("p",{className:"absolute inset-x-0 bottom-8 z-10 px-10 text-center text-sm text-gray-700",children:u.title}):null]})]}):null,(0,t.jsxs)("div",{className:(0,l.clsx)("relative flex flex-1 flex-col items-center overflow-y-auto px-4 pb-8 md:px-0","top"===e?"justify-start pt-10":"justify-start pt-10 lg:justify-center lg:py-20"),children:[(0,t.jsx)("a",{"aria-label":"Molecule home",className:"mb-6 rounded-sm opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-600 focus-visible:ring-offset-4 lg:hidden",href:a.routes.home,children:(0,t.jsx)(n.MoleculeThumbnail,{className:"h-auto w-7"})}),s,m?(0,t.jsx)("div",{className:"mt-10 flex w-full justify-center px-4 lg:absolute lg:inset-x-0 lg:bottom-6 lg:mt-0",children:(0,t.jsx)("div",{className:"w-full max-w-md",children:m})}):null]})]})}],675467),e.s(["AuthStatus",0,({className:e,message:a})=>(0,t.jsxs)("div",{className:(0,l.clsx)("flex flex-col items-center justify-center gap-4",e),children:[(0,t.jsx)("div",{className:"border-primary size-8 animate-spin rounded-full border-4 border-t-transparent"}),(0,t.jsx)("p",{className:"text-secondary text-sm",children:a})]})],764760);var s=e.i(22065),o=e.i(363289),c=e.i(873978);let d=(...e)=>t=>"onboarding"===t.surface&&!!t.stepId&&e.includes(t.stepId),u=[{appliesTo:e=>"create-lab"===e.surface||d("create-first-lab")(e),id:"lab-named"},{appliesTo:e=>d("enter-app")(e)&&!!e.hasLab,id:"lab-ready"},{appliesTo:d("enter-app"),id:"data-room"},{appliesTo:d("add-email"),id:"lab-contact"},{appliesTo:e=>"onboarding"===e.surface,id:"lab-blank"},{appliesTo:e=>"login"===e.surface&&"app-home"===e.entryKind,id:"returning"},{appliesTo:()=>!0,id:"data-room"}];function m({name:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:"text-subtle size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.7,viewBox:"0 0 24 24",children:["lock"===e?(0,t.jsx)("path",{d:"M7 11V8a5 5 0 0 1 10 0v3M5 11h14v10H5z"}):null,"mail"===e?(0,t.jsx)("path",{d:"M3 6h18v12H3zM3 7l9 6 9-6"}):null,"file"===e?(0,t.jsx)("path",{d:"M14 3v5h5M14 3H6v18h12V8z"}):null]})}function x({children:e,icon:a}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,t.jsx)(m,{name:a}),e]})}function h({count:e}){return(0,t.jsxs)("span",{className:"text-subtle flex items-center gap-1.5 text-[11px]",children:[(0,t.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.7,viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M3 12h4M11 12h2M17 12h4"}
2),(0,t.jsx)("circle",{cx:"9",cy:"12",fill:"currentColor",r:"1.6",stroke:"none"}),(0,t.jsx)("circle",{cx:"15",cy:"12",fill:"currentColor",r:"1.6",stroke:"none"}),(0,t.jsx)("circle",{cx:"21.5",cy:"12",r:"2"})]}),e," versions"]})}function p({icon:e="file",meta:a,name:r}){return(0,t.jsxs)(x,{icon:e,children:[(0,t.jsx)("span",{className:"text-primary flex-1 truncate text-[13px]",children:r}),(0,t.jsx)("span",{className:"text-subtle shrink-0 text-[11px]",children:a})]})}function f({icon:e="file"}){return(0,t.jsxs)(x,{icon:e,children:[(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(g,{width:"w-2/5"})}),(0,t.jsx)(g,{width:"w-10"})]})}function g({width:e}){return(0,t.jsx)("div",{className:`h-2 rounded-full bg-neutral-300 ${e}`})}function b({badge:e,meta:a,right:r,title:n}){return(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)("div",{className:"size-9 shrink-0 rounded-lg bg-gradient-to-br from-gray-200 to-blue-100"}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[n?(0,t.jsxs)("p",{className:"text-primary flex items-center gap-2 truncate text-sm font-semibold",children:[n,e]}):(0,t.jsx)(g,{width:"w-1/2"}),a?(0,t.jsx)("div",{className:"text-subtle truncate text-[11px]",children:a}):(0,t.jsx)(g,{width:"w-3/4"})]}),r]})}function j(e,t=.14){let a=Number.parseInt(e.slice(1),16),r=e=>Math.round(e*t+255*(1-t));return`rgb(${r(a>>16&255)}, ${r(a>>8&255)}, ${r(255&a)})`}function y({className:e,color:a,flip:r,intent:n,title:l}){return(0,t.jsxs)("div",{className:`pointer-events-none absolute z-20 flex items-start ${r?"flex-row-reverse":""} ${e}`,children:[(0,t.jsx)("svg",{className:"size-[30px] shrink-0 overflow-visible",fill:a,stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,style:{paintOrder:"stroke",...r?{transform:"scaleX(-1)"}:{}},viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M6.51 7.46 Q6 4.5 8.72 5.77 L15.08 8.73 Q17.8 10 15.29 11.64 L12.97 13.16 Q12.3 13.6 11.79 14.22 L10.32 15.99 Q8.4 18.3 7.89 15.35 Z"})}),(0,t.jsxs)("span",{className:`mt-3 block whitespace-nowrap rounded-md border px-2 py-1 ${r?"-mr-0.5":"-ml-0.5"}`,style:{backgroundColor:j(a),borderColor:j(a,.32)},children:[(0,t.jsx)("span",{className:"block text-[9px] font-semibold uppercase tracking-wider",style:{color:a},children:l}),(0,t.jsx)("span",{className:"text-primary block text-[11px]",children:n})]})]})}function v(){return(0,t.jsxs)("div",{className:"relative w-full",children:[(0,t.jsx)(s.Card,{backgroundColor:"background",className:"overflow-hidden",rounded:"xl",children:(0,t.jsxs)(s.CardContent,{padding:"none",children:[(0,t.jsx)(b,{badge:(0,t.jsx)("span",{className:"text-subtle shrink-0 rounded-full bg-neutral-100 px-2 py-0.5 text-[9px] font-semibold uppercase tracking-wider",children:"Private"}),meta:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"flex -space-x-1.5",children:[(0,t.jsx)("span",{className:"size-4 rounded-full border-2 border-white bg-neutral-300"}),(0,t.jsx)("span",{className:"size-4 rounded-full border-2 border-white bg-neutral-200"}),(0,t.jsx)("span",{className:"size-4 rounded-full border-2 border-white bg-blue-100"})]}),"3 collaborators"]}),right:(0,t.jsxs)("span",{className:"text-subtle flex shrink-0 items-center gap-1.5 text-[13px] tabular-nums",children:[(0,t.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M3 7h15a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zM3 7a2 2 0 0 1 2-2h11M16 13h.01"})}),"$24,500"]}),title:"Aging Biology Lab"}),(0,t.jsxs)("div",{className:"divide-y border-t",children:[(0,t.jsx)(p,{meta:(0,t.jsx)(h,{count:6}),name:"Protocol.pdf"}),(0,t.jsx)(f,{}),(0,t.jsx)(f,{icon:"lock"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1.5 border-t bg-neutral-100 py-2",children:[(0,t.jsx)("svg",{"aria-hidden":"true",className:"text-subtle size-3",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1"})}),(0,t.jsx)("span",{className:"text-subtle text-[10px]",children:"Timestamped proof of authorship"})]})]})}),(0,t.jsx)(y,{className:"left-[452px] top-[32px] max-xl:hidden",color:"#c7844d",intent:"Order lab supplies â $250",title:"Lab manager"}),(0,t.jsx)(y,{className:"right-[363px] top-[90px]",color:"#9986df",flip:!0,intent:"Adding 4 citations",title:"Literature agent"})]})}let w=a.routes.lab("aging-biology").replace(/^https?:\/\//,"");function N({children:e}){return(0,t.jsx)(c.motion.div,{animate:{height:"auto",opacity:1},className:"overflow-hidden",exit:{height:0,opacity:0}
2,initial:{height:0,opacity:0},transition:{duration:.28,ease:"easeOut"},children:e})}function k({email:e,stage:a}){let r="named"===a||"ready"===a;return(0,t.jsx)("div",{className:"relative w-full",children:(0,t.jsx)(c.motion.div,{layout:!0,transition:{duration:.28,ease:"easeOut"},children:(0,t.jsx)(s.Card,{backgroundColor:"background",className:"overflow-hidden",rounded:"xl",children:(0,t.jsxs)(s.CardContent,{padding:"none",children:[(0,t.jsx)(b,{meta:r?w:void 0,title:r?"Aging Biology Lab":void 0}),(0,t.jsxs)(o.AnimatePresence,{initial:!1,children:["blank"===a?null:(0,t.jsx)(N,{children:(0,t.jsx)("div",{className:"border-t",children:(0,t.jsx)(x,{icon:"mail",children:e?(0,t.jsx)("span",{className:"text-primary flex-1 truncate text-[13px]",children:e}):(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(g,{width:"w-2/5"})})})})},"contact"),"ready"===a?(0,t.jsx)(N,{children:(0,t.jsx)("div",{className:"border-t",children:(0,t.jsx)(p,{meta:"Ready",name:"Data room"})})},"dataroom"):null]})]})})})})}function C(){return(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(s.Card,{backgroundColor:"background",className:"overflow-hidden",rounded:"xl",children:(0,t.jsx)(s.CardContent,{padding:"none",children:(0,t.jsx)(b,{meta:"Updated 2 hours ago",title:"Aging Biology Lab"})})})})}function _({panel:e,viewer:a}){return(0,t.jsx)(o.AnimatePresence,{initial:!1,mode:"wait",children:(0,t.jsx)(c.motion.div,{animate:{opacity:1,y:0},className:"flex w-full max-w-[480px] justify-start",exit:{opacity:0,y:-6},initial:{opacity:0,y:6},transition:{duration:.24,ease:"easeOut"},children:function(e,a){switch(e){case"data-room":return(0,t.jsx)(v,{});case"lab-blank":return(0,t.jsx)(k,{email:a.email,stage:"blank"});case"lab-contact":return(0,t.jsx)(k,{email:a.email,stage:"contact"});case"lab-named":return(0,t.jsx)(k,{email:a.email,stage:"named"});case"lab-ready":return(0,t.jsx)(k,{email:a.email,stage:"ready"});default:return(0,t.jsx)(C,{})}}(e,a)},"data-room"===e?"data-room":"returning"===e?"returning":"lab")})}e.s(["LOGIN_COLUMNS",0,"60% 40%","ONBOARDING_COLUMNS",0,"50% 50%","authHeroFor",0,function(e,a={}){let r,n=(r=u.find(t=>t.appliesTo(e)),r?.id??"data-room");return{children:(0,t.jsx)(_,{panel:n,viewer:a}),title:function(e){switch(e){case"data-room":return"Your research, in one place.";case"lab-contact":return"So we can reach you.";case"lab-named":return"Your lab, and its address.";case"lab-ready":return"Your lab is ready.";case"returning":return"Welcome back.";default:return"Setting up your account."}}(n),titleAs:"login"===e.surface?"caption":"heading"}}],661372)},526150,313880,e=>{"use strict";var t=e.i(190898),a=e.i(485218),r=e.i(306902),n=e.i(470733),l=e.i(578791);let i=({disabled:e=!1,error:a,length:r,onChange:i,onComplete:s,value:o})=>{let c=(0,l.useRef)(null),d=e=>{(function({lastCompleted:e,length:t,value:a}){return a.replace(/\s/g,"").length===t&&a!==e})({lastCompleted:c.current,length:r,value:e})&&(c.current=e,s?.(e))},u=t=>{if(t.preventDefault(),e)return;let a=t.clipboardData.getData("text").replace(/\D/g,"").slice(0,r);i(a);let n=Math.min(a.length,r-1),l=document.getElementById(`code-${n}`);l?.focus(),d(a)};return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-center gap-2",children:Array.from({length:r}).map((l,s)=>(0,t.jsx)("input",{className:(0,n.clsx)("bg-background h-14 w-12 rounded-lg border text-center text-xl font-semibold","transition-colors focus:outline-none focus:ring-2 focus:ring-offset-1","disabled:cursor-not-allowed disabled:opacity-50",a?"border-destructive focus:ring-destructive":"border-border focus:border-primary focus:ring-primary"),disabled:e,id:`code-${s}`,inputMode:"numeric",maxLength:1,onChange:t=>((t,a)=>{if(e||!/^\d*$/.test(a))return;let n=o.split("");n[t]=a.slice(-1);let l=n.join("");if(i(l),a&&t<r-1){let e=document.getElementById(`code-${t+1}`);e?.focus()}d(l)})(s,t.target.value),onKeyDown:t=>((t,a)=>{if(!e&&"Backspace"===a.key&&!o[t]&&t>0){let e=document.getElementById(`code-${t-1}`);e?.focus()}})(s,t),onPaste:u,type:"text",value:o[s]||""},s))}),a?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:a}):null]})};var s=e.i(907265);let o={backToEmail:!0,conflict:!0,message:"That email is already linked to another account. Sign in with that account instead, or use a different address.",report:!0},c={backToEmail:!1,conflict:!1,message:"Too many attempts. Please wait a moment and try again.",report:!1},d={backToEmail:!1,conflict:!1,message:"We couldnât verify that request. Please try again.",report:!1},u={cannot_link_more_of_type:{backToEmail:!0,conflict:!1,message:"Your account already has an email address. You can change it from your account settings.",report:!0},captcha_failure:d,disallowed_plus_email:{backToEmail:!0,conflict:!1,message:"Email aliases containing a â+â arenât supported here. Please use your plain address.",report:!1},invalid_captcha:d,linked_to_another_user:o,too_many_requests:c};function m(e){return e instanceof Error&&e.message?e.message:"string"==typeof e?e:""}function x(){let[e,t]=(0,l.useState)(!1),a=(0,l.useRef)(!1);return{isRunning:e,run:(0,l.useCallback)(async e=>{if(!a.current){a.current=!0,t(!0);try{await e()}finally{a.current=!1,t(!1)}}},[])}}function h(e){try{e()}catch(e){(0,s.captureError)(e)}}e.s(["CODE_LENGTH",0,6,"useEmailCodeFlow",0,function({onCodeSent:e,onCodeSubmitted:t,sendCode:a,status:r,submitCode:n}){let[i,d]=(0,l.useState)(""),[p,f]=(0,l.useState)(""),[g,b]=(0,l.useState)(0),[j,y]=(0,l.useState)(null),[v,w]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),C=x(),_=x(),S=(0,l.useRef)(0),E=(0,l.useRef)(0),A=C.isRunning||"sending-code"===r,L=_.isRunning||"submitting-code"===r;(0,l.useEffect)(()=>
2{if(g<=0)return;let e=setTimeout(()=>b(g-1),1e3);return()=>clearTimeout(e)},[g]);let T=e=>{let t=function(e){let t=u[function(e){if("object"!=typeof e||null===e)return"";let{privyErrorCode:t}=e;return"string"==typeof t?t:""}(e)];if(t)return t;let a=m(e).toLowerCase();return a.includes("already")&&(a.includes("linked")||a.includes("account")||a.includes("use"))?o:a.includes("email")&&(a.includes("invalid")||a.includes("not valid")||a.includes("malformed")||a.includes("format"))?{backToEmail:!0,conflict:!1,message:"That doesnât look like a valid email address. Please check it and try again.",report:!1}:a.includes("too many")||a.includes("rate limit")?c:a.includes("code")||a.includes("otp")||a.includes("invalid")||a.includes("expired")?{backToEmail:!1,conflict:!1,message:"That code didnât match or has expired. Try again, or resend a new one.",report:!1}:{backToEmail:!1,conflict:!1,message:m(e)||"Something went wrong. Please try again.",report:!0}}(e);return y(t.message),w(t.conflict),t.report&&(0,s.captureError)(e),t},M=(t,r)=>C.run(async()=>{y(null),w(!1);let n=!1;try{await a(t),k(!0),b(30),n=!0}catch(e){T(e)}n&&(S.current+=1,h(()=>e?.({attempt:S.current,isResend:r})))}),z=e=>_.run(async()=>{y(null),w(!1),E.current+=1;let a=E.current,r=null;try{await n(e)}catch(e){r=T(e)}r?.backToEmail&&(k(!1),f("")),h(()=>{var e;return t?.({attempt:a,outcome:r?(e=r).conflict?"conflict":e.backToEmail?"email-rejected":"code-rejected":"success"})})}),B=async e=>{e.preventDefault(),i&&(f(""),await M(i,!1))},R=async()=>{g>0||(f(""),await M(i,!0))},I=async e=>{e.preventDefault(),6===p.length&&await z(p)};return{code:p,conflict:v,countdown:g,email:i,error:j,handleResend:R,handleSendCode:B,handleVerifyCode:I,isAwaitingCode:"awaiting-code-input"===r||L,isSendingCode:A,isSubmittingCode:L,setCode:f,setEmail:d,showCode:N&&"done"!==r,verify:z}}],313880),e.s(["EmailCodeForm",0,({conflictAction:e,disabled:n=!1,flow:l,footer:s,showCodeView:o})=>o?(0,t.jsxs)("form",{className:"flex w-full flex-col gap-4",onSubmit:l.handleVerifyCode,children:[(0,t.jsxs)("p",{className:"text-center",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-sm",children:"We sent a 6-digit code to"})," ",(0,t.jsx)("span",{className:"text-foreground text-sm font-medium",children:l.email})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-foreground mb-3 text-center text-sm font-medium",children:"Enter verification code"}),(0,t.jsx)(i,{disabled:l.isSubmittingCode,error:l.error??void 0,length:6,onChange:l.setCode,onComplete:l.verify,value:l.code})]}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)("button",{className:"text-muted-foreground hover:text-foreground text-sm underline transition-colors disabled:cursor-not-allowed disabled:opacity-50",disabled:l.countdown>0,onClick:l.handleResend,type:"button",children:l.countdown>0?`Resend code in ${l.countdown}s`:"Resend code"})}),(0,t.jsx)(a.Button,{className:"w-full",isLoading:l.isSubmittingCode,type:"submit",children:"Verify"}),s]}):(0,t.jsxs)("form",{className:"flex w-full flex-col gap-4",onSubmit:l.handleSendCode,children:[(0,t.jsx)(r.Input,{"aria-label":"Email",autoComplete:"email",disabled:n,onChange:e=>l.setEmail(e.target.value),placeholder:"Enter your email",required:!0,className:"!pl-6 !text-base placeholder:!text-gray-700",type:"email",value:l.email}),l.error?(0,t.jsx)("p",{className:"text-destructive text-sm",children:l.error}):null,l.conflict?e:null,(0,t.jsx)(a.Button,{className:"w-full",disabled:n,isLoading:l.isSendingCode,type:"submit",children:"Continue"})]})],526150)},349711,626226,e=>{"use strict";var t=e.i(190898),a=e.i(226201),r=e.i(675467),n=e.i(764760),l=e.i(355152),i=e.i(170752),s=e.i(907265),o=e.i(161208),c=e.i(126734),c=c,d=e.i(97564),u=e.i(459112),m=e.i(578791),x=c,h=e.i(526150),p=e.i(313880);let f=({disabled:e=!1,onAwaitingCode:a,pageName:r})=>{let n,l,{loginWithCode:i,sendCode:o,state:c}=(n=(0,d.useRecordLogin)(),l=(0,d.useRecordLoginFailure)(),(0,x.al)({onComplete(e){n({isNewUser:e.isNewUser,loginMethod:e.loginMethod,pageName:r,userId:e.user?.id,wasAlreadyAuthenticated:e.wasAlreadyAuthenticated})},onError(e){(0,s.captureError)(e),l({error:e,method:"email",pageName:r})}})),{track:f}=(0,u.useAnalytics)(),[g,b]=(0,m.useState)(!1),j=(0,m.useRef)(!1),y=(0,p.useEmailCodeFlow)({onCodeSent:({attempt:e,isResend:t})=>{f("signup-email-code-sent",{attempt:e,is_resend:t,page_name:r})},onCodeSubmitted:({attempt:e,outcome:t})=>{f("signup-email-code-submitted",{attempt:e,outcome:t,page_name:r})},sendCode:e=>(j.current||(j.current=!0,f("signup-method-selected",{method:"email",page_name:r})),o({email:e})),status:c.status,submitCode:e=>i({code:e})});(0,m.useEffect)(()=>{y.isSendingCode&&b(!1)},[y.isSendingCode]);let v=y.showCode&&!g;return(0,m.useEffect)(()=>{a?.(v)},[a,v]),(0,t.jsx)(h.EmailCodeForm,{disabled:e,flow:y,footer:v?(0,t.jsx)("button",{className:"text-muted-foreground hover:text-foreground text-sm transition-colors",onClick:()=>b(!0),type:"button",children:"â Back to login"}):null,showCodeView:v})};var g=e.i(485218),b=e.i(809608),j=c;function y(e){let t=(0,d.useRecordLogin)(),a=(0,d.useRecordLoginFailure)();return(0,j.an)({onComplete(a){t({isNewUser:a.isNewUser,loginMethod:a.loginMethod,pageName:e,userId:a.user?.id,wasAlreadyAuthenticated:a.wasAlreadyAuthenticated})},onError(t){(0,s.captureError)(t),a({error:t,pageName:e})}})}e.s(["useOAuthLoginWithAnalytics",0,y],626226);let v={google:{icon:(0,t.jsxs)("svg",{height:"18",viewBox:"0 0 24 24",width:"18",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",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"})]}),label:"Continue with Google"},twitter:{icon:(0,t.jsx)("svg",{fill:"currentColor",height:"16",viewBox:"0 0 24 24",width:"16",children:(0,t.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),label:"Continue with X"}},w=({disabled:e=!1,pageName:a,provider:r})=>{let{initOAuth:n,state:l}=y(a),{track:i}=(0,u.useAnalytics)(),[s,o]=(0,m.useState)(!1),c=v[r],d=s&&"loading"===l.status;return(0,m.useEffect)(()=>{s&&"loading"!==l.status&&o(!1)},[s,l.status]),(0,t.jsxs)(g.Button,{className:"w-full",disabled:e||s,onClick:()=>{o(!0),i("signup-method-selected",{method:r,page_name:a}),n({provider:r})},variant:"tertiary",children:[d?(0,t.jsx)(b.Spinner,{}):c.icon,c.label]})},N=({disabled:e=!1,onConnect:a})=>(0,t.jsx)("div",{className:"flex justify-center pt-1",children:(0,t.jsx)(g.Button,{className:"!text-gray-700",disabled:e,onClick:a,size:"sm",variant:"subtle",children:"Continue with a wallet"})}),k=({disabled:e=!1,methods:a,pageName:r,title:n})=>{let[x,h]=(0,m.useState)(!1),{loginWithWallet:p}=function(e){let t=(0,d.useRecordLogin)(),a=(0,d.useRecordLoginFailure)(),{generateSiweMessage:r,loginWithSiwe:n}=(0,c.ap)({onComplete(a){t({isNewUser:a.isNewUser,loginMethod:"wallet",pageName:e,userId:a.user?.id,wasAlreadyAuthenticated:a.wasAlreadyAuthenticated})},onError(t){(0,s.captureError)(t),a({error:t,method:"wallet",pageName:e})}}),{connectWallet:l}=(0,o.useConnectWallet)({onError(t){(0,s.captureError)(t),a({error:t,method:"wallet",pageName:e})},async onSuccess({wallet:t}){try{if(!("chainId"in t)||!("sign"in t))throw Error("Connected wallet does not support SIWE signing");let e=t.chainId.startsWith("eip155:")?t.chainId:`eip155:${t.chainId}`,a=await r({address:t.address,chainId:e}),l=await t.sign(a);await n({connectorType:"connectorType"in t?String(t.connectorType):void 0,message:a,signature:l,walletClientType:"walletClientType"in t?String(t.walletClientType):void 0})}catch(t){(0,s.captureError)(t),a({error:t,method:"wallet",pageName:e})}}});return{loginWithWallet:()=>{l({walletChainType:"ethereum-only"})}}}(r),{track:g}=(0,u.useAnalytics)(),b=(0,m.useCallback)(()=>{g("signup-method-selected",{method:"wallet",page_name:r}),p()},[p,r,g]),j=a.filter(e=>"google"===e||"twitter"===e),y=a.includes("wallet"),v=a.includes("email"),k=j.length>0||y,C=(0,m.useCallback)(e=>{h(e)},[]);return(0,t.jsxs)("div",{className:"flex w-full max-w-md flex-col items-center gap-6",children:[(0,t.jsx)(l.Heading,{className:"!text-[24px]",component:"h1",level:4,noNaturalSpacing:!0,children:n}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-6",children:[v?(0,t.jsx)(f,{disabled:e,onAwaitingCode:C,pageName:r}):null,k&&v?(0,t.jsxs)("div",{className:x?"hidden":"flex w-full items-center gap-4",children:[(0,t.jsx)(i.Separator,{className:"flex-1"}),(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"or"}),(0,t.jsx)(i.Separator,{className:"flex-1"})]}):null,(0,t.jsxs)("div",{className:x?"hidden":"flex w-full flex-col gap-4",children:[j.map(a=>(0,t.jsx)(w,{disabled:e,pageName:r,provider:a},a)),y?(0,t.jsx)(N,{disabled:e,onConnect:b}):null]})]})]})},C=["google","twitter","wallet","email"],_=()=>(0,t.jsxs)("p",{className:"text-center text-xs text-gray-700",children:["By continuing you agree to our"," ",(0,t.jsx)("a",{className:"hover:text-foreground underline",href:a.routes.termsOfService,rel:"noopener noreferrer",target:"_blank",children:"Terms"})," ","and"," ",(0,t.jsx)("a",{className:"hover:text-foreground underline",href:a.routes.privacyPolicy,rel:"noopener noreferrer",target:"_blank",children:"Privacy Policy"}),"."]});e.s(["LoginScreen",0,({className:e,disabled:a=!1,hero:l,methods:i=[...C],pageName:s,redirecting:o=!1,title:c="Sign in"})=>(0,t.jsx)(r.AuthShell,{className:e,hero:l,panelFooter:(0,t.jsx)(_,{}),children:o?(0,t.jsx)(n.AuthStatus,{message:"Signing you inâ¦"}):(0,t.jsx)(k,{disabled:a,methods:i,pageName:s,title:c})})],349711)},170752,e=>{"use strict";var t=e.i(190898),a=e.i(578791),r=e.i(495891),n="horizontal",l=["horizontal","vertical"],i=a.forwardRef((e,a)=>{var i;let{decorative:s,orientation:o=n,...c}=e,d=(i=o,l.includes(i))?o:n;return(0,t.jsx)(r.Primitive.div,{"data-orientation":d,...s?{role:"none"}:{"aria-orientation":"vertical"===d?d:void 0,role:"separator"},...c,ref:a})});i.displayName="Separator";var s=e.i(470733);let o=({className:e,decorative:a=!0,orientation:r="horizontal",ref:n,...l})=>(0,t.jsx)(i,{ref:n,className:(0,s.clsx)("shrink-0","horizontal"===r?"h-[1px] w-full border-b":"h-full w-[1px] border-r",e),decorative:a,orientation:r,...l});o.displayName=i.displayName,e.s(["Separator",0,o],170752)},97564,e=>{"use strict";var t=e.i(459112);let a={cannot_link_more_of_type:"conflict",captcha_failure:"captcha",exited_auth_flow:"abandoned",generic_connect_wallet_error:"wallet",invalid_captcha:"captcha",invali
2d_credentials:"credentials",invalid_data:"server",linked_to_another_user:"conflict",provider_error:"wallet",too_many_requests:"rate-limit",user_denied_request:"abandoned",user_exited_auth_flow:"abandoned",wallet_error:"wallet"},r=["user rejected","user cancelled","user canceled","user denied","request rejected"];function n(e){if(null==e)return"";if(e instanceof Error&&e.message)return e.message;if("string"==typeof e)return e;try{return String(e)}catch{return""}}let l=null;e.s(["useRecordLogin",0,function(){let{setUserId:e,setUserProperties:a,track:r}=(0,t.useAnalytics)();return({isNewUser:t,loginMethod:n,pageName:i,userId:s,wasAlreadyAuthenticated:o})=>{var c;let d,u=function({loginMethod:e,userId:t,wasAlreadyAuthenticated:a}){if(!t)return null;let r=function(e){if(e)return"siwe"===e||"wallet"===e?"external":"embedded"}(e);return!0!==a&&e&&r?{attribution:{login_method:e,wallet_type:r},userId:t}:{attribution:null,userId:t}}({loginMethod:n,userId:s,wasAlreadyAuthenticated:o});if(!u)return;e(u.userId);let{attribution:m}=u;m&&(c=`${u.userId}:${m.login_method}`,d=Date.now(),(l?.key!==c||!(d-l.at<1e4))&&(l={at:d,key:c},1)&&(a({initial_login_method:m.login_method,initial_wallet_type:m.wallet_type},{setOnce:!0}),a({...m}),r("wallet-connected",{is_new_user:!!t,loginMethod:m.login_method,page_name:i,wallet_type:m.wallet_type})))}},"useRecordLoginFailure",0,function(){let{track:e}=(0,t.useAnalytics)();return({error:t,method:l,pageName:i})=>{let s,o,{code:c,kind:d}=(s=function(e){let t=function(e){if("object"!=typeof e||null===e)return"";let{privyErrorCode:t}=e;return"string"==typeof t?t:""}(e);if(t)return t;let a=n(e).trim();if(!a)return"";let[r=""]=a.replace(/^[A-Za-z]+Error-/,"").split(/[:\s[]/);return/^[a-z][a-z0-9_]*$/.test(r)?r:""}(t),o=n(t).toLowerCase(),r.some(e=>o.includes(e))?{code:s,kind:"abandoned"}:{code:s,kind:a[s]??"unknown"});e("wallet-connection-failed",{error:n(t),error_code:c,error_kind:d,method:l??"unknown",page_name:i})}}],97564)}]); 3 4//# debugId=d119ec31-bc78-64d5-066a-f5886e0b09e8
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.