1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7344],{32031:function(e,t,r){r.d(t,{Rk:function(){return c},ar:function(){return postUserProfile}});var n=r(30819),i=r(42952),l=r.n(i),s=r(99170),a=r(12392),o=r(57778),u=r(27060);let getEndpointURL=()=>"".concat(a.T,"/api/v3/user/profile/"),c=o.E_.extend({avatar:n.z.string().refine(l(),{message:"avatar is not base64"}),description:n.z.string(),location:n.z.string()}).catchall(n.z.any()).partial(),p=o.E_;(0,u.RW)(p);let postUserProfile=async e=>{let{data:t}=await s.x.post(getEndpointURL(),(0,u.gH)(e),{withCredentials:!0});return t}},38495:function(e,t,r){var n=r(11527),i=r(96007),l=r(35068);let Card=e=>{let{children:t,...r}=e,s=(0,i.m)("Card",e);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(l.x,{__css:s,...r,children:t})})};Card.defaultProps={children:null},t.Z=Card},8599:function(e,t,r){r.d(t,{$:function(){return Footer}});var n=r(11527),i=r(96007),l=r(35068),s=r(6218),a=r(53636),o=r.n(a),u=r(43049),c=r(89874),p=r(82103);let Footer=e=>{let t=(0,u.r)(),r=(0,c.useTranslations)("common"),a=(0,i.m)("Footer");return(0,n.jsxs)(l.x,{mt:2,role:"contentinfo",sx:{...a,...e},children:[(0,n.jsx)(o(),{href:(0,p.sx)(t),legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(s.r,{p:"8px",target:"_blank",children:r("legalNotice")})}),(0,n.jsx)(o(),{href:(0,p.dg)(t),legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(s.r,{p:"8px",target:"_blank",children:r("termOfUse")})}),(0,n.jsx)(o(),{href:(0,p.uC)(t),legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(s.r,{p:"8px",target:"_blank",children:r("privacyPolicy")})})]})}},13583:function(e,t,r){var n=r(11527),i=r(58537),l=r(28213),s=r(35068),a=r(38305),o=r(42753),u=r(31940),c=r(29490),p=r(47889),d=r.n(p),f=r(68437),x=r.n(f),h=r(50959),m=r(68491),v=r(82103),S=r(43049);t.Z=e=>{let{title:t,errors:r=[],pageName:p,stepName:f,dynamicFields:g=[]}=e,j=(0,S.r)();(0,h.useEffect)(()=>{r.length&&window.scrollTo({top:0,left:0,behavior:"smooth"})},[r]);let E=p&&f?(0,v.XN)(j,p,f):[],R=(0,v.B2)(E.concat(g));if(0===r.length)return null;let P=r.filter(m.CI),C=r.filter(m.SJ).map(e=>e.field in R?{...e,field:R[e.field]}:e);return(0,n.jsxs)(i.b,{status:"error",variant:"solid",children:[(0,n.jsx)(l.z,{}),(0,n.jsxs)(s.x,{children:[(0,n.jsx)(a.C,{children:t}),(0,n.jsx)(o.X,{children:(0,n.jsxs)(u.QI,{children:[P.map(e=>(0,n.jsx)(u.HC,{children:e.message},e.message)),C.map(e=>{let{messages:t,field:r}=e;return(0,n.jsxs)(u.HC,{children:[(0,n.jsx)(c.x,{children:"".concat(x()(d()(r)),":")}),(0,n.jsx)(u.QI,{children:t.map(e=>(0,n.jsx)(u.HC,{children:e},e))})]},r)})]})})]})]})}},60276:function(e,t,r){var n=r(11527),i=r(96007),l=r(79409);t.Z=e=>{let{children:t}=e,r=(0,i.m)("SetupActionButtons",e);return(0,n.jsx)(l.U,{sx:r,children:t})}},90990:function(e,t,r){var n=r(11527),i=r(34826),l=r(1753);let Layout=e=>{let{children:t}=e;return(0,n.jsx)(i.Z,{children:(0,n.jsx)(l.Z,{px:{base:4,lg:0},w:{base:"full",md:"3xl"},children:t})})};Layout.defaultProps={children:null},t.Z=Layout},42935:function(e,t,r){r.d(t,{Z:function(){return Steps_Step}});var n=r(11527),i=r(12595),l=r(14605);let Icon=e=>{let{variant:t,...r}=e;switch(t){case i.pR.COMPLETED:return(0,n.jsx)(l.m,{name:"checkCircleSolid",size:"1.25rem",...r});case i.pR.ACTIVE:return(0,n.jsx)(l.m,{...r,name:"circleSolid",size:"1.25rem"});case i.pR.UPCOMING:default:return(0,n.jsx)(l.m,{...r,name:"circle",size:"1.25rem"})}};Icon.defaultProps={variant:i.pR.UPCOMING};var s=r(96007),a=r(79409),o=r(75979),u=r(29490),Steps_Step=e=>{let{variant:t,name:r}=e,l=(0,s.j)("Step",{variant:t});return(0,n.jsxs)(a.U,{__css:l.container,"aria-current":t===i.pR.ACTIVE?"true":"false",children:[(0,n.jsx)(Icon,{__css:l.icon,"aria-hidden":"true",variant:t}),(0,n.jsx)(o.d,{above:t!==i.pR.ACTIVE?"sm":void 0,children:(0,n.jsx)(u.x,{sx:l.title,children:r})})]})}},61289:function(e,t,r){r.d(t,{T:function(){return SetupStepProvider},k:function(){return useSetupStepProvider}});var n=r(11527),i=r(50959),l=r(71363),s=r(88739),a=r(19147),o=r(89874),u=r(4986),c=r(12595),p=r(32031),d=r(80937),f=r(43049),x=r(38495),h=r(28852),Setup_Title=e=>{let{children:t,marginTop:r="0px"}=e;return(0,n.jsx)(h.X,{as:"h1",display:"block",fontWeight:"semibold",mt:r,size:"lg",textAlign:"center",wordBreak:"break-all",children:t})},m=r(1753),v=r(92145),S=r.n(v),g=r(13583),j=r(60276),E=r(28128),R=r(20318),P=r(53636),C=r.n(P),b=r(79409),F=r(42935);let y={"/setup/profile":"profile","/setup/contact":"contact","/setup/interests":"interests","/setup/notifications":"notifications","/setup/visibility":"visibility"},getStepVariant=(e,t,r)=>{let n=(0,c.fY)(t,r),i=(0,c.fY)(e,r);return n===i?c.pR.ACTIVE:i<n?c.pR.COMPLETED:c.pR.UPCOMING};var Setup_Steps=e=>{let{pathname:t}=e,r=(0,f.r)(),i=(0,o.useLocale)(),l=(0,o.useTranslations)("setup/common"),s=(0,c.w3)(r),get
1StepName=e=>e in y?l(y[e]):(0,c.L_)(e,r,i)||"";return(0,n.jsx)(b.U,{spacing:6,children:s.map(e=>(0,n.jsx)(F.Z,{name:getStepName(e),variant:getStepVariant(e,t,r)},"step-".concat(e)))})},_=r(27780),I=r(68491),w=r(78220),N=r(9935),L=r(82103);let T=(0,i.createContext)({submitStep:p.ar,proceed:()=>{},onError:()=>{}}),SetupStepProvider=e=>{let{children:t,userProfile:r,stepTitle:h,slug:v,commonStepName:P,dynamicFields:b}=e;(0,l.Z)();let{errors:F,clearErrors:y,setErrors:k}=(0,a.a)(),O=(0,o.useTranslations)("setup/common"),U=(0,o.useTranslations)("common"),Z=(0,d.useRouter)(),A=(0,f.r)(),z=(0,_.useSearchParams)(),[H,D]=(0,i.useState)(!1),{setNext:M}=(0,s.x)(e=>{let{setNext:t}=e;return{setNext:t}}),V=v||Z.pathname,B=(0,c.Hx)(V,A),q=(0,c.NW)(V,A),G=(0,i.useCallback)(()=>{if(D(!0),y(),B){Z.push(B);return}let e=z.get("next");if(e&&(M(null),(0,N.Is)(e))){window.location.href=e;return}if((0,L.nm)(A)){Z.push("/dashboard");return}window.location.href="/dashboard"},[y,Z,z,B,A,M]),W=(0,i.useCallback)(e=>{D(!1);let t=(0,I.Om)("profile update failed"),r=(0,I.nV)(e,t);k(r)},[k]),{mutate:X,isLoading:J}=(0,u.D)({mutationFn:p.ar,onSuccess:()=>{G()},onError:W}),Q=(0,i.useMemo)(()=>({submitStep:X,proceed:G,onError:W}),[X,G,W]),Y=!B,$=Y?O("completeProfile"):U("continue");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S(),{children:(0,n.jsx)("title",{children:"".concat(O("title")," - ").concat((0,L.pb)(A))})}),(0,n.jsx)(Setup_Title,{children:h}),(0,n.jsx)(Setup_Steps,{pathname:V}),(0,n.jsx)(g.Z,{dynamicFields:b,errors:F,pageName:w.q.Setup,stepName:P,title:O("alert.title")}),(0,n.jsx)(x.Z,{mb:6,children:(0,n.jsx)(m.Z,{alignItems:"flex-start",children:(0,n.jsx)(E.X,{userProfile:r,children:(0,n.jsxs)(T.Provider,{value:Q,children:[t,(0,n.jsxs)(j.Z,{children:[q?(0,n.jsx)(C(),{href:q,children:(0,n.jsx)(R.z,{isDisabled:J||H,isLoading:J||H,onClick:()=>D(!0),variant:"outline",children:U("back")})}):null,(0,n.jsx)(R.z,{colorScheme:"brand",form:"setup-step-form",isDisabled:J||H,isLoading:J||H,type:"submit",children:$})]})]})})})})]})},useSetupStepProvider=()=>(0,i.useContext)(T)},28128:function(e,t,r){r.d(t,{G:function(){return useUserProfile},X:function(){return UserProfileProvider}});var n=r(11527),i=r(50959);let l=(0,i.createContext)({userProfile:null}),UserProfileProvider=e=>{let{children:t,userProfile:r}=e,s=(0,i.useMemo)(()=>({userProfile:r}),[r]);return(0,n.jsx)(l.Provider,{value:s,children:t})},useUserProfile=()=>{let{userProfile:e}=(0,i.useContext)(l);if(!e)throw Error("This provider does not provide a valid default value. Please set a userProfile");return{userProfile:e}}},25599:function(e,t,r){var n=r(11527),i=r(89832);t.Z=e=>{let{children:t,...r}=e;return(0,n.jsx)(i.M,{...r,flexDirection:"column",flexGrow:1,children:t})}},34826:function(e,t,r){var n=r(11527),i=r(18776),l=r(48638),s=r(76059),a=r(8599),o=r
1(25599);let FullHeightCenterWithNavBar=e=>{let{children:t,centerProps:r,...u}=e,c=(0,s.Z)();return(0,n.jsxs)(i.k,{...u,flexDirection:"column",h:"100vh",children:[(0,n.jsx)(l.w,{}),(0,n.jsx)(o.Z,{...r,mt:c.navbar.height,pt:4,role:"main",children:t}),(0,n.jsx)(a.$,{})]})};FullHeightCenterWithNavBar.defaultProps={children:null},t.Z=FullHeightCenterWithNavBar},71363:function(e,t,r){var n=r(80937),i=r(50959),l=r(88739);let normalizePath=e=>e.replace(/\/+$/,"")||"/";t.Z=()=>{let e=(0,n.useRouter)(),{next:t,setNext:r}=(0,l.x)(e=>{let{next:t,setNext:r}=e;return{next:t,setNext:r}});(0,i.useEffect)(()=>{let n;if(!t)return;try{n=new URL(t,window.location.origin).pathname}catch(e){return}let i=e.asPath.split("?")[0].split("#")[0];if(normalizePath(n)===normalizePath(i)){if(r(null),e.query.next){let{next:t,...r}=e.query;e.replace({pathname:e.pathname,query:r},void 0,{shallow:!0})}return}e.query.next||e.replace({query:{...e.query,next:t}})},[t,e,r])}},88739:function(e,t,r){r.d(t,{x:function(){return l}});var n=r(2085),i=r(88692);let l=(0,n.Ue)()((0,i.tJ)(e=>({next:null,setNext:t=>e({next:t})}),{name:"next-param-store"}))},19147:function(e,t,r){r.d(t,{a:function(){return i}});var n=r(2085);let i=(0,n.Ue)(e=>({errors:[],setErrors:t=>e({errors:t}),clearErrors:()=>e({errors:[]})}))},68491:function(e,t,r){r.d(t,{CI:function(){return isFlatError},Om:function(){return createFlatError},SJ:function(){return isFieldErrors},fl:function(){return createFieldErrors},nV:function(){return createAxiosErrors},zQ:function(){return getFieldError}});var n,i,l=r(1669),s=r(27060);(n=i||(i={})).FieldErrors="FIELD_ERRORS",n.FlatError="FLAT_ERROR";let createFlatError=e=>({message:e,type:"FLAT_ERROR"}),isFlatError=e=>"FLAT_ERROR"===e.type,createFieldErrors=(e,t)=>({type:"FIELD_ERRORS",messages:t,field:e}),isFieldErrors=e=>"FIELD_ERRORS"===e.type,getFieldError=(e,t)=>e.filter(isFieldErrors).find(e=>e.field===t),createAxiosErrors=(e,t)=>{if(!l.Z.isAxiosError(e)||!e.response||!e.response.data||!(0,s.GO)(e.response.data))return t?[t]:[];let r=e.response.data,{data:{non_field_errors:n,nonFieldErrors:i,...a}}=r,o=[...Object.values(n||[]).map(e=>createFlatError(e)),...Object.values(i||[]).map(e=>createFlatError(e))],u=Object.keys(a).map(e=>createFieldErrors(e,a[e]));return[...o,...u]}},12595:function(e,t,r){r.d(t,{Hx:function(){return getNextSetupStepRoute},L_:function(){return getCustomSetupStepName},NW:function(){return getPrevSetupStepRoute},fY:function(){return getSetupRouteIndex},pR:function(){return i},w3:function(){return getSetupRoutes}});var n,i,l=r(24669),s=r.n(l);(n=i||(i={})).COMPLETED="completed",n.ACTIVE="active",n.UPCOMING="upcoming";let a=["/setup/profile","/setup/contact","/setup/interests","/setup/notifications","/setup/visibility"],getSetupRoutes=e=>{var t;let r=a.filter(t=>!e.userProfileVisibilityLocked||"/setup/visibility"!==t);if(!(null==e?void 0:null===(t=e.setup)||void 0===t?void 0:t.additionalSteps))return r;let{setup:{additionalSteps:n}}=e;return s()(n)?[...r,...n.map(e=>e.slug)]:a},getCustomSetupStepName=(e,t,r)=>{var n;if(!(null==t?void 0:null===(n=t.setup)||void 0===n?void 0:n.additionalSteps))return null;let{setup:{additionalSteps:i}}=t;if(!s()(i))return null;let l=i.find(t=>t.slug===e);return l?r&&l.data.text.title[r]||l.data.text.title.en:null},getSetupRouteIndex=(e,t)=>{let r=getSetupRoutes(t);return r.findIndex(t=>t===e)},getAdjacentSetupStepRoute=(e,t,r)=>{let n=getSetupRoutes(t),i=n.findIndex(t=>t===e);return n[i+r]},getNextSetupStepRoute=(e,t)=>getAdjacentSetupStepRoute(e,t,1),getPrevSetupStepRoute=(e,t)=>getAdjacentSetupStepRoute(e,t,-1)}}]); 2//# sourceMappingURL=7344-b18313ae552cd498.js.map
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.