1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7854],{8957:(e,t,n)=>{Promise.resolve().then(n.bind(n,17066))},17066:(e,t,n)=>{"use strict";n.d(t,{SignInClient:()=>u});var r=n(95155),i=n(12115),a=n(73321),s=n(33703);function o(){let e=(0,a.useSearchParams)(),t=(0,i.useRef)(!1),[n,o]=(0,i.useState)(null),[u,c]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(t.current)return;t.current=!0;let n=e.get("t");((0,s._)(),window.history.replaceState(null,"","/signin"),n)?(async()=>{try{let e=await fetch("/api/auth/email/verify",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:n})}),t=await e.json().catch(()=>({}));if(e.ok&&!0===t.success){let e="string"==typeof t.return_to&&t.return_to.startsWith("/")&&!t.return_to.startsWith("//")?t.return_to:"/";window.location.replace(e);return}o("string"==typeof t.error?t.error:"This sign-in link isnât valid. Ask for a new one below.")}catch{o("We couldnât sign you in just now. Please check your connection and try again.")}c(!0)})():fetch("/api/auth/session-status",{credentials:"include",cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>e?.signed_in===!0?window.location.replace("/"):c(!0)).catch(()=>c(!0))},[e]),(0,r.jsx)(s.SignInModal,{pending:!u,initialError:n,returnTo:"/",onSignedIn:()=>window.location.replace("/")})}function u(){return(0,r.jsx)(i.Suspense,{fallback:(0,r.jsx)(s.SignInModal,{pending:!0}),children:(0,r.jsx)(o,{})})}},21340:(e,t,n)=>{"use strict";n.d(t,{DR:()=>r.BoldthingsSignIn});var r=n(45975);n(36490)},33703:(e,t,n)=>{"use strict";n.d(t,{SignInModal:()=>c,_:()=>o});var r=n(95155),i=n(12115),a=n(21340);let s="bt-signin-theme";function o(){try{let e=new URLSearchParams(window.location.search).get("theme");if("light"===e||"dark"===e)return sessionStorage.setItem(s,e),e;let t=sessionStorage.getItem(s);if("light"===t||"dark"===t)return t}catch{}}async function u(e,t){let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));return{ok:n.ok,data:r}}function c({onSignedIn:e,returnTo:t,initialError:n=null,pending:s=!1}){let[l,d]=(0,i.useState)(void 0);(0,i.useEffect)(()=>{let e=o();d(e),e&&document.documentElement.setAttribute("data-bt-signin-theme",e)},[]);let h=async e=>{let{ok:n,data:r}=await u("/api/auth/email/request",{email:e,return_to:t});return n?{ok:!0}:{ok:!1,error:"string"==typeof r.error?r.error:"We couldnât send the email just now. Please try again."}},g=async(e,t)=>{let{ok:n,data:r}=await u("/api/auth/email/verify",{email:e,code:t});return n&&!0===r.success?{ok:!0}:{ok:!1,error:"string"==typeof r.error?r.error:"That code isnât right. Check the latest email and try again."}};return(0,r.jsx)(a.DR,{kicker:"Client login",headline:["Welcome","back."],signingText:"Opening your dashboard.",requestLink:h,verifyCode:g,onSignedIn:e,initialError:n,pending:s,theme:l})}},73321:(e,t,n)=>{"use strict";var r=n(74645);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})}},e=>{e.O(0,[2055,6490,8441,3794,7358],()=>e(e.s=8957)),_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.