PageSourceSearch

https://www.optumrx.com/etc.clientlibs/dmp/clientlibs/clientlib-dy…/resources/hsa-calc.4fa6cf3123d37bc9a969.js

js optumrx.com collected 2026-10-02 02:26:13 UTC 66,828 bytes, 2 lines download raw bytes

1/*! For license information please see hsa-calc.4fa6cf3123d37bc9a969.js.LICENSE.txt */
2"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[4433],{93328(e,t,r){r.r(t),r.d(t,{default:()=>Ye});var n=r(44914),o=r(86999);function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const s=function(e,t,r){var i=e.model,c=l((0,n.useState)((0,o._9)("hsac-currStep")||0),2),s=c[0],u=c[1],m=l((0,n.useState)(i.map(function(e,t){return(0,o._9)("frame_".concat(t))||e.questions.map(function(){return""})})),2),d=m[0],p=m[1],f=l((0,n.useState)(!1),2),b=f[0],h=f[1],y=l((0,n.useState)(i.map(function(e){return e.questions.map(function(){return""})})),2),g=y[0],v=y[1],x=s<=2?i[s].questions.map(function(){return(0,n.useRef)(null)}):[],_=i[s],E=function(e){return Intl.NumberFormat("en-US").format(e)},S=function(e,t,r){var n=(0,o._9)("currHsaLimit"),l=Number(r),i=(0,o._9)("employer_contribution"),c="";1===e&&0===t&&(l>Number(n)?c="This amount is larger than the maximum allowable HSA contribution. Please enter a smaller amount.":0===l&&(c="Please enter dollar amount.")),2===e&&4===t&&l>Number(n)&&(c="This amount is larger than the maximum allowable HSA contribution. Please enter a smaller amount."),2===e&&1===t&&(l>Number(i)?c="Amount Contributed by others cannot exceed your allowable HSA contribution less any amount you plan to contribute each year.":0===l?c="":""===r&&(c="Please enter dollar amount. If zero, enter 0.")),v(function(r){var n=a(r);return n[e]=a(n[e]),n[e][t]=c,n})},A=(0,n.useCallback)(function(e,t){var r,n=t.target;"contribution"===(null===(r=n.dataset)||void 0===r?void 0:r.specialField)||(p(function(t){var r=a(t);return r[s]||(r[s]=[]),1===s&&0===e&&(0,o.kH)("frame_1_total",n.value),r[s][e]=n.value,(0,o.kH)("frame_".concat(s),r[s]),r}),0!==s||2!==e||"Yes"!==n.value||b?0===s&&2===e&&"No or unsure"===n.value&&((0,o.kH)("employer_contribution",""),setTimeout(function(){var e=document.querySelector("#text-field-s0q2");e&&e.parentElement.classList.remove("Mui-focused")},0)):(h(!0),setTimeout(function(){var e=document.querySelector("#text-field-s0q2");e&&e.parentElement.classList.remove("Mui-focused")},0)),0===s&&2===e&&"Yes"===n.value&&setTimeout(function(){var e=document.querySelector("#text-field-s0q2");e&&e.parentElement.classList.remove("Mui-focused")},0)),S(s,e,n.value)},[s,b]),w=function(t){var r=t[0],n=t[1],l="yes"===t[2].toLowerCase(),i=t[3].toLowerCase(),c=0,u=0,m=0;switch(r){case"Individual HDHP":n===e.authoringData.taxYearOne&&(c=Number(e.authoringData.individualYearOneContribution)),n===e.authoringData.taxYearTwo&&(c=Number(e.authoringData.individualYearTwoContribution));break;case"Family HDHP":n===e.authoringData.taxYearOne&&(c=Number(e.authoringData.familyYearOneContribution)),n===e.authoringData.taxYearTwo&&(c=Number(e.authoringData.familyYearTwoContribution));break;default:return null}l&&(u=null!==(0,o._9)("employer_contribution")?(0,o._9)("employer_contribution"):0),m=c+("yes"===i?1e3:0),(0,o.kH)("base_coverage",m),u<=m&&(m=Math.round(m-u)),(0,o.kH)("frame_".concat(s+1,"_total"),m),(0,o.kH)("currHsaLimit",m),p(function(e){var t=a(e);return t[s]||(t[s]=[]),t[1][0]=m.toString(),t[2][1]=u.toString(),t})},N=function(e,t,r,n,o,a){var l=e+t,i=r,c=n,s=o,u=a;return((l-i)*((Math.pow(1+c/s,u*s)-1)/c)-(l*u-i*u)).toFixed(2)},C=function(e,t,r,n,a){var l=[],i=[],c=[],s=[],u=[];(u=[{5:[1,2,3,4,5],10:[1,2,3,4,5,6,7,8,9,10],15:[2,4,6,8,10,11,12,13,14,15],20:[2,4,6,8,10,12,14,16,18,20],25:[2,4,6,8,10,13,16,19,22,25],30:[3,6,9,12,15,18,21,24,27,30],35:[5,10,15,20,25,27,29,31,33,35],40:[2,5,8,10,15,20,25,30,35,40],45:[2,5,10,15,20,25,30,35,40,45],50:[5,10,15,20,25,30,35,40,45,50]}["".concat(n)],{5:[1,3,5],10:[2,5,10],15:[2,10,15],20:[2,10,20],25:[2,10,25],30:[3,15,30],35:[10,20,35],40:[10,20,40],45:[10,30,45],50:[10,30,50]}["".concat(n)]])[1].map(function(n,l){var c,u=(Number(e)+Number(t))*n,m=Number(e)+Number(t),d=Number(r),p=a,f=Number((0,o._9)("frequencyRate")),b=n;c=0===p?(m-d)*b:(m-d)*((Math.pow(1+p/f,b*f)-1)/p);var h=(0,o._9)("frequencyRate"),y=N(Number(e),Number(t),Number(r),a,Number(h),n);i.push({year:"".concat(n," yrs"),totalHsaContribution:u,totalInvestmentEarnings:Math.round(Number(y))}),s.push({id:l,col1:n,col2:"$".concat(E(u)),col3:"$".concat(E(Math.round(Number(y)))),col4:"$".concat(E(Math.round(c)))})}),u[0].map(function(n,i){var s,u=(Number(e)+Number(t))*n,m=Number(e)+Number(t),d=Number(r),p=a,f=Number((0,o._9)("frequencyRate")),b=n;s=0===p?(m-d)*b:(m-d)*((Math.pow(1+p/f,b*f)-1)/p);var h=(0,o._9)("frequencyRate"),y=N(Number(e),Number(t),Number(r),a,Number(h),n);l.push({year:"".concat(n," years"),totalHsaContribution:u,totalInvestmentEarnings:Math.round(Number(y))}),c.push({id:i,col1:n,col2:"$".concat(E(u)),col3:"$".concat(E(Math.round(Number(y)))),col4:"$".concat(E(Math.round(s)))})}),(0,o.kH)("mtable-dataset",JSON.stringify(s)),(0,o.kH)("table-dataset",JSON.stringify(c)),(0,o.kH)("mbar-dataset",JSON.stringify(i)),(0,o.kH)("bar-dataset",JSON.stringify(l))},q=function(){var e=(0,o._9)("frame_".concat(s));0===s&&w(e),1===s&&function(e){var t=(0,o._9)("frame_1_total"),r=e[1],n=e[2],l=e[3],i=l&&l.includes("%")?Number(l.replace("%",""))/100:Number(l)/100,c=n&&n.includes("%")?Number(n.replace("%",""))/100:Number(n)/100,u=0,m=t/(u="Weekly"===r?52:26),d=t*c,f=t*i;(0,o.kH)("frequencyRate",u),(0,o.kH)("frequencyRateAmt",Math.round(m)),(0,o.kH)("stateRate",i),(0,o.kH)("state_savings",Math.round(f)),(0,o.kH)("fed_savings",Math.round(d)),(0,o.kH)("fedRate",c),(0,o.kH)("frequency",r),p(function(e){var r=a(e);return r[s]||(r[s]=[]),r[2][4]=t.toString(),r})}(e),2===s&&function(e){var t,r=(0,o._9)("frame_1_total"),n=(0,o._9)("employer_contribution")||0,a=e[2]||0,l=e[3],i=Number(e[0]),c=Number(r)+Number(n),s=Number(a),u=l/100,m=Number((0,o._9)("frequencyRate")),d=i,p=Number((0,o._9)("fedRate")),f=Number((0,o._9)("stateRate")),b=Number(r),h=(Number(r)+Number(n))*i,y=Number(a)*Number(i),g=h-y,v=N(Number(r),Number(n),Number(a),u,Number(m),i);(0,o.kH)("newHSACalculationResult",v);var x=(t=0===u?(c-s)*d:(c-s)*((Math.pow(1+u/m,d*m)-1)/u))-(c*d-s*d),_=x,E=t,S=x*(p+f),A=b*i*(p+f);C(Number(r),Number(n),Number(a),i,u),(0,o.kH)("totalGrossHsaContribution",Math.round(h)),(0,o.kH)("plannedMedicalExpenses",Math.round(y)),(0,o.kH)("netHSAContributions",Math.round(g)),(0,o.kH)("estimatedEarnings",Math.round(_)),(0,o.kH)("futureHsaValue",E.toFixed(2)),(0,o.kH)("taxSavings",S.toFixed(2)),(0,o.kH)("grossTaxSavings",Math.round(A)),(0,o.kH)("averageRateOfReturn",l)}(e)};return(0,n.useEffect)(function(){v(function(e){var t=a(e);return t[s]=i[s].questions.map(function(){return""}),t})},[s,i]),(0,n.useEffect)(function(){var e=(0,o._9)("frame_1_total");e&&p(function(t){var r=a(t);return r[s]||(r[s]=i[s].questions.map(function(){return""})),1===s&&(r[1][0]=e),2===s&&(r[2][4]=e,r[2][1]=(0,o._9)("employer_contribution")||"0",r[2][2]=r[2][2]||"0"),r})},[s,i]),{step:s,currentFrame:_,model:i,answers:d,authoringData:e.authoringData,handlePrev:function(){(0,o.kH)("hsac-currStep",s-1),u(function(e){return e-1}),r(),s-1==0&&setTimeout(function(){var e=document.querySelector(".o5-hsac-question__section-title");e&&e.focus()},100)},handleNext:function(e){e.preventDefault();var r,n=(r=_.questions.map(function(e,t){var r,n=(null===(r=d[s])||void 0===r?void 0:r[t])||"",a=d[2]||[],i=Number(a[4]||0)+Number(a[1]||0),c=Number((0,o._9)("frame_1_total")||0)>i,u=Number((0,o._9)("currHsaLimit")||0),m=Number((0,o._9)("employer_contribution")||0);if(e.errorMsg){var p=document.querySelector(".o5-hsac-frame-button__cta-section-btn");p&&p.blur(),setTimeout(function(){var e=document.querySelector(".Mui-error:first-child input"),t=document.querySelector(".Mui-error:first-child span"),r=document.querySelectorAll(".Mui-error .MuiInputBase-input")[0];e&&0===s&&(e.focus(),t.classList.add("Mui-focusVisible")),r&&0!==s&&r.focus();var n=l(["#error-msg-s0q0","#error-msg-s0q1","#error-msg-s0q2"].map(function(e){return document.querySelector(e)}),3),o=n[0],a=n[1];if(n[2]&&!a&&!o){var i=document.querySelector("#text-field-s0q2");i&&(t&&t.classList.remove("Mui-focusVisible"),i.focus())}},50)}if(0===s&&2===t){var f,b;if("Yes"!==(null===(f=d[0])||void 0===f?void 0:f[2]))return""===(null===(b=d[0])||void 0===b?void 0:b[2])?"Please make a selection.":"";var h=(0,o._9)("frame_0")||[];w(h);var y=(0,o._9)("base_coverage")||0;if(Number((0,o._9)("currHsaLimit")||0)&&m>y)return e.errorMsg;if(!m||0==m){var g=document.querySelector("#error-msg-s0q2");return g&&(g.style.display="inline-block"),e.errorMsg}}if(1===s&&0===t){if(Number(n)>u)return"This amount is larger than the maximum allowable HSA contribution. Please enter a smaller amount.";if(0===Number(n))return"Please enter dollar amount."}if(1===s&&3===t&&0===Number(n))return"Please enter dollar amount.";if(2===s&&4===t&&Number(a[4]||0)>u)return"This amount is larger than the maximum allowable HSA contribution. Please enter a smaller amount.";if(2===s&&1===t){if(!c&&""===n)return"Please enter dollar amount. If zero, enter 0.";if(Number(n)>m)return"Amount Contributed by others cannot exceed your allowable HSA contribution less any amount you plan to contribute each year."}return""===n?e.errorMsg:""}),v(function(e){var t=a(e);return t[s]=r,t}),!!r.every(function(e){return""===e}));n&&(q(),(0,o.kH)("hsac-currStep",s+1),u(function(e){return e+1}),t(),setTimeout(function(){var e=document.querySelector(".o5-hsac-steps-topper__header");e&&e.focus()},100))},handleAnswerChange:A,showContributions:b,questionRefs:x,err:g}};var u=r(64609),m=r(8239),d=r(59863),p=r(16167),f=r(53313);const b=function(e){var t=e.totalSavings,r=e.federalSavings,o=e.stateSavings;return n.createElement(m.Ay,{className:"o5-hsac-piegraph__container",item:!0,rowSpacing:{xs:0,sm:1,md:1},columnSpacing:{xs:1,sm:3,md:3},sx:{backgroundColor:"#fff",borderRadius:"8px",padding:"16px",flexWrap:"wrap"}},n.createElement(m.Ay,{item:!0,xs:12,sm:6,md:6},n.createElement(f.A,{sx:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},n.createElement(f.A,{sx:{width:"100%",minWidth:"177px",maxWidth:"200px",aspectRatio:"1 / 1"}},n.createElement(p.r,{series:[{data:[{id:0,value:r,label:"Federal Tax",color:"#2781C4"},{id:1,value:o,label:"State Tax",color:"#D1D3D4"}],outerRadius:75,innerRadius:60,paddingAngle:0,cornerRadius:0,cx:"100%"}],slotProps:{legend:{hidden:!0}},sx:{width:"100%",height:"100%"}})))),n.createElement(m.Ay,{item:!0,xs:12,sm:6,md:6},n.createElement(f.A,{sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%",alignItems:"flex-start",justifyContent:"center"}},n.createElement("p",{className:"o5-hsac-piegraph__legend-header"},"Annual savings: $",t),n.createElement("p",{className:"o5-hsac-piegraph__legend-item"},n.createElement("span",{className:"o5-hsac-piegraph__legend-icon fed--variant","aria-hidden":"true"}),"Federal tax"),n.createElement("p",{className:"o5-hsac-piegraph__legend-item"},n.createElement("span",{className:"o5-hsac-piegraph__legend-icon state--variant","aria-hidden":"true"}),"State tax"))))};var h=function(e){var t=e.step,r=e.onPrev,a=function(e){return Intl.NumberFormat("en-US").format(e)},l={textTransform:"none",fontWeight:"bold",color:"#095F87",textDecoration:"underline",display:"inline-block",textAlign:"left",padding:0,"&:hover":{backgroundColor:"transparent",textDecoration:"underline",color:"#05344A"},"&.Mui-focusVisible":{border:0,borderRadius:0,outline:"solid",outlineColor:"#232220",outlineOffset:"4px",outlineWidth:"2px",boxShadow:"none"},".MuiButton-endIcon":{marginLeft:"2px"}};switch(t){case 1:var i="No or unsure"===(0,o._9)("frame_0")[2],c=(0,o._9)("employer_contribution"),s=(0,o._9)("base_coverage"),p=(0,o._9)("frame_0")[1];return n.createElement("div",{className:"o5-hsac-steps-topper"},n.createElement("div",{className:"o5-hsac-steps-topper__content"},n.createElement("h2",{className:"o5-hsac-steps-topper__header",tabIndex:-1},"Step 1 results: Maximum contribution"),i?n.createElement(n.Fragment,null,n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"In ",p,", your maximum allowable HSA contribution is ",n.createElement("strong",null,"$",a(s)),"."),n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"This amount equals your allowable HSA contribution (based on coverage type, tax year and any allowable catch-up contribution).")):n.createElement(n.Fragment,null,n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"In ",p,", your maximum allowable HSA contribution is ",n.createElement("strong",null,"$",a(s)),". Because your employer is contributing $",a(c)," to your HSA, you can contribute up to ",n.createElement("strong",null,"$",a(s-c)),"."),n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"This amount equals your allowable HSA contribution (based on coverage type, tax year and any allowable catch-up contribution), minus contributions from your employer or others.")),n.createElement(u.A,{autoFocus:!0,className:"o5-hsac-steps-topper__btn",sx:l,onClick:r,endIcon:n.createElement(d.A,{sx:{marginLeft:"2px",paddingLeft:0,paddingRight:0}}),disableRipple:!0},"Recalculate maximum contribution")));case 2:var f=(0,o._9)("frame_0")[1],h=(0,o._9)("frequencyRateAmt"),y=(0,o._9)("frame_1_total"),g=(0,o._9)("frame_1"),v="string"==typeof g[1]?g[1].toLowerCase():"",x=Number((0,o._9)("fed_savings")),_=Number((0,o._9)("state_savings")),E=Number(y)+Number((0,o._9)("employer_contribution")),S=x+_;return n.createElement("div",{className:"o5-hsac-steps-topper"},n.createElement(m.Ay,{className:"o5-hsac-steps-topper__content",container:!0,direction:"column",columnSpacing:0,rowSpacing:1,sx:{background:"#E0F3DF",border:"1px solid #066605",borderRadius:"8px",padding:"16px",alignItems:"stretch",marginTop:0}},n.createElement("h2",{className:"o5-hsac-steps-topper__header",tabIndex:-1},"Step 2 results: Annual tax savings"),n.createElement(m.Ay,{container:!0,rowSpacing:{xs:0,sm:1,md:1},columnSpacing:{xs:1,sm:3,md:3}},n.createElement(m.Ay,{item:!0,rowSpacing:0,xs:12,md:5},n.createElement(b,{totalSavings:S,federalSavings:x,stateSavings:_})),n.createElement(m.Ay,{item:!0,rowSpacing:0,direction:"column",xs:12,md:7},n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"Based on your planned HSA contribution of ",n.createElement("strong",null,"$",a(y)),":"),n.createElement("ul",null,n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your ",v," contribution amount: ",n.createElement("strong",null,"$",a(h))),n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your total HSA contribution (including contributions from others): ",n.createElement("strong",null,"$",a(E))),n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your federal tax savings for ",f,": ",n.createElement("strong",null,"$",a(x))),n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your state tax savings for ",f,": ",n.createElement("strong",null,"$",a(_)))),n.createElement(u.A,{autoFocus:!0,className:"o5-hsac-steps-topper__btn",sx:l,onClick:r,endIcon:n.createElement(d.A,{sx:{marginLeft:"2px",paddingLef
2t:0,paddingRight:0}}),disableRipple:!0},"Recalculate tax savings")))))}return n.createElement(n.Fragment,null)};const y=(0,n.memo)(h);var g=function(e){var t=e.headingTxt;return n.createElement(n.Fragment,null,n.createElement("h1",{className:"o5-hsac-heading"},t))};const v=(0,n.memo)(g);var x=r(27716),_=r(14073),E=r(50779),S=r(29428),A=r(52629),w=r(32814),N=r(13225),C=r(25239),q=r(75732),H=r(58363),M=r(39262),F=r(9483),k=r(39781),T=r(90891),I=r(87558);function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const R=function(e){var t=e.currQuestionId,r=e.toolTip,o=e.currQuestion,a=O((0,n.useState)(null),2),l=a[0],i=a[1],c=(0,n.useRef)(null),s=(0,n.useRef)(null),m=O((0,n.useState)(""),2),d=(m[0],m[1],function(){s.current&&(s.current.setAttribute("tabindex","-1"),s.current.focus(),setTimeout(function(){s.current&&s.current.setAttribute("tabindex","0")},100))}),p=function(e){l||(s.current=e.currentTarget),i(l?null:e.currentTarget),l&&d()},b=function(){i(null),setTimeout(function(){d()},50)};(0,n.useEffect)(function(){var e=function(e){if(l)if("Escape"===e.key)e.preventDefault(),i(null),setTimeout(function(){d()},50);else if("Enter"===e.key){var r=document.getElementById(y),n=document.querySelector("#".concat(y,' button[aria-label="Close"]')),o=document.activeElement;r&&o&&(r.contains(o)||o===n||o.id==="tooltip-trigger-".concat(t))&&(e.preventDefault(),b())}};return l&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[l]);var h=Boolean(l),y=h?t:void 0;return n.createElement("div",{className:"o5-hsac-tooltip",style:{position:"relative",display:"inline-block"}},h&&n.createElement("div",{className:"o5-hsac-tooltip__arrow",ref:c,style:{position:"absolute",transform:"rotate(45deg)",width:"10px",height:"10px",background:"#FFF",border:"1px solid #CECDCA",left:"16px",top:"-15px",borderStyle:"none solid solid none",zIndex:"1"}}),n.createElement(u.A,{id:"tooltip-trigger-".concat(t),autoFocus:!0,"aria-label":"More information on ".concat(o),sx:{minWidth:"0",padding:"0",margin:"0 0 0 8px","&:hover":{backgroundColor:"transparent"},"&.Mui-focusVisible":{outline:"2px solid #000000",borderRadius:0},"&:focus-within":{".MuiSvgIcon-root":{fill:"#000000"}}},onClick:p,disableRipple:!0,disableFocusRipple:!0},n.createElement(T.A,null)),n.createElement(I.A,{id:y,open:h,anchorEl:l,role:"dialog","aria-label":"More information","aria-describedby":"tooltip-content-".concat(t),placement:"top",sx:{bottom:"30px"},disablePortal:!0,modifiers:[{name:"flip",enabled:!1,options:{altBoundary:!1,rootBoundary:"document",padding:8}},{name:"preventOverflow",enabled:!0,options:{altAxis:!1,altBoundary:!0,tether:!0,rootBoundary:"document",padding:8}},{name:"arrow",enabled:!0,options:{element:c.current}}]},n.createElement(f.A,{className:"o5-hsac-tooltip__content",sx:{border:"1px solid #CECDCA",bgcolor:"#fff",padding:"16px 40px 16px 16px",borderRadius:"4px",position:"relative",minWidth:"275px",maxWidth:"375px",width:"100%",bottom:"10px",boxShadow:"0 4px 16px 0 rgb(25 25 26 / 16%)"}},n.createElement(u.A,{disableFocusRipple:!0,disableRipple:!0,autoFocus:!0,sx:{display:"flex",minWidth:"0",position:"absolute",padding:0,top:"16px",right:"16px","&:hover":{backgroundColor:"transparent"}
2,"&.Mui-focusVisible":{outline:"2px solid #000000",borderRadius:0}},"aria-label":"Close",onBlur:b,onClick:p},n.createElement(k.A,{fontSize:"small",sx:{fill:"#3D3C38","&:hover":{fill:"#000000"}}})),n.createElement("p",{id:"tooltip-content-".concat(t)},r))))};var j=r(11848),P=r(94805);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach(function(t){z(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function z(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var V={color:"#3D3C38",".MuiRadio-root .Mui-focusVisible":{border:"2px solid #000000",borderRadius:"50%"},"&.Mui-focusVisible":{outline:"2px solid #000000",outlineOffset:"-9px"},"&.Mui-checked":{color:"#3D3C38"}},U={maxWidth:"310px","& .MuiOutlinedInput-notchedOutline":{borderColor:"inherit"},"& .MuiOutlinedInput-root":{borderColor:"#3D3C38"},".Mui-selected":{backgroundColor:"rgba(0, 0, 0, 0.12)"},".Mui-selected:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"MuiButtonBase-root-MuiMenuItem-root.Mui-disabled":{backgroundColor:"#FFF !important"},".MuiButtonBase-root-MuiMenuItem-root.Mui-selected":{backgroundColor:"rgba(0, 0, 0, 0.12)"},"MuiButtonBase-root-MuiMenuItem-root.Mui-selected.Mui-focusVisible":{backgroundColor:"rgba(0, 0, 0, 0.12)"},"& .MuiSelect-icon":{color:"#3D3C38"}},G={"&.MuiMenuItem-root.Mui-selected":{backgroundColor:"#232220",color:"#FFFFFF","&:after":{display:"block",width:"auto",color:"#FFFFFF",position:"absolute",right:"15px",fontSize:"24px"}},"&.MuiMenuItem-root:hover":{backgroundColor:"#232220",color:"#FFFFFF"},"&.MuiMenuItem-root.Mui-focusVisible":{border:"2px solid #232220",backgroundColor:"#FFF"},"&.MuiMenuItem-root.Mui-disabled":{backgroundColor:"#FFF !important"},"&.MuiMenuItem-root.Mui-selected:hover":{backgroundColor:"#232220",color:"#FFFFFF","&:after":{color:"#FFFFFF"}},"&.MuiMenuItem-root.Mui-selected:focus":{backgroundColor:"#232220",color:"#FFFFFF"}},J={maxWidth:"310px",borderColor:"#3D3C38","& .MuiOutlinedInput-root":{borderColor:"#3D3C38","& .MuiOutlinedInput-notchedOutline":{borderColor:"inherit"},"&:hover fieldset":{borderColor:"#232220"},"&.Mui-focused fieldset":{borderColor:"#232220"}},"& .MuiInputBase-input::placeholder":{color:"#767676",opacity:1}}
2,Q={"& .MuiFormControlLabel-label":{color:"#3D3C38",fontFamily:"inherit",fontWeight:"inherit",letterSpacing:"inherit",fontSize:"inherit",lineHeight:"inherit"}},K=(0,j.Ay)(P.Ay)({border:"1px solid black",borderRadius:"4px",padding:"8px 12px","&:hover":{borderColor:"#232220"},"&.Mui-focused":{borderColor:"#3D3C38",borderWidth:"3px"},"&.Mui-error":{borderColor:"#f44336",borderWidth:"1px"},"&.Mui-error.Mui-focused":{borderColor:"#f44336",borderWidth:"3px"}});const X=n.memo(function(e){var t=e.idx,r=e.step,a=e.data,l=e.value,i=e.error,c=e.onChange,s=a.type,u=a.question,m=a.toolTip,d=a.answers,p=a.placeHolderText,b=a.showSecondaryTextField,h=a.subText,y=a.errorMsg,g=W((0,n.useState)(""),2),v=g[0],k=g[1],T=!(0!==r||2!==t||!(0,o._9)("employer_contribution"))&&(0,o._9)("employer_contribution"),I=function(e){if(0===r&&("Tab"===e.key||"ArrowUp"===e.key||"ArrowDown"===e.key)){var t=document.querySelector(".o5-hsac-question__section_zero");if(!t)return;var n=function(e){var t=e.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])');return Array.from(t)}(t);if(0===n.length)return;if(n.length>=8){var o=n[6],a=n[8],l=n[9];if(document.activeElement===o||document.activeElement===l||document.activeElement===a){var i=document.querySelector("#text-field-s0q2");i&&setTimeout(function(){i.parentElement.classList.remove("Mui-focused")},0)}}}};(0,n.useEffect)(function(){if(0===r)return setTimeout(function(){document.querySelector(".o5-hsac-question__section_zero")&&document.addEventListener("keydown",I)},500),function(){document.removeEventListener("keydown",I)}},[r]),(0===r&&2===t||1===r&&0===t||2===r&&1===t||2===r&&2===t)&&(y=i);var O=function(e){var t=e.target.getAttribute("data-question"),r=e.target.value;if("s2q3"===t)r=r.replace(/[^\d.]/g,"").replace(/(\..*)\./g,"$1");else{if("s2q4"===t)return;r=r.replace(/[^0-9]/g,"")}c&&c(B(B({},e),{},{target:B(B({},e.target),{},{value:r})}))},D=function(){return h?n.createElement(_.A,{className:"o5-hsac-question__subtext",id:"o5-hsac-question__subtext-".concat(t),sx:{color:"#3D3C38",fontSize:"0.875rem",marginTop:"4px",marginBottom:"8px"},dangerouslySetInnerHTML:{__html:h}}):null};switch(s){case"radio":return n.createElement(E.A,{className:"o5-hsac-question",margin:"none",error:Boolean(i),sx:Q,component:"div"},n.createElement("div",{className:"o5-hsac-question"},n.createElement("div",{className:"o5-hsac-question__question-head",style:{justifyContent:"flex-start"}},n.createElement("p",{id:"form-label-s".concat(r,"q").concat(t),className:"o5-hsac-question__question-title"},u),null!==m&&n.createElement(R,{currQuestionId:"form-label-s".concat(r,"q").concat(t),toolTip:m,currQuestion:u})),D(),n.createElement(S.A,{className:"dmp-type__body-2",sx:{display:"inline-flex",alignItems:"flex-start"},value:l,onChange:c,"aria-labelledby":"form-label-s".concat(r,"q").concat(t),"aria-describedby":i?"error-msg-s".concat(r,"q").concat(t):void 0,onKeyDown:function(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();var t=document.activeElement;if(t){var r=t.classList.contains("MuiRadio-root")?t:t.querySelector(".MuiRadio-root");if(r)return r.click(),!1;var n=t.closest(".MuiFormControlLabel-root");if(n){var o=n.querySelector('input[type="radio"]');if(o)return o.click(),!1}}}}},d.map(function(e,o){return n.createElement(A.A,{key:o,value:e,htmlFor:"radio-s".concat(r,"q").concat(t,"-").concat(o),control:n.createElement(w.A,{id:"radio-s".concat(r,"q").concat(t,"-").concat(o),sx:V,disableTouchRipple:!0,disableFocusRipple:!0,disableRipple:!0}),label:e})})),"yes"===l.toLowerCase()&&b&&n.createElement(f.A,{mt:2},n.createElement(N.A,{htmlFor:"text-field-s".concat(r,"q").concat(t),className:"o5-hsac-question__contributions-label"},"Enter total amount to be contributed by employer or someone else"),n.createElement(K,{sx:J,id:"text-field-s".concat(r,"q").concat(t),size:"small",value:T||v,onChange:function(e){var n=e.target.value;if(/^\d*$/.test(n)){if(k(n),(0,o.kH)("employer_contribution",n),i){var a=document.querySelector("#error-msg-s0q2");a&&(a.style.display="none")}if(c&&n&&"0"!==n){var l=B(B({},e),{},{target:B(B({},e.target),{},{value:n,name:"contribution_".concat(r,"_").concat(t),id:"text-field-s".concat(r,"q").concat(t),dataset:{specialField:"contribution"}})});c(l)}}},startAdornment:n.createElement(C.A,{id:"o5-hsac-question__unit-s".concat(r,"q").concat(t),position:"start",sx:{marginRight:"3px"}},"$"),inputProps:{inputMode:"numeric","aria-required":!0,"aria-describedby":["o5-hsac-question__unit-s".concat(r,"q").concat(t),i?"error-msg-s".concat(r,"q").concat(t):null].filter(
2Boolean).join(" "),autoFocus:!1}}))),i&&n.createElement(_.A,{id:"error-msg-s".concat(r,"q").concat(t),color:"error",sx:{display:"flex",alignItems:"flex-start"}},n.createElement(M.A,{"aria-label":"Error","aria-hidden":"false",role:"img",sx:{color:"#D71515",marginRight:"4px"}}),y));case"select":var j=2===r&&0===t?"years":"";return n.createElement(E.A,{className:"o5-hsac-question",error:Boolean(i),component:"div",margin:"none",sx:{maxWidth:"310px"}},n.createElement("div",{className:"o5-hsac-question"},n.createElement("div",{className:"o5-hsac-question__question-head",style:{justifyContent:"space-between"}},n.createElement(N.A,{id:"form-label-s".concat(r,"q").concat(t),className:"o5-hsac-question__question-title"},u),null!==m&&n.createElement(R,{currQuestionId:"form-label-s".concat(r,"q").concat(t),toolTip:m,currQuestion:u})),D(),n.createElement(q.A,{input:n.createElement(K,null),sx:U,value:l,onChange:c,displayEmpty:!0,size:"small",IconComponent:F.A,id:"select-s".concat(r,"q").concat(t),"aria-describedby":i?"error-msg-s".concat(r,"q").concat(t):h?"o5-hsac-question__subtext-".concat(t):void 0,labelId:"form-label-s".concat(r,"q").concat(t),variant:"standard",MenuProps:{disableScrollLock:!0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:{maxHeight:248}}}},n.createElement(H.A,{value:"",disabled:!0},p||"Select option"),d.map(function(e,t){return"object"===L(e)?n.createElement(H.A,{key:t,value:e.state},e.state):n.createElement(H.A,{key:t,value:e,sx:G},n.createElement(f.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"}},e," ",j,n.createElement(x.A,{className:"CheckIcon",sx:{color:"#FFF",marginLeft:"auto",display:"none",".Mui-selected &":{display:"block","&:hover":{color:"#000000"}}}})))}))),i&&n.createElement(_.A,{id:"error-msg-s".concat(r,"q").concat(t),color:"error",sx:{display:"flex",alignItems:"flex-start"}},n.createElement(M.A,{"aria-label":"Error","aria-hidden":"false",role:"img",sx:{color:"#D71515",marginRight:"4px"}}),y));case"text":var P="o5-hsac-question__unit-s".concat(r,"q").concat(t),$="$"===p;return n.createElement(E.A,{className:"o5-hsac-question",error:Boolean(i),component:"div",margin:"none",sx:{maxWidth:"310px"}},n.createElement("div",{className:"o5-hsac-question"},n.createElement("div",{className:"o5-hsac-question__question-head",style:{justifyContent:"space-between"}},n.createElement(N.A,{htmlFor:"text-field-s".concat(r,"q").concat(t),className:"o5-hsac-question__question-title"},u),null!==m&&n.createElement(R,{currQuestionId:"form-label-s".concat(r,"q").concat(t),toolTip:m,currQuestion:u})),D(),n.createElement(K,{sx:J,id:"text-field-s".concat(r,"q").concat(t),size:"small",fullWidth:!0,placeholder:$?void 0:p,value:l,error:Boolean(i),readOnly:2===r&&(0===t||1===t),onChange:function(e){return O(e)},startAdornment:$?n.createElement(C.A,{id:P,position:"start",sx:{marginRight:"3px"}},"$"):void 0,inputProps:{inputMode:"numeric",pattern:"[0-9]*","data-question":"s".concat(r,"q").concat(t),"aria-required":!0,"aria-describedby":[$?P:null,i?"error-msg-s".concat(r,"q").concat(t):h?"o5-hsac-question__subtext-".concat(t):null].filter(Boolean).join(" ")||void 0}})),i&&n.createElement(_.A,{id:"error-msg-s".concat(r,"q").concat(t),color:"error",sx:{display:"flex",alignItems:"flex-start"}},n.createElement(M.A,{"aria-label":"Error","aria-hidden":"false",role:"img",sx:{color:"#D71515",marginRight:"4px"}}),y));default:return null}});const Z=function(e){var t=e.data,r=e.onClick,o=t.ctaLabel,a=t.ctaText;return n.createElement("div",{className:"o5-hsac-frame-button"},n.createElement("div",{className:"o5-hsac-frame-button__cta-section-content"},n.createElement("p",{id:"o5-cta-section-disclaimer",className:"o5-hsac-frame-button__cta-section-disclaimer dmp-type__small-1"},o),n.createElement("button",{"aria-describedby":"o5-cta-section-disclaimer",className:"o5-hsac-frame-button__cta-section-btn dmp-btn dmp-btn--md dmp-btn--1",onClick:r},a)))};var ee=function(e){var t=e.data,r=t.formDescription,o=t.formImage;return n.createElement("div",{className:"o5-hsac-intro-topper"},n.createElement("div",{className:"o5-hsac-intro-topper__txt-container dmp-col-12 dmp-col-lg-8"},n.createElement("div",{className:"o5-hsac-intro-topper__txt-content",dangerouslySetInnerHTML:{__html:r}}
2)),n.createElement("div",{className:"o5-hsac-intro-topper__img-container dmp-col-12 dmp-col-md-4"},n.createElement("img",{className:"o5-hsac-intro-topper__img",src:o,alt:""})))};const te=(0,n.memo)(ee);function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ne(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ne(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const oe=function(e){var t=e.data,r=e.onNext,o=e.onPrev,a=s(t,r,o),l=a.model,i=a.answers,c=a.authoringData,u=a.handlePrev,d=a.handleNext,p=a.handleAnswerChange,b=a.err,h=re((0,n.useState)(t.currStep),2),g=(h[0],h[1]),x=t.currStep,_=(0,n.useRef)(null);(0,n.useEffect)(function(){g(x),0===x?(document.body.focus(),window.scrollTo(0,0),document.documentElement.scrollTop=0,document.body.scrollTop=0):setTimeout(function(){if(_.current){var e=_.current.querySelector('input, select, button, [tabindex="-1"], [tabindex]');e&&e.focus()}},100)},[x]);var E=function(e){d(e)},S=function(){u()};return n.createElement(n.Fragment,null,n.createElement(v,{headingTxt:l[0].componentHeader}),n.createElement("div",{className:"o5-hsac__content"},function(){switch(x){case 0:return n.createElement("div",{className:"o5-hsac-question__section_zero"},n.createElement(te,{data:c}),n.createElement("section",{className:"o5-hsac-question__section"},n.createElement(f.A,{sx:{marginBottom:"32px"}},n.createElement("h2",{className:"o5-hsac-question__section-title",tabIndex:-1},l[x].heading),n.createElement("p",{className:"o5-hsac-question__section-subtxt"},l[x].subTxt)),n.createElement(m.Ay,{container:!0,rowSpacing:{xs:3,sm:4,md:4},columnSpacing:{xs:1,sm:2,md:3},component:"form"},l[x].questions.map(function(e,t){return n.createElement(m.Ay,{item:!0,xs:12,md:6,key:"step".concat(x,"-question").concat(t)},n.createElement(X,{step:x,key:t,idx:t,error:b[x][t],data:e,value:i[x][t],onChange:function(e){return p(t,e)}}))}),n.createElement(Z,{data:l[x],onClick:E}))));case 1:case 2:return n.createElement("div",{ref:_},n.createElement(y,{step:x,onPrev:S}),n.createElement("section",{className:"o5-hsac-question__section"},n.createElement(f.A,{sx:{marginBottom:"32px"}},n.createElement("h2",{className:"o5-hsac-question__section-title"},l[x].heading),n.createElement("p",{className:"o5-hsac-question__section-subtxt"},l[x].subTxt)),n.createElement(m.Ay,{container:!0,rowSpacing:{xs:3,sm:4,md:4},columnSpacing:{xs:1,sm:2,md:3},component:"form"},l[x].questions.map(function(e,t){return n.createElement(m.Ay,{item:!0,xs:12,md:6,key:"step".concat(x,"-question").concat(t)},n.createElement(X,{step:x,key:t,idx:t,error:b[x][t],data:e,value:i[x][t],onChange:function(e){return p(t,e)}}))}),n.createElement(Z,{data:l[x],onClick:E}))));default:return null}}()))};var ae=function(e){var t=e.authoringData,r=t.blueCardDescription,o=t.ctaLinkLabel,a=t.ctaLinkURL;return n.createElement("div",{className:"o5-hsac-bluecard"},n.createElement("div",{className:"o5-hsac-bluecard__blueCardDescription",dangerouslySetInnerHTML:{__html:r}}),n.createElement("a",{className:"dmp-btn dmp-btn--md dmp-btn--2 o5-hsac-bluecard__link",href:a},o))};const le=(0,n.memo)(ae);var ie=r(80643),ce=r(11641),se=r(97330),ue=r(58763),me=r(10609),de=r(75765);function pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var be=function(){return n.createElement(de.A,{"aria-labelledby":"pdf-icon-id",role:"img",focusable:"false",className:"svgIcon"},n.createElement("title",{id:"pdf-icon-id"},"PDF"),n.createElement("path",{role:"presentation",d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"}))};const he=function(e){var t=e.data,r=t.modelTopDescription,o=t.modelBottomDescription,a=t.modelCtaText,l=pe((0,n.useState)(!1),2),i=l[0],c=l[1],s=(0,n.useRef)(),d=function(){c(!1)};return(0,n.useEffect)(function(){var e=document.querySelector(".svgIcon");e&&e.removeAttribute("aria-hidden")},[]),n.createElement(n.Fragment,null,n.createElement(u.A,{className:"dmp-btn dmp-btn--md dmp-btn--1 o5-hsac-downloadDialog__open-btn",endIcon:n.createElement(be,null),sx:{textTransform:"none"},variant:"outlined",autoFocus:!0,disableRipple:!0,onClick:function(){c(!0)}},"Save results"),n.createElement(ie.A,{onClose:d,"aria-labelledby":"o5-hsac-downloadDialog__modelTopDescription",open:i,PaperProps:{"aria-modal":"true"}},n.createElement("div",{className:"o5-hsac-downloadDialog__close-btn-container"},n.createElement(ce.A,{className:"o5-hsac-downloadDialog__close-btn",autoFocus:!0,disableRipple:!0,"aria-label":"close",onClick:d,sx:{color:"#000000",borderRadius:0}},n.createElement(k.A,null))),n.createElement(se.A,{sx:{".MuiDialogContent-root":{padding:"32px"}}},n.createElement("div",{className:"o5-hsac-downloadDialog__modelTopDescription",id:"o5-hsac-downloadDialog__modelTopDescription",dangerouslySetInnerHTML:{__html:r}}),n.createElement(ue.A,{autoFocus:!0,onClick:d},n.createElement(m.Ay,{container:!0,justifyContent:"center"},n.createElement(u.A,{className:"o5-hsac-downloadDialog__download-btn dmp-btn dmp-btn--md dmp-btn--1",disableRipple:!0,disableFocusRipple:!0,sx:{textTransform:"none"},endIcon:n.createElement(me.A,null),onClick:function(){e.handleSavePdf(),d()},ref:s},a," PDF"))),n.createElement("div",{className:"o5-hsac-downloadDialog__modelBottomDescription",dangerouslySetInnerHTML:{__html:o}}))))};var ye=r(20354),ge=r.n(ye),ve=r(10947),xe=r(33572);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(r),!0).forEach(function(t){Ae(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ae(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_e(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ne(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Ce=function(e){var t=e.dataset,r=e.mobileDataset,o=we((0,n.useState)(!0),2),a=o[0],l=o[1],i=we((0,n.useState)(!0),2),c=i[0],s=i[1],u={totalHsaContribution:"Total HSA contributions",totalInvestmentEarnings:"Total investment and interest earnings"};(0,n.useEffect)(function(){var e=document.querySelector("#main-content"),t=function(){var t=e?e.getBoundingClientRect().width:window.innerWidth;l(t>=525),s(t>=753)};if(t(),e&&"undefined"!=typeof ResizeObserver){var r=new ResizeObserver(t);return r.observe(e),function(){return r.disconnect()}}return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}},[]);var m;return n.createElement(f.A,{className:"o5-hsac-bargraph__container",sx:{width:"100%",height:"100%",maxHeight:"540px",backgroundColor:"#fff",borderRadius:"8px"}},n.createElement("p",{className:"o5-hsac-bargraph__heading"},"Roll over the bars to view the estimated value."),n.createElement(xe.E,{className:"o5-hsac-bargraph__graph",dataset:a?t:r,series:(m=[{dataKey:"totalHsaContribution",stack:"futureValue",color:"#15A796",valueFormatter:function(e){return"$".concat(e.toLocaleString())}},{dataKey:"totalInvestmentEarnings",stack:"futureValue",color:"#c72887",valueFormatter:function(e){return"$".concat(e.toLocaleString())}}],m.map(function(e){return Se(Se({},e),{},{label:u[e.dataKey]})})),xAxis:[{scaleType:"band",dataKey:"year",tickPlacement:"middle"}],yAxis:[{valueFormatter:function(e){return"$".concat(e.toLocaleString())}}],slotProps:{legend:{position:{vertical:"bottom",horizontal:"middle"},direction:c?"row":"column",itemGap:c?50:10}},sx:{width:"100%",minWidth:"372px"},height:372,borderRadius:8,grid:{horizontal:!0},margin:{left:50,bottom:c?100:160}}))};const qe=(0,n.memo)(Ce);var He=r(64137),Me=r(43884),Fe=r(14774),ke=r(96627),Te=r(86798);function Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Oe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var De=function(e){var t=e.dataset,r=e.mobileDataset,o=Ie((0,n.useState)(!0),2),a=o[0],l=o[1],i=t,c=r;(0,n.useEffect)(function(){var e=document.querySelector("#main-content"),t=function(){var t=e?e.getBoundingClientRect().width:window.innerWidth;l(t>=525)};if(t(),e&&"undefined"!=typeof ResizeObserver){var r=new ResizeObserver(t);return r.observe(e),function(){return r.disconnect()}}return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}},[]);var s=[{field:"col1",headerName:"Years",sortable:!1,flex:0,disableColumnMenu:!0,headerClassName:"o5-hsac-table__col-header",headerAlign:"center",cellClassName:"o5-hsac-table__cell",width:60},{field:"col2",headerName:"Total net HSA contributions",sortable:!1,flex:0,disableColumnMenu:!0,headerClassName:"o5-hsac-table__col-header",headerAlign:"center",cellClassName:"o5-hsac-table__cell",width:100},{field:"col3",headerName:"Earnings on net HSA contributions",sortable:!1,flex:0,disableColumnMenu:!0,headerClassName:"o5-hsac-table__col-header",headerAlign:"center",cellClassName:"o5-hsac-table__cell",width:108},{field:"col4",headerName:"Future value of HSA",sortable:!1,flex:0,disableColumnMenu:!0,headerClassName:"o5-hsac-table__col-header",headerAlign:"center",cellClassName:"o5-hsac-table__cell",width:100}],u=[{field:"col1",headerName:"Years",flex:1,sortable:!1,disableColumnMenu:!0,headerClassName:"o5-hsac-table__col-header",headerAlign:"center",cellClassName:"o5-hsac-table__cell"},{field:"col2",headerName:"Future value of HSA",flex:1,sortable:!1,disableColumnMenu:!0,headerClassName:"o5-hsac-table__col-header",headerAlign:"center",cellClassName:"o5-hsac-table__cell"}],m=a?"300px":"0";return n.createElement(f.A,{className:"o5-hsac-table__container",sx:{width:"100%",minHeight:m,background:"#fff",borderRadius:"8px"}},n.createElement(He.A,{sx:{border:0}},n.createElement("caption",{className:"visually-hidden"},"Contribution Details"),n.createElement(ke.A,null,n.createElement(Te.A,null,(a?s:u).map(function(e){return n.createElement(Fe.A,{key:e.field,sx:{color:"#3D3C38",padding:"2px",textAlign:"center",border:"0",width:e.width},scope:"col"},e.headerName)}))),n.createElement(Me.A,null,(a?i:c).map(function(e,t){return n.createElement(Te.A,{key:e.id||t},(a?s:u).map(function(t,r){return 0===r?n.createElement(Fe.A,{component:"th",scope:"row",key:t.field,sx:{padding:"2px",textAlign:"center",borderBottom:0,borderTop:"1px solid #e0e0e0"}},e[t.field]):n.createElement(Fe.A,{key:t.field,sx:{color:"#3D3C38",padding:"2px",textAlign:"center",borderBottom:0,borderTop:"1px solid #e0e0e0"}},e[t.field])}))}))))};const Re=(0,n.memo)(De);function je(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var c=n&&n.prototype instanceof i?n:i,s=Object.create(c.prototype);return Pe(s,"_invoke",function(r,n,o){var a,i,c,s=0,u=o||[],m=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return a=t,i=0,c=e,d.n=r,l}};function p(r,n){for(i=r,c=n,t=0;!m&&s&&!o&&t<u.length;t++){var o,a=u[t],p=d.p,f=a[2];r>3?(o=f===n)&&(c=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=r<2&&p<a[1])?(i=0,d.v=n,d.n=a[1]):p<f&&(o=r<3||a[0]>n||n>f)&&(a[4]=r,a[5]=n,d.n=f,i=0))}if(o||r>1)return l;throw m=!0,n}return function(o,u,f){if(s>1)throw TypeError("Generator is already running");for(m&&1===u&&p(u,f),i=u,c=f;(t=i<2?e:c)||!m;){a||(i?i<3?(i>1&&(d.n=-1),p(i,c)):d.n=c:d.v=c);try{if(s=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");
2if(!t.done)return t;c=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(m=d.n<0)?c:r.call(n,d))!==l)break}catch(t){a=e,i=1,c=t}finally{s=1}}return{value:t,done:m}}}(r,o,a),!0),s}var l={};function i(){}function c(){}function s(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Pe(t={},n,function(){return this}),t),m=s.prototype=i.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,Pe(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return c.prototype=s,Pe(m,"constructor",s),Pe(s,"constructor",c),c.displayName="GeneratorFunction",Pe(s,o,"GeneratorFunction"),Pe(m),Pe(m,o,"Generator"),Pe(m,n,function(){return this}),Pe(m,"toString",function(){return"[object Generator]"}),(je=function(){return{w:a,m:d}})()}function Pe(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Pe=function(e,t,r,n){function a(t,r){Pe(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},Pe(e,t,r,n)}function Le(e,t,r,n,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void r(e)}i.done?t(c):Promise.resolve(c).then(n,o)}var $e=function(e){var t=e.data,r=e.handleResultsFrameClick,a=t.authoringData,l=a.modelBottomDescription,i=a.modelTopDescription,c=a.modelCtaText,s={textTransform:"none",fontWeight:"bold",color:"#095F87",textDecoration:"underline",display:"inline-block",textAlign:"left",padding:0,"&:hover":{backgroundColor:"transparent",textDecoration:"underline",color:"#05344A"},"&.Mui-focusVisible":{border:0,borderRadius:0,outline:"solid",outlineColor:"#232220",outlineOffset:"4px",outlineWidth:"2px",boxShadow:"none"},".MuiButton-endIcon":{marginLeft:"2px"}},p=(0,n.useRef)(null),h=function(){var e,t=(e=je().m(function e(){var t,r,n,o,a,l,i,c,s,u,m,d,f,b,h,y,g,v;return je().w(function(e){for(;;)switch(e.p=e.n){case 0:if(p.current){e.n=1;break}return e.a(2);case 1:return t=p.current,r=document.createElement("div"),n=t.cloneNode(!0),r.style.position="fixed",r.style.left="-10000px",r.style.top="0",r.style.width="".concat(t.scrollWidth,"px"),r.style.background="#FFFFFF",r.style.zIndex="-1",n.style.background="#FFFFFF",n.style.width="100%",n.querySelectorAll(".o5-hsac-downloadDialog__open-btn, .o5-hsac-steps-topper__btn").forEach(function(e){e.remove()}),r.appendChild(n),document.body.appendChild(r),e.p=2,e.n=3,ge()(n,{backgroundColor:"#FFFFFF",scale:2,useCORS:!0,windowWidth:t.scrollWidth,scrollX:0,scrollY:0});case 3:o=e.v,a=new ve.jsPDF({unit:"mm",format:"tabloid",orientation:"portrait"}),l=a.internal.pageSize.getWidth(),i=a.internal.pageSize.getHeight(),s=l,u=i-(c=8),m=Math.floor(o.width*u/s),d=0,f=!0;case 4:if(!(d<o.height)){e.n=6;break}if(b=document.createElement("canvas"),h=b.getContext("2d")){e.n=5;break}return e.a(3,6);case 5:y=Math.min(m,o.height-d),b.width=o.width,b.height=y,h.fillStyle="#FFFFFF",h.fillRect(0,0,b.width,b.height),h.drawImage(o,0,d,o.width,y,0,0,b.width,b.height),f||a.addPage(),g=b.toDataURL("image/jpeg",.98),v=y*s/o.width,a.addImage(g,"JPEG",0,c,s,v),d+=y,f=!1,e.n=4;break;case 6:a.save("hsa-calculator.pdf");case 7:return e.p=7,document.body.removeChild(r),e.f(7);case 8:return e.a(2)}},e,null,[[2,,7,8]])}),function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function l(e){Le(a,n,o,l,i,"next",e)}function i(e){Le(a,n,o,l,i,"throw",e)}l(void 0)})});return function(){return t.apply(this,arguments)}}(),y=function(e){return Intl.NumberFormat("en-US").format(e)},g=(0,o._9)("frame_0"),x=(0,o._9)("base_coverage"),_="No or unsure"===g[2],E=(0,o._9)("employer_contribution"),S=(0,o._9)("frame_1_total"),A=(0,o._9)("frequencyRateAmt"),w=(0,o._9)("frequency"),N="string"==typeof w?w.toLowerCase():"",C=Number((0,o._9)("fed_savings")),q=Number((0,o._9)("state_savings")),H=Number(S)+Number(E),M=g[1],F=C+q,k=(0,o._9)("totalGrossHsaContribution"),T=(0,o._9)("plannedMedicalExpenses"),I=(0,o._9)("netHSAContributions"),O=Number((0,o._9)("newHSACalculationResult")),D=(0,o._9)("futureHsaValue"),R=(0,o._9)("taxSavings"),j=(0,o._9)("grossTaxSavings"),P=(0,o._9)("averageRateOfReturn"),L=Number((0,o._9)("frame_2")[0]),$=JSON.parse((0,o._9)("mbar-dataset")),B=JSON.parse((0,o._9)("bar-dataset")),z=JSON.parse((0,o._9)("mtable-dataset")),W=JSON.parse((0,o._9)("table-dataset")),Y=(0,o._9)("frame_0")[1],V=function(e){(0,o.kH)("hsac-currStep",e),r(e),0===e&&setTimeout(function(){var e=document.querySelector(".o5-hsac-question__section-title");e&&e.focus()},100)};return n.createElement(n.Fragment,null,n.createElement(v,{headingTxt:t.model[0].componentHeader}),n.createElement("div",{className:"o5-hsac__content"},n.createElement("div",{className:"o5-hsac-steps-topper__printableRef",ref:p},n.createElement("ul",null,n.createElement("li",{className:"o5-hsac-steps-topper"},n.createElement("div",{className:"o5-hsac-steps-topper__content"},n.createElement("div",{className:"o5-hsac-steps-topper__header-container"},n.createElement("div",null,n.createElement("h2",{className:"o5-hsac-steps-topper__header",tabIndex:-1},"Step 3 results: HSA future value"),n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"Your estimated future HSA balance: ",n.createElement("strong",null,"$",y(D)),".")),n.createElement("div",null,n.createElement(he,{data:{modelBottomDescription:l,modelTopDescription:i,modelCtaText:c},handleSavePdf:h}))),n.createElement(m.Ay,{container:!0},n.createElement(qe,{numOfYears:L,mobileDataset:$,dataset:B})),n.createElement(m.Ay,{container:!0,rowSpacing:{xs:0,sm:1,md:1},columnSpacing:{xs:1,sm:3,md:3}},n.createElement(m.Ay,{item:!0,rowSpacing:0,xs:12,md:5},n.createElement(Re,{mobileDataset:z,dataset:W})),n.createElement(m.Ay,{item:!0,rowSpacing:0,direction:"column",xs:12,md:7},n.createElement(f.A,null,n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"Contribution details:"),n.createElement("ul",{className:"o5-hsac-steps-topper__bodycopy"},n.createElement("li",null,"Total gross HSA contributions: ",n.createElement("strong",null,"$",y(k))),n.createElement("li",null,"Total planned medical expenses: ",n.createElement("strong",null,"$",y(T))),n.createElement("li",null,"Total net HSA contributions: ",n.createElement("strong",null,"$",y(I))),n.createElement("li",null,"Estimated earnings on net HSA contributions: ",n.createElement("strong",null,"$",y(O))),n.createElement("li",null,"Estimated future value of your HSA: ",n.createElement("strong",null,"$",y(D))),n.createElement("li",null,"Estimated tax savings on HSA earnings: ",n.createElement("strong",null,"$",y(R))),n.createElement("li",null,"Estimated tax savings on gross HSA contributions: ",n.createElement("strong",null,"$",y(j))),n.createElement("li",null,"Average rate of return: ",n.createElement("strong",null,y(P),"%"))),n.createElement(u.A,{className:"o5-hsac-steps-topper__btn",sx:s,onClick:function(){return V(2)},endIcon:n.createElement(d.A,{sx:{marginLeft:"2px",paddingLeft:0,paddingRight:0}}),disableRipple:!0},"Recalculate future value")))))),n.createElement("li",{className:"o5-hsac-steps-topper"},n.createElement(m.Ay,{className:"o5-hsac-steps-topper__content",container:!0,direction:"column",columnSpacing:0,rowSpacing:1,sx:{background:"#E0F3DF",border:"1px solid #066605",borderRadius:"8px",padding:"16px",alignItems:"stretch"}},n.createElement("h2",{className:"o5-hsac-steps-topper__header"},"Step 2 results: Annual tax savings"),n.createElement(m.Ay,{container:!0,rowSpacing:{xs:0,sm:1,md:1},columnSpacing:{xs:1,sm:3,md:3}},n.createElement(m.Ay,{item:!0,rowSpacing:0,xs:12,md:5},n.createElement(b,{totalSavings:F,federalSavings:C,stateSavings:q})),n.createElement(m.Ay,{item:!0,rowSpacing:0,direction:"column",xs:12,md:7},n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"Based on your planned HSA contribution of ",n.createElement("strong",null,"$",y(S)),":"),n.createElement("ul",null,n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your ",N," contribution amount: ",n.createElement("strong",null,"$",y(A))),n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your total HSA contribution (including contributions from others): ",n.createElement("strong",null,"$",y(H))),n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your federal tax savings for ",M,": ",n.createElement("strong",null,"$",y(C))),n.createElement("li",{className:"o5-hsac-steps-topper__bodycopy"},"Your state tax savings for ",M,": ",n.createElement("strong",null,"$",y(q)))),n.createElement(u.A,{className:"o5-hsac-steps-topper__btn",sx:s,onClick:function(){return V(1)},endIcon:n.createElement(d.A,{sx:{marginLeft:"2px",paddingLeft:0,paddingRight:0}}),disableRipple:!0},"Recalculate tax savings"))))),n.createElement("li",{className:"o5-hsac-steps-topper"},n.createElement("div",{className:"o5-hsac-steps-topper__content"},n.createElement("h2",{className:"o5-hsac-steps-topper__header"},"Step 1 results: Maximum contribution"),_?n.createElement(n.Fragment,null,n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"In ",Y,", your maximum allowable HSA contribution is ",n.createElement("strong",null,"$",y(x)),"."),n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"This amount equals your allowable HSA contribution (based on coverage type, tax year and any allowable catch-up contribution).")):n.createElement(n.Fragment,null,n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"In ",Y,", your maximum allowable HSA contribution is ",n.createElement("strong",null,"$",y(x)),". Because your employer is contributing $",y(E)," to your HSA, you can contribute up to ",n.createElement("strong",null,"$",y(x-E)),"."),n.createElement("p",{className:"o5-hsac-steps-topper__bodycopy"},"This amount equals your allowable HSA contribution (based on coverage type, tax year and any allowable catch-up contribution), minus contributions from your employer or others.")),n.createElement(u.A,{className:"o5-hsac-steps-topper__btn",sx:s,onClick:function(){return V(0)},endIcon:n.createElement(d.A,{sx:{marginLeft:"2px",paddingLeft:0,paddingRight:0}}),disableRipple:!0},"Recalculate maximum contribution"))))),n.createElement(le,{authoringData:t.authoringData})))};const Be=(0,n.memo)($e);function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return We(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?We(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Ye=function(e){var t=e.model,r=ze((0,n.useState)((0,o._9)("hsac-currStep")||0),2),a=r[0],l=r[1],i=ze((0,n.useState)([]),2),c=i[0],s=i[1],u=ze((0,n.useState)(!0),2),m=u[0],d=u[1],p=ze((0,n.useState)(Date.now()),2),f=p[0],b=p[1],h=function(){var e,r;r=[{componentHeader:(e=t).formHeading,topperImg:e.formImage,topperBodyCopy:e.formDescription,heading:"Step 1: Calculate your maximum HSA contribution",subTxt:"All fields are required.",ctaLabel:"Your data will not be saved after you complete this form.",ctaText:"Calculate maximum contribution",questions:[{type:"radio",question:"Select your health insurance coverage",toolTip:"To qualify for an HSA, you must have a high-deductible health plan (HDHP).",placeHolderText:null,errorMsg:"Please select type.",answers:["Individual HDHP","Family HDHP"]},{type:"radio",question:"Select the tax year",toolTip:"The IRS sets contribution limits each year.",placeHolderText:null,errorMsg:"Please select a tax year.",answers:[e.taxYearOne,e.taxYearTwo]},{type:"radio",question:"Will your employer or anyone else contribute?",toolTip:"An HSA may receive contributions from an eligible individual or any other person, including an employer or a family member, on behalf of an eligible individual.",placeHolderText:null,errorMsg:"Please enter dollar amount or Amount Contributed by others cannot exceed your allowable HSA contribution (based on coverage type and tax year) plus any allowable catch-up.",answers:["Yes","No or unsure"],showSecondaryTextField:!0},{type:"radio",question:"Are you 55 or will you turn 55 this year?",toolTip:"If you turn 55 years old (or are already 55 or older) in the tax year selected, you are qualified to make an additional catch-up contribution of up to $1,000.",placeHolderText:null,errorMsg:"Please make a selection.",answers:["Yes","No"]}]},{heading:"Step 2: Calculate your annual tax savings",subTxt:"All fields are required.",ctaLabel:"Your data will not be saved after you complete this form.",ctaText:"Calculate my tax savings",questions:[{type:"text",question:"How much do you plan to add to your HSA this year?",toolTip:"You can contribute up to your allowable HSA contribution limit.",placeHolderText:"$",errorMsg:"Please enter dollar amount.",answers:""},{type:"select",question:"How often will you contribute to your HSA?",toolTip:"Most people add to their HSA once or twice a month, often through payroll deductions.",placeHolderText:"Select",errorMsg:"Please select a frequency.",answers:["Weekly","Biweekly"]},{type:"select",question:"What is your federal tax rate?",toolTip:null,subText:'Please see pages 4-15 of the <a href="https://www.irs.gov/pub/irs-pdf/i1040tt.pdf" target="_blank" rel="noopener noreferrer">federal tax table (PDF)</a> for more information on tax rates.',placeHolderText:"Select",errorMsg:"Please select a rate.",answers:["5%","10%","15%","20%","25%","28%","33%","35%","42%","48%"]},{type:"select",question:"What is your state tax rate?",toolTip:null,placeHolderText:"Select",errorMsg:"Please select a rate",answers:["0%","1%","2%","3%","4%","5%","6%","7%","8%","9%","10%","11%","12%","13%","14%","15%"]}]},{heading:"Step 3: See how your HSA can grow over time",subTxt:"All fields are required.",ctaLabel:"Your data will not be saved after you complete this form.",ctaText:"Calculate future value",questions:[{type:"select",question:"How many years do you plan to contribute to your HSA?",toolTip:"For example, if you plan to add to your HSA until you retire, provide a general idea of how many years that might be.",placeHolderText:"Select",errorMsg:"Please make a selection.",answers:["5","10","15","20","25","30","35","40","45","50"]},{type:"text",question:"How much will your employer or others add each year to your HSA?",toolTip:"An HSA may receive contributions from an eligible individual or any other person, including an employer or a family member, on behalf of an eligible individual.",placeHolderText:"$",errorMsg:"Amount to be contributed cannot exceed the Maximum HSA Contribution amount.",answers:""},{type:"text",question:"How much do you expect to spend using your HSA each year?",toolTip:"Consider how often you see a doctor every year, any upcoming surgeries and how much you typically spend on qualified medical expenses.",placeHolderText:"$",errorMsg:"Please enter dollar amount. If zero, enter 0.",answers:""},{type:"text",question:"What is the average rate of return on your HSA?",toolTip:"The average rate of return refers to how much interest you earn on your HSA balance over the course of a year. See your employer'
2s benefits information or contact HR for details.",placeHolderText:"%",errorMsg:"Please enter a percentage.",answers:""},{type:"text",question:"How much do you plan on adding to your HSA each year on average?",toolTip:"Consider how often you see a doctor every year, any upcoming surgeries and how much you typically spend on qualified medical expenses.",subText:"To update the amount, please return to Step 2 and modify your planned contribution.",placeHolderText:"$",errorMsg:"Amount to be contributed cannot exceed the maximum HSA contribution amount.",answers:""}]}],s(r),d(!1)};(0,n.useEffect)(function(){h()},[]),(0,n.useEffect)(function(){b(Date.now()),(0,o.kH)("hsac-currStep",a)},[a]);var y=function(e){l(e)};if(!m)return n.createElement(n.Fragment,null,a<3?n.createElement(oe,{key:"frame-step-".concat(a,"-").concat(f),data:{model:c,authoringData:t,currStep:a},onNext:function(){return y(a+1)},onPrev:function(){return y(a-1)}}):n.createElement(Be,{key:"results-".concat(f),data:{model:c,authoringData:t,currStep:a},handleResultsFrameClick:function(e){return y(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.