1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1056],{2421:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var r=i(37876),n=i(14232),o=i(90246),l=i(57464),s=i(85351);let u="#00bfff",d=()=>{let e=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!e.current)return;let t=function(e){try{let t=new s.JeP({antialias:!0});return t.setSize(e.clientWidth,e.clientHeight),e.appendChild(t.domElement),t}catch{return null}}(e.current);if(!t)return;let i=new l.Z58;i.background=new l.Q1f("#060427");let r=new l.ubm(50,e.current.clientWidth/e.current.clientHeight,1,500);r.position.set(-40,0,50),r.lookAt(i.position);let n=function(){let e=new l.bdM(100,100,100,100),t=new l.YJl,i=e.attributes.position.array,r=e.parameters.widthSegments,n=e.parameters.heightSegments;for(let e=0;e<=r;e++){let o=[];for(let t=0;t<=n;t++){let n=(t*(r+1)+e)*3,s=new l.Pq0(i[n],i[n+1],i[n+2]);o.push(s)}let s=new l.LoY().setFromPoints(o),d=new l.mrM({color:new l.Q1f(u),opacity:.7,transparent:!0,blending:l.NTi,depthTest:!1}),a=new l.N1A(s,d);a.userData={originalPoints:o.slice()},t.add(a)}return e.dispose(),t}();n.rotation.set(-Math.PI/6,0,Math.PI/20),i.add(n);let d=null,a=new l.Pq0(100,0,50),c=new l.Q1f("#030a14"),p=new l.Q1f(u),h=(0,o.Cf)(),x=new l.M4G;x.connect(document);let g=e=>{d=requestAnimationFrame(g),x.update(e);let o=.25*x.getElapsed();for(let[e,t]of n.children.entries()){let i=t.userData.originalPoints.map((t,i)=>{let r=h(.06*t.x,.06*t.y,o+.05*e)*(e/40+30/(e+3));return new l.Pq0(t.x,t.y,r)});t.geometry.setFromPoints(i);let r=Math.floor(i.length/2),s=i[r].clone().applyMatrix4(n.matrixWorld).distanceTo(a),u=l.cj9.clamp(l.cj9.mapLinear(s,80,200,1,0),0,1);t.material.color.set(c.clone().lerp(p,u))}t.render(i,r)},m=()=>{null===d&&(d=requestAnimationFrame(g))},b=()=>{null!==d&&(cancelAnimationFrame(d),d=null)},w=new IntersectionObserver(e=>{let[t]=e;t.isIntersecting?m():b()},{threshold:0});w.observe(e.current);let f=()=>{if(e.current){let i=e.current.clientWidth,n=e.current.clientHeight;r.aspect=i/n,r.updateProjectionMatrix(),t.setSize(i,n)}};return window.addEventListener("resize",f),()=>{for(let e of(b(),w.disconnect(),window.removeEventListener("resize",f),x.disconnect(),n.children))e.geometry.dispose(),e.material.dispose();t.domElement.remove(),t.dispose()}},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:e,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0}}),(0,r.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:1,background:"linear-gradient(258.1deg, rgba(10, 7, 66, 0) 27.42%, rgba(10, 7, 66, 0.815) 73.41%, #060427 91.3%)"}})]})}},5183:(e,t,i)=>{"use strict";i.r(t),i.d(t,{__N_SSG:()=>j,default:()=>O});var r=i(37876),n=i(7957),o=i(99674),l=i(46061),s=i(47737),u=i(77321),d=i(40762),a=i(89099),c=i(14232),p=i(42252),h=i(15526),x=i(46425),g=i(38709),m=i(51733),b=i(11235),w=i(92474),f=i(38416);let M=()=>{let{t:e}=(0,u.Bd)(),t=(0,a.useRouter)(),{state:{profile:i,lastChecked:M}}=(0,x.A)(),[E,j]=(0,c.useState)(""),[O,I]=(0,c.useState)({password:""}),[A,y]=(0,c.useState)({password:""}),[v,F]=(0,c.useState)(""),[_,k]=(0,c.useState)(!1),C={},B=(0,p.I)({enabled:t.isReady&&!!t.query.token,queryKey:["auth","change_email",t.query.token],queryFn:()=>b.Ay.get((0,f.c$)("/user/change_email",{token:t.query.token})),refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:!1,onSuccess:e=>{console.log("EC code is valid"),j(e.data.new_email)},onError:e=>{var t,i,r;let n=null==(r=e.response)||null==(i=r.data)||null==(t=i.detail)?void 0:t.error;console.log("EC code is invalid"),console.log(n)}}),S=(0,h.n)({mutationFn:e=>{let{token:t,password:i}=e;return b.Ay.post("/user/change_email",{token:t,password:i},{skipUnauthorizedLogout:!0})},onError:t=>{var i,r,n;let o=null==(i=t.response)?void 0:i.status,l=(0,w.A)(null==(n=t.response)||null==(r=n.data)?void 0:r.detail,e("pages.auth.errors.unexpected"));401===o?y(e=>({...e,password:l})):422===o?y(t=>({...t,password:e("pages.auth.errors.field_is_required")})):((404===o||409===o)&&k(!0),F(l))}}),W=Object.values(A).some(e=>!!e),D=null!=M&&null!=i?"/dash":"/login";return(0,r.jsxs)(g.A,{title:e("pages.auth.change_email.title"),description:B.isError||_?"":e("pages.auth.change_email.description"),error:B.isError||_,errorContent:_?(0,r.jsx)(u.x6,{i18nKey:"pages.auth.change_email.terminal_error",values:{message:v},components:{continue_link:(0,r.jsx)(d.A,{href:D,underline:"always",color:"inherit"})}}):e("pages.auth.change_email.bad_code"),success:B.isSuccess&&S.isSuccess,successContent:(0,r.jsx)(u.x6,{i18nKey:"pages.auth.change_email.success",components:{continue_link:(0,r.jsx)(d.A,{href:D,underline:"always",color:"inherit"})}}),children:[(B.isFetching||S.isLoading)&&(0,r.jsx)(n.A,{}),B.isSuccess&&!_&&!S.isLoading&&!S.isSuccess&&(0,r.jsxs)(o.A,{component:"form",onSubmit:i=>{if(i.preventDefault(),Object.values(A).some(e=>!!e))return;F("");let r=["password"],n={},o=!1;for(let t=0;t<r.length;++t){let i=r[t];O[i]||(o=!0,n[i]=e("pages.auth.errors.field_is_required"))}o?y(e=>({...e,...n})):(console.log("tracking email change password click"),S.mutate({token:t.query.token,password:O.password}))},sx:{mt:2},children:[(0,r.jsx)(m.F0,{name:"email",sx:{width:"100%"},label:e("pages.auth.change_email.label_new_email"),value:E,disabled:!0}),(0,r.jsx)(m.F0,{sx:{width:"100%",mt:2},name:"password",label:e("pages.auth.change_email.label_password"),value:O.password,onChange:t=>{let{name:i,value:r}=t.target,n=r&&C.hasOwnProperty(i)?C[i](r,e):"",o={};o[i]=r;let l={};l[i]=n,I(e=>({...e,...o}
1)),y(e=>({...e,...l}))},error:!!A.password,helperText:A.password,disabled:S.isLoading,type:"password",autoComplete:"current-password"}),!!v&&(0,r.jsx)(l.A,{severity:"error",sx:{mt:2},children:v}),(0,r.jsx)(s.A,{variant:"contained",type:"submit",disabled:S.isLoading||W,fullWidth:!0,sx:{mt:4},children:(0,r.jsx)(u.x6,{i18nKey:"pages.auth.change_email.button"})})]})]})};var E=i(78397),j=!0;function O(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.p,{title:"Change Email | DeepInfra",canonical:"/auth/change_email"}),(0,r.jsx)(M,{})]})}},19368:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/change_email",function(){return i(5183)}])},38709:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var r=i(37876),n=i(99674),o=i(86650),l=i(2799),s=i(49794),u=i(46061),d=i(54587),a=i.n(d);let c={src:"/_next/static/media/logo_dark.32f4ffff.svg",height:30,width:28,blurWidth:0,blurHeight:0};var p=i(2421);let h=e=>{let{title:t,description:i,error:d,errorContent:h,success:x,successContent:g,children:m,hideLogo:b,wide:w}=e;return(0,r.jsxs)(n.A,{sx:e=>({position:"relative",backgroundSize:"cover",pt:26,pb:"250px",[e.breakpoints.down("md")]:{pt:24}}),children:[(0,r.jsx)(p.A,{}),(0,r.jsx)(o.A,{component:"main",sx:e=>w?{[e.breakpoints.between("xs","lg")]:{maxWidth:"428px",padding:0},[e.breakpoints.up("lg")]:{maxWidth:"946px",padding:0},boxSizing:"border-box"}:{[e.breakpoints.up("xs")]:{maxWidth:"428px",padding:0},boxSizing:"border-box"},children:(0,r.jsxs)(l.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",px:4,py:4,backgroundColor:"#040320",backgroundImage:"radial-gradient(102.26% 108.23% at 51.5% -4.73%, rgba(125, 138, 255, 0.2) 0%, rgba(125, 138, 255, 0) 100%)",scrollbarColor:"#23262d transparent",border:"1px solid #EBEEF24D",borderRadius:"16px",color:"white",position:"relative",zIndex:1},children:[null!==b&&!b&&(0,r.jsx)(n.A,{children:(0,r.jsx)(a(),{src:c,alt:"Logo",height:60})}),t&&(0,r.jsx)(s.A,{align:"center",fontWeight:"600",fontSize:"30px",lineHeight:"38px",mt:3,children:t}),i&&(0,r.jsx)(s.A,{align:"center",mt:4,children:i}),m,d&&(0,r.jsx)(u.A,{sx:{width:"100%",mt:4},severity:"error",children:h}),x&&(0,r.jsx)(u.A,{sx:{width:"100%",mt:4},severity:"success",children:g})]})})]})}},51733:(e,t,i)=>{"use strict";i.d(t,{F0:()=>A,Sq:()=>_,ks:()=>y,m6:()=>k,pj:()=>C,rw:()=>v,vk:()=>F});var r=i(37876),n=i(14232),o=i(49794),l=i(99674),s=i(11502),u=i(65774),d=i(68284),a=i(88713),c=i(75570),p=i(59017),h=i(66120),x=i(6003),g=i(46503),m=i(35656),b=i(75548),w=i(30929),f=i(7957),M=i(22474),E=i(71538);let j=e=>(0,r.jsx)(o.A,{component:"span",fontSize:"14px",lineHeight:"20px",fontWeight:400,...e}),O=e=>{let{inputId:t,label:i,...n}=e;return(0,r.jsx)(l.A,{mb:1,children:(0,r.jsx)(s.A,{htmlFor:t,sx:{color:"white","& .MuiFormLabel-asterisk":{color:"error.light"}},...n,children:(0,r.jsx)(j,{children:i})})})},I=e=>{let{error:t,helperText:i}=e;return(0,r.jsx)(u.A,{error:t,sx:{ml:2},children:i})},A=e=>{let{sx:t,...i}=e;return(0,r.jsx)(d.A,{sx:{mt:1,width:"100%","& .MuiOutlinedInput-root":{color:"white",fontWeight:400},"& .MuiInputBase-input.Mui-disabled":{WebkitTextFillColor:"#EBEEF24D"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},"& .MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"red"},"& .MuiFormHelperText-root":{color:"#EBEEF24D"},"& .MuiFormHelperText-root.Mui-error":{color:"red"},...t},inputProps:{style:{fontSize:"20px",lineHeight:"24px",fontWeight:400,paddingTop:"12px",paddingBottom:"12px"}},InputLabelProps:{style:{color:"white"}},...i})},y=e=>{let{id:t,label:i,maxLength:n,required:o,sx:s,inputProps:u,...c}=e,p=t+"Label";return(0,r.jsx)(l.A,{sx:{width:"100%",mt:1},children:(0,r.jsxs)(a.A,{sx:{width:"100%"},children:[(0,r.jsx)(O,{id:p,inputId:t,label:i,required:o}),(0,r.jsx)(d.A,{id:t,"aria-labelledby":p,required:o,sx:{width:"100%","& .MuiOutlinedInput-root":{color:"white",fontWeight:400},"& .MuiInputBase-input.Mui-disabled":{WebkitTextFillColor:"#EBEEF24D"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},"& .MuiFormHelperText-root":{color:"#EBEEF24D"},"& .MuiFormHelperText-root.Mui-error":{color:"red"},...s},inputProps:{maxLength:n,...u,style:{fontSize:"14px",lineHeight:"20px",fontWeight:400,paddingTop:(null==c?void 0:c.multiline)?0:"12px",paddingBottom:(null==c?void 0:c.multiline)?0:"12px",...null==u?void 0:u.style}},InputLabelProps:{style:{color:"white"}},...c})]})})},v=e=>{let{id:t,label:i,required:o,sx:s,...u}=e,h=t+"Label";return(0,r.jsx)(l.A,{sx:{width:"100%",mt:1},children:(0,r.jsxs)(a.A,{sx:{width:"100%"},children:[(0,r.jsx)(O,{id:h,inputId:t,label:i,required:o}),(0,r.jsx)(c.A,{id:t,sx:{width:"100%","& .MuiInputBase-root":{height:"44px",py:0},"& .MuiOutlinedInput-root":{color:"white",fontWeight:400},"& .MuiInputBase-input.Mui-disabled":{WebkitTextFillColor:"#EBEEF24D"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},...s},getOptionLabel:e=>e,renderOption:(e,t)=>(0,n.createElement)("li",{...e,key:t},t),renderInput:e=>(0,r.jsx)(d.A,{...e,required:o}),renderTags:(e,t)=>e.map((e,i)=>(0,n.createElement)(p.A,{...t({index:i}),key:e,label:e})),...u})]})})},F=e=>{let{id:t,label:i,values:n,error:s,helperText:u,sx:d,...c}=e,p=t+"Label";return(0,r.jsx)(l.A,{sx:{width:"100%",mt:1},children:(0,r.jsxs)(a.A,{sx:{width:"100%",height:"44px","& .MuiFormLabel-root":{color:"white",fontWeight:400}},children:[(0,r.jsx)(O,{id:p,label:i}
1),(0,r.jsx)(h.A,{id:t,sx:{width:"100%",height:"44px","&.MuiInputBase-root":{height:"44px",py:0},"&.MuiOutlinedInput-root":{color:"white",fontWeight:400},"& .MuiInputBase-input.Mui-disabled":{WebkitTextFillColor:"#EBEEF24D"},"&.MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},"&.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"&.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"white"},"&.MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#EBEEF24D"},...d},"aria-labelledby":p,error:s,...c,children:n.map((e,t)=>(0,r.jsx)(x.A,{value:e,children:(0,r.jsx)(o.A,{fontSize:"14px",lineHeight:"20px",fontWeight:400,children:e})},e))}),(0,r.jsx)(I,{error:s,helperText:u})]})})},_=e=>{let{id:t,label:i,values:n,error:o,helperText:s,disabled:u,...d}=e;return(0,r.jsx)(l.A,{sx:{width:"100%",mt:1},children:(0,r.jsxs)(a.A,{sx:{width:"100%"},children:[(0,r.jsx)(g.A,{id:t,row:!0,...d,children:n.map((e,t)=>(0,r.jsx)(m.A,{value:e,control:(0,r.jsx)(b.A,{sx:{color:"#EBEEF24D","&.Mui-checked":{color:"white"}}}),disabled:u,label:(0,r.jsx)(j,{sx:{display:"inline-block",marginTop:"2px"},children:e})},e))}),(0,r.jsx)(I,{error:o,helperText:s})]})})},k=e=>(0,r.jsx)(w.A,{sx:{backgroundColor:"#050624D0",zIndex:e=>e.zIndex.drawer+1,position:"absolute"},...e,children:(0,r.jsx)(f.A,{})}),C=e=>{let{children:t}=e;return(0,r.jsxs)(M.A,{direction:"row",justifyContent:"center",alignItems:"center",sx:{width:"100%"},mt:2,mb:1,children:[(0,r.jsx)(E.A,{sx:{flexGrow:1,borderColor:"#EBEEF266"}}),t,(0,r.jsx)(E.A,{sx:{flexGrow:1,borderColor:"#EBEEF266"}})]})}},92474:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});let r=(e,t)=>"string"==typeof e?e:"object"==typeof e&&null!=e&&"string"==typeof e.error?e.error:Array.isArray(e)&&e.map(e=>"object"==typeof e&&(null==e?void 0:e.msg)).filter(Boolean).join("\n")||(null!=t?t:"Something went wrong")}},e=>{var t=t=>e(e.s=t);e.O(0,[5334,7391,3926,2252,5570,8499,5929,636,6593,8792],()=>t(19368)),_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.