1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20893],{20893:function(e,t,a){a.r(t),a.d(t,{default:function(){return eh}});var l=a(65724),s=a(78095),r=a(92169),i=a(78883),n=a(67582),o=a(98596),c=a(75157),d=a(98712),u=a(2512),h=a(4156),m=a(6749),p=a(21888),g=a(89282),f=a(5081),x=a(84366),y=a(23672),v=a(19523);let b=[{title:"Your Money Feelings",field:"financialFeeling",question:"When you think about your finances, which of the following best describes how you really feel?"},{title:"Financial Decisions",field:"financialDecision",question:"When it comes to big financial decisions, what's your primary reaction?"},{title:"Money Beliefs",field:"moneyBeliefs",question:"What sneaky money beliefs tend to trip you up?"},{title:"Money Tools",field:"moneyTools",question:"Which money tools do you lean on?"},{title:"Money Dreams",field:"moneyDreams",question:"What are your big money dreams?"},{title:"Future Vision",field:"futureVision",question:"Fast Forward one year: No more money stress -- what does life look like to you?"}];var j=a(80710),w=a(19735),N=a(16447),k=a(61763),F=a(50350),C=a(96019),S=a(89183),z=a(25995),D=a(66066),T=a(76205);let P=(0,u.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,l.jsx)(z.fC,{className:(0,T.cn)("grid gap-2",a),...s,ref:t})});P.displayName=z.fC.displayName;let M=(0,u.forwardRef)((e,t)=>{let{className:a,...s}=e;return(0,l.jsx)(z.ck,{ref:t,className:(0,T.cn)("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...s,children:(0,l.jsx)(z.z$,{className:"flex items-center justify-center",children:(0,l.jsx)(D.Z,{className:"h-2.5 w-2.5 fill-current text-current"})})})});M.displayName=z.ck.displayName;var W=a(14544);let R=(0,r.E)(m.z),E=["financialFeeling","financialDecision"];var Z=e=>{var t;let{step:a,onNext:s,onPrev:i,isFirst:n,isLast:o,stepIndex:c,totalSteps:d,isGeneratingProfile:m,onGenerate:p,generationProgress:g}=e,{control:y,formState:{errors:v}}=(0,h.Gc)(),[b,z]=(0,u.useState)(null);(0,u.useEffect)(()=>{if(m){let e=["Overview","Mindset","Conversation","QuickReference"],t=0,a=setInterval(()=>{z(e[t]),t=(t+1)%e.length},2e3);return()=>clearInterval(a)}z(null)},[m]);let D=()=>{setTimeout(()=>s(),300)},T=()=>(0,l.jsx)(h.Qr,{name:"financialFeeling",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)(P,{onValueChange:e=>{t.onChange(e),D()},value:t.value,className:"space-y-3",children:[{value:"stress",label:"Itâs a ball of stress.",tip:"Feeling overwhelmed is common!"},{value:"treading",label:"Treading water.",tip:"Youâre staying afloatâgreat start!"},{value:"okay",label:"Okay, but could be better.",tip:"A confidence boost awaits!"},{value:"good",label:"Pretty good!",tip:"Letâs build on that!"}].map(e=>(0,l.jsx)(W.pn,{children:(0,l.jsxs)(W.u,{children:[(0,l.jsx)(W.aJ,{asChild:!0,children:(0,l.jsxs)("div",{className:"flex cursor-pointer items-center space-x-2 rounded-md p-2 transition-all duration-200 hover:bg-purple-50 dark:hover:bg-purple-900/20",children:[(0,l.jsx)(M,{value:e.value,id:e.value}),(0,l.jsx)(x._,{htmlFor:e.value,children:e.label})]})}),(0,l.jsx)(W._v,{children:e.tip})]})},e.value))})}}),Z=()=>(0,l.jsx)(h.Qr,{name:"financialDecision",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)(P,{onValueChange:e=>{t.onChange(e),D()},value:t.value,className:"space-y-3",children:[{value:"avoid",label:"Avoid, avoid, avoid.",tip:"Procrastination is normal!"},{value:"second guessing",label:"Second-guessing myself.",tip:"Trust-building starts here."},{value:"overthink",label:"Overthink everything.",tip:"Letâs simplify your process."},{value:"askAdvice",label:"Ask for advice first.",tip:"Wise moveânow trust yourself too!"},{value:"confident",label:"Confident decisions!",tip:"Keep that momentum!"}].map(e=>(0,l.jsx)(W.pn,{children:(0,l.jsxs)(W.u,{children:[(0,l.jsx)(W.aJ,{asChild:!0,children:(0,l.jsxs)("div",{className:"flex cursor-pointer items-center space-x-2 rounded-md p-2 transition-all duration-200 hover:bg-purple-50 dark:hover:bg-purple-900/20",children:[(0,l.jsx)(M,{value:e.value,id:e.value}),(0,l.jsx)(x._,{htmlFor:e.value,children:e.label})]})}),(0,l.jsx)(W._v,{children:e.tip})]})},e.value))})}}),O=()=>(0,l.jsx)(h.Qr,{name:"moneyBeliefs",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)("div",{className:"space-y-3",children:[{value:"stress",label:"Money equals stress."},{value:"deserve",label:"I donât deserve wealth."},{value:"limiting",label:"Iâm not cut out for success."},{value:"lucky",label:"Money is for the lucky."},{value:"gone",label:"Spend it, lose it forever."},{value:"evil",label:"Money is evil."},{value:"other",label:"Other (tell us!)"}].map(e=>{var a,s;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 rounded-md p-2 transition-all duration-200 hover:bg-purple-50 dark:hover:bg-purple-900/20",children:[(0,l.jsx)(C.X,{id:e.value,checked:null===(a=t.value)||void 0===a?void 0:a.includes(e.value),onCheckedChange:a=>{let l=a?[...t.value||[],e.value]:(t.value||[]).filter(t=>t!==e.value);
1t.onChange(l)}}),(0,l.jsx)(x._,{htmlFor:e.value,children:e.label})]}),"other"===e.value&&(null===(s=t.value)||void 0===s?void 0:s.includes("other"))&&(0,l.jsx)(h.Qr,{name:"otherMoneyBeliefs",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)(f.I,{className:"ml-6 mt-2 w-full",placeholder:"Tell us more...",...t})}})]},e.value)})})}}),L=()=>(0,l.jsx)(h.Qr,{name:"moneyTools",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)("div",{className:"space-y-3",children:[{value:"budget",label:"Budget or tracker."},{value:"autoSave",label:"Automatic savings."},{value:"journal",label:"Finance journaling."},{value:"investment",label:"Investment plan."},{value:"coach",label:"Financial coach."},{value:"other",label:"Other (tell us!)"},{value:"none",label:"Nothing right now."}].map(e=>{var a,s;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 rounded-md p-2 transition-all duration-200 hover:bg-purple-50 dark:hover:bg-purple-900/20",children:[(0,l.jsx)(C.X,{id:e.value,checked:null===(a=t.value)||void 0===a?void 0:a.includes(e.value),onCheckedChange:a=>{let l=a?[...t.value||[],e.value]:(t.value||[]).filter(t=>t!==e.value);t.onChange(l)}}),(0,l.jsx)(x._,{htmlFor:e.value,children:e.label})]}),"other"===e.value&&(null===(s=t.value)||void 0===s?void 0:s.includes("other"))&&(0,l.jsx)(h.Qr,{name:"otherMoneyTools",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)(f.I,{className:"ml-6 mt-2 w-full",placeholder:"Tell us more...",...t})}})]},e.value)})})}}),_=()=>(0,l.jsx)(h.Qr,{name:"moneyDreams",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)("div",{className:"space-y-3",children:[{value:"debtFree",label:"Debt-free life."},{value:"savings",label:"Growing savings."},{value:"retirement",label:"Worry-free retirement."},{value:"freedom",label:"Financial freedom."},{value:"habits",label:"Solid money habits."},{value:"travel",label:"Travel without stress."},{value:"giving",label:"Giving back easily."},{value:"other",label:"Other (share it!)"}].map(e=>{var a,s;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 rounded-md p-2 transition-all duration-200 hover:bg-purple-50 dark:hover:bg-purple-900/20",children:[(0,l.jsx)(C.X,{id:e.value,checked:null===(a=t.value)||void 0===a?void 0:a.includes(e.value),onCheckedChange:a=>{let l=a?[...t.value||[],e.value]:(t.value||[]).filter(t=>t!==e.value);t.onChange(l)}}),(0,l.jsx)(x._,{htmlFor:e.value,children:e.label})]}),"other"===e.value&&(null===(s=t.value)||void 0===s?void 0:s.includes("other"))&&(0,l.jsx)(h.Qr,{name:"otherMoneyDreams",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)(f.I,{className:"ml-6 mt-2 w-full",placeholder:"Tell us more...",...t})}})]},e.value)})})}}),q=()=>(0,l.jsx)(h.Qr,{name:"futureVision",control:y,render:e=>{let{field:t}=e;return(0,l.jsx)("textarea",{...t,className:"h-32 w-full rounded-md border p-3 focus:ring-2 focus:ring-purple-600 dark:border-gray-700 dark:bg-gray-800",placeholder:"Paint us a picture of your ideal financial future..."})}}),V=E.includes(a.field);return(0,l.jsxs)(r.E.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.5},className:"w-full rounded-lg bg-white p-6 shadow-md dark:bg-gray-800",children:[(0,l.jsx)(S.E,{value:c/d*100,className:"mb-4"}),(0,l.jsx)("h2",{className:"text-2xl font-semibold text-purple-600",children:a.title}),(0,l.jsxs)("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:["Step ",c," of ",d]}),(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)(x._,{className:"text-lg font-medium",children:a.question}),(()=>{switch(a.field){case"financialFeeling":return T();case"financialDecision":return Z();case"moneyBeliefs":return O();case"moneyTools":return L();case"moneyDreams":return _();case"futureVision":return q();default:return null}})(),v[a.field]&&(0,l.jsxs)(F.bZ,{variant:"destructive",children:[(0,l.jsx)(w.Z,{className:"h-4 w-4"}),(0,l.jsx)(F.X,{children:null===(t=v[a.field])||void 0===t?void 0:t.message})]})]}),m?(0,l.jsxs)("div",{className:"mt-6 flex items-center space-x-2 rounded-lg bg-purple-50 p-4 dark:bg-purple-900/20",children:[(0,l.jsx)(j.Z,{className:"h-4 w-4 animate-spin text-purple-600"}),(0,l.jsx)("span",{className:"text-sm text-purple-600",children:b?"Creating ".concat(b,"..."):"Preparing your profile..."}),(0,l.jsx)(S.E,{value:g,className:"w-1/2"})]}):null,(0,l.jsxs)("div",{className:"mt-8 flex justify-between",children:[!n&&(0,l.jsxs)(R,{onClick:i,variant:"outline",className:"flex items-center gap-2",whileHover:{scale:1.03},whileTap:{scale:.97},children:[(0,l.jsx)(N.Z,{className:"h-4 w-4"})," Back"]}),!V&&(0,l.jsxs)(R,{onClick:o?p:s,className:"ml-auto flex items-center gap-2 bg-purple-600 hover:bg-purple-700",disabled:m,whileHover:{scale:1.03},whileTap:{scale:.97},children:[o?m?"Generating...":"Finish":"Next",!o&&(0,l.jsx)(k.Z,{className:"h-4 w-4"})]})]})]})},O=a(81230),L=a(48109),_=a(71919),q=a(32599),V=a(58454),B=a(45125),I=a(61303),Q=a(30366);let A={colors:{primary:"#484564",primaryLight:"#6e6a9c",secondary:"#EDE9FE",text:"#1F2937",accent:"#6B7280",background:"#FFFFFF",quote:"#F3F4F6",border:"#D1D5DB",highlight:"#484564",checkmark:"#10B981",star:"#FBBF24"},font:{family:"Helvetica",styles:{h1:{size:28,style:"bold"},h2:{size:22,style:"bold"},h3:{size:16,style:"bold"},h4:{size:14,style:"bold"},normal:{size:12,style:"normal"},bold:{size:12,style:"bold"},italic:{size:12,style:"italic"},small:{size:10,style:"normal"}}},spacing:{margin:20,padding:10,paragraph:6,section:15,headerHeight:40,footerHeight:25,indent:8},decorative:{lineWidth:.5,bulletRadius:1,cornerRadius:5}},H=e=>e.replace(/\n{2,}/g,"\n").trim(),J=(e,t,a,l,s)=>{let r=t.split(/(\*\*.*?\*\*)/),i=a,n=l;return r.forEach(t=>{if(t.startsWith("**")&&t.endsWith("**")){let l=t.slice(2,-2);e.setFont(A.font.family,A.font.styles.bold.style),e.setFontSize(A.font.styles.bold.size),e.splitTextToSize(H(l),s-(i-a)).forEac
1h(t=>{i+e.getTextWidth(t)>a+s&&(n+=A.spacing.paragraph,i=a),e.text(t,i,n),i+=e.getTextWidth(t)})}else e.setFont(A.font.family,A.font.styles.normal.style),e.setFontSize(A.font.styles.normal.size),e.splitTextToSize(H(t),s-(i-a)).forEach(t=>{i+e.getTextWidth(t)>a+s&&(n+=A.spacing.paragraph,i=a),e.text(t,i,n),i+=e.getTextWidth(t)});i+=e.getTextWidth(" ")}),n+A.spacing.paragraph-l},Y=(e,t,a,l,s,r)=>{let{size:i,style:n}=A.font.styles[a];e.setFont(A.font.family,n),e.setFontSize(i),e.setTextColor(A.colors.text);let o=e.splitTextToSize(H(t),r);return e.text(o,l,s),o.length*i*.5},G=(e,t,a,l)=>{if("check"===l){e.setDrawColor(A.colors.checkmark),e.setLineWidth(.7),e.line(t-6,a-2,t-4,a),e.line(t-4,a,t-1,a-4);return}if("star"===l){e.setFillColor(A.colors.star),e.circle(t-4,a-2,A.decorative.bulletRadius+.5,"F");return}if("asterisk"===l){e.setFillColor(A.colors.primaryLight),e.circle(t-4,a-2,A.decorative.bulletRadius+.3,"F");return}e.setFillColor(A.colors.primaryLight),e.circle(t-4,a-2,A.decorative.bulletRadius,"F")},U=(e,t,a,l)=>{e.setDrawColor(A.colors.primaryLight),e.setLineWidth(A.decorative.lineWidth),e.line(t,a+2,t+l,a+2)},X=(e,t,a,l,s)=>{e.setFillColor(A.colors.quote),e.roundedRect(t-5,a-5,l+10,s+8,A.decorative.cornerRadius,A.decorative.cornerRadius,"F"),e.setFillColor(A.colors.primaryLight),e.rect(t-5,a-5,3,s+8,"F")},K=(e,t,a,l,s)=>{e.setFillColor("#f8f7ff"),e.roundedRect(t-5,a-10,l+10,s+15,A.decorative.cornerRadius,A.decorative.cornerRadius,"F"),e.setFillColor(A.colors.primary),e.setDrawColor(A.colors.primary),e.roundedRect(t-5,a-10,l+10,5,A.decorative.cornerRadius,A.decorative.cornerRadius,"F")},$=(e,t,a,l,s,r,i)=>t+a>l-A.spacing.footerHeight-s?(i(e,e.getCurrentPageInfo().pageNumber),e.addPage(),r(e),s+A.spacing.headerHeight):t,ee=e=>{e.setFillColor(A.colors.primary),e.rect(0,0,e.internal.pageSize.width,A.spacing.headerHeight,"F"),e.setFillColor(A.colors.primaryLight),e.rect(0,A.spacing.headerHeight,e.internal.pageSize.width,3,"F"),e.setTextColor(A.colors.background),e.setFontSize(A.font.styles.h2.size),e.setFont(A.font.family,A.font.styles.h2.style),e.text("Money Mojo Profile",A.spacing.margin,A.spacing.headerHeight/2+5)},et=(e,t)=>{let a=e.internal.pageSize.width,l=e.internal.pageSize.height;e.setDrawColor(A.colors.border),e.setLineWidth(A.decorative.lineWidth),e.line(A.spacing.margin,l-A.spacing.footerHeight,a-A.spacing.margin,l-A.spacing.footerHeight),e.setFontSize(A.font.styles.small.size),e.setTextColor(A.colors.accent),e.text("Page ".concat(t," | Generated on ").concat(new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})),a-A.spacing.margin,l-A.spacing.footerHeight/2,{align:"right"}),e.setFontSize(A.font.styles.small.size),e.setFont(A.font.family,A.font.styles.bold.style),e.setTextColor(A.colors.primary),e.text("Money Mojo",A.spacing.margin,l-A.spacing.footerHeight/2)},ea=e=>{let t=e.internal.pageSize.width,a=e.internal.pageSize.height,l=A.spacing.margin;e.setFillColor(A.colors.primary),e.rect(0,0,t,a,"F"),e.setFillColor(A.colors.primaryLight),e.triangle(t,0,t,a/2,t/2,0,"F"),e.setFillColor(A.colors.secondary),e.circle(t/6,a-a/4,50,"F"),e.setTextColor(A.colors.background),e.setFontSize(A.font.styles.h1.size+8),e.setFont(A.font.family,A.font.styles.h1.style),e.text("Your Money Mojo",l,a/3,{maxWidth:t-2*l}),e.text("Profile",l,a/3+20,{maxWidth:t-2*l}),e.setFontSize(A.font.styles.h3.size),e.setFont(A.font.family,A.font.styles.h3.style),e.text("A Personalized Financial Journey",l,a/3+50,{maxWidth:t-2*l}),e.setFontSize(A.font.styles.normal.size),e.setFont(A.font.family,A.font.styles.normal.style),e.text("Created on ".concat(new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})),l,a-2*l)},el=e=>{let t=e.split("\n"),a=[];for(let e=0;e<t.length;e++){let s=t[e].trim();if(!s){a.push({type:"space",content:""});continue}if(s.match(/^(ð|ð«|ðª|ð¯|ð)\s+(.*)$/)){var l;let e=(null===(l=s.match(/^(ð|ð«|ðª|ð¯|ð)/))||void 0===l?void 0:l[0])||"",t=s.replace(/^(ð|ð«|ðª|ð¯|ð)\s+/,""),r="";switch(e){case"\uD83C\uDF1F":r="â
";break;case"\uD83D\uDCAB":r="â§";break;case"\uD83D\uDCAA":r="â¦";break;case"\uD83C\uDFAF":r="â";break;case"\uD83D\uDE80":r="â²"}a.push({type:"emoji-heading",content:t,level:2,style:r});continue}if(s.startsWith("# ")){a.push({type:"heading",content:s.slice(2),level:1});continue}if(s.startsWith("## ")){a.push({type:"heading",content:s.slice(3),level:2});continue}if(s.startsWith("### ")){a.push({type:"heading",content:s.slice(4),level:3});continue}if(s.startsWith("- ")||s.startsWith("* ")){let e=s.startsWith("* ")?"asterisk":void 0;a.push({type:"bullet",content:s.slice(2),style:e});continue}if(s.startsWith("â ")||s.startsWith("â
")){a.push({type:"bullet",content:s.slice(2),style:"check"});continue}if(s.startsWith("â ")){a.push({type:"bullet",content:s.slice(2),style:"star"});continue}if(s.startsWith("> ")){a.push({type:"quote",content:s.slice(2)});continue}if(s.match(/^Reflective Question:/)||s.match(/^Journaling Prompt:/)||s.match(/^Reflective Challenge:/)){let e=s.includes("Challenge")?"Reflection Challenge":s.includes("Journ
1aling")?"Journal Prompt":"Reflection",t=s.replace(/^Reflective Question:\s*/i,"").replace(/^Journaling Prompt:\s*/i,"").replace(/^Reflective Challenge:\s*/i,"");a.push({type:"reflection",content:t,style:e});continue}if(s.match(/^(Visualization Exercise):/i)){a.push({type:"subheading",content:s});continue}a.push({type:"paragraph",content:s})}return a},es=(e,t,a,l,s,r,i,n)=>{for(let o of el(t)){let t=2*A.spacing.paragraph;switch("heading"===o.type||"emoji-heading"===o.type?t=A.font.styles.h2.size+2*A.spacing.paragraph:"quote"===o.type?t=4*A.spacing.paragraph:"reflection"===o.type&&(t=6*A.spacing.paragraph),r=$(e,r,t,s,a,i,n),o.type){case"emoji-heading":e.setTextColor(A.colors.primary),e.setFontSize(A.font.styles.h2.size),e.setFont(A.font.family,A.font.styles.h2.style),e.text(o.style||"â
",a,r),e.text(o.content,a+10,r),U(e,a,(r+=2*A.spacing.paragraph)-A.spacing.paragraph,60),r+=A.spacing.paragraph;break;case"heading":1===o.level?r+=Y(e,o.content,"h2",a,r,l):2===o.level?r+=Y(e,o.content,"h3",a,r,l):r+=Y(e,o.content,"bold",a,r,l),r+=A.spacing.paragraph;break;case"bullet":G(e,a+A.spacing.indent,r,o.style),r+=Y(e,o.content,"normal",a+2*A.spacing.indent,r,l-2*A.spacing.indent)+A.spacing.paragraph;break;case"quote":{let t=e.splitTextToSize(H(o.content),l-10),s=t.length*A.spacing.paragraph;X(e,a,r,l,s),e.setFont(A.font.family,A.font.styles.italic.style),e.setFontSize(A.font.styles.normal.size),e.text(t,a+5,r+5),r+=s+2*A.spacing.paragraph;break}case"reflection":{let t=e.splitTextToSize(H(o.content),l-10),s=t.length*A.spacing.paragraph;K(e,a,r,l,s),e.setTextColor(A.colors.primary),e.setFont(A.font.family,A.font.styles.bold.style),e.setFontSize(A.font.styles.h4.size),e.text(o.style||"Reflection",a+5,r),e.setTextColor(A.colors.text),e.setFont(A.font.family,A.font.styles.italic.style),e.setFontSize(A.font.styles.normal.size),e.text(t,a+5,r+10),r+=s+3*A.spacing.paragraph;break}case"subheading":r+=Y(e,o.content,"h4",a,r,l)+A.spacing.paragraph;break;case"space":r+=A.spacing.paragraph;break;case"paragraph":{let t=J(e,o.content,a,r,l);r+=t+A.spacing.paragraph}}}return r};async function er(e){let t=new Q.kH({orientation:"portrait",unit:"mm",format:"a4"}),a=t.internal.pageSize.width,l=t.internal.pageSize.height,s=A.spacing.margin,r=a-2*s;ea(t),t.addPage(),ee(t);let i=s+A.spacing.headerHeight;i=$(t,i,30,l,s,ee,et),t.setTextColor(A.colors.primary),i+=Y(t,"Executive Summary","h2",s,i,r),U(t,s,i,60),i+=A.spacing.section,i=es(t,e.summary,s,r,l,i,ee,et),e.sections.forEach(e=>{i+=A.spacing.section,i=$(t,i,30,l,s,ee,et);let a=e.title.match(/^(ð|ð«|ðª|ð¯|ð)\s+(.*)$/);if(a){t.setTextColor(A.colors.primary),t.setFontSize(A.font.styles.h2.size),t.setFont(A.font.family,A.font.styles.h2.style);let e="";switch(a[1]){case"\uD83C\uDF1F":e="â
";break;case"\uD83D\uDCAB":e="â§";break;case"\uD83D\uDCAA":e="â¦";break;case"\uD83C\uDFAF":e="â";break;case"\uD83D\uDE80":e="â²"}t.text(e,s,i),t.text(a[2],s+10,i),i+=2*A.spacing.paragraph}else i+=Y(t,e.title,"h2",s,i,r);U(t,s,i,60),i+=A.spacing.paragraph,i=es(t,e.content,s,r,l,i,ee,et)}),e.nextSteps.length>0&&(i+=A.spacing.section,i=$(t,i,40,l,s,ee,et),i+=Y(t,"Your Next Steps","h2",s,i,r),U(t,s,i,60),i+=A.spacing.section,e.nextSteps.forEach((e,a)=>{i=$(t,i,3*A.spacing.paragraph,l,s,ee,et),t.setFillColor(A.colors.primaryLight),t.circle(s+4,i-2,6,"F"),t.setTextColor(A.colors.background),t.setFontSize(A.font.styles.small.size),t.setFont(A.font.family,A.font.styles.bold.style),t.text((a+1).toString(),s+4,i,{align:"center"}),t.setTextColor(A.colors.text),t.setFontSize(A.font.styles.normal.size),t.setFont(A.font.family,A.font.styles.normal.style);let n=t.splitTextToSize(e,r-2*A.spacing.indent);t.text(n,s+2*A.spacing.indent,i),i+=n.length*A.spacing.paragraph+3}));let n=t.getNumberOfPages();for(let e=2;e<=n;e++)t.setPage(e),ee(t),et(t,e-1);return t.output("blob")}let ei=()=>(0,l.jsxs)("div",{className:"flex min-h-[400px] flex-col items-center justify-center rounded-lg bg-gradient-to-b from-[#484564] to-white p-8 shadow-inner dark:from-[#484564] dark:to-gray-900",children:[(0,l.jsx)(j.Z,{className:"mb-6 h-14 w-14 animate-spin text-white dark:text-white"}),(0,l.jsx)("h2",{className:"mb-3 text-2xl font-semibold text-white dark:text-white",children:"Creating Your Money Mojo Profile"}),(0,l.jsx)("p",{className:"mb-6 max-w-md text-center text-white/80 dark:text-white/80",children:"We're crafting personalized financial insights just for you..."}),(0,l.jsxs)("div",{className:"flex items-center justify-center gap-2 rounded-full bg-white/20 px-4 py-2",children:[(0,l.jsx)("div",{className:"h-2 w-2 animate-bounce rounded-full bg-white [animation-delay:0ms]"}),(0,l.jsx)("div",{className:"h-2 w-2 animate-bounce rounded-full bg-white [animation-delay:150ms]"}),(0,l.jsx)("div",{className:"h-2 w-2 animate-bounce rounded-full bg-white [animation-delay:300ms]"})]})]}),en={h1:e=>{let{node:t,...a}=e;return(0,l.jsx)("h1",{className:"my-4 text-3xl font-bold",...a})},h2:e=>{let{node:t,...a}=e;return(0,l.jsx)("h2",{className:"my-4 text-2xl font-bold",...a})},blockquote:e=>{let{node:t,...a}=e;return(0,l.jsx)("blockquote",{className:"my-4 border-l-4 border-gray-300 pl-4 text-lg italic",...a})},strong:e=>{let{node:t,...a}=e;return(0,l.jsx)("strong",{className:"font-bold",...a})},li:e=>{let{node:t,...a}=e;return(0,l.jsx)("li",{className:"my-1",...a})},p:e=>{let{node:t,children:a,...s}=e;return(0,l.jsx)("p",{className:"my-4 whitespace-pre-line",...s,children:a})}},eo=e=>{let t=e;return(t=(t=(t=(t=t.split(" - ").join("\n- ")).split(" # ").join("\n# ")).replace(/(?:\n)?\s*Reflective Question:/g,"\n\nReflective Question:")).replace(/(?:\n)?\s*Journaling Prompt:/g,"\n\n**Journaling Prompt:**")).replace(/(?:\n)?\s*Visualization Exercise:/g,"\n\nVisualization Exercise:")};var ec=e=>{let{profile:t,onReset:a,onSave:s,data:n,isGenerating:o}=e,[c,h]=(0,u.useState)(!1),[g,f]=(0,u.useState)(!1),x=async()=>{let e=await er({summary:n.futureVision||"Your financial journey overview.",sections:Object.entries(t).map(e=>
1{let[t,a]=e;return{title:t,content:a}}),nextSteps:[]}),a=URL.createObjectURL(e),l=document.createElement("a");l.href=a,l.download="MoneyMojoProfile.pdf",l.click(),URL.revokeObjectURL(a)};return o||0===Object.keys(t).length?(0,l.jsx)(ei,{}):(0,l.jsx)(p.Zb,{className:"relative w-full overflow-hidden border-[#484564]/20 shadow-md dark:border-[#484564]/30",children:(0,l.jsx)(p.aY,{className:"p-0",children:(0,l.jsx)("div",{className:"space-y-6 p-6",children:(0,l.jsxs)(r.E.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.6},className:"space-y-6",children:[(0,l.jsx)("div",{className:"-mx-6 -mt-6 mb-8 rounded-lg bg-gradient-to-r from-[#484564] to-[#6e6a9c] p-8 shadow-md dark:from-[#484564] dark:to-[#242038]",children:(0,l.jsxs)(r.E.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{delay:.2,duration:.5},children:[(0,l.jsx)("h1",{className:"text-3xl font-bold text-white dark:text-white",children:"Your Money Mojo Profile"}),(0,l.jsx)("p",{className:"mt-2 text-white/90 dark:text-white/90",children:"Personalized financial insights tailored just for you"})]})}),Object.entries(t).map((e,t)=>{let[a,s]=e;return(0,l.jsx)(r.E.div,{className:"space-y-4 rounded-lg border border-gray-100 bg-white p-7 shadow-sm dark:border-gray-700 dark:bg-gray-800",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1*t,duration:.5},children:(0,l.jsx)(V.D,{className:"dark:prose-dark prose",remarkPlugins:[I.Z,B.Z],components:en,children:eo(s)})},a)}),(0,l.jsxs)("div",{className:"mt-10 flex flex-wrap gap-4 border-t border-gray-200 pt-6 dark:border-gray-700",children:[(0,l.jsxs)(m.z,{onClick:()=>{let e=Object.values(t).join("\n\n");navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),2e3)},className:"flex items-center gap-2 bg-[#484564] shadow-sm transition-all duration-200 hover:bg-[#484564]/90",disabled:c,children:[c?(0,l.jsx)(O.Z,{className:"h-4 w-4"}):(0,l.jsx)(L.Z,{className:"h-4 w-4"}),c?"Copied!":"Copy"]}),(0,l.jsxs)(m.z,{onClick:x,className:"flex items-center gap-2 bg-[#484564] shadow-sm transition-all duration-200 hover:bg-[#484564]/90",children:[(0,l.jsx)(_.Z,{className:"h-4 w-4"})," Download PDF"]}),(0,l.jsxs)(m.z,{onClick:()=>{s(),f(!0),setTimeout(()=>f(!1),2e3)},className:"flex items-center gap-2 bg-[#484564] shadow-sm transition-all duration-200 hover:bg-[#484564]/90",disabled:g,children:[g?(0,l.jsx)(O.Z,{className:"h-4 w-4"}):(0,l.jsx)(d.Z,{className:"h-4 w-4"}),g?"Saved!":"Save Profile"]}),(0,l.jsxs)(m.z,{onClick:a,variant:"outline",className:"flex items-center gap-2 border-[#484564] text-[#484564] transition-all duration-200 hover:bg-[#484564]/10 dark:border-[#484564] dark:text-[#484564] dark:hover:bg-[#484564]/20",children:[(0,l.jsx)(q.Z,{className:"h-4 w-4"})," Start Over"]})]}),(0,l.jsx)(i.M,{children:(c||g)&&(0,l.jsxs)(r.E.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-6 left-1/2 z-50 flex -translate-x-1/2 transform items-center gap-2 rounded-lg bg-[#484564] px-4 py-3 text-white shadow-lg",children:[(0,l.jsx)(O.Z,{className:"h-5 w-5"}),(0,l.jsx)("span",{children:c?"Profile copied to clipboard!":"Profile saved successfully!"})]})})]})})})})},ed=a(7233);let eu=ed.Ry({financialFeeling:ed.Km(["stress","treading","okay","good"]),financialDecision:ed.Km(["avoid","second guessing","overthink","askAdvice","confident"]),moneyBeliefs:ed.IX(ed.Z_()).min(1,"Please select at least one belief"),moneyTools:ed.IX(ed.Z_()).min(1,"Please select at least one tool"),moneyDreams:ed.IX(ed.Z_()).min(1,"Please select at least one dream"),futureVision:ed.Z_().min(1,"Please share your vision for the future"),otherMoneyBeliefs:ed.Z_().optional(),otherMoneyTools:ed.Z_().optional(),otherMoneyDreams:ed.Z_().optional()});var eh=()=>{let[e,t]=(0,u.useState)(-1),[a,j]=(0,u.useState)({}),[w,N]=(0,u.useState)(!1),[k,F]=(0,u.useState)([]),[C,S]=(0,u.useState)(!1),[z,D]=(0,u.useState)(""),[T,P]=(0,u.useState)("form"),{toast:M}=(0,v.pm)(),W=(0,h.cI)({resolver:(0,s.F)(eu),mode:"onChange",defaultValues:{moneyBeliefs:[],moneyTools:[],moneyDreams:[],futureVision:"",otherMoneyBeliefs:"",otherMoneyTools:"",otherMoneyDreams:""}}),{reset:R}=W;(0,u.useEffect)(()=>{let e=localStorage.getItem("savedMoneyMojoProfiles");e&&F(JSON.parse(e))},[]);let E=async()=>{P("result"),N(!0),j({});let e=W.getValues();try{let t=await fetch("/api/ai/money-mojo-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,missionType:"Overview"})});if(!t.ok)throw Error("Profile generation failed");let a=t.body.getReader(),l=new TextDecoder,s="",r="";for(;;){let{done:e,value:t}=await a.read();if(e)break;let i=(s+=l.decode(t,{stream:!0})).split("\n");for(let e of(s=i.pop()||"",i))if(e.startsWith("data: "))try{r=JSON.parse(e.slice(6)).content,j({Overview:r})}catch(e){console.error("Error parsing streamed data:",e)}}r&&j({Overview:r}),N(!1),M({title:"Profile Generated",description:"Your Money Mojo profile is ready!",className:"bg-[#484564] text-white"})}catch(e){console.error("Error generating profile:",e),N(!1),M({title:"Error",description:e.message||"An unexpected error occurred.",variant:"destructive"})}},O=e=>{let t=k[e];R(t.data),j(t.profile),P("result"),M({title:"Profile Loaded",description:'Lo
1aded "'.concat(t.name,'" successfully.'),className:"bg-[#484564] text-white"})};return(0,l.jsxs)("div",{className:"mx-auto w-full max-w-4xl",children:[(0,l.jsx)(p.Zb,{className:"w-full overflow-hidden border-gray-200 shadow-lg dark:border-gray-700",children:(0,l.jsxs)(p.aY,{className:"p-0",children:[(0,l.jsxs)("div",{className:"bg-gradient-to-r from-[#484564] to-[#6e6a9c] p-6 text-white dark:from-[#484564] dark:to-[#242038]",children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center gap-3",children:[(0,l.jsx)(n.Z,{className:"h-6 w-6 text-yellow-300"}),(0,l.jsx)("h1",{className:"text-2xl font-bold",children:"Money Mojo Profile Generator"})]}),(0,l.jsx)("p",{className:"text-white/80",children:"Unlock your financial confidence and create a mindset that works for you."})]}),(0,l.jsx)("div",{className:"p-4 sm:p-6",children:(0,l.jsxs)(y.mQ,{value:T,onValueChange:P,className:"w-full",children:[(0,l.jsxs)(y.dr,{className:"mb-6 grid w-full grid-cols-3",children:[(0,l.jsxs)(y.SP,{value:"form",className:"data-[state=active]:bg-[#484564] data-[state=active]:text-white",children:[(0,l.jsx)(o.Z,{className:"mr-2 h-4 w-4"})," Quiz"]}),(0,l.jsxs)(y.SP,{value:"result",disabled:!w&&!Object.keys(a).length,className:"data-[state=active]:bg-[#484564] data-[state=active]:text-white",children:[(0,l.jsx)(c.Z,{className:"mr-2 h-4 w-4"})," Results"]}),(0,l.jsxs)(y.SP,{value:"saved",className:"data-[state=active]:bg-[#484564] data-[state=active]:text-white",children:[(0,l.jsx)(d.Z,{className:"mr-2 h-4 w-4"})," Saved"]})]}),(0,l.jsx)(y.nU,{value:"form",className:"mt-0 w-full",children:-1===e?(0,l.jsxs)(r.E.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"space-y-6 rounded-lg border border-gray-100 bg-white px-4 py-12 text-center shadow-sm dark:border-gray-700 dark:bg-gray-800",children:[(0,l.jsx)("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-[#484564]/10",children:(0,l.jsx)(n.Z,{className:"h-8 w-8 text-[#484564]"})}),(0,l.jsx)("h2",{className:"text-2xl font-semibold text-[#484564]",children:"Welcome to Money Mojo!"}),(0,l.jsx)("p",{className:"mx-auto max-w-md text-gray-600 dark:text-gray-300",children:"Take this quiz to unlock your financial potential and create a personalized roadmap for success."}),(0,l.jsx)(m.z,{onClick:()=>t(0),className:"bg-[#484564] px-8 py-2 hover:bg-[#484564]/90",children:"Start Quiz"})]}):(0,l.jsx)(h.RV,{...W,children:(0,l.jsx)(i.M,{mode:"wait",children:(0,l.jsx)(Z,{step:b[e],stepIndex:e+1,totalSteps:b.length,onNext:()=>e<b.length-1&&t(e=>e+1),onPrev:()=>e>0&&t(e=>e-1),isFirst:0===e,isLast:e===b.length-1,isGeneratingProfile:w,onGenerate:E,generationProgress:0,generatedProfile:a},e)})})}),(0,l.jsx)(y.nU,{value:"result",className:"mt-0 w-full",children:(0,l.jsx)(ec,{profile:a,onReset:()=>{t(-1),j({}),R(),P("form")},onSave:()=>S(!0),data:W.getValues(),isGenerating:w})}),(0,l.jsx)(y.nU,{value:"saved",className:"mt-0 w-full",children:(0,l.jsxs)("div",{className:"space-y-4 rounded-lg border border-gray-100 bg-white p-6 shadow-sm dark:border-gray-700 dark:bg-gray-800",children:[(0,l.jsx)("h2",{className:"mb-4 text-xl font-semibold text-[#484564]",children:"Saved Profiles"}),0===k.length?(0,l.jsxs)("div",{className:"py-8 text-center",children:[(0,l.jsx)("p",{className:"mb-2 text-gray-500",children:"No saved profiles yet."}),(0,l.jsx)("p",{className:"text-sm text-gray-400",children:"Complete the quiz to generate and save your profiles."})]}):(0,l.jsx)("div",{className:"grid gap-4 sm:grid-cols-2",children:k.map((e,t)=>(0,l.jsxs)(p.Zb,{className:"overflow-hidden",children:[(0,l.jsx)("div",{className:"border-b border-gray-200 bg-[#484564]/5 p-4 dark:border-gray-700 dark:bg-[#484564]/10",children:(0,l.jsx)("h3",{className:"truncate font-semibold text-[#484564]",children:e.name})}),(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(m.z,{onClick:()=>O(t),className:"w-full bg-[#484564] hover:bg-[#484564]/90",children:"Load Profile"})})]},t))})]})})]})})]})}),(0,l.jsx)(g.Vq,{open:C,onOpenChange:S,children:(0,l.jsxs)(g.cZ,{className:"sm:max-w-md",children:[(0,l.jsx)(g.fK,{children:(0,l.jsx)(g.$N,{children:"Save Your Profile"})}),(0,l.jsxs)("div",{className:"space-y-4 p-4",children:[(0,l.jsx)(x._,{htmlFor:"profileName",children:"Profile Name"}),(0,l.jsx)(f.I,{id:"profileName",value:z,onChange:e=>D(e.target.value),placeholder:"Enter a name for your profile",className:"w-full"}),(0,l.jsxs)("div",{className:"mt-6 flex justify-end gap-3",children:[(0,l.jsx)(m.z,{variant:"outline",onClick:()=>S(!1),children:"Cancel"}),(0,l.jsx)(m.z,{onClick:()=>{if(""===z.trim()){M({title:"Error",description:"Please enter a profile name.",variant:"destructive"});return}let e=[...k,{name:z,data:W.getValues(),profile:a}];F(e),localStorage.setItem("savedMoneyMojoProfiles",JSON.stringify(e)),S(!1),D(""),M({title:"Profile Saved",description:"Your profile has been saved!",className:"bg-[#484564] text-white"})},className:"bg-[#484564] hover:bg-[#484564]/90",children:"Save Profile"})]})]})]})})]})}}}]);
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.