1import{bI as H,cm as _e,j as e,f as S,n as ye,B as w,E as $,w as M,b2 as Re,d as Y,P as Ee,u as J,bN as Se,g as Pe,k as ke,dK as pe,I as _,z as y,J as Ce,l as W,a3 as ne,R as De,az as Oe,bR as Le,b as Be,a0 as Ve,c2 as He,aZ as Me,q as he,X as oe,bT as We,Y as Ue}from"./csw-PaWQ7Lg5.js";const K="/bank/savings/securities-order/fund-details/{isin}",se="/bank/savings/securities/v2/portfolios/details/?type={portfolioType}&includeNoneTradeableOnline={includeNoneTradeableOnline}&includeGuardianAccounts={includeGuardianAccounts}",G="/bank/savings/securities-order/orders/fund/buy-order",P="/common/fund/fund-store/v2/funds/{isin}/fact-sheet",q="/common/fund/fund-store-protected/protected/funds/{isin}/cost-details",fe="/bank/savings/securities/v2/portfolios/{portfolioId}/holdings",c={fundInformation:K,getPortfoliosDetails:se,orderFund:G,fundFactSheet:P,costDetails:q,getPortfolioHoldings:fe};function $e({isin:t,preselectedPortfolioId:n}){return{buyFundForm:{formInfo:{formFields:{},validated:!1}},services:{[c.fundInformation]:{isCalling:!1,isRequested:!1,response:null},[c.costDetails]:{isCalling:!1,isRequested:!1,response:null},[c.getPortfoliosDetails]:{isCalling:!1,isRequested:!1,response:null},[c.orderFund]:{isCalling:!1,isRequested:!1,response:null},[c.fundFactSheet]:{isCalling:!1,isRequested:!1,response:null},[c.getPortfolioHoldings]:{isCalling:!1,isRequested:!1,response:null}},accounts:[],portfolioHoldings:{},selectedAccount:n??"",amount:void 0,selectedFund:t,showConfirmationModal:!1,showReceipt:!1}}function Ne(t){return(t.status||t.status===0)&&(t.status<200||t.status>299)?{errors:[{code:t.status+"",message:t.statusText}]}:t.responseJSON?t.responseJSON:t}function V(t,n,o){return t.services[n].response=Ne(o),t.services[n].isCalling=!1,t}function Ke(t){return t.name+" ("+t.number+") "+Q(t.availableForWithdrawal)}function Ge(t){return t.name+" Kontonummer "+t.number+" Tillgängligt för köp "+t.availableForWithdrawal+" kronor"}function qe(t,n){return t.services[c.getPortfoliosDetails].response=Ne(n),t.services[c.getPortfoliosDetails].isCalling=!1,n.portfolios&&n.portfolios.map(o=>t.accounts.push({label:Ke(o),value:o.id,ariaLabel:Ge(o)})),n.portfolios?.length==1&&(t.selectedAccount=n.portfolios[0].id),t}function E(t,n,o){return t.services[n].isCalling=o,t.services[n].isRequested=!1,t.services[n].shouldCallService=!1,t}function ze(t){return D(t,c.fundInformation)&&X(t,c.fundInformation),D(t,c.getPortfoliosDetails)&&X(t,c.getPortfoliosDetails),D(t,c.costDetails)&&X(t,c.costDetails),t}function ee(t,n,o){return t.services[n].isRequested=o,t}function z(t,n){return t.services[n].isCalling}function B(t,n){const o=t.services[n];return o.isRequested&&!o.isCalling&&!o.response||o.shouldCallService}function X(t,n){return t.services[n].shouldCallService=!0,t}function ie(t,n){return!!t.services[n].response}function D(t,n){return!!t.services[n].response?.errors}function Ye(t,n){return t.showConfirmationModal=n,t}function Je(t){return t.showConfirmationModal}function ge(t){return t.services[c.fundInformation].response?.fund}function re(t){return t.services[c.costDetails].response}function Xe(t,n){return t.selectedAccount=n,t}function xe(t){return t.selectedAccount}function Ze(t,n){return t.amount=n,t}function Z(t){return t.amount}function Qe(t){return t.showConfirmationModal=!0,t}function ae(t){return t.services[c.fundInformation].response?.fund.minimumReinvestmentAmount}function je(t){return t.services[c.getPortfoliosDetails].response.portfolios.find(n=>n.id===t.selectedAccount)?.availableForWithdrawal}function le(t){return t.services[c.getPortfoliosDetails].response.portfolios.find(n=>n.id===t.selectedAccount)?.tradeableOnline}function de(t){return t.services[c.getPortfoliosDetails].response.portfolios.find(n=>n.id===t.selectedAccount)?.relation.role==="MAIN_ACCOUNT_HOLDER"}function Fe(t){const n=t.services[c.getPortfoliosDetails].response.portfolios.find(x=>x.id===t.selectedAccount).name,o=t.services[c.getPortfoliosDetails].response.portfolios.find(x=>x.id===t.selectedAccount).number;return n+" "+o}function e1(t){return{portfolioId:t.selectedAccount,currency:"SEK",isin:t.selectedFund,amount:t.amount}}function t1(t){return t.showReceipt=!0,t}const U=_e({includePrefix:!1,decimals:2}),Q=H({decimals:2,currency:"kr"}),te=H({decimals:0,currency:"kr"}),ve=t=>t>0?"text-blue":t<0?"text-wine":"text-black";function n1(t){return i1(t,t.selectedAccount)?.holdings?.find(o=>o.isinCode===t.selectedFund)}
1function s1(t){return t.services[c.getPortfoliosDetails].response.portfolios.find(o=>o.id===t.selectedAccount).name}function r1(t,n,o){return V(t,c.getPortfolioHoldings,n),t.portfolioHoldings[o]=t.services[c.getPortfolioHoldings].response,t}function o1(t,n){return t.portfolioHoldings[n]&&!t.portfolioHoldings[n]?.errors}function i1(t,n){return t.portfolioHoldings[n]}function a1(t){const n=t.selectedAccount;return!!t.portfolioHoldings[n]?.errors}const l1="Granska order",d1="Fond",c1="Konto",u1="Belopp",m1="Det kan ta upp till 7 bankdagar innan fondköpet går igenom.",f1="Avbryt",x1="Bekräfta köp",p1=" kr",R={confirm:l1,fund:d1,portfolio:c1,amount:u1,delay:m1,cancelButton:f1,confirmButton:x1,sek:p1};function C1(){const t=H({decimals:2,currency:R.sek});function n({state:o,onClose:x,onOrder:d}){const[m,C]=S.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx("label",{children:R.fund}),e.jsx("p",{children:re(o).name}),e.jsx("label",{children:R.portfolio}),e.jsx("p",{children:Fe(o,o.selectedAccount)}),e.jsx("label",{children:R.amount}),e.jsx("p",{className:"h5 mt-0",children:t(o.amount)}),e.jsx("p",{className:"text-xs text-muted",children:R.delay}),e.jsx("div",{className:"text-right",children:e.jsxs(ye,{className:"mt-1",children:[e.jsx(w,{layoutOrder:2,label:R.confirmButton,buttonType:"primary",onClick:()=>{d(),C(j=>!j)},dataTestId:"buy-fund-modal-submit",spinner:m}),e.jsx(w,{label:R.cancelButton,buttonType:"link",onClick:()=>{x()},layoutOrder:1})]})})]})}return function(x){return e.jsx("div",{"data-test-id":"confirmation-modal-body",style:{borderRadius:"5px"},children:e.jsx(n,{...x})})}}const h1="Vi har tagit emot din order",g1="Fortsätt handla",j1="Tillbaka till Spara",v1="Fond",b1="Belopp",y1="Konto",k1="Beräknas synas på ditt konto",N1="kr",F1={header:"Något verkar ha gått fel",text:"Gå till Pågående ordrar och kontrollera att ordern har skickats. Om inte, försök igen.",button:"Okej, stäng"},I={successful:h1,fundlistButton:g1,overviewButton:j1,fund:v1,amount:b1,account:y1,date:k1,sek:N1,error:F1};function w1({ajax:t,model:n,modalController:o,controller:x,profile:d}){const m={...$},C=C1();function j({id:p}){p==="CONFIRM_BUY_FUND"&&x.trigger("TRACKING_EVENT_MODAL")}function r({id:p}){p==="CONFIRM_BUY_FUND"&&n.swap(Ye,!1)}function a(){o.maybeShow({id:"CONFIRM_BUY_FUND",title:R.confirm,type:"tight",noDismissButton:!0,body:e.jsx(C,{state:n.deref(),onClose:()=>{o.hide({id:"CONFIRM_BUY_FUND"})},onOrder:()=>{i(),x.trigger("TRACKING_EVENT_MODAL_CLICK")}})})}function v(){n.swap(E,K,!0),t.apip({url:M(K,{isin:n.deref().selectedFund}),type:"GET",headers:{"X-LF-Profile":JSON.stringify({customer_id:d.customerId,profile_type:d.profileType,subject_user_id:d.subjectUserId})}}).always(function(p){n.swap(V,K,p)})}function l(){n.swap(E,q,!0),t.apip({url:M(q,{isin:n.deref().selectedFund}),type:"GET",headers:{"X-LF-Profile":JSON.stringify({customer_id:d.customerId,profile_type:d.profileType,subject_user_id:d.subjectUserId})}}).always(function(p){n.swap(V,q,p)})}function g(){n.swap(E,se,!0),t.apip({url:M(se,{portfolioType:"ISK",includeNoneTradeableOnline:!0,includeGuardianAccounts:!0}),type:"GET",headers:{"X-LF-Profile":JSON.stringify({customer_id:d.customerId,profile_type:d.profileType,subject_user_id:d.subjectUserId})}}).always(function(p){n.swap(qe,p)})}function i(){n.swap(E,G,!0),t.apip({url:G,type:"POST",headers:{"X-LF-Profile":JSON.stringify({customer_id:d.customerId,profile_type:d.profileType,subject_user_id:d.subjectUserId})},data:e1(n.deref())}).always(function(p){n.swap(V,G,p),o.hide({id:"CONFIRM_BUY_FUND"}),n.swap(t1)}).fail(function(){x.trigger("TRACKING_EVENT_ERROR",I.error.header,I.error.text)})}function u(p,N){/iPad|iPhone|iPod/.test(navigator?.userAgent)?f(p,N):Re(p,N)}function f(p,N){const A=window.URL.createObjectURL(p),T=document.createElement("iframe");T.style.display="none",document.body.appendChild(T);const O=T.contentWindow.document,L=O.createElement("a");L.href=A,L.download=N,O.body.appendChild(L),L.click(),setTimeout(()=>{document.body.removeChild(T),window.URL.revokeObjectURL(A)},10)}function k(){n.swap(E,P,!0);const p=Y();t.apip({url:M(P,{isin:n.deref().selectedFund}),type:"GET",headers:{"X-LF-Profile":JSON.stringify({customer_id:d.customerId,profile_type:d.profileType,subject_user_id:d.subjectUserId}),Accept:"application/pdf"}}).done(function(N){if(N.errors)n.swap(V,P,N);else{const A="Fondfaktablad_"+n.deref().selectedFund;u(N,A)}}).fail(function(N){n.swap(V,P,N)}).always(function(){n.swap(E,P,!1),p.resolve()})}function F(){const p=fe,N=Y(),A=xe(n.deref()),T=M(p,{portfolioId:A});n.swap(E,p,!0),t.apip({url:T,type:"GET",headers:{"X-LF-Profile":JSON.stringify({customer_id:d.customerId,profile_type:d.profileType,subject_user_id:d.subjectUserId})}}).always(function(O){n.swap(r1,O,A),N.resolve()})}function b(){const p=n.deref();Je(p)?a():B(p,K)?v(n.deref().selectedFund):B(p,G)?i():B(p,se)?g():B(p,P)?k():B(p,q)?l():B(p,fe)&&F()}return{start:function(){m.listenTo(n,"change",b),m.listenTo(o,"showing",j),m.listenTo(o,"hidden",r),m.listenTo(o,"hidden",b),b()},stop:function(){m.stopListening()}}}const A1="Köp fond",I1={header:A1};function T1(){return function(){return e.jsx("div",{"data-test-id":"header",children:e.jsx(Ee,{heading:I1.header})})}}const _1="Fyll i order",R1="Om fonden",E1="Fond",S1="Belopp",P1="Konto",D1="Konto",O1="Minsta belopp: ${minimumAmount}
1 kr",L1="Tillgängligt för köp: ${availableAmount}",B1="0,00",V1={cancel:"Avbryt",continue:"Granska order"},H1={header:"NÃ¥got gick fel",text:"Sidan kunde inte laddas, försök gärna igen eller kom tillbaka senare.",button:"Försök igen",minimumAmount:"Beloppet mÃ¥ste vara minst ${minimumAmount} kr",required:"Fyll i belopp",factSheetHeader:"Ett fel uppstod",factSheetText:"faktabladet kan inte laddas ner.",notTradableAccount:"Du kan inte handla med det här kontot",back:"Tillbaka"},M1={header:"Fonden kan inte köpas",text:"Kontakta oss om du har frÃ¥gor.",button:"Tillbaka"},W1="Faktablad",U1="Ladda ner fondfaktabladet",$1="Total avgift",K1={alert:"Den totala avgiften pÃ¥ ${totalCost} är det du faktiskt betalar för fonden.",example:"Exempel",explanation:"I det här exemplet köper du fondandelar för 10 000 kr. De ökar i värde med 5 %, d.v.s. 500 kr pÃ¥ 1 Ã¥r till 10 500 kr, innan fondens avgifter är avdragna. "},G1={percentage:"Visa avgifter i procent",sek:"Visa avgifter i kronor"},q1={total:"Totalt",ariaLabel:"Graf som visar kostnader",investedAmount:"Investerat belopp: ",developmentAmount:"Värdeutveckling efter avgifter: ",totalFee:"Total avgift: ",totalFeeAfterCosts:"Totalt värde efter avgifter: "},z1={financialInstruments:"För finansiella instrument",financialInstrumentsAria:"Avgifter för finansiella instrument",investmentsAndSupport:"För investerings- och stödtjänster",investmentsAndSupportAria:"Avgifter för investerings- och stödtjänster",totalFees:"Totala kostnader och avgifter",LFFees:"Varav LF Banks tredjepartsersättning",LFFeesInfo:"Tredjepartsersättningar är ersättningar som exempelvis olika fondbolag betalar till banker och andra finansiella bolag som säljer deras fonder (Ã¥terförsäljare). Av den förvaltningsavgift du betalar används en del som ersättning till Ã¥terförsäljarna."},Y1={oneTimeCosts:"EngÃ¥ngsavgifter",oneTimeCostsInfo:"Exempel pÃ¥ engÃ¥ngsavgifter är uppläggningsavgift och distributionsavgifter. Vi tar inte ut sÃ¥dana avgifter.",ongoingCharges:"Löpande avgifter",ongoingChargesInfo:"Fondförvaltningsavgift är den vanligaste löpande avgiften. Vissa av dessa kostnader kan vara uppskattade av fondbolaget.",transactionCosts:"Transaktionskostnader",transactionCostsInfo:"Samtliga kostnader som uppkommer när fonden handlar med de värdepapper som ingÃ¥r i fonden, exempelvis courtage och valutaväxlingskostnader. Dessa kostnader är uppskattade av fondbolaget.",otherCosts:"Ãvriga kostnader",otherCostsInfo:"Vissa fonder kan utöver förvaltningsavgiften ta ut en resultatbaserad avgift. Mer detaljerad information finns i Faktabladet för respektive fond."},J1={oneTimeCosts:"EngÃ¥ngsavgifter",oneTimeCostsInfo:"Exempel pÃ¥ engÃ¥ngsavgifter är insättnings- och uppsägningsavgift. Vi tar inte ut nÃ¥gra sÃ¥dana avgifter.",ongoingCharges:"Löpande avgifter",ongoingChargesInfo:"Samtliga löpande avgifter som berör investeringstjänster till kund, exempelvis kostnader för rÃ¥dgivnings- och förvaltningstjänster. Vi tar inte ut sÃ¥dana avgifter.",transactionCosts:"Transaktionskostnader",transactionCostsInfo:"Till exempel courtage, det vill säga den avgift du betalar vid handel med aktier och vissa andra värdepapper.",supportServiceCosts:"Avgifter för stödtjänster",supportServiceCostsInfo:"Exempel pÃ¥ avgifter för stödtjänster är avgift för AktiedepÃ¥ eller Fondkonto. Vi tar inte ut sÃ¥dana avgifter.",otherCosts:"Ãvriga kostnader",otherCostsInfo:"Resultatbaserade avgifter för förvaltningstjänster. Vi tillhandahÃ¥ller inga sÃ¥dana tjänster."},X1="Handelsinformation",Z1={LFfunds:"Länsförsäkringars fonder",cutoff:"Bryttid",LFcutoffTime:"11:00",otherCutoffTime:"10:00",onYourAccount:"PÃ¥ kontot om",LFdays:"1â3 bankdagar",otherDays:"1â7 bankdagar",otherFunds:"Ãvriga fonder",infoText:"Vid handel inom ISK gäller normalt inte de bryttider som anges i fondens faktablad. Kursdag för Länsförsäkringars Bekväma fonder, SparmÃ¥l 2050, SparmÃ¥l 2055, SparmÃ¥l 2060, Barnspar 2045, Asienfond, Japan Index, Tillväxtmarknad Index samt Tillväxtmarknad Aktiv är i regel nästa bankdag om ordern lagts före bryttiden 11.00."},Q1={numberOfUnits:"Andelar",numberOfUnitsSuffix:"st",marketValue:"Dagsvärde",sinceBuy:"Sedan köp",purchaseAmount:"Anskaffningsvärde",sinceBuyKr:"Sedan köp"},et="Ditt innehav",tt="Du har inget innehav.",nt="Ditt innehav kan inte visas just nu.",s={order:_1,about:R1,fund:E1,chooseAmount:S1,chooseAccount:P1,account:D1,minimum:O1,available:L1,placeholder:B1,button:V1,error:H1,tradeStop:M1,fundFactSheet:W1,downloadFundFactSheet:U1,totalFee:$1,costs:K1,radioButton:G1,donut:q1,fees:z1,financialInstrumentCosts:Y1,investmentAndSupportCosts:J1,tradeInformation:X1,trade:Z1,portfolio:Q1,holdings:et,noHoldings:tt,holdingsErrorMessage:nt},h={setSelectedAccount:"SET_SELECTED_ACCOUNT",setAmount:"SET_AMOUNT",updateBuyFundForm:"UPDATE_BUY_FUND_FORM",callFundFactSheet:"CALL_FUND_FACT_SHEET",retryBuyView:"RETRY_BUY_FUND_VIEW",closeErrorReceipt:"EXIT_ERROR_RECIEPT",cancel:"CANCEL_BUY_FUND",toFundList:"TO_FUNDLIST",toOverview:"TO_SAVINGS_OEVRVIEW",trackingErrorClick:"TRACKING_ERROR_CLICK"},st=()=>e.jsx("div",{style:{position:"absolute",top:"-15px",left:"0px",right:"0px"}
1,"aria-hidden":!0,children:e.jsxs("svg",{width:"100%",height:"24",viewBox:"0 0 690 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",alt:"",children:[e.jsx("g",{clipPath:"url(#clip0_461_31437)",children:e.jsx("path",{d:"M690 4.37421C687.584 4.37421 685.626 2.18711 685.626 2.18711C685.626 2.18711 683.667 0 681.252 0C678.836 0 676.877 2.18711 676.877 2.18711C676.877 2.18711 674.919 4.37421 672.503 4.37421C670.087 4.37421 668.129 2.18711 668.129 2.18711C668.129 2.18711 666.171 0 663.755 0C661.339 0 659.381 2.18711 659.381 2.18711C659.381 2.18711 657.422 4.37421 655.006 4.37421C652.591 4.37421 650.632 2.18711 650.632 2.18711C650.632 2.18711 648.674 0 646.258 0C643.842 0 641.884 2.18711 641.884 2.18711C641.884 2.18711 639.925 4.37421 637.509 4.37421C635.094 4.37421 633.135 2.18711 633.135 2.18711C633.135 2.18711 631.177 0 628.761 0C626.345 0 624.387 2.18711 624.387 2.18711C624.387 2.18711 622.428 4.37421 620.013 4.37421C617.597 4.37421 615.638 2.18711 615.638 2.18711C615.638 2.18711 613.68 0 611.264 0C608.848 0 606.89 2.18711 606.89 2.18711C606.89 2.18711 604.932 4.37421 602.516 4.37421C600.1 4.37421 598.142 2.18711 598.142 2.18711C598.142 2.18711 596.183 0 593.767 0C591.352 0 589.393 2.18711 589.393 2.18711C589.393 2.18711 587.435 4.37421 585.019 4.37421C582.603 4.37421 580.645 2.18711 580.645 2.18711C580.645 2.18711 578.686 0 576.271 0C573.855 0 571.896 2.18711 571.896 2.18711C571.896 2.18711 569.938 4.37421 567.522 4.37421C565.106 4.37421 563.148 2.18711 563.148 2.18711C563.148 2.18711 561.19 0 558.774 0C556.358 0 554.399 2.18711 554.399 2.18711C554.399 2.18711 552.441 4.37421 550.025 4.37421C547.609 4.37421 545.651 2.18711 545.651 2.18711C545.651 2.18711 543.693 0 541.277 0C538.861 0 536.903 2.18711 536.903 2.18711C536.903 2.18711 534.944 4.37421 532.528 4.37421C530.113 4.37421 528.154 2.18711 528.154 2.18711C528.154 2.18711 526.196 0 523.78 0C521.364 0 519.406 2.18711 519.406 2.18711C519.406 2.18711 517.447 4.37421 515.032 4.37421C512.616 4.37421 510.657 2.18711 510.657 2.18711C510.657 2.18711 508.699 0 506.283 0C503.867 0 501.909 2.18711 501.909 2.18711C501.909 2.18711 499.951 4.37421 497.535 4.37421C495.119 4.37421 493.161 2.18711 493.161 2.18711C493.161 2.18711 491.202 0 488.786 0C486.371 0 484.412 2.18711 484.412 2.18711C484.412 2.18711 482.454 4.37421 480.038 4.37421C477.622 4.37421 475.664 2.18711 47
15.664 2.18711C475.664 2.18711 473.705 0 471.29 0C468.874 0 466.915 2.18711 466.915 2.18711C466.915 2.18711 464.957 4.37421 462.541 4.37421C460.125 4.37421 458.167 2.18711 458.167 2.18711C458.167 2.18711 456.208 0 453.793 0C451.377 0 449.418 2.18711 449.418 2.18711C449.418 2.18711 447.46 4.37421 445.044 4.37421C442.628 4.37421 440.67 2.18711 440.67 2.18711C440.67 2.18711 438.712 0 436.296 0C433.88 0 431.922 2.18711 431.922 2.18711C431.922 2.18711 429.963 4.37421 427.547 4.37421C425.132 4.37421 423.173 2.18711 423.173 2.18711C423.173 2.18711 421.215 0 418.799 0C416.383 0 414.425 2.18711 414.425 2.18711C414.425 2.18711 412.466 4.37421 410.051 4.37421C407.635 4.37421 405.676 2.18711 405.676 2.18711C405.676 2.18711 403.718 0 401.302 0C398.886 0 396.928 2.18711 396.928 2.18711C396.928 2.18711 394.97 4.37421 392.554 4.37421C390.138 4.37421 388.18 2.18711 388.18 2.18711C388.18 2.18711 386.221 0 383.805 0C381.39 0 379.431 2.18711 379.431 2.18711C379.431 2.18711 377.473 4.37421 375.057 4.37421C372.641 4.37421 370.683 2.18711 370.683 2.18711C370.683 2.18711 368.724 0 366.308 0C363.893 0 361.934 2.18711 361.934 2.18711C361.934 2.18711 359.976 4.37421 357.56 4.37421C355.144 4.37421 353.186 2.18711 353.186 2.18711C353.186 2.18711 351.227 0 348.812 0C346.396 0 344.437 2.18711 344.437 2.18711C344.437 2.18711 342.479 4.37421 340.063 4.37421C337.647 4.37421 335.689 2.18711 335.689 2.18711C335.689 2.18711 333.731 0 331.315 0C328.899 0 326.941 2.18711 326.941 2.18711C326.941 2.18711 324.982 4.37421 322.566 4.37421C320.151 4.37421 318.192 2.18711 318.192 2.18711C318.192 2.18711 316.234 0 313.818 0C311.402 0 309.444 2.18711 309.444 2.18711C309.444 2.18711 307.485 4.37421 305.07 4.37421C302.654 4.37421 300.695 2.18711 300.695 2.18711C300.695 2.18711 298.737 0 296.321 0C293.905 0 291.947 2.18711 291.947 2.18711C291.947 2.18711 289.988 4.37421 287.573 4.37421C285.157 4.37421 283.198 2.18711 283.198 2.18711C283.198 2.18711 281.24 0 278.824 0C276.408 0 274.45 2.18711 274.45 2.18711C274.45 2.18711 272.492 4.37421 270.076 4.37421C267.66 4.37421 265.702 2.18711 265.702 2.18711C265.702 2.18711 263.743 0 261.327 0C258.912 0 256.953 2.18711 256.953 2.18711C256.953 2.18711 254.995 4.37421 252.579 4.37421C250.163 4.37421 248.205 2.18711 248.205 2.18711C248.205 2.18711 246.246 0 243.831 0C241.415 0 239.456 2.18711 239.456 2.18711C239.456 2.18711 237.498 4.37421 235.082 4.37421C232.666 4.37421 230.708 2.18711 230.708 2.18711C230.708 2.18711 228.75 0 226.334 0C223.918 0 221.96 2.18711 221.96 2.18711C221.96 2.18711 220.001 4.37421 217.585 4.37421C215.17 4.37421 213.211 2.18711 213.211 2.18711C213.211 2.18711 211.253 0 208.837 0C206.421 0 204.463 2.18711 204.463 2.18711C204.463 2.18711 202.504 4.37421 200.089 4.37421C197.673 4.37421 195.714 2.18711 195.714 2.18711C195.714 2.18711 193.756 0 191.34 0C188.924 0 186.966 2.18711 186.966 2.18711C186.966 2.18711 185.007 4.37421 182.592 4.37421C180.176 4.37421 178.217 2.18711 178.217 2.18711C178.217 2.18711 176.259 0 173.843 0C171.427 0 169.469 2.18711 169.469 2.18711C169.469 2.18711 167.511 4.37421 165.095 4.37421C162.679 4.37421 160.721 2.18711 160.721 2.18711C160.721 2.18711 158.762 0 156.346 0C153.931 0 151.972 2.18711 151.972 2.18711C151.972 2.18711 150.014 4.37421 147.598 4.37421C145.182 4.37421 143.224 2.18711 143.224 2.18711C143.224 2.18711 141.265 0 138.85 0C136.434 0 134.475 2.18711 134.475 2.18711C134.475 2.18711 132.517 4.37421 130.101 4.37421C127.685 4.37421 125.727 2.18711 125.727 2.18711C125.727 2.18711 123.769 0 121.353 0C118.937 0 116.979 2.18711 116.979 2.18711C116.979 2.18711 115.02 4.37421 112.604 4.37421C110.189 4.37421 108.23 2.18711 108.23 2.18711C108.23 2.18711 106.272 0 103.856 0C101.44 0 99.4817 2.18711 99.4817 2.18711C99.4817 2.18711 97.5233 4.37421 95.1075 4.37421C92.6917 4.37421 90.7333 2.18711 90.7333 2.18711C90.7333 2.18711 88.7749 0 86.3591 0C83.9432 0 81.9849 2.18711 81.9849 2.18711C81.9849 2.18711 80.0265 4.37421 77.6107 4.37421C75.1948 4.37421 73.2365 2.18711 73.2365 2.18711C73.2365 2.18711 71.2781 0 68.8622 0C66.4464 0 64.488 2.18711 64.488 2.18711C64.488 2.18711 62.5296 4.37421 60.1138 4.37421C57.6979 4.37421 55.7396 2.18711 55.7396 2.18711C55.7396 2.18711 53.7812 0 51.3654 0C48.9495 0 46.9911 2.18711 46.9911 2.18711C46.9911 2.18711 45.0328 4.37421 42.6169 4.37421C40.2011 4.37421 38.2427 2.18711 38.2427 2.18711C38.2427 2.18711 36.2844 0 33.8685 0C31.4527 0 29.4943 2.18711 29.4943 2.18711C29.4943 2.18711 27.5359 4.37421 25.1201 4.37421C22.7043 4.37421 20.7459 2.18711 20.7459 2.18711C20.7459 2.18711 18.7875 0 16.3717 0C13.9559 0 11.9975 2.18711 11.9975 2.18711C11.9975 2.18711 10.0391 4.37421 7.6233 4.37421C5.20746 4.37421 3.24908 2.18711 3.24908 2.18711C3.24908 2.18711 1.29071 0 0 0V24H690V4.37421Z",fill:"white"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_461_31437",children:e.jsx("rect",{width:"690",height:"24",fill:"white",transform:"matrix(-1 0 0 1 690 0)"})})})]})}),rt=()=>e.jsx("div",{style:{position:"absolute",bottom:"-15px",left:"0px",right:"0px"}
1,"aria-hidden":!0,children:e.jsxs("svg",{width:"100%",height:"24",viewBox:"0 0 690 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",alt:"",children:[e.jsx("g",{clipPath:"url(#clip0_461_31445)",children:e.jsx("path",{d:"M690 19.6258C687.584 19.6258 685.626 21.8129 685.626 21.8129C685.626 21.8129 683.667 24 681.252 24C678.836 24 676.877 21.8129 676.877 21.8129C676.877 21.8129 674.919 19.6258 672.503 19.6258C670.087 19.6258 668.129 21.8129 668.129 21.8129C668.129 21.8129 666.171 24 663.755 24C661.339 24 659.381 21.8129 659.381 21.8129C659.381 21.8129 657.422 19.6258 655.006 19.6258C652.591 19.6258 650.632 21.8129 650.632 21.8129C650.632 21.8129 648.674 24 646.258 24C643.842 24 641.884 21.8129 641.884 21.8129C641.884 21.8129 639.925 19.6258 637.509 19.6258C635.094 19.6258 633.135 21.8129 633.135 21.8129C633.135 21.8129 631.177 24 628.761 24C626.345 24 624.387 21.8129 624.387 21.8129C624.387 21.8129 622.428 19.6258 620.013 19.6258C617.597 19.6258 615.638 21.8129 615.638 21.8129C615.638 21.8129 613.68 24 611.264 24C608.848 24 606.89 21.8129 606.89 21.8129C606.89 21.8129 604.932
119.6258 602.516 19.6258C600.1 19.6258 598.142 21.8129 598.142 21.8129C598.142 21.8129 596.183 24 593.767 24C591.352 24 589.393 21.8129 589.393 21.8129C589.393 21.8129 587.435 19.6258 585.019 19.6258C582.603 19.6258 580.645 21.8129 580.645 21.8129C580.645 21.8129 578.686 24 576.271 24C573.855 24 571.896 21.8129 571.896 21.8129C571.896 21.8129 569.938 19.6258 567.522 19.6258C565.106 19.6258 563.148 21.8129 563.148 21.8129C563.148 21.8129 561.19 24 558.774 24C556.358 24 554.399 21.8129 554.399 21.8129C554.399 21.8129 552.441 19.6258 550.025 19.6258C547.609 19.6258 545.651 21.8129 545.651 21.8129C545.651 21.8129 543.693 24 541.277 24C538.861 24 536.903 21.8129 536.903 21.8129C536.903 21.8129 534.944 19.6258 532.528 19.6258C530.113 19.6258 528.154 21.8129 528.154 21.8129C528.154 21.8129 526.196 24 523.78 24C521.364 24 519.406 21.8129 519.406 21.8129C519.406 21.8129 517.447 19.6258 515.032 19.6258C512.616 19.6258 510.657 21.8129 510.657 21.8129C510.657 21.8129 508.699 24 506.283 24C503.867 24 501.909 21.8129 501.909 21.8129C501.909 21.8129 499.951 19.6258 497.535 19.6258C495.119 19.6258 493.161 21.8129 493.161 21.8129C493.161 21.8129 491.202 24 488.786 24C486.371 24 484.412 21.8129 484.412 21.8129C484.412 21.8129 482.454 19.6258 480.038 19.6258C477.622 19.6258 475.664 21.8129 475.664 21.8129C475.664 21.8129 473.705 24 471.29 24C468.874 24 466.915 21.8129 466.915 21.8129C466.915 21.8129 464.957 19.6258 462.541 19.6258C460.125 19.6258 458.167 21.8129 458.167 21.8129C458.167 21.8129 456.208 24 453.793 24C451.377 24 449.418 21.8129 449.418 21.8129C449.418 21.8129 447.46 19.6258 445.044 19.6258C442.628 19.6258 440.67 21.8129 440.67 21.8129C440.67 21.8129 438.712 24 436.296 24C433.88 24 431.922 21.8129 431.922 21.8129C431.922 21.8129 429.963 19.6258 427.547 19.6258C425.132 19.6258 423.173 21.8129 423.173 21.8129C423.173 21.8129 421.215 24 418.799 24C416.383 24 414.425 21.8129 414.425 21.8129C414.425 21.8129 412.466 19.6258 410.051 19.6258C407.635 19.6258 405.676 21.8129 405.676 21.8129C405.676 21.8129 403.718 24 401.302 24C398.886 24 396.928 21.8129 396.928 21.8129C396.928 21.8129 394.97 19.6258 392.554 19.6258C390.138 19.6258 388.18 21.8129 388.18 21.8129C388.18 21.8129 386.221 24 383.805 24C381.39 24 379.431 21.8129 379.431 21.8129C379.431 21.8129 377.473 19.6258 375.057 19.6258C372.641 19.6258 370.683 21.8129 370.683 21.8129C370.683 21.8129 368.724 24 366.308 24C363.893 24 361.934 21.8129 361.934 21.8129C361.934 21.8129 359.976 19.6258 357.56 19.6258C355.144 19.6258 353.186 21.8129 353.186 21.8129C353.186 21.8129 351.227 24 348.812 24C346.396 24 344.437 21.8129 344.437 21.8129C344.437 21.8129 342.479 19.6258 340.063 19.6258C337.647 19.6258 335.689 21.8129 335.689 21.8129C335.689 21.8129 333.731 24 331.315 24C328.899 24 326.941 21.8129 326.941 21.8129C326.941 21.8129 324.982 19.6258 322.566 19.6258C320.151 19.6258 318.192 21.8129 318.192 21.8129C318.192 21.8129 316.234 24 313.818 24C311.402 24 309.444 21.8129 309.444 21.8129C309.444 21.8129 307.485 19.6258 305.07 19.6258C302.654 19.6258 300.695 21.8129 300.695 21.8129C300.695 21.8129 298.737 24 296.321 24C293.905 24 291.947 21.8129 291.947 21.8129C291.947 21.8129 289.988 19.6258 287.573 19.6258C285.157 19.6258 283.198 21.8129 283.198 21.8129C283.198 21.8129 281.24 24 278.824 24C276.408 24 274.45 21.8129 274.45 21.8129C274.45 21.8129 272.492 19.6258 270.076 19.6258C267.66 19.6258 265.702 21.8129 265.702 21.8129C265.702 21.8129 263.743 24 261.327 24C258.912 24 256.953 21.8129 256.953 21.8129C256.953 21.8129 254.995 19.6258 252.579 19.6258C250.163 19.6258 248.205 21.8129 248.205 21.8129C248.205 21.8129 246.246 24 243.831 24C241.415 24 239.456 21.8129 239.456 21.8129C239.456 21.8129 237.498 19.6258 235.082 19.6258C232.666 19.6258 230.708 21.8129 230.708 21.8129C230.708 21.8129 228.75 24 226.334 24C223.918 24 221.96 21.8129 221.96 21.8129C221.96 21.8129 220.001 19.6258 217.585 19.6258C215.17 19.6258 213.211 21.8129 213.211 21.8129C213.211 21.8129 211.253 24 208.837 24C206.421 24 204.463 21.8129 204.463 21.8129C204.463 21.8129 202.504 19.6258 200.089 19.6258C197.673 19.6258 195.714 21.8129 195.714 21.8129C195.714 21.8129 193.756 24 191.34 24C188.924 24 186.966 21.8129 186.966 21.8129C186.966 21.8129 185.007 19.6258 182.592 19.6258C180.176 19.6258 178.217 21.8129 178.217 21.8129C178.217 21.8129 176.259 24 173.843 24C171.427 24 169.469 21.8129 169.469 21.8129C169.469 21.8129 167.511 19.6258 165.095 19.6258C162.679 19.6258 160.721 21.8129 160.721 21.8129C160.721 21.8129 158.762 24 156.346 24C153.931 24 151.972 21.8129 151.972 21.8129C151.972 21.8129 150.014 19.6258 147.598 19.6258C145.182 19.6258 143.224 21.8129 143.224 21.8129C143.224 21.8129 141.265 24 138.85 24C136.434 24 134.475 21.8129 134.475 21.8129C134.475 21.8129 132.517 19.6258 130.101 19.6258C127.685 19.6258 125.727 21.8129 125.727 21.8129C125.727 21.8129 123.769 24 121.353 24C118.937 24 116.979 21.8129 116.979 21.8129C116.979 21.8129 115.02 19.6258 112.604 19.6258C110.189 19.6258 108.23 21.8129 108.23 21.8129C108.23 21.8129 106.272 24 103.856 24C101.44 24 99.4817 21.8129 99.4817 21.8129C99.4817 21.8129 97.5233 19.6258 95.1075 19.6258C92.6917 19.6258 90.7333 21.8129 90.7333 21.8129C90.7333 21.8129 88.7749 24 86.3591 24C83.9432 24 81.9849 21.8129 81.9849 21.8129C81.9849 21.8129 80.0265 19.6258 77.6107 19.6258C75.1948 19.6258 73.2365 21.8129 73.2365 21.8129C73.2365 21.8129 71.2781 24 68.8622 24C66.4464 24 64.488 21.8129 64.488 21.8129C64.488 21.8129 62.5296 19.6258
160.1138 19.6258C57.6979 19.6258 55.7396 21.8129 55.7396 21.8129C55.7396 21.8129 53.7812 24 51.3654 24C48.9495 24 46.9911 21.8129 46.9911 21.8129C46.9911 21.8129 45.0328 19.6258 42.6169 19.6258C40.2011 19.6258 38.2427 21.8129 38.2427 21.8129C38.2427 21.8129 36.2844 24 33.8685 24C31.4527 24 29.4943 21.8129 29.4943 21.8129C29.4943 21.8129 27.5359 19.6258 25.1201 19.6258C22.7043 19.6258 20.7459 21.8129 20.7459 21.8129C20.7459 21.8129 18.7875 24 16.3717 24C13.9559 24 11.9975 21.8129 11.9975 21.8129C11.9975 21.8129 10.0391 19.6258 7.62328 19.6258C5.20745 19.6258 3.24908 21.8129 3.24908 21.8129C3.24908 21.8129 1.29071 24 0 24V0H690V19.6258Z",fill:"white"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_461_31445",children:e.jsx("rect",{width:"690",height:"24",fill:"white",transform:"matrix(-1 0 0 -1 690 24)"})})})]})}),we=()=>e.jsx("div",{children:e.jsxs("svg",{width:"92",height:"109",viewBox:"0 0 92 109",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("line",{x1:"52.5",y1:"32.5",x2:"52.5",y2:"41.5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{x1:"55.5",y1:"83.5",x2:"55.5",y2:"95.5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{x1:"65.5",y1:"83.5",x2:"65.5",y2:"93.5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{x1:"26.5",y1:"83.5",x2:"26.5",y2:"92.5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{d:"M13.0718 82.5H8.03589H3V90.5H8.83746",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{d:"M2 53.3441C2 47.355 6.85505 42.5 12.8441 42.5H14V76.8989H8H2V53.3441Z",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{x1:"7.5",y1:"75.5",x2:"7.5",y2:"83.5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{x1:"36.5",y1:"83.5",x2:"36.5",y2:"95.5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{x1:"39.5",y1:"32.5",x2:"39.5",y2:"39.5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{x1:"26",y1:"55",x2:"32",y2:"55",stroke:"#E30613",strokeWidth:"3"}),e.jsx("line",{x1:"26",y1:"60",x2:"32",y2:"60",stroke:"#E30613",strokeWidth:"3"}),e.jsx("rect",{x:"19",y:"42.5",width:"54",height:"40",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{d:"M73.8841 34H18.0066C18.0066 34 16.8195 1.5 46.3841 1.5C75.9487 1.5 73.8841 34 73.8841 34Z",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{d:"M41.9084 107.5H15C15 107.5 15.8755 93 28.6734 93C41.4712 93 41.9084 107.5 41.9084 107.5Z",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{d:"M75.9084 107.5H49C49 107.5 49.8755 93 62.6734 93C75.4712 93 75.9084 107.5 75.9084 107.5Z",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("rect",{x:"32.5",y:"15",width:"27",height:"10",rx:"5",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("circle",{cx:"41",cy:"19.7705",r:"2",fill:"#005AA0"}),e.jsx("circle",{cx:"51.0957",cy:"19.7705",r:"2",fill:"#005AA0"}),e.jsx("circle",{cx:"63",cy:"56.5",r:"2",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{d:"M78.9282 82.5H83.9641H89V90.5H83.1625",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{d:"M90 53.3441C90 47.355 85.145 42.5 79.1559 42.5H78V76.8989H84H90V53.3441Z",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("line",{y1:"-1.5",x2:"8",y2:"-1.5",transform:"matrix(4.37112e-08 1 1 -4.37112e-08 86 75.5)",stroke:"#005AA0",strokeWidth:"3"})]})});function Ae({triggerEvent:t}){function n(m){return Pe(m,I)}const o=H({decimals:2,currency:I.sek});function x(){const m={small:0,large:450},{size:C,setRef:j}=J(m);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:C==="small"?"card p-2":"card p-2 d-flex layout-row",ref:j,children:[e.jsx("div",{className:C==="small"?"row justify-content-center":"",children:e.jsx(we,{})}),e.jsxs("div",{className:C==="small"?"row justify-content-center mt-2":"ml-2",children:[e.jsx("h3",{children:I.error.header}),e.jsx("p",{className:"text-center",children:I.error.text}),e.jsx(w,{label:I.error.button,onClick:r=>{r.preventDefault(),t({name:h.closeErrorReceipt}),t({name:h.trackingErrorClick})},buttonType:"secondary",fullWidth:C==="small"})]})]})})}function d(m){const C={small:0,medium:500,large:690},{size:j,setRef:r}=J(C);return e.jsx("div",{className:"pt-1",ref:r,children:e.jsxs("div",{className:j==="large"?"card col-9":"card",style:j==="small"?{}:{padding:"1rem 2rem"},"data-test-id":"order-receipt-view",children:[e.jsx(st,{}),e.jsxs("div",{className:j==="small"?"p-1 m-1":"p-2 ml-1 mr-1 mt-0 mb-0",children:[e.jsx("div",{className:"text-center","aria-hidden":!0,
1children:e.jsx(Se,{})}),e.jsx("div",{className:"text-center mb-2",children:e.jsx("h1",{className:j==="small"?"display-4 mt-2":"display-3 mt-2",children:n("successful")})}),e.jsxs("div",{className:"pt-1",children:[e.jsxs("div",{style:{borderBottom:"2px solid rgb(243, 243, 243)"},children:[e.jsx("label",{children:n("fund")}),e.jsxs("p",{children:[re(m.state)?.name," "]})]}),e.jsxs("div",{style:{borderBottom:"2px solid rgb(243, 243, 243)"},children:[e.jsx("label",{className:"mt-1",children:n("amount")}),e.jsx("p",{children:Z(m.state)&&o(Z(m.state))})]}),e.jsxs("div",{style:{borderBottom:"2px solid rgb(243, 243, 243)"},children:[e.jsx("label",{className:"mt-1",children:n("account")}),e.jsx("p",{children:xe(m.state)&&Fe(m.state,xe(m.state))})]})]}),e.jsx("div",{className:"text-center mt-2",children:e.jsx(w,{style:{minWidth:"230px"},buttonType:"primary",label:n("fundlistButton"),onClick:()=>t({name:h.toFundList})})}),e.jsx("div",{className:"text-center mt-1",children:e.jsx(w,{style:{minWidth:"230px"},buttonType:"secondary",label:n("overviewButton"),onClick:()=>t({name:h.toOverview})})})]}),e.jsx(rt,{})]})})}return function(C){return D(C.state,c.orderFund)?e.jsx(x,{}):e.jsx(d,{...C})}}const ot=()=>e.jsx("div",{children:e.jsxs("svg",{width:"75",height:"74",viewBox:"0 0 75 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxs("g",{clipPath:"url(#clip0_943_102968)",children:[e.jsx("path",{d:"M43.3941 45.8968V29.2598H30.0521V36.4568L33.8722 36.4808V50.8738H30.0521V58.2298H47.2142V50.8738H40.7752",stroke:"#005AA0",strokeWidth:"3"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M42.4522 17.2499C42.4522 14.1929 39.9713 11.7119 36.9151 11.7119C33.8592 11.7119 31.3773 14.1929 31.3773 17.2499C31.3773 20.3059 33.8592 22.7869 36.9151 22.7869C39.9713 22.7869 42.4522 20.3059 42.4522 17.2499Z",stroke:"#E30613",strokeWidth:"3"}),e.jsx("path",{d:"M22.1012 67.6925C26.8453 70.1415 32.2313 71.5245 37.9393 71.5245C57.0392 71.5245 72.5243 56.0405 72.5243 36.9395C72.5243 17.8385 57.0392 2.35449 37.9393 2.35449C18.8373 2.35449 3.35413 17.8385 3.35413 36.9395C3.35413 44.5965 5.84213 51.6735 10.0553 57.4035L3.82533 70.1115L18.1751 65.1705",stroke:"#E30613",strokeWidth:"3"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_943_102968",children:e.jsx("rect",{width:"75",height:"74",fill:"white"})})})]})});function it({fundInfo:t}){const n=H({spacer:"Â ",decimals:0,currency:"kr"});function o(l){const f=40*Math.sin(l*2*Math.PI)+50,k=-40*Math.cos(l*2*Math.PI)+50;return[f,k]}function x(l){return`(${l.from[0]}, ${l.from[1]}) -> (${l.to[0]}, ${l.to[1]})`}function d(l,g){const i=l.ratio>.5?1:0;return e.jsx("path",{d:`M ${l.from[0]} ${l.from[1]} A 40 40 0 ${i} 1 ${l.to[0]} ${l.to[1]}`,stroke:l.color,strokeWidth:g,fill:"transparent"},"arc "+x(l))}function m(l){const g=l.to[0]-50,i=l.to[1]-50,u=l.to[0]+g,f=l.to[1]+i;return e.jsx("line",{x1:50,y1:50,x2:u,y2:f,stroke:"#FFFFFF",strokeWidth:.5},"line "+x(l))}function C(l){const g=l.ratios.reduce((i,u)=>{const f=o(i.ratioSum),k=o(i.ratioSum+u.ratio);return i.arcs.push({from:f,to:k,ratio:u.ratio,color:u.color}),{arcs:i.arcs,ratioSum:i.ratioSum+u.ratio}},{arcs:[],ratioSum:0}).arcs;return e.jsx("div",{children:e.jsxs("svg",{width:l.width,height:l.height,viewBox:"0 0 100 100",role:"presentation","aria-label":s.donut.ariaLabel,children:[e.jsxs("g",{children:[g.map(i=>d(i,l.strokeWidth)),g.map(m)]}),e.jsx("text",{y:"45",fill:"black",x:"40",className:"text-xs",style:{fontSize:"0.5rem"},children:s.donut.total}),e.jsx("text",{y:"60",fill:"black",x:"30",className:"h5 text-sm",style:{fontSize:"0.7rem"},children:n(l.totalAmount)})]})})}const v=[{ratio:1-(t.valueIncreaseIncludingCosts.percentage+t.totalCosts.percentage)/100,color:"#00427A"},{ratio:t.valueIncreaseIncludingCosts.percentage/100,color:"#B9D7E7"},{ratio:t.totalCosts.percentage/100,color:"#E30613"}];return e.jsx(ke.Fragment,{children:e.jsx("div",{className:"",children:C({ratios:v,width:200,height:200,strokeWidth:7,totalAmount:t.marketValueExcludingCosts})})})}const ce=H({roundDown:!0,currency:"kr"});function Ie(t){return t==null}function at(t,n){return Ie(t)?t:t>0?"+"+n(t):n(t)}function be(t,{minDecimals:n=2,maxDecimals:o=4,suffix:x}){return Ie(t)||isNaN(t)||(t=t.toFixed(o),t=lt(t,n),t=dt(t),t=t.replace(".",","),x&&(t=t+"Â "+x)),t}function lt(t,n){const o=t.split("."),x=o[0];let d=o[1]||"";if(d.length===0)return x;for(d=d.replace(/0+$/,"");d.length<n;)d+="0";return d.length>0?`${x}.${d}`:x}function dt(t){const n=t.split("."),o=n[0],x=n[1]||"";return x.length===0?pe(o):`${pe(o)},${x}`}const ue="text-sm row ml-0 text-nowrap",me="form-text row ml-0 text-muted text-left text-nowrap";function ct({state:t}){const n=n1(t),o=s1(t),x=a1(t);function d(){if(n){const m=be(n.numberOfUnits,{minDecimals:1,maxDecimals:6,suffix:s.portfolio.numberOfUnitsSuffix}),C=ce(n.marketValue),j=be(n.growthInPercentage,{minDecimals:2,maxDecimals:2,suffix:"%"}),r=ce(n.totalPrice),a=at(n.unrealizedResult,ce);return e.jsx(e.Fragment,{children:e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.5fr 1fr 1fr",gridTemplateRows:"repeat(2, auto)",gap:"16px",height:"100%"},children:[e.jsxs("section",{style:{gridColumn:"1 / 2"},"aria-label":`${s.portfolio.numberOfUnits} ${m}
1`,children:[e.jsx("span",{className:me,"aria-hidden":!0,children:s.portfolio.numberOfUnits}),e.jsx("strong",{className:ue,"aria-hidden":!0,children:m})]}),e.jsxs("section",{"aria-label":`${s.portfolio.marketValue} ${C}`,children:[e.jsx("span",{className:me,"aria-hidden":!0,children:s.portfolio.marketValue}),e.jsx("strong",{className:ue,"aria-hidden":!0,children:C})]}),e.jsxs("section",{style:{gridColumn:"3 / 4",textAlign:"right",display:"flex",flexDirection:"column",alignItems:"end"},"aria-label":`${s.portfolio.sinceBuy} ${j}`,children:[e.jsx("span",{className:"form-text text-muted text-nowrap","aria-hidden":!0,children:s.portfolio.sinceBuy}),e.jsx("strong",{className:"text-sm text-nowrap "+ve(n.growthInPercentage),"aria-hidden":!0,children:j})]}),e.jsxs("section",{style:{gridColumn:"1 / 3"},"aria-label":`${s.portfolio.purchaseAmount} ${r}`,children:[e.jsx("span",{className:me,"aria-hidden":!0,children:s.portfolio.purchaseAmount}),e.jsx("strong",{className:ue,"aria-hidden":!0,children:r})]}),e.jsxs("section",{style:{gridColumn:"3 / 4",textAlign:"right",display:"flex",flexDirection:"column",alignItems:"end"},"aria-label":`${s.portfolio.sinceBuyKr} ${a}`,children:[e.jsx("span",{className:"form-text text-muted text-nowrap","aria-hidden":!0,children:s.portfolio.sinceBuyKr}),e.jsx("strong",{className:"text-sm text-nowrap "+ve(n.unrealizedResult),"aria-hidden":!0,children:a})]})]})})}else{const m=x?s.holdingsErrorMessage:s.noHoldings;return e.jsx("p",{className:"text-sm text-gray mb-0",children:m})}}return e.jsxs("div",{className:"mb-1 mt-1",children:[e.jsxs("div",{className:"d-flex flex-row mb-1",children:[e.jsx(_,{className:"text-blue mr-05 mx-0 my-auto",style:{height:"20px",width:"20px"},icon:y.BRIEFCASE_24}),e.jsx("h2",{className:"h5 text-blue mx-0 my-auto",children:s.holdings})]}),e.jsx("span",{className:"text-blue text-sm h4",children:o}),e.jsx(d,{})]})}function ut({state:t,localStates:n,costDetails:o,fundFactSheetService:x,triggerEvent:d}){function m({header:i,info:u,value:f,displayFormat:k}){const F=b=>k==="currency"&&b?Q(b.amount):k==="percentage"&&b?U(b.percentage):" - ";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"row delimiter-xs"}),e.jsxs("div",{className:"m-1",children:[e.jsxs("div",{className:"row",children:[e.jsx("strong",{className:"text-sm",children:i}),e.jsx("strong",{style:{flex:"auto"},className:"text-sm text-right",children:F(f)})]}),e.jsx("div",{className:"row",children:e.jsx("p",{style:{maxWidth:"85%"},className:"text-sm mb-05",children:u})})]})]})}function C({displayFormat:i,fundInfo:u}){return e.jsxs(e.Fragment,{children:[e.jsx(m,{displayFormat:i,header:s.financialInstrumentCosts.oneTimeCosts,info:s.financialInstrumentCosts.oneTimeCostsInfo,value:u.oneOffCharges}),e.jsx(m,{displayFormat:i,header:s.financialInstrumentCosts.ongoingCharges,info:s.financialInstrumentCosts.ongoingChargesInfo,value:u.ongoingCharges}),e.jsx(m,{displayFormat:i,header:s.financialInstrumentCosts.transactionCosts,info:s.financialInstrumentCosts.transactionCostsInfo,value:u.transactionCosts}),e.jsx(m,{displayFormat:i,header:s.financialInstrumentCosts.otherCosts,info:s.financialInstrumentCosts.otherCostsInfo,value:u.incidentalCosts})]})}function j({displayFormat:i}){return e.jsxs(e.Fragment,{children:[e.jsx(m,{displayFormat:i,header:s.investmentAndSupportCosts.oneTimeCosts,info:s.investmentAndSupportCosts.oneTimeCostsInfo,value:{amount:0,percentage:0}}),e.jsx(m,{displayFormat:i,header:s.investmentAndSupportCosts.ongoingCharges,info:s.investmentAndSupportCosts.ongoingChargesInfo,value:{amount:0,percentage:0}}),e.jsx(m,{displayFormat:i,header:s.investmentAndSupportCosts.transactionCosts,info:s.investmentAndSupportCosts.transactionCostsInfo,value:{amount:0,percentage:0}}),e.jsx(m,{displayFormat:i,header:s.investmentAndSupportCosts.supportServiceCosts,info:s.investmentAndSupportCosts.supportServiceCostsInfo,value:{amount:0,percentage:0}}),e.jsx(m,{displayFormat:i,header:s.investmentAndSupportCosts.otherCosts,info:s.investmentAndSupportCosts.otherCostsInfo,value:{amount:0,percentage:0}})]})}function r({fundInfo:i,displayFormat:u}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"row pt-05",children:e.jsxs("button",{className:"btn text-left p-1 b-0",style:{width:"100%",display:"flex",justifyContent:"space-between"},onClick:()=>{n.setExpandedLFFees(()=>!n.expandedLFFees),!n.expandedLFFees&&d({name:"TRACKING_EVENT",data:s.fees.LFFees})},"aria-expanded":n.expandedLFFees,children:[e.jsxs("div",{children:[e.jsx("span",{className:"h5 text-blue",children:s.fees.totalFees}),e.jsx("p",{style:{fontWeight:"400"},className:"text-black text-sm m-0",children:s.fees.LFFees})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-black mb-0",children:u==="currency"?Q(i.totalCosts.amount):U(i.totalCosts.percentage)}),e.jsx("p",{className:"mb-0 text-black",children:i.retrocessions?u==="currency"?Q(i.retrocessions.amount):U(i.retrocessions.percentage):e.jsx(e.Fragment,{children:"-"})})]}),e.jsx("div",{children:e.jsx(_,{className:"text-navy icon icon-nudge",icon:n.expandedLFFees?y.CHEVRON_UP_32:y.CHEVRON_DOWN_32,width:"32",height:"32"})})]})}),e.jsx(W,{expanded:n.expandedLFFees,children:e.jsx("div",{children:e.jsx("p",{className:"text-sm",children:s.fees.LFFeesInfo})})}),e.jsx("div",{className:"row delimiter-xs",children:e.jsxs("button",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},className:"btn text-left p-1 b-0",onClick:f=>{f.preventDefault(),n.setExpandedFinancialInstruments(!n.expandedFinancialInstruments),!n.expandedFinancialInstruments&&d({name:"TRACKING_EVENT",data:s.fees.financialInstruments})},"aria-expanded":n.expandedFinancialInstruments,"aria-label":s.fees.financialInstrumentsAria,children:[e.jsxs("span",{className:"text-strong text-blue",children:[e.jsx(_,{className:"text-blue mr-05",icon:y.WALLET_MINUS_24,width:"24",height:"24"}),s.fees.financialInstruments]}),e.jsx(_,{className:"text-navy icon icon-nudge",icon:n.expandedFinancialInstruments?y.CHEVRON_UP_32:y.CHEVRON_DOWN_32,width:"32",height:"32"})]})}),e.jsx(W,{expanded:n.expandedFinancialInstruments,children:e.jsx(C,{displayFormat:u,fundInfo:i})}),e.jsx("div",{className:"row delimiter-xs",children:e.jsxs("button",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},className:"btn p-1 b-0",onClick:f=>{f.preventDefault(),n.setExpandedInvestments(!n.expandedInvestments),!n.expandedInvestments&&d({name:"TRACKING_EVENT",data:s.fees.investmentsAndSupport})},"aria-expanded":n.expandedInvestments,"aria-label":s.fees.investmentsAndSupportAria,children:[e.jsxs("span",{className:"text-strong text-blue",children:[e.jsx(_,{className:"text-blue mr-05",icon:y.WALLET_MINUS_24,width:"24",height:"24"}),s.fees.investmentsAndSupport]}),e.jsx(_,{className:"text-navy icon icon-nudge",icon:n.expandedInvestments?y.CHEVRON_UP_32:y.CHEVRON_DOWN_32,width:"32",height:"32"})]})}),e.jsx(W,{expanded:n.expandedInvestments,children:e.jsx(j,{displayFormat:u})})]})}function a({fundInfo:i}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{marginLeft:"-16px",marginRight:"-16px"},className:"my-1 text-center pt-1 delimiter-xs",children:e.jsx(De,{style:{flex:"auto"},asButtons:!0,options:[{value:"percentage",label:"%",ariaLabel:s.radioButton.percentage},{value:"currency",label:"kr",ariaLabel:s.radioButton.sek}],value:n.displayFormat,onChange:u=>{n.setDisplayFormat(u)}})}),e.jsx("div",{children:e.jsx(r,{displayFormat:n.displayFormat,fundInfo:i})})]})}function v(){const i=o,u=({color:f,label:k,amount:F})=>e.jsxs("div",{className:"row ml-05",children:[e.jsx("div",{style:{width:"8px",height:"24px",backgroundColor:f,borderRadius:"15p
1x"}}),e.jsxs("p",{className:"ml-05",children:[k,e.jsx("strong",{children:F})]})]});return e.jsxs(e.Fragment,{children:[e.jsx(Ce,{alertText:ne(s.costs.alert,{totalCost:U(i.totalCosts.percentage)}),type:"info",dismissible:!1,icon:y.INFO_ENCLOSED_24,className:"mb-1"}),e.jsx("strong",{children:s.costs.example}),e.jsx("p",{children:s.costs.explanation}),e.jsx("div",{className:"text-center",children:e.jsx(it,{fundInfo:i})}),e.jsxs("div",{className:"mt-1",children:[e.jsx(u,{color:"#00427A",label:s.donut.investedAmount,amount:te(i.investedAmount)}),e.jsx(u,{color:"#B9D7E7",label:s.donut.developmentAmount,amount:te(i.valueIncreaseIncludingCosts.amount)}),e.jsx(u,{color:"#E30613",label:s.donut.totalFee,amount:te(i.totalCosts.amount)}),e.jsxs("p",{children:[s.donut.totalFeeAfterCosts,e.jsx("strong",{children:te(i.marketValueIncludingCosts)})]})]}),e.jsx(a,{fundInfo:i})]})}function l(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"row mt-025",children:e.jsxs("button",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},className:"btn b-0 my-025","aria-expanded":n.expandedTradeInfo,onClick:function(){n.setExpandedTradeInfo(!n.expandedTradeInfo),!n.expandedTradeInfo&&d({name:"TRACKING_EVENT",data:s.tradeInformation})},children:[e.jsx("span",{className:"text-blue h5 mt-0",children:s.tradeInformation}),e.jsx(_,{className:"text-blue icon icon-nudge",icon:n.expandedTradeInfo?y.CHEVRON_UP_32:y.CHEVRON_DOWN_32,width:"32",height:"32"})]})}),e.jsx(W,{expanded:n.expandedTradeInfo,children:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"label",children:s.trade.LFfunds}),e.jsxs("div",{className:"row mt-1",children:[e.jsx("p",{className:"col-6 text-left",children:s.trade.cutoff}),e.jsx("p",{className:"col-6 text-right",children:s.trade.LFcutoffTime})]}),e.jsxs("div",{className:"row",children:[e.jsx("p",{className:"col-6 text-left",children:s.trade.onYourAccount}),e.jsx("p",{className:"col-6 text-right",children:s.trade.LFdays})]}),e.jsx("span",{className:"label",children:s.trade.otherFunds}),e.jsxs("div",{className:"row mt-1",children:[e.jsx("p",{className:"col-6 text-left",children:s.trade.cutoff}),e.jsx("p",{className:"col-6 text-right",children:s.trade.otherCutoffTime})]}),e.jsxs("div",{className:"row",children:[e.jsx("p",{className:"col-6 text-left",children:s.trade.onYourAccount}),e.jsx("p",{className:"col-6 text-right",children:s.trade.otherDays})]}),e.jsx("p",{className:"text-gray text-sm pb-1",children:s.trade.infoText})]})})]})}function g(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{marginLeft:"-16px",marginRight:"-16px"},className:"delimiter-xs"}),e.jsx("div",{className:"row",children:e.jsxs("button",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},className:"btn b-0 my-025",onClick:()=>{n.setExpandedCostInfo(!n.expandedCostInfo),!n.expandedCostInfo&&d({name:"TRACKING_EVENT",data:s.totalFee})},"aria-expanded":n.expandedCostInfo,children:[e.jsxs("span",{className:"text-blue h5 mt-0",children:[s.totalFee," ",U(o.totalCosts.percentage)]}),e.jsx(_,{className:"text-blue icon icon-nudge",icon:n.expandedCostInfo?y.CHEVRON_UP_32:y.CHEVRON_DOWN_32,width:"32",height:"32"})]})}),e.jsx(W,{expanded:n.expandedCostInfo,children:e.jsx(v,{})})]})}return e.jsx(e.Fragment,{children:e.jsx("div",{className:"card",children:e.jsx("div",{className:"card-body p-0 pt-025",children:e.jsxs("div",{className:"m-1",children:[e.jsx(ct,{state:t}),e.jsx("div",{style:{marginLeft:"-16px",marginRight:"-16px"},className:"delimiter-xs"}),e.jsx(w,{buttonType:"link",leftIcon:y.PDF_DOCUMENT_24,className:"mt-1 mb-1",dataTestId:"fund-fact-sheet-link",spinner:x.isCalling,onClick:()=>d({name:h.callFundFactSheet}),label:s.fundFactSheet,ariaLabel:s.downloadFundFactSheet}),!!x.response?.errors&&e.jsx(Ce,{className:"mb-1",dataTestId:"fund-fact-sheet-error",headerText:s.error.factSheetHeader,alertText:s.error.factSheetText,type:"warning"}),e.jsx("div",{style:{marginLeft:"-16px",marginRight:"-16px"},className:"delimiter-xs"}),e.jsx(l,{}),e.jsx(g,{})]})})})})}function mt({triggerEvent:t,handleSubmit:n,viewportOffsetModel:o}){const x=Ae({triggerEvent:t});function d({state:r,size:a,updateFormInfo:v}){const l=ke.useCallback(Le(v,h.updateBuyFundForm),[v,h.updateBuyFundForm]);return e.jsx(e.Fragment,{children:e.jsx("div",{className:"card",style:{position:"sticky",top:o.deref().top+10},children:e.jsxs("div",{className:"card-body",children:[e.jsx("label",{children:s.fund}),e.jsx("h4",{"data-test-id":"buy-fund-name",className:"mt-0 text-blue",children:re(r).name}),e.jsxs("form",{noValidate:!0,onSubmit:n,className:"mt-1",children:[r.accounts.length>1?e.jsx(Be,{className:"mt-15",style:{maxWidth:"400px"},id:"account-dropdown",dataTestId:"account-dropdown",required:!0,label:s.chooseAccount,value:r.selectedAccount,onChange:g=>{t({name:h.setSelectedAccount,data:g})},options:r.accounts,validators:[{validate:()=>le(r)&&de(r),invalidText:s.error.notTradableAccount}],validated:r.buyFundForm.formInfo.validated,updateInfo:l,disabled:z(r,c.getPortfolioHoldings)}):e.jsxs(e.Fragment,{children:[e.jsx("label",{children:s.account}),e.jsx("p",{className:"mb-0",children:r.accounts[0].label}),e.jsx(Ve,{className:"hidden m-0",updateInfo:l,validated:r.buyFundForm.formInfo.validated,required:!1,validators:[{validate:()=>le(r)&&de(r),invalidText:s.error.notTradableAccount}]}),r.buyFundForm.formInfo.validated&&(!le(r)||!de(r))&&e.jsx(He,{validated:r.buyFundForm.formInfo.validated,className:"pb-0",formFields:r.buyFundForm.formInfo.formFields,formFieldsInvalidText:s.error.notTradableAccount})]}),e.jsx(Me,{style:a==="small"?{maxWidth:"100%"}:{maxWidth:"240px"},className:"mt-15",id:"amount-input",value:r.amount,decimals:2,placeholder:s.placeholder,dataTestId:"amount-input",label:s.chooseAmount,required:!1,info:ge(r).minimumReinvestmentAmount&&ne(s.minimum,{minimumAmount:ae(r)}),onChange:g=>{t({name:h.setAmount,data:g})},validators:[{validate:()=>!!Z(r),invalidText:s.error.required},{validate:()=>
1Z(r)<=je(r),invalidText:ne(s.available,{availableAmount:Q(je(r))})},{validate:()=>Z(r)>=ae(r),invalidText:ne(s.error.minimumAmount,{minimumAmount:ae(r)})}],updateInfo:l,validated:r.buyFundForm.formInfo.validated})]}),e.jsx("div",{className:"mt-1",children:e.jsxs(ye,{className:"mt-15",fullWidth:a==="small",children:[e.jsx(w,{layoutOrder:2,label:s.button.continue,buttonType:"primary",ariaLabel:s.button.continue,onClick:()=>{n()},type:"submit",dataTestId:"buy-fund-submit"}),e.jsx(w,{label:s.button.cancel,ariaLabel:s.button.cancel,buttonType:"link",onClick:()=>{t({name:h.cancel})},layoutOrder:1})]})})]})})})}function m({state:r}){const a={small:0,large:450},{size:v,setRef:l}=J(a);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:v==="small"?"card p-2":"card p-2 d-flex layout-row",ref:l,children:[e.jsx("div",{className:v==="small"?"row justify-content-center":"",children:e.jsx(we,{})}),e.jsxs("div",{className:v==="small"?"row justify-content-center mt-2":"ml-2",children:[e.jsx("h3",{children:s.error.header}),e.jsx("p",{className:v==="small"?"text-center":"",children:s.error.text}),e.jsx(w,{label:s.error.button,onClick:()=>{t({name:h.retryBuyView})},buttonType:"secondary",fullWidth:v==="small",spinner:z(r,c.costDetails)||z(r,c.getPortfoliosDetails)||z(r,c.fundInformation)}),e.jsx(w,{className:"ml-1 mt-05",label:s.error.back,onClick:()=>{t({name:h.cancel})},buttonType:"link"})]})]})})}function C(){const r={small:0,large:400},{size:a,setRef:v}=J(r);return e.jsx(e.Fragment,{children:e.jsxs("div",{"data-test-id":"trade-stop-panel",className:a==="small"?"card p-2":"card p-2 d-flex layout-row",ref:v,children:[e.jsx("div",{className:a==="small"?"row justify-content-center":"d-flex align-items-center",children:e.jsx(ot,{})}),e.jsxs("div",{className:a==="small"?"row justify-content-center mt-2":"ml-2",children:[e.jsx("h3",{children:s.tradeStop.header}),e.jsx("p",{className:"text-center",children:s.tradeStop.text}),e.jsx(w,{label:s.tradeStop.button,onClick:()=>{t({name:h.cancel})},buttonType:"secondary",fullWidth:a==="small"})]})]})})}function j({state:r,updateFormInfo:a}){const v={small:0,smallmedium:380,medium:450,large:730},{size:l,setRef:g}=J(v),[i,u]=S.useState(!1),[f,k]=S.useState(!1),[F,b]=S.useState(!1),[p,N]=S.useState("percentage"),[A,T]=S.useState(!1),[O,L]=S.useState(!1),Te={expandedLFFees:i,setExpandedLFFees:u,expandedFinancialInstruments:f,setExpandedFinancialInstruments:k,expandedInvestments:F,setExpandedInvestments:b,displayFormat:p,setDisplayFormat:N,expandedTradeInfo:A,setExpandedTradeInfo:T,expandedCostInfo:O,setExpandedCostInfo:L};return e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"sr-only",children:s.order}),e.jsxs("div",{className:l==="large"?"row mx-0":"","data-test-id":"buy-fund-view",ref:g,children:[e.jsxs("div",{style:{flexGrow:1},className:l==="large"?"mr-1":"",children:[e.jsx("h2",{className:"sr-only",children:s.order}),e.jsx(d,{state:r,size:l,updateFormInfo:a})]}),e.jsxs("div",{style:l!=="small"?{height:"fit-content",width:"380px"}:{maxWidth:"380px"},children:[e.jsx("h2",{className:"sr-only",children:s.about}),e.jsx(ut,{state:r,localStates:Te,costDetails:re(r),fundFactSheetService:r.services[c.fundFactSheet],triggerEvent:t})]})]})]})}return function({state:a,updateFormInfo:v}){return ie(a,c.fundInformation)&&ie(a,c.getPortfoliosDetails)&&ie(a,c.costDetails)?a.showReceipt?e.jsx(x,{state:a}):!D(a,c.fundInformation)&&!D(a,c.getPortfoliosDetails)&&!D(a,c.costDetails)&&!a.accounts?.length<1?ge(a).buyable?e.jsx(j,{state:a,updateFormInfo:v}):e.jsx(C,{}):e.jsx(m,{state:a}):e.jsx(Oe,{})}}function xt({ajax:t,isin:n,profile:o,modalController:x,viewportOffsetModel:d=he({top:0}),windowObject:m=window,preselectedPortfolioId:C,portfolioName:j}){const r={...$},a=he($e({isin:n,preselectedPortfolioId:C}));return w1({ajax:t,model:a,controller:r,modalController:x,profile:o}).start(),r.headerView=(function(){return{render:function(l){const g=T1(),i=oe({target:l,Component:g});i.render();const u={...$};return u.listenTo(a,"change",i.render),u.remove=function(){u.stopListening(),i.unmountComponent()},u},getPromise:function(){return Y().resolve()}}})(),r.buyFundView=(function(){const l=Ue(["buyFundForm","formInfo"]),g=f=>a.swap(l,f.data),i=We(["buyFundForm","formInfo"],a,d,m,function(){a.swap(Qe)});function u(f){f.name===h.setSelectedAccount?(a.swap(Xe,f.data),!o1(a.deref(),f.data)&&!z(a.deref(),c.getPortfolioHoldings)&&a.swap(X,c.getPortfolioHoldings,!0)):f.name===h.setAmount?a.swap(Ze,f.data):f.name===h.updateBuyFundForm?a.swap(l,f.data):f.name===h.callFun
1dFactSheet?a.swap(X,c.fundFactSheet):f.name===h.retryBuyView?a.swap(ze):f.name===h.cancel&&j?r.trigger("TO_PORTFOLIO_DETAILS",{portfolioName:j,portfolioId:C}):f.name===h.cancel||f.name===h.toFundList||f.name===h.closeErrorReceipt?r.trigger("TO_FUNDLIST",C):f.name===h.toOverview?r.trigger("TO_OVERVIEW"):f.name==="TRACKING_EVENT"?r.trigger("TRACKING_EVENT",f.data):f.name===h.trackingErrorClick&&r.trigger("TRACKING_ERROR_CLICK",I.error.header,I.error.text)}return{render:function(f){const k=mt({handleSubmit:i,triggerEvent:u,viewportOffsetModel:d}),F=oe({target:f,Component:k,getProps:function(){return{state:a.deref(),updateFormInfo:g}}});F.render();const b={...$};return b.listenTo(a,"change",F.render),b.remove=function(){b.stopListening(),F.unmountComponent()},b},getPromise:function(){return Y().resolve()},prepare:function(){a.swap(ee,c.fundInformation,!0),a.swap(ee,c.costDetails,!0),a.swap(ee,c.getPortfoliosDetails,!0),a.swap(ee,c.getPortfolioHoldings,!0)}}})(),r.orderReceiptView=(function(){return{render:function(l){const g=Ae({triggerEvent:void 0}),i=oe({target:l,Component:g,getProps:function(){return{state:a.deref()}}});i.render();const u={...$};return u.listenTo(a,"change",i.render),u.remove=function(){u.stopListening(),i.unmountComponent()},u},getPromise:function(){return Y().resolve()}}})(),r}export{xt as default};
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.