PageSourceSearch

https://open.codecu.org/_next/static/chunks/pages/account_selection-ccd63d04ccdfc761.js

js codecu.org collected 2026-10-01 14:16:10 UTC 50,613 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5599b1a0-7ac3-419e-8071-051db139a5e2",e._sentryDebugIdIdentifier="sentry-dbid-5599b1a0-7ac3-419e-8071-051db139a5e2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3034,3498],{25002:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>U});var n=i(26514),l=i(67059),s=i(94264),r=i(89642),o=i(59032),a=i(17375);class c{isVisible(e){return!this.hidden&&(!this.exclusive_application_types||this.exclusive_application_types.includes(e))}constructor(e){e&&Object.assign(this,e)}}let d={CHECKING:0,SAVINGS:1,MONEY_MARKET:2,CERTIFICATE_OF_DEPOSIT:3,HSA:4,IRA:5},u=(e,t)=>{let i=Array.from(new Set(e.map(e=>e.category))).sort((e,t)=>d[e.toUpperCase()]-d[t.toUpperCase()]);return e.some(e=>e.recommended)||t?["recommended",...i]:i};var p=i(11538),m=i(39072),h=i(75834),g=i(56144),_=i(93477),f=i(52053),b=i(96235),x=i(28723),v=i(28187),y=i(5443),S=i(85556),j=i(69718);class w extends c{constructor(e){super(e),this.category=(null==e?void 0:e.category)||"",this.id=(null==e?void 0:e.id)||"",this.minimum_balance=(null==e?void 0:e.minimum_balance)||0,this.amount=(null==e?void 0:e.amount)||0,this.account=(null==e?void 0:e.account)||{},this.account_activity_questions=[],this.bundle_id=""}}let k=(e,t,i,n)=>null==e.max_count||(null==i?void 0:i.core_user_id)==="CREATE_NEW_CUID"||(null==n?void 0:n.cao_existing_core_user_applicant_handling)==="CREATE_NEW_MEMBER_ID"||t.filter(t=>[e.id,e.id.replace(/^0*(.+)/,"$1")].includes(t.product_id)).length<e.max_count,N={isProductAvailable:(e,t,i,n,l,s,r)=>{var o;let a,c=k(e,n,t,i),d=e.required&&(null==(o=i.features)?void 0:o.ao_internal_funding)&&(l.length>0||t.isAOIOB());a=r&&S.G8&&'["personal"]'!==JSON.stringify(e.exclusive_application_types)?!e.hidden:new w(e).isVisible(S.G8?t.organization.type:"personal");let u=t.selected_products.some(t=>t.id===e.id),p=(t.metadata.selected||"").split(","),m=s.concat(p).includes(e.id);if(t.core_user_id){let{exclusive_application_types:i}=e;return(!i||!!i.includes(S.G8?t.organization.type||"":"personal"))&&(!e.hidden||!!(m||u))&&("CREATE_NEW_CUID"===t.core_user_id||!1!==e.required_for_existing_members||c)}return c&&!d&&(u||a||m)},isProductBelowMaxCount:k};var C=i(48624);let A="checking",I="recommended",T=(0,h.memo)(e=>{let{emptySelectionLabel:t,summaryItems:i}=e;return(0,n.jsx)("div",{className:"selected-accounts",children:(0,n.jsx)("div",{className:"selected-accounts-list",children:i.length>0?i.map(e=>(0,n.jsxs)("div",{className:"account",children:[(0,n.jsx)("span",{className:"narmi-icon-credit-card1","aria-hidden":"true"}),(0,n.jsx)("span",{children:e.label})]},e.id)):(0,n.jsx)("div",{className:"account",children:(0,n.jsx)("span",{children:t})})})})}),D=e=>{var t;let{onChange:i=()=>null,setPersonas:c,selectedCategoryTab:d,setSelectedCategoryTab:g}=e,{l10n:f}=(0,r.B2)(),{application:b,setApplication:x,allProducts:v,productCategoryLimits:w,productCategoryMapping:k,existingCoreIdAccounts:C,existingAccounts:T,institution:D,isExisting:P}=(0,_.Xn)(),[L,M]=(0,h.useState)([]),[B,E]=(0,h.useState)(!1),[R,O]=(0,h.useState)([]),[F,q]=(0,h.useState)(!0),{savedSelectedProductIds:Y}=(0,y.A)(),{sendNotification:U}=(0,m.M)(),{selected_products:W,bundles:z}=b;(0,h.useEffect)(()=>{if(!b.beneficiaries||0===b.beneficiaries.length)return;let e=W.map(e=>e.id),t=b.beneficiaries.map(t=>(0,s._)((0,l._)({},t),{selected_products:t.selected_products.filter(t=>e.includes(t))})).filter(e=>e.selected_products.length>0),i=new Map(t.map(e=>[e.index,e]));(t.length!==b.beneficiaries.length||b.beneficiaries.some(e=>{let t=i.get(e.index);if(!t||e.selected_products.length!==t.selected_products.length)return!0;let n=new Set(e.selected_products);return!t.selected_products.every(e=>n.has(e))}))&&x(e=>new S.lg((0,s._)((0,l._)({},e),{beneficiaries:t})))},[W,x]);let H=async e=>{try{let t=await j.lR.getEligibleProducts(e.id);if(null==t.products||null==t.bundles)return U({type:"negative",text:"There was an error fetching products. Please try again."}),o.wd("An eligible_products response contained no products array. This should not happen"),{personas:[],products:[],bundles:[]};return q(t.includes_default_products),t}catch(e){return o.Cp(e),U({type:"negative",text:"There was an error fetching products. Please try again."}),{personas:[],products:[],bundles:[]}}},G=async(e,t,n)=>{var r;let o,a,d;if(e||(null==(r=D.features)?void 0:r.product_bundles)&&S.G8){let{bundles:e,products:n,personas:r}=await H(t);o=n,a=e,d=r;let c=[...W],u=[...t.bundles||[]],p=!1,m=!1;o.filter(e=>
1e.should_preselect).forEach(e=>{-1===c.findIndex(t=>t.id===e.id)&&(c.push(e),p=!0)});let h=a.filter(e=>e.should_preselect);if(h.length){let e=new Set(u.map(e=>e.uuid));h.filter(t=>!e.has(t.uuid)).forEach(e=>{for(let t of e.products_ids)if(!c.find(e=>e.id===t)){let i=v.find(e=>e.id===t);if(!i)continue;let n=(0,s._)((0,l._)({},i),{bundle_id:e.uuid}),r=ee(n,c,u);null!==r&&(c=r).push(n)}c=Z(c,e),u.push(e),p=!0,m=!0})}p&&i(c),m&&en(u)}else o=n.filter(e=>N.isProductAvailable(e,b,D,C,T,Y,P)),a=[],d=[];E(!0),M(o),O(a),c(d)},V=(0,h.useMemo)(()=>u(L,R.length>0),[L,R]),X=null==(t=b.metadata)?void 0:t.selected_category;(0,h.useEffect)(()=>{X&&V.includes(X)&&g(X)},[X,V]);let $=V.indexOf(d);-1===$&&($=0);let Q=e=>e.id&&k[e.id]?k[e.id]:e.category,J=e=>W.map(e=>e.id).includes(e.id),K=e=>z.map(e=>e.uuid).includes(e.uuid),Z=(e,t)=>e.map(e=>t.products_ids.includes(e.id)?(0,s._)((0,l._)({},e),{bundle_id:t.uuid}):e);(0,h.useEffect)(()=>{var e;G(null==(e=D.features)?void 0:e.eligible_products,b,v)},[]),(0,h.useEffect)(()=>{if(!B)return;let e=L.filter(e=>!W.find(t=>t.id===e.id)&&e.required&&!e.hidden&&N.isProductBelowMaxCount(e,C,b,D)&&!Y.includes(e.id)),t=L.filter(e=>!W.find(t=>t.id===e.id)&&N.isProductBelowMaxCount(e,C,b,D)&&Y.includes(e.id)),n=(b.metadata.selected||"").split(","),l=n.concat(n),s=L.filter(e=>!W.find(t=>t.id===e.id)&&N.isProductBelowMaxCount(e,C,b,D)&&!Y.includes(e.id)&&l.includes(e.id)),r=!1,o=[];[...W,...e,...t,...s].forEach(e=>{L.map(e=>e.id).includes(e.id)&&("checking"===e.category?r||(o.push(e),r=!0):o.push(e))}),i(o)},[L]);let ee=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=Q(e),l=n===A||"ira"===n?1:w[n],s=W.findIndex(e=>Q(e)===n&&!e.required),r=W.filter(e=>Q(e)===n).length;if(n!==A&&"ira"!==n&&(r+=C.filter(e=>{let t=v.find(t=>t.id===e.product_id);return t?Q(t)===n:e.product_type===n}).length),l&&r>=l){let e=W[s];if(-1===s)return U({type:"negative",text:f.getString("product-limit-error",{numLimit:l,type:n},"Only ".concat(l," of type ").concat(n," can be selected."))}),null;{t.splice(s,1);let n=i.find(t=>t.products_ids.includes(e.id));if(n){let l=i.findIndex(e=>e.uuid===n.uuid),s=n.products_ids.filter(t=>t!==e.id);t=t.filter(e=>!s.includes(e.id)),-1!==l&&i.splice(l,1)}}}return t},et=e=>{try{let t=[...W],n=[...z],l=t.findIndex(t=>t.id===e.id);if(J(e)){if(e.required){let t="".concat(e.name," is required.");U({type:"negative",text:t});return}if(z.some(t=>t.products_ids.includes(e.id))){let e=f.getString("account-selection-bundle-product-locked",null,"This account is part of a bundle you selected. Deselect the bundle to remove this account.");U({type:"negative",text:e});return}t.splice(l,1)}if(-1===l){if(!N.isProductBelowMaxCount(e,C,b,D))return void U({type:"negative",text:f.getString("account-selection-product-max-count-exceeded",null,"Max count for this product exceeded")});let i=ee(e,t,n);if(null===i)return;(t=i).push(e);let l=t.map(e=>e.id);R.forEach(e=>{let i=e.products_ids.every(e=>l.includes(e)),s=!n.some(t=>t.uuid===e.uuid);i&&s&&(n.push(e),t=Z(t,e))})}i(t),en(n)}catch(e){o.Cp(e)}},ei=e=>{try{let t=[...z],n=[...W],r=t.findIndex(t=>t.uuid===e.uuid);if(K(e)){let o=new Set(e.products_ids);n=n.filter(e=>!o.has(e.id)||e.required).map(e=>o.has(e.id)?(0,s._)((0,l._)({},e),{bundle_id:""}):e),i(n),t.splice(r,1)}if(-1===r){for(let i of e.products_ids)if(!n.find(e=>e.id===i)){let r=v.find(e=>e.id===i);if(!r)continue;let o=(0,s._)((0,l._)({},r),{bundle_id:e.uuid}),a=ee(o,n,t);null!==a&&(n=a).push(o)}n=Z(n,e),i(n),t.push(e)}en(t)}catch(e){o.Cp(e)}},en=e=>{x({bundles:e})};return F?(0,n.jsx)(p.LoadingSkeleton,{lines:8,isLoading:!B,children:(0,n.jsxs)("div",{style:{maxWidth:"100vw"},children:[(0,n.jsx)("style",{children:"\n          .panel-responsive {\n            padding-left: 0 !important;\n            padding-right: 0 !important;\n          }\n        "}),(0,n.jsxs)(p.Tabs,{selectedIndex:$,onTabChange:e=>g(V[e]),children:[(0,n.jsx)(p.Tabs.List,{children:V.map(e=>(0,n.jsx)(p.Tabs.Tab,{label:f.getString("product-type",{type:e},"".concat(e)),tabId:e},"".concat(e,"-list")))}),V.map(e=>(0,n.jsx)(p.Tabs.Panel,{tabId:e,children:(0,n.jsx)("div",{style:{marginTop:"25px"},className:"margin--bottom--xxl",children:(0,n.jsxs)("div",{className:"product-card-container",children:[e===I&&R.map(e=>{e.recommended=!0,e.category=I;let t=(0,a.A$)({id:e.uuid,name:e.name,description:e.description,details:e.details,more_details_copy:e.more_details_copy},f);return(0,n.jsx)(m.AA,{product:(0,l._)({},e,t),isSelected:K(e),onClick:()=>
1ei(e),hideRecommendedTag:!1,clickId:"bundle-card-".concat(e.uuid),monthlyServiceFeeText:f.getString("monthly-service-fees",null,"Monthly service fees"),benefitsLabel:f.getString("subhead-product-benefits",null,"Benefits"),recommendedLabel:f.getString("subhead-bundle-recommended",null,"Open 2 accounts together!"),moreDetailsLabel:(null==t?void 0:t.more_details_copy)||f.getString("more-details",null,"More details")},e.uuid)}),(e=>L.filter(t=>e===I?t.recommended:t.category===e))(e).map(t=>{let i=(0,a.A$)({id:t.id,name:t.name,description:t.description,details:t.details,disclosures:t.disclosures,more_details_copy:t.more_details_copy,monthly_service_fee:t.monthly_service_fee},f);return(0,n.jsx)(m.AA,{product:(0,l._)({},t,i),isSelected:J(t),onClick:()=>et(t),hideRecommendedTag:e===I,clickId:"product-card-".concat(t.id),monthlyServiceFeeText:f.getString("monthly-service-fees",null,"Monthly service fees"),benefitsLabel:f.getString("subhead-product-benefits",null,"Benefits"),recommendedLabel:f.getString("subhead-product-recommended",null,"Recommended"),moreDetailsLabel:(null==i?void 0:i.more_details_copy)||f.getString("more-details",null,"More details")},t.id)})]})})},"".concat(e,"-panel")))]})]})}):(0,n.jsx)("div",{style:{marginTop:"25px"},className:"margin--bottom--xxl",children:(0,n.jsxs)("div",{className:"product-card-container",children:[R.map(e=>{e.recommended=!0,e.category=I;let t=(0,a.A$)({id:e.uuid,name:e.name,description:e.description,details:e.details,more_details_copy:e.more_details_copy},f);return(0,n.jsx)(m.AA,{product:(0,l._)({},e,t),isSelected:K(e),onClick:()=>ei(e),hideRecommendedTag:!1,clickId:"bundle-card-".concat(e.uuid),monthlyServiceFeeText:f.getString("monthly-service-fees",null,"Monthly service fees"),benefitsLabel:f.getString("subhead-product-benefits",null,"Benefits"),recommendedLabel:f.getString("subhead-bundle-recommended",null,"Open 2 accounts together!"),moreDetailsLabel:(null==t?void 0:t.more_details_copy)||f.getString("more-details",null,"More details")},e.uuid)}),L.map(e=>{let t=(0,a.A$)({id:e.id,name:e.name,description:e.description,details:e.details,disclosures:e.disclosures,more_details_copy:e.more_details_copy,monthly_service_fee:e.monthly_service_fee},f);return(0,n.jsx)(m.AA,{product:(0,l._)({},e,t),isSelected:J(e),onClick:()=>et(e),hideRecommendedTag:!0,clickId:"product-card-".concat(e.id),monthlyServiceFeeText:f.getString("monthly-service-fees",null,"Monthly service fees"),benefitsLabel:f.getString("subhead-product-benefits",null,"Benefits"),recommendedLabel:f.getString("subhead-product-recommended",null,"Recommended"),moreDetailsLabel:(null==t?void 0:t.more_details_copy)||f.getString("more-details",null,"More details")},e.id)})]})})},P=()=>{let e={label:C.Tr.description,path:C.Tr.path},t=(0,x.w)(e),{setIsLoading:i}=(0,m.nk)(),{l10n:o}=(0,r.B2)(),c=(0,v.A)(),{sendNotification:d}=(0,m.M)(),[u,y]=(0,h.useState)(""),{allProducts:j,application:w,setApplication:k}=(0,_.Xn)(),{selected_products:N,bundles:A}=w,[I,P]=(0,h.useState)([]),L=(0,h.useMemo)(()=>o.getString("account-selection-no-accounts-selected",null,"No accounts selected"),[o]),M=(0,h.useMemo)(()=>N.map(e=>(0,a.A$)(e,o)),[N,o]),B=(0,h.useMemo)(()=>[...M.filter(e=>!A.some(t=>t.products_ids.includes(e.id))).map(e=>({id:e.id,label:e.name||""})),...A.map(e=>({id:e.uuid,label:"".concat(e.name," (").concat((e=>{let t=[];for(let i of e.products_ids){let e=j.filter(e=>e.id===i)[0];t.push(e.name)}return"".concat(t.slice(0,t.length-1).join(", ")," and ").concat(t[t.length-1])})(e),")")}))],[A,M,j]),E=["hsa","ira"].includes(u)&&!!w.selected_products.filter(e=>u==e.category).length,R=async e=>{i(!0);try{if(w.selected_products.some(e=>"ira"===e.category)){let e=N.flatMap(e=>{let{options:t={}}=e;return["ira_new_contribution","ira_transfer","ira_rollover"].filter(e=>t[e])});if(1===e.length){let[t]=e;w.ira_contribution=t}}let n=await c("account_opening/".concat(w.id),{method:"PUT",shouldSkipSerializeAmount:!0},(0,l._)({personas:I,selected_products:N.map(e=>(0,s._)((0,l._)({},e),{amount:null})),beneficiaries:w.beneficiaries||[]},N.some(e=>"ira"===e.category)&&w.ira_contribution&&{ira_contribution:w.ira_contribution}));if(delete w.metadata.selected,!n.application){d({type:"negative",text:o.getString("error-notification-please-retry",null,"Your secure session has expired. Please refresh the page to continue or contact Support if the issue persists.")}),i(!1);return}k(e=>new S.lg((0,s._)((0,l._)({},e),{metadata:(0,l._)({},e.metadata,(0,S.Db)(n.application.metadata)),agreement_current_session:!1,selected_products:N}))),t.pushNextStep(),e()}catch(t){e(o.getString("error-notification-generic",null,"Something went wrong"))}finally{i(!1)}};return(0,n.jsxs)(f.A,{activeStep:e,children:[(0,n.jsxs)("div",{className:"large",children:[(0,n.jsx)("h1",{children:(0,n.jsx)(r.Oj,{id:"heading-account-selection",children:"Choose your accounts"})}),(0,n.jsx)("div",{className:"account-selection-subtitle",children:(0,n.jsx)(r.Oj,{id:"subheading-account-selection",children:"Select the accounts you would like to open from these offerings"})}),(0,n.jsx)("div",{className:"account-selection-form",children:(0,n.jsxs)(b.A,{data:w,onChange:e=>k(e),nativeForm:!1,children:[(0,n.jsx)(b.A.Field,{validate:(e,t)=>
1{if((!e||!e.length)&&(!t.bundles||!t.bundles.length)){let e=o.getString("account-selection-must-select-account-error",null,"At least one account must be selected");return d({type:"negative",text:e}),e}return null},children:(0,n.jsx)(D,{selectedCategoryTab:u,setSelectedCategoryTab:y,setPersonas:P,field:"selected_products"})}),(0,n.jsx)("div",{className:"fontWeight--bold",style:{color:"var(--color-black)"},children:(0,n.jsx)(r.Oj,{id:"account-selection-selected-products-subheader",children:"Your selection"})}),(0,n.jsx)(T,{emptySelectionLabel:L,summaryItems:B}),(0,n.jsx)("div",{className:"margin--top--s",children:(0,n.jsx)(p.Alert,{isActive:w.hasJointApplicant()&&E,kind:"info",isDismissable:!1,children:(0,n.jsxs)("span",{children:["hsa"===u&&(0,n.jsx)(r.Oj,{id:"account-selection-hsa-info-alert",children:"Note: HSAs are only for individuals. Only the primary applicant will be included on your HSA."}),"ira"===u&&(0,n.jsx)(r.Oj,{id:"account-selection-ira-info-alert",children:"Note: IRAs are only for individuals. Only the primary applicant will be included on your IRA."})]})})}),(0,n.jsx)("div",{className:"progress-buttons-container",children:(0,n.jsx)(m.L8,{enableStickyMobile:!0,backLabel:o.getString("label-back-account-selection",null,"Back"),nextLabel:o.getString("label-next-account-selection",null,"Next"),onBack:()=>t.pushPrevStep(),hidePrev:!t.hasPrevStep(),onNext:R,dangerouslyDisableShowLoading:!0,shouldHideInlineToasts:!0})})]})})]}),(0,n.jsx)(g.A,{})]})};var L=i(35564),M=i.n(L);let B=e=>{let{selectedProducts:t,selectedBundles:i,allProducts:l,onRemoveProduct:s,onRemoveBundle:o}=e,{l10n:a}=(0,r.B2)(),{s:c}=(0,p.useBreakpoints)(),[d,u]=(0,h.useState)(!1),g=t.filter(e=>!i.some(t=>t.products_ids.includes(e.id))),_=g.length+i.length;return((0,h.useEffect)(()=>{c&&0===_&&d&&u(!1)},[_,c,d]),c)?(0,n.jsx)("div",{className:M().desktopWrapper,children:(0,n.jsx)(p.AnchoredDialog,{isOpen:d,onUserDismiss:()=>u(!1),trigger:(0,n.jsx)("button",{type:"button",className:"".concat(M().desktopTrigger," ").concat(0===_?M().desktopTriggerEmpty:""),disabled:0===_,onClick:()=>u(!d),"aria-expanded":d,"aria-label":d?a.getString("account-selection-close-your-selection",null,"Close your selection"):a.getString("account-selection-open-your-selection",null,"Open your selection"),children:(0,n.jsxs)(p.Row,{alignItems:"center",gapSize:"s",children:[(0,n.jsx)(p.Row.Item,{children:(0,n.jsx)("span",{className:M().triggerText,children:(0,n.jsx)(r.Oj,{id:"account-selection-selected-products-subheader",children:"Your selection"})})}),(0,n.jsx)(p.Row.Item,{shrink:!0,children:(0,n.jsx)(p.Count,{value:_})})]})}),children:(0,n.jsx)("div",{className:M().desktopContent,children:0===_?(0,n.jsx)("div",{className:M().emptyState,children:(0,n.jsx)(r.Oj,{id:"account-selection-no-accounts-selected",children:"No accounts selected"})}):(0,n.jsxs)(n.Fragment,{children:[g.map(e=>{var t;return(0,n.jsx)(p.ContentCard,{kind:"plain",paddingSize:"none",radiusSize:"m",children:(0,n.jsxs)("div",{className:M().desktopCardContent,children:[(0,n.jsxs)("div",{className:M().desktopProductInfo,children:[(0,n.jsx)("div",{className:M().desktopProductName,children:e.name}),e.monthly_service_fee&&(0,n.jsx)("div",{className:M().desktopMonthlyFee,children:(0,m.q8)(e.monthly_service_fee)?a.getString("account-selection-monthly-fee",{fee:(0,m._n)(e.monthly_service_fee)},"".concat((0,m._n)(e.monthly_service_fee)," monthly")):(0,m._n)(e.monthly_service_fee)})]}),(0,n.jsx)(p.IconButton,{kind:"plain",name:"x",onClick:()=>s(e),label:a.getString("account-selection-remove-product",{productName:null!=(t=e.name)?t:""},"Remove ".concat(e.name)),className:M().desktopRemoveButton})]})},e.id)}),i.map(e=>{var t;return(0,n.jsx)(p.ContentCard,{kind:"plain",paddingSize:"none",radiusSize:"m",children:(0,n.jsxs)("div",{className:M().desktopCardContent,children:[(0,n.jsxs)("div",{className:M().desktopProductInfo,children:[(0,n.jsx)("div",{className:M().desktopProductName,children:e.name}),e.monthly_service_fee&&(0,n.jsx)("div",{className:M().desktopMonthlyFee,children:(0,m.q8)(e.monthly_service_fee)?a.getString("account-selection-monthly-fee",{fee:(0,m._n)(e.monthly_service_fee)},"".concat((0,m._n)(e.monthly_service_fee)," monthly")):(0,m._n)(e.monthly_service_fee)})]}),(0,n.jsx)(p.IconButton,{kind:"plain",name:"x",onClick:()=>o(e),label:a.getString("account-selection-remove-bundle",{bundleName:null!=(t=e.name)?t:""},"Remove ".concat(e.name)),className:M().desktopRemoveButton})]})},e.uuid)})]})})})}):0===_?null:(0,n.jsxs)("div",{className:M().mobileDrawer,children:[(0,n.jsx)("button",{type:"button",className:M().mobileHeaderButton,onClick:()=>u(!d),"aria-label":d?a.getString("account-selection-close-your-selection",null,"Close your selection"):a.getString("account-selection-open-your-selection",null,"Open your selection"),children:(0,n.jsxs)(p.Row,{alignItems:"center",justifyContent:"space-between",className:M().mobileHeader,children:[(0,n.jsx)(p.Row.Item,{children:(0,n.jsxs)(p.Row,{alignItems:"center",gapSize:"xs",children:[(0,n.jsx)(p.Row.Item,{shrink:!0,children:(0,n.jsx)(p.Count,{value:_})}),(0,n.jsx)(p.Row.Item,{children:(0,n.jsx)("span",{className:M().headerText,children:(0,n.jsx)(r.Oj,{id:"account-selection-selected-products-subheader",children:"Your selection"})})})]})}),(0,n.jsx)(p.Row.Item,{shrink:!0,children:(0,n.jsx)("span",{className:"narmi-icon-chevrons-".concat(d?"down":"up")})})]})}),(0,n.jsx)(p.Accordion,{isOpen:d,renderSummary:()=>null,children:(0,n.jsx)("div",{className:M().mobileContent,children:0===_?(0,n.jsx)("div",{className:M().emptyState,children:(0,n.jsx)(r.Oj,{id:"account-selection-no-accounts-selected",children:"No accounts selected"})}):(0,n.jsxs)("div",{className:M().selectionCards,children:[g.map(e=>{var t;return(0,n.jsx)(p.ContentCard,{kind:"plain",radiusSize:"m",paddingSize:"m",children:(0,n.jsxs)(p.Row,{alignItems:"center",justifyContent:"space-between",children:[(0,n.jsx)(p.Row.Item,{children:(0,n.jsx)("div",{className:M().productName,children:e.name})}),(0,n.jsx)(p.Row.Item,{shrink:!0,children:(0,n.jsx)(p.IconButton,{kind:"plain",name:"x",onClick:()=>s(e),label:a.getString("account-selection-remove-product",{productName:null!=(t=e.name)?t:""},"Remove ".concat(e.name)),className:M().removeButton})})]})},e.id)}),i.map(e=>{var t;return(0,n.jsx)(p.ContentCard,{kind:"plain",radiusSize:"m",paddingSize:"m",children:(0,n.jsxs)(p.Row,{alignItems:"top",justifyContent:"space-between",children:[(0,n.jsx)(p.Row.Item,{children:(0,n.jsxs)("div",{className:M().bundleContent,children:[(0,n.jsx)("div",{className:M().productName,children:e.name}),(0,n.jsx)("div",{className:M().bundleBadges,children:e.products_ids.map(e=>l.find(t=>
1t.id===e)).filter(Boolean).map(e=>{var t;return{id:e.id,name:null!=(t=e.name)?t:""}}).map(e=>(0,n.jsx)(p.Chip,{label:e.name,startIcon:"check",kind:"secondary"},e.id))})]})}),(0,n.jsx)(p.Row.Item,{shrink:!0,children:(0,n.jsx)(p.IconButton,{kind:"plain",name:"x",onClick:()=>o(e),label:a.getString("account-selection-remove-bundle",{bundleName:null!=(t=e.name)?t:""},"Remove ".concat(e.name)),className:M().removeButton})})]})},e.uuid)})]})})})]})};var E=i(41702),R=i.n(E);let O="checking",F="recommended",q=e=>{var t;let{onChange:i=()=>null,setPersonas:c,selectedCategoryTab:d,setSelectedCategoryTab:g}=e,{l10n:f}=(0,r.B2)(),{application:b,setApplication:x,allProducts:v,productCategoryLimits:w,productCategoryMapping:k,existingCoreIdAccounts:C,existingAccounts:A,institution:I,isExisting:T}=(0,_.Xn)(),[D,P]=(0,h.useState)([]),[L,M]=(0,h.useState)(!1),[B,E]=(0,h.useState)([]),[q,Y]=(0,h.useState)(!0),[U,W]=(0,h.useState)(null),{savedSelectedProductIds:z}=(0,y.A)(),{sendNotification:H}=(0,m.M)(),{selected_products:G,bundles:V}=b;(0,h.useEffect)(()=>{if(!b.beneficiaries||0===b.beneficiaries.length)return;let e=G.map(e=>e.id),t=b.beneficiaries.map(t=>(0,s._)((0,l._)({},t),{selected_products:t.selected_products.filter(t=>e.includes(t))})).filter(e=>e.selected_products.length>0),i=new Map(t.map(e=>[e.index,e]));(t.length!==b.beneficiaries.length||b.beneficiaries.some(e=>{let t=i.get(e.index);if(!t||e.selected_products.length!==t.selected_products.length)return!0;let n=new Set(e.selected_products);return!t.selected_products.every(e=>n.has(e))}))&&x(e=>new S.lg((0,s._)((0,l._)({},e),{beneficiaries:t})))},[G,x]);let X=async e=>{try{let t=await j.lR.getEligibleProducts(e.id);if(null==t.products||null==t.bundles)return H({type:"negative",text:"There was an error fetching products. Please try again."}),o.wd("An eligible_products response contained no products array. This should not happen"),{personas:[],products:[],bundles:[]};return Y(t.includes_default_products),t}catch(e){return o.Cp(e),H({type:"negative",text:"There was an error fetching products. Please try again."}),{personas:[],products:[],bundles:[]}}},$=async(e,t,n)=>{var r;let o,a,d;if(e||(null==(r=I.features)?void 0:r.product_bundles)&&S.G8){let{bundles:e,products:n,personas:r}=await X(t);o=n,a=e,d=r;let c=[...G],u=[...t.bundles||[]],p=!1,m=!1;o.filter(e=>e.should_preselect).forEach(e=>{-1===c.findIndex(t=>t.id===e.id)&&(c.push(e),p=!0)});let h=a.filter(e=>e.should_preselect);if(h.length){let e=new Set(u.map(e=>e.uuid));h.filter(t=>!e.has(t.uuid)).forEach(e=>{for(let t of e.products_ids)if(!c.find(e=>e.id===t)){let i=v.find(e=>e.id===t);if(!i)continue;let n=(0,s._)((0,l._)({},i),{bundle_id:e.uuid}),r=el(n,c,u);null!==r&&(c=r).push(n)}c=en(c,e),u.push(e),p=!0,m=!0})}p&&i(c),m&&eo(u)}else o=n.filter(e=>N.isProductAvailable(e,b,I,C,A,z,T)),a=[],d=[];M(!0),P(o),E(a),c(d)},Q=(0,h.useMemo)(()=>u(D,B.length>0),[D,B]),J=null==(t=b.metadata)?void 0:t.selected_category;(0,h.useEffect)(()=>{J&&Q.includes(J)&&g(J)},[J,Q]);let K=Q.indexOf(d);-1===K&&(K=0);let Z=e=>e.id&&k[e.id]?k[e.id]:e.category,ee=e=>G.map(e=>e.id).includes(e.id),et=e=>V.map(e=>e.uuid).includes(e.uuid),ei=e=>V.some(t=>t.products_ids.includes(e.id)),en=(e,t)=>e.map(e=>t.products_ids.includes(e.id)?(0,s._)((0,l._)({},e),{bundle_id:t.uuid}):e);(0,h.useEffect)(()=>{var e;$(null==(e=I.features)?void 0:e.eligible_products,b,v)},[]),(0,h.useEffect)(()=>{if(!L)return;let e=D.filter(e=>!G.find(t=>t.id===e.id)&&e.required&&!e.hidden&&N.isProductBelowMaxCount(e,C,b,I)&&!z.includes(e.id)),t=D.filter(e=>!G.find(t=>t.id===e.id)&&N.isProductBelowMaxCount(e,C,b,I)&&z.includes(e.id)),n=(b.metadata.selected||"").split(","),l=n.concat(n),s=D.filter(e=>!G.find(t=>t.id===e.id)&&N.isProductBelowMaxCount(e,C,b,I)&&!z.includes(e.id)&&l.includes(e.id)),r=!1,o=[];[...G,...e,...t,...s].forEach(e=>{D.map(e=>e.id).includes(e.id)&&("checking"===e.category?r||(o.push(e),r=!0):o.push(e))}),i(o)},[D]);let el=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=Z(e),l=n===O||"ira"===n?1:w[n],s=G.findIndex(e=>Z(e)===n&&!e.required),r=G.filter(e=>Z(e)===n).length;if(n!==O&&"ira"!==n&&(r+=C.filter(e=>{let t=v.find(t=>
1t.id===e.product_id);return t?Z(t)===n:e.product_type===n}).length),l&&r>=l){let e=G[s];if(-1===s)return H({type:"negative",text:f.getString("product-limit-error",{numLimit:l,type:n},"Only ".concat(l," of type ").concat(n," can be selected."))}),null;{t.splice(s,1);let n=i.find(t=>t.products_ids.includes(e.id));if(n){let l=i.findIndex(e=>e.uuid===n.uuid),s=n.products_ids.filter(t=>t!==e.id);t=t.filter(e=>!s.includes(e.id)),-1!==l&&i.splice(l,1)}}}return t},es=e=>{try{let t=[...G],n=[...V],l=t.findIndex(t=>t.id===e.id);if(ee(e)){if(e.required){let t="".concat(e.name," is required.");H({type:"negative",text:t});return}if(ei(e)){let e=f.getString("account-selection-bundle-product-locked",null,"This account is part of a bundle you selected. Deselect the bundle to remove this account.");H({type:"negative",text:e});return}t.splice(l,1)}if(-1===l){if(!N.isProductBelowMaxCount(e,C,b,I))return void H({type:"negative",text:f.getString("account-selection-product-max-count-exceeded",null,"Max count for this product exceeded")});let i=el(e,t,n);if(null===i)return;(t=i).push(e);let l=t.map(e=>e.id);B.forEach(e=>{let i=e.products_ids.every(e=>l.includes(e)),s=!n.some(t=>t.uuid===e.uuid);i&&s&&(n.push(e),t=en(t,e))})}i(t),eo(n)}catch(e){o.Cp(e)}},er=e=>{try{let t=[...V],n=[...G],r=t.findIndex(t=>t.uuid===e.uuid);if(et(e)){let o=new Set(e.products_ids);n=n.filter(e=>!o.has(e.id)||e.required).map(e=>o.has(e.id)?(0,s._)((0,l._)({},e),{bundle_id:""}):e),i(n),t.splice(r,1)}if(-1===r){for(let i of e.products_ids)if(!n.find(e=>e.id===i)){let r=v.find(e=>e.id===i);if(!r)continue;let o=(0,s._)((0,l._)({},r),{bundle_id:e.uuid}),a=el(o,n,t);null!==a&&(n=a).push(o)}n=en(n,e),i(n),t.push(e)}eo(t)}catch(e){o.Cp(e)}},eo=e=>{x({bundles:e})},ea=e=>t=>{W(t?e:null)};return q?(0,n.jsx)(p.LoadingSkeleton,{lines:8,isLoading:!L,children:(0,n.jsx)("div",{className:R().tabsWrapper,children:(0,n.jsxs)(p.Tabs,{selectedIndex:K,onTabChange:e=>g(Q[e]),kind:"segmented",children:[(0,n.jsx)(p.Tabs.List,{children:Q.map(e=>(0,n.jsx)(p.Tabs.Tab,{label:f.getString("product-type",{type:e},"".concat(e)),tabId:e,hasStatusIndicator:(e=>e===F?V.length>0||G.some(e=>e.recommended):G.some(t=>Z(t)===e))(e)},"".concat(e,"-list")))}),Q.map(e=>(0,n.jsx)(p.Tabs.Panel,{tabId:e,children:(0,n.jsx)("div",{className:"".concat(R().categoryContainer," margin--bottom--xxl"),children:(0,n.jsxs)("div",{className:"product-card-container expandable-product-card-grid-container",children:[e===F&&B.map(e=>{e.recommended=!0,e.category=F;let t=(0,a.A$)({id:e.uuid,name:e.name,description:e.description,details:e.details,more_details_copy:e.more_details_copy},f),i="accordion-bundle-".concat(e.uuid);return(0,n.jsx)("div",{className:"expandable-product-card-wrapper",children:(0,n.jsx)(m.uj,{product:(0,l._)({},e,t),isSelected:et(e),onClick:()=>er(e),allProducts:v,clickId:"bundle-card-".concat(e.uuid),accordionId:i,isAccordionOpen:U===i,onAccordionToggle:ea(i),moreDetailsLabel:f.getString("more-details",null,"More details"),lessDetailsLabel:f.getString("less-details",null,"Less details"),monthlyServiceFeeText:f.getString("account-selection-monthly",null,"monthly"),learnMoreLabel:f.getString("account-selection-learn-more",null,"Learn more")})},e.uuid)}),(e=>D.filter(t=>e===F?t.recommended:t.category===e))(e).map(e=>{let t=(0,a.A$)({id:e.id,name:e.name,description:e.description,details:e.details,disclosures:e.disclosures,more_details_copy:e.more_details_copy,monthly_service_fee:e.monthly_service_fee},f),i="accordion-product-".concat(e.id);return(0,n.jsx)("div",{className:"expandable-product-card-wrapper",children:(0,n.jsx)(m.uj,{product:(0,l._)({},e,t),isSelected:ee(e),onClick:()=>es(e),allProducts:v,clickId:"product-card-".concat(e.id),accordionId:i,isAccordionOpen:U===i,onAccordionToggle:ea(i),moreDetailsLabel:f.getString("more-details",null,"More details"),lessDetailsLabel:f.getString("less-details",null,"Less details"),isProductInBundle:ei(e),includedInBundleLabel:f.getString("account-selection-included-in-bundle",null,"Included in your bundle"),monthlyServiceFeeText:f.getString("account-selection-monthly",null,"monthly"),learnMoreLabel:f.getString("account-selection-learn-more",null,"Learn more")})},e.id)})]})})},"".concat(e,"-panel")))]})})}):(0,n.jsx)("div",{className:"".concat(R().categoryContainer," margin--bottom--xxl"),children:(0,n.jsxs)("div",{className:"product-card-container expandable-product-card-grid-container",children:[B.map(e=>{e.recommended=!0,e.category=F;let t=(0,a.A$)({id:e.uuid,name:e.name,description:e.description,details:e.details,more_details_copy:e.more_details_copy},f),i="accordion-bundle-".concat(e.uuid);return(0,n.jsx)("div",{className:"expandable-product-card-wrapper",children:(0,n.jsx)(m.uj,{product:(0,l._)({},e,t),isSelected:et(e),onClick:()=>er(e),allProducts:v,clickId:"bundle-card-".concat(e.uuid),accordionId:i,isAccordionOpen:U===i,onAccordionToggle:ea(i),moreDetailsLabel:(null==t?void 0:t.more_details_copy)||f.getString("more-details",null,"More details"),lessDetail
1sLabel:f.getString("less-details",null,"Less details"),monthlyServiceFeeText:f.getString("account-selection-monthly",null,"monthly"),learnMoreLabel:f.getString("account-selection-learn-more",null,"Learn more")})},e.uuid)}),D.map(e=>{let t=(0,a.A$)({id:e.id,name:e.name,description:e.description,details:e.details,disclosures:e.disclosures,more_details_copy:e.more_details_copy,monthly_service_fee:e.monthly_service_fee},f),i="accordion-product-".concat(e.id);return(0,n.jsx)("div",{className:"expandable-product-card-wrapper",children:(0,n.jsx)(m.uj,{product:(0,l._)({},e,t),isSelected:ee(e),onClick:()=>es(e),allProducts:v,clickId:"product-card-".concat(e.id),accordionId:i,isAccordionOpen:U===i,onAccordionToggle:ea(i),moreDetailsLabel:f.getString("more-details",null,"More details"),lessDetailsLabel:f.getString("less-details",null,"Less details"),isProductInBundle:ei(e),includedInBundleLabel:f.getString("account-selection-included-in-bundle",null,"Included in your bundle"),monthlyServiceFeeText:f.getString("account-selection-monthly",null,"monthly"),learnMoreLabel:f.getString("account-selection-learn-more",null,"Learn more")})},e.id)})]})})},Y=()=>{let e={label:C.Tr.description,path:C.Tr.path},t=(0,x.w)(e),{setIsLoading:i}=(0,m.nk)(),{l10n:o}=(0,r.B2)(),c=(0,v.A)(),{sendNotification:d}=(0,m.M)(),[u,y]=(0,h.useState)(""),{allProducts:j,application:w,setApplication:k}=(0,_.Xn)(),{selected_products:N,bundles:A}=w,[I,T]=(0,h.useState)([]),{s:D}=(0,p.useBreakpoints)(),P=e=>e.required?void d({type:"negative",text:"".concat(e.name," is required.")}):A.some(t=>t.products_ids.includes(e.id))?void d({type:"negative",text:o.getString("account-selection-bundle-product-locked",null,"This account is part of a bundle you selected. Deselect the bundle to remove this account.")}):void k({selected_products:N.filter(t=>t.id!==e.id)}),L=e=>{let t=A.filter(t=>t.uuid!==e.uuid);k({selected_products:N.filter(t=>!e.products_ids.includes(t.id)),bundles:t})},M=(e,t)=>{if((!e||!e.length)&&(!t.bundles||!t.bundles.length)){let e=o.getString("account-selection-must-select-account-error",null,"At least one account must be selected");return d({type:"negative",text:e}),e}return null},E=["hsa","ira"].includes(u)&&!!w.selected_products.filter(e=>u==e.category).length,O=async e=>{let n=M(w.selected_products,w);if(n){"function"==typeof e&&e(n);return}i(!0);try{if(w.selected_products.some(e=>"ira"===e.category)){let e=N.flatMap(e=>{let{options:t={}}=e;return["ira_new_contribution","ira_transfer","ira_rollover"].filter(e=>t[e])});if(1===e.length){let[t]=e;w.ira_contribution=t}}let n=await c("account_opening/".concat(w.id),{method:"PUT",shouldSkipSerializeAmount:!0},(0,l._)({personas:I,selected_products:N.map(e=>(0,s._)((0,l._)({},e),{amount:null})),beneficiaries:w.beneficiaries||[]},N.some(e=>"ira"===e.category)&&w.ira_contribution&&{ira_contribution:w.ira_contribution}));if(delete w.metadata.selected,!n.application){d({type:"negative",text:o.getString("error-notification-please-retry",null,"Your secure session has expired. Please refresh the page to continue or contact Support if the issue persists.")}),i(!1);return}k(e=>new S.lg((0,s._)((0,l._)({},e),{metadata:(0,l._)({},e.metadata,(0,S.Db)(n.application.metadata)),agreement_current_session:!1,selected_products:N}))),t.pushNextStep(),"function"==typeof e&&e()}catch(i){let t=o.getString("error-notification-generic",null,"Something went wrong");"function"==typeof e?e(t):d({type:"negative",text:t})}finally{i(!1)}},F=(0,h.useMemo)(()=>N.map(e=>(0,a.A$)(e,o)),[N,o]);return(0,n.jsxs)(f.A,{activeStep:e,children:[D&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:R().desktopSelectionWrapper,children:(0,n.jsx)(B,{selectedProducts:F,selectedBundles:A||[],allProducts:j,onRemoveProduct:P,onRemoveBundle:L})}),(0,n.jsx)("div",{className:R().desktopFormSectionWrapper,children:(0,n.jsx)(p.FormSection,{})})]}),!D&&(0,n.jsxs)("div",{className:R().mobileStickyContainer,children:[(0,n.jsx)(B,{selectedProducts:F,selectedBundles:A||[],allProducts:j,onRemoveProduct:P,onRemoveBundle:L}),(0,n.jsx)(m.L8,{enableStickyMobile:!0,backLabel:o.getString("label-back-account-selection",null,"Back"),nextLabel:o.getString("label-next-account-selection",null,"Next"),onBack:()=>t.pushPrevStep(),hidePrev:!t.hasPrevStep(),onNext:O,dangerouslyDisableShowLoading:!0,shouldHideInlineToasts:!0})]}),(0,n.jsxs)("div",{className:D?"":R().mobilePageContent,children:[(0,n.jsxs)("div",{className:"large",children:[(0,n.jsx)("h1",{className:R().pageHeader,children:(0,n.jsx)(r.Oj,{id:"heading-account-selection",children:"Choose your accounts"})}),(0,n.jsx)("div",{className:R().headerSpacing}),(0,n.jsx)("div",{className:"account-selection-subtitle",children:(0,n.jsx)(r.Oj,{id:"subheading-account-selection",children:"Select the accounts you would like to open from these offerings"})}),(0,n.jsx)("div",{className:R().accountSelectionForm,children:(0,n.jsxs)(b.A,{data:w,onChange:e=>k(e),nativeForm:!1,children:[(0,n.jsx)(b.A.Field,{validate:M,children:(0,n.jsx)(q,{selectedCategoryTab:u,setSelectedCategoryTab:y,setPersonas:T,field:"selected_products"})}),(0,n.jsx)("div",{className:"margin--top--s",children:(0,n.jsx)(p.Alert,{isActive:w.hasJointApplicant()&&E,kind:"info",isDismissable:!1,children:(0,n.jsxs)("span",{children:["hsa"===u&&(0,n.jsx)(r.Oj,{id:"account-selection-hsa-info-alert",children:"Note: HSAs are only for individuals. Only the primary applicant will be included on your HSA."}),"ira"===u&&(0,n.jsx)(r.Oj,{id:"account-selection-ira-info-alert",children:"Note: IRAs are only for individuals. Only the primary applicant will be included on your IRA."})]})})}),D&&(0,n.jsx)("div",{className:"progress-buttons-container",children:(0,n.jsx)(m.L8,{backLabel:o.getString("label-back-account-selection",null,"Back"),nextLabel:o.getString("label-next-account-selection",null,"Next"),onBack:()=>t.pushPrevStep(),hidePrev:!t.hasPrevStep(),onNext:O,dangerouslyDisableShowLoading:!0,shouldHideInlineToasts:!0})})]})})]}),(0,n.jsx)(g.A,{})]})]})},U=()=>{var e;let{institution:t}=(0,_.Xn)();return(null==t||null==(e=t.features)?void 0:e.ao_account_selection_redesign)?(0,n.jsx)(Y,{}):(0,n.jsx)(P,{})}},28187:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(67059),l=i(36181);let s=()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(0,n._)({},i);return s.email&&(s.email=s.email.toLowerCase()),l.Ay.fetch(e,(0,n._)({apiUrl:"https://api.codecu.org",token:"",secret:""},t),s)}},28723:(e,t,i)=>{"use strict";i.d(t,{V:()=>u,w:()=>p});var n=i(67059),l=i(89642),s=i(46225),r=i(93477),o=i(73830),a=i(85556),c=i(48624),d=i(32250);let u=()=>{let e,{l10n:t}=(0,l.B2)(),{application:i,institution:s,eligibilityQuestions:u,shouldAskAdditionalField:p}=(0,r.Xn)(),{shouldSkipAccountActivityQuestions:m}=(0,o.x)(),h=e=a.G8?i.is_existing_on_core?c.Y5:c.fS:i.isAOIOB()?c.TX:c.g8;m&&(h=e.filter(e=>"/due_diligence"!==e.path));let g=h.filter(e=>e.isActive(i,s));return{routes:g,getPageInfo(){if(a.G8){let e=[];return i.is_existing_on_core&&e.push({path:void 0,description:"Business details",fluentMessages:{sidebarLabel:{id:"sidebar-step-business-detail
1s",fallback:"Business details"},reviewPage:{id:"review-heading-business-details",fallback:"Business details"}},data:i.getAbbreviatedBusinessInfo()}),[...e,...g.map(e=>({path:e.path,description:e.description,fluentMessages:e.fluentMessages,data:(0,c.g$)(e.getData(i,s),t,p(t.getString("label-short-date-of-incorporation")))}))]}let e=g[0],l=e.getData(i,s),r=(0,c.g$)(l,t),o=!i.selected_products.every(e=>["ira","hsa"].includes(e.category))&&i.applicants.length>1?i.applicants[1]:null,d=e.path===c.Sx.path&&g.some(e=>e.path===c.fF.path),u=[{path:e.path,description:e.description,fluentMessages:e.fluentMessages,data:d?(0,c.g$)((0,n._)({},l,c.fF.getData(i)),t):r}];return i.isAOIOB()&&!s.cao_aoiob_hide_review_applicant_details&&u.push({path:void 0,description:"Applicant details",fluentMessages:{sidebarLabel:{id:"review-heading-applicant",fallback:"Applicant details"},reviewPage:{id:"review-heading-applicant",fallback:"Applicant details"}},data:(0,c.g$)((0,c.Mt)(i.applicants[0],s),t)}),o&&u.push({path:e.path,description:"Co-applicant details",fluentMessages:{sidebarLabel:{id:"review-heading-co-applicant",fallback:"Co-applicant details"},reviewPage:{id:"review-heading-co-applicant",fallback:"Co-applicant details"}},data:(0,c.g$)((0,c.Mt)(o,s),t)}),u.concat(g.slice(1).filter(e=>!(d&&e.path===c.fF.path)).map(e=>({path:e.path,description:e.description,fluentMessages:e.fluentMessages,data:(0,c.g$)(e.getData(i,s),t)})))},determineInProgressRedirect(){var e;return i.state===d.gI.CREATING_REISSUED?c.kH.path:u&&u.length>0&&!i.core_users.length&&!(0,c.Vf)(i,s)&&0===i.eligibility_answers.length&&i.state!==d.gI.CREATING_PREAPPROVED?a.G8?"business/eligibility":"consumer/eligibility":i.should_redo_product_selection?"/account_selection":i.state===d.gI.FUNDING_FAILED?"/funding":i.state===d.gI.CREATING_UNVERIFIED_ALREADY_EXISTS_ON_CORE?"/business/locate_account":i.state===d.gI.DOCUMENTS_REQUESTED?"/consumer/documents_requested":(null==(e=g.find(e=>!e.isComplete(i)))?void 0:e.path)||"/application/complete"},getRemainingSteps:()=>i.state===d.gI.FUNDING_FAILED?[c.if,c.nb]:g.filter(e=>!e.isComplete(i))}},p=e=>{let{l10n:t}=(0,l.B2)(),i=(0,s.useRouter)(),n=u();return{nextRouter:i,steps:n,getStepsSidebar:()=>n.routes.map(e=>{let i=e.description;if("sidebarLabel"in e.fluentMessages){let{id:n,fallback:l}=e.fluentMessages.sidebarLabel;i=t.getString(n,null,l)}return{label:i,path:e.path}}),pushNextStep(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,l=this.getStepsSidebar().map(e=>e.path).indexOf(e.path),s=n.routes[l+t];s&&i.push(s.path)},hasPrevStep(){return this.getStepsSidebar().map(e=>e.path).indexOf(e.path)>0},pushPrevStep(){let t=this.getStepsSidebar().map(e=>e.path).indexOf(e.path),l=n.routes[t-1];l&&i.push(l.path)},pushSpecificStep(e){i.push(e)},getNextStep(){let t=this.getStepsSidebar().map(e=>e.path).indexOf(e.path);return n.routes[t+1]}}}},35564:e=>{e.exports={mobileDrawer:"YourSelectionDrawer_mobileDrawer__ThVq6",mobileHeaderButton:"YourSelectionDrawer_mobileHeaderButton__yJzY2",mobileHeader:"YourSelectionDrawer_mobileHeader__7k8Rd",mobileContent:"YourSelectionDrawer_mobileContent__0scTM",desktopTrigger:"YourSelectionDrawer_desktopTrigger__XsSAb",desktopTriggerEmpty:"YourSelectionDrawer_desktopTriggerEmpty__dxp_r",desktopContent:"YourSelectionDrawer_desktopContent__2OeiX",desktopWrapper:"YourSelectionDrawer_desktopWrapper__jTU_j",headerText:"YourSelectionDrawer_headerText__AhNgb",triggerText:"YourSelectionDrawer_triggerText__r3QRL",selectionCards:"YourSelectionDrawer_selectionCards__ZUc4j",bundleContent:"YourSelectionDrawer_bundleContent__RFf9_",productName:"YourSelectionDrawer_productName__jL02A",removeButton:"YourSelectionDrawer_removeButton__JZQ_D",bundleBadges:"YourSelectionDrawer_bundleBadges__A43Rc",emptyState:"YourSelectionDrawer_emptyState__ZCYl3",desktopCardContent:"YourSelectionDrawer_desktopCardContent__YRH4z",desktopProductInfo:"YourSelectionDrawer_desktopProductInfo__ecY9_",desktopProductName:"YourSelectionDrawer_desktopProductName__fYjo1",desktopMonthlyFee:"YourSelectionDrawer_desktopMonthlyFee__bJWLy",desktopRemoveButton:"YourSelectionDrawer_desktopRemoveButton__elX3h"}},41702:e=>{e.exports={mobileStickyContainer:"AccountSelectionV2_mobileStickyContainer__GIWt0",desktopSelectionWrapper:"AccountSelectionV2_desktopSelectionWrapper__QHF2V",desktopFormSectionWrapper:"AccountSelectionV2_desktopFormSectionWrapper__hdVLy",mobilePageContent:"AccountSelectionV2_mobilePageContent__zBm2T",accountSelectionForm:"AccountSelectionV2_accountSelectionForm___WE9h",categoryContainer:"AccountSelectionV2_categoryContainer__j0flX",tabsWrapper:"AccountSelectionV2_tabsWrapper__WHlKL",selectionHeader:"AccountSelectionV2_selectionHeader__MXK9P",pageHeader:"AccountSelectionV2_pageHeader__8taPI",headerSpacing:"AccountSelectionV2_headerSpacing__Yz0EG"}},48449:(e,t,i)=>{"use strict";i.d(t,{Ak:()=>n});let n=(e=21)=>{let t="",i=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&i[e]];return t}},52053:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(26514),l=i(89642),s=i(39072),r=i(93477),o=i(28723);let a=e=>{let{children:t,activeStep:i,fullHeight:a,showFDICBanner:c}=e,{institution:d}=(0,r.Xn)(),{l10n:u}=(0,l.B2)(),p=(0,o.w)(i),{fdic_ncua_logo_url:m,type:h,deposit_insurer:g}=d;return(0,n.jsxs)("div",{className:"sidebar-page-container",children:[(0,n.jsx)(s.z6,{title:d.long_name,activeStep:i,steps:
1p.getStepsSidebar(),logo_url:d.logo_url,action:e=>{p.nextRouter.push(e.path)}}),(0,n.jsxs)("div",{className:"sidebar-content-container",children:[c&&"FDIC"===g&&m&&(0,n.jsxs)("div",{className:"sidebar-page-banner",children:[(0,n.jsx)("img",{className:"sidebar-page-banner-img",src:m,"data-testid":"fdic-ncua-footer-logo",alt:u.getString("footer-alt-member-bank",{membership:"credit_union"===h?"NCUA":"FDIC"})}),u.getString("fdic-banner-copy",null,"FDIC Insured - Backed by the full faith and credit of the U.S. Government")]}),(0,n.jsx)("div",{className:"sidebar-content",style:{height:"".concat(a?"100%":null)},children:t})]})]})}},56144:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var n=i(26514),l=i(89642),s=i(39072),r=i(44455),o=i(75834),a=i(85556),c=i(68745),d=i(56518),u=i(93477),p=i(95385);let m=e=>{let{needsPadding:t,hideFDICLogo:i}=e,{l10n:m}=(0,l.B2)(),{institution:h}=(0,u.Xn)(),{long_name:g,member_dif:_,dif_logo_url:f,equal_housing_logo_url:b,fdic_ncua_logo_url:x,type:v,help_email:y,help_phone:S,terms_url:j,privacy_url:w,display_bao_footer:k,dao_footer_display_selector:N}=h,{showLangSelect:C,localeCodes:A,localeNames:I,selectedLocale:T,setSelectedLocale:D}=(0,o.useContext)(p.k),{showPrivacyPolicyLink:P,showTermsLink:L}=(0,c.A)(N,{privacyUrl:w,termsUrl:j}),[M,B]=(0,o.useState)(!1),E="credit_union"===v,R="".concat(new Date().getFullYear()," ").concat(g);return a.G8&&!k?(0,n.jsx)(n.Fragment,{}):(0,n.jsxs)("div",{className:(0,r.A)(["footer-container",{"bottom-padded":t}]),"data-testid":"footer-container",children:[(0,n.jsxs)("div",{className:"fontSize--xs margin--top--l margin--bottom--xs","data-testid":"footer-long-name",children:["\xa9 ",R]}),(0,n.jsxs)("div",{className:"footer-membership fontSize--xs margin--bottom--xs","data-testid":"footer-membership",children:[" ",(0,n.jsx)(d.A,{dao_footer_display_selector:N,isCreditUnion:E,member_dif:_}),(0,n.jsx)("span",{children:(null==N?void 0:N.show_equal_housing_lender_text)&&m.getString("footer-membership-equal-housing",null,"Equal Housing Lender")}),(0,n.jsxs)("span",{className:"footer-logo-container",children:[(null==N?void 0:N.show_fdic_ncua_logo)&&x&&!i&&(0,n.jsx)("img",{style:{cursor:"pointer"},role:"presentation",alt:m.getString("footer-alt-member-bank",{membership:E?"NCUA":"FDIC"},"Member Bank: ".concat(E?"NCUA":"FDIC")),src:x,className:"footer-logo","data-testid":"fdic-ncua-footer-logo",onClick:()=>B(!0)}),(0,n.jsx)(s.lG,{headerStyle:"plain",isOpen:M,onUserDismiss:()=>B(!1),children:(0,n.jsx)("img",{alt:m.getString("footer-alt-member-bank",{membership:E?"NCUA":"FDIC"},"Member Bank: ".concat(E?"NCUA":"FDIC")),src:x})}),(null==N?void 0:N.show_member_dif_logo)&&_&&f&&(0,n.jsx)("img",{alt:m.getString("footer-alt-dif",null,"Member Bank: Depositors Insurance Fund"),src:f,className:"footer-logo","data-testid":"member-dif-footer-logo"}),(null==N?void 0:N.show_equal_housing_lender_logo)&&(0,n.jsx)("img",{src:b||"/ehl_black.png",alt:m.getString("footer-alt-equal-housing",null,"Equal Housing Lender Logo"),className:"footer-logo","data-testid":"equal-housing-footer-logo"})]})]}),(null==N?void 0:N.show_powered_by_narmi_text)&&(0,n.jsx)("div",{className:"fontSize--xs margin--bottom--xxs","data-testid":"footer-narmi-text",children:m.getString("footer-powered-by-narmi",null,"Powered by Narmi")}),(0,n.jsxs)("div",{className:"footer-lastRow",children:[(0,n.jsxs)("div",{className:"footer-contact",children:[(null==N?void 0:N.show_help_phone)?(0,n.jsxs)("div",{className:"fontSize--xs margin--top--l margin--bottom--xs fontWeight--semibold","data-testid":"footer-help-phone",children:[m.getString("footer-support-phone",null,"Call us:")," ",(0,n.jsx)("span",{className:"fontWeight--normal",children:S})]}):(0,n.jsx)("div",{className:"fontSize--xs margin--top--l margin--bottom--xs fontWeight--semibold","data-testid":"footer-help-phone"}),(null==N?void 0:N.show_help_email)&&y&&(0,n.jsxs)("div",{className:"fontSize--xs margin--bottom--xs fontWeight--semibold","data-testid":"footer-help-email",children:[m.getString("footer-support-email",null,"Email us:")," ",(0,n.jsx)("a",{href:"mailto:".concat(y),target:"_blank",rel:"noopener noreferrer",children:(0,n.jsx)("span",{className:"fontWeight--normal",children:y})})]}),(P||L)&&(0,n.jsxs)("div",{className:"fontSize--xs fontWeight--semibold",children:[P&&(0,n.jsx)("a",{href:w,target:"_blank",rel:"noopener noreferrer","data-testid":"footer-privacy-policy",children:m.getString("footer-privacy-policy",null,"Privacy Policy")}),P&&L&&(0,n.jsx)(n.Fragment,{children:"\xa0 | \xa0"}),L&&(0,n.jsx)("a",{href:j,target:"_blank",rel:"noopener noreferrer","data-testid":"footer-terms",children:m.getString("footer-tos",null,"Terms")})]})]}),C&&(0,n.jsx)("div",{style:{minWidth:"240px"},children:(0,n.jsx)(s.T$,{localeCodes:A,localeNames:I,selectedLocale:T,onChange:e=>{D(e)}})})]})]})}},56518:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(26514),l=i(89642);let s=e=>{let{dao_footer_display_selector:t,isCreditUnion:i,member_dif:s}=e,{l10n:r}=(0,l.B2)();if((null==t?void 0:t.show_member_dif_text)&&s)return(0,n.jsx)("span",{children:"".concat(r.getString("footer-membership-fdic-dif",null,"Member FDIC and DIF.")," ")});if(null==t?void 0:t.show_membership_text){let e=i?r.getString("footer-membership-ncua",null,"Insured by NCUA."):r.getString("footer-membership-fdic",null,"Member FDIC.");return(0,n.jsx)("span",{children:"".concat(e," ")})}return null}},68745:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});let n=(e,t)=>{var i,n,l;let{privacyUrl:s,termsUrl:r}=t,o=null!=(i=null==e?void 0:e.show_privacy_policy_and_terms_links)&&i;return{showPrivacyPolicyLink:(null!=(n=null==e?void 0:e.show_privacy_policy_link)?n:o)&&!!s,showTermsLink:(null!=(l=null==e?void 0:e.show_terms_link)?l:o)&&!!r}}},73830:(e,t,i)=>{"use strict";i.d(t,{x:()=>d});var n=i(67059),l=i(89642),s=i(17375),r=i(75834),o=i(93477),a=i(85556);let c=(e,t)=>e.map(e=>(0,n._)({question:e.question||"",rawQuestion:e.rawQuestion||e.question||"",questionType:e.questionType||"",portalVersion:e.portalVersion||"",answerOptions:e.answerOptions?e.answerOptions.map(e=>({displayText:e.displayText||"",value:e.value||e.displayText||"",followUpQuestions:e.followUpQuestions?c(e.followUpQuestions):[]})):[],options:e.options||[],rawOptions:e.rawOptions||e.options||[],label:e.label||""},null!=t?{productId:t}:{}));function d(){let{l10n:e}=(0,l.B2)(),{application:t,institution:i}=(0,o.Xn)(),n=(null==i?void 0:i.skip_cao_account_activity_questions)&&!a.G8&&t.is_existing_on_core?[]:(a.G8?i.cdd_bao_questions:i.cdd_cao_questions)||[],d=t.selected_products.filter(e=>!!e.account_activity_questions).flatMap(e=>c(e.account_activity_questions,e.uuid)),u=a.G8?"bao":"cao",p=(0,r.useMemo)(()=>e?[...(0,s.a9)(n,u,e),...(0,s.a9)(d,u,e).filter((e,t,i)=>t===i.findIndex(t=>t.question===e.question))]:[],[n,d,e]),m=(0,r.useMemo)(()=>c(p),[p]),h=(0,r.useMemo)(()=>t.is_existing_on_core&&(null==i?void 0:i.skip_cao_account_activity_questions)&&0===n.length&&0===d.length,[t.is_existing_on_core,null==i?void 0:i.skip_cao_account_activity_questions,n.length,d.length]);return{institutionQuestions:n,productQuestions:d,localizedQuestions:p,parsedQuestions:m,shouldSkipAccountActivityQuestions:h}}},87118:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account_selection",function(){return i(25002)}])},96235:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(67059),l=i(94264),s=i(45176),r=i(26514),o=i(39072),a=i(48449),c=i(75834);let d=e=>{var{children:t}=e,i=(0,s._)(e,["children"]);let[d]=(0,c.useState)((0,a.Ak)());return(0,r.jsx)(o.yP,(0,l._)((0,n._)({},i),{formID:d,children:t}))};d.Field=o.yP.Field,d.Action=o.yP.Action,d.ActionBar=o.yP.ActionBar;let u=d}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=87118)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.