1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="9dc0523e-cd15-41cb-b212-558d442d5ca2",e._sentryDebugIdIdentifier="sentry-dbid-9dc0523e-cd15-41cb-b212-558d442d5ca2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4384],{37706:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/login",function(){return t(89382)}])},89382:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>C});var r=t(74348),n=t(89351),i=t.n(n),s=t(8458),a=t(16593),c=t(87206),u=t(95708),d=t(4219),o=t(23879),m=t(72479),f=t(29863),p=t(6516),h=t(91018),b=t(50148),g=t(58644),w=t(85670),y=t(53687),x=t(62692),N=t(4134),_=t(14485),v=t(20833),k=t(84711),Y=t(43895);let A=g.Ik({email:Y.y4,password:Y.$w}),C=()=>{let{methods:e,onSubmit:l,disableAllButtons:t,showPrimaryLoading:n,isLoadingGoogle:g,isLoadingApple:Y,handleGoogleLogin:C,handleAppleLogin:E,handleForgotPasswordClick:T,handleNavigateToRegister:L,showRegisteredEmailNotice:D}=function(){let e=(0,h.useRouter)(),{setErrorContent:l}=(0,k.useToast)(),{isRedirecting:t,isCreatingWorkspace:r}=(0,y.A)(),{loginWithEmailAndPassword:n,googleLogin:i,appleLogin:a}=(0,w.A)(),{logServerEvent:c}=(0,x.P)(),u=(0,s.mN)({mode:"onChange",resolver:(0,p.u)(A)}),d=(0,b.useRef)(!1),[o,m]=(0,b.useState)(null),{setValue:f}=u;(0,b.useEffect)(()=>{let e=(0,_.a)();e&&(f("email",e.email,{shouldValidate:!0}),m(e.email))},[f]);let g=null!==o&&u.watch("email")===o,Y=u.handleSubmit(async e=>{if(!d.current){d.current=!0,c({type:"userAction",eventName:"10_login_click",provider:"email"});try{await n(e.email,e.password)}catch(e){l({title:"ãã°ã¤ã³ã«å¤±æãã¾ãããã¡ã¼ã«ã¢ãã¬ã¹ã¨ãã¹ã¯ã¼ããå度ã確èªãã ããã",description:""})}finally{d.current=!1}}}),[C,E]=(0,b.useState)(null),T=(0,b.useRef)(!1),L=(0,b.useRef)(null),D=(0,b.useRef)(!1);(0,b.useEffect)(()=>{if(!C||(0,v.xL)())return;let e=()=>{T.current||(L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{T.current||null===C||(T.current=!0,E(null),l((0,v.yV)(C)))},1e3))};return window.addEventListener("focus",e),()=>{window.removeEventListener("focus",e),L.current&&(clearTimeout(L.current),L.current=null)}},[C,l]),(0,b.useEffect)(()=>{let e=e=>{e.persisted&&(D.current=!1,T.current=!1,E(null))};return window.addEventListener("pageshow",e),()=>window.removeEventListener("pageshow",e)},[]);let I=(0,b.useCallback)(async(e,t)=>{if(D.current)return;D.current=!0;let r=!1;try{c({type:"userAction",eventName:"10_login_click",provider:e}),T.current=!1,E(e);let l=await t();r="redirecting"===l.status}catch(t){T.current||(T.current=!0,l((0,v.tF)(t)?(0,v.yV)(e):{title:"".concat((0,v.T0)(e),"ãã°ã¤ã³ã«å¤±æãã¾ãã"),description:(0,N.H4)(t)}))}finally{r||(E(null),D.current=!1)}},[c,l]),S=(0,b.useCallback)(()=>I("google",i),[i,I]),F=(0,b.useCallback)(()=>I("apple",a),[a,I]),R=null!==C,z=u.formState.isSubmitting||t||r,G=z||R,O=z&&!R,P=(0,b.useCallback)(()=>{c({type:"userAction",eventName:"login_click_forgot_password"})},[c]),V=(0,b.useCallback)(()=>{c({type:"userAction",eventName:"login_click_register"}),e.push("/auth/register")},[c,e]);return(0,b.useMemo)(()=>({methods:u,onSubmit:Y,disableAllButtons:G,showPrimaryLoading:O,isLoadingGoogle:"google"===C,isLoadingApple:"apple"===C,handleGoogleLogin:S,handleAppleLogin:F,handleForgotPasswordClick:P,handleNavigateToRegister:V,showRegisteredEmailNotice:g}),[u,Y,G,O,C,S,F,P,V,g])}();return(0,r.Y)(r.FK,{children:(0,r.FD)(m.z,{children:[(0,r.Y)("div",{className:"flex flex-col justify-center items-center mb-8 md:mb-12 gap-4",children:(0,r.Y)(o.Ay,{})}),(0,r.Y)(s.Op,{...e,children:(0,r.Y)("form",{onSubmit:l,className:"flex flex-col items-center",children:(0,r.FD)("div",{className:"w-full flex flex-col items-center max-w-[360px]",children:[D&&(0,r.Y)("div",{role:"status",className:"w-full mb-4 rounded-md bg-primary/5 px-3 py-2 text-sm text-primary",children:"ãã®ã¡ã¼ã«ã¢ãã¬ã¹ã¯ç»é²æ¸ã¿ã§ãããã¹ã¯ã¼ããã¾ã㯠Google / Apple ã¢ã«ã¦ã³ãã§ãã°ã¤ã³ãã¦ãã ããã"}),(0,r.Y)(c.A,{label:!0,className:"mb-4 text-sm"}),(0,r.Y)(u.A,{label:!0,className:"mb-6 md:mb-8"}),(0,r.Y)(a.A,{isLoading:n,type:"submit",className:"w-full",size:"xl",disabled:t,children:"ãã°ã¤ã³"})]})})}),(0,r.Y)("div",{className:"mt-2 flex flex-col items-center",children:(0,r.Y)(f.$,{variant:"link",size:"sm",className:"text-sm text-muted-foreground",asChild:!0,disabled:t,onClick:T,children:(0,r.Y)(i(),{href:"/auth/reset-password/request",children:"ãã¹ã¯ã¼ãããå¿ãã®æ¹"})})}),(0,r.Y)("div",{className:"h-8"}),(0,r.FD)("div",{className:"flex flex-col items-center gap-4",children:[(0,r.Y)(d.A,{onClick:C,icon:"Google",className:"max-w-[360px]",loading:g,disabled:t,children:"ã¢ã«ã¦ã³ãã§ãã°ã¤ã³"}),(0,r.Y)(d.A,{onClick:E,icon:"Apple",className:"max-w-[360px]",loading:Y,disabled:t,children:"ã¢ã«ã¦ã³ãã§ãã°ã¤ã³"})]}),(0,r.Y)("div",{className:"mt-4 flex flex-col items-center",children:(0,r.Y)(f.$,{variant:"link",size:"lg",className:"text-sm font-bold text-primary md:text-base",asChild:!0,disabled:t,onClick:L,children:(0,r.Y)(i(),{href:"/auth/register",children:"æ°è¦ç»é²ã¯ãã¡ã"})})})]})})}}},e=>{var l=l=>e(e.s=l);e.O(0,[4567,5331,5007,636,6593,8792],()=>l(37706)),_N_E=e.O()}]);
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.