1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52817],{27657:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var n=s(37876),l=s(92400),a=s(46929),i=s(77328),r=s.n(i),o=s(54587),d=s.n(o),c=s(14232),m=s(89099),u=s(91452),x=s(65488),v=s(53403),g=s(29528),h=s(81603),w=s(28812),f=s(26185);function b(){var e,t,s,i,o,b,y,p,I;let j=(0,m.useRouter)(),{customerId:N,customerInfo:k,customerInfoLoading:C}=(0,u.n)(),{state:S,setInvestmentStyle:P,setRiskProfileAnswers:E,setGoalId:D,setInvestmentId:F,markGoalDataSaved:L}=(0,x.cm)(),[B,T]=(0,c.useState)(null),[q,A]=(0,c.useState)("manual"),[_,M]=(0,c.useState)(!1),[G,W]=(0,c.useState)(""),[R,z]=(0,c.useState)(!1),[Q,O]=(0,c.useState)(!1),[V,Y]=(0,c.useState)(!1),[U,J]=(0,c.useState)([]),[X,H]=(0,c.useState)(0),[$,K]=(0,c.useState)([]),[Z,ee]=(0,c.useState)(!1),[et,es]=(0,c.useState)(!1),[en,el]=(0,c.useState)(null),[ea,ei]=(0,c.useState)([]),[er,eo]=(0,c.useState)(!0),[ed,ec]=(0,c.useState)("I'm not sure, help me"),[em,eu]=(0,c.useState)(null),[ex,ev]=(0,c.useState)(!0),[eg,eh]=(0,c.useState)(!0),ew=S.goalName||"";(0,c.useEffect)(()=>{(0,h.TA)("goal_investment_style",{feature_category:"goals"})},[]),(0,c.useEffect)(()=>{if(S.investmentStyle&&!B&&ea.length>0){let e=ea.find(e=>{var t;return e.answerTitle.toLowerCase()===(null==(t=S.investmentStyle)?void 0:t.toLowerCase())});e&&(T(e.answerId),A("restored"))}},[S.investmentStyle,ea,B]),(0,c.useEffect)(()=>{(async()=>{if(!N)return;let e=()=>{eo(!1),W("Failed to load investment styles. Please refresh the page.")};ev(!0);try{let t=(await v.Pb.getGoalQuestionnaires(N)).find(e=>1===e.id);if(t&&t.answers){let s=t.answers.filter(e=>6!==e.id).map(e=>({answerId:e.id,answer:e.answer,answerTitle:e.answerTitle||e.answer,answerDescription:e.answerDescription||"",icon:({1:"/icons/investment-styles/conservative.png",2:"/icons/investment-styles/cautious.png",3:"/icons/investment-styles/balanced.png",4:"/icons/investment-styles/growth.png",5:"/icons/investment-styles/aggressive.png",7:"/icons/investment-styles/ultra-low.png"})[e.id]||"/icons/investment-styles/balanced.png"}));s.length>0?ei(s):e();let n=t.answers.find(e=>6===e.id);n?(eo(!0),ec(n.answerDescription||n.answer||"I'm not sure, help me")):eo(!1)}else e()}catch(t){console.error("â [Investment Style] Failed to fetch styles from backend:",t),e()}finally{ev(!1)}})()},[N]),(0,c.useEffect)(()=>{var e;if(!N||ex)return;if(0===ea.length||null!==B||(null==(e=S.selectedProduct)?void 0:e.riskLevel)||!S.goalId)return void eh(!1);let t=!1;return(async()=>{try{let e=await v.MV.getOnboardingProgress(N);if(t)return;if(!(null==e?void 0:e.isRiskProfileCompleted))return void eh(!1);let s=await v.by.getCurrentStyle(N);if(t)return;let n=null==s?void 0:s.investmentStyle;if(!n)return void eh(!1);let l=ea.find(e=>e.answer.toLowerCase()===n.toLowerCase());if(!l)return void eh(!1);if(await v.Pb.postGoalQuestionnaires(N,{questionId:1,answerId:l.answerId,goalId:S.goalId}),t)return;P(l.answerTitle,l.answerId),j.push(ek())}catch(e){console.error("[InvestmentStyle] auto-skip failed; showing question:",e),t||eh(!1)}})(),()=>{t=!0}},[N,ex,ea,S.goalId]),(0,c.useEffect)(()=>{V&&0===U.length&&N&&ef()},[V,N]);let ef=async()=>{if(N){ee(!0);try{let e=await v.MV.getRiskProfileAssessment(N);eu(e);let t=e.sections.flatMap(e=>e.questions.map(t=>({id:t.id,question:t.question,sectionId:e.id,answers:t.choices.map(e=>({id:e.id,answer:e.answer,score:0}))})));t.length>0?J(t):(console.error("â [Investment Style] No questions returned from backend"),W("No risk assessment questions available. Please try again later."),Y(!1))}catch(e){console.error("â [Investment Style] Failed to load questions from backend:",e),W("Failed to load risk assessment questions. Please try again."),Y(!1),eu(null)}finally{ee(!1)}}},eb=async e=>{let t={questionId:U[X].id,answerId:e.id,answerText:e.answer,score:e.score||3},s=[...$];if(s[X]=t,K(s),X<U.length-1)setTimeout(()=>{H(X+1)},300);else if(em&&N)try{let e=new Map;s.forEach((t,s)=>{let n=U[s].sectionId||1;e.has(n)||e.set(n,[]),e.get(n).push({questionId:t.questionId,choiceId:t.answerId})});let t=Array.from(e.entries()).map(e=>{let[t,s]=e;return{sectionId:t,questionAnswers:s}}),n=(await v.MV.submitRiskProfileInvestmentStyle(N,{assessmentId:em.id,sections:t})).riskClass;el(n),es(!0);let l=ea.find(e=>e.answerId===n);(0,h.aW)(n,S.goalId||void 0,null==l?void 0:l.answer),w.tW.trackInvestmentStyleQuizCompleted({answerId:n,answerName:null==l?void 0:l.answer,goalId:S.goalId||void 0,email:null==k?void 0:k.email,customerId:N||void 0})}catch(e){console.error("â [Investment Style] Failed to submit risk assessment:",e),W("Failed to determine investment style. Please try again."),Y(!1)}else console.error("â [Investment Style] Missing risk assessment or customerId"),W("Unable to process risk assessment. Please try again."),Y(!1)},ey=()=>{Y(!1),H(0),K([]),es(!1),el(null),J([])},ep=(0,f.QS)((0,f.sJ)(j.query.returnTo)),eI=(null==(e=(0,f.sJ)(j.query.productId))?void 0:e.trim())||null,ej=!!(ep&&eI&&!S.goalId),eN=!!(S.selectedProduct&&S.goalCategory&&!S.goalId)||ej,ek=()=>ep||(eN?"/app/goals/create/legal-compliance":S.isNoGoal?"/app/goals/create/recommendations":"/app/goals/create/setup"),eC=async()=>{var e,t,s,n;let l=(await v.Pb.createGoal(N,{name:ew||"No goal",iconUrl:(null==(e=S.goalCategory)?void 0:e.iconPath)||"/icons/goals/invest-2.png",isNoGoal:!0,isShariahCompliant:(null==(t=S.selectedProduct)?void 0:t.isShariahCompliant)||!1})).id;D(l);let a=(null==(s=S.selectedProduct)?void 0:s.id)||eI;if(a)try{let e=await v.Pb.postGoalInvestments(N,{goalId:l,productId:a}
1),t=(null==e?void 0:e.wealthAccountInvestmentId)||(null==e?void 0:e.id);t&&F(t)}catch(e){if((null==(n=e.response)?void 0:n.status)===400);else throw e}return B&&await v.Pb.postGoalQuestionnaires(N,{questionId:1,answerId:B,goalId:l}),l},eS=async e=>{try{let t=ea.find(e=>e.answerId===B);await v.Pb.postGoalQuestionnaires(N,{questionId:1,answerId:B,goalId:e}),(0,h.dL)(B,q,e,null==t?void 0:t.answer),w.tW.trackInvestmentStyleSelected({answerId:B,answerName:null==t?void 0:t.answer,source:q,goalId:e,email:null==k?void 0:k.email,customerId:N||void 0}),P((null==t?void 0:t.answerTitle)||"",B),L({goalName:ew,investmentStyle:(null==t?void 0:t.answerTitle)||"",investmentStyleId:B}),j.push(ek())}catch(e){console.error("â [Investment Style] Failed to proceed:",e),W(e.message||"Failed to continue. Please try again.")}finally{M(!1),O(!1)}},eP=async()=>{z(!1),O(!0),M(!0),(0,h.rO)("continue_anyway",S.goalId||void 0),w.tW.trackInvestmentStyleRiskMismatchDecision({choice:"continue_anyway",goalId:S.goalId||void 0,email:null==k?void 0:k.email,customerId:N||void 0});try{let e=S.goalId||(eN?await eC():null);e&&await eS(e)}catch(e){console.error("â [Investment Style] Failed after risk confirmation:",e),W(e.message||"Failed to create goal. Please try again."),M(!1),O(!1)}},eE=async()=>{var e,t,s,n,l,a,i;if(!B||!N){N||W("Session error. Please refresh the page and try again.");return}let r=ea.find(e=>e.answerId===B);if((null==(e=S.selectedProduct)?void 0:e.riskLevel)&&((e,t)=>{if(!t||!e)return!1;let s=parseInt(t);return!isNaN(s)&&e!==s})(B,S.selectedProduct.riskLevel)){z(!0),(0,h.ez)(S.goalId||void 0),w.tW.trackInvestmentStyleRiskMismatchShown({goalId:S.goalId||void 0,email:null==k?void 0:k.email,customerId:N||void 0});return}let o=S.goalId;if(!o&&eN)try{M(!0),W(""),o=await eC()}catch(e){console.error("â [Investment Style] Failed to create goal:",e),W(e.message||"Failed to create goal. Please try again."),M(!1);return}if(!o)return void W("Goal not found. Please go back and select a goal type first.");try{M(!0),W(""),S.investmentStyle,null==r||r.answerTitle,await v.Pb.postGoalQuestionnaires(N,{questionId:1,answerId:B,goalId:o}),(0,h.dL)(B,q,o,null==r?void 0:r.answer),w.tW.trackInvestmentStyleSelected({answerId:B,answerName:null==r?void 0:r.answer,source:q,goalId:o,email:null==k?void 0:k.email,customerId:N||void 0}),P((null==r?void 0:r.answerTitle)||"",B),L({goalName:ew,investmentStyle:(null==r?void 0:r.answerTitle)||"",investmentStyleId:B}),j.push(ek())}catch(e){console.error("â [Investment Style] Failed:",e),console.error("â [Investment Style] Error response:",null==(t=e.response)?void 0:t.data),console.error("â [Investment Style] Error status:",null==(s=e.response)?void 0:s.status),W((null==(l=e.response)||null==(n=l.data)?void 0:n.message)||(null==(i=e.response)||null==(a=i.data)?void 0:a.error)||e.message||"Failed to update investment style. Please try again.")}finally{M(!1)}},eD=U[X];return C||eg?(0,n.jsxs)(a.A,{children:[(0,n.jsx)(r(),{children:(0,n.jsx)("title",{children:"Investment Style | Vault22"})}),(0,n.jsx)(l.A,{children:(0,n.jsx)("div",{className:"flex items-center justify-center min-h-[400px]",children:(0,n.jsx)(g.A,{size:80})})})]}):(0,n.jsxs)(a.A,{children:[(0,n.jsx)(r(),{children:(0,n.jsx)("title",{children:"Investment Style | Vault22"})}),(0,n.jsxs)(l.A,{children:[(0,n.jsxs)("div",{className:"px-4 py-6",children:[(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsxs)("button",{onClick:()=>j.back(),"data-testid":"goal-creation-back-button",className:"inline-flex items-center text-[#15171C] hover:text-gray-700 mb-4 transition-colors","aria-label":"Go back",children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),(0,n.jsx)("span",{className:"text-lg font-semibold",children:"New Investment Goal"})]}),(0,n.jsx)("h1",{"data-testid":"goal-investment-style-heading",className:"text-xl font-medium text-[#15171C] mb-4",children:"What is your investment style?"}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("div",{className:"flex-1 h-1.5 bg-[#01C38D] rounded-full"}),(0,n.jsx)("div",{className:"flex-1 h-1.5 bg-[#E5E7EB] rounded-full"})]})]}),G&&(0,n.jsx)("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg",children:(0,n.jsx)("p",{className:"text-red-800 text-sm",children:G})}),ex?(0,n.jsx)("div",{className:"flex items-center justify-center py-12 mb-8",children:(0,n.jsx)(g.A,{size:80})}):(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4 mb-8",role:"radiogroup","aria-label":"Investment styles",children:ea.map(e=>{let t=B===e.answerId,s={"ultra-low":{bg:"",text:"text-green-800",style:{backgroundColor:"#DAF6CD"}},conservative:{bg:"",text:"text-cyan-800",style:{backgroundColor:"#9ADDE5"}},cautious:{bg:"",text:"text-teal-800",style:{backgroundColor:"#5EEAD4"}}
1,balanced:{bg:"",text:"text-purple-800",style:{backgroundColor:"#A6A0F4"}},growth:{bg:"",text:"text-orange-800",style:{backgroundColor:"#FEB686"}},aggressive:{bg:"",text:"text-red-800",style:{backgroundColor:"#FEA6A7"}}}[e.answer.toLowerCase()]||{bg:"bg-gray-100",text:"text-gray-700"};return(0,n.jsxs)("button",{onClick:()=>{T(e.answerId),A("manual")},disabled:_,"data-testid":"goal-investment-style-".concat(e.answerId),className:"\n rounded-xl\n border\n text-left\n transition-all\n duration-200\n overflow-hidden\n ".concat(_?"opacity-50 cursor-not-allowed":"","\n ").concat(t?"border-[#01C38D] ring-2 ring-[#01C38D]":"border-[#E5E7EB] bg-white hover:border-[#01C38D]/50","\n "),role:"radio","aria-checked":t,children:[(0,n.jsx)("div",{className:"px-3 py-1.5 text-center text-xs font-medium ".concat(s.bg," ").concat(s.text),style:s.style,children:e.answer}),(0,n.jsx)("div",{className:"p-3 sm:p-4 bg-white",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("div",{className:"w-12 h-12 sm:w-14 sm:h-14 relative flex-shrink-0",children:(0,n.jsx)(d(),{src:e.icon,alt:e.answerTitle,width:56,height:56,className:"object-contain w-full h-full"})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("h3",{className:"text-sm sm:text-base font-semibold mb-1 text-[#15171C]",children:e.answerTitle}),(0,n.jsx)("p",{className:"text-xs sm:text-sm leading-relaxed text-[#6B7280]",children:e.answerDescription})]})]})})]},e.answerId)})}),(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row justify-center gap-3 sm:gap-4",children:[(0,n.jsx)("button",{onClick:eE,disabled:!B||_,"data-testid":"goal-investment-style-next-button",className:" w-full sm:w-auto sm:min-w-[200px] lg:min-w-[350px] h-10 bg-[#01C38D] hover:bg-[#00B37F] disabled:bg-gray-300 disabled:cursor-not-allowed text-[#15171C] font-semibold text-sm rounded-lg transition-all duration-300 ",style:{fontFamily:"Barlow, sans-serif"},children:_?"Loading...":"Next"}),er&&(0,n.jsx)("button",{onClick:()=>{Y(!0),(0,h.Y$)(S.goalId||void 0),w.tW.trackInvestmentStyleQuizStarted({goalId:S.goalId||void 0,email:null==k?void 0:k.email,customerId:N||void 0})},disabled:_,"data-testid":"help-me-button",className:" w-full sm:w-auto sm:min-w-[200px] lg:min-w-[350px] h-10 border border-[#E5E7EB] bg-white hover:bg-gray-50 disabled:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50 text-[#6B7280] font-semibold text-sm rounded-lg transition-all duration-200 ",style:{fontFamily:"Barlow, sans-serif"},children:ed})]})]}),V&&(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:ey}),(0,n.jsxs)("div",{className:"relative bg-white rounded-2xl w-full max-w-xl mx-4 overflow-hidden shadow-xl",children:[(0,n.jsx)("div",{className:"flex items-center justify-end p-4",children:(0,n.jsx)("button",{onClick:ey,className:"p-2 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Close",children:(0,n.jsx)("svg",{className:"w-6 h-6 text-[#15171C]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),(0,n.jsx)("div",{className:"px-6 pb-8",children:Z?(0,n.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,n.jsx)(g.A,{size:80})}):et&&en?(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"w-20 h-20 mx-auto mb-6",children:(0,n.jsx)(d(),{src:(null==(t=ea.find(e=>e.answerId===en))?void 0:t.icon)||"/icons/investment-styles/balanced.png",alt:(null==(s=ea.find(e=>e.answerId===en))?void 0:s.answerTitle)||"Investment Style",width:80,height:80,className:"object-contain"})}),(0,n.jsx)("h2",{className:"text-2xl font-bold text-[#15171C] mb-2",children:"Your Investment Style"}),(0,n.jsx)("h3",{className:"text-xl font-semibold text-[#01C38D] mb-4",children:(null==(i=ea.find(e=>e.answerId===en))?void 0:i.answerTitle)||"Unknown"}),(0,n.jsx)("p",{className:"text-[#6B7280] mb-8",children:(null==(o=ea.find(e=>e.answerId===en))?void 0:o.answerDescription)||""}),(0,n.jsxs)("div",{className:"mb-8",children:[(0,n.jsxs)("div",{className:"flex justify-between text-xs text-[#6B7280] mb-2",children:[(0,n.jsx)("span",{children:"Low Risk"}),(0,n.jsx)("span",{children:"High Risk"})]}),(0,n.jsx)("div",{className:"flex gap-1 h-2",children:ea.map(e=>(0,n.jsx)("div",{className:"flex-1 rounded-full transition-all ".concat(e.answerId===en?"bg-[#01C38D] ring-2 ring-[#01C38D] ring-offset-2":"bg-gray-200")},e.answerId))}),(0,n.jsx)("div",{className:"flex justify-between mt-2",children:ea.map(e=>(0,n.jsx)("div",{className:"text-xs ".concat(e.answerId===en?"text-[#01C38D] font-semibold":"text-transparent"),children:e.answerId===en?"â":"â"},e.answerId))})]}),(0,n.jsx)("button",{onClick:()=>{T(en),A("quiz"),Y(!1),H(0),K([]),es(!1),el(null)},"data-testid":"goal-creation-continue-button",className:"w-full h-12 bg-[#01C38D] hover:bg-[#00B37F] text-[#15171C] font-semibold rounded-lg transition-all",children:"Continue"})]}):eD?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-xl font-semibold text-[#15171C] text-center mb-6",children:eD.question}),(0,n.jsx)("div",{className:"flex gap-1 mb-8",children:U.map((e,t)=>(0,n.jsx)("div",{className:"flex-1 h-1.5 rounded-full transition-all duration-300 ".concat(t<=X?"bg-[#01C38D]":"bg-[#E5E7EB]")},t))}),(0,n.jsx)("div",{className:"space-y-3",children:eD.answers.map(e=>{var t;let s=(null==(t=$[X])?void 0:t.answerId)===e.id;return(0,n.jsx)("button",{onClick:()=>eb(e),className:"\n w-full\n p-4\n rounded-xl\n text-left\n transition-all\n duration-200\n ".concat(s?"bg-[#01C38D]/10":"bg-white hover:bg-gray-50","\n "),children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"\n w-5 h-5 rounded-full border-2 flex items-center justify-center\n ".concat(s?"border-[#01C38D]":"border-[#D1D5DB]","\n "),children:s&&(0,n.jsx)("div",{className:"w-2.5 h-2.5 rounded-full bg-[#01C38D]"})}),(0,n.jsx)("span",{className:"text-[#15171C] font-medium",children:e.answer})]})},e.id)})})]}):(0,n.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No questions available"})})]})]}),R&&S.selectedProduct&&(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:()=>!_&&z(!1)}),(0,n.jsxs)("div",{className:"relative bg-white rounded-2xl w-full max-w-md mx-4 overflow-hidden shadow-xl",children:[(0,n.jsx)("div",{className:"flex justify-center pt-8 pb-4",children:(0,n.jsx)("div",{className:"w-16 h-16 bg-amber-100 rounded-full flex items-center justify-center",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-amber-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})})}),(0,n.jsxs)("div",{className:"px-6 pb-8 text-center",children:[(0,n.jsx)("h2",{className:"text-xl font-bold text-[#15171C] mb-3",children:"Risk Level Mismatch"}),(0,n.jsxs)("p",{className:"text-[#6B7280] mb-6",children:["Your selected investment style (",null==(b=ea.find(e=>e.answerId===B))?void 0:b.answerTitle,") has a different risk level than the product you chose."]}),(0,n.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 mb-6",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,n.jsx)("span",{className:"text-sm text-[#6B7280]",children:"Your style:"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-[#15171C]",children:null==(y=ea.find(e=>e.answerId===B))?void 0:y.answerTitle})]}),(null==(p=S.selectedProduct)?void 0:p.riskLevel)&&(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)("span",{className:"text-sm text-[#6B7280]",children:"Product risk:"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-[#15171C]",children:null==(I=ea.find(e=>e.answerId===parseInt(S.selectedProduct.riskLevel)))?void 0:I.answerTitle})]})]}),(0,n.jsx)("p",{className:"text-sm text-[#6B7280] mb-6",children:"You can still proceed, or view products that better match your risk preferences."}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("button",{onClick:async()=>{z(!1),M(!0),(0,h.rO)("see_recommendations",S.goalId||void 0),w.tW.trackInvestmentStyleRiskMismatchDecision({choice:"see_recommendations",goalId:S.goalId||void 0,email:null==k?void 0:k.email,customerId:N||void 0});try{let e=S.goalId||(eN?await eC():null);if(e&&N&&B){await v.Pb.postGoalQuestionnaires(N,{questionId:1,answerId:B,goalId:e});let t=ea.find(e=>e.answerId===B);(0,h.dL)(B,q,e,null==t?void 0:t.answer),w.tW.trackInvestmentStyleSelected({answerId:B,answerName:null==t?void 0:t.answer,source:q,goalId:e,email:null==k?void 0:k.email,customerId:N||void 0}),P((null==t?void 0:t.answerTitle)||"",B),j.push("/app/goals/create/recommendations")}}catch(e){console.error("â [Investment Style] Failed to create goal for recommendations:",e),W(e.message||"Failed to create goal. Please try again.")}finally{M(!1)}}
1,disabled:_,className:"flex-1 h-12 border border-[#E5E7EB] bg-white text-[#15171C] font-semibold rounded-xl hover:bg-gray-50 transition-all disabled:opacity-50",children:_?"Processing...":"See Recommendations"}),(0,n.jsx)("button",{onClick:eP,disabled:_,className:"flex-1 h-12 bg-[#01C38D] text-[#15171C] font-semibold rounded-xl hover:bg-[#00B37F] transition-all disabled:opacity-50",children:_?"Processing...":"Continue Anyway"})]})]})]})]})]})]})}},94044:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/goals/create/investment-style",function(){return s(27657)}])}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=94044)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.