1import{g as I,E as L,aB as be,w as Z,j as t,d as A,P as je,r as Ee,I as ye,z as F,bF as q,H as ve,u as De,aA as le,aR as H,bq as Ne,f as Te,l as ke,B as P,n as we,q as Se,W as K,aN as Ie}from"./csw-BtSoxXyh.js";const M="/bank/savings/securities-order/orders?accountId={accountId}&accountType={accountType}",$="/bank/savings/securities-order/portfolios/{portfolioId}/cancelorder/{orderId}",y={getPortfolioOrders:M,cancelPortfolioOrder:$},Re="Fonder",Le="Aktier",_e={header:"Inga pågående ordrar",subHeader:"När du har ordrar som inte gått till avslut visas de här.",imgAltText:"Kvinna sitter på sitt kontor och skriver på sin dator. Illustration"},Me={buy:"Köp",sell:"Sälj",buySwitch:"Köp byte",sellSwitch:"Sälj byte"},Ae={short:{inTheMarket:"I marknaden",partiallyFilled:"Delvis genomförd",pendingCancel:"Under borttagande",rejectedByMarket:"Avvisad av marknaden",waitingForMarketOpen:"Väntar på marknadsöppning"},detailed:{inTheMarket:"Din order befinner sig i marknaden",partiallyFilled:"Din order är delvis genomförd",pendingCancel:"Din order kommer snart att tas bort",rejectedByMarket:"Din order har avvisats",waitingForMarketOpen:"Din order väntar på marknadsöppning"}},Fe="Värdepapper",Pe={SHARE:"Aktie",DERIVATIVE:"Derivat",RIGHT:"Rätt",BOND:"Obligation",EXCHANGE_TRADED_FUND:"Börshandlad fond"},Be={approxAmount:"Prel. belopp",quantity:"Andelar",amount:"Belopp"},He="Något blev fel, vänligen ta kontakt med oss",Ke="st",Ve="Ordervärde",qe="kr",$e="Kurs",Ge="Giltig t.o.m.",We="Ta bort",Je={title:"Ser du inte fonden eller aktien?",body:"När en fond- eller aktieorder har gått till avslut syns den under transaktioner."},Ue={errorHeaderText:"Ajdå, något gick fel",errorBodyText:"Försök gärna igen eller kom tillbaka senare..",errorButton:"Försök igen",tryAgain:"Försök igen",alert:{shares:{header:"Ditt aktieinnehav kunde inte visas",text:"Kom gärna tillbaka om en stund eller försök igen."},funds:{header:"Ditt fondinnehav kunde inte visas",text:"Kom gärna tillbaka om en stund eller försök igen."}}},de={funds:Re,shares:Le,noActiveOrders:_e,actions:Me,orderStatus:Ae,instrumentType:Fe,orderInstrumentTypes:Pe,labels:Be,contactLf:He,pieces:Ke,orderValue:Ve,swedishCrowns:qe,limitPrice:$e,expireDate:Ge,remove:We,callout:Je,errors:Ue},ce="fund",ue="share";function Qe(){return{services:{[y.getPortfolioOrders]:{isCalling:!1,isRequested:!1,response:null},[y.cancelPortfolioOrder]:{isCalling:!1,isRequested:!1,response:null}},orderIdToDelete:"",shouldHideConfirmDeleteModal:!1,shouldShowConfirmDeleteModal:!1}}function Ye(e){return(e.status||e.status===0)&&(e.status<200||e.status>299)?{errors:[{code:e.status+"",message:e.statusText}]}:e.responseJSON?e.responseJSON:e}function z(e,r,s){return e.services[r].response=Ye(s),e.services[r].isCalling=!1,e}function ee(e,r,s){return e.services[r].isCalling=s,e.services[r].isRequested=!1,e.services[r].shouldCallService=!1,e}function Xe(e,r,s){return e.services[r].isRequested=s,e}function G(e,r){return e.services[r].isCalling}function te(e,r){const s=e.services[r];return s.isRequested&&!s.isCalling&&!s.response||s.shouldCallService}function W(e,r){return e.services[r].shouldCallService=!0,e}function R(e){return e.services[y.getPortfolioOrders]?.response}function Ze(e){return e.services[y.cancelPortfolioOrder].response=null,e}function Q(e){return R(e)?.fundOrders}function ze(e){return Q(e).sort((r,s)=>r.fundName.localeCompare(s.fundName))}function Y(e){return R(e)?.shareOrders}function et(e){return Y(e).sort((r,s)=>r.instrumentName.localeCompare(s.instrumentName))}function V(e){return[...Q(e),...Y(e)].length<=0}function tt(e){return e.fundName}function rt(e){return e.instrumentName}function nt(e){return e.side}function st(e){return e.transactionStatus}function re(e){return e.status}function it(e){return e.buyOrder?.amount}function fe(e){return!!e.buyOrder}function me(e){return!!e.sellOrder}function at(e){return e.sellOrder?.amount}function ot(e){return e.buyOrder?.fundSwitchId}function lt(e){return e.sellOrder?.fundSwitchId}function dt(e){return e.sellOrder?.quantity}function ct(e){return e.currency}function ut(e){return e.value}function ft(e){return e.pendingQuantity}function ne(e){return e.limitPrice}function mt(e){return e.expireDate}function xt(e){return e.instrumentType}function J(e){return e?.services[y.cancelPortfolioOrder]?.response}function xe(e){return J(e)?.errors}function he(e){return R(e)?.errors}function ge(e){return R(e)?.fundOrderFailure}function pe(e){return R(e)?.shareOrderFailure}function se(e){return ge(e)||pe(e)}function ht(e){return e.orderIdToDelete}function U(e,r){return e.orderIdToDelete=r,e}function gt(e){return e.shouldShowConfirmDeleteModal}function ie(e,r){return e.shouldShowConfirmDeleteModal=r,e}function pt(e){return e.shouldHideConfirmDeleteModal}function Ce(e,r){return e.shouldHideConfirmDeleteModal=r,e}function ae(e){const r={};return r.customer_id=e.customerId,r.profile_type=e.profileType,e.subjectUserId&&(r.subject_user_id=e.subjectUserId),r}function oe(e){let r;return r="swedishCurrency",r}function v(e){return I(e,de)}function Ct(e){let r;switch(e){case"IN_THE_MARKET":r="inTheMarket";break;case"PARTIALLY_FILLED":r="partiallyFilled";break;case"PENDING_CANCEL":r="pendingCancel";break;case"REJECTED_BY_MARKET":r="rejectedByMarket";break;case"WAITING_FOR_MARKET_OPEN":r="waitingForMarketOpen";break;case"CONTACT_LF":r="contactLf";break}return v("orderStatus.short."+r)}function Ot(e){let r;switch(e){case"IN_THE_MARKET":r="inTheMarket";break;case"PARTIALLY_FILLED":r="partiallyFilled";break;case"PENDING_CANCEL":r="pendingCancel";break;case"REJECTED_BY_MARKET":r="rejectedByMarket";break;case"WAITING_FOR_MARKET_OPEN":r="waitingForMarketOpen";break;case"CONTACT_LF":r="contactLf";break}return v("orderStatus.detailed."+r)}function bt(e){if(e==="BUY")return v("actions.buy");if(e==="SELL")return v("actions.sell")}function jt(e){if(ot(e))return v("actions.buySwitch");if(lt(e))return v("actions.sellSwitch");if(fe(e))return v("actions.buy");if(me(e))return v("actions.sell")}function Et(e){if(fe(e))return it(e);
1if(me(e))return at(e)}function yt(e){return dt(e)}function vt(e,r){if(r)return v("labels.quantity");if(e===ue)return v("labels.approxAmount");if(e===ce)return v("labels.amount")}function Dt(e){return R(e)&&!he(e)}const Nt="Ta bort order",Tt="Din order kommer att tas bort snarast.",kt={confirmDelete:"Ja, ta bort",confirmCancel:"Nej, gå tillbaka",closeModal:"Okej, stäng"},wt={successful:"Din order kommer att tas bort, du kan se det på ditt konto inom kort.",error:"Din order kunde inte tas bort, kontakta oss om problemet kvarstår."},Oe={header:Nt,infoMessage:Tt,buttons:kt,deleteMessage:wt};function St(e){return I(e,Oe)}function It({ajax:e,controller:r,model:s,modalController:x,profile:O,portfolioId:g,portfolioType:N}){const b={...L},p=be();function m(){const n=M,c=A();s.swap(ee,n,!0),e.apip({url:Z(n,{accountId:g,accountType:N}),type:"GET",headers:{"X-LF-Profile":JSON.stringify(ae(O))}}).always(function(f){s.swap(z,n,f),c.resolve()})}function k(){const n=$,c=A(),f=s.deref();s.swap(ee,n,!0);const D=1e3;e.apip({url:Z(n,{portfolioId:g,orderId:ht(f)}),type:"DELETE",headers:{"X-LF-Profile":JSON.stringify(ae(O))}}).always(function(T){setTimeout(()=>{s.swap(z,n,T),s.swap(U,""),xe(f)||s.swap(W,M),c.resolve()},D)})}function j(){x.maybeShow({id:"CANCEL_ORDER_MODAL",title:St("header"),body:t.jsx(p,{view:r.confirmDeleteModal})})}function E(){x.hide({id:"CANCEL_ORDER_MODAL"}),s.swap(Ce,!1),s.swap(U,""),s.swap(Ze)}function a(){const n=s.deref();te(n,M)?m():te(n,$)?k():gt(n)?j():pt(n)&&E()}return{start:function(){b.listenTo(s,"change",a),a()},stop:function(){b.stopListening()}}}const Rt="Pågående ordrar",Lt={orders:Rt};function _t(){return function(){return t.jsx(je,{heading:I("orders",Lt),className:"mb-2"})}}function Mt(){return function({rowHeaderName:r}){return t.jsx("h2",{"data-test-id":"row-header","aria-label":r,className:"h4 mb-0 p-1 bg-white border-bottom-1px-grey",children:r})}}const At="ISK",Ft="Aktiekonto",Pt="IPS",Bt="kr",Ht="Antal",Kt="Kurs",Vt="st",qt="Andelar",$t={investmentSavings:At,shares:Ft,pension:Pt,swedishCurrency:Bt,pendingQuantity:Ht,limitPrice:Kt,pieces:Vt,quantity:qt};function S(e){return I(e,$t)}function Gt({elq:e}){const r=Ee({elq:e}),s=q({decimals:2}),x=q({decimals:6});function O({actionType:a,orderStatus:n}){return t.jsx("div",{className:"text-muted text-left",children:a+" - "+n})}function g({text:a}){return t.jsx("div",{className:"text-muted text-right",children:a})}function N({pendingQuantity:a}){return t.jsxs("div",{className:"font-weight-bold text-right",children:[a," ",S("pieces")]})}function b({limitPrice:a,currency:n}){return t.jsxs("div",{className:"font-weight-bold text-right",children:[s(a)," ",S(oe(n))]})}function p({totalAmount:a,currency:n,quantity:c}){return t.jsx("div",{className:"font-weight-bold text-right",children:a?s(a)+" "+S(oe(n)):x(c)})}function m({holdingName:a,subHeaderAriaLabel:n}){return t.jsx(t.Fragment,{children:a&&t.jsx("div",{className:"h5 text-blue text-left m-0","data-test-id":"sub-header-text","aria-label":n,children:a})})}function k({pendingQuantity:a,limitPrice:n,currency:c,amount:f,quantity:D,holdingType:T}){return t.jsxs(t.Fragment,{children:[a&&t.jsxs("div",{className:"ml-1 text-right","data-test-id":"info-row-pending-quantity",style:{width:"80px"},children:[t.jsx(g,{text:S("pendingQuantity")}),t.jsx(N,{pendingQuantity:a})]}),n&&t.jsxs("div",{className:"ml-1 text-right","data-test-id":"info-row-limit-price",style:{width:"100px"},children:[t.jsx(g,{text:S("limitPrice")}),t.jsx(b,{limitPrice:n,currency:c})]}),t.jsxs("div",{className:"ml-1 text-right","data-test-id":"info-row-amount",style:{width:D?"200px":"100px"},children:[t.jsx(g,{text:vt(T,f?null:D)}),t.jsx(p,{totalAmount:f,currency:c,quantity:D})]})]})}function j({amount:a,currency:n,pendingQuantity:c,quantity:f}){return t.jsxs("div",{className:"d-flex flex-column","data-test-id":"info-row-order-value",style:{minWidth:"135px"},children:[t.jsx(g,{text:f?S("quantity"):null}),t.jsx(p,{totalAmount:a,currency:n,quantity:f}),c&&t.jsx(N,{pendingQuantity:c})]})}function E({actionType:a,holdingName:n,orderStatus:c,amount:f,currency:D,clickable:T,rightIconId:B,subHeaderAriaLabel:i,pendingQuantity:o,limitPrice:d,size:h,quantity:u,holdingType:w}){return t.jsxs("div",{className:"d-flex align-items-center justify-content-between py-1","data-test-id":"info-row",children:[t.jsx("div",{className:"d-flex align-self-center justify-content-start ml-15",style:{maxWidth:"55%"},children:t.jsxs("div",{className:"text-left","data-test-id":"info-row-status-and-holding",children:[t.jsx(O,{actionType:a,orderStatus:c}),t.jsx(m,{holdingName:n,subHeaderAriaLabel:i})]})}),t.jsxs("div",{className:"d-flex flex-row align-items-center",children:[h==="large"?t.jsx(k,{pendingQuantity:o,limitPrice:d,currency:D,amount:f,quantity:u,holdingType:w}):t.jsx(j,{currency:D,amount:f,pendingQuantity:o,quantity:u}),t.jsx("div",{className:"mx-1",children:T&&t.jsx(ye,{className:"icon text-blue",width:"24",height:"24",icon:B||F.CHEVRON_RIGHT_24})})]})]})}return function(n){const c={small:0,medium:450,large:600};return t.jsx(r,{sizeBreakpoints:c,children:t.jsx(E,{...n})})}}const C={RELOAD_CLICKED:"reloadClicked",OPEN_CONFIRM_DELETE_MODAL:"openConfirmDeleteModal",CONFIRM_DELETE_ORDER_CLICKED:"confirmDeleteOrderClicked",CANCEL_DELETE_ORDER_CLICKED:"cancelDeleteOrderClicked",ACCORDION_CLICKED:"accordionCl
1icked"};function Wt({triggerEvent:e}){return function({headerText:s,alertText:x,dataTestId:O,buttonLabel:g}){return t.jsx(ve,{dataTestId:O,headerText:s,alertText:x,ariaLabel:s+x,dismissible:!1,type:"warning",icon:F.INFO_ENCLOSED_20,button:t.jsx("button",{className:"pl-1 pr-1 btn btn-sm btn-outline-warning text-body",onClick:()=>e({name:C.RELOAD_CLICKED}),children:g})})}}function Jt({assetPath:e}){function r({imgPath:s,alltText:x}){return t.jsx("div",{className:"text-center",children:t.jsx("img",{src:e+s,alt:x,style:{width:"196px",height:"130px"}})})}return function({imgPath:x,alltText:O}){return t.jsx(r,{imgPath:x,alltText:O})}}const Ut=q({decimals:2,roundDown:!1});function l(e){return I(e,de)}function Qt({elq:e,assetPath:r,triggerEvent:s}){const x=Mt(),O=Gt({elq:e}),g=Wt({triggerEvent:s}),N=Jt({assetPath:r});function b({label:i,value:o}){return t.jsxs("div",{className:"d-flex text-left flex-column my-05 mx-15",children:[t.jsx("div",{className:"text-muted",children:i}),t.jsx("div",{className:"font-weight-bold ",children:o})]})}function p({orderStatus:i}){return t.jsx("div",{className:"rounded-pill bg-cloud py-05 px-1",children:Ot(i)})}function m({orderId:i,styling:o,size:d}){return t.jsx(P,{className:o,label:l("remove"),buttonType:"secondary",fullWidth:d==="small",onClick:h=>{h.stopPropagation(),s({name:C.OPEN_CONFIRM_DELETE_MODAL,data:{orderId:i}})}})}function k({orderId:i,expireDate:o,instrumentType:d,orderStatus:h,size:u}){return t.jsxs("div",{className:"d-flex flex-row justify-content-between mb-05",children:[t.jsxs("div",{className:"d-flex flex-row","data-test-id":"shares-instrument-type-date",children:[t.jsx(b,{label:l("instrumentType"),value:d}),t.jsx(b,{label:l("expireDate"),value:o})]}),t.jsxs("div",{className:"d-flex align-items-center","data-test-id":"shares-order-status",children:[t.jsx(p,{orderStatus:h}),t.jsx("div",{className:"mx-15",children:t.jsx(m,{orderId:i,size:u})})]})]})}function j({orderId:i,limitPrice:o,expireDate:d,instrumentType:h,orderStatus:u,size:w}){return t.jsx(t.Fragment,{children:t.jsxs("div",{className:"d-flex flex-column",children:[t.jsx("div",{className:"text-left","data-test-id":"shares-limit-price",children:t.jsx(b,{label:l("limitPrice"),value:Ut(o)+" "+l("swedishCrowns")})}),t.jsx("div",{className:"text-left","data-test-id":"shares-instrument-type",children:t.jsx(b,{label:l("instrumentType"),value:h})}),t.jsx("div",{className:"text-left","data-test-id":"shares-expire-date",children:t.jsx(b,{label:l("expireDate"),value:d})}),t.jsx("div",{className:"d-inline-flex mx-15 my-03","data-test-id":"shares-order-status",children:t.jsx(p,{orderStatus:u})}),t.jsx("div",{className:"mx-15 text-left",children:t.jsx(m,{orderId:i,styling:"mb-2 mt-1",size:w})})]})})}function E({shareOrderExpandId:i,orderId:o,instrumentType:d,size:h,limitPrice:u,expireDate:w,orderStatus:X}){return t.jsx(ke,{expanded:i===o,children:t.jsx("div",{className:"border-bottom-1px-grey",children:h==="large"?t.jsx(k,{orderId:o,instrumentType:d,expireDate:w,orderStatus:X,size:h}):t.jsx(j,{orderId:o,instrumentType:d,limitPrice:u,expireDate:w,orderStatus:X,size:h})})})}function a({state:i,size:o}){return t.jsx("div",{"data-test-id":"funds-list",children:Q(i).map(d=>t.jsx("div",{className:"border-bottom-1px-grey bg-white","data-test-id":"funds-list-item",children:t.jsx(O,{actionType:jt(d),holdingName:tt(d),orderStatus:st(d),amount:Et(d),quantity:yt(d),currency:ct(d),clickable:!1,size:o,holdingType:ce})},d.id))})}function n({state:i,size:o}){const[d,h]=Te.useState("");return t.jsx("div",{"data-test-id":"shares-list",children:Y(i).map(u=>t.jsx("button",{onClick:()=>{h(d!==u.id?u.id:""),s({name:C.ACCORDION_CLICKED,title:"Shares order list expanded",expand:d})},className:"link-complex bg-lf-clickable-row-component-hover w-100 bg-white",children:t.jsxs("section",{className:"border-bottom-1px-grey",children:[t.jsx("span",{className:"reset-button w-100","data-test-id":"shares-list-item","aria-expanded":d===u.id,children:t.jsx(O,{rightIconId:d===u.id?F.CHEVRON_UP_32:F.CHEVRON_DOWN_32,actionType:bt(nt(u)),holdingName:rt(u),orderStatus:Ct(re(u)),amount:ut(u),pendingQuantity:ft(u),limitPrice:ne(u),clickable:!0,size:o,holdingType:ue})}),t.jsx(E,{shareOrderExpandId:d,orderId:u.id,instrumentType:l("orderInstrumentTypes."+
1xt(u)),size:o,limitPrice:ne(u),expireDate:mt(u),orderStatus:re(u)})]})},u.id))})}function c({state:i,size:o}){return ze(i).length>0&&t.jsxs(t.Fragment,{children:[t.jsx(x,{rowHeaderName:l("funds")}),t.jsx(a,{state:i,size:o})]})}function f({state:i,size:o}){return et(i).length>0&&t.jsxs(t.Fragment,{children:[t.jsx(x,{rowHeaderName:l("shares")}),t.jsx(n,{state:i,size:o})]})}function D({state:i}){return t.jsx("div",{className:"pt-2",children:!V(i)&&t.jsx(Ne,{title:l("callout.title"),body:l("callout.body")})})}function T({state:i}){return t.jsxs(t.Fragment,{children:[V(i)&&se(i)&&t.jsx(H,{headerText:l("errors.errorHeaderText"),errorText:l("errors.errorBodyText"),retryButtonText:l("errors.errorButton")}),ge(i)&&t.jsx(g,{"data-test-id":"error-funds-orders-alert-panel",headerText:l("errors.alert.funds.header"),alertText:l("errors.alert.funds.text"),buttonLabel:l("errors.tryAgain")}),pe(i)&&t.jsx(g,{dataTestId:"error-shares-orders-alert-panel",headerText:l("errors.alert.shares.header"),alertText:l("errors.alert.shares.text"),buttonLabel:l("errors.tryAgain")})]})}function B({state:i,size:o}){const d=o==="large"?{maxWidth:"40%",margin:"0 auto"}:{maxWidth:"65%",margin:"0 auto"};return V(i)?se(i)?t.jsx(H,{headerText:l("errors.errorHeaderText"),errorText:l("errors.errorBodyText"),retryButtonText:l("errors.errorButton"),onRetry:()=>s({name:C.RELOAD_CLICKED})}):t.jsxs("div",{className:"text-center mt-2 py-1",children:[t.jsx(N,{imgPath:"/Arbete1.svg",alltText:l("noActiveOrders.imgAltText")}),t.jsx("h2",{className:"mt-1 text-black",children:l("noActiveOrders.header")}),t.jsx("h3",{style:d,className:"h4 font-weight-normal my-1 text-black",children:l("noActiveOrders.subHeader")})]}):t.jsxs("div",{className:"py-1",children:[t.jsx(T,{state:i}),t.jsx(c,{state:i,size:o}),t.jsx(f,{state:i,size:o}),t.jsx(D,{state:i})]})}return function(o){const{size:d,setRef:h}=De({small:0,medium:450,large:600});return o.isCalling?t.jsx("div",{className:"py-3",children:t.jsx(le,{})}):o.hasErrors?t.jsx(H,{headerText:l("errors.errorHeaderText"),errorText:l("errors.errorBodyText"),retryButtonText:l("errors.errorButton"),onRetry:()=>s({name:C.RELOAD_CLICKED})}):t.jsx(t.Fragment,{children:o.shouldShowOrdersList&&t.jsx("div",{ref:h,children:t.jsx(B,{state:o.state,size:d})})})}}function _(e){return I(e,Oe)}function Yt(e){return _(xe(e)?"deleteMessage.error":"deleteMessage.successful")}function Xt({triggerEvent:e}){return t.jsxs("div",{"data-test-id":"modal-body",children:[t.jsx("p",{children:_("infoMessage")}),t.jsx("div",{className:"text-right mt-2",children:t.jsxs(we,{children:[t.jsx(P,{label:_("buttons.confirmCancel"),buttonType:"link",onClick:()=>{e({name:C.CANCEL_DELETE_ORDER_CLICKED})}}),t.jsx(P,{label:_("buttons.confirmDelete"),"data-autofocus":!0,buttonType:"primary",onClick:()=>{e({name:C.CONFIRM_DELETE_ORDER_CLICKED})}})]})})]})}function Zt({state:e,triggerEvent:r}){return t.jsxs("div",{"data-test-id":"modal-body",children:[t.jsx("p",{children:Yt(e)}),t.jsx("div",{className:"text-right",children:t.jsx(P,{label:_("buttons.closeModal"),"data-autofocus":!0,buttonType:"primary",onClick:()=>{r({name:C.CANCEL_DELETE_ORDER_CLICKED})}})})]})}function zt(e){return t.jsxs(t.Fragment,{children:[G(e.state,y.cancelPortfolioOrder)&&t.jsx(le,{className:"mb-3"}),!G(e.state,y.cancelPortfolioOrder)&&!J(e.state)&&t.jsx(Xt,{triggerEvent:e.triggerEvent}),J(e.state)&&t.jsx(Zt,{triggerEvent:e.triggerEvent,state:e.state})]})}function tr({ajax:e,elq:r=Ie(),assetPath:s="asset",profile:x,modalController:O,portfolioType:g,portfolioName:N,portfolioId:b}){const p={...L},m=Se(Qe());return It({ajax:e,controller:p,profile:x,model:m,modalController:O,portfolioId:b,portfolioType:g}).start(),p.headerView=(function(){return{render:function(j){const E=_t(),a=K({target:j,Component:E});a.render();const n={...L};return n.listenTo(m,"change",a.render),n.remove=function(){n.stopListening(),a.unmountComponent()},n},getPromise:function(){return A().resolve()}}})(),p.ordersListView=(function(){return{prepare:function(){m.swap(Xe,y.getPortfolioOrders,!0)},render:function(j){function E(f){f.name===C.RELOAD_CLICKED?m.swap(W,y.getPortfolioOrders):f.name===C.OPEN_CONFIRM_DELETE_MODAL&&f?.data?.orderId?(m.swap(U,f.data.orderId),m.swap(ie,!0)):f.name===C.ACCORDION_CLICKED&&f.expand&&p.trigger(C.ACCORDION_CLICKED,f.title,f.expand)}const a=Qt({triggerEvent:E,elq:r,assetPath:s}),n=K({target:j,Component:a,getProps:function(){return{state:m.deref(),isCalling:G(m.deref(),y.getPortfolioOrders),hasErrors:!!he(m.deref()),shouldShowOrdersList:Dt(m.deref())}}});n.render();const c={...L};return c.listenTo(m,"change",n.render),c.remove=function(){c.stopListening(),n.unmountComponent()},c},getPromise:function(){return A().resolve()}}})(),p.confirmDeleteModal=(function(){return{render:function(j){function E(c){c.name===C.CONFIRM_DELETE_ORDER_CLICKED?m.swap(W,y.cancelPortfolioOrder):c.name===C.CANCEL_DELETE_ORDER_CLICKED&&(m.swap(ie,!1),m.swap(Ce,!0))}const a=K({target:j,Component:zt,getProps:function(){return{state:m.deref(),triggerEvent:E}}});a.render();const n={...L};return n.listenTo(m,"change",a.render),n.remove=function(){n.stopListening(),a.unmountComponent()},n}}})(),p}export{tr 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.