1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5fb9b30f-9b0d-47f0-9d3a-533efb595989",e._sentryDebugIdIdentifier="sentry-dbid-5fb9b30f-9b0d-47f0-9d3a-533efb595989")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6257],{562:(e,t,n)=>{"use strict";n.d(t,{K:()=>a,x:()=>o});let a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o={January:"01",February:"02",March:"03",April:"04",May:"05",June:"06",July:"07",August:"08",September:"09",October:"10",November:"11",December:"12"}},1600:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(14232),o=n(49316),r=n(57632);let l=e=>{let{onChange:t}=e,n=(0,o.j7)(),l=(0,r.A)(n.values);return a.useEffect(()=>{if(l)for(let e of Object.keys(n.values))Object.is(l[e],n.values[e])||t({fieldName:e,value:n.values[e],prevValue:l[e],formik:n})},[n.values]),null}},1830:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(14232);function o(){let[e,t]=(0,a.useState)({width:void 0,height:void 0});return(0,a.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e}},3164:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});var a=n(85560),o=n(49504);let r=(e,t,n)=>a.Ik().shape({taxInformation:a.YO().of(a.Ik().shape({taxResidenceCountryAvailablity:a.Yj().required(e.required_caption),taxResidenceCountry:a.Yj().when("taxResidenceCountryAvailablity",{is:"yes",then:a.Yj().required(e.required_caption)}),tinAvailablity:a.Yj().when(["taxResidenceCountryAvailablity","taxResidenceCountry"],{is:(e,t)=>"yes"===e&&"US"!==t,then:a.Yj().required(e.required_caption)}),tin:a.Yj().when(["tinAvailablity"],{is:"yes",then:(0,o.EZ)(e,t,n),otherwise:()=>a.Yj().nullable()}),reason:a.Yj().when("tinAvailablity",{is:"no",then:a.Yj().required(e.required_caption)}).nullable(!0),tinUnavailabilityReason:a.Yj().when("reason",{is:"Unable to obtain a TIN or equivalent number",then:a.Yj().required(e.required_caption)}).nullable(!0),tinUnavailabilityOtherReason:a.Yj().when("reason",{is:"Others",then:a.Yj().required(e.required_caption)}).when("tinUnavailabilityReason",{is:"Others",then:a.Yj().required(e.required_caption)}).nullable(!0)})).notRequired()})},4717:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});let a=(e,t,n,a,o,r,l)=>{var i;let{handleChange:s,handleBlur:c,values:d,touched:u,errors:p,setFieldValue:_}=a,m=p||{},h="";return(null==u?void 0:u[e])&&(null==m?void 0:m[e])&&(h=m[e]),(null==n?void 0:n[e])&&(null==n||null==(i=n[e])?void 0:i.length)>0&&(h=n[e][0].message),{id:e||l,name:e,label:t,value:d?d[e]:"",error:("boolean"!=typeof o||o)&&(null==u?void 0:u[e])&&h.length>0,onChange:s,onBlur:c,errorText:r?"":h,setFieldValue:_,fillType:"outlined"}}},4906:(e,t,n)=>{"use strict";n.d(t,{w:()=>c});let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:43,t=new Uint8Array(e);crypto.getRandomValues(t);let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";return Array.from(t).map(e=>n[e%n.length]).join("")},o=async e=>{let t=new TextEncoder().encode(e);return btoa(String.fromCharCode(...new Uint8Array(await crypto.subtle.digest("SHA-256",t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},r=async()=>{let e=a(),t=await o(e);return{codeVerifier:e,codeChallenge:t}};var l=n(18334);let i="https://www.syfe.com/dashboard/account-setup/get-started",s=Math.floor(1e8+9e8*Math.random()),c=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"v3",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="uinfin,name,sex,nationality,residentialstatus,dob,regadd,mailadd,aliasname,passtype,passstatus,passexpirydate,race,marital,employment,occupation,employmentsector,cpfbalances,cpfcontributions,noa-basic";if("v5"===e){n=(t?"openid,residentialstatus,regadd":"openid,uinfin,name,sex,nationality,residentialstatus,dob,regadd,aliasname,passexpirydate,race,marital,employment,occupation,employmentsector,cpfcontributions,noa-basic,cpfbalances.oa,cpfbalances.ma,cpfbalances.ra,cpfbalances.sa").replaceAll(","," ");
1let e=crypto.randomUUID(),{codeChallenge:a,codeVerifier:o}=await r();try{sessionStorage.setItem("code-verifier",o)}catch(e){l.Cp("Failed to store code-verifier in session storage",{extra:{error:e}})}return"https://id.singpass.gov.sg/auth?scope="+encodeURIComponent(n)+"&response_type=code&redirect_uri="+(t?"https://www.syfe.com/dashboard/account-settings/edit-address-method":i)+"&nonce="+e+"&client_id="+encodeURIComponent("a83fbFawyp1X5uwWzEYuPkRvLMI5g0y8")+"&state="+s+"&code_challenge="+a+"&code_challenge_method=S256"}return"https://api.myinfo.gov.sg/com/v3/authorise?client_id="+encodeURIComponent("PROD-201834952H-SYFE-ACCTREG")+"&state="+s+"&purpose="+encodeURIComponent("Fetch user details for Syfe")+"&attributes="+encodeURIComponent(n)+"&redirect_uri="+i}},8262:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var a=n(37876),o=n(14232),r=n(89099),l=n(142),i=n(46513),s=n(95706),c=n(82424),d=n(47582),u=n(54755),p=n(23983),_=n(46514),m=n(81444),h=n(78071),y=n(48011),g=n(19461),f=n(71776);let x=(0,y.Ng)(e=>({showModal:g.vB.getShowDownloadAppModal(e)}),e=>({showDownloadAppModal:()=>e(f.v_.showDownloadAppModal())}));var b=n(76757);let C=x(e=>{let{showDownloadAppModal:t}=e,{geographyConstants:n,geography:y}=(0,h.Ym)(),{visibilityFlags:{enableDownloadAppModal:g}}=(0,p.Q)(y),[f,x]=(0,o.useState)(!1),C=(0,r.useRouter)(),v=(0,u.vA)(C),j=v.choosePortfolioVersion||"",E=(0,u.PR)(v.type)||"";E.endsWith("_HK")&&(E=E.replace("_HK","")),E===l.jv.CASH_PLUS_HK_USD&&(E=l.jv.CASH_PLUS);let A=(0,u.Zl)(n.PORTFOLIO_NAME_CONFIG[E]);(0,o.useEffect)(()=>{d.putItem(i.eP,"2");let e=setTimeout(()=>{x(!0)},1e3);return function(){e&&clearTimeout(e)}},[]);let S=()=>{g&&t();let e=s.BKk;A&&(e=_.A[y].PRE_SIGNUP_CONFIG.introUrl(A,j),"THEME"===A?e="".concat(s.BKk,"?tab=themes"):A===l.jv.CORE&&(e="".concat(s.BKk,"?tab=core")));let[n,a]=e.split("?"),o=b.parse(a),r={...v,...o};return"".concat(n,"?").concat(b.stringify(r))};return((0,o.useEffect)(()=>{let e=S();e.startsWith("/create-account")||e.startsWith("/login")||e.startsWith("/onboarding")||e.startsWith("/sign-up")?(0,c.k)(e,C,{geography:y,replace:!0}):C.replace(e)},[]),f)?null:(0,a.jsx)(m.k,{})})},8981:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var a=n(37876),o=n(82780),r=n.n(o),l=n(10264),i=n.n(l),s=n(14232),c=n(82167),d=n(34219),u=n(41673),p=n(142),_=n(71773);let m=(0,c.AH)(["&&& .MuiFormHelperText-root{display:none;margin:0;}"]),h=(0,c.Ay)(e=>(0,a.jsx)(u.Ay,{...e})).withConfig({componentId:"sc-7084366a-0"})(["",""],m);function y(e){let{form:t,field:n,onChange:o,name:l,alwaysShowHKIDInput:c,...m}=e||{},{residentialStatus:y}=(null==t?void 0:t.values)||{},g=r()(null==t?void 0:t.values,null==n?void 0:n.name)||"",[f,x]=(0,s.use
1State)({}),[b,C]=(0,s.useState)({}),[v,j]=(0,s.useState)(""),[E,A]=(0,s.useState)(""),S="pr"===y;if((0,s.useEffect)(()=>{var e;j((null==(e=g.split("("))?void 0:e[0])||""),A(g.substring(g.indexOf("(")+1,g.lastIndexOf(")"))||"")},[g]),(0,s.useEffect)(()=>{if(S||c){if(!p.RO.test(v)&&!p.Ov.test(E)){x({...t.errors}),C({...t.errors});return}if(!p.RO.test(v)){x({...t.errors});let e={...f};i()(e,n.name,""),C(e);return}if(p.RO.test(v)&&!p.Ov.test(E)){C({...t.errors});let e={...b};i()(e,n.name,""),x(e);return}x({}),C({})}},[v,E,t.errors]),!S&&!c)return(0,a.jsx)(u.Ay,{...e});let I=r()(t.touched,n.name)&&(r()(f,n.name)||r()(b,n.name));return(0,a.jsxs)(d.az,{children:[(0,a.jsxs)(d.pT,{alignItems:"flex-end",gap:2,children:[(0,a.jsx)(d.pT,{flexDirection:"column",flexGrow:1,maxWidth:{md:"256px"},children:(0,a.jsx)(h,{...m,onChange:e=>{let t=v;e.length<=10&&(t=e.trim()),E&&(t="".concat(t,"(").concat(E,")")),o(t)},showHelper:!1,field:{...n,value:v},form:{...t,errors:f}})}),S||c?(0,a.jsx)(d.az,{width:"48px",children:(0,a.jsx)(h,{...m,field:{...n,value:E},form:{...t,errors:b},label:"",onChange:e=>{let t=v;e.trim()&&(t="".concat(t,"(").concat(e.length>1?E:e,")")),o(t)},showHelper:!1,value:E})}):null]}),I?(0,a.jsxs)(d.pT,{alignItems:"center",gap:1,mt:2,children:[(0,a.jsx)(d._V,{height:"10px",src:_.A,width:"10px"}),(0,a.jsx)(d.EY,{color:"R.2",variant:"caption4",children:I})]}):null]})}},12535:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var a=n(37876),o=n(14232),r=n(90330),l=n.n(r),i=n(82167),s=n(21651),c=n(142),d=n(30053),u=n(78071),p=n(76037),_=n(34219);let m=(0,i.Ay)(_.pT).withConfig({componentId:"sc-2dc8c366-0"})(["color:",";border:",";border-radius:","px;.& > div{position:relative;}"],e=>e.color,e=>"1px solid ".concat(e.borderColor||(0,s.y)("colors.B.3")(e)),(0,s.y)("radii.2")),h=(0,i.Ay)(_.EY).withConfig({componentId:"sc-2dc8c366-1"})(["word-break:break-all;"]),y=(0,i.Ay)(_.az).withConfig({componentId:"sc-2dc8c366-2"})(["visibility:hidden;input{width:0;}"]);class g extends o.Component{render(){let{strings:{upload_doc_box_section:{upload_text:e,uploading_text:t,stop_upload_text:n,stop_cta:r,back_cta:i}}}=this.props.locale,{uploadInProgress:s,uploadComplete:c}=this.state,{combinedTheme:d}=this.props,{text:{color:{title:u}},border:{color:{uploadBoxContainer:p}},progressBar:{class:g,color:{text:f,bar:x,buffer:b}},button:{type:C},fileUpload:{background:v,uploadedFileIcon:j,uploadedFileName:E,uploadedFileSize:A,uploadingText:S}}
1=d.componentTheme,I=(0,a.jsxs)(m,{cp:!0,alignItems:"center",bg:v,borderColor:p,color:f,justifyContent:"flex-start",minHeight:"60px",onClick:this.onUploadClick,px:4,py:2,children:[(0,a.jsx)(_.pT,{flexShrink:0,width:"20px",children:(0,a.jsx)(_.C0,{name:"uploadDoc"})}),(0,a.jsx)(_.pT,{flexGrow:1,mx:3,textAlign:"left",children:(0,a.jsx)(_.$n,{fillType:"text",onClick:e=>e.preventDefault(),p:0,type:C,children:e})}),(0,a.jsx)("div",{})]}),T=(0,a.jsxs)(m,{alignItems:"center",bg:v,borderColor:p,color:f,justifyContent:"space-between",minHeight:"60px",px:4,py:2,children:[(0,a.jsx)(_.pT,{flexShrink:0,width:"20px",children:(0,a.jsx)(_.C0,{name:"uploadDoc"})}),(0,a.jsxs)(_.pT,{flexDirection:"column",mx:4,width:"100%",children:[(0,a.jsxs)(_.pT,{alignItems:"center",color:S,justifyContent:"space-between",mb:2,children:[(0,a.jsx)(_.EY,{variant:"body2",children:t}),(0,a.jsxs)(_.EY,{variant:"body2",children:[this.state.progressToShow,"%"]})]}),(0,a.jsx)(_.z2,{barColor:x,bufferColor:b,className:g,height:"4px",progress:this.state.progressToShow,showBorder:!1})]}),(0,a.jsx)(_.pT,{cp:!0,bg:"B.7",borderRadius:"100%","data-testid":"cross-icon",height:"14px",onClick:this.onUploadingDocDelete,width:"14px",children:(0,a.jsx)(_.C0,{color:"W.1",height:"14px",name:"cross",width:"14px"})})]}),k=(0,a.jsxs)(m,{cp:!0,alignItems:"center",bg:v,borderColor:p,color:f,justifyContent:"space-between",minHeight:"60px",onClick:this.onPreviewButtonClick,px:4,py:2,children:[(0,a.jsxs)(_.pT,{alignItems:"center",children:[(0,a.jsx)(_.pT,{flexShrink:0,children:(0,a.jsx)(_.C0,{height:"16px",name:"docUploadedNew",stroke:j,width:"16px"})}),(0,a.jsxs)(_.pT,{flexDirection:"column",justifyContent:"center",mx:3,children:[(0,a.jsx)(h,{color:E,mb:1,variant:"body2",children:this.state.fileName}),(0,a.jsx)(_.EY,{color:A,variant:"label6",children:this.state.fileSize})]})]}),(0,a.jsx)(_.pT,{cp:!0,bg:"B.7",borderRadius:"100%","data-testid":"uploaded-box-cross",flexShrink:0,height:"14px",onKeyDown:this.handleKeyDownOnCross,role:"button",tabIndex:"0",width:"14px",onClick:e=>{e.stopPropagation(),this.props.onDocRemove()},children:(0,a.jsx)(_.C0,{color:"W.1",height:"14px",name:"cross",width:"14px"})})]}),N=this.props.customUploadBox?this.props.customUploadBox(this.onUploadClick):I;return(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(y,{height:0,ref:this.fileUploadInput,children:(0,a.jsx)(l(),{accept:"image/jpg,image/jpeg,image/png,image/heic,application/pdf",autoUpload:!0,contentDisposition:"inline","data-testid":"input-file-upload",getSignedUrl:this.getSignedUrl,onError:this.onUploadError,onFinish:this.onUploadFinish,onProgress:this.onUploadProgress,ref:this.s3UploaderRef,uploadRequestHeaders:{}})}),(0,a.jsxs)(_.az,{children:[c&&k,!c&&!s&&N,!c&&s&&T,this.state.errorMessage&&(0,a.jsx)(_.EY,{as:"div",color:"R.3",variant:"caption1",children:this.state.errorMessage})]}),this.state.showUploadingDocDiscardPopup&&(0,a.jsx)(_.QE,{onPrimaryCtaClick:this.onUploadingFileDiscard,onSecondaryCtaClick:this.onUploadingDocPopupCancel,primaryCtaText:r,secondaryCtaText:i,showCloseIcon:!1,showSecondaryCta:!0,styles:{width:{_:"100%",md:"360px"}},children:(0,a.jsx)(_.EY,{as:"div",color:u,variant:"subtitle3",children:n})})]})}constructor(e){super(e),this.fileUploadInput=o.createRef(),this.s3UploaderRef=o.createRef(),this.getSignedUrl=(e,t)=>{this.setState({errorMessage:""}),e.size>c.$Y?this.setState({errorMessage:"File size greater than ".concat((0,d.v7)(c.$Y))}):this.props.getS3SignedUrl(e.name,e.size,n=>{t({signedUrl:n.data.put});let a=n.data.get;this.setState({uploadInProgress:!0,fileUrl:a,fileName:e.name,fileSize:(0,d.v7)(e.size,2)})})},this.onUploadError=e=>{this.setState({errorMessage:"Error while uploading file, please try again.",uploadInProgress:!1,uploadComplete:!1,uploadProgress:0});let t=this.getFileUploadInput();t&&(t.value="")},this.getFileUploadInput=()=>{let e=this.fileUploadInput.current&&this.fileUploadInput.current.firstChild;return e&&e instanceof HTMLInputElement?e:null},this.onUploadClick=()=>{let e=this.getFileUploadInput();e&&e.click()},this.onUploadProgress=e=>{this.setState({uploadProgress:e}),this.state.showUploadingDocDiscardPopup||this.setState({progressToShow:e})},this.onUploadFinish=()=>
1{this.props.onNewDocUpload&&this.props.onNewDocUpload(this.state.fileUrl,this.state.fileName,this.state.fileSize),this.setState({uploadComplete:!0})},this.onUploadingDocDelete=()=>{this.setState({showUploadingDocDiscardPopup:!0})},this.onUploadingFileDiscard=()=>{this.setState({uploadInProgress:!1,uploadProgress:0,showUploadingDocDiscardPopup:!1,progressToShow:0}),this.s3UploaderRef&&this.s3UploaderRef.current&&this.s3UploaderRef.current.abort();let e=this.getFileUploadInput();e&&(e.value="")},this.onUploadingDocPopupCancel=()=>{this.setState(e=>{let{uploadProgress:t}=e;return{showUploadingDocDiscardPopup:!1,progressToShow:t}})},this.handleKeyDownOnCross=e=>{"Enter"===e.key&&(e.preventDefault(),this.props.onDocRemove())},this.onPreviewButtonClick=e=>{e.preventDefault(),window.open(this.state.fileUrl,"_blank")},this.state={uploadInProgress:!1,uploadComplete:!!e.fileUrl,uploadProgress:0,fileUrl:e.fileUrl||"",fileName:e.fileName||"",fileSize:e.fileSize||"",errorMessage:"",showUploadingDocDiscardPopup:!1,progressToShow:0}}}g.defaultProps={theme:"dashboard"};let f=(0,u.GD)((0,p.G)(g,{light:{},dashboard:{text:{color:{title:"colors.BT.1"}},button:{type:"secondary"},border:{color:{uploadBoxContainer:"colors.B.2"}},progressBar:{color:{text:"colors.secondary.6",bar:"F.4",buffer:"F.7"}},fileUpload:{background:"#001536",uploadedFileIcon:"colors.BT.1",uploadedFileName:"colors.BT.1",uploadedFileSize:"colors.BT.3",uploadingText:"colors.secondary.6"}},white:{text:{color:{title:"colors.B.1"}},button:{type:"primary"},border:{color:{uploadBoxContainer:"colors.B.6"}},progressBar:{color:{text:"colors.B.7",bar:"#2f51c9",buffer:"B.5"}},fileUpload:{background:"colors.W.1",uploadedFileIcon:"colors.B.7",uploadedFileName:"colors.B.7",uploadedFileSize:"colors.B.3",uploadingText:"colors.B.3"}}}));class x extends o.Component{componentDidUpdate(e){e.docList.length!==this.props.docList.length&&this.setState({showNewUploadBox:0===this.props.docList.filter(e=>!e.deleted).length})}render(){let{strings:{upload_doc_box_section:{delete_doc_text:e,delete_cta:t,back_cta:n}}}=this.props.locale,{showNewUploadBox:r,showDeleteConfirmationPopup:l}=this.state,{header:i,docList:s,getS3SignedUrl:c,customUploadBox:d,theme:u,combinedTheme:p}=this.props,{text:{color:{dark:m,title:h}}}=p.componentTheme,y=s.filter(e=>!e.deleted);return(0,a.jsxs)(o.Fragment,{children:[l&&(0,a.jsx)(_.QE,{onPrimaryCtaClick:this.onDocDeleteConfirm,primaryCtaText:t,secondaryCtaText:n,showCloseIcon:!1,showSecondaryCta:!0,styles:{width:{_:"100%",md:"360px"}},onSecondaryCtaClick:()=>this.setState({showDeleteConfirmationPopup:!1}),children:(0,a.jsx)(_.EY,{as:"div",color:h,variant:"subtitle3",children:e})}),i&&(0,a.jsx)(_.EY,{as:"div",color:m,mb:1,variant:"subtitle3",children:i}),r&&(0,a.jsx)(f,{customUploadBox:d,getS3SignedUrl:c,onNewDocUpload:this.onNewDocUpload,theme:u},y.length),y.map(e=>{let{url:t,name:n,size:o}=e;return(0,a.jsx)(f,{fileName:n,fileSize:o,fileUrl:t,getS3SignedUrl:c,onDocRemove:()=>this.onDocDelete(e),theme:u},t)})]})}constructor(...e){super(...e),this.state={removedDoc:null,showNewUploadBox:0===this.props.docList.filter(e=>!e.deleted).length,showDeleteConfirmationPopup:!1},this.onNewDocUpload=(e,t,n)=>{this.props.addDoc({url:e,name:t,size:n,deleted:!1}),this.setState({showNewUploadBox:!1})},this.onDocDelete=e=>{this.setState({removedDoc:e,showDeleteConfirmationPopup:!0})},this.onDocDeleteConfirm=()=>{this.state.removedDoc&&(this.props.deleteDoc({...this.state.removedDoc,deleted:!0}),this.setState({showDeleteConfirmationPopup:!1,removedDoc:null,showNewUploadBox:1===this.props.docList.filter(e=>!e.deleted).length}))},this.onAddCtaClick=()=>this.setState({showNewUploadBox:!0})}}x.defaultProps={theme:"dashboard"};let b=(0,u.GD)((0,p.G)(x,{light:{},dashboard:{text:{color:{dark:"colors.BT.2",title:"colors.BT.1"}},button:{type:"secondary"}},white:{text:{color:{dark:"colors.B.1",title:"colors.B.1"}},button:{type:"primary"}}}))},12722:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(48011),o=n(74222),r=n(19461),l=n(71776);let i=(0,a.Ng)(e=>({responsiveUtility:e.responsiveUtility,loggedIn:r.o_.isLoggedIn(e),suitabilityData:r.$A.getSuitabilityData(e),isSuitabilityDataLoading:r.$A.isSuitabilityDataLoading(e),suitabilityDataId:r.$A.getSuitabilityID(e),pendingPortfolioCreation:r.$u.getPendingPortfolioCreation(e),portfolioContentData:r.et.portfolioContentData(e),location:e.router.location,etfsData:r.et.getAddedEtfsData(e),financialAssessmentData:r.$u.getFinancialAssessmentData(e)}),e=>({goBack:()=>e((0,o.OE)()),navigate:t=>e((0,o.VC)(t)),checkPortfolioSuitability:t=>e(l.Xn.checkPortfolioSuitability(t)),loadUserInfo:t=>e(l.zV.getUserInfo(t)),getPortfolioContentDataV1:()=>e(l.s4.getPortfolioContentDataV1()),savePortfolio:(t,n,a,o)=>e(l.s4.createPortfolio(t,n,a,o)),updatePendingPortfolio:(t,n,a)=>e(l.vc.updatePendingPortfolio(t,n,a)),updateSuitabilityCheckStep:(t,n)=>e(l.Xn.updateSuitabilityCheckStep(t,n)),refreshAccountPortfoliosInfo:t=>e(l.vc.getAccountPortfoliosInfo(t)),replace:t=>e((0,o.HC)(t))}),(e,t,n)=>({...e,...t,...n}))},13700:(e,t,n)=>{"use strict";n.d(t,{A:()=>_});var a=n(48011),o=n(74222),r=n(95706),l=n(78071),i=n(23983),s=n(25570),c=n(142),d=n(81415),u=n(98832),p=n(71776);function _(){let{geography:e}
1=(0,l.Ym)(),t=(0,s.X)(),n=(0,a.d4)(d.getBankDetails),_=(0,a.wA)();return a=>{let{visibilityFlags:{enableTransferPlan:l}}=(0,i.Q)(e),s="",d=e=>{let i=e.data||n;_((0,u.getAccountPortfoliosInfo)("",e=>{let{data:{portfolios:n}}=e,d=null==i?void 0:i.find(e=>{let{fundSource:t}=e;return t===c.Cr.SRS}),u=n.find(e=>Number(e.id)===Number(a));s=(null==u?void 0:u.fundSource)!==c.Cr.SRS||d?l?t:(null==u?void 0:u.fundSource)===c.Cr.SRS?r.HFv+"/".concat(a):r.QcH+"/".concat(a):r.coB+"/".concat(a),_((0,o.VC)(s))}))};n?d():_(p.mD.getAllBankDetails(d))}}},14335:(e,t,n)=>{"use strict";n.d(t,{d:()=>b,u:()=>y});var a=n(142),o=n(31676),r=n(49504),l=n(81527),i=n(23983),s=n(85560);let c=(0,l.A)(),{visibilityFlags:{enableSuitabilityV2:d}}=(0,i.Q)(c),u=e=>({[a.XN.HK]:{passExpiryDate:null,localBankAccount:s.Yj().when("residentialStatus",{is:e=>["fro","fr"].includes(e),then:s.Yj().nullable().required().oneOf(["yes"],e.local_bank_account_required_text),otherwise:s.Yj().nullable()})},[a.XN.SG]:{passExpiryDate:r.y4(e),firstName:s.Yj().required(e.required_caption).min(1,e.too_short_text).max(60,e.too_long_text).matches(o.Qp,{message:e.invalid_name}),lastName:s.Yj().required(e.required_caption).min(1,e.too_short_text).max(60,e.too_long_text).matches(o.Qp,{message:e.invalid_name}),aliasName:s.Yj().max(60,e.too_long_text).matches(o.DJ,{message:e.invalid_name})}}),p=e=>"Self employed"===e||"Employed"===e,_=e=>t=>t!==e.sg.country&&t!==e.hk.country,m=(e,t)=>e===a.Yj.CHINESE?{message:t,test:e=>!!(!e||e.match(/^[~`!@#$%^&*()_+=[\]{}|\\;ââ':ââ",./<>?a-zA-Z0-9-\s+]+$/))}:{test:()=>!0},h=e=>{let{errorStrings:t,countryCodes:n}=e;return{name:s.Yj().trim().required(t.required_caption).min(1,t.too_short_text).max(60,t.too_long_text).matches(o.Qp,{message:t.invalid_name}),dateOfBirth:s.Yj().required(t.required_caption).matches(o.B6,{excludeEmptyString:!0,message:t.dob.date_format_text}).test("dob-validation",t.dob.invalid_date_text,e=>{if(!e)return!0;let{valid:t,error:n}=r.bD(e);return!!t||"INVALID_DATE"!==n}).test("age-limit-validation",t.dob.age_limit_text,e=>{if(!e)return!0;let{valid:t,error:n}=r.bD(e);return!!t||"AGE_LIMIT"!==n}),residentialStatus:s.Yj().required(t.required_caption),citizenship:s.Yj().required(t.required_caption),identityNumber:r.pQ(t),passportExpiryDate:r.Po(t),gender:s.Yj().required(t.required_caption),...u(t)[c]}},y=e=>{let{currentLang:t,errorStrings:n,countryCodes:a}=e;return{country:s.Yj().required(n.required_caption),zip:r.l3(n,a),street:s.Yj().when("country",{is:e=>e===a.hk.country,then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text)),otherwise:r.EL(n).test(m(t,n.required_in_english_text))}),state:s.Yj().trim().when("country",{is:e=>e!==a.sg.country,then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text))}),unit:s.Yj().when("country",{is:e=>e===a.hk.country,then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text))}).test(m(t,n.required_in_english_text)),city:s.Yj().trim().when("country",{is:_(a),then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text))})}},g=e=>c===a.XN.HK?{...h(e)}:{...h(e),...y(e)},f=e=>{let{currentLang:t,errorStrings:n}=e;return c===a.XN.HK?{}:{employerAddress:s.Yj().trim().when("employmentStatus",{is:p,then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text))}).nullable(!0),employmentPosition:s.Yj().trim().when("employmentStatus",{is:p,then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text))}).nullable(!0)}},x=e=>{let{currentLang:t,errorStrings:n}=e;return{employmentStatus:s.Yj().required(n.required_caption).nullable(!0),occupation:s.Yj().trim().when("employmentStatus",{is:p,then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text))}).nullable(!0),employer:s.Yj().trim().when("employmentStatus",{is:p,then:s.Yj().required(n.required_caption).test(m(t,n.required_in_english_text))}).nullable(!0),employmentSector:s.Yj().when("employmentStatus",{is:p,then:s.Yj().required(n.required_caption)}).nullable(!0),...f({currentLang:t,errorStrings:n}),annualIncome:s.Yj().required(n.required_caption).nullable(!0),...d?{netLiquidAsset:s.Yj().required(n.required_caption).nullable(!0)}:{totalInfoWorth:s.Yj().required(n.required_caption).nullable(!0)},sourceOfWealth:s.Yj().required(n.required_caption),otherSourceOfWealth:s.Yj().when("sourceOfWealth",{is:e=>e&&e.includes("Other"),then:s.Yj().trim().required(n.required_caption).test("alphabetic-only",n.alpha_characters_only_text,e=>null==e||e.match(o.Am))}).nullable(!0)}},b=(e,t,n,a)=>{switch(e){case"basic":return s.Ik().shape(g({currentLang:t,errorStrings:n,countryCodes:a}));case"employment":return s.Ik().shape(x({currentLang:t,errorStrings:n}));case"allDetails":return s.Ik().shape({...g({currentLang:t,errorStrings:n,countryCodes:a}),...x({currentLang:t,errorStrings:n})});case"residential":return s.Ik().shape(y({currentLang:t,errorStrings:n,countryCodes:a}));default:return s.Ik().shape({})}}},15925:(e,t,n)=>{"use strict";n.d(t,{j1:()=>m,Nq:()=>f,x3:()=>g,mk:()=>h,O8:()=>y});var a=n(142),o=n(53152),r=n(37876),l=n(78071),i=n(34219),s=n(61924);let c={[a.XN.HK]:{SINGLE_DEPOSIT:{minValue:1,maxValue:5e7},MONTHLY_DEPOSIT:{minValue:1,maxValue:5e6},TARGET_AMOUNT:{minValue:1,maxValue:5e7}},[a.XN.SG]:{SINGLE_DEPOSIT:{minValue:1,maxValue:1e7}
1,MONTHLY_DEPOSIT:{minValue:1,maxValue:1e6},TARGET_AMOUNT:{minValue:1,maxValue:1e7}}},d={[a.XN.HK]:[{key:"involvedInInvestmentBusiness"},{key:"affiliatedWithStockExchange"},{key:"isPoliticallyExposed"},{key:"isRelatedToCompany"},{key:"isLicensedWithSFCorHKMA"}],[a.XN.SG]:[{key:"involvedInInvestmentBusiness"},{key:"affiliatedWithStockExchange"},{key:"isPoliticallyExposed"},{key:"isRelatedToCompany"}]},u={[a.XN.HK]:e=>{let{hasDegreeInFinance:t,isProfessionallyQualified:n,transactedInInvestmentProducts:a,hasRelevantTradingExperience:r,yes_text:l,no_text:i}=e;return[{question_text:t.question_text,tooltip_text:t.tooltip_text,options:(0,o.yk)(l,i),key:"hasDegreeInFinance",defaultValue:""},{question_text:n.question_text,options:(0,o.yk)(l,i),key:"isProfessionallyQualified",defaultValue:""},{question_text:a.question_text,tooltip_text:a.tooltip_text,options:(0,o.yk)(l,i),key:"transactedInInvestmentProducts",defaultValue:""},{question_text:r.question_text,tooltip_text:r.tooltip_text,options:(0,o.yk)(l,i),key:"hasRelevantTradingExperience",defaultValue:""}]},[a.XN.SG]:e=>{let{isCkaFirstScreeningPassed:t,yes_text:n,no_text:a}=e;return[{question_text:t.question_text,description_list:t.description_list,options:(0,o.yk)(n,a),key:"isCkaFirstScreeningPassed",tooltip:t.tooltip.points.map(e=>{let{heading:t,description:n}=e;return(0,r.jsxs)(i.az,{mt:6,children:[(0,r.jsx)(i.EY,{as:"div",mb:1,variant:"subtitle3",children:t}),(0,r.jsx)(i.EY,{children:n})]})}),tooltipCaption:t.tooltip.caption,defaultValue:""}]}},p={[a.XN.HK]:e=>{let{isOnlineTutorialForInvestmentPassed:t,isOnlineTutorialForInvestmentScoreAbove50:n,isNotRefusedOfOpeningInvestmentAccountByOtherVendors:a,yes_text:r,no_text:l}=e;return[{question_text:t.question_text,options:(0,o.yk)(r,l),key:"isOnlineTutorialForInvestmentPassed",defaultValue:""},{question_text:n.question_text,options:(0,o.yk)(r,l),key:"isOnlineTutorialForInvestmentScoreAbove50",defaultValue:""},{question_text:a.question_text,options:(0,o.yk)(r,l),key:"isNotRefusedOfOpeningInvestmentAccountByOtherVendors",defaultValue:""}]},[a.XN.SG]:e=>{let{isCkaSecondScreeningPassed:t,yes_text:n,no_text:a}=e;return[{question_text:(0,r.jsx)(l.In,{components:{bold:(0,r.jsx)(i.EY,{variant:"label"})},str:t.question_text}),description_list:t.description_list,options:(0,o.yk)(n,a),key:"isCkaSecondScreeningPassed",defaultValue:""}]}},_=(0,s.lF)(),m={[a.XN.HK]:[{componentType:"TARGET_PERIOD",key:"targetPeriod",defaultValue:""},{componentType:"MORE_THAN_HALF_ASSETS",key:"ifInvestedMoreThanHalfOfAssets",defaultValue:""}],[a.XN.SG]:[{componentType:"TARGET_PERIOD",key:"targetPeriod",defaultValue:""},{componentType:"MORE_THAN_HALF_ASSETS",key:"ifInvestedMoreThanHalfOfAssets",defaultValue:""},{componentType:"OUTSIDE_INVESTED",key:"otherInvestmentsValue",defaultValue:"MEDIUM"},{componentType:"DEBT_OUTSIDE_SYFE",key:"debtsOutsideSyfe",defaultValue:""}]}[_],h=c[_],y=d[_],g=u[_],f=p[_]},16098:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(37876),o=n(14232),r=n(78071),l=n(34219),i=n(62694);let s={src:"/_next/static/media/flower-loader.2b239037.gif",height:1400,width:1692,blurWidth:0,blurHeight:0},c=e=>{let{progressComplete:t,loaderText:n,titleText:c}=e,{strings:{onboarding:{suitability_loader_section:{assessment_text:d}}}}=(0,r.Ym)(),[u,p]=o.useState(30);o.useEffect(()=>{let e=setInterval(()=>{p(e=>{let n=e;return e<100&&t?100:e>=95&&!t?95:e>=100?100:e+5})},500);return()=>{clearInterval(e)}},[t]);let _=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.az,{mb:4,mx:{_:-10,md:0},children:(0,a.jsx)(l._V,{alt:"loader-image",maxHeight:"300px",src:s,width:{_:"100%",md:"auto"}})}),c&&(0,a.jsx)(l.EY,{Text:!0,mb:5,variant:"price2Italic",children:c}),(0,a.jsx)(l.z2,{barColor:"B.7",bufferColor:"B.5",height:"4px",progress:u,showBorder:!1,width:"100%"}),(0,a.jsx)(l.EY,{color:"B.7",mt:6,textAlign:"center",variant:"body1",children:n||d})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{renderOn:["desktop"],children:(0,a.jsx)(l.aF,{modalMaxWidth:"472px",showCloseIcon:!1,children:(0,a.jsx)(l.pT,{alignItems:"center",flexDirection:"column",justifyContent:"center",px:4,width:"360px",children:_})})}),(0,a.jsx)(i.A,{renderOn:["phone","tablet"],children:(0,a.jsx)(l.pT,{alignItems:"center",bg:"G.1",flexDirection:"column",height:"100%",
1justifyContent:"normal",position:"absolute",pt:20,px:10,width:"100%",children:_})})]})}},23660:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(37876);n(14232);var o=n(34219);function r(e){let{caption:t}=e;return(0,a.jsx)(o.az,{bg:"B.6",borderRadius:1,p:3,pt:2,children:(0,a.jsx)(o.EY,{color:"B.7",variant:"caption1",children:t})})}},25093:(e,t,n)=>{"use strict";n.d(t,{uG:()=>nB,X3:()=>nD,y3:()=>nt,z1:()=>nz,N$:()=>no,Gr:()=>eQ,DJ:()=>nv,PF:()=>e9,So:()=>e3,im:()=>nm,PY:()=>nM,wj:()=>P,Q1:()=>t5,zg:()=>tP,Ut:()=>tl,Vt:()=>ts,RY:()=>eC,gD:()=>ni,dB:()=>ny,dr:()=>tq,r:()=>t0,JW:()=>nc,Kn:()=>am,b8:()=>nq,u1:()=>nw,Uj:()=>tE});var a=n(37876),o=n(14232),r=n(21651),l=n(82167),i=n(48011),s=n(21346),c=n(50177),d=n(91016),u=n(62246),p=n(85931),_=n(56584),m=n(142),h=n(4906),y=n(95706),g=n(48779),f=n(54755),x=n(2507),b=n(86260),C=n(76037),v=n(98236),j=n(64918),E=n(78071),A=n(57197),S=n(34219),I=n(74222),T=n(71776),k=n(19461);let N=(0,i.Ng)(e=>({responsiveUtility:e.responsiveUtility,search:e.router.location.search,...k.$A.getMyInfoErrors(e),isMyInfoExtraDataChecked:k.$A.isMyInfoExtraDataChecked(e),accountMeta:k.AU.getAccountMetaInfo(e)}),e=>({getAccountMetaInfo:()=>e(T.mD.getAccountMeta()),navigate:t=>e((0,I.VC)(t)),setInformationOption:t=>{let{selectedOption:n,currentStep:a,nextUrl:o,onSuccessCb:r}=t;return e(T.Xn.setInformationOption({selectedOption:n,currentStep:a,nextUrl:o,onSuccessCb:r}))},fetchDetailsFromMyInfoAPI:(t,n,a,o,r,l)=>e(T.zV.fetchDetailsFromMyInfoAPI(t,n,a,o,r,!1,l)),setMyInfoPartialFalse:t=>e(T.Xn.setMyInfoPartialFalse(t)),updateMyInfoStep:t=>{let{onSuccessCb:n,currentStep:a}=t;return e(T.Xn.updateMyInfoStep({onSuccessCb:n,currentStep:a}))},redirectTo:t=>e((0,I.VC)(t))}),(e,t,n)=>({...e,...t,...n}));var w=n(18334);let O={light:{},dashboard:{text:{color:{caption:"colors.BT.1",popupMessage:"colors.BT.2"}}},white:{text:{color:{caption:"colors.B.4",popupMessage:"colors.B.1"}}}},F=(0,l.Ay)(S.az).withConfig({componentId:"sc-ee8710df-0"})(["text-align:center;position:relative;z-index:1;width:100%;&:before{border-top:1px solid ",";content:'';position:absolute;top:50%;left:0;right:0;bottom:0;z-index:-1;}"],(0,r.y)("colors.B.6")),D=(0,l.Ay)(S.az).withConfig({componentId:"sc-ee8710df-1"})(["text-align:left;"]),R=(0,l.Ay)(S.EY).withConfig({componentId:"sc-ee8710df-2"})(["&:before{content:'';display:inline-block;vertical-align:middle;width:0.5rem;height:0.5rem;border-radius:50%;background:",";margin-right:","px;}"],(0,r.y)("colors.B.1"),(0,r.y)("space.6")),B=e=>{let{theme:t,currentStep:n,...r}=e,{text:{color:{popupMessage:l}}}=(0,C.Y)(t,O).componentTheme,{strings:{general:{next_cta:I},kyc_flow:{get_started_section:{caption:T,regulation_text:N,enter_info_text:D,send_identity_doc_text:R,transfer_funds_text:B,redirection_text:P,duration_text:Y,or_text:U,verify_instantly_cta:z,verify_manually:{verify_manually_cta_v2:L},upload_doc_text:H,identity_number_error_cta:M,my_info_retry_partial_popup:{info_retry_partial_content_text:V},my_info_error_popup:{info_error_content_text:G},my_info_country_not_supported_popup:{info_country_not_supported_content_text:W},my_info_age_limit_popup:{info_age_limit_content_text:q},singpass_under_maintenance_popup:{singpass_under_maintenance_content_text:K,singpass_under_maintenance_popup_title:X,singpass_under_maintenance_primary_cta_text:Q}}}},localeCode:$}=(0,E.Ym)(),J=(0,i.d4)(k.$u.getUserId),{trackClickFn:Z}=(0,c.A)({shouldTrackPageLoad:!0}),ee=Z("Get Started"),{accountMeta:et,getAccountMetaInfo:en}=r,[ea,eo]=(0,o.useState)(!!(0,f.V8)(r.search,"singpass-error")),[er,el]=(0,o.useState)(!1),[ei,es]=(0,o.useState)(!1),[ec,ed]=(0,o.useState)(!1),[eu,ep]=(0,o.useState)(!1),[e_,em]=(0,o.useState)(!1),[eh,ey]=(0,o.useState)(!1),eg=(0,A.Kb)()[m.gh];(0,b.A)(y.gfi),(0,o.useEffect)(()=>{J&&d.k.setSpanAttributes(s.e.EMAIL_VERIFICATION,(0,u.fQ)(J,m.XN.SG)),d.k.addSpanEvent(s.e.EMAIL_VERIFICATION,"Get started page loaded"),d.k.endSpan(s.e.EMAIL_VERIFICATION)},[J]),o.useEffect(()=>{et||en()},[et,en]),(0,o.useEffect)(()=>{let e=(0,f.V8)(r.search,"code"),n=(0,f.V8)(r.search,"error-description");if(e){var a;let n;
1(null==et||null==(a=et.features)?void 0:a.MYINFO_V5)&&((n=sessionStorage.getItem("code-verifier"))||w.Cp(Error("code-verifier not found for MyInfo v5"))),r.fetchDetailsFromMyInfoAPI(e,r.nextUrl,{confirmationMessage:"Check that details are correct, or edit if needed.",confirmationHeading:"Details retrieved",confirmationTheme:t,confirmationAlertTime:4e3},eg,n,()=>{(0,g.Ay)({eventName:"user_registration_success"})})}n&&r.redirectTo(y.HyN.GET_STARTED+"?singpass-error=true")},[r.search]),(0,o.useEffect)(()=>{r.myInfoPartial&&ed(!0)},[r.myInfoPartial]),(0,o.useEffect)(()=>{r.myInfoAgeLimitError&&em(!0)},[r.myInfoAgeLimitError]),(0,o.useEffect)(()=>{r.myInfoIdentityNumberError&&ey(!0)},[r.myInfoIdentityNumberError]),(0,o.useEffect)(()=>{r.myInfoError&&el(!0),r.myInfoRetry&&eo(!0),r.myInfoCountryNotSupported&&es(!0)},[r.myInfoError,r.myInfoRetry,r.myInfoCountryNotSupported]),(0,o.useEffect)(()=>{var e;(null==et||null==(e=et.features)?void 0:e.MY_INFO)||ep(!0)},[et]);let ef=()=>{ee("Manual verification button"),(0,g.Ay)({eventName:"user_registration_initiated",eventParameters:[{key:"click_element",value:"Verify Manually"}]}),(0,g.lt)(_.v.ONBOARDING_KYC_STARTED);let{setInformationOption:e,nextUrl:t}=r;e({selectedOption:"manual",nextUrl:t,currentStep:n,onSuccessCb:()=>{(0,g.Ay)({eventName:"user_registration_success"})}})},ex=()=>{r.updateMyInfoStep({onSuccessCb:async()=>{var e;let t=(null==et||null==(e=et.features)?void 0:e.MYINFO_V5)?"v5":"v3",n=await (0,h.w)(t);window.open(n,"_self","noopener")},currentStep:n})},eb=()=>{r.myInfoError&&el(!1),r.myInfoRetry&&eo(!1),ef()},eC=(0,a.jsx)(S.QE,{onPrimaryCtaClick:ex,onSecondaryCtaClick:eb,primaryCtaText:"Try again",secondaryCtaText:"Enter manually",showCloseIcon:!1,showSecondaryCta:!0,children:(0,a.jsx)(S.EY,{as:"div",color:l,variant:"subtitle3",children:V})}),ev=(0,a.jsx)(S.QE,{onPrimaryCtaClick:eb,primaryCtaText:"Manually enter details",showCloseIcon:!1,children:(0,a.jsx)(S.EY,{as:"div",color:l,variant:"subtitle3",children:G})}),ej=(0,a.jsx)(S.QE,{onPrimaryCtaClick:()=>r.setMyInfoPartialFalse(r.nextUrl),onSecondaryCtaClick:()=>{ed(!1)},primaryCtaText:"Continue",secondaryCtaText:"Cancel",showCloseIcon:!1,showSecondaryCta:!0,children:(0,a.jsx)(S.EY,{as:"div",color:l,variant:"subtitle3",children:V})}),eE=(0,a.jsx)(S.QE,{onSecondaryCtaClick:()=>es(!1),primaryCtaText:"Contact Support",secondaryCtaText:"Cancel",showCloseIcon:!1,showSecondaryCta:!0,onPrimaryCtaClick:()=>{(0,x.An)($),es(!1)},children:(0,a.jsx)(S.EY,{as:"div",color:l,variant:"subtitle3",children:W})}),eA=(0,a.jsx)(S.QE,{onPrimaryCtaClick:()=>em(!1),primaryCtaText:"Close",showCloseIcon:!1,children:(0,a.jsx)(S.EY,{as:"div",color:l,variant:"subtitle3",children:q})}),eS=(0,a.jsx)(S.QE,{onPrimaryCtaClick:()=>ey(!1),primaryCtaText:M,showCloseIcon:!1,children:(0,a.jsx)(S.EY,{as:"div",color:l,variant:"subtitle3",children:r.myInfoIdentityNumberErrorMessage})}),eI=(0,a.jsx)(S.QE,{onModalClose:()=>{ep(!1)},onPrimaryCtaClick:ef,primaryCtaText:Q,showCloseIcon:!1,showSecondaryCta:!1,title:X,children:(0,a.jsx)(S.EY,{as:"div",color:l,variant:"body2",children:K})}),eT=(0,a.jsxs)(S.pT,{alignItems:"center",flexDirection:"column",width:"100%",children:[(0,a.jsxs)(S.pT,{alignItems:"center",bg:"W.1",borderRadius:2,flexDirection:"column",pb:{_:4,md:12},pt:{_:6,md:14},px:{_:3,md:7},width:"100%",children:[(0,a.jsx)(S._V,{alt:"my info logo",height:"28px",src:v.A,width:"161px"}),(0,a.jsx)(S.EY,{as:"div",color:"B.1",mb:4,mt:2,textAlign:"center",variant:"caption4",children:P}),(0,a.jsx)(S.$n,{analyticsInfo:(0,p.Tl5)(),onClick:()=>{ee("MyInfo verification button"),(0,g.Ay)({eventName:"user_registration_initiated",eventParameters:[{key:"click_element",value:"Verify Instantly"}]}),(0,g.lt)(_.v.ONBOARDING_KYC_STARTED),(null==et?void 0:et.features.MY_INFO)?ex():ep(!0)},size:"sm",width:"162px",children:z}),(0,a.jsx)(S.EY,{as:"div",color:"B.7",mt:2,textAlign:"center",variant:"caption2",children:Y})]}),(0,a.jsx)(F,{children:(0,a.jsx)(S.az,{bg:"G.1",borderRadius:"100%",display:"inline-flex",height:"40px",my:6,width:"50px",children:(0,a.jsx)(S.EY,{as:"div",color:"B.1",m:"auto",textAlign:"center",variant:"body1",children:U})})}),(0,a.jsx)(S.$n,{analyticsInfo:(0,p.QSs)(),fillType:"outlined",onClick:ef,size:"sm",width:"180px",children:L}),(0,a.jsx)(S.EY,{as:"div",color:"B.3",mt:4,textAlign:"center",variant:"caption1",children:H})]});return(0,a.jsxs)(j.A,{containerStyles:{py:{_:"84px",md:"90px"},mb:6},containerWidth:"672px",contentWidth:"384px",showPrimaryCta:!1,children:[(0,a.jsx)(S.pT,{justifyContent:"center",children:eT}),ea?eC:null,er?ev:null,ei?eE:null,ec?ej:null,e_?eA:null,eh?eS:null,eu?eI:null]})};B.defaultProps={isMyInfoExtraDataChecked:!0};let P=N(B);var Y=n(49316);let U=(0,i.Ng)(e=>({userDetails:k.$u.getUserDetails(e),geoUserDetailsInfo:k.$u.getGeoUserDetailsInfo(e),firstName:k.$u.getFirstName(e),lastName:k.$u.getLastName(e),areDetailsFromMyInfo:k.$A.isMyInfoKyc(e),myInfoPartial:k.$A.getMyInfoPartial(e),responsiveUtility:e.responsiveUtility,isMyInfoExtraDataChecked:k.$A.isMyInfoExtraDataChecked(e),accountMeta:k.AU.getAccountMetaInfo(e)}),e=>({getAccountMetaInfo:()=>e(T.mD.getAccountMeta()),setInformationOption:t=>{let{selectedOption:n,currentStep:a}=t;return e(T.Xn.setInformationOption({selectedOption:n,currentStep:a}))},updatePersonalInformation:t=>{let{userDetails:n,geoUserDetailsInfo:a,nextUrl:o,onSuccessCb:r,onFailureCb:l,currentStep:i}=t;return e(T.Xn.updatePersonalInformation({userDetails:n,geoUserDetailsInfo:a,nextUrl:o,onSuccessCb:r,onFailureCb:l,currentStep:i}))},updatePersonalInformationV2:t=>{let{userDetails:n,geoUserDetailsInfo:a,onSuccessCb:o,onFailureCb:r}=t;return e(T.Xn.updatePersonalInformationV2({userDetails:n,geoUserDetailsInfo:a,onSuccessCb:o,onFailureCb:r}))},navigate:t=>e((0,I.VC)(t))}),(e,t,n)=>({...e,...t,...n}));var z=n(80355),L=n(562),H=n(43333),M=n(73676),V=n(75521),G=n(8981),W=n(41673),q=n(87449),K=n(20734);let X=()=>{let{strings:{kyc_flow:{basic_details_section:{fill_as_per_identity_text:e}}}}=(0,E.Ym)();
1return(0,a.jsx)(S.EY,{color:"N.14",mb:6,mt:{_:6,md:4},variant:"body2",children:e})},Q={[m.XN.SG]:e=>{let{formStrings:{singapore_citizen_text:t,singapore_pr_text:n,singapore_fr_text:a,singapore_fro_text:o,fin_number_text:r,passport_number_text:l,nric_number_text:i,full_name_text:s},values:c}=e,d={citizen:t,pr:n,fr:a,fro:o};return[{key:"firstName"},{key:"lastName"},{key:"name",label:s},{key:"aliasName"},{key:"gender"},{key:"dateOfBirth"},{key:"residentialStatus",options:[{value:"citizen",label:d.citizen},{value:"pr",label:d.pr},{value:"fr",label:d.fr},{value:"fro",label:d.fro}],value:d[null==c?void 0:c.residentialStatus]},{key:"citizenship",disabled:"citizen"===c.residentialStatus},{key:"maritalStatus"},{key:"race"},{key:"identityNumber",label:(()=>{switch(null==c?void 0:c.residentialStatus){case"fr":return r;case"fro":return l;default:return i}})()},{key:"passStatus"},{key:"passType"},{key:"passExpiryDate"},{key:"passportExpiryDate"}]},[m.XN.HK]:e=>{let{values:t,formStrings:{hong_kong_citizen_text:n,hong_kong_pr_text:a,hong_kong_fr_text:o,hong_kong_fro_text:r,passport_number_text:l,HKID_number_text:i,legal_name_english_text:s}}=e,c={pr:n,fr:o,fro:r};return[{key:"name",label:s,nextLineForm:!1,cta:null},{key:"gender"},{key:"dateOfBirth"},{key:"residentialStatus",options:[{value:"pr",label:c.pr},{value:"fr",label:c.fr},{value:"fro",label:c.fro}],value:c[null==t?void 0:t.residentialStatus]}]}},$={[m.XN.SG]:e=>{let{values:t,formStrings:{country_text:n}}=e;return[{key:"country",label:n,disabled:"fr"===t.residentialStatus},{key:"city"},{key:"address"},{key:"street"},{key:"unit"},{key:"state"},{key:"zip"}]},[m.XN.HK]:e=>{let{values:t,formStrings:{country_region_text:n}}=e;return[{key:"country",label:n,...{disabled:"pr"===t.residentialStatus||"fr"===t.residentialStatus}},{key:"city"},{key:"address"},{key:"unit"},{key:"street"},{key:"state"},{key:"zip"}]}},J={[m.XN.SG]:e=>void 0,[m.XN.HK]:e=>{let{values:t,formStrings:{passport_number_text:n,HKID_number_text:a}}=e,o="pr"===t.residentialStatus||"pr"!==t.residentialStatus&&"yes"===t.localBankAccount;return[{key:"citizenship",showField:o},{key:"identityNumber",label:(()=>{switch(null==t?void 0:t.residentialStatus){case"fr":case"fro":return n;default:return a}})(),showField:o},{key:"passportExpiryDate",showField:("fr"===t.residentialStatus||"fro"===t.residentialStatus)&&o}]}};var Z=n(94653);let ee=(0,l.Ay)(S.EY).withConfig({componentId:"sc-fad386e8-0"})(["word-break:break-word;"]),et={light:{},dashboard:{},white:{text:{color:{dark:"colors.B.1",label:"colors.B.3"}}}},en=e=>{var t,n,r;let{strings:{kyc_flow:{basic_details_section:{identity_text:l,name_text:i,residential_address_text:s}},forms:{labels:{newOnboarding:c}}},geography:d}=(0,E.Ym)(),{legal_first_name_text:u,legal_last_name_text:p,dob_text:_,residential_status_text:h,citizenship_text:y,pass_expiry_date_text:f,passport_expiry_date_text:x,pass_status_text:b,pass_type_text:v,zip_text:j,address_text:I,street_address_text:T,city_text:k,unit_or_apt_text:N,unit_floor_building:w,state_text:O,district_text:F,alias_name_text:D,gender_text:R,male_text:B,female_text:P,local_bank_account_question_text:U,yes_text:L,no_text:H,marital_text:M,race_text:en}=c,{areDetailsFromMyInfo:ea,disableForm:eo,formikBag:er,handleEditClick:el,showEditButton:ei,showInAccountSettings:es,isPhone:ec,dateOfBirthError:ed,setDateOfBirthError:eu,identityNumberError:ep,setIdentityNumberError:e_,theme:em,renderResidentialDetailsOnly:eh,isSrsEnabled:ey,isMyInfoV5Enabled:eg}=e,ef=(0,A.Kb)(),ex=ef[m.gh],eb=ef[m.u8],{text:{color:{dark:eC,label:ev}}}=(0,C.Y)(em,et).componentTheme,{setFieldValue:ej,values:eE,setFieldTouched:eA,errors:eS}=er,eI=Q[d]({formStrings:c,values:eE}),eT=$[d]({formStrings:c,values:eE,countryCodes:ex,hkDistricts:eb}),ek=d===m.XN.HK?ex.hk.country:ex.sg.country,eN=J[d]({formStrings:c,values:eE}),ew=["fro","fr"].includes(eE.residentialStatus);(0,o.useEffect)(()=>{d===m.XN.SG&&("fr"===eE.residentialStatus&&ej("country",ek),"citizen"===eE.residentialStatus&&(ej("country",ek),ej("citizenship",ek))),d===m.XN.HK&&(eE.residentialStatus||(ej("residentialStatus","pr"),eA("residentialStatus",!0),eO(ej)("pr")),["pr","fr"].includes(eE.residentialStatus)&&eh&&setTimeout(()=>ej("country",ek)))},[eE.residentialStatus]),(0,o.useEffect)(()=>{eh&&(0,g.Ay)((0,z.W5)("residential_info"))},[eh]);let eO=e=>t=>{let n=[];if("citizen"===eE.residentialStatus&&n.push("citizenship"),"fr"===eE.residentialStatus&&"fr"!==t&&(n.push("passType"),n.push("passStatus")),d===m.XN.HK){if("pr"===t){n.push("passportExpiryDate");let[t]=eP(!0,m.Oo);t&&(e("citizenship",t.value),eA("citizenship",!0))}["fro","fr"].includes(t)&&n.push("citizenship")}"fro"===t&&n.push("country"),(null==eE?void 0:eE.identityNumber)&&n.push("identityNumber"),e_(""),n.forEac
1h(t=>e(t,"")),setTimeout(()=>{n.forEach(e=>eA(e,!1))})},eF=!ea&&(!es||!!eE.street),eD=eE.country===ek,eR=eE.country===ex.sg.country,eB=eE.country===ex.hk.country,eP=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.z$,n=ef[t];return(0,V.Db)(ex,e?n:[],ef.syfeTopCountryCodes)},eY={firstName:{component:W.Ay,label:u,showDetail:!1},lastName:{component:W.Ay,label:p,showDetail:!1},name:{component:W.Ay},aliasName:{component:W.Ay,label:D},gender:{component:W.l6,label:R,options:[{value:"MALE",label:B},{value:"FEMALE",label:P}]},dateOfBirth:{component:W.vM,label:_,onChange:e=>{ej("dateOfBirth",e),setTimeout(()=>{eA("dateOfBirth",!0)}),eu("")},maxDate:new Date,value:null!=(t=eE.dateOfBirth)?t:"",errorMessage:ed,calendarValueFormat:"dd/MM/yyyy",isManualAllowed:!0,shouldAutoSlash:!0},residentialStatus:{component:W.l6,label:h,onChange:eO(ej),gridColumn:{_:"span 2",md:"span 1"}},citizenship:{component:W.l6,isSearch:!0,label:y,options:"citizen"===eE.residentialStatus||"pr"===eE.residentialStatus&&d===m.XN.HK?eP(!0,m.Oo):eP(!0,m.Oo).filter(e=>e.value!==ek)},maritalStatus:{label:M,showField:ea&&!es&&ey,showEditButton:ei&&eg},race:{label:en,showField:ea&&!es&&ey},identityNumber:{component:d===m.XN.SG?W.Ay:G.A,showField:!!eE.residentialStatus,onChange:e=>{ej("identityNumber",e),e_("")},errorMessage:ep},passStatus:{component:W.Ay,label:b,showField:!1},passType:{component:W.Ay,label:v,showField:!1},passExpiryDate:{component:W.vM,label:f,showField:!!eE.residentialStatus&&"fr"===eE.residentialStatus,showDetail:"fr"===eE.residentialStatus,onChange:e=>{ej("passExpiryDate",e)},minDate:new Date,value:null!=(n=eE.passExpiryDate)?n:"",calendarValueFormat:"dd/MM/yyyy",isManualAllowed:!0,shouldAutoSlash:!0}
1,passportExpiryDate:{component:W.vM,label:x,showField:!!eE.residentialStatus&&"fro"===eE.residentialStatus,showDetail:"fro"===eE.residentialStatus,onChange:e=>{ej("passportExpiryDate",e)},minDate:new Date,value:null!=(r=eE.passportExpiryDate)?r:"",calendarValueFormat:"dd/MM/yyyy",isManualAllowed:!0,shouldAutoSlash:!0},country:{component:W.l6,isSearch:!0,options:"fro"===eE.residentialStatus?eP(!0,m.GT).filter(e=>e.value!==ek):eP(!0,m.GT),onChange:(e=>t=>{e("country",t),e("zip",""),eA("city",!1),eA("unit",!1),eA("street",!1),eA("state",!1),eA("zip",!1),t===ex.hk.country&&(e("state",""),e("zip",void 0))})(ej),gridColumnForm:d===m.XN.HK?{_:"span 1",md:"span 2"}:void 0},city:{component:W.Ay,label:k,showField:eF&&!(eR||eB),gridColumnForm:d===m.XN.HK?{_:"span 1",md:"span 2"}:void 0},address:{component:W.Ay,label:I,multiline:!0,showField:!eF},street:{component:W.Ay,label:T,multiline:!0,showField:eF},unit:{component:W.Ay,label:eE.country===ex.hk.country?w:N,showField:eF},state:eE.country===ex.hk.country?{component:W.l6,label:F,nestedOptions:(0,Z.t)(eb)}:{component:W.Ay,label:O,showField:eF&&!eR},zip:{label:j,component:W.Ay,showField:!eB,nextLine:!eD&&!ec}},eU=e=>{let{key:t}
1=e,{gridColumn:n,nextLine:o,value:r,label:l,showDetail:i,showField:s,showEditButton:c}={...eY[e.key],...e};return!1===s?null:!1!==i&&(0,a.jsxs)(a.Fragment,{children:[o?(0,a.jsx)("br",{}):null,(0,a.jsxs)(S.az,{gridColumn:n,children:[(0,a.jsxs)(S.pT,{alignItems:"center",mb:1,children:[(0,a.jsx)(S.EY,{as:"div",color:ev,variant:"caption1",children:l}),c?ez:null]}),(0,a.jsx)(ee,{color:eC,variant:"body2",children:r||eE[t]?r||eE[t]:"-"})]})]})},ez=(0,a.jsx)(S.az,{cp:!0,color:"B.7",ml:1,children:(0,a.jsx)(S.C0,{newTheme:!0,height:"18px",name:"editInfo",onClick:el,width:"18px"})}),eL=(0,a.jsxs)(S.az,{children:[(0,a.jsxs)(S.az,{display:"grid",gridColumnGap:12,gridRowGap:5,mb:5,gridTemplateColumns:{_:"minmax(0,1fr)",md:"repeat(2, minmax(0,1fr))"},children:[(0,a.jsx)(S.az,{gridColumn:{_:"span 1",md:"span 2"},mb:2,children:(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:eC,variant:"label2",children:i})}),(0,a.jsx)(S.az,{children:(0,a.jsx)(Y.D0,{component:W.Ay,id:"firstName",label:u,name:"firstName",placeholder:u})}),(0,a.jsx)(S.az,{children:(0,a.jsx)(Y.D0,{component:W.Ay,id:"lastName",label:p,name:"lastName",placeholder:p})})]}),ea&&!es?(0,a.jsx)(S.az,{mb:4,children:(0,a.jsx)(q.A,{})}):null,(0,a.jsxs)(S.az,{display:"grid",gridGap:4,gridTemplateColumns:{_:"repeat(2, minmax(0,1fr))",md:"repeat(3, minmax(0,1fr))"},children:[(0,a.jsx)(S.az,{color:eC,gridColumn:{_:"span 2",md:"span 3"},children:(0,a.jsxs)(S.pT,{justifyContent:"space-between",children:[(0,a.jsx)(S.az,{children:(0,a.jsx)(S.EY,{capitalize:!0,variant:"label2",children:l})}),ei&&!eg?ez:null]})}),eI.map(eU),(0,a.jsx)(S.az,{color:eC,gridColumn:{_:"span 2",md:"span 3"},mt:{_:6,md:5},children:(0,a.jsxs)(S.pT,{justifyContent:"space-between",children:[(0,a.jsx)(S.az,{children:(0,a.jsx)(S.EY,{capitalize:!0,variant:"label2",children:s})}),ei&&!eg?ez:null]})}),eT.map(eU)]})]}),eH=e=>{let{key:t}=e,{calendarValueFormat:n,isManualAllowed:o,placeholder:r,shouldAutoSlash:l,showField:i,nextLineForm:s,helperText:c,onChange:d,label:u,component:p,options:_,nestedOptions:m,cta:h,disabled:y,readOnly:g,minDate:f,maxDate:x,multiline:b,gridColumnForm:C,errorMessage:v,name:j,isSearch:E,dataTestId:A}={...eY[e.key],...e};return!1!==i&&(0,a.jsxs)(a.Fragment,{children:[s&&!ec?(0,a.jsx)("br",{}):null,(0,a.jsxs)(S.az,{gridColumn:C,children:[(0,a.jsx)(Y.D0,{calendarValueFormat:n,component:p,"data-testid":A,disabled:y,dropdownMaxWidth:"calc(100% - 60px)",dropDownWidth:"100%",errorMessage:v,helperText:c,id:j||t,isManualAllowed:o,isSearch:E,label:u,maxDate:x,minDate:f,multiline:b,name:j||t,nestedOptions:m,onChange:d,options:_,placeholder:r||u,readOnly:g,shouldAutoSlash:l,theme:em}),h]})]})},eM=(0,a.jsxs)(S.az,{"data-testid":"basic-details-form",children:[(0,a.jsx)(K.A,{renderOn:m.XN.HK,children:(0,a.jsx)(X,{})}),(0,a.jsxs)(S.az,{display:"grid",gridColumnGap:12,gridRowGap:5,gridTemplateColumns:{_:"minmax(0,1fr)",md:"repeat(2, minmax(0,1fr))"},children:[(0,a.jsx)(S.az,{gridColumn:{_:"span 1",md:"span 2"},mb:2,children:(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:eC,variant:"label2",children:l})}),eI.map(eH),d===m.XN.HK&&ew?(0,a.jsxs)(S.az,{gridColumn:{_:"span 1",md:"span 2"},children:[(0,a.jsx)(S.Kw,{name:"local-bank-account",onChange:e=>ej("localBankAccount",e.target.value),options:[{label:L,value:"yes"},{label:H,value:"no"}],selected:eE.localBankAccount,question:(0,a.jsx)(S.EY,{color:"N.15",variant:"body1",children:U})}),!!eS.localBankAccount&&"no"===eE.localBankAccount&&(0,a.jsx)(S.EY,{color:"ST-error",variant:"body2",children:eS.localBankAccount})]}):null,!!eN&&eN.map(eH),(0,a.jsxs)(K.A,{renderOn:m.XN.SG,children:[(0,a.jsx)(S.az,{gridColumn:{_:"span 1",md:"span 2"},mb:2,mt:4,children:(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:eC,variant:"label2",children:s})}),eT.map(eH)]})]})]});return ea||eo?eL:eM};en.defaultProps={showEditButton:!0};var ea=n(23983);let{visibilityFlags:{enableSuitabilityV2:eo}}=(0,ea.Q)(),er={[m.XN.SG]:()=>[{key:"employmentStatus"},{key:"occupation"},{key:"employer"},{key:"employerAddress"},{key:"employmentSector"},{key:"employmentPosition"}],[m.XN.HK]:()=>[{key:"employmentStatus"},{key:"occupation"},{key:"employer"},{key:"employmentSector"}]},el={[m.XN.SG]:e=>{let{formStrings:{less_than_30k_text:t,from_30k_to_60k_text:n,from_60k_to_100k_text:a,from_100k_to_200k_text:o,from_200k_to_300k_text:r,more_than_300k_text:l,less_than_50k_text:i,from_50k_to_100k_text:s,from_100k_to_250k_text:c,from_250k_to_500k_text:d,from_500k_to_1m_text:u,more_than_1m_text:p}}=e;return[{key:"annualIncome",options:[{value:"Less than 30,000",label:t},{value:"30,001 - 60,000",label:n},{value:"60,001 - 100,000",label:a},{value:"100,001 - 200,000",label:o},{value:"200,001 - 300,000",label:r},{value:"more than 300,000",label:l}]},...eo?[{key:"netLiquidAsset",options:[{value:"LESS_THAN_50000",label:i},{value:"IS_BETWEEN_50000_TO_100000",label:s},{value:"IS_BETWEEN_100001_TO_250000",label:c},{value:"IS_BETWEEN_250001_TO_500000",label:d},{value:"IS_BETWEEN_500001_TO_1000000",label:u},{value:"GREATER_THAN_1000000",label:p}]}]:[{key:"totalInfoWorth",options:[{value:"Less than 50,000",label:i},{value:"50,001 - 100,000",label:s},{value:"100,001 - 250,000",label:c}
1,{value:"250,001 - 500,000",label:d},{value:"500,001 - 1,000,000",label:u},{value:"more than 1,000,000",label:p}]}],{key:"sourceOfWealth"},{key:"otherSourceOfWealth"}]},[m.XN.HK]:e=>{let{formStrings:{less_than_180k_text:t,from_180k_to_360k_text:n,from_360k_to_600k_text:a,from_600k_to_1200k_text:o,from_1200k_to_1500k_text:r,more_than_1500k_text:l,less_than_300k_text:i,from_300k_to_600k_text:s,from_600k_to_1500k_text:c,from_1500k_to_3m_text:d,from_3m_to_6m_text:u,from_6m_to_8m_text:p,more_than_8m_text:_}}=e;return[{key:"annualIncome",options:[{value:"Less than 180,000",label:t},{value:"180,000 to 360,000",label:n},{value:"360,001 to 600,000",label:a},{value:"600,001 to 1,200,000",label:o},{value:"1,200,001 to 1,500,000",label:r},{value:"More than 1,500,000",label:l}]},{key:"totalInfoWorth",options:[{value:"Less than 300,000",label:i},{value:"300,001 to 600,000",label:s},{value:"600,001 to 1,500,000",label:c},{value:"1,500,001 to 3,000,000",label:d},{value:"3,000,001 to 6,000,000",label:u},{value:"6,000,001 - 8,000,000",label:p},{value:"More than 8,000,000",label:_}]},{key:"sourceOfWealth"},{key:"otherSourceOfWealth"}]}},ei={employed:"Employed",selfEmployed:"Self employed",notEmployed:"Not employed",retired:"Retired"},es={employment:"Employment",dividends:"Dividend income",inheritance:"Inheritance / Gift",business:"Business",investments:"Investments",other:"Other"},ec={light:{},dashboard:{text:{color:{dark:"colors.BT.2",label:"colors.B.1"}}},white:{text:{color:{dark:"colors.B.1",label:"colors.N.14"}}}},ed=e=>{let{areDetailsFromMyInfo:t,disableForm:n,formikBag:r,showInAccountSettings:l,isPhone:i,theme:c,myInfoPersonalDetails:u,isMyInfoV5Enabled:p}=e,_=(0,A.Kb)(),[m,h]=(0,o.useState)(!1),{strings:{general:{learn_more_cta:y},kyc_flow:{singpass_text:g,employment_section:{employment_caption:f,income_caption:x,learn_more_assets_popup:{info_caption:b,info_v2_caption:v,info_text:j,info_v2_text:I}}},forms:{labels:{newOnboarding:T}}},geography:k}=(0,E.Ym)();(0,o.useEffect)(()=>{d.k.addSpanEvent(s.e.MOBILE_VERIFICATION_OTP,"Employee details page loaded"),d.k.endSpan(s.e.MOBILE_VERIFICATION_OTP)},[]);let{visibilityFlags:{enableSuitabilityV2:N}}=(0,ea.Q)(k),{employment_status_text:w,employed_text:O,self_employed_text:F,not_employed_text:D,retired_text:R,occupation_text:B,employer_name_text:P,employer_address_text:U,employment_sector_text:z,position_text:L,annual_income_text:H,total_liquid_asset_text:M,net_liquid_asset_text:V,source_of_wealth_text:G,employment_text:q,dividend_income_text:K,inheritance_text:X,business_text:Q,investments_text:$,other_text:J,other_source_text:Z,select_status_text:ee,select_sector_text:et,select_source_of_wealth:en,select_range_text:eo,select_occupation_text:ed,enter_designation_text:eu}=T,ep=(0,C.Y)(c,ec),{values:e_}=r;e_&&!e_.sourceOfWealth&&(e_.sourceOfWealth=[]);let em=[ei.employed,ei.selfEmployed].includes(e_.employmentStatus),{text:{color:{dark:eh,label:ey}}}=ep.componentTheme,eg=e_&&(e_.employmentStatus||e_.occupation||e_.employer||e_.employmentSector),ef=e_&&(e_.annualIncome||e_.totalInfoWorth||e_.sourceOfWealth.length>0||e_.otherSourceOfWealth),ex=er[k](),eb=el[k]({formStrings:T}),eC=[{value:es.employment,label:q},{value:es.dividends,label:K},{value:es.inheritance,label:X},{value:es.business,label:Q},{value:es.investments,label:$},{value:es.other,label:J}],ev={employmentStatus:{component:W.l6,onChange:e=>{var t;!(null==(t=e_.sourceOfWealth)?void 0:t.length)&&[ei.employed,ei.selfEmployed].includes(e)&&(r.setFieldValue("sourceOfWealth",[es.employment]),setTimeout(()=>r.setFieldTouched("sourceOfWealth",!0)))},options:[{value:ei.employed,label:O},{value:ei.selfEmployed,label:F},{value:ei.notEmployed,label:D},{value:ei.retired,label:R}],label:w,placeholder:ee},occupation:{component:W.l6,isSearch:!0,options:_.occupationOptions,label:B,showField:em,placeholder:ed,disabled:p&&(null==u?void 0:u.occupation)&&t},employer:{component:W.Ay,label:P,showField:em,disabled:p&&(null==u?void 0:u.employer)&&t},employerAddress:{component:W.Ay,label:U,showField:em,multiline:!0},employmentSector:{component:W.l6,isSearch:!0,options:_.employmentSectorOptions,label:z,showField:em,placeholder:et,disabled:p&&(null==u?void 0:u.employmentSector)&&t},employmentPosition:{component:W.Ay,label:L,showField:em,placeholder:eu},annualIncome:{label:H,component:W.l6,placeholder:eo},...N?{netLiquidAsset:{component:W.l6,label:V,helperText:y,placeholder:eo}}:{totalInfoWorth:{component:W.l6,label:M,helperText:y,placeholder:eo}},sourceOfWealth:{component:W.l6,renderValue:e=>e.map(e=>{let t=eC.find(t=>t.value===e);return null==t?void 0:t.label}).join(", "),label:G,options:eC,multiple:!0,placeholder:en},otherSourceOfWealth:{component:W.Ay,label:Z,showField:e_.sourceOfWealth&&e_.sourceOfWealth.includes(es.other)}},ej=e=>0!==e_[e].length?e_[e].map((t,n)=>"".concat(t).concat(n!==e_[e].length-1?", ":"")):"-",eE=e=>{let{key:t}=e,{label:n,multiple:o}={...ev[t],...e},r="-";if(o)r=ej(t);else if("netLiquidAsset"===t){let e=eb.find(e=>e.key===t),n=e&&e.options,a=n&&n.length&&n.find(e=>e.value===e_[t]);r=a&&a.label}else r=e_[t];
1return(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{color:ey,variant:"caption1",children:n}),(0,a.jsx)(S.EY,{color:eh,mt:1,variant:"body2",children:r})]})},eA=(l||eg)&&(0,a.jsxs)(S.az,{children:[(0,a.jsxs)(S.az,{color:eh,mb:4,mt:10,children:[(0,a.jsx)(S.EY,{capitalize:!0,variant:"label2",children:f}),!!(t&&!l)&&(0,a.jsxs)(S.EY,{variant:"overline",children:[" ",g]})]}),(0,a.jsx)(S.az,{display:"grid",gridGap:l?4:6,gridTemplateColumns:{_:"repeat(2, minmax(0,1fr))",md:"repeat(3, minmax(0,1fr))"},children:ex.map(eE)})]}),eS=e=>{let{key:t}=e,{showField:n,nextLineForm:o,component:r,multiple:l,styles:i,multiline:s,options:d,label:u,renderValue:p,isSearch:_,onChange:m,helperText:g,placeholder:f,disabled:x}={...ev[t],...e};return(null==n||n)&&(0,a.jsxs)(a.Fragment,{children:[!!o&&(0,a.jsx)("br",{}),(0,a.jsxs)(S.az,{...i,children:[(0,a.jsx)(Y.B0,{component:r,disabled:x,id:t,isSearch:_,label:u,multiline:s,multiple:l,name:t,onChange:m,options:d||[],placeholder:f||u,renderValue:p||null,theme:c}),!!g&&(0,a.jsx)(S.$n,{"data-testid":"learn-more-cta",fillType:"text",mb:{_:0,md:-5},onClick:()=>h(!0),px:3,py:1,children:(0,a.jsx)(S.EY,{capitalize:!0,variant:"label2",children:y})})]})]})},eI=(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:eh,mb:{_:4,md:6},variant:"label2",children:f}),(0,a.jsx)(S.az,{display:"grid",gridColumnGap:12,gridRowGap:5,gridTemplateColumns:{_:"minmax(0,1fr)",md:"repeat(2, minmax(0, 1fr))"},children:ex.map(eS)})]}),eT=(l||ef)&&(0,a.jsxs)(S.az,{my:6*!l,children:[(0,a.jsx)(S.az,{color:eh,mb:4,mt:10,children:(0,a.jsx)(S.EY,{capitalize:!0,variant:"label2",children:x})}),(0,a.jsx)(S.az,{display:"grid",gridGap:4,gridTemplateColumns:{_:"repeat(2, minmax(0,1fr))",md:"repeat(3, minmax(0,1fr))"},children:eb.map(eE)})]}),ek=(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:eh,mb:{_:4,md:6},mt:6,variant:"label2",children:x}),(0,a.jsx)(S.az,{display:"grid",gridColumnGap:12,gridRowGap:5,gridTemplateColumns:{_:"minmax(0,1fr)",md:"repeat(2, minmax(0, 1fr))"},children:eb.map(eS)})]});return(0,a.jsxs)(S.az,{"data-testid":"employee-details-form",children:[n?eA:eI,n?eT:i?e_.employmentStatus&&ek:ek,(0,a.jsx)(S.az,{children:m?(0,a.jsx)(S.aF,{"data-testid":"learn-more-modal",onClose:()=>h(!1),title:N?v:b,children:(0,a.jsx)(S.EY,{color:"B.1",variant:"body2",children:N?I:j})}):null})]})};var eu=n(29243);let ep=(0,l.Ay)(S.lO).withConfig({componentId:"sc-cb1b83d0-0"})(["&&&{border-color:",";","}"],(0,r.y)("componentTheme.table.color.row.border"),e=>e.hideBorder&&"border: none;"),e_=(0,l.Ay)(S.lO).withConfig({componentId:"sc-cb1b83d0-1"})(["&&&{border:none;}"]),em=(0,l.Ay)(S.az).withConfig({componentId:"sc-cb1b83d0-2"})(["background:",";padding:","px ","px;margin:0 -","px;@media (min-width:","){margin:0 -","px;padding:","px ","px;background:",";}"],(0,r.y)("componentTheme.table.color.row.phoneHighlighted"),(0,r.y)("space.3"),(0,r.y)("space.6"),(0,r.y)("space.6"),(0,r.y)("breakpoints.md"),(0,r.y)("space.4"),(0,r.y)("space.3"),(0,r.y)("space.4"),(0,r.y)("componentTheme.table.color.row.highlighted")),eh={light:{},dashboard:{},white:{text:{color:{dark:"colors.B.1",light:"colors.B.3"}},button:{type:"primary"},table:{color:{row:{highlighted:"colors.W.1",phoneHighlighted:"colors.W.2",border:"colors.B.6"},cell:{text:"colors.B.3",number:"colors.B.1"}}}}},ey=e=>{let{strings:{kyc_flow:{income_details_section:{assessable_income_text:t,assessment_text:n,amount_text:r,cpf_account_balance_text:l,information_text:i,cpf_contribution_history_text:s,duration_text:c,employer_contribution_text:d,for_month_text:u,paid_on_text:p,show_less_text:_,show_more_text:m,no_data_available_text:h}}}}=(0,E.Ym)(),{userDetails:y,theme:g}=e,f=(0,C.Y)(g,eh),{text:{color:{dark:x,light:b}},button:{type:v},table:{color:{cell:{text:j,number:A}}}}=f.componentTheme,[I,T]=(0,o.useState)(!1),k=y&&(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:x,mb:3,variant:"label2",children:t}),(0,a.jsxs)(S.XI,{children:[(0,a.jsxs)(e_,{className:"row no-gutters",pb:1,pt:0,children:[(0,a.jsx)(S.D1,{left:!0,className:"col-6",children:(0,a.jsx)(S.EY,{c
1olor:b,variant:"caption1",children:n})}),(0,a.jsx)(S.D1,{right:!0,className:"col-6",children:(0,a.jsx)(S.EY,{color:b,variant:"caption1",children:r})})]}),(0,a.jsxs)(ep,{className:"row no-gutters",py:0,theme:f,children:[(0,a.jsx)(S.Nr,{left:!0,className:"col-6",tag:"div",children:(0,a.jsx)(S.EY,{color:A,variant:"body2",children:(null==y?void 0:y.assessmentYear)||"-"})}),(0,a.jsx)(S.Nr,{right:!0,className:"col-6",tag:"div",children:(0,a.jsx)(S.EY,{color:A,variant:"body2",children:(null==y?void 0:y.assessableIncome)?(0,M.PN)(String(null==y?void 0:y.assessableIncome)):"-"})})]})]})]}),N=y&&(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:x,mb:3,variant:"label2",children:l}),(0,a.jsxs)(S.XI,{children:[(0,a.jsxs)(e_,{className:"row no-gutters",pb:3,pt:0,children:[(0,a.jsx)(S.D1,{left:!0,className:"col-7",children:(0,a.jsx)(S.EY,{color:b,variant:"caption1",children:i})}),(0,a.jsx)(S.D1,{right:!0,className:"col-5",children:(0,a.jsx)(S.EY,{color:b,variant:"caption1",children:r})})]}),(0,a.jsx)(S.pT,{flexDirection:"column",gap:3,children:[{key:"oa",label:"Ordinary Account (OA)"},{key:"sa",label:"Special Account (SA)"},{key:"ma",label:"Medisave Account (MA)"},{key:"ra",label:"Retirement Account (RA)"}].map(e=>(0,a.jsxs)(ep,{hideBorder:!0,className:"row no-gutters",py:0,theme:f,children:[(0,a.jsx)(S.Nr,{left:!0,className:"col-7",tag:"div",children:(0,a.jsx)(S.EY,{color:j,variant:"body2",children:e.label})}),(0,a.jsx)(S.Nr,{right:!0,className:"col-5",tag:"div",children:(0,a.jsx)(S.EY,{color:A,variant:"body2",children:(null==y?void 0:y.cpfBalances)&&(null==y?void 0:y.cpfBalances[e.key])?(0,M.PN)(String(null==y?void 0:y.cpfBalances[e.key])):"-"})})]},e.key))})]})]}),w=(e,t)=>(0,a.jsxs)(ep,{className:"row no-gutters",py:3,theme:f,children:[(0,a.jsx)(S.Nr,{left:!0,className:"col-7",tag:"div",children:(0,a.jsx)(S.EY,{color:j,variant:"body2",children:e.employer})}),(0,a.jsx)(S.Nr,{right:!0,className:"col-5",tag:"div",children:(0,a.jsx)(S.EY,{color:A,variant:"body2",children:e.amount?(0,M.PN)(String(e.amount)):"-"})}),(0,a.jsx)(S.Nr,{left:!0,className:"col-7",tag:"div",children:(0,a.jsx)(S.EY,{color:j,mt:1,variant:"body2",children:(0,eu.default)(new Date(e.month),"MMM yyyy")})}),(0,a.jsx)(S.Nr,{right:!0,className:"col-5",tag:"div",children:(0,a.jsx)(S.EY,{color:j,mt:1,variant:"body2",children:(0,eu.default)(new Date(e.date),"dd MMM yyyy")})})]},"table-row-".concat(t)),O=e=>e.slice().reverse(),F=y&&(0,a.jsxs)(S.az,{children:[(0,a.jsxs)(S.az,{color:x,mb:3,children:[(0,a.jsx)(S.EY,{capitalize:!0,as:"div",mb:3,variant:"label2",children:s}),(0,a.jsx)(S.EY,{variant:"caption1",children:c})]}),(0,a.jsxs)(S.XI,{children:[(0,a.jsxs)(em,{className:"row no-gutters",theme:f,children:[(0,a.jsx)(S.D1,{left:!0,className:"col-7",children:(0,a.jsx)(S.EY,{color:x,variant:"body2",children:d})}),(0,a.jsx)(S.D1,{right:!0,className:"col-5",children:(0,a.jsx)(S.EY,{color:x,variant:"body2",children:r})}),(0,a.jsx)(S.D1,{left:!0,className:"col-7",children:(0,a.jsx)(S.EY,{color:b,mt:1,variant:"caption1",children:u})}),(0,a.jsx)(S.D1,{right:!0,className:"col-5",children:(0,a.jsx)(S.EY,{color:b,mt:1,variant:"caption1",children:p})})]}),y.cpfContributionHistory&&y.cpfContributionHistory.length>0?(0,a.jsxs)(a.Fragment,{children:[O(y.cpfContributionHistory).slice(0,3).map((e,t)=>w(e,t)),I?(0,a.jsxs)(a.Fragment,{children:[O(y.cpfContributionHistory).slice(3).map((e,t)=>w(e,t)),(0,a.jsx)(ep,{className:"row no-gutters",pb:0,pt:2,theme:f,children:(0,a.jsx)(S.$n,{fillType:"text",mx:"auto",onClick:()=>T(!1),type:v,children:_})})]}):(0,a.jsx)(ep,{className:"row no-gutters",pb:0,pt:2,theme:f,children:(0,a.jsx)(S.$n,{fillType:"text",mx:"auto",onClick:()=>T(!0),type:v,children:(0,E.GW)(m,{totalRows:y.cpfContributionHistory.length-3})})})]}):(0,a.jsx)(S.az,{p:6,children:(0,a.jsx)(S.EY,{as:"div",color:j,textAlign:"center",variant:"body1",children:h})})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(q.A,{}),(0,a.jsxs)(S.pT,{flexDirection:"column",gap:{_:8,md:10},mt:{_:4,md:10},children:[k,N,F]})]})};var eg=n(14335);let ef={light:{},dashboard:{}
1,white:{text:{color:{dark:"colors.B.1"}}}},ex=()=>{},eb=e=>{let t=e.pathname.split("/"),n=t[t.length-1];return"personal-info"===n?"basic":n},eC=U(e=>{let{myInfoPartial:t,onModalClose:n,onUpdateSuccess:r,disableForm:l,showInModal:p,showInAccountSettings:_,updatePersonalInformation:f,updatePersonalInformationV2:x,nextUrl:v,userDetails:I,setMyInfoOptionChanged:T,setInformationOption:N,accountMeta:w,getAccountMetaInfo:O,myInfoOptionChanged:F,responsiveUtility:D,isMyInfoExtraDataChecked:R,theme:B,areDetailsFromMyInfo:P,geoUserDetailsInfo:U,navigate:V,firstName:G,lastName:W,currentStep:q}=e,{strings:{general:{cancel_cta:K,proceed_cta:X,go_back_cta:Q},kyc_flow:{get_started_section:{singpass_under_maintenance_popup:{singpass_under_maintenance_content_text:$}},personal_details_section:{refill_via_singpass_cta:J,edit_confirmation_popup:{edit_confirmation_content_text:Z},refill_popup:{refill_popup_content_text:ee,verify_with_singpass_cta:et,keep_editing_cta:ea}}},errors:eo},currentLang:er}=(0,E.Ym)(),el=(0,i.d4)(e=>e.router.location),ei=(0,i.d4)(k.$u.getUserId),{trackClickFn:es}=(0,c.A)({shouldTrackPageLoad:!0}),ec=es("Personal Info"),eu=(0,i.d4)(k.$u.getMyInfoPersonalDetails),ep=(0,i.d4)(e=>k.AU.getIsFeatureEnabled(e,"MYINFO_V5")),e_=(0,C.Y)(B,ef),em=(0,A.Kb)()[m.gh],{text:{color:{dark:eh}}}=e_.componentTheme,{isPhone:eC}=D,[ev,ej]=(0,o.useState)(!1),[eE,eA]=(0,o.useState)(!1),[eS,eI]=(0,o.useState)(!1),[eT,ek]=(0,o.useState)(""),[eN,ew]=(0,o.useState)(""),[eO,eF]=(0,o.useState)({}),eD=eb(el)||"basic";(0,b.A)(y.gfi),(0,o.useEffect)(()=>{t&&V(y.HyN.GET_STARTED)},[t]),(0,o.useEffect)(()=>{let e=I?{...I,...ep&&{employmentSector:(null==I?void 0:I.employmentSector)||(null==eu?void 0:eu.employmentSector),occupation:(null==I?void 0:I.occupation)||(null==eu?void 0:eu.occupation),employer:(null==I?void 0:I.employer)||(null==eu?void 0:eu.employer)}}:{};if(I&&I.year&&I.month&&I.date){let t=(0,M.SS)(I.date),n=(0,M.SS)(L.K.indexOf(I.month)+1),a=I.year;e.dateOfBirth="".concat(t,"/").concat(n,"/").concat(a)}if(I&&I.passportExpiryDate){let[t,n,a]=I.passportExpiryDate.split("-");e.passportExpiryDate="".concat(a,"/").concat(n,"/").concat(t)}if(I&&I.passExpiryDate){let[t,n,a]=I.passExpiryDate.split("-");e.passExpiryDate="".concat(a,"/").concat(n,"/").concat(t)}P&&I&&I.country&&(I.city=I.country),U&&I&&(e.geoUserDetailsInfo=U),G&&(e.firstName=G),W&&(e.lastName=W),(I||G||W)&&eF({...e,localBankAccount:"yes"})},[eD,I]),o.useEffect(()=>{w||O()},[w]);let eR=()=>{n&&n(),r&&r()},eB=e=>{var t;let n=null==e||null==(t=e.response)?void 0:t.data;switch(null==n?void 0:n.code){case H.mo:ew(eo.date_of_birth_error_text);break;case H.e6:let a=null==n?void 0:n.message;a&&ek(a)}let o=document.querySelector(".Mui-error");o instanceof HTMLElement&&o.scrollIntoView({behavior:"smooth"})},eP=(e,t)=>{let[n,a,o]=e.dateOfBirth?e.dateOfBirth.split("/"):[];if(e.date=t?String(parseInt(n)):n,e.month=L.K[a-1],e.year=o,delete e.dateOfBirth,e.passportExpiryDate){let[t,n,a]=e.passportExpiryDate.split("/");e.passportExpiryDate="".concat(a,"-").concat(n,"-").concat(t)}if(e.passExpiryDate){let[t,n,a]=e.passExpiryDate.split("/");e.passExpiryDate="".concat(a,"-").concat(n,"-").concat(t)}return e},eY=(e,t)=>{let a;ec("".concat(eD," Next button"));let o={basic:s.e.BASIC_DETAILS,income:s.e.INCOME_DETAILS,residential:s.e.RESIDENTIAL_DETAILS,employment:s.e.EMPLOYMENT_DETAILS}[eD];if(d.k.startSpan(o),d.k.setSpanAttributes(o,(0,u.fQ)(ei,m.XN.SG)),"residential"===eD&&(0,g.Ay)((0,z.xO)("residential_info_click","next_click")),l&&p){n&&n();return}delete e.localBankAccount,e=eP(e,P),I&&(e.country!==I.country||e.citizenship!==I.citizenship)&&delete e.taxInformation,"basic"===eD&&(e.identityNumber=e.identityNumber.trim(),"Singapore"!==e.country||P||(e.state=e.city="Singapore"),a={...null==e?void 0:e.geoUserDetailsInfo},e.geoUserDetailsInfo&&delete e.geoUserDetailsInfo),"steps"===t?f({userDetails:{...e,confirmResidentialAddress:!1},geoUserDetailsInfo:a,nextUrl:v,onFailureCb:eB,currentStep:q}):(d.k.endSpan(o),x({userDetails:{...e,confirmResidentialAddress:!1},geoUserDetailsInfo:a,onSuccessCb:eR,onFailureCb:eB}))},eU=()=>{P?ej(!0):w&&!w.features.MY_INFO?eI(!0):eA(!0)},ez=()=>{eI(!1)},eL=async()=>{var e;T(!1),eA(!1);let t=(null==w||null==(e=w.features)?void 0:e.MYINFO_V5)?"v5":"v3",n=await (0,h.w)(t);
1window.open(n,"_self","noopener")},eH=()=>ej(!1),eM=(0,a.jsx)(S.QE,{onModalClose:eH,onPrimaryCtaClick:()=>{ej(!1),T(!0),N({selectedOption:"manual",currentStep:"getStarted"})},onSecondaryCtaClick:eH,primaryCtaText:X,secondaryCtaText:K,showSecondaryCta:!0,children:(0,a.jsx)(S.EY,{as:"div",color:eh,variant:"subtitle3",children:Z})}),eV=(0,a.jsx)(S.QE,{onModalClose:()=>eA(!1),onPrimaryCtaClick:eL,onSecondaryCtaClick:()=>eA(!1),primaryCtaText:et,secondaryCtaFillType:"text",secondaryCtaText:ea,showSecondaryCta:!0,children:(0,a.jsx)(S.EY,{as:"div",color:eh,variant:"subtitle3",children:ee})}),eG=(0,a.jsx)(S.QE,{onModalClose:ez,onPrimaryCtaClick:ez,primaryCtaText:Q,children:(0,a.jsx)(S.EY,{as:"div",color:eh,variant:"subtitle3",children:$})});return(0,a.jsxs)("div",{children:[(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:eO,validateOnMount:!0,validationSchema:p?(0,eg.d)("allDetails",er,eo,em):(0,eg.d)(eD,er,eo,em),children:e=>{let{values:t}=e;return(0,a.jsx)(a.Fragment,{children:!p&&!_&&(0,a.jsxs)(j.A,{onPrimaryCtaClick:()=>eY(t,"steps"),onSecondaryCtaClick:eU,secondaryCtaText:J,showSecondaryCta:F,isPrimaryCtaDisabled:!(0,eg.d)(eD,er,eo,em).isValidSync(t),...["basic","income"].includes(eD)&&P?{containerWidth:"672px",contentWidth:"582px"}:{},children:["basic"===eD&&(0,a.jsx)(en,{areDetailsFromMyInfo:P,dateOfBirthError:eN,formikBag:e,handleEditClick:eU,identityNumberError:eT,isMyInfoV5Enabled:ep,isPhone:eC,isSrsEnabled:w.features.SRS_PORTFOLIO,setDateOfBirthError:ew,setIdentityNumberError:ek,theme:B}),"income"===eD&&R?(0,a.jsx)(ey,{theme:B,userDetails:I}):null,"employment"===eD&&(0,a.jsx)(ed,{areDetailsFromMyInfo:P,formikBag:e,isMyInfoExtraDataChecked:R,isMyInfoV5Enabled:ep,isPhone:eC,myInfoPersonalDetails:eu,theme:B}),"residential"===eD&&(0,a.jsx)(en,{renderResidentialDetailsOnly:!0,areDetailsFromMyInfo:!1,dateOfBirthError:"",formikBag:e,handleEditClick:ex,identityNumberError:"",isMyInfoV5Enabled:ep,isPhone:eC,onAddressCheckboxToggle:ex,setDateOfBirthError:ex,setIdentityNumberError:ex,theme:B})]})})}}),ev?eM:null,eE?eV:null,eS?eG:null]},eD)});var ev=n(18847),ej=n.n(ev),eE=n(89099),eA=n(98948),eS=n(46513),eI=n(9756),eT=n(47582),ek=n(88545),eN=n(92760),ew=n(99345),eO=n(33363),eF=n(6247),eD=n(1600),eR=n(90327),eB=n(33510);let eP={src:"/_next/static/media/gift.133f22d3.png",height:21,width:21,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAALVBMVEUAb08Ab04Abk0Ab09MaXEAcVAAbk4AbUwAbU0Abk4AbUoAbUsAbU0Ac1EAfFhs/u0OAAAADXRSTlN7wMpKAKo/NohXHSrifxf5ugAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAADhJREFUeJxFxskRgEAMBLH2sd4LT/7hUsUHvUTmrROZ3Nr+rFkM9Yfl5m7mHNgTgpAMaRDdRvefFz3IAbgTZOYMAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8};function eY(e){let{promoCode:t,portfolio:n}=e,{strings:{forms:{labels:{signup_form:{code_applied_text:o,get_started_with_text:r}}}}}=(0,E.Ym)();return t||n?(0,a.jsxs)(S.az,{bg:"W.2",borderColor:"#6F79AD4D",borderRadius:3,borderStyle:"solid",borderWidth:"1px",p:3,children:[!!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:"#49547B",mb:1,variant:"label6",children:r}),(0,a.jsx)(S.EY,{as:"div",color:"#49547B",variant:"subtitle2",children:n.cardTitle})]}),t&&n&&(0,a.jsx)(S.az,{bg:"#D5D7E1",height:"1px",my:3}),t&&(0,a.jsxs)(S.pT,{alignItems:"center",gap:3,justifyContent:"space-between",children:[(0,a.jsxs)(S.pT,{alignItems:"center",gap:2,children:[(0,a.jsx)(S._V,{alt:"gift",height:"10px",mb:"2px",src:eP,width:"10px"}),(0,a.jsx)(S.EY,{as:"div",color:"#006E4E",variant:"caption1",children:(0,a.jsx)(E.In,{components:{bold:(0,a.jsx)(S.EY,{capitalize:!0,variant:"label3"})},str:o,values:{promoCode:t}})})]}),(0,a.jsx)(S._V,{alt:"Validation icon",height:"12px",src:eB.A,width:"12px"})]})]}):null}var eU=n(43027);let ez=(0,i.Ng)(e=>({responsiveUtility:e.responsiveUtility,errorCode:k.o_.getErrorCode(e),errorMessage:k.o_.getErrorMessage(e),fieldErrorObj:k.o_.getFieldErrorObj(e),privacyPolicyUrl:k.AU.getPrivacyPolicyUrl(e),termsAndConditionsUrl:k.AU.getTermsAndConditionsUrl(e),clientInfo:k.AU.selectClientInfoData(e)}),e=>({goBack:()=>e((0,I.OE)()),resetOtpState:()=>e((0,eU.$V)()),signup:(t,n,a,o,r)=>e(T.I2.signup(t,n,a,o,r))}),(e,t,n)=>({...e,...t,...n}));var eL=n(85560),eH=n(49504),eM=n(78916);let eV={[m.XN.SG]:{PRE_SIGNUP_CONFIG:{introUrl:(e,t)=>
1(0,eM.M)(e,t)},STRINGS:e=>{let{account_created_popup_text:t}=e;return{confirmationMessage:"",confirmationHeading:t}},getFormFields:e=>{let{strings:t}=e;return[{name:"email",default:"",type:"email",label:t.email_text,placeholder:t.field_placeholder.email_text},{name:"password",default:"",type:"password",label:t.password_text,placeholder:t.field_placeholder.password_text},{name:"subscribeToMarketingCommunications",default:!0,type:"checkbox",label:t.marketing_updates_text}]},getValidationSchema:e=>{let{errors:t}=e;return eL.Ik().shape({email:eL.Yj().required(t.required_field).email(t.valid_email_text),password:(0,eH.nw)(t)})}},[m.XN.HK]:{PRE_SIGNUP_CONFIG:{introUrl:(e,t)=>(0,eM.M)(e,t)},STRINGS:e=>{let{thank_you_text:t,thank_you_caption:n}=e;return{confirmationMessage:n,confirmationHeading:t}},getFormFields:e=>{let{strings:t}=e;return[{name:"email",default:"",type:"email",label:t.email_text,placeholder:t.field_placeholder.email_text},{name:"password",default:"",type:"password",label:t.password_text,placeholder:t.field_placeholder.password_text},{name:"promoCode",default:"",type:"text",label:"",placeholder:t.field_placeholder.promo_field_text},{name:"subscribeToMarketingCommunications",default:!1,type:"checkbox",label:t.marketing_updates_text}]},getValidationSchema:e=>{let{errors:t}=e;return eL.Ik().shape({email:eL.Yj().email(t.valid_email_text).required(t.required_field),password:(0,eH.nw)(t)})}}};var eG=n(10014),eW=n(50650);let eq=ej()(()=>Promise.resolve().then(n.bind(n,52619)),{loadableGenerated:{webpack:()=>[52619]},ssr:!1}),eK=(0,l.Ay)(S.Sc).withConfig({componentId:"sc-260985a7-0"})(["display:inline-block;"]),eX=(0,l.Ay)(e=>(0,a.jsx)(S.A,{...e})).withConfig({componentId:"sc-260985a7-1"})(["&:hover{color:",";}"],e=>(0,r.y)("colors.".concat(e.color))(e)),eQ=ez(function(e){let t=(0,i.wA)(),n=(0,eE.useRouter)(),r=(0,f.vA)(n),{strings:{errors:l,general:{sign_up_cta:c,social_auth:u},forms:{labels:{signup_form:h,signup_form:{caption:x,investors_text:b,login_instead_text:C,tnc_text:v,marketing_updates_text:j,deactivated_text:A,field_placeholder:I,email_text:T,password_text:k,apply_text:N}}}},geographyConstants:w,geography:O}=(0,E.Ym)(),F=eV[O],[D,R]=(0,o.useState)(!1),[B,P]=(0,o.useState)(),U=eT.getItem(eS.Ff),L=r.promoCode||r.promo_code||U,M=F.getFormFields({strings:{email_text:T,password_text:k,marketing_updates_text:j,field_placeholder:I}}),V=F.getValidationSchema({errors:l}),G=M.reduce((e,t)=>(e[t.name]=t.default,e),{}),[W,q]=(0,ew.A)(!1),{fieldErrorObj:X,signup:Q,errorCode:$,errorMessage:J,privacyPolicyUrl:Z,termsAndConditionsUrl:ee}=e,et=eT.getItem(eS.Ze)||null,[en,eo]=(0,o.useState)({...X}),er=r.theme,el=(0,eN.A)(),ei=(0,eN.A)("theme"),es=er?ei:el,ec=(null==es?void 0:es.portfolioType)?m.Qz.OTHER:m.Qz.VARIANT,{visibilityFlags:{enableGoogleSignUp:ed,enableAppleSignUp:eu}}=(0,ea.Q)(O),ep=O===m.XN.HK,e_=O===m.XN.SG,em=o.useMemo(()=>({signupBtn:(0,p.WZ2)(ec),loginBtn:(0,p.lW9)(ec),privacyPolicyBtn:(0,z.eT)(),termsAndConditionsBtn:(0,z.QV)()}),[ec]),eh=e=>(0,eF.Dg)(e)?m.jv.PROTECTED_USD:m.jv.CUSTOM_USD;(0,o.useEffect)(()=>{L&&eT.putItem(eS.Ff,L)},[L]),(0,o.useEffect)(()=>{L&&t((0,eW.validateNewUserPromo)(L,e=>{R(!0)},()=>{R(!1)}))},[L]);let ey=e=>{t((0,eW.validateNewUserPromo)(e,t=>{R(!0),eT.putItem(eS.Ff,e)},e=>{var t,n,a;R(!1),P(null!=(a=null==e||null==(n=e.response)||null==(t=n.data)?void 0:t.message)?a:l.try_again_error),eT.removeItem(eS.Ff)}))},eg=(0,o.useCallback)(async(a,o)=>{let i;eA.A.info("Signup started",{test:2}),d.k.startSpan(s.e.SIGNUP),es&&(i={isThemePortfolio:!!er,type:er?eh(er):es.portfolioType,theme:"THEME"===er?null:er});let c=r.utm_source,u=r.user_id,m=r.offer_uuid,f=c&&u&&m?{utmSource:null==c?void 0:c.toUpperCase(),partnerUserId:u,offerId:m}:null,x={firstName:a.firstName,lastName:a.lastName,email:a.email,pendingPortfolioCreation:i,partner:et,subscribeToMarketingCommunications:!!a.subscribeToMarketingCommunications,raFlowVersion:2,choosePortfolioPositioningVersion:ec,...a.idToken?{idToken:a.idToken}:{},...a.password?{password:a.password}:{},...L&&D?{promoCode:L}:{},...ep?{onboardingFlowType:"HK_ONB_IMPR"}:{},...e_?{rewardsPartner:f}:{}},b={showConfirmationAlert:!0,confirmationMessage:F.STRINGS(h).confirmationMessage,confirmationHeading:F.STRINGS(h).confirmationHeading,confirmationTheme:"white",confirmationAlertTime:3e3};d.k.setSpanAttributes(s.e.SIGNUP,{method:o}),d.k.addSpanEvent(s.e.SIGNUP,"Sign up started",i),Q(o,x,()=>{e.resetOtpState(),(0,ek.Ai)(eI._),eT.removeItem("promoCode"),eT.removeItem(eS.Ff),(0,g.Ay)((0,p.w59)("")()),(0,g.lt)(_.v.ONBOARDING_SIGNUP);let t=y.gfi;"incomeComposition"===r.from&&(t+="?from=incomeComposition"),d.k.addSpanEvent(s.e.SIGNUP,"Signup successful",{nextUrl:t}),n.push(t)},e=>{d.k.endSpan(s.e.SIGNUP,e),console.error(e),t((0,eG.showToast)(l.try_again_error))},b)},[ec,er,r,es,et,Q,D]);(0,o.useEffect)(()=>{(0,g.Ay)({action:"create_account_screen_load",category:"sign_up",label:ec}),eA.A.info("Create account page loaded",{test:2})},[ec]),(0,o.useEffect)(()=>{eo({...X})},[X]);let ef=()=>{Object.keys(en).length&&eo({})},ex=o.useCallback((e,t)=>{eg({...e,password:""},t)},[eg]),eb=o.useCallback(e=>{console.error(e)},[]);return(0,a.jsxs)(S.az,{children:[(0,a.jsxs)(S.az,{mb:6,children:[(0,a.jsx)(S.EY,{capitalize:!0,as:"h2",color:"B.1",mb:4,variant:"hLine2",children:(0,a.jsx)(E.In,{str:x,c
1omponents:{br:(0,a.jsx)("br",{}),Fancy:(0,a.jsx)(S.EY,{textTransform:"none",variant:"price1Italic"})}})}),(0,a.jsx)(K.A,{renderOn:m.XN.SG,children:(0,a.jsx)(S.EY,{color:"B.1",variant:"subtitle2",children:b})})]}),(0,a.jsx)(S.az,{mb:{_:6,md:7},children:(0,a.jsx)(eY,{portfolio:es,promoCode:D?L:null})}),(0,a.jsx)(Y.l1,{validateOnMount:!0,initialValues:G,onSubmit:e=>eg(e,"email"),validationSchema:V,children:e=>{let{values:t,errors:n,handleChange:o,isValid:r,handleSubmit:l,touched:i,handleBlur:s}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eD.A,{onChange:ef}),(0,a.jsx)(S.az,{mb:8,children:M.map((e,r)=>{if("checkbox"===e.type)return(0,a.jsx)(S.az,{mb:4*(r!==M.length-1),children:(0,a.jsx)(eK,{defaultChecked:e.default,name:e.name,onToggle:o,value:t[e.name],label:(0,a.jsx)(S.EY,{color:"B.3",variant:"caption1",children:e.label})})},r);if("promoCode"===e.name){if(D)return null;let n=!t.promoCode||B;return(0,a.jsx)(S.az,{mb:4*(r!==M.length-1),children:(0,a.jsx)(S.pd,{error:!!B,errorText:B,id:e.name,label:e.label,name:e.name,onBlur:s,placeholder:e.placeholder,type:e.type,value:t[e.name],icon:(0,a.jsx)(S.az,{cp:!0,mr:2,children:(0,a.jsx)(S.EY,{color:n?"B.4":"B.7",variant:"label2",children:N})}),onChange:e=>{P(""),o(e)},onIconClick:()=>!n&&ey(t.promoCode)})},r)}let l=en[e.name]?J:null,c=i[e.name]&&n[e.name],d=l||c,u="password"===e.name,p=u&&W?"text":e.type;return(0,a.jsxs)(S.az,{mb:4*(r!==M.length-1),children:[(0,a.jsx)(S.pd,{error:u?!!l:!!d,errorText:u?l:d,id:e.name,label:e.label,name:e.name,onBlur:s,onChange:o,placeholder:e.placeholder,showHelper:!u,type:p,value:t[e.name],...u?{onIconClick:q,icon:(0,a.jsx)(S.az,{cp:!0,mr:2,children:(0,a.jsx)(S.C0,{height:"16px",name:W?"eye":"eyeCross",width:"16px"})})}:{}}),u?(0,a.jsx)(S.az,{mb:4,mt:2,children:(0,a.jsx)(eR.A,{password:t.password})}):null]},r)})}),(0,a.jsx)(S.$n,{analyticsInfo:em.signupBtn,disabled:!r,onClick:l,type:"submit",width:"100%",children:c})]})}}),$===H.Bd&&(0,a.jsx)(S.pT,{justifyContent:"center",mt:4,children:(0,a.jsxs)(S.EY,{c
1olor:"R.2",variant:"caption1",children:[A," ",(0,a.jsx)(S.EY,{as:eX,color:"R.2",href:"mailto:"+w.links.SYFE_CONTACT_EMAIL,textDecoration:"underline",children:w.links.SYFE_CONTACT_EMAIL})]})}),eu||ed?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.az,{my:3,children:(0,a.jsx)(S.JE,{})}),ed?(0,a.jsx)(S.pT,{justifyContent:"center",mb:4*!!eu,width:"100%",children:(0,a.jsx)(eO._e,{onError:eb,onGoogleSignIn:e=>ex(e,"google"),text:"signup_with"})}):null,eu?(0,a.jsx)(S.pT,{justifyContent:"center",children:(0,a.jsx)(eq,{onAppleSignIn:e=>ex(e,"apple"),onError:eb,text:u.sign_up_with_apple_text})}):null]}):null,(0,a.jsxs)(S.az,{mt:14,textAlign:"center",children:[(0,a.jsx)(S.az,{mb:5,textAlign:"center",children:(0,a.jsx)(S.EY,{as:eX,color:"B.2",onClick:()=>(0,g.Ay)(em.loginBtn),to:y.S3J,variant:"body1",children:(0,a.jsx)(E.In,{components:{Highlight:(0,a.jsx)(S.EY,{color:"B.7",variant:"label2"})},str:C})})}),(0,a.jsx)(S.EY,{color:"B.3",variant:"caption1",children:(0,a.jsx)(E.In,{str:v,components:{TNCLink:(0,a.jsx)(S.EY,{as:eX,color:"B.3",href:ee,onClick:()=>(0,g.Ay)(em.termsAndConditionsBtn),textDecoration:"underline"}),PPLink:(0,a.jsx)(S.EY,{as:eX,color:"B.3",href:Z,onClick:()=>(0,g.Ay)(em.privacyPolicyBtn),textDecoration:"underline"})}})})]})]})});var e$=n(22215);let eJ=(0,i.Ng)(e=>({emailToken:k.o_.getEmailToken(e)||(0,f.V8)(e.router.location.search,"emailToken"),email:k.o_.getEmail(e)||(0,f.V8)(e.router.location.search,"email"),updatedEmail:k.o_.getUpdatedEmail(e),errorMessage:k.HI.getErrorMessage(e),resendWaitTime:k.HI.getResendWaitTime(e),otpSuccess:k.HI.getOtpSuccess(e),isWealthOnboardingCompleted:k.$u.isWealthOnboardingCompleted(e),responsiveUtility:e.responsiveUtility,location:e.router.location}),e=>({generateEmailOTP:t=>e(T.pE.generateLoginOTP(t,"EMAIL_VERIFICATION")),validateEmailOTP:(t,n,a,o,r,l)=>e(T.pE.validateLoginOTP(t,n,a,"EMAIL_VERIFICATION",o,r,"SMS",l)),redirectToLoginPage:()=>{(0,e$.h)()?e((0,I.HC)(y.sJi.LOGIN)):e((0,I.HC)(y.S3J))},goBack:()=>e((0,I.OE)()),navigate:t=>e(e=>{e((0,I.VC)(t))}),clearOtpErrorMessage:()=>e((0,eU.CZ)())}),(e,t,n)=>({...e,...t,...n}));var eZ=n(15022);let e0=(0,l.Ay)(S.az).withConfig({componentId:"sc-6cdcf9-0"})(["text-align:center;position:relative;z-index:1;&:before{border-top:1px solid ",";content:'';position:absolute;top:50%;left:0;right:0;bottom:0;z-index:-1;}"],(0,r.y)("colors.B.4"));function e1(){var e,t;let{strings:{auth_page:{email_otp_page:{income_composition_popup:{continue_onboarding_cta:n,or_text:o,view_composition_cta:r,continue_text:l}}}}}=(0,E.Ym)(),i=(0,A.Kb)(),s=(0,eE.useRouter)();return(0,a.jsxs)(S.aF,{modalMaxWidth:"445px",showCloseIcon:!1,styles:{px:{_:8,md:16},pb:8},children:[(0,a.jsx)(S.pT,{mb:3,mt:"auto",children:(0,a.jsx)(S._V,{alt:"income-icon",height:"80px",mx:"auto",width:"80px",src:null==i||null==(t=i.portfolioByType)||null==(e=t[m.jv.INCOME_PRESERVE])?void 0:e[0].iconV2})}),(0,a.jsx)(S.EY,{as:"div",color:"B.1",mb:6,textAlign:"center",variant:"price4",children:l}),(0,a.jsx)(S.$n,{onClick:()=>{s.push("".concat(y.XgN,"?type=INCOME_PRESERVE&from=incomeComposition"))},size:"md",width:{_:"100%",md:"312px"},children:r}),(0,a.jsx)(e0,{mx:{_:-5,md:-10},px:{_:5,md:10},children:(0,a.jsx)(S.az,{bg:"G.1",display:"inline-flex",my:7,px:4,children:(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:"B.4",textAlign:"center",variant:"caption1",children:o})})}),(0,a.jsx)(S.$n,{onClick:()=>{s.push(y.u12(y.HyN.GET_STARTED))},size:"md",width:{_:"100%",md:"312px"},children:n})]})}let e2="#7CC576",e6=(0,l.Ay)(eZ.g).withConfig({componentId:"sc-c5f288fb-0"})(["margin:auto;display:flex;flex-direction:column;align-items:center;padding-top:","px;padding-bottom:","px;"],(0,r.y)("space.6"),(0,r.y)("space.6")),e4=(0,l.Ay)(S.pT).withConfig({componentId:"sc-c5f288fb-1"})(["height:50px;width:50px;color:",";border:3px solid ",";border-radius:100%;"],e2,e2),e3=eJ(e=>{let{email:t,updatedEmail:n,validateEmailOTP:r,redirectToLoginPage:l,generateEmailOTP:i,emailToken:c,sendOtpOnMount:u,resendWaitTime:_,errorMessage:m,responsiveUtility:{isPhone:h},otpSuccess:b,clearOtpErrorMessage:C}=e,v=(0,eE.useRouter)(),{strings:{onboarding:{email_verification_page:{caption:j}},auth_page:{email_otp_page:I},forms:{labels:T},general:{manulife:{signup_page:{header_text:k}}={signup_page:{}}}},localeCode:N}=(0,E.Ym)(),w=(0,A.Kb)(),[O,F]=(0,o.useState)(""),[D,R]=(0,o.useState)(!1),[B,P]=(0,o.useState)(!1),Y=w&&w.isRaFlowVersion2,U=(0,e$.h)();(0,o.useEffect)(()=>{let e=document.getElementsByClassName("help-desk");if(h&&e&&(null==e?void 0:e[0]))return e[0].style.display="none",()=>{(null==e?void 0:e[0])&&(e[0].style.display="block")}},[h]),(0,o.useEffect)(()=>{c?u&&i(c):l()},[]),(0,o.useEffect)(()=>{d.k.addSpanEvent(s.e.SIGNUP,"Email verification page loaded"),d.k.endSpan(s.e.SIGNUP)},[]);let z=async()=>{c&&(await i(c),R(!1))},L=async t=>{d.k.startSpan(s.e.EMAIL_VERIFICATION);let a=(0,f.ZH)(e.location.search,"from","incomeComposition"),o=(0,f.V8)(e.location.search,"redirectUrl"),l="".concat(y.Vkm,"/").concat(y.HyN.GET_STARTED,"?email=verified");U&&(l="".concat(y.sJi.ACCOUNT_SETUP,"/").concat(y.HyN.MOBILE_VERIFICATION,"?email=verified")),a&&(l=null),o&&(l=o),t.stopPropagation(),t.preventDefault();let i={showConfirmationAlert:!0,confirmationMessage:"",confirmationHeading:I.email_verified_text,confirmationTheme:Y?"white":"dashboard"};c&&((0,g.Ay)((0,p.hC8)()),r(c,t.target.value,l,n,i,()=>{a&&P(!0),d.k.addSpanEvent(s.e.EMAIL_VERIFICATION,"Email verification successful",{nextRoute:l})}))},H=e=>{let{value:t}=e.target;F(t),4===t.length&&(e.target.blur(),L(e))}
1,M=D?(0,a.jsx)(S.az,{children:(0,a.jsx)(S.EY,{color:"G.2",variant:"button1",children:"00:00"})}):(0,a.jsx)(S.M4,{onTimeUp:()=>{R(!0)},theme:"white",time:_||30,type:"linear"},_),V=Y&&(0,a.jsx)(S.az,{cp:!0,color:"B.3",pl:2,children:(0,a.jsx)(S.C0,{height:"16px",name:"pen",onClick:()=>{(0,g.Ay)({action:"edit_button_click",category:"verify_email"}),C();let e="".concat(y.hk7,"?email=").concat(n||t);U&&(e="".concat(y.sJi.SIGNUP_EDIT_EMAIL,"?email=").concat(n||t)),v.push(e)},width:"16px"})}),G=(0,a.jsx)(S.az,{border:"none",borderColor:"B.5",borderLeft:"1px solid",height:"20px",width:"1px"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eO.iK,{onBackClick:v.back,title:U?k:j}),(0,a.jsxs)(S.pT,{alignItems:"center",flexDirection:"column",justifyContent:"center",maxWidth:{_:"auto",md:"360px"},mt:{_:10,md:20},mx:{_:6,md:"auto"},children:[(0,a.jsx)(S.az,{mb:{_:6,md:13},children:(0,a.jsx)(E.In,{str:I.enter_verification_text,components:{captionComponent:(0,a.jsx)(S.EY,{color:"B.1",textAlign:"center",variant:"body2"}),emailWrapperComponent:(0,a.jsx)(S.pT,{alignItems:"center",justifyContent:"center",mt:2}),emailTextComponent:(0,a.jsx)(S.EY,{color:"B.3",variant:"body2"}),emailEditComponent:V},values:{emailVal:n||t||""}})}),(0,a.jsx)(S.az,{mb:6,width:"100%",children:(0,a.jsx)(S.pd,{autoFocus:!0,error:!!m,errorText:m,fillType:"outlined",id:"otp",label:T.email_otp_container.otp_text,name:"otp",onChange:e=>{let{value:t}=e.target;if(t){let n=t&&t[t.length-1].toString();n<="9"&&n>="0"&&t.length<5&&H(e)}else H(e)},placeholder:T.email_otp_container.placeholder_text,theme:"light",type:"number",value:O})}),(0,a.jsxs)(S.pT,{alignItems:"center",justifyContent:"center",mb:2,children:[(0,a.jsx)(S.$n,{analyticsInfo:(0,p.DsB)(),disabled:!D,fillType:"text",onClick:()=>{z()},size:"sm",variant:"secondary",children:I.resend_code_text}),G,(0,a.jsx)(S.az,{mx:5,children:M})]}),(0,a.jsx)(S.pT,{justifyContent:"center",children:(0,a.jsx)(S.$n,{analyticsInfo:(0,p.w$W)(),fillType:"text",onClick:()=>(0,x.An)(N),size:"sm",type:"primary",children:(0,a.jsx)(S.EY,{color:"B.7",variant:"body2",children:I.need_help_text})})})]}),b&&(0,a.jsx)(eZ.A,{children:(0,a.jsxs)(e6,{children:[(0,a.jsx)(S.az,{mb:1,children:(0,a.jsx)(S.EY,{color:"N.15",variant:"subtitle1",children:I.awesome_text})}),(0,a.jsx)(S.EY,{color:"N.15",variant:"caption1",children:I.email_verification_success_text}),(0,a.jsx)(e4,{alignItems:"center",justifyContent:"center",mt:3,children:(0,a.jsx)(S.C0,{height:"50px",name:"tick",width:"50px"})})]})}),B&&(0,a.jsx)(e1,{})]})}),e5=e=>eL.Ik().shape({email:eH.au(e)}),e7=(0,i.Ng)(e=>({responsiveUtility:e.responsiveUtility,emailToken:k.o_.getEmailToken(e)||(0,f.V8)(e.router.location.search,"emailToken"),errorMessage:k.HI.getErrorMessage(e),updatedEmail:k.o_.getUpdatedEmail(e)}),e=>({generateEmailVerificationOTP:(t,n,a,o,r)=>e(T.pE.generateEmailVerificationOTP(t,n,a,o,r))})),e8=e=>{let{emailToken:t,updatedEmail:n,generateEmailVerificationOTP:r,responsiveUtility:l,errorMessage:i}=e,s=(0,eE.useRouter)(),{strings:{errors:c,onboarding:{email_verification_page:{caption:d}},auth_page:{edit_email_page:{email_placeholder_text:u,update_btn_text:p,update_email_text:_,email_updated_text:m}},general:{manulife:{signup_page:{header_text:h}}={signup_page:{}}}}}=(0,E.Ym)(),{isPhone:f}=l,x=(0,e$.h)();(0,o.useEffect)(()=>{let e=document.getElementsByClassName("help-desk");if(f&&e&&(null==e?void 0:e[0]))return e[0].style.display="none",()=>{(null==e?void 0:e[0])&&(e[0].style.display="block")}},[f]),(0,o.useEffect)(()=>{if(!t){let e=y.S3J;x&&(e=y.sJi.LOGIN),s.push(e)}},[t,x,s]);let b=e5(c);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eO.iK,{onBackClick:s.back,title:x?h:d}),(0,a.jsxs)(S.pT,{alignItems:"center",flexDirection:"column",justifyContent:"center",maxWidth:{_:"auto",md:"360px"},mt:{_:10,md:20},mx:{_:6,md:"auto"},children:[(0,a.jsx)(S.EY,{color:"B.1",mb:{_:10,md:16},variant:"subtitle2",children:_}),(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:{email:n||""},onSubmit:e=>{(0,g.Ay)({action:"update_button_click",category:"update_email_clicks"}),r(t,e.email,()=>{let e=y.gfi;x&&(e=y.sJi.SIGNUP_EMAIL_VERIFICATION),s.push(e)},()=>{},{confirmationHeading:m,confirmationMessage:"",showConfirmationAlert:!0})},validationSchema:b,children:e=>{let{values:t,handleBlur:n,handleSubmit:o,handleChange:r,errors:l,touched:s,isValid:c}=e,d=i||s.email&&l.email;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.az,{mb:10,width:"100%",children:(0,a.jsx)(S.pd,{error:!!d,errorText:d,label:u,name:"email",onBlur:n,onChange:r,value:t.email})}),(0,a.jsx)(S.$n,{disabled:!c,onClick:o,children:p})]})}})]})]})};e8.defaultProps={email:""};let e9=e7(e8);n(8262),n(76830);var te=n(81444);let tt=e=>{let{mobileCountryCode:t,mobileNumber:n,sendOTP:r,validateOTP:l,onSuccessfulVerification:c,goBack:_,onEditClick:h,navigate:f,initialError:x,hideResendSmsCta:b}=e,C=(0,i.d4)(k.$u.getUserId),[v,j]=(0,o.useState)(""),[A,I]=(0,o.useState)(""),[T,N]=(0,o.useState)(!1),[w,O]=(0,o.useState)(0),[F,D]=(0,o.useState)(!1),[R,B]=(0,o.useState)(!1),{strings:{general:{otp_section:{receive_otp_phone_text:P,receive_otp_sms_text:Y,receive_otp_whatsapp_text:U,whatsapp_otp_cta:z,whatsapp_blocking_text:L}},onboarding:{mobile_verification_page:{otp_section:{mobile_verified_successfully_text:H,enter_otp_text:M,resend_otp_cta:V,get_voice_otp_cta:G}}},forms:{labels:{mobile_verification_section:{otp_code_text:W}}}},geography:q}=(0,E.Ym)(),{visibilityFlags:{enableVoiceOtp:K}}=(0,ea.Q)(q),X=(0,i.d4)(e=>k.AU.getIsFeatureEnabled(e,"WHATSAPP_OTP"));(0,o.useEffect)(()=>{d.k.addSpanEvent(s.e.MOBILE_VERIFICATION,"OTP form loaded"),d.k.endSpan(s.e.MOBILE_VERIFICATION),x&&(I(x),N(!0))},[]);let Q=e=>{var t,n,a;d.k.endSpan(s.e.MOBILE_VERIFICATION_OTP,e),e.response&&I(e.response.data.message);let o=(null==e||null==(a=e.response)||null==(n=a.data)||null==(t=n.details)?void 0:t.waitTime)||30;o&&(O(o),N(!1))},$=(0,a.jsx)(E.In,{str:H,components:{infoTextComponent:(0,a.jsx)(S.EY,{as:"span",color:"B.7",variant:"h4"}),mobileNumComponent:(0,a.jsx)(S.EY,{as:"span",color:"BT.6",variant:"h4"})},values:{mobileNum:"+".concat(t," ").concat(n)}}),J=e=>{d.k.startSpan(s.e.MOBILE_VERIFICATION_OTP),d.k.setSpanAttributes(s.e.MOBILE_VERIFICATION_OTP,(0,u.fQ)(C,m.XN.SG)),(0,g.Ay)((0,p.nMp)()),l(t,n,e,c,Q,{showConfirmationAlert:!0,confirmationMessage:$,confirmationTheme:"white"},R?"WHATSAPP":F?"CALL":"SMS")},Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"SMS",a="CALL"===e||!0===e,o="WHATSAPP"===e;D(a),B(o),await r(t,n,null,Q,{showConfirmationAlert:!0,confirmationIsNotification:!0,confirmationMessage:a?P:o?U:Y,confirmationTheme:"light"},e||"SMS"),N(!1)},ee=e=>{let{value:t}=e.target;
1j(t),4===t.length&&(e.target.blur(),J(t))},et=T?(0,a.jsx)(S.az,{children:(0,a.jsx)(S.EY,{color:"G.2",variant:"button1",children:"00:00"})}):(0,a.jsx)(S.M4,{onTimeUp:()=>{N(!0)},theme:"white",time:w||30,type:"linear"}),en=(0,a.jsx)(S.az,{color:"BT.5",cp:"pointer",pl:2,children:(0,a.jsx)(S.C0,{height:"16px",name:"pen",onClick:()=>{h(),(0,g.Ay)({action:"edit_button_click",category:"verify_mobile_otp"}),f("".concat(y.g97,"?step=form"))},width:"16px"})});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.az,{mb:14,children:(0,a.jsx)(E.In,{str:M,components:{captionComponent:(0,a.jsx)(S.EY,{color:"B.1",textAlign:"center",variant:"body1"}),motpWrapperComponent:(0,a.jsx)(S.pT,{alignItems:"center",justifyContent:"center",mt:1}),mobileNumComponent:(0,a.jsx)(S.EY,{variant:"subtitle3"}),motpEditComponent:en},values:{mobileNum:"(+".concat(t,") ").concat(n)}})}),(0,a.jsx)(S.az,{width:"100%",children:(0,a.jsx)(S.pd,{autoFocus:!0,error:!!A,errorText:A,fillType:"outlined",label:W,name:"otp",onChange:e=>{let{value:t}=e.target;if(t){let n=t&&t[t.length-1].toString();n<="9"&&n>="0"&&t.length<5&&ee(e)}else ee(e)},onKeyDown:e=>"e"===e.key&&e.preventDefault(),placeholder:"Enter code",theme:"light",type:"number",value:v})}),(0,a.jsxs)(S.pT,{alignItems:"center",flexWrap:"wrap",justifyContent:"center",rowGap:1,mt:{md:8,_:6},children:[!b&&(0,a.jsx)(S.$n,{analyticsInfo:(0,p.NEg)(),disabled:!T,fillType:"text",onClick:()=>{Z("SMS")},px:4,size:"sm",variant:"primary",children:V}),K&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.az,{border:"none",borderColor:"B.1",borderLeft:"1px solid",height:"20px",width:"1px"}),(0,a.jsx)(S.$n,{disabled:!T,fillType:"text",onClick:()=>{Z("CALL")},px:4,size:"sm",variant:"primary",children:G})]}),X&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.az,{border:"none",borderColor:"B.1",borderLeft:"1px solid",height:"20px",width:"1px"}),(0,a.jsx)(S.$n,{disabled:!T,fillType:"text",onClick:()=>{Z("WHATSAPP")},px:4,size:"sm",variant:"primary",children:z})]}),(0,a.jsx)(S.az,{border:"none",borderColor:"B.1",borderLeft:"1px solid",height:"20px",width:"1px"}),(0,a.jsx)(S.az,{mx:4,children:et})]}),X&&(0,a.jsx)(S.EY,{as:"div",color:"B.3",mt:2,textAlign:"center",variant:"caption1",children:(0,a.jsx)(E.In,{str:L,components:{highlight:(0,a.jsx)(S.EY,{as:"span",color:"B.3",fontWeight:"600",variant:"caption1"})}})})]})};var tn=n(53873),ta=n(4717),to=n(69258);let tr=e=>{let{alreadyRegistered:t,onFormSubmit:n,handleMobileNumberChange:o,onCountryChange:r,formProps:l}=e,{strings:{onboarding:{mobile_verification_page:{verification_form_section:{get_code_cta:i,mobile_already_registered_text:s}}},forms:{labels:{mobile_verification_section:c}},errors:d}}=(0,E.Ym)(),{values:u}=l,_=(0,A.Kb)(),{syfeCountryCodes:h={},syfeTopCountryCodes:y=[]}=_,g=_[m.gh],f=_[m.z$],x=(0,V.Ss)(g,f),b=(0,tn.k)(c),C=(0,V.jQ)(b.country(x).options,y.map(e=>{var t;return null==(t=h[e])?void 0:t.code})),v=t&&u.mobile?s:l.errors.mobile;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S.pT,{alignItems:"flexStart",mb:10,children:[C.length&&(0,a.jsx)(S.az,{flex:.3,position:"relative",children:(0,a.jsx)(to.A,{...(0,ta.A)("country",b.country(x).label,{},l),fillType:"outlined",id:"country",onChange:r,options:C,renderValue:e=>"+".concat(e),theme:"light",value:u.country})}),(0,a.jsx)(S.az,{flex:.7,ml:2,children:(0,a.jsx)(S.pd,{...(0,ta.A)("mobile",b.mobile.label,{},l),error:!!v,errorText:v,fillType:"outlined",id:"mobile",onChange:e=>o(e.target.value),onKeyDown:e=>"e"===e.key&&e.preventDefault(),placeholder:b.mobile.label,theme:"light",type:"number"})})]}),(0,a.jsx)(S.$n,{analyticsInfo:(0,p.nMp)(),disabled:!(0,tn.d)(d).isValidSync(u),onClick:n,width:"100%",children:i})]})},tl=(0,i.Ng)(e=>({user:k.$u.getUser(e),kycDetails:k.$u.getMobileDetails(e),mobileAlreadyRegistered:k.$A.getMobileAlreadyRegistered(e),location:e.router.location}),e=>({updateKYCInformation:t=>{let{kycDetails:n,nextUrl:a,currentStep:o}=t;return e(T.Xn.updateKYCInformation({kycDetails:n,nextUrl:a,currentStep:o}))},refreshUserInfo:()=>e(T.zV.getUserInfo()),sendOTP:function(t,n,a,o,r){let l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"SMS";return e(T.pE.sendOTP(t,n,a,o,r,l))},validateOTP:function(t,n,a,o,r,l){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"SMS";return e(T.pE.validateOTP(t,n,a,o,r,l,i))},showToast:t=>e(T.v_.showToast(t)),navigate:t=>e((0,I.VC)(t)),replace:t=>e((0,I.HC)(t)),goBack:()=>e((0,I.OE)())}),(e,t,n)=>({...e,...t,...n}))(e=>{let{mobileAlreadyRegistered:t,showToast:n,sendOTP:r,validateOTP:l,updateKYCInformation:c,refreshUserInfo:p,kycDetail
1s:_,nextUrl:h,navigate:x,title:C,subtitle:v,currentStep:j,location:A,replace:I,goBack:T}=e,{strings:{errors:N},geographyConstants:{defaultMobileCode:w}}=(0,E.Ym)(),O=(0,i.d4)(k.$u.getUserId),[F,D]=(0,o.useState)(_.mobileCountryCode||w),[R,B]=(0,o.useState)(_.mobileNumber||""),[P,U]=(0,o.useState)(_.mobileVerified),[z,L]=(0,o.useState)(t),[M,V]=(0,o.useState)(""),[G,W]=(0,o.useState)(!1),q=(0,f.V8)(A.search,"step"),[K,X]=(0,o.useState)(q),Q=(0,eE.useRouter)(),$=(0,f.Hm)(Q);(0,o.useEffect)(()=>{A.search&&A.search.includes("step=")||Q.replace({pathname:$,query:{step:"form"}}),d.k.addSpanEvent(s.e.BASIC_DETAILS,"Mobile verification page loaded"),d.k.endSpan(s.e.BASIC_DETAILS)},[]),(0,b.A)(y.gfi);let J=e=>{W(!1),V(""),window.history.pushState({},null,"?step=otp-verification"),X("otp-verification")},Z=e=>{if(d.k.endSpan(s.e.MOBILE_VERIFICATION,e),e.response&&409===e.response.status)L(!0);else if(e.response&&e.response.status==H.Yq){var t,a;V((null==(a=e.response)||null==(t=a.data)?void 0:t.message)||""),W(!0),window.history.pushState({},null,"?step=otp-verification"),X("otp-verification")}else n(e.response&&e.response.data&&e.response.data.message||"Something went wrong")},ee=e=>{d.k.startSpan(s.e.MOBILE_VERIFICATION),d.k.setSpanAttributes(s.e.MOBILE_VERIFICATION,(0,u.fQ)(O,m.XN.SG)),e.stopPropagation(),e.preventDefault(),L(t),A.pathname===y.g97&&(0,g.Ay)({action:"update_button_click",category:"update_mobile_clicks"}),r(F,R,J,Z)},et=e=>{B(e),L(!1)},en=e=>{D(e)},ea=()=>{U(!0),L(!1),p(),c({kycDetails:{mobileCountryCode:F,mobileNumber:R,mobileVerified:P},nextUrl:h,currentStep:j})},eo=()=>{D(F||w),B(R||"")};return(R||"otp-verification"!==K||I("".concat(y.Dct,"?step=form")),K)?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Y.l1,{enableReinitialize:!0,isInitialValid:e=>(0,tn.d)(N).isValidSync(e),validationSchema:(0,tn.d)(N),initialValues:{country:F,mobile:R},children:e=>(0,a.jsxs)(S.az,{maxWidth:{md:"360px"},mt:{_:7,md:20},mx:"auto",px:{_:6,md:0},children:[!K||"form"===K&&(0,a.jsx)(tr,{alreadyRegistered:z,formProps:e,handleMobileNumberChange:et,onCountryChange:en,onFormSubmit:ee,subtitle:v,title:C}),"otp-verification"===K&&(0,a.jsx)(tt,{goBack:T,hideResendSmsCta:G,initialError:M,mobileCountryCode:F,mobileNumber:R,navigate:x,onEditClick:eo,onSuccessfulVerification:ea,sendOTP:r,validateOTP:l})]})})}):(0,a.jsx)(te.k,{showLoader:!0})});var ti=n(19600);let ts=e=>{let{nextUrl:t}=e,n=(0,i.d4)(k.$u.getMobileDetails),o=(0,eE.useRouter)(),{strings:{onboarding:{mobile_verification_page:{mobile_otp_success_section:{mobile_verified_successfully_text:r}}}}}=(0,E.Ym)();return(0,a.jsx)(eO.mO,{onPrimaryCtaClick:()=>o.push(t),showBorderBox:!1,children:(0,a.jsxs)(S.pT,{alignItems:"center",flexDirection:"column",justifyContent:"center",mt:20,children:[(0,a.jsx)(S._V,{alt:"success",height:"75px",lazyLoad:!1,src:ti.A,width:"84px"}),(0,a.jsx)(S.EY,{color:"B.1",textAlign:"center",variant:"body1",children:(0,a.jsx)(E.In,{str:r,components:{captionComponent:(0,a.jsx)(S.az,{mt:10}),mobileNumComponent:(0,a.jsx)(S.EY,{variant:"label1"}),brElement:(0,a.jsx)("br",{})},values:{mobileNum:"+".concat((null==n?void 0:n.mobileCountryCode)||""," (").concat((null==n?void 0:n.mobileNumber)||"",")")}})})]})})},tc=(0,i.Ng)((e,t)=>{let{theme:n}=t,a={...k.$u.getUserDetails(e)};return"dashboard"===n&&delete a.taxInformation,{userDetails:a,detailsOption:k.$A.getDetailsOption(e),responsiveUtility:e.responsiveUtility,isMyInfoKyc:k.$A.isMyInfoKyc(e),isTinNotRequired:k.$u.getIsTinNotRequired(e)}},e=>({updatePersonalInformation:t=>{let{userDetails:n,nextUrl:a,currentStep:o,onFailureCb:r}=t;return e(T.Xn.updatePersonalInformation({userDetails:n,nextUrl:a,currentStep:o,onFailureCb:r}))},updateTaxInfo:(t,n)=>e(T.Xn.updateTaxInfo(t,n)),getUserInfo:t=>e(T.zV.getUserInfo({nextUrl:t}))}),(e,t,n)=>({...e,...t,...n})),td=e=>{let{tin_text:t,country_region_text:n,tin_not_issued_text:a,unable_to_obtain_tin_text:o,tin_not_required_text:r,not_employed_text:l,minor_under_law_text:i,others_text:s,other_reason_text:c,yes_text:d,no_text:u}=e;return{taxResidenceCountryAvailablity:{type:"radio",label:"",options:[{label:d,value:"yes"},{label:u,value:"no"}]},taxResidenceCountry:(e,t,a)=>({type:"select",options:(0,V.Db)(e,t,a),label:n}),tinAvailablity:{type:"RadioQuestion",label:"",options:[{label:d,value:"yes"},{label:u,value:"no"}]},tin:{type:"input",label:t,options:[]},reason:{type:"radio",label:"",options:[{label:a,value:"Country/jurisdiction does not issue TIN"},{label:o,value:"Unable to obtain a TIN or equivalent number"},{label:r,value:"TIN is not required"}]},tinUnavailabilityReason:{type:"radio",label:"",options:[{label:l,value:"Not employed in the country"},{label:i,value:"A minor under the law of the country"},{label:s,value:"Others"}]},tinUnavailabilityOtherReason:{type:"input",label:c,options:[]}}};var tu=n(3164),tp=n(94763);let t_=(0,l.Ay)(S.az).withConfig({componentId:"sc-beb0d7fc-0"})(["border:",";border-radius:","px;"],e=>"1px solid ".concat((0,r.y)("colors.".concat(e.borderColor))(e)),(0,r.y)("radii.4")),tm=(0,l.Ay)(S.az).withConfig({componentId:"sc-beb0d7fc-1"})(["margin-bottom:","px !important;"],e=>e.addBottomMargin?(0,r.y)("space.2")(e):0),th=(0,l.Ay)(S.az).withConfig({componentId:"sc-beb0d7fc-2"})(["margin-bottom:","px !important;"],e=>e.addBottomMargin?(0,r.y)("space.6")(e):0),ty=(0,l.Ay)(S.az).withConfig({componentId:"sc-beb0d7fc-3"})(["&:not(:last-child){padding-bottom:",";border-bottom:",";}"],e=>e.showBorder?"".concat((0,r.y)("space.6"),"px"):0,e=>e.showBorder?"1px solid ".concat((0,r.y)("colors.N.10")):"none"),tg=l.Ay.ul.withConfig({componentId:"sc-beb0d7fc-4"})(["margin-top:","px;padding-left:","px;li::before{content:' ';border-radius:50%;display:inline-block;margin-right:","px;margin-left:-1em;background:",";width:5px;height:5px;}"],(0,r.y)("space.4"),(0,r.y)("space.4"),(0,r.y)("space.2"),e=>(0,r.y)("colors.".concat(e.bulletColor))(e)||e.bulletColor),tf=(0,l.Ay)(S.az).withConfig({componentId:"sc-beb0d7fc-5"})(["border-bottom:1px solid ",";margin:","px 0px;"],(0,r.y)("colors.B.6"),(0,r.y)("space.6")),tx=(0,l.Ay)(e=>(0,a.jsx)(S.A,{...e})).withConfig({componentId:"sc-beb0d7fc-6"})(["color:",";&:hover{color:",";}"],(0,r.y)("colors.B.7"),(0,r.y)("colors.B.7")),tb={light:{}
1,dashboard:{text:{color:{dark:"colors.BT.2",gray:"colors.BT.4"}},note:{text:"colors.BT.4",background:"#0000"},button:{type:"secondary",mobilePrimaryCtaWidth:"100%"},link:{color:{syfeEmail:"colors.secondary.6"}},box:{border:"B.4"}},white:{text:{color:{dark:"colors.B.1",gray:"colors.N.14"}},note:{text:"colors.N.15",background:"colors.N.1"},button:{type:"primary",mobilePrimaryCtaWidth:null},link:{color:{syfeEmail:"colors.BT.5"}},box:{border:"N.5"}}},tC=["Singapore","Malaysia","Hong Kong SAR, China"],tv=e=>{let{color:t,listItems:n}=e;return(0,a.jsx)(tg,{bulletColor:t,children:n.map((e,n)=>(0,a.jsx)("li",{children:(0,a.jsx)(S.EY,{as:"span",color:t,variant:"body2",children:e})},"question-list-".concat(n)))})},tj=e=>{let{userDetails:t,theme:n,isMyInfoKyc:r,updateTaxInfo:l,getUserInfo:p,currentStep:_,isTinNotRequired:h}=e,{strings:{general:{okay_cta:g},errors:f,onboarding:{tax_residency_page:{us_permanent_resident_text:x,permanent_resident_text:b,tin_from_other_country_text:v,specify_reason_text:I,no_tin_warning_text:T,specify_reason_caption:N,add_additional_residency_cta:w,service_not_available_text:O,id_is_your_tin:F,your_tin:D,tin_auto_filled:R,without_tin_warning_text:B,no_services_popup:P}},forms:{labels:{tax_residency_section:U}}},geographyConstants:z,geography:L}=(0,E.Ym)(),H=(0,i.d4)(k.$u.getUserId),{trackClickFn:M}=(0,c.A)({shouldTrackPageLoad:!0}),V=M("Tax Information"),[q,K]=(0,o.useState)([]),[X,Q]=(0,o.useState)(!1),[$,J]=(0,o.useState)(!1),[Z,ee]=(0,o.useState)(null),et=[x],{citizenship:en,country:ea}=t||{},eo=(0,A.Kb)(),er=td(U),{text:{color:{dark:el,gray:ei}}}=(0,C.Y)(n,tb).componentTheme,es=eo[m.gh],ec=eo[m.gx],ed=eo.syfeTopCountryCodes,eu=(r||L===m.XN.HK&&(null==t?void 0:t.residentialStatus)==="pr")&&"dashboard"!==n,ep=L===m.XN.HK,e_=()=>L===m.XN.SG?es.sg.country:es.hk.country,em=e=>{switch(null==e?void 0:e.residentialStatus){case"citizen":case"pr":return{taxResidenceCountry:e_(),taxResidenceCountryAvailablity:"yes",tin:null==e?void 0:e.identityNumber,tinAvailablity:"yes"};case"fr":return{taxResidenceCountry:e_(),taxResidenceCountryAvailablity:"yes",tin:"",tinAvailablity:""};case"fro":return{taxResidenceCountry:null==e?void 0:e.country,taxResidenceCountryAvailablity:"yes",tin:"",tinAvailablity:""};default:return{taxResidenceCountry:"",taxResidenceCountryAvailablity:"yes",tin:"",tinAvailablity:""}}};(0,o.useEffect)(()=>{let e;t&&t.taxInformation&&0!==t.taxInformation.length?e=t.taxInformation:(e=eh(),(eu||ep)&&(e[0].taxResidenceCountryAvailablity="no",e.push(em(t)))),K(e)},[t,en,ea,ep,eu]),(0,o.useEffect)(()=>{d.k.addSpanEvent(s.e.INVESTMENT_OBJECTIVE,"Tax info screen loaded"),d.k.endSpan(s.e.INVESTMENT_OBJECTIVE)},[]);let eh=()=>[{taxResidenceCountry:"US",tin:"",tinAvailablity:""}],ey=(e,t,n)=>{let a=[];return t.forEach((e,t)=>{t<n&&a.push(e.taxResidenceCountry)}),e.filter(e=>!a.includes(e.value))},eg=e=>![null==t?void 0:t.citizenship,null==t?void 0:t.country,"US"].includes(e),ef=()=>{p(y.akO)},ex=t=>{V("Next button"),d.k.startSpan(s.e.TAX_INFORMATION),d.k.setSpanAttributes(s.e.TAX_INFORMATION,(0,u.fQ)(H,m.XN.SG));let{updatePersonalInformation:a}=e,{nextUrl:o}=e,r=!0;t.taxInformation.forEach(e=>{"US"===e.taxResidenceCountry&&"yes"===e.taxResidenceCountryAvailablity&&(Q(!0),r=!1)}),r&&("dashboard"===n?(d.k.endSpan(s.e.TAX_INFORMATION),l(t.taxInformation,ef)):a({userDetails:t,nextUrl:o,currentStep:_,onFailureCb:e=>{ee(e.response.data.message)}}))},eb=(e,r,l,i,s,c)=>q.map((l,d)=>{var u;let p=l.taxResidenceCountry,_=eg(p),m=e.taxInformation&&e.taxInformation[d]||{};eu&&1===d&&(m.autoPopulate=!0);let y=m.taxResidenceCountry&&m.taxResidenceCountry===(null==(u=es[L.toLowerCase()])?void 0:u.country),g=()=>{let t=[...e.taxInformation],n=eh();d<n.length?(t.length=n.length,t=t.map((e,t)=>t>d?n[t]:e)):t.length=d+1,K(t),r("taxInformation",t)},f=e=>n=>{if(g(),r("taxInformation.".concat(d,".tinAvailablity"),""),_&&r("taxInformation.".concat(d,".taxResidenceCountry"),""),"no"===n.target.defaultValue){let e=[{taxResidenceCountry:"US",taxResidenceCountryAvailablity:"no",tin:"",tinAvailablity:""}];eu||ep?e.push(em(t)):e.push(em()),K(e),r("taxInformation",e)}else e.onChange(n)},x=t=>n=>{g(),r("taxInformation.".concat(d,".tin"),""),r("taxInformation.".concat(d,".reason"),""),t.onChange(n),tC.includes(e.taxInformation[d].taxResidenceCountry)&&"no"===n.target.defaultValue&&!h&&setTimeout(()=>{J(!0),r("taxInformation.".concat(d,".tinAvailablity"),"")},0)},C=e=>t=>{g(),r("taxInformation.".concat(d,".tinUnavailabilityReason"),""),e.onChange(t)}
1,j=e=>t=>{g(),r("taxInformation.".concat(d,".tinUnavailabilityOtherReason"),""),e.onChange(t)},E=e=>{g(),r("taxInformation.".concat(d,".tin"),e)},A=0===d||s||!i.taxInformation||i.taxInformation.slice(0,d).every(e=>!e),k=e=>{let{name:t,options:o,selected:r,question:l,onChange:i,column:s,subText:c,listItems:d}=e;return(0,a.jsx)(S.Kw,{column:s,name:t,onChange:i,options:o,selected:r,theme:n,question:(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.az,{mb:c?{_:2,md:1}:0,children:(0,a.jsx)(S.EY,{color:"B.1",variant:{_:"mlWide",md:"subtitle3"},children:l})}),!!(null==d?void 0:d.length)&&(0,a.jsx)(tv,{color:"B.3",listItems:d}),!!c&&(0,a.jsx)(S.EY,{color:ei,variant:"caption1",children:c})]})})};return A?(0,a.jsxs)(o.Fragment,{children:["US"===p&&(0,a.jsx)(ty,{showBorder:!0,children:(0,a.jsx)(S.az,{children:(0,a.jsx)("div",{children:(0,a.jsx)(Y.B0,{name:"taxInformation.".concat(d,".taxResidenceCountryAvailablity"),children:e=>{let{field:t,form:n}=e;return k({name:"taxInformation.".concat(d,".taxResidenceCountryAvailablity"),options:er.taxResidenceCountryAvailablity.options,selected:t.value,question:b,onChange:f(t),column:!1,subText:null,listItems:et})}})})})}),"yes"===m.taxResidenceCountryAvailablity&&"US"!==p&&(0,a.jsxs)(ty,{showBorder:!0,children:[(0,a.jsx)(tf,{}),(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{color:"B.1",variant:{_:"mlWide",md:"subtitle3"},children:U.which_country_residence_text}),(0,a.jsx)(S.az,{mt:5,width:{_:"100%",md:"368px"},children:(0,a.jsx)(Y.B0,{component:S.l6,dropDownWidth:"100%",fillType:"outlined",id:"taxInformation.".concat(d,".taxResidenceCountry"),isSearch:!0,label:U.country_region_text,name:"taxInformation.".concat(d,".taxResidenceCountry"),onChange:e=>{var t;g();let{value:n}=e.target;r("taxInformation.".concat(d,".taxResidenceCountry"),n),r("taxInformation.".concat(d,".taxResidenceCountryAvailablity"),"yes"),r("taxInformation.".concat(d,".tinAvailablity"),m.autoPopulate&&n===(null==(t=es[L.toLowerCase()])?void 0:t.country)?"yes":"")},theme:n,value:m.taxResidenceCountry,options:ey(er.taxResidenceCountry(es,ec,ed).options,e.taxInformation,d)},m.taxResidenceCountry)})]})]}),m.taxResidenceCountry&&"yes"===m.taxResidenceCountryAvailablity&&"US"!==p&&!(m.autoPopulate&&y)?(0,a.jsxs)(ty,{showBorder:!0,children:[(0,a.jsx)(tf,{}),(0,a.jsx)(S.az,{children:(0,a.jsx)(tm,{addBottomMargin:"yes"!==m.tinAvailablity,children:(0,a.jsx)(Y.B0,{name:"taxInformation.".concat(d,".tinAvailablity"),children:e=>{let{field:t,form:n}=e;return k({name:"taxInformation.".concat(d,".tinAvailablity"),options:er.tinAvailablity.options,selected:t.value,question:v,onChange:x(t),subText:y?F:"",column:!1,listItems:null})}},"taxInformation.".concat(d,".tinAvailablity.").concat(e.taxInformation[d].taxResidenceCountry))})})]}):null,"yes"===m.tinAvailablity&&(0,a.jsxs)(S.az,{mt:4,children:[m.autoPopulate&&y?(0,a.jsx)(S.EY,{color:"B.1",variant:{_:"mlWide",md:"subtitle3"},children:D}):null,(0,a.jsx)(S.az,{width:{_:"100%",md:"368px"},mb:5*(m.taxResidenceCountry===es.hk.country),mt:m.autoPopulate&&y?5:0,children:m.taxResidenceCountry===es.hk.country?(0,a.jsx)(Y.B0,{alwaysShowHKIDInput:!0,component:G.A,disabled:"yes"!==m.tinAvailablity,fillType:"outlined",label:er.tin.label,name:"taxInformation.".concat(d,".tin"),onChange:E,theme:n}):(0,a.jsx)(Y.B0,{component:W.Ay,disabled:"yes"!==m.tinAvailablity,fillType:"outlined",id:"taxInformation.".concat(d,".tin"),label:er.tin.label,name:"taxInformation.".concat(d,".tin"),onChange:E,theme:n})}),m.autoPopulate&&y?(0,a.jsx)(S.az,{mb:4,children:(0,a.jsx)(S.EY,{color:"B.1",variant:{_:"mlWide",md:"subtitle3"},children:R})}):null]}),"no"===m.tinAvailablity&&(0,a.jsxs)(ty,{showBorder:!0,children:[(0,a.jsx)("div",{children:(0,a.jsx)(S.az,{children:(0,a.jsx)(th,{addBottomMargin:!1,children:(0,a.jsx)(Y.B0,{name:"taxInformation.".concat(d,".reason"),children:e=>{let{field:t,form:n}=e;return k({name:"taxInformation.".concat(d,".reason"),options:er.reason.options,selected:t.value,question:I,onChange:C(t),column:!0,subText:null,listItems:null})}})})})}),"TIN is not required"===m.reason&&(0,a.jsx)(t_,{borderColor:"B.3",mt:6,p:{_:3,md:4},children:(0,a.jsx)(S.EY,{as:"div",color:"B.3",variant:"caption1",children:T})}),"Unable to obtain a TIN or equivalent number"===m.reason&&(0,a.jsxs)("div",{children:[(0,a.jsx)(tf,{}),(0,a.jsx)(S.az,{children:(0,a.jsx)(th,{addBottomMargin:"Others"!==m.tinUnavailabilityReason,children:(0,a.jsx)(Y.B0,{name:"taxInformation.".concat(d,".tinUnavailabilityReason"),
1children:e=>{let{field:t,form:n}=e;return k({name:"taxInformation.".concat(d,".tinUnavailabilityReason"),options:er.tinUnavailabilityReason.options,selected:t.value,question:N,onChange:j(t),column:!0,subText:null,listItems:null})}})})})]}),("Others"===m.tinUnavailabilityReason||"US"===p&&"Others"===m.reason)&&(0,a.jsxs)(S.az,{children:[(0,a.jsx)(tf,{}),(0,a.jsx)(S.az,{width:{_:"100%",md:"368px"},children:(0,a.jsx)(Y.B0,{component:W.Ay,fillType:"outlined",id:"taxInformation.".concat(d,".tinUnavailabilityOtherReason"),label:er.tinUnavailabilityOtherReason.label,name:"taxInformation.".concat(d,".tinUnavailabilityOtherReason"),onChange:e=>{g(),r("taxInformation.".concat(d,".tinUnavailabilityOtherReason"),e)},placeholder:N,theme:n})})]})]}),s&&e.taxInformation&&d===e.taxInformation.length-1&&d>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tf,{}),(0,a.jsx)(S.$n,{fillType:"text",iconLeft:"plus",onClick:c,size:"sm",children:w})]}):null]},d):null}),eC=(e,t)=>{let{isValid:n,dirty:o,values:r,errors:l,touched:i,setFieldValue:s}=e,c=()=>{let e=[...q,{taxResidenceCountry:"",taxResidenceCountryAvailablity:"yes",tin:"",tinAvailablity:""}];K(e),s("taxInformation.".concat(e.length-1,".taxResidenceCountryAvailablity"),"yes")};return(0,a.jsx)("form",{children:(0,a.jsx)(Y.ED,{name:"taxInformation",render:e=>eb(r,s,t,l,n,c)})})};return t&&(t.taxInformation=t&&t.taxInformation&&t.taxInformation.length>0?t.taxInformation:q),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:{...t},validationSchema:(0,tu.d)(f,es,L),isInitialValid:e=>(0,tu.d)(f,es,L).isValidSync(t),children:e=>(0,a.jsx)(j.A,{heading:"Tax information",isPrimaryCtaDisabled:!e.isValid,onPrimaryCtaClick:()=>ex(e.values),children:(0,a.jsx)(S.az,{mt:6,children:eC(e,"steps")})})}),X?(0,a.jsx)(S.aF,{onClose:()=>Q(!1),children:(0,a.jsx)(S.EY,{as:"div",color:"B.1",variant:"subtitle3",children:(0,a.jsx)(E.In,{str:O,components:{residentComponent:(0,a.jsx)(S.az,{mb:4,children:(0,a.jsx)(tv,{color:el,listItems:[P.us_permanent_resident_text]})}),mailLink:(0,a.jsx)(tx,{href:"mailto:"+z.links.SYFE_CONTACT_EMAIL,children:(0,a.jsx)(S.EY,{variant:"subtitle3",children:z.links.SYFE_CONTACT_EMAIL})})}})})}):null,$?(0,a.jsx)(S.QE,{onModalClose:()=>J(!1),onPrimaryCtaClick:()=>J(!1),primaryCtaText:g,showCloseIcon:!1,children:(0,a.jsx)(S.EY,{as:"div",color:"B.1",variant:"subtitle3",children:(0,a.jsx)(E.In,{str:B,components:{mailLink:(0,a.jsx)(tx,{href:"mailto:"+z.links.SYFE_CONTACT_EMAIL,children:(0,a.jsx)(S.EY,{variant:"subtitle3",children:z.links.SYFE_CONTACT_EMAIL})})}})})}):null,(0,a.jsx)(tp.A,{message:Z,onClose:()=>ee(null)})]})};tj.defaultProps={theme:"white"};let tE=tc(tj),tA=(0,i.Ng)(e=>({financialAssessment:k.$u.getFinancialAssessmentData(e),pendingPortfolioCreation:k.$u.getPendingPortfolioCreation(e),location:e.router.location,isKycCompletedForWealth:k.$u.isKycCompletedForWealth(e)}),e=>({redirectTo:t=>e((0,I.VC)(t)),replace:t=>e((0,I.HC)(t)),updateFinancialAssessmentDetails:t=>{let{financialAssessment:n,nextUrl:a,currentStep:o}=t;return e(T.Xn.updateFinancialAssessmentDetails({financialAssessment:n,nextUrl:a,currentStep:o}))},updateDashboardKycDetails:t=>{let{body:n,nextUrl:a}=t;return e(T.mD.updateDashboardKycDetails({body:n,nextUrl:a}))}}),(e,t,n)=>({...e,...t,...n}));var tS=n(53152);let tI={[m.XN.HK]:()=>({ifInvestedMoreThanHalfOfAssets:eL.Yj().required(),targetPeriod:eL.Yj().required()}),[m.XN.SG]:e=>e?{isInvestingSubstantialPortion:eL.Yj().required(),investmentTimeHorizon:eL.Yj().required(),savedIncomePercentage:eL.Yj().required()}:{ifInvestedMoreThanHalfOfAssets:eL.Yj().required(),targetPeriod:eL.Yj().required(),otherInvestmentsValue:eL.Yj().required(),debtsOutsideSyfe:eL.Yj().required(),investmentObjectiveCheckbox:eL.zM().oneOf([!0]).required()}},tT=(e,t,n)=>eL.Ik().shape({goal:eL.Yj().required(),targetAmount:eL.ai().required(e.required_caption).min(1,""),...tI[t](n)});var tk=n(55512);let tN=(0,l.Ay)(S.az).withConfig({componentId:"sc-1eb2da19-0"})(["border-bottom:1px solid ",";"],(0,r.y)("colors.B.6")),tw=(0,l.Ay)(S.Sc).withConfig({componentId:"sc-1eb2da19-1"})(["display:block;"]),tO=(0,l.Ay)(S.az).withConfig({componentId:"sc-1eb2da19-2"})(["&:not(:first-child,:last-child){border-bottom:1px solid ",";}@media (max-width:","){margin:0 -","px;padding:0 ","px;}"],(0,r.y)("colors.B.6"),(0,r.y)("breakpoints.md"),(0,r.y)("space.6"),(0,r.y)("space.6")),tF=e=>{let{investmentObjective:t,setValues:n,pendingPortfolioCreation:r,financialAssessment:l,isDashboard:i,location:s,theme:c,onNextClick:d,isNextValid:u,replace:p,redirectTo:_}=e,{strings:{forms:{labels:{onboarding:{investment_objective:h}}},onboarding:{investment_objective_page:x,investment_objective_details_page:b}},geography:C,geographyConstants:{DEFAULT_CURRENCY:v}}=(0,E.Ym)(),A=[{start:1,end:100,incr:99},{start:100,end:1e3,incr:100},{start:1e3,end:1e4,incr:1e3},{start:1e4,end:1e5,incr:1e4},{start:1e5,end:1e6,incr:1e5},{start:1e6,end:5e7,incr:1e6}],{heading:I,icon:T,components:k,componentsConfig:N}=(0,tS.hV)({...h,...x,...b},C)[t]||{},w=k&&k.reduce((e,n)=>{let a=null==l?void 0:l.investmentObjective,o=n.defaultValue;return l&&n.isSuitabilityV2Field&&(o=l[n.key]),a&&a.goal===t&&a[n.key]&&(o=a[n.key]),["ifInvestedMoreThanHalfOfAssets","isInvestingSubstantialPortion","debtsOutsideSyfe"].includes(n.key)&&(o=!0===o?"yes":"no"),{...e,[n.key]:o}},{}),[O,F]=(0,o.useState)({...w,goal:t}),D=(e,t)=>{F({...O,[e]:t}),n({...O,[e]:t})};(0,o.useEffect)(()=>{var e;
1let t=null==(e=document.getElementsByClassName("help-desk"))?void 0:e[0];return t&&t.addEventListener("click",P),C===m.XN.SG&&D("investmentObjectiveCheckbox",!0),()=>{t&&t.removeEventListener("click",P)}},[]),t||(i?p({pathname:y.ZNV,search:s.search}):_((0,y.u12)(y.HyN.INVESTMENT_OBJECTIVE)));let R=(0,f.V8)(s.search,"portfolioType"),B=null;r?B=r.type:R&&(B=R);let P=()=>{(0,g.Ay)({action:"help_button_click",category:"target_amount_page_clicks",label:String(B),label2:t})},Y=e=>{let{componentType:t,key:n}=e,o=O[n],{heading:r,label:l,type:i,isOptional:s,options:d,minValue:u,maxValue:p,tooltipText:_}=N[t];switch(i){case"SLIDER_QUESTION":return(0,a.jsx)(S.az,{py:6,children:(0,a.jsx)(tk.A,{heading:r,maxValue:p,minValue:u,onChange:e=>D(n,e),sliderTheme:c,stepsConfig:A,value:o,valueLabel:m.n4[v].EN,optionalText:s?x.optional_text:"",sliderConfig:{barHeight:2,barBorderRadius:1,knobStyle:"disc",renderKnobArrows:!1,knobWidth:24}})});case"SINGLE_SELECT_PILL":return(0,a.jsx)(S.jQ,{heading:r,name:n,onChange:e=>D(n,null==e?void 0:e.target.value),options:d,selected:o});case"RADIO_QUESTION":return(0,a.jsx)(S.pT,{pb:3,pt:6,children:(0,a.jsx)(S.Kw,{onChange:e=>D(n,null==e?void 0:e.target.value),options:d,question:r,selected:o,tooltip:_},n)});case"SELECT_QUESTION":return(0,a.jsxs)(S.az,{py:6,children:[(0,a.jsx)(S.EY,{color:"B.1",variant:{_:"mlWide",md:"subtitle3"},children:r}),(0,a.jsx)(S.az,{mt:6,width:{_:"100%",md:"312px"},children:(0,a.jsx)(S.l6,{label:l||"",name:n,onChange:e=>D(n,null==e?void 0:e.target.value),options:d,placeholder:"Please select",theme:c,value:o})})]});default:return}};return(0,a.jsx)(j.A,{containerStyles:{px:0,py:0},containerWidth:"672px",contentWidth:"672px",isPrimaryCtaDisabled:!u,onPrimaryCtaClick:d,children:(0,a.jsxs)(S.az,{"data-testid":"investment-objective-details",children:[(0,a.jsxs)(tN,{p:7,children:[(0,a.jsx)(S._V,{alt:t,src:T}),(0,a.jsx)(S.EY,{as:"span",color:"B.1",ml:6,variant:{_:"mlWide",md:"subtitle2"},children:I})]}),(0,a.jsxs)(S.az,{pb:10,px:{_:6,md:22},children:[(0,a.jsx)(S.az,{children:k.map((e,t)=>(0,a.jsx)(tO,{"data-testid":"input-component",children:Y(e)},t))}),(0,a.jsx)(K.A,{renderOn:m.XN.SG,children:(0,a.jsx)(S.az,{children:(0,a.jsx)(tw,{defaultValue:!0,label:x.check_text,name:"investmentObjectiveCheckbox",theme:c,onToggle:e=>D("investmentObjectiveCheckbox",null==e?void 0:e.target.checked)})})})]})]})})};var tD=n(85925);let tR=(0,l.Ay)(S.az).withConfig({componentId:"sc-b42a0ba1-0"})(["border-bottom:1px solid ",";@media (min-width:","){&:last-child{border-bottom:none;}}"],(0,r.y)("colors.B.6"),(0,r.y)("breakpoints.md")),tB=e=>{let{headline:t,strings:n,pendingPortfolioCreation:r,nextUrl:l,redirectTo:i,location:s,geography:c}=e;(0,o.useEffect)(()=>{var e;
1let t=null==(e=document.getElementsByClassName("help-desk"))?void 0:e[0];return t&&t.addEventListener("click",p),()=>{t&&t.removeEventListener("click",p)}},[]);let d=(0,f.V8)(s.search,"portfolioType"),u=null;r?u=r.type:d&&(u=d);let p=()=>{(0,g.Ay)({action:"help_button_click",category:"investment_objective_page_clicks",label:String(u)})},_=(0,tS.hV)(n,c),m=e=>{switch(e){case tS.Tp.WEALTH:return"grow_wealth_clicks";case tS.Tp.HOME:return"buy_home_clicks";case tS.Tp.RETIREMENT:return"prepare_retirement_clicks";case tS.Tp.HOLIDAY:return"holiday_wedding_clicks";case tS.Tp.OTHER:default:return"something_else_clicks"}},h=e=>{(0,g.Ay)({action:m(e),category:"investment_objective_page_clicks",label:String(u)}),i("".concat(l,"?goal=").concat(e))};return(0,a.jsxs)(j.A,{containerStyles:{py:4},containerWidth:"672px",contentWidth:"550px",showPrimaryCta:!1,children:[(0,a.jsx)(S.az,{borderBottom:{_:"none",md:"1px solid"},borderColor:{_:"none",md:"B.6"},mx:{_:0,md:-15},px:{_:0,md:15},py:{_:4,md:6},children:(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:"B.1",variant:{_:"label2",md:"label1"},children:t})}),Object.keys(_).map((e,t)=>{let{heading:n,icon:o}=_[e];return(0,a.jsx)(tR,{bg:"W.2","data-testid":"objective-id",mx:{_:-6,md:-7},px:{_:6,md:7},py:7,role:"button",tabIndex:0,onKeyDown:t=>{"Enter"===t.key&&h(e)},children:(0,a.jsx)(tD.A,{iconPosition:"left",data:{icon:o,alt:e,description:n,onClick:()=>h(e)}})},"objective-".concat(t))})]})},tP=tA(e=>{var t;let{nextUrl:n,financialAssessment:r,updateFinancialAssessmentDetails:l,pendingPortfolioCreation:p,redirectTo:_,location:h,isDashboard:x,updateDashboardKycDetails:b,theme:C,currentStep:v,replace:j,isKycCompletedForWealth:A}=e,S=(0,i.d4)(k.$u.getUserId),{trackClickFn:I}=(0,c.A)({shouldTrackPageLoad:!0}),T=I("Investment Objective"),{strings:{forms:{labels:{onboarding:{investment_objective:N}}},onboarding:{investment_objective_page:O},errors:F},geography:D}=(0,E.Ym)(),{visibilityFlags:{enableSuitabilityV2:R}}=(0,ea.Q)(D);A&&(0,w.wd)("Investment Objective step coming after Kyc complete");let B=[y.u12(y.HyN.INVESTMENT_OBJECTIVE),y.ZNV].includes(h.pathname),P=[y.u12(y.HyN.INVESTMENT_OBJECTIVE_DETAILS),y.A8].includes(h.pathname),U=(0,eE.useRouter)(),z=(0,f.vA)(U).goal||(null==r||null==(t=r.investmentObjective)?void 0:t.goal)||"",[L,H]=(0,o.useState)({});(0,o.useEffect)(()=>{if((null==r?void 0:r.investmentObjective)&&(null==r?void 0:r.investmentObjective.goal)===z){let{components:e}=(0,tS.hV)({...N,...O},D)[null==r?void 0:r.investmentObjective.goal],t={investmentObjectiveCheckbox:!0};e.forEach(e=>{let n=(null==r?void 0:r.investmentObjective[e.key])||r[e.key]||e.defaultValue;("ifInvestedMoreThanHalfOfAssets"===e.key||"isInvestingSubstantialPortion"===e.key||"debtsOutsideSyfe"===e.key)&&(n=n?"yes":"no"),t[e.key]=n}),H({...t,goal:z})}else H({})},[z]),(0,o.useEffect)(()=>{d.k.addSpanEvent(s.e.UPLOAD_DOCUMENTS,"Investment objective page loaded"),d.k.endSpan(s.e.UPLOAD_DOCUMENTS)},[]);let M=(0,o.useRef)(),V=e=>"yes"===e,G=()=>{T("Next button"),d.k.startSpan(s.e.INVESTMENT_OBJECTIVE),d.k.setSpanAttributes(s.e.INVESTMENT_OBJECTIVE,(0,u.fQ)(S,m.XN.SG));let e=(0,f.V8)(h.search,"portfolioType"),t=null;p?t=p.type:e&&(t=e),(0,g.Ay)({action:"next_click",category:"target_amount_page_clicks",label:String(t),label2:z});let a={...r,investmentTimeHorizon:L.investmentTimeHorizon,isInvestingSubstantialPortion:V(L.isInvestingSubstantialPortion),savedIncomePercentage:L.savedIncomePercentage,investmentObjective:{...L,...!R&&{ifInvestedMoreThanHalfOfAssets:V(L.ifInvestedMoreThanHalfOfAssets)}}};L.debtsOutsideSyfe&&(a={...a,investmentObjective:{...a.investmentObjective,debtsOutsideSyfe:"yes"===L.debtsOutsideSyfe}}),x?(d.k.endSpan(s.e.INVESTMENT_OBJECTIVE),b({body:{financialAssessment:a},nextUrl:n})):l({financialAssessment:a,nextUrl:n,currentStep:v})};return(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:L,innerRef:M,isInitialValid:e=>tT(F,D,R).isValidSync(L),validationSchema:tT(F,D,R),children:e=>{let{isValid:t}=e;return(0,a.jsxs)(a.Fragment,{children:[B&&(0,a.jsx)(tB,{geography:D,headline:O.caption,location:h,nextUrl:n,pendingPortfolioCreation:p,redirectTo:_,strings:{...N,...O}}),P&&(0,a.jsx)(tF,{financialAssessment:r,investmentObjective:z,isDashboard:x,isNextValid:t,location:h,onNextClick:G,pendingPortfolioCreation:p,redirectTo:_,replace:j,setValues:e=>H(e),theme:C})]})}})});var tY=n(82780),tU=n.n(tY);let tz=(0,i.Ng)(e=>
1({kycDetails:k.$u.getMobileDetails(e),financialAssessment:k.$u.getFinancialAssessmentData(e),pendingPortfolioCreation:k.$u.getPendingPortfolioCreation(e)}),e=>({redirectTo:t=>e((0,I.VC)(t)),updateFinancialAssessmentDetails:t=>{let{financialAssessment:n,nextUrl:a,currentStep:o}=t;return e(T.Xn.updateFinancialAssessmentDetails({financialAssessment:n,nextUrl:a,currentStep:o}))}}),(e,t,n)=>({...e,...t,...n})),tL={[m.XN.HK]:{isLicensedWithSFCorHKMA:eL.zM().required()},[m.XN.SG]:{}},tH=(e,t)=>eL.Ik().shape({affiliatedWithStockExchange:eL.zM().required(),involvedInInvestmentBusiness:eL.zM().required(),isPoliticallyExposed:eL.zM().required(),isRelatedToCompany:eL.zM().required(),involvedInInvestmentBusinessDetails:eL.Yj().when("involvedInInvestmentBusiness",{is:!0,then:eL.Yj().max(1e3,e.details_under_hundred_characters_text).required(e.details_required_text)}),pepDetails:eL.Yj().when("isPoliticallyExposed",{is:!0,then:eL.Yj().max(1e3,e.details_under_hundred_characters_text).required(e.details_required_text)}),relatedToCompanyDetails:eL.Yj().when("isRelatedToCompany",{is:!0,then:eL.Yj().max(1e3,e.details_under_hundred_characters_text).required(e.details_required_text)}),...tL[t]});var tM=n(91036);let tV=(0,l.Ay)(S.pT).withConfig({componentId:"sc-b0e1e437-0"})(["&&& .consent-letter-popup_input{padding:0;color:",";font-size:",";}"],(0,r.y)("colors.BT.5"),(0,r.y)("fontSizes.2")),tG=(0,l.Ay)(S.pT).withConfig({componentId:"sc-b0e1e437-1"})(["&&& .MuiInput-root{padding:0;color:",";font-size:",";}"],(0,r.y)("colors.N.15"),(0,r.y)("fontSizes.2")),tW=(0,l.Ay)(S.az).withConfig({componentId:"sc-b0e1e437-2"})(["&&& li{margin-bottom:0;}"]),tq=tz(e=>{let{nextUrl:t,financialAssessment:n,updateFinancialAssessmentDetails:r,pendingPortfolioCreation:l,theme:p,currentStep:_}=e,{strings:{general:{next_cta:h,proceed_cta:y,cancel_cta:f,syfe_contact_address:x,enter_details_text:b},onboarding:{financial_assessment_page:{regulatory_information_section:C}},errors:v},geography:A}=(0,E.Ym)(),I=(0,i.d4)(k.$u.getUserId),{trackClickFn:T}=(0,c.A)({shouldTrackPageLoad:!0}),N=T("Regulatory Information"),{regulatoryWarning:{info_review_text:w},consent_letter_popup:O}=C,[F,D]=(0,o.useState)(!1),R=A===m.XN.SG,B=(0,tS.oO)(C);(0,o.useEffect)(()=>{var e;d.k.addSpanEvent(s.e.TAX_INFORMATION,"Regulatory information loaded"),d.k.endSpan(s.e.TAX_INFORMATION);
1let t=null==(e=document.getElementsByClassName("help-desk"))?void 0:e[0];return t&&t.addEventListener("click",U),()=>{t&&t.removeEventListener("click",U)}},[]);let P=null;l&&(P=l.type);let U=()=>{(0,g.Ay)({action:"help_button_click",category:"regulatory_information_page_clicks",label:String(P)})},z=(null==n?void 0:n.regulatoryInformation)||B.reduce((e,t)=>{let n={...e,[t.key]:t.defaultValue},a={};return t.subFields&&t.subFields.map(e=>(a[e.key]=e.defaultValue,e)),n={...n,...a}},{}),L=(e,t)=>B.map((n,o)=>{let{question_text:r,options:l,key:i,subFields:s}=n,c=tU()(n,"tooltip_text"),d=tU()(n,"description_list"),u=l.map(e=>({label:(0,a.jsx)(S.EY,{mr:10,children:e.label}),value:e.value}));return(0,a.jsxs)(tW,{"data-testId":"radio-question",children:[(0,a.jsx)(S.Kw,{listOptions:d,name:i,options:u,question:r,selected:""===e[i]?"":e[i]?"yes":"no",tooltip:c,onChange:e=>{"yes"===e.target.value?t(i,!0):(s&&s.map(e=>t(e.key,"",!0)),t(i,!1))}}),s&&s.map(t=>{let{key:n,whenOptionValueSelected:o,description_text:r,label_text:l,component:s}=t;return e[i]===o?(0,a.jsxs)(S.az,{mb:2,width:{_:"100%",md:"312px"},children:[(0,a.jsx)(S.EY,{as:"span",color:"B.3",mb:{_:2,md:6},mt:2,variant:"caption1",children:r}),(0,a.jsx)(Y.B0,{component:s,id:n,multiline:!0,name:n,placeholder:b,theme:p})]},n):null})]},o)}),H=e=>{N("Next button"),d.k.startSpan(s.e.REGULATORY_INFORMATION),d.k.setSpanAttributes(s.e.REGULATORY_INFORMATION,(0,u.fQ)(I,m.XN.SG)),(0,g.Ay)({action:"next_click",category:"regulatory_information_page_clicks",label:String(P)});let t=e.involvedInInvestmentBusiness||e.isPoliticallyExposed;if(e.isLicensedWithSFCorHKMA||t&&R)return void D(!0);G(e)},M=()=>D(!1),V=e=>()=>{G(e)},G=e=>{let a={...n,regulatoryInformation:{...e}};D(!1),r({financialAssessment:a,nextUrl:t,currentStep:_})};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:z,validationSchema:tH(v,A),isInitialValid:e=>tH(v,A).isValidSync(z),children:e=>{let{isValid:t,values:n,handleSubmit:o,setFieldValue:r}=e;return(0,a.jsxs)(j.A,{containerWidth:"672px",contentWidth:"544px",isPrimaryCtaDisabled:!t,onPrimaryCtaClick:()=>H(n),heading:C.regulatory_information_caption,children:[(0,a.jsx)(tM.A,{children:L(n,r)}),F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(K.A,{renderOn:m.XN.SG,children:(0,a.jsx)(S.QE,{onClose:()=>D(!1),onPrimaryCtaClick:()=>G(n),primaryCtaText:y,children:(0,a.jsx)(S.EY,{color:"B.1",variant:"body2",children:w})})}),(0,a.jsx)(K.A,{renderOn:m.XN.HK,children:(0,a.jsxs)(S.QQ,{actionBarRowProps:{justifyContent:"center"},cancelLabel:f,onCancel:M,onPrimaryAction:V(n),primaryActionLabel:h,theme:p,children:[(0,a.jsxs)(S.EY,{c
1olor:"N.15",variant:"body2",children:[null==O?void 0:O.provide_consent_letter_text,":"]}),(0,a.jsxs)(S.pT,{mt:6,children:[(0,a.jsxs)(S.EY,{color:"N.15",mr:1,mt:"-2px",variant:"body2",children:[null==O?void 0:O.email_text," :"," "]}),(0,a.jsx)(tV,{flex:1,children:(0,a.jsx)(S.Ao,{showCopyText:!0,disableUnderline:!0,fillType:"standard",inputClassName:"consent-letter-popup_input",label:"",theme:p,value:m.rX})})]}),(0,a.jsxs)(S.pT,{children:[(0,a.jsxs)(S.EY,{color:"N.15",mr:1,mt:"-2px",variant:"body2",children:[null==O?void 0:O.mail_text," :"," "]}),(0,a.jsx)(tG,{flex:1,children:(0,a.jsx)(S.Ao,{multiline:!0,showCopyText:!0,disableUnderline:!0,fillType:"standard",label:"",theme:p,value:x})})]}),(0,a.jsx)(S.EY,{as:"div",color:"N.15",variant:"caption1",children:null==O?void 0:O.disclaimer_text})]})})]})]})}})})});var tK=n(21391);let tX=(0,i.Ng)(e=>({financialAssessment:k.$u.getFinancialAssessmentData(e),pendingPortfolioCreation:k.$u.getPendingPortfolioCreation(e),showChoosePortfolio:k.$u.getShowChoosePortfolio(e)}),e=>({redirectTo:t=>e((0,I.VC)(t)),updateFinancialAssessmentDetails:t=>{let{financialAssessment:n,nextUrl:a,showLoader:o,currentStep:r}=t;return e(T.Xn.updateFinancialAssessmentDetails({financialAssessment:n,nextUrl:a,showLoader:o,currentStep:r}))},setSuitabilityLoading:()=>e((0,tK.ue)()),navigate:t=>e((0,I.VC)(t))}),(e,t,n)=>({...e,...t,...n})),tQ=eL.Ik().shape({riskPreference:eL.Yj().oneOf(["VERY_HIGH","HIGH","BALANCED","LOW","NO_RISK"])});var t$=n(78578);let tJ=e=>{let{pendingPortfolioCreation:t,onClose:n}=e,{strings:{general:{unable_to_proceed_caption:o},onboarding:{financial_assessment_page:{risk_preference_section:{knockout_section:{unable_to_proceed_primary_text:r,unable_to_proceed_secondary_text:l}}}}},geographyConstants:i}=(0,E.Ym)(),s=e=>{let n="email_click";"back"===e&&(n="back_button_click"),(0,g.Ay)({action:n,category:"unable_to_proceed_page",label:null==t?void 0:t.type})};return(0,a.jsxs)(S.aF,{onClose:n,title:(0,a.jsx)(S.EY,{color:"B.1",variant:"subtitle3",children:o}),children:[(0,a.jsx)(S.EY,{as:"div",color:"B.1",variant:"body2",children:r}),(0,a.jsx)(S.az,{mt:6,children:(0,a.jsx)(S.EY,{color:"B.1",onClick:()=>{s("email")},variant:"subtitle3",children:(0,a.jsx)(E.In,{str:l,components:{anchorElement:(0,a.jsx)("a",{href:"mailto:"+i.links.SYFE_CONTACT_EMAIL}),textComponent:(0,a.jsx)(S.EY,{as:"span",color:"B.7"})},values:{syfeContactEmail:i.links.SYFE_CONTACT_EMAIL}})})})]})},tZ=(0,l.Ay)(e=>(0,a.jsx)(S.sx,{...e})).withConfig({componentId:"sc-aacaa15b-0"})(["& .radio__option-container--column{padding-right:0;}"]),t0=tX(e=>{let{nextUrl:t,financialAssessment:n,updateFinancialAssessmentDetails:r,setSuitabilityLoading:l,pendingPortfolioCreation:p,showChoosePortfolio:_,theme:h,currentStep:y}=e,{strings:{onboarding:{financial_assessment_page:{new_risk_preference_section:f}}}}=(0,E.Ym)(),x=(0,i.d4)(k.$u.getUserId),{trackClickFn:b}=(0,c.A)({shouldTrackPageLoad:!0}),C=b("Risk Preference"),v=(0,o.useRef)(),A=(0,t$.g)(f),[I,T]=(0,o.useState)(!1);(0,o.useEffect)(()=>{var e;d.k.addSpanEvent(s.e.REGULATORY_INFORMATION,"Risk preference page loaded"),d.k.endSpan(s.e.REGULATORY_INFORMATION);
1let t=null==(e=document.getElementsByClassName("help-desk"))?void 0:e[0];return t&&t.addEventListener("click",w),()=>{t&&t.removeEventListener("click",w)}},[]);let N=null;p&&(N=p.type);let w=()=>{(0,g.Ay)({action:"help_button_click",category:"risk_preference_page_clicks",label:String(N)})},O=(e,t)=>A.map((n,o)=>(0,a.jsx)(tZ,{column:!0,onChange:e=>t("riskPreference",e.target.value),selected:e.riskPreference,theme:h,options:[{label:(0,a.jsx)(S.EY,{children:n.heading,color:"B.1",variant:"mlWide"}),subtitle:n.description,value:n.key}]},n.key+"_radio_button")),F=(0,a.jsx)(S.lG,{modalMaxWidth:"592px",onInfoIconClick:()=>{(0,g.Ay)({action:"tooltip_click",category:"risk_preference_page_clicks"})},title:f.tooltip_caption,children:(0,a.jsx)(S.pT,{flexDirection:"column",gap:6,children:A.map(e=>(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{as:"div",color:"B.1",mb:1,variant:"subtitle3",children:e.heading}),(0,a.jsx)(S.EY,{as:"div",color:"B.8",mb:2,variant:"caption2",children:e.drawdown_text}),(0,a.jsx)(S.EY,{as:"div",color:"B.1",variant:"body2",children:e.tooltip_text})]},e.key))})}),D={riskPreference:(null==n?void 0:n.riskPreference)||""};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:D,innerRef:v,isInitialValid:e=>tQ.isValidSync(D),onSubmit:e=>{if(C("Next button"),d.k.startSpan(s.e.RISK_PREFERENCE),d.k.setSpanAttributes(s.e.RISK_PREFERENCE,(0,u.fQ)(x,m.XN.SG)),(0,g.Ay)({action:"next_click",category:"risk_preference_page_clicks",label:String(N)}),"NO_RISK"===e.riskPreference)T(!0);else{let a={...n,riskPreference:e.riskPreference};_||l(),r({financialAssessment:a,nextUrl:t,showLoader:!1,currentStep:y})}},validationSchema:tQ,children:e=>{let{isValid:t,values:n,handleSubmit:o,setFieldValue:r}=e;return(0,a.jsx)(j.A,{containerWidth:"672px",contentWidth:"544px",heading:f.risk_preference_caption,isPrimaryCtaDisabled:!t,onPrimaryCtaClick:o,tooltip:F,children:(0,a.jsx)(S.az,{mt:{_:4,md:6},children:(0,a.jsx)(tM.A,{children:O(n,r)})})})}}),I&&(0,a.jsx)(tJ,{onClose:()=>T(!1),pendingPortfolioCreation:p})]})}),t1=(0,i.Ng)(e=>({kycDetails:k.$u.getMobileDetails(e),financialAssessment:k.$u.getFinancialAssessmentData(e),pendingPortfolioCreation:k.$u.getPendingPortfolioCreation(e),location:e.router.location}),e=>({redirectTo:t=>e((0,I.VC)(t)),updateFinancialAssessmentDetails:t=>{let{financialAssessment:n,onUserInfoLoadedSuccess:a,currentStep:o}=t;return e(T.Xn.updateFinancialAssessmentDetails({financialAssessment:n,onUserInfoLoadedSuccess:a,currentStep:o}))},navigate:t=>e((0,I.VC)(t)),updateDashboardKycDetails:t=>{let{body:n,onUserInfoLoadedSuccess:a}=t;return e(T.mD.updateDashboardKycDetails({body:n,onUserInfoLoadedSuccess:a}))}}),(e,t,n)=>({...e,...t,...n}));var t2=n(15925);let t6={[m.XN.HK]:{hasDegreeInFinance:eL.zM().required(),isProfessionallyQualified:eL.zM().required(),hasRelevantTradingExperience:eL.zM().required(),transactedInInvestmentProducts:eL.zM().required()},[m.XN.SG]:{isCkaFirstScreeningPassed:eL.zM().required()}},t4=e=>eL.Ik().shape({...t6[e]});var t3=n(23660);let t5=t1(e=>{let{nextUrl:t,financialAssessment:n,updateFinancialAssessmentDetails:r,pendingPortfolioCreation:l,navigate:i,isDashboard:s,updateDashboardKycDetails:d,location:u,theme:p,currentStep:_}=e,{strings:{onboarding:{financial_assessment_page:{new_investment_knowledge_section:h}}},geography:x}=(0,E.Ym)(),{trackClickFn:b}=(0,c.A)({shouldTrackPageLoad:!0}),C=b("Investment Knowledge"),v=(0,t2.x3)(h),A=(0,o.useRef)();(0,o.useEffect)(()=>{var e;
1let t=null==(e=document.getElementsByClassName("help-desk"))?void 0:e[0];return t&&t.addEventListener("click",k),()=>{t&&t.removeEventListener("click",k)}},[]);let I=(0,f.V8)(u.search,"portfolioType"),T=null;l?T=l.type:I&&(T=I);let k=()=>{(0,g.Ay)({action:"help_button_click",category:"investment_knowledge_page_clicks",label:String(T)})},N=(null==n?void 0:n.investmentKnowledgeV2)||v.reduce((e,t)=>({...e,[t.key]:t.defaultValue}),{}),w=(e,t)=>v.map((n,o)=>{let{question_text:r,options:l,key:i}=n,s=tU()(n,"description_list"),c=tU()(n,"tooltip"),d=tU()(n,"tooltipCaption"),u=l.map(e=>({label:(0,a.jsx)(S.EY,{mr:10,children:e.label}),value:e.value}));return(0,a.jsx)(S.Kw,{listOptions:s,name:i,options:u,question:r,theme:p,tooltip:c,onChange:e=>t(i,"yes"===e.target.value),selected:""===e[i]||null===e[i]?"":e[i]?"yes":"no",tooltipModalProps:{title:d,modalMaxWidth:"500px"}},o)}),O=e=>{C("Next button"),(0,g.Ay)({action:"next_click",category:"investment_knowledge",label:String(T)});let a={...n,investmentKnowledgeV2:{...e}},o=e=>{e.data.isCkaPassed||x!==m.XN.SG?i(t):s?i("".concat(y.o96).concat(u.search)):i(y.u12(y.HyN.CKA_TEST))};s?d({body:{financialAssessment:a},onUserInfoLoadedSuccess:o}):r({financialAssessment:a,onUserInfoLoadedSuccess:o,currentStep:_})};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:N,innerRef:A,validationSchema:t4(x),isInitialValid:e=>t4(x).isValidSync(N),children:e=>{let{isValid:t,values:n,handleSubmit:o,setFieldValue:r}=e;return(0,a.jsxs)(j.A,{containerWidth:"672px",contentWidth:"545px",isPrimaryCtaDisabled:!t,onPrimaryCtaClick:()=>O(n),heading:h.investment_knowledge_caption,children:[(0,a.jsx)(S.az,{mb:{_:4,md:0},mt:{_:4,md:6},children:(0,a.jsx)(t3.A,{caption:h.instruction_text})}),(0,a.jsx)(tM.A,{children:w(n,r)})]})}})})}),t7=(0,i.Ng)(e=>({financialAssessment:k.$u.getFinancialAssessmentData(e)}),e=>({updateFinancialAssessmentDetails:t=>{let{financialAssessment:n,onUserInfoLoadedSuccess:a,currentStep:o}=t;return e(T.Xn.updateFinancialAssessmentDetails({financialAssessment:n,onUserInfoLoadedSuccess:a,currentStep:o}))},navigate:t=>e((0,I.VC)(t)),updateDashboardKycDetails:t=>{let{body:n,onUserInfoLoadedSuccess:a}=t;return e(T.mD.updateDashboardKycDetails({body:n,onUserInfoLoadedSuccess:a}))}}),(e,t,n)=>({...e,...t,...n}));var t8=n(1414);let t9=()=>eL.Ik().shape({isCkaSecondScreeningPassed:eL.zM().required()});function ne(e){let{onCkaFailedPopupCross:t,onExplorePortfoliosClick:n,onRedoAssessmentClick:o}=e,{strings:{onboarding:{financial_assessment_page:{new_cka_test_section:{cka_failed_popup:{review_required_text:r,unlisted_sip_warning_text:l,team_help_text:i,explore_other_portolios_cta:s,redo_assessment_cta:c}}}}},geographyConstants:d}=(0,E.Ym)();return(0,a.jsx)(S.QE,{onModalClose:t,onPrimaryCtaClick:o,onSecondaryCtaClick:n,primaryCtaText:c,secondaryCtaFillType:"text",secondaryCtaText:s,showSecondaryCta:!0,title:r,children:(0,a.jsxs)(S.EY,{c
1olor:"B.1",variant:"body2",children:[(0,a.jsx)(E.In,{str:l,components:{ckaLink:(0,a.jsx)(S.A,{href:t8.sTp,target:"_blank"}),textComponent:(0,a.jsx)(S.EY,{color:"B.7"})}}),(0,a.jsx)(S.az,{mt:5,children:(0,a.jsx)(E.In,{str:i,components:{ourTeamLink:(0,a.jsx)(S.A,{href:"mailto:"+d.links.SYFE_CONTACT_EMAIL,target:"_blank"}),textComponent:(0,a.jsx)(S.EY,{color:"B.7"})}})})]})})}let nt=t7(e=>{let{nextUrl:t,financialAssessment:n,updateFinancialAssessmentDetails:r,navigate:l,isDashboard:i,updateDashboardKycDetails:s,currentStep:d}=e,{strings:{general:{yes_text:u,no_text:p},onboarding:{financial_assessment_page:{new_cka_test_section:_}}}}=(0,E.Ym)(),{trackClickFn:m}=(0,c.A)({shouldTrackPageLoad:!0}),h=m("CKA Test"),[g,f]=(0,o.useState)(!1),x=(0,t2.Nq)({..._,yes_text:u,no_text:p}),b=(0,o.useRef)(),C=(null==n?void 0:n.investmentKnowledgeV2)||x.reduce((e,t)=>({...e,[t.key]:t.defaultValue}),{}),v=(e,t)=>x.map((n,o)=>{let{question_text:r,options:l,key:i,description_list:s}=n,c=l.map(e=>({label:(0,a.jsx)(S.EY,{mr:10,children:e.label}),value:e.value}));return(0,a.jsx)(S.az,{"data-testId":"radio-question",children:(0,a.jsx)(S.Kw,{name:i,options:c,question:r,listOptions:s.map((e,t)=>(0,a.jsx)(E.In,{str:e,components:{absLink:(0,a.jsx)(S.A,{href:t8.O2I,target:"_blank"}),styledA:(0,a.jsx)(S.EY,{color:"B.7",textDecoration:"underline"})}},t)),onChange:e=>t(i,"yes"===e.target.value),selected:""===e[i]||null===e[i]?"":e[i]?"yes":"no"})},o)}),A=e=>{h("Next button");let a=e=>{e.data.isCkaPassed?l(t):f(!0)},o={...n,investmentKnowledgeV2:{...e}};i?s({body:{financialAssessment:o},onUserInfoLoadedSuccess:a}):r({financialAssessment:o,onUserInfoLoadedSuccess:a,showLoader:!1,currentStep:d})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Y.l1,{enableReinitialize:!0,initialValues:C,innerRef:b,isInitialValid:e=>t9().isValidSync(C),validationSchema:t9(),children:e=>{let{isValid:t,values:n,setFieldValue:o}=e;return(0,a.jsxs)(j.A,{containerWidth:"672px",contentWidth:"545px",heading:_.investment_knowledge_caption,isPrimaryCtaDisabled:!t,onPrimaryCtaClick:()=>A(n),children:[(0,a.jsx)(S.az,{mb:{_:4,md:0},mt:{_:4,md:6},children:(0,a.jsx)(t3.A,{caption:_.instruction_text})}),(0,a.jsx)(tM.A,{children:v(n,o)})]})}}),g&&(0,a.jsx)(ne,{onCkaFailedPopupCross:()=>{f(!1)},onExplorePortfoliosClick:()=>{i?l(y.oVb):l("".concat(y.u12(y.HyN.CHOOSE_PORTFOLIO),"?from=ckaTest"))},onRedoAssessmentClick:()=>{i?l(y.ohm):l(y.u12(y.HyN.INVESTMENT_KNOWLEDGE))}})]})});var nn=n(25240);let na=e=>{let{title:t,url:n,tooltip:o}=e,{strings:{general:r}}=(0,E.Ym)();return(0,a.jsxs)(S.pT,{alignItems:"center",border:"1px solid",borderColor:"B.6",borderRadius:2,justifyContent:"space-between",px:3,py:4,children:[(0,a.jsxs)(S.pT,{alignItems:"center",children:[(0,a.jsx)(S.C0,{height:"16px",name:"docUploadedNew",stroke:"B.7",width:"16px"}),(0,a.jsx)(S.EY,{color:"B.7",px:3,variant:"body2",children:t}),o&&(0,a.jsx)(S.lG,{title:o.title,children:o.description})]}),(0,a.jsx)(S.$n,{fillType:"text",onClick:()=>{window.open(n,"_blank")},p:0,children:r.view_cta})]})},no=(0,i.Ng)(e=>({detailsOption:k.$A.getDetailsOption(e),isContractAgreementReviewed:k.$A.isContractAgreementReviewed(e),contractUrl:k.AU.getContractUrl(e),combinedCustomerAgreementUrl:k.AU.getCombinedCustomerAgreementUrl(e),webEnUrl:k.AU.getWebenFormUrl(e),pendingPortfolioCreation:k.$u.getPendingPortfolioCreation(e),suitabilityDataId:k.$A.getSuitabilityID(e),etfsData:k.et.getAddedEtfsData(e),location:e.router.location,responsiveUtility:e.responsiveUtility}),e=>({updateContractualAcceptance:t=>{let{version:n,params:a,onSuccessCb:o,currentStep:r}=t;return e(T.Xn.updateContractualAcceptance({version:n,params:a,onSuccessCb:o,currentStep:r}))},redirectTo:t=>e((0,I.VC)(t)),refreshUserInfo:t=>e(T.zV.getUserInfo(t)),refreshAccountInfo:()=>e(T.vc.getAccountInfo()),refreshAccountPortfoliosInfo:()=>e(T.vc.getAccountPortfoliosInfo()),refreshKycInfo:function(){for(var t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return e(T.Xn.getKycInfo(...n))},savePortfolio:(t,n,a,o)=>e(T.s4.createPortfolio(t,n,a,o)),updateContractReviewedStep:()=>e((0,tK.Tp)()),goBack:()=>e((0,I.OE)())}))(e=>{let{nextUrl:t,contractUrl:n,redirectTo:r,refreshUserInfo:l,refreshAccountInfo:h,refreshAccountPortfoliosInfo:f,refreshKycInfo:x,updateContractualAcceptance:b,savePortfolio:C,pendingPortfolioCreation:v,theme:j,etfsData:I,suitabilityDataId:N,webEnUrl:w,currentStep:O}=e,F=(0,i.d4)(k.$u.getUserId),{trackClickFn:D}=(0,c.A)({shouldTrackPageLoad:!0}),R=D("Contractual Info"),[B,P]=(0,ew.A)(!1),[Y,U]=(0,ew.A)(!1),{strings:{onboarding:{new_contractual_info_page:{contract_caption:z,contract_doc_caption:L,contract_review_text:H,customer_agreement_caption:M,w8ben_form_c
1aption:V,confirmation_text:G,w8ben_form_tooltip_text:W,sign_proceed_text:q,signed_success_popup:{success_text:K}}}},geography:X,geographyConstants:Q}=(0,E.Ym)(),$=[{id:"customer",title:M,url:n.url,tooltip:null},{id:"w_ben",title:V,url:w,tooltip:{title:V,description:W}}],J=(0,A.Kb)(),Z=(0,eE.useRouter)(),ee=(0,i.wA)();o.useEffect(()=>{d.k.addSpanEvent(s.e.PENDING_PORTFOLIO_CREATION,"Sign contract page loaded"),d.k.endSpan(s.e.PENDING_PORTFOLIO_CREATION)},[]),o.useEffect(()=>{v||l()},[v]);let et=(e,n)=>{let a=e&&e.data&&e.data.pendingPortfolioCreation,o=n||t;a?(o="".concat(y.v4v(a)).concat(a.isThemePortfolio?"&":"?","contract=signed"),Z.push(o).then(()=>{f(),h()})):r(o)},en=()=>{if(v){var e,t;let{isThemePortfolio:n,theme:a,type:o}=v,r=a||o,i=null==J||null==(t=J.portfolioByType)||null==(e=t[r])?void 0:e[0];if(!i)return;let{name:s,objective:c,type:d}=i,u=!n&&o===Q.CUSTOM_PORTFOLIO_TYPE,m=o===Q.PROTECTED_PORTFOLIO_TYPE,y=(0,eF.wx)(o),b=(0,tS.yI)(X,n,u,m);(0,g.Ay)((0,p.DPH)()),(0,g.lt)(_.v.ONBOARDING_CONTRACT_SIGNED),b?l({onSuccessCb:e=>{et(e)}}):(0,eF.og)({isThemePortfolio:n,isCustomPortfolio:u,themeKey:a,type:d,name:s,objective:c,savePortfolio:C,suitabilityDataId:N,etfsData:I,...(m||y)&&{rebalanceConsent:!0},onSuccess:()=>{x(null,e=>{let t,n=e.data.accountSetupStatus.find(e=>e.key===O);n.next&&(t=(0,nn.oK)(n.next,{mobileVerified:!0})),l({onSuccessCb:e=>et(e,t)}),h(),f(),ee(T.s4.getDashboardPortfolioContentDataV1(!1))})}})}};return(0,a.jsxs)(eO.mO,{containerWidth:"672px",contentWidth:"544px",isPrimaryCtaDisabled:!B,onPrimaryCtaClick:()=>{R("Next button"),d.k.startSpan(s.e.SIGN_CONTRACT),d.k.setSpanAttributes(s.e.SIGN_CONTRACT,(0,u.fQ)(F,m.XN.SG)),b({version:null==n?void 0:n.version,params:{showConfirmationAlert:!0,confirmationHeading:K,confirmationTime:4e3},onSuccessCb:en,currentStep:O})},primaryCtaText:q,children:[(0,a.jsx)(S.EY,{as:"div",color:"B.1",mb:{_:4,md:6},variant:{_:"label2",md:"subtitle2"},children:z}),(0,a.jsx)(S.EY,{as:"div",color:"B.1",mb:4,variant:"label6",children:H}),(0,a.jsxs)(S.az,{maxWidth:{_:"100%",md:"312px"},children:[(0,a.jsx)(S.az,{onClick:U,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&U()},children:(0,a.jsx)(S.l6,{readOnly:!0,value:L})}),Y&&(0,a.jsx)(S.pT,{bg:"W.2",border:"1px solid",borderColor:"B.6",borderRadius:2,flexDirection:"column",gap:5,mt:1,px:3,py:4,children:$.map(e=>{let{id:t,...n}=e;return(0,a.jsx)(na,{...n},t)})})]}),(0,a.jsx)(S.pT,{mt:{_:6,md:10},children:(0,a.jsx)(S.Sc,{defaultChecked:B,label:G,onToggle:P,theme:j})})]})});var nr=n(5041);let nl=l.Ay.ul.withConfig({componentId:"sc-49d305d8-0"})(["padding-inline-start:","px;margin-bottom:","px;li::before{content:' ';border-radius:50%;display:inline-block;margin-right:","px;margin-left:-1em;margin-bottom:2px;background:",";width:3px;height:3px;}li:not(:last-child){margin-bottom:","px;}"],(0,r.y)("space.6"),(0,r.y)("space.6"),(0,r.y)("space.3"),e=>(0,r.y)("colors."+e.bulletColor)(e),(0,r.y)("space.1")),ni=e=>{var t,n,r,l;let{prevUrl:s,nextUrl:d,currentStep:u}=e,p=(0,i.wA)(),_=(0,eE.useRouter)(),h=(0,f.vA)(_),{trackClickFn:g}=(0,c.A)({shouldTrackPageLoad:!0}),x=g("Portfolio Overview"),b=h.type||m.jv.CASH_PLUS_GUARANTEED_SGD,{strings:{general:{add_funds_cta:C},onboarding:{portfolio_overview_page:v},errors:j}}=(0,E.Ym)(),I=(0,A.Kb)(),N=(0,i.d4)(e=>k.et.getGuaranteedReturns(e,"ONBOARDING",b)),[w]=(0,i.d4)(k.B2.getPortfolios),{name:O=""}=null!=(l=null==I||null==(n=I.portfolioByType)||null==(t=n[h.type])?void 0:t[0])?l:{},F=(0,i.d4)(e=>k.AU.getAccountMetaInfo(e)),D=(null==F||null==(r=F.features)?void 0:r.AUTO_LOCK_IN)?v.note_steps:v.note_steps_manual,R=(0,Y.Wx)({initialValues:{name:O,amount:"100000"},validationSchema:eL.Ik().shape({name:eL.Yj().required(j.required_text),amount:eL.ai().required(j.required_text).min(1,j.minimum_amount_limit_text)}),validateOnMount:!0});o.useEffect(()=>{h.tenor&&h.type||!s||_.push(y.u12(s))},[h.tenor,s,_,h.type]);let B=N.find(e=>e.key===h.tenor),P=[{label:v.todays_rate_text,value:B.value+"% p.a.",labelProps:{color:"B.1",variant:"body2"},valueProps:{color:"B.1",variant:"body2"}},{label:v.term_text,value:B.label}],U=b===m.jv.CASH_PLUS_GUARANTEED_USD?v.amount_label_usd:v.amount_label;return(0,a.jsxs)(eO.mO,{containerWidth:"672px",contentWidth:"328px",isPrimaryCtaDisabled:!R.isValid,onPrimaryCtaCl
1ick:()=>{x("Next button");let e={name:R.values.name,depositOneTime:R.values.amount,maturityPeriod:B.key};p(T.s4.updatePortfolio(w.id,e,()=>{d&&p(T.Xn.submitPortfolioOverview({nextUrl:d,currentStep:u})),p(T.vc.getAccountPortfoliosInfo())},console.error))},primaryCtaText:C,children:[(0,a.jsx)(nr.sd,{renderOn:["desktop","tablet"],children:(0,a.jsx)(S.az,{mb:6,children:(0,a.jsx)(S.EY,{color:"B.1",variant:"label1",children:v.caption})})}),(0,a.jsx)(S.az,{mb:4,children:(0,a.jsx)(eO.Bt,{data:P})}),(0,a.jsxs)(S.az,{mb:4,children:[(0,a.jsx)(S.az,{mb:2,children:(0,a.jsx)(S.pd,{error:!!R.touched.name&&!!R.errors.name,errorText:R.touched.name?R.errors.name:void 0,id:"name",label:v.name_label,name:"name",onBlur:R.handleBlur,onChange:R.handleChange,placeholder:v.name_label,value:R.values.name})}),(0,a.jsx)(S.pd,{error:!!R.touched.amount&&!!R.errors.amount,errorText:R.touched.amount?R.errors.amount:void 0,id:"amount",label:U,name:"amount",onBlur:R.handleBlur,onChange:R.handleChange,placeholder:U,type:"number",value:R.values.amount})]}),(0,a.jsx)(nl,{bulletColor:"B.3",children:D.map((e,t)=>(0,a.jsx)("li",{children:(0,a.jsx)(S.EY,{color:"B.3",variant:"caption1",children:e})},t))}),!!B.message&&(0,a.jsx)(S.az,{mb:8,children:(0,a.jsx)(S.EY,{color:"B.3",variant:"caption3",children:(0,a.jsx)(E.In,{str:B.message,components:{highlight:(0,a.jsx)(S.EY,{variant:"label5"})}})})}),(0,a.jsx)(S.UE,{label:v.disclaimer_label_text,theme:"white",text:b===m.jv.CASH_PLUS_GUARANTEED_USD?v.disclaimer_text_usd:v.disclaimer_text})]})},ns=e=>e.map(e=>({label:"".concat(e.value,"% p.a."),labelRight:e.label,value:e.key})),nc=e=>{var t;let{nextUrl:n}=e,r=(0,eE.useRouter)(),{trackClickFn:l}=(0,c.A)({shouldTrackPageLoad:!0}),u=l("Select Tenor"),{strings:{onboarding:{portfolio_tenors_page:p}}}=(0,E.Ym)(),[_]=(0,i.d4)(k.B2.getPortfolios),h=null!=(t=_.type)?t:m.jv.CASH_PLUS_GUARANTEED_SGD,y=(0,i.d4)(e=>ns(k.et.getGuaranteedReturns(e,"ONBOARDING",h))),g=(0,i.d4)(e=>k.et.getDefaultTenor(e,"ONBOARDING",h)),[f,x]=o.useState(()=>ns([g])[0]);return o.useEffect(()=>{d.k.addSpanEvent(s.e.SIGN_CONTRACT,"Select tenor page loaded"),d.k.endSpan(s.e.SIGN_CONTRACT)},[]),(0,a.jsx)(eO.mO,{containerWidth:"672px",onPrimaryCtaClick:()=>{u("Next button");let e=n+"?tenor=".concat(f.value,"&type=").concat(h);r.push(e)},children:(0,a.jsxs)(S.pT,{flexDirection:{_:"column",md:"row"},py:4,children:[(0,a.jsx)(S.az,{width:{_:"100%",md:"50%"},children:(0,a.jsx)(S.$5,{noRadioIfSingle:!0,currentOption:f.value,options:y,label:y.length>1?p.select_rate_label:p.rate_and_term_label,onChange:e=>x(y.find(t=>t.value===e.target.value)),tooltip:{heading:p.term_text,description:p.term_tooltip_text}})}),(0,a.jsx)(nr.sd,{renderOn:["phone"],children:(0,a.jsx)(S.az,{borderBottom:"1px solid",borderColor:"B.6",mb:6,mt:10})}),(0,a.jsxs)(S.az,{ml:{_:0,md:10},mt:{_:0,md:11},width:{_:"100%",md:"50%"},children:[(0,a.jsx)(S.az,{mb:{_:6,md:4},children:(0,a.jsx)(eO.k3,{rate:parseFloat(f.label),strings:p,tenor:parseInt(f.labelRight)})}),(0,a.jsx)(S.UE,{label:p.disclaimer_label_text,text:p.disclaimer_text,theme:"white"})]})]})})},nd=(0,i.Ng)(e=>({location:e.router.location,portfolios:k.B2.getPortfolios(e),fundDepositDetails:k.B2.getFundDepositDetails(e)}),e=>({updateFundDepositDetails:(t,n,a)=>e(T.vc.updateFundDepositDetails(t,n,a)),navigate:t=>e((0,I.VC)(t))}));var nu=n(56694),np=n(81408);let n_=(0,l.Ay)(S.az).withConfig({componentId:"sc-2eeab4e4-0"})([".radio-container{display:grid;grid-template-columns:1fr 1fr;grid-gap:","px;}.option-label{margin-bottom:0;}.option-box{padding:18px ","px;border-radius:","px;background:",";border:1px solid ",";}@media (max-width:","){.radio-container{grid-template-columns:1fr;}}"],(0,r.y)("space.6"),(0,r.y)("space.4"),(0,r.y)("radii.2"),(0,r.y)("colors.W.1"),(0,r.y)("colors.B.6"),(0,r.y)("breakpoints.md")),nm=nd(e=>{let{strings:{general:{bank_account_details:t,next_cta:n},onboarding:{add_funds_section:{select_methods_text:r,funds_own_name_text:l,faq_link_text:i}}},geographyConstants:{DEFAULT_CURRENCY:u}}=(0,E.Ym)(),{trackClickFn:p}=(0,c.A)({shouldTrackPageLoad:!0}),_=p("Fund Deposit");o.useEffect(()=>{d.k.addSpanEvent(s.e.SIGN_CONTRACT,"Transfer funds page loaded"),d.k.endSpan(s.e.SIGN_CONTRACT)},[]);let h=(0,np._Z)({bank_account_details:t}),{portfolios:g,location:x,navigate:b}=e,C=(0,f.V8)(x.search,"transferType"),[v,j]=(0,o.useState)(h.find(e=>e.key===C)?C:""),A=(0,f.V8)(x.search,"step"),[I,T]=(0,o.useState)(!1),k={};v&&(k=h.find(e=>e.key===v));let N=g.find(e=>"inactive"===e.status),w=N?N.id:null;if(o.useEffect(()=>{(null==N?void 0:N.type)===m.jv.CASH_PLUS_GUARANTEED_USD&&T(!0)},[null==N?void 0:N.type]),!N||!w)return null;let O=()=>{b(y.akO)},F=(0,a.jsxs)(S.az,{children:[(0,a.jsx)(S.EY,{as:"div",color:"B.1",mb:6,mt:{_:2,md:0},variant:{_:"body2",md:"subtitle3"},children:r}),(0,a.jsx)(n_,{children:(0,a.jsx)(S.sx,{className:"radio-container",onChange:e=>j(e.target.value),optionClassName:"option-label",selected:v,theme:"white",options:h.map(e=>{let{label:t,key:n}=e;
1return{label:(0,a.jsx)(S.EY,{color:"B.7",variant:"label",children:t}),value:n,className:"option-box"}})})}),I&&(0,a.jsx)(nu.A,{onClose:()=>T(!1),onProceed:()=>T(!1),isOnboarding:!0})]}),D=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eO.L7,{caption:l}),(0,a.jsx)(S.pT,{alignItems:"center",justifyContent:"center",mt:3,children:(0,a.jsx)(S.A,{href:t8.WjE,rel:"noopener noreferrer",target:"_blank",textTranform:"uppercase",children:(0,a.jsx)(S.EY,{capitalize:!0,color:"B.7",variant:"label3",children:i})})}),(0,a.jsx)(S.EY,{capitalize:!0,as:"div",color:"B.1",my:6,variant:{_:"label2",md:"label1"},children:null==k?void 0:k.label}),(0,a.jsx)(eO.TU,{portfolioReferenceCode:N.referenceCode,portfolioType:N.type,transferMethodDetails:k})]});return v||"details"!==A||b(y.HyN.FUNDS_DEPOSIT),"details"===A?(0,a.jsx)(eO.mO,{containerStyles:{px:{_:6,md:7}},containerWidth:"728px",isPrimaryCtaDisabled:!v,onPrimaryCtaClick:()=>{_("Done button");let t={currency:e.fundDepositDetails&&e.fundDepositDetails.currency?e.fundDepositDetails.currency:u,sipDate:e.fundDepositDetails&&e.fundDepositDetails.sipDate?e.fundDepositDetails.sipDate:null};e.updateFundDepositDetails(t,y.akO,null)},onSecondaryCtaClick:O,primaryCtaText:"Done",secondaryCtaFillType:"outlined",secondaryCtaText:"Complete later",showSecondaryCta:!0,contentWidth:C===np.bY.PAYNOW?"360px":"100%",children:D}):(0,a.jsx)(eO.mO,{containerWidth:"728px",contentWidth:"648px",isPrimaryCtaDisabled:!v,onPrimaryCtaClick:()=>{if(_("Next button"),!v)return b(y.HyN.FUNDS_DEPOSIT);
1b("".concat(y.HyN.FUNDS_DEPOSIT,"?step=details&transferType=").concat(v))},onSecondaryCtaClick:O,primaryCtaText:n,secondaryCtaFillType:"outlined",secondaryCtaText:"Complete later",showSecondaryCta:!0,children:F})}),nh=()=>{let{geographyConstants:e}=(0,E.Ym)(),t=(0,i.wA)(),n=(0,eE.useRouter)(),a=(0,i.d4)(e=>k.$A.getAccountSetupConfig(e));return(o,r)=>{let l=o,i=e=>{let t=e.data.accountSetupStatus.find(e=>e.key===r),o=null==t?void 0:t.next;if((0,eF.qL)(l)){let t=e.data.accountSetupStatus.find(e=>e.key===nn.y3[y.HyN.SUITABILITY_CHECK]);(null==t?void 0:t.next)&&(o=t.next)}let i=(0,nn.oK)(o,a);i&&n.push(i)},s=(0,eF.j7)(o),c=(0,eF.Dg)(o),d=s||c?o:null;s&&(o=e.CUSTOM_PORTFOLIO_TYPE),c&&(o=e.PROTECTED_PORTFOLIO_TYPE),(0,eF.qL)(l)||t((0,tK.ue)()),t(T.vc.updatePendingPortfolio({type:o,theme:d,isThemePortfolio:!!d},()=>{t(T.zV.getUserInfo()),t(T.Xn.getKycInfo(null,i))}))}},ny=(0,i.Ng)(e=>({portfolioContentData:k.et.portfolioContentData(e)}),e=>({getPortfolioContentDataV1:()=>e(T.s4.getPortfolioContentDataV1()),navigate:t=>e((0,I.VC)(t))}))(e=>{let{getPortfolioContentDataV1:t,portfolioContentData:n,currentStep:r,navigate:l}=e,c=nh(),_=(0,i.d4)(k.$u.getUserId);return((0,o.useEffect)(()=>{n||t()},[n]),(0,o.useEffect)(()=>{d.k.addSpanEvent(s.e.RISK_PREFERENCE,"Portfolio selection page loaded"),d.k.endSpan(s.e.RISK_PREFERENCE)},[]),n)?(0,a.jsx)(S.az,{pb:10,children:(0,a.jsx)(nr.dB,{onPortfolioSelect:e=>{d.k.startSpan(s.e.PORTFOLIO_SELECTION),d.k.setSpanAttributes(s.e.PORTFOLIO_SELECTION,(0,u.fQ)(_,m.XN.SG));let t=(0,eF.S)(n,e);(0,g.Ay)((0,p.yxd)(e,"")),t&&t.length>1?l("".concat((0,y.u12)(y.HyN.SELECT_FUND_SOURCE),"?type=").concat(e)):c(e,r)},webAppArea:"ONBOARDING"})}):(0,a.jsx)(te.k,{showLoader:!0,text:"Loading..."})}),ng=(0,i.Ng)(e=>({documents:k.$A.getDocuments(e),userDetails:k.$u.getUserDetails(e)}),e=>({updateDocuments:t=>{let{documents:n,documentsReceived:a,nextUrl:o,currentStep:r}=t;return e(T.Xn.updateDocuments({documents:n,documentsReceived:a,nextUrl:o,currentStep:r}))},updateDocumentsV2:t=>{let{documents:n,documentsReceived:a,onSuccessCb:o}=t;return e(T.Xn.updateDocumentsV2({documents:n,documentsReceived:a,onSuccessCb:o}))},getS3SignedUrl:(t,n,a)=>e(T.mD.getS3SigningUrl(t,n,a))}),(e,t,n)=>({...e,...t,...n}));var nf=n(30053),nx=n(12535);let nb=l.Ay.ul.withConfig({componentId:"sc-39e859f8-0"})(["list-style-position:outside;list-style-type:initial;padding-left:","px;li::before{color:",";width:","px;height:","px;font-weight:bold;}"],(0,r.y)("space.4"),(0,r.y)("colors.B.1"),(0,r.y)("space.2"),(0,r.y)("space.2")),nC=ng(e=>{let t=(0,i.d4)(k.$u.getUserId),{trackClickFn:n}=(0,c.A)({shouldTrackPageLoad:!0}),r=n("Document Upload"),{strings:{general:{okay_cta:_,submit_cta:h},kyc_flow:{document_upload_section:{supported_format_text:y,skip_confirmation_popup_text:f,upload_later_via_dashboard_text:x,documents_to_use_text:b,upload_later_cta:C,sg_document_list:v,last_3_months_text:A,front_id_text:I,back_id_text:T,residency_proof_text:N}}},geographyConstants:w}=(0,E.Ym)(),{updateDocuments:O,updateDocumentsV2:F,nextUrl:D,userDetails:R,theme:B,combinedTheme:P,currentStep:U}=e,{text:{color:{dark:z,title:L,link_cta:H,list_of_doc_label:M,list_of_doc_list_item_text:V,information_light:G}}}=P.componentTheme,W=l.Ay.li.withConfig({componentId:"sc-39e859f8-1"})(["color:",";"],V),[q,K]=(0,o.useState)({identity:e.documents&&e.documents.identity?e.documents.identity:[],residential:e.documents&&e.documents.residential?e.documents.residential:[],nric:e.documents&&e.documents.nric?e.documents.nric:[],edd:e.documents&&e.documents.edd?e.documents.edd:[]}),[X,Q]=(0,o.useState)(!1),[$,J]=(0,o.useState)(!1);o.useEffect(()=>{d.k.addSpanEvent(s.e.EMPLOYMENT_DETAILS,"Upload document page loaded"),d.k.endSpan(s.e.EMPLOYMENT_DETAILS)},[]);let Z=(e,t)=>e?e.filter(e=>!e.deleted).length:0,ee=(e,t)=>e?e.filter(e=>!e.deleted&&e.side===t).length:0,et=()=>!!q&&!!R&&q.residential&&Z(q.residential)>0&&q.identity&&1===ee(q.identity,"FRONT"),en=()=>"fr"===R.residentialStatus?"FINPASS":"fro"===R.residentialStatus?"PASSPORT":"NRIC",ea=()=>{e.onModalClose&&e.onModalClose(),e.onUpdateSuccess&&e.onUpdateSuccess()},eo=(e,t,n)=>a=>
1{a.side=t,a.type=n,K({...q,[e]:[...q[e],a]})},er=e=>t=>{K({...q,[e]:[...q[e].filter(e=>e.url!==t.url),{...t}]})},el=()=>{Q(!1)},ei=()=>{d.k.startSpan(s.e.UPLOAD_DOCUMENTS),d.k.setSpanAttributes(s.e.UPLOAD_DOCUMENTS,(0,u.fQ)(t,m.XN.SG)),d.k.addSpanEvent(s.e.UPLOAD_DOCUMENTS,"Skipped upload docs"),(0,g.Ay)((0,p.d4B)()),es("steps"),Q(!1)},es=e=>{let t={},n=et();Object.keys(q).forEach(e=>{q[e].length>0&&(t[e]=q[e])}),"steps"===e?O({documents:t,documentsReceived:n,nextUrl:D,currentStep:U}):F({documents:t,documentsReceived:n,onSuccessCb:ea})},ec=e=>{r("Next button"),"steps"===e&&(d.k.startSpan(s.e.UPLOAD_DOCUMENTS),d.k.setSpanAttributes(s.e.UPLOAD_DOCUMENTS,(0,u.fQ)(t,m.XN.SG))),(0,g.Ay)((0,p.dg)()),es(e)},ed=(0,a.jsx)(S.EY,{align:{_:"left",md:"center"},as:"div",color:G,mb:{_:6,md:8},variant:"body1",children:(0,a.jsx)(E.In,{str:y,components:{brElement:(0,a.jsx)("br",{})},values:{maxFileSize:(0,nf.v7)(m.$Y)}})}),eu=(t,n,o)=>{let r="FRONT",l=[],i="";return"identity_front"===t?(l=q.identity.filter(e=>"FRONT"===e.side),i="identity"):"identity_back"===t?(l=q.identity.filter(e=>"BACK"===e.side),i="identity",r="BACK"):(l=q[t],i=t),(0,a.jsx)(nx.A,{addDoc:eo(i,r,n),deleteDoc:er(i),docList:l.filter(e=>!e.deleted),getS3SignedUrl:e.getS3SignedUrl,header:o,maxFilesAllowed:1,theme:B})},ep=(0,a.jsxs)(S.aF,{onClose:()=>J(!1),title:b,children:[v.map((e,t)=>(0,a.jsxs)(S.az,{mb:6,children:[(0,a.jsx)(S.EY,{color:M,variant:"subtitle3",children:(0,a.jsx)(E.In,{components:{br:(0,a.jsx)("br",{})},str:e.label})}),(0,a.jsx)(S.az,{mt:1,children:(0,a.jsx)(nb,{children:e.acceptedProofs.map((e,t)=>(0,a.jsx)(W,{children:(0,a.jsx)(S.EY,{color:V,variant:"body2",children:e})},e))})})]},"".concat(e.label).concat(t))),(0,a.jsx)(S.EY,{color:"B.3",variant:"caption2",children:A})]}),e_=e=>(0,a.jsxs)(S.az,{children:[ed,(0,a.jsxs)(S.az,{display:"grid",gridColumnGap:12,gridRowGap:6,gridTemplateColumns:{_:"1fr",md:"1fr 1fr"},children:[(0,a.jsx)(S.az,{"data-testId":"identity-front-section",children:eu("identity_front",en(),I)}),(0,a.jsx)(S.az,{"data-testId":"identity-back-section",children:eu("identity_back",en(),T)}),(0,a.jsx)(S.az,{"data-testId":"residential-section",children:eu("residential",null,N)})]})]}),em=!et(),eh=()=>ec("steps"),ey=()=>{Q(!0)};return(0,a.jsx)(Y.l1,{validateOnMount:!0,children:()=>(0,a.jsx)(a.Fragment,{children:e.showInModal?(0,a.jsx)(S.M1,{actionLabelLong:"Update",onAction:()=>es("modal"),onCancel:e.onModalClose,theme:"dashboard",title:"Upload your documents",children:e_("modal")}):(0,a.jsxs)(o.Fragment,{children:[!!X&&(0,a.jsxs)(S.QE,{onClose:el,onPrimaryCtaClick:ei,primaryCtaText:_,children:[(0,a.jsx)(S.EY,{color:z,variant:"subtitle3",children:(0,a.jsx)(E.In,{str:f,components:{emailLinkTag:(0,a.jsx)("a",{href:"mailto:"+w.links.SYFE_CONTACT_EMAIL}),whatsappLinkTag:(0,a.jsx)("a",{rel:"noopener noreferrer",target:"_blank",href:w.links.SYFE_CONTACT_WHATSAPP_URL}),textComponent:(0,a.jsx)(S.EY,{color:H})},values:{syfeContactEmail:w.links.SYFE_CONTACT_EMAIL,syfeContactWhatsapp:w.links.SYFE_CONTACT_WHATSAPP}})}),(0,a.jsx)(S.EY,{as:"div",color:L,mt:4,variant:"subtitle3",children:x})]}),(0,a.jsx)(j.A,{containerWidth:"833px",contentWidth:"672px",isPrimaryCtaDisabled:em,onPrimaryCtaClick:eh,primaryCtaText:h,children:(0,a.jsxs)(S.az,{"data-testid":"document-upload-form",children:[e_("steps"),(0,a.jsxs)(S.pT,{flexDirection:"column",gap:6,justifyContent:"center",mb:{_:4,md:0},mt:10,children:[(0,a.jsx)(S.$n,{fillType:"text",onClick:()=>J(!0),p:0,children:b}),(0,a.jsx)(S.$n,{analyticsInfo:(0,p.g6V)(),fillType:"text",onClick:ey,p:0,children:(0,a.jsx)(S.EY,{capitalize:!0,color:"B.1",variant:"label2",children:C})})]}),$&&ep]})})]})})})}),nv=(0,C.G)(nC,{light:{},dashboard:{text:{color:{information_light:"colors.B.3",dark:"colors.BT.2",title:"colors.BT.1",light:"colors.B.1",link_cta:"colors.secondary.6",list_of_doc_label:"colors.BT.2",list_of_doc_list_item_text:"colors.BT.3"}}},white:{text:{color:{information_light:"colors.B.3",dark:"colors.B.1",title:"colors.B.1",light:"colors.N.15",link_cta:"colors.B.7",list_of_doc_label:"colors.B.1",list_of_doc_list_item_text:"colors.B.1"}}}});var nj=n(12722),nE=n(24376),nA=n(87833),nS=n(13700),nI=n(90332);let nT=l.Ay.hr.withConfig({componentId:"sc-74e82521-0"})(["border:0;border-bottom:1px solid ",";"],(0,r.A)("colors.N.4")),nk=l.Ay.ul.withConfig({componentId:"sc-74e82521-1"})(["list-style-position:outside;list-style-type:initial;padding:0 0 0 ","px;li{color:",";}"],(0,r.A)("space.4"),(0,r.A)("colors.B.2")),nN=(0,nj.A)(e=>{let{title:t,icon:n,type:r,warnings:l,navigate:c,isDashboardPage:u,savePortfolio:p,responsiveUtility:_,theme:m,refreshAccountPortfoliosInfo:h,etfsData:f,financialAssessmentData:x,suitabilityDataId:b,handleSuitabilityCheckCross:C}=e,{strings:{portfolio_data_page:{portfolio_added_successfully_text:v}
1,onboarding:{suitability_page:{not_suitable_section:{warnings_list:j,proceed_anyway_cta:I,view_suitable_portfolios_cta:T,portfolio_not_fit_text:k,heres_why_text:N}}}}}=(0,E.Ym)(),w=(0,i.d4)(e=>e.responsiveUtility.isDesktop),O=(0,nS.A)(),F=(0,A.Kb)(),[D,R]=(0,ew.A)(!1),{type:B,isThemePortfolio:P,theme:Y}=eF.O3(r),{riskPreference:U=""}=x||{},z=()=>{(0,g.Ay)({action:"help_button_click",category:"not_suitable_portfolio_page",label:r})};(0,o.useEffect)(()=>{var e;d.k.addSpanEvent(s.e.SUITABILITY_CHECK,"Portfolio not suitable"),d.k.endSpan(s.e.SUITABILITY_CHECK);let t=null==(e=document.getElementsByClassName("help-desk"))?void 0:e[0];return t&&t.addEventListener("click",z),()=>{t&&t.removeEventListener("click",z)}},[]);let L=u?y.rlg:y.Omj,H=e=>{O(e.data.id)},M={label:"Add portfolio",onPrimaryClickHandler:()=>c(y.oVb),heading:"Portfolio not suitable"};return(0,a.jsxs)(a.Fragment,{children:[u&&!_.isPhone&&(0,a.jsx)(S.Xm,{heading:M.heading,label:M.label,onPrimaryClickHandler:M.onPrimaryClickHandler}),(0,a.jsx)(S.az,{my:{md:16},children:(0,a.jsxs)(eO.mO,{containerWidth:"672px",contentWidth:"590px",onPrimaryCtaClick:()=>{(0,g.Ay)({action:"proceed_click",category:"not_suitable_portfolio_page",label:r,label2:U});if(u){let e=Y||B,{objective:t,name:n}=F.portfolioByType[e][0];eF.og({isThemePortfolio:P,isCustomPortfolio:!P&&"CUSTOM_USD"===B,themeKey:Y,type:F.portfolioByType[e][0].type,name:n,objective:t,savePortfolio:p,onSuccess:H,portfolio_added_successfully_text:v,etfsData:f,isDashboardPage:u,suitabilityDataId:b})}else C()},primaryCtaText:I,children:[(0,a.jsx)(nI.A,{height:"80px",icon:n,width:"80px"}),(0,a.jsx)(S.az,{mt:4,children:(0,a.jsx)(S.EY,{color:"B.1",variant:"subtitle2",children:(0,a.jsx)(E.In,{str:k,values:{portfolio:t},components:{brElement:w?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)("br",{})}})})}),(0,a.jsxs)(S.pT,{cp:!0,alignItems:"center",justifyContent:"space-between",mt:{_:4,md:10},onClick:R,width:"100%",children:[(0,a.jsx)(S.EY,{color:"B.2",variant:"subtitle2",children:N}),(0,a.jsx)(S.az,{color:"B.2",height:"16px",width:"16px",children:(0,a.jsx)(S.C0,{newTheme:!0,name:"arrowDown"})})]}),D&&(0,a.jsx)(S.az,{mb:8,mt:3,children:(0,a.jsx)(nk,{children:Object.keys(l).map((e,t)=>l[e]&&(0,a.jsx)(S.az,{as:"li",children:(0,a.jsx)(S.EY,{as:"span",color:"B.2",variant:"body2",children:j[e].reason_text})},t))})}),(0,a.jsx)(nT,{}),(0,a.jsx)(S.pT,{alignItems:"center",justifyContent:"center",mt:10,children:(0,a.jsx)(S.$n,{fillType:"text",iconRight:"arrowRight",onClick:()=>{(0,g.Ay)({action:"view_suitable_portfolios_click",category:"not_suitable_portfolio_page",label:r,label2:U}),c("".concat(L,"?type=").concat(r))},p:0,iconProps:{width:"10px",height:"10px",strokeWidth:"2px"},children:T})})]})})]})}),nw=(0,nj.A)(e=>{let{suitabilityData:t,isSuitabilityDataLoading:n,checkPortfolioSuitability:r,pendingPortfolioCreation:l,loadUserInfo:c,portfolioContentData:_,getPortfolioContentDataV1:h,replace:x,location:b,onBackClick:C,nextUrl:v,updateSuitabilityCheckStep:j,currentStep:E}=e,I=(0,A.Kb)(),T=(0,i.d4)(k.$u.getUserId),[N,O]=o.useState(n||!l||!_),F=(0,f.V8)(null==b?void 0:b.search,"type");(0,o.useEffect)(()=>{d.k.addSpanEvent(s.e.PORTFOLIO_SELECTION,"Suitability page loaded"),d.k.endSpan(s.e.PORTFOLIO_SELECTION),_||h(),l?(d.k.startSpan(s.e.SUITABILITY_CHECK),d.k.setSpanAttributes(s.e.SUITABILITY_CHECK,(0,u.fQ)(T,m.XN.SG)),d.k.addSpanEvent(s.e.SUITABILITY_CHECK,"Running suitability check",{type:F}),r()):(c(),w.Cp(Error("pendingPortfolio is not available")))},[]),(0,o.useEffect)(()=>{let e;return!n&&t&&(e=setTimeout(()=>{O(!1)},1e3)),()=>{e&&clearTimeout(e)}},[n,t]);let D=null==l?void 0:l.type;(null==l?void 0:l.isThemePortfolio)&&l.theme&&(D=l.theme);let R=F||D,B=null==t?void 0:t.isSelectedPortfolioSuitable,P=(0,nE.fx)(_),Y=()=>{(0,g.Ay)((0,p.Q15)("")());let e=y.RQI;x((0,nA.W)(R,e,"suitable"))};if((0,o.useEffect)(()=>{!n&&B&&Y()},[n,B]),N)return(0,a.jsx)(eO.EI,{progressComplete:!n&&!!t,theme:"white"});if(!t||n||!P||!R)return null;let{warnings:U}=t,{iconV2:z,title:L}=I.portfolioByType[R][0];return!n&&B?null:(0,a.jsx)(S.az,{bg:"N.2",children:(0,a.jsx)(nN,{handleSuitabilityCheckCross:()=>{j(E,v)},icon:z,onBackClick:C,theme:"white",title:L,type:R,warnings:U})})}),nO=(0,l.Ay)(e=>(0,a.jsx)(S.A,{...e})).withConfig({componentId:"sc-41cd55b0-0"})(["color:",";font-weight:600;&:hover{color:",";}"],(0,r.y)("colors.B.7"),(0,r.y)("colors.B.7")),nF=e=>{let{strings:t,...n}=e;return(0,a.jsxs)(S.aF,{title:t.title_text,...n,children:[(0,a.jsx)(S.EY,{c
1olor:"B.1",variant:"body3",children:(0,a.jsx)(E.In,{str:t.body_text,components:{br:(0,a.jsx)("br",{}),CARLink:(0,a.jsx)(nO,{href:t8.s_s,target:"_blank"}),TeamLink:(0,a.jsx)(nO,{href:"mailto:".concat(m.LM)})}})}),(0,a.jsx)(S.A,{to:y.u12(y.HyN.CAR_INVESTMENT_KNOWLEDGE),children:(0,a.jsx)(S.$n,{mt:6,width:"100%",children:t.cta_text})})]})},nD=e=>{var t,n;let{currentStep:r,nextUrl:l}=e,s=(0,i.wA)(),c=(0,i.d4)(k.$u.getFinancialAssessmentData),[d,u]=o.useState(null!=(n=null==(t=c.investmentKnowledgeCar)?void 0:t.isCarSecondScreeningPassed)?n:null),[p,_]=o.useState(!1),{strings:{onboarding:{car_test_page:m}}}=(0,E.Ym)();return(0,a.jsxs)(eO.mO,{heading:m.heading,isPrimaryCtaDisabled:null===d,onPrimaryCtaClick:()=>{var e;if(!d)return void _(!0);let t={investmentKnowledgeCar:{isCarFirstScreeningPassed:null==(e=c.investmentKnowledgeCar)?void 0:e.isCarFirstScreeningPassed,isCarSecondScreeningPassed:d}};s(T.Xn.updateFinancialAssessmentDetails({financialAssessment:t,nextUrl:l,currentStep:r}))},children:[(0,a.jsx)(S.az,{my:6,children:(0,a.jsx)(eO.sn,{caption:m.info_text})}),(0,a.jsx)(S.Kw,{name:"car-question",onChange:e=>u("yes"===e.target.value),question:m.question.main_text,selected:null===d?null:d?"yes":"no",listOptions:m.question.list.map((e,t)=>(0,a.jsx)(E.In,{str:e,components:{SGXEduLink:(0,a.jsx)(nO,{href:t8.iBv,target:"_blank"})}},t)),options:(0,tS.yk)(m.question.options.yes_text,m.question.options.no_text)}),p&&(0,a.jsx)(nF,{onClose:()=>_(!1),strings:m.soft_block_modal})]})},nR=(0,l.Ay)(S.EY).withConfig({componentId:"sc-ab0865a-0"})(["margin-left:12px;display:block;::before{content:'⢠';display:inline-block;margin-left:-12px;margin-right:7px;}"]),nB=e=>{var t,n;let{currentStep:r,nextUrl:l}=e,s=(0,i.wA)(),c=(0,eE.useRouter)(),d=(0,i.d4)(k.$u.getFinancialAssessmentData),[u,p]=o.useState(null!=(n=null==(t=d.investmentKnowledgeCar)?void 0:t.isCarFirstScreeningPassed)?n:null),{strings:{onboarding:{car_investment_knowledge_page:_}}}=(0,E.Ym)();return(0,a.jsxs)(eO.mO,{heading:_.heading,isPrimaryCtaDisabled:null===u,onPrimaryCtaClick:()=>{s(T.Xn.updateFinancialAssessmentDetails({financialAssessment:{investmentKnowledgeCar:{isCarFirstScreeningPassed:u}},onUserInfoLoadedSuccess:e=>{e.data.isCarPassed?c.push(l):c.push(y.u12(y.HyN.CAR_TEST))},currentStep:r}))},children:[(0,a.jsx)(S.az,{my:6,children:(0,a.jsx)(eO.sn,{caption:_.info_text})}),(0,a.jsx)(S.Kw,{listOptions:_.question.list,name:"car-question",onChange:e=>p("yes"===e.target.value),question:_.question.main_text,selected:null===u?null:u?"yes":"no",tooltipModalProps:{title:_.question.tooltip.title},options:(0,tS.yk)(_.question.options.yes_text,_.question.options.no_text),tooltip:(0,a.jsx)(E.In,{str:_.question.tooltip.body,components:{br:(0,a.jsx)("br",{}),heading:(0,a.jsx)(S.EY,{fontWeight:700}),point:(0,a.jsx)(nR,{})}})})]})},nP={src:"/_next/static/media/ritesh-headshot.fa270ce8.png",height:200,width:152,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAV1BMVEVMaXEzPWEaKCg1LS1XUmiHgIlVYY/T0dg8SG5HNjCuh3V1SjiEY1KGiKK8iGxpUEY+THhkSz1kPy9RX5WorcIxPGJNWIhucIs5RHOaaFFXOi6pdFenqsZJ7tjtAAAAGHRSTlMA5BNDKxvQ/vvO+fh5kGMztNzonfz///6Ur116AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAOElEQVR4nAXBiQKAEBBAwSfHUjq1SP3/dzYDUzp3wI43A+56NoC0eHBHm1dPrFW+gsZ+S8CoNgk/M+ECHLlzs3oAAAAASUVORK5CYII=",blurWidth:6,blurHeight:8},nY=(0,l.Ay)(e=>(0,a.jsx)(S.A,{...e})).withConfig({componentId:"sc-9ba9958e-0"})(["color:",";font-weight:600;&:hover{color:",";}"],(0,r.y)("colors.B.7"),(0,r.y)("colors.B.7")),nU=(0,l.Ay)(S._V).withConfig({componentId:"sc-9ba9958e-1"})(["position:absolute;left:0;bottom:0;"]),nz=e=>{let{currentStep:t,nextUrl:n}=e,r=(0,i.wA)(),l=(0,A.Kb)(),c=(0,i.d4)(k.$u.getAdvisor),[u]=(0,i.d4)(k.B2.getPortfolios),p=u.theme||u.type,{cardTitle:_,title:m}=(0,i.d4)(e=>k.et.getPortfolioFromContentData(e,p)),{iconV2:h,name:y}=l.portfolioByType[p][0],g=(0,eF.Dg)(u.theme),[f,x]=o.useState(y),{strings:{onboarding:{confirm_portfolio_page:b}}}=(0,E.Ym)();return o.useEffect(()=>{d.k.addSpanEvent(s.e.SIGN_CONTRACT,"Optimise page loaded"),d.k.endSpan(s.e.SIGN_CONTRACT)},[]),(0,a.jsxs)(eO.mO,{isPrimaryCtaDisabled:!f.trim(),onPrimaryCtaCl
1ick:()=>{let e={name:f.trim()};r(T.s4.updatePortfolio(u.id,e,()=>{n&&r(T.Xn.submitRebalanceConsent({nextUrl:n,currentStep:t})),r(T.vc.getAccountPortfoliosInfo())},console.error))},children:[(0,a.jsx)(S.pT,{alignItems:"center",bg:"B.5",borderRadius:25,height:10,justifyContent:"center",mb:4,width:10,children:(0,a.jsx)(S._V,{alt:"Portfolio icon",height:32,src:h,width:32})}),(0,a.jsx)(S.az,{mb:8,children:(0,a.jsx)(S.EY,{color:"N.15",variant:"subtitle3",children:_})}),(0,a.jsx)(S.az,{maxWidth:{_:"auto",md:"312px"},mb:6,children:(0,a.jsx)(S.pd,{helperText:b.field_help_text,label:b.field_label,onChange:e=>x(e.target.value),value:f})}),!g&&(0,a.jsxs)(S.az,{mb:{_:11,md:7},mt:-8,children:[(0,a.jsx)(S.az,{mb:2,children:(0,a.jsx)(S.EY,{capitalize:!0,color:"B.1",variant:"label3",children:b.title_text})}),(0,a.jsx)(S.EY,{color:"B.2",variant:"caption1",children:(0,a.jsx)(E.In,{str:b.body_text,values:{title:m},components:{br:(0,a.jsx)("br",{}),LearnMore:(0,a.jsx)(nY,{href:t8._M3,target:"_blank"})}})})]}),(0,a.jsxs)(S.az,{cp:!0,bg:"B.1",borderRadius:4,onClick:()=>{let e;e=c?l.advisorsMeta.advisorDetails[c].link:l.advisorsMeta.advisorToPublicPortfolios[u.type].link,(0,e$.B)()&&e&&window.open(e,"_blank")},pl:24,position:"relative",pr:3,py:6,width:{_:"100%",md:"fit-content"},children:[(0,a.jsx)(nU,{alt:"Expert support",height:"100px",src:nP,width:"76px"}),(0,a.jsxs)(S.pT,{alignItems:"center",justifyContent:"space-between",children:[(0,a.jsxs)(S.az,{mr:2,children:[(0,a.jsx)(S.az,{mb:1,children:(0,a.jsx)(S.EY,{capitalize:!0,color:"G.2",variant:"label3",children:b.help_title_text})}),(0,a.jsx)(S.EY,{color:"W.1",variant:"caption1",children:b.help_subtitle_text})]}),(0,a.jsx)(S.az,{color:"B.8",children:(0,a.jsx)(S.C0,{height:"16px",name:"arrowRight",width:"16px"})})]})]})]})};var nL=n(9080);let nH=(0,l.Ay)(S.az).withConfig({componentId:"sc-778d979e-0"})([".radio-container{display:grid;grid-template-columns:1fr;grid-gap:","px;}.option-label{margin-bottom:0;width:100%;}.option-box{padding:18px ","px;border-radius:","px;background:",";border:1px solid ",";}@media (min-width:","){.radio-container{grid-template-columns:1fr 1fr;}}"],(0,r.A)("space.6"),(0,r.A)("space.4"),(0,r.A)("radii.2"),(0,r.A)("colors.W.1"),(0,r.A)("colors.B.6"),(0,r.A)("breakpoints.md"));function nM(e){var t,n;let{currentStep:r}=e,{strings:{onboarding:{fund_source_selection_page:{select_primary_source_caption:l,bank_account_text:i,srs_account_text:s}}}}=(0,E.Ym)(),c=(0,eE.useRouter)(),d=nh(),u={[m.Cr.SRS]:s,[m.Cr.CASH]:i},p=(0,eN.A)();(0,o.useEffect)(()=>{p||c.push((0,y.u12)(y.HyN.CHOOSE_PORTFOLIO))},[p,c]);let _=c.query.type,[h,g]=(0,o.useState)(null==p||null==(t=p.config)?void 0:t.find(e=>(null==e?void 0:e.type)===_).fundSource);if(!p)return null;
1let f=p.config.map(e=>({value:e.fundSource,label:u[e.fundSource],tags:e.tags})),x=null==(n=p.config.find(e=>e.fundSource===h))?void 0:n.type;return(0,a.jsxs)(eO.mO,{containerStyles:{py:{_:6,md:10}},containerWidth:"728px",onPrimaryCtaClick:()=>d(x,r),children:[(0,a.jsx)(S.az,{mb:6,children:(0,a.jsx)(S.EY,{color:"B.1",variant:{_:"body2",md:"subtitle4"},children:l})}),(0,a.jsx)(nH,{children:(0,a.jsx)(S.sx,{className:"radio-container",column:!1,onChange:e=>{g(e.target.value)},optionClassName:"option-label",selected:h,theme:"white",options:f.map(e=>{let{label:t,value:n,tags:o}=e;return{label:(0,a.jsxs)(S.pT,{alignItems:"center",children:[(0,a.jsx)(S.EY,{color:"B.7",variant:{_:"label2",md:"label"},children:t}),(0,a.jsx)(nL.A,{test:(null==o?void 0:o.length)>0,children:o.map(e=>{let{label:t}=e;return(0,a.jsx)(S.EY,{capitalize:!0,color:"G.2",ml:2,variant:"label4",children:t},t)})})]}),value:n,className:"option-box"}})})})]})}let nV=e=>eL.Ik().shape({bankName:(0,eH.RN)(e),accountNumber:(0,eH._C)(e)});var nG=n(43235),nW=n(68906);function nq(e){let{nextUrl:t}=e,{strings:{onboarding:{srs_bank_details_page:{add_details_caption:n,srs_bank_label:r,srs_bank_placeholder:l,srs_bank_account_number_label:s,srs_bank_account_number_placeholder:c,investment_time_disclaimer:d,save_and_proceed_cta:u}},errors:p}}=(0,E.Ym)(),_=(0,A.Kb)(),h=(0,i.wA)(),y=Object.values(_.fundSourceToBankDetailsMap[m.Cr.SRS]).map(e=>{let{name:t,localeData:n}=e;return{value:t,label:n.name}}),g=(0,i.d4)(e=>e.router.location),f=(0,i.d4)(k.AU.getAllBankDetails),x=(0,i.d4)(k.AU.getSrsInvestmentAmount);if((0,o.useEffect)(()=>{window.history.pushState(null,null,g.href),window.onpopstate=function(){window.history.go(1)}},[g.href]),(0,o.useEffect)(()=>{f||h((0,nG.getAllBankDetails)())},[h,f]),!f)return(0,a.jsx)(nr.kt,{});let b=f&&f.find(e=>e.fundSource===m.Cr.SRS),C=e=>{let{key:t,values:n,setFieldValue:a}=e;return e=>{let{value:o}=e.target;a(t,(0,eH.QZ)(n.bankName,o))}},v=e=>{let{values:t,setFieldValue:n,validateField:a}=e;return e=>{let{value:o}=e.target;n("bankName",o),n("accountNumber",(0,eH.QZ)(o,t.accountNumber)),setTimeout(()=>{a("accountNumber")},0)}},j=e=>[{key:"bankName",label:r,placeholder:l,Component:S.l6,options:y,disabled:null==b?void 0:b.bankName,handleInputChange:v},{key:"accountNumber",label:s,placeholder:c,Component:S.pd,disabled:!e.bankName||(null==b?void 0:b.accountNumber),handleInputChange:C,type:"tel"}];return(0,a.jsx)(Y.l1,{enableReinitialize:!0,validateOnMount:!0,onSubmit:e=>{let n={fundSource:m.Cr.SRS,bankName:e.bankName,accountNumber:e.accountNumber.replace(/-/g,"")},a="".concat(t);b?h((0,I.VC)(a)):h((0,nG.addBankDetails)(n,()=>{h((0,nW.getKycInfo)(a)),h((0,nG.getAllBankDetails)(null,{showLoader:!1}))}))},validationSchema:nV(p),initialValues:{bankName:null==b?void 0:b.bankName,accountNumber:null==b?void 0:b.accountNumber,amount:x},children:e=>{let{values:t,errors:o,touched:r,isValid:l,setFieldValue:i,handleChange:s,handleSubmit:c,handleBlur:p,validateField:_}=e,m=j(t);return(0,a.jsxs)(eO.mO,{containerStyles:{px:{_:4,md:0},py:{_:6,md:0}},containerWidth:"728px",contentWidth:"728px",isPrimaryCtaDisabled:!l,onPrimaryCtaClick:c,primaryCtaText:u,children:[(0,a.jsx)(S.pT,{alignItems:"center",p:{_:0,md:8},pb:{_:6,md:4},children:(0,a.jsx)(S.EY,{capitalize:!0,color:"B.1",variant:{_:"label2",md:"label1"},children:n})}),(0,a.jsxs)(S.az,{bg:{_:"transparent",md:"W.1"},borderTopColor:"B.5",borderTopStyle:"solid",borderTopWidth:{_:0,md:"1px"},pb:{_:0,md:6},pt:{_:0,md:8},px:{_:0,md:7},children:[(0,a.jsx)(S.az,{display:"grid",gridColumnGap:8,gridRowGap:{_:2,md:5},gridTemplateColumns:{_:"1fr",md:"1fr 1fr"},mb:{_:1,md:4},children:m.map(e=>{let{Component:n,key:l,label:c,type:d,handleInputChange:u,placeholder:m,options:h,disabled:y,inputmode:g}=e;return(0,a.jsx)(S.az,{children:(0,a.jsx)(n,{disabled:y,errorText:o[l],inputmode:g,label:c,name:l,onBlur:p,options:h,placeholder:m,type:d,value:t[l],error:r[l]&&o[l]&&o[l].length>0,onChange:u?u({key:l,values:t,setFieldValue:i,validateField:_}):s})},l)})}),(0,a.jsx)(S.EY,{color:"B.3",variant:{_:"caption2Reg",md:"body2"},children:d})]})]})}})}let nK={employed:"Employed",selfEmployed:"Self employed",notEmployed:"Not employed",retired:"Retired"},nX=e=>[nK.employed,nK.selfEmployed].includes(e),nQ=(e,t)=>e&&(e.includes(m.$f[t])||"isPreviouslyEmployed"===t),n$=e=>{let{uiData:t,strings:n,values:a}=e,{syfeCountryCodes:o={},syfeTopCountryCodes:r=[],maritalStatus:l=[],race:i=[],educationalLevel:s=[],srsNetLiquidAssets:c=[],residenceOwnershipStatus:d=[]}=t,u=(0,V.Db)(o,[],r),{singapore_text_resident_question_text:p,nric_fin_label:_,gender_text:m,male_text:h,female_text:y,marital_status_label:g,race_label:f,country_of_birth_label:x,level_of_education_label:b,net_liquid_assets_label:C,current_residence_status_label:v,zip_of_current_residence_label:j,yes_text:E,no_text:A,select_placeholder:I,please_enter_placeholder:T}=n;return[{key:"singaporeTaxResidency",Component:S.jQ,label:p,placeholder:T,options:[{label:E,value:"true"},{label:A,value:"false"}]},{key:"identityNumber",Component:S.pd,label:_,showField:"true"===a.singaporeTaxResidency,placeholder:T},{key:"gender",label:m,Component:S.l6,placeholder:I,options:[{value:"MALE",label:h},{value:"FEMALE",label:y}]},{key:"maritalStatus",label:g,placeholder:I,Component:S.l6,options:l},{key:"race",label:f,placeholder:I,Component:S.l6,isSearch:!0,options:i},{key:"birthCountry",label:x,placeholder:I,Component:S.l6,isSearch:!0,options:u},{key:"highestLevelOfEducation",label:b,placeholder:I,Component:S.l6,options:s},{key:"srsNetLiquidAsset",label:C,placeholder:I,Component:S.l6,options:c},{key:"residenceOwnershipStatus",label:v,placeholder:I,Component:S.l6,options:d},{key:"zip",Component:S.pd,label:j,placeholder:T}]},nJ=e=>{let{uiData:t,strings:n,values:a}=e,{syfeCountryCodes:o={},syfeTopCountryCodes:r=[],sourceOfFunds:l=[]}=t,i=(0,V.Db)(o,[],r),s=nX(null==a?void 0:a.employmentStatus),c=(null==a?void 0:a.employmentStatus)===nK.retired||(null==a?void 0:a.employmentStatus)===nK.notEmployed&&(null==a?void 0:a.isPreviouslyEmployed)==="true",{current_status_label:d,employed_text:u,self_employed_text:p,not_employed_text:_,retired_text:m,position_text:h,previous_position_text:y,previous_employer_name_text:g,employer_name_text:f,country_of_employer_label:
1x,country_of_previous_employer_label:b,postal_code_of_employer_label:C,postal_code_of_previous_employer_label:v,address_of_employer_label:j,address_of_previous_employer_label:E,years_of_service_label:A,previous_years_of_service_label:I,years_of_service_placeholder_text:T,source_of_funds_label:k,select_placeholder:N,please_enter_placeholder:w,other_source_of_funds_text:O,annual_income_text:F,less_than_30k_text:D,from_30k_to_60k_text:R,from_60k_to_100k_text:B,from_100k_to_200k_text:P,from_200k_to_300k_text:Y,more_than_300k_text:U,employed_before_question_text:z,yes_text:L,no_text:H}=n;return[{key:"employmentStatus",Component:S.l6,options:[{value:nK.employed,label:u},{value:nK.selfEmployed,label:p},{value:nK.notEmployed,label:_},{value:nK.retired,label:m}],label:d,placeholder:N},{key:"isPreviouslyEmployed",Component:S.jQ,label:z,placeholder:w,showField:a.employmentStatus===nK.notEmployed,options:[{label:L,value:"true"},{label:H,value:"false"}]},{key:"employer",Component:S.pd,label:f,showField:s,placeholder:w},{key:"employmentPosition",Component:S.pd,label:h,showField:s,placeholder:w},{key:"yearsOfServiceAtCurrentCompany",label:A,placeholder:T,Component:S.pd,type:"tel",showField:s},{key:"employerCountry",label:x,placeholder:N,Component:S.l6,isSearch:!0,options:i,showField:s},{key:"employerPostalCode",label:C,placeholder:w,Component:S.pd,showField:s&&"Singapore"===a.employerCountry},{key:"employerAddress",label:j,placeholder:w,Component:S.pd,showField:s},{key:"previousEmployer",Component:S.pd,label:g,showField:c,placeholder:w},{key:"previousEmploymentPosition",Component:S.pd,label:y,showField:c,placeholder:w},{key:"yearsOfServiceAtPreviousCompany",label:I,placeholder:T,Component:S.pd,type:"tel",showField:c},{key:"previousEmployerCountry",label:b,placeholder:N,Component:S.l6,isSearch:!0,options:i,showField:c},{key:"previousEmployerPostalCode",label:v,placeholder:w,Component:S.pd,showField:c&&"Singapore"===a.previousEmployerCountry},{key:"previousEmployerAddress",label:E,placeholder:w,Component:S.pd,showField:c},{key:"annualIncome",label:F,placeholder:N,Component:S.l6,options:[{value:"Less than 30,000",label:D},{value:"30,001 - 60,000",label:R},{value:"60,001 - 100,000",label:B},{value:"100,001 - 200,000",label:P},{value:"200,001 - 300,000",label:Y},{value:"more than 300,000",label:U}]},{key:"sourceOfFunds",label:k,placeholder:N,Component:S.l6,options:l,subField:{key:"sourceOfFundsIfOthersSelected",Component:S.pd,placeholder:O,label:"",showCondition:"OTHERS"===a.sourceOfFunds}}]};var nZ=n(31676);let n0=(e,t)=>eL.Ik().shape({proficientInEnglish:eL.Yj().required(e.required_caption),everBeenBankrupt:eL.Yj().required(e.required_caption),relatedToPsplStaff:eL.Yj().required(e.required_caption),staffName:eL.Yj().when("relatedToPsplStaff",{is:"true",then:eL.Yj().trim().required(e.required_caption).max(100,n=>{let{value:a}=n;return(0,E.GW)(e.field_max_characters_text,{maxCharacters:100,name:t.staff_name_label,enteredCharacters:a.length})})}),relationshipWithStaff:eL.Yj().when("relatedToPsplStaff",{is:"true",then:eL.Yj().trim().required(e.required_caption).max(50,n=>{let{value:a}=n;return(0,E.GW)(e.field_max_characters_text,{maxCharacters:50,name:t.relationship_with_staff_label,enteredCharacters:a.length})})})}),n1=/^[sStTfFgGmM]\d{7}[a-zA-Z]$/,n2=(e,t,n)=>nQ(n,e)?t:void 0,n6=(e,t)=>{let n={};for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)){let o=e[a];n[a]=n2(a,o,t)}return eL.Ik().shape(n)},n4=["","-","other","others","null","na","n.a","n.a.","n/a","nil","nill"],n3=["retired","unemployed","not employed"],n5=(e,t,n,a,o)=>{let r=(0,E.GW)(n.enter_whole_number_text,{min:1,max:70});return n6({singaporeTaxResidency:eL.Yj().required(n.required_caption),identityNumber:eL.Yj().when("singaporeTaxResidency",{is:"true",then:eL.Yj().trim().matches(n1,"Invalid format").required(n.required_caption)}),gender:eL.Yj().required(n.required_caption),maritalStatus:eL.Yj().required(n.required_caption),race:eL.Yj().required(n.required_caption),birthCountry:eL.Yj().required(n.required_caption).test("us-blacklist-country",(0,E.GW)(n.additional_verification_required_text,{mail:a.links.SYFE_CONTACT_EMAIL}),e=>"United States"!==e),residenceOwnershipStatus:eL.Yj().required(n.required_caption),zip:eL.Yj().required(n.required_caption),highe
1stLevelOfEducation:eL.Yj().required(n.required_caption),employmentStatus:eL.Yj().required(n.required_caption),isPreviouslyEmployed:eL.Yj().when("employmentStatus",{is:e=>e===nK.notEmployed,then:e=>e.required(n.required_caption),otherwise:e=>e.optional()}),annualIncome:eL.Yj().required(n.required_caption),sourceOfFunds:eL.Yj().required(n.required_caption),sourceOfFundsIfOthersSelected:eL.Yj().when("sourceOfFunds",{is:"OTHERS",then:eL.Yj().trim().required(n.required_caption).max(30,e=>{let{value:a}=e;return(0,E.GW)(n.field_max_characters_text,{maxCharacters:30,name:t.source_of_funds_label,enteredCharacters:a.length})}).test("alphabetic-only",n.alpha_characters_only_text,e=>null==e||e.match(nZ.Am))}),employer:eL.Yj().when("employmentStatus",{is:nX,then:e=>e.trim().required(n.required_caption).max(30,e=>{let{value:a}=e;return(0,E.GW)(n.field_max_characters_text,{maxCharacters:30,name:t.employer_name_text,enteredCharacters:a.length})})}),employmentPosition:eL.Yj().when("employmentStatus",{is:nX,then:e=>e.trim().required(n.required_caption).test("alphabetic-spl-chars-only",n.alpha_spl_characters_only_text,e=>null==e||e.match(nZ.P_)).test("not applicable titles",n.invalid_job_title_text,e=>!n4.includes(null==e?void 0:e.toLowerCase().trim())).test("incorrect job status",n.incorrect_job_status_text,e=>!n3.includes(null==e?void 0:e.toLowerCase().trim())),otherwise:eL.Yj().notRequired()}),employerCountry:eL.Yj().when("employmentStatus",{is:nX,then:e=>e.trim().required(n.required_caption)}),employerAddress:eL.Yj().when("employmentStatus",{is:nX,then:e=>e.trim().required(n.required_caption).max(100,e=>{let{value:a}=e;return(0,E.GW)(n.field_max_characters_text,{maxCharacters:100,name:t.address_of_employer_label,enteredCharacters:a.length})})}),employerPostalCode:eL.Yj().when(["employerCountry","employmentStatus"],{is:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return"Singapore"===t[0]&&nX(t[1])},then:eL.Yj().required(n.required_caption).matches(/^[0-9]*$/,n.only_digits_text).min(6,n.too_short_text).max(6,n.too_long_text)}),yearsOfServiceAtCurrentCompany:eL.ai().when("employmentStatus",{is:nX,then:t=>t.integer(r).typeError(r).test("not allow decimal",r,()=>!String(e.yearsOfServiceAtCurrentCompany).includes(".")).required(n.required_caption).min(1,r).max(70,r)}),previousEmployer:eL.Yj().when(["employmentStatus","isPreviouslyEmployed"],{is:(e,t)=>e===nK.retired||e===nK.notEmployed&&"true"===t,then:e=>e.trim().required(n.required_caption).max(30,e=>{let{value:a}=e;return(0,E.GW)(n.field_max_characters_text,{maxCharacters:30,name:t.previous_employer_name_text,enteredCharacters:a.length})})}),previousEmploymentPosition:eL.Yj().when(["employmentStatus","isPreviouslyEmployed"],{is:(e,t)=>e===nK.retired||e===nK.notEmployed&&"true"===t,then:e=>e.trim().required(n.required_caption).test("alphabetic-only",n.alpha_charaters_only_text,e=>null==e||e.match(nZ.Am)).test("not applicable titles",n.invalid_job_title_text,e=>!n4.includes(null==e?void 0:e.toLowerCase().trim())).test("incorrect job status",n.incorrect_job_status_text,e=>!n3.includes(null==e?void 0:e.toLowerCase().trim())),otherwise:eL.Yj().notRequired()}),previousEmployerCountry:eL.Yj().when(["employmentStatus","isPreviouslyEmployed"],{is:(e,t)=>e===nK.retired||e===nK.notEmployed&&"true"===t,then:e=>e.trim().required(n.required_caption)}),previousEmployerAddress:eL.Yj().when(["employmentStatus","isPreviouslyEmployed"],{is:(e,t)=>e===nK.retired||e===nK.notEmployed&&"true"===t,then:e=>e.trim().required(n.required_caption).max(100,e=>{let{value:a}=e;return(0,E.GW)(n.field_max_characters_text,{maxCharacters:100,name:t.address_of_previous_employer_label,enteredCharacters:a.length})})}),previousEmployerPostalCode:eL.Yj().when(["previousEmployerCountry","employmentStatus","isPreviouslyEmployed"],{is:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return"Singapore"===t[0]&&(t[1]===nK.retired||t[1]===nK.notEmployed&&"true"===t[2])},then:eL.Yj().required(n.required_caption).matches(/^[0-9]*$/,n.only_digits_text).min(6,n.too_short_text).max(6,n.too_long_text)}),yearsOfServiceAtPreviousCompany:eL.ai().when(["employmentStatus","isPreviouslyEmployed"],{is:(e,t)=>e===nK.retired||e===nK.notEmployed&&"true"===t,then:t=>t.integer(r).typeError(r).test("not allow decimal",r,()=>!String(e.yearsOfServiceAtPreviousCompany).includes(".")).required(n.required_caption).min(1,r).max(70,r)}),srsNetLiquidAsset:eL.Yj().required(n.required_caption),..."true"!==e.combinedQuestion&&n0(n,t).fields},o).concat(eL.Ik().shape({combinedQuestion:eL.Yj().required(n.required_caption)}))};var n7=n(21072),n8=n(78536),n9=n(96699),ae=n(81415),at=n(98832),an=n(1830);let aa=ej()(()=>Promise.all([n.e(9625),n.e(4031),n.e(6684),n.e(6626)]).then(n.bind(n,80354)),{loadableGenerated:{webpack:()=>[80354]},ssr:!1});function ao(e){var t;let{url:n,showCtas:r,message:l,onClose:s,onAgreeButtonClick:c,onDisagreeButtonClick:d}=e,{strings:{onboarding:{srs_additional_details_page:{provide_consent_text:u,terms_and_condition_caption:p,i_agree_cta:_,i_disagree_cta:m}}}}=(0,E.Ym)(),h=(0,an.A)(),y=(0,o.useRef)(),[g,f]=(0,o.useState)(!1),[x,b]=(0,o.useState)(!1),C=(0,i.d4)(e=>
1e.responsiveUtility.isDesktop),v=r?C?"120px":"146px":"0px",j=.47*h.width,A=document.getElementById("onboarding-header").clientHeight,I=(null==y||null==(t=y.current)?void 0:t.clientHeight)||0,T=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.pT,{height:"calc(100% - ".concat(v," - ").concat(I,"px)"),id:"pdfViewPort",onScroll:e=>{let t=document.getElementById("pdfViewPort");t||b(!0),Math.round(e.target.scrollHeight-e.target.scrollTop)-t.clientHeight<500&&b(!0)},overflowX:"hidden",overflowY:"auto",children:(0,a.jsx)(aa,{onLoad:()=>{f(!0)},url:n,width:C?j:h.width})}),r&&g&&(0,a.jsx)(S.pT,{cp:!0,alignItems:"center",bg:"B.6",borderRadius:"50%",bottom:v,height:"40px",justifyContent:"center",mb:{_:4,md:8},onClick:()=>{let e=document.getElementById("pdfViewPort");e&&(e.scrollTop=e.scrollHeight)},position:"absolute",right:{_:4,md:10},width:"40px",zIndex:2,children:(0,a.jsx)(S.C0,{color:"B.7",height:"16px",name:"caret",width:"16px"})}),r&&(0,a.jsxs)(S.pT,{alignItems:"center",bg:"W.2",borderTopLeftRadius:{_:4,md:0},borderTopRightRadius:{_:4,md:0},bottom:0,boxShadow:"0px -2px 8px 0px #00000012",flexDirection:"column",height:v,left:0,position:"absolute",px:6,py:4,right:0,children:[(0,a.jsx)(S.EY,{color:"B.1",variant:"body2",children:u}),(0,a.jsxs)(S.pT,{gap:2,justifyContent:"center",mt:4,width:"100%",children:[(0,a.jsx)(S.$n,{disabled:!x,fillType:"outlined",onClick:d,size:"md",width:{_:"100%",md:"152px"},children:m}),(0,a.jsx)(S.$n,{disabled:!x,onClick:c,size:"md",width:{_:"100%",md:"152px"},children:_})]})]})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(nr.aI,{renderOn:"desktop",children:(0,a.jsxs)(S.aF,{modalMaxWidth:j,onClose:s,showCloseIcon:!1,styles:{position:"relative",height:"75vh",p:0,overflow:"hidden",width:{_:"100%",md:j}},children:[(0,a.jsxs)(S.pT,{flexDirection:"column",p:10,pb:6,ref:y,children:[(0,a.jsx)(S.EY,{capitalize:!0,color:"B.1",variant:"label1",children:p}),(0,a.jsx)(nL.A,{test:!!l,children:(0,a.jsx)(S.pT,{mt:4,children:(0,a.jsx)(eO.L7,{caption:l})})})]}),T]})}),(0,a.jsx)(nr.aI,{renderOn:["phone","tablet"],children:(0,a.jsxs)(S.pT,{bottom:0,flexDirection:"column",left:0,position:"fixed",right:0,top:A,children:[(0,a.jsx)(nL.A,{test:!!l,children:(0,a.jsx)(S.az,{p:4,children:(0,a.jsx)(eO.L7,{caption:l})})}),T]})})]})}let ar=l.Ay.ul.withConfig({componentId:"sc-19d3039e-0"})(["list-style-type:disc;padding-inline-start:","px;"],(0,r.A)("space.5"));function al(e){let{values:t,errors:n,touched:r,setFieldValue:l,handleChange:i,handleBlur:s,srsAdditionalFieldsData:c}=e,{strings:{onboarding:{srs_additional_details_page:{i_confirm_text:d,yes_text:u,no_text:p,proficient_in_english_text:_,never_bankrupt_text:m,not_related_to_phillip_text:h,proficient_in_english_question_text:y,bankrupt_question_text:g,related_to_phillip_question_text:f,staff_name_label:x,enter_details_placeholder:b,relationship_with_staff_label:C,declaration_caption:v,confirm_cta:j,please_specify_text:A}},errors:I}}=(0,E.Ym)(),[T,k]=(0,o.useState)(!1),[N,w]=(0,o.useState)(!1),O=[{key:"proficientInEnglish",text:_,question:y,showInGreen:"true"===t.proficientInEnglish,askQuestion:null==c?void 0:c.includes("PROFICIENT_IN_ENGLISH")},{key:"everBeenBankrupt",text:m,question:g,showInGreen:"false"===t.everBeenBankrupt,askQuestion:null==c?void 0:c.includes("EVER_BEEN_BANKRUPT")},{key:"relatedToPsplStaff",text:h,question:f,showInGreen:"false"===t.relatedToPsplStaff,askQuestion:null==c?void 0:c.includes("NOT_RELATED_TO_PHILLIP_STAFF")}],F=()=>{O.map(e=>{let{key:t}=e;return l(t,"")}),l("staffName",""),l("relationshipWithStaff","")};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S.pT,{flexDirection:"column",mt:{_:2,md:4},children:[(0,a.jsx)(S.EY,{as:"div",color:"B.1",mb:{_:3,md:6},variant:{_:"label6",md:"subtitle4"},children:d}),(0,a.jsx)(ar,{children:O.map(e=>{let{key:t,showInGreen:n,text:o,askQuestion:r}=e;return r&&(0,a.jsx)(S.EY,{as:"li",color:n?"GR.2":"B.3",variant:{_:"label6",md:"body2"},children:o},t)})}),(0,a.jsx)(S.az,{mt:{_:3,md:6},children:(0,a.jsx)(S.jQ,{name:"combinedQuestion",onChange:e=>{"false"===e.target.value?(w(!0),k(!0)):(l("proficientInEnglish","true"),l("everBeenBankrupt","false"),l("relatedToPspl
1Staff","false"),i(e))},selected:null==t?void 0:t.combinedQuestion,options:[{label:u,value:"true"},{label:p,value:"false"}]})}),(0,a.jsx)(nL.A,{test:N||"false"===t.combinedQuestion,children:(0,a.jsx)(S.pT,{mt:{_:3,md:6},children:(0,a.jsx)(S.$n,{fillType:"text",iconBoxProps:{display:"flex",mb:"2px"},iconRight:"arrowRight",onClick:()=>k(!0),p:0,iconProps:{width:"10px",height:"10px",strokeWidth:"2.5px"},children:A})})})]}),(0,a.jsx)(nL.A,{test:T,children:(0,a.jsx)(S.QE,{onModalClose:()=>{k(!1),"false"!==t.combinedQuestion&&F()},onPrimaryCtaClick:()=>{"true"===t.proficientInEnglish&&"false"===t.everBeenBankrupt&&"false"===t.relatedToPsplStaff?l("combinedQuestion","true"):l("combinedQuestion","false"),k(!1)},primaryCtaText:j,title:v,isPrimaryCtaDisabled:!n0(I,{staff_name_label:x,relationship_with_staff_label:C}).isValidSync(t),styles:{width:{_:"100%",md:"360px"},pb:{_:10,md:8},px:4},children:(0,a.jsxs)(S.az,{mb:10,children:[O.map(e=>{let{question:n,key:o,askQuestion:r}=e;return r&&(0,a.jsx)(S.az,{mb:4,children:(0,a.jsx)(S.jQ,{heading:n,name:o,onChange:i,selected:null==t?void 0:t[o],options:[{label:u,value:"true"},{label:p,value:"false"}]})},o)}),"true"===t.relatedToPsplStaff&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.az,{mb:2,children:(0,a.jsx)(S.pd,{errorText:n.staffName,label:x,name:"staffName",onBlur:s,onChange:i,placeholder:b,value:t.staffName,error:r.staffName&&n.staffName&&n.staffName.length>0})}),(0,a.jsx)(S.az,{children:(0,a.jsx)(S.pd,{errorText:n.relationshipWithStaff,label:C,name:"relationshipWithStaff",onBlur:s,onChange:i,placeholder:b,value:t.relationshipWithStaff,error:r.relationshipWithStaff&&n.relationshipWithStaff&&n.relationshipWithStaff.length>0})})]})]})})})]})}let ai=(0,l.Ay)(S.EY).withConfig({componentId:"sc-66e1600e-0"})(["display:inline;position:relative;padding-left:","px;cursor:pointer;"],(0,r.A)("space.7")),as=l.Ay.input.withConfig({componentId:"sc-66e1600e-1"})(["position:absolute;opacity:0;cursor:pointer;height:0;width:0;"]),ac=(0,l.Ay)(S.az).withConfig({componentId:"sc-66e1600e-2"})(["border:1px solid ",";&:after{content:'';position:absolute;left:4px;top:1px;width:4px;height:8px;border-width:0 2px 2px 0;color:",";border-style:solid;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);display:",";}"],e=>(0,r.A)("colors.".concat(e.borderColor))(e),(0,r.A)("colors.W.2"),e=>e.isChecked?"block":"none");function ad(e){let{onDocClick:t,isChecked:n,values:r}=e,{strings:{onboarding:{srs_additional_details_page:{acknowledge_t_and_c_text:l,phillips_security_account_cta:i,risk_disclosure_statement_cta:s,account_information_sheet_cta:c,client_agreement_cta:d,show_more_cta:u,show_less_cta:p}}}}=(0,E.Ym)(),[_,m]=(0,o.useState)(!1),h=()=>{m(e=>!e)},y=e=>{t("tnc",r)(),m(!0)},g=(0,a.jsxs)(ai,{forwardedAs:"label",children:[(0,a.jsx)(as,{checked:n,name:"check",onChange:y,type:"checkbox"}),(0,a.jsx)(ac,{bg:n?"B.7":"inherit",borderColor:n?"B.7":"B.3",borderRadius:1,height:"14px",isChecked:n,left:0,my:1,position:"absolute",top:0,width:"14px"})]});return(0,a.jsx)(S.az,{px:{_:4,md:6},py:6,children:(0,a.jsxs)(S.pT,{children:[g,(0,a.jsxs)(S.pT,{flexDirection:"column",children:[(0,a.jsx)(S.az,{cp:!0,onClick:h,children:(0,a.jsx)(S.EY,{color:"B.1",variant:{_:"body3",md:"body2"},children:(0,a.jsx)(E.In,{str:l,components:{button:(0,a.jsx)(S.EY,{color:"B.7",onClick:y})}})})}),_&&(0,a.jsx)(S.pT,{flexDirection:"column",gap:3,mt:{_:2,md:4},children:[{caption:i,key:"psplTnc"},{caption:s,key:"guideAndCautionary"},{caption:c,key:"utWrapInfosheet"},{caption:d,key:"clientAcknowledgement"}].map((e,n)=>(0,a.jsxs)(S.pT,{cp:!0,alignItems:"center",gap:4,onClick:t(e.key,r),children:[(0,a.jsx)(S.C0,{color:"G.2",height:"16px",name:"filledCaret",rotation:"-90deg",width:"16px"}),(0,a.jsx)(S.EY,{color:"B.7",variant:"caption1",children:e.caption})]},n))}),(0,a.jsx)(S.az,{cp:!0,mt:{_:1,md:3},onClick:h,children:(0,a.jsx)(S.EY,{color:"B.7",textDecoration:"underline",variant:"subtitle4",children:_?p:u})})]})]})})}let au=(0,l.Ay)(e=>(0,a.jsx)(S.A,{...e})).withConfig({componentId:"sc-93e88254-0"})(["color:",";text-decoration:underline;&:hover{color:",";}"],e=>(0,r.A)("colors.".concat(e.color))(e),e=>(0,r.A)("colors.".concat(e.color))(e)),ap=e=>{let{title:t,defaultExpanded:n,children:r}=e,[l,i]=(0,o.useState)(n);return(0,a.jsxs)(S.az,{borderBottom:{_:"1px solid",xl:"none"},borderColor:"B.5",children:[(0,a.jsxs)(S.pT,{cp:!0,alignItems:"center",bg:{_:l?"W.1":"transparent",xl:"transparent"},justifyContent:"space-between",onClick:()=>{i(e=>!e)},px:{_:4,xl:7},py:{_:6,xl:5},children:[(0,a.jsx)(S.EY,{as:"div",capitalize:{_:!1,xl:!0},color:"B.1",variant:{_:"subtitle4",xl:"label1"},children:t}),(0,a.jsx)(S.az,{color:"B.7",children:l?(0,a.jsx)(S.az,{px:1,children:(0,a.jsx)(S.C0,{height:"24px",name:"minus",stroke:"#2F51C9",strokeWidth:"1.5",width:"16px"})}):(0,a.jsx)(S.C0,{color:"B.7",height:"24px",name:"plus",width:"24px"})})]}),(0,a.jsx)(nL.A,{test:l,children:(0,a.jsx)(S.az,{bg:"W.1",borderTopColor:"B.5",borderTopStyle:"solid",borderTopWidth:{_:"0px",xl:"1px"},pb:{_:6,md:10},pt:{_:0,md:10},px:{_:4,xl:7},children:r})})]})},a_=e=>{let{errors:t,touched:n,handleBlur:o,handleChange:r,setFieldValue:l,values:i,formInputs:s,geographyConstants:c,srsAdditionalFieldsData:d}=e;return(0,a.jsx)(S.az,{display:"grid",gridColumnGap:12,gridRowGap:{_:2,xl:4},gridTemplateColumns:{_:"1fr",xl:"1fr 1fr"}
1,children:s.map((e,l)=>{let{Component:u,key:p,label:_,placeholder:m,isSearch:h,options:y,type:g,subField:f}=e;return(0,a.jsxs)(S.az,{minWidth:"100%",children:[(0,a.jsx)(u,{dropdownMaxWidth:"311px",dropDownWidth:"100%",error:!!(n[p]&&t[p]&&t[p].length>0),heading:_,isSearch:h,label:_,name:p,onBlur:o,onChange:r,options:y,placeholder:m,selected:i[p],type:g,value:(null==i?void 0:i[p])||"",errorText:(0,a.jsx)(E.In,{str:t[p],components:{link:(0,a.jsx)(S.EY,{as:au,color:"R.2",onClick:e=>e.preventDefault(),href:"mailto:"+c.links.SYFE_CONTACT_EMAIL})}})}),!!(f&&f.showCondition&&nQ(d,f.key))&&(0,a.jsx)(S.az,{mb:{_:0,xl:l!==s.length-1?-12:0},children:(0,a.jsx)(f.Component,{errorText:t[f.key],label:f.label,name:f.key,onBlur:o,onChange:r,placeholder:f.placeholder,value:(null==i?void 0:i[f.key])||"",error:!!(n[f.key]&&t[f.key]&&t[f.key].length>0)})})]},p)})})};function am(e){var t,n,r,l,s,c,d,u,p,_,h,g;let{currentStep:f}=e,{strings:{onboarding:{srs_additional_details_page:x},general:{submit_cta:b},errors:C},geographyConstants:v}=(0,E.Ym)(),{additional_details_info_text:j,success_caption:T,success_description_text:N,personal_details_caption:w,employment_and_income_caption:O}=x,F=(0,A.Kb)(),D=(0,i.wA)(),R=(0,eE.useRouter)(),B=(0,i.d4)(n8.getUserDetails),P=(0,i.d4)(e=>e.responsiveUtility.isPhone),U=(0,i.d4)(ae.getSrsInvestmentAmount),z=(0,i.d4)(ae.getSrsAdditionalStepValues),L=(0,i.d4)(ae.getSrsAdditionalFieldsData),H=(0,i.d4)(k.B2.getPortfolios).filter(e=>!e.depositConfirmed)[0],M=U||R.query.amount,[V,G]=(0,o.useState)(""),{clientAcknowledgement:W,guide:q,infoSheet:K,psplTnc:X,tnc:Q}=F.fundSourceToPdfUrls[m.Cr.SRS],{clientAcknowledgement:$,guide:J,infoSheet:Z,psplTnc:ee,tnc:et}=F.fundSourceToPdfMessages[m.Cr.SRS],en={tnc:{pdf:Q,showCtas:!0,message:et},psplTnc:{pdf:X,showCtas:!1,message:ee},guideAndCautionary:{pdf:q,showCtas:!1,message:J},clientAcknowledgement:{pdf:W,showCtas:!1,message:$},utWrapInfosheet:{pdf:K,showCtas:!1,message:Z}},ea=R.query.doc,eo=P&&ea&&R.asPath.includes(y.HyN.SRS_ADDITIONAL_DETAILS_VIEW_DOC);if((0,o.useEffect)(()=>{eo&&G(ea)},[ea,eo]),(0,o.useEffect)(()=>{L||D((0,nG.getSrsAdditionalFieldDetails)())},[D,L]),eo&&!V||!L)return(0,a.jsx)(nr.kt,{});let er=nQ(L,"singaporeTaxResidency"),el=nQ(L,"identityNumber"),ei=(e,t)=>()=>{P?(D((0,n7.Sh)(t)),D((0,I.VC)("".concat((0,y.u12)(y.HyN.SRS_ADDITIONAL_DETAILS_VIEW_DOC),"?doc=").concat(e)))):G(e)},es=()=>{P&&R.back(),G("")},ec={singaporeTaxResidency:"",identityNumber:el?"":B.identityNumber,gender:B.gender,maritalStatus:B.maritalStatus,race:B.race,birthCountry:B.birthCountry,highestLevelOfEducation:B.highestLevelOfEducation,...nQ(L,"srsNetLiquidAsset")&&{srsNetLiquidAsset:B.srsNetLiquidAsset},residenceOwnershipStatus:B.residenceOwnershipStatus,zip:B.zip,employmentStatus:B.employmentStatus,employer:B.employer,employmentPosition:B.employmentPosition,yearsOfServiceAtCurrentCompany:B.yearsOfServiceAtCurrentCompany,employerCountry:B.employerCountry,employerPostalCode:B.employerPostalCode,employerAddress:B.employerAddress,previousEmployer:B.previousEmployer,previousEmploymentPosition:B.previousEmploymentPosition,yearsOfServiceAtPreviousCompany:B.yearsOfServiceAtPreviousCompany,perviousEmployerCountry:B.perviousEmployerCountry,perviousEmployerPostalCode:B.perviousEmployerPostalCode,perviousEmployerAddress:B.perviousEmployerAddress,annualIncome:B.annualIncome,sourceOfFunds:B.sourceOfFunds,sourceOfFundsIfOthersSelected:B.sourceOfFundsIfOthersSelected,proficientInEnglish:B.proficientInEnglish,everBeenBankrupt:B.everBeenBankrupt,relatedToPsplStaff:null==B||null==(r=B.fundSourceToAdditionalDetails)||null==(n=r[m.Cr.SRS])||null==(t=n.linkedToPsplStaff)?void 0:t.relatedToPsplStaff,staffName:null==B||null==(c=B.fundSourceToAdditionalDetails)||null==(s=c[m.Cr.SRS])||null==(l=s.linkedToPsplStaff)?void 0:l.staffName,relationshipWithStaff:null==B||null==(p=B.fundSourceToAdditionalDetails)||null==(u=p[m.Cr.SRS])||null==(d=u.linkedToPsplStaff)?void 0:d.relationshipWithStaff,combinedQuestion:""};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(nL.A,{test:!eo,children:(0,a.jsx)(Y.l1,{initialValues:{...ec,...z},onSubmit:e=>{let t=function(e){for(let t in e)e.hasOwnProperty(t)&&"true"===e[t]&&(e[t]=!0),e.hasOwnProperty(t)&&"false"===e[t]&&(e[t]=!1);return e}(e);t.fundSourceToAdditionalDetails=t.fundSourceToAdditionalDetails||{},t.fundSourceToAdditionalDetails[m.Cr.SRS]={fundSource:m.Cr.SRS,linkedToPsplStaff:{relatedToPspl
1Staff:e.relatedToPsplStaff,staffName:e.staffName,relationshipWithStaff:e.relationshipWithStaff}},er&&t.singaporeTaxResidency&&(t.additionalTaxInformation={taxResidenceCountry:"Singapore",tin:t.identityNumber}),delete t.combinedQuestion,delete t.relatedToPsplStaff,delete t.staffName,delete t.relationshipWithStaff,delete t.isChecked,delete t.singaporeTaxResidency,delete t.identityNumber,nX(e.employmentStatus)||["employer","employmentPosition","employerAddress","employerCountry","employerPostalCode","yearsOfServiceAtCurrentCompany"].forEach(e=>delete t[e]),e.employmentStatus===nK.retired||e.employmentStatus===nK.notEmployed&&e.isPreviouslyEmployed||["previousEmployer","previousEmploymentPosition","previousEmployerAddress","previousEmployerCountry","previousEmployerPostalCode","yearsOfServiceAtPreviousCompany"].forEach(e=>delete t[e]),t.employmentStatus!==nK.notEmployed&&delete t.isPreviouslyEmployed,D((0,n7.if)(null)),D((0,n7.Sh)({})),D((0,nW.updatePersonalInformation)({userDetails:t,currentStep:f,isSrsOnboardingStep:!0,onSuccessCb:()=>D((0,n9.makeDepositRequest)(H.id,{amount:Number(M),transferType:"SRS_TRANSFER",currency:H.currency},()=>{D((0,at.getAccountPortfoliosInfo)()),D((0,at.getAccountInfo)()),D((0,I.VC)(y.KVc))},()=>{},!0,N,T))}))},validationSchema:eL.RZ(e=>n5(e,x,C,v,L)),children:e=>{let{isValid:t,values:n,errors:o,touched:r,setFieldValue:l,handleChange:i,handleBlur:s,handleSubmit:c}=e;console.log(o);let d=n$({uiData:F,strings:x,values:n}).filter(e=>{var t;return(null==(t=e.showField)||t)&&nQ(L,e.key)}),u=nJ({uiData:F,strings:x,values:n}).filter(e=>{var t;return(null==(t=e.showField)||t)&&nQ(L,e.key)}),p={values:n,touched:r,errors:o,handleBlur:s,handleChange:i,setFieldValue:l,geographyConstants:v,srsAdditionalFieldsData:L};return(0,a.jsxs)(S.az,{mx:"auto",width:{_:"100%",xl:"728px"},children:[(0,a.jsx)(S.az,{pb:{_:4,xl:10},pt:{_:4,xl:0},px:{_:4,xl:7},children:(0,a.jsx)(eO.L7,{caption:j})}),(0,a.jsxs)(eO.mO,{containerStyles:{pb:{_:20,md:0},px:0,pt:0},containerWidth:"100%",contentWidth:"100%",onPrimaryCtaClick:c,primaryCtaText:b,showPrimaryCta:P,isPrimaryCtaDisabled:!t||!(null==z?void 0:z.isChecked),children:[(0,a.jsxs)(ap,{defaultExpanded:!0,title:w,children:[(0,a.jsx)(a_,{...p,formInputs:d}),(0,a.jsx)(al,{errors:o,handleBlur:s,handleChange:i,setFieldValue:l,srsAdditionalFieldsData:L,touched:r,values:n})]}),(0,a.jsx)(nr.aI,{renderOn:"desktop",children:(0,a.jsx)(S.az,{bg:"B.5",height:"1px",width:"100%"})}),(0,a.jsx)(ap,{title:O,children:(0,a.jsx)(a_,{...p,formInputs:u})}),(0,a.jsx)(nr.aI,{renderOn:"phone",children:(0,a.jsx)(ad,{isChecked:!!(null==z?void 0:z.isChecked),onDocClick:ei,values:n})})]}),(0,a.jsxs)(nr.aI,{renderOn:["tablet","desktop"],children:[(0,a.jsx)(ad,{isChecked:!!(null==z?void 0:z.isChecked),onDocClick:ei,values:n}),(0,a.jsx)(S.pT,{justifyContent:"center",my:10,children:(0,a.jsx)(S.$n,{disabled:!t||!(null==z?void 0:z.isChecked),onClick:c,width:"240px",children:b})})]})]})}})}),V&&(0,a.jsx)(ao,{message:null==(_=en[V])?void 0:_.message,onAgreeButtonClick:()=>{D((0,n7.Sh)({...z,isChecked:!0})),es()},onClose:es,onDisagreeButtonClick:()=>{D((0,n7.Sh)({...z,isChecked:!1})),es()},showCtas:null==(h=en[V])?void 0:h.showCtas,url:null==(g=en[V])?void 0:g.pdf})]})}},25240:(e,t,n)=>{"use strict";n.d(t,{K4:()=>ee,oK:()=>Z,GV:()=>X,SP:()=>J,y3:()=>Q,_D:()=>$});var a=n(95706),o=n(25093),r=n(37876),l=n(14232),i=n(12722),s=n(87833),c=n(54755),d=n(78071),u=n(57197),p=n(48779),_=n(6247),m=n(34219),h=n(81444),y=n(16772),g=n(55651),f=n(33363);let x=(0,i.A)(e=>{let{suitabilityData:t,checkPortfolioSuitability:n,getPortfolioContentDataV1:o,portfolioContentData:i,navigate:x,location:b,financialAssessmentData:C}=e,v=(0,u.Kb)(),{geographyConstants:{PORTFOLIO_NAME_CONFIG:j}}=(0,d.Ym)(),E=(0,c.V8)(null==b?void 0:b.search,"type")||"",{riskPreference:A=""}=C||{},S=()=>{(0,p.Ay)({action:"help_button_click",category:"suitable_portfolio_page_clicks",label:E})},[I,T]=(0,l.useState)(null);(0,l.useEffect)(()=>{var e;
1let t=null==(e=document.getElementsByClassName("help-desk"))?void 0:e[0];return t&&t.addEventListener("click",S),()=>{t&&t.removeEventListener("click",S)}},[]);let k="ONBOARDING";if((0,l.useEffect)(()=>{t||n(E)},[t]),(0,l.useEffect)(()=>{i||o()},[i]),!t||!i||!v)return(0,r.jsx)(h.k,{});let N=i.data,w=t.suitablePortfoliosConfig.flatMap(e=>e.configs),O=e=>w.some(t=>t.type===e.type&&t.fundSource===e.fundSource),F=N.flatMap(e=>e.portfolios.filter(e=>{var t;return null==(t=e.config)?void 0:t.some(O)})),D=e=>{let t=a.RQI;return(0,s.W)(e,t,"changed")},R=e=>{let t=e.portfolioType;return e.actualPortfolioType=t,e.portfolioType=Object.keys(j).find(e=>j[e]===t),e.riskConfig={...e.riskConfig,label:v.riskRatingV2[e.riskConfig.score],description:i.riskRatingDescriptions[e.riskConfig.score]},e},B=e=>{let t=(0,_.S)(i,e);if((0,p.Ay)({action:"confirm_portfolio_click",category:"suitable_portfolio_page_clicks",label:e,label2:A}),!t||!(t.length>1))return x(D(e));x("".concat((0,a.u12)(a.HyN.SELECT_FUND_SOURCE),"?type=").concat(e))},P=e=>{(0,p.Ay)({action:"view_portfolio_click",category:"suitable_portfolio_page_clicks",label:e,label2:A}),T(R(F.find(t=>t.portfolioType===e)))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.mO,{containerWidth:"716px",contentWidth:"636px",showPrimaryCta:!1,children:(0,r.jsx)(m.az,{display:"grid",gridColumnGap:3,gridRowGap:6,gridTemplateColumns:{_:"1fr",md:"1fr 1fr"},my:{_:8,md:0},children:F.map((e,t)=>{if("CUSTOM_SGD"===e.portfolioType)return null;let n=R(e);return(0,r.jsx)(y.A,{onSelect:B,onView:P,portfolio:n,theme:"white",webAppArea:k},"card-".concat(t))})})}),!!I&&(0,r.jsx)(g.A,{onClose:()=>T(null),onSelect:B,portfolio:I,theme:"white",webAppArea:k})]})});var b=n(48011),C=n(13700),v=n(12545),j=n(142),E=n(71776),A=n(91016),S=n(21346),I=n(62246),T=n(19461),k=n(21651),N=n(82167),w=n(99345),O=n(62694),F=n(90332);let D=N.Ay.ul.withConfig({componentId:"sc-33fedeef-0"})(["list-style-position:outside;list-style-type:initial;padding:0 0 0 ","px;li{color:",";}"],(0,k.A)("space.4"),(0,k.A)("colors.B.2")),R=(0,i.A)(e=>{let{navigate:t,goBack:n,dashboardPortfolioDescription:o,portfolioContentData:l,handleProceed:i,theme:s,isDashboardPage:c,portfolioType:p,portfolioIcon:_,typeOrThemeKey:h}=e,{strings:{general:{proceed_cta:y},onboarding:{suitability_page:{suitable_section:{best_fit_text:g,reasons:x,heres_why_text:C,add_portfolio_cta:v,portfolio_suitable_caption:j}}}}}=(0,d.Ym)(),{iconV2:E,title:A}=(0,u.Kb)().portfolioByType[null!=h?h:p][0],S=(0,b.d4)(e=>e.responsiveUtility.isDesktop),[I,T]=(0,w.A)(!0);return(0,r.jsxs)(r.Fragment,{children:[c&&(0,r.jsx)(O.A,{renderOn:["tablet","desktop"],children:(0,r.jsx)(m.Xm,{heading:j,label:v,onPrimaryClickHandler:()=>{t(a.oVb)}})}),(0,r.jsx)(m.az,{my:{md:16},children:(0,r.jsxs)(f.mO,{containerWidth:"672px",contentWidth:"590px",onPrimaryCtaClick:i,primaryCtaText:y,children:[(0,r.jsx)(F.A,{height:"80px",icon:E,width:"80px"}),(0,r.jsx)(m.az,{mt:4,children:(0,r.jsx)(m.EY,{color:"B.1",variant:"subtitle2",children:(0,r.jsx)(d.In,{str:g,values:{portfolio:A},components:{brElement:S?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)("br",{})}})})}),(0,r.jsxs)(m.pT,{cp:!0,alignItems:"center",justifyContent:"space-between",mt:{_:4,md:10},onClick:T,width:"100%",children:[(0,r.jsx)(m.EY,{color:"B.2",variant:"subtitle2",children:C}),(0,r.jsx)(m.az,{color:"B.2",height:"16px",width:"16px",children:(0,r.jsx)(m.C0,{newTheme:!0,name:"arrowDown"})})]}),I&&(0,r.jsx)(m.az,{mb:8,mt:3,children:(0,r.jsx)(D,{children:x.map((e,t)=>(0,r.jsx)(m.az,{as:"li",children:(0,r.jsx)(m.EY,{as:"span",color:"B.2",variant:"body2",children:e})},t))})})]})})]})});var B=n(10014);let P=e=>{let{handleProceed:t,status:n}=e,{strings:{onboarding:{suitability_page:{suitable_popup:{suitable_caption:a,portfolio_changed_caption:o}}}}}=(0,d.Ym)(),i=(0,b.wA)(),s=n&&({suitable:a,changed:o})[n];return(0,l.useEffect)(()=>{i((0,B.showConfirmationAlert)("",s,"","white",3e3));let e=setTimeout(()=>{t()},3e3);return function(){e&&clearTimeout(e)}},[]),(0,r.jsx)(m.uB,{message:s})},Y=(0,i.A)(e=>{var t,n;let{navigate:o,savePortfolio:i,location:s,updatePendingPortfolio:p,refreshAccountPortfoliosInfo:m,loadUserInfo:h,etfsData:y,suitabilityDataId:g,nextUrl:f,currentStep:x,updateSuitabilityCheckStep:k}=e,N=(0,u.Kb)(),w=(0,C.A)(),{strings:{portfolio_data_page:{portfolio_added_successfully_text:O}},geography:F}=(0,d.Ym)(),D=(0,b.wA)(),B=(0,b.d4)(T.$u.getUserId),Y=!s.pathname.includes(a.Vkm),U=Y?"dashboard":"white",z=(0,c.V8)(s.search,"type")||"",L="true"===(0,c.V8)(s.search,"isThemePortfolio"),H=(0,c.V8)(s.search,"theme")||null,M=H||z,V=Y?"DASHBOARD":"ONBOARDING",G=(0,b.d4)(e=>(0,v.getIfPortfolioIsVisible)(e,V,M));l.useEffect(()=>{A.k.addSpanEvent(S.e.SUITABILITY_CHECK,"Portfolio found suitable",{typeOrThemeKey:M}),A.k.endSpan(S.e.SUITABILITY_CHECK)},[]);let W=e=>{Y&&e&&e.data?w(e.data.id):(D(E.s4.getDashboardPortfolioContentDataV1(!1)),h({onSuccessCb:()=>k(x,f)}))};if(M&&!G)return console.log("Portfolio not allowed!"),o(a.HyN.CHOOSE_PORTFOLIO),null;let q=null==N||null==(n=N.portfolioByType)||null==(t=n[M])?void 0:t[0];if(!q)return null;let{name:K,objective:X,type:Q}=q,$=()=>{let e=!L&&"CUSTOM_USD"===z;if(Y){if([j.jv.CASH_PLUS_GUARANTEED_SGD,j.jv.CASH_PLUS_GUARANTEED_USD].includes(Q))return o("".concat(a.Grg,"?type=").concat(Q));(0,_.og)({isThemePortfolio:L,isCustomPortfolio:e,themeKey:H,type:Q,name:K,objective:X,savePortfolio:i,onSuccess:W,portfolio_added_successfully_text:O,etfsData:y,suitabilityDataId:g,isDashboardPage:Y})}else A.k.startSpan(S.e.PENDING_PORTFOLIO_CREATION),A.k.setSpanAttributes(S.e.PENDING_PORTFOLIO_CREATION,(0,I.fQ)(B,j.XN.SG)),p({type:Q,theme:H,isThemePortfolio:L},W)},J=(0,c.V8)(s.search,"status")||"";
1return"suitable"===J&&F===j.XN.SG?(0,r.jsx)(R,{handleProceed:$,isDashboardPage:Y,portfolioType:Q,theme:U,typeOrThemeKey:M}):(0,r.jsx)(P,{handleProceed:$,status:J})});var U=n(49316),z=n(85560),L=n(49504);let H=e=>z.Ik().shape({amount:(0,L.PM)(e)});var M=n(43235),V=n(68906),G=n(21072),W=n(5041);let q={src:"/_next/static/media/clock.676d9a80.png",height:24,width:25,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAJFBMVEUuUchMaXEtUckxUcouUMguUcovUcsuUcouUssvUs4uUMgtUdDVhpA5AAAADHRSTlOsAB0QWZ9LvT6Gii7KKuSKAAAACXBIWXMAABYlAAAWJQFJUiTwAAAANElEQVR4nBWLQQ7AMAiAQK2t+/+DF28kAMbh0BL3ZSTFV/YYcNJ321nIKmeVmmysQbE7tD8gTwDWj5syiAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},K=e=>{let{data:t}=e,n=(0,b.d4)(T.AU.getBankList),{strings:{onboarding:{srs_amount_page:{srs_text:a}}}}=(0,d.Ym)(),{accountNumber:o,accountName:l,bankName:i}=null!=t?t:{},s=null==n?void 0:n[i];return(0,r.jsxs)(m.pT,{alignItems:"center",bg:"W.2",borderColor:"B.5",borderRadius:2,borderStyle:"solid",borderWidth:"1px",px:{_:1,md:"12px"},py:{_:1,md:"8px"},children:[(0,r.jsx)(m.az,{borderColor:"B.5",borderRadius:2,borderStyle:"solid",borderWidth:"1px",p:"3px",children:(0,r.jsx)(m._V,{alt:"bank-logo",height:34,width:34,src:null==s?void 0:s.logoUrl})}),(0,r.jsxs)(m.pT,{flex:1,flexDirection:"column",gap:1,mx:3,children:[(0,r.jsx)(m.EY,{color:"B.2",variant:"subtitle3",children:i}),(0,r.jsxs)(m.EY,{color:"B.3",variant:"caption1",children:[o," ⢠",l]})]}),(0,r.jsx)(m.pT,{alignSelf:"flex-start",bg:"B.8",borderRadius:2,px:2,py:"5px",width:"fit-content",children:(0,r.jsx)(m.EY,{color:"W.2",mb:"-1px",variant:"label2",children:a})})]})},X=(e,t)=>({getStarted:a.HyN.GET_STARTED,basicInformation:a.HyN.PERSONAL_INFO,mobileVerification:t.mobileVerified?a.HyN.MOBILE_VERIFICATION_SUCCESS:[a.HyN.MOBILE_VERIFICATION,a.HyN.EDIT_MOBILE],employmentInformation:a.HyN.EMPLOYMENT_INFO,cpfInformation:a.HyN.CPF_INFO,documentUpload:a.HyN.DOCUMENT_UPLOAD,investmentObjective:[a.HyN.INVESTMENT_OBJECTIVE,a.HyN.INVESTMENT_OBJECTIVE_DETAILS],taxResidency:a.HyN.TAX_RESIDENCY,regulatoryInformation:a.HyN.REGULATORY_INFORMATION,riskPreference:a.HyN.RISK_PREFERENCE,choosePortfolio:[a.HyN.CHOOSE_PORTFOLIO,a.HyN.SELECT_FUND_SOURCE],carTest:[a.HyN.CAR_INVESTMENT_KNOWLEDGE,a.HyN.CAR_TEST],suitablePortfolioCreation:[a.HyN.SUITABILITY_CHECK,a.HyN.SUITABLE_PORTFOLIOS,a.HyN.SUITABLE_POPUP],ckaTest:[a.HyN.INVESTMENT_KNOWLEDGE,a.HyN.CKA_TEST],contractSigned:a.HyN.CONTRACTUAL_INFO,portfolioOverview:[a.HyN.SELECT_TENOR,a.HyN.PORTFOLIO_OVERVIEW],rebalanceConsent:a.HyN.REBALANCE_CONSENT,transferFunds:a.HyN.FUNDS_DEPOSIT,srsBankDetails:[a.HyN.SRS_BANK_DETAILS],srsAdditionalDetails:[a.HyN.SRS_ADD_AMOUNT,a.HyN.SRS_ADDITIONAL_DETAILS,a.HyN.SRS_ADDITIONAL_DETAILS_VIEW_DOC]})[e],Q={[a.HyN.GET_STARTED]:"getStarted",[a.HyN.PERSONAL_INFO]:"basicInformation",[a.HyN.MOBILE_VERIFICATION_SUCCESS]:"mobileVerification",[a.HyN.MOBILE_VERIFICATION]:"mobileVerification",[a.HyN.EDIT_MOBILE]:"mobileVerification",[a.HyN.EMPLOYMENT_INFO]:"employmentInformation",[a.HyN.CPF_INFO]:"cpfInformation",[a.HyN.DOCUMENT_UPLOAD]:"documentUpload",[a.HyN.INVESTMENT_OBJECTIVE]:"investmentObjective",[a.HyN.INVESTMENT_OBJECTIVE_DETAILS]:"investmentObjective",[a.HyN.TAX_RESIDENCY]:"taxResidency",[a.HyN.REGULATORY_INFORMATION]:"regulatoryInformation",[a.HyN.RISK_PREFERENCE]:"riskPreference",[a.HyN.CHOOSE_PORTFOLIO]:"choosePortfolio",[a.HyN.SELECT_FUND_SOURCE]:"choosePortfolio",[a.HyN.SUITABILITY_CHECK]:"suitablePortfolioCreation",[a.HyN.SUITABLE_PORTFOLIOS]:"suitablePortfolioCreation",[a.HyN.SUITABLE_POPUP]:"suitablePortfolioCreation",[a.HyN.INVESTMENT_KNOWLEDGE]:"ckaTest",[a.HyN.CKA_TEST]:"ckaTest",[a.HyN.CAR_INVESTMENT_KNOWLEDGE]:"carTest",[a.HyN.CAR_TEST]:"carTest",[a.HyN.CONTRACTUAL_INFO]:"contractSigned",[a.HyN.SELECT_TENOR]:"portfolioOverview",[a.HyN.PORTFOLIO_OVERVIEW]:"portfolioOverview",[a.HyN.REBALANCE_CONSENT]:"rebalanceConsent",[a.HyN.FUNDS_DEPOSIT]:"transferFunds",[a.HyN.SRS_BANK_DETAILS]:"srsBankDetails",[a.HyN.SRS_ADD_AMOUNT]:"srsAdditionalDetails",[a.HyN.SRS_ADDITIONAL_DETAILS]:"srsAdditionalDetails",[a.HyN.SRS_ADDITIONAL_DETAILS_VIEW_DOC]:"srsAdditionalDetails"},$={[a.HyN.GET_STARTED]:o.wj,[a.HyN.PERSONAL_INFO]:o.RY,[a.HyN.MOBILE_VERIFICATION]:o.Ut,[a.HyN.EDIT_MOBILE]:o.Ut,[a.HyN.MOBILE_VERIFICATION_SUCCESS]:o.Vt,[a.HyN.EMPLOYMENT_INFO]:o.RY,[a.HyN.CPF_INFO]:o.RY,[a.HyN.DOCUMENT_UPLOAD]:o.DJ,[a.HyN.INVESTMENT_OBJECTIVE]:o.zg,[a.HyN.INVESTMENT_OBJECTIVE_DETAILS]:o.zg,[a.HyN.TAX_RESIDENCY]:o.Uj,[a.HyN.REGULATORY_INFORMATION]:o.dr,[a.HyN.RISK_PREFERENCE]:o.r,[a.HyN.CHOOSE_PORTFOLIO]:o.dB,[a.HyN.CAR_INVESTMENT_KNOWLEDGE]:o.uG,[a.HyN.CAR_TEST]:o.X3,[a.HyN.SELECT_FUND_SOURCE]:o.PY,[a.HyN.SUITABILITY_CHECK]:o.u1,[a.HyN.SUITABLE_PORTFOLIOS]:x,[a.HyN.SUITABLE_POPUP]:Y,[a.HyN.INVESTMENT_KNOWLEDGE]:o.Q1,[a.HyN.CKA_TEST]:o.y3,[a.HyN.CONTRACTUAL_INFO]:o.N$,[a.HyN.SELECT_TENOR]:o.JW,[a.HyN.PORTFOLIO_OVERVIEW]:o.gD,[a.HyN.REBALANCE_CONSENT]:o.z1,[a.HyN.FUNDS_DEPOSIT]:o.im,[a.HyN.SRS_BANK_DETAILS]:o.b8,[a.HyN.SRS_ADD_AMOUNT]:function(e){let{nextUrl:t}=e,{strings:{onboarding:{srs_amount_page:{add_amount_caption:n,funds_transfer_note_text:a,amount_deduct_from_srs_text:o,investment_amount_number_label:i,investment_amount_placeholder:s}},general:{confirm_cta:c},errors:u}}=(0,d.Ym)(),p=(0,b.wA)(),_=(0,b.d4)(e=>
1e.router.location),h=(0,b.d4)(T.AU.getAllBankDetails),y=(0,b.d4)(T.AU.getSrsInvestmentAmount);if((0,l.useEffect)(()=>{window.history.pushState(null,null,_.href),window.onpopstate=function(){window.history.go(1)}},[_.href]),(0,l.useEffect)(()=>{h||p((0,M.getAllBankDetails)())},[p,h]),!h)return(0,r.jsx)(W.kt,{});let g=h&&h.find(e=>e.fundSource===j.Cr.SRS),x=(e,t)=>n=>{let{value:a}=n.target,o=a.replace(/[^\d.]/g,""),r=/^(\d*\.?\d{0,2})/.exec(o);t(e,r?r[1]:"")},C=e=>[{key:"amount",label:i,placeholder:s,Component:m.pd,type:"number",handleInputChange:x,inputmode:"decimal",labelBgColor:"B.10"}];return(0,r.jsx)(U.l1,{enableReinitialize:!0,validateOnMount:!0,onSubmit:e=>{let n="".concat(t,"?amount=").concat(e.amount);p((0,G.if)(e.amount)),p((0,V.getKycInfo)(n))},validationSchema:H(u),initialValues:{amount:y},children:e=>{let{values:t,errors:l,touched:i,isValid:s,setFieldValue:d,handleChange:u,handleSubmit:p,handleBlur:_}=e,h=C(t);return(0,r.jsxs)(f.mO,{containerStyles:{px:{_:4,md:0},py:{_:6,md:0}},containerWidth:"728px",contentWidth:"728px",isPrimaryCtaDisabled:!s,onPrimaryCtaClick:p,primaryCtaText:c,children:[(0,r.jsx)(m.pT,{alignItems:"center",justifyContent:{_:"flex-start",md:"center"},p:{_:0,md:8},pb:{_:6,md:4},children:(0,r.jsx)(m.EY,{capitalize:!0,color:"B.1",variant:{_:"label2",md:"label1"},children:n})}),(0,r.jsxs)(m.az,{bg:{_:"transparent",md:"W.1"},borderTopColor:"B.5",borderTopStyle:"solid",borderTopWidth:{_:0,md:"1px"},pb:{_:0,md:6},pt:{_:0,md:8},px:{_:0,md:7},children:[(0,r.jsx)(m.pT,{alignItems:"center",flexWrap:"wrap",justifyContent:"center",mb:{_:1,md:4},width:"100%",children:(0,r.jsxs)(m.az,{alignItems:"center",gridColumnGap:8,gridRowGap:{_:2,md:5},gridTemplateColumns:{_:"1fr",md:"1fr 1fr"},justifyContent:"center",width:{_:"100%",md:"50%"},children:[(0,r.jsx)(K,{data:g}),(0,r.jsxs)(m.pT,{alignItems:"center",flexDirection:"row",gap:1,justifyContent:"center",mb:"24px",mt:"12px",children:[(0,r.jsx)(m._V,{alt:"icon",height:"12px",src:q,width:"12px"}),(0,r.jsx)(m.EY,{color:"B.1",variant:"body2",children:a})]}),h.map(e=>{let{Component:n,key:a,label:o,type:s,handleInputChange:c,placeholder:p,options:h,disabled:y,inputmode:g,labelBgColor:f}=e;return(0,r.jsx)(m.az,{children:(0,r.jsx)(n,{disabled:y,errorText:l[a],inputmode:g,label:o,labelBgColor:f,name:a,onBlur:_,options:h,placeholder:p,type:s,value:t[a],error:i[a]&&l[a]&&l[a].length>0,onChange:c?c(a,d):u})},a)})]})}),(0,r.jsx)(m.pT,{alignItems:"center",justifyContent:{_:"flex-start",md:"center"},mb:{_:1,md:4},children:(0,r.jsx)(m.EY,{color:"B.3",variant:{_:"caption2Reg",md:"body2"},children:o})})]})]})}})},[a.HyN.SRS_ADDITIONAL_DETAILS]:o.Kn,[a.HyN.SRS_ADDITIONAL_DETAILS_VIEW_DOC]:o.Kn},J=e=>{let{routeName:t,prevUrl:n,nextUrl:o}=e;return({[a.HyN.MOBILE_VERIFICATION]:{prevUrl:n,nextUrl:o},[a.HyN.EDIT_MOBILE]:{title:"Edit mobile number",prevUrl:null,nextUrl:o},[a.HyN.INVESTMENT_OBJECTIVE]:{prevUrl:n,nextUrl:(0,a.u12)(a.HyN.INVESTMENT_OBJECTIVE_DETAILS)},[a.HyN.INVESTMENT_OBJECTIVE_DETAILS]:{prevUrl:(0,a.u12)(a.HyN.INVESTMENT_OBJECTIVE),nextUrl:o},[a.HyN.SELECT_FUND_SOURCE]:{hideHeaderIcon:!1,title:"Select funding source",prevUrl:(0,a.u12)(a.HyN.CHOOSE_PORTFOLIO),nextUrl:o},[a.HyN.INVESTMENT_KNOWLEDGE]:{prevUrl:n,nextUrl:o},[a.HyN.CKA_TEST]:{prevUrl:(0,a.u12)(a.HyN.INVESTMENT_KNOWLEDGE),nextUrl:o},[a.HyN.SUITABILITY_CHECK]:{title:"Selection",prevUrl:n,nextUrl:o},[a.HyN.SUITABLE_POPUP]:{title:"Selection",prevUrl:n,nextUrl:o},[a.HyN.SUITABLE_PORTFOLIOS]:{title:"Selection",prevUrl:(0,a.u12)(a.HyN.SUITABILITY_CHECK),nextUrl:o},[a.HyN.SELECT_TENOR]:{prevUrl:n,nextUrl:(0,a.u12)(a.HyN.PORTFOLIO_OVERVIEW)},[a.HyN.PORTFOLIO_OVERVIEW]:{prevUrl:(0,a.u12)(a.HyN.SELECT_TENOR),nextUrl:o},[a.HyN.CAR_INVESTMENT_KNOWLEDGE]:{prevUrl:n,nextUrl:o},[a.HyN.CAR_TEST]:{prevUrl:(0,a.u12)(a.HyN.CAR_INVESTMENT_KNOWLEDGE),nextUrl:o},[a.HyN.SRS_ADD_AMOUNT]:{title:"Add funds with SRS ",prevUrl:(0,a.u12)(a.HyN.SRS_BANK_DETAILS),nextUrl:(0,a.u12)(a.HyN.SRS_ADDITIONAL_DETAILS)},[a.HyN.SRS_ADDITIONAL_DETAILS]:{title:"Add funds with SRS ",prevUrl:(0,a.u12)(a.HyN.SRS_ADD_AMOUNT),nextUrl:null},[a.HyN.SRS_ADDITIONAL_DETAILS_VIEW_DOC]:{title:"Terms & Conditions",prevUrl:(0,a.u12)(a.HyN.SRS_ADDITIONAL_DETAILS),nextUrl:null}})[t]},Z=(e,t)=>{if(!e)return null;let n=X(e,t);return n?(0,a.u12)(Array.isArray(n)?n[0]:n):null},ee=e=>({basicInformation:"identity_residential_clicks",mobileVerification:"mobile_verification_clicks",employmentInformation:"employment_income_clicks",documentUpload:"share_document_clicks",investmentObjective:"investment_objective_clicks",taxResidency:"tax_information_clicks",regulatoryInformation:"regulatory_information",riskPreference:"risk_preference",contractSigned:"sign_contract_clicks",portfolioOverview:"portfolio_overview_clicks",rebalanceConsent:"rebalance_consent_clicks",transferFunds:"transfer_funds_clicks"})[e]},25570:(e,t,n)=>{"use strict";n.d(t,{X:()=>d,j:()=>u});var a=n(37876),o=n(14232),r=n(48011),l=n(23983),i=n(95706),s=n(71776),c=n(78071);function d(){let{geography:e}=(0,c.Ym)(),{visibilityFlags:{enableTransferPlan:t}}=(0,l.Q)(e),n=(0,r.wA)(),a=(0,r.d4)(e=>e.accountInfo.transferPlan);(0,o.useEffect)(()=>{t&&!a&&n(s.vc.getTransferPlan())},[a]);let d=a?i.GBS:i.dbp;return t?d:""}let u=e=>function(t){let n=d();return(0,a.jsx)(e,{...t,redirectionTPUrl:n})}},33363:(e,t,n)=>{"use strict";n.d(t,{k3:()=>c,Zq:()=>f,_s:()=>
1b,wi:()=>O,EI:()=>F.A,_e:()=>B,Y9:()=>P,sn:()=>Y.A,Bt:()=>U,c5:()=>V,L7:()=>G,Nh:()=>W,MD:()=>K,E:()=>eo,lW:()=>es,eY:()=>eh,d0:()=>ey.A,q1:()=>ex,iK:()=>eb,TU:()=>eN,mO:()=>ew.A}),n(52619);var a=n(37876),o=n(14232),r=n(142),l=n(78071),i=n(24376),s=n(34219);let c=e=>{let{rate:t,tenor:n,strings:c}=e,[d,u]=o.useState(1e5);return(0,a.jsxs)(s.az,{bg:"W.2",border:"1px solid",borderColor:"B.6",borderRadius:2,p:4,children:[(0,a.jsx)(s.az,{mb:1,children:(0,a.jsx)(s.EY,{color:"B.1",mb:2,variant:"mlWide",children:c.calculator.invest_text})}),(0,a.jsxs)(s.EY,{color:"B.7",variant:"subtitle3",children:[r.n4.SGD.EN,new Intl.NumberFormat("en-SG").format(d)]}),(0,a.jsx)(s.Ap,{maxValue:25e4,minValue:1e4,onChange:u,stepsConfig:[{start:1e4,end:25e4,incr:1e4}],theme:"white",value:d,sliderConfig:{knobStyle:"disc",knobWidth:24,renderKnobArrows:!1,barHeight:4}}),(0,a.jsx)(s.az,{mb:1,children:(0,a.jsx)(s.EY,{color:"B.1",mb:2,variant:"mlWide",children:c.calculator.returns_text})}),(0,a.jsx)(s.EY,{color:"B.3",mt:2,variant:"label2",children:(0,a.jsx)(l.In,{components:{Highlight:(0,a.jsx)(s.EY,{color:"B.7",variant:"subtitle3"})},str:c.calculator.returns_value_text,values:{return:"".concat(r.n4.SGD.EN).concat(new Intl.NumberFormat("en-SG").format((0,i.FJ)(t,d,n,!0)),"\n "),tenor:n+" month"+(1===n?"":"s")}})})]})};var d=n(82167),u=n(21651),p=n(71950),_=n(48011),m=n(89099),h=n(30053),y=n(72217);let g=d.Ay.hr.withConfig({componentId:"sc-c6f9238d-0"})(["width:100%;height:1px;border:none;margin:auto;position:relative;margin-bottom:","px;margin-top:","px;background-color:",";color:",";&:before{content:'OR';background-color:",";display:block;width:15%;font-size:",";text-align:center;position:absolute;top:0;left:50%;transform:translate(-50%,-50%);}"],(0,u.A)("space.8"),(0,u.A)("space.2"),(0,u.A)("colors.B.4"),(0,u.A)("colors.B.4"),(0,u.A)("colors.W.2"),(0,u.A)("fontSizes.4")),f=e=>{let{onCrossClick:t=()=>{},showQrCode:n,analyticsFunc:r,qrValue:i,onCloseHandler:c,title:d,showCrossIcon:u,theme:f="light"}=e,{strings:{general:{download_app_button:{download_app_text:x,scan_to_download_app:b}}},localeCode:C}=(0,l.Ym)(),v=(0,_.d4)(e=>e.responsiveUtility.isDesktop),j=(0,m.useRouter)();o.useEffect(()=>()=>{c&&c()},[]);let E={light:{bg:"G.1",titleColor:"B.1",titleVariant:"price4",qrWrapper:{}},dark:{bg:"#092663",titleColor:"#ffffff",titleVariant:"h3",qrWrapper:{px:1,py:1,bg:"#ffffff",mb:10,mt:5}}}[f];return(0,a.jsx)(s.aF,{modalMaxWidth:"455px",onClose:t,showCloseIcon:u,styles:{bg:E.bg},title:(0,a.jsx)(s.EY,{color:E.titleColor,fontWeight:"regular",variant:E.titleVariant,children:(0,a.jsx)(s.EY,{lineHeight:"regular",children:(0,a.jsx)(l.In,{str:d||(n?b:x),components:{desktopBrElement:v?(0,a.jsx)("br",{}):(0,a.jsx)("span",{}),alignCenter:(0,a.jsx)(s.EY,{as:"div",textAlign:"center"})}})})}),children:(0,a.jsxs)(s.pT,{alignItems:"center",flexDirection:"column",children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.az,{mb:6,position:"relative",...E.qrWrapper,children:(0,a.jsx)(p.hp,{size:100,value:null!=i?i:(0,h.BK)(j,C)})}),"light"===f&&(0,a.jsx)(g,{})]}),(0,a.jsx)(y.A,{analyticsFunc:r,buttonMarginBottom:{_:5,md:0},buttonMarginRight:2,heightPerIcon:"38px",justifyContent:"center",width:"100%"})]})})},x=e=>{let{strings:t}=e;return(0,a.jsxs)(s.az,{bg:"B.1",mt:{_:0,md:"1px"},pl:{_:6,xl:20},pr:{_:6,xl:10},py:4,children:[(0,a.jsx)(s.az,{mb:"2px",children:(0,a.jsx)(s.EY,{capitalize:!0,color:"G.1",mb:"2px",variant:"label4",children:t.syfe_caption})}),(0,a.jsx)(s.EY,{color:"G.1",variant:"secSecSubtitle",children:t.managed_portfolios_text})]})},b=e=>{let{strings:{general:t}}=(0,l.Ym)(),{steps:n,onDrawerClose:o}=e;return(0,a.jsxs)(s.az,{bg:"W.2",position:"relative",children:[(0,a.jsx)(ex,{}),(0,a.jsx)(x,{strings:t}),(0,a.jsx)(K,{onDrawerClose:o,steps:n})]})};var C=n(54587),v=n.n(C),j=n(85560);n(7649);var E=n(68982),A=n(44213),S=n(1414),I=n(95706);n(5041);var T=n(69777);let k={Instagram:{src:"/_next/static/media/instagram.9b48a7f0.svg",height:24,width:24,blurWidth:0,blurHeight:0},Facebook:{src:"/_next/static/media/facebook.3e4b2e68.svg",height:32,width:32,blurWidth:0,blurHeight:0},Twitter:{src:"/_next/static/media/twitter.9bb0efd7.svg",height:32,width:32,blurWidth:0,blurHeight:0},Linkedin:{src:"/_next/static/media/linkedin.0d757b6a.svg",height:32,width:32,blurWidth:0,blurHeight:0},Whatsapp:{src:"/_next/static/media/whatsapp.24540a7a.svg",height:32,width:32,blurWidth:0,blurHeight:0}},N=(0,d.Ay)(e=>(0,a.jsx)(s.A,{...e})).withConfig({componentId:"sc-5e9fe110-0"})(["color:",";&:hover{color:",";text-decoration:underline;}"],(0,u.y)("colors.B.8"),(0,u.y)("colors.B.8")),w=e=>{let{analyticsInfo:t,src:n,href:o,platform:r,...l}=e;return(0,a.jsx)(s.az,{...l,as:s.A,href:o,onClick:()=>pushAnalytics(t),children:(0,a.jsx)(v(),{alt:r,height:32,src:n,width:32})})};j.Yj().email();let O=e=>{let{showAwards:t=!1}=e,{strings:{footer:{syfe_address:n},footer_new:o},geography:i,localeConfig:c,countryFullName:d}=(0,l.Ym)(),u=(0,_.d4)(e=>e.responsiveUtility.isPhone),{socialLinks:p}=A.wf[i](n),m=Object.keys(r.XN);return(0,a.jsx)(s.pT,{bg:"B.1",p:{_:6,md:30},pt:{_:15,md:20},children:(0,a.jsxs)(s.az,{width:"100%",children:[(0,a.jsx)(s.az,{mb:6,children:(0,a.jsx)(v(),{alt:"Syfe logo",height:43.5,src:"/nextstatic/images/syfe.svg",width:143.5})}),(0,a.jsx)(s.pT,{mb:6,children:m.map((e,t)=>{let n=E.h[e].LOCALES[0],o=E.I[n].urlPrefix||"/";return(0,a.jsx)(s.pT,{alignItems:"center",borderColor:"W.1",pl:2*(0!==t),pr:2*(t!==m.length-1),px:2,borderRight:t===m.length-1?"none":"2px s
1olid #F7F8FC",children:(0,a.jsx)(s.EY,{capitalize:!0,as:s.A,href:o,variant:"label3",color:d===E.h[e].countryFullName?"W.1":"B.8",children:E.h[e].countryFullName})},e)})}),(0,a.jsx)(s.az,{mb:6,children:(0,a.jsx)(y.A,{buttonMarginBottom:3*!!u,heightPerIcon:"40px"})}),t&&(0,a.jsx)(s.az,{mb:6,children:(0,a.jsx)(T.A,{imageHeight:"87px",theme:"blue"})}),(0,a.jsx)(s.az,{mb:6,children:(0,a.jsx)(s.EY,{color:"B.3",variant:"caption1",children:(0,a.jsx)(l.In,{str:o.license_text,components:{Highlight:(0,a.jsx)(N,{href:S.unj,target:"_blank"})}})})}),(0,a.jsx)(s.pT,{alignItems:"center",mb:{_:5,md:6},children:p.map((e,t)=>(0,a.jsx)(w,{analyticsInfo:e.analyticsInfo,href:e.url,mr:{_:4,md:6},platform:e.platform,src:k[e.platform],style:{cursor:"pointer"},target:"_blank"},"social-link-".concat(t)))}),(0,a.jsx)(s.az,{children:(0,a.jsx)(s.EY,{color:"B.3",variant:"caption1",children:(0,a.jsx)(l.In,{str:o.disclaimer_text,components:{br:(0,a.jsx)("br",{}),Link:(0,a.jsx)(N,{href:"".concat(c.urlPrefix).concat(I.YAe),target:"_blank"})}})})})]})})};var F=n(16098),D=n(57776),R=n(76984);let B=e=>{let{onGoogleSignIn:t,text:n,onError:r}=e,{traditionalLangCode:i}=(0,l.Ym)(),s=o.useCallback(e=>{let n=(0,R.s)(e.credential);t({email:n.email,firstName:n.given_name,lastName:n.family_name,idToken:e.credential})},[t]),c=(0,_.d4)(e=>e.responsiveUtility.isPhone);return(0,a.jsx)(D.j,{locale:i,logo_alignment:"left",onError:r,onSuccess:s,shape:"rectangular",size:"large",text:n,theme:"filled_black",type:"standard",width:c?"345px":"360px"})},P=o.memo(e=>{let{onExit:t,onBtnAction:n,btnCTA:o,theme:r="blue",showLanguageSwitcher:i=!1}=e,{strings:{general:{exit_cta:c}}}=(0,l.Ym)();return(0,a.jsx)(s.pT,{bg:"white"===r?"G.1":"B.1",px:{_:4,md:20},py:6,children:(0,a.jsxs)(s.pT,{alignItems:"center",justifyContent:"space-between",width:"100%",children:[(0,a.jsx)(v(),{alt:"Syfe logo",height:32,src:"white"===r?"/nextstatic/images/syfe-blue.svg":"/nextstatic/images/syfe.svg",width:96}),t&&(0,a.jsxs)(s.pT,{cp:!0,alignItems:"center",onClick:t,children:[(0,a.jsx)(s.C0,{color:"W.2",height:"16px",name:"cross",width:"16px"}),(0,a.jsx)(s.EY,{capitalize:!0,color:"W.2",variant:"label2",children:c})]}),n&&(0,a.jsx)(s.$n,{onClick:n,children:o}),i&&(0,a.jsx)(V,{})]})})});n(8981),n(41673);var Y=n(23660);let U=e=>{let{data:t}=e,[n,r]=o.useState(null);return(0,a.jsxs)(s.az,{bg:{_:"W.2",md:"G.1"},border:"1px solid",borderColor:"B.6",borderRadius:2,p:3,width:"100%",children:[t.map((e,n)=>(0,a.jsxs)(s.pT,{alignItems:"center",justifyContent:"space-between",mb:2*(n!==t.length-1),children:[(0,a.jsxs)(s.pT,{alignItems:"center",children:[(0,a.jsx)(s.EY,{color:"B.3",mr:2,variant:"caption1",...e.labelProps,children:e.label}),e.tooltip&&(0,a.jsx)(s.az,{cp:!0,onClick:()=>r(n),children:(0,a.jsx)(s.C0,{height:"18px",name:"tooltip",width:"18px"})})]}),(0,a.jsx)(s.EY,{color:"B.3",variant:"caption1",...e.valueProps,children:e.value})]},e.label)),null!==n&&(0,a.jsx)(s.aF,{onClose:()=>r(null),title:t[n].label,children:(0,a.jsx)(s.EY,{color:"B.1",variant:"body2",children:t[n].tooltip})})]})};var z=n(1573);let L={"Hong Kong":"/nextstatic/images/flags/Hong Kong.svg"},H=e=>{let{country:t,localeName:n}=e;return(0,a.jsxs)(s.pT,{alignItems:"center",my:2,children:[(0,a.jsx)(v(),{alt:"".concat(t," flag"),height:18,src:L[t],width:24}),(0,a.jsx)(s.az,{ml:2,children:(0,a.jsx)(s.EY,{color:"B.2",variant:"button",children:null!=n?n:t})})]})},M=e=>{let{localesAvailable:t,currentLocale:n,onChange:o,noBorder:r,underlineCurrent:l,paddingHorizontal:i=2}=e;return(0,a.jsx)(s.pT,{alignItems:"center",justifyContent:"center",children:t.map((e,c)=>(0,a.jsx)(s.az,{cp:!0,borderRightColor:"B.4",onClick:()=>o(e),px:i,borderRight:c===t.length-1||r?"none":"1px solid",children:(0,a.jsx)(s.EY,{color:e.code===n.code?"B.7":"B.3",variant:"button",textDecoration:l&&e.code===n.code?"underline":"none",children:e.languageFullName})},e.code))})},V=()=>{let e=(0,m.useRouter)(),{strings:{general:{save_cta:t,change_language_text:n}},countryFullName:r,localeConfig:i,geographyConstants:c,countryLocaleName:d}=(0,l.Ym)(),u=(0,_.d4)(e=>
1e.responsiveUtility.isDesktop),[p,h]=o.useState(!1),[y,g]=o.useState(!1),[f,x]=o.useState(i),b=o.useRef();(0,z.A)(b,()=>g(!1));let C=c.LOCALES.map(e=>E.I[e]),j=e=>{u?A(e):x(e)},A=t=>e.push(e.asPath,e.asPath,{locale:t.urlPrefix.replace("/","")});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.pT,{cp:!0,alignItems:"center",onClick:()=>{u?g(!0):h(!0)},position:"relative",ref:b,children:[(0,a.jsx)(v(),{alt:"".concat(r," flag"),height:18,src:L[r],width:24}),(0,a.jsx)(s.az,{borderLeft:"1px solid",borderLeftColor:"B.2",ml:2,px:2,children:(0,a.jsx)(s.EY,{color:"B.2",variant:"button",children:f.label})}),y&&(0,a.jsxs)(s.pT,{alignItems:"center",bg:"B.6",borderBottomLeftRadius:5,borderBottomRightRadius:5,justifyContent:"space-between",position:"absolute",px:10,py:5,right:0,top:10,width:"520px",children:[(0,a.jsx)(H,{country:r,localeName:d}),(0,a.jsx)(M,{noBorder:!0,underlineCurrent:!0,currentLocale:f,localesAvailable:C,onChange:j,paddingHorizontal:4})]})]}),p&&(0,a.jsxs)(s.aF,{onClose:()=>h(!1),title:n,children:[(0,a.jsx)(H,{country:r,localeName:d}),(0,a.jsx)(s.az,{borderBottom:"1px solid",borderBottomColor:"B.6",mx:"-24px",my:6}),(0,a.jsx)(s.az,{my:8,children:(0,a.jsx)(M,{currentLocale:f,localesAvailable:C,onChange:j})}),(0,a.jsx)(s.$n,{onClick:()=>A(f),width:"100%",children:t})]})]})};function G(e){let{caption:t}=e;return(0,a.jsxs)(s.pT,{bg:"B.5",borderRadius:2,gap:2,px:3,py:"10px",children:[(0,a.jsx)(s.pT,{p:"2px",children:(0,a.jsx)(s.C0,{height:"14px",name:"filledInfo",width:"14px"})}),(0,a.jsx)(s.EY,{color:"B.1",variant:"caption1",children:t})]})}n(91036);let W=e=>{let{currentStep:t,totalSteps:n,onClick:o}=e;return(0,a.jsxs)(s.pT,{cp:!0,alignItems:"center",bg:"B.6",justifyContent:"space-between",onClick:o,px:6,py:3,children:[(0,a.jsx)(s.az,{bg:"B.5",height:"8px",width:"60%",children:(0,a.jsx)(s.az,{bg:"GR.2",height:"100%",width:"".concat(t/n*100,"%")})}),(0,a.jsxs)(s.pT,{alignItems:"center",children:[(0,a.jsxs)(s.EY,{color:"B.7",variant:"bullet2",children:["Step ",t," of ",n]}),(0,a.jsx)(s.az,{ml:3,mt:"-4px",children:(0,a.jsx)(s.C0,{color:"B.7",height:"8px",name:"back-filled",rotation:"-90deg",width:"8px"})})]})]})},q=e=>{let{steps:t,onDrawerClose:n}=e;return(0,a.jsx)(s.az,{overflow:"auto",pb:{_:6,md:20},pl:{_:6,md:20},pr:{_:6,md:10},pt:{_:6,md:10},children:t.map((e,t)=>(0,a.jsx)(eo,{index:t,onClick:()=>{},onDrawerClose:n,step:e,theme:"white"},e.key))})};q.defaultProps={theme:"white"};let K=q;var X=n(54755),Q=n(48779),$=n(25240);let J={white:{BG_COLORS:{current:"B.1",uneditable:"B.4",editable:"GR.2",completed:"GR.2"},COUNTER_COLORS:{current:"B.6",uneditable:"B.3",editable:"B.6",completed:"B.6"},MENU_COLORS:{current:"B.7",uneditable:"B.3",editable:"B.1",completed:"B.1"},MAIN_MENU_COLORS:{current:"B.1",uneditable:"B.3",editable:"B.1",completed:"B.1"}},dashboard:{},light:{}};J.dashboard={...J.white},J.light={...J.white};let Z=(0,d.Ay)(s.az).withConfig({componentId:"sc-180598a2-0"})(["border-radius:50%;text-align:center;"]),ee=e=>"edit-mobile"===e?"verify-mobile":e,et=(e,t,n)=>{let a=e.split("/"),o=ee(a[a.length-1]),l="personal-info"===a[a.length-2]?"personal-info/".concat(o):o;return l===I.HyN.INVESTMENT_OBJECTIVE_DETAILS&&(l=I.HyN.INVESTMENT_OBJECTIVE),l===I.HyN.TRANSFER_INSTRUCTION_DETAILS&&n===r.XN.SG&&(l=I.HyN.TRANSFER_INSTRUCTION),[I.HyN.TRANSFER_PLAN_OVERVIEW,I.HyN.SETUP_TRANSFER_PLAN].includes(l)&&(l=I.HyN.FIRST_TRANSFER),l===I.HyN.RESIDENTIAL_ADDRESS&&(l=I.HyN.DOCUMENT_UPLOAD),t.route&&l===t.route.split("?")[0]?"current":r.qr[t.status]},en=(e,t)=>(0,a.jsx)(s.az,{bg:e,height:t,ml:"10px",my:-1,width:"1px"}),ea=e=>{let{step:t,theme:n,onClick:o,index:i,onDrawerClose:c}=e,{key:d,title:u,route:p,childSteps:_,status:h}=t,y=r.qr[h],g=(0,m.useRouter)(),f=(0,X.Hm)(g),{geography:x}=(0,l.Ym)(),b=J[n].BG_COLORS,C=J[n].COUNTER_COLORS,v=J[n].MENU_COLORS,j=J[n].MAIN_MENU_COLORS,E=e=>{g.push(e),c()},A=e=>{if(e.route){let t=(0,$.K4)(e.key);t&&(0,Q.Ay)({action:t,category:"progress_bar",label:"onboarding page"}),E(e.route)}},S=["current","editable"].includes(y)&&p;return(0,a.jsxs)(s.az,{children:[0!==i&&en(b[y],"32px"),(0,a.jsxs)(s.pT,{alignItems:"center",cp:S?"pointer":null,onClick:S?()=>E(p):null,tabIndex:S?0:-1,onKeyDown:e=>{"Enter"===e.key&&S&&E(p)}
1,children:[(0,a.jsx)(Z,{bg:b[y],color:C[y],height:"21px",width:"21px",children:"completed"===y||"editable"===y?(0,a.jsx)(s.C0,{name:"tick",width:"14px"}):(0,a.jsx)(s.EY,{variant:"bullet",children:i+1})}),(0,a.jsx)(s.az,{color:j[y],ml:4,children:(0,a.jsx)(s.EY,{capitalize:!0,variant:"label3",children:u})})]}),"completed"!==y&&_&&_.map(e=>{let t=et(f,e,x),n=["current","editable"].includes(t)&&e.route;return(0,a.jsxs)(s.az,{children:[en(b[t],"20px"),(0,a.jsxs)(s.pT,{alignItems:"center",cp:n?"pointer":null,role:"button",tabIndex:n?0:-1,onClick:n?()=>A(e):null,onKeyDown:t=>{"Enter"===t.key&&n&&A(e)},children:[(0,a.jsx)(s.pT,{alignItems:"center",height:"21px",justifyContent:"center",my:-1,width:"21px",children:(0,a.jsx)(Z,{bg:b[t],color:C[t],height:"8px",width:"8px"})}),(0,a.jsx)(s.az,{color:v[t],ml:8,children:(0,a.jsxs)(s.EY,{variant:"body2",children:[" ",e.drawerTitle," "]})})]})]},e.key)})]},d)};ea.defaultProps={theme:"white",step:{stepSeparator:!1,status:"uneditable"}};let eo=ea;n(85925);let er=(0,d.Ay)(s.$n).withConfig({componentId:"sc-de6e5781-0"})(["background:#202124;height:40px;display:flex;align-items:center;position:relative;padding-left:38px;&:hover{background:#3c4043;}"]),el=(0,d.Ay)(s.az).withConfig({componentId:"sc-de6e5781-1"})(["border-bottom-left-radius:3px;border-top-left-radius:3px;display:grid;place-items:center;"]),ei=(0,d.Ay)(s.EY).withConfig({componentId:"sc-de6e5781-2"})(["overflow:hidden;text-overflow:ellipsis;color:#e8eaed;font-size:0.97rem;text-transform:none;"]),es=e=>{let{onClick:t,disabled:n,text:o,width:r="100%"}=e;return(0,a.jsxs)(er,{disabled:n,onClick:t,p:0,variant:"secondary",width:r,children:[(0,a.jsx)(el,{bg:"W.2",height:"36px",left:"1px",position:"absolute",width:"36px",children:(0,a.jsx)(s.C0,{color:"#202124",height:"20px",name:"key",width:"20px"})}),(0,a.jsx)(ei,{variant:"body2",children:o})]})};var ec=n(19461),ed=n(71776),eu=n(85931),ep=n(87464),e_=n(76037);let em={light:{},dashboard:{},white:{mainText:"B.1",helpText:"B.1",saveText:"B.7"}},eh=e=>{let{theme:t,portfolioRefCode:n,fieldsData:r}=e,{componentTheme:{mainText:i,saveText:c,helpText:d}}=(0,e_.Y)(t,em),u=(0,_.d4)(e=>ec.B2.getPortfolioWithRefCode(e,n)),p=(0,_.d4)(e=>ec.AU.getPaynowQrCode(e)),m=(0,_.wA)(),{strings:{forms:{labels:{transfer_method_details:h}},general:{new_transfer_method_details:{login_and_upload_qr_text:y,save_copy_text:g},bank_account_details:{add_funds_by_pay_now_section:f}}}}=(0,l.Ym)(),x=(0,_.d4)(e=>e.responsiveUtility.isPhone),[b,C]=o.useState(!0),v=r.find(e=>"uen"===e.key);o.useEffect(()=>{m(ed.mD.fetchPaynowQrCode(n))},[n,m]);let j=()=>{b?(0,Q.Ay)((0,eu.C7d)("PayNow",u.id,u.type,void 0,[u.status])):(0,Q.Ay)((0,eu.mOC)("PayNow",u.id,u.type,void 0,[u.status])),C(e=>!e)},E=async()=>{try{x&&((0,Q.Ay)((0,eu.NYD)("PayNow",u.id,u.type,void 0,[u.status])),(0,ep.v_)(p,"syfe-".concat(n,"-qr.png")))}catch(e){console.error(e)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.EY,{as:"div",color:i,mb:{_:2,md:4},variant:{_:"body2",md:"body1"},children:y}),p&&(0,a.jsx)(s.az,{mb:{_:4,md:5},mx:"auto",onClick:E,width:"fit-content",children:(0,a.jsx)(s._V,{alt:"QR Code",height:179,src:p,width:179})}),x&&(0,a.jsx)(s.EY,{as:"div",color:c,mb:5,onClick:E,role:"button",textAlign:"center",variant:"subtitle3",children:f.save_qr_code_text}),(0,a.jsxs)(s.az,{bg:"W.1",mb:6,px:6,py:4,children:[(0,a.jsxs)(s.pT,{cp:!0,alignItems:"center",justifyContent:"space-between",mb:6*!!b,onClick:j,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&j()},tabIndex:0,children:[(0,a.jsx)(s.EY,{color:i,mb:0,variant:"subtitle3",children:f.qr_code_not_working_text}),(0,a.jsx)(s.az,{color:"B.7",children:(0,a.jsx)(s.C0,{height:"16px",name:"filledCaret",rotation:b?"180deg":"0deg",width:"16px"})})]}),b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.az,{mb:4,children:(0,a.jsx)(s.EY,{color:d,variant:"body2",children:f.copy_paste_text})}),(0,a.jsx)(s.Ao,{showCopyText:!0,analyticsInfo:(0,eu.C_G)(),fillType:"outlined",label:null==v?void 0:v.label,theme:t,value:null==v?void 0:v.value}),(0,a.jsx)(s.az,{mb:4,children:(0,a.jsx)(s.EY,{color:d,variant:"body2",children:f.recipient_text})}),(0,a.jsx)(s.Ao,{showCopyText:!0,analyticsInfo:(0,eu.C_G)(),fillType:"outlined",label:h.portfolio_reference_code_text,theme:t,value:n}),(0,a.jsx)(s.EY,{as:"div",color:"B.3",mt:6,variant:"body2",children:f.verify_details_text})]})]}),(0,a.jsx)(s.EY,{as:"div",color:"B.1",my:6,variant:{_:"body2",md:"body1"},children:g})]})};var ey=n(87449),eg=n(32515);let ef=d.Ay.button.withConfig({componentId:"sc-e3e0ca8a-0"})(["position:absolute;
1left:0;padding:2px;background:",";opacity:0;cursor:default;&:focus-visible{opacity:1;}"],(0,u.y)("colors.W.1")),ex=()=>{let{strings:{general:{skip_link_text:e}}}=(0,l.Ym)();return(0,a.jsx)(ef,{onKeyDown:e=>{if("Enter"===e.key){let e=document.getElementById("onboarding-step-container");if(e){let t=e.querySelectorAll(eg.DH);t.length&&t[0].focus()}}},tabIndex:"1",children:e})};n(55512),n(94763);let eb=e=>{let{title:t,backText:n,onBackClick:o}=e,{strings:{general:{back_cta:r}}}=(0,l.Ym)(),i=(0,_.d4)(e=>e.responsiveUtility.isDesktop);return(0,a.jsxs)(s.pT,{alignItems:"center",bg:{_:"B.1",xl:"unset"},justifyContent:{_:"flex-start",xl:"center"},position:"relative",px:{_:6,xl:0},py:{_:5,xl:10},children:[o&&(0,a.jsxs)(s.pT,{cp:!0,alignItems:"center",left:0,onClick:o,onKeyDown:e=>{"Enter"===e.key&&o&&o()},position:{_:"relative",xl:"absolute"},role:"button",tabIndex:"0",children:[(0,a.jsx)(s.az,{mr:3,mt:"-4px",children:(0,a.jsx)(s.C0,{height:"12px",name:"back-filled",width:"12px"})}),i&&(0,a.jsx)(s.EY,{capitalize:!0,color:"B.7",variant:"label1",children:n||r})]}),(0,a.jsx)(s.EY,{capitalize:!0,color:{_:"B.5",xl:"N.15"},variant:{_:"label1",xl:"hLine2"},children:t})]})};var eC=n(81408),ev=n(81444),ej=n(23827),eE=n(69964),eA=n.n(eE),eS=n(43235),eI=n(81415);let eT=(0,d.Ay)(e=>(0,a.jsx)(s.A,{...e})).withConfig({componentId:"sc-c092d0f4-0"})(["text-decoration:underline;&:hover{color:",";text-decoration:underline;}"],(0,u.y)("colors.B.7")),ek=e=>{let{transferMethodDetails:t,theme:n,portfolioReferenceCode:i,portfolioType:c}=e,{strings:{general:{new_transfer_method_details:{usd_disclaimer:d,cash_plus_guaranteed_usd_disclaimer:u,funds_transfer_note_text:p,syfe_account_details_text:m,reference_disclaimer_text:h,login_and_enter_details_text:y,save_copy_text:g}},forms:{labels:f}},geographyConstants:{DEFAULT_CURRENCY:x,ACTIVE_CURRENCIES:b}}=(0,l.Ym)(),C=(0,_.wA)(),v=(0,_.d4)(e=>(0,eI.getDepositBankDetailsSelector)(e,c));o.useEffect(()=>{v||C((0,eS.getDepositBankDetails)(c))},[v,C,c]);let[j,E]=o.useState(x);o.useEffect(()=>{E(x)},[x,c,t]);let A=b.map(e=>({label:e,value:e}));if(!v)return(0,a.jsx)(ev.k,{});let I=(0,eC.Mr)({labels:f,depositBankDetails:v,currency:j})[t.key],T=e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.EY,{as:"div",color:"B.1",my:2,variant:"body2",children:e}),(0,a.jsx)(s.sx,{name:"currency",onChange:e=>E(e.target.value),options:A,selected:j,theme:n}),j===r.yR.USD&&(0,a.jsx)(s.az,{mt:2,children:(0,a.jsx)(ej.A,{theme:n,caption:(0,a.jsx)(l.In,{components:{brElement:(0,a.jsx)("br",{}),learnMoreLink:(0,a.jsx)(s.EY,{as:eT,color:"B.7",href:S.Glv,target:"_blank"})},str:c===r.jv.CASH_PLUS_GUARANTEED_USD?u:d})})})]});return t.key===eC.bY.PAYNOW?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eh,{fieldsData:I,portfolioRefCode:i,theme:n}),(0,a.jsx)(G,{caption:p})]}):(0,a.jsxs)(s.az,{children:[(0,a.jsx)(s.EY,{as:"div",color:"B.1",mb:{_:3,md:6},mt:6,variant:{_:"body2",md:"body1"},children:y}),(0,a.jsxs)(s.az,{bg:"W.1",borderColor:"B.5",borderStyle:"solid",borderWidth:{_:"0px",md:"1px 0px"},mx:{_:-6,md:-7},px:{_:6,md:7},py:6,children:[(0,a.jsx)(s.EY,{as:"div",color:"B.1",mb:{_:4,md:6},variant:"subtitle3",children:m}),(0,a.jsxs)(s.az,{display:"grid",gridColumnGap:12,gridRowGap:4,gridTemplateColumns:{_:"1fr",md:"1fr 1fr"},children:[I.map(e=>{let{key:t,label:o,value:r,multiline:l,helperText:i}=e;return(0,a.jsx)(s.az,{gridColumn:{_:"span 1",md:l||"currency"===t?"span 2":"span 1"},children:"currency"===t?T(o):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Ao,{showCopyText:!0,analyticsInfo:(0,eu.C_G)(),fillType:"outlined",label:o,multiline:l||!1,theme:n,value:r}),i&&(0,a.jsx)(s.EY,{color:"red",variant:"caption1",children:i})]})},t)}),(0,a.jsx)(s.az,{children:(0,a.jsx)(s.Ao,{showCopyText:!0,analyticsInfo:(0,eu.C_G)(),fillType:"outlined",theme:n,value:i,label:f.transfer_method_details.portfolio_reference_code_text})}),(0,a.jsx)(s.az,{gridColumn:{_:"span 1",md:"span 2"},children:(0,a.jsx)(s.EY,{color:"B.3",variant:{_:"caption1",md:"body2"},children:h})})]})]}),(0,a.jsx)(s.EY,{as:"div",color:"B.1",my:6,variant:{_:"body2",md:"body1"},children:g}),(0,a.jsx)(G,{caption:p})]})};ek.defaultProps={theme:"white"};let eN=o.memo(ek,eA());n(12535);var ew=n(64918)},41673:(e,t,n)=>{"use strict";n.d(t,{vM:()=>i,l6:()=>s,fd:()=>c,Ay:()=>d});var a=n(37876);n(14232);var o=n(49316),r=n(34219),l=n(69258);let i=e=>{let{field:t,form:{touched:n,errors:o},onChange:l,label:i,errorMessage:s,theme:c,...d}=e,{onChange:u,value:p,..._}=t,m=s||n[t.name]&&o[t.name];return(0,a.jsx)(r.XR,{error:!!m,errorText:m,label:i,onChange:e=>{l&&l(e)},theme:c,value:p||"",..._,...d})},s=e=>{let{field:t,form:{touched:n,errors:o},options:l,onChange:i,multiple:s,...c}=e,{onChange:d,value:u,...p}=t,_=n[t.name]&&o[t.name];return(0,a.jsx)(r.l6,{error:!!_,errorText:_,multiple:s,onChange:e=>{d(e),i&&i(e.target.value)},options:l,theme:"white",value:u||"",...p,...c})},c=e=>{let{field:t,form:{touched:n,errors:o,setFieldValue:r},options:i,onChange:s,multiple:c,...d}=e,{onChange:u,value:p,name:_,...m}=t,h=n[t.name]&&o[t.name];return(0,a.jsx)(l.A,{error:!!h,errorText:h,multiple:c,onChange:e=>{r(_,e),s&&s(e)},options:i,theme:"white",value:p||"",...m,...d})},d=e=>{let{field:t,form:{touched:n,errors:l},helperText:i,onChange:s,icon:c,errorMessage:d,...u}=e,{onChange:p,value:_,...m}=t,h=d||(0,o.O6)(n,t.name)&&(0,o.O6)(l,t.name);return(0,a.jsx)(r.pd,{error:!!h,errorText:h,helperText:i,onChange:e=>{p(e),s&&s(e.target.value)},theme:"white",value:_||"",...m,...u})}}
1,46514:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(142),o=n(78916);let r={[a.XN.SG]:{PRE_SIGNUP_CONFIG:{introUrl:(e,t)=>(0,o.M)(e,t)},STRINGS:e=>{let{account_created_popup_text:t}=e;return{confirmationMessage:"",confirmationHeading:t}}},[a.XN.HK]:{PRE_SIGNUP_CONFIG:{introUrl:(e,t)=>(0,o.M)(e,t)},STRINGS:e=>{let{thank_you_text:t,thank_you_caption:n}=e;return{confirmationMessage:n,confirmationHeading:t}}}}},51881:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(37876);n(14232);var o=n(15039),r=n.n(o),l=n(82167),i=n(34219),s=n(72459),c=n.n(s);let d=(0,l.Ay)(i.az).withConfig({componentId:"sc-84d2b1e6-0"})(["background-image:url(",");width:20px;background-repeat:no-repeat;box-shadow:0 1px 3px 0 rgba(0,0,0,0.2),0 2px 1px -1px rgba(0,0,0,0.12),0 1px 1px 0 rgba(0,0,0,0.14);background-size:5630px 15px;"],"/_next/static/media/country-flags.05b213c4.png"),u=e=>{let{code:t,className:n,...o}=e;return(0,a.jsx)(d,{className:r()(c()["country__flag--".concat(t)],n),display:"inline-block",mr:10,...o})}},52619:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var a=n(37876);n(14232);var o=n(82167),r=n(54755),l=n(34219),i=n(76984),s=n(35366);let c=(0,o.Ay)(e=>(0,a.jsx)(l.$n,{...e})).withConfig({componentId:"sc-60aa080a-0"})(["background:#202124;height:40px;display:flex;align-items:center;position:relative;padding-left:38px;&:hover{background:#3c4043;}"]),d=(0,o.Ay)(l.az).withConfig({componentId:"sc-60aa080a-1"})(["border-bottom-left-radius:3px;border-top-left-radius:3px;display:grid;place-items:center;"]),u=(0,o.Ay)(l.EY).withConfig({componentId:"sc-60aa080a-2"})(["overflow:hidden;text-overflow:ellipsis;color:#e8eaed;font-size:0.97rem;"]),p=e=>{let{onAppleSignIn:t,onError:n,text:o,width:p="100%"}=e;return(0,a.jsx)(s.Ay,{onError:n,onSuccess:e=>{var n,a,o,r,l;let{authorization:{id_token:s},user:c}=e,d=(0,i.s)(s);t({firstName:null!=(o=null==c||null==(n=c.name)?void 0:n.firstName)?o:"",lastName:null!=(r=null==c||null==(a=c.name)?void 0:a.lastName)?r:"",email:null!=(l=null==c?void 0:c.email)?l:d.email,idToken:s})},authOptions:{clientId:"com.syfe.web",scope:"name email",redirectURI:(0,r.UC)("https://".concat(window.location.host).concat(window.location.pathname)),state:crypto.randomUUID(),usePopup:!0},render:e=>(0,a.jsxs)(c,{p:0,variant:"secondary",width:p,...e,children:[(0,a.jsx)(d,{bg:"W.2",height:"36px",left:"1px",position:"absolute",width:"36px",children:(0,a.jsx)(l.C0,{color:"#202124",height:"20px",name:"apple",width:"20px"})}),(0,a.jsx)(u,{variant:"body2",children:o})]})})}},53152:(e,t,n)=>{"use strict";n.d(t,{Tp:()=>_,yk:()=>m,hV:()=>f,oO:()=>h,yI:()=>x});var a=n(142),o=n(78071),r=n(23983),l=n(15925),i=n(57144);let s={src:"/_next/static/media/buy-home.ec1ca90e.svg",height:28,width:32,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/grow-wealth.be69fcbd.svg",height:32,width:32,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/holiday-wedding.764ac06d.svg",height:26,width:32,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/retirement.ec11c2ea.svg",height:32,width:30,blurWidth:0,blurHeight:0},p={src:"/_next/static/media/something-else.ed04eb4d.svg",height:24,width:32,blurWidth:0,blurHeight:0},_={WEALTH:"WEALTH",HOME:"HOME",RETIREMENT:"RETIREMENT",HOLIDAY:"HOLIDAY",OTHER:"OTHER"},m=(e,t)=>[{label:e,value:"yes"},{label:t,value:"no"}],h=e=>{let{involvedInInvestmentBusiness:t,affiliatedWithStockExchange:n,isPoliticallyExposed:a,isRelatedToCompany:o,isLicensedWithSFCorHKMA:r,yes_text:s,no_text:c}=e,d={involvedInInvestmentBusiness:{question_text:t.question_text,description_list:t.description_list,options:m(s,c),defaultValue:!1,subFields:[{key:"involvedInInvestmentBusinessDetails",whenOptionValueSelected:!0,description_text:t.more_details_description_text,label_text:t.more_details_label_caption,defaultValue:"",component:i.Ay}]},affiliatedWithStockExchange:{question_text:n.question_text,tooltip_text:n.tooltip_text,options:m(s,c),defaultValue:!1,subFields:null},isPoliticallyExposed:{question_text:a.question_text,tooltip_text:a.tooltip_text,options:m(s,c),defaultValue:!1,subFields:[{key:"pepDetails",whenOptionValueSelected:!0,description_text:a.more_details_description_text,label_text:a.more_details_label_caption,defaultValue:"",component:i.Ay}]},isRelatedToCompany:{question_text:o.question_text,options:m(s,c),defaultValue:!1,subFields:[{key:"relatedToCompanyDetails",whenOptionValueSelected:!0,description_text:o.more_details_description_text,label_text:o.more_details_label_caption,defaultValue:"",component:i.Ay}]},isLicensedWithSFCorHKMA:{question_text:null==r?void 0:r.question_text,options:m(s,c),defaultValue:!1}};return l.O8.map(e=>({...d[e.key],...e}))},y=[{componentType:"TARGET_AMOUNT",key:"targetAmount",defaultValue:1}],g=(e,t,n,r)=>{let{single_deposit_caption:l,monthly_deposit_caption:i,target_period_caption:s,target_amount_caption:c,more_than_half_assets_caption:d,less_than_three_text:u,between_three_and_ten_text:p,more_than_ten_text:_,investing_outside_syfe_text:h,debt_outside_syfe:y,less_than_text:g,medium_range_text:f,more_than_text:x,yes_text:b,no_text:C,more_than_half_assets_tooltip_text:v,less_than_one_year_text:j,one_to_three_years_text:E,three_to_five_years_text:A,five_to_ten_years_text:S,more_than_ten_years_text:I,more_than_half_assets_v2_caption:T,income_saved_percentage_caption:k,less_than_or_equal_variable_text:N,to_from_variable_text:w,more_than_variable_text:O}=e;return{SINGLE_DEPOSIT:{heading:l,type:"SLIDER_QUESTION",minValue:t.SINGLE_DEPOSIT.minValue,maxValue:t.SINGLE_DEPOSIT.maxValue},MONTHLY_DEPOSIT:{heading:i,type:"SLIDER_QUESTION",isOptional:!0,minValue:t.MONTHLY_DEPOSIT.minValue,maxValue:t.MONTHLY_DEPOSIT.maxValue},TARGET_PERIOD:{heading:s,type:"SINGLE_SELECT_PILL",options:[{label:u,value:"LESS_THAN_THREE"},{label:p,value:"THREE_TO_TEN"},{label:_,value:"MORE_THAN_TEN"}],...r&&{type:"SELECT_QUESTION",options:[{label:I,value:"MORE_THAN_TEN"},{label:S,value:"FIVE_TO_TEN"},{label:A,value:"THREE_TO_FIVE"},{label:E,value:"ONE_TO_THREE"},{label:j,value:"LESS_THAN_ONE"}]}},TARGET_AMOUNT:{heading:c,type:"SLIDER_QUESTION",minValue:t.TARGET_AMOUNT.minValue,maxValue:t.TARGET_AMOUNT.maxValue},MORE_THAN_HALF_ASSETS:{tooltipText:n===a.XN.HK?v:null,heading:r?T:d,type:"RADIO_QUESTION",options:m(b,C)},DEBT_OUTSIDE_SYFE:{heading:y,type:"RADIO_QUESTION",options:m(b,C)},OUTSIDE_INVESTED:{heading:h,type:"SELECT_QUESTION",options:[{value:"LOW",label:g},{value:"MEDIUM",label:f},{value:"HIGH",label:x}]},...r&&{SAVINGS_PER_YEAR:{heading:k,type:"SELECT_QUESTION",options:[{value:"LESS_THAN_AND_EQUAL_FIFTEEN",label:(0,o.GW)(N,{value:"15%"})},{value:"FIFTEEN_TO_TWENTY_FIVE",label:(0,o.GW)(w,{from:"15%",to:"25%"})},{value:"TWENTY_FIVE_TO_THIRTY_FIVE",label:(0,o.GW)(w,{from:"25%",to:"35%"})},{value:"MORE_THAN_THIRTY_FIVE",label:(0,o.GW)(O,{value:"35%"})}]}}}},f=(e,t)=>{let{grow_my_wealth_text:n,buy_a_home_text:a,save_for_holiday_text:o,something_else_text:i,retirement_text:m}=e,{visibilityFlags:{enableSuitabilityV2:h}}=(0,r.Q)(t),f=h?[{componentType:"TARGET_PERIOD",key:"investmentTimeHorizon"},{componentType:"MORE_THAN_HALF_ASSETS",key:"isInvestingSubstantialPortion"},{componentType:"SAVINGS_PER_YEAR",key:"savedIncomePercentage"}].map(e=>({...e,isSuitabilityV2Field:!0})):l.j1,x=g(e,l.mk,t,h);
1return{[_.WEALTH]:{heading:n,icon:c,components:[...y,...f],componentsConfig:x},[_.HOME]:{heading:a,icon:s,components:[...y,...f],componentsConfig:x},[_.RETIREMENT]:{heading:m,icon:u,components:[...y,...f],componentsConfig:x},[_.HOLIDAY]:{heading:o,icon:d,components:[...y,...f],componentsConfig:x},[_.OTHER]:{heading:i,icon:p,components:[...y,...f],componentsConfig:x}}},x=(e,t,n,o)=>{switch(e){case a.XN.SG:return(t||n)&&!o;case a.XN.HK:return n;default:return t||n}}},53873:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,k:()=>i});var a=n(37876);n(14232);var o=n(85560),r=n(51881);let l=e=>(0,a.jsx)(r.A,{code:e,mr:2}),i=e=>{let{country_region_text:t,mobile_text:n}=e;return{country:e=>({type:"select",options:Object.keys(e).map(t=>({value:e[t].code,label:(0,a.jsxs)(a.Fragment,{children:[l(t),"".concat(e[t].localeData.countryName," (+").concat(e[t].code,")")]}),searchText:"".concat(e[t].localeData.countryName," (+").concat(e[t].code,")")})),label:t}),mobile:{type:"input",label:n,options:[]}}},s=e=>o.Ik().shape({country:o.Yj().required(e.required_caption),mobile:o.Yj().required(e.required_caption).matches(/^[0-9]*$/,e.only_digits_text).matches(/^[1-9]/,e.cannot_start_with_zero_text).min(3,e.too_short_text).max(11,e.too_long_text)})},55512:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(37876);n(14232);var o=n(76037),r=n(34219);let l={light:{},dashboard:{},white:{typography:{heading:"label",optionalText:"body2",value:"body1"},color:{heading:"colors.B.1",optionalText:"colors.B.1",value:"colors.B.1"}}},i=e=>{let{heading:t,optionalText:n,value:i,valueLabel:s,onChange:c,minValue:d,maxValue:u,sliderTheme:p,sliderConfig:_,stepsConfig:m}=e,{componentTheme:{typography:h,color:y}}=(0,o.Y)(p,l);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.az,{children:[(0,a.jsx)(r.EY,{as:"span",color:y.heading,variant:h.heading,children:t})," ",n&&(0,a.jsx)(r.EY,{as:"span",color:y.optionalText,variant:h.optionalText,children:n})]}),(0,a.jsxs)(r.az,{mt:6,children:[s&&(0,a.jsx)(r.EY,{as:"span",color:y.value,variant:h.value,children:s}),(0,a.jsx)(r.EY,{as:"span",color:y.value,variant:h.value,children:i})]}),(0,a.jsx)(r.az,{mt:1,children:(0,a.jsx)(r.Ap,{maxValue:u,minValue:d,onChange:c,sliderConfig:_,sliderTheme:p,stepsConfig:m,value:i})})]})}},56584:(e,t,n)=>{"use strict";n.d(t,{v:()=>a});let a={ONBOARDING_SIGNUP:{eventName:"ac_onboarding_signup"},ONBOARDING_KYC_STARTED:{eventName:"ac_onboarding_kyc_started"},ONBOARDING_CONTRACT_SIGNED:{eventName:"ac_onboarding_contract_signed"}}},57144:(e,t,n)=>{"use strict";n.d(t,{vM:()=>r,l6:()=>i,Ay:()=>s});var a=n(37876);n(14232);var o=n(34219);let r=e=>{let{field:t,form:{touched:n,errors:r},onChange:l,showTick:i,label:s,errorMessage:c,theme:d,...u}=e,{onChange:p,value:_,...m}=t,h=c||n[t.name]&&r[t.name];return(0,a.jsx)(o.XR,{error:!!h,errorText:h,label:s,onChange:e=>{l&&l(e)},theme:d,value:_||"",icon:i?(0,a.jsx)(o.az,{color:"G.8",children:(0,a.jsx)(o.C0,{height:"1.25em",name:"circledTick",width:"1.25em"})}):null,...m,...u})};var l=n(49316);let i=e=>{let{field:t,form:{touched:n,errors:r},options:l,onChange:i,showTick:s,multiple:c,...d}=e,{onChange:u,value:p,..._}=t,m=n[t.name]&&r[t.name];return(0,a.jsx)(o.l6,{error:!!m,errorText:m,multiple:c,onChange:e=>{u(e),i&&i(e.target.value)},options:l,theme:"dashboard",value:p||"",icon:s?(0,a.jsx)(o.az,{color:"G.8",children:(0,a.jsx)(o.C0,{height:"1.25em",name:"circledTick",width:"1.25em"})}):null,..._,...d})},s=e=>{let{field:t,form:{touched:n,errors:r},helperText:i,onChange:s,showTick:c,icon:d,errorMessage:u,...p}=e,{onChange:_,value:m,...h}=t,y=u||(0,l.O6)(n,t.name)&&(0,l.O6)(r,t.name);return(0,a.jsx)(o.pd,{error:!!y,errorText:y,helperText:i,onChange:e=>{_(e),s&&s(e.target.value)},theme:"dashboard",value:m||"",icon:c?(0,a.jsx)(o.az,{color:"G.8",children:(0,a.jsx)(o.C0,{height:"1.25em",name:"circledTick",width:"1.25em"})}):d,...h,...p})}},57632:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(14232);let o=e=>{let t=(0,a.useRef)();return(0,a.useEffect)(()=>{t.current=e}),t.current}},64918:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(37876);n(14232);var o=n(96344),r=n(34219);function l(e){let{children:t,showBorderBox:n,showPrimaryCta:l,showSecondaryCta:i,contentWidth:s,containerWidth:c,containerStyles:d,contentContainerStyles:u,ctaContainerStyles:p,isPrimaryCtaDisabled:_,onPrimaryCtaCl
1ick:m,primaryCtaText:h,isSecondaryCtaDisabled:y,onSecondaryCtaClick:g,secondaryCtaText:f,secondaryCtaFillType:x,heading:b,tooltip:C}=e,v=l||i,j="text"===x,E=j?"312px":"240px",A=e=>{let{secondaryFillType:t}=e;return(0,a.jsxs)(a.Fragment,{children:[i&&(0,a.jsx)(r.pT,{flex:1,children:(0,a.jsx)(r.$n,{disabled:y,fillType:t,onClick:g,px:1,width:{_:"100%",xl:E},children:f})}),l&&(0,a.jsx)(r.pT,{flex:1,children:(0,a.jsx)(r.$n,{disabled:_,onClick:m,px:1,width:{_:"100%",xl:E},children:h})})]})},S=()=>b&&(0,a.jsxs)(r.pT,{alignItems:"center",justifyContent:"space-between",children:[(0,a.jsx)(r.EY,{capitalize:{_:!1,xl:!0},color:"B.1",variant:{_:"label2",xl:"label1"},children:b}),C]});return(0,a.jsxs)(r.pT,{alignItems:"center",flexDirection:"column",mb:{_:v?"96px":0,xl:0},children:[(0,a.jsxs)(o.A,{renderOn:["desktop"],children:[(0,a.jsx)(r.pT,{justifyContent:"center",p:10,width:c,...n?{bg:"W.2",borderColor:"B.5",borderRadius:2,borderStyle:"solid",borderWidth:"1px"}:{},...d,children:(0,a.jsxs)(r.az,{width:s,...u,children:[S(),t]})}),v&&(0,a.jsx)(r.pT,{flexDirection:j?"column-reverse":"row",gap:j?2:4,my:10,...p,children:A({secondaryFillType:x})})]}),(0,a.jsxs)(o.A,{renderOn:["phone","tablet"],children:[(0,a.jsx)(r.pT,{justifyContent:"center",px:6,py:4,width:"100%",...d,children:(0,a.jsxs)(r.az,{width:"100%",...u,children:[S(),t]})}),v&&(0,a.jsx)(r.pT,{bg:"W.2",borderTopLeftRadius:4,borderTopRightRadius:4,bottom:0,boxShadow:"0px -2px 8px 0px rgba(0, 0, 0, 0.07)",gap:2,left:0,pb:8,position:"fixed",pt:4,px:6,right:0,...p,children:A({secondaryFillType:"outlined"})})]})]})}l.defaultProps={containerWidth:"850px",contentWidth:"672px",showBorderBox:!0,showPrimaryCta:!0,isPrimaryCtaDisabled:!1,primaryCtaText:"Next",secondaryCtaFillType:"text"}},69258:(e,t,n)=>{"use strict";n.d(t,{A:()=>_});var a=n(37876),o=n(14232),r=n(82167),l=n(21651),i=n(34219),s=n(66901);let c=(0,r.Ay)(i.az).withConfig({componentId:"sc-2dfec0ad-0"})(["overflow-y:scroll;overflow-x:hidden;border-radius:","px;::-webkit-scrollbar{width:4px;}::-webkit-scrollbar-thumb{background:",";border-radius:","px;}"],(0,l.y)("radii.2"),(0,l.y)("colors.B.4"),(0,l.y)("radii.2")),d=r.Ay.input.withConfig({componentId:"sc-2dfec0ad-1"})(["width:100%;height:34px;border:1px solid ",";border-radius:","px;padding:0 ","px;font-family:",";line-height:",";font-size:",";@media (min-width:","){font-size:",";}"],(0,l.y)("colors.B.6"),(0,l.y)("radii.2"),(0,l.y)("space.8"),(0,l.y)("fonts.ProximaNovaRegular"),(0,l.y)("lineHeights.xspacious"),(0,l.y)("fontSizes.5"),(0,l.y)("breakpoints.md"),(0,l.y)("fontSizes.3")),u=(0,r.Ay)(i.az).withConfig({componentId:"sc-2dfec0ad-2"})([":hover{background-color:",";}",""],(0,l.y)("colors.W.1"),e=>e.selected&&"background-color: ".concat((0,l.y)("colors.W.1")(e),";")),p=e=>{let{label:t,value:n,fillType:r,theme:l,onChange:p,options:_,renderValue:m,dropdownMaxHeight:h,dropDownWidth:y,disabled:g,...f}=e,x=[..._].filter(Boolean),[b,C]=(0,o.useState)(!1),[v,j]=(0,o.useState)(x),[E,A]=(0,o.useState)(-1),S=()=>{g||C(!b)},I=()=>{C(!1),j(x),A(-1)},T=e=>()=>{p(e),I()},k=(e,t)=>{("Enter"===e.key||" "===e.key)&&(T(t)(),e.stopPropagation())};return(0,a.jsx)(i.az,{position:"relative",children:(0,a.jsxs)(i.ig,{onEscapePress:I,onOutsideClick:I,children:[(0,a.jsx)(i.az,{onClick:S,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&S()},children:(0,a.jsx)(i.l6,{disabled:g,fillType:r,label:t,renderValue:m,theme:l,value:n,...f,readOnly:!0,onKeyDown:e=>{"Enter"===e.key&&S()}})}),b?(0,a.jsxs)(c,{bg:"W.2",border:"1px solid",borderColor:"B.6",borderRadius:2,maxHeight:h,position:"absolute",width:y||"180px",zIndex:"2",children:[(0,a.jsxs)(i.az,{p:2,position:"relative",children:[(0,a.jsx)(d,{onChange:e=>{j(x&&x.filter(t=>(t.searchText&&t.searchText.toLowerCase()||t.label&&t.label.toLowerCase()||"").includes(e.target.value.toLowerCase())))},placeholder:"Search"}),(0,a.jsx)(i.az,{left:4,position:"absolute",top:4,children:(0,a.jsx)(i._V,{alt:"search",height:"12px",src:s.A,width:"12px"})})]}),(0,a.jsx)(i.az,{onKeyDown:e=>{switch(e.key){case"ArrowDown":{let e=E<v.length-1?E+1:E;A(e);let t=document.getElementById(v[e].value);t&&t.focus();break}case"ArrowUp":{let e=E>0?E-1:0;A(e);let t=document.getElementById(v[e].value);t&&t.focus();break}case"Escape":I()}e.stopPropagation()},children:v?v.map((e,t)=>(0,a.jsx)(u,{cp:!0,id:e.value,onClick:T(e.value),onKeyDown:t=>k(t,e.value),px:2,py:4,role:"button",selected:e.value===n,tabIndex:0,children:(0,a.jsx)(i.EY,{c
1olor:e.value===n?"B.1":"B.7",variant:"caption1",children:e.label})},"".concat(e.value,"-").concat(t))):null})]}):null]})})};p.defaultProps={theme:"dashboard",dropdownMaxHeight:"310px"};let _=p},69777:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(37876);n(14232);var o=n(1414),r=n(142),l=n(34219),i=n(69924);let s={src:"/_next/static/media/personal-tech-award.4284fa58.svg",height:116,width:120,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/personal-tech-award-white.0a58c6ee.svg",height:87,width:87,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/asia-fintech-award.07879c1e.svg",height:120,width:120,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/asia-fintech-award-white.43eae2d0.svg",height:87,width:87,blurWidth:0,blurHeight:0},p={src:"/_next/static/media/abf-award.778f35f0.svg",height:106,width:107,blurWidth:0,blurHeight:0},_={src:"/_next/static/media/abf-award-white.239a414e.svg",height:87,width:87,blurWidth:0,blurHeight:0},m={white:{asiaFinTechAward:{[r.YZ.enSG]:d,[r.YZ.enHK]:d,[r.YZ.zhHK]:{src:"/_next/static/media/asia-fintech-award-zh.ae36af67.svg",height:106,width:106,blurWidth:0,blurHeight:0}},personalTechAward:{[r.YZ.enSG]:s,[r.YZ.enHK]:s,[r.YZ.zhHK]:{src:"/_next/static/media/personal-tech-award-zh.4ed1928a.svg",height:106,width:106,blurWidth:0,blurHeight:0}},abfAward:{[r.YZ.enSG]:p,[r.YZ.enHK]:p,[r.YZ.zhHK]:{src:"/_next/static/media/abf-award-zh.5b341353.svg",height:106,width:106,blurWidth:0,blurHeight:0}}},blue:{asiaFinTechAward:{[r.YZ.enSG]:u,[r.YZ.enHK]:u,[r.YZ.zhHK]:{src:"/_next/static/media/asia-fintech-award-zh-blue.92c8f0bf.svg",height:88,width:88,blurWidth:0,blurHeight:0}},personalTechAward:{[r.YZ.enSG]:c,[r.YZ.enHK]:c,[r.YZ.zhHK]:{src:"/_next/static/media/personal-tech-award-zh-blue.da69521d.svg",height:88,width:88,blurWidth:0,blurHeight:0}},abfAward:{[r.YZ.enSG]:_,[r.YZ.enHK]:_,[r.YZ.zhHK]:{src:"/_next/static/media/abf-award-zh-blue.f423ded1.svg",height:88,width:88,blurWidth:0,blurHeight:0}}}};function h(e){let{containerProps:t,imageHeight:n="",theme:r="white"}=e,s=m[r];return(0,a.jsxs)(l.pT,{alignItems:"center",gap:4,...t,children:[(0,a.jsx)(l.pT,{as:l.A,href:o.FkT,rel:"noopener noreferrer",target:"_blank",children:(0,a.jsx)(i.A,{alt:"Asia FinTech Award",height:n,imageSourceMap:s.asiaFinTechAward,width:"auto"})}),(0,a.jsx)(l.pT,{as:l.A,href:o.FkT,rel:"noopener noreferrer",target:"_blank",children:(0,a.jsx)(i.A,{alt:"Personal Tech Award",height:n,imageSourceMap:s.personalTechAward,width:"auto"})}),(0,a.jsx)(l.pT,{as:l.A,href:o.U8g,rel:"noopener noreferrer",target:"_blank",children:(0,a.jsx)(i.A,{alt:"ABF Award",height:n,imageSourceMap:s.abfAward,width:"auto"})})]})}},72459:e=>{e.exports={"country__flag--preview":"CountryFlag_country__flag--preview__FBUjD","country__flag--ac":"CountryFlag_country__flag--ac__0pMIp","country__flag--ad":"CountryFlag_country__flag--ad__4_7g4","country__flag--ae":"CountryFlag_country__flag--ae__NlWbE","country__flag--af":"CountryFlag_country__flag--af___t_1g","country__flag--ag":"CountryFlag_country__flag--ag__CYjhP","country__flag--ai":"CountryFlag_country__flag--ai__qAFyw","country__flag--al":"CountryFlag_country__flag--al__AJ5fl","country__flag--am":"CountryFlag_country__flag--am__TIEpZ","country__flag--ao":"CountryFlag_country__flag--ao__nNjVl","country__flag--aq":"CountryFlag_country__flag--aq__Uv516","country__flag--ar":"CountryFlag_country__flag--ar__ibKhp","country__flag--as":"CountryFlag_country__flag--as__UC_33","country__flag--at":"CountryFlag_country__flag--at__z8h6x","country__flag--au":"CountryFlag_country__flag--au__tq0kT","country__flag--aw":"CountryFlag_country__flag--aw___aaH4","country__flag--ax":"CountryFlag_country__flag--ax__jsmgx","country__flag--az":"CountryFlag_country__flag--az__O7wwU","country__flag--ba":"CountryFlag_country__flag--ba__9sdCG","country__flag--bb":"CountryFlag_country__flag--bb__pztxa","country__flag--bd":"CountryFlag_country__flag--bd__AmkTr","country__flag--be":"CountryFlag_country__flag--be__wojFJ","country__flag--bf":"CountryFlag_country__flag--bf__qUAkV","country__flag--bg":"CountryFlag_country__flag--bg__H6_hg","country__flag--bh":"CountryFlag_country__flag--bh__TVBlw","country__flag--bi":"CountryFlag_country__flag--bi___yFZz","country__flag--bj":"CountryFlag_country__flag--bj__8E3e2","country__flag--bl":"CountryFlag_country__flag--bl__9yM16","country__flag--bm":"C
1ountryFlag_country__flag--bm__lv15J","country__flag--bn":"CountryFlag_country__flag--bn__KrogF","country__flag--bo":"CountryFlag_country__flag--bo__OfJl4","country__flag--bq":"CountryFlag_country__flag--bq__7_Ya3","country__flag--br":"CountryFlag_country__flag--br__RH5OS","country__flag--bs":"CountryFlag_country__flag--bs___t1jX","country__flag--bt":"CountryFlag_country__flag--bt__bzMlf","country__flag--bv":"CountryFlag_country__flag--bv__PiZNh","country__flag--bw":"CountryFlag_country__flag--bw__tSnWB","country__flag--by":"CountryFlag_country__flag--by__6GPPM","country__flag--bz":"CountryFlag_country__flag--bz__Xvze2","country__flag--ca":"CountryFlag_country__flag--ca__2l81B","country__flag--cc":"CountryFlag_country__flag--cc__NrISu","country__flag--cd":"CountryFlag_country__flag--cd__VU4uh","country__flag--cf":"CountryFlag_country__flag--cf__CTTgA","country__flag--cg":"CountryFlag_country__flag--cg__Fm1GQ","country__flag--ch":"CountryFlag_country__flag--ch__8R6mx","country__flag--ci":"CountryFlag_country__flag--ci__sSKFB","country__flag--ck":"CountryFlag_country__flag--ck__2ctDg","country__flag--cl":"CountryFlag_country__flag--cl__I0xBR","country__flag--cm":"CountryFlag_country__flag--cm__6oskm","country__flag--cn":"CountryFlag_country__flag--cn__m27_e","country__flag--co":"CountryFlag_country__flag--co__2Boj4","country__flag--cp":"CountryFlag_country__flag--cp__EgPa8","country__flag--cr":"CountryFlag_country__flag--cr__Pu_9x","country__flag--cu":"CountryFlag_country__flag--cu__A_Zv6","country__flag--cv":"CountryFlag_country__flag--cv___2Zfm","country__flag--cw":"CountryFlag_country__flag--cw__aACYf","country__flag--cx":"CountryFlag_country__flag--cx__yf4Gg","country__flag--cy":"CountryFlag_country__flag--cy__S0LkY","country__flag--cz":"CountryFlag_country__flag--cz__r86HN","country__flag--de":"CountryFlag_country__flag--de__1xT8f","country__flag--dg":"CountryFlag_country__flag--dg__xFzTV","country__flag--dj":"CountryFlag_country__flag--dj__5RieT","country__flag--dk":"CountryFlag_country__flag--dk__79v48","country__flag--dm":"CountryFlag_country__flag--dm__yZ6G6","country__flag--do":"CountryFlag_country__flag--do__VkOhu","country__flag--dz":"CountryFlag_country__flag--dz__PFQHL","country__flag--ea":"CountryFlag_country__flag--ea__ZK20z","country__flag--ec":"CountryFlag_country__flag--ec__0cRgN","country__flag--ee":"CountryFlag_country__flag--ee__gkzrO","country__flag--eg":"CountryFlag_country__flag--eg__Dk_TL","country__flag--eh":"CountryFlag_country__flag--eh__wqKu0","country__flag--er":"CountryFlag_country__flag--er__PJc79","country__flag--es":"CountryFlag_country__flag--es__JDFDu","country__flag--et":"CountryFlag_country__flag--et__c7XWA","country__flag--eu":"CountryFlag_country__flag--eu__vkQWY","country__flag--fi":"CountryFlag_country__flag--fi__YWbF3","country__flag--fj":"CountryFlag_country__flag--fj__OR6qi","country__flag--fk":"CountryFlag_country__flag--fk__3qPlt","country__flag--fm":"CountryFlag_country__flag--fm__3i_aI","country__flag--fo":"CountryFlag_country__flag--fo__vrddf","country__flag--fr":"CountryFlag_country__flag--fr__FYQqL","country__flag--ga":"CountryFlag_country__flag--ga__v4O7p","country__flag--gb":"CountryFlag_country__flag--gb__Y6ZUU","country__flag--gd":"CountryFlag_country__flag--gd__PWn66","country__flag--ge":"CountryFlag_country__flag--ge__3N1zX","country__flag--gf":"CountryFlag_country__flag--gf___J_P0","country__flag--gg":"CountryFlag_country__flag--gg__AXW5g","country__flag--gh":"CountryFlag_country__flag--gh__SBNhG","country__flag--gi":"CountryFlag_country__flag--gi__mO5cV","country__flag--gl":"CountryFlag_country__flag--gl__e9ZxW","country__flag--gm":"CountryFlag_country__flag--gm__fx_eb","country__flag--gn":"CountryFlag_country__flag--gn__dWEb6","country__flag--gp":"CountryFlag_country__flag--gp__x3HsE","country__flag--gq":"CountryFlag_country__flag--gq__hjTkl","country__flag--gr":"CountryFlag_country__flag--gr__A8BwJ","country__flag--gs":"CountryFlag_country__flag--gs__CNLrm","country__flag--gt":"CountryFlag_country__flag--gt__efik7","country__flag--gu":"CountryFlag_country__flag--gu__npDY6","country__flag--gw":"CountryFlag_country__flag--gw__VhGfR","country__flag--gy":"CountryFlag_country__flag--gy__8mDBj","country__flag--hk":"CountryFlag_country__flag--hk__zUvB_","country__flag--hm":"CountryFlag_country__flag--hm__wnoUn","country__flag--hn":"CountryFlag_country__flag--hn__TGUYb","country__flag--hr":"C
1ountryFlag_country__flag--hr__Asppd","country__flag--ht":"CountryFlag_country__flag--ht__1Mke_","country__flag--hu":"CountryFlag_country__flag--hu__TnCl1","country__flag--ic":"CountryFlag_country__flag--ic__32K1G","country__flag--id":"CountryFlag_country__flag--id__7Qp8A","country__flag--ie":"CountryFlag_country__flag--ie__o7Tpf","country__flag--il":"CountryFlag_country__flag--il__vVrpg","country__flag--im":"CountryFlag_country__flag--im__CH2vA","country__flag--in":"CountryFlag_country__flag--in__SYyhd","country__flag--io":"CountryFlag_country__flag--io__uegn7","country__flag--iq":"CountryFlag_country__flag--iq__2NmSS","country__flag--ir":"CountryFlag_country__flag--ir__vAkpC","country__flag--is":"CountryFlag_country__flag--is__DgZjr","country__flag--it":"CountryFlag_country__flag--it__2q6u2","country__flag--je":"CountryFlag_country__flag--je__NQiAQ","country__flag--jm":"CountryFlag_country__flag--jm__1kSBp","country__flag--jo":"CountryFlag_country__flag--jo__CK8G5","country__flag--jp":"CountryFlag_country__flag--jp__a9K6k","country__flag--ke":"CountryFlag_country__flag--ke__FXve_","country__flag--kg":"CountryFlag_country__flag--kg__qEgZv","country__flag--kh":"CountryFlag_country__flag--kh__sgibP","country__flag--ki":"CountryFlag_country__flag--ki__o8C0b","country__flag--km":"CountryFlag_country__flag--km__plTUg","country__flag--kn":"CountryFlag_country__flag--kn__pUPmK","country__flag--kp":"CountryFlag_country__flag--kp__hy5OK","country__flag--kr":"CountryFlag_country__flag--kr__SS_5a","country__flag--kw":"CountryFlag_country__flag--kw__SVLJS","country__flag--ky":"CountryFlag_country__flag--ky__d_h3J","country__flag--kz":"CountryFlag_country__flag--kz__Pi
1oJH","country__flag--la":"CountryFlag_country__flag--la__QjvZe","country__flag--lb":"CountryFlag_country__flag--lb__1YKul","country__flag--lc":"CountryFlag_country__flag--lc__X6hn_","country__flag--li":"CountryFlag_country__flag--li__lg4OQ","country__flag--lk":"CountryFlag_country__flag--lk__ntPr9","country__flag--lr":"CountryFlag_country__flag--lr__hWMpw","country__flag--ls":"CountryFlag_country__flag--ls__LuVoC","country__flag--lt":"CountryFlag_country__flag--lt__t3op4","country__flag--lu":"CountryFlag_country__flag--lu__dcC8J","country__flag--lv":"CountryFlag_country__flag--lv__pdQCD","country__flag--ly":"CountryFlag_country__flag--ly__UZUus","country__flag--ma":"CountryFlag_country__flag--ma__I3ZiG","country__flag--mc":"CountryFlag_country__flag--mc__sOo8W","country__flag--md":"CountryFlag_country__flag--md__QKYoU","country__flag--me":"CountryFlag_country__flag--me__9WpW5","country__flag--mf":"CountryFlag_country__flag--mf__mmqUs","country__flag--mg":"CountryFlag_country__flag--mg__ywXSt","country__flag--mh":"CountryFlag_country__flag--mh__rF0xH","country__flag--mk":"CountryFlag_country__flag--mk__ldLru","country__flag--ml":"CountryFlag_country__flag--ml__ThoIb","country__flag--mm":"CountryFlag_country__flag--mm__Q0i6J","country__flag--mn":"CountryFlag_country__flag--mn__m7Rlx","country__flag--mo":"CountryFlag_country__flag--mo__sYwdO","country__flag--mp":"CountryFlag_country__flag--mp__mGhUI","country__flag--mq":"CountryFlag_country__flag--mq__tfLni","country__flag--mr":"CountryFlag_country__flag--mr__eCP0y","country__flag--ms":"CountryFlag_country__flag--ms__f1T_W","country__flag--mt":"CountryFlag_country__flag--mt__Di6aF","country__flag--mu":"CountryFlag_country__flag--mu__8ycfj","country__flag--mv":"CountryFlag_country__flag--mv__YihV5","country__flag--mw":"CountryFlag_country__flag--mw__cyORk","country__flag--mx":"CountryFlag_country__flag--mx__d_xil","country__flag--my":"CountryFlag_country__flag--my__wyF9I","country__flag--mz":"CountryFlag_country__flag--mz__mkInn","country__flag--na":"CountryFlag_country__flag--na__GQyfF","country__flag--nc":"CountryFlag_country__flag--nc__YINlA","country__flag--ne":"CountryFlag_country__flag--ne__zik9b","country__flag--nf":"CountryFlag_country__flag--nf___S3eR","country__flag--ng":"CountryFlag_country__flag--ng__QsqM7","country__flag--ni":"CountryFlag_country__flag--ni__7pGS1","country__flag--nl":"CountryFlag_country__flag--nl__iOPpW","country__flag--no":"CountryFlag_country__flag--no__YH6cM","country__flag--np":"CountryFlag_country__flag--np__f8VFq","country__flag--nr":"CountryFlag_country__flag--nr___0HHf","country__flag--nu":"CountryFlag_country__flag--nu__qZ7FO","country__flag--nz":"CountryFlag_country__flag--nz__b4Q6l","country__flag--om":"CountryFlag_country__flag--om__PkE4Y","country__flag--pa":"CountryFlag_country__flag--pa__11M18","country__flag--pe":"CountryFlag_country__flag--pe__EFKWh","country__flag--pf":"CountryFlag_country__flag--pf__ey_Ct","country__flag--pg":"CountryFlag_country__flag--pg__9yv5S","country__flag--ph":"CountryFlag_country__flag--ph__CHKyW","country__flag--pk":"CountryFlag_country__flag--pk__NTxPr","country__flag--pl":"CountryFlag_country__flag--pl__MiRAN","country__flag--pm":"CountryFlag_country__flag--pm__3wO66","country__flag--pn":"CountryFlag_country__flag--pn__GdZiv","country__flag--pr":"CountryFlag_country__flag--pr__Oidwr","country__flag--ps":"CountryFlag_country__flag--ps__lUlqb","country__flag--pt":"CountryFlag_country__flag--pt__dgQgu","country__flag--pw":"CountryFlag_country__flag--pw__ltHpj","country__flag--py":"CountryFlag_country__flag--py__dyyih","country__flag--qa":"CountryFlag_country__flag--qa__RNSSx","country__flag--re":"CountryFlag_country__flag--re__iAhb3","country__flag--ro":"CountryFlag_country__flag--ro__gVg_T","country__flag--rs":"CountryFlag_country__flag--rs__gMvzt","country__flag--ru":"CountryFlag_country__flag--ru__nkh9F","country__flag--rw":"CountryFlag_country__flag--rw__q2EY4","country__flag--sa":"CountryFlag_country__flag--sa__7hHfV","country__flag--sb":"CountryFlag_country__flag--sb__FwX9m","country__flag--sc":"CountryFlag_country__flag--sc__c2moY","country__flag--sd":"CountryFlag_country__flag--sd__tf6fC","country__flag--se":"CountryFlag_country__flag--se__H6Fb7","country__flag--sg":"CountryFlag_country__flag--sg__0tbCy","country__flag--sh":"CountryFlag_country__flag--sh__HXjaQ","country__flag--si":"CountryFlag_country__flag--si__cpQUD","country__flag--sj":"CountryFlag_country__flag--sj__I1nd2","country__flag--sk":"CountryFlag_country__flag--sk__JQNKb","country__flag--sl":"CountryFlag_country__flag--sl__6N3XA","country__flag--sm":"CountryFlag_country__flag--sm__hnKRC","country__flag--sn":"CountryFlag_country__flag--sn__ug6yV","country__flag--so":"CountryFlag_country__flag--so__tmmsn","country__flag--sr":"CountryFlag_country__flag--sr__OcBw1","country__flag--ss":"CountryFlag_country__flag--ss__kgznc","country__flag--st":"CountryFlag_country__flag--st__sPkS6","country__flag--sv":"CountryFlag_country__flag--sv__dM_jv","country__flag--sx":"CountryFlag_country__flag--sx__Unk92","country__flag--sy":"CountryFlag_country__flag--sy__fwYMB","country__flag--sz":"CountryFlag_country__flag--sz__9dHRO","country__flag--ta":"CountryFlag_country__flag--ta__q5Igg","country__flag--tc":"CountryFlag_country__flag--tc___9Dxq","country__flag--td":"CountryFlag_country__flag--td__ZYlKY","country__flag--tf":"CountryFlag_country__flag--tf__bDYS_","country__flag--tg":"CountryFlag_country__flag--tg__C4p_0","country__flag--th":"CountryFlag_country__flag--th__AcEEr","country__flag--tj":"CountryFlag_country__flag--tj__gp_T_","country__flag--tk":"CountryFlag_country__flag--tk__oCQ8X","country__flag--tl":"CountryFlag_country__flag--tl__nVQWB","country__flag--tm":"CountryFlag_country__flag--tm__7DUE_","country__flag--tn":"CountryFlag_country__flag--tn__JIo__","country__flag--to":"CountryFlag_country__flag--to__6Ghew","country__flag--tr":"CountryFlag_country__flag--tr__U11Un","country__flag--tt":"CountryFlag_country__flag--tt__1FVHx","country__flag--tv":"CountryFlag_country__flag--tv__Lk7qE","country__flag--tw":"CountryFlag_country__flag--tw__OJfNZ","country__flag--tz":"CountryFlag_country__flag--tz__esWhC","country__flag--ua":"CountryFlag_country__flag--ua__jJsf5","country__flag--ug":"CountryFlag_country__flag--ug__zz_qO","country__flag--um":"CountryFlag_country__flag--um__hrTyq","country__flag--us":"CountryFlag_country__flag--us__omIiF","country__flag--uy":"CountryFlag_country__flag--uy__Lnyls","country__flag--uz":"CountryFlag_country__flag--uz__D2tPN","country__flag--va":"CountryFlag_country__flag--va__qsTUv","country__flag--vc":"CountryFlag_country__flag--vc__LyeyQ","country__flag--ve":"CountryFlag_country__flag--ve__mKwpw","country__flag--vg":"CountryFlag_country__flag--vg__qDB4p","country__flag--vi":"CountryFlag_country__flag--vi__ILL3Z","country__flag--vn":"CountryFlag_country__flag--vn__of_oB","country__flag--vu":"CountryFlag_country__flag--vu__YVkbP","country__flag--wf":"CountryFlag_country__flag--wf__AYq1n","country__flag--ws":"CountryFlag_country__flag--ws__azOsK","country__flag--xk":"CountryFlag_country__flag--xk__vak60","country__flag--ye":"CountryFlag_country__flag--ye__1yMls","country__flag--yt":"C
1ountryFlag_country__flag--yt__T3yD4","country__flag--za":"CountryFlag_country__flag--za__joFte","country__flag--zm":"CountryFlag_country__flag--zm__FB4ZK","country__flag--zw":"CountryFlag_country__flag--zw__MBS_b"}},75521:(e,t,n)=>{"use strict";n.d(t,{Db:()=>r,Ss:()=>a,jQ:()=>o});let a=(e,t)=>{let n={};for(let a in e)t.includes(a)||(n[a]=e[a]);return n},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;return e.reduce((e,a)=>{let o=t.findIndex(e=>e===a.value);return e[o>-1?o:n]=a,n+=1,e},[])},r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=n.length;return Object.keys(e).reduce((o,r)=>{if(t.includes(r))return o;let l=n.findIndex(e=>e===r),i=l>-1?l:a,{country:s,localeData:c}=e[r];return o[i]={value:s,label:c.countryName},a+=1,o},[])}},76830:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var a=n(14232),o=n(89099),r=n(46513),l=n(95706),i=n(82424),s=n(47582),c=n(6247),d=n(18334);let u=(e,t)=>{if((0,c.NV)(e))return{type:e,url:t?l.OI4:l.U3G};let n=Error("wrong type sent here");(0,d.Cp)(n)},p=(e,t)=>{switch(e){case"GLOBAL":case"GLOBAL_RISK_MANAGED":return{type:"GLOBAL_RISK_MANAGED",url:l.ZSv};case"REITS":case"REIT":case"REIT_PLUS":case"REIT_RISK_MANAGED":return{type:"REIT_PLUS",url:l.Nue};case"EQUITY_100":case"GLOBAL_EQUITY_100":return{type:"GLOBAL_EQUITY_100",url:l.$_A};case"CASH_PLUS":return{type:"CASH_PLUS",url:l.dvb};case"CORE_GROWTH":return{type:"CORE_GROWTH",url:l.r3Q};case"CORE_BALANCED":return{type:"CORE_BALANCED",url:l.r3Q};case"CORE_DEFENSIVE":return{type:"CORE_DEFENSIVE",url:l.r3Q};case"THEME":return{type:"ESG_AND_CLEAN_ENERGY",url:l.OI4};default:return u(e,t)}},_=(e,t)=>{var n;let a=null==(n=s.getJSON(r.kw))?void 0:n.coreType;t?s.putJSON(r.kw,{coreType:a,...e,type:p(t).type}):s.putJSON(r.kw,{coreType:a,...e})};var m=n(54755),h=n(23983),y=n(46514),g=n(78071),f=n(48011),x=n(74222),b=n(71776),C=n(19461);let v=(0,f.Ng)(e=>({loggedIn:C.o_.isLoggedIn(e)}),e=>({navigate:t=>e((0,x.VC)(t)),showDownloadAppModal:()=>e(b.v_.showDownloadAppModal()),preSignup:(t,n)=>e(b.I2.preSignup(t,n))}
1))(e=>{let{loggedIn:t,preSignup:n,navigate:c,showDownloadAppModal:d}=e,u=(0,o.useRouter)(),f=(0,m.vA)(u),{geography:x}=(0,g.Ym)(),{visibilityFlags:{enableDownloadAppModal:b}}=(0,h.Q)(x),C=f.source,v=f.noredirect,j=f.origin,E=f["portfolio-type"],A="wordpress"===j,S=f.firstName,I=f.lastName,T=f.email;return(0,a.useEffect)(()=>{b&&d()},[]),(0,a.useEffect)(()=>{if(A&&S&&I&&T){let e={firstName:S,lastName:I,email:T,source:"wordpress"};n({...e,partner:s.getItem(r.Ze)||null},t=>{E&&"GENERIC"!==E?(_(e,E),c(p(E).url+"/residentialStatus")):_(e)})}},[f]),(0,a.useEffect)(()=>{"true"!==v&&t?u.replace((0,l.lnj)(C)):(0,i.k)(y.A[x].PRE_SIGNUP_CONFIG.introUrl(C),u,{geography:x,replace:!0})},[]),null})},78578:(e,t,n)=>{"use strict";n.d(t,{X:()=>a,g:()=>o});let a={VERY_HIGH:{key:"VERY_HIGH",analyticsKey:"VERY_HIGH",riskRatings:[5]},HIGH:{key:"HIGH",analyticsKey:"HIGH",riskRatings:[4]},MODERATE:{key:"BALANCED",analyticsKey:"MODERATE",riskRatings:[3,2]},LOW:{key:"LOW",analyticsKey:"LOW",riskRatings:[1,.5]},NO_RISK:{key:"NO_RISK",analyticsKey:"NO_RISK"}},o=e=>{let{low:t,moderate:n,high:o,veryHigh:r,noRisk:l}=e;return[{heading:r.caption,description:r.description_text,tooltip_text:r.tooltip_text,drawdown_text:r.drawdown_text,riskRating:a.VERY_HIGH.riskRatings,
1key:a.VERY_HIGH.key,analyticsKey:a.VERY_HIGH.analyticsKey},{heading:o.caption,description:o.description_text,tooltip_text:o.tooltip_text,drawdown_text:o.drawdown_text,riskRating:a.HIGH.riskRatings,key:a.HIGH.key,analyticsKey:a.HIGH.analyticsKey},{heading:n.caption,description:n.description_text,tooltip_text:n.tooltip_text,drawdown_text:n.drawdown_text,riskRating:a.MODERATE.riskRatings,key:a.MODERATE.key,analyticsKey:a.MODERATE.analyticsKey},{heading:t.caption,description:t.description_text,tooltip_text:t.tooltip_text,drawdown_text:t.drawdown_text,riskRating:a.LOW.riskRatings,key:a.LOW.key,analyticsKey:a.LOW.analyticsKey},{heading:l.caption,description:l.description_text,tooltip_text:l.tooltip_text,drawdown_text:l.drawdown_text,key:a.NO_RISK.key,analyticsKey:a.NO_RISK.analyticsKey}]}},78916:(e,t,n)=>{"use strict";n.d(t,{M:()=>u});var a=n(76757),o=n(68982),r=n(95706),l=n(81527),i=n(6247),s=n(142);let c=(0,l.A)(),d=o.h[c],u=(e,t)=>{let n=r.Hxz,o=a.parse(window.location.search);if(e){let t=e;Object.keys(r.BW_).includes(e)&&(t=(0,i.Dg)(e)?s.jv.PROTECTED_USD:d.CUSTOM_PORTFOLIO_TYPE,o.isThemePortfolio=String(!0),o.theme=e),o.type=t}return t&&(o.choosePortfolioVersion=t),"".concat(n,"?").concat(a.stringify(o))}},85925:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(37876);n(14232);var o=n(82167),r=n(34219);let l=(0,o.Ay)(r._V).withConfig({componentId:"sc-746e1fed-0"})(["max-width:none;"]),i={left:{justifyContent:"flex-start",flexDirection:"row",leftMargin:0,rightMargin:6},right:{justifyContent:"space-between",flexDirection:"row-reverse",rightMargin:0,leftMargin:6}},s=e=>{let{iconPosition:t,data:{icon:n,alt:o,description:s,onClick:c}}=e;return(0,a.jsxs)(r.pT,{cp:!0,alignItems:"baseline","data-testid":"option-card",flexDirection:i[t].flexDirection,justifyContent:i[t].justifyContent,onClick:c,children:[(0,a.jsx)(r.az,{ml:i[t].leftMargin,mr:i[t].rightMargin,children:(0,a.jsx)(l,{alt:o,src:n})}),(0,a.jsx)(r.az,{children:(0,a.jsx)(r.EY,{color:"B.1",variant:"body1",children:s})})]})}},86260:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,o:()=>l});var a=n(14232),o=n(89099);let r=function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=(0,o.useRouter)();return(0,a.useEffect)(()=>{let a=a=>{var o;let l=(null==(o=a.state)?void 0:o.url)||window.location.pathname;(t?t(l):l===e)&&n&&r.replace(r.asPath)};return window.addEventListener("popstate",a),()=>{window.removeEventListener("popstate",a)}},[e,r,n,t]),null},l=()=>{let e=(0,o.useRouter)();return(0,a.useEffect)(()=>{window.addEventListener("popstate",function(){e.replace(e.asPath)})},[e]),null}},87449:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(37876);n(14232);var o=n(98236),r=n(34219);let l=e=>{let{text:t,img:n,alt:o,width:l}=e;return(0,a.jsxs)(r.pT,{alignItems:"flex-end",bg:"B.6",borderColor:"B.4",borderRadius:2,borderStyle:"solid",borderWidth:"1px",justifyContent:"center",mx:"auto",p:2,width:l||{_:"100%",md:"388px"},children:[(0,a.jsx)(r.EY,{color:"B.1",variant:"caption2",children:t}),(0,a.jsx)(r._V,{alt:o,height:"12px",ml:1,src:n,width:"69px"})]})};l.defaultProps={text:"All information is fetched from",img:o.A,alt:"singpass"};let i=l},87833:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var a=n(6247);let o=(e,t,n)=>{let{type:o,isThemePortfolio:r,theme:l}=a.O3(e),i=r?"true":"false",s="".concat(t,"?type=").concat(o,"&status=").concat(n);return r&&(s=l?"".concat(t,"?type=").concat(o,"&isThemePortfolio=").concat(i,"&theme=").concat(l,"&status=").concat(n):"".concat(t,"?type=").concat(o,"&isThemePortfolio=").concat(i,"&status=").concat(n)),s}},90327:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(37876);n(14232);var o=n(78071),r=n(31676),l=n(34219),i=n(33510);let s={src:"/_next/static/media/clock-filled.306dea7a.png",height:24,width:24,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAIVBMVEW9v9hMaXG7vte0tLS+wNm9v9nBw9y8vda8vdbHyeTNz+vt7dtnAAAACXRSTlOhAFMCVf3jlL7J4W6CAAAACXBIWXMAABYlAAAWJQFJUiTwAAAANklEQVR4nB3LyRHAMAzDQFCXTfVfcMb54bFAGRApxM4souzDusAm7gLuOS9iu23Xw7YRyvr3Dye4ASDz73QNAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8},c=e=>{let{password:t}=e,{strings:{general:{password_checker:n}}}
1=(0,o.Ym)(),c=[{label:n.length_text,regex:r.nP},{label:n.uppercase_text,regex:r.SC},{label:n.lowercase_text,regex:r.tg},{label:n.number_text,regex:r.Lt},{label:n.special_character_text,regex:r.bA}];return(0,a.jsx)(l.pT,{flexWrap:"wrap",gap:2,children:c.map(e=>{let{label:n,regex:o}=e,r=o.test(t);return(0,a.jsxs)(l.pT,{alignItems:"center",gap:1,children:[(0,a.jsx)(l._V,{alt:"Validation icon",height:"12px",src:r?i.A:s,width:"12px"}),(0,a.jsx)(l.EY,{color:r?"GR.2":"B.3",variant:"caption1",children:n})]},n)})})}},90332:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(37876);n(14232);var o=n(34219);function r(e){let{icon:t,width:n,height:r}=e;return(0,a.jsx)(o.pT,{alignItems:"center",bg:"B.5",borderRadius:"100%",height:r,justifyContent:"center",width:n,children:(0,a.jsx)(o.az,{height:"65%",position:"relative",width:"65%",children:(0,a.jsx)(o._V,{alt:"portfolio-icon",layout:"fill",src:t})})})}r.defaultProps={width:"45px",height:"45px"}},91036:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(37876);n(14232);var o=n(82780),r=n.n(o),l=n(82167),i=n(21651),s=n(34219);let c=(0,l.Ay)(s.az).withConfig({componentId:"sc-26ac6e98-0"})(["border-bottom:",";@media (min-width:","){&:last-child{padding-bottom:0;border-bottom:none;}}"],e=>e.showDivider&&"1px solid ".concat((0,i.y)("colors.B.6")(e),";"),(0,i.y)("breakpoints.md")),d=e=>{let{children:t,showDivider:n}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(s.az,{children:t.map((e,t)=>{let o=r()(e,"props.column");return(0,a.jsx)(c,{mx:-6,pb:n&&2,pt:o?2:6,px:6,showDivider:n,children:e},t)})})})};d.defaultProps={showDivider:!0};let u=d},92760:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(14232),o=n(89099),r=n(54755),l=n(90616);let i=(e,t)=>null===e.visibleOn||e.visibleOn.includes(t),s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"type",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ONBOARDING",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=(0,o.useRouter)(),c=(0,r.vA)(s)[e],d=(0,l.A)(t);return a.useMemo(()=>{let e,t=n?i:()=>!0;return d.data.filter(t).forEach(n=>n.portfolios.filter(t).forEach(t=>{var n;null==t||null==(n=t.config)||n.forEach(n=>{let{type:a,theme:o}=n;if(a===c||o===c){e=t;return}})})),e},[d,c,n])}},94653:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});let a=e=>e?Object.keys(e).map(t=>({label:t,options:e[t].map(e=>({label:e,value:e}))})):null},94763:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(37876);n(14232);var o=n(82167),r=n(21651),l=n(78071),i=n(142),s=n(34219);let c=(0,o.Ay)(e=>(0,a.jsx)(s.A,{...e})).withConfig({componentId:"sc-150965c0-0"})(["color:",";&:hover{color:",";}"],(0,r.y)("colors.B.7"),(0,r.y)("colors.B.7")),d=e=>{let{message:t,onClose:n}=e,{strings:{general:{okay_cta:o}}}=(0,l.Ym)();return t?(0,a.jsxs)(s.aF,{showCloseIcon:!1,children:[(0,a.jsx)(s.az,{mb:6,children:(0,a.jsx)(s.EY,{color:"B.1",variant:"subtitle3",children:(0,a.jsx)(l.In,{str:t,components:{br:(0,a.jsx)("br",{}),highlight:(0,a.jsx)(s.EY,{color:"B.7",variant:"subtitle3"}),email:(0,a.jsx)(c,{href:"mailto:".concat(i.LM)})}})})}),(0,a.jsx)(s.$n,{onClick:n,width:"100%",children:o})]}):null}},98236:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});let a={src:"/_next/static/media/myinfo.1089e34a.png",height:56,width:323,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAABCAMAAADU3h9xAAAAElBMVEXsGTrsGDmMDiLLFjH4Gj7qGTh8JntXAAAABnRSTlNteWlnf5R6fc7jAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEUlEQVR4nGNgZmJhZWRgZAAAAGYAEXXqAXIAAAAASUVORK5CYII=",blurWidth:8,blurHeight:1}},99345:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(14232);let o=e=>{let[t,n]=a.useState(e);return[t,()=>n(e=>!e)]}}}]);
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.