(self.webpackChunkhws_provider_authentication=self.webpackChunkhws_provider_authentication||[]).push([[49],{898:function(e,t,n){"use strict";n.d(t,{A:function(){return g}});var r=n(8168),a=n(8587),s=n(9434),o=n(4164),i=n(5659),l=n(9262),d=n(6323),c=n(8413),u=n(1609);function m(e){return(0,u.Ay)("MuiCardContent",e)}(0,c.A)("MuiCardContent",["root"]);var f=n(8757);let A=["className","component"],h=e=>{let{classes:t}=e;return(0,i.A)({root:["root"]},m,t)},x=(0,l.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var g=s.forwardRef(function(e,t){let n=(0,d.A)({props:e,name:"MuiCardContent"}),{className:s,component:i="div"}=n,l=(0,a.A)(n,A),c=(0,r.A)({},n,{component:i}),u=h(c);return(0,f.jsx)(x,(0,r.A)({as:i,className:(0,o.A)(u.root,s),ownerState:c,ref:t},l))})},1500:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(8804),a=n(9071),s=n(1256),o=n(2166);let i=(0,n(8413).A)("MuiBox",["root"]),l=(0,s.A)();var d=(0,r.createBox)({themeId:o.A,defaultTheme:l,defaultClassName:i.root,generateClassName:a.A.generate})},2049:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return f}});var r=n(8757),a=n(5793),s=n(898),o=n(7868),i=n(4585),l=n(1500),d=n(9434),c=n(7921),u=function(){let{resetEmail:e}=(0,c.A)(),[t]=(0,a.useSearchParams)(),n=t.get("token"),[s,o]=(0,d.useState)(!1),[l,u]=(0,d.useState)(!0),m=e=>window?.HWS?.I18n?.t(e)??e;return((0,d.useEffect)(()=>{(async()=>{if(!n){o(!1),u(!1);return}u(!0);try{if(e){let t=await e(n);o(!!t?.Success)}else o(!1)}catch{o(!1)}u(!1)})()},[n,e]),l)?(0,r.jsx)(i.A,{children:m("HWS_PROVIDER_AUTHENTICATION_LOADING")}):n?(0,r.jsx)(r.Fragment,{children:s?(0,r.jsx)(i.A,{children:m("HWS_PROVIDER_AUTHENTICATION_YOUR_EMAIL_ADDRESS_CHANGE_SUCCESSFULLY")}):(0,r.jsx)(i.A,{children:m("HWS_PROVIDER_AUTHENTICATION_CHANGING_EMAIL_ADDRESS_FAILED")})}):(0,r.jsx)(i.A,{children:m("HWS_PROVIDER_AUTHENTICATION_CHANGING_EMAIL_ADDRESS_FAILED")})},m=n(7006),f=(0,d.memo)(()=>{let e=(0,m.Z)(),t=e?.brandName,n=e?.brandLogo,d=e?.brandDescription,c=e?.brandBackground,f=e=>window?.HWS?.I18n?.t(e)??e;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center sm:flex-row sm:justify-center md:items-start md:justify-start",children:[(0,r.jsx)(o.A,{className:"h-full w-full px-16 py-8 ltr:border-r-1 rtl:border-l-1 sm:h-auto sm:w-auto sm:rounded-2xl sm:p-48 sm:shadow md:flex md:h-full md:w-1/2 md:items-center md:justify-end md:rounded-none md:p-64 md:shadow-none",children:(0,r.jsxs)(s.A,{className:"mx-auto w-full max-w-320 sm:mx-0 sm:w-320",children:[n&&(0,r.jsx)("img",{className:"logo-icon h-32 w-32",src:n,alt:"logo"}),(0,r.jsxs)(i.A,{className:"mt-32 text-4xl font-extrabold leading-tight tracking-tight",children:[f("HWS_PROVIDER_AUTHENTICATION_EMAIL_CHANGE"),"!"]}),(0,r.jsxs)("div",{className:"mt-2 flex items-baseline font-medium",children:[(0,r.jsxs)(i.A,{children:[" ",f("HWS_PROVIDER_AUTHENTICATION_BACK_TO")]}),(0,r.jsx)(a.Link,{className:"ml-4",to:"/auth/sign-in",children:f("HWS_PROVIDER_AUTHENTICATION_SIGN_IN")})]}),(0,r.jsx)(u,{})]})}),(0,r.jsxs)(l.A,{className:"relative hidden h-full flex-auto items-center justify-center overflow-hidden p-64 md:flex lg:px-112",sx:{backgroundColor:"primary.main"},style:{backgroundImage:c?`url(${c})`:"none",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",width:"100%"},children:[(0,r.jsx)(l.A,{component:"svg",className:"absolute -right-64 -top-64 opacity-20",sx:{color:"primary.light"},viewBox:"0 0 220 192",width:"220px",height:"192px",fill:"none",children:(0,r.jsx)("rect",{width:"220",height:"192",fill:"url(#837c3e70-6c3a-44e6-8854-cc48c737b659)"})}),(0,r.jsxs)("div",{className:"relative z-10 w-full max-w-2xl",children:[t&&(0,r.jsx)("div",{className:"text-7xl font-bold leading-none text-gray-100",children:t}),d&&(0,r.jsx)("div",{className:"mt-24 text-lg leading-6 tracking-tight text-gray-400",children:d})]})]})]})})},3085:function(){},7006:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9434);function a(){let e=window.HWS?.Branding,t=()=>{let t=e?.getBrandingData?.()??{};return{brandName:t.brandName??"",brandLogo:t.brandLogo??"",brandDescription:t.brandDescription,brandBackground:t.brandBackground}},[n,a]=(0,r.useState)(t);return(0,r.useEffect)(()=>{if(!e?.subscribe){a(t());return}let n=e.subscribe(()=>{a(t())});return a(t()),()=>{"function"==typeof n&&n()}},[e]),n}},7921:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(9434);n(3085);let a=(0,r.createContext)({loading:!0});function s(){return(0,r.useContext)(a)}function o(){let[e,t]=(0,r.useState)(()=>s);return(0,r.useEffect)(()=>{let e=()=>{let e=window?.HWS?.Hooks;if(e){let n=e.get("useAuth");if(n)return t(()=>n),!0}return!1};if(!e()){let t=()=>e();return document.addEventListener("auth-hook-ready",t),()=>document.removeEventListener("auth-hook-ready",t)}},[]),e()}}}]);