PageSourceSearch

https://www.healthdirect.gov.au/account/_next/static/chunks/pages/…/change-email/new-email-8b6dc8566bdfa547.js

js healthdirect.gov.au collected 2026-10-01 08:30:38 UTC 3,908 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3444],{8746:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/settings/change-email/new-email",function(){return c(4005)}])},4005:function(a,b,c){"use strict";c.r(b);var d=c(4051),e=c.n(d),f=c(5893),g=c(8527),h=c(5193),i=c(9305),j=c(8164),k=c(2296),l=c(1163),m=c(7294),n=c(7536),o=c(5509),p=c(8821),q=c(5320),r=c(4291);function s(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(j){c(j);return}h.done?b(i):Promise.resolve(i).then(d,e)}var t=function(){var a,b,c=(0,l.useRouter)(),d=c.back,k=c.push,t=(0,n.cI)({criteriaMode:"all",mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,shouldUseNativeValidation:!1}),u=t.register,v=t.control,w=t.setError,x=t.formState,y=x.isSubmitting,z=x.errors,A=(a=e().mark(function a(b){var c,d,f;return e().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return c=b.email,a.next=3,(0,i.B)(c);case 3:if(!((d=a.sent)&&d.usernameExists)){a.next=8;break}w("email",{type:"isValid"}),a.next=13;break;case 8:if(!(d&&!d.usernameExists)){a.next=13;break}return a.next=11,(0,p.Uk)(c);case 11:(f=a.sent).status&&k("".concat(o.Z.WUA.Profile.EmailConfirmationCode,"?newEmail=").concat(c));case 13:case"end":return a.stop()}},a)}),b=function(){var b=this,c=arguments;return new Promise(function(d,e){var f=a.apply(b,c);function g(a){s(f,d,e,g,h,"next",a)}function h(a){s(f,d,e,g,h,"throw",a)}g(void 0)})},function(a){return b.apply(this,arguments)}),B=(0,m.useMemo)(function(){return{email:{isRequired:function(a){return a.length>0||"Email is required"},isValid:function(a){return r.G.isValid(a)||q.V.InvalidEmailFormat}}}},[]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(g.X6,{as:"h1",variant:"h1",children:"Enter new email"}),(0,f.jsx)(j.VH,{useFormReturn:t,submitHandler:A,children:(0,f.jsxs)(j.WV,{children:[(0,f.jsx)(j.LB,{id:"email",name:"email",label:"New email",defaultValue:"",control:v,errors:z.email,register:u,autoComplete:"email",validator:B.email}),(0,f.jsx)(g.xv,{children:"We’ll send you a confirmation code to your new email"}),(0,f.jsxs)(g.kC,{direction:"column",gridGap:2,children:[(0,f.jsx)(h.zx,{type:"submit",isLoading:y,children:"Continue"}),(0,f.jsx)(h.zx,{onClick:d,variant:"ghost",children:"Back"})]})]})}),(0,f.jsx)(g.X6,{as:"h2",variant:"h2",children:"Help"}),(0,f.jsx)(g.xv,{children:"Help us keep your account secure:"}),(0,f.jsxs)(g.QI,{children:[(0,f.jsx)(g.HC,{children:"Keep your account details private."}),(0,f.jsx)(g.HC,{children:"Do not use a shared email."})]})]})};t.getLayout=k.$U,b.default=t},9305:function(a,b,c){"use strict";c.d(b,{B:function(){return i}});var d=c(4051),e=c.n(d);function f(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(j){c(j);return}h.done?b(i):Promise.resolve(i).then(d,e)}var g,h,i=(g=e().mark(function a(b){var c,d,f,g,h,i,j,k;return e().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return c="https://prd.uim.hda-online.com.au/",d={data:{type:"lookup-username",attributes:{username:b}}},a.prev=2,a.next=5,fetch("".concat(c,"/auth/lookup-username"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)});case 5:return f=a.sent,a.next=8,f.json();case 8:if(h=(g=a.sent).data,i=g.errors,!(200===f.status&&h)){a.next=16;break}return a.abrupt("return",{success:!0,usernameExists:null==h?void 0:null===(j=h.attributes)|| void 0===j?void 0:j.usernameExists});case 16:if(!(i&&i[0])){a.next=19;break}return k=i[0].title,a.abrupt("return",{success:!1,message:k});case 19:a.next=24;break;case 21:a.prev=21,a.t0=a.catch(2),console.log(a.t0);case 24:case"end":return a.stop()}},a,null,[[2,21]])}),h=function(){var a=this,b=arguments;return new Promise(function(c,d){var e=g.apply(a,b);function h(a){f(e,c,d,h,i,"next",a)}function i(a){f(e,c,d,h,i,"throw",a)}h(void 0)})},function(a){return h.apply(this,arguments)})}},function(a){a.O(0,[9774,2888,179],function(){return a(a.s=8746)}),_N_E=a.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.