1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2626],{5380:function(e,t,n){Promise.resolve().then(n.bind(n,8991))},9376:function(e,t,n){"use strict";var a=n(5475);n.o(a,"usePathname")&&n.d(t,{usePathname:function(){return a.usePathname}}),n.o(a,"useRouter")&&n.d(t,{useRouter:function(){return a.useRouter}}),n.o(a,"useSearchParams")&&n.d(t,{useSearchParams:function(){return a.useSearchParams}})},8991:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return f}});var a=n(7437),s=n(2265),o=n(6634),r=n(9376),i=n(7648),u=n(8026),l=n(6988),c=n(6953),d=n(3793);function h(){let e=(0,r.useRouter)(),t=(0,r.useSearchParams)(),n=(0,u.G)(t.get("next")),h=t.get("reason"),[f,g]=(0,s.useState)(""),[m,p]=(0,s.useState)(""),[x,b]=(0,s.useState)(!1),[S,w]=(0,s.useState)("");async function v(t){t.preventDefault(),b(!0),w("");let{error:a}=await o.O.auth.signInWithPassword({email:f,password:m});a?(w((0,c.A)(a.message,"signin")),b(!1)):(e.push(n),e.refresh())}async function j(){b(!0),w("");let e=new URL("/auth/callback",window.location.origin);"/"!==n&&e.searchParams.set("next",n);let{error:t}=await o.O.auth.signInWithOAuth({provider:"google",options:{redirectTo:e.toString()}});t&&(w((0,c.A)(t.message,"signin")),b(!1))}let k="session_expired"===h?"Your session ended. Sign in again to continue.":"save"===h?"Sign in to save stories. You'll come straight back to where you were.":"/bookmarks"===n?"Sign in to see the stories you saved.":"/account"===n?"Sign in to manage your account.":null;return(0,a.jsxs)(d.Bq,{children:[(0,a.jsx)(d.l3,{title:"Sign in",lede:"Welcome back to Updat3."}),k?(0,a.jsx)("p",{className:"u3-inline-alert",role:"status","data-testid":"login-notice",style:{borderLeftColor:"var(--u3-accent)",margin:"-8px 0 20px"},children:k}):null,(0,a.jsx)(d.VL,{onClick:j,disabled:x}),(0,a.jsx)(d.$s,{}),(0,a.jsxs)("form",{onSubmit:v,children:[(0,a.jsx)(d.Ye,{id:"login-email",label:"Email",type:"email",value:f,onChange:e=>g(e.target.value),placeholder:"[email protected]",required:!0,autoComplete:"email",inputMode:"email"}),(0,a.jsx)(d.ZI,{id:"login-password",label:"Password",value:m,onChange:e=>p(e.target.value),required:!0,autoComplete:"current-password",labelAside:(0,a.jsx)(i.default,{href:"/forgot-password",className:"u3-link",style:{fontSize:13},children:"Forgot password?"})}),(0,a.jsx)(d.l4,{message:S}),(0,a.jsx)("button",{type:"submit",className:"u3-btn is-block is-lg",disabled:x,"aria-busy":x,children:x?"Signing inâ¦":"Sign in"})]}),(0,a.jsxs)("p",{className:"u3-auth-alt",children:["New to Updat3?"," ",(0,a.jsx)(i.default,{href:(0,l.Z3)("/signup",{from:"login",next:n,reason:h}),className:"u3-link","data-testid":"login-to-signup",children:"Create a free account"})]})]})}function f(){return(0,a.jsx)(s.Suspense,{fallback:null,children:(0,a.jsx)(h,{})})}},6988:function(e,t,n){"use strict";n.d(t,{Z3:function(){return o},fq:function(){return s},sC:function(){return r}});var a=n(8026);function s(e){let t=(0,a.G)(e.next);return e.signedIn&&!1===e.hasPreferences?"/"===t?"/account?welcome=1":"/account?welcome=1&next=".concat(encodeURIComponent(t)):t}function o(e,t){var n;let s=new URLSearchParams;t.from&&s.set("from",t.from);let o=(0,a.G)(null!==(n=t.next)&&void 0!==n?n:"");"/"!==o&&s.set("next",o),"save"===t.reason&&s.set("reason","save");let r=s.toString();return r?"".concat(e,"?").concat(r):e}function r(e,t){let n=(0,a.G)(null!=t?t:""),s="/"===n?"":n;return"".concat(e,"/auth/callback").concat(s?"?next=".concat(encodeURIComponent(s)):"")}},8026:function(e,t,n){"use strict";function a(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";if("string"!=typeof e||0===e.length||/[\u0000-\u001F\u007F]/.test(e)||!e.startsWith("/")||e.startsWith("//")||e.length>2048)return n;let a="http://localhost";try{t=new URL(e,a)}catch(e){return n}return t.origin!==a?n:t.pathname+t.search+t.hash}n.d(t,{G:function(){return a}})}},function(e){e.O(0,[7782,2972,7312,2971,2117,1744],function(){return e(e.s=5380)}),_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.