1(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{"+Lsq":function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n("AaRd"),i=n("fXoL"),l=n("qHSR"),a=n("AytR"),c=n("6h7t"),s=n("H8v0"),r=n("6l6k"),d=n("AcyG");let u=(()=>{class e{constructor(e,t){this.accountService=e,this.store=t,this.lsClient=new l.a(a.a.lsUrl,"BOND_EXPRESS"),this.accountService.authenticated?(this.lsClient.connectionDetails.setUser(c.a.LIGHTSTREAMER_LOGIN_APPEND+this.accountService.userId),this.lsClient.connectionDetails.setPassword(this.store.selectSnapshot(s.a).token)):(this.lsClient.connectionDetails.setUser(c.a.LIGHTSTREAMER_LOGIN_APPEND+"pre-login-user"),this.lsClient.connectionDetails.setPassword(""))}getLightstreamer(){return this.lsClient}destroyLightStreamer(){this.lsClient.disconnect(),this.lsClient=null}}return e.\u0275fac=function(t){return new(t||e)(i.vc(r.a),i.vc(d.i))},e.\u0275prov=i.hc({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),p=(()=>{class e{constructor(e){this.bondRmoLightstreamerService=e,this.CONNECTION_TIMEOUT=3e3,this.lsServerErrorCode=-1,this.onStatusChangeCallback=null,this.onServerErrorCallback=null}initLightstreamer(){return this.lsClient=this.bondRmoLightstreamerService.getLightstreamer(),this.lsClient.addListener({onStatusChange:this.handleStatusChange.bind(this),onServerError:this.handleServerError.bind(this)}),this.lsClient.connect(),setInterval(()=>{null==this.isBondLsAlive&&(this.isBondLsAlive=!1)},this.CONNECTION_TIMEOUT),this.lsClient}handleStatusChange(e){this.isBondLsAlive=e!==o.a.CONNECTING&&e!==o.a.DISCONNECTED_TRYING_RECOVERY&&e!==o.a.DISCONNECTED_WILL_RETRY&&e!==o.a.DISCONNECTED&&e!==o.a.DISCONNECTED_WILL_RETRY,this.onStatusChangeCallback&&this.onStatusChangeCallback(this.isBondLsAlive)}handleServerError(e,t){this.isDuplicateLogin=e===this.lsServerErrorCode,this.onServerErrorCallback&&this.onServerErrorCallback(this.isDuplicateLogin),console.log(t)}setOnStatusChangeCallback(e){this.onStatusChangeCallback=e}setOnServerErrorCallback(e){this.onServerErrorCallback=e}getLsClient(){return this.lsClient}destroyLightStreamer(){this.lsClient.disconnect(),this.lsClient=null}}return e.\u0275fac=function(t){return new(t||e)(i.vc(u))},e.\u0275prov=i.hc({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"4we5":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n("6h7t"),i=n("fXoL"),l=n("ofXK");function a(e,t){1&e&&(i.pc(0),i.rc(1,"h5",0),i.qd(2,"For the opt-out / unticked account(s)"),i.qc(),i.rc(3,"p",7),i.qd(4,"8. I acknowledge and understand that should I opt out from the FSMOne Auto-Sweep Account, all my surplus funds including but not limited to dividends, bond coupons and bond maturities will no longer be automatically swept into the FSMOne Auto-Sweep Account."),i.qc(),i.oc())}let c=(()=>{class e{constructor(){this.liveUrl=o.a.LIVE_URL,this.displayOptOutContent=!0}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.fc({type:e,selectors:[["auto-sweep-disclaimer-content"]],inputs:{displayOptOutContent:"displayOptOutContent"},decls:49,vars:5,consts:[[1,"text-14px","font-weight-bold","mb-2"],[1,"pl-3","mb-0","text-12px"],[1,"mb-3"],["target","_blank",1,"link-underline",3,"href"],[1,"pl-3","text-12px","mt-2","mb-0","custom-list-alpha"],[1,"mb-2"],[4,"ngIf"],[1,"text-12px","mb-3"]],template:function(e,t){1&e&&(i.rc(0,"h5",0),i.qd(1,"For the opt-in / ticked account(s)"),i.qc(),i.rc(2,"ol",1),i.rc(3,"li",2),i.qd(4," I confirm that I have received, read, understood and agree to be bounded by the "),i.rc(5,"a",3),i.qd(6,"Managed Portfolio Terms and Conditions"),i.qc(),i.qd(7," under which the FSMOne Auto-Sweep Account is being offered, and which includes but is not limited to the relevant "),i.rc(8,"a",3),i.qd(9,"Investment Account Terms and Conditions"),i.qc(),i.qd(10,", the iFAST Platform Terms and Conditions, and all other applicable terms and conditions, "),i.rc(11,"a",3),i.qd(12,"Disclaimers"),i.qc(),i.qd(13,", "),i.rc(14,"a",3),i.qd(15,"Risk Disclosures"),i.qc(),i.qd(16," and warnings. "),i.qc(),i.rc(17,"li",2),i.qd(18," I hereby agree to enroll and opt in for the FSMOne Auto-Sweep Account and formally request iFAST Capital Sdn Bhd (\u201ciFAST\u201d) to provide me the fund management services under which iFAST shall have the discretion to invest all, or a portion of, my newly deposited monies and surplus funds including but not limited to dividends, bond coupons, bond maturities and sales proceeds (the \u201cRelevant Funds\u201d) from time to time. "),i.qc(),i.rc(19,"li",2),i.qd(20," I accept that such Relevant Funds (which is subject to a minimum amount stipulated by iFAST, at its sole and absolute discretion from time to time) will be invested in cash, money market funds, liquidity funds and any other investment products (\u201cInvestment\u201d) which iFAST may deem appropriate. "),i.qc(),i.rc(21,"li",2),i.qd(22," I hereby grant iFAST with the discretionary authority (including but not limited to the frequency, scope and methodology of rebalancing) to execute transactions on my behalf for the purpose of managing my Relevant Funds. "),i.qc(),i.rc(23,"li",2),i.qd(24," I/we declare that I/we am/are the ultimate Beneficial Owner of the FSMOne Auto-Sweep Account and that no person other than myself/ourselves have or will have any interest in, influence or control over the FSMOne Auto-Sweep Account whatsoever. "),i.qc(),i.rc(25,"li",2),i.qd(26," I/we declare that I/we am/are not a U.S person and in the event of a change in my/our status that I/we become a U.S person, I shall notify iFAST of the change. "),i.qc(),i.rc(27,"li",2),i.qd(28," I acknowledge, understand and agree that: "),i.rc(29,"ol",4),i.rc(30,"li",5),i.qd(31,"For the Investment, there is no guarantee as to the amount of capital invested and/
1or return received, and that the investment objectives will be achieved. Past performance figures as well as any projection or forecast regarding the Investment are not necessarily indicative of the future or likely performance of such Investment;"),i.qc(),i.rc(32,"li",5),i.qd(33,"All investments involve some degree of risk and I am prepared to accept the risk of the Investment and the resulting returns may be gains or losses;"),i.qc(),i.rc(34,"li",5),i.qd(35,"An order placement of the Investment is not the same as placing funds on deposit with a bank or deposit-taking company;"),i.qc(),i.rc(36,"li",5),i.qd(37,"Unlike bank deposits, FSMOne Auto-Sweep Account do not generate interest, and I enjoy returns in the form of capital gains; "),i.qc(),i.rc(38,"li",5),i.qd(39,"iFAST earns a trailer fee from fund managers;"),i.qc(),i.rc(40,"li",5),i.qd(41,"iFAST may transfer and disclose any information relating to me and my/our FSMOne Auto-Sweep Account, which is necessary for carrying out these services and/or for compliance, to relevant entities and regulators."),i.qc(),i.rc(42,"li",5),i.qd(43,"FAST has appointed Malayan Banking Berhad (Reg No 787435-M), 14th Floor, Menara Maybank, Jalan Tun Perak, 50050 Kuala Lumpur as the custodian for the Investment."),i.qc(),i.rc(44,"li",5),i.qd(45,"I/we am/are aware that I/we may receive reports, statements or any other documents in relation to the Investment from custodian by mail, courier, fax transmission or by such other means as the Custodian may designate from time to time."),i.qc(),i.rc(46,"li",5),i.qd(47,"Corporate account transactions (if applicable): By submitting the transactions, the above declarations would have deemed to be made by the authorized signatories on behalf of the entity/body/business."),i.qc(),i.qc(),i.qc(),i.qc(),i.od(48,a,5,0,"ng-container",6)),2&e&&(i.Ub(5),i.Mc("href",t.liveUrl+"/download/B2C_Managed_Portfolios_Terms_And_Conditions.pdf",i.gd),i.Ub(3),i.Mc("href",t.liveUrl+"/download/B2C_Investment_Terms_And_Conditions.pdf",i.gd),i.Ub(3),i.Mc("href",t.liveUrl+"/disclaimer",i.gd),i.Ub(3),i.Mc("href",t.liveUrl+"/download/B2C_DPMS_Risk_Disclosure_Statement.pdf",i.gd),i.Ub(34),i.Mc("ngIf",t.displayOptOutContent))},directives:[l.t],styles:[".custom-list-alpha[_ngcontent-%COMP%]{list-style-type:lower-alpha}.link-underline[_ngcontent-%COMP%]{color:#0073cf!important;text-decoration:underline!important}"]}),e})()},"5vfD":function(e,t,n){"use strict";n.d(t,"a",(function(){return N}));var o=n("mrSG"),i=n("fXoL"),l=n("2VHv"),a=n("JIr8"),c=n("vkgz"),s=n("nYR2"),r=n("AcyG"),d=n("cp0P"),u=n("LRne"),p=n("ZeV2"),h=n("gFZo"),b=n("MwlG"),m=n("6h7t"),g=n("8rM3"),f=n("H8v0"),v=n("qf4f"),y=n("ORRK"),C=n("W7Oe"),M=n("H2Td"),T=n("6l6k"),O=n("tyNb"),B=n("1W/n"),S=n("+U6L"),x=n("bNXi"),P=n("ofXK"),E=n("5zlO"),w=n("Qdzq"),D=n("TUIa"),z=n("dGhv"),A=n("dEAy"),F=n("B+r4"),q=n("FwiY"),I=n("OzZK"),_=n("VvtP");function R(e,t){if(1&e){const e=i.sc();i.rc(0,"div"),i.rc(1,"rmo-bond-buy-details",7),i.zc("visibleChange",(function(t){return i.dd(e),i.Dc().showBondDetails=t}))("visibleChange",(function(t){return i.dd(e),i.Dc().onBondBuyDetailVisibleChange(t)}))("successUpdate",(function(){return i.dd(e),i.Dc().onSuccessUpdate()}))("successTransact",(function(){return i.dd(e),i.Dc().onSuccessTransact()})),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("bondTransactionModel",e.bondTransactionModel)("defaultRefno",e.routeRefno)("selectedBond",e.selectedBond)("bondExpressAvailable",e.bondExpressAvailable)("visible",e.showBondDetails)("isUpdate",e.isUpdate)("lotType",e.lotType)("transType",e.transType)("lsClient",e.lsClient)("nzStyle",e.nzStyle)}}function k(e,t){1&e&&(i.rc(0,"div"),i.rc(1,"div",16),i.rc(2,"span",17),i.qd(3,"This bond is now classified as "),i.rc(4,"span",18),i.qd(5,"Speculative / Distressed"),i.qc(),i.qd(6," profile."),i.qc(),i.qc(),i.rc(7,"div",12),i.qd(8," The risk of loss in purchasing this bond can be substantial. You should therefore assess if the purchase of this bond is suitable for you in light of your objective, financial resources and other relevant circumstances. In deciding whether to purchase this bond you should be aware of the following: "),i.mc(9,"br"),i.rc(10,"div",19),i.qd(11," 1. The purchase of this bond is subject to higher risk of default. In the event of default, you may
1not able to receive back both interest and principal. "),i.mc(12,"br"),i.qd(13," 2. The higher degree of fluctuation and volatility of bond\u2019s price. "),i.mc(14,"br"),i.qd(15," 3. The higher level of liquidity risk. Under certain conditions, it may become difficult to sell this bond. "),i.mc(16,"br"),i.qc(),i.qd(17," This brief warning cannot disclose all the risks associated with the purchase of this bond. You should conduct your own risk assessment and seek professional advice, where necessary. "),i.qc(),i.qc())}function U(e,t){if(1&e){const e=i.sc();i.rc(0,"nz-modal",8),i.zc("nzOnCancel",(function(){return i.dd(e),i.Dc().onCloseRiskNote()})),i.rc(1,"div",9),i.mc(2,"i",10),i.rc(3,"span",11),i.qd(4,"You are taking too much risk."),i.qc(),i.qc(),i.rc(5,"div",12),i.qd(6," I/We notice that my/our selected investments belong to a risk class higher than my/our tolerance. FSMOne has already provided the appropriate and necessary warning on the risks associated with the investments to ensure my/our awareness on the risk mismatch and potential losses. Despite this, I/we consider my/our selected investments are suitable for my/our personal circumstances and decide to proceed with my/our transaction request(s). "),i.qc(),i.od(7,k,18,0,"div",0),i.rc(8,"div",13),i.rc(9,"button",14),i.zc("click",(function(){return i.dd(e),i.Dc().onCloseRiskNote()})),i.qd(10,"Cancel"),i.qc(),i.rc(11,"button",15),i.zc("click",(function(){return i.dd(e),i.Dc().onRiskApprove()})),i.qd(12,"I ACKNOWLEDGE AND AGREE"),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Mc("nzVisible",e.isRiskExcessive)("nzFooter",null)("nzWidth",600),i.Ub(7),i.Mc("ngIf","DISTRESS"===(null==e.selectedBond?null:e.selectedBond.bondSuitabilityCode))}}function L(e,t){if(1&e){const e=i.sc();i.rc(0,"nz-modal",20),i.zc("nzVisibleChange",(function(t){return i.dd(e),i.Dc().isExchangeHolidayModalVisible=t}))("nzOnCancel",(function(){return i.dd(e),i.Dc().onCloseModal(!0)})),i.rc(1,"div",9),i.mc(2,"i",10),i.rc(3,"span",11),i.qd(4,"Market Holiday"),i.qc(),i.qc(),i.rc(5,"div",12),i.qd(6," Today is a market holiday. If you continue, your orders will be placed into the marketplace when it resumes on the next trading day. Alternatively, you may proceed to place orders through the OTC market. "),i.qc(),i.rc(7,"div",21),i.rc(8,"button",22),i.zc("click",(function(){return i.dd(e),i.Dc().onContinue()})),i.qd(9,"Continue"),i.qc(),i.rc(10,"button",23),i.zc("click",(function(){return i.dd(e),i.Dc().onProceedToOtc()})),i.qd(11," Proceed to OTC "),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Mc("nzVisible",e.isExchangeHolidayModalVisible)("nzClosable",!0)("nzFooter",null)("nzTitle",null)("nzMaskClosable",!1)}}function V(e,t){if(1&e){const e=i.sc();i.rc(0,"ui-pop-up-modal",24),i.zc("isVisibleChange",(function(t){return i.dd(e),i.Dc().recommendBsmModalVisible=t}))("submit$",(function(){return i.dd(e),i.Dc().onNoteSubmit()})),i.qc()}if(2&e){const e=i.Dc();i.Mc("title",e.recommendBsmNoteTitle)("caption",e.recommendBsmNoteCap)("confirmBtn","Trade Now")("isVisible",e.recommendBsmModalVisible)("isCancelBtnVisible",!1)("captionCustomClass","preline")}}let N=(()=>{class e{constructor(e,t,n,o,l,a,c,s,r,d,u,p,h){this.iBondFilter=e,this.bondSelectorService=t,this.bondRestService=n,this.subHandlingService=o,this.holdingRestService=l,this.acctService=a,this.route=c,this.cdRef=s,this.siDeclarationService=r,this.store=d,this.watchlistRestService=u,this.nzNotificationService=p,this.router=h,this.show=!1,this.lotType=null,this.isUpdate=!1,this.onChangeShowBondDetails=new i.s,this.onLoading=new i.s,this.successUpdate=new i.s,this.successTransact=new i.s,this.showBondDetails=!1,this.showBEOrderpad=!1,this.showSiDeclarationModel=!1,this.isLoadingBondInfo=!1,this.isRiskExcessive=!1,this.showForceUpdateModal=!1,this.isMobile=!1,this.isSuspendedBondModalVisible=!1,this.bondConstant=b.a,this.isExchangeHolidayModalVisible=!1,this.rmoEnabled=!1,this.recommendBsmModalVisible=!1,this.recommendBsmNoteTitle="Trade Smarter with Bondsupermart Live (BSM)!",this.recommendBsmNoteCap="This bond is available to trade on the Bondsupermart Live, a bond trading marketplace where you can benefit from real-time pricing, better efficiency, and improved liquidity.\n\nWhy Bondsupermart Live over OTC?\n\u2714 Set your own price\n\u2714 See live steaming market data & depth\n\u2714 Trade directly with other investors"}ngOnChanges(e){this.show&&this.onShowRMOOrderpadAction(this.issueCode,this.transType,this.lotType)}ngOnInit(){this.isMobile$.subscribe(e=>{this.isMobile=e})}onShowRMOOrderpadAction(e,t,n,o){if(this.showSiDeclarationModel=!1,!this.checkBeforeProceedTransaction())return;this.selectedBond=null,this.isSuspendedBondModalVisible=!1;let i=this.iBondFilter.initDefaultBondSelectorFilterModel();i.buyenabled=m.a.YES_FLAG,i.onlineDistributeFlag=m.a.YES_FLAG,i.issueC
1ode=this.issueCode,this.isLoadingBondInfo=!0,this.onLoading.emit(!0),Object(d.a)({bondData:this.bondRestService.findBondSelector(i).pipe(Object(a.a)(e=>(console.log("error "+e),Object(u.a)(!1)))),bondExpressList:this.bondRestService.findBondExpressList("FMY").pipe(Object(a.a)(e=>(console.log("error "+e),Object(u.a)(!1))))}).subscribe({next:o=>{var i,l,a,c,s,r,d,u,p,h,f,v,y,C,M,T,O,B;if(this.onLoading.emit(!1),this.isLoadingBondInfo=!1,o.bondData.status!==m.a.RESPONSE_SUCCESS)return void this.nzNotificationService.error("Error","Selected Bond not Found.");const S=null===(l=null===(i=null==o?void 0:o.bondData)||void 0===i?void 0:i.data)||void 0===l?void 0:l.bondInfoAndPerformanceModel;if(S.length>0){this.selectedBond=S[0],this.lotType=n,this.transType=t;let i=!1;if((null==o?void 0:o.bondExpressList)&&(null===(a=null==o?void 0:o.bondExpressList)||void 0===a?void 0:a.status)===m.a.RESPONSE_SUCCESS&&(null===(c=null==o?void 0:o.bondExpressList)||void 0===c?void 0:c.data)){let t=o.bondExpressList.data.bondWholesaleList.find(t=>t.issueCode===e);if(t)this.bondExpressAvailable=!0,i="Buy"===this.transType?t.offerVolume>0:t.bidVolume>0;else{let t=o.bondExpressList.data.bondRetailList.find(t=>t.issueCode===e);t&&(this.bondExpressAvailable=!0,i="Buy"===this.transType?t.offerVolume>0:t.bidVolume>0)}}if(n||(this.lotType=b.a.OTC,"N"===(null===(s=this.selectedBond)||void 0===s?void 0:s.bexOddLotSuspension)&&"Y"===(null===(r=this.selectedBond)||void 0===r?void 0:r.bexOddLotEnabled)&&this.rmoEnabled?this.lotType=b.a.ODD_LOT:"N"===(null===(d=this.selectedBond)||void 0===d?void 0:d.bexFullLotSuspension)&&"Y"===(null===(u=this.selectedBond)||void 0===u?void 0:u.bexFullLotEnabled)&&this.rmoEnabled?this.lotType=b.a.FULL_LOT:i&&(this.lotType=b.a.BOND_EXPRESS)),this.lotType!==b.a.BOND_EXPRESS||i||(this.lotType=b.a.OTC),this.lotType===b.a.BOND_EXPRESS&&"N"===(null===(p=this.selectedBond)||void 0===p?void 0:p.bexOddLotSuspension)&&"Y"===(null===(h=this.selectedBond)||void 0===h?void 0:h.bexOddLotEnabled)&&this.rmoEnabled?this.lotType=b.a.ODD_LOT:this.lotType===b.a.BOND_EXPRESS&&"N"===(null===(f=this.selectedBond)||void 0===f?void 0:f.bexFullLotSuspension)&&"Y"===(null===(v=this.selectedBond)||void 0===v?void 0:v.bexFullLotEnabled)&&this.rmoEnabled&&(this.lotType=b.a.FULL_LOT),this.lotType!==b.a.OTC&&this.lotType!==b.a.BOND_EXPRESS&&("N"!==(null===(y=this.selectedBond)||void 0===y?void 0:y.bexFullLotSuspension)||"N"!==(null===(C=this.selectedBond)||void 0===C?void 0:C.bexOddLotSuspension)))return void(this.isSuspendedBondModalVisible=!0);if(!this.isSuspendedBondModalVisible){if("Buy"===t&&!this.isUpdate){if("Y"!==this.selectedBond.retailDistribution&&!this.siDeclarationService.hasDeclared())return void(this.showSiDeclarationModel=!0);this.riskAppetite&&("HYSEEKER"===this.selectedBond.bondSuitabilityCode?this.riskAppetite.riskAppetite!==g.a.RISK_APPETITE_AGGRESSIVE_BOND&&(this.isRiskExcessive=!0):"SISEEKER"===this.selectedBond.bondSuitabilityCode?this.riskAppetite.riskAppetite!==g.a.RISK_APPETITE_CONSERVATIVE&&this.riskAppetite.riskAppetite!==g.a.RISK_APPETITE_MODERATELY_CONSERVATIVE||(this.isRiskExcessive=!0):"DISTRESS"===this.selectedBond.bondSuitabilityCode&&(this.isRiskExcessive=!0))}this.isRiskExcessive||this.onRiskApprove()}this.lotType===b.a.OTC&&("N"===(null===(M=this.selectedBond)||void 0===M?void 0:M.bexOddLotSuspension)&&"Y"===(null===(T=this.selectedBond)||void 0===T?void 0:T.bexOddLotEnabled)&&this.rmoEnabled?(this.lotType=b.a.ODD_LOT,this.recommendBsmModalVisible=!0):"N"===(null===(O=this.selectedBond)||void 0===O?void 0:O.bexFullLotSuspension)&&"Y"===(null===(B=this.selectedBond)||void 0===B?void 0:B.bexFullLotEnabled)&&this.rmoEnabled&&(this.lotType=b.a.FULL_LOT,this.recommendBsmModalVisible=!0))}else this.nzNotificationService.error("Error","Selected Bond not Found.")},error:e=>{this.isLoadingBondInfo=!1}})}onRiskApprove(){this.isRiskExcessive=!1,this.showBondDetails=!0,this.onChangeShowBondDetails.emit(this.showBondDetails)}onCloseRiskNote(){this.isRiskExcessive=!1,this.onBondBuyDetailVisibleChange(!1)}onBondBuyDetailVisibleChange(e){this.showSiDeclarationModel=!1,this.showBondDetails=e,this.onChangeShowBondDetails.emit(e)}onCloseSuspendedBondModal(){this.isSuspendedBondModalVisible=!1,this.onBondBuyDetailVisibleChange(!1)}onContinue(){this.onCloseModal(),this.onShowRMOOrderpadAction(this.issueCode,this.transType,this.lotType,!0)}onProceedToOtc(){this.onCloseModal(),this.onShowRMOOrderpadAction(this.issueCode,this.transType,this.bondConstant.OTC,!0)}onCloseModal(e){this.isExchangeHolidayModalVisible=!1,e&&this.onBondBuyDetailVisibleChange(!1)}ngOnDestroy(){}checkBeforeProceedTransaction(){var e;if(this.store.selectSnapshot(f.a.isTempAccount)||this.store.selectSnapshot(f.a.isPendingAccount)||this.store.selectSnapshot(f.a.isProcessingAccount))return this.router.navigate([m.o.APP,m.o.TRADE]);let t=this.store.selectSnapshot(f.a.getAccounts);if(1==t.length){if(this.store.selectSnapshot(f.a.isEmisProcessingAccount)&&this.store.selectSnapshot(f.a.isEmisU
1pdate))return this.router.navigate([m.o.APP,m.o.TRADE]);if(t[0].buyDisabled==m.a.YES_FLAG||t[0].sellDisabled==m.a.YES_FLAG)return this.router.navigate([m.o.APP,m.o.TRADE])}const n=this.store.selectSnapshot(f.a.getAuthData);this.store.selectSnapshot(f.a.isAuthenticated)?this.rmoEnabled=null===(e=this.store.selectSnapshot(f.a.getAuthData))||void 0===e?void 0:e.rmoEnabled:this.bondRestService.checkBondRmoEnable().pipe(Object(c.a)(e=>{e&&(this.rmoEnabled=null==e?void 0:e.data)}),Object(s.a)(()=>{})).subscribe();const{forceEmailUpdate:o,emailUpdate:i,passwordUpdate:l,otpInOtp:a,bursaAnywhereAccountUpdate:r}=n,d=this.store.selectSnapshot(f.a.getPendingAccountActions),{newTncAgreement:u,fhTncAgreement:p,validatedPrivacyNotice:h}=d;if(this.store.selectSnapshot(f.a.isTempAccount))return this.router.navigate([m.o.PUBLIC,m.o.ACCOUNT_OPENING,m.o.ACCOUNT_OPENING_PERSONAL,m.o.TAX_INFO]);if(!1===u||!1===p)return this.router.navigate([m.o.PUBLIC,m.o.NOTICE,m.o.TERMS_AND_CONDITIONS]);if(o)return this.router.navigate([m.o.FORCE_EMAIL_UPDATE]);if(i)return this.router.navigate([m.o.EMAIL_UNVERIFIED]);if(r)return this.router.navigate([m.o.BURSA_IPO_ACC_UPDATE]);if(l)return this.router.navigate([m.o.RESET_PASSWORD]);if(a)return this.router.navigate([m.o.OPT_IN_OTP]);if(!1===h)return this.router.navigate([m.o.PUBLIC,m.o.NOTICE,m.o.PRIVACY_POLICY]);if(this.forceUpdateRiskProfile=this.store.selectSnapshot(f.a.isForceRiskProfileUpdate),this.forceUpdateRiskProfile)return this.showForceUpdateModal=!0,!1;const{accountDetailsUpdate:b}=n;return!b||this.router.navigate([m.o.APP+"/"+m.o.ACCOUNT_UPDATE+"/"+m.o.PERSONAL_INFO])}onNoteSubmit(){this.recommendBsmModalVisible=!1}onSuccessUpdate(){this.successUpdate.emit()}onSuccessTransact(){this.successTransact.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.lc(v.a),i.lc(y.a),i.lc(C.a),i.lc(l.a),i.lc(M.a),i.lc(T.a),i.lc(O.a),i.lc(i.j),i.lc(B.a),i.lc(r.i),i.lc(S.a),i.lc(x.b),i.lc(O.e))},e.\u0275cmp=i.fc({type:e,selectors:[["app-rmo-transaction-details"]],inputs:{show:"show",issueCode:"issueCode",lotType:"lotType",transType:"transType",routeRefno:"routeRefno",lsClient:"lsClient",isUpdate:"isUpdate",bondTransactionModel:"bondTransactionModel",nzStyle:"nzStyle"},outputs:{onChangeShowBondDetails:"onChangeShowBondDetails",onLoading:"onLoading",successUpdate:"successUpdate",successTransact:"successTransact"},features:[i.Tb([l.a,p.e]),i.Sb],decls:8,vars:11,consts:[[4,"ngIf"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzFooter","nzWidth","nzOnCancel",4,"ngIf"],[3,"check","show","stayOnCurrentPage","onAccepted","onDecline"],[3,"showForceUpdateModal"],[3,"selectedBond","isSuspendedBondModalVisible","closeButtonClicked","proceedButtonClicked"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzClosable","nzFooter","nzTitle","nzMaskClosable","nzVisibleChange","nzOnCancel",4,"ngIf"],["class","custom-modal-overlay-pane",3,"title","caption","confirmBtn","isVisible","isCancelBtnVisible","captionCustomClass","isVisibleChange","submit$",4,"ngIf"],[3,"bondTransactionModel","defaultRefno","selectedBond","bondExpressAvailable","visible","isUpdate","lotType","transType","lsClient","nzStyle","visibleChange","successUpdate","successTransact"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzFooter","nzWidth","nzOnCancel"],["nz-row","","nzJustify","left","nzAlign","middle",1,"pt-3"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-xl","text-warning","px-2"],[1,"text-lg","font-weight-bold"],["nz-row","","nzJustify","middle","nzAlign","middle",1,"pt-2","px-5"],[1,"text-right","mt-4","py-3"],["nz-button","","nzType","outline",1,"mr-3",3,"click"],["nz-button","","nzType","primary",3,"click"],["nz-row","","nzJustify","middle","nzAlign","middle",1,"pt-4","px-5"],[1,"text-md","font-weight-bold"],[1,"text-theme"],[1,"pt-2","pb-2"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzClosable","nzFooter","nzTitle","nzMaskClosable","nzVisibleChange","nzOnCancel"],[1,"text-right","mt-4"],["nz-button","","nzType","outline",3,"click"],["nz-button","","nzType","primary",1,"ml-3",3,"click"],[1,"custom-modal-overlay-pane",3,"title","caption","confirmBtn","isVisible","isCancelBtnVisible","captionCustomClass","isVisibleChange","submit$"]],template:function(e,t){1&e&&(i.od(0,R,2,10,"div",0),i.od(1,U,13,4,"nz-modal",1),i.rc(2,"shared-si-declaration-revamp-modal",2),i.zc("onAccepted",(function(){return t.onShowRMOOrderpadAction(t.selectedBond.issueC
1ode,t.transType,t.lotType,!1)}))("onDecline",(function(){return t.onBondBuyDetailVisibleChange(!1)})),i.qc(),i.mc(3,"app-risk-profile-required-modal",3),i.rc(4,"app-bond-rmo-suspension-modal",4),i.zc("closeButtonClicked",(function(){return t.onCloseSuspendedBondModal()}))("proceedButtonClicked",(function(){return t.onShowRMOOrderpadAction(t.selectedBond.issueCode,t.transType,t.bondConstant.OTC,!0)})),i.qc(),i.od(5,L,12,5,"nz-modal",5),i.mc(6,"app-risk-profile-required-modal",3),i.od(7,V,1,6,"ui-pop-up-modal",6)),2&e&&(i.Mc("ngIf",t.selectedBond&&t.showBondDetails),i.Ub(1),i.Mc("ngIf",t.selectedBond),i.Ub(1),i.Mc("check",!0)("show",t.showSiDeclarationModel)("stayOnCurrentPage",!0),i.Ub(1),i.Mc("showForceUpdateModal",t.showForceUpdateModal),i.Ub(1),i.Mc("selectedBond",t.selectedBond)("isSuspendedBondModalVisible",t.isSuspendedBondModalVisible),i.Ub(1),i.Mc("ngIf",t.isExchangeHolidayModalVisible),i.Ub(1),i.Mc("showForceUpdateModal",t.showForceUpdateModal),i.Ub(1),i.Mc("ngIf",t.recommendBsmModalVisible))},directives:[P.t,E.a,w.a,D.a,z.a,A.a,F.c,q.b,I.a,_.a],styles:[".infinite-container[_ngcontent-%COMP%]{max-height:600px;overflow-y:auto;overflow-x:hidden}.chart-tab[_ngcontent-%COMP%] .ant-radio-button-wrapper[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;color:var(--black)}.chart-tab.ant-radio-group-small[_ngcontent-%COMP%] .ant-radio-button-wrapper[_ngcontent-%COMP%]{padding:0 8px;margin:0 2px}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%]{border-radius:4px}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]{box-shadow:none}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled){background:#004bad}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled):hover{box-shadow:0 3px 8px 0 rgba(0,0,0,.5)}.live-feed-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{font-size:12px}.live-feed-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px!important}.live-feed-table[_ngcontent-%COMP%] .ant-table-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], .live-feed-table[_ngcontent-%COMP%] .ant-table-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{padding:4px}.live-feed-table[_ngcontent-%COMP%] .ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner-full{margin-top:-7px}.bid-price[_ngcontent-%COMP%]{display:inline-block;padding:2px 5px;color:#000;border:1px solid #ff333a;border-top-left-radius:8px;border-bottom-left-radius:8px}.bid-price.bg-loss[_ngcontent-%COMP%]{border:1px solid #ff333a}.bid-price.bg-profit[_ngcontent-%COMP%]{border:1px solid #093}.bid-price-mobile-web[_ngcontent-%COMP%]{padding:4px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important}.profit-blink[_ngcontent-%COMP%]{width:100%;padding:5px;color:#fff;background-color:#093}.ask-price[_ngcontent-%COMP%], .profit-blink[_ngcontent-%COMP%]{border:1px solid #093;border-top-right-radius:8px;border-bottom-right-radius:8px}.ask-price[_ngcontent-%COMP%]{padding:2px 5px;display:inline-block;color:#000}.ask-price.bg-profit[_ngcontent-%COMP%]{border:1px solid #093}.ask-price.bg-loss[_ngcontent-%COMP%]{border:1px solid #ff333a}.ask-price-mobile-web[_ngcontent-%COMP%]{padding:4px!important;border-top-right-radius:4px!important;border-bottom-right-radius:4px!important}.loss-blink[_ngcontent-%COMP%]{width:100%;padding:5px;border:1px solid #ff333a;border-top-right-radius:8px;border-bottom-right-radius:8px}.loss-blink[_ngcontent-%COMP%], .red-blink[_ngcontent-%COMP%]{color:#fff;background-color:#ff333a}.red-blink[_ngcontent-%COMP%]{border-color:#ff333a}.green-blink[_ngcontent-%COMP%]{color:#fff;border-color:#093;background-color:#093}.buy-sell-container[_ngcontent-%COMP%]{white-space:nowrap;width:100%}.buy-button[_ngcontent-%COMP%]{padding:2px 5px;display:inline-block;background-color:#093;color:#fff;border:1px solid #093;border-top-left-radius:8px;border-bottom-left-radius:8px}.buy-button-mobile-web[_ngcontent-%COMP%]{padding:4px!important;border-top-left-radius:4px!important;border-bottom-left-radius:4px!important}.sell-button[_ngcontent-%COMP%]{padding:2px 5px;display:inline-block;border:1px solid #ff333a;background-color:#ff333a;color:#fff;border-top-right-radius:8px;border-bottom-right-radius:8px}.sell-button-mobile-web[_ngcontent-%COMP%]{padding:4px!important;border-top-right-radius:4px!important;border-bottom-right-radius:4px!important}.add-label[_ngcontent-%COMP%]{font-weight:600;background:#cba119 0 0 no-repeat padding-box;display:inline-block;transform:skewX(-15deg);padding:2px 6px;font-size:13px}.disabled-buy-sell[_ngcontent-%COMP%]{pointer-events:none}.disabled-buy-sell[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{display:inline-block;border:1px solid #d3d3d3;background-color:#d3d3d3;color:#7a7a7a;border-top-left-radius:8px;border-bottom-left-radius:8px}.disabled-buy-sell[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-child{display:inline-block;color:#000;border:1px solid #d3d3d3;border-top-right-radius:8px;border-bottom-right-radius:8px}.custom-loading-icon[_ngcontent-%COMP%]{color:red}.custom-nz-switch[_ngcontent-%COMP%]{display:inline-block;position:relative;cursor:pointer}.custom-nz-switch-toggle[_ngcontent-%COMP%]{display:none}.custom-nz-switch-label[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;width:52px;height:16px;background-color:rgba(45,68,198,.3);border-radius:20px;transition:background-color .3s ease}.custom-nz-switch-inner[_ngcontent-%COMP%]{position:relative;flex:1;width:100%}.custom-nz-switch-check[_ngcontent-%COMP%], .custom-nz-switch-uncheck[_ngcontent-%COMP%]{display:inline-block;height:100%;width:50%;text-align:center;line-height:40px;color:#fff}.custom-nz-switch-handle[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);width:24px;height:24px;background-color:#2d44c6;opacity:1;border-radius:20px;transition:left .3s ease;left:calc(100% - 24px)}.custom-nz-switch-label.checked[_ngcontent-%COMP%]{background-color:rgba(221,174,23,.3)}.custom-nz-switch-handle.checked[_ngcontent-%COMP%]{left:0;background-color:#ddae17}.parent-container[_ngcontent-%COMP%]{display:flex}.flex-container[_ngcontent-%COMP%]{flex:1}@media only screen and (max-width:767px){.chart-tab[_ngcontent-%COMP%] .ant-radio-button-wrapper[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;color:var(--black)}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%]{border-radius:4px}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]{box-shadow:none}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled){background:#004bad;max-width:50%}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled):hover{box-shadow:0 3px 8px 0 rgba(0,0,0,.5)}}.end-align[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.start-align[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}
1.text-grey[_ngcontent-%COMP%]{color:#adadad}.bg-cert[_ngcontent-%COMP%]{background-repeat:no-repeat;height:56px;width:56px}.tag-css[_ngcontent-%COMP%]{padding:2px 7px;border-radius:10px;color:#fff;text-transform:capitalize;font-weight:600;background-color:#f48b85} .custom-modal-overlay-pane .modal-overlay{z-index:2000!important}"]}),Object(o.c)([Object(r.e)(h.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},"66kx":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n("xeZY"),i=n("fXoL"),l=n("tk/3"),a=n("31Y2");let c=(()=>{class e{constructor(e,t){this.http=e,this.paramService=t,this.BASE_URL=o.a.TRANSACTION+o.a.BOND+o.a.PROTECTED}createBondBuy(e,t){const n=this.paramService.buildHttpParams({refno:e});return this.http.post(this.BASE_URL+o.a.BUY+o.a.ORDER+o.a.CREATE,t,{params:n})}findBondContractDetails(e,t){const n=this.paramService.buildHttpParams({refno:e,purchaseOrderNo:t});return this.http.post(this.BASE_URL+o.a.PENDING_BUY+o.a.READ,{},{params:n})}createBondSell(e,t){const n=this.paramService.buildHttpParams({refno:e});return this.http.post(this.BASE_URL+o.a.SELL+o.a.ORDER+o.a.CREATE,t,{params:n})}findBondSellContractDetails(e,t){const n=this.paramService.buildHttpParams({refno:e,saleOrderNo:t});return this.http.post(this.BASE_URL+o.a.BOND_SELL_CONTRACT+o.a.READ,{},{params:n})}voidBondOrder(e,t,n){const i=this.paramService.buildHttpParams({refno:e,contractNo:t,transactionType:n});return this.http.post(this.BASE_URL+o.a.VOID,{},{params:i})}createBondBuyWithPasswordModel(e,t,n){const i=this.paramService.buildHttpParams(Object.assign({refno:e},n));return this.http.post(this.BASE_URL+o.a.BUY+o.a.ORDER+o.a.CREATE,t,{params:i})}cancelBondBuyWithPassword(e){const t=this.paramService.buildHttpParams(Object.assign({},e));return this.http.post(this.BASE_URL+o.a.BUY+o.a.ORDER+o.a.CANCEL,{},{params:t})}cancelBondSellWithPassword(e){const t=this.paramService.buildHttpParams(Object.assign({},e));return this.http.post(this.BASE_URL+o.a.SELL+o.a.ORDER+o.a.CANCEL,{},{params:t})}getBondExpressAvailablePaymentMethod(e){const t=this.paramService.buildHttpParams({refno:e});return this.http.post(this.BASE_URL+o.a.PAYMENT_METHOD_LIST+o.a.READ,{},{params:t})}getBondProcessingFee(e,t,n,i,l){const a=this.paramService.buildHttpParams({quantity:e,bondCurrencyCode:t,investmentCurrencyCode:n,refno:i,issueCode:l});return this.http.post(this.BASE_URL+o.a.PROCESSING_FEE+o.a.READ,{},{params:a})}getTotalPurchaseAmount(e,t,n){const i=this.paramService.buildHttpParams({ai:e,processingFee:t,purchaseAmount:n});return this.http.post(this.BASE_URL+o.a.TOTAL_AMOUNT+o.a.READ,{},{params:i})}getTotalPurchaseAmountFx(e,t,n,i,l){const a=this.paramService.buildHttpParams({ai:e,processingFee:t,purchaseAmount:n,bondCurrencyCode:i,investmentCurrency:l});return this.http.post(this.BASE_URL+o.a.TOTAL_AMOUNT_FX+o.a.READ,{},{params:a})}createBondExpressBuyContract(e,t){const n=this.paramService.buildHttpParams({refno:e});return this.http.post(this.BASE_URL+o.a.BOND_EXPRESS+o.a.BUY,t,{params:n})}createBondExpressSellContract(e,t){const n=this.paramService.buildHttpParams({refno:e});return this.http.post(this.BASE_URL+o.a.BOND_EXPRESS+o.a.SELL,t,{params:n})}
1getTotalSaleAmountFx(e,t,n){const i=this.paramService.buildHttpParams({saleAmount:e,bondCurrencyCode:t,investmentCurrency:n});return this.http.post(this.BASE_URL+o.a.TOTAL_SALE_AMOUNT_FX+o.a.READ,{},{params:i})}validateBuy(e){const t=this.paramService.buildHttpParams({refno:e});return this.http.post(this.BASE_URL+o.a.BUY+o.a.CART+o.a.VALIDATE,[],{params:t})}validateBondRmoBuy(e){return this.http.post(this.BASE_URL+o.a.BUY+o.a.BOND_RMO_CART+o.a.VALIDATE,e,{})}createBondRmoBuy(e,t){const n=this.paramService.buildHttpParams({refno:e});return this.http.post(this.BASE_URL+o.a.BUY+o.a.BOND_RMO+o.a.ORDER+o.a.CREATE,t,{params:n})}validateBondRmoSell(e){return this.http.post(this.BASE_URL+o.a.SELL+o.a.BOND_RMO_CART+o.a.VALIDATE,e,{})}createBondRmoSell(e){return this.http.post(this.BASE_URL+o.a.SELL+o.a.BOND_RMO+o.a.ORDER+o.a.CREATE,e,{})}updateBondRmoBuy(e){return this.http.post(this.BASE_URL+o.a.BUY+o.a.BOND_RMO+o.a.ORDER+o.a.UPDATE,e,{})}updateBondRmoSell(e){return this.http.post(this.BASE_URL+o.a.SELL+o.a.BOND_RMO+o.a.ORDER+o.a.UPDATE,e,{})}getBondRmoCutOffTimeDetails(){return this.http.post(o.a.TRANSACTION+o.a.BOND+o.a.BOND_RMO+o.a.BOND_RMO_CUT_OFF_TIME+o.a.READ,{})}}return e.\u0275fac=function(t){return new(t||e)(i.vc(l.c),i.vc(a.a))},e.\u0275prov=i.hc({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"8rM3":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));let o=(()=>{class e{}return e.RISK_APPETITE_CONSERVATIVE="PORTFOLIO00001",e.RISK_APPETITE_MODERATELY_CONSERVATIVE="PORTFOLIO17051700001",e.RISK_APPETITE_BALANCED="PORTFOLIO00002",e.RISK_APPETITE_MODERATELY_AGGRESSIVE="PORTFOLIO17051700002",e.RISK_APPETITE_AGGRESSIVE="PORTFOLIO00003",e.RISK_APPETITE_ISLAMIC_CONSERVATIVE="PORTFOLIO19022700002",e.RISK_APPETITE_ISLAMIC_MODERATELY_CONSERVATIVE="PORTFOLIO19031400005",e.RISK_APPETITE_ISLAMIC_BALANCED="PORTFOLIO19031400006",e.RISK_APPETITE_ISLAMIC_MODERATELY_AGGRESSIVE="PORTFOLIO19031400007",e.RISK_APPETITE_ISLAMIC_AGGRESSIVE="PORTFOLIO19031400008",e.RISK_LESS_EQUAL_17={equity:10,fixedIncome:90},e.RISK_ABOVE_EQUAL_18={equity:30,fixedIncome:70},e.RISK_ABOVE_EQUAL_26={equity:50,fixedIncome:50},e.RISK_ABOVE_EQUAL_33={equity:70,fixedIncome:30},e.RISK_ABOVE_EQUAL_41={equity:90,fixedIncome:10},e.RISK_APPETITE_CONSERVATIVE_BOND="Conservative",e.RISK_APPETITE_MODERATELY_CONSERVATIVE_BOND="Moderately Conservative",e.RISK_APPETITE_BALANCED_BOND="Balanced",e.RISK_APPETITE_MODERATELY_AGGRESSIVE_BOND="Moderately Aggressive",e.RISK_APPETITE_AGGRESSIVE_BOND="Aggressive",e})()},J9tp:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("fXoL"),i=n("dEAy"),l=n("uL2V");function a(e,t){1&e&&(o.rc(0,"h4",3),o.qd(1,"Definition of Domestic Ringgit Borrowing"),o.qc())}function c(e,t){if(1&e&&(o.mc(0,"app-fep-balance",4),o.rc(1,"div"),o.rc(2,"p",5),o.qd(3,"\u201cDomestic Ringgit Borrowing\u201d means borrowing in Ringgit obtained by a resident from another resident. For a resident entity, the borrowing shall exclude borrowing from another resident entity within its group of entities with parent\u2010subsidiary relationship."),o.qc(),o.rc(4,"p",6),o.qd(5,"\u201cBorrowing\u201d means any credit facility, financing facility, trade guarantee or guarantee for payment of goods, redeemable preference share, Islamic redeemable preference share, corporate bond or sukuk other than:"),o.qc(),o.rc(6,"ol",7),o.rc(7,"li"),o.qd(8," (a) trade credit terms extended by a supplier for all types of good or services; "),o.qc(),o.rc(9,"li"),o.qd(10," (b) forward contract with a licensed onshore bank excluding a contract that involves: "),o.qc(),o.rc(11,"li"),o.qd(12," (c) exchanging or swapping of Ringgit or foreign currency debt for another foreign currency debt; or "),o.qc(),o.rc(13,"li"),o.qd(14," (d) exchanging of foreign currency debt for a Ringgit debt; "),o.qc(),o.rc(15,"li"),o.qd(16," (e) financial guarantee or non\u2010financial guarantee; "),o.qc(),o.rc(17,"li"),o.qd(18," (f) operational leasing facility; "),o.qc(),o.rc(19,"li"),o.qd(20," (g) factoring facility without recourse; "),o.qc(),o.rc(21,"li"),o.qd(22," (h) a credit card or charge card facility obtained by an individual from a resident and used for payment for retail goods or services only; or "),o.qc(),o.rc(23,"li"),o.qd(24," (i) a credit facility or financing facility obtained by a resident individual from a resident to purchase one
1(1) residential property and one (1) vehicle. "),o.qc(),o.qc(),o.qc()),2&e){const e=o.Dc();o.Mc("refno",e.refno)("nric",e.nric)("isShowHeader",!0)}}let s=(()=>{class e{constructor(){this.showModal=!1,this.refno="",this.nric="",this.showModalChange=new o.s}closeModal(){this.showModal=!1,this.showModalChange.emit(!1)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.fc({type:e,selectors:[["app-fep-currency-conversion-limit-modal"]],inputs:{showModal:"showModal",refno:"refno",nric:"nric"},outputs:{showModalChange:"showModalChange"},decls:5,vars:6,consts:[["nzWidth","700","nzVisible","true",3,"nzVisible","nzWrapClassName","nzTitle","nzContent","nzFooter","nzCancelText","nzVisibleChange","nzOnOk","nzOnCancel"],["modalTitle",""],["modalContent",""],[1,"db-header"],[3,"refno","nric","isShowHeader"],[1,"mt-3","text-xs"],[1,"text-xs"],[1,"mb-3","list-unstyled","text-xs"]],template:function(e,t){if(1&e&&(o.rc(0,"nz-modal",0),o.zc("nzVisibleChange",(function(e){return t.showModal=e}))("nzOnOk",(function(){return null}))("nzOnCancel",(function(){return t.closeModal()})),o.od(1,a,2,0,"ng-template",null,1,o.pd),o.od(3,c,25,3,"ng-template",null,2,o.pd),o.qc()),2&e){const e=o.ad(2),n=o.ad(4);o.Mc("nzVisible",t.showModal)("nzWrapClassName","vertical-center-modal")("nzTitle",e)("nzContent",n)("nzFooter",null)("nzCancelText",null)}},directives:[i.a,l.a],styles:[".db-header[_ngcontent-%COMP%]{font-size:17px;margin-bottom:0}"]}),e})()},"K17+":function(e,t,n){"use strict";n.d(t,"a",(function(){return Te}));var o=n("mrSG"),i=n("fXoL"),l=n("3Pt+"),a=n("AcyG"),c=n("6h7t"),s=n("G/fY"),r=n("2VHv"),d=n("JIr8"),u=n("vkgz"),p=n("/uUt"),h=n("nYR2"),b=n("eIep"),m=n("cp0P"),g=n("LRne"),f=n("Q1wu"),v=n("iFlv"),y=n("gFZo"),C=n("+NfP"),M=n("ofXK"),T=n("6l6k"),O=n("66kx"),B=n("W7Oe"),S=n("OAAr"),x=n("H2Td"),P=n("z7QD"),E=n("B+r4"),w=n("drXJ"),D=n("PtUS"),z=n("1Z1e"),A=n("/ai0"),F=n("4we5"),q=n("eXWG"),I=n("X7a2"),_=n("k4tz"),R=n("PpG7"),k=n("fyyF"),U=n("PTRe"),L=n("vcRD"),V=n("HtrM"),N=n("FwiY"),Y=n("9WYH"),j=n("OtHt"),H=n("zaiM");const G=function(e,t,n){return{issueCode:e,nominalValue:t,price:n}};function W(e,t){if(1&e){const e=i.sc();i.rc(0,"app-bond-calculator-shared-v2",29),i.zc("estRedemptionAmtEmitter",(function(t){return i.dd(e),i.Dc().setEstRedemptionAmt(t)})),i.qc()}if(2&e){const e=i.Dc();i.Mc("hidden",!0)("bondCalculatorInput",i.Uc(5,G,null==e.selectedBond?null:e.selectedBond.issueCode,e.form.get("sellQuantity").value,e.form.get("bidPrice").value))("isOrderpad",!0)("isSellOrderpad",!0)("bondType","bondExpress")}}function Q(e,t){if(1&e&&(i.rc(0,"span"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc();i.Ub(1),i.sd("",i.Gc(2,1,e.netAskYield,"1.3-3"),"%")}}function $(e,t){if(1&e&&(i.rc(0,"span"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc();i.Ub(1),i.sd("",i.Gc(2,1,null==e.selectedBond?null:e.selectedBond.bidYield,"1.3-3"),"%")}}function K(e,t){1&e&&i.nc(0)}function X(e,t){if(1&e&&i.mc(0,"ui-form-card",30),2&e){i.Dc();const e=i.ad(47);i.Mc("formCardBody",e)}}function J(e,t){if(1&e&&i.mc(0,"ui-option",51),2&e){const e=t.$implicit;i.Mc("nzLabel",e.accountTypeDisplay)("nzValue",e.refno)}}function Z(e,t){1&e&&(i.rc(0,"div",52),i.rc(1,"div"),i.qd(2," Please choose an account. "),i.qc(),i.qc())}function ee(e,t){if(1&e&&(i.rc(0,"div",33),i.rc(1,"nz-col",34),i.rc(2,"span",35),i.qd(3,"Account"),i.qc(),i.qc(),i.rc(4,"nz-col",36),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",49),i.od(7,J,1,2,"ui-option",50),i.qc(),i.qc(),i.od(8,Z,3,0,"div",39),i.qc(),i.qc()),2&e){const e=i.Dc(2);var n=null;const t=(null==(n=e.form.get("refno"))?null:n.dirty)&&(null==(n=e.form.get("refno"))?null:n.hasError("required"));i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("formControl",e.refno)("nzShowArrow",(null==e.accountSelectorOption?null:e.accountSelectorOption.length)>1),i.Ub(1),i.Mc("ngForOf",e.accountSelectorOption),i.Ub(1),i.Mc("ngIf",t)}}function te(e,t){if(1&e&&i.mc(0,"ui-option",53),2&e){const e=t.$implicit;i.Mc("nzValue",e.id)("nzLabel",e.label)}}function ne(e,t){1&e&&(i.rc(0,"div",52),i.rc(1,"div"),i.qd(2," Please make sure you select a method. "),i.qc(),i.qc())}function oe(e,t){if(1&e){const e=i.sc();i.rc(0,"div",54),i.rc(1,"uic-icon",55),i.zc("click",(function(){return i.dd(e),i.Dc(2).onMinusPrice()})),i.qc(),i.rc(2,"uic-icon",56),i.zc("click",(function(){return i.dd(e),i.Dc(2).onAddPrice()})),i.qc(),i.rc(3,"uic-button",57),i.zc("click",(function(){return i.dd(e),i.Dc(2).handleCheckSellAll()})),i.rc(4,"span"),i.qd(5,"MAX"),i.qc(),i.qc(),i.qc()}2&e&&(i.Ub(2),i.Mc("ngClass","ml-12px"))}function ie(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Minimum nominal value of this bond is ",null==e.selectedBond?null:e.selectedBond.bmpMyMinLotSize,"")}}function le(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Maximum bid volume of this bond is ",null==e.selectedBond?null:e.selectedBond.bidVolume,"")}}function ae(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Maximum available quantity of this bond is ",i.Gc(2,1,e.availableQuantity,"1.0-0"),"")}}function ce(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Minimum incremental nominal value is ",null==e.selectedBond?null:e.selectedBond.bmpMySubLotSize,".")}}function se(e,t){if(1&e&&(i.rc(0,"div",52),i.od(1,ie,2,1,"div",21),i.od(2,le,2,1,"div",21),i.od(3,ae,3,4,"div",21),i.od(4,ce,2,1,"div",21),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Mc("ngIf",(null==e.sellQuantity?null:e.sellQuantity.hasError("min"))||(null==e.sellQuantity?null:e.sellQuantity.hasError("required"))),i.Ub(1),i.Mc("ngIf",(null==e.sellQuantity?null:e.sellQuantity.hasError("max"))&&e.sellQuantity.value>(null==e.selectedBond?null:e.selectedBond.bidVolume)),i.Ub(1),i.Mc("ngIf",(null==e.sellQuantity?null:e.sellQuantity.hasError("max"))&&e.sellQuantity.value>e.availableQuantity),i.Ub(1),i.Mc("ngIf",(null==e.sellQuantity?null:e.sellQuantity.hasError("invalidIncremental"))&&(null==e.sellQuantity?null:e.sellQuantity.value)>=(null==e.selectedBond?null:e.selectedBond.bmpMySubLotSize))}}function re(e,t){if(1&e&&(i.rc(0,"div",58),i.mc(1,"uic-list-item",44),i.Ec(2,"currency"),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Nc("value",e.estRedemptionAmt?i.Ic(2,4,e.estRedemptionAmt,(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" ","code","1.2-2"):"-"),i.Mc("info","Est. Redemption Amount")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function de(e,t){1&e&&(i.rc(0,"div",59),i.mc(1,"i",60),i.qc())}function ue(e,t){1&e&&(i.rc(0,"small",61),i.qd(1,"You do not have sufficient units to place the order."),i.qc())}function pe(e,t){if(1&e&&(i.rc(0,"form",31),i.od(1,ee,9,6,"div",32),i.rc(2,"div",33),i.rc(3,"nz-col",34),i.rc(4,"span",35),i.qd(5," Redemption Method "),i.qc(),i.qc(),i.rc(6,"nz-col",36),i.rc(7,"uic-select-wrapper"),i.rc(8,"ui-select",37),i.od(9,te,1,2,"ui-option",38),i.qc(),i.qc(),i.od(10,ne,3,0,"div",39),i.qc(),i.qc(),i.rc(11,"div",33),i.rc(12,"nz-col",34),i.rc(13,"span",35),i.qd(14,"Nominal Value"),i.qc(),i.qc(),i.rc(15,"nz-col",36),i.rc(16,"uic-input-wrapper"),i.rc(17,"nz-input-group",40),i.mc(18,"input",41),i.q
1c(),i.qc(),i.od(19,oe,6,1,"ng-template",null,42,i.pd),i.od(21,se,5,4,"div",39),i.rc(22,"div",43),i.mc(23,"uic-list-item",44),i.Ec(24,"number"),i.qc(),i.qc(),i.qc(),i.qc(),i.od(25,re,3,9,"div",45),i.Ec(26,"async"),i.rc(27,"div",46),i.od(28,de,2,0,"div",47),i.od(29,ue,2,0,"small",48),i.qc()),2&e){const e=i.ad(20),t=i.Dc();var n=null;const l=null!=(n=t.form.get("paymentModeId"))&&n.dirty&&null!=(n=t.form.get("paymentModeId"))&&n.hasError("required")?"error-bg":"background-grey";var o=null;const a=(null==(o=t.form.get("paymentModeId"))?null:o.dirty)&&(null==(o=t.form.get("paymentModeId"))?null:o.hasError("required"));i.Mc("formGroup",t.form),i.Ub(1),i.Mc("ngIf",(null==t.accountSelectorOption?null:t.accountSelectorOption.length)>1),i.Ub(2),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzLoading",t.readingPaymentMethod)("nzShowArrow",(null==t.redemptionMethodOptions?null:t.redemptionMethodOptions.length)>1)("ngClass",l)("nzDisabled",1===(null==t.redemptionMethodOptions?null:t.redemptionMethodOptions.length)),i.Ub(1),i.Mc("ngForOf",t.redemptionMethodOptions),i.Ub(1),i.Mc("ngIf",a),i.Ub(2),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzSuffix",e)("ngClass",(null!=t.sellQuantity&&t.sellQuantity.hasError("min")||null!=t.sellQuantity&&t.sellQuantity.hasError("required")||null!=t.sellQuantity&&t.sellQuantity.hasError("max")||null!=t.sellQuantity&&t.sellQuantity.hasError("invalidIncremental")&&(null==t.sellQuantity?null:t.sellQuantity.value)>=(null==t.selectedBond?null:t.selectedBond.bmpMySubLotSize))&&t.form.dirty?"error-bg":"background-grey"),i.Ub(1),i.Mc("ngClass",(null!=t.sellQuantity&&t.sellQuantity.hasError("min")||null!=t.sellQuantity&&t.sellQuantity.hasError("required")||null!=t.sellQuantity&&t.sellQuantity.hasError("max")||null!=t.sellQuantity&&t.sellQuantity.hasError("invalidIncremental")&&(null==t.sellQuantity?null:t.sellQuantity.value)>=(null==t.selectedBond?null:t.selectedBond.bmpMySubLotSize))&&t.form.dirty?"error-bg":"background-grey")("step",null==t.selectedBond||null==t.selectedBond.bondInfoAndPerformanceModel?null:t.selectedBond.bondInfoAndPerformanceModel.minSubInitialAmt),i.Ub(3),i.Mc("ngIf",((null==t.sellQuantity?null:t.sellQuantity.hasError("min"))||(null==t.sellQuantity?null:t.sellQuantity.hasError("required"))||(null==t.sellQuantity?null:t.sellQuantity.hasError("max"))||(null==t.sellQuantity?null:t.sellQuantity.hasError("invalidIncremental"))&&(null==t.sellQuantity?null:t.sellQuantity.value)>=(null==t.selectedBond?null:t.selectedBond.bmpMySubLotSize))&&t.form.dirty),i.Ub(2),i.Nc("value",t.availableQuantity?i.Gc(24,24,t.availableQuantity,"1.0-0"):"-"),i.Mc("info","Balance Nominal")("infoClass","t-xs")("valueClass","t-xs font-weight-bold"),i.Ub(2),i.Mc("ngIf",!i.Fc(26,27,t.isMobile$)),i.Ub(3),i.Mc("ngIf",!t.availableQuantity),i.Ub(1),i.Mc("ngIf",!t.availableQuantity)}}function he(e,t){1&e&&i.nc(0)}function be(e,t){if(1&e){const e=i.sc();i.rc(0,"b2c-floating-bar"),i.rc(1,"div",11),i.rc(2,"p",62),i.qd(3,"Est. Redemption Amount"),i.qc(),i.rc(4,"div",63),i.rc(5,"p",64),i.qd(6),i.Ec(7,"currency"),i.qc(),i.qc(),i.qc(),i.rc(8,"div",11),i.rc(9,"uic-button",65),i.zc("click",(function(){return i.dd(e),i.Dc().onPreview()})),i.rc(10,"span"),i.qd(11,"Sell Preview"),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Ub(6),i.rd(e.estRedemptionAmt?i.Ic(7,5,e.estRedemptionAmt,(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" ","code","1.2-2"):"-"),i.Ub(3),i.Mc("nzRound",!0)("nzBlock",!0)("disabled",(null==e.form?null:e.form.invalid)||!e.availableQuantity||e.readingPaymentMethod)("nzLoading",e.isLoadingData||e.readingPaymentMethod)}}function me(e,t){if(1&e&&(i.rc(0,"p"),i.qd(1),i.qc()),2&e){const e=t.$implicit;i.Ub(1),i.rd(null==e?null:e.nzLabel)}}function ge(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"div",66),i.Ec(2,"async"),i.rc(3,"div",67),i.mc(4,"uic-icon",68),i.qc(),i.rc(5,"div",69),i.rc(6,"h5",70),i.qd(7,"Disclaimer"),i.qc(),i.rc(8,"p",71),i.qd(9,"By selecting Auto-Sweep as your redemption method, FSMOne will automatically opt you in. I confirm that I have read, agree to, and understand all the relevant "),i.rc(10,"a",72),i.zc("click",(function(){return i.dd(e),i.Dc(2).triggerDisclaimerModal()})),i.qd(11,"clauses and terms"),i.qc(),i.qd(12,"."),i.qc(),i.qc(),i.qc(),i.oc()}if(2&e){const e=i.Dc(2);i.Ub(1),i.Mc("ngClass",i.Fc(2,1,e.isMobile$)?"mb-2":"mb-4")}}function fe(e,t){if(1&e&&i.od(0,ge,13,3,"ng-container",21),2&e){const e=i.Dc();i.Mc("ngIf",e.isAutoOptInASDisclaimerVisible)}}function ve(e,t){1&e&&(i.rc(0,"span",73),i.qd(1,"-"),i.qc())}function ye(e,t){1&e&&(i.rc(0,"span",74),i.qd(1,"-"),i.qc())}function Ce(e,t){1&e&&(i.rc(0,"span"),i.qd(1,"-"),i.qc())}function Me(e,t){if(1&e&&i.mc(0,"nz-skeleton",75),2&e){const e=i.Dc();i.Mc("nzLoading",e.isLoading)("nzActive",!0)}}let Te=(()=>{class e{constructor(e,t,n,o,l,a,s,r,d){this.store=e,this.accountService=t,this.subHandlingService=n,this.transactionBondRestService=o,this.bondRestService=l,this.trustAccountRestService=a,this.holdingRestService=s,this.decimalPipe=r,this.datePipe=d,this.redemptionMethodOptions=[],this.previewOrder=new i.s,this.cancel=ne
1w i.s,this.accountSelectorOption=[],this.investmentCurrencyOptions=[],this.imagePath=c.g.STOCKS_IMG_PATH,this.buttonGroupClass={"px-4":!this.isMobile$},this.disclaimerModalVisible=!1,this.isAutoOptInASDisclaimerVisible=!1,this.netAskYield=0}ngOnChanges(e){var t,n,o,i,a,c,r,d,u,p,h,b,m,g,f,v,y,C,M,T,O,B,S,x,P,E,w,D,z,A,F,q,I,_,R,k,U,L,V,N,Y,j,H,G,W;if(console.log(e),e&&e.selectedBond&&e.selectedBond.currentValue){const O=null===(t=this.bondExpressTransactionModel)||void 0===t?void 0:t.refno,B=null===(n=this.bondExpressTransactionModel)||void 0===n?void 0:n.paymentModeId,S=null===(o=this.bondExpressTransactionModel)||void 0===o?void 0:o.paymentMode,x=null===(a=null===(i=this.redemptionMethodOptions)||void 0===i?void 0:i.find(t=>{var n;return t.currency===(null===(n=e.selectedBond)||void 0===n?void 0:n.currentValue.bondCurrencyCode)&&t.transactionMode===s.a.AUTO_SWEEP}))||void 0===a?void 0:a.id,P=null===(r=null===(c=this.redemptionMethodOptions)||void 0===c?void 0:c.find(t=>{var n;return t.currency===(null===(n=e.selectedBond)||void 0===n?void 0:n.currentValue.bondCurrencyCode)}))||void 0===r?void 0:r.id;this.form=new l.k({refno:new l.h(O||(null===(d=this.accountSelectorOption[0])||void 0===d?void 0:d.refno)),sellQuantity:new l.h(e.selectedBond.currentValue.minInitialAmt,[l.H.min(null===(p=null===(u=e.selectedBond)||void 0===u?void 0:u.currentValue)||void 0===p?void 0:p.bmpMyMinLotSize),l.H.required,l.H.max((null===(b=null===(h=e.selectedBond)||void 0===h?void 0:h.currentValue)||void 0===b?void 0:b.bidVolume)>=(null===(g=null===(m=e.selectedBond)||void 0===m?void 0:m.currentValue)||void 0===g?void 0:g.availableQuantity)?null===(v=null===(f=e.selectedBond)||void 0===f?void 0:f.currentValue)||void 0===v?void 0:v.availableQuantity:null===(C=null===(y=e.selectedBond)||void 0===y?void 0:y.currentValue)||void 0===C?void 0:C.bidVolume)]),bondCurrencyCode:new l.h(null===(M=e.selectedBond.currentValue)||void 0===M?void 0:M.bondCurrencyCode),paymentModeId:new l.h(B||x||P,l.H.required),bidPrice:new l.h(e.selectedBond.currentValue.bidPrice),paymentMode:new l.h(S||(x?s.a.AUTO_SWEEP:s.a.TRUST_ACCOUNT)),issueCode:new l.h(null===(T=e.selectedBond.currentValue)||void 0===T?void 0:T.issueCode),paymentCurrency:new l.h,accruedInt:new l.h}),this.form.get("sellQuantity").markAsDirty(),this.form.get("sellQuantity").updateValueAndValidity()}if(e&&e.selectedBondHolding&&e.selectedBondHolding.currentValue){this.availableQuantity=null===(S=null===(B=null===(O=e.selectedBondHolding)||void 0===O?void 0:O.currentValue)||void 0===B?void 0:B.availableQuantity)||void 0===S?void 0:S.toFixed(2);const t=null===(x=this.bondExpressTransactionModel)||void 0===x?void 0:x.paymentModeId,n=null===(P=this.bondExpressTransactionModel)||void 0===P?void 0:P.paymentMode,o=null===(w=null===(E=this.redemptionMethodOptions)||void 0===E?void 0:E.find(t=>{var n;return t.currency===(null===(n=e.selectedBondHolding)||void 0===n?void 0:n.currentValue.bondCurrencyCode)&&t.transactionMode===s.a.AUTO_SWEEP}))||void 0===w?void 0:w.id,i=null===(z=null===(D=this.redemptionMethodOptions)||void 0===D?void 0:D.find(t=>{var n;return t.currency===(null===(n=e.selectedBondHolding)||void 0===n?void 0:n.currentValue.bondCurrencyCode)}))||void 0===z?void 0:z.id;this.form=new l.k({refno:new l.h((null===(F=null===(A=e.selectedBondHolding)||void 0===A?void 0:A.currentValue)||void 0===F?void 0:F.refno)||(null===(q=this.accountSelectorOption[0])||void 0===q?void 0:q.refno)),sellQuantity:new l.h(null===(_=null===(I=e.selectedBondHolding)||void 0===I?void 0:I.currentValue.bondInfoAndPerformanceModel)||void 0===_?void 0:_.bmpMyMinLotSize,[l.H.min(null===(k=null===(R=this.selectedBondHolding)||void 0===R?void 0:R.currentValue.bondInfoAndPerformanceModel)||void 0===k?void 0:k.bmpMyMinLotSize),l.H.required,l.H.max((null===(U=this.selectedBond)||void 0===U?void 0:U.bidVolume)>=this.availableQuantity?this.availableQuantity:null===(L=this.selectedBond)||void 0===L?void 0:L.bidVolume)]),bondCurrencyCode:new l.h(null===(V=e.selectedBondHolding)||void 0===V?void 0:V.currentValue.bondCurrencyCode),paymentModeId:new l.h(t||o||i,l.H.required),bidPrice:new l.h(null===(Y=null===(N=e.selectedBondHolding)||void 0===N?void 0:N.currentValue.bondInfoAndPerformanceModel)||void 0===Y?void 0:Y.bidPrice),paymentMode:new l.h(n||(o?s.a.AUTO_SWEEP:s.a.TRUST_ACCOUNT)),issueC
1ode:new l.h(null===(H=null===(j=e.selectedBondHolding)||void 0===j?void 0:j.currentValue.bondInfoAndPerformanceModel)||void 0===H?void 0:H.issueCode),paymentCurrency:new l.h(null===(G=e.selectedBondHolding)||void 0===G?void 0:G.currentValue.bondCurrencyCode),accruedInt:new l.h(null===(W=e.selectedBondHolding)||void 0===W?void 0:W.currentValue.indicateAccruedInt)}),this.form.get("sellQuantity").markAsDirty(),this.form.get("sellQuantity").updateValueAndValidity()}console.log("this.form.invalid"),console.log(this.availableQuantity),console.log(this.form)}ngOnInit(){var e,t,n,o,i,a,c,r,d,u,p,h,b,m,g,f,v,y,C,M,T,O,B,S,x,P,E;console.log(this.selectedBond),console.log(this.selectedBondHolding),this.accountSelectorOption=this.accountService.accounts,console.log(null===(e=this.accountSelectorOption[0])||void 0===e?void 0:e.refno),this.availableQuantity=null===(n=null===(t=this.selectedBondHolding)||void 0===t?void 0:t.availableQuantity)||void 0===n?void 0:n.toFixed(2),console.log(this.availableQuantity);const w=null===(o=this.bondExpressTransactionModel)||void 0===o?void 0:o.refno;this.form=new l.k({refno:new l.h(w||(null===(i=this.accountSelectorOption[0])||void 0===i?void 0:i.refno)),sellQuantity:new l.h(null===(a=this.selectedBond)||void 0===a?void 0:a.bmpMyMinLotSize,[l.H.min(null===(c=this.selectedBond)||void 0===c?void 0:c.bmpMyMinLotSize),l.H.required,l.H.max((null===(r=this.selectedBond)||void 0===r?void 0:r.bidVolume)>=this.availableQuantity?this.availableQuantity:null===(d=this.selectedBond)||void 0===d?void 0:d.bidVolume)]),bondCurrencyCode:new l.h(null===(u=this.selectedBond)||void 0===u?void 0:u.bondCurrencyCode),paymentModeId:new l.h("",l.H.required),bidPrice:new l.h(null===(p=this.selectedBond)||void 0===p?void 0:p.bidPrice),paymentMode:new l.h,issueCode:new l.h(null===(h=this.selectedBond)||void 0===h?void 0:h.issueCode),paymentCurrency:new l.h(null===(b=this.selectedBond)||void 0===b?void 0:b.bondCurrencyCode),accruedInt:new l.h}),this.selectedBondHolding&&(this.form=new l.k({refno:new l.h((null===(m=this.selectedBondHolding)||void 0===m?void 0:m.refno)||(null===(g=this.accountSelectorOption[0])||void 0===g?void 0:g.refno)),sellQuantity:new l.h(null===(v=null===(f=this.selectedBondHolding)||void 0===f?void 0:f.bondInfoAndPerformanceModel)||void 0===v?void 0:v.bmpMyMinLotSize,[l.H.min(null===(C=null===(y=this.selectedBondHolding)||void 0===y?void 0:y.bondInfoAndPerformanceModel)||void 0===C?void 0:C.bmpMyMinLotSize),l.H.required,l.H.max((null===(M=this.selectedBondHolding)||void 0===M?void 0:M.bidVolume)>=this.availableQuantity?this.availableQuantity:null===(T=this.selectedBondHolding)||void 0===T?void 0:T.bidVolume)]),bondCurrencyCode:new l.h(null===(O=this.selectedBondHolding)||void 0===O?void 0:O.bondCurrencyCode),paymentModeId:new l.h("",l.H.required),bidPrice:new l.h(null===(S=null===(B=this.selectedBondHolding)||void 0===B?void 0:B.bondInfoAndPerformanceModel)||void 0===S?void 0:S.bidPrice),paymentMode:new l.h(s.a.TRUST_ACCOUNT),issueCode:new l.h(null===(P=null===(x=this.selectedBondHolding)||void 0===x?void 0:x.bondInfoAndPerformanceModel)||void 0===P?void 0:P.issueCode),paymentCurrency:new l.h,accruedInt:new l.h(null===(E=this.selectedBondHolding)||void 0===E?void 0:E.indicateAccruedInt)})),this.form.get("sellQuantity").markAsDirty(),this.form.get("sellQuantity").updateValueAndValidity(),this.refreshBondData(),this.getInitDataNew(),this.refreshBondInterval=this.refreshDataInterval()}getInitDataNew(e=!0){var t,n,o;this.isLoading=!0,this.redemptionMethodOptions=[],this.investmentCurrencyOptions=[],Object(m.a)([this.trustAccountRestService.findOrCreateActiveTrustAccount(this.refno.value,null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode).pipe(Object(d.a)(e=>Object(g.a)(null))),this.bondRestService.findBondTransactionAutoSweepList(null===(n=this.refno)||void 0===n?void 0:n.value,!1,null===(o=this.selectedBond)||void 0===o?void 0:o.bondCurrencyCode).pipe(Object(d.a)(e=>Object(g.a)(null)))]).subscribe(([t,n])=>{var o;t&&this.redemptionMethodOptions.push({label:(null==t?void 0:t.currency)+" Cash Account - ["+(null==t?void 0:t.currency)+" "+Object(M.L)(null==t?void 0:t.availableBalance,c.a.LOCALE_EN,"0.2-2")+"]",id:null==t?void 0:t.trustId,currency:null==t?void 0:t.currency,transactionMode:s.a.TRUST_ACCOUNT,availableBalance:null==t?void 0:t.availableBalance}),(null==n?void 0:n.status)===c.a.RESPONSE_SUCCESS&&(null==n?void 0:n.data)&&(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.length)>
10&&Object(C.a)(null==n?void 0:n.data).forEach(e=>{var t;(null==e?void 0:e.currency)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)&&this.redemptionMethodOptions.push({label:(null==e?void 0:e.purchasingPower)?(null==e?void 0:e.currency)+" Auto-Sweep - ["+(null==e?void 0:e.currency)+" "+Object(M.L)(null==e?void 0:e.purchasingPower,c.a.LOCALE_EN,"0.2-2")+"]":(null==e?void 0:e.currency)+" Auto-Sweep - ["+(null==e?void 0:e.currency)+" 0.00]",id:(null==e?void 0:e.trustId)?null==e?void 0:e.trustId:" ",currency:null==e?void 0:e.currency,transactionMode:s.a.AUTO_SWEEP,hasOptedInString:(null==e?void 0:e.hasOptedIn)?"Y":"N",availableBalance:null==e?void 0:e.purchasingPower})}),e&&(this.getBondCalculatorNetYield(),this.subscribeRefnoChange(),this.subscribePaymentModeIdChange(),this.refno.setValue(this.refno.value)),this.checkBondCurrency(),this.isLoading=!1,console.log("this.form.invalid"),console.log(this.redemptionMethodOptions.length),console.log(this.availableQuantity),console.log(this.form.invalid),this.form.get("sellQuantity").markAsDirty(),this.form.get("sellQuantity").updateValueAndValidity()},e=>{this.isLoading=!1})}refreshBondData(){this.isLoadingData=!0,this.subHandlingService.once(this.bondRestService.findBondExpressList("FMY").pipe(Object(u.a)(e=>{var t,n,o,i,a,s,r,d,u,p,h;if(this.isLoadingData=!1,(null==e?void 0:e.status)!==c.a.RESPONSE_SUCCESS)return;const b=[...null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.bondRetailList,...null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.bondWholesaleList],m=null==b?void 0:b.find(e=>{var t;return e.issueCode===(null===(t=this.selectedBond)||void 0===t?void 0:t.issueCode)});m&&(this.selectedBond=m,null===(o=this.bidPrice)||void 0===o||o.patchValue(null===(i=this.selectedBond)||void 0===i?void 0:i.bidPrice),null===(a=this.sellQuantity)||void 0===a||a.setValidators([l.H.min(null===(s=this.selectedBond)||void 0===s?void 0:s.bmpMyMinLotSize),l.H.required,l.H.max((null===(r=this.selectedBond)||void 0===r?void 0:r.bidVolume)>=this.availableQuantity?this.availableQuantity:null===(d=this.selectedBond)||void 0===d?void 0:d.bidVolume),Object(v.i)(null===(u=this.selectedBond)||void 0===u?void 0:u.bmpMySubLotSize)]),null===(p=this.accruedInt)||void 0===p||p.patchValue(null===(h=this.selectedBond)||void 0===h?void 0:h.myAccruedInt))})))}customIncrementalAmountValidator(e){return t=>t.value<e||t.value%e==0?null:{invalidIncremental:!0}}checkBondCurrency(){var e,t,n,o,i,l,a,c,r,d,u,p,h,b,m,g,f,v,y,C,M,T;if(this.redemptionMethodOptions.sort((e,t)=>t.availableBalance-e.availableBalance),(null===(e=this.investmentCurrencyOptions)||void 0===e?void 0:e.includes(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode))||
1!(null===(n=this.redemptionMethodOptions)||void 0===n?void 0:n.find(e=>{var t;return(null==e?void 0:e.currency)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)})))null===(f=this.paymentCurrency)||void 0===f||f.patchValue(s.a.PAYMENT_CURRENCY_MYR),null===(v=this.bondCurrencyCode)||void 0===v||v.patchValue(s.a.PAYMENT_CURRENCY_MYR),null===(y=this.paymentModeId)||void 0===y||y.patchValue(null!==(T=null===(M=null===(C=this.redemptionMethodOptions)||void 0===C?void 0:C.find(e=>e.currency===s.a.PAYMENT_CURRENCY_MYR))||void 0===M?void 0:M.id)&&void 0!==T?T:null),console.log("checking paymentId",this.form);else{this.investmentCurrencyOptions.push(null===(o=this.selectedBond)||void 0===o?void 0:o.bondCurrencyCode),null===(i=this.paymentCurrency)||void 0===i||i.patchValue(null===(l=this.selectedBond)||void 0===l?void 0:l.bondCurrencyCode),null===(a=this.bondCurrencyCode)||void 0===a||a.patchValue(null===(c=this.selectedBond)||void 0===c?void 0:c.bondCurrencyCode);const e=null===(d=null===(r=this.redemptionMethodOptions)||void 0===r?void 0:r.find(e=>{var t;return e.currency===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)&&e.transactionMode===s.a.AUTO_SWEEP}))||void 0===d?void 0:d.id,t=null===(u=this.bondExpressTransactionModel)||void 0===u?void 0:u.paymentModeId;if(t)null===(p=this.paymentModeId)||void 0===p||p.patchValue(t);else if(e)null===(h=this.paymentModeId)||void 0===h||h.patchValue(e);else{const e=null===(m=null===(b=this.redemptionMethodOptions)||void 0===b?void 0:b.find(e=>{var t;return e.currency===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)}))||void 0===m?void 0:m.id;e&&(null===(g=this.paymentModeId)||void 0===g||g.patchValue(null!=e?e:null))}}}subscribeInvestmentCurrencyChange(){var e;this.subHandlingService.subscribe(null===(e=this.paymentCurrency)||void 0===e?void 0:e.valueChanges.pipe(Object(p.a)(),Object(u.a)(e=>{var t,n,o,i,l;const a=null===(n=null===(t=this.redemptionMethodOptions)||void 0===t?void 0:t.find(e=>{var t;return e.currency===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)&&e.transactionMode===s.a.AUTO_SWEEP}))||void 0===n?void 0:n.id,c=null===(o=this.bondExpressTransactionModel)||void 0===o?void 0:o.paymentModeId;if(c)this.paymentModeId.patchValue(c);else if(a)this.paymentModeId.patchValue(a);else{const t=null===(l=null===(i=this.redemptionMethodOptions)||void 0===i?void 0:i.find(t=>t.currency===e))||void 0===l?void 0:l.id;this.paymentModeId.patchValue(t)}})))}subscribePaymentModeIdChange(){var e;this.subHandlingService.subscribe(null===(e=this.paymentModeId)||void 0===e?void 0:e.valueChanges.pipe(Object(p.a)(),Object(u.a)(e=>{var t;const n=null===(t=this.redemptionMethodOptions)||void 0===t?void 0:t.find(t=>(null==t?void 0:t.id)===e),o=null==n?void 0:n.transactionMode;this.paymentMode.patchValue(o),this.isAutoOptInASDisclaimerVisible=!!(null==o?void 0:o.includes(s.a.AUTO_SWEEP))&&"N"===(null==n?void 0:n.hasOptedInString),this.paymentCurrency.patchValue(null==n?void 0:n.currency)})))}get refno(){return this.form.get("refno")}get paymentCurrency(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("paymentCurrency")}get sellQuantity(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("sellQuantity")}get bondCurrencyCode(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("bondCurrencyCode")}get paymentModeId(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("paymentModeId")}get paymentMode(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("paymentMode")}get issueCode(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("issueCode")}get bidPrice(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("bidPrice")}get accruedInt(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("accruedInt")}subscribeRefnoChange(){var e;this.subHandlingService.subscribe(null===(e=this.refno)||void 0===e?void 0:e.valueChanges.pipe(Object(u.a)(e=>{clearInterval(this.refreshBondInterval),this.isLoading=!0,this.holdingRestService.findHoldingList(e,"bond").pipe(Object(u.a)(e=>{var t,n,o;if(e.status===c.a.RESPONSE_SUCCESS&&e.data){const i=null===(t=e.data)||void 0===t?void 0:t.filter(e=>
1e.productCode===this.selectedBond.issueCode);i.length>0?(this.selectedBondHolding=i[0],this.availableQuantity=null===(o=null===(n=this.selectedBondHolding)||void 0===n?void 0:n.availableQuantity)||void 0===o?void 0:o.toFixed(2)):(this.selectedBondHolding=null,this.availableQuantity=null)}}),Object(h.a)(()=>this.getInitDataNew(!1))).subscribe(),this.refreshBondInterval=this.refreshDataInterval()})))}refreshDataInterval(){return setInterval(()=>{this.refreshBondData()},1e4)}onPreview(){if(Object(f.c)(this.form),this.form.invalid)return;this.form.updateValueAndValidity();const e=Object.assign({},this.form.value);this.previewOrder.emit({bondExpressTransactionModel:e,fromBondExpress:!0})}onCancel(){this.cancel.emit()}ngOnDestroy(){clearInterval(this.refreshBondInterval)}handleCheckSellAll(){this.isSellAll=!0,this.sellQuantity.patchValue(this.isSellAll?Math.round(this.availableQuantity||0):0),this.form.get("sellQuantity").markAsDirty(),this.form.get("sellQuantity").updateValueAndValidity()}onAddPrice(){var e,t,n;console.log(this.selectedBondHolding);const o=this.form.get("sellQuantity").value;this.form.get("sellQuantity").setValue(o+((null===(t=null===(e=this.selectedBondHolding)||void 0===e?void 0:e.bondInfoAndPerformanceModel)||void 0===t?void 0:t.bmpMySubLotSize)||(null===(n=this.selectedBond)||void 0===n?void 0:n.bmpMySubLotSize)||0),{onlySelf:!0,emitEvent:!0}),console.log(this.form),this.form.get("sellQuantity").markAsDirty(),this.form.get("sellQuantity").updateValueAndValidity()}onMinusPrice(){var e,t,n;console.log(this.selectedBondHolding);const o=this.form.get("sellQuantity").value,i=(null===(t=null===(e=this.selectedBondHolding)||void 0===e?void 0:e.bondInfoAndPerformanceModel)||void 0===t?void 0:t.bmpMySubLotSize)||(null===(n=this.selectedBond)||void 0===n?void 0:n.bmpMySubLotSize)||0,l=o-i<0?0:o-i;this.form.get("sellQuantity").setValue(l,{onlySelf:!0,emitEvent:!0}),console.log(this.form),this.form.get("sellQuantity").markAsDirty(),this.form.get("sellQuantity").updateValueAndValidity()}triggerDisclaimerModal(){this.disclaimerModalVisible=!this.disclaimerModalVisible}setEstRedemptionAmt(e){this.estRedemptionAmt=e}addThousandToKSeperator(e){return e?e>=1e3?e/1e3+"k":e.toString():"0"}getBondCalculatorNetYield(){var e;let t=0,n=0,o=new Date,i=!1;this.subHandlingService.once(this.bondRestService.initBondCalculatorData(this.selectedBond.issueCode,null===(e=this.accountSelectorOption[0])||void 0===e?void 0:e.refno).pipe(Object(u.a)(e=>{var l,a,s,r,d;(null==e?void 0:e.status)===c.a.RESPONSE_SUCCESS&&"active"===(null===(l=null==e?void 0:e.data)||void 0===l?void 0:l.status)&&(i=!!(null===(a=e.data)||void 0===a?void 0:a.callDate),t=null===(s=e.data)||void 0===s?void 0:s.bmpMyMinLotSize,n=Number(this.decimalPipe.transform(null===(r=e.data)||void 0===r?void 0:r.offerPriceBmp,"1.3-3")),o=null===(d=e.data)||void 0===d?void 0:d.beSettlementDate)}),Object(d.a)(e=>(console.log(e),Object(g.a)(null))),Object(b.a)(()=>{var e;const l={issueCode:this.selectedBond.issueCode,nominalValue:t>1e4?t:1e4,settlementDate:this.datePipe.transform(o,"yyyy-MM-dd"),forTransaction:!0,isBondBuy:!0,price:n,isRmo:!0,refno:null===(e=this.accountSelectorOption[0])||void 0===e?void 0:e.refno,expiredDate:this.datePipe.transform(new Date,"yyyy-MM-dd"),yieldType:"rmo"};return this.bondRestService.bondCalculatorDataBySettlementDateAndPrice(l).pipe(Object(u.a)(e=>{var t,n;(null==e?void 0:e.status)===c.a.RESPONSE_SUCCESS&&(this.netAskYield=i?null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.offerNetYtc:null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.offerNetYtm)}))})))}}return e.\u0275fac=function(t){return new(t||e)(i.lc(a.i),i.lc(T.a),i.lc(r.a),i.lc(O.a),i.lc(B.a),i.lc(S.a),i.lc(x.a),i.lc(M.g),i.lc(M.f))},e.\u0275cmp=i.fc({type:e,selectors:[["app-rmo-bond-express-sell-form"]],inputs:{selectedBondHolding:"selectedBondHolding",selectedBond:"selectedBond",bondExpressTransactionModel:"bondExpressTransactionModel",buySellToggleTemplate:"buySellToggleTemplate"},outputs:{previewOrder:"previewOrder",cancel:"cancel"},features:[i.Tb([r.a]),i.Sb],decls:72,vars:41,consts:[[3,"componentStyleOnly"],["nzLg","24","nzXs","24",3,"ngClass"],[3,"hidden","bondCalculatorInput","isOrderpad","isSellOrderpad","bondType","estRedemptionAmtEmitter",4,"ngIf"],[1,"pb-12px","d-flex","align-item-center",2,"gap","13px"],[1,"w-100"],[1,"rounded-top","center-text","active-ask-price-wrapper","bottom-border"],["nzType","flex","nzJustify","left",1,"t-xs","font-weight-normal","line-height-normal","font-style-normal","text-content-tertiary"],[1,"t-xl","font-weight-bold","my-2","line-height-normal"],["nzType","flex","nzJustify","left",1,"t-xs","text-content-primary","line-height-normal"],[4,"ngIf","ngIfElse"],[1,"rounded-bottom","center-text","active-ask-price-wrapper"],[1,"d-flex","justify-content-between"],[1,"text-10px","font-weight-normal","line-height-normal","font-style-normal","text-content-primary"],[1,"rounded-top","center-text","active-bid-price-wrapper","border-loss-color","top","bottom"],[1,"rounded-bottom","center-text","active-bid-price-wrapper","border-loss-color","bottom"],[4,"ngTemplateOutlet"],[3,"formCardBody",4,"ngIf","ngIfElse"],["bondExpressSellFormTpl",""],["nz-row","","nzGutter","16"],["nz-col","",3,"nzSpan"],["nzType","sell","nzSize","large",1,"mx-1","w-100",3,"nzRound","nzBlock","disabled","nzLoading","click"],[4,"ngIf"],["paymentMethodTemplate",""],["nzTitle","Disclaimer","nzClassName","modal
1-title-border",3,"nzVisible","nzClosable","nzMaskClosable","nzWidth","nzFooter","isMobileFullScreen","nzOnCancel"],["autoSweepAutoOptInDisclaimerTpl",""],["showDashForAskYield",""],["showDashForBidYield",""],["defaultDash",""],["loadingTemplate",""],[3,"hidden","bondCalculatorInput","isOrderpad","isSellOrderpad","bondType","estRedemptionAmtEmitter"],[3,"formCardBody"],[1,"pb-3","d-flex","flex-column","gap-12px","border-0",3,"formGroup"],["class","d-flex align-item-center justify-content-between",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between"],[1,"line-height-18px",3,"nzSpan"],[1,"input-label"],[3,"nzSpan"],["nzLabelPlaceholder","Payment Method","nzPlaceHolder","Payment Method","formControlName","paymentModeId",1,"compact-view","no-placeholder","border-0","border-radius-8px",3,"nzLoading","nzShowArrow","ngClass","nzDisabled"],["class","rounded-bottom",3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["class","form-red-warning-wrapper",4,"ngIf"],[3,"nzSuffix","ngClass"],["formControlName","sellQuantity","type","number","placeholder","Nominal Value",1,"no-arrow","input-text","h-45px","border-0","pl-12px","pr-12px","pt-8px","pb-8px","w-100",3,"ngClass","step"],["norminalSuffixTemplate",""],[1,"pl-12px","pr-12px","mt-1"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass"],["class","pb-12px",4,"ngIf"],[1,"d-flex","text-sm","mt-2"],["class","pr-2",4,"ngIf"],["nz-row","","class","text-warning",4,"ngIf"],["nzPlaceHolder","Investment Account",1,"compact-view","no-placeholder","border-0",3,"formControl","nzShowArrow"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],[3,"nzLabel","nzValue"],[1,"form-red-warning-wrapper"],[1,"rounded-bottom",3,"nzValue","nzLabel"],[1,"d-flex","align-items-center"],["type","interface-icon/minus-long","width","16px","height","16px",1,"pointer",3,"click"],["type","interface-icon/plus-o","width","16px","height","16px",1,"pointer",3,"ngClass","click"],["nzType","tertiary","nzSize","small",1,"ml-12px",3,"click"],[1,"pb-12px"],[1,"pr-2"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-danger","text-sm"],["nz-row","",1,"text-warning"],[1,"text-grey"],[1,"d-flex"],[1,"font-weight-bold","text-profit"],["nzType","sell","nzSize","large",1,"w-100",3,"nzRound","nzBlock","disabled","nzLoading","click"],[1,"d-flex","bg-black-2","p-3","rounded","mt-1",3,"ngClass"],[1,"flex-shrink-0","mr-2"],["type","colored-icons/colored-hand-wave","width","22px","height","22px"],[1,"flex-grow-1"],[1,"font-weight-bold","text-12px","mb-2"],[1,"text-12px","text-black-6","mb-0"],[1,"text-12px","link-underline-none","font-weight-bold",3,"click"],[1,"text-right","right"],[1,"text-left"],[1,"border-0",3,"nzLoading","nzActive"]],template:function(e,t){if(1&e&&(i.rc(0,"uic-body",0),i.rc(1,"nz-row"),i.rc(2,"nz-col",1),i.Ec(3,"async"),i.od(4,W,1,9,"app-bond-calculator-shared-v2",2),i.pc(5),i.pc(6),i.rc(7,"div",3),i.rc(8,"div",4),i.rc(9,"div",5),i.rc(10,"div",6),i.qd(11,"Live Ask Price/Yield"),i.qc(),i.rc(12,"span",7),i.qd(13),i.Ec(14,"number"),i.qc(),i.rc(15,"div",8),i.od(16,Q,3,4,"span",9),i.qc(),i.qc(),i.rc(17,"div",10),i.rc(18,"div",11),i.rc(19,"div"),i.rc(20,"span",12),i.qd(21,"Ask Vol."),i.qc(),i.qc(),i.rc(22,"div"),i.rc(23,"span",12),i.qd(24),i.Ec(25,"thousandSeparator"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.rc(26,"div",4),i.rc(27,"div",13),i.rc(28,"div",6),i.qd(29,"Live Bid Price/Yield"),i.qc(),i.rc(30,"span",7),i.qd(31),i.Ec(32,"number"),i.qc(),i.rc(33,"div",8),i.od(34,$,3,4,"span",9),i.qc(),i.qc(),i.rc(35,"div",14),i.rc(36,"div",11),i.rc(37,"div"),i.rc(38,"span",12),i.qd(39,"Bid Vol."),i.qc(),i.qc(),i.rc(40,"div"),i.rc(41,"span",12),i.qd(42),i.Ec(43,"thousandSeparator"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.oc(),i.od(44,K,1,0,"ng-container",15),i.od(45,X,1,1,"ui-form-card",16),i.od(46,pe,30,29,"ng-template",null,17,i.pd),i.od(48,he,1,0,"ng-container",15),i.rc(49,"app-web-scaffold"),i.rc(50,"div",18),i.rc(51,"div",19),i.Ec(52,"async"),i.rc(53,"uic-button",20),i.zc("click",(function(){return t.onPreview()})),i.rc(54,"span"),i.qd(55,"Sell"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.rc(56,"app-mobile-scaffold"),i.od(57,be,12,10,"b2c-floating-bar",21),i.qc(),i.oc(),i.qc(),i.qc(),i.qc(),i.od(58,me,2,1,"ng-template",null,22,i.pd),i.rc(60,"ui-modal-pc-drawer-mobile",23),i.zc("nzOnCancel",(function(){return t.triggerDisclaimerModal()})),i.mc(61,"auto-sweep-disclaimer-content"),i.qc(),i.od(62,fe,1,1,"ng-template",null,24,i.pd),i.od(64,ve,2,0,"ng-template",null,25,i.pd),i.od(66,ye,2,0,"ng-template",null,26,i.pd),i.od(68,Ce,2,0,"ng-template",null,27,i.pd),i.od(70,Me,1,2,"ng-template",null,28,i.pd)
1),2&e){const e=i.ad(63),n=i.ad(69),o=i.ad(71);i.Mc("componentStyleOnly",!0),i.Ub(2),i.Mc("ngClass",i.Fc(3,27,t.isMobile$)?"":"orderpad-form"),i.Ub(2),i.Mc("ngIf",null==t.selectedBond?null:t.selectedBond.issueCode),i.Ub(9),i.sd(" ",i.Gc(14,29,null==t.selectedBond?null:t.selectedBond.offerPrice,"1.3-3")," "),i.Ub(3),i.Mc("ngIf",t.netAskYield)("ngIfElse",n),i.Ub(8),i.rd(i.Fc(25,32,null==t.selectedBond?null:t.selectedBond.offerVolume)),i.Ub(7),i.sd(" ",i.Gc(32,34,null==t.selectedBond?null:t.selectedBond.bidPrice,"1.3-3")," "),i.Ub(3),i.Mc("ngIf",null==t.selectedBond?null:t.selectedBond.bidYield)("ngIfElse",n),i.Ub(8),i.rd(i.Fc(43,37,null==t.selectedBond?null:t.selectedBond.bidVolume)),i.Ub(2),i.Mc("ngTemplateOutlet",t.buySellToggleTemplate),i.Ub(1),i.Mc("ngIf",!t.isLoading)("ngIfElse",o),i.Ub(3),i.Mc("ngTemplateOutlet",e),i.Ub(3),i.Mc("nzSpan",i.Fc(52,39,t.isMobile$)?12:24),i.Ub(2),i.Mc("nzRound",!0)("nzBlock",!0)("disabled",(null==t.form?null:t.form.invalid)||!t.availableQuantity||t.readingPaymentMethod)("nzLoading",t.isLoadingData||t.readingPaymentMethod),i.Ub(4),i.Mc("ngIf",t.selectedBond),i.Ub(3),i.Mc("nzVisible",t.disclaimerModalVisible)("nzClosable",!0)("nzMaskClosable",!1)("nzWidth",630)("nzFooter",null)("isMobileFullScreen",!0)}},directives:[P.a,E.c,E.a,M.q,M.t,M.A,w.a,D.a,z.a,A.a,F.a,q.a,I.a,l.J,l.u,l.l,_.a,R.d,l.t,l.j,M.s,k.a,U.c,l.c,l.z,L.a,l.i,R.a,V.a,N.b,Y.a,j.a],pipes:[M.b,M.g,H.a,M.d],styles:[".link-underline-none[_ngcontent-%COMP%]{color:#0073cf!important;text-decoration:none!important}.link-underline-none[_ngcontent-%COMP%]:hover{text-decoration:none!important}.no-arrow[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, .no-arrow[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;display:none;margin:0}.orderpad-form[_ngcontent-%COMP%]{border-radius:16px;border:1px solid #e0e0e0;background:#fff;padding:24px!important}.background-grey[_ngcontent-%COMP%]{background-color:#f5f5f5!important}.rounded-8px[_ngcontent-%COMP%]{border-radius:8px}.rounded-top-8px[_ngcontent-%COMP%]{border-top-left-radius:8px;border-top-right-radius:8px}.rounded-bottom-8px[_ngcontent-%COMP%]{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.h-45px[_ngcontent-%COMP%]{height:45px}.input-text[_ngcontent-%COMP%]{color:#282828;font-size:14px;font-weight:600}.input-label[_ngcontent-%COMP%], .input-text[_ngcontent-%COMP%]{font-style:normal;line-height:normal}.input-label[_ngcontent-%COMP%]{color:#616161;font-size:12px;font-weight:400}.bid-price-wrapper[_ngcontent-%COMP%]{border:1px solid transparent;padding:8px}.active-bid-price-wrapper[_ngcontent-%COMP%]{background:#fff5f6;padding:8px}.border-loss-color[_ngcontent-%COMP%]{border-left:1px solid #ff333a;border-right:1px solid #ff333a}.border-loss-color.top[_ngcontent-%COMP%]{border-top:1px solid #ff333a}.border-loss-color.bottom[_ngcontent-%COMP%]{border-bottom:1px solid #ff333a}.active-ask-price-wrapper[_ngcontent-%COMP%]{background:#edf9f3;padding:8px}.active-ask-price-wrapper.bottom-border[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.ask-price-wrapper[_ngcontent-%COMP%]{border:1px solid transparent;padding:8px}.ask-price-wrapper.bottom-border[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.border-profit-color[_ngcontent-%COMP%]{border-left:1px solid #093;border-right:1px solid #093}.border-profit-color.top[_ngcontent-%COMP%]{border-top:1px solid #093}.border-profit-color.bottom[_ngcontent-%COMP%]{border-bottom:1px solid #093}.center-text[_ngcontent-%COMP%]{text-align:center}.bid-yield-line[_ngcontent-%COMP%]{background-size:100% 5px;background:linear-gradient(90deg,#093 var(--ask-percent),#ff333a var(--bid-percent)) no-repeat;height:5px;width:100%}.profit-bg-custom[_ngcontent-%COMP%]{background:linear-gradient(270deg,#eafeef var(--fill-percent),#fff var(--fill-percent))}.loss-bg-custom[_ngcontent-%COMP%]{background:linear-gradient(90deg,#fdf5f6 var(--fill-percent),#fff var(--fill-percent))}.text-profit[_ngcontent-%COMP%]{color:#093!important}.text-loss[_ngcontent-%COMP%]{color:#ff333a!important}.right[_ngcontent-%COMP%]{float:right;padding-right:5px}.ask-percent[_ngcontent-%COMP%]{padding-left:5px}.bid-yield[_ngcontent-%COMP%]{padding-right:2px!important}.ask-yield[_ngcontent-%COMP%]{padding-left:2px!important}.font-style-normal[_ngcontent-%COMP%]{font-style:normal}.text-content-tertiary[_ngcontent-%COMP%]{color:#616161}.text-content-primary[_ngcontent-%COMP%]{color:#282828}.error-bg[_ngcontent-%COMP%]{background-color:#f9edec!important}.border-radius-8px[_ngcontent-%COMP%]{border-radius:8px}"]}),Object(o.c)([Object(a.e)(y.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},Na7k:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("lJxs"),i=n("bOdf"),l=n("6h7t"),a=n("fXoL"),c=n("66kx");let s=(()=>{class e{constructor(e){this.transactionBondRestService=e,this.totalAmount=0,this.totalAmountFx=0,this.processingFee=0}calculateAccruedInt(e,t){return e*t/100}calculateSellExpressAccruedInt(e,t){return e*t/1e3}getBondProcessingFee(e,t,n,i,a){return this.transactionBondRestService.getBondProcessingFee(e,t,n,i,a).pipe(Object(o.a)(e=>{if((null==e?void 0:e.status)!==l.a.RESPONSE_SUCCESS)return null;const t=null==e?void 0:e.data;return this.processingFee=t,t}))}getBondTotalPurchaseAmount(e,t,n){var i;return null===(i=this.transactionBondRestService)||void 0===i?void 0:i.getTotalPurchaseAmount(t,n,e).pipe(Object(o.a)(e=>{if((null==e?void 0:e.status)!==l.a.RESPONSE_SUCCESS)return;const t=null==e?void 0:e.data;return this.totalAmount=t,t}))}getBondTotalPurchaseAmountFx(e,t,n,a,c){return this.getBondTotalPurchaseAmount(e,t,n).pipe(Object(i.a)(o=>(this.totalAmount=o,this.transactionBondRestService.getTotalPurchaseAmountFx(t,n,e,a,c))),Object(o.a)(e=>{if((null==e?void 0:e.status)!==l.a.RESPONSE_SUCCESS)return;const t=null==e?void 0:e.data;return this.totalAmountFx=t,t}))}
1getBondTotalSaleAmountFx(e,t,n){var i;return null===(i=this.transactionBondRestService)||void 0===i?void 0:i.getTotalSaleAmountFx(e,t,n).pipe(Object(o.a)(e=>{if((null==e?void 0:e.status)!==l.a.RESPONSE_SUCCESS)return;const t=null==e?void 0:e.data;return this.totalAmountFx=t,t}))}}return e.\u0275fac=function(t){return new(t||e)(a.vc(c.a))},e.\u0275prov=a.hc({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},ORRK:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("TiNC"),i=n("MwlG"),l=n("6h7t"),a=n("fXoL"),c=n("W7Oe"),s=n("kd8c");let r=(()=>{class e{constructor(e,t){this.bondRestService=e,this.bondFactsheetService=t}findBondSelector(e,t){return this.bondRestService.findBondSelector(e,t)}findBondSelectorFilterOption(){return this.bondRestService.findBondSelectorFilterOption()}findBondSelectorAllTableInfo(e){return this.bondRestService.findBondSelectorAllTableInfo(e)}findBondSelectorAllTableInfoWithPagination(e,t){return this.bondRestService.findBondSelectorAllTableInfoWithPagination(e,t)}findIssuedBonds(e){return this.bondRestService.findIssuedBonds(e)}checkBondRmoTradingHours(){return this.bondRestService.checkBondRmoTradingHours()}findBondSelectorAllFilterOption(){return this.bondRestService.findBondSelectorAllFilterOption()}findBondSelectorPresetFilters(){return this.bondRestService.findBondSelectorPresetFilters()}getBondSelectorSavedFilters(){return this.bondRestService.getBondSelectorSavedFilters()}getBondSelectorFilterByFilterName(e){return this.bondRestService.getBondSelectorFilterByFilterName(e)}insertUpdateBondSelectorFilter(e){return this.bondRestService.insertUpdateBondSelectorFilter(e)}removeBondSelectorFilter(e){return this.bondRestService.removeBondSelectorFilter(e)}reduceNameCodeToLabelValue(e,t){const n=null==e?void 0:e.reduce((e,t)=>(e.push({label:t.name,value:t.code,selected:!1,disabled:!1}),e),[]);return t?Object(o.c)({key:"label",value:"ascend"},n):n}reduceStringToLabelValue(e,t){const n=null==e?void 0:e.reduce((e,t)=>(e.push({label:t,value:t,selected:!1,disabled:!1}),e),[]);return t?Object(o.c)({key:"label",value:"ascend"},n):n}setCreditRating(e,t=!1){let n,o=!1,l="";return i.a.HIGH_INVESTMENT_GRADE_LIST.find(t=>{if(this.checkBondRating(t,e))return o=!0,n=i.a.HIGH_INVESTMENT_GRADE,l=t,!0}),o||i.a.INVESTMENT_GRADE_LIST.find(t=>{if(this.checkBondRating(t,e))return o=!0,n=i.a.INVESTMENT_GRADE,l=t,!0}),o||i.a.NON_INVESTMENT_GRADE_LIST.find(t=>{if(this.checkBondRating(t,e))return o=!0,n=i.a.NON_INVESTMENT_GRADE,l=t,!0}),!o&&this.checkBondRating(i.a.WR,e)&&(o=!0,n=i.a.WITHDRAWN_RATING),o||(o=!0,n=i.a.NO_RATING),t?this.getBondRating(l,e):{bondCreditRating:n,rawCreditRating:l}}checkBondRating(e,t){return e===t.crSnpBond||e===t.crFitchBond||e===t.crMarcBond||e===t.crRamBond}getBondRating(e,t){return t.crSnpBond===e?i.a.SNP_RATING:t.crFitchBond===e?i.a.FITCH_RATING:t.crMarcBond===e?i.a.MARC_RATING:t.crRamBond===e?i.a.RAM_RATING:void 0}formatBondListData(e,t){return null==e?void 0:e.map(e=>{var n,o;return Object.assign(Object.assign({},e),{rmoLotType:this.getRmoBondType(e,t),yieldToShow:this.setupYieldToShow(e),creditRating:this.setCreditRating(e).bondCreditRating,creditAgent:this.setCreditRating(e,!0),rawCreditRating:this.setCreditRating(e).rawCreditRating,dateToShow:this.handleDateToShow(e),yrsToMaturityOrCallDate:this.getYearsInDecimal(e),yrsToMaturityOrCallDateDisplay:this.bondFactsheetService.getYearsCompareCurrent(e.callDate||e.maturityDate),minInitialAmt:e.minInitialAmt,issueCode:e.issueCode?e.issueCode:null===(n=e.mvfsmBondSelectorPaginationPkBean)||void 0===n?void 0:n.issueCode,lotType:e.lotType?e.lotType:null===(o=e.mvfsmBondSelectorPaginationPkBean)||void 0===o?void 0:o.lotType})})}setupYieldToShow(e){return null==e?void 0:e.offerNetYield}mapPresetFilterObject(e){var t,n,o,i,l,a,c,s,r,d,u,p,h,b,m,g,f;return{expressTradeModel:null===(t=null==e?void 0:e.expressTrade)||void 0===t?void 0:t.split(","),bondTypeModel:null===(n=null==e?void 0:e.bondType)||void 0===n?void 0:n.split(","),askYieldModel:null===(o=null==e?void 0:e.askYield)||void 0===o?void 0:o.split(","),yearsToMaturityModel:null===(i=null==e?void 0:e.yearsToMaturityNextCall)||void 0===i?void 0:i.split(","),creditRatingModel:null===(l=null==e?void 0:e.bondCreditRating)||void 0===l?void 0:l.split(","),currencyModel:null===(a=null==e?void 0:e.currency)||void 0===a?void 0:a.split(","),featuredBondModel:null===(c=null==e?void 0:e.featuredBond)||void 0===c?void 0:c.split(","),couponFrequencyModel:null===(s=null==e?void 0:e.couponFrequency)||void 0===s?void 0:s.split(","),bondIssuerModel:null===(r=null==e?void 0:e.bondIssuer)||void 0===r?void 0:r.split(","),bondSectorModel:null===(d=null==e?void 0:e.bondSector)||void 0===d?void 0:d.split(","),bondSectorSubModel:null===(u=null==e?void 0:e.bondSectorSub)||void 0===u?void 0:u.split(","),couponModel:null===(p=null==e?void 0:e.coupon)||void 0===p?void 0:p.split(","),sukukModel:null===(h=null==e?void 0:e.shariahCompliant)||void 0===h?void 0:h.split(","),perpetualBondModel:null===(b=null==e?void 0:e.perpetualBond)||void 0===b?void 0:b.split(","),bondExpressModel:null===(m=null==e?void 0:e.bondExpressList)||void 0===m?void 0:m.split(","),retailModel:null===(g=null==e?void 0:e.retailDistribution)||void 0===g?void 0:g.split(","),bondSuitabilityModel:null===(f=null==e?void 0:e.bondSuitability)||void 0===f?void 0:f.split(",")}}mapPresetFilterData(e,t){return(null==e?void 0:e.length)>
10&&e.forEach(e=>{const n=this.mapPresetFilterObject(e);let o="";n&&(t.forEach(e=>{if(n[e.model]){const t=n[e.model]||[];o+=e.title+": ","range"!==e.mode?e.value.forEach(e=>{t.includes(e.value)&&(o+=e.label+", ")}):o+=t.join(", "),"range"!==e.mode&&(o=o.slice(0,-2)),o+="<br>"}}),e.tooltip=o,e.presetFilterObject=n)}),e}getYearsInDecimal(e){if(e.isPerpetual!==l.a.YES_FLAG){const t=e.callDate||e.maturityDate;if(t){const e=new Date(t),n=new Date;let o=12*(e.getFullYear()-n.getFullYear());return o-=n.getMonth(),o+=e.getMonth(),Math.floor(o/12)+o%12/12}}return 0}handleDateToShow(e){return e.callDate?e.callDate:e.maturityDate&&e.isPerpetual!==l.a.YES_FLAG?e.maturityDate:null}getRmoBondType(e,t){return e.bexOddLotEnabled===l.a.YES_FLAG&&t?i.a.ODD_LOT:e.bexFullLotEnabled===l.a.YES_FLAG&&t?i.a.FULL_LOT:e.bmpMyEnabled===l.a.YES_FLAG?i.a.BE:void 0}}return e.\u0275fac=function(t){return new(t||e)(a.vc(c.a),a.vc(s.a))},e.\u0275prov=a.hc({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},Opsf:function(e,t,n){"use strict";n.d(t,"a",(function(){return N}));var o=n("mrSG"),i=n("IzEk"),l=n("bOdf"),a=n("eIep"),c=n("vkgz"),s=n("lJxs"),r=n("6h7t"),d=n("2VHv"),u=n("gFZo"),p=n("AcyG"),h=n("G/fY"),b=n("fXoL"),m=n("W7Oe"),g=n("66kx"),f=n("hRIC"),v=n("Na7k"),y=n("yPVp"),C=n("qAZ0"),M=n("ofXK"),T=n("nJia"),O=n("FwiY");function B(e,t){if(1&e&&(b.rc(0,"span"),b.qd(1),b.qc()),2&e){const e=b.Dc().remarkText;b.Ub(1),b.rd(e)}}function S(e,t){if(1&e&&b.mc(0,"i",13),2&e){const e=b.Dc().tooltipText;b.Mc("nzTooltipTitle",e)}}function x(e,t){if(1&e&&b.mc(0,"i",14),2&e){const e=b.Dc().processingFeeTooltip;b.Mc("nzTooltipTitle",e)}}function P(e,t){if(1&e&&b.mc(0,"i",14),2&e){b.Dc(2);const e=b.ad(24);b.Mc("nzTooltipTitle",e)}}const E=function(e){return{"with-breakdown":e}};function w(e,t){if(1&e&&(b.rc(0,"div",8),b.rc(1,"span",9),b.qd(2),b.od(3,B,2,1,"span",10),b.qc(),b.rc(4,"strong",9),b.qd(5),b.od(6,S,1,1,"i",11),b.od(7,x,1,1,"i",12),b.od(8,P,1,1,"i",12),b.qc(),b.qc()),2&e){const e=t.title,n=t.value,o=t.tooltip,i=t.accruedInterest,l=t.processingFeeTooltip,a=t.remark;b.Mc("ngClass",b.Sc(7,E,t.withBreakdown)),b.Ub(2),b.sd("",e," "),b.Ub(1),b.Mc("ngIf",a),b.Ub(2),b.sd("",n," "),b.Ub(1),b.Mc("ngIf",o),b.Ub(1),b.Mc("ngIf",l),b.Ub(1),b.Mc("ngIf",i)}}function D(e,t){1&e&&b.qd(0," Accrued Interest is calculated based on the settlement date ( T day) of the bond.\n")}function z(e,t){if(1&e&&b.qd(0),2&e){const e=b.Dc();b.sd(" Either FSMOne Rewards Program or promotional sales charge (whichever is lower, where applicable) will be reflected here. ",e.systemSstRate>0?"8% SST, applicable to the Processing Fee.":"","\n")}}const A=function(e){return{title:"Account",value:e}},F=function(){return{title:"Action",value:"SELL"}},q=function(){return{title:"Order Type",value:"Bond Express"}},I=function(e){return{title:"Redemption Method",value:e}},_=function(e){return{title:"Live Bid Price",value:e}},R=function(e){return{title:"Redemption Amount",withBreakdown:!0,value:e,tooltip:!0,tooltipText:"Receivable amount from sell proceeds.",remark:!0,remarkText:"(Bond Currency)"}},k=function(e){return{title:"Principal Amount",value:e}},U=function(e){return{title:"Accrued Interest",value:e,accruedInterest:!0}},L=function(e){return{title:"Processing Fee (Incl. of SST)",value:e,processingFeeTooltip:!0}},V=function(e){return{title:"Redemption Amount",value:e,tooltip:!0,tooltipText:"Receivable amount from sell proceeds.",remark:!0,remarkText:"(Redemption Currency)"}};let N=(()=>{class e{constructor(e,t,n,o,i,l){this.bondRestService=e,this.transactionBondRestService=t,this.bondCalculatorService=n,this.transactionBondExpressService=o,this.subHandlingService=i,this.utilityRestService=l,this.processingFee=0,this.totalPurchaseAmount=0,this.totalPurchaseAmountFx=0,this.accruedInt=0,this.principalAmount=0,this.AUTO_SWEEP=h.a.AUTO_SWEEP,this.systemSstRate=0}ngOnInit(){this.getSystemSstRate(),console.log(this.bondExpressTransactionModel),this.getBondPurchaseData(),this.refreshDataInterval=setInterval(()=>{this.getBondPurchaseData()},1e4)}getSystemSstRate(){this.utilityRestService.getSstRate().pipe(Object(i.a)(1)).subscribe(e=>{e.status===r.a.RESPONSE_SUCCESS?this.systemSstRate=e.data:console.error("[getSystemSstRate] error retrieving system sst rate")})}getBondPurchaseData(){this.isRefreshing=!0,this.subHandlingService.once(this.getBondExpressDetail().pipe(Object(l.a)(()=>{var e,t,n,o,i,l,a,c,s;return this.accruedInt=this.calculateAccruedInterest(null===(e=this.bondExpressTransactionModel)||void 0===e?void 0:e.sellQuantity,null===(t=this.selectedBond)||void 0===t?void 0:t.myAccruedInt),this.principalAmount=(null===(n=this.bondExpressTransactionModel)||void 0===n?void 0:n.sellQuantity)*((null===(o=this.selectedBond)||void 0===o?void 0:o.bidPrice)/100),this.transactionBondExpressService.getBondProcessingFee(null===(i=this.bondExpressTransactionModel)||void 0===i?void 0:i.sellQuantity,null===(l=this.selectedBond)||void 0===l?void 0:l.bondCurrencyCode,null===(a=this.selectedBond)||void 0===a?void 0:a.bondCurrencyCode,null===(c=this.bondExpressTransactionModel)||void 0===c?void 0:c.refno,null===(s=this.selectedBond)||void 0===s?void 0:s.issueCode)}),Object(a.a)(e=>{var t,n,o,i;if(this.processingFee=e,(null===(t=this.bondExpressTransactionModel)||void 0===t?void 0:t.paymentCurrency)!==(null===(n=this.selectedBond)||void 0===n?void 0:n.bondCurrencyCode))return this.transactionBondExpressService.getBondTotalSaleAmountFx(this.principalAmount,null===(o=this.selectedBond)||void 0===o?void 0:o.bondCurrencyCode,null===(i=this.bondExpressTransactionModel)||void 0===i?void 0:i.paymentCurrency);this.isRefreshing=!1,this.totalPurchaseAmount=this.principalAmount+this.accruedInt-this.processingFee}
1),Object(c.a)(()=>{this.isRefreshing=!1,this.totalPurchaseAmountFx=this.transactionBondExpressService.totalAmountFx})))}getBondExpressDetail(){return this.bondRestService.findBondExpressList("FMY").pipe(Object(s.a)(e=>{var t,n;if((null==e?void 0:e.status)!==r.a.RESPONSE_SUCCESS)return;const o=[...null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.bondWholesaleList,...null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.bondRetailList],i=null==o?void 0:o.find(e=>e.issueCode===this.bondExpressTransactionModel.issueCode);this.selectedBond=i}))}ngOnDestroy(){console.log("onPreviewOrderDestroy"),clearInterval(this.refreshDataInterval)}calculateAccruedInterest(e,t){return this.transactionBondExpressService.calculateSellExpressAccruedInt(e,t)}}return e.\u0275fac=function(t){return new(t||e)(b.lc(m.a),b.lc(g.a),b.lc(f.a),b.lc(v.a),b.lc(d.a),b.lc(y.a))},e.\u0275cmp=b.fc({type:e,selectors:[["app-bond-express-sell-preview-order"]],inputs:{bondExpressTransactionModel:"bondExpressTransactionModel",accountNumber:"accountNumber"},features:[b.Tb([d.a])],decls:27,vars:57,consts:[[3,"nzSpinning"],[1,"post-preview-order-wrapper"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"font-weight-bold","text-sm","mb-0"],[1,"break-down"],["detailInfoTemplate",""],["accruedInterestToolTip",""],["processingFeeTooltip",""],[3,"ngClass"],[1,"text-sm"],[4,"ngIf"],["nz-tooltip","","nz-icon","","nzType","info-circle","nzTheme","outline","class","text-info",3,"nzTooltipTitle",4,"ngIf"],["class","pl-1 text-info pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",3,"nzTooltipTitle",4,"ngIf"],["nz-tooltip","","nz-icon","","nzType","info-circle","nzTheme","outline",1,"text-info",3,"nzTooltipTitle"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",1,"pl-1","text-info","pointer",3,"nzTooltipTitle"]],template:function(e,t){if(1&e&&(b.rc(0,"nz-spin",0),b.rc(1,"div",1),b.nc(2,2),b.nc(3,2),b.nc(4,2),b.nc(5,2),b.nc(6,2),b.Ec(7,"number"),b.nc(8,2),b.Ec(9,"number"),b.rc(10,"p",3),b.qd(11,"Breakdown Below:"),b.qc(),b.rc(12,"div",4),b.nc(13,2),b.Ec(14,"number"),b.nc(15,2),b.Ec(16,"number"),b.nc(17,2),b.Ec(18,"number"),b.qc(),b.nc(19,2),b.Ec(20,"number"),b.qc(),b.qc(),b.od(21,w,9,9,"ng-template",null,5,b.pd),b.od(23,D,1,0,"ng-template",null,6,b.pd),b.od(25,z,1,1,"ng-template",null,7,b.pd)),2&e){const e=b.ad(22);b.Mc("nzSpinning",t.isRefreshing),b.Ub(2),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(39,A,t.accountNumber)),b.Ub(1),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Rc(41,F)),b.Ub(1),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Rc(42,q)),b.Ub(1),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(43,I,(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentMode)===t.AUTO_SWEEP?(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)+" Auto-Sweep":"Cash Account "+(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency))),b.Ub(1),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(45,_,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+b.Gc(7,21,null==t.selectedBond?null:t.selectedBond.bidPrice,"1.3-3"))),b.Ub(2),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(47,R,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+b.Gc(9,24,t.totalPurchaseAmount,"1.2-2"))),b.Ub(5),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(49,k,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+b.Gc(14,27,t.principalAmount,"1.2-2"))),b.Ub(2),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(51,U,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+b.Gc(16,30,t.accruedInt,"1.2-2"))),b.Ub(2),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(53,L,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+b.Gc(18,33,t.processingFee,"1.2-2"))),b.Ub(2),b.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",b.Sc(55,V,(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)+" "+b.Gc(20,36,t.totalPurchaseAmountFx?t.totalPurchaseAmountFx:t.totalPurchaseAmount,"1.2-2")))}},directives:[C.a,M.A,M.q,M.t,T.e,O.b],pipes:[M.g],styles:[".post-preview-order-wrapper[_ngcontent-%COMP%]{margin-bottom:8px}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 0;display:flex;justify-content:space-between;border-bottom:1px dashed var(--black-6)}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--black-6)}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{text-align:right}.post-preview-order-wrapper[_ngcontent-%COMP%] .with-breakdown[_ngcontent-%COMP%]{border-bottom:none}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%]{display:block;padding-top:2px}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:2px 0;display:flex;font-size:12px!important;justify-content:space-between}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .text-sm[_ngcontent-%COMP%]{font-size:12px!important}"]}),Object(o.c)([Object(p.e)(u.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},Qdzq:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var o=n("6h7t"),i=n("fXoL"),l=n("tyNb"),a=n("dEAy"),c=n("B+r4"),s=n("FwiY"),r=n("OzZK");let d=(()=>{class e{constructor(e){this.router=e}ngOnInit(){}redirectToRiskProfile(){this.router.navigate([o.o.APP,o.o.ACCOUNT_UPDATE,o.o.RISK_PROFILE])}}return e.\u0275fac=function(t){return new(t||e)(i.lc(l.e))},e.\u0275cmp=i.fc({type:e,selectors:[["app-risk-profile-required-modal"]],inputs:{showForceUpdateModal:"showForceUpdateModal"},decls:14,vars:4,consts:[["nzWrapClassName","vertical-center-modal",3,"nzClosable","nzFooter","nzTitle","nzVisible"],["nzSpan","1"],["nz-icon","","nzTheme","fill","nzType","exclamation-circle",1,"text-danger"],["nzSpan","23"],[1,"pb-3"],["nzOffset","18","nzSpan","6"],["nz-button","","nzType","primary",3,"click"]],template:function(e,t){1&e&&(i.rc(0,"nz-modal",0),i.rc(1,"nz-row"),i.rc(2,"nz-col",1),i.mc(3,"i",2),i.qc(),i.rc(4,"nz-col",3),i.rc(5,"h4"),i.qd(6," Notice"),i.qc(),i.qc(),i.qc(),i.rc(7,"nz-row",4),i.rc(8,"nz-col"),i.qd(9," Please Update Your Risk Profile Before Proceed Transaction. "),i.qc(),i.qc(),i.rc(10,"nz-row"),i.rc(11,"nz-col",5),i.rc(12,"button",6),i.zc("click",(function(){return t.redirectToRiskProfile()}
1)),i.qd(13,"OK"),i.qc(),i.qc(),i.qc(),i.qc()),2&e&&i.Mc("nzClosable",!1)("nzFooter",null)("nzTitle",null)("nzVisible",t.showForceUpdateModal)},directives:[a.a,c.c,c.a,s.b,r.a],encapsulation:2}),e})()},Qi7O:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var o=n("H8v0"),i=n("fXoL"),l=n("AcyG"),a=n("6l6k"),c=n("jsRV"),s=n("ghYb"),r=n("lOXp");let d=(()=>{class e{constructor(e,t,n,o,i){this.store=e,this.accountService=t,this.accountOpeningService=n,this.stockIpoEsaRestService=o,this.bondIpoRestService=i}getAvailableList(){return this.bondIpoRestService.getAvailableBondIpoList()}getBondIpoClientInfo(e){return this.bondIpoRestService.getBondIpoClientInfo(e)}getBondIpoSubscriptionList(e){return this.bondIpoRestService.getBondIpoSubscriptionList(e)}getNetLimit(e,t,n,o,i,l,a){return this.bondIpoRestService.getNetLimit({issueDate:e,maturityDate:t,estCallableDate:n,clientLimitYield:o,processingFeeRate:i,platformFeeRate:l,perpetual:a})}submitBondIpoRegister(e,t){return this.bondIpoRestService.submitBondIpoRegister(e,t)}updateBondIpoRegister(e,t){return this.bondIpoRestService.updateBondIpoRegister(e,t)}cancelBondIpoRegister(e,t){return this.bondIpoRestService.cancelBondIpoRegister(e,t)}updateIpoSubs(e,t){const n=this.store.selectSnapshot(o.a.getPrimaryAccount).refno;return this.stockIpoEsaRestService.updateStockIpoEsa(Object.assign({refno:n},e),t)}getActiveList(){return this.stockIpoEsaRestService.getActiveStockIpoInfoList()}cancelIpoSubs(e,t){const n=this.store.selectSnapshot(o.a.getPrimaryAccount).refno;return this.stockIpoEsaRestService.cancelStockIpoEsa(Object.assign({refno:n},e),t)}getSubsList(){console.log("ipoSubsService.getSubsList() invoked");const e=this.store.selectSnapshot(o.a.getPrimaryAccount).refno;return this.stockIpoEsaRestService.getSubscriptionList(e)}getToBeListedList(){return this.stockIpoEsaRestService.getToBeListedStockIpoList()}getListedList(){return this.stockIpoEsaRestService.getListedStockIpoInfoList()}getUpcomingList(){return this.stockIpoEsaRestService.getUpcomingStockIpoInfoList()}static notSameAsOldQuantityValidator(e){return t=>{const n=t.value;return null==n||isNaN(n)?null:n===e?{quantityNotChanged:{current:n,old:e}}:null}}}return e.\u0275fac=function(t){return new(t||e)(i.vc(l.i),i.vc(a.a),i.vc(c.a),i.vc(s.a),i.vc(r.a))},e.\u0275prov=i.hc({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},RDCe:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));let o=(()=>{class e{}return e.PaymentMode={cheque:{value:"cheque",label:"Cheque / FPX"},"Trust Account":{value:"Trust Account",label:"Cash Account"},"Auto-Sweep":{value:"Auto-Sweep",label:"Auto-Sweep"}},e.OrderType={Market:{value:"Market",label:"Market Order"},Price:{value:"Price",label:"Limit Order"},Firm:{value:"Firm",label:"Bond Express"}},e})()},dGhv:function(e,t,n){"use strict";n.d(t,"a",(function(){return el}));var o=n("mrSG"),i=n("fXoL"),l=n("3Pt+"),a=n("Kj3r"),c=n("vkgz"),s=n("bOdf"),r=n("eIep"),d=n("/uUt"),u=n("JIr8"),p=n("nYR2"),h=n("2VHv"),b=n("H8v0"),m=n("XNiG"),g=n("cp0P"),f=n("LRne"),v=n("AcyG"),y=n("+NfP"),C=n("G/fY"),M=n("ofXK"),T=n("MV2b"),O=n("nhH0"),B=n("6h7t"),S=n("hRIC"),x=n("bMUq"),P=n("j+kT"),E=n("RDCe"),w=n("gFZo"),D=n("nY4S"),z=n("Acs3"),A=n("MwlG"),F=n("mV2b"),q=n("ildK"),I=n("Zk2z"),_=n("8M/t"),R=n("XRmg"),k=n("7Nuv"),U=n("iEbP"),L=n("dEAy");let V=(()=>{class e{constructor(e){this.modal=e}}return e.\u0275fac=function(t){return new(t||e)(i.lc(L.d))},e.\u0275cmp=i.fc({type:e,selectors:[["bond-rmo-nz-modal-custom-component"]],inputs:{description:"description",title:"title"},decls:6,vars:2,consts:[[1,"d-flex","flex-row","mb-2"],["data","../../../../../../assets/images/shared/checked-icon.svg","width","30","height","50",2,"margin-top","3px"],[2,"margin-top","16px","margin-left","12px"]],template:function(e,t){1&e&&(i.rc(0,"div",0),i.mc(1,"object",1),i.rc(2,"h3",2),i.qd(3),i.qc(),i.qc(),i.rc(4,"p"),i.qd(5),i.qc()),2&e&&(i.Ub(3),i.rd(t.title),i.Ub(2),i.rd(t.description))},encapsulation:2}),e})();var N=n("RC/j"),Y=n("P+IN"),j=n("8rM3"),H=n("k+8e"),G=n("HMML"),W=n("OAAr"),Q=n("H2Td"),$=n("W7Oe"),K=n("66kx"),X=n("bNXi"),J=n("IvDN"),Z=n("0lU3"),ee=n("tyNb"),te=n("yPVp"),ne=n("kd8c"),oe=n("6l6k"),ie=n("1W/n"),le=n("URyx"),ae=n("drXJ"),ce=n("1Z1e"),se=n("j2hF"),re=n("B+r4"),de=n("OzZK"),ue=n("FwiY"),pe=n("TUIa"),he=n("5zlO"),be=n("Qdzq"),me=n("/spw"),ge=n("qAZ0"),fe=n("z7QD"),ve=n("F6ss"),ye=n("1HOV"),Ce=n("9WYH"),Me=n("2uUe"),Te=n("eXWG"),Oe=n("qH5C"),Be=n("Opsf"),Se=n("lHsO"),xe=n("jser"),Pe=n("K17+"),Ee=n("X7a2"),we=n("PtUS"),De=n("ocnv"),ze=n("fyyF"),Ae=n("PTRe"),Fe=n("k4tz"),qe=n("PpG7"),Ie=n("vcRD"),_e=n("HtrM"),Re=n("nJia"),ke=n("t7Fq"),Ue=n("u52B"),Le=n("mPOW"),Ve=n("mo+6"),Ne=n("ar4Q"),Ye=n("rMZv"),je=n("45Og"),He=n("p1br"),Ge=n("0p8A");const We=["bondCalculatorV2"],Qe=function(e){return{maxHeight:e,overflowY:"auto",padding:"24px"}};function $e(e,t){if(1&e){const e=i.sc();i.rc(0,"div"),i.rc(1,"nz-modal",55),i.zc("nzOnCancel",(function(){return i.dd(e),i.Dc().closeBondDetails()})),i.rc(2,"nz-spin",56),i.rc(3,"uic-body",57),i.nc(4,58),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc(),t=i.ad(5);i.Ub(1),i.Mc("nzVisible",e.visible)("nzWidth",e.isBuyActive?900:620)("nzFooter",null)("nzCloseIcon",null)("nzBodyStyle",i.Sc(8,Qe,e.getAllOrderpadLoading()?"600px":"calc(100vh - 100px)")),i.Ub(1),i.Mc("nzSpinning",e.getAllOrderpadLoading()),i.Ub(1),i.Mc("c
1omponentStyleOnly",!0),i.Ub(1),i.Mc("ngTemplateOutlet",t)}}function Ke(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"b2c-app-bar-2",65),i.zc("back",(function(){return i.dd(e),i.Dc(3).closeBondDetails()})),i.qc(),i.oc()}2&e&&(i.Ub(1),i.Mc("title","Order Cart"))}function Xe(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"b2c-app-bar-2",65),i.zc("back",(function(){return i.dd(e),i.Dc(3).steps="prePreviewOrder"})),i.qc(),i.oc()}2&e&&(i.Ub(1),i.Mc("title","Order Confirmation"))}const Je=function(e){return{"margin-bottom":e}};function Ze(e,t){if(1&e&&(i.pc(0),i.rc(1,"nz-spin",56),i.rc(2,"div",61),i.pc(3,62),i.od(4,Ke,2,1,"ng-container",63),i.od(5,Xe,2,1,"ng-container",63),i.oc(),i.qc(),i.rc(6,"div",64),i.Ec(7,"async"),i.nc(8,58),i.qc(),i.qc(),i.oc()),2&e){const e=i.Dc(2),t=i.ad(5);i.Ub(1),i.Mc("nzSpinning",e.isLoadingForPass),i.Ub(2),i.Mc("ngSwitch",e.steps),i.Ub(1),i.Mc("ngSwitchCase","prePreviewOrder"),i.Ub(1),i.Mc("ngSwitchCase","postPreviewOrder"),i.Ub(1),i.Mc("ngStyle",i.Sc(8,Je,i.Fc(7,6,e.isMobile$)?"120px":"")),i.Ub(2),i.Mc("ngTemplateOutlet",t)}}function et(e,t){if(1&e&&(i.rc(0,"nz-drawer",59),i.rc(1,"uic-body",57),i.rc(2,"div",60),i.od(3,Ze,9,10,"ng-container",0),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc();i.Mc("nzVisible",e.visible)("nzWrapClassName","mobile-drawer-no-padding")("nzPlacement","bottom"),i.Ub(1),i.Mc("componentStyleOnly",!0),i.Ub(1),i.Mc("ngStyle",e.nzStyle),i.Ub(1),i.Mc("ngIf",e.visible)}}function tt(e,t){if(1&e&&(i.rc(0,"div"),i.nc(1,58),i.qc()),2&e){i.Dc(3);const e=i.ad(51);i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function nt(e,t){if(1&e&&(i.rc(0,"div"),i.nc(1,58),i.qc()),2&e){i.Dc(3);const e=i.ad(49);i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function ot(e,t){if(1&e&&(i.pc(0),i.nc(1,58),i.rc(2,"div",66),i.Ec(3,"async"),i.od(4,tt,2,1,"div",63),i.od(5,nt,2,1,"div",67),i.qc(),i.oc()),2&e){const e=i.Dc(2),t=i.ad(13);i.Ub(1),i.Mc("ngTemplateOutlet",t),i.Ub(1),i.Mc("ngSwitch",e.selectedBondTransactionType)("ngClass",i.Fc(3,4,e.isMobile$)?"pb-12px":"pb-16px"),i.Ub(2),i.Mc("ngSwitchCase","bondExpress")}}function it(e,t){1&e&&(i.rc(0,"h4",72),i.qd(1,"Order Confirmation"),i.qc())}function lt(e,t){1&e&&i.mc(0,"hr")}const at=function(){return{"margin-right":"7px"}};function ct(e,t){if(1&e&&i.mc(0,"app-bond-exchange-tag",74),2&e){const e=i.Dc(4);i.Mc("isFullLotType","beFull"===e.selectedBondTransactionType)("isOddLotType","beOdd"===e.selectedBondTransactionType)("isRetail","Y"===(null==e.selectedBond?null:e.selectedBond.retailDistribution))("nzStyle",i.Rc(4,at))}}function st(e,t){if(1&e&&(i.rc(0,"span"),i.od(1,ct,1,5,"app-bond-exchange-tag",73),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.Mc("ngIf",e.isBondExchange(e.selectedBond))}}function rt(e,t){1&e&&(i.rc(0,"span",75),i.qd(1,"BE"),i.qc())}function dt(e,t){if(1&e&&(i.pc(0),i.od(1,it,2,0,"h4",68),i.Ec(2,"async"),i.od(3,lt,1,0,"hr",0),i.Ec(4,"async"),i.rc(5,"h4",69),i.od(6,st,2,1,"span",0),i.od(7,rt,2,0,"span",70),i.qd(8),i.qc(),i.mc(9,"p",71),i.oc()),2&e){const e=i.Dc(2);i.Ub(1),i.Mc("ngIf",!i.Fc(2,6,e.isMobile$)),i.Ub(2),i.Mc("ngIf",!i.Fc(4,8,e.isMobile$)),i.Ub(3),i.Mc("ngIf",e.isBondExpress&&"bondExpress"!==e.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf",e.bondExpressAvailable&&"bondExpress"==e.selectedBondTransactionType),i.Ub(1),i.sd(" ",null==e.selectedBond?null:e.selectedBond.bondName,""),i.Ub(1),i.Mc("innerHTML",e.selectedBond.bondIssuer?null==e.selectedBond?null:e.selectedBond.bondIssuer:null==e.selectedBond?null:e.selectedBond.issuer,i.ed)}}function ut(e,t){1&e&&i.mc(0,"div")}function pt(e,t){if(1&e&&(i.pc(0),i.od(1,ut,1,0,"div",78),i.oc()),2&e){i.Dc(4);const e=i.ad(15);i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function ht(e,t){1&e&&i.mc(0,"div")}function bt(e,t){if(1&e&&(i.pc(0),i.od(1,ht,1,0,"div",78),i.oc()),2&e){i.Dc(4);const e=i.ad(17);i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function mt(e,t){if(1&e&&(i.rc(0,"div"),i.od(1,pt,2,1,"ng-container",0),i.od(2,bt,2,1,"ng-container",0),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.Mc("ngIf",e.isBuyActive),i.Ub(1),i.Mc("ngIf",!e.isBuyActive)}}function gt(e,t){if(1&e){const e=i.sc();i.rc(0,"div",85),i.zc("click",(function(){return i.dd(e),i.Dc(4).onClickView()})),i.rc(1,"p",86),i.qd(2,"Est. Total Return"),i.qc(),i.rc(3,"div",87),i.rc(4,"p",88),i.qd(5),i.qc(),i.mc(6,"img",89),i.qc(),i.qc()}if(2&e){const e=i.Dc(4);i.Ub(4),i.Mc("ngClass",e.isPositiveReturn?"text-profit":"text-loss"),i.Ub(1),i.rd(e.formEstTotalReturn),i.Ub(1),i.Mc("src",e.imagePath+"bond-orderpad-arrow-right-slide.svg",i.gd)}}function ft(e,t){if(1&e&&(i.rc(0,"div",90),i.rc(1,"p",86),i.qd(2,"Est. Redemption Amount"),i.qc(),i.rc(3,"div",87),i.rc(4,"p",91),i.qd(5),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(4);i.Ub(5),i.rd(e.estRedemptionAmt)}}const vt=function(e,t,n,o,i,l,a,c,s){return{issueCode:e,nominalValue:t,price:n,orderValidity:o,buyType:i,bufferRate:l,fxRate:a,fxCurrency:c,gtdDate:s}};function yt(e,t){if(1&e){const e=i.sc();i.rc(0,"app-bond-calculator-shared-v2",92,93),i.zc("estPayableAmtEmitter",(function(t){return i.dd(e),i.Dc(4).setEstPayableAmt(t)}))("estTotalReturnEmitter",(function(t){return i.dd(e),i.Dc(4).setEstTotalReturn(t)}))("netYieldEmitter",(function(t){return i.dd(e),i.Dc(4).setNetYtm(t)})),i.qc()}if(2&e){const e=i.Dc(4);var n=null;const t=i.Yc(4,vt,[null==e.selectedBond?null:e.selectedBond.issueC
1ode,e.isBuyActive?null==e.bondBuyForm||null==(n=e.bondBuyForm.get("nominalValue"))?null:n.value:e.nominalBondSellValue,e.isBuyActive?e.convertNumber(null==e.bondBuyForm||null==(n=e.bondBuyForm.get("limitOrderPrice"))?null:n.value):null==e.limitOrderPrice?null:e.limitOrderPrice.value,null==e.bondBuyForm||null==(n=e.bondBuyForm.get("orderValidity"))?null:n.value,null==e.bondBuyForm||null==(n=e.bondBuyForm.get("buyType"))?null:n.value,e.bufferRate,(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)===e.paymentCurrencyFromPaymentMethod?null:e.displayFxRate,e.paymentCurrencyFromPaymentMethod,e.tdyDate]);i.Mc("bondCalculatorInput",t)("isOrderpad",!0)("bondType",e.bondType)("isSellOrderpad",!e.isBuyActive)}}function Ct(e,t){if(1&e&&(i.rc(0,"div",79),i.rc(1,"div",80),i.od(2,gt,7,3,"div",81),i.od(3,ft,6,1,"div",82),i.rc(4,"div"),i.nc(5,58),i.qc(),i.rc(6,"div",83),i.od(7,yt,2,14,"app-bond-calculator-shared-v2",84),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(3),t=i.ad(21);i.Ub(2),i.Mc("ngIf",e.isBuyActive),i.Ub(1),i.Mc("ngIf",!e.isBuyActive),i.Ub(2),i.Mc("ngTemplateOutlet",t),i.Ub(2),i.Mc("ngIf",null==e.selectedBond?null:e.selectedBond.issueCode)}}function Mt(e,t){if(1&e&&(i.pc(0),i.od(1,mt,3,2,"div",76),i.od(2,Ct,8,4,"div",77),i.Ec(3,"async"),i.oc()),2&e){const e=i.Dc(2),t=i.ad(19);i.Ub(1),i.Mc("ngIf","bondExpress"==e.selectedBondTransactionType)("ngIfElse",t),i.Ub(1),i.Mc("ngIf",i.Fc(3,3,e.isMobile$)&&e.showPreviewOrder&&"bondExpress"!=e.selectedBondTransactionType)}}function Tt(e,t){1&e&&i.nc(0)}function Ot(e,t){if(1&e&&(i.rc(0,"div"),i.od(1,Tt,1,0,"ng-container",78),i.nc(2,58),i.qc()),2&e){const e=i.Dc(3),t=i.ad(29),n=i.ad(62),o=i.ad(33);i.Ub(1),i.Mc("ngTemplateOutlet",e.isBuyActive?t:n),i.Ub(1),i.Mc("ngTemplateOutlet",o)}}function Bt(e,t){if(1&e){const e=i.sc();i.rc(0,"b2c-floating-bar"),i.rc(1,"button",98),i.zc("click",(function(){return i.dd(e),i.Dc(3).onBack()})),i.qd(2,"Back"),i.qc(),i.rc(3,"button",99),i.zc("click",(function(){return i.dd(e),i.Dc(3).checkOutForm()})),i.qd(4,"I Agree & Check Out"),i.qc(),i.qc()}if(2&e){const e=i.Dc(3);i.Ub(3),i.Mc("nzLoading",e.isLoadingForPass)}}function St(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"div",94),i.od(2,Ot,3,2,"div",76),i.qc(),i.rc(3,"app-web-scaffold"),i.rc(4,"div",95),i.rc(5,"button",96),i.zc("click",(function(){return i.dd(e),i.Dc(2).onBack()})),i.qd(6,"Back"),i.qc(),i.rc(7,"button",97),i.zc("click",(function(){return i.dd(e),i.Dc(2).checkOutForm()})),i.qd(8,"I Agree & Check Out"),i.qc(),i.qc(),i.qc(),i.rc(9,"app-mobile-scaffold"),i.od(10,Bt,5,1,"b2c-floating-bar",0),i.qc(),i.oc()}if(2&e){const e=i.Dc(2),t=i.ad(7);i.Ub(2),i.Mc("ngIf","bondExpress"!==e.selectedBondTransactionType)("ngIfElse",t),i.Ub(5),i.Mc("nzLoading",e.isLoadingForPass),i.Ub(3),i.Mc("ngIf",!e.importantNote&&!e.approvingBuy&&!e.approvingSell)}}function xt(e,t){if(1&e&&(i.pc(0,62),i.od(1,ot,6,6,"ng-container",63),i.od(2,dt,10,10,"ng-container",63),i.oc(),i.pc(3,62),i.od(4,Mt,4,5,"ng-container",63),i.od(5,St,11,4,"ng-container",63),i.oc()),2&e){const e=i.Dc();i.Mc("ngSwitch",e.steps),i.Ub(1),i.Mc("ngSwitchCase","prePreviewOrder"),i.Ub(1),i.Mc("ngSwitchCase","postPreviewOrder"),i.Ub(1),i.Mc("ngSwitch",e.steps),i.Ub(1),i.Mc("ngSwitchCase","prePreviewOrder"),i.Ub(1),i.Mc("ngSwitchCase","postPreviewOrder")}}function Pt(e,t){1&e&&i.nc(0)}function Et(e,t){if(1&e&&i.od(0,Pt,1,0,"ng-container",78),2&e){const e=i.Dc(),t=i.ad(9),n=i.ad(11);i.Mc("ngTemplateOutlet",e.isBuyActive?t:n)}}function wt(e,t){if(1&e&&i.mc(0,"app-bond-express-buy-preview-order",101),2&e){const e=i.Dc(2);i.Mc("bondCalculatorData",e.bondCalculatorData)("bondExpressTransactionModel",e.bondExpressTransactionModel)("estTotalAmtPayable",e.beEstTotalAmtPayable)("bufferRate",e.beBufferRate)("netYtm",e.netYield)("netYieldType",e.netYieldType)}}function Dt(e,t){if(1&e&&(i.od(0,wt,1,6,"app-bond-express-buy-preview-order",100),i.nc(1,58)),2&e){const e=i.Dc(),t=i.ad(33);i.Mc("ngIf",e.visible),i.Ub(1),i.Mc("ngTemplateOutlet",t)}}function zt(e,t){if(1&e&&(i.mc(0,"app-bond-express-sell-preview-order",102),i.nc(1,58)),2&e){const e=i.Dc(),t=i.ad(33);i.Mc("accountNumber",null==e.selectedAcctModel?null:e.selectedAcctModel.refno)("bondExpressTransactionModel",e.bondExpressSellTransactionModel),i.Ub(1),i.Mc("ngTemplateOutlet",t)}}const At=function(e,t,n,o){return{"bg-black":e,"text-white":t,"bg-lighter":n,hidden:o}};function Ft(e,t){if(1&e){const e=i.sc();i.rc(0,"div",106),i.zc("click",(function(){i.dd(e);
1const n=t.$implicit;return i.Dc(2).onTabChange(null==n?null:n.value)})),i.rc(1,"span",107),i.qd(2),i.qc(),i.qc()}if(2&e){const e=t.$implicit;i.Mc("ngClass",i.Vc(2,At,e.active,e.active,!e.active,!e.show)),i.Ub(2),i.sd(" ",e.label," ")}}function qt(e,t){if(1&e){const e=i.sc();i.rc(0,"div",103),i.rc(1,"div",83),i.od(2,Ft,3,7,"div",104),i.qc(),i.rc(3,"uic-round-button",105),i.zc("click",(function(){return i.dd(e),i.Dc().closeBondDetails()})),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Ub(2),i.Mc("ngForOf",e.bondTransactionOptions),i.Ub(1),i.Mc("nzIcon","icon-close-o close-icon-size")}}function It(e,t){if(1&e){const e=i.sc();i.rc(0,"app-bond-express-buy-form",109),i.zc("cancel",(function(){return i.dd(e),i.Dc(2).closeBondDetails()}))("beShortFallAmtOutput",(function(){return i.dd(e),i.Dc(2).beShortFallAmt}))("previewOrder",(function(t){return i.dd(e),i.Dc(2).onBondExpressBuyPreviewOrder(t.bondExpressTransactionModel,t.fromBondExpress,t.beEstTotalAmtPayable,t.beBufferRate)}))("netYieldEmitter",(function(t){return i.dd(e),i.Dc(2).setNetYtm(t)})),i.qc()}if(2&e){const e=i.Dc(2),t=i.ad(60);i.Mc("selectedBond",e.selectedBond)("platformFee",null==e.bondCalculatorData?null:e.bondCalculatorData.platformFee)("defaultRefno",e.bondBuyForm.get("refno").value)("bondCalculatorData",e.bondCalculatorData)("allBondMarkupRate",e.allBondMarkupRate)("offerYldToWorst",null!=e.selectedBond&&e.selectedBond.offerYldToWorst?null==e.selectedBond?null:e.selectedBond.offerYldToWorst:null)("nextCallDate",null==e.bondCalculatorData?null:e.bondCalculatorData.callDate)("buySellToggleTemplate",t)("bondExpressTransactionModel",e.bondExpressTransactionModel)}}function _t(e,t){if(1&e&&i.od(0,It,1,9,"app-bond-express-buy-form",108),2&e){const e=i.Dc();i.Mc("ngIf",e.visible)}}function Rt(e,t){if(1&e){const e=i.sc();i.rc(0,"app-rmo-bond-express-sell-form",111),i.zc("previewOrder",(function(t){return i.dd(e),i.Dc(2).onBondExpressSellPreviewOrder(t.bondExpressTransactionModel,t.fromBondExpress)}))("cancel",(function(){return i.dd(e),i.Dc(2).closeBondDetails()})),i.qc()}if(2&e){const e=i.Dc(2),t=i.ad(60);i.Mc("selectedBondHolding",e.selectedbondHolding)("selectedBond",e.selectedBond)("buySellToggleTemplate",t)("bondExpressTransactionModel",e.bondExpressSellTransactionModel)}}function kt(e,t){if(1&e&&i.od(0,Rt,1,4,"app-rmo-bond-express-sell-form",110),2&e){const e=i.Dc();i.Mc("ngIf",e.visible)}}function Ut(e,t){if(1&e){const e=i.sc();i.rc(0,"app-bond-calculator-shared-v2",92),i.zc("estPayableAmtEmitter",(function(t){return i.dd(e),i.Dc(3).setEstPayableAmt(t)}))("estTotalReturnEmitter",(function(t){return i.dd(e),i.Dc(3).setEstTotalReturn(t)}))("netYieldEmitter",(function(t){return i.dd(e),i.Dc(3).setNetYtm(t)})),i.qc()}if(2&e){const e=i.Dc(3);var n=null;const t=i.Yc(4,vt,[null==e.selectedBond?null:e.selectedBond.issueCode,e.isBuyActive?null==e.bondBuyForm||null==(n=e.bondBuyForm.get("nominalValue"))?null:n.value:e.nominalBondSellValue,e.isBuyActive?e.convertNumber(null==e.bondBuyForm||null==(n=e.bondBuyForm.get("limitOrderPrice"))?null:n.value):null==e.limitOrderPrice?null:e.limitOrderPrice.value,null==e.bondBuyForm||null==(n=e.bondBuyForm.get("orderValidity"))?null:n.value,null==e.bondBuyForm||null==(n=e.bondBuyForm.get("buyType"))?null:n.value,e.bufferRate,(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)===e.paymentCurrencyFromPaymentMethod?null:e.displayFxRate,e.paymentCurrencyFromPaymentMethod,e.tdyDate]);i.Mc("bondCalculatorInput",t)("isOrderpad",!0)("bondType",e.bondType)("isSellOrderpad",!e.isBuyActive)}}function Lt(e,t){1&e&&i.nc(0)}function Vt(e,t){if(1&e&&(i.pc(0),i.od(1,Lt,1,0,"ng-container",78),i.oc()),2&e){i.Dc(3);const e=i.ad(60);i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function Nt(e,t){if(1&e&&i.mc(0,"ui-form-card",117),2&e){i.Dc(3);const e=i.ad(27);i.Mc("formCardBody",e)}}function Yt(e,t){if(1&e&&i.mc(0,"ui-form-card",117),2&e){i.Dc(3);const e=i.ad(64);i.Mc("formCardBody",e)}}function jt(e,t){if(1&e&&(i.rc(0,"div",113),i.rc(1,"div",114),i.Ec(2,"async"),i.od(3,Ut,1,14,"app-bond-calculator-shared-v2",84),i.qc(),i.rc(4,"div",115),i.Ec(5,"async"),i.nc(6,58),i.od(7,Vt,2,1,"ng-container",0),i.od(8,Nt,1,1,"ui-form-card",116),i.od(9,Yt,1,1,"ui-form-card",116),i.mc(10,"div",58),i.qc(),i.qc()),2&e){const e=i.Dc(2),t=i.ad(25),n=i.ad(23);
1i.Ub(1),i.Mc("nzSpan",i.Fc(2,9,e.isMobile$)?12:10)("hidden",!e.isBuyActive),i.Ub(2),i.Mc("ngIf",null==e.selectedBond?null:e.selectedBond.issueCode),i.Ub(1),i.Mc("nzSpan",i.Fc(5,11,e.isMobile$)?12:e.isBuyActive?14:24),i.Ub(2),i.Mc("ngTemplateOutlet",t),i.Ub(1),i.Mc("ngIf",!e.isUpdate),i.Ub(1),i.Mc("ngIf",e.bondBuyForm&&e.isBuyActive),i.Ub(1),i.Mc("ngIf",e.bondSellForm&&e.isSellActive),i.Ub(1),i.Mc("ngTemplateOutlet",n)}}function Ht(e,t){1&e&&i.nc(0)}function Gt(e,t){if(1&e&&i.mc(0,"ui-form-card",117),2&e){i.Dc(3);const e=i.ad(27);i.Mc("formCardBody",e)}}function Wt(e,t){if(1&e&&i.mc(0,"ui-form-card",117),2&e){i.Dc(3);const e=i.ad(64);i.Mc("formCardBody",e)}}function Qt(e,t){if(1&e&&(i.rc(0,"div"),i.nc(1,58),i.od(2,Ht,1,0,"ng-container",78),i.od(3,Gt,1,1,"ui-form-card",116),i.od(4,Wt,1,1,"ui-form-card",116),i.qc()),2&e){const e=i.Dc(2),t=i.ad(25),n=i.ad(60);i.Ub(1),i.Mc("ngTemplateOutlet",t),i.Ub(1),i.Mc("ngTemplateOutlet",n),i.Ub(1),i.Mc("ngIf",e.bondBuyForm&&e.isBuyActive),i.Ub(1),i.Mc("ngIf",e.bondSellForm&&e.isSellActive)}}function $t(e,t){if(1&e&&(i.od(0,jt,11,13,"div",112),i.Ec(1,"async"),i.od(2,Qt,5,4,"div",0),i.Ec(3,"async")),2&e){const e=i.Dc();i.Mc("ngIf",!i.Fc(1,2,e.isMobile$)),i.Ub(2),i.Mc("ngIf",i.Fc(3,4,e.isMobile$))}}function Kt(e,t){if(1&e){const e=i.sc();i.rc(0,"uic-button",120),i.zc("click",(function(){return i.dd(e),i.Dc(2).checkFormValidity(!1)})),i.rc(1,"span"),i.qd(2),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);i.Mc("nzType",e.isSellActive?"sell":"buy")("nzRound",!0)("nzBlock",!0)("disabled",e.disabledSell||(e.isSellActive?null==e.bondSellForm?null:e.bondSellForm.invalid:(null==e.bondBuyForm?null:e.bondBuyForm.invalid)||!e.estTotalInvAmtPayable)||e.isLoadingAutoSweepFxRate||e.isLoadingPreviewOrder||e.isLoadingPreOrderFS)("nzLoading",e.isLoadingAutoSweepFxRate||e.isLoadingPreviewOrder||e.isLoadingPreOrderFS),i.Ub(2),i.rd(e.isSellActive?"Sell Preview":"Buy Preview")}}function Xt(e,t){if(1&e){const e=i.sc();i.rc(0,"uic-button",121),i.zc("click",(function(){return i.dd(e),i.Dc(2).checkForModify()})),i.rc(1,"span"),i.qd(2,"Modify Order"),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);i.Mc("nzRound",!0)("nzBlock",!0)("disabled",e.disabledSell)("nzLoading",e.isLoadingPreviewOrder||e.isLoadingPreOrderFS)}}function Jt(e,t){if(1&e&&(i.rc(0,"div",90),i.od(1,Kt,3,6,"uic-button",118),i.qc(),i.od(2,Xt,3,4,"uic-button",119)),2&e){const e=i.Dc();i.Ub(1),i.Mc("ngIf",!e.isUpdate),i.Ub(1),i.Mc("ngIf",e.isUpdate)}}function Zt(e,t){if(1&e&&(i.rc(0,"div",125),i.mc(1,"i",126),i.qd(2),i.qc()),2&e){const e=i.Dc(2);i.Ub(2),i.sd(" ",e.bondBuyForm.getError("invalidBuy")," ")}}function en(e,t){if(1&e){const e=i.sc();i.rc(0,"uic-button",120),i.zc("click",(function(){return i.dd(e),i.Dc(2).checkFormValidity(!1)})),i.rc(1,"span"),i.qd(2),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);i.Mc("nzType",e.isSellActive?"sell":"buy")("nzRound",!0)("nzBlock",!0)("disabled",e.disabledSell||e.isLoadingAutoSweepFxRate||e.isLoadingPreviewOrder||e.isLoadingPreOrderFS||!e.isSellActive&&!e.estTotalInvAmtPayable)("nzLoading",e.isLoadingAutoSweepFxRate||e.isLoadingPreviewOrder||e.isLoadingPreOrderFS),i.Ub(2),i.rd(e.isSellActive?"Sell Preview":"Buy Preview")}}function tn(e,t){if(1&e){const e=i.sc();i.rc(0,"uic-button",121),i.zc("click",(function(){return i.dd(e),i.Dc(2).checkForModify()})),i.rc(1,"span"),i.qd(2,"Modify Order"),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);i.Mc("nzRound",!0)("nzBlock",!0)("disabled",e.disabledSell||e.isLoadingPreviewOrder||e.isLoadingPreOrderFS)("nzLoading",e.isLoadingPreviewOrder||e.isLoadingPreOrderFS)}}function nn(e,t){if(1&e&&(i.od(0,Zt,3,1,"div",122),i.rc(1,"div",123),i.rc(2,"div",124),i.od(3,en,3,6,"uic-button",118),i.od(4,tn,3,4,"uic-button",119),i.qc(),i.qc()),2&e){const e=i.Dc();i.Mc("ngIf",e.bondBuyForm.hasError("invalidBuy")),i.Ub(2),i.Mc("nzSpan",24),i.Ub(1),i.Mc("ngIf",!e.isUpdate),i.Ub(1),i.Mc("ngIf",e.isUpdate)}}const on=function(e){return{"border-profit-color":e}},ln=function(e){return{"border-loss-color":e}};function an(e,t){if(1&e&&(i.rc(0,"div",128),i.rc(1,"div",83),i.rc(2,"div",129),i.rc(3,"div",130),i.qd(4,"Indicative Ask Price/Yield"),i.qc(),i.rc(5,"span",131),i.qd(6),i.Ec(7,"number"),i.qc(),i.rc(8,"div",132),i.rc(9,"span"),i.qd(10),i.Ec(11,"number"),i.qc(),i.qc(),i.qc(),i.qc(),i.rc(12,"div",83),i.rc(13,"div",133),i.rc(14,"div",130),i.qd(15,"Indicative Bid Price/Yield"),i.qc(),i.rc(16,"span",131),i.qd(17
1),i.Ec(18,"number"),i.qc(),i.rc(19,"div",132),i.rc(20,"span"),i.qd(21),i.Ec(22,"number"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(2),i.Mc("ngClass",i.Sc(18,on,e.isBuyActive)),i.Ub(4),i.sd(" ",null!=e.subscribedBond&&e.subscribedBond.askPrice&&0!==(null==e.subscribedBond?null:e.subscribedBond.askPrice)?i.Gc(7,6,null==e.subscribedBond?null:e.subscribedBond.askPrice,"1.3-3"):"-"," "),i.Ub(4),i.rd(e.netAskYield&&0!==e.netAskYield?i.Gc(11,9,e.netAskYield,"1.3-3")+"%":"-"),i.Ub(3),i.Mc("ngClass",i.Sc(20,ln,!e.isBuyActive)),i.Ub(4),i.sd(" ",null!=e.subscribedBond&&e.subscribedBond.bidPrice&&0!==(null==e.subscribedBond?null:e.subscribedBond.bidPrice)?i.Gc(18,12,null==e.subscribedBond?null:e.subscribedBond.bidPrice,"1.3-3"):"-"," "),i.Ub(4),i.rd(null!=e.subscribedBond&&e.subscribedBond.bidYield&&0!==(null==e.subscribedBond?null:e.subscribedBond.bidYield)?i.Gc(22,15,null==e.subscribedBond?null:e.subscribedBond.bidYield,".2")+"%":"-")}}function cn(e,t){if(1&e&&(i.rc(0,"span",135),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.td("",i.Gc(2,2,null==e.subscribedBond?null:e.subscribedBond.bid1,"1.3-3")," / ",i.Gc(3,5,null==e.subscribedBond?null:e.subscribedBond.bidYield1,"1.3-3"),"%")}}function sn(e,t){if(1&e&&(i.rc(0,"span",135),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.td("",i.Gc(2,2,null==e.subscribedBond?null:e.subscribedBond.bid2,"1.3-3")," / ",i.Gc(3,5,null==e.subscribedBond?null:e.subscribedBond.bidYield2,"1.3-3"),"%")}}function rn(e,t){if(1&e&&(i.rc(0,"span",135),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.td("",i.Gc(2,2,null==e.subscribedBond?null:e.subscribedBond.bid3,"1.3-3")," / ",i.Gc(3,5,null==e.subscribedBond?null:e.subscribedBond.bidYield3,"1.3-3"),"%")}}function dn(e,t){if(1&e&&(i.rc(0,"span",136),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.td("",i.Gc(2,2,null==e.subscribedBond?null:e.subscribedBond.ask1,"1.3-3")," / ",i.Gc(3,5,null==e.subscribedBond?null:e.subscribedBond.askYield1,"1.3-3"),"%")}}function un(e,t){if(1&e&&(i.rc(0,"span",136),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.td("",i.Gc(2,2,null==e.subscribedBond?null:e.subscribedBond.ask2,"1.3-3")," / ",i.Gc(3,5,null==e.subscribedBond?null:e.subscribedBond.askYield2,"1.3-3"),"%")}}function pn(e,t){if(1&e&&(i.rc(0,"span",136),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.td("",i.Gc(2,2,null==e.subscribedBond?null:e.subscribedBond.ask3,"1.3-3")," / ",i.Gc(3,5,null==e.subscribedBond?null:e.subscribedBond.askYield3,"1.3-3"),"%")}}function hn(e,t){if(1&e&&(i.pc(0),i.rc(1,"div"),i.rc(2,"h6",134),i.rc(3,"span",135),i.qd(4,"BID / YIELD (%)"),i.qc(),i.rc(5,"span",136),i.qd(6,"ASK / YIELD (%)"),i.qc(),i.qc(),i.qc(),i.mc(7,"div",137),i.rc(8,"div",138),i.rc(9,"div",139),i.Ec(10,"async"),i.rc(11,"div"),i.rc(12,"div",140),i.od(13,cn,4,8,"span",141),i.rc(14,"span",142),i.qd(15),i.qc(),i.qc(),i.rc(16,"div",140),i.od(17,sn,4,8,"span",141),i.rc(18,"span",142),i.qd(19),i.qc(),i.qc(),i.rc(20,"div",140),i.od(21,rn,4,8,"span",141),i.rc(22,"span",142),i.qd(23),i.qc(),i.qc(),i.qc(),i.qc(),i.rc(24,"div",139),i.Ec(25,"async"),i.rc(26,"div"),i.rc(27,"div",143),i.od(28,dn,4,8,"span",144),i.rc(29,"span",145),i.qd(30),i.qc(),i.qc(),i.rc(31,"div",143),i.od(32,un,4,8,"span",144),i.rc(33,"span",145),i.qd(34),i.qc(),i.qc(),i.rc(35,"div",143),i.od(36,pn,4,8,"span",144),i.rc(37,"span",145),i.qd(38),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.oc()),2&e){const e=i.Dc(2),t=i.ad(74),n=i.ad(72);i.Ub(7),i.nd("--bid-percent",(null!=e.subscribedBond&&e.subscribedBond.totalVolume?(null==e.subscribedBond?null:e.subscribedBond.totalBidVolume)/(null==e.subscribedBond?null:e.subscribedBond.totalVolume)*100:50)+"%")("--ask-percent",(null!=e.subscribedBond&&e.subscribedBond.totalVolume?(null==e.subscribedBond?null:e.subscribedBond.totalBidVolume)/(null==e.subscribedBond?null:e.subscribedBond.totalVolume)*100:50)+"%"),i.Ub(2),i.Mc("nzSpan",12)("ngClass",(i.Fc(10,38,e.isMobile$),"bid-yield")),i.Ub(3),i.nd("--fill-percent",(null==e.subscribedBond?null:e.subscribedBond.bidVolume1)/(null==e.subscribedBond?null:e.subscribedBond.topVolume)*100+"%"),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.bid1)&&(null==e.subscribedBond?null:e.subscribedBond.bidYield1))("ngIfElse",t),i.Ub(2),i.rd(e.addThousandToKSeperator(null==e.subscribedBond?null:e.subscribedBond.bidVolume1)),i.Ub(1),i.nd("--fill-percent",(null==e.subscribedBond?null:e.subscribedBond.bidVolume2)/(null==e.subscribedBond?null:e.subscribedBond.topVolume)*100+"%"),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.bid2)&&(null==e.subscribedBond?null:e.subscribedBond.bidYield2))("ngIfElse",t),i.Ub(2),i.rd(e.addThousandToKSeperator(null==e.subscribedBond?null:e.subscribedBond.bidVolume2)),i.Ub(1),i.nd("--fill-percent",(null==e.subscribedBond?null:e.subscribedBond.bidVolume3)/(null==e.subscribedBond?null:e.subscribedBond.topVolume)*100+"%"),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.bid3)&&(null==e.subscribedBond?null:e.subscribedBond.bidYield3))("ngIfElse",t),i.Ub(2),i.rd(e.addThousandToKSeperator(null==e.subscribedBond?null:e.subscribedBond.bidVolume3)),i.Ub(1),i.Mc("nzSpan",12)("ngClass",(i.Fc(25,40,e.isMobile$),"ask-yield")),i.Ub(3),i.nd("--fill-percent",(null==e.subscribedBond?null:e.subscribedBond.askVolume1)/(null==e.subscribedBond?null:e.subscribedBond.topVolume)*100+"%"),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.ask1)&&(null==e.subscribedBond?null:e.subscribedBond.askYield1))("ngIfElse",n),i.Ub(2),i.rd(e.addThousandToKSeperator(null==e.subscribedBond?null:e.subscribedBond.askVolume1)),i.Ub(1),i.nd("--fill-percent",(null==e.subscribedBond?null:e.subscribedBond.askVolume2)/(null==e.subscribedBond?null:e.subscribedBond.topVolume)*100+"%"),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.ask2)&&(null==e.subscribedBond?null:e.subscribedBond.askYield2))("ngIfElse",n),i.Ub(2),i.rd(e.addThousandToKSeperator(null==e.subscribedBond?null:e.subscribedBond.askVolume2)),i.Ub(1),i.nd("--fill-percent",(null==e.subscribedBond?null:e.subscribedBond.askVolume3)/(null==e.subscribedBond?null:e.subscribedBond.topVolume)*100+"%"),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.ask3)&&(null==e.subscribedBond?null:e.subscribedBond.askYield3))("ngIfElse",n),i.Ub(2),i.rd(e.addThousandToKSeperator(null==e.subscribedBond?null:e.subscribedBond.askVolume3))}}function bn(e,t){if(1&e&&(i.od(0,an,23,22,"div",127),i.od(1,hn,39,42,"ng-container",0)),2&e){const e=i.Dc();i.Mc("ngIf","bondOTC"===e.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf","bondOTC"!==e.selectedBondTransactionType)}}function mn(e,t){if(1&e&&i.mc(0,"ui-option",163),2&e){const e=t.$implicit;i.Mc("nzLabel",e.accountTypeDisplay)("nzValue",e.refno)}}function gn(e,t){if(1&e){const e=i.sc();i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3,"Account"),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",161),i.zc("ngModelChange",(function(){return i.dd(e),i.Dc(2).acctRefnoChange(!0)})),i.Ec(7,"async"),i.Ec(8,"async"),i.od(9,mn,1,2,"ui-option",162),i.Ec(10,"async"),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);var n;const t=(null==(n=i.Fc(7,6,e.authenticatedDisplay$))?null:n.length)>1&&!e.modifyView;var o=null;const a=null!=(o=e.bondBuyForm.get("refno"))&&o.dirty&&null!=(o=e.bondBuyForm.get("refno"))&&o.hasError("required")?"error-bg":"background-grey";var l;const c=(null==(l=i.Fc(8,8,e.authenticatedDisplay$))?null:l.length)<=1||e.modifyView;i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzShowArrow",t)("ngClass",a)("nzDisabled",c),i.Ub(3),i.Mc("ngForOf",i.Fc(10,10,e.authenticatedDisplay$))}}function fn(e,t){1&e&&(i.rc(0,"div",164),i.rc(1,"div"),i.qd(2," Please choose an account. "),i.qc(),i.qc())}function vn(e,t){if(1&e&&(i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3,"Order Type"),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",165),i.mc(7,"ui-option",163),i.mc(8,"ui-option",163),i.qc(),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(3),i.Mc("nzLabel",e.buyOrderType.Market.label)("nzValue",e.buyOrderType.Market),i.Ub(1),i.Mc("nzLabel",e.buyOrderType.Price.label)("nzValue",e.buyOrderType.Price)}}function yn(e,t){if(1&e&&(i.rc(0,"div",166),i.mc(1,"uic-list-item",167),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Nc("value",null==e.buyLimitOrderPrice?null:e.buyLimitOrderPrice.value),i.Mc("info",e.getBuyOrderPlaceHolder())("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function Cn(e,t){if(1&e){const e=i.sc();i.rc(0,"div",170),i.rc(1,"uic-icon",171),i.zc("click",(function(){return i.dd(e),i.Dc(3).onMinusPrice()})),i.qc(),i.rc(2,"uic-icon",172),i.zc("click",(function(){return i.dd(e),i.Dc(3).onAddPrice()})),i.qc(),i.qc()}2&e&&(i.Ub(2),i.Mc("ngClass","ml-12px"))}function Mn(e,t){if(1&e&&(i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-input-wrapper"),i.rc(6,"nz-input-group",155),i.mc(7,"input",168),i.qc(),i.qc(),i.od(8,Cn,3,1,"ng-template",null,169,i.pd),i.qc(),i.qc()),2&e){const e=i.ad(9),t=i.Dc(2);var n=null;const l=null!=(n=t.bondBuyForm.get("limitOrderPrice"))&&n.dirty&&null!=(n=t.bondBuyForm.get("limitOrderPrice"))&&n.hasError("required")?"error-bg":"background-grey";var o=null;const a=null!=(o=t.bondBuyForm.get("limitOrderPrice"))&&o.dirty&&null!=(o=t.bondBuyForm.get("limitOrderPrice"))&&o.hasError("required")?"error-bg":"background-grey";i.Ub(1),i.Mc("nzSpan",5),i.Ub(2),i.rd(t.getBuyOrderPlaceHolder()),i.Ub(1),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzSuffix",t.diasbleBuyLimitPrice?null:e)("ngClass",l),i.Ub(1),i.Nc("placeholder",t.getBuyOrderPlaceHolder()),i.Mc("ngClass",a)("disabled",t.diasbleBuyLimitPrice)}}function Tn(e,t){1&e&&(i.rc(0,"div",164),i.rc(1,"div"),i.qd(2," Please make sure this field is not blank. "),i.qc(),i.qc())}function On(e,t){if(1&e){const e=i.sc();i.rc(0,"div",170),i.rc(1,"uic-icon",171),i.zc("click",(function(){return i.dd(e),i.Dc(2).onMinusNominalValue()})),i.qc(),i.rc(2,"uic-icon",172),i.zc("click",(function(){return i.dd(e),i.Dc(2).onAddNominalValue()})),i.qc(),i.qc()}2&e&&(i.Ub(2),i.Mc("ngClass","ml-12px"))}function Bn(e,t){1&e&&(i.rc(0,"div"),i.qd(1," Amendment to increase nominal value is not allowed. "),i.qc())}function Sn(e,t){1&e&&(i.rc(0,"div"),i.qd(1," Please make sure this field is not blank. "),i.qc())}function xn(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Minimum nominal value is ",i.Fc(2,1,e.checkedminInitialAmt)," ")}}function Pn(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Minimum nominal incremental is ",i.Fc(2,1,e.checkedminSubInvestmentAmt)," ")}}function En(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" The purchase quantity should be in lot size of incremental: ",i.Gc(2,1,e.checkedminSubInvestmentAmt,".0-0")," ")}}function wn(e,t){if(1&e&&(i.rc(0,"div",164),i.od(1,Bn,2,0,"div",0),i.od(2,Sn,2,0,"div",0),i.od(3,xn,3,3,"div",0),i.od(4,Pn,3,3,"div",0),i.od(5,En,3,4,"div",0),i.q
1c()),2&e){const e=i.Dc(2);var n=null;const t=(null==(n=e.bondBuyForm.get("nominalValue"))?null:n.dirty)&&(null==(n=e.bondBuyForm.get("nominalValue"))?null:n.hasError("noIncreaseInModify"));var o=null;const s=(null==(o=e.bondBuyForm.get("nominalValue"))?null:o.dirty)&&(null==(o=e.bondBuyForm.get("nominalValue"))?null:o.hasError("required"));var l=null;const r=(null==(l=e.bondBuyForm.get("nominalValue"))?null:l.dirty)&&(null==(l=e.bondBuyForm.get("nominalValue"))?null:l.hasError("min"));var a=null;const d=(null==(a=e.bondBuyForm.get("nominalValue"))?null:a.dirty)&&(null==(a=e.bondBuyForm.get("nominalValue"))?null:a.hasError("minIncrement"));var c=null;const u=(null==(c=e.bondBuyForm.get("nominalValue"))?null:c.dirty)&&(null==(c=e.bondBuyForm.get("nominalValue"))?null:c.hasError("subAmtValidator"));i.Ub(1),i.Mc("ngIf",t),i.Ub(1),i.Mc("ngIf",s),i.Ub(1),i.Mc("ngIf",r),i.Ub(1),i.Mc("ngIf",d),i.Ub(1),i.Mc("ngIf",u)}}function Dn(e,t){if(1&e&&i.mc(0,"ui-option",163),2&e){const e=t.$implicit;i.Mc("nzLabel",e.label)("nzValue",e.value)}}function zn(e,t){if(1&e){const e=i.sc();i.rc(0,"uic-select-wrapper"),i.rc(1,"ui-select",173),i.zc("ngModelChange",(function(){return i.dd(e),i.Dc(3).resetBuyType()})),i.od(2,Dn,1,2,"ui-option",162),i.qc(),i.qc()}if(2&e){const e=i.Dc(3);i.Ub(1),i.Mc("nzShowArrow",!e.isUpdate)("nzDisabled",e.isUpdate),i.Ub(1),i.Mc("ngForOf",e.orderValidityList)}}function An(e,t){if(1&e&&(i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3,"Order Validity"),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.od(5,zn,3,3,"uic-select-wrapper",0),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(1),i.Mc("ngIf",e.showBondExpressBuyColumn)}}function Fn(e,t){1&e&&i.nc(0)}function qn(e,t){if(1&e){const e=i.sc();i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3," Good-Till-Date "),i.rc(4,"i",174),i.zc("click",(function(){return i.dd(e),i.Dc(2).handleGtdVisible()})),i.qc(),i.qc(),i.qc(),i.rc(5,"nz-col",154),i.od(6,Fn,1,0,"ng-container",78),i.qc(),i.qc()}if(2&e){i.Dc(2);const e=i.ad(70);i.Ub(1),i.Mc("nzSpan",5),i.Ub(4),i.Mc("nzSpan",18),i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function In(e,t){if(1&e&&i.mc(0,"ui-option",177),2&e){const e=t.$implicit;i.Mc("nzValue",e)("nzLabel",e.label)}}function _n(e,t){if(1&e&&(i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3," Payment Method "),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",175),i.od(7,In,1,2,"ui-option",176),i.qc(),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(2);var n=null;const t=null!=(n=e.bondBuyForm.get("paymentMethod"))&&n.dirty&&null!=(n=e.bondBuyForm.get("paymentMethod"))&&n.hasError("required")?"error-bg":"background-grey";i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzLoading",e.isLoadingTrustAndAutoSweepAcct)("nzShowArrow",(null==e.paymentMethodList?null:e.paymentMethodList.length)>1)("ngClass",t),i.Ub(1),i.Mc("ngForOf",e.paymentMethodList)}}function Rn(e,t){1&e&&(i.rc(0,"div",164),i.rc(1,"div"),i.qd(2," Please make sure this field is not blank. "),i.qc(),i.qc())}function kn(e,t){if(1&e&&i.mc(0,"uic-list-item",179),2&e){const e=i.Dc(3);i.Nc("value",e.buyOrderValidity),i.Mc("info","Order Validity")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function Un(e,t){if(1&e&&(i.rc(0,"div",178),i.mc(1,"uic-list-item",179),i.mc(2,"uic-list-item",179),i.od(3,kn,1,4,"uic-list-item",159),i.mc(4,"uic-list-item",179),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Nc("value","BUY"),i.Mc("info","Order Type")("infoClass","t-xs")("valueClass","t-xs font-weight-bold text-profit"),i.Ub(1),i.Nc("value",null==e.selectedAcctModel?null:e.selectedAcctModel.accountTypeDisplay),i.Mc("info","Account")("infoClass","t-xs")("valueClass","t-xs font-weight-bold"),i.Ub(1),i.Mc("ngIf",e.showBondExpressBuyColumn),i.Ub(1),i.Nc("value",e.modifyViewPaymentMethod),i.Mc("info","Payment Method")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function Ln(e,t){if(1&e&&i.mc(0,"uic-list-item",179),2&e){const e=i.Dc(2);i.Nc("value",e.netYield),i.Mc("info",e.getNetYieldPlaceHolder())("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function Vn(e,t){if(1&e&&i.mc(0,"uic-list-item",179),2&e){const e=i.Dc(2);i.Nc("value",e.formEstPayableAmt),i.Mc("info","Est. Payable Amou
1nt")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function Nn(e,t){if(1&e&&(i.pc(0),i.rc(1,"span",184),i.qd(2," Insufficient Cash Account balance. Kindly "),i.rc(3,"a",185),i.qd(4,"top up"),i.qc(),i.qd(5),i.Ec(6,"number"),i.qc(),i.oc()),2&e){const e=i.Dc(3);i.Ub(3),i.Mc("href","/app/cash-account",i.gd),i.Ub(2),i.td(" ",e.paymentCurrency," ",i.Gc(6,3,e.shortfallAmt,"1.2-2")," to your Cash Account to complete the transaction. ")}}function Yn(e,t){if(1&e&&(i.rc(0,"span",184),i.qd(1),i.rc(2,"a",185),i.qd(3,"top up"),i.qc(),i.qd(4," to complete the transaction. "),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Insufficient ",e.paymentCurrency," Auto-Sweep balance. Kindly "),i.Ub(1),i.Mc("href",e.getAutoSweepTopUpUrl(e.paymentCurrency),i.gd)}}function jn(e,t){if(1&e&&(i.rc(0,"div",180),i.rc(1,"div",181),i.mc(2,"i",182),i.qc(),i.rc(3,"div"),i.od(4,Nn,7,6,"ng-container",76),i.od(5,Yn,5,2,"ng-template",null,183,i.pd),i.qc(),i.qc()),2&e){const e=i.ad(6),t=i.Dc(2);i.Ub(4),i.Mc("ngIf",(null==t.paymentMethodRsp?null:t.paymentMethodRsp.paymentMode)!==t.transactionConstant.AUTO_SWEEP)("ngIfElse",e)}}function Hn(e,t){if(1&e&&(i.rc(0,"form",146),i.rc(1,"div"),i.od(2,gn,11,12,"div",147),i.Ec(3,"async"),i.rc(4,"nz-col",148),i.od(5,fn,3,0,"div",149),i.qc(),i.qc(),i.rc(6,"div"),i.od(7,vn,9,6,"div",147),i.rc(8,"nz-col",148),i.od(9,yn,2,4,"div",150),i.qc(),i.qc(),i.rc(10,"div"),i.od(11,Mn,10,8,"div",147),i.rc(12,"nz-col",148),i.od(13,Tn,3,0,"div",149),i.qc(),i.qc(),i.rc(14,"div"),i.rc(15,"div",151),i.rc(16,"nz-col",152),i.rc(17,"span",153),i.qd(18,"Nominal Value"),i.qc(),i.qc(),i.rc(19,"nz-col",154),i.rc(20,"uic-input-wrapper"),i.rc(21,"nz-input-group",155),i.mc(22,"input",156),i.qc(),i.qc(),i.od(23,On,3,1,"ng-template",null,157,i.pd),i.qc(),i.qc(),i.rc(25,"nz-col",148),i.od(26,wn,6,5,"div",149),i.qc(),i.qc(),i.od(27,An,6,3,"div",147),i.od(28,qn,7,3,"div",147),i.rc(29,"div"),i.od(30,_n,8,6,"div",147),i.rc(31,"nz-col",148),i.od(32,Rn,3,0,"div",149),i.qc(),i.qc(),i.od(33,Un,5,13,"div",158),i.rc(34,"div"),i.od(35,Ln,1,4,"uic-list-item",159),i.Ec(36,"async"),i.od(37,Vn,1,4,"uic-list-item",159),i.Ec(38,"async"),i.qc(),i.qc(),i.od(39,jn,7,2,"div",160)),2&e){const e=i.ad(24),t=i.Dc();var n=null;const d=!t.isUpdate&&(null==(n=i.Fc(3,22,t.authenticatedDisplay$))?null:n.length)>1;var o=null;const u=(null==(o=t.bondBuyForm.get("refno"))?null:o.dirty)&&(null==(o=t.bondBuyForm.get("refno"))?null:o.hasError("required"));var l=null;const p=(null==(l=t.bondBuyForm.get("limitOrderPrice"))?null:l.dirty)&&(null==(l=t.bondBuyForm.get("limitOrderPrice"))?null:l.hasError("required"));var a=null;const h=null!=(a=t.bondBuyForm.get("nominalValue"))&&a.dirty&&(null!=(a=t.bondBuyForm.get("nominalValue"))&&a.hasError("noIncreaseInModify")||null!=(a=t.bondBuyForm.get("nominalValue"))&&a.hasError("required")||null!=(a=t.bondBuyForm.get("nominalValue"))&&a.hasError("min")||null!=(a=t.bondBuyForm.get("nominalValue"))&&a.hasError("minIncrement")||null!=(a=t.bondBuyForm.get("nominalValue"))&&a.hasError("subAmtValidator"))?"error-bg":"background-grey";var c=null;const b=null!=(c=t.bondBuyForm.get("nominalValue"))&&c.dirty&&(null!=(c=t.bondBuyForm.get("nominalValue"))&&c.hasError("noIncreaseInModify")||null!=(c=t.bondBuyForm.get("nominalValue"))&&c.hasError("required")||null!=(c=t.bondBuyForm.get("nominalValue"))&&c.hasError("min")||null!=(c=t.bondBuyForm.get("nominalValue"))&&c.hasError("minIncrement")||null!=(c=t.bondBuyForm.get("nominalValue"))&&c.hasError("subAmtValidator"))?"error-bg":"background-grey";var s;const m=null==(s=t.bondBuyForm.get("nominalValue"))?null:s.dirty;var r=null;const g=(null==(r=t.bondBuyForm.get("paymentMethod"))?null:r.dirty)&&(null==(r=t.bondBuyForm.get("paymentMethod"))?null:r.hasError("required"));i.Mc("formGroup",t.bondBuyForm),i.Ub(2),i.Mc("ngIf",d),i.Ub(3),i.Mc("ngIf",u),i.Ub(2),i.Mc("ngIf","bondOTC"==t.selectedBondTransactionType),i.Ub(2),i.Mc("ngIf",t.buyType.value===t.buyOrderType.Market),i.Ub(2),i.Mc("ngIf",t.buyType.value!==t.buyOrderType.Market),i.Ub(2),i.Mc("ngIf",p),i.Ub(3),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzSuffix",e)("ngClass",h),i.Ub(1),i.Mc("ngClass",b)("step",t.checkedminSubInvestmentAmt),i.Ub(4),i.Mc("ngIf",m),i.Ub(1),i.Mc("ngIf",t.showBondExpressBuyColumn&&!t.isUpdate),i.Ub(1),i.Mc("ngIf","GTD"==t.orderValidity&&t.showBondExpressBuyColumn),i.Ub(2),i.Mc("ngIf",!t.isUpdate),i.Ub(2),i.Mc("ngIf",g),i.Ub(1),i.Mc("ngIf",t.isUpdate),i.Ub(2),i.Mc("ngIf",i.Fc(36,24,t.isMobile$)),i.Ub(2),i.Mc("ngIf",i.Fc(38,26,t.isMobile$)),i.Ub(2),i.Mc("ngIf",t.shortfallAmt>0)}}const Gn=function(e,t){return{mobile:e,web:t}};function Wn(e,t){if(1&e&&(i.rc(0,"span",187),i.nc(1,192),i.qc()),2&e){const e=i.Dc(2),t=i.ad(58);i.Ub(1),i.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",i.Tc(2,Gn,"bondOTC"!==e.selectedBondTransactionType?"Net Yield to Maturity":"Est. Net Yield to Maturity","bondOTC"!==e.selectedBondTransactionType?"Net Yield to Maturity":"Est. Net Yield to Maturity"))}}function Qn(e,t){if(1&e&&(i.rc(0,"span",187),i.nc(1,192),i.qc()),2&e){const e=i.Dc(2),t=i.ad(58);i.Ub(1),i.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",i.Tc(2,Gn,"bondOTC"!==e.selectedBondTransactionType?"Net Yield to Next Call":"Est. Net Yield to Next Call","bondOTC"!==e.selectedBondTransactionType?"Net Yield to Next Call":"Est. Net Yield to Next Call"))}}function $n(e,t){if(1&e&&(i.rc(0,"div"),i.rc(1,"span",187),i.qd(2,"Next Call Date"),i.qc(),i.rc(3,"strong",187),i.qd(4),i.Ec(5,"sdate"),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(4),i.rd(i.Fc(5,1,e.bondCalculatorData.callDate))}}function Kn(e,t){1&e&&(i.pc(0),i.qd(1," Accrued Interest is calculated based on the settlement date (T+2 business days) of the bond. The actual amount may vary slightly depending on the exact settlement date for this order. "),i.oc())}function Xn(e,t){1&e&&(i.pc(0),i.qd(1," Accrued Interest is calculated based on the settlement date (T+3 business days) of the bond. The actual amount may vary slightly depending on the exact settlement date for this order. "),i.oc())}function Jn(e,t){if(1&e&&(i.od(0,Kn,2,0,"ng-container",0),i.od(1,Xn,2,0,"ng-container",0)),2&e){const e=i.Dc(2);i.Mc("ngIf","MYR"===(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)),i.Ub(1),i.Mc("ngIf","MYR"!==(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode))}}function Zn(e,t){if(1&e&&(i.rc(0,"div"),i.rc(1,"span",187),i.qd(2,"Processing Fee (Incl. of SST)"),i.qc(),i.rc(3,"strong",187),i.qd(4),i.Ec(5,"number"),i.mc(6,"i",199),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(4),i.td("",e.selectedBond.bondCurrencyCode," ",i.Gc(5,2,e.upfrontFee,"1.2-2")," ")}}function eo(e,t){if(1&e&&(i.rc(0,"div"),i.rc(1,"span",187),i.qd(2,"FX Conversion Rate"),i.qc(),i.rc(3,"strong",187),i.qd(4),i.Ec(5,"number"),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(4),i.sd(" ","1 "+(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" = "+i.Gc(5,1,e.displayFxRate,"1.6-6")+" "+e.bondBuyForm.get("investmentCurrency").value," ")}}
1const to=function(){return{mobile:"Est. Payable Amount (Investment Currency)",web:"Estimated Payable Amount (Investment Currency)"}};function no(e,t){if(1&e&&(i.rc(0,"div"),i.rc(1,"span",187),i.nc(2,192),i.qc(),i.rc(3,"strong",187),i.qd(4),i.Ec(5,"number"),i.qc(),i.qc()),2&e){const e=i.Dc(2),t=i.ad(58);i.Ub(2),i.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",i.Rc(7,to)),i.Ub(2),i.td("",e.bondBuyForm.get("investmentCurrency").value," ",i.Gc(5,4,e.estTotalInvAmtPayable,"1.2-2")," ")}}const oo=function(){return{mobile:"Est. Payable Amount (Bond Currency)",web:"Estimated Payable Amount (Bond Currency)"}};function io(e,t){if(1&e&&(i.rc(0,"div",186),i.rc(1,"div"),i.rc(2,"span",187),i.qd(3,"Investment Account"),i.qc(),i.rc(4,"strong",187),i.qd(5),i.qc(),i.qc(),i.rc(6,"div"),i.rc(7,"span",187),i.qd(8,"Action"),i.qc(),i.rc(9,"strong",188),i.qd(10,"BUY"),i.qc(),i.qc(),i.rc(11,"div"),i.rc(12,"span",187),i.qd(13,"Order Type"),i.qc(),i.rc(14,"strong",187),i.qd(15),i.qc(),i.qc(),i.rc(16,"div"),i.rc(17,"span",187),i.qd(18,"Payment Method"),i.qc(),i.rc(19,"strong",187),i.qd(20),i.qc(),i.qc(),i.rc(21,"div"),i.rc(22,"span",187),i.qd(23,"Nominal Value"),i.qc(),i.rc(24,"strong",187),i.qd(25),i.Ec(26,"number"),i.qc(),i.qc(),i.rc(27,"div"),i.rc(28,"span",187),i.qd(29),i.qc(),i.rc(30,"strong",187),i.qd(31),i.Ec(32,"number"),i.qc(),i.qc(),i.rc(33,"div"),i.od(34,Wn,2,5,"span",189),i.od(35,Qn,2,5,"span",189),i.rc(36,"strong",187),i.qd(37),i.mc(38,"i",190),i.qc(),i.qc(),i.od(39,$n,6,3,"div",0),i.rc(40,"div",191),i.rc(41,"span",187),i.nc(42,192),i.qc(),i.rc(43,"strong",187),i.qd(44),i.Ec(45,"number"),i.mc(46,"i",193),i.qc(),i.qc(),i.rc(47,"p",194),i.qd(48,"Breakdown Below:"),i.qc(),i.rc(49,"div",195),i.rc(50,"div"),i.rc(51,"span",187),i.qd(52,"Principal Amount"),i.qc(),i.rc(53,"strong",187),i.qd(54),i.Ec(55,"number"),i.qc(),i.qc(),i.rc(56,"div"),i.rc(57,"span",187),i.qd(58),i.qc(),i.rc(59,"strong",187),i.qd(60),i.Ec(61,"number"),i.mc(62,"i",196),i.qc(),i.od(63,Jn,2,2,"ng-template",null,197,i.pd),i.qc(),i.od(65,Zn,7,5,"div",76),i.rc(66,"div"),i.rc(67,"span",187),i.qd(68),i.qc(),i.rc(69,"strong",187),i.qd(70),i.Ec(71,"number"),i.mc(72,"i",198),i.qc(),i.qc(),i.qc(),i.od(73,eo,6,4,"div",0),i.od(74,no,6,8,"div",0),i.rc(75,"div"),i.rc(76,"span",187),i.qd(77,"Platform Fee Rate"),i.qc(),i.rc(78,"strong",187),i.qd(79),i.qc(),i.qc(),i.qc()),2&e){const e=i.ad(64),t=i.Dc(),o=i.ad(56),l=i.ad(58),a=i.ad(31);var n=null;i.Ub(5),i.rd(null==t.selectedAcctModel?null:t.selectedAcctModel.refno),i.Ub(10),i.rd(t.buyType.value.label),i.Ub(5),i.rd(t.paymentMethodRsp.display),i.Ub(5),i.td("",null==t.selectedBond?null:t.selectedBond.bondCurrencyCode," ",i.Fc(26,30,null==t.bondBuyForm||null==(n=t.bondBuyForm.get("nominalValue"))?null:n.value),""),i.Ub(4),i.rd((null==t.buyType?null:t.buyType.value)===t.buyOrderType.Price?"Limit Price":"Indicative Ask Price"),i.Ub(2),i.rd(i.Gc(32,32,t.indicatePrice,"1.3-3")),i.Ub(3),i.Mc("ngIf","YTM"===t.netYieldType),i.Ub(1),i.Mc("ngIf","YTM"!==t.netYieldType),i.Ub(2),i.sd("",t.netYtm," "),i.Ub(1),i.Mc("nzTooltipTitle",o),i.Ub(1),i.Mc("ngIf","YTM"!==t.netYieldType),i.Ub(3),i.Mc("ngTemplateOutlet",l)("ngTemplateOutletContext",i.Rc(47,oo)),i.Ub(2),i.td("",t.selectedBond.bondCurrencyCode," ",i.Gc(45,35,t.estTotalAmtPayable,"1.2-2")," "),i.Ub(10),i.td("",t.selectedBond.bondCurrencyCode," ",i.Gc(55,38,t.principalAmt,"1.2-2"),""),i.Ub(4),i.rd("bondOTC"!==t.selectedBondTransactionType?"Accrued Interest":"Ind. Accrued Interest"),i.Ub(2),i.td(" ",t.selectedBond.bondCurrencyCode," ",i.Gc(61,41,t.indicativeAI,"1.2-2")," "),i.Ub(2),i.Mc("nzTooltipTitle",e),i.Ub(3),i.Mc("ngIf",t.sstRate>0)("ngIfElse",a),i.Ub(3),i.sd("Buffer Amount (",t.bufferRate,"%)"),i.Ub(2),i.td("",t.selectedBond.bondCurrencyCode," ",i.Gc(71,44,t.bufferAmt,"1.2-2")," "),i.Ub(3),i.Mc("ngIf",t.selectedBond.bondCurrencyCode!==t.bondBuyForm.get("investmentCurrency").value),i.Ub(1),i.Mc("ngIf",t.selectedBond.bondCurrencyCode!==t.bondBuyForm.get("investmentCurrency").value),i.Ub(5),i.sd("",null==t.bondCalculatorData?null:t.bondCalculatorData.platformFee," % per annum")}}function lo(e,t){if(1&e&&(i.rc(0,"div"),i.rc(1,"span",187),i.qd(2,"Processing Fee"),i.qc(),i.rc(3,"strong",187),i.qd(4),i.Ec(5,"number"),i.mc(6,"i",200),i.qc(),i.qc()),2&e){const e=i.Dc();i.Ub(4),i.td("",e.selectedBond.bondCurrencyCode," ",i.Gc(5,2,e.upfrontFee,"1.2-2")," ")}}function ao(e,t){1&e&&i.mc(0,"div")}function co(e,t){if(1&e){const e=i.sc();i.rc(0,"a",222),i.zc("click",(function(){return i.dd(e),i.Dc(2).expendCloseAllAction()})),i.od(1,ao,1,0,"div",78),i.qd(2," Expand All"),i.qc()}if(2&e){i.Dc(2);const e=i.ad(43);i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function so(e,t){1&e&&i.mc(0,"div")}function ro(e,t){if(1&e){const e=i.sc();i.rc(0,"a",222),i.zc("click",(function(){return i.dd(e),i.Dc(2).expendCloseAllAction()})),i.od(1,so,1,0,"div",78),i.qd(2," Collapse All"),i.qc()}if(2&e){i.Dc(2);const e=i.ad(45);i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function uo(e,t){if(1&e&&(i.rc(0,"div",219),i.rc(1,"div",220),i.rc(2,"a",185),i.qd(3),i.qc(),i.qc(),i.mc(4,"div",223),i.qc()),2&e){const e=t.$implicit;i.Ub(2),i.Mc("href",e.documentUrl,i.gd),i.Ub(1),i.rd(e.documentName),i.Ub(1),i.Mc("innerHtml",e.documentDesc,i.ed)}}function po(e,t){if(1&e&&(i.rc(0,"div",201),i.rc(1,"div"),i.rc(2,"div",202),i.qd(3,'Please click the "I Agree & Checkout" button below to continue if you have read the important note. Otherwise, please click "Back" to return to the previous page. '),i.qc(),i.qc(),i.qc(),i.rc(4,"div",203),i.rc(5,"div",204),i.rc(6,"div",205),i.qd(7,"Related Information"),i.qc(),i.rc(8,"div",206),i.rc(9,"span"),i.od(10,co,3,1,"a",207),i.qc(),i.rc(11,"span"),i.od(12,ro,3,1,"a",207),i.qc(),i.qc(),i.qc(),i.rc(13,"div",204),i.rc(14,"nz-collapse",208),i.rc(15,"nz-collapse-panel",209,210),i.rc(17,"div",201),i.rc(18,"div",211),i.qd(19,"Terms & Condition"),i.qc(),i.rc(20,"div",212),i.rc(21,"div",202),i.qd(22,"I/we have read and understood the relevant Offering Documents and Risk Disclosure Statement for Bonds and further confirm that I wish to proceed with my choice of investment without recommendation or advice and hereby instruct FSMOne, on my behalf, to submit the above transactions. "),i.qc(),i.rc(23,"div",202),i.qd(24,"I have received, read, understood and agreed to be bound by the terms and conditions in the relevant Offering Documents and FSMOne website. The investment product(s) is only suitable for investors who have met the product issuer\u2019s minimum qualifying criteria. "),i.qc(),i.rc(25,"div",202),i.qd(26,"All investment involves risk and I/we are solely responsible for the decision made on the investment. In acting upon my/our investment instructions, I/we fully understand the consequences of my/our investment choice, and hereby irrevocably indemnify FSM from and against all losses, damages, costs and expenses whatsoever legal or otherwise, which I may sustain, suffer or incur as a result of the performance of any investment(s) and/or currency conversion connected with any transaction(s) for the account. I agree that you may transfer and disclose any information relating to me and my account, which is necessary for carrying out these services and/or for compliance, to relevant entities and regulators. I am aware that FSM uses a nominee system and the securities bought through FSM are held on my behalf by FSM or its appointed Custodian, hence the securities are not registered in my name. Corporate account transactions (if applicable): By submitting the transactions, the above declarations would have deemed to be made by the authorized signatories on behalf of the entity/body/business. "),i.qc(),i.qc(),i.qc(),i.qc(),i.rc(27,"nz-collapse-panel",213,214),i.rc(29,"div",215),i.od(30,uo,5,3,"div",216),i.qc(),i.qc(),i.rc(31,"nz-collapse-panel",217,218),i.rc(33,"div",215),i.rc(34,"div",219),i.rc(35,"div",220),i.qd(36,"Key risks of investing in bonds"),i.qc(),i.rc(37,"div",221),i.qd(38,"Credit risk - bonds are subject to the risk of the issuer defaulting on its obligations. It should also be noted that credit ratings assigned by credit rating agencies do not guarantee the creditworthiness of the issuer; "),i.qc(),i.rc(39,"div",221),i.qd(40,"Liquidity risk - some bonds may not have active secondary markets and it would be difficult or impossible for investors to sell the bond before its maturity; and "),i.qc(),i.rc(41,"div",221),i.qd(42,"Interest rate risk - bonds are more susceptible to fluctuations in interest rates and generally prices of bonds will fall when interest rates rise; and "),i.qc(),i.rc(43,"div",221),i.qd(44,"Exchange rate risk - If the bond is denominated in a foreign currency, you face an exchange rate risk. Any fall in the foreign currency will reduce the amount you receive when you convert a payment of interest or principal back into your local currency; and "),i.qc(),i.rc(45,"div",221),i.qd(46,"Event risk - A corporate event such as a merger or takeover may lower the credit rating of the bond issuer. In case the corporate restructurings are financed by the issuance of a large amount of new debt-burden, the company's ability to pay off existing bonds will be weakened. "),i.qc(),i.qc(),i.rc(47,"div",219),i.rc(48,"div",220),i.qd(49,"Key risks of investing in high-yield bonds "),i.qc(),i.rc(50,"div",221),i.qd(51,"Higher credit risk - since they are typically rated below investment grade or are unrated and as such are often subject to a higher risk of issuer default; "),i.qc(),i.rc(52,"div",221),i.qd(53,"Vulnerability to economic cycles - during economic downturns such bonds typically fall more in value than investment grade bonds as (i) investors become more risk averse and (ii) default risk rises. "),i.qc(),i.qc(),i.rc(54,"div",219),i.rc(55,"div",220),i.qd(56,"Bonds with special features"),i.qc(),i.rc(57,"div",221),i.qd(58,"Some bonds may contain special features and risks that warrant special attention. These include bonds: "),i.qc(),i.rc(59,"div",221),i.qd(60,"That have subordinated ranking and in case of liquidation of the issuer, investors can only get back the principal after other senior creditors are paid; "),i.qc(),i.rc(61,"div",221),i.qd(62,"That are callable and investors face reinvestment risk when the issuer exercises its right to redeem the bond before it matures; "),i.qc(),i.rc(63,"div",221),i.qd(64,"That have variable and/or deferral of interest payment terms and investors would face uncertainty over the amount and time of the interest payments to be received; "),i.qc(),i.rc(65,"div",221),i.qd(66,"That have extendable maturity dates and investors would not have a definite schedule of principal repayment; "),i.qc(),i.rc(67,"div",221),i.qd(68,"That are convertible or exchangeable in nature and investors are subject to both equity and bond investment risk; and/or "),i.qc(),i.rc(69,"div",221),i.qd(70,"That have contingent write down or loss absorption feature and the bond may be written-off fully or partially or converted to common stock on the occurrence of a trigger event. "),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.qc()),2&e){const e=i.ad(16),t=i.ad(28),n=i.ad(32),o=i.Dc(),l=i.ad(45),a=i.ad(43);i.Ub(10),i.Mc("ngIf",!o.showAllAction),i.Ub(2),i.Mc("ngIf",o.showAllAction),i.Ub(3),i.Mc("nzExpandedIcon",e.nzActive?l:a)("nzActive",o.showAllAction),i.Ub(12),i.Mc("nzExpandedIcon",t.nzActive?l:a)("nzActive",o.showAllAction),i.Ub(3),i.Mc("ngForOf",o.bondDocumentList),i.Ub(1),i.Mc("nzExpandedIcon",n.nzActive?l:a)("nzActive",o.showAllAction)}}function ho(e,t){if(1&e){const e=i.sc();i.rc(0,"nz-modal",224,225),i.zc("nzOnCancel",(function(){return i.dd(e),i.Dc().closeImportantNote()})),i.nc(2,58),i.rc(3,"div",226),i.rc(4,"button",227),i.zc("click",(function(){return i.dd(e),i.Dc().backToPreviewOrder()})),i.qd(5,"BACK"),i.qc(),i.rc(6,"button",228),i.zc("click",(function(){i.dd(e);const t=i.Dc();return t.isBondExpress?t.confirmTransactionForBondRMOExpress():t.confirmTransaction()})),i.qd(7," PROCEED "),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc(),t=i.ad(41);i.Mc("nzVisible",e.importantNote)("nzFooter",null),i.Ub(2),i.Mc("ngTemplateOutlet",t),i.Ub(2),i.Mc("nzSize","small"),i.Ub(2),i.Mc("nzSize","small")("nzLoading",e.approving)}}function bo(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"b2c-mobile-drawer",229),i.nc(2,58),i.rc(3,"b2c-floating-bar"),i.rc(4,"button",98),i.zc("click",(function(){return i.dd(e),i.Dc().backToPreviewOrder()})),i.qd(5,"Maybe Later"),i.qc(),i.rc(6,"button",99),i.zc("click",(function(){return i.dd(e),i.Dc().confirmTransaction()})),i.qd(7," Confirm "),i.qc(),i.qc(),i.qc(),i.oc()}if(2&e){const e=i.Dc(),t=i.ad(41);i.Ub(1),i.Mc("show",e.importantNote)("hideButtons",!0),i.Ub(1),i.Mc("ngTemplateOutlet",t),i.Ub(4),i.Mc("nzLoading",e.approving)}}function mo(e,t){if(1&e&&(i.rc(0,"div",230),i.Ec(1,"async"),i.rc(2,"div",231),i.mc(3,"i",232),i.qc(),i.rc(4,"p",233),i.qd(5," Avoid Payment Delay "),i.qc(),i.rc(6,"ul",234),i.rc(7,"li",235),i.qd(8," We only accept payments from bank accounts "),i.rc(9,"b"),i.qd(10,"under your name"),i.qc(),i.qd(11,". "),i.qc(),i.rc(12,"li",235),i.qd(13," Cash deposits from any parties, even from yourself, are "),i.rc(14,"b"),i.qd(15,"not accepted"),i.qc(),i.qd(16,". "),i.qc(),i.rc(17,"li",235),i.qd(18," Payments from bank accounts "),i.rc(19,"b"),i.qd(20,"not"),i.qc(),i.qd(21," under your name will be "),i.rc(22,"b"),i.qd(23,"rejected"),i.qc(),i.qd(24," and refunded. "),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc();i.Mc("ngClass",i.Fc(1,1,e.isMobile$)?"pb-4":null)}}function go(e,t){1&e&&i.mc(0,"i",236)}function fo(e,t){1&e&&i.mc(0,"i",237)}function vo(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"shared-approve-action",238),i.zc("emitCancel",(function(){return i.dd(e),i.Dc().onHandleCancel()}))("onApprove",(function(t){return i.dd(e),i.Dc().onClickApprove(t)}))("on2FaMethodChecked",(function(){return i.dd(e),i.Dc().on2FaMethodChecked()})),i.qc(),i.oc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("refno",e.selectedAcctModel.refno)("requestKey",e.APPROVE_TRADE_REQUEST_KEY)("actionKey",e.BOND_TRANS_ACTION_KEY)("width",600)}}function yo(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"shared-approve-action",238),i.zc("emitCancel",(function(){return i.dd(e),i.Dc().onHandleCancel()}))("onApprove",(function(t){return i.dd(e),i.Dc().onClickApprove(t)}))("on2FaMethodChecked",(function(){return i.dd(e),i.Dc().on2FaMethodChecked()})),i.qc(),i.oc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("refno",e.selectedAcctModel.refno)("requestKey",e.APPROVE_TRADE_REQUEST_KEY)("actionKey",e.BOND_TRANS_ACTION_KEY)("width",600)}}function Co(e,t){1&e&&i.mc(0,"app-bond-live-streaming-tag")}function Mo(e,t){if(1&e&&(i.pc(0),i.od(1,Co,1,0,"app-bond-live-streaming-tag",0),i.Ec(2,"async"),i.Ec(3,"async"),i.oc()),2&e){const e=i.Dc(2);i.Ub(1),i.Mc("ngIf",i.Fc(2,1,e.isMobile$)||e.isLastTradingDate()&&!i.Fc(3,3,e.isMobile$))}}function To(e,t){if(1&e&&(i.rc(0,"div",255),i.mc(1,"app-bond-exchange-tag",256),i.Ec(2,"async"),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Mc("nzClass",i.Fc(2,2,e.isMobile$)?"t-3xs":"t-2xs")("isLastTradingDay",!0)}}const Oo=function(){return{"flex-shrink":0}};function Bo(e,t){if(1&e&&i.mc(0,"app-bond-exchange-tag",257),2&e){const e=i.Dc(2);i.Mc("isFullLotType",e.showBEFullLotType(e.selectedBond))("isOddLotType",e.showBEOddLotType(e.selectedBond))("isRetail","Y"===(null==e.selectedBond?null:e.selectedBond.retailDistribution))("ngStyle",i.Rc(4,Oo))}}function So(e,t){if(1&e&&i.mc(0,"app-bond-otc-tag",258),2&e){const e=i.Dc(2);i.Mc("ngClass","mr-1")("ngStyle",i.Rc(3,Oo))("isRetail","Y"===(null==e.selectedBond?null:e.selectedBond.retailDistribution))}}function xo(e,t){1&e&&i.mc(0,"app-bond-live-streaming-tag")}function Po(e,t){if(1&e&&(i.rc(0,"span",37),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Mc("ngClass","loss-change t-sm"),i.Ub(1),i.td(" ",i.Gc(2,3,null==e.subscribedBond?null:e.subscribedBond.lsChange,".3")," (",i.Gc(3,6,null==e.subscribedBond?null:e.subscribedBond.changePercentage,".3"),"%)")}}function Eo(e,t){if(1&e&&(i.rc(0,"span",37),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Mc("ngClass","profit-change t-sm"),i.Ub(1),i.td(" +",i.Gc(2,3,null==e.subscribedBond?null:e.subscribedBond.lsChange,".3")," (+",i.Gc(3,6,null==e.subscribedBond?null:e.subscribedBond.changePercentage,".3"),"%)")}}function wo(e,t){if(1&e&&(i.rc(0,"span",37),i.qd(1),i.Ec(2,"number"),i.Ec(3,"number"),i.qc()),2&e){const e=i.Dc(3);i.Mc("ngClass","text-md
1 font-weight-semibold t-sm"),i.Ub(1),i.td(" ",i.Gc(2,3,null==e.subscribedBond?null:e.subscribedBond.lsChange,".3")," (",i.Gc(3,6,null==e.subscribedBond?null:e.subscribedBond.changePercentage,".3"),"%)")}}function Do(e,t){if(1&e&&(i.rc(0,"div",230),i.Ec(1,"async"),i.rc(2,"span",259),i.Ec(3,"async"),i.qd(4),i.Ec(5,"currency"),i.qc(),i.od(6,Po,4,9,"span",260),i.od(7,Eo,4,9,"span",260),i.od(8,wo,4,9,"span",260),i.qc()),2&e){const e=i.Dc(2);i.Mc("ngClass",i.Fc(1,6,e.isMobile$)?"mt-1":"mt-3 mb-2"),i.Ub(2),i.Mc("ngClass",i.Fc(3,8,e.isMobile$)?"t-xl":"t-4xl"),i.Ub(2),i.rd(null!=e.subscribedBond&&e.subscribedBond.lastDone?i.Ic(5,10,null==e.subscribedBond?null:e.subscribedBond.lastDone,(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" ","code","1.2-2"):"-"),i.Ub(2),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.lastDone)&&(null==e.subscribedBond?null:e.subscribedBond.changePercentage)<0&&"bondOTC"!==e.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.lastDone)&&(null==e.subscribedBond?null:e.subscribedBond.changePercentage)>0&&"bondOTC"!==e.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf",(null==e.subscribedBond?null:e.subscribedBond.lastDone)&&0==(null==e.subscribedBond?null:e.subscribedBond.changePercentage)&&"bondOTC"!==e.selectedBondTransactionType)}}function zo(e,t){if(1&e&&i.mc(0,"uic-icon",264),2&e){const e=i.Dc(3);i.Mc("type",e.showChart?"action-icon/collapse-o":"action-icon/expand-o")}}function Ao(e,t){if(1&e&&(i.rc(0,"span"),i.qd(1),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.rd(e.showChart?"Collapse Chart":"Expand Chart")}}function Fo(e,t){if(1&e&&i.mc(0,"uic-round-button",265),2&e){const e=i.Dc(3);i.Mc("nzIcon",e.showChart?"icon-up-arrow close-icon-size":"icon-down-arrow close-icon-size")}}function qo(e,t){if(1&e){const e=i.sc();i.rc(0,"div",261),i.zc("click",(function(){i.dd(e);const t=i.Dc(2);return t.showChart=!t.showChart})),i.od(1,zo,1,1,"uic-icon",262),i.Ec(2,"async"),i.od(3,Ao,2,1,"span",0),i.Ec(4,"async"),i.od(5,Fo,1,1,"uic-round-button",263),i.Ec(6,"async"),i.qc()}if(2&e){const e=i.Dc(2);i.Ub(1),i.Mc("ngIf",!i.Fc(2,3,e.isMobile$)),i.Ub(2),i.Mc("ngIf",!i.Fc(4,5,e.isMobile$)),i.Ub(2),i.Mc("ngIf",i.Fc(6,7,e.isMobile$))}}const Io=function(){return["bondExpress","bondOTC"]};function _o(e,t){if(1&e){const e=i.sc();i.rc(0,"div"),i.rc(1,"div",90),i.rc(2,"div",239),i.rc(3,"div",240),i.Ec(4,"async"),i.rc(5,"div",241),i.rc(6,"div",242),i.od(7,Mo,4,5,"ng-container",0),i.od(8,To,3,4,"div",243),i.qc(),i.rc(9,"div",244),i.od(10,Bo,1,5,"app-bond-exchange-tag",245),i.od(11,So,1,4,"app-bond-otc-tag",246),i.rc(12,"h5",247),i.zc("click",(function(){i.dd(e);const t=i.Dc();return t.redirectToFactsheetPage(null==t.selectedBond?null:t.selectedBond.issueCode,null==t.selectedBond?null:t.selectedBond.bondName)})),i.mc(13,"span",248),i.Ec(14,"async"),i.Ec(15,"bondName"),i.qc(),i.qc(),i.rc(16,"div",249),i.mc(17,"p",250),i.Ec(18,"async"),i.qc(),i.qc(),i.od(19,xo,1,0,"app-bond-live-streaming-tag",0),i.Ec(20,"async"),i.qc(),i.rc(21,"div",240),i.od(22,Do,9,15,"div",251),i.od(23,qo,7,9,"div",252),i.qc(),i.qc(),i.qc(),i.rc(24,"div",253),i.rc(25,"nz-spin",56),i.rc(26,"bond-rmo-orderpad-chart",254),i.zc("chartOutput",(function(t){return i.dd(e),i.Dc().priceChart=t})),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Ub(2),i.Mc("ngClass","bondOTC"!==e.selectedBondTransactionType?"w-100":""),i.Ub(1),i.Mc("ngClass",!e.showBEFullLotType(e.selectedBond)&&!e.showBEOddLotType(e.selectedBond)||e.isLastTradingDate()||i.Fc(4,28,e.isMobile$)?"":"justify-content-between"),i.Ub(4),i.Mc("ngIf",e.showBEFullLotType(e.selectedBond)||e.showBEOddLotType(e.selectedBond)),i.Ub(1),i.Mc("ngIf",(e.showBEFullLotType(e.selectedBond)||e.showBEOddLotType(e.selectedBond))&&e.isLastTradingDate()),i.Ub(2),i.Mc("ngIf",e.isBondExchange(e.selectedBond)&&"bondOTC"!==e.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf",!e.isBondExchange(e.selectedBond)||"bondOTC"==e.selectedBondTransactionType),i.Ub(1),i.Mc("ngClass","title-text"),i.Ub(1),i.Mc("ngClass",i.Fc(14,30,e.isMobile$)?"text-13px":"text-20px")("innerHTML",i.Gc(15,32,null==e.selectedBond?null:e.selectedBond.bondName,e.isBondExchange(e.selectedBond)?null==e.selectedBond?null:e.selectedBond.bexTradingWithoutAi:null==e.selectedBond?null:e.selectedBond.tradingWithoutAi),i.ed),i.Ub(4),i.Mc("ngClass",i.Fc(18,35,e.isMobile$)?"text-sm":" text-14px")("innerHTML",e.selectedBond.bondIssuer?null==e.selectedBond?null:e.selectedBond.bondIssuer:null==e.selectedBond?null:e.selectedBond.issuer,i.ed),i.Ub(2),i.Mc("ngIf",(e.showBEFullLotType(e.selectedBond)||e.showBEOddLotType(e.selectedBond))&&!e.isLastTradingDate()&&!i.Fc(20,37,e.isMobile$)),i.Ub(2),i.Mc("ngClass","bondOTC"!==e.selectedBondTransactionType?"justify-content-between":"justify-content-end"),i.Ub(1),i.Mc("ngIf","bondOTC"!==e.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf",!i.Rc(39,Io).includes(e.selectedBondTransactionType)),i.Ub(1),i.Mc("hidden",!e.showChart||i.Rc(40,Io).includes(e.selectedBondTransactionType)),i.Ub(1),i.Mc("nzSpinning",e.isLoadingPreOrderFS||e.isLoadingIntradayChart),i.Ub(1),i.Mc("ngClass","w-100 pb-24px")("chartDisplayModelMap",null==e.bondInfoModel?null:e.bondInfoModel.performanceDisplayHashmap)("chartDataMap",null==e.bondInfoModel?null:e.bondInfoModel.priceChartDataHashmap)("bondInfoModel",null==e.bondInfoModel?null:e.bondInfoModel.bondInfoBean)("bondIntraDataModel",e.bondIntraDataModel)("tooltipFormatterY","Currency")("isPeriodTabRight",!0)("showChartData",!1)("show1Dselection",e.show1Dselection)("periodTabClass","chart-tab chart-period")("showChart",e.showChart)}}function Ro(e,t){1&e&&(i.rc(0,"span",75),i.qd(1,"BE"),i.qc())}function ko(e,t){if(1&e){const e=i.sc();i.rc(0,"h4",266),i.zc("click",(function(){i.dd(e);const t=i.Dc();return t.redirectToFactsheetPage(null==t.selectedBond?null:t.selectedBond.issueC
1ode,null==t.selectedBond?null:t.selectedBond.bondName)})),i.od(1,Ro,2,0,"span",70),i.mc(2,"span",267),i.Ec(3,"async"),i.Ec(4,"bondName"),i.qc(),i.mc(5,"p",71)}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("ngIf",e.bondExpressAvailable),i.Ub(1),i.Mc("ngClass",i.Fc(3,4,e.isMobile$)?"text-13px":"text-18px")("innerHTML",i.Gc(4,6,null==e.selectedBond?null:e.selectedBond.bondName,null==e.selectedBond?null:e.selectedBond.tradingWithoutAi),i.ed),i.Ub(3),i.Mc("innerHTML",e.selectedBond.bondIssuer?null==e.selectedBond?null:e.selectedBond.bondIssuer:null==e.selectedBond?null:e.selectedBond.issuer,i.ed)}}const Uo=function(e,t){return{"text-sm":e,"text-xs":t}};function Lo(e,t){if(1&e&&(i.rc(0,"tr"),i.rc(1,"td",269),i.Ec(2,"async"),i.Ec(3,"async"),i.qd(4),i.Ec(5,"number"),i.qc(),i.rc(6,"td",270),i.rc(7,"span",271),i.Ec(8,"async"),i.Ec(9,"async"),i.qd(10),i.Ec(11,"bondPrice"),i.qc(),i.mc(12,"br"),i.rc(13,"span",88),i.Ec(14,"async"),i.Ec(15,"async"),i.qd(16),i.Ec(17,"bondPrice"),i.qc(),i.qc(),i.rc(18,"td",272),i.Ec(19,"async"),i.Ec(20,"async"),i.rc(21,"span",273),i.Ec(22,"async"),i.Ec(23,"async"),i.qd(24),i.Ec(25,"bondPrice"),i.qc(),i.mc(26,"br"),i.rc(27,"span",88),i.Ec(28,"async"),i.Ec(29,"async"),i.qd(30),i.Ec(31,"bondPrice"),i.qc(),i.qc(),i.rc(32,"td",274),i.Ec(33,"async"),i.Ec(34,"async"),i.qd(35),i.Ec(36,"number"),i.qc(),i.qc()),2&e){const e=t.index,n=i.Dc(),o=n.dataAsk,l=n.dataBid,a=i.Dc();i.Ub(1),i.Mc("ngClass",i.Tc(55,Uo,i.Fc(2,13,a.isMobile$),!i.Fc(3,15,a.isMobile$))),i.Ub(3),i.rd((null==o?null:o.length)>0&&o[e]?i.Fc(5,17,null==o[e]?null:o[e].askVolume):0),i.Ub(3),i.Mc("ngClass",i.Tc(58,Uo,i.Fc(8,19,a.isMobile$),!i.Fc(9,21,a.isMobile$))),i.Ub(3),i.rd((null==o?null:o.length)>0&&o[e]?i.Fc(11,23,null==o[e]?null:o[e].askPrice):"-"),i.Ub(3),i.Mc("ngClass",i.Tc(61,Uo,i.Fc(14,25,a.isMobile$),!i.Fc(15,27,a.isMobile$))),i.Ub(3),i.rd((null==o?null:o.length)>0&&o[e]?i.Gc(17,29,null==o[e]?null:o[e].askYield,!0):"-"),i.Ub(2),i.Mc("ngClass",i.Tc(64,Uo,i.Fc(19,32,a.isMobile$),!i.Fc(20,34,a.isMobile$))),i.Ub(3),i.Mc("ngClass",i.Tc(67,Uo,i.Fc(22,36,a.isMobile$),!i.Fc(23,38,a.isMobile$))),i.Ub(3),i.rd((null==l?null:l.length)>0&&l[e]?i.Fc(25,40,null==l[e]?null:l[e].bidPrice):"-"),i.Ub(3),i.Mc("ngClass",i.Tc(70,Uo,i.Fc(28,42,a.isMobile$),!i.Fc(29,44,a.isMobile$))),i.Ub(3),i.rd((null==l?null:l.length)>0&&l[e]?i.Gc(31,46,null==l[e]?null:l[e].bidYield,!0):"-"),i.Ub(2),i.Mc("ngClass",i.Tc(73,Uo,i.Fc(33,49,a.isMobile$),!i.Fc(34,51,a.isMobile$))),i.Ub(3),i.rd((null==l?null:l.length)>0&&l[e]?i.Fc(36,53,null==l[e]?null:l[e].bidVolume):0)}}function Vo(e,t){1&e&&i.od(0,Lo,37,76,"tr",268),2&e&&i.Mc("ngForOf",t.maxDataLength)}function No(e,t){1&e&&(i.rc(0,"span"),i.qd(1,"Maturity (Net YTM)"),i.qc())}function Yo(e,t){1&e&&(i.rc(0,"span"),i.qd(1,"Next Call"),i.qc())}function jo(e,t){if(1&e&&(i.qd(0,"Net Yield to "),i.od(1,No,2,0,"span",0),i.od(2,Yo,2,0,"span",0),i.qd(3," is calculated net of accrued interest, FSM processing fee and the estimated platform fee.\n")),2&e){const e=i.Dc();i.Ub(1),i.Mc("ngIf","YTM"===e.netYieldType),i.Ub(1),i.Mc("ngIf","YTM"!==e.netYieldType)}}function Ho(e,t){if(1&e&&(i.pc(0),i.qd(1),i.oc()),2&e){const e=i.Dc().mobile;i.Ub(1),i.rd(e)}}function Go(e,t){if(1&e&&(i.pc(0),i.qd(1),i.oc()),2&e){const e=i.Dc().web;i.Ub(1),i.rd(e)}}function Wo(e,t){if(1&e&&(i.od(0,Ho,2,1,"ng-container",0),i.Ec(1,"async"),i.od(2,Go,2,1,"ng-container",0),i.Ec(3,"async")),2&e){const e=i.Dc();i.Mc("ngIf",i.Fc(1,2,e.isMobile$)),i.Ub(2),i.Mc("ngIf",!i.Fc(3,4,e.isMobile$))}}function Qo(e,t){if(1&e){const e=i.sc();i.rc(0,"div",275),i.rc(1,"div",276),i.rc(2,"span",153),i.qd(3,"Side"),i.qc(),i.qc(),i.rc(4,"div",277),i.rc(5,"div",124),i.Ec(6,"async"),i.rc(7,"button",278),i.zc("click",(function(){return i.dd(e),i.Dc().toggleBuy()})),i.rc(8,"span",279),i.qd(9,"Buy"),i.qc(),i.qc(),i.qc(),i.rc(10,"div",124),i.Ec(11,"async"),i.rc(12,"button",278),i.zc("click",(function(){return i.dd(e),i.Dc().toggleSell()})),i.rc(13,"span",279),i.qd(14,"Sell"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",14),i.Ub(1),i.Mc("nzSpan",(i.Fc(6,8,e.isMobile$),12)),i.Ub(2),i.Mc("ngClass",e.isBuyActive?"button-buy-active":"")("disabled",e.isUpdate&&e.isSellActive),i.Ub(3),i.Mc("nzSpan",(i.Fc(11,10,e.isMobile$),12)),i.Ub(2),i.Mc("ngClass",e.isSellActive?"button-sell-active w-100":"")("disabled",e.isUpdate&&e.isBuyActive)}}function $o(e,t){1&e&&(i.rc(0,"span",187),i.qd(1,"Indicative Accrued Interest receivable"),i.qc())}function Ko(e,t){1&e&&(i.rc(0,"span",187),i.qd(1,"Accrued Interest receivable"),i.qc())}function Xo(e,t){1&e&&(i.pc(0),i.qd(1," Accrued Interest is calculated based on the settlement date (T+2 business days) of the bond. The actual amount may vary slightly depending on the exact settlement date for this order. "),i.oc())}function Jo(e,t){1&e&&(i.pc(0),i.qd(1," Accrued Interest is calculated based on the settlement date (T+3 business days) of the bond. The actual amount may vary slightly depending on the exact settlement date for this order. "),i.oc())}function Zo(e,t){if(1&e&&(i.od(0,Xo,2,0,"ng-container",0),i.od(1,Jo,2,0,"ng-container",0)),2&e){const e=i.Dc(2);i.Mc("ngIf","MYR"===(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)||"bondOTC"!==e.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf","MYR"!==(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)&&"bondOTC"==e.selectedBondTransactionType)}}function ei(e,t){if(1&e&&(i.rc(0,"div"),i.rc(1,"span",187),i.qd(2,"Processing Fee (Incl. of SST)"),i.qc(),i.rc(3,"strong",187),i.qd(4),i.Ec(5,"number"),i.mc(6,"i",199),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(4),i.td("",e.selectedBond.bondCurrencyCode," ",i.Gc(5,2,e.upfrontFee,"1.2-2")," ")}}function ti(e,t){if(1&e&&(i.rc(0,"div"),i.rc(1,"span",187),i.qd(2,"Estimated Amount Receivable "),i.rc(3,"span"),i.qd(4,"(Redemption Currency)"),i.qc(),i.qc(),i.rc(5,"strong",187),i.qd(6),i.Ec(7,"number"),i.mc(8,"i",280),i.qc(),i.qc()),2&e){const e=i.Dc(2);i.Ub(6),i.td("",e.bondSellForm.get("redemptionCurrency").value," ",i.Gc(7,2,e.estTotalInvAmtReceivable,"1.2-2")," ")}}function ni(e,t){if(1&e&&(i.rc(0,"div",186),i.rc(1,"div"),i.rc(2,"span",187),i.qd(3,"Order Type"),i.qc(),i.rc(4,"strong",187),i.qd(5),i.qc(),i.qc(),i.rc(6,"div"),i.rc(7,"span",187),i.qd(8,"Price"),i.qc(),i.rc(9,"strong",187),i.qd(10),i.Ec(11,"number"),i.qc(),i.qc(),i.rc(12,"div"),i.rc(13,"span",187),i.qd(14,"Redemption Method"),i.qc(),i.rc(15,"strong",187),i.qd(16),i.qc(),i.qc(),i.rc(17,"div",191),i.rc(18,"span",187),i.qd(19,"Estimated Amount Receivable "),i.rc(20,"span"),i.qd(21,"(Bond Currency)"),i.qc(),i.qc(),i.rc(22,"strong",187),i.qd(23),i.Ec(24,"number"),i.mc(25,"i",280),i.qc(),i.qc(),i.rc(26,"p",194),i.qd(27,"Breadkdown Below:"),i.qc(),i.rc(28,"div",195),i.rc(29,"div"),i.rc(30,"span",187),i.qd(31,"Principal Amount"),i.qc(),i.rc(32,"strong",187),i.qd(33),i.Ec(34,"number"),i.qc(),i.qc(),i.rc(35,"div"),i.od(36,$o,2,0,"span",189),i.od(37,Ko,2,0,"span",189),i.rc(38,"strong",187),i.qd(39),i.Ec(40,"number"),i.mc(4
11,"i",196),i.qc(),i.od(42,Zo,2,2,"ng-template",null,197,i.pd),i.qc(),i.od(44,ei,7,5,"div",76),i.qc(),i.od(45,ti,9,5,"div",0),i.qc()),2&e){const e=i.ad(43),t=i.Dc(),n=i.ad(31);i.Ub(5),i.rd(t.sellType.value.label),i.Ub(5),i.td("",t.selectedBond.bondCurrencyCode," ",i.Gc(11,16,t.indicatePrice,".3-3"),""),i.Ub(6),i.rd(t.redemptionMethod.display),i.Ub(7),i.td("",t.selectedBond.bondCurrencyCode," ",i.Gc(24,19,t.estTotalAmtReceivable,"1.2-2")," "),i.Ub(10),i.td("",t.selectedBond.bondCurrencyCode," ",i.Gc(34,22,t.principalSellAmt,"1.2-2"),""),i.Ub(3),i.Mc("ngIf","GTD"==t.sellOrderValidity||"bondOTC"==t.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf","DAY"==t.sellOrderValidity&&"bondOTC"!==t.selectedBondTransactionType),i.Ub(2),i.td("",t.selectedBond.bondCurrencyCode," ",i.Gc(40,25,t.indicativeAI,"1.2-2")," "),i.Ub(2),i.Mc("nzTooltipTitle",e),i.Ub(3),i.Mc("ngIf",t.sstRate>0)("ngIfElse",n),i.Ub(1),i.Mc("ngIf",t.selectedBond.bondCurrencyCode!==t.bondSellForm.get("redemptionCurrency").value)}}function oi(e,t){if(1&e&&i.mc(0,"ui-option",163),2&e){const e=t.$implicit;i.Mc("nzLabel",e.accountTypeDisplay)("nzValue",e.refno)}}function ii(e,t){if(1&e){const e=i.sc();i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3,"Account"),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",161),i.zc("ngModelChange",(function(){return i.dd(e),i.Dc(2).acctRefnoChange(!0)})),i.Ec(7,"async"),i.Ec(8,"async"),i.od(9,oi,1,2,"ui-option",162),i.Ec(10,"async"),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);var n;const t=(null==(n=i.Fc(7,6,e.authenticatedDisplay$))?null:n.length)>1&&!e.modifyView;var o=null;const a=null!=(o=e.bondSellForm.get("refno"))&&o.dirty&&null!=(o=e.bondSellForm.get("refno"))&&o.hasError("required")?"error-bg":"background-grey";var l;const c=(null==(l=i.Fc(8,8,e.authenticatedDisplay$))?null:l.length)<=1||e.modifyView;i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzShowArrow",t)("ngClass",a)("nzDisabled",c),i.Ub(3),i.Mc("ngForOf",i.Fc(10,10,e.authenticatedDisplay$))}}function li(e,t){1&e&&(i.rc(0,"div",164),i.rc(1,"div"),i.qd(2," Please choose an account. "),i.qc(),i.qc())}function ai(e,t){if(1&e){const e=i.sc();i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3,"Order Type"),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",284),i.zc("ngModelChange",(function(){return i.dd(e),i.Dc(2).resetSellType()})),i.mc(7,"ui-option",163),i.mc(8,"ui-option",163),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(3),i.Mc("nzLabel",e.sellOrderType.Market.label)("nzValue",e.sellOrderType.Market),i.Ub(1),i.Mc("nzLabel",e.sellOrderType.Price.label)("nzValue",e.sellOrderType.Price)}}function ci(e,t){if(1&e&&(i.rc(0,"nz-col",285),i.mc(1,"uic-list-item",179),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Nc("value",i.Gc(2,4,null==e.limitOrderPrice?null:e.limitOrderPrice.value,"1.3-3")),i.Mc("info",e.getSellOrderPlaceHolder())("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function si(e,t){if(1&e){const e=i.sc();i.rc(0,"div",170),i.rc(1,"uic-icon",171),i.zc("click",(function(){return i.dd(e),i.Dc(4).onMinusPrice()})),i.qc(),i.rc(2,"uic-icon",172),i.zc("click",(function(){return i.dd(e),i.Dc(4).onAddPrice()})),i.qc(),i.qc()}2&e&&(i.Ub(2),i.Mc("ngClass","ml-12px"))}function ri(e,t){if(1&e&&i.od(0,si,3,1,"div",286),2&e){const e=i.Dc(3);i.Mc("ngIf",!e.diasbleSellLimitPrice)}}function di(e,t){if(1&e&&(i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-input-wrapper"),i.rc(6,"nz-input-group",155),i.mc(7,"input",168),i.qc(),i.qc(),i.od(8,ri,1,1,"ng-template",null,169,i.pd),i.qc(),i.qc()),2&e){const e=i.ad(9),t=i.Dc(2);i.Ub(1),i.Mc("nzSpan",5),i.Ub(2),i.rd(t.getSellOrderPlaceHolder()),i.Ub(1),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzSuffix",e)("ngClass",null!=t.limitOrderPrice&&t.limitOrderPrice.dirty&&null!=t.limitOrderPrice&&t.limitOrderPrice.hasError("required")?"error-bg":"background-grey"),i.Ub(1),i.Nc("placeholder",t.getSellOrderPlaceHolder()),i.Mc("ngClass",null!=t.limitOrderPrice&&t.limitOrderPrice.dirty&&null!=t.limitOrderPrice&&t.limitOrderPrice.hasError("required")?"error-bg":"background-grey")("disabled",t.diasbleSellLimitPrice)}}function ui(e,t){1&e&&(i.rc(0,"div",164),i.rc(1,"div"),i.qd(2," Please make sure this field is not blank. "),i.qc(),i.qc())}function pi(e,t){if(1&e){const e=i.sc();i.rc(0,"uic-button",288),i.zc("click",(function(){return i.dd(e),i.Dc(3).handleCheckSellAll()})),i.rc(1,"span"),i.qd(2,"MAX"),i.qc(),i.qc()}}function hi(e,t){if(1&e){const e=i.sc();i.rc(0,"div",170),i.rc(1,"uic-icon",171),i.zc("click",(function(){return i.dd(e),i.Dc(2).onMinusNominalValue()})),i.qc(),i.rc(2,"uic-icon",172),i.zc("click",(function(){return i.dd(e),i.Dc(2).onAddNominalValue()})),i.qc(),i.od(3,pi,3,0,"uic-button",287),i.qc()}if(2&e){const e=i.Dc(2);i.Ub(2),i.Mc("ngClass","ml-12px"),i.Ub(1),i.Mc("ngIf",!e.noNeedSellAll)}}function bi(e,t){1&e&&(i.rc(0,"div"),i.qd(1," Amendment to increase nominal value is not allowed. "),i.qc())}function mi(e,t){1&e&&(i.rc(0,"div"),i.qd(1," Please make sure this field is not blank. "),i.qc())}function gi(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Nominal Value must at least ",e.subscribedBond.lotSize," ")}}function fi(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Minimum nominal incremental is ",i.Fc(2,1,e.checkedminSubInvestmentAmt)," ")}}function vi(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" The purchase quantity should be in lot size of incremental: ",i.Gc(2,1,e.subscribedBond.lotSize,".0-0")," ")}}function yi(e,t){if(1&e&&(i.rc(0,"div"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(3);i.Ub(1),i.sd(" Your available Quantity is ",i.Gc(2,1,null==e.selectedbondHolding?null:e.selectedbondHolding.availableQuantity,".0-0")," ")}}function Ci(e,t){if(1&e&&(i.rc(0,"div",164),i.od(1,bi,2,0,"div",0),i.od(2,mi,2,0,"div",0),i.od(3,gi,2,1,"div",0),i.od(4,fi,3,3,"div",0),i.od(5,vi,3,4,"div",0),i.od(6,yi,3,4,"div",0),i.q
1c()),2&e){const e=i.Dc(2);var n=null;const t=(null==(n=e.bondSellForm.get("nominalValue"))?null:n.dirty)&&(null==(n=e.bondSellForm.get("nominalValue"))?null:n.hasError("noIncreaseInModify"));var o=null;const r=(null==(o=e.bondSellForm.get("nominalValue"))?null:o.dirty)&&(null==(o=e.bondSellForm.get("nominalValue"))?null:o.hasError("required"));var l=null;const d=(null==(l=e.bondSellForm.get("nominalValue"))?null:l.dirty)&&(null==(l=e.bondSellForm.get("nominalValue"))?null:l.hasError("min"));var a=null;const u=(null==(a=e.bondSellForm.get("nominalValue"))?null:a.dirty)&&(null==(a=e.bondSellForm.get("nominalValue"))?null:a.hasError("minIncrement"));var c=null;const p=(null==(c=e.bondSellForm.get("nominalValue"))?null:c.dirty)&&(null==(c=e.bondSellForm.get("nominalValue"))?null:c.hasError("subAmtValidator"));var s=null;const h=(null==(s=e.bondSellForm.get("nominalValue"))?null:s.dirty)&&(null==(s=e.bondSellForm.get("nominalValue"))?null:s.hasError("notEnoughAvailableNominal"));i.Ub(1),i.Mc("ngIf",t),i.Ub(1),i.Mc("ngIf",r),i.Ub(1),i.Mc("ngIf",d),i.Ub(1),i.Mc("ngIf",u),i.Ub(1),i.Mc("ngIf",p),i.Ub(1),i.Mc("ngIf",h)}}function Mi(e,t){1&e&&(i.rc(0,"div",164),i.qd(1," You do not have holdings for this bond "),i.qc())}function Ti(e,t){if(1&e&&i.mc(0,"ui-option",163),2&e){const e=t.$implicit;i.Mc("nzLabel",e.label)("nzValue",e.value)}}function Oi(e,t){if(1&e){const e=i.sc();i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3,"Order Validity"),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",173),i.zc("ngModelChange",(function(){return i.dd(e),i.Dc(2).resetSellOrderType()})),i.od(7,Ti,1,2,"ui-option",162),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzShowArrow",!e.isUpdate)("nzDisabled",e.isUpdate),i.Ub(1),i.Mc("ngForOf",e.orderValidityList)}}function Bi(e,t){1&e&&i.nc(0)}function Si(e,t){if(1&e){const e=i.sc();i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3," Good-Till-Date "),i.rc(4,"i",174),i.zc("click",(function(){return i.dd(e),i.Dc(2).handleGtdVisible()})),i.qc(),i.qc(),i.qc(),i.rc(5,"nz-col",154),i.od(6,Bi,1,0,"ng-container",78),i.qc(),i.qc()}if(2&e){i.Dc(2);const e=i.ad(70);i.Ub(1),i.Mc("nzSpan",5),i.Ub(4),i.Mc("nzSpan",18),i.Ub(1),i.Mc("ngTemplateOutlet",e)}}function xi(e,t){if(1&e&&i.mc(0,"ui-option",291),2&e){const e=t.$implicit;i.Mc("nzValue",e)("nzLabel",e.label)}}function Pi(e,t){if(1&e&&(i.rc(0,"div",151),i.rc(1,"nz-col",152),i.rc(2,"span",153),i.qd(3,"Redemption Method"),i.qc(),i.qc(),i.rc(4,"nz-col",154),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",289),i.od(7,xi,1,2,"ui-option",290),i.qc(),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(2);var n=null;const t=null!=(n=e.bondSellForm.get("redemptionMethod"))&&n.dirty&&null!=(n=e.bondSellForm.get("redemptionMethod"))&&n.hasError("required")?"error-bg":"background-grey";i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzLoading",e.isLoadingTrustAndBank||e.bankDetail
1sLoading)("nzShowArrow",e.redemptionMethodList.length>1)("ngClass",t),i.Ub(1),i.Mc("ngForOf",e.redemptionMethodList)}}function Ei(e,t){1&e&&(i.rc(0,"div",164),i.rc(1,"div"),i.qd(2,"Please make sure this field is not blank."),i.qc(),i.qc())}function wi(e,t){if(1&e&&i.mc(0,"uic-list-item",179),2&e){const e=i.Dc(3);i.Nc("value",e.buyOrderValidity),i.Mc("info","Order Validity")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function Di(e,t){if(1&e&&(i.rc(0,"div",178),i.mc(1,"uic-list-item",179),i.mc(2,"uic-list-item",179),i.od(3,wi,1,4,"uic-list-item",159),i.mc(4,"uic-list-item",179),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Nc("value","SELL"),i.Mc("info","Order Type")("infoClass","t-xs")("valueClass","t-xs font-weight-bold text-loss"),i.Ub(1),i.Nc("value",null==e.selectedAcctModel?null:e.selectedAcctModel.accountTypeDisplay),i.Mc("info","Account")("infoClass","t-xs")("valueClass","t-xs font-weight-bold"),i.Ub(1),i.Mc("ngIf",e.showBondExpressBuyColumn),i.Ub(1),i.Nc("value",e.modifyViewPaymentMethod),i.Mc("info","Redemption Method")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function zi(e,t){if(1&e&&(i.rc(0,"div"),i.mc(1,"uic-list-item",179),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.Nc("value",e.estRedemptionAmt),i.Mc("info","Est. Redemption Amount")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function Ai(e,t){1&e&&(i.rc(0,"div",181),i.mc(1,"i",182),i.qc())}function Fi(e,t){1&e&&(i.rc(0,"small",292),i.qd(1,"You do not have sufficient units to place the order."),i.qc())}function qi(e,t){if(1&e&&(i.rc(0,"form",146),i.rc(1,"div"),i.od(2,ii,11,12,"div",147),i.Ec(3,"async"),i.rc(4,"nz-col",148),i.od(5,li,3,0,"div",149),i.qc(),i.qc(),i.rc(6,"div"),i.od(7,ai,9,6,"div",147),i.od(8,ci,3,7,"nz-col",281),i.qc(),i.rc(9,"div"),i.od(10,di,10,8,"div",147),i.rc(11,"nz-col",148),i.od(12,ui,3,0,"div",149),i.qc(),i.qc(),i.rc(13,"div"),i.rc(14,"div",151),i.rc(15,"nz-col",152),i.rc(16,"span",153),i.qd(17,"Nominal Value"),i.qc(),i.qc(),i.rc(18,"nz-col",154),i.rc(19,"uic-input-wrapper"),i.rc(20,"nz-input-group",155),i.mc(21,"input",156),i.qc(),i.qc(),i.od(22,hi,4,2,"ng-template",null,157,i.pd),i.qc(),i.qc(),i.rc(24,"nz-col",148),i.od(25,Ci,7,6,"div",149),i.od(26,Mi,2,0,"div",149),i.rc(27,"div",166),i.mc(28,"uic-list-item",179),i.Ec(29,"number"),i.qc(),i.qc(),i.qc(),i.od(30,Oi,8,5,"div",147),i.od(31,Si,7,3,"div",147),i.rc(32,"div"),i.od(33,Pi,8,6,"div",147),i.rc(34,"nz-col",148),i.od(35,Ei,3,0,"div",149),i.qc(),i.qc(),i.od(36,Di,5,13,"div",158),i.od(37,zi,2,4,"div",0),i.Ec(38,"async"),i.qc(),i.rc(39,"div",180),i.od(40,Ai,2,0,"div",282),i.od(41,Fi,2,0,"small",283),i.qc()),2&e){const e=i.ad(23),t=i.Dc();var n=null;const r=!t.isUpdate&&(null==(n=i.Fc(3,27,t.authenticatedDisplay$))?null:n.length)>1;var o=null;const d=(null==(o=t.bondSellForm.get("refno"))?null:o.dirty)&&(null==(o=t.bondSellForm.get("refno"))?null:o.hasError("required"));var l=null;const u=null!=(l=t.bondSellForm.get("nominalValue"))&&l.dirty&&(null!=(l=t.bondSellForm.get("nominalValue"))&&l.hasError("noIncreaseInModify")||null!=(l=t.bondSellForm.get("nominalValue"))&&l.hasError("required")||null!=(l=t.bondSellForm.get("nominalValue"))&&l.hasError("min")||null!=(l=t.bondSellForm.get("nominalValue"))&&l.hasError("minIncrement")||null!=(l=t.bondSellForm.get("nominalValue"))&&l.hasError("subAmtValidator")||null!=(l=t.bondSellForm.get("nominalValue"))&&l.hasError("notEnoughAvailableNominal"))?"error-bg":"background-grey";var a=null;const p=null!=(a=t.bondSellForm.get("nominalValue"))&&a.dirty&&(null!=(a=t.bondSellForm.get("nominalValue"))&&a.hasError("noIncreaseInModify")||null!=(a=t.bondSellForm.get("nominalValue"))&&a.hasError("required")||null!=(a=t.bondSellForm.get("nominalValue"))&&a.hasError("min")||null!=(a=t.bondSellForm.get("nominalValue"))&&a.hasError("minIncrement")||null!=(a=t.bondSellForm.get("nominalValue"))&&a.hasError("subAmtValidator")||null!=(a=t.bondSellForm.get("nominalValue"))&&a.hasError("notEnoughAvailableNominal"))?"error-bg":"background-grey";var c;const h=null==(c=t.bondSellForm.get("nominalValue"))?null:c.dirty;var s=null;const b=(null==(s=t.bondSellForm.get("redemptionMethod"))?null:s.dirty)&&(null==(s=t.bondSellForm.get("redemptionMethod"))?null:s.hasError("required"));i.Mc("formGroup",t.bondSellForm),i.Ub(2),i.Mc("ngIf",r),i.Ub(3),i.Mc("ngIf",d),i.Ub(2),i.Mc("ngIf","bondOTC"==t.selectedBondTransactionType),i.Ub(1),i.Mc("ngIf",t.sellType.value===t.sellOrderType.Market),i.Ub(2),i.Mc("ngIf",t.sellType.value!==t.sellOrderType.Market),i.Ub(2),i.Mc("ngIf",(null==t.limitOrderPrice?null:t.limitOrderPrice.dirty)&&(null==t.limitOrderPrice?null:t.limitOrderPrice.hasError("required"))),i.Ub(3),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzSuffix",e)("ngClass",u),i.Ub(1),i.Mc("ngClass",p)("step",null==t.selectedBond||null==t.selectedBond.bondInfoAndPerformanceModel?null:t.selectedBond.bondInfoAndPerformanceModel.minSubInvestmentAmt),i.Ub(4),i.Mc("ngIf",h),i.Ub(1),i.Mc("ngIf",t.bondSellForm.hasError("noHolding")),i.Ub(2),i.Nc("value",null!=t.selectedbondHolding&&t.selectedbondHolding.availableQuantity?i.Gc(29,29,null==t.selectedbondHolding?null:t.selectedbondHolding.availableQuantity,"1.0-0"):"-"),i.Mc("info","Balance Nominal")("infoClass","t-xs")("valueClass","t-xs font-weight-bold"),i.Ub(2),i.Mc("ngIf",t.showBondExpressSellColumn&&!t.isUpdate),i.Ub(1),i.Mc("ngIf","GTD"==t.sellOrderValidity&&t.showBondExpressSellColumn),i.Ub(2),i.Mc("ngIf",!t.isUpdate),i.Ub(2),i.Mc("ngIf",b),i.Ub(1),i.Mc("ngIf",t.isUpdate),i.Ub(1),i.Mc("ngIf",!i.Fc(38,32,t.isMobile$)),i.Ub(3),i.Mc("ngIf",t.disabledSell),i.Ub(1),i.Mc("ngIf",t.disabledSell)}}function Ii(e,t){if(1&e&&(i.rc(0,"p"),i.qd(1),i.qc()),2&e){const e=t.$implicit;i.Ub(1),i.rd(null==e?null:e.nzLabel)}}function _i(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"shared-approve-action",238),i.zc("emitCancel",(function(){return i.dd(e),i.Dc().onHandleCancel()}))("onApprove",(function(t){return i.dd(e),i.Dc().onClickApprove(t)}))("on2FaMethodChecked",(function(){return i.dd(e),i.Dc().on2FaMethodChecked()})),i.qc(),i.oc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("refno",e.selectedAcctModel.refno)("requestKey",e.APPROVE_TRADE_REQUEST_KEY)("actionKey",e.BOND_SELL_ACTION_KEY)("width",600)}}function Ri(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"shared-approve-action",238),i.zc("emitCancel",(function(){return i.dd(e),i.Dc().onHandleCancel()}))("onApprove",(function(t){return i.dd(e),i.Dc().onClickApprove(t)}))("on2FaMethodChecked",(function(){return i.dd(e),i.Dc().on2FaMethodChecked()})),i.qc(),i.oc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("refno",e.selectedAcctModel.refno)("requestKey",e.APPROVE_TRADE_REQUEST_KEY)("actionKey",e.BOND_SELL_ACTION_KEY)("width",600)}}const ki=function(){return{"border-style":"none"}};function Ui(e,t){if(1&e){const e=i.sc();i.rc(0,"nz-date-picker",293),i.zc("ngModelChange",(function(t){return i.dd(e),i.Dc().tdyDate=t}))("ngModelChange",(function(t){return i.dd(e),i.Dc().onDateChange(t)}
1)),i.qc()}if(2&e){const e=i.Dc();i.Mc("ngStyle",i.Rc(7,ki))("nzDisabled",e.isUpdate)("nzDisabledDate",e.disablePastDatesAnd30DaysLater)("ngModel",e.tdyDate)("nzFormat",e.DATE_FORMAT)("nzShowToday",!1)("nzAllowClear",!1)}}function Li(e,t){1&e&&(i.rc(0,"span",136),i.qd(1,"-"),i.qc())}function Vi(e,t){1&e&&(i.rc(0,"span",135),i.qd(1,"-"),i.qc())}function Ni(e,t){1&e&&(i.rc(0,"span",294),i.qd(1,"-"),i.qc())}function Yi(e,t){1&e&&i.mc(0,"uic-round-button",295),2&e&&i.Mc("nzIcon","icon-close-o close-icon-size")}function ji(e,t){1&e&&(i.rc(0,"div",47),i.rc(1,"h5"),i.qd(2," Your order for this bond meets the minimum Full Lot nominal size. Please consider placing your order at BondExpress (Full Lot) to avoid partial fills. "),i.qc(),i.mc(3,"br"),i.qc())}function Hi(e,t){if(1&e&&(i.rc(0,"h5"),i.qd(1),i.qc()),2&e){const e=i.Dc();i.Ub(1),i.sd(" If you place this order, the remaining ",e.sellNominalBalance," will become odd lots and may not meet the min. amount again to sell later. To sell all, please consider placing the entire nominal amount at the OTC market. ")}}function Gi(e,t){1&e&&(i.rc(0,"h5"),i.qd(1," Your order for this bond meets the minimum Full Lot nominal size. Please consider placing your order at BondExpress (Full Lot) to avoid partial fills. "),i.qc())}function Wi(e,t){if(1&e){const e=i.sc();i.rc(0,"button",296),i.zc("click",(function(){return i.dd(e),i.Dc().proceedToBeFull()})),i.qd(1,"PROCEED TO BE (FULL)"),i.qc()}if(2&e){const e=i.Dc();i.Mc("nzLoading",e.isLoadingForModal)}}function Qi(e,t){if(1&e){const e=i.sc();i.rc(0,"button",296),i.zc("click",(function(){return i.dd(e),i.Dc().proceedToBeFull()})),i.qd(1,"PROCEED TO BE (FULL)"),i.qc()}if(2&e){const e=i.Dc();i.Mc("nzLoading",e.isLoadingForModal)}}function $i(e,t){if(1&e){const e=i.sc();i.rc(0,"button",296),i.zc("click",(function(){return i.dd(e),i.Dc().proceedToOTC()})),i.qd(1,"PROCEED TO OTC"),i.qc()}if(2&e){const e=i.Dc();i.Mc("nzLoading",e.isLoadingForModal)}}function Ki(e,t){if(1&e){const e=i.sc();i.rc(0,"button",308),i.zc("click",(function(){return i.dd(e),i.Dc(2).onContinueToSell()})),i.qd(1,"Continue To Sell"),i.qc()}}function Xi(e,t){if(1&e){const e=i.sc();i.rc(0,"nz-modal",297),i.zc("nzVisibleChange",(function(t){return i.dd(e),i.Dc().showSellRetentionModal=t}))("nzOnCancel",(function(){return i.dd(e),i.Dc().onCloseSellRetentionModal()}))("nzAfterOpen",(function(){return i.dd(e),i.Dc().onModalOpen()})),i.rc(1,"div",298),i.mc(2,"i",299),i.qc(),i.rc(3,"div",300),i.rc(4,"span",301),i.qd(5,"Potential Selling Complication"),i.qc(),i.qc(),i.rc(6,"div",302),i.qd(7," The nominal value you've entered may result in remaining units that might not meet the full lot selling conditions later. We recommend contacting our bond dealer for assistance at "),i.rc(8,"a",303),i.qd(9,"+603-2149 0652"),i.qc(),i.qd(10,". "),i.qc(),i.rc(11,"div",304),i.rc(12,"button",305),i.zc("click",(function(){return i.dd(e),i.Dc().onCloseSellRetentionModal()})),i.qd(13,"Cancel"),i.qc(),i.od(14,Ki,2,0,"button",306),i.rc(15,"button",307),i.zc("click",(function(){return i.dd(e),i.Dc().onContactDealer()})),i.qd(16,"Contact Dealer"),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Mc("nzVisible",e.showSellRetentionModal)("nzClosable",!0)("nzFooter",null)("nzTitle",null)("nzClassName","custom-popup-modal")("nzMaskClosable",!1),i.Ub(14),i.Mc("ngIf",e.showContinueToSellButton)}}function Ji(e,t){1&e&&(i.rc(0,"div"),i.rc(1,"div",313),i.rc(2,"span",314),i.qd(3,"This bond is now classified as "),i.rc(4,"span",315),i.qd(5,"Speculative / Distressed"),i.qc(),i.qd(6," profile."),i.qc(),i.qc(),i.rc(7,"div",311),i.qd(8," The risk of loss in purchasing this bond can be substantial. You should therefore assess if the purchase of this bond is suitable for you in light of your objective, financial resources and other relevant circumstances. In deciding whether to purchase this bond you should be aware of the following: "),i.mc(9,"br"),i.rc(10,"div",316),i.qd(11," 1. The purchase of this bond is subject to higher risk of default. In the event of default, you may not able to receive back both interest and principal. "),i.mc(12,"br"),i.qd(13," 2. The higher degree of fluctuation and volatility of bond\u2019s price. "),i.mc(14,"br"),i.qd(15," 3. The higher level of liquidity risk. Under certain conditions, it may become difficult to sell this bond. "),i.mc(16,"br"),i.qc(),i.qd(17," This brief warning cannot disclose all the risks associated with the purchase of this bond. You should conduct your own risk assessment and seek professional advice, where necessary. "),i.qc(),i.qc())}function Zi(e,t){if(1&e){const e=i.sc();i.rc(0,"nz-modal",309),i.zc("nzOnCancel",(function(){return i.dd(e),i.Dc().onCloseRiskNote()}))("nzAfterOpen",(function(){return i.dd(e),i.Dc().onModalOpen()})),i.rc(1,"div",310),i.mc(2,"i",44),i.rc(3,"span",45),i.qd(4,"You are taking too much risk."),i.qc(),i.qc(),i.rc(5,"div",311),i.qd(6," I/We notice that my/our selected investments belong to a risk class higher than my/our tolerance. FSMOne has already provided the appropriate and necessary w
1arning on the risks associated with the investments to ensure my/our awareness on the risk mismatch and potential losses. Despite this, I/we consider my/our selected investments are suitable for my/our personal circumstances and decide to proceed with my/our transaction request(s). "),i.qc(),i.od(7,Ji,18,0,"div",0),i.rc(8,"div",95),i.rc(9,"button",96),i.zc("click",(function(){return i.dd(e),i.Dc().onCloseRiskNote()})),i.qd(10,"Cancel"),i.qc(),i.rc(11,"button",312),i.zc("click",(function(){return i.dd(e),i.Dc().onRiskApprove()})),i.qd(12,"I Agree & Check Out"),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Mc("nzVisible",e.isRiskExcessive)("nzFooter",null)("nzWidth",600)("nzClassName","custom-popup-modal"),i.Ub(7),i.Mc("ngIf","DISTRESS"===(null==e.selectedBond?null:e.selectedBond.bondSuitabilityCode))}}let el=(()=>{class e{constructor(e,t,n,o,l,a,c,s,r,d,u,p,h,g,f,v,M,T,S,x,P,w,D){this.fb=e,this.accountRestService=t,this.subHandlingService=n,this.trustAccountRestService=o,this.holdingRestService=l,this.store=a,this.bondRestService=c,this.bondCalculatorService=s,this.transactionBondRestService=r,this.nzNotificationService=d,this.twoFaService=u,this.subHandler=p,this.router=h,this.utilityRestService=g,this.bondfactsheetService=f,this.lightstreamerBondService=v,this.renderer=M,this.modalService=T,this.accountService=S,this.siDeclarationService=x,this.decimalPipe=P,this.datePipe=w,this.passportExpiryNotificationService=D,this.getAutoSweepTopUpUrl=e=>Object(O.c)({action:O.a.TOP_UP,refno:this.defaultRefno,autoSweep:!0,autoSweepCurrency:e}),this.visibleChange=new i.s,this.successUpdate=new i.s,this.successTransact=new i.s,this.nominalValueSubject=new m.a,this.imagePath=B.g.STOCKS_IMG_PATH,this.transactionImgPath=B.g.TRANSACTION_IMG_PATH,this.cashFlowNominalValue=0,this.fepBreached=!1,this.isBotSheetExpand=!1,this.shortfallAmt=0,this.transactionConstant=C.a,this.fxIndicativeRate={},this.displayFxRate=0,this.isExchangeHolidayModalVisible=!1,this.bondType="",this.buttonGroupClass={"px-4":!this.isMobile$},this.buyOrderType=E.a.OrderType,this.allBondMarkupRate=[],this.investmentCurrencyList=["MYR"],this.estPayableAmt=0,this.estTotalReturn=0,this.showAllAction=!1,this.importantNote=!1,this.trustAcctList=[],this.trustAcctListForSell=[],this.autoSweepAccountList=[],this.isLoadingTrustAndAutoSweepAcct=!1,this.isLoadingAutoSweepFxRate=!1,this.cashFundBalance=0,this.paymentMethodList=[],this.displayPaymentMethodList=[],this.steps="prePreviewOrder",this.readyToPreview=!1,this.bondDocumentList=[],this.indicatePrice=0,this.indicativeAI=0,this.upfrontFee=0,this.estTotalAmtPayable=0,this.estTotalInvAmtPayable=0,this.principalAmt=0,this.principalSellAmt=0,this.bufferAmt=0,this.bondTransactionOptions=A.a.BOND_RMO_BUY_TRANSACTION_TYPE_OPTION,this.selectedBondTransactionType="beFull",this.nextCallEnabledPrePreview=!1,this.nextCallEnabledPostPreview=!1,this.beEstTotalAmtPayable=0,this.beBufferRate=0,this.bufferRate=0,this.approving=!1,this.approvingBuy=!1,this.approvingSell=!1,this.isModifyBuyOrder=!1,this.isModifySellOrder=!1,this.isModifyBuyFirst=!1,this.isModifySellFirst=!1,this.bidPrice="152.06",this.orderPadView="default",this.orderPadViews=[{label:"Default",value:"default"},{label:"Cash Flow",value:"cashflow"}],this.beOrderPadViews=Object(y.a)(this.orderPadViews),this.subscribedBond={},this.isBuyActive=!1,this.isSellActive=!1,this.modifyView=!1,this.disabledSell=!1,this.isLoadingPreviewOrder=!1,this.isLoadingPreOrderFS=!1,this.isLoadingIntradayChart=!1,this.sellOrderType=E.a.OrderType,this.isSellAll=!1,this.redemptionCurrencyList=[],this.redemptionMethodList=[],this.displayRedemptionMethodList=[],this.allAvailableBank=[],this.localBanks=[],this.overseaBanks=[],this.bankModelList=[],this.showBondExpressBuyColumn=!1,this.showBondExpressSellColumn=!1,this.orderValidity="DAY",this.sellOrderValidity="DAY",this.startOfToday=new Date,this.DATE_FORMAT="dd MMM yyyy",this.gtdVisible=!1,this.showRemarksModal=!1,this.showSuspensionModal=!1,this.showSuspensionMsg=!1,this.showBuyFullSizeAtOdd=!1,this.showSellRemarksMsg=!1,this.showSellRemarksOTCMsg=!1,this.showSellMeetFullSize=!1,this.sellNominalBalance=0,this.routeToTab="bondOTC",this.isLoadingTrustAndBank=!1,this.bankDetail
1sLoading=!1,this.isLoadingForPass=!1,this.sellBondCartModel={},this.estTotalInvAmtReceivable=0,this.estTotalAmtReceivable=0,this.tdyDate=new Date,this.epochTime=this.tdyDate.getTime(),this.marketDepthDataBid=[],this.marketDepthDataAsk=[],this.buySettlementDateString=this.startOfToday.getDate()+"-"+this.startOfToday.toLocaleString("default",{month:"short"})+"-"+this.startOfToday.getFullYear(),this.fsmProcessingFee=0,this.noNeedSellAll=!1,this.acceptOrderpadExperience=!1,this.markupRate=1.03,this.isLoadingForModal=!1,this.diasbleBuyLimitPrice=!1,this.diasbleSellLimitPrice=!1,this.w8BenChecked=!1,this.showPreviewOrder=!0,this.isRiskExcessive=!1,this.showForceUpdateModal=!1,this.sellRetentionAmtCheck=!1,this.show1Dselection=!0,this.showSellRetentionModal=!1,this.showContinueToSellButton=!1,this.showChart=!1,this.rmoEnabled=!1,this.netAskYield=0,this.sstRate=0,this.passportNoticeVisible=!1,this.APPROVE_TRADE_REQUEST_KEY=_.a.APPROVE_TRADE,this.BOND_TRANS_ACTION_KEY=z.a.BOND_BUY,this.BOND_SELL_ACTION_KEY=z.a.BOND_SELL,this.AUTO_SWEEP=C.a.AUTO_SWEEP,this.orderValidityList=[{label:"Day",value:"DAY"},{label:"GTD",value:"GTD"}],this.disablePastDatesAnd30DaysLater=e=>{if(!e)return!1;const t=new Date(this.startOfToday.getFullYear(),this.startOfToday.getMonth(),this.startOfToday.getDate()+30);let n=this.startOfToday;const o=this.nextBusinessDate?new Date(this.nextBusinessDate):null,i=o&&!isNaN(o.getTime())?o:null;if(this.isAfterCutOffTime(n)&&i&&(n=i),this.subscribedBond.lastTradingDate){const o=new Date(this.subscribedBond.lastTradingDate);if(!isNaN(o.getTime())&&o.getTime()<=t.getTime())return e.getTime()<n.getTime()||e.getTime()>o.getTime()}return e.getTime()<n.getTime()||e.getTime()>t.getTime()},this.authenticatedDisplay=this.store.selectSnapshot(b.a.getAccounts)}ngOnDestroy(){this.subscription&&(this.lsClient.unsubscribe(this.subscription),this.subscription=null),this.subscriptionMD&&this.lsClient.unsubscribe(this.subscriptionMD)}ngOnChanges(e){console.log(e),this.checkRmoEnabled(),this.loadBondRmoCutOffTime(),this.determineSelectedBondTypeAndTransType(e),this.initializeBondBuyForm(e),this.initializeBondSellForm(e),this.getAndCheckW8BenDetails(e),this.initializeBidandAskPriceData(e),"beFull"!=this.selectedBondTransactionType&&"beOdd"!=this.selectedBondTransactionType||this.subscribeLSForBestBuySellPrice(e),this.getBondFactsheet(),this.subHandler.subscribe(this.nominalValueSubject.pipe(Object(a.a)(1e3),Object(c.a)(e=>{const t=e%this.checkedminSubInvestmentAmt;0!==t&&(t>=this.checkedminSubInvestmentAmt/2?this.bondBuyForm.get("nominalValue").setValue(e-t+this.checkedminSubInvestmentAmt):this.bondBuyForm.get("nominalValue").setValue(e-t)),e<this.checkedminInitialAmt&&this.bondBuyForm.get("nominalValue").setValue(this.checkedminInitialAmt),this.cashFlowNominalValue=this.bondBuyForm.get("nominalValue").value}))),this.store.select(U.G.getSellBondCartModel).subscribe(e=>{this.sellBondCartModel=e}),this.getBondMarkupRate(),"bondOTC"===this.selectedBondTransactionType&&this.getBondCalculatorNetYield(),this.getBondCalculatorData(),this.getBondDocumentList()}ngOnInit(){this.store.dispatch(new R.b),this.loadBondRmoCutOffTime(),this.checkRmoEnabled(),this.getBondFactsheet(),this.getBondMarkupRate(),this.initSStRate()}determineSelectedBondTypeAndTransType(e){this.bondTransactionOptions=Object(y.a)(A.a.BOND_RMO_BUY_TRANSACTION_TYPE_OPTION),console.log(this.bondTransactionOptions),console.log(this.selectedBond),console.log(this.bondExpressAvailable),console.log(this.lotType),console.log(e);let t=!1;if(e&&e.selectedBond&&e.selectedBond.previousValue?("Y"===e.selectedBond.currentValue.bexFullLotSuspension||"Y"===e.selectedBond.currentValue.bexOddLotSuspension?(this.bondTransactionOptions[0].show=!1,this.bondTransactionOptions[1].show=!1):("Y"===e.selectedBond.currentValue.bexFullLotEnabled&&"N"===e.selectedBond.currentValue.bexFullLotSuspension&&this.rmoEnabled&&(this.bondTransactionOptions[1].show=!0,this.bondTransactionOptions[3].show=!1,t=!0),"Y"===e.selectedBond.currentValue.bexOddLotEnabled&&"N"===e.selectedBond.currentValue.bexOddLotSuspension&&this.rmoEnabled&&(this.bondTransactionOptions[0].show=!0,this.bondTransactionOptions[3].show=!1,t=!0)),this.bondExpressAvailable?t||(this.bondTransactionOptions[2].show=!0,this.selectedBondTransactionType="bondExpress"):(this.bondTransactionOptions[2].show=!1,this.bondTransactionOptions[3].show=!1),this.isBondExpress="N"!==e.selectedBond.currentValue.bexOddLotEnabled||"N"!==e.selectedBond.currentValue.bexFullLotEnabled):("Y"===this.selectedBond.bexFullLotSuspension||"Y"==this.selectedBond.bexOddLotSuspension?(this.bondTransactionOptions[0].show=!1,this.bondTransactionOptions[1].show=!1):("Y"===this.selectedBond.bexFullLotEnabled&&"N"===this.selectedBond.bexFullLotSuspension&&this.rmoEnabled&&(this.bondTransactionOptions[1].show=!0,this.bondTransactionOptions[3].show=!1,t=!0),"Y"===this.selectedBond.bexOddLotEnabled&&"N"===this.selectedBond.bexOddLotSuspension&&this.rmoEnabled&&(this.bondTransactionOptions[0].show=!0,this.bondTransactionOptions[3].show=!1,t=!0)),!this.bondExpressAvailable||this.bondTransactionOptions[0].show||this.bondTransactionOptions[1].show?this.bondTransactionOptions[2].show=!1:t||(this.bondTransactionOptions[2].show=!0,this.selectedBondTransactionType="bondExpress"),this.isBondExpress="N"!==this.selectedBond.bexOddLotEnabled||"N"!==this.selectedBond.bexFullLotEnabled),console.log(this.selectedBondTransactionType),e&&e.lotType)switch(e.lotType.currentValue){case A.a.FULL_LOT:this.bondType=A.a.FULL_LOT,this.bondTransactionOptions[1].active=!0,this.bondTransactionOptions[3].show=!1,this.selectedBondTransactionType="beFull",this.orderPadViews=this.beOrderPadViews,this.showBondExpressBuyColumn=!0,this.showBondExpressSellColumn=!0;break;case A.a.ODD_LOT:this.bondType=A.a.ODD_LOT,this.bondTransactionOptions[0].active=!0,this.bondTransactionOptions[3].show=!1,this.selectedBondTransactionType="beOdd",this.orderPadViews=this.beOrderPadViews,this.showBondExpressBuyColumn=!0,this.showBondExpressSellColumn=!0;break;case"bondExpress":if(this.bondTransactionOptions[2].show){this.bondType=A.a.BOND_EXPRESS,this.bondTransactionOptions[2].active=!0,this.selectedBondTransactionType="bondExpress";break}case A.a.OTC:default:this.bondType=A.a.OTC,this.bondTransactionOptions[3].active=!0,this.bondTransactionOptions[1].show=!1,this.bondTransactionOptions[0].show=!1,this.orderPadViews=this.orderPadViews.filter(e=>"Default"!==e.label),this.selectedBondTransactionType="bondOTC",this.orderPadView="cashflow",this.showBondExpressBuyColumn=!1,this.showBondExpressSellColumn=!1}else switch(this.lotType){case A.a.FULL_LOT:this.bondType=A.a.FULL_LOT,this.bondTransactionOptions[1].active=!0,this.bondTransactionOptions[3].show=!1,this.selectedBondTransactionType="beFull",this.orderPadViews=this.beOrderPadViews,this.showBondExpressBuyColumn=!0,this.showBondExpressSellColumn=!0;break;case A.a.ODD_LOT:this.bondType=A.a.ODD_LOT,this.bondTransactionOptions[0].active=!0,this.bondTransactionOptions[3].show=!1,this.selectedBondTransactionType="beOdd",this.orderPadViews=this.beOrderPadViews,this.showBondExpressBuyColumn=!0,this.showBondExpressSellColumn=!0;break;case"bondExpress":if(this.bondTransactionOptions[2].show){this.bondType=A.a.BOND_EXPRESS,this.bondTransactionOptions[2].active=!0,this.selectedBondTransactionType="bondExpress";break}case A.a.OTC:default:this.bondType=A.a.OTC,this.bondTransactionOptions[3].active=!0,this.bondTransactionOptions[1].show=!1,this.bondTransactionOptions[0].show=!1,this.orderPadViews=this.orderPadViews.filter(e=>"Default"!==e.label),this.selectedBondTransactionType="bondOTC",this.showBondExpressBuyColumn=!1,this.showBondExpressSellColumn=!1}(this.isUpdate||e&&e.isUpdate&&e.isUpdate.currentValue)&&this.bondTransactionOptions.map(e=>e.show=!1),e&&e.transType?"Buy"==e.transType.currentValue?this.toggleBuy(e):this.toggleSell(e):"Buy"==this.transType?this.toggleBuy(e):this.toggleSell(e),console.log(this.bondExpressAvailable)}checkBondHoldings(){console.log("CHECKING ON BOND HOLDOINGS");let e=this.defaultRefno;this.bondSellForm&&this.bondSellForm.get("refno").value&&(e=this.bondSellForm.get("refno").value),this.isLoadingPreviewOrder=!0,this.subHandlingService.once(this.holdingRestService.findHoldingList(e,"bond").pipe(Object(c.a)(e=>{if(e.status===B.a.RESPONSE_SUCCESS&&e.data){this.bondHoldings=e.data;const t=this.bondHoldings.filter(e=>
1e.productCode===this.selectedBond.issueCode);t.length>0?(this.selectedbondHolding=t[0],this.disabledSell=!1):(this.isSellActive&&(this.disabledSell=!0),this.bondExpressAvailable&&this.setForBESellDisplay())}console.log(this.selectedbondHolding),this.isLoadingPreviewOrder=!1},e=>console.log(e))))}setForBESellDisplay(){this.beSellModel={refno:this.bondSellForm.get("refno").value,sellQuantity:this.bondSellForm.get("nominalValue").value,bidPrice:this.selectedBond.bidPrice,minInvQty:this.selectedBond.minInitialAmt,incrementalQty:this.selectedBond.minSubInvestmentAmt,bidYield:this.selectedBond.bidYtm,bondCurrency:this.selectedBond.bondCurrencyCode,issueCode:this.selectedBond.issueCode}}checkIsBondExpress(e){this.subHandlingService.once(this.bondRestService.findBondExpressList("FMY").pipe(Object(c.a)(t=>{var n,o;if((null==t?void 0:t.status)!==B.a.RESPONSE_SUCCESS)return this.bondExpressAvailable=!1,void console.log(this.bondExpressAvailable);const i=[...(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.bondWholesaleList)||[],...(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.bondRetailList)||[]],l=null==i?void 0:i.find(e=>{var t;return e.issueCode===(null===(t=this.selectedBond)||void 0===t?void 0:t.issueCode)});this.bondExpressModel=l,console.log(this.selectedBond.issueCode),console.log(i),console.log(l),this.bondExpressAvailable=!!l&&0!==l.offerVolume,console.log(this.bondExpressAvailable),this.determineSelectedBondTypeAndTransType(e)})))}onClickBotSheet(){this.isBotSheetExpand=!this.isBotSheetExpand}isBondExchange(e){return"Y"===(null==e?void 0:e.bexFullLotEnabled)||"Y"===(null==e?void 0:e.bexOddLotEnabled)}showBEFullLotType(e){return"Y"===(null==e?void 0:e.bexFullLotEnabled)&&"beFull"==this.selectedBondTransactionType}showBEOddLotType(e){return"Y"===(null==e?void 0:e.bexOddLotEnabled)&&"beOdd"==this.selectedBondTransactionType}resetBuyType(){this.orderValidity="DAY"==this.bondBuyForm.get("orderValidity").value?"DAY":"GTD",this.getBondCalculatorData()}redirectToFactsheetPage(e,t){t=Object(I.a)(t),e&&Object(q.a)(["/"+B.o.BONDS,B.o.BOND_FACTSHEET,t],{issueCode:e})}loadBondRmoCutOffTime(){this.subHandlingService.once(this.transactionBondRestService.getBondRmoCutOffTimeDetails().pipe(Object(c.a)(e=>{(null==e?void 0:e.status)===B.a.RESPONSE_SUCCESS&&e.data&&(this.cutOffTime=e.data.cutOffTime,this.nextBusinessDate=e.data.nextBusinessDate?new Date(e.data.nextBusinessDate):null)})))}isAfterCutOffTime(e){this.cutOffTime||(this.cutOffTime="17:30");const t=parseInt(this.cutOffTime.replace(":",""),10);if(isNaN(t))return!1;if(e){const n=e;return 100*n.getHours()+n.getMinutes()>=t}return!1}handleGtdVisible(){this.gtdVisible=!this.gtdVisible,this.visible=!this.gtdVisible}initializeBondBuyForm(e){var t;console.log("initializeBondBuyForm"),console.log(this.selectedBond);let n=this.selectedBond.offerPrice;if("FULL"!=this.lotType&&"beFull"!=this.selectedBondTransactionType||!this.rmoEnabled?"ODD"!=this.lotType&&"beOdd"!=this.selectedBondTransactionType||!this.rmoEnabled?(this.bondType=A.a.OTC,this.checkedminInitialAmt=this.selectedBond.minInitialAmt,this.checkedminSubInvestmentAmt=this.selectedBond.minSubInvestmentAmt):(this.bondType=A.a.ODD_LOT,this.checkedminInitialAmt=this.selectedBond.bexOddLotMinLotSize,this.checkedminSubInvestmentAmt=this.selectedBond.bexOddLotSubLotSize,n=this.subscribedBond.askPrice):(this.bondType=A.a.FULL_LOT,this.checkedminInitialAmt=this.selectedBond.bexFullLotMinLotSize,this.checkedminSubInvestmentAmt=this.selectedBond.bexFullLotSubLotSize,n=this.subscribedBond.askPrice),this.isUpdate&&this.isBuyActive&&this.bondTransactionModel)console.log(this.selectedBond),console.log(this.bondTransactionModel),this.bondBuyForm=this.fb.group({refno:[this.bondTransactionModel.pendingTransactionModel.refno,[l.H.required]],buyType:[this.buyOrderType.Price,[l.H.required]],limitOrderPrice:[parseFloat(this.bondTransactionModel.pendingTransactionModel.maxPrice),[l.H.required]],nominalValue:[this.bondTransactionModel.pendingTransactionModel.unmatchedNominal,[l.H.required,l.H.min(this.checkedminInitialAmt)]],accuredInterest:[this.bondTransactionModel.pendingTransactionModel.accruedInt,[l.H.required]],orderValidity:[this.bondTransactionModel.pendingTransactionModel.rmoOrderValidity,[l.H.required]],investmentCurrency:[this.bondTransactionModel.pendingTransactionModel.currency,[l.H.required]],paymentMethod:[this.bondTransactionModel.pendingTransactionModel.paymentMode,[l.H.required]],estPayableAmt:[""],estTotalReturn:[""],netYield:[""]},{validator:this.validateAmendBondBuyExtra()}),"GTD"==this.bondTransactionModel.pendingTransactionModel.rmoOrderValidity&&this.bondTransactionModel.pendingTransactionModel.orderExpiryDate&&(this.tdyDate=this.bondTransactionModel.pendingTransactionModel.orderExpiryDate),this.rmoAccruedInterest=this.bondTransactionModel.pendingTransactionModel.rmoAccruedIntRate,this.findActiveTrustAndAutoSweepAccount(this.bondTransactionModel.pendingTransactionModel.refno),this.bondBuyForm.get("refno").disable(),this.bondBuyForm.get("accuredInterest").disable(),this.bondBuyForm.get("orderValidity").disable(),this.bondBuyForm.get("investmentCurrency").disable(),this.bondBuyForm.get("paymentMethod").disable();else{if(this.bondBuyForm){if(e&&(e.selectedBond||e.defaultRefno)){let t=e.selectedBond.currentValue.offerPrice;"FULL"==this.lotType||"beFull"==this.selectedBondTransactionType?(this.bondType=A.a.FULL_LOT,this.checkedminInitialAmt=e.selectedBond.currentValue.bexFullLotMinLotSize,this.checkedminSubInvestmentAmt=e.selectedBond.currentValue.bexFullLotSubLotSize,t=this.subscribedBond.askPrice):"ODD"==this.lotType||"beOdd"==this.selectedBondTransactionType?(this.bondType=A.a.ODD_LOT,this.checkedminInitialAmt=e.selectedBond.currentValue.bexOddLotMinLotSize,this.checkedminSubInvestmentAmt=e.selectedBond.currentValue.bexOddLotSubLotSize,t=this.subscribedBond.askPrice):(this.bondType=A.a.OTC,this.checkedminInitialAmt=e.selectedBond.currentValue.minInitialAmt,this.checkedminSubInvestmentAmt=e.selectedBond.currentValue.minSubInvestmentAmt),this.steps="prePreviewOrder",this.bondBuyForm=this.fb.group({refno:[this.defaultRefno,[l.H.required]],buyType:[this.buyOrderType.Price,[l.H.required]],limitOrderPrice:[parseFloat(t),[l.H.required]],nominalValue:[this.checkedminInitialAmt,[l.H.required,l.H.min(this.checkedminInitialAmt)]],accuredInterest:[parseFloat(this.indicativeAI.toFixed(2)),[l.H.required]],investmentCurrency:["",[l.H.required]],paymentMethod:[this.paymentMethodList[0],[l.H.required]],orderValidity:["DAY",[l.H.required]],estPayableAmt:[""],estTotalReturn:[""],netYield:[""]},{validator:this.validateBondBuyExtra()}),this.bondBuyForm.get("refno").patchValue(this.defaultRefno)}}else this.bondBuyForm=this.fb.group({refno:[this.defaultRefno,[l.H.required]],buyType:[this.buyOrderType.Price,[l.H.required]],limitOrderPrice:[parseFloat(n),[l.H.required]],nominalValue:[this.checkedminInitialAmt,[l.H.required,l.H.min(this.checkedminInitialAmt)]],accuredInterest:[parseFloat(this.indicativeAI.toFixed(2)),[l.H.required]],orderValidity:["DAY",[l.H.required]],investmentCurrency:["",[l.H.required]],paymentMethod:[this.paymentMethodList[0],[l.H.required]],estPayableAmt:[""],estTotalReturn:[""],netYield:[""]},{validator:this.validateBondBuyExtra()}),this.bondBuyForm.get("refno").patchValue(this.defaultRefno);if("bondOTC"==this.selectedBondTransactionType){this.buyType.patchValue(this.buyOrderType.Market),this.diasbleBuyLimitPrice=!0;let e=this.subscribedBond.askPrice?parseFloat(this.subscribedBond.askPrice):this.selectedBond.offerPrice;null===(t=this.buyLimitPrice)||void 0===t||t.patchValue(e.toFixed(3)),this.bondBuyForm.get("limitOrderPrice").disable()}this.acctRefnoChange(!1)}this.buyType.valueChanges.subscribe(e=>{var t;"bondOTC"==this.selectedBondTransactionType&&e.value==this.buyOrderType.Market.value?(this.diasbleBuyLimitPrice=!0,null===(t=this.buyLimitPrice)||void 0===t||t.patchValue(this.subscribedBond.askPrice?this.subscribedBond.askPrice:this.selectedBond.offerPrice),this.bondBuyForm.get("limitOrderPrice").disable()):(this.diasbleBuyLimitPrice=!1,this.bondBuyForm.get("limitOrderPrice").enable())}),this.bondBuyForm.get("orderValidity").valueChanges.subscribe(e=>{console.log("trigger GTD value change "+e),this.tdyDate="GTD"==e?this.isAfterCutOffTime(this.startOfToday)&&this.nextBusinessDate&&!isNaN(new Date(this.nextBusinessDate).getTime())?new Date(this.nextBusinessDate.getFullYear(),this.nextBusinessDate.getMonth(),this.nextBusinessDate.getDate()+1):new Date(this.startOfToday.getFullYear(),this.startOfToday.getMonth(),this.startOfToday.getDate()+1):new Date}),this.bondBuyForm.get("nominalValue").valueChanges.subscribe(e=>{this.formValueChanges()}),this.bondBuyForm.get("limitOrderPrice").valueChanges.pipe(Object(a.a)(500)).subscribe(e=>{var t,n;if(e){const o=e.toString().split(".");o.length>1&&o[1].length>3&&(null===(t=this.bondBuyForm.get("limitOrderPrice"))||void 0===t||t.patchValue(parseFloat(e).toFixed(3),{emitEvent:!1})),e<0&&(null===(n=this.bondBuyForm.get("limitOrderPrice"))||void 0===n||n.patchValue(.001))}}),this.bondBuyForm.get("accuredInterest").disable(),this.bondBuyForm.get("estPayableAmt").disable(),this.bondBuyForm.get("netYield").disable()}getBuyOrderPlaceHolder(){return this.buyType.value==this.buyOrderType.Market?"Indicative Price":"Limit Price"}getSellOrderPlaceHolder(){return this.sellType.value==this.sellOrderType.Market?"Indicative Price":"Limit Price"}validateAmendBondBuyExtra(){return e=>{e.controls.nominalValue.value>this.bondTransactionModel.pendingTransactionModel.unmatchedNominal&&this.bondBuyForm.get("nominalValue").setErrors({noIncreaseInModify:!0})}}validateAmendBondSellExtra(){return e=>{e.controls.nominalValue.value>this.bondTransactionModel.pendingTransactionModel.unmatchedNominal&&this.bondSellForm.get("nominalValue").setErrors({noIncreaseInModify:!0})}}validateBondBuyExtra(){return e=>{const t=e.controls.nominalValue;t.errors&&!t.errors.subAmtValidator||t.setErrors(t.value%this.checkedminSubInvestmentAmt!=0?{subAmtValidator:!0}:t.value>this.checkedminInitialAmt&&t.value<this.checkedminSubInvestmentAmt?{minIncrement:!0}:null)}}validateBondSellExtra(){return e=>{const t=e.controls.nominalValue;t.errors&&!t.errors.subAmtValidator||t.setErrors(t.value%this.checkedminSubInvestmentAmt!=0?{subAmtValidator:!0}:this.selectedbondHolding&&t.value>this.selectedbondHolding.availableQuantity?{notEnoughAvailableNominal:!0}:t.value>this.checkedminInitialAmt&&t.value<this.checkedminSubInvestmentAmt?{minIncrement:!0}:null)}}updateFormValidity(e){if(this.isBuyActive)if(e)this.bondBuyForm.controls[e].markAsDirty(),this.bondBuyForm.controls[e].updateV
1alueAndValidity();else{if(this.bondBuyForm.controls)for(const e in this.bondBuyForm.controls)this.bondBuyForm.controls[e].markAsDirty(),this.bondBuyForm.controls[e].updateValueAndValidity();this.bondBuyForm.updateValueAndValidity()}if(this.isSellActive)if(e)this.bondSellForm.controls[e].markAsDirty(),this.bondSellForm.controls[e].updateValueAndValidity();else{if(this.bondSellForm.controls)for(const e in this.bondSellForm.controls)this.bondSellForm.controls[e].markAsDirty(),this.bondSellForm.controls[e].updateValueAndValidity();this.bondSellForm.updateValueAndValidity()}}checkForModify(){if(this.isBuyActive){let e=this.bondTransactionModel.pendingTransactionModel.maxPrice,t=this.bondTransactionModel.pendingTransactionModel.unmatchedNominal;this.updateFormValidity(),e!==this.bondBuyForm.get("limitOrderPrice").value||t!==this.bondBuyForm.get("nominalValue").value?this.checkFormValidity(!0):this.nzNotificationService.error("No changes made","")}if(this.isSellActive){let e=this.bondTransactionModel.pendingTransactionModel.minPrice,t=this.bondTransactionModel.pendingTransactionModel.unmatchedNominal;this.updateFormValidity(),e!==this.bondSellForm.get("limitOrderPrice").value||t!==this.bondSellForm.get("nominalValue").value?this.checkFormValidity(!0):this.nzNotificationService.error("No changes made","")}}checkOnOrderPadBuyExperience(e){this.showRemarksModal=!1,this.showBuyFullSizeAtOdd=!1,this.showSuspensionModal=!1,this.showSuspensionMsg=!1;let t="Y"==this.selectedBond.bexFullLotEnabled&&"N"==this.selectedBond.bexFullLotSuspension&&this.nominalBondBuyValue>=this.selectedBond.bexFullLotMinLotSize;console.log(t),"beOdd"==this.selectedBondTransactionType&&t?(this.showRemarksModal=!0,this.showBuyFullSizeAtOdd=!0):this.proceedBuyPreviewOrder(e)}checkOnOrderPadSellExperience(e){let t;this.showRemarksModal=!1,this.showBuyFullSizeAtOdd=!1,this.showSuspensionModal=!1,this.showSuspensionMsg=!1,this.showSellRemarksOTCMsg=!1,this.showSellMeetFullSize=!1,this.selectedBond.bexFullLotMinLotSize&&(t=this.selectedBond.bexFullLotMinLotSize,console.log(this.selectedBond.bexFullLotMinLotSize)),this.sellNominalBalance=this.nominalBondSellValue-this.selectedbondHolding.availableQuantity,console.log(this.sellNominalBalance),"beFull"==this.selectedBondTransactionType&&"N"==this.selectedBond.bexOddLotEnabled&&this.sellNominalBalance%t!=0?(this.showRemarksModal=!0,this.showSellRemarksOTCMsg=!0):"beOdd"==this.selectedBondTransactionType&&"Y"==this.selectedBond.bexFullLotEnabled&&"N"==this.selectedBond.bexFullLotSuspension&&this.nominalBondSellValue>=t?(this.showRemarksModal=!0,this.showSellMeetFullSize=!0):this.proceedSellPreviewOrder(e)}checkFormValidity(e){this.isLoadingPreviewOrder=!0,this.isBuyActive&&(this.acceptOrderpadExperience?this.proceedBuyPreviewOrder(e):this.checkOnOrderPadBuyExperience(e)),this.isSellActive&&(this.acceptOrderpadExperience?this.proceedSellPreviewOrder(e):this.checkOnOrderPadSellExperience(e))}proceedBuyPreviewOrder(e){let t=this.passportExpiryNotificationService.isPersonalAccountPassportExpired(),n=!1;const o=this.getBondBuyRefno();if(o&&(n=this.passportExpiryNotificationService.checkPassportExpiredByAccount(o)),t||n)return this.passportNoticeVisible=!0,void(this.isLoadingPreviewOrder=!1);if(!this.estTotalInvAmtPayable)return;if(null!==this.paymentMethodRsp.availableBalance&&this.paymentMethodRsp.availableBalance<this.estTotalInvAmtPayable)return this.nzNotificationService.error("Error","Insufficient Balance"),void(this.isLoadingPreviewOrder=!1);if(this.calculateShortfall(),this.shortfallAmt>0)return this.nzNotificationService.error("Error","Insufficient Balance"),void(this.isLoadingPreviewOrder=!1);if("bondOTC"==this.selectedBondTransactionType){const e=this.getBondBuyRefno();this.subHandlingService.once(this.transactionBondRestService.validateBuy(e).pipe(Object(c.a)(e=>{if(e.status!==B.a.RESPONSE_SUCCESS)return this.bondBuyForm.setErrors({invalidBuy:e.errorMessage}),void(this.isLoadingPreviewOrder=!1);"VALID"===this.bondBuyForm.status&&(this.fromBondExpress=!1,this.resetIndicativePrice(),this.formValueChanges(),this.steps="postPreviewOrder",this.isLoadingPreviewOrder=!1)}))),this.isLoadingPreviewOrder=!1}this.bondRmoBuyDetailsModel=[this.getContractDetails()];let i={refno:this.getBondBuyRefno(),action:null,bondOrderList:this.bondRmoBuyDetailsModel};"beFull"!=this.selectedBondTransactionType&&"beOdd"!=this.selectedBondTransactionType||this.validateBondRmoBuy(e?this.getUpdateBuyModel():i,e)}proceedSellPreviewOrder(e){if(!this.isBondExpress||"beFull"!=this.selectedBondTransactionType&&"beOdd"!=this.selectedBondTransactionType)"VALID"===this.bondSellForm.status?(this.resetIndicativePrice(),this.steps="postPreviewOrder",this.formValueChanges(),this.isLoadingPreviewOrder=!1):this.isLoadingPreviewOrder=!1;
1else{this.bondRmoSellDetailsModel=[this.getSellContractDetails()];let t={refno:this.getBondSellRefno(),action:e?"AMEND":null,bondOrderList:this.bondRmoSellDetailsModel};this.validateBondRmoSell(e?this.getUpdateSellModel():t,this.isUpdate)}}getUpdateSellModel(){return Object.assign({refno:this.getBondSellRefno(),oldUnits:this.bondTransactionModel.pendingTransactionModel.unmatchedNominal,action:"AMEND"},this.getSellContractDetails())}getSellContractDetails(){return{productCode:"beOdd"==this.selectedBondTransactionType?this.bondInfoModel.bondInfoBean.externalBondId+"/O":this.bondInfoModel.bondInfoBean.externalBondId,sellPrice:this.bondSellForm.get("limitOrderPrice").value,redemptionQty:this.bondSellForm.get("nominalValue").value,currency:this.bondInfoModel.bondInfoBean.bondCurrencyCode,orderType:"Limit",expiredDate:this.epochTime,paymentMode:this.bondSellForm.get("redemptionMethod").value.paymentMode,orderNo:this.isUpdate?this.bondTransactionModel.pendingTransactionModel.contractNo:null,accruedInt:null==this.bondSellForm.get("accuredInterest").value?0:this.bondSellForm.get("accuredInterest").value,redemptionCurrency:this.bondSellForm.get("redemptionCurrency").value,issueCode:this.selectedBond.issueCode,orderValidity:this.bondSellForm.get("orderValidity").value,lotType:"beFull"==this.selectedBondTransactionType?A.a.FULL_LOT.toLowerCase():A.a.ODD_LOT.toLowerCase()}}validateBondRmoBuy(e,t){this.subHandlingService.once(this.transactionBondRestService.validateBondRmoBuy(e).pipe(Object(c.a)(n=>{n.status===B.a.RESPONSE_SUCCESS&&n.data?"VALID"===this.bondBuyForm.status&&(this.fromBondExpress=!0,this.resetIndicativePrice(),this.formValueChanges(),this.steps="postPreviewOrder",this.bondRmoBuyModel=Object(y.a)(e),this.modifyView=t,this.isLoadingPreviewOrder=!1):(console.log(n),this.nzNotificationService.error(n.errorMessage,""),this.isLoadingPreviewOrder=!1)})))}validateBondRmoSell(e,t){this.subHandlingService.once(this.transactionBondRestService.validateBondRmoSell(e).pipe(Object(c.a)(n=>{n.status===B.a.RESPONSE_SUCCESS?n.data.allowToSkipRetentionAmtIncrementalValidation&&!this.sellRetentionAmtCheck?this.showSellRetentionAmtModel("allow"):"VALID"===this.bondSellForm.status&&(this.bondRmoSellModel=e,this.modifyView=t,this.resetIndicativePrice(),this.steps="postPreviewOrder",this.formValueChanges(),this.isLoadingPreviewOrder=!1):(console.log(n),"Bond Sell retention amount incremental not met"==n.errorMessage||"Bond minimum retention amount not met"==n.errorMessage?this.showSellRetentionAmtModel("notAllow"):(this.nzNotificationService.error(n.errorMessage,""),this.isLoadingPreviewOrder=!1))})))}setNetYtm(e){this.netYieldType=null==e?void 0:e.yieldType,this.netYtm=(null==e?void 0:e.yield)?(null==e?void 0:e.yield)+" %":null==e?void 0:e.yield,this.bondBuyForm.get("netYield").patchValue(this.netYtm)}setEstPayableAmt(e){e&&"-"!=e?(console.log(e),this.estPayableAmt=e):this.bondBuyForm.get("estPayableAmt").patchValue(null),this.calculateShortfall()}setEstTotalReturn(e){e&&"-"!=e?this.estTotalReturn=e:this.bondBuyForm.get("estTotalReturn").patchValue(null),this.calculateShortfall()}checkOutForm(){if(console.log(this.isBuyActive+" : "+this.isSellActive),this.isLoadingForPass=!0,this.isBuyActive){if("bondOTC"===this.selectedBondTransactionType){if("VALID"!==this.bondBuyForm.status)return;if(null!==this.paymentMethodRsp.availableBalance&&this.paymentMethodRsp.availableBalance<this.estTotalInvAmtPayable)return void this.nzNotificationService.error("Error","Insufficient Balance")}"bondOTC"===this.selectedBondTransactionType&&"Cheque / FPX"===this.paymentMethodRsp.label&&(this.importantNote=!0),this.modifyView?this.check2FaMethod():this.importantNote||(!this.isBondExpress||"beFull"!=this.selectedBondTransactionType&&"beOdd"!=this.selectedBondTransactionType?this.confirmTransaction():this.confirmTransactionForBondRMOExpress())}this.isSellActive&&("bondOTC"===this.selectedBondTransactionType?"VALID"===this.bondSellForm.status&&this.check2FaMethod():this.check2FaMethod())}onClickApprove(e){this.isModifyBuyFirst?this.updateBondRmoBuyContractWithCredential(e):this.isModifySellFirst?this.updateBondRmoSellContractWithCredential(e):this.approvingBuy?"beFull"===this.selectedBondTransactionType||"beOdd"==this.selectedBondTransactionType?this.createBondExpressBuyWithCredential(e):"bondOTC"===this.selectedBondTransactionType?this.createBondOTCBuyWithCredential(e):"bondExpress"===this.selectedBondTransactionType&&this.createBondExpressBuy(e):this.approvingSell&&this.subHandlingService.once(e.pipe(Object(s.a)(e=>{const t=Object(y.a)(this.store.selectSnapshot(U.X.getBankAccountToCreate));let n=t.length>0?t[0]:null;if(n=Object.assign(Object.assign({},n),e),("cheque"!==this.redemptionMethod.paymentMode||this.bankExist)&&(n=null),"bondOTC"===this.selectedBondTransactionType){const t=Object.assign({issueCode:this.selectedBond.issueC
1ode,indicativePrice:this.indicatePrice,nominalValue:this.nominalBondSellValue,orderType:this.sellType.value.value,redemptionCurrency:this.redemptionCurrency,redemptionMethod:this.redemptionMethod.paymentMode,trustId:this.redemptionMethod.id,minPrice:this.limitOrderPrice.value,iamAccountBankDetailsModel:n},e);return console.log(t),this.transactionBondRestService.createBondSell(this.selectedAcctModel.refno,t).pipe(this.twoFaService.intercept())}if("bondExpress"==this.selectedBondTransactionType){const t=Object.assign(Object.assign({},this.bondExpressSellTransactionModel),e);return this.transactionBondRestService.createBondExpressSellContract(this.selectedAcctModel.refno,t).pipe(this.twoFaService.intercept())}{const t=Object.assign(Object.assign({},this.bondRmoSellModel),e);return this.transactionBondRestService.createBondRmoSell(t).pipe(this.twoFaService.intercept())}}),Object(c.a)(e=>{if(this.isLoadingForPass=!1,B.a.RESPONSE_SUCCESS===e.status){if(this.closeBondDetails(),["bondOTC","bondExpress"].includes(this.selectedBondTransactionType)&&!this.rmoEnabled){const t=e.data;t&&this.router.navigate([Object(P.a)(B.o.APP,B.o.TRADE,B.o.BOND_SELL_CHECK_OUT)],{queryParams:{saleOrderNo:t.saleOrderNo,refno:this.selectedAcctModel.refno}})}else this.createNotification("success","Your order have placed successful, you can continue now check your order in our order book","Order Place Successful",!0,!1),this.onSuccessTransact();this.approvingSell=!1}else this.nzNotificationService.error("Failed",e.errorMessage),this.steps="prePreviewOrder",this.onHandleCancel()}),Object(r.a)(()=>this.store.dispatch(new R.e(!1,!0)))))}acctRefnoChange(e=!1){let t=this.bondBuyForm.get("refno").value;this.isSellActive&&(t=this.bondSellForm.get("refno").value),this.isSellActive?(this.generateAndResetForm(),this.checkBondHoldings()):this.findActiveTrustAndAutoSweepAccount(t),e&&this.getBondCalculatorData()}closeBondDetails(e){this.visible=!1,this.visibleChange.emit(!1),e||(this.closeImportantNote(),this.resetBondDetails())}onRiskApprove(){this.isRiskExcessive=!1}onCloseRiskNote(){this.isRiskExcessive=!1,this.visible=!1,this.visibleChange.emit(!1)}resetBondDetails(){this.readyToPreview=!1}closeImportantNote(){this.importantNote=!1}backToPreviewOrder(){this.importantNote=!1,this.visible=!0,this.visibleChange.emit(this.visible)}resetInvestmentCurrency(){this.investmentCurrencyList=["MYR"],this.selectedBond&&"MYR"!==this.selectedBond.bondCurrencyCode&&this.investmentCurrencyList.push(this.selectedBond.bondCurrencyCode),this.bondBuyForm.get("investmentCurrency").value||this.bondBuyForm.get("investmentCurrency").setValue(this.selectedBond.bondCurrencyCode)}subscribeBuyInvestmentCurrencyChange(){var e;this.subHandlingService.subscribe(null===(e=this.bondBuyForm.get("paymentMethod"))||void 0===e?void 0:e.valueChanges.pipe(Object(d.a)(),Object(c.a)(e=>{var t,n,o,i;if(console.log(e),e){const l=null===(i=null===(o=null===(n=null===(t=this.paymentMethodList)||void 0===t?void 0:t.filter(t=>(null==t?void 0:t.value)===(null==e?void 0:e.value)))||void 0===n?void 0:n[0])||void 0===o?void 0:o.currency)||void 0===i?void 0:i.toUpperCase();this.bondBuyForm.get("investmentCurrency").patchValue(l)}this.setTotalInvAmtPayable(),this.calculateShortfall()})))}checkBondBuyCurrency(){var e,t,n,o,i,l,a,c,s,r;if(this.paymentMethodList.sort((e,t)=>t.availableBalance-e.availableBalance),null===(e=this.paymentMethodList)||void 0===e?void 0:e.find(e=>{var t;return e.currency===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)})){this.investmentCurrencyList.includes(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)||(this.investmentCurrencyList.push(null===(n=this.selectedBond)||void 0===n?void 0:n.bondCurrencyCode),null===(o=this.bondBuyForm.get("investmentCurrency"))||void 0===o||o.patchValue(null===(i=this.selectedBond)||void 0===i?void 0:i.bondCurrencyCode)),this.displayPaymentMethodList=null===(l=this.paymentMethodList)||void 0===l?void 0:l.filter(e=>{var t;return(null==e?void 0:e.currency)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)});const e=null===(a=this.displayPaymentMethodList)||void 0===a?void 0:a.reduce((e,t)=>
1t.availableBalance>((null==e?void 0:e.availableBalance)||0)?t:e,null);return void this.bondBuyForm.get("paymentMethod").patchValue(e)}null===(c=this.bondBuyForm.get("investmentCurrency"))||void 0===c||c.patchValue(C.a.PAYMENT_CURRENCY_MYR),this.displayPaymentMethodList=null===(s=this.paymentMethodList)||void 0===s?void 0:s.filter(e=>(null==e?void 0:e.currency)===C.a.PAYMENT_CURRENCY_MYR);const d=null===(r=this.paymentMethodList)||void 0===r?void 0:r.find(e=>(null==e?void 0:e.currency)===C.a.PAYMENT_CURRENCY_MYR);this.bondBuyForm.get("paymentMethod").patchValue(d)}resetPaymentMethodList(){var e,t,n,o,i,l;if(this.paymentMethodList=[],this.trustAcctList){let e=this.trustAcctList.filter(e=>"MYR"===e.currency||e.currency===this.selectedBond.bondCurrencyCode);e&&e.forEach(e=>{this.paymentMethodList.push({label:e.currency+" Cash Account - ["+e.currency+" "+Object(M.L)(e.availableBalance,B.a.LOCALE_EN,"0.2-2")+"]",display:e.currency+" Cash Account",value:"TRUST|"+e.trustId,paymentMode:C.a.TRUST_ACCOUNT,id:e.trustId,currency:null==e?void 0:e.currency,availableBalance:e.availableBalance})})}this.investmentCurrencyList=["MYR"],null===(e=this.bondBuyForm.get("investmentCurrency"))||void 0===e||e.patchValue(C.a.PAYMENT_CURRENCY_MYR),this.autoSweepAccountList&&(null===(t=this.autoSweepAccountList)||void 0===t?void 0:t.length)>0&&this.autoSweepAccountList.forEach(e=>{var t;((null==e?void 0:e.currency)&&(null==e?void 0:e.currency)==this.selectedBond.bondCurrencyCode||"bondOTC"==this.selectedBondTransactionType||"MYR"===(null==e?void 0:e.currency)&&"bondExpress"!==this.selectedBondTransactionType)&&(this.investmentCurrencyList.includes(null==e?void 0:e.currency)||(this.investmentCurrencyList.push(null==e?void 0:e.currency),null===(t=this.bondBuyForm.get("investmentCurrency"))||void 0===t||t.patchValue(this.selectedBond.bondCurrencyCode)),this.paymentMethodList.push({label:(null==e?void 0:e.purchasingPower)?(null==e?void 0:e.currency)+" Auto-Sweep - ["+(null==e?void 0:e.currency)+" "+Object(M.L)(null==e?void 0:e.purchasingPower,B.a.LOCALE_EN,"0.2-2")+"]":(null==e?void 0:e.currency)+" Auto-Sweep - [0.00]",display:e.currency+" Auto-Sweep",value:"Auto-Sweep|"+(null==e?void 0:e.currency),paymentMode:C.a.AUTO_SWEEP,id:null==e?void 0:e.trustId,currency:null==e?void 0:e.currency,availableBalance:(null==e?void 0:e.purchasingPower)?null==e?void 0:e.purchasingPower:0}))}),"bondOTC"!==this.selectedBondTransactionType?this.paymentMethodList=this.paymentMethodList.filter(e=>"cheque"!==e.paymentMode):this.investmentCurrencyList.includes(this.selectedBond.bondCurrencyCode),console.log(this.paymentMethodList),console.log(this.investmentCurrencyList),this.isUpdate&&(this.investmentCurrencyList.includes(null===(n=this.bondTransactionModel)||void 0===n?void 0:n.pendingTransactionModel.currency)||this.investmentCurrencyList.push(null===(o=this.bondTransactionModel)||void 0===o?void 0:o.pendingTransactionModel.currency),null===(i=this.bondBuyForm.get("investmentCurrency"))||void 0===i||i.patchValue(null===(l=this.bondTransactionModel)||void 0===l?void 0:l.pendingTransactionModel.currency),this.displayPaymentMethodList=this.paymentMethodList.filter(e=>e.currency===this.bondTransactionModel.pendingTransactionModel.currency&&e.paymentMode===this.bondTransactionModel.pendingTransactionModel.paymentMode),this.bondBuyForm.get("paymentMethod").patchValue(this.displayPaymentMethodList[0])),this.readyToPreview=!1}resetIndicativePrice(){var e,t;if(this.isBuyActive&&(this.buyType.value===this.buyOrderType.Price?(Math.round(this.bondBuyForm.get("limitOrderPrice").value),this.indicatePrice=parseFloat(null===(e=this.bondBuyForm.get("limitOrderPrice"))||void 0===e?void 0:e.value)===(null===(t=this.selectedBond)||void 0===t?void 0:t.offerPrice)?this.selectedBond.offerPrice.toFixed(3):this.bondBuyForm.get("limitOrderPrice").value):this.indicatePrice=this.selectedBond.offerPrice.toFixed(3)),this.isSellActive){const e=parseFloat(this.limitOrderPrice.value).toFixed(3);this.indicatePrice=Object(x.Gb)(e)}}findActiveTrustAndAutoSweepAccount(e){var t;this.readyToPreview=!0,this.isLoadingTrustAndAutoSweepAcct=!0,Object(g.a)([this.trustAccountRestService.findActiveTrustAccount(e).pipe(Object(u.a)(e=>Object(f.a)(null))),this.bondRestService.findBondTransactionAutoSweepList(e,!0,null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode).pi
1pe(Object(u.a)(e=>Object(f.a)(null)))]).subscribe(([e,t])=>{var n,o;e&&(this.trustAcctList=e),(null==t?void 0:t.status)===B.a.RESPONSE_SUCCESS&&(null==t?void 0:t.data)&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length)>0?(this.autoSweepAccountList=H.a.getSortedASList(Object(y.a)(t.data)),this.autoSweepAccountList&&(null===(o=this.autoSweepAccountList)||void 0===o?void 0:o.length)>0&&this.autoSweepAccountList.forEach(e=>{var t;this.getFxIndicativeRateForAutoSweep(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode,null==e?void 0:e.currency)})):this.autoSweepAccountList=[],this.resetPaymentMethodList(),this.isUpdate||(this.subscribeBuyInvestmentCurrencyChange(),this.checkBondBuyCurrency()),this.isLoadingTrustAndBank=!1,this.isLoadingTrustAndAutoSweepAcct=!1,this.isLoadingTrustAndAutoSweepAcct=!1},e=>{this.isLoadingTrustAndAutoSweepAcct=!1})}getCashFundBalance(e){this.subHandlingService.once(this.holdingRestService.getCashFundBalanceByRefno(e).pipe(Object(c.a)(e=>{e.data&&(this.cashFundBalance=e.data)})))}initSStRate(){const e=new Date;this.bondRestService.getBondSSTRate(e.toISOString().split("T")[0]).subscribe(e=>{this.sstRate=e.data,console.log("SST Rate:",this.sstRate)})}formValueChanges(){if(this.isBuyActive){let e=this.bondCalculatorData.aiPercentage;null!=this.rmoAccruedInterest&&(e=this.rmoAccruedInterest),this.indicativeAI=Object(F.b)(this.nominalBondBuyValue*e/100),console.log("indicativeAi: "+this.indicativeAI+" : "+e+" "+this.bondCalculatorData.aiPercentage),this.bondBuyForm.get("accuredInterest").setValue(parseFloat(this.indicativeAI.toFixed(2))),this.upfrontFee=Object(F.b)(this.bondCalculatorService.calculateProcessingFee(this.nominalBondBuyValue,this.bondCalculatorData.upfrontFee,this.bondCalculatorData.transactionFeeAmt,this.sstRate)),this.setTotalInvAmtPayable()}if(this.isSellActive){let e=this.bondCalculatorData.aiPercentage;null!=this.aiRate&&(e=this.aiRate),this.indicativeAI=this.bondSellForm.get("nominalValue").value*e/100,console.log("indicativeAi: "+this.indicativeAI+" : "+e+this.bondCalculatorData.aiPercentage),this.bondSellForm.get("accuredInterest").setValue(parseFloat(this.indicativeAI.toFixed(2))),this.upfrontFee=Object(F.b)(this.bondCalculatorService.calculateProcessingFee(this.bondSellForm.get("nominalValue").value,this.bondCalculatorData.upfrontFee,this.bondCalculatorData.transactionFeeAmt,this.sstRate)),this.setEstAmtReceivable()}}getBondMarkupRate(){this.subHandlingService.once(this.bondRestService.findAllBuyMarkupRate().pipe(Object(c.a)(e=>{e.data&&(this.allBondMarkupRate=e.data,this.setMarkUpRate())})))}onClickView(){var e;null===(e=this.bondCalculatorV2)||void 0===e||e.onShowResult()}setMarkUpRate(){const e=this.selectedBond.bondCurrencyCode===this.paymentCurrencyFromPaymentMethod?"N":"Y";if("bondOTC"==this.selectedBondTransactionType)this.markupRate=1.03;else{const t="N"!==this.selectedBond.bexOddLotEnabled||"N"!==this.selectedBond.bexFullLotEnabled,n=t?"RMO":"",o=this.allBondMarkupRate.filter(o=>o.fx===e&&(t?o.orderType.toUpperCase()===n:o.orderType.toUpperCase()===this.buyType.value.value.toUpperCase()));o&&0!==o.length&&(this.markupRate=1+o[0].rate/100),"GTD"==this.bondBuyForm.get("orderValidity").value&&this.selectedBond.bondCurrencyCode===this.paymentCurrencyFromPaymentMethod&&(this.markupRate=1.01)}}setEstAmtReceivable(){this.principalSellAmt=this.nominalBondSellValue*this.sellLimitPrice.value/100,this.estTotalAmtReceivable=this.principalSellAmt+this.indicativeAI-this.upfrontFee;const e=this.redemptionCurrency;e===this.selectedBond.bondCurrencyCode?(this.estTotalInvAmtReceivable=Object(F.b)(this.estTotalAmtReceivable),this.bondSellForm.get("estRedemptionAmt").patchValue(e+" "+Object(M.L)(Object(F.b)(this.estTotalInvAmtReceivable),B.a.LOCALE_EN,"1.2-2"))):this.bondCalculatorData.fxRate&&(this.estTotalInvAmtReceivable=Object(F.b)(this.estTotalAmtReceivable*this.bondCalculatorData.fxRate),this.bondSellForm.get("estRedemptionAmt").patchValue(e+" "+Object(M.L)(Object(F.b)(this.estTotalInvAmtReceivable),B.a.LOCALE_EN,"1.2-2")))}setTotalInvAmtPayable(){var e;const t=this.selectedBond.bondCurrencyCode===this.paymentCurrencyFromPaymentMethod?"N":"Y";this.setMarkUpRate(),this.bufferRate=Object(F.b)(100*(this.markupRate-1)),this.principalAmt=Object(F.b)(this.nominalBondBuyValue*this.indicatePrice/100);const n=this.principalAmt+this.indicativeAI+this.upfrontFee;if(console.log("this.principalAmt"),console.log(this.principalAmt),console.log(Object(F.b)(this.principalAmt)),console.log(n),console.log("before roundOff "+this.markupRate),this.estTotalAmtPayable=n*this.markupRate,console.log(this.estTotalAmtPayable),this.bufferAmt=Object(F.b)(this.estTotalAmtPayable-n),this.estTotalInvAmtPayable=Object(F.b)(this.estTotalAmtPayable),"Y"===t){if(console.log("in FX condition"),!this.displayFxRate){const t=this.paymentMethodList.find(e=>{var t;return e.id===(null===(t=this.paymentMethodRsp)||void 0===t?void 0:t.id)});"MYR"!==this.paymentCurrencyFromPaymentMethod&&(null==t?void 0:t.paymentMode)===C.a.AUTO_SWEEP?this.displayFxRate!==this.fxIndicativeRate[null==t?void 0:t.currency]&&(this.displayFxRate=this.fxIndicativeRate[null==t?void 0:t.currency]):this.displayFxRate=null===(e=this.bondCalculatorData)||void 0===e?void 0:e.fxAskRate}console.log(this.estTotalAmtPayable),this.estTotalInvAmtPayable=this.estTotalAmtPayable*this.displayFxRate}console.log(this.estTotalInvAmtPayable)}getBondCalculatorData(){console.log(this.epochTime),this.subHandlingService.once(this.bondRestService.getBondRmoCalculatorDataBySettlementDate(this.selectedBond.issueC
1ode,Object(M.K)(new Date,T.a.DATE_FORMAT,B.a.LOCALE_EN),!0,!0,this.defaultRefno,"bondOTC"!==this.selectedBondTransactionType,"beFull"==this.selectedBondTransactionType||"beOdd"==this.selectedBondTransactionType?this.epochTime:null).pipe(Object(c.a)(e=>{console.log("GETBONDCALCULATORDATA(): "+e.status+" : "+e.data),e.data&&(this.bondCalculatorData=e.data,console.log(this.bondCalculatorData),this.bondCalculatorData.callDate?(this.nextCallEnabledPostPreview=!0,this.nextCallEnabledPrePreview=!0):(this.nextCallEnabledPostPreview=!1,this.nextCallEnabledPrePreview=!1),this.formValueChanges(),this.setEstAmtReceivable())})))}getBondCalculatorNetYield(){let e=0,t=0,n=new Date,o=!1;this.subHandlingService.once(this.bondRestService.initBondCalculatorData(this.selectedBond.issueCode,this.defaultRefno).pipe(Object(c.a)(i=>{var l,a,c,s,r,d;(null==i?void 0:i.status)===B.a.RESPONSE_SUCCESS&&"active"===(null===(l=null==i?void 0:i.data)||void 0===l?void 0:l.status)&&(o="Y"===(null===(a=i.data)||void 0===a?void 0:a.perpetual)||2165===new Date(null===(c=i.data)||void 0===c?void 0:c.maturityDate).getFullYear(),e=null===(s=i.data)||void 0===s?void 0:s.minInitialAmt,t
1=Number(this.decimalPipe.transform(null===(r=i.data)||void 0===r?void 0:r.offerPriceOtc,"1.3-3")),n=null===(d=i.data)||void 0===d?void 0:d.otcSettlementDate)}),Object(u.a)(e=>(console.log(e),Object(f.a)(null))),Object(r.a)(()=>{const i={issueCode:this.selectedBond.issueCode,nominalValue:e>1e4?e:1e4,settlementDate:this.datePipe.transform(n,"yyyy-MM-dd"),forTransaction:!0,isBondBuy:!0,price:t,isRmo:!0,refno:this.defaultRefno,expiredDate:this.datePipe.transform(new Date,"yyyy-MM-dd"),yieldType:"rmo"};return this.bondRestService.bondCalculatorDataBySettlementDateAndPrice(i).pipe(Object(c.a)(e=>{var t,n;const i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.offerNetYtc,l=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.offerNetYtm;(null==e?void 0:e.status)===B.a.RESPONSE_SUCCESS&&(this.netAskYield=!i&&0!==i||!l&&0!==l?i||0===i||o?i:l:l<i&&!o?l:i)}))})))}getNetYieldPlaceHolder(){return"YTC"===this.netYieldType?"bondOTC"===this.selectedBondTransactionType?"Est. Net Yield to Next Call":"Net Yield to Next Call":"bondOTC"===this.selectedBondTransactionType?"Est. Net Yield to Maturity":"Net Yield to Maturity"}getBondDocumentList(){this.subHandlingService.once(this.bondRestService.findBondDocumentList(this.selectedBond.issueCode).pipe(Object(c.a)(e=>{e.data&&(this.bondDocumentList=e.data)})))}confirmTransaction(){var e,t,n,o;console.log(this.paymentMethodRsp),this.bondIoiModel={issueCode:this.selectedBond.issueCode,indicativePrice:this.indicatePrice,nominalValue:this.nominalBondBuyValue,orderType:this.buyType.value.value,paymentCurrency:this.paymentMethodRsp.paymentMode===C.a.AUTO_SWEEP?this.paymentMethodRsp.currency:this.paymentCurrencyFromPaymentMethod,paymentMethod:this.paymentMethodRsp.paymentMode,trustId:this.paymentMethodRsp.id,maxPrice:this.bondBuyForm.get("limitOrderPrice").value},(null===(e=this.bondIoiModel)||void 0===e?void 0:e.paymentMethod)===C.a.TRUST_ACCOUNT||(null===(t=this.bondExpressTransactionModel)||void 0===t?void 0:t.paymentMode)===C.a.TRUST_ACCOUNT||(null===(n=this.bondIoiModel)||void 0===n?void 0:n.paymentMethod)===C.a.AUTO_SWEEP||(null===(o=this.bondExpressTransactionModel)||void 0===o?void 0:o.paymentMode)===C.a.AUTO_SWEEP?this.check2FaMethod():this.createBondBuyOrderWithoutCredential()}confirmTransactionForBondRMOExpress(){this.bondRmoBuyDetailsModel=[this.getContractDetails()];const e={refno:this.getBondBuyRefno(),action:null,bondOrderList:this.bondRmoBuyDetailsModel};this.bondRmoBuyModel=Object(y.a)(e),this.bondBuyForm.get("paymentMethod").value.paymentMode===C.a.TRUST_ACCOUNT||this.bondBuyForm.get("paymentMethod").value.paymentMode===C.a.AUTO_SWEEP?this.check2FaMethod():this.createBondRmoBuyOrderWithoutCredential(e)}getUpdateBuyModel(){return console.log(this.bondBuyForm.get("nominalValue").value),Object.assign({refno:this.getBondBuyRefno(),oldUnits:this.bondTransactionModel.pendingTransactionModel.unmatchedNominal,action:"AMEND"},this.getContractDetails())}getRMOBuyModel(){return{refno:this.getBondBuyRefno(),action:null,bondOrderList:this.getContractDetails()}}getContractDetails(){return{productCode:"beOdd"==this.selectedBondTransactionType?this.bondInfoModel.bondInfoBean.externalBondId+"/O":this.bondInfoModel.bondInfoBean.externalBondId,orderPrice:this.bondBuyForm.get("limitOrderPrice").value,orderQty:this.bondBuyForm.get("nominalValue").value,currency:this.bondInfoModel.bondInfoBean.bondCurrencyCode,orderType:"Limit",expiredDate:this.epochTime,paymentMode:this.bondBuyForm.get("paymentMethod").value.paymentMode,orderNo:this.isUpdate?this.bondTransactionModel.pendingTransactionModel.contractNo:null,trustId:this.paymentMethodRsp.id,accruedInt:null==this.bondBuyForm.get("accuredInterest").value?0:this.bondBuyForm.get("accuredInterest").value,paymentCurrency:this.bondBuyForm.get("investmentCurrency").value,orderValidity:this.bondBuyForm.get("orderValidity").value,issueCode:this.selectedBond.issueCode,lotType:"beFull"==this.selectedBondTransactionType?A.a.FULL_LOT.toLowerCase():A.a.ODD_LOT.toLowerCase()}}check2FaMethod(){this.isBuyActive&&(this.modifyView?(this.isModifyBuyOrder=!0,this.isModifyBuyFirst=!0):this.approvingBuy=!0),this.isSellActive&&(this.modifyView?(this.isModifySellOrder=!0,this.isModifySellFirst=!0):this.approvingSell=!0)}expendCloseAllAction(){this.showAllAction=!this.showAllAction}get paymentMethodRsp(){return this.bondBuyForm.get("paymentMethod").value}get paymentCurrencyFromPaymentMethod(){var e,t,n,o;return null===(o=null===(n=null===(t=null===(e=this.paymentMethodList)||void 0===e?void 0:e.filter(e=>{var t;return(null==e?void 0:e.value)===(null===(t=this.paymentMethodRsp)||void 0===t?void 0:t.value)}))||void 0===t?void 0:t[0])||void 0===n?void 0:n.currency)||void 0===o?void 0:o.toUpperCase()}get paymentCurrency(){return this.bondBuyForm.get("investmentCurrency").value}get selectedAcctModel(){let e=[];return e=this.authenticatedDisplay.filter(this.isBuyActive?e=>e.refno===this.bondBuyForm.get("refno").value:e=>e.refno===this.bondSellForm.get("refno").value),e?e[0]:null}get isPositiveReturn(){return parseFloat(this.estTotalReturn)>=0}get buyType(){return this.bondBuyForm.get("buyType")}get nominalBondBuyValue(){return this.bondBuyForm.get("nominalValue").value}get sellType(){return this.bondSellForm.get("sellType")}get nominalBondSellValue(){return this.bondSellForm.get("nominalValue").value}get limitOrderPrice(){return this.bondSellForm.get("limitOrderPrice")}get buyLimitOrderPrice(){return this.bondBuyForm.get("limitOrderPrice")}get redemptionCurrency(){return this.bondSellForm.get("redemptionCurrency").value}get redemptionMethod(){return this.bondSellForm.get("redemptionMethod").value}get redemptionCurrencyFromRedemptionMethod(){var e,t,n,o;return null===(o=null===(n=null===(t=null===(e=this.redemptionMethodList)||void 0===e?void 0:e.filter(e=>{var t;return(null==e?void 0:e.value)===(null===(t=this.redemptionMethod)||void 0===t?void 0:t.value)}))||void 0===t?void 0:t[0])||void 0===n?void 0:n.currency)||void 0===o?void 0:o.toUpperCase()}get estRedemptionAmt(){return this.bondSellForm.get("estRedemptionAmt").value}get netYield(){return this.bondBuyForm.get("netYield").value}get accuredInterest(){return this.bondBuyForm.get("accuredInterest").value}get sellAccuredInterest(){return this.bondSellForm.get("accuredInterest").value}get formEstPayableAmt(){return this.bondBuyForm.get("estPayableAmt").value}get formEstTotalReturn(){return this.bondBuyForm.get("estTotalReturn").value}get bankExist(){var e,t;return(null===(e=this.localBanks)||void 0===e?void 0:e.find(e=>e.currency===this.redemptionCurrency))||(null===(t=this.overseaBanks)||void 0===t?void 0:t.find(e=>e.currency===this.redemptionCurrency))}get buyOrderValidity(){var e,t;return null===(t=null===(e=this.orderValidityList)||void 0===e?void 0:e.find(e=>(null==e?void 0:e.value)===this.orderValidity))||void 0===t?void 0:t.label}get modifyViewPaymentMethod(){var e,t,n,o;return this.isBuyActive?null===(t=null===(e=this.bondBuyForm.get("paymentMethod"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.label:null===(o=null===(n=this.bondSellForm.get("redemptionMethod"))||void 0===n?void 0:n.value)||void 0===o?void 0:o.label}onHandleCancel(){this.approvingBuy=!1,this.approvingSell=!1,this.isModifyBuyOrder=!1,this.isModifySellOrder=!1,this.isLoadingForPass=!1,"bondOTC"!==this.selectedBondTransactionType?this.importantNote=!1:"bondOTC"===this.selectedBondTransactionType&&"Cheque / FPX"===this.paymentMethodRsp.label&&(this.importantNote=!0)}createNotification(e,t,n,o,i){"success"===e?this.successModal=this.modalService.create({nzContent:V,nzComponentParams:{title:null==n?"All Good":n,description:t},nzClosable:!0,nzMaskClosable:!1,nzFooter:[{label:o?"Done":null,type:"default",shape:"round",show:o,onClick:()=>{this.successModal.destroy()}},{label:o?"View Order Book":"Done",type:"primary",shape:"round",show:!0,onClick:()=>
1{if(console.log(this.selectedAcctModel.refno),o&&!i){const e=Object(P.a)(B.o.APP,B.o.TRADE,B.o.BONDS_RMO,B.o.BOND_ORDER_BOOK);this.router.navigate([e],{queryParams:{refno:this.selectedAcctModel.refno}}).then(()=>{window.location.reload()})}else if(o&&i){const e=Object(P.a)(B.o.APP,B.o.TRADE,B.o.BONDS_RMO,B.o.BOND_ORDER_BOOK);this.router.navigate([e],{queryParams:{refno:this.selectedAcctModel.refno}}).then(()=>{window.location.reload()})}else this.successModal.destroy()}}],nzWrapClassName:"vertical-center-modal"}):"error"===e&&this.modalService.error({nzTitle:"Error",nzContent:t,nzWrapClassName:"vertical-center-modal"})}updateBondRmoBuyContractWithCredential(e){this.subHandlingService.once(e.pipe(Object(s.a)(e=>{const t=Object.assign(Object.assign({},this.getUpdateBuyModel()),e);return this.transactionBondRestService.updateBondRmoBuy(t).pipe(this.twoFaService.intercept())}),Object(c.a)(e=>{if(this.isModifyBuyOrder=!1,(null==e?void 0:e.status)==B.a.RESPONSE_FAILED)return this.nzNotificationService.error("Failed To Modify Order",null==e?void 0:e.errorMessage),this.steps="prePreviewOrder",void(this.isLoadingForPass=!1);this.createNotification("success","Order submitted successfully."),this.onSuccessUpdate(),this.isLoadingForPass=!1,this.closeBondDetails()}),Object(r.a)(()=>this.store.dispatch(new R.e(!1,!0)))))}updateBondRmoSellContractWithCredential(e){this.subHandlingService.once(e.pipe(Object(s.a)(e=>{const t=Object.assign(Object.assign({},this.getUpdateSellModel()),e);return this.transactionBondRestService.updateBondRmoSell(t).pipe(this.twoFaService.intercept())}),Object(c.a)(e=>{if(this.isModifySellOrder=!1,(null==e?void 0:e.status)==B.a.RESPONSE_FAILED)return this.nzNotificationService.error("Failed To Modify Order",null==e?void 0:e.errorMessage),this.steps="prePreviewOrder",void(this.isLoadingForPass=!1);this.createNotification("success","Order submitted successfully."),this.onSuccessUpdate(),this.isLoadingForPass=!1,this.closeBondDetails()}),Object(r.a)(()=>this.store.dispatch(new R.e(!1,!0)))))}createBondExpressBuyWithCredential(e){this.subHandlingService.once(e.pipe(Object(s.a)(e=>{var t;const n=Object.assign(Object.assign({},this.bondRmoBuyModel),e);return this.transactionBondRestService.createBondRmoBuy(null===(t=this.selectedAcctModel)||void 0===t?void 0:t.refno,n).pipe(this.twoFaService.intercept())}),Object(c.a)(e=>{if(this.approvingBuy=!1,(null==e?void 0:e.status)===B.a.RESPONSE_SUCCESS){if(this.rmoEnabled)this.createNotification("success","Your order have placed successful, you can continue now check your order in our order book","Order Place Successful",!0,!1),this.onSuccessTransact();else{const t=e.data;if(t){const e=this.getBondBuyRefno();this.router.navigate([Object(P.a)(B.o.APP,B.o.TRADE,B.o.BOND_CHECK_OUT)],{queryParams:{poNumber:t[0].purchaseOrderNo,refno:e}})}}this.isLoadingForPass=!1,this.closeBondDetails()}else e.errorMessage.includes("foreign.exchange.policy.breached")?(this.fepBreached=!0,this.steps="prePreviewOrder",this.isLoadingForPass=!1,this.onBack()):(this.nzNotificationService.error("Failed",null==e?void 0:e.errorMessage),this.steps="prePreviewOrder",this.isLoadingForPass=!1)}),Object(r.a)(()=>this.store.dispatch(new R.e(!1,!0)))))}createBondOTCBuyWithCredential(e){const t=this.getBondBuyRefno();this.subHandlingService.once(e.pipe(Object(s.a)(e=>this.transactionBondRestService.createBondBuyWithPasswordModel(t,this.bondIoiModel,e).pipe(this.twoFaService.intercept())),Object(c.a)(e=>{this.completeBondBuyOrder(e,!0)}),Object(r.a)(()=>this.store.dispatch(new R.e(!1,!0)))))}completeBondBuyOrder(e,t){if(this.approvingBuy=!1,this.isLoadingForPass=!1,B.a.RESPONSE_SUCCESS===e.status)if(this.closeBondDetails(),this.rmoEnabled)this.createNotification("success","Your order have placed successful, you can continue now check your order in our order book","Order Place Successful",!0,!1),this.onSuccessTransact();else{const t=e.data;if(t){const e=this.getBondBuyRefno();this.router.navigate([Object(P.a)(B.o.APP,B.o.TRADE,B.o.BOND_CHECK_OUT)],{queryParams:{poNumber:t[0].purchaseOrderNo,refno:e}})}}else this.backToPreviewOrder(),e.errorMessage.includes("foreign.exch
1ange.policy.breached")?(this.fepBreached=!0,this.onBack()):this.nzNotificationService.error("Failed",e.errorMessage)}on2FaMethodChecked(){this.importantNote=!1}createBondBuyOrderWithoutCredential(){const e=this.getBondBuyRefno();this.subHandlingService.once(this.transactionBondRestService.createBondBuy(e,this.bondIoiModel).pipe(Object(c.a)(e=>{this.completeBondBuyOrder(e,!0)})))}createBondRmoBuyOrderWithoutCredential(e){const t=this.getBondBuyRefno();this.subHandlingService.once(this.transactionBondRestService.createBondRmoBuy(t,e).pipe(Object(c.a)(e=>{this.completeBondBuyOrder(e,!1)})))}onTabChange(e){if(console.log(e),e!==this.selectedBondTransactionType){this.selectedBondTransactionType=e;let t=this.selectedBond.offerPrice;"beFull"==this.selectedBondTransactionType?(this.checkedminInitialAmt=this.selectedBond.bexFullLotMinLotSize,this.checkedminSubInvestmentAmt=this.selectedBond.bexFullLotSubLotSize,t=this.subscribedBond.askPrice,this.bondType=A.a.FULL_LOT,this.lotType=A.a.FULL_LOT,this.subscribeLSForBestBuySellPrice()):"beOdd"==this.selectedBondTransactionType?(this.checkedminInitialAmt=this.selectedBond.bexOddLotMinLotSize,this.checkedminSubInvestmentAmt=this.selectedBond.bexOddLotSubLotSize,t=this.subscribedBond.askPrice,this.bondType=A.a.ODD_LOT,this.lotType=A.a.ODD_LOT,this.subscribeLSForBestBuySellPrice()):(this.checkedminInitialAmt=this.selectedBond.minInitialAmt,this.checkedminSubInvestmentAmt=this.selectedBond.minSubInvestmentAmt,this.bondBuyForm.get("buyType").setValue(this.buyOrderType.Market),this.bondType=A.a.OTC),console.log(this.buyLimitPrice),console.log(t),this.buyLimitPrice.patchValue(t),this.bondBuyForm.get("nominalValue").setValue(this.checkedminInitialAmt),this.bondBuyForm.get("nominalValue").setValidators([l.H.required,l.H.min(this.checkedminInitialAmt)]),this.bondSellForm.get("nominalValue").setValue(this.checkedminInitialAmt),this.bondSellForm.get("nominalValue").setValidators([l.H.required,l.H.min(this.checkedminInitialAmt)]),this.updateFormValidity("nominalValue")}"beFull"==e||"beOdd"==e?(this.orderPadViews=this.beOrderPadViews,this.orderPadView="default",this.showBondExpressBuyColumn=!0,this.showBondExpressSellColumn=!0,this.buyType.patchValue(this.buyOrderType.Price),this.sellType.patchValue(this.buyOrderType.Price),(this.diasbleBuyLimitPrice||this.diasbleSellLimitPrice)&&(this.diasbleBuyLimitPrice=!1,this.diasbleSellLimitPrice=!1,this.bondBuyForm.get("limitOrderPrice").enable(),this.bondSellForm.get("limitOrderPrice").enable()),this.isSellActive&&this.bondSellForm.get("redemptionCurrency").disable(),this.show1Dselection=!0):(this.showBondExpressBuyColumn=!1,this.showBondExpressSellColumn=!1,this.buyType.patchValue(this.buyOrderType.Market),this.sellType.patchValue(this.buyOrderType.Market),this.bondBuyForm.get("limitOrderPrice").disable(),this.bondSellForm.get("limitOrderPrice").disable(),this.isBuyActive&&(this.orderPadViews=this.orderPadViews.filter(e=>"Default"!==e.label),this.orderPadView="cashflow",this.bondBuyForm.get("investmentCurrency").enable(),this.bondBuyForm.get("paymentMethod").enable()),this.isSellActive&&(this.show1Dselection=!1,this.bondSellForm.get("redemptionCurrency").enable(),this.bondSellForm.get("redemptionMethod").enable()),this.showSuspensionModal&&(this.showSuspensionModal=!1)),this.isSellActive&&(this.orderPadViews=this.orderPadViews,this.orderPadView="default");for(const t of this.bondTransactionOptions)t.active=(null==t?void 0:t.value)===this.selectedBondTransactionType;this.getBondCalculatorData(),"bondOTC"===this.selectedBondTransactionType&&this.getBondCalculatorNetYield(),this.setMarkUpRate(),this.initializeBidandAskPriceData(),this.acctRefnoChange(!0),this.generateAndResetForm()}onBack(){this.steps="prePreviewOrder"}getBondBuyRefno(){var e;return null===(e=this.authenticatedDisplay)||void 0===e?void 0:e.find(e=>{var t;return e.refno===(null===(t=this.bondBuyForm)||void 0===t?void 0:t.get("refno").value)}).refno}getBondSellRefno(){var e;return null===(e=this.authenticatedDisplay)||void 0===e?void 0:e.find(e=>{var t;return e.refno===(null===(t=this.bondSellForm)||void 0===t?void 0:t.get("refno").value)}).refno}convertNumber(e){return"string"==typeof e?parseFloat(e):e}onMinusPrice(){if(this.isBuyActive){const e=this.bondBuyForm.get("limitOrderPrice").value;this.bondBuyForm.get("limitOrderPrice").setValue(parseFloat(e)-1,{onlySelf:!0,emitEvent:!0}),this.bondBuyForm.get("limitOrderPrice").markAsDirty(),this.bondBuyForm.get("limitOrderPrice").updateV
1alueAndValidity()}if(this.isSellActive){const e=this.bondSellForm.get("limitOrderPrice").value;this.bondSellForm.get("limitOrderPrice").setValue(parseFloat(e)-1,{onlySelf:!0,emitEvent:!0}),this.bondSellForm.get("limitOrderPrice").markAsDirty(),this.bondSellForm.get("limitOrderPrice").updateValueAndValidity()}}onAddPrice(){if(this.isBuyActive){const e=this.bondBuyForm.get("limitOrderPrice").value;this.bondBuyForm.get("limitOrderPrice").setValue(parseFloat(e)+1,{onlySelf:!0,emitEvent:!0}),this.bondBuyForm.get("limitOrderPrice").markAsDirty(),this.bondBuyForm.get("limitOrderPrice").updateValueAndValidity()}if(this.isSellActive){const e=this.bondSellForm.get("limitOrderPrice").value;this.bondSellForm.get("limitOrderPrice").setValue(parseFloat(e)+1,{onlySelf:!0,emitEvent:!0}),this.bondSellForm.get("limitOrderPrice").markAsDirty(),this.bondSellForm.get("limitOrderPrice").updateValueAndValidity()}}onAddNominalValue(){if(this.isBuyActive){const e=this.bondBuyForm.get("nominalValue").value;let t=this.selectedBond.minSubInvestmentAmt;if("beFull"==this.selectedBondTransactionType?t=this.selectedBond.bexFullLotSubLotSize:"beOdd"==this.selectedBondTransactionType&&(t=this.selectedBond.bexOddLotSubLotSize),e%t!=0){const n=e%t;this.bondBuyForm.get("nominalValue").setValue(e-n+t,{onlySelf:!0,emitEvent:!0})}else this.bondBuyForm.get("nominalValue").setValue(e+t,{onlySelf:!0,emitEvent:!0});this.bondBuyForm.get("nominalValue").markAsDirty(),this.bondBuyForm.get("nominalValue").updateValueAndValidity()}if(this.isSellActive){const e=this.bondSellForm.get("nominalValue").value;let t=this.selectedBond.minSubInvestmentAmt;if("beFull"==this.selectedBondTransactionType?t=this.selectedBond.bexFullLotSubLotSize:"beOdd"==this.selectedBondTransactionType&&(t=this.selectedBond.bexOddLotSubLotSize),e%t!=0){const n=e%t;this.bondSellForm.get("nominalValue").setValue(e-n+t,{onlySelf:!0,emitEvent:!0})}else this.bondSellForm.get("nominalValue").setValue(e+t,{onlySelf:!0,emitEvent:!0});this.bondSellForm.get("nominalValue").markAsDirty(),this.bondSellForm.get("nominalValue").updateValueAndValidity()}this.formValueChanges()}onMinusNominalValue(){if(this.isBuyActive){const e=this.bondBuyForm.get("nominalValue").value;let t=this.selectedBond.minSubInvestmentAmt;if("beFull"==this.selectedBondTransactionType?t=this.selectedBond.bexFullLotSubLotSize:"beOdd"==this.selectedBondTransactionType&&(t=this.selectedBond.bexOddLotSubLotSize),e%t!=0){const n=e%t;this.bondBuyForm.get("nominalValue").setValue(e-n-t,{onlySelf:!0,emitEvent:!0})}else this.bondBuyForm.get("nominalValue").setValue(e-t,{onlySelf:!0,emitEvent:!0});this.bondBuyForm.get("nominalValue").markAsDirty(),this.bondBuyForm.get("nominalValue").updateValueAndValidity()}if(this.isSellActive){const e=this.bondSellForm.get("nominalValue").value;let t=this.selectedBond.minSubInvestmentAmt;if("beFull"==this.selectedBondTransactionType?t=this.selectedBond.bexFullLotSubLotSize:"beOdd"==this.selectedBondTransactionType&&(t=this.selectedBond.bexOddLotSubLotSize),e%t!=0){const n=e%t;this.bondSellForm.get("nominalValue").setValue(e-n-t,{onlySelf:!0,emitEvent:!0})}else this.bondSellForm.get("nominalValue").setValue(e-t,{onlySelf:!0,emitEvent:!0});this.bondSellForm.get("nominalValue").markAsDirty(),this.bondSellForm.get("nominalValue").updateValueAndValidity()}this.formValueChanges()}calculateShortfall(){var e,t,n,o,i,l,a;if(this.isUpdate){let e,t;if(this.paymentMethodList&&this.paymentMethodList.length>0){const n=this.paymentMethodList.find(e=>e.id===this.paymentMethodRsp.id),o=n?n.availableBalance:0;"MYR"!==this.paymentCurrencyFromPaymentMethod&&(null==n?void 0:n.paymentMode)===C.a.AUTO_SWEEP?this.displayFxRate!==this.fxIndicativeRate[null==n?void 0:n.currency]&&(this.displayFxRate=this.fxIndicativeRate[null==n?void 0:n.currency]):this.displayFxRate=null===(i=this.bondCalculatorData)||void 0===i?void 0:i.fxAskRate,console.log(o),e=this.estPayableAmt,console.log(this.bondTransactionModel.amount),console.log(e),e>this.bondTransactionModel.amount?(t=e-this.bondTransactionModel.amount,console.log(t),this.shortfallAmt=Object(F.b)(-1*(o-t))):this.shortfallAmt=0}else this.shortfallAmt=0;let n=this.estPayableAmt.toString(),o=null===(l=this.estTotalReturn)||void 0===l?void 0:l.toString();this.paymentCurrencyFromPaymentMethod===(null===(a=this.selectedBond)||void 0===a?void 0:a.bondCurrencyCode)?(this.bondBuyForm.get("estPayableAmt").patchValue(this.paymentCurrencyFromPaymentMethod+" "+Object(M.L)(Object(F.b)(this.parseFloatRemoveCommaSeperator(n)),B.a.LOCALE_EN,"1.2-2")),this.bondBuyForm.get("estTotalReturn").patchValue(this.paymentCurrencyFromPaymentMethod+" "+Object(M.L)(Object(F.b)(this.parseFloatRemoveCommaSeperator(o)),B.a.LOCALE_EN,"1.2-2"))):(n=this.parseFloatRemoveCommaSeperator(n)
1*this.displayFxRate,o=this.parseFloatRemoveCommaSeperator(o)*this.displayFxRate,this.bondBuyForm.get("estPayableAmt").patchValue(this.paymentCurrencyFromPaymentMethod+" "+Object(M.L)(n,B.a.LOCALE_EN,"1.2-2")),this.bondBuyForm.get("estTotalReturn").patchValue(this.paymentCurrencyFromPaymentMethod+" "+Object(M.L)(o,B.a.LOCALE_EN,"1.2-2")))}else if(this.paymentMethodList&&this.paymentMethodList.length>0){const i=this.paymentMethodList.find(e=>{var t;return e.id===(null===(t=this.paymentMethodRsp)||void 0===t?void 0:t.id)}),l=i?i.availableBalance:0;console.log("availableBalance: "+l),console.log(this.displayFxRate),console.log(this.estPayableAmt);let a=this.estPayableAmt.toString(),c=null===(e=this.estTotalReturn)||void 0===e?void 0:e.toString();if("MYR"!==this.paymentCurrencyFromPaymentMethod&&(null==i?void 0:i.paymentMode)===C.a.AUTO_SWEEP?this.displayFxRate!==this.fxIndicativeRate[null==i?void 0:i.currency]&&(this.displayFxRate=this.fxIndicativeRate[null==i?void 0:i.currency]):this.displayFxRate=null===(t=this.bondCalculatorData)||void 0===t?void 0:t.fxAskRate,this.paymentCurrencyFromPaymentMethod===(null===(n=this.selectedBond)||void 0===n?void 0:n.bondCurrencyCode))this.bondBuyForm.get("estPayableAmt").patchValue(this.paymentCurrencyFromPaymentMethod+" "+Object(M.L)(Object(F.b)(this.parseFloatRemoveCommaSeperator(a)),B.a.LOCALE_EN,"1.2-2")),console.log(Object(M.L)(Object(F.b)(this.estPayableAmt),B.a.LOCALE_EN,"1.2-2")),this.shortfallAmt=Object(F.b)(-1*(l-this.parseFloatRemoveCommaSeperator(a)));else{if(a=this.parseFloatRemoveCommaSeperator(a)*this.displayFxRate,this.displayFxRate){const e=Object(M.L)(Object(F.b)(a),B.a.LOCALE_EN,"1.2-2");this.bondBuyForm.get("estPayableAmt").patchValue(`${this.paymentCurrencyFromPaymentMethod} ${e}`)}console.log(this.displayFxRate),console.log(a),this.shortfallAmt=Object(F.b)(-1*(l-a))}this.bondBuyForm.get("estTotalReturn").patchValue((null===(o=this.selectedBond)||void 0===o?void 0:o.bondCurrencyCode)+" "+Object(M.L)(Object(F.b)(this.parseFloatRemoveCommaSeperator(c)),B.a.LOCALE_EN,"1.2-2")),console.log(this.fxIndicativeRate[null==i?void 0:i.currency]),console.log(this.parseFloatRemoveCommaSeperator(a)),console.log(this.shortfallAmt)}else this.shortfallAmt=0}parseFloatRemoveCommaSeperator(e){return e&&"string"==typeof e?parseFloat(this.removeCommaSeperator(e)):0}addThousandToKSeperator(e){return e?e>=1e3?e/1e3+"k":e.toString():"0"}getFxIndicativeRateForAutoSweep(e,t){e&&t&&(this.isLoadingAutoSweepFxRate=!0,this.subHandlingService.once(this.utilityRestService.getFxIndicativeRate(e,t,!0,"ut").pipe(Object(c.a)(e=>{B.a.RESPONSE_SUCCESS===(null==e?void 0:e.status)&&null!=(null==e?void 0:e.data)&&(this.fxIndicativeRate[t]=null==e?void 0:e.data)}),Object(p.a)(()=>{this.isLoadingAutoSweepFxRate=!1}))),this.isLoadingAutoSweepFxRate=!1)}removeCommaSeperator(e){let t="";for(let n=0;n<e.length;n++)t+=","!==e[n]?e[n]:"";return t}onChangeSelectedOrderpadView(){}getBondFactsheet(){return this.isLoadingPreOrderFS=!0,this.bondfactsheetService.getBondInfo(this.selectedBond.issueCode).subscribe(e=>{console.log(e.status+" "+e.data),e.status==B.a.RESPONSE_SUCCESS&&(this.bondInfoModel=e.data,this.isLoadingPreOrderFS=!1)})}getTimeAndSalesForIntradayChart(){return this.isLoadingIntradayChart=!0,this.bondRestService.getTimeAndSales(this.symbol2).subscribe(e=>{console.log(e.status+" "+e.data),e.status==B.a.RESPONSE_SUCCESS&&(this.bondIntraDataModel=e.data,console.log(this.bondIntraDataModel),this.isLoadingIntradayChart=!1)})}toggleBuy(e){this.isSellActive&&this.checkBuyAction(),this.isBuyActive=!0,this.isSellActive=!1,this.disabledSell&&(this.disabledSell=!1),"bondOTC"!==this.selectedBondTransactionType?(this.orderPadViews=this.beOrderPadViews,this.show1Dselection=!0):(this.orderPadViews=this.beOrderPadViews,this.orderPadViews=this.orderPadViews.filter(e=>"Default"!==e.label),this.orderPadView="cashflow"),this.initializeBondBuyForm(e)}toggleSell(e){this.isBuyActive=!1,this.isSellActive=!0,this.orderPadViews=this.beOrderPadViews,this.orderPadViews=this.orderPadViews,this.orderPadView="default",this.show1Dselection="bondOTC"!=this.selectedBondTransactionType,this.initializeBondSellForm(e),this.checkBondHoldings(),console.log(this.beSellModel),console.log(this.selectedbondHolding)}initializeBondSellForm(e){var t;console.log("initializeBondSellForm");let n=this.selectedBond.bidPrice;if("FULL"==this.lotType||"beFull"==this.selectedBondTransactionType?(this.checkedminInitialAmt=this.selectedBond.bexFullLotMinLotSize,this.checkedminSubInvestmentAmt=this.selectedBond.bexFullLotSubLotSize,n=this.subscribedBond.bidPrice):"ODD"==this.lotType||"beOdd"==this.selectedBondTransactionType?(this.checkedminInitialAmt=this.selectedBond.bexOddLotMinLotSize,this.checkedminSubInvestmentAmt=this.selectedBond.bexOddLotSubLotSize,n=this.subscribedBond.bidPrice):(this.checkedminInitialAmt=this.selectedBond.minInitialAmt,this.checkedminSubInvestmentAmt=this.selectedBond.minSubInvestmentAmt),this.isUpdate&&this.isSellActive&&this.bondTransactionModel)console.log(this.bondTransactionModel),this.bondSellForm=this.fb.group({refno:[this.bondTransactionModel.pendingTransactionModel.refno,[l.H.required]],sellType:[this.sellOrderType.Price,[l.H.required]],limitOrderPrice:[Object(x.Gb)(this.bondTransactionModel.pendingTransactionModel.minPrice),[l.H.required]],nominalValue:[this.bondTransactionModel.pendingTransactionModel.unmatchedNominal,[l.H.required,l.H.min(this.checkedminInitialAmt)]],accuredInterest:[Object(x.Gb)(this.bondTransactionModel.pendingTransactionModel.accruedInt),[l.H.required]],orderValidity:[this.bondTransactionModel.pendingTransactionModel.rmoOrderValidity,[l.H.required]],redemptionCurrency:[this.bondTransactionModel.pendingTransactionModel.currency,[l.H.required]],redemptionMethod:[this.bondTransactionModel.pendingTransactionModel.paymentMode,[l.H.required]],estRedemptionAmt:[""]},{validator:this.validateAmendBondSellExtra()}),"GTD"==this.bondTransactionModel.pendingTransactionModel.rmoOrderValidity&&this.bondTransactionModel.pendingTransactionModel.orderExpiryDate&&(this.tdyDate=this.bondTransactionModel.pendingTransactionModel.orderExpiryDate),this.rmoAccruedInterest=this.bondTransactionModel.pendingTransactionModel.rmoAccruedIntRate,this.generateAndResetForm(),this.noNeedSellAll=!0,console.log(this.noNeedSellAll),this.bondSellForm.get("refno").disable(),this.bondSellForm.get("sellType").disable(),this.bondSellForm.get("accuredInterest").disable(),this.bondSellForm.get("orderValidity").disable(),this.bondSellForm.get("redemptionCurrency").disable(),this.bondSellForm.get("redemptionMethod").disable();else{if(this.bondSellForm){if(e&&(e.selectedBond||e.refno)){let t=e.selectedBond.currentValue.bidPrice;"FULL"==this.lotType||"beFull"==this.selectedBondTransactionType?(this.checkedminInitialAmt=e.selectedBond.currentValue.bexFullLotMinLotSize,this.checkedminSubInvestmentAmt=e.selectedBond.currentValue.bexFullLotSubLotSize,t=this.subscribedBond.bidPrice):"ODD"==this.lotType||"beOdd"==this.selectedBondTransactionType?(this.checkedminInitialAmt=e.selectedBond.currentValue.bexOddLotMinLotSize,this.checkedminSubInvestmentAmt=e.selectedBond.currentValue.bexOddLotSubLotSize,t=this.subscribedBond.bidPrice):(this.checkedminInitialAmt=e.selectedBond.currentValue.minInitialAmt,this.checkedminSubInvestmentAmt=e.selectedBond.currentValue.minSubInvestmentAmt),this.steps="prePreviewOrder",this.bondSellForm=this.fb.group({refno:[this.defaultRefno,[l.H.required]],sellType:[this.sellOrderType.Price,[l.H.required]],limitOrderPrice:[Object(x.Gb)(null==t?void 0:t.toFixed(3)),[l.H.required]],nominalValue:[this.checkedminInitialAmt,[l.H.required,l.H.min(this.checkedminInitialAmt)]],accuredInterest:[parseFloat(this.indicativeAI.toFixed(2)),[l.H.required]],orderValidity:["DAY",[l.H.required]],redemptionCurrency:["",[l.H.required]],redemptionMethod:["",[l.H.required]],estRedemptionAmt:[""]},{validator:this.validateBondSellExtra()})}}else this.bondSellForm=this.fb.group({refno:[this.defaultRefno,[l.H.required]],sellType:[this.sellOrderType.Price,[l.H.required]],limitOrderPrice:[Object(x.Gb)(null==n?void 0:n.toFixed(3)),[l.H.required]],nominalValue:[this.checkedminInitialAmt,[l.H.required,l.H.min(this.checkedminInitialAmt)]],accuredInterest:[parseFloat(this.indicativeAI.toFixed(2)),[l.H.required]],orderValidity:["DAY",[l.H.required]],redemptionCurrency:["",[l.H.required]],redemptionMethod:["",[l.H.required]],estRedemptionAmt:[""]},{validator:this.validateBondSellExtra()});this.generateAndResetForm(),this.isSellAll=!1,"bondOTC"!==this.selectedBondTransactionType?this.bondSellForm.get("redemptionCurrency").disable():(this.sellType.patchValue(this.sellOrderType.Market),this.diasbleSellLimitPrice=!0,null===(t=this.sellLimitPrice)||void 0===t||t.patchValue(this.subscribedBond.bidPrice?this.subscribedBond.bidPrice:this.selectedBond.bidPrice),this.bondSellForm.get("redemptionCurrency").enable()),this.bondSellForm.get("accuredInterest").disable(),this.bondSellForm.get("estRedemptionAmt").disable()}this.bondSellForm.get("nominalValue").valueChanges.subscribe(e=>{this.isSellAll&&this.selectedbondHolding&&this.selectedbondHolding.availableQuantity!==e&&(console.log(this.isSellAll+" "+this.selectedbondHolding.availableQuantity+" "+e),this.isSellAll=!1),this.formValueChanges(),this.setEstAmtReceivable()}),this.sellType.valueChanges.subscribe(e=>{var t;"bondOTC"==this.selectedBondTransactionType&&e.value==this.sellOrderType.Market.value?(null===(t=this.sellLimitPrice)||void 0===t||t.patchValue(this.subscribedBond.bidPrice?this.subscribedBond.bidPrice:this.selectedBond.bidPrice),this.bondSellForm.get("limitOrderPrice").disable(),this.diasbleSellLimitPrice=!0):(this.bondSellForm.get("limitOrderPrice").enable(),this.diasbleSellLimitPrice=!1)}),this.bondSellForm.get("limitOrderPrice").valueChanges.pipe(Object(a.a)(500)).subscribe(e=>{var t,n;if(e){const o=e.toString().split(".");o.length>1&&o[1].length>3&&(null===(t=this.bondSellForm.get("limitOrderPrice"))||void 0===t||t.patchValue(parseFloat(e).toFixed(3),{emitEvent:!1})),e<0&&(null===(n=this.bondSellForm.get("limitOrderPrice"))||void 0===n||n.patchValue(.001))}this.setEstAmtReceivable()}),this.isSellActive&&(this.checkBondHoldings(),console.log(this.selectedbondHolding))}generateAndResetForm(){this.isLoadingTrustAndBank=!0,"bondOTC"!==this.selectedBondTransactionType?(this.getInitDataNew(),this.isLoadingTrustAndBank=!1):Object(g.a)([this.getBankDetail
1sAndInitFormValue(),this.findActiveTrustAccountForSell(),this.findActiveAutoSweepAccount()]).pipe(Object(c.a)(()=>{this.resetRedemptionMethodList(),this.subscribeInvestmentCurrencyChange(),this.isLoadingTrustAndBank=!1})).subscribe()}findActiveTrustAccountForSell(){return this.trustAccountRestService.findActiveTrustAccount(this.getBondSellRefno()).pipe(Object(c.a)(e=>{this.trustAcctListForSell=e}))}findActiveAutoSweepAccount(){var e;return this.bondRestService.findBondTransactionAutoSweepList(this.getBondSellRefno(),!1,null===(e=this.selectedBond)||void 0===e?void 0:e.bondCurrencyCode).pipe(Object(c.a)(e=>{var t;(null==e?void 0:e.status)===B.a.RESPONSE_SUCCESS&&(null==e?void 0:e.data)&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.length)>0&&(this.autoSweepAccountList=H.a.getSortedASList(Object(y.a)(null==e?void 0:e.data)))}))}getInitDataNew(){var e,t;this.isLoading=!0,Object(g.a)([this.trustAccountRestService.findOrCreateActiveTrustAccount(this.getBondSellRefno(),null===(e=this.selectedBond)||void 0===e?void 0:e.bondCurrencyCode).pipe(Object(u.a)(e=>Object(f.a)(null))),this.bondRestService.findBondTransactionAutoSweepList(this.getBondSellRefno(),!1,null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode).pipe(Object(u.a)(e=>Object(f.a)(null)))]).subscribe(([e,t])=>{var n,o,i,l,a;if(this.redemptionMethodList=[],e&&(this.redemptionMethodList.push({label:e.currency+" Cash Account - ["+e.currency+" "+Object(M.L)(e.availableBalance,B.a.LOCALE_EN,"0.2-2")+"]",display:e.currency+" Cash Account",id:null==e?void 0:e.trustId,value:"TRUST|"+(null==e?void 0:e.trustId),currency:null==e?void 0:e.currency,paymentMode:C.a.TRUST_ACCOUNT,availableBalance:e.availableBalance}),console.log(this.redemptionMethodList)),(null==t?void 0:t.status)===B.a.RESPONSE_SUCCESS&&(null==t?void 0:t.data)&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length)>0&&H.a.getSortedASList(Object(y.a)(null==t?void 0:t.data)).forEach(e=>{var t;((null==e?void 0:e.currency)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)||"MYR"===(null==e?void 0:e.currency)&&"bondOTC"===this.selectedBondTransactionType)&&this.redemptionMethodList.push({label:(null==e?void 0:e.currency)+" Auto-Sweep - ["+(null==e?void 0:e.currency)+" "+Object(M.L)(null==e?void 0:e.purchasingPower,B.a.LOCALE_EN,"0.2-2")+"]",display:e.currency+" Auto-Sweep",id:(null==e?void 0:e.trustId)?null==e?void 0:e.trustId:" ",value:"Auto-Sweep|"+(null==e?void 0:e.currency),currency:null==e?void 0:e.currency,paymentMode:C.a.AUTO_SWEEP,hasOptedInString:(null==e?void 0:e.hasOptedIn)?"Y":"N",availableBalance:null==e?void 0:e.purchasingPower})}),console.log(this.redemptionMethodList),this.isUpdate)return this.redemptionCurrencyList.includes(null===(o=this.bondTransactionModel)||void 0===o?void 0:o.pendingTransactionModel.currency)||this.redemptionCurrencyList.push(null===(i=this.bondTransactionModel)||void 0===i?void 0:i.pendingTransactionModel.currency),null===(l=this.bondSellForm.get("redemptionCurrency"))||void 0===l||l.patchValue(null===(a=this.bondTransactionModel)||void 0===a?void 0:a.pendingTransactionModel.currency),this.displayRedemptionMethodList=this.redemptionMethodList.filter(e=>e.currency===this.bondTransactionModel.pendingTransactionModel.currency&&e.paymentMode===this.bondTransactionModel.pendingTransactionModel.paymentMode),this.bondSellForm.get("redemptionMethod").patchValue(this.displayRedemptionMethodList[0]),this.bankDetailsLoading=!1,void(this.isLoading=!1);this.checkBondCurrency(),this.subscribeInvestmentCurrencyChange(),this.isLoading=!1},e=>{this.isLoading=!1})}subscribeInvestmentCurrencyChange(){var e;this.subHandlingService.subscribe(null===(e=this.bondSellForm.get("redemptionMethod"))||void 0===e?void 0:e.valueChanges.pipe(Object(d.a)(),Object(c.a)(e=>{var t,n,o,i;if(e){const l=null===(i=null===(o=null===(n=null===(t=this.redemptionMethodList)||void 0===t?void 0:t.filter(t=>(null==t?void 0:t.value)===(null==e?void 0:e.value)))||void 0===n?void 0:n[0])||void 0===o?void 0:o.currency)||void 0===i?void 0:i.toUpperCase();l&&this.bondSellForm.get("redemptionCurrency").patchValue(l),this.setEstAmtReceivable()}})))}checkBondCurrency(){var e,t,n,o,i,l,a,c,s,r,d,u,p,h;
1if(this.redemptionCurrencyList=[],console.log(this.redemptionCurrencyList),console.log(null===(e=this.selectedBond)||void 0===e?void 0:e.bondCurrencyCode),this.redemptionMethodList.sort((e,t)=>t.availableBalance-e.availableBalance),!(null===(t=this.redemptionCurrencyList)||void 0===t?void 0:t.includes(null===(n=this.selectedBond)||void 0===n?void 0:n.bondCurrencyCode))&&(null===(o=this.redemptionMethodList)||void 0===o?void 0:o.find(e=>{var t;return(null==e?void 0:e.currency)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)}))){this.redemptionCurrencyList.push(null===(i=this.selectedBond)||void 0===i?void 0:i.bondCurrencyCode),console.log(this.redemptionCurrencyList),console.log(null===(l=this.selectedBond)||void 0===l?void 0:l.bondCurrencyCode),null===(a=this.bondSellForm.get("redemptionCurrency"))||void 0===a||a.patchValue(null===(c=this.selectedBond)||void 0===c?void 0:c.bondCurrencyCode),this.displayRedemptionMethodList=this.redemptionMethodList,this.displayRedemptionMethodList=null===(s=this.displayRedemptionMethodList)||void 0===s?void 0:s.filter(e=>{var t;return e.currency===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)}),console.log(this.displayRedemptionMethodList);const e=null===(r=this.redemptionMethodList)||void 0===r?void 0:r.find(e=>{var t;return e.currency===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)&&e.paymentMode===C.a.AUTO_SWEEP});return void(e?this.bondSellForm.get("redemptionMethod").patchValue(e):this.bondSellForm.get("redemptionMethod").patchValue(this.displayRedemptionMethodList[0]))}null===(d=this.bondSellForm.get("redemptionCurrency"))||void 0===d||d.patchValue(C.a.PAYMENT_CURRENCY_MYR);let b=null!==(p=null===(u=this.redemptionMethodList)||void 0===u?void 0:u.find(e=>e.currency===C.a.PAYMENT_CURRENCY_MYR))&&void 0!==p?p:null;null===(h=this.bondSellForm.get("redemptionMethod"))||void 0===h||h.patchValue(b)}getBankDetailsAndInitFormValue(){return this.bankDetailsLoading=!0,this.accountRestService.getBankDetails(this.getBondSellRefno()).pipe(Object(c.a)(e=>{e.status===B.a.RESPONSE_SUCCESS&&e.data&&(this.localBanks=e.data.Local?e.data.Local:[],this.overseaBanks=e.data.Overseas?e.data.Overseas:[],this.allAvailableBank=[...this.localBanks,...this.overseaBanks],console.log(this.allAvailableBank)),this.bankDetailsLoading=!1}))}handleCheckSellAll(){this.selectedbondHolding&&this.selectedbondHolding.availableQuantity?(this.bondSellForm.get("nominalValue").setValue(Math.round(this.selectedbondHolding.availableQuantity)),this.updateFormValidity("nominalValue")):this.bondBuyForm.setErrors({noHolding:!0})}resetSellType(){this.limitOrderPrice.setValidators(this.sellType.value===this.sellOrderType.Price?[l.H.required]:[]),this.limitOrderPrice.updateValueAndValidity()}resetSellOrderType(){console.log("resetSellOrderType "+this.bondSellForm.get("orderValidity").value),this.sellOrderValidity="DAY"==this.bondSellForm.get("orderValidity").value?"DAY":"GTD",this.getBondCalculatorData()}resetRedemptionCurrency(){this.redemptionCurrencyList=["MYR"],this.selectedBond&&"MYR"!==this.selectedBond.bondCurrencyCode&&this.redemptionCurrencyList.push(this.selectedBond.bondCurrencyCode),this.bondSellForm.get("redemptionCurrency").value||this.bondSellForm.get("redemptionCurrency").setValue(this.selectedBond.bondCurrencyCode)}resetRedemptionMethodList(){var e,t,n,o,i,l,a;if(this.resetRedemptionCurrency(),this.redemptionMethodList=[],this.trustAcctListForSell&&this.trustAcctListForSell.length>0){let e=this.trustAcctListForSell.filter(e=>"MYR"===e.currency||e.currency===this.selectedBond.bondCurrencyCode);console.log(e),e.length>0?e.forEach(e=>{this.redemptionMethodList.push({label:e.currency+" Cash Account - ["+e.currency+" "+Object(M.L)(e.availableBalance,B.a.LOCALE_EN,"0.2-2")+"]",display:e.currency+" Cash Account",value:"TRUST|"+e.trustId,paymentMode:C.a.TRUST_ACCOUNT,currency:e.currency,id:e.trustId,availableBalance:e.availableBalance})}):this.redemptionMethodList.push({label:this.redemptionCurrency+" Cash Account - ["+this.redemptionCurrency+" 0.00]",display:this.redemptionCurrency+" Cash Account",value:"TRUST",paymentMode:C.a.TRUST_ACCOUNT,currency:this.redemptionCurrency,id:null,availableBalance:0}),0==this.trustAcctListForSell.filter(e=>e.currency===this.redemptionCurrency).length&&this.redemptionMethodList.push({label:this.redemptionCurrency+" Cash Account - ["+this.redemptionCurrency+" 0.00]",display:this.redemptionCurrency+" Cash Account",value:"TRUST",paymentMode:C.a.TRUST_ACCOUNT,currency:this.redemptionCurrency,id:null,availableBalance:0})}else this.redemptionMethodList.push({label:this.redemptionCurrency+" Cash Account - ["+this.redemptionCurrency+" 0.00]",display:this.redemptionCurrency+" Cash Account",value:"TRUST",paymentMode:C.a.TRUST_ACCOUNT,currency:this.redemptionCurrency,id:null,availableBalance:0});if(this.autoSweepAccountList&&(null===(e=this.autoSweepAccountList)||void 0===e?void 0:e.length)>0){let e=[];(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)&&(e=this.autoSweepAccountList.filter(e=>{var t;return(null==e?void 0:e.currency)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)||"bondOTC"===this.selectedBondTransactionType&&"MYR"===(null==e?void 0:e.currency)}),e.length>
10&&e.forEach(e=>{this.redemptionMethodList.push({label:(null==e?void 0:e.currency)+" Auto-Sweep - ["+(null==e?void 0:e.currency)+" "+Object(M.L)(null==e?void 0:e.purchasingPower,B.a.LOCALE_EN,"0.2-2")+"]",display:(null==e?void 0:e.currency)+" Auto-Sweep",value:"Auto-Sweep|"+(null==e?void 0:e.currency),currency:null==e?void 0:e.currency,paymentMode:C.a.AUTO_SWEEP,id:null,hasOptedInString:(null==e?void 0:e.hasOptedIn)?"Y":"N",availableBalance:e.purchasingPower})}))}if(this.redemptionMethodList.sort((e,t)=>t.availableBalance-e.availableBalance),console.log(this.redemptionMethodList),this.isUpdate)return this.redemptionCurrencyList.includes(null===(n=this.bondTransactionModel)||void 0===n?void 0:n.pendingTransactionModel.currency)||this.redemptionCurrencyList.push(null===(o=this.bondTransactionModel)||void 0===o?void 0:o.pendingTransactionModel.currency),null===(i=this.bondSellForm.get("redemptionCurrency"))||void 0===i||i.patchValue(null===(l=this.bondTransactionModel)||void 0===l?void 0:l.pendingTransactionModel.currency),this.displayRedemptionMethodList=this.redemptionMethodList.filter(e=>e.currency===this.bondTransactionModel.pendingTransactionModel.currency&&e.paymentMode===this.bondTransactionModel.pendingTransactionModel.paymentMode),this.bondSellForm.get("redemptionMethod").patchValue(this.displayRedemptionMethodList[0]),void(this.bankDetailsLoading=!1);"bondOTC"==this.selectedBondTransactionType?(this.displayRedemptionMethodList=this.redemptionMethodList,this.displayRedemptionMethodList=this.displayRedemptionMethodList.filter(e=>e.currency===this.redemptionCurrency||e.paymentMode===C.a.AUTO_SWEEP&&"MYR"===e.currency)):(this.displayRedemptionMethodList=this.redemptionMethodList,this.displayRedemptionMethodList=this.redemptionMethodList.filter(e=>e.currency===this.redemptionCurrency&&"cheque"!=e.paymentMode));const c=null===(a=this.redemptionMethodList)||void 0===a?void 0:a.find(e=>e.currency===this.redemptionCurrency&&e.paymentMode===C.a.AUTO_SWEEP);c?this.bondSellForm.get("redemptionMethod").patchValue(c):this.bondSellForm.get("redemptionMethod").patchValue(this.displayRedemptionMethodList[0]),this.bankDetailsLoading=!1}learnMoreGtd(){this.router.navigate([B.o.SUPPORT,B.o.FAQ],{queryParams:{routeCatId:"202103181203000001",routeFaqId:"8668",routeQuestUniqueKey:"2854"}})}subscribeLSForBestBuySellPrice(e){let t;t=e&&(e.selectedBond||e.lotType)?e.selectedBond.currentValue.externalBondId:this.selectedBond.externalBondId,this.symbol2=this.lightstreamerBondService.getSymbol(t,e&&e.lotType&&e.lotType.previousValue?e.lotType.currentValue:this.lotType),this.subscriptionMD&&this.lsClient.unsubscribe(this.subscriptionMD),this.subscriptionMD=this.lightstreamerBondService.subscribeMarketDepth(this.lsClient,this.symbol2,e=>{console.log(e),this.subscribedBond.ask1=parseFloat(e.updateValues[17]),this.subscribedBond.ask2=parseFloat(e.updateValues[18]),this.subscribedBond.ask3=parseFloat(e.updateValues[19]),this.subscribedBond.ask4=parseFloat(e.updateValues[20]),this.subscribedBond.askYield1=parseFloat(e.updateValues[217]),this.subscribedBond.askYield2=parseFloat(e.updateValues[218]),this.subscribedBond.askYield3=parseFloat(e.updateValues[219]),this.subscribedBond.askYield4=parseFloat(e.updateValues[220]),this.subscribedBond.askVolume1=parseFloat(e.updateValues[57]),this.subscribedBond.askVolume2=parseFloat(e.updateValues[58]),this.subscribedBond.askVolume3=parseFloat(e.updateValues[59]),this.subscribedBond.askVolume4=parseFloat(e.updateValues[60]),this.subscribedBond.bid1=parseFloat(e.updateValues[97]),this.subscribedBond.bid2=parseFloat(e.updateValues[98]),this.subscribedBond.bid3=parseFloat(e.updateValues[99]),this.subscribedBond.bid4=parseFloat(e.updateValues[100]),this.subscribedBond.bidYield1=parseFloat(e.updateValues[177]),this.subscribedBond.bidYield2=parseFloat(e.updateValues[178]),this.subscribedBond.bidYield3=parseFloat(e.updateValues[179]),this.subscribedBond.bidYield4=parseFloat(e.updateValues[180]),this.subscribedBond.bidVolume1=parseFloat(e.updateValues[137]),this.subscribedBond.bidVolume2=parseFloat(e.updateValues[138]),this.subscribedBond.bidVolume3=parseFloat(e.updateValues[139]),this.subscribedBond.bidVolume4=parseFloat(e.updateValues[140]),this.subscribedBond.totalAskVolume=this.subscribedBond.askVolume1+this.subscribedBond.askVolume2+this.subscribedBond.askVolume3,this.subscribedBond.totalBidVolume=this.subscribedBond.bidVolume1+this.subscribedBond.bidVolume2+this.subscribedBond.bidVolume3,this.subscribedBond.totalVolume=this.subscribedBond.totalAskVolume+this.subscribedBond.totalBidVolume;const t=[this.subscribedBond.askVolume1,this.subscribedBond.askVolume2,this.subscribedBond.askVolume3,this.subscribedBond.bidVolume1,this.subscribedBond.bidVolume2,this.subscribedBond.bidVolume3].filter(e=>"number"==typeof e&&!isNaN(e));this.subscribedBond.topVolume=Math.max(...t)}),this.getTimeAndSalesForIntradayChart()}initializeBidandAskPriceData(e){let t;switch(t=e&&e.selectedBond&&e.selectedBond.currentValue?e.selectedBond.currentValue.externalBondId:this.selectedBond.externalBondId,console.log(this.selectedBondTransactionType),this.selectedBondTransactionType){case"beFull":this.symbol="BEX_PRICE-8000.9."+t;break;case"beOdd":this.symbol="BEX_PRICE-8000.9."+t+"/O";break;case"bondOTC":case"bondExpress":default:this.symbol="",e&&e.selectedBond?(this.subscribedBond.askPrice=parseFloat(e.selectedBond.currentValue.offerPrice),this.subscribedBond.askYield=parseFloat(e.selectedBond.currentValue.offerYtm),this.subscribedBond.lastYield=parseFloat(e.selectedBond.currentValue.offerYldToWorst),this.subscribedBond.lastDone=parseFloat(e.selectedBond.currentValue.bidYldToWorst),this.subscribedBond.bidPrice=parseFloat(e.selectedBond.currentValue.bidPrice),this.subscribedBond.bidYield=parseFloat(e.selectedBond.currentValue.bidYldToWorst),this.subscribedBond.lotSize=parseFloat(e.selectedBond.currentValue.minInitialAmt),this.subscribedBond.lsChange=parseFloat(e.selectedBond.currentValue.offerPrice)-parseFloat(e.selectedBond.currentValue.bidPrice),this.subscribedBond.changePercentage=parseFloat(e.selectedBond.currentValue.offerPrice)/100-parseFloat(e.selectedBond.currentValue.bidPrice)/100):(this.subscribedBond.askPrice=parseFloat(this.selectedBond.offerPrice),this.subscribedBond.askYield=parseFloat(this.selectedBond.offerYtm),this.subscribedBond.lastYield=parseFloat(this.selectedBond.offerYldToWorst),this.subscribedBond.lastDone=parseFloat(this.selectedBond.bidYldToWorst),this.subscribedBond.bidPrice=parseFloat(this.selectedBond.bidPrice),this.subscribedBond.bidYield=parseFloat(this.selectedBond.bidYldToWorst),this.subscribedBond.lotSize=parseFloat(this.selectedBond.minInitialAmt),this.subscribedBond.lsChange=parseFloat(this.selectedBond.offerPrice)-parseFloat(this.selectedBond.bidPrice),this.subscribedBond.changePercentage=parseFloat(this.selectedBond.offerPrice)/100-parseFloat(this.selectedBond.bidPrice)/100),console.log(this.subscribedBond.askPrice),console.log(this.subscribedBond.bidPrice)}"bondOTC"===this.selectedBondTransactionType&&this.buyLimitPrice.patchValue(this.subscribedBond.askPrice),console.log("SYMBOL FOR LS: "+this.symbol),this.subscription&&(this.lsClient.unsubscribe(this.subscription),this.subscription=null),""!=this.symbol&&null!=this.symbol&&(this.first
1View=!0,this.lightstreamerBondService.subscribeLSPriceQuote(this.lsClient,this.symbol,e=>{console.log("itemUpdate!!"),console.log(e),this.subscribedBond.bidPrice=parseFloat(e.updateValues[6]),this.subscribedBond.askPrice=parseFloat(e.updateValues[8]),this.subscribedBond.askYield=parseFloat(e.updateValues[11]),this.subscribedBond.bidYield=parseFloat(e.updateValues[10]),this.subscribedBond.lastDone=parseFloat(e.updateValues[20]),this.subscribedBond.lastYield=parseFloat(e.updateValues[34]),this.subscribedBond.lotSize=parseFloat(e.updateValues[14]),this.subscribedBond.lsChange=parseFloat(e.updateValues[25]),this.subscribedBond.changePercentage=parseFloat(e.updateValues[27]),this.subscribedBond.lastPrice=parseFloat(e.updateValues[20]),this.subscribedBond.closePrice=parseFloat(e.updateValues[13]),this.subscribedBond.lastTradingDate=e.updateValues[41],console.log(e.updateValues[21]),console.log(e.updateValues[22]),e.updateValues[21]&&"S"===e.updateValues[21]&&(this.showSuspensionModal=!0,this.bondTransactionOptions[0].show=!1,this.bondTransactionOptions[1].show=!1),this.firstView&&!this.isUpdate&&(this.buyLimitPrice.patchValue(this.subscribedBond.askPrice?this.subscribedBond.askPrice:this.subscribedBond.lastPrice?this.subscribedBond.lastPrice:0),this.bondSellForm.get("limitOrderPrice").patchValue(this.subscribedBond.bidPrice?this.subscribedBond.bidPrice:this.subscribedBond.closePrice?this.subscribedBond.closePrice:0),this.firstView=!1)}))}get buyLimitPrice(){return this.bondBuyForm.get("limitOrderPrice")}get sellLimitPrice(){return this.bondSellForm.get("limitOrderPrice")}closeRemarks(){this.showRemarksModal=!1,this.acceptOrderpadExperience=!0,this.isLoadingPreviewOrder=!1}proceedToBeFull(){this.isLoadingForModal=!0,this.onTabChange("beFull"),this.closeRemarks(),this.isLoadingForModal=!1}proceedToOTC(){this.isLoadingForModal=!0,this.onTabChange("bondOTC"),this.closeRemarks(),this.isLoadingForModal=!1}handleRemarksModel(){for(const e of this.bondTransactionOptions)e.active=(null==e?void 0:e.value)===this.routeToTab,this.selectedBondTransactionType=this.routeToTab,this.showRemarksModal=!1}onDateChange(e){if(e){const t=e.getTime();this.epochTime=t,console.log("epocTime: "+t),this.getBondCalculatorData()}}getAndCheckW8BenDetails(e){this.isLoadingForPass=!0,this.accountRestService.getStockW8BenFormDetails(this.accountService.getTradableAccountRefno).subscribe(t=>{var n,o;t.status===B.a.RESPONSE_SUCCESS&&(this.w8BenStatus=null===(n=t.data)||void 0===n?void 0:n.w8Status,this.w8ExpiryDate=null===(o=t.data)||void 0===o?void 0:o.w8ExpiryDate,this.checkW8BenForm(e)||this.showW8BenFormErrorModel()),this.isLoadingForPass=!1})}checkW8BenForm(e){let t=this.selectedBond;return e&&e.selectedBond&&e.selectedBond.currentValue&&(t=e.selectedBond.currentValue),"Y"!==t.usSourceIncome||this.w8BenStatus==N.a.APPROVED&&this.w8ExpiryDate>new Date}showW8BenFormErrorModel(){this.w8BenChecked||(this.showPreviewOrder=!1,this.w8BenChecked=!0,console.log(this.w8BenStatus),this.w8BenModalRef=this.w8BenStatus===N.a.PENDING?this.modalService.warning({nzTitle:"W-8BEN Form",nzContent:"We are currently processing your W-8Ben form to verify your non-US tax status. Note that this manual processing will be longer, all W-8Ben forms will be subjected to review and approve by FSMOne.",nzOkText:"Ok",nzMaskClosable:!0,nzWrapClassName:"vertical-center-modal",nzOnCancel:()=>{this.showPreviewOrder=!0,this.w8BenChecked=!1,this.closeBondDetails(),this.w8BenModalRef.close()},nzOnOk:()=>{this.showPreviewOrder=!0,this.w8BenChecked=!1,this.closeBondDetails(),this.w8BenModalRef.close()}}):this.store.selectSnapshot(b.a.getPrimaryDisplay).accountType===Y.a.ACCOUNT_TYPE_CORPORATE?this.modalService.warning({nzTitle:"W-8BEN-E Form",nzVisible:this.w8BenChecked,nzContent:"For corporate accounts, you are required to submit a copy of the W-8BEN-E Form.",nzOkText:"Ok",nzMaskClosable:!0,nzWrapClassName:"vertical-center-modal",nzOnCancel:()=>{this.showPreviewOrder=!0,this.w8BenChecked=!1,this.closeBondDetails(),this.w8BenModalRef.close()},nzOnOk:()=>{this.showPreviewOrder=!0,this.w8BenChecked=!1,this.closeBondDetails(),this.w8BenModalRef.close()}}):this.modalService.warning({nzTitle:"W-8BEN Form",nzContent:"Please submit your W-8Ben Form to verify your non-US tax status.",nzOkText:"Redirect",nzMaskClosable:!0,nzWrapClassName:"vertical-center-modal",nzOnCancel:()=>{this.showPreviewOrder=!0,this.w8BenChecked=!1,this.closeBondDetails(),this.w8BenModalRef.close()},nzOnOk:()=>{this.showPreviewOrder=!0,this.w8BenChecked=!1,this.closeBondDetails(),this.w8BenModalRef.close(),this.router.navigate([B.o.APP,B.o.ACCOUNT_UPDATE,B.o.W8_BEN_FORM])}}))}onContactDealer(){window.location.href="tel:+603-2149 0652",this.showSellRetentionModal=!1,this.isLoadingPreviewOrder=!1}onContinueToSell(){this.sellRetentionAmtCheck=!0,this.proceedSellPreviewOrder(!1),this.isLoadingPreviewOrder=!1,this.showSellRetentionModal=!1}showSellRetentionAmtModel(e){this.sellRetentionAmtCheck||(this.showSellRetentionModal=!0,"allow"===e?this.showContinueToSellButton=!0:"notAllow"===e&&(this.showContinueToSellButton=!1))}getBondExchangeHoliday(){this.subHandlingService.once(this.bondRestService.checkBondExchangeHoliday().pipe(Object(c.a)(e=>{this.isExchangeHolidayModalVisible=e.data})))}onCloseSellRetentionModal(){this.isLoadingPreviewOrder=!1,this.showSellRetentionModal=!1}onCloseModal(){this.isExchangeHolidayModalVisible=!1}onProceedToOtc(){this.onCloseModal(),this.onTabChange("bondOTC")}checkBuyAction(){if(!this.isUpdate){if("Y"!==this.selectedBond.retailDistribution&&!this.siDeclarationService.hasDeclared())return void(this.showSiDeclarationModel=!0);this.riskAppetite&&("HYSEEKER"===this.selectedBond.bondSuitabilityCode?this.riskAppetite.riskAppetite!==j.a.RISK_APPETITE_AGGRESSIVE_BOND&&(this.isRiskExcessive=!0):"SISEEKER"===this.selectedBond.bondSuitabilityCode?this.riskAppetite.riskAppetite!==j.a.RISK_APPETITE_CONSERVATIVE&&this.riskAppetite.riskAppetite!==j.a.RISK_APPETITE_MODERATELY_CONSERVATIVE||(this.isRiskExcessive=!0):"DISTRESS"===this.selectedBond.bondSuitabilityCode&&(this.isRiskExcessive=!0)),this.isRiskExcessive||this.onRiskApprove()}}onBondExpressBuyPreviewOrder(e,t,n,o){this.fromBondExpress=t,this.bondExpressTransactionModel=e,console.log(n),this.beEstTotalAmtPayable=n,this.beBufferRate=o,this.steps="postPreviewOrder"}createBondExpressBuy(e){this.subHandlingService.once(e.pipe(Object(s.a)(e=>{var t;const n=Object.assign(Object.assign({},this.bondExpressTransactionModel),e),o=(null==n?void 0:n.refno)?null==n?void 0:n.refno:null===(t=this.selectedAcctModel)||void 0===t?void 0:t.refno;return this.transactionBondRestService.createBondExpressBuyContract(o,n).pipe(this.twoFaService.intercept())}),Object(c.a)(e=>{var t,n,o,i;if((null==e?void 0:e.status)!==B.a.RESPONSE_SUCCESS)return e.errorMessage.includes("foreign.exch
1ange.policy.breached")?(this.fepBreached=!0,this.steps="prePreviewOrder",this.onBack()):(this.nzNotificationService.error("Failed",null==e?void 0:e.errorMessage),this.steps="prePreviewOrder"),this.isLoadingForPass=!1,void(this.approvingBuy=!1);if(this.isLoadingForPass=!1,this.closeBondDetails(),this.rmoEnabled)this.createNotification("success","Your order have placed successful, you can continue now check your order in our order book","Order Place Successful",!0,!0),this.onSuccessTransact();else{const l=(null===(t=this.bondExpressTransactionModel)||void 0===t?void 0:t.refno)?null===(n=this.bondExpressTransactionModel)||void 0===n?void 0:n.refno:null===(o=this.selectedAcctModel)||void 0===o?void 0:o.refno;this.router.navigate([Object(P.a)(B.o.APP,B.o.TRADE,B.o.BOND_CHECK_OUT)],{queryParams:{poNumber:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.purchaseOrderNo,refno:l}})}}),Object(r.a)(()=>this.store.dispatch(new R.e(!1,!0)))))}onBondExpressSellPreviewOrder(e,t){this.fromBondExpress=t,this.bondExpressSellTransactionModel=e,this.steps="postPreviewOrder"}onModalOpen(){var e;const t=null===(e=document.querySelector(".custom-popup-modal"))||void 0===e?void 0:e.closest(".cdk-overlay-pane");t&&t.classList.add("custom-overlay-pane")}getAllOrderpadLoading(){return this.isLoading||this.isLoadingTrustAndAutoSweepAcct||this.isLoadingAutoSweepFxRate||this.isLoadingForModal}checkRmoEnabled(){var e;this.rmoEnabled=null===(e=this.store.selectSnapshot(b.a.getAuthData))||void 0===e?void 0:e.rmoEnabled}isLastTradingDate(){if(!this.subscribedBond.lastTradingDate)return!1;const e=new Date(this.subscribedBond.lastTradingDate),t=new Date;return t.setHours(0,0,0,0),e.setHours(0,0,0,0),t.getTime()===e.getTime()}onSuccessUpdate(){this.successUpdate.emit()}onSuccessTransact(){this.successTransact.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.lc(l.g),i.lc(G.a),i.lc(h.a),i.lc(W.a),i.lc(Q.a),i.lc(v.i),i.lc($.a),i.lc(S.a),i.lc(K.a),i.lc(X.b),i.lc(D.a),i.lc(h.a),i.lc(ee.e),i.lc(te.a),i.lc(ne.a),i.lc(k.a),i.lc(i.Q),i.lc(L.e),i.lc(oe.a),i.lc(ie.a),i.lc(M.g),i.lc(M.f),i.lc(le.a))},e.\u0275cmp=i.fc({type:e,selectors:[["rmo-bond-buy-details"]],viewQuery:function(e,t){var n;1&e&&i.yd(We,!0),2&e&&i.Zc(n=i.Ac())&&(t.bondCalculatorV2=n.first)},inputs:{defaultRefno:"defaultRefno",bondTransactionModel:"bondTransactionModel",selectedBond:"selectedBond",visible:"visible",bondExpressAvailable:"bondExpressAvailable",isUpdate:"isUpdate",lotType:"lotType",transType:"transType",lsClient:"lsClient",nzStyle:"nzStyle"},outputs:{visibleChange:"visibleChange",successUpdate:"successUpdate",successTransact:"successTransact"},features:[i.Tb([h.a,S.a,D.a,k.a]),i.Sb],decls:119,vars:45,consts:[[4,"ngIf"],["nzHeight","100%",3,"nzVisible","nzWrapClassName","nzPlacement",4,"ngIf"],["bondBuyContent",""],["BEBuySellPostPrevOrder",""],["bondExpressBuyPostPrevOrder",""],["bondExpressSellPostPrevOrder",""],["transactionTypeOptionTab",""],["bondExpressBuyPrevOrder",""],["bondExpressSellPrevOrder",""],["prePreviewOrder",""],["buySellPreviewButton",""],["bondBuyFormButtonTpl",""],["bondBuyTopDetailTpl",""],["bondBuyFormTpl",""],["postBuyPreviewOrder",""],["processingFeeWithoutSSTTemplate",""],["postPreviewOrderTncContent",""],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzFooter","nzOnCancel",4,"ngIf"],["importantNoteContent",""],["plusCircleIcon",""],["minusCircleIcon",""],["bondBuyPrePreviewOrderTitle",""],["bondExpressBuyPrePreviewOrderTitle",""],["marketDepthRow",""],[3,"showModal","refno","showModalChange"],["yieldTemplate",""],["mobileTextTpl",""],["buySellButtonGroupTemplate",""],["postSellPreviewOrder",""],["bondSellFormTpl",""],["paymentMethodTemplate",""],["gtdDatePicker",""],["showDashForAskYield",""],["showDashForBidYield",""],["showDashForLastDone",""],["closeIconTemplate",""],[3,"nzWidth","nzVisible","nzWrapClassName","nzFooter","nzVisibleChange","nzOnCancel"],[3,"ngClass"],[1,"py-2","pr-3"],["nzType","flex","nzJustify","end"],["nz-button","","nzType","outline",1,"mx-2",3,"click"],["nz-button","","nzType","primary",1,"mx-2",3,"click"],["nzWrapClassName","vertical-center-modal",3,"nz
1Visible","nzClassName","nzFooter","nzAfterOpen"],["nz-row","","nzJustify","left","nzAlign","middle",1,"pt-1"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-xl","text-warning","px-2"],[1,"text-lg","font-weight-bold"],["nz-row","","nzJustify","middle","nzAlign","middle","class","pt-2 pl-5",4,"ngIf"],["nz-row","","nzJustify","middle","nzAlign","middle",1,"pt-2","pl-5"],["class","mx-2","nz-button","","nzType","primary",3,"nzLoading","click",4,"ngIf"],[2,"position","absolute","z-index","2000",3,"selectedBond","isSuspendedBondModalVisible","closeButtonClicked","proceedButtonClicked"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzClosable","nzFooter","nzTitle","nzClassName","nzMaskClosable","nzVisibleChange","nzOnCancel","nzAfterOpen",4,"ngIf"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzFooter","nzWidth","nzClassName","nzOnCancel","nzAfterOpen",4,"ngIf"],[2,"position","absolute","z-index","2000",3,"check","stayOnCurrentPage","show","onAccepted","onDecline"],[2,"position","absolute","z-index","2000",3,"showForceUpdateModal"],[3,"modalVisible","isPopUp","footerFunc","onOkEmit","onUpdateEmit"],["id","myModalOverride","nzWrapClassName","vertical-center-modal","nzZIndex","1028",3,"nzVisible","nzWidth","nzFooter","nzCloseIcon","nzBodyStyle","nzOnCancel"],[3,"nzSpinning"],[3,"componentStyleOnly"],[3,"ngTemplateOutlet"],["nzHeight","100%",3,"nzVisible","nzWrapClassName","nzPlacement"],[1,"bg-white",3,"ngStyle"],[1,"border-bottom"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"bg-white","h-100","px-2","py-3",3,"ngStyle"],[3,"title","back"],[3,"ngSwitch","ngClass"],[4,"ngSwitchDefault"],["class","font-weight-semibold pb-1",4,"ngIf"],[1,"font-weight-bold","text-base","mb-0","d-flex"],["class","bond-express-label-new text-sm mr-1 text-white",4,"ngIf"],[1,"text-sm","text-black-6",3,"innerHTML"],[1,"font-weight-semibold","pb-1"],[3,"isFullLotType","isOddLotType","isRetail","nzStyle",4,"ngIf"],[3,"isFullLotType","isOddLotType","isRetail","nzStyle"],[1,"bond-express-label-new","text-sm","mr-1","text-white"],[4,"ngIf","ngIfElse"],["class","w-100 bottom-sheet-affix ",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"w-100","bottom-sheet-affix"],[1,"bg-white","bond-footer-mobile"],["class","d-flex justify-content-between",3,"click",4,"ngIf"],["class","d-flex justify-content-between",4,"ngIf"],[1,"w-100"],[3,"bondCalculatorInput","isOrderpad","bondType","isSellOrderpad","estPayableAmtEmitter","estTotalReturnEmitter","netYieldEmitter",4,"ngIf"],[1,"d-flex","justify-content-between",3,"click"],[1,"text-grey"],[1,"d-flex"],[1,"font-weight-bold",3,"ngClass"],[1,"arrow-icon",3,"src"],[1,"d-flex","justify-content-between"],[1,"font-weight-bold","text-profit"],[3,"bondCalculatorInput","isOrderpad","bondType","isSellOrderpad","estPayableAmtEmitter","estTotalReturnEmitter","netYieldEmitter"],["bondCalculatorV2",""],[1,"overflow-auto","max-height-500"],[1,"text-right","mt-4","py-3"],["nz-button","","nzType","outline",1,"mr-3",3,"click"],["nz-button","","nzType","primary",3,"nzLoading","click"],["nzBlock","","nz-button","","nzType","outline",1,"my-1",3,"click"],["nzBlock","","nz-button","","nzType","primary",1,"my-1",3,"nzLoading","click"],[3,"bondCalculatorData","bondExpressTransactionModel","estTotalAmtPayable","bufferRate","netYtm","netYieldType",4,"ngIf"],[3,"bondCalculatorData","bondExpressTransactionModel","estTotalAmtPayable","bufferRate","netYtm","netYieldType"],[3,"accountNumber","bondExpressTransactionModel"],[1,"d-flex","justify-space-between","align-item-center","pb-12px"],["class","rank-tab mr-2 rounded-circle d-inline-flex pointer",3,"ngClass","click",4,"ngFor","ngForOf"],["nzType","tonal",3,"nzIcon","click"],[1,"rank-tab","mr-2","rounded-circle","d-inline-flex","pointer",3,"ngClass","click"],[1,"px-3","py-2","text-sm"],[3,"selectedBond","platformFee","defaultRefno","bondCalculatorData","allBondMarkupRate","offerYldToWorst","nextCallDate","buySellToggleTemplate","bondExpressTransactionModel","cancel","beShortFallAmtOutput","previewOrder","netYieldEmitter",4,"ngIf"],[3,"selectedBond","platformFee","defaultRefno","bondCalculatorData","allBondMarkupRate","offerYldToWorst","nextCallDate","buySellToggleTemplate","bondExpressTransactionModel","cancel","beShortFallAmtOutput","previewOrder","netYieldEmitter"],[3,"selectedBondHolding","selectedBond","buySellToggleTemplate","bondExpressTransactionModel","previewOrder","cancel",4,"ngIf"],[3,"selectedBondHolding","selectedBond","buySellToggleTemplate","bondExpressTransactionModel","previewOrder","cancel"],["nz-row","","nzGutter","16","class","m-0",4,"ngIf"],["nz-row","","nzGutter","16",1,"m-0"],["nz-col","",1,"pr-4","pl-0",3,"nzSpan","hidden"],["nz-col","",1,"orderpad-form",3,"nzSpan"],[3,"formCardBody",4,"ngIf"],[3,"formCardBody"],["nzSize","large","class","w-100",3,"nzType","nzRound","nzBlock","disabled","nzLoading","click",4,"ngIf"],["nzType","black","nzSize","large","class","w-100",3,"nzRound","nzBlock","disabled","nzLoading","click",4,"ngIf"],["nzSize","large",1,"w-100",3,"nzType","nzRound","nzBlock","disabled","nzLoading","click"],["nzType","black","nzSize","large",1,"w-100",3,"nzRound","nzBlock","disabled","nzLoading","click"],["nz-col","","nzSpan","24","class","text-warning text-sm",4,"ngIf"],["nz-row","","nzGutter","16",1,"mt-3"],["nz-col","",3,"nzSpan"],["nz-col","","nzSpan","24",1,"text-warning","text-sm"],["nz-icon","","nzType","info-circle","nzTheme","fill"],["class","pb-12px d-flex align-item-center","style","gap: 13px;",4,"ngIf"],[1,"pb-12px","d-flex","align-item-center",2,"gap","13px"],[1,"rounded-top","rounded-bottom","center-text","active-ask-price-wrapper","to
1p","bottom",3,"ngClass"],["nzType","flex","nzJustify","left",1,"t-xs","font-weight-normal","line-height-normal","font-style-normal","text-content-tertiary"],[1,"t-xl","font-weight-bold","my-2","line-height-normal"],["nzType","flex","nzJustify","left",1,"t-xs","text-content-primary","line-height-normal"],[1,"rounded-top","rounded-bottom","center-text","active-bid-price-wrapper","top","bottom",3,"ngClass"],[1,"font-weight-bold"],[1,"text-left"],[1,"text-right","right"],[1,"bid-yield-line"],["nz-row","","nzGutter","24",1,"pb-2","pt-1"],["nz-col","",3,"nzSpan","ngClass"],[1,"profit-bg-custom","t-xs"],["class","text-left",4,"ngIf","ngIfElse"],[1,"text-profit","font-weight-bold","right"],[1,"loss-bg-custom","t-xs"],["class","text-right right",4,"ngIf","ngIfElse"],[1,"text-loss","font-weight-bold","ask-percent"],["nz-form","",1,"d-flex","flex-column","gap-12px","border-0",3,"formGroup"],["class","d-flex align-item-center justify-content-between",4,"ngIf"],["nzOffset","6","nzSpan","18"],["class","form-red-warning-wrapper",4,"ngIf"],["class","pl-12px pr-12px mt-1",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between"],[1,"line-height-18px",3,"nzSpan"],[1,"input-label"],[3,"nzSpan"],[3,"nzSuffix","ngClass"],["formControlName","nominalValue","type","number","placeholder","Nominal Value",1,"no-arrow","input-text","h-45px","border-0","pl-12px","pr-12px","pt-8px","pb-8px","w-100",3,"ngClass","step"],["norminalSuffixTemplate",""],["class","modify-view-field pb-12px",4,"ngIf"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass",4,"ngIf"],["class","d-flex text-sm mt-2",4,"ngIf"],["nzPlaceHolder","Investment Account","formControlName","refno",1,"compact-view","no-placeholder","border-0","border-radius-8px",3,"nzShowArrow","ngClass","nzDisabled","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],[3,"nzLabel","nzValue"],[1,"form-red-warning-wrapper"],["nzLabelPlaceholder","Order Type","nzPlaceHolder","Order Type","formControlName","buyType",1,"compact-view","no-placeholder","border-0"],[1,"pl-12px","pr-12px","mt-1"],[3,"info","infoClass","value","valueClass"],["formControlName","limitOrderPrice","type","number",1,"no-arrow","input-text","h-45px","border-0","pl-12px","pr-12px","pt-8px","pb-8px","w-100",3,"ngClass","placeholder","disabled"],["priceSuffixTemplate",""],[1,"d-flex","align-items-center"],["type","interface-icon/minus-long","width","16px","height","16px",1,"pointer",3,"click"],["type","interface-icon/plus-o","width","16px","height","16px",1,"pointer",3,"ngClass","click"],["nzLabelPlaceholder","Order Validity","nzPlaceHolder","Order Validity","formControlName","orderValidity",1,"compact-view","no-placeholder","border-0",3,"nzShowArrow","nzDisabled","ngModelChange"],["nz-icon","","nzType","question-circle","nzTheme","fill",3,"click"],["nzLabelPlaceholder","Payment Method","nzPlaceHolder","Payment Method","formControlName","paymentMethod",1,"compact-view","no-placeholder","border-0","border-radius-8px",3,"nzLoading","nzShowArrow","ngClass"],["class","rounded-bottom",3,"nzValue","nzLabel",4,"ngFor","ngForOf"],[1,"rounded-bottom",3,"nzValue","nzLabel"],[1,"modify-view-field","pb-12px"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass"],[1,"d-flex","text-sm","mt-2"],[1,"pr-2"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-danger","text-sm"],["autoSweepInsufficientBalanceMsg",""],[1,"d-block"],["target","_blank",3,"href"],[1,"post-preview-order-wrapper"],[1,"text-sm"],[1,"text-sm","text-profit"],["class","text-sm",4,"ngIf"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",1,"text-info","pointer",3,"nzTooltipTitle"],[1,"with-breakdown"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","The Estimated Payable Amount is the estimated total investment cost to set aside at the current indicative market price or the limit price entered, factoring in a buffer amount, indicative accrued interest, and FSMOne processing fee.","nzType","info-circle",1,"text-info","pointer"],[1,"font-weight-bold","text-sm","mb-0"],[1,"break-down"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",1,"pl-1","text-info","pointer",3,"nzTooltipTitle"],["accruedInterestToolTip",""],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","The buffer amount is in place to accommodate potential changes in bond prices during execution, accrued interest of the actual settlement date and foreign exchange rates (if applicable).","nzType","info-circle",1,"pl-1","text-info","pointer"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","Either FSMOne Rewards Program or promotional sales charge (whichever is lower, where applicable) will be reflected here. 8% SST, applicable to the Processing Fee.","nzType","info-circle",1,"pl-1","text-info","pointer"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","Either FSMOne Rewards Program or promotional sales charge (whichever is lower, where applicable) will be reflected here.","nzType","info-circle",1,"pl-1","text-info","pointer"],["nz-row","","nzType","flex","nzJustify","right","nzAlign","middle",1,"mb-"],["nz-row","",1,"py-1","text-sm","text-black-6"],[1,"mt-2"],["nz-row","","nzAlign","middle","nzJustify","left",1,"mb-2"],["nz-col","","nzSpan","12",1,"text-left","font-weight-bold"],["nz-col","","nzSpan","12",1,"text-right","text-sm","font-weight-bold"],[3,"click",4,"ngIf"],["nzAccordion","",1,"collapse-no-padding"],["nzHeader"," Terms & Condition",3,"nzExpandedIcon","nzActive"],["termsAndCondition",""],["nz-row","",1,"w-100","mt-2","mb-2","text-base","font-weight-bold"],[1,"infinite-container-xs","mb-4"],["nzHeader"," Useful Information",3,"nzExpandedIcon","nzActive"],["usefulInfo",""],[1,"infinite-container-sm"],["class","py-1",4,"ngFor","ngForOf"],["nzHeader"," Risk Disclosure Statements",3,"nzExpandedIcon","nzActive"],["riskDisclosure",""],[1,"py-1"],["nz-row","",1,"py-1","text-sm","text-black-8","font-weight-bold"],["nz-row","",1,"py-1","text-sm","text-black-8"],[3,"click"],["nz-row","",1,"py-1","text-sm","text-black-8",3,"innerHtml"],["nzWrapClassName","vertical-center-modal",3,"nz
1Visible","nzFooter","nzOnCancel"],["importantNoteTemplate",""],[1,"text-right","mt-2"],["nz-button","","nzType","outline",1,"mr-3","flex-shrink-0",3,"nzSize","click"],["nz-button","","nzType","primary",3,"nzSize","nzLoading","click"],[3,"show","hideButtons"],["nz-row","",3,"ngClass"],[1,"d-flex","align-items-center","justify-content-center"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-warning",2,"font-size","80px"],[1,"font-weight-bold","text-left","mb-2",2,"font-size","17px"],[1,"pl-3",2,"font-size","14px"],[1,"mb-1"],["nz-icon","","nzType","plus-circle","nzTheme","fill",1,"text-info","pl-3","pr-2"],["nz-icon","","nzType","minus-circle","nzTheme","fill",1,"text-info","pl-3","pr-2"],[2,"position","absolute","z-index","2000",3,"refno","requestKey","actionKey","width","emitCancel","onApprove","on2FaMethodChecked"],[1,"d-flex","flex-column",3,"ngClass"],[1,"d-flex",3,"ngClass"],[1,"d-flex","flex-column"],[1,"d-flex","gap-8px"],["style","padding-bottom: 5px",4,"ngIf"],["nz-row","","nzType","flex"],[3,"isFullLotType","isOddLotType","isRetail","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle","isRetail",4,"ngIf"],[1,"font-weight-bold","pointer",3,"ngClass","click"],[1,"font-weight-semibold","text-black",3,"ngClass","innerHTML"],["nz-row",""],[1,"text-sm","text-black-6","bond-issuer-text","pb-0",3,"ngClass","innerHTML"],["nz-row","",3,"ngClass",4,"ngIf"],["class","pointer font-weight-bold line-height-normal t-sm text-black align-content-center",3,"click",4,"ngIf"],[3,"hidden"],["chartType","priceChart",3,"ngClass","chartDisplayModelMap","chartDataMap","bondInfoModel","bondIntraDataModel","tooltipFormatterY","isPeriodTabRight","showChartData","show1Dselection","periodTabClass","showChart","chartOutput"],[2,"padding-bottom","5px"],[3,"nzClass","isLastTradingDay"],[3,"isFullLotType","isOddLotType","isRetail","ngStyle"],[3,"ngClass","ngStyle","isRetail"],[1,"font-weight-bold","font-family-jakarta","text-content-primary",3,"ngClass"],[3,"ngClass",4,"ngIf"],[1,"pointer","font-weight-bold","line-height-normal","t-sm","text-black","align-content-center",3,"click"],["class","pr-8px","height","14","width","14",3,"type",4,"ngIf"],["nzType","tonal","nzSize","ex-small",3,"nzIcon",4,"ngIf"],["height","14","width","14",1,"pr-8px",3,"type"],["nzType","tonal","nzSize","ex-small",3,"nzIcon"],[1,"font-weight-bold","text-base","text-link","pointer","mb-0","d-flex",3,"click"],[1,"font-weight-bold","text-black",3,"ngClass","innerHTML"],[4,"ngFor","ngForOf"],["nzAlign","left",3,"ngClass"],["nzAlign","center",1,"border-right-1"],[1,"text-profit","font-weight-bold",3,"ngClass"],["nzAlign","center",3,"ngClass"],[1,"text-loss","font-weight-bold",3,"ngClass"],["nzAlign","right",3,"ngClass"],["nz-row","","nzType","flex",1,"d-flex","align-item-center","justify-content-between"],["nz-col","",1,"line-height-18px",3,"nzSpan"],["nz-col","",1,"button-row","p-4px",3,"nzSpan"],[2,"padding","0.5rem 40%",3,"ngClass","disabled","click"],[1,"font-weight-semibold","text-14px"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","Estimated receivable amount from sell proceeds.","nzType","info-circle",1,"text-info","pointer"],["nzOffset","6","nzSpan","18","class","pl-12px pr-12px",4,"ngIf"],["class","pr-2",4,"ngIf"],["nz-row","","class","text-warning",4,"ngIf"],["nzLabelPlaceholder","Order Type","nzPlaceHolder","Order Type","formControlName","sellType",1,"compact-view","no-placeholder","border-0",3,"ngModelChange"],["nzOffset","6","nzSpan","18",1,"pl-12px","pr-12px"],["class","d-flex align-items-center",4,"ngIf"],["nzType","tertiary","nzSize","small","class","ml-12px",3,"click",4,"ngIf"],["nzType","tertiary","nzSize","small",1,"ml-12px",3,"click"],["nzLabelPlaceholder","Redemption Method","nzPlaceHolder","Redemption Method","formControlName","redemptionMethod",1,"compact-view","no-placeholder","border-0","border-radius-8px",3,"nzLoading","nzShowArrow","ngClass"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],[3,"nzValue","nzLabel"],["nz-row","",1,"text-warning"],[1,"w-100","gtd-date-picker","background-grey","rounded-8px",3,"ngStyle","nzDisabled","nzDisabledDate","ngModel","nzFormat","nzShowToday","nzAllowClear","ngModelChange"],[1,"text-sm","mt-1","font-weight-bold"],["nzType","tonal",3,"nzIcon"],["nz-button","","nzType","primary",1,"mx-2",3,"nzLoading","click"],["nzWrapClassName","vertical-center-modal",3,"nz
1Visible","nzClosable","nzFooter","nzTitle","nzClassName","nzMaskClosable","nzVisibleChange","nzOnCancel","nzAfterOpen"],["nz-row","","nzJustify","center","nzAlign","middle",1,"pt-3"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"exclamation-css","text-warning"],["nz-row","","nzJustify","left","nzAlign","left",1,"pt-3"],[1,"font-weight-bold","sell-retention-model-title"],["nz-row","","nzJustify","left","nzAlign","left",1,"pt-2","text-left"],["href","tel:+603-2149 0652"],["nz-row","",1,"text-right","mt-4","sell-retention-model-button"],[1,"cancel-button","px-2","py-1","mr-2",3,"click"],["class","continue-sell-button px-3 mr-2",3,"click",4,"ngIf"],[1,"contact-dealer-button","px-3","py-1",3,"click"],[1,"continue-sell-button","px-3","mr-2",3,"click"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzFooter","nzWidth","nzClassName","nzOnCancel","nzAfterOpen"],["nz-row","","nzJustify","left","nzAlign","middle",1,"pt-3"],["nz-row","","nzJustify","middle","nzAlign","middle",1,"pt-2","px-5"],["nz-button","","nzType","primary",3,"click"],["nz-row","","nzJustify","middle","nzAlign","middle",1,"pt-4","px-5"],[1,"text-md","font-weight-bold"],[1,"text-theme"],[1,"pt-2","pb-2"]],template:function(e,t){1&e&&(i.od(0,$e,5,10,"div",0),i.Ec(1,"async"),i.od(2,et,4,6,"nz-drawer",1),i.Ec(3,"async"),i.od(4,xt,6,6,"ng-template",null,2,i.pd),i.od(6,Et,1,1,"ng-template",null,3,i.pd),i.od(8,Dt,2,2,"ng-template",null,4,i.pd),i.od(10,zt,2,3,"ng-template",null,5,i.pd),i.od(12,qt,4,2,"ng-template",null,6,i.pd),i.od(14,_t,1,1,"ng-template",null,7,i.pd),i.od(16,kt,1,1,"ng-template",null,8,i.pd),i.od(18,$t,4,6,"ng-template",null,9,i.pd),i.od(20,Jt,3,2,"ng-template",null,10,i.pd),i.od(22,nn,5,4,"ng-template",null,11,i.pd),i.od(24,bn,2,2,"ng-template",null,12,i.pd),i.od(26,Hn,40,28,"ng-template",null,13,i.pd),i.od(28,io,80,48,"ng-template",null,14,i.pd),i.od(30,lo,7,5,"ng-template",null,15,i.pd),i.od(32,po,71,9,"ng-template",null,16,i.pd),i.rc(34,"app-web-scaffold"),i.od(35,ho,8,6,"nz-modal",17),i.Ec(36,"async"),i.qc(),i.rc(37,"app-mobile-scaffold"),i.od(38,bo,8,4,"ng-container",0),i.Ec(39,"async"),i.qc(),i.od(40,mo,25,3,"ng-template",null,18,i.pd),i.od(42,go,1,0,"ng-template",null,19,i.pd),i.od(44,fo,1,0,"ng-template",null,20,i.pd),i.od(46,vo,2,4,"ng-container",0),i.od(47,yo,2,4,"ng-container",0),i.od(48,_o,27,41,"ng-template",null,21,i.pd),i.od(50,ko,6,9,"ng-template",null,22,i.pd),i.od(52,Vo,1,1,"ng-template",null,23,i.pd),i.rc(54,"fep-breached-modal",24),i.zc("showModalChange",(function(e){return t.fepBreached=e})),i.qc(),i.od(55,jo,4,2,"ng-template",null,25,i.pd),i.od(57,Wo,4,6,"ng-template",null,26,i.pd),i.od(59,Qo,15,12,"ng-template",null,27,i.pd),i.od(61,ni,46,28,"ng-template",null,28,i.pd),i.od(63,qi,42,34,"ng-template",null,29,i.pd),i.od(65,Ii,2,1,"ng-template",null,30,i.pd),i.od(67,_i,2,4,"ng-container",0),i.od(68,Ri,2,4,"ng-container",0),i.od(69,Ui,1,8,"ng-template",null,31,i.pd),i.od(71,Li,2,0,"ng-template",null,32,i.pd),i.od(73,Vi,2,0,"ng-template",null,33,i.pd),i.od(75,Ni,2,0,"ng-template",null,34,i.pd),i.od(77,Yi,1,1,"ng-template",null,35,i.pd),i.rc(79,"nz-modal",36),i.zc("nzVisibleChange",(function(e){return t.gtdVisible=e}))("nzOnCancel",(function(){return t.handleGtdVisible()})),i.rc(80,"div",37),i.Ec(81,"async"),i.rc(82,"h3",38),i.rc(83,"span"),i.qd(84,"Good-Till-Date"),i.qc(),i.qc(),i.rc(85,"p"),i.qd(86,"Good-Till-Date order allows you to place an order that will remain in queue in the order book up to 30 days until it is fully filled, specifically cancelled, or the instrument is de-listed, expired, suspended or has corporate actions. "),i.qc(),i.rc(87,"p"),i.qd(88,"GTD orders which are partially filled on different trading days will not be amalgamated, commissions/fees are charged separately for trades filled in different trading day."),i.qc(),i.rc(89,"p"),i.qd(90,"Open orders can be cancelled / expired in the event of corporate action or other exchange related action set by the exchange."),i.qc(),i.qc(),i.rc(91,"nz-row",39),i.rc(92,"button",40),i.zc("click",(function(){return t.learnMoreGtd()})),i.qd(93,"Learn More"),i.qc(),i.rc(94,"button",41),i.zc("click",(function(){return t.handleGtdVisible()})),i.qd(95,"Got it"),i.qc(),i.qc(),i.qc(),i.rc(96,"nz-modal",42),i.zc("nzAfterOpen",(function(){return t.onModalOpen()})),i.rc(97,"div",43),i.mc(98,"i",44),i.rc(99,"span",45),i.qd(100,"Order Placement Suggestion"),i.qc(),i.qc(),i.od(101,ji,4,0,"div",46),i.rc(102,"div",47),i.od(103,Hi,2,1,"h5",0),i.mc(104,"br"),i.od(105,Gi,2,0,"h5",0),i.mc(106,"br"),i.qc(),i.rc(107,"nz-row",39),i.rc(108,"button",40),i.zc("click",(function(){return t.closeRemarks()})),i.qd(109,"Cancel"),i.qc(),i.od(110,Wi,2,1,"button",48),i.od(111,Qi,2,1,"button",48),i.od(112,$i,2,1,"button",48),i.qc(),i.qc(),i.rc(113,"app-bond-rmo-suspension-modal",49),i.zc("closeButtonClicked",(function(){return t.closeBondDetails()}))("proceedButtonClicked",(function(){return t.onTabChange("bondOTC")})),i.qc(),i.od(114,Xi,17,7,"nz-modal",50),i.od(115,Zi,13,5,"nz-modal",51),i.rc(116,"shared-si-declaration-revamp-modal",52),i.zc("onAccepted",(function(){return t.checkBuyAction()}))("onDecline",(function(){return t.closeBondDetails()})),i.qc(),i.mc(117,"app-risk-profile-required-modal",53),i.rc(118,"passport-expiry-notification",54),i.zc("onOkEmit",(function(){return t.passportNoticeVisible=!1}))("onUpdateEmit",(function(){return t.passportNoticeVisible=!1})),i.qc()),2&e&&(i.Mc("ngIf",!i.Fc(1,35,t.isMobile$)&&t.selectedBond),i.Ub(2),i.Mc("ngIf",i.Fc(3,37,t.isMobile$)&&t.visible),i.Ub(33),i.Mc("ngIf",t.selectedBond&&!i.Fc(36,39,t.isMobile$)),i.Ub(3),i.Mc("ngIf",t.importantNote&&i.Fc(39,41,t.isMobile$)),i.Ub(8),i.Mc("ngIf",t.approv
1ingBuy),i.Ub(1),i.Mc("ngIf",t.isModifyBuyOrder),i.Ub(7),i.Mc("showModal",t.fepBreached)("refno",t.defaultRefno),i.Ub(13),i.Mc("ngIf",t.approvingSell),i.Ub(1),i.Mc("ngIf",t.isModifySellOrder),i.Ub(11),i.Mc("nzWidth",800)("nzVisible",t.gtdVisible)("nzWrapClassName","bond-GTD-modal vertical-center-modal")("nzFooter",null),i.Ub(1),i.Mc("ngClass",i.Fc(81,43,t.isMobile$)?"p-1":null),i.Ub(16),i.Mc("nzVisible",t.showRemarksModal)("nzClassName","custom-popup-modal")("nzFooter",null),i.Ub(5),i.Mc("ngIf",t.showBuyFullSizeAtOdd),i.Ub(2),i.Mc("ngIf",t.showSellRemarksOTCMsg),i.Ub(2),i.Mc("ngIf",t.showSellMeetFullSize),i.Ub(5),i.Mc("ngIf",t.showBuyFullSizeAtOdd),i.Ub(1),i.Mc("ngIf",t.showSellMeetFullSize),i.Ub(1),i.Mc("ngIf",t.showSellRemarksOTCMsg),i.Ub(1),i.Mc("selectedBond",t.selectedBond)("isSuspendedBondModalVisible",t.showSuspensionModal),i.Ub(1),i.Mc("ngIf",t.showSellRetentionModal),i.Ub(1),i.Mc("ngIf",t.selectedBond),i.Ub(1),i.Mc("check",!0)("stayOnCurrentPage",!0)("show",t.showSiDeclarationModel),i.Ub(1),i.Mc("showForceUpdateModal",t.showForceUpdateModal),i.Ub(1),i.Mc("modalVisible",t.passportNoticeVisible)("isPopUp",!1)("footerFunc",!0))},directives:[M.t,ae.a,ce.a,se.a,L.a,M.q,re.c,de.a,ue.b,pe.a,he.a,be.a,me.a,ge.a,fe.a,M.A,ve.a,M.w,M.x,M.y,ye.a,M.z,Me.a,Te.a,Ce.a,Oe.a,Be.a,M.s,Se.a,xe.a,Pe.a,re.a,Ee.a,we.a,l.J,l.u,De.b,l.l,ze.a,Ae.c,l.c,l.z,l.t,l.j,Fe.a,qe.d,qe.a,Ie.a,_e.a,Re.e,J.a,J.c,ke.a,Ue.a,Le.a,Ve.a,Ne.a,Ye.g,Ye.d,Z.a,l.w],pipes:[M.b,M.g,je.a,He.a,M.d,Ge.a],styles:['@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans");.hidden[_ngcontent-%COMP%]{visibility:hidden} #container{background:none!important}.exclamation-css[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:70px}.font-family-jakarta[_ngcontent-%COMP%]{font-family:var(--font-family-display-title)}.sell-retention-model-title[_ngcontent-%COMP%]{font-size:larger}.sell-retention-model-button[_ngcontent-%COMP%]{background:#fff}.sell-retention-model-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border-radius:15px;font-size:14px;background:#fff;color:#0f0505;font-weight:600;padding-top:.4rem!important;padding-bottom:.4rem!important}.sell-retention-model-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--black)!important;box-shadow:0 3px 8px 0 rgba(0,0,0,.5);color:#fff}.sell-retention-model-button[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{border:none!important}.sell-retention-model-button[_ngcontent-%COMP%] .continue-sell-button[_ngcontent-%COMP%]{border:1px solid grey!important}.sell-retention-model-button[_ngcontent-%COMP%] .contact-dealer-button[_ngcontent-%COMP%]{border:none!important;background:var(--black)!important;color:#fff}.product-background[_ngcontent-%COMP%]{background-color:#f5f8f9}.infinite-container-xs[_ngcontent-%COMP%]{height:80px;overflow-y:scroll}.infinite-container-sm[_ngcontent-%COMP%]{height:130px;overflow-y:scroll}.order-type[_ngcontent-%COMP%]{border:1px solid #d9d9d9;height:46px}.bottom-sheet-affix[_ngcontent-%COMP%]{width:100%!important;background:#fff;z-index:1050;position:fixed;bottom:0;left:0}.bond-footer-mobile[_ngcontent-%COMP%]{box-shadow:0 -8px 16px rgba(0,0,0,.24);padding:16px}.bond-footer-mobile[_ngcontent-%COMP%] .swipe-area[_ngcontent-%COMP%] .swipe-line[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center}.bond-footer-mobile[_ngcontent-%COMP%] .swipe-area[_ngcontent-%COMP%] .swipe-line[_ngcontent-%COMP%]:after{content:"";border:2px solid #d3d3d3;width:48px;border-radius:9999px}.bond-footer-mobile[_ngcontent-%COMP%] .h-expand[_ngcontent-%COMP%]{transition:.2s;height:calc(100vh - 320px);overflow-y:scroll}.bond-footer-mobile[_ngcontent-%COMP%] .h-shrink[_ngcontent-%COMP%]{transition:.2s;height:0;overflow:hidden}.radio-shadow[_ngcontent-%COMP%]{box-shadow:0 2px 4px rgba(0,0,0,.1)}.bid-price-wrapper[_ngcontent-%COMP%]{border:1px solid transparent;padding:8px}.active-bid-price-wrapper[_ngcontent-%COMP%]{background:#fff5f6;padding:8px}.border-loss-color[_ngcontent-%COMP%]{border-left:1px solid #ff333a;border-right:1px solid #ff333a}.border-loss-color.top[_ngcontent-%COMP%]{border-top:1px solid #ff333a}.border-loss-color.bottom[_ngcontent-%COMP%]{border-bottom:1px solid #ff333a}.active-ask-price-wrapper[_ngcontent-%COMP%]{background:#edf9f3;padding:8px}.active-ask-price-wrapper.bottom-border[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.ask-price-wrapper[_ngcontent-%COMP%]{border:1px solid transparent;padding:8px}.ask-price-wrapper.bottom-border[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.border-profit-color[_ngcontent-%COMP%]{border-left:1px solid #093;border-right:1px solid #093}.border-profit-color.top[_ngcontent-%COMP%]{border-top:1px solid #093}.border-profit-color.bottom[_ngcontent-%COMP%]{border-bottom:1px solid #093}.under-wrapper[_ngcontent-%COMP%]{padding:8px 0}.border[_ngcontent-%COMP%]{border-color:#75c543!important}.bid-price-border[_ngcontent-%COMP%]{border:1px solid;border-color:red!important}.center-text[_ngcontent-%COMP%]{text-align:center}.chg-color-text[_ngcontent-%COMP%]{color:#093;text-align:right}.netYield-block[_ngcontent-%COMP%]{margin:.75rem .5rem .5rem}.post-ask-price-wrapper[_ngcontent-%COMP%]{margin-bottom:8px}.post-ask-price-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 0;display:flex;justify-content:space-between;border-bottom:1px dashed var(--black-6)}.post-ask-price-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--black-6)}.post-ask-price-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{text-align:right}.post-ask-price-wrapper[_ngcontent-%COMP%] .with-breakdown[_ngcontent-%COMP%]{border-bottom:none}.post-ask-price-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%]{display:block;padding-top:2px}.post-ask-price-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:2px 0;display:flex;font-size:12px!important;justify-content:space-between}.post-ask-price-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .text-sm[_ngcontent-%COMP%]{font-size:12px!important}.hidden[_ngcontent-%COMP%]{display:none!important}.buy-sell-radio[_ngcontent-%COMP%]{margin:1rem 0;width:100%}.buy-sell-radio[_ngcontent-%COMP%] .ant-radio-button-wrapper[_ngcontent-%COMP%] .ant-radio-button[_ngcontent-%COMP%]{width:10rem;text-align:center}.no-arrow[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, .no-arrow[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;display:none;margin:0}.orderpad-view-row[_ngcontent-%COMP%]{margin:1.25rem 0;padding:.2rem 1.25rem;background-color:#ededed}.bond-express-label[_ngcontent-%COMP%]{font-weight:600;background:#2952ac 0 0 no-repeat padding-box;display:inline-block;transform:skewX(-15deg);padding:2px 6px}.bond-express-label-new[_ngcontent-%COMP%]{font-weight:500;display:flex;align-items:center;font-size:var(--t-lg,18px);padding:0 4px;border-radius:4px;
1height:25px;line-height:normal;background:#054096}@media only screen and (max-width:920px){.bond-express-label-new[_ngcontent-%COMP%]{font-size:var(--t-3xs,11px);height:auto;padding:1px 4px}}.bond-express-full-label[_ngcontent-%COMP%]{background:#cba119 0 0 no-repeat padding-box}.bond-express-full-label[_ngcontent-%COMP%], .bond-retail-label[_ngcontent-%COMP%]{font-weight:600;display:inline-block;transform:skewX(-15deg);padding:2px 4px;font-size:10px}.bond-retail-label[_ngcontent-%COMP%]{background:#000 0 0 no-repeat padding-box} .buy.ant-radio-button-wrapper-checked{background:#093!important;border-color:#093!important;box-shadow:-1px 0 0 0 #093!important} .buy.ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled{background:rgba(0,153,51,.7)!important;border-color:rgba(0,153,51,.7)!important;box-shadow:-1px 0 0 0 rgba(0,153,51,.7)!important} .sell.ant-radio-button-wrapper-checked{background:#ff333a!important;border-color:#ff333a!important;box-shadow:-1px 0 0 0 #ff333a!important} .sell.ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled{background:rgba(255,51,58,.7)!important;border-color:rgba(255,51,58,.7)!important;box-shadow:-1px 0 0 0 rgba(255,51,58,.7)!important} .post-login-layout .post-login-content-mobile{padding-bottom:unset}.mobile-l1[_ngcontent-%COMP%]{margin-left:70px}.web-l1[_ngcontent-%COMP%]{margin-left:28rem}.title-text[_ngcontent-%COMP%]{padding-top:3px;margin-bottom:0}.bond-issuer-text[_ngcontent-%COMP%]{padding-bottom:8px;margin-bottom:0}.grey-color[_ngcontent-%COMP%]{color:#7a7a7a!important}.bond-status-tag[_ngcontent-%COMP%]{border:1px solid #000;font-size:12px;text-align:center;display:inline-block;padding:2px;border-radius:4px;font-weight:600;float:right}.bond-status-tag.l1[_ngcontent-%COMP%]{border-color:#3ea6ff;background:var(--lightblue-3ea6ff) 0 0 no-repeat padding-box;background:#3ea6ff 0 0 no-repeat padding-box}.bond-status-tag.live[_ngcontent-%COMP%]{margin-left:.3rem;background:var(--orange-ff8424) 0 0 no-repeat padding-box;background:#ff8424 0 0 no-repeat padding-box;border-color:#ff8424}.profit-bg-custom[_ngcontent-%COMP%]{background:linear-gradient(270deg,#eafeef var(--fill-percent),#fff var(--fill-percent))}.profit-bg-20[_ngcontent-%COMP%], .profit-bg-40[_ngcontent-%COMP%], .profit-bg-50[_ngcontent-%COMP%]{background:#eafeef 0 0 no-repeat padding-box;float:right;text-align:right}.profit-bg-40[_ngcontent-%COMP%]{width:40%}.loss-bg-custom[_ngcontent-%COMP%]{background:linear-gradient(90deg,#fdf5f6 var(--fill-percent),#fff var(--fill-percent))}.loss-bg-20[_ngcontent-%COMP%], .loss-bg-30[_ngcontent-%COMP%], .loss-bg-50[_ngcontent-%COMP%]{background:#fdf5f6 0 0 no-repeat padding-box;float:left}.right[_ngcontent-%COMP%]{float:right;padding-right:5px}.ask-percent[_ngcontent-%COMP%]{padding-left:5px}.bid-yield[_ngcontent-%COMP%]{padding-right:2px!important}.ask-yield[_ngcontent-%COMP%]{padding-left:2px!important}.end[_ngcontent-%COMP%]{margin-left:auto}.bid-yield-line[_ngcontent-%COMP%]{background-size:100% 5px;background:linear-gradient(90deg,#093 var(--ask-percent),#ff333a var(--bid-percent)) no-repeat;height:5px;width:100%}.button-row[_ngcontent-%COMP%]{margin-bottom:10px;border-radius:24px;background:#ededed}.button-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:none;cursor:pointer;transition:background-color .3s;border-radius:24px;color:#000;background:transparent}.button-row[_ngcontent-%COMP%] .button-buy-active[_ngcontent-%COMP%]{color:#fff;border:2px solid #093;background:#093}.button-row[_ngcontent-%COMP%] .button-sell-active[_ngcontent-%COMP%]{color:#fff;border:2px solid #ff333a;background:#ff333a}.post-preview-order-wrapper[_ngcontent-%COMP%]{margin-bottom:8px}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 0;display:flex;justify-content:space-between;border-bottom:1px dashed var(--black-6)}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--black-6)}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{text-align:right}.post-preview-order-wrapper[_ngcontent-%COMP%] .with-breakdown[_ngcontent-%COMP%]{border-bottom:none}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%]{display:block;padding-top:2px}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:2px 0;display:flex;font-size:12px!important;justify-content:space-between}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .text-sm[_ngcontent-%COMP%]{font-size:12px!important}.bond-GTD-modal[_ngcontent-%COMP%] .ant-modal-content[_ngcontent-%COMP%] .ant-modal-header[_ngcontent-%COMP%]{padding-bottom:5px!important}.gtd-date-picker[_ngcontent-%COMP%] nz-picker .ant-calendar-picker .ant-calendar-picker-input{font-size:14px;font-weight:700;text-align:left;padding-right:35px;background-color:transparent}.profit-change[_ngcontent-%COMP%]{color:#093!important}.loss-change[_ngcontent-%COMP%], .profit-change[_ngcontent-%COMP%]{font-weight:500;text-align:center}.loss-change[_ngcontent-%COMP%]{color:#ff333a!important}.orderpad-form[_ngcontent-%COMP%]{border-radius:16px;border:1px solid #e0e0e0;background:#fff;padding:24px!important}.background-grey[_ngcontent-%COMP%]{background-color:#f5f5f5!important}.rounded-8px[_ngcontent-%COMP%]{border-radius:8px}
1.rounded-top-8px[_ngcontent-%COMP%]{border-top-left-radius:8px;border-top-right-radius:8px}.rounded-bottom-8px[_ngcontent-%COMP%]{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.h-45px[_ngcontent-%COMP%]{height:45px}.input-text[_ngcontent-%COMP%]{color:#282828;font-size:14px;font-weight:600}.input-label[_ngcontent-%COMP%], .input-text[_ngcontent-%COMP%]{font-style:normal;line-height:normal}.input-label[_ngcontent-%COMP%]{color:#616161;font-size:12px;font-weight:400}.img[_ngcontent-%COMP%]{padding:10px}.arrow-icon[_ngcontent-%COMP%]{padding:0 5px;height:16px;width:26px}.text-grey[_ngcontent-%COMP%]{color:#616161}.text-profit[_ngcontent-%COMP%]{color:#093!important}.text-loss[_ngcontent-%COMP%]{color:#ff333a!important} .custom-overlay-pane{z-index:2000!important}.modify-view-field[_ngcontent-%COMP%]{border-bottom:1px dashed #e0e0e0;border-radius:0!important}.custom-bond-tag[_ngcontent-%COMP%] .bond-status-tag{font-size:11px}.font-style-normal[_ngcontent-%COMP%]{font-style:normal}.text-content-tertiary[_ngcontent-%COMP%]{color:#616161}.text-content-primary[_ngcontent-%COMP%]{color:#282828}.error-bg[_ngcontent-%COMP%]{background-color:#f9edec!important}.border-radius-8px[_ngcontent-%COMP%]{border-radius:8px}.close-icon-size[_ngcontent-%COMP%]{font-size:16px!important}']}),Object(o.c)([Object(v.e)(w.a.isMobile)],e.prototype,"isMobile$",void 0),Object(o.c)([Object(v.e)(b.a.getAccounts)],e.prototype,"authenticatedDisplay$",void 0),e})()},eXWG:function(e,t,n){"use strict";n.d(t,"a",(function(){return Gi}));var o=n("fXoL"),i=n("6h7t"),l=n("3Pt+"),a=n("hRIC"),c=n("ofXK"),s=n("XNiG"),r=n("LRne"),d=n("cp0P"),u=n("Kj3r"),p=n("/uUt"),h=n("vkgz"),b=n("JIr8"),m=n("eIep"),g=n("nYR2"),f=n("MV2b"),v=n("Zk2z"),y=n("LW8c"),C=n("ildK"),M=n("H8v0"),T=n("j+kT"),O=n("MwlG"),B=n("mV2b"),S=n("tyNb"),x=n("yaes"),P=n("AcyG"),E=n("W7Oe"),w=n("2VHv"),D=n("+U6L"),z=n("+Lsq"),A=n("jFTi"),F=n("/ai0"),q=n("PtUS"),I=n("z7QD"),_=n("qAZ0"),R=n("UMWb"),k=n("dEAy"),U=n("B+r4"),L=n("5vDB"),V=n("lHsO"),N=n("2uUe"),Y=n("SYWN"),j=n("ar4Q"),H=n("t5pw"),G=n("f7L5"),W=n("HtrM"),Q=n("nJia"),$=n("ocnv"),K=n("6oRW"),X=n("kDAA"),J=n("qPyS"),Z=n("FwiY"),ee=n("0lU3"),te=n("vcRD"),ne=n("+LO9"),oe=n("m9O6"),ie=n("OtHt"),le=n("TN0j"),ae=n("baFZ"),ce=n("p1br"),se=n("FzKe");const re=["estNetYieldToCallTpl"],de=["estNetYieldToMaturityTpl"],ue=["factsheetEstNetYieldToCallTpl"],pe=["factsheetEstNetYieldToMaturityTpl"],he=["nominalValue"],be=["nonFactsheetNominalValue"];function me(e,t){1&e&&o.nc(0)}function ge(e,t){1&e&&o.nc(0)}function fe(e,t){1&e&&o.nc(0)}function ve(e,t){if(1&e&&(o.rc(0,"div",49),o.od(1,ge,1,0,"ng-container",41),o.od(2,fe,1,0,"ng-container",41),o.qc()),2&e){o.Dc(3);const e=o.ad(15),t=o.ad(17);o.Ub(1),o.Mc("ngTemplateOutlet",e),o.Ub(1),o.Mc("ngTemplateOutlet",t)}}function ye(e,t){if(1&e&&(o.pc(0),o.od(1,ve,3,2,"div",48),o.oc()),2&e){const e=o.Dc(2),t=o.ad(79);o.Ub(1),o.Mc("ngIf",e.bondData)("ngIfElse",t)}}function Ce(e,t){1&e&&o.nc(0)}function Me(e,t){if(1&e&&(o.pc(0),o.od(1,Ce,1,0,"ng-container",41),o.oc()),2&e){o.Dc(4);const e=o.ad(15);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Te(e,t){if(1&e&&(o.rc(0,"div",49),o.od(1,Me,2,1,"ng-container",50),o.qc()),2&e){const e=o.Dc(3),t=o.ad(79);o.Ub(1),o.Mc("ngIf",e.bondData)("ngIfElse",t)}}function Oe(e,t){if(1&e&&(o.pc(0),o.od(1,Te,2,2,"div",48),o.oc()),2&e){const e=o.Dc(2),t=o.ad(77);o.Ub(1),o.Mc("ngIf",!e.isBondDataLoading)("ngIfElse",t)}}function Be(e,t){if(1&e){const e=o.sc();o.rc(0,"div",51),o.rc(1,"uic-button",52),o.zc("click",(function(){return o.dd(e),o.Dc(2).onShowResult()})),o.qd(2,"See Results"),o.qc(),o.qc()}2&e&&(o.Ub(1),o.Mc("nzRound",!0)("nzBlock",!0))}const Se=function(e,t){return{container:e,mobile:t}};function xe(e,t){if(1&e&&(o.pc(0),o.rc(1,"div",46),o.Ec(2,"async"),o.Ec(3,"async"),o.od(4,me,1,0,"ng-container",41),o.od(5,ye,2,2,"ng-container",0),o.Ec(6,"async"),o.od(7,Oe,2,2,"ng-container",0),o.Ec(8,"async"),o.od(9,Be,3,2,"div",47),o.Ec(10,"async"),o.qc(),o.oc()),2&e){const e=o.Dc(),t=o.ad(19);o.Ub(1),o.Mc("ngClass",o.Tc(15,Se,o.Fc(2,5,e.isMobile),o.Fc(3,7,e.isMobile))),o.Ub(3),o.Mc("ngTemplateOutlet",t),o.Ub(1),o.Mc("ngIf",!o.Fc(6,9,e.isMobile)),o.Ub(2),o.Mc("ngIf",o.Fc(8,11,e.isMobile)),o.Ub(2),o.Mc("ngIf",o.Fc(10,13,e.isMobile)&&!e.showResult&&e.bondData&&!e.isSearchModalVisible&&!e.showTooltipDrawer)}}function Pe(e,t){1&e&&o.nc(0)}function Ee(e,t){if(1&e&&(o.pc(0),o.od(1,Pe,1,0,"ng-container",41),o.oc()),2&e){o.Dc(4);const e=o.ad(15);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function we(e,t){1&e&&o.nc(0)}function De(e,t){if(1&e&&(o.rc(0,"div",55),o.od(1,Ee,2,1,"ng-container",0),o.od(2,we,1,0,"ng-container",41),o.qc()),2&e){const e=o.Dc(3),t=o.ad(17);o.Ub(1),o.Mc("ngIf",!e.isSellOrderpad),o.Ub(1),o.Mc("ngTemplateOutlet",t)}}function ze(e,t){if(1&e&&(o.pc(0),o.od(1,De,3,2,"div",54),o.oc()),2&e){const e=o.Dc(2),t=
1o.ad(77);o.Ub(1),o.Mc("ngIf",e.bondData)("ngIfElse",t)}}function Ae(e,t){1&e&&o.nc(0)}function Fe(e,t){if(1&e&&(o.pc(0),o.od(1,Ae,1,0,"ng-container",41),o.oc()),2&e){o.Dc(4);const e=o.ad(17);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function qe(e,t){if(1&e&&(o.rc(0,"div",49),o.od(1,Fe,2,1,"ng-container",50),o.qc()),2&e){const e=o.Dc(3),t=o.ad(79);o.Ub(1),o.Mc("ngIf",e.bondData)("ngIfElse",t)}}function Ie(e,t){if(1&e&&(o.pc(0),o.od(1,qe,2,2,"div",48),o.oc()),2&e){const e=o.Dc(2),t=o.ad(77);o.Ub(1),o.Mc("ngIf",!e.isBondDataLoading)("ngIfElse",t)}}const _e=function(e,t,n){return{container:e,"factsheet-mobile":t,factsheet:n}};function Re(e,t){if(1&e&&(o.pc(0),o.rc(1,"uic-body",53),o.rc(2,"div",46),o.Ec(3,"async"),o.Ec(4,"async"),o.Ec(5,"async"),o.od(6,ze,2,2,"ng-container",0),o.Ec(7,"async"),o.od(8,Ie,2,2,"ng-container",0),o.Ec(9,"async"),o.qc(),o.qc(),o.oc()),2&e){const e=o.Dc();o.Ub(1),o.Mc("componentStyleOnly",!0),o.Ub(1),o.Mc("ngClass",o.Uc(14,_e,o.Fc(3,4,e.isMobile),o.Fc(4,6,e.isMobile),!o.Fc(5,8,e.isMobile)&&!e.isOrderpad)),o.Ub(4),o.Mc("ngIf",!o.Fc(7,10,e.isMobile)),o.Ub(2),o.Mc("ngIf",o.Fc(9,12,e.isMobile))}}function ke(e,t){1&e&&o.nc(0)}function Ue(e,t){if(1&e&&(o.rc(0,"div",59),o.od(1,ke,1,0,"ng-container",41),o.qc()),2&e){o.Dc(3);const e=o.ad(17);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Le(e,t){if(1&e&&(o.pc(0),o.od(1,Ue,2,1,"div",58),o.oc()),2&e){const e=o.Dc(2),t=o.ad(77);o.Ub(1),o.Mc("ngIf",e.bondData||e.isBondDataLoaded)("ngIfElse",t)}}function Ve(e,t){if(1&e&&(o.pc(0),o.rc(1,"uic-body",53),o.rc(2,"nz-spin",56),o.rc(3,"div",57),o.od(4,Le,2,2,"ng-container",0),o.Ec(5,"async"),o.qc(),o.qc(),o.qc(),o.oc()),2&e){const e=o.Dc();o.Ub(1),o.Mc("componentStyleOnly",!0),o.Ub(1),o.Mc("nzSpinning",e.isBondDataLoaded&&e.isBondDataLoading),o.Ub(2),o.Mc("ngIf",!o.Fc(5,3,e.isMobile))}}function Ne(e,t){if(1&e){const e=o.sc();o.rc(0,"shared-global-search-revamp",60),o.zc("customOpenProductEvent",(function(t){return o.dd(e),o.Dc().selectBond(t)}))("closeModalEvent",(function(){return o.dd(e),o.Dc().closeSearch()})),o.qc()}if(2&e){const e=o.Dc();o.Mc("showModal",e.isSearchModalVisible)("defaultCategory",e.GlobalSearchConstant.PRODUCT_TYPE_BOND)("showProductTab",!1)("customOpenProduct",!0)("showWatchlist",!1)}}function Ye(e,t){if(1&e){const e=o.sc();o.rc(0,"shared-global-search-revamp",60),o.zc("customOpenProductEvent",(function(t){return o.dd(e),o.Dc(3).selectBond(t)}))("closeModalEvent",(function(){return o.dd(e),o.Dc(3).closeSearch()})),o.qc()}if(2&e){const e=o.Dc(3);o.Mc("showModal",e.isSearchModalVisible)("defaultCategory",e.GlobalSearchConstant.PRODUCT_TYPE_BOND)("showProductTab",!1)("customOpenProduct",!0)("showWatchlist",!1)}}function je(e,t){if(1&e&&o.od(0,Ye,1,5,"shared-global-search-revamp",1),2&e){const e=o.Dc(2);o.Mc("ngIf",e.isSearchModalVisible)}}function He(e,t){if(1&e&&(o.rc(0,"nz-modal",61),o.Ec(1,"async"),o.od(2,je,1,1,"ng-template",null,62,o.pd),o.qc()),2&e){const e=o.ad(3),t=o.Dc();o.Mc("nzVisible",t.isSearchModalVisible&&o.Fc(1,5,t.isMobile))("nzTitle",null)("nzContent",e)("nzFooter",null)("nzClosable",!1)}}function Ge(e,t){if(1&e){const e=o.sc();o.pc(0),o.rc(1,"span",70),o.zc("click",(function(){return o.dd(e),o.Dc(3).onHideResult()})),o.qc(),o.oc()}2&e&&(o.Ub(1),o.Mc("ngClass","icon-close-o t-sm"))}function We(e,t){if(1&e){const e=o.sc();o.pc(0),o.rc(1,"nz-col",71),o.zc("click",(function(){return o.dd(e),o.Dc(3).onHideResult()})),o.mc(2,"img",72),o.qc(),o.oc()}2&e&&(o.Ub(1),o.nd("padding","7px"),o.Ub(1),o.Mc("src","assets/images/bond-factsheet/Bond Factsheet - Close Button.svg",o.gd))}function Qe(e,t){if(1&e&&(o.rc(0,"span",73),o.qd(1),o.Ec(2,"date"),o.qc()),2&e){const e=o.Dc(3);o.Ub(1),o.rd(o.Gc(2,1,e.validateBuyBondCalculatorForm.get("buySettlementDate").value,"dd MMM yyyy"))}}function $e(e,t){1&e&&o.nc(0)}function Ke(e,t){if(1&e&&(o.rc(0,"div",49),o.od(1,$e,1,0,"ng-container",41),o.qc()),2&e){o.Dc(4);const e=o.ad(15);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Xe(e,t){1&e&&o.mc(0,"nz-divider")}function Je(e,t){1&e&&(o.rc(0,"div",76),o.qd(1),o.qc()),2&e&&(o.Ub(1),o.rd("Profit you could earn"))}function Ze(e,t){if(1&e&&(o.pc(0),o.od(1,Ke,2,1,"div",74),o.od(2,Xe,1,0,"nz-divider",0),o.od(3,Je,2,1,"div",75),o.Ec(4,"async"),o.oc()),2&e){const e=o.Dc(3);o.Ub(1),o.Mc("ngIf",!e.isSellOrderpad),o.Ub(1),o.Mc("ngIf",!e.isOrderpad&&!e.isFactsheet),o.Ub(1),o.Mc("ngIf",!e.isOrderpad&&o.Fc(4,3,e.isMobile))}}function et(e,t){1&e&&o.nc(0)}function tt(e,t){if(1&e){const e=o.sc();o.rc(0,"div",77),o.rc(1,"uic-button",78),o.zc("click",(function(){o.dd(e);const t=o.Dc(3);return t.onBuyClick(null==t.bondData?null:t.bondData.issueCode)})),o.qd(2,"Buy Now"),o.qc(),o.rc(3,"img",79),o.zc("click",(function(){return o.dd(e),o.Dc(3).onClickWatchlistIcon()})),o.qc(),o.qc()}if(2&e){const e=o.Dc(3);o.Ub(1),o.Mc("nzRound",!0)("nzBlock",!0)("disabled",!e.bondData||e.isBondDataLoading),o.Ub(2),o.Mc("src","assets/images/search/watchlist-o.svg",o.gd)}}const nt=function(e,t){return{"d-flex":e,"flex-column":t}};function ot(e,t){if(1&e&&(o.rc(0,"div",65),o.od(1,Ge,2,1,"ng-container",0),o.od(2,We,3,3,"ng-container",0),o.rc(3,"div",66),o.rc(4,"span",67),o.qd(5),o.qc(),o.od(6,Qe,3,4,"span",68),o.Ec(7,"async"),o.qc(),o.qc(),o.rc(8,"uic-body",53),o.od(9,Ze,5,5,"ng-container",0),o.od(10,et,1,0,"ng-container",41),o.od(11,tt,4,4,"div",69),o.qc()),2&e){const e=o.Dc(2),t=
1o.ad(17);o.Ub(1),o.Mc("ngIf",!(e.isFactsheet&&e.isMobile)),o.Ub(1),o.Mc("ngIf",e.isFactsheet&&e.isMobile),o.Ub(1),o.Mc("ngClass",o.Tc(11,nt,e.isFactsheet,e.isFactsheet)),o.Ub(2),o.rd(e.isFactsheet?"Invest Today":"Profit you could earn"),o.Ub(1),o.Mc("ngIf",e.isOrderpad&&!o.Fc(7,9,e.isMobile)),o.Ub(2),o.Mc("componentStyleOnly",!0),o.Ub(1),o.Mc("ngIf",e.isFactsheet||e.isOrderpad),o.Ub(1),o.Mc("ngTemplateOutlet",t),o.Ub(1),o.Mc("ngIf",!e.isFactsheet&&!e.isOrderpad)}}const it=function(){return{"padding-left":"16px","padding-right":"16px","padding-top":"0px"}};function lt(e,t){if(1&e){const e=o.sc();o.rc(0,"nz-modal",63),o.zc("nzOnCancel",(function(){return o.dd(e),o.Dc().onHideResult()}))("nzAfterOpen",(function(){return o.dd(e),o.Dc().onModalOpen()})),o.Ec(1,"async"),o.od(2,ot,12,14,"ng-template",null,64,o.pd),o.qc()}if(2&e){const e=o.ad(3),t=o.Dc();o.Mc("nzVisible",t.showResult&&o.Fc(1,7,t.isMobile))("nzTitle",null)("nzContent",e)("nzFooter",null)("nzBodyStyle",o.Rc(9,it))("nzClosable",!1)("nzClassName","custom-result-modal")}}function at(e,t){if(1&e){const e=o.sc();o.rc(0,"div",83),o.rc(1,"div",84),o.qd(2," What you get (Cash Flow Illustration) "),o.qc(),o.rc(3,"uic-round-button",85),o.zc("click",(function(){return o.dd(e),o.Dc(2).onHideCashFlowDetails()})),o.qc(),o.qc()}2&e&&(o.Ub(3),o.Mc("nzIcon","icon-close-o close-icon-size"))}function ct(e,t){1&e&&o.nc(0)}function st(e,t){if(1&e&&(o.pc(0),o.od(1,ct,1,0,"ng-container",41),o.oc()),2&e){o.Dc(3);const e=o.ad(73);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function rt(e,t){if(1&e&&o.od(0,st,2,1,"ng-container",0),2&e){const e=o.Dc(2);o.Mc("ngIf",!e.isSellOrderpad)}}const dt=function(){return{"overflow-y":"auto",height:"88vh"}};function ut(e,t){if(1&e){const e=o.sc();o.rc(0,"nz-modal",80),o.zc("nzOnCancel",(function(){return o.dd(e),o.Dc().onHideCashFlowDetails()})),o.Ec(1,"async"),o.od(2,at,4,1,"ng-template",null,81,o.pd),o.od(4,rt,1,1,"ng-template",null,82,o.pd),o.qc()}if(2&e){const e=o.ad(3),t=o.ad(5),n=o.Dc();o.Mc("nzVisible",n.isExpandCashFlow&&!o.Fc(1,6,n.isMobile))("nzTitle",e)("nzContent",t)("nzFooter",null)("nzCloseIcon",null)("nzBodyStyle",o.Rc(8,dt))}}function pt(e,t){if(1&e&&o.mc(0,"app-bond-exchange-tag",98),2&e){const e=o.Dc(2);o.Mc("isFullLotType","Y"===(null==e.bondData?null:e.bondData.bexFullEnabled))("isOddLotType","Y"===(null==e.bondData?null:e.bondData.bexOddEnabled))("isRetail","Y"===(null==e.bondData?null:e.bondData.retailDistribution))}}function ht(e,t){if(1&e&&o.mc(0,"app-bond-express-tag",99),2&e){const e=o.Dc(2);o.Mc("isRetail","Y"===(null==e.bondData?null:e.bondData.retailDistribution))}}function bt(e,t){if(1&e&&o.mc(0,"app-bond-otc-tag",99),2&e){const e=o.Dc(2);o.Mc("isRetail","Y"===(null==e.bondData?null:e.bondData.retailDistribution))}}function mt(e,t){if(1&e){const e=o.sc();o.rc(0,"div",100),o.zc("click",(function(){o.dd(e);const t=o.Dc(2);return t.navigateToBondFactsheet(null==t.bondData?null:t.bondData.issueCode,null==t.bondData?null:t.bondData.bondName)})),o.Ec(1,"async"),o.mc(2,"span",101),o.Ec(3,"bondName"),o.qc()}if(2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,2,e.isMobile)?"mobile":""),o.Ub(2),o.Mc("innerHTML",o.Gc(3,4,null==e.bondData?null:e.bondData.bondName,null==e.bondData?null:e.bondData.bexTradingWithoutAi),o.ed)}}function gt(e,t){if(1&e){const e=o.sc();o.rc(0,"div",100),o.zc("click",(function(){o.dd(e);const t=o.Dc(2);return t.navigateToBondFactsheet(null==t.bondData?null:t.bondData.issueCode,null==t.bondData?null:t.bondData.bondName)})),o.Ec(1,"async"),o.mc(2,"span",101),o.Ec(3,"bondName"),o.qc()}if(2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,2,e.isMobile)?"mobile":""),o.Ub(2),o.Mc("innerHTML",o.Gc(3,4,null==e.bondData?null:e.bondData.bondName,null==e.bondData?null:e.bondData.tradingWithoutAi),o.ed)}}function ft(e,t){1&e&&(o.pc(0),o.rc(1,"div",102),o.qd(2,"Ask Price"),o.qc(),o.oc())}function vt(e,t){1&e&&(o.pc(0),o.rc(1,"div",103),o.qd(2,"Ask"),o.qc(),o.rc(3,"div",103),o.qd(4,"Price"),o.qc(),o.oc())}function yt(e,t){1&e&&(o.pc(0),o.rc(1,"div",102),o.qd(2,"Years to Maturity"),o.qc(),o.oc())}function Ct(e,t){1&e&&(o.pc(0),o.rc(1,"div",103),o.qd(2,"Years to"),o.qc(),o.rc(3,"div",103),o.qd(4,"Maturity"),o.qc(),o.oc())}function Mt(e,t){if(1&e&&(o.rc(0,"div",94),o.od(1,yt,3,0,"ng-container",0),o.Ec(2,"async"),o.od(3,Ct,5,0,"ng-container",0),o.Ec(4,"async"),o.rc(5,"div",95),o.Ec(6,"async"),o.qd(7),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(1),o.Mc("ngIf",!o.Fc(2,4,e.isMobile)),o.Ub(2),o.Mc("ngIf",o.Fc(4,6,e.isMobile)),o.Ub(2),o.Mc("ngClass",o.Fc(6,8,e.isMobile)?"t-xs":"t-md"),o.Ub(2),o.rd(e.yearsToMaturity)}}function Tt(e,t){1&e&&(o.pc(0),o.rc(1,"div",102),o.qd(2,"Years to Call"),o.qc(),o.oc())}function Ot(e,t){1&e&&(o.pc(0),o.rc(1,"div",103),o.qd(2,"Years to"),o.qc(),o.rc(3,"div",103),o.qd(4,"Call"),o.qc(),o.oc())}function Bt(e,t){if(1&e&&(o.rc(0,"div",94),o.od(1,Tt,3,0,"ng-container",0),o.Ec(2,"async"),o.od(3,Ot,5,0,"ng-container",0),o.Ec(4,"async"),o.rc(5,"div",95),o.Ec(6,"async"),o.qd(7),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(1),o.Mc("ngIf",!o.Fc(2,4,e.isMobile)),o.Ub(2),o.Mc("ngIf",o.Fc(4,6,e.isMobile)),o.Ub(2),o.Mc("ngClass",o.Fc(6,8,e.isMobile)?"t-xs":"t-md"),o.Ub(2),o.rd(e.yearsToCall)}
1}function St(e,t){1&e&&(o.pc(0),o.rc(1,"div",102),o.qd(2,"Years to Sell"),o.qc(),o.oc())}function xt(e,t){1&e&&(o.pc(0),o.rc(1,"div",103),o.qd(2,"Years to"),o.qc(),o.rc(3,"div",103),o.qd(4,"Sell"),o.qc(),o.oc())}function Pt(e,t){if(1&e&&(o.rc(0,"div",94),o.od(1,St,3,0,"ng-container",0),o.Ec(2,"async"),o.od(3,xt,5,0,"ng-container",0),o.Ec(4,"async"),o.rc(5,"div",95),o.Ec(6,"async"),o.qd(7),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(1),o.Mc("ngIf",!o.Fc(2,4,e.isMobile)),o.Ub(2),o.Mc("ngIf",o.Fc(4,6,e.isMobile)),o.Ub(2),o.Mc("ngClass",o.Fc(6,8,e.isMobile)?"t-xs":"t-md"),o.Ub(2),o.rd(e.yearsToSell)}}function Et(e,t){if(1&e&&(o.rc(0,"div",86),o.rc(1,"div",87),o.rc(2,"div",88),o.Ec(3,"async"),o.od(4,pt,1,3,"app-bond-exchange-tag",89),o.od(5,ht,1,1,"app-bond-express-tag",90),o.od(6,bt,1,1,"app-bond-otc-tag",90),o.od(7,mt,4,7,"div",91),o.od(8,gt,4,7,"div",91),o.qc(),o.rc(9,"div",92),o.Ec(10,"async"),o.qd(11),o.qc(),o.qc(),o.rc(12,"div",93),o.rc(13,"div",94),o.od(14,ft,3,0,"ng-container",0),o.Ec(15,"async"),o.od(16,vt,5,0,"ng-container",0),o.Ec(17,"async"),o.rc(18,"div",95),o.Ec(19,"async"),o.qd(20),o.Ec(21,"nullToDash"),o.Ec(22,"number"),o.qc(),o.qc(),o.od(23,Mt,8,10,"div",96),o.od(24,Bt,8,10,"div",96),o.od(25,Pt,8,10,"div",96),o.rc(26,"div",94),o.rc(27,"div",97),o.Ec(28,"async"),o.qd(29,"Min. Investment (Nominal)"),o.qc(),o.rc(30,"div",95),o.Ec(31,"async"),o.qd(32),o.Ec(33,"currency"),o.qc(),o.qc(),o.qc(),o.qc()),2&e){const e=o.Dc();o.Ub(2),o.Mc("ngClass",o.Fc(3,18,e.isMobile)?"mobile":""),o.Ub(2),o.Mc("ngIf",e.rmoEnabled&&e.isBondExchange()),o.Ub(1),o.Mc("ngIf",(!e.isBondExchange()||!e.rmoEnabled)&&e.isBondExpress()),o.Ub(1),o.Mc("ngIf",!(e.isBondExchange()&&e.rmoEnabled||e.isBondExpress())),o.Ub(1),o.Mc("ngIf",e.rmoEnabled&&e.isBondExchange()),o.Ub(1),o.Mc("ngIf",!e.rmoEnabled||!e.isBondExchange()),o.Ub(1),o.Mc("ngClass",o.Fc(10,20,e.isMobile)?"mobile":""),o.Ub(2),o.rd(null==e.bondData?null:e.bondData.bondIssuer),o.Ub(3),o.Mc("ngIf",!o.Fc(15,22,e.isMobile)),o.Ub(2),o.Mc("ngIf",o.Fc(17,24,e.isMobile)),o.Ub(2),o.Mc("ngClass",o.Fc(19,26,e.isMobile)?"t-xs":"t-md"),o.Ub(2),o.rd(o.Fc(21,28,o.Gc(22,30,e.askPrice,"1.3-3"))),o.Ub(3),o.Mc("ngIf",e.investmentStrategySelected===e.MATURITY_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.CALL_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.SELL_INVESTMENT_STRATEGY),o.Ub(2),o.Mc("ngClass",o.Fc(28,33,e.isMobile)?"t-xs":"t-sm"),o.Ub(3),o.Mc("ngClass",o.Fc(31,35,e.isMobile)?"t-xs":"t-md"),o.Ub(2),o.rd(o.Ic(33,37,e.minInvest,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.0-0"))}}function wt(e,t){1&e&&o.nc(0)}function Dt(e,t){if(1&e&&(o.pc(0),o.od(1,wt,1,0,"ng-container",41),o.oc()),2&e){o.Dc(3);const e=o.ad(13);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function zt(e,t){1&e&&o.nc(0)}function At(e,t){1&e&&o.nc(0)}function Ft(e,t){if(1&e&&(o.rc(0,"div",107),o.od(1,Dt,2,1,"ng-container",0),o.Ec(2,"async"),o.od(3,zt,1,0,"ng-container",41),o.od(4,At,1,0,"ng-container",41),o.qc()),2&e){const e=o.Dc(2),t=o.ad(21),n=o.ad(23);o.Ub(1),o.Mc("ngIf",o.Fc(2,3,e.isMobile)),o.Ub(2),o.Mc("ngTemplateOutlet",t),o.Ub(1),o.Mc("ngTemplateOutlet",n)}}function qt(e,t){1&e&&o.nc(0)}function It(e,t){1&e&&o.nc(0)}function _t(e,t){1&e&&o.nc(0)}function Rt(e,t){1&e&&o.nc(0)}const kt=function(e){return{"w-100":e}};function Ut(e,t){if(1&e&&(o.rc(0,"div",108),o.od(1,_t,1,0,"ng-container",41),o.od(2,Rt,1,0,"ng-container",41),o.qc()),2&e){const e=o.Dc(2),t=o.ad(33),n=o.ad(35);o.Mc("ngClass",o.Sc(3,kt,e.isFactsheet)),o.Ub(1),o.Mc("ngTemplateOutlet",t),o.Ub(1),o.Mc("ngTemplateOutlet",n)}}function Lt(e,t){1&e&&o.nc(0)}const Vt=function(e,t,n){return{mobile:e,factsheet:t,orderpad:n}};function Nt(e,t){if(1&e&&(o.rc(0,"div",104),o.Ec(1,"async"),o.od(2,Ft,5,5,"div",105),o.od(3,qt,1,0,"ng-container",41),o.od(4,It,1,0,"ng-container",41),o.od(5,Ut,3,5,"div",106),o.Ec(6,"async"),o.od(7,Lt,1,0,"ng-container",41),o.qc()),2&e){const e=o.Dc(),t=o.ad(29),n=o.ad(31),i=o.ad(37);o.Mc("ngClass",o.Uc(10,Vt,o.Fc(1,6,e.isMobile),e.isFactsheet,e.isOrderpad)),o.Ub(2),o.Mc("ngIf",!e.isFactsheet&&!e.isOrderpad),o.Ub(1),o.Mc("ngTemplateOutlet",t),o.Ub(1),o.Mc("ngTemplateOutlet",n),o.Ub(1),o.Mc("ngIf",!o.Fc(6,8,e.isMobile)&&!e.isOrderpad&&!e.isFactsheet),o.Ub(2),o.Mc("ngTemplateOutlet",i)}}function Yt(e,t){1&e&&o.nc(0)}function jt(e,t){if(1&e&&(o.pc(0),o.od(1,Yt,1,0,"ng-container",41),o.oc()),2&e){o.Dc(4);const e=o.ad(13);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Ht(e,t){1&e&&o.nc(0)}function Gt(e,t){if(1&e&&(o.pc(0),o.od(1,Ht,1,0,"ng-container",41),o.oc()),2&e){o.Dc(5);const e=o.ad(39);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Wt(e,t){1&e&&o.nc(0)}function Qt(e,t){1&e&&o.nc(0)}function $t(e,t){if(1&e&&(o.rc(0,"div",108),o.od(1,Wt,1,0,"ng-container",41),o.od(2,Qt,1,0,"ng-container",41),o.qc()),2&e){const e=o.Dc(5),t=o.ad(33),n=o.ad(35);o.Mc("ngClass",o.Sc(3,kt,e.isFactsheet)),o.Ub(1),o.Mc("ngTemplateOutlet",t),o.Ub(1),o.Mc("ngTemplateOutlet",n)}}function Kt(e,t){1&e&&o.nc(0)}function Xt(e,t){if(1&e&&(o.pc(0),o.od(1,Kt,1,0,"ng-container",41),o.oc()),2&e){o.Dc(5);const e=o.ad(63);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Jt(e,t){1&e&&o.nc(0)}function Zt(e,t){if(1&e&&(o.pc(0),o.od(1,Jt,1,0,"ng-container",41),o.oc()),2&e){o.Dc(5);const e=o.ad(75);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function en(e,t){if(1&e&&(o.pc(0),o.od(1,Gt,2,1,"ng-container",50),o.od(2,$t,3,5,"div",106),o.Ec(3,"async"),o.od(4,Xt,2,1,"ng-container",0),o.Ec(5,"async"),o.od(6,Zt,2,1,"ng-container",0),o.Ec(7,"async"),o.Ec(8,"async"),o.oc()),2&e){const e=o.Dc(4),t=o.ad(71);o.Ub(1),o.Mc("ngIf",null==e.validateBuyBondCalculatorForm?null:e.validateBuyBondCalculatorForm.valid)("ngIfElse",t),o.Ub(1),o.Mc("ngIf",e.isFactsheet&&!o.Fc(3,5,e.isMobile)&&!e.isOrderpad),o.Ub(2),o.Mc("ngIf",!o.Fc(5,7,e.isMobile)||e.showResult||!e.isFactsheet),o.Ub(2),o.Mc("ngIf",!o.Fc(7,9,e.isMobile)&&!e.isOrderpad||o.Fc(8,11,e.isMobile)&&e.isFactsheet)}}const tn=function(e,t,n,o){return{"mb-8px":e,orderpad:t,"mobile-orderpad":n,"gap-12px-imp":o}};function nn(e,t){if(1&e&&(o.rc(0,"div",110),o.Ec(1,"async"),o.Ec(2,"async"),o.Ec(3,"async"),o.Ec(4,"async"),o.od(5,jt,2,1,"ng-container",0),o.od(6,en,9,13,"ng-container",50),o.qc()),2&e){const e=o.Dc(3),t=o.ad(77);o.Mc("ngClass",o.Vc(12,tn,!o.Fc(1,4,e.isMobile)&&!e.isFactsheet,e.isOrderpad&&!o.Fc(2,6,e.isMobile),e.isOrderpad&&o.Fc(3,8,e.isMobile),e.isFactsheet&&!o.Fc(4,10,e.isMobile)&&!e.isOrderpad)),o.Ub(5),o.Mc("ngIf",!e.isFactsheet&&!e.isOrderpad),o.Ub(1),o.Mc("ngIf",e.isFactsheet||e.isOrderpad||!e.isNominalValueUpdating)("ngIfElse",t)}}function on(e,t){if(1&e&&(o.pc(0),o.od(1,nn,7,17,"div",109),o.oc()),2&e){const e=o.Dc(2),t=
1o.ad(79);o.Ub(1),o.Mc("ngIf",e.bondData||e.isOrderpad)("ngIfElse",t)}}function ln(e,t){if(1&e&&o.od(0,on,2,2,"ng-container",50),2&e){const e=o.Dc(),t=o.ad(77);o.Mc("ngIf",!e.isBondDataLoading||e.isOrderpad&&e.isBondDataLoaded)("ngIfElse",t)}}function an(e,t){if(1&e){const e=o.sc();o.rc(0,"div",111),o.Ec(1,"async"),o.mc(2,"uic-product-button-wrapper",112),o.rc(3,"div",113),o.zc("click",(function(){return o.dd(e),o.Dc().openSearch()})),o.rc(4,"div",114),o.mc(5,"img",115),o.rc(6,"span",116),o.qd(7,"Select a bond"),o.qc(),o.qc(),o.qc(),o.qc()}if(2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,4,e.isMobile)?"mobile pt-24px pb-24px pl-16px pr-16px":"p-24px pb-48px"),o.Ub(2),o.Mc("defaultActiveItem","Bond Return Calculator")("itemGroup","BondCalculatorTools"),o.Ub(3),o.Mc("src",e.ImagePathConstant.SEARCH_IMG_PATH+"search-icon.svg",o.gd)}}function cn(e,t){if(1&e){const e=o.sc();o.rc(0,"uic-button-tab",121),o.zc("activeValueChange",(function(t){return o.dd(e),o.Dc(3).investmentStrategySelected=t}))("activeValueAfterChanged",(function(){o.dd(e);const t=o.Dc().$implicit;return o.Dc(2).onInvestmentStrategyChange(null==t?null:t.value)})),o.Ec(1,"async"),o.qc()}if(2&e){const e=o.Dc().$implicit,t=o.Dc(2);o.Mc("ngClass",o.Fc(1,6,t.isMobile)?"flex-none":"")("value",null==e?null:e.value)("displayText",null==e?null:e.label)("activeValue",t.investmentStrategySelected)("customBtnClass","uic-black-button-tab")("disabled",!t.bondData||t.isBondDataLoading)}}function sn(e,t){if(1&e&&(o.pc(0),o.od(1,cn,2,8,"uic-button-tab",120),o.oc()),2&e){const e=t.$implicit,n=o.Dc(2);o.Ub(1),o.Mc("ngIf",("call"===e.value?null==n.bondCalculatorData?null:n.bondCalculatorData.callDate:!("maturity"===e.value&&n.isPerpetualBond()))||!n.bondData)}}function rn(e,t){if(1&e&&(o.rc(0,"div",117),o.Ec(1,"async"),o.rc(2,"div"),o.qd(3,"Your Investment Strategy"),o.qc(),o.rc(4,"div",118),o.Ec(5,"async"),o.od(6,sn,2,1,"ng-container",119),o.qc(),o.qc()),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,3,e.isMobile)?"mobile":""),o.Ub(4),o.Mc("ngClass",o.Fc(5,5,e.isMobile)?"mobile":""),o.Ub(2),o.Mc("ngForOf",e.investmentStrategyList)}}function dn(e,t){if(1&e){const e=o.sc();o.rc(0,"uic-icon",127),o.zc("click",(function(){o.dd(e);const t=o.Dc(4),n=o.ad(25);return t.onClickTooltip(n)})),o.qc()}}function un(e,t){if(1&e&&o.mc(0,"uic-icon",128),2&e){o.Dc(4);const e=o.ad(25);o.Mc("nzTooltipTitle",e)}}function pn(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.od(2,dn,1,0,"uic-icon",125),o.Ec(3,"async"),o.od(4,un,1,1,"uic-icon",126),o.Ec(5,"async"),o.rc(6,"span"),o.qd(7,"Next Call Date: "),o.qc(),o.qd(8),o.Ec(9,"date"),o.qc()),2&e){const e=o.Dc(3);o.Mc("ngClass",o.Fc(1,4,e.isMobile)?"t-xs":"t-sm"),o.Ub(2),o.Mc("ngIf",o.Fc(3,6,e.isMobile)),o.Ub(2),o.Mc("ngIf",!o.Fc(5,8,e.isMobile)),o.Ub(4),o.sd(" ",o.Gc(9,10,null==e.bondCalculatorData?null:e.bondCalculatorData.callDate,e.dateFormat)," ")}}function hn(e,t){if(1&e){const e=o.sc();o.rc(0,"uic-icon",127),o.zc("click",(function(){o.dd(e);const t=o.Dc(4),n=o.ad(27);return t.onClickTooltip(n)})),o.qc()}}function bn(e,t){if(1&e&&o.mc(0,"uic-icon",128),2&e){o.Dc(4);const e=o.ad(27);o.Mc("nzTooltipTitle",e)}}function mn(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.od(2,hn,1,0,"uic-icon",125),o.Ec(3,"async"),o.od(4,bn,1,1,"uic-icon",126),o.Ec(5,"async"),o.rc(6,"span"),o.qd(7,"Maturity Date: "),o.qc(),o.qd(8),o.Ec(9,"date"),o.qc()),2&e){const e=o.Dc(3);o.Mc("ngClass",o.Fc(1,4,e.isMobile)?"t-xs":"t-sm"),o.Ub(2),o.Mc("ngIf",o.Fc(3,6,e.isMobile)),o.Ub(2),o.Mc("ngIf",!o.Fc(5,8,e.isMobile)),o.Ub(4),o.sd(" ",o.Gc(9,10,null==e.bondData?null:e.bondData.maturityDate,e.dateFormat)," ")}}function gn(e,t){if(1&e&&(o.rc(0,"div",123),o.od(1,pn,10,13,"div",124),o.od(2,mn,10,13,"div",124),o.qc()),2&e){const e=o.Dc(2);o.Ub(1),o.Mc("ngIf",null==e.bondCalculatorData?null:e.bondCalculatorData.callDate),o.Ub(1),o.Mc("ngIf",!e.isPerpetualBond())}}function fn(e,t){if(1&e&&o.od(0,gn,3,2,"div",122),2&e){const e=o.Dc();o.Mc("ngIf",e.bondData&&!e.isFactsheet)}}function vn(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2,"Call Date"),o.qc(),o.rc(3,"div",66),o.Ec(4,"async"),o.qd(5," The date on which the issuer can redeem (call) the bond before maturity. "),o.qc()),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,2,e.isMobile)?"font-weight-semibold text-18px line-height-normal pb-12px tooltip-title-color":"font-weight-bold text-14px line-height-20px"),o.Ub(3),o.Mc("ngClass",o.Fc(4,4,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function yn(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2,"Maturity Date"),o.qc(),o.rc(3,"div",66),o.Ec(4,"async"),o.qd(5," The date on which the bond\u2019s principal is scheduled to be fully repaid. "),o.qc()),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,2,e.isMobile)?"font-weight-semibold text-18px line-height-normal pb-12px tooltip-title-color":"font-weight-bold text-14px line-height-20px"),o.Ub(3),o.Mc("ngClass",o.Fc(4,4,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function Cn(e,t){if(1&e&&(o.rc(0,"div",73),o.qd(1),o.Ec(2,"date"),o.qc()),2&e){const e=o.Dc(3);o.Ub(1),o.sd(" ",o.Gc(2,1,e.validateBuyBondCalculatorForm.get("buySettlementDate").value,"dd MMM yyyy")," ")}}function Mn(e,t){if(1&e&&(o.rc(0,"div"),o.rc(1,"div",129),o.qd(2," Invest Today "),o.qc(),o.od(3,Cn,3,4,"div",68),o.qc()),2&e){const e=o.Dc(2);o.Ub(3),o.Mc("ngIf",e.isOrderpad)}}function Tn(e,t){if(1&e&&(o.od(0,Mn,4,1,"div",0),o.Ec(1,"async")),2&e){const e=o.Dc();o.Mc("ngIf",e.isFactsheet&&!o.Fc(1,1,e.isMobile))}}function On(e,t){1&e&&(o.rc(0,"div",148),o.mc(1,"i",149),o.qd(2,"Please fill in nominal value. "),o.qc())}function Bn(e,t){1&e&&(o.rc(0,"div",148),o.mc(1,"i",149),o.qd(2,"Please fill in buy price. "),o.qc())}const Sn=function(e,t,n){return{mobile:e,"w-100":t,"has-error":n}},xn=function(){return{"font-weight-bold":!0}};function Pn(e,t){if(1&e){const e=o.sc();o.pc(0),o.rc(1,"div",134),o.Ec(2,"async"),o.rc(3,"div",135),o.rc(4,"div",136),o.qd(5,"Nominal Value"),o.qc(),o.rc(6,"div",137),o.rc(7,"span",138),o.qd(8),o.qc(),o.rc(9,"ui-input-group"),o.mc(10,"input",139,140),o.qc(),o.qc(),o.qc(),o.rc(12,"div",141),o.rc(13,"uic-icon",142),o.zc("click",(function(){return o.dd(e),o.Dc(3).onMinusNominalValue()})),o.qc(),o.rc(14,"uic-icon",143),o.zc("click",(function(){return o.dd(e),o.Dc(3).onAddNominalValue()})),o.qc(),o.qc(),o.qc(),o.od(15,On,3,0,"div",144),o.rc(16,"div",145),o.Ec(17,"async"),o.rc(18,"div",135),o.rc(19,"div",146),o.qd(20,"Buy Price"),o.qc(),o.rc(21,"ui-input-group",66),o.rc(22,"input",147),o.zc("input",(function(t){return o.dd(e),o.Dc(3).limitDecimals(t)})),o.qc(),o.qc(),o.qc(),o.rc(23,"div",141),o.rc(24,"uic-icon",142),o.zc("click",(function(){return o.dd(e),o.Dc(3).onMinusBu
1yPrice()})),o.qc(),o.rc(25,"uic-icon",143),o.zc("click",(function(){return o.dd(e),o.Dc(3).onAddBuyPrice()})),o.qc(),o.qc(),o.qc(),o.od(26,Bn,3,0,"div",144),o.oc()}if(2&e){const e=o.Dc(3);o.Ub(1),o.Mc("ngClass",o.Uc(13,Sn,o.Fc(2,9,e.isMobile),e.isFactsheet,e.validateBuyBondCalculatorForm.get("nominalValue").errors)),o.Ub(7),o.rd(null!=e.bondData&&e.bondData.bondCurrencyCode?null==e.bondData?null:e.bondData.bondCurrencyCode:"MYR"),o.Ub(6),o.Mc("ngClass","ml-12px"),o.Ub(1),o.Mc("ngIf",e.validateBuyBondCalculatorForm.get("nominalValue").errors),o.Ub(1),o.Mc("ngClass",o.Uc(17,Sn,o.Fc(17,11,e.isMobile),e.isFactsheet,e.validateBuyBondCalculatorForm.get("buyPrice").errors)),o.Ub(5),o.Mc("ngClass",o.Rc(21,xn)),o.Ub(1),o.Mc("min",0),o.Ub(3),o.Mc("ngClass","ml-12px"),o.Ub(1),o.Mc("ngIf",e.validateBuyBondCalculatorForm.get("buyPrice").errors)}}function En(e,t){1&e&&(o.rc(0,"div",148),o.mc(1,"i",149),o.qd(2,"Please fill in nominal value. "),o.qc())}function wn(e,t){1&e&&(o.rc(0,"div",148),o.mc(1,"i",149),o.qd(2,"Please fill in buy price. "),o.qc())}const Dn=function(e,t){return{mobile:e,"w-100":t}},zn=function(e){return{"has-error":e}};function An(e,t){if(1&e){const e=o.sc();o.pc(0),o.rc(1,"div",150),o.Ec(2,"async"),o.rc(3,"div",151),o.qd(4,"Nominal Value"),o.qc(),o.rc(5,"div",152),o.rc(6,"ui-input-group"),o.mc(7,"input",153,154),o.qc(),o.rc(9,"div",141),o.rc(10,"uic-icon",142),o.zc("click",(function(){return o.dd(e),o.Dc(3).onMinusNominalValue()})),o.qc(),o.rc(11,"uic-icon",143),o.zc("click",(function(){return o.dd(e),o.Dc(3).onAddNominalValue()})),o.qc(),o.qc(),o.qc(),o.od(12,En,3,0,"div",144),o.qc(),o.rc(13,"div",155),o.Ec(14,"async"),o.rc(15,"div",151),o.qd(16,"Buy Price"),o.qc(),o.rc(17,"div",156),o.rc(18,"ui-input-group",157),o.rc(19,"input",158),o.zc("input",(function(t){return o.dd(e),o.Dc(3).limitDecimals(t)})),o.qc(),o.qc(),o.rc(20,"div",141),o.rc(21,"uic-icon",142),o.zc("click",(function(){return o.dd(e),o.Dc(3).onMinusBuyPrice()})),o.qc(),o.rc(22,"uic-icon",143),o.zc("click",(function(){return o.dd(e),o.Dc(3).onAddBuyPrice()})),o.qc(),o.qc(),o.qc(),o.od(23,wn,3,0,"div",144),o.qc(),o.oc()}if(2&e){const e=o.Dc(3);o.Ub(1),o.Mc("ngClass",o.Tc(17,Dn,o.Fc(2,13,e.isMobile),e.isFactsheet)),o.Ub(4),o.Mc("ngClass",o.Sc(20,zn,e.validateBuyBondCalculatorForm.get("nominalValue").errors)),o.Ub(2),o.Mc("step",e.incrementalAmt)("min",0),o.Ub(4),o.Mc("ngClass","ml-12px"),o.Ub(1),o.Mc("ngIf",e.validateBuyBondCalculatorForm.get("nominalValue").errors),o.Ub(1),o.Mc("ngClass",o.Tc(22,Dn,o.Fc(14,15,e.isMobile),e.isFactsheet)),o.Ub(5),o.Mc("ngClass",o.Rc(25,xn))("nzPrefix",null!=e.bondData&&e.bondData.bondCurrencyCode?null==e.bondData?null:e.bondData.bondCurrencyCode:"MYR"),o.Ub(1),o.Mc("min",0)("ngClass",o.Sc(26,zn,e.validateBuyBondCalculatorForm.get("buyPrice").errors)),o.Ub(3),o.Mc("ngClass","ml-12px"),o.Ub(1),o.Mc("ngIf",e.validateBuyBondCalculatorForm.get("buyPrice").errors)}}function Fn(e,t){1&e&&(o.rc(0,"div",148),o.mc(1,"i",149),o.qd(2,"Please fill in buy settlement date. "),o.qc())}function qn(e,t){if(1&e&&(o.rc(0,"div",159),o.Ec(1,"async"),o.rc(2,"div",151),o.qd(3,"Buy Settlement Date"),o.qc(),o.mc(4,"nz-date-picker",160),o.od(5,Fn,3,0,"div",144),o.qc()),2&e){const e=o.Dc(3);o.Mc("ngClass",o.Fc(1,7,e.isMobile)?"mobile":""),o.Ub(4),o.Mc("nzFormat",e.DISPLAY_DATE_FORMAT)("nzDisabled",!e.bondData||e.isBondDataLoading)("nzAllowClear",!1)("nzDisabledDate",e.disabledDate)("ngClass",o.Sc(9,zn,e.validateBuyBondCalculatorForm.get("buySettlementDate").errors)),o.Ub(1),o.Mc("ngIf",e.validateBuyBondCalculatorForm.get("buySettlementDate").errors)}}function In(e,t){1&e&&(o.rc(0,"div",148),o.mc(1,"i",149),o.qd(2,"Please fill in sell price. "),o.qc())}function _n(e,t){if(1&e&&(o.rc(0,"div",155),o.Ec(1,"async"),o.rc(2,"div",151),o.qd(3,"Sell Price"),o.qc(),o.rc(4,"ui-input-group",157),o.mc(5,"input",161),o.qc(),o.od(6,In,3,0,"div",144),o.qc()),2&e){const e=o.Dc(3);o.Mc("ngClass",o.Fc(1,5,e.isMobile)?"mobile":""),o.Ub(4),o.Mc("ngClass",o.Rc(7,xn))("nzPrefix",null!=e.bondData&&e.bondData.bondCurrencyCode?null==e.bondData?null:e.bondData.bondCurrencyCode:"MYR"),o.Ub(1),o.Mc("ngClass",o.Sc(8,zn,e.validateBuyBondCalculatorForm.get("sellPrice").errors)),o.Ub(1),o.Mc("ngIf",e.validateBuyBondCalculatorForm.get("sellPrice").errors)}}function Rn(e,t){1&e&&(o.rc(0,"div",148),o.mc(1,"i",149),o.qd(2,"Please fill in sell settlement date. "),o.qc())}function kn(e,t){if(1&e&&(o.rc(0,"div",159),o.Ec(1,"async"),o.rc(2,"div",151),o.qd(3,"Sell Settlement Date"),o.qc(),o.mc(4,"nz-date-picker",162),o.od(5,Rn,3,0,"div",144),o.qc()),2&e){const e=o.Dc(3);o.Mc("ngClass",o.Fc(1,7,e.isMobile)?"mobile":""),o.Ub(4),o.Mc("nzFormat",e.DISPLAY_DATE_FORMAT)("nzDisabled",!e.bondData||e.isBondDataLoading)("nzAllowClear",!1)("nzDisabledDate",e.disabledSellDate)("ngClass",o.Sc(9,zn,e.validateBuyBondCalculatorForm.get("sellSettlementDate").errors)),o.Ub(1),o.Mc("ngIf",e.validateBuyBondCalculatorForm.get("sellSettlementDate").errors)}}const Un=function(e,t,n){return{mobile:e,"w-100":t,factsheet:n}};function Ln(e,t){if(1&e&&(o.rc(0,"form",131),o.Ec(1,"async"),o.od(2,Pn,27,22,"ng-container",0),o.od(3,An,24,28,"ng-container",0),o.od(4,qn,6,11,"div",132),o.od(5,_n,7,10,"div",133),o.od(6,kn,6,11,"div",132),o.qc()),2&e){const e=o.Dc(2);o.Mc("formGroup",e.validateBuyBondCalculatorForm)("ngClass",o.Uc(9,Un,o.Fc(1,7,e.isMobile),e.isFactsheet,e.isFactsheet)),o.Ub(2),o.Mc("ngIf",e.isFactsheet),o.Ub(1),o.Mc("ngIf",!e.isFactsheet),o.Ub(1),o.Mc("ngIf",!e.isFactsheet),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.SELL_INVESTMENT_STRATEGY&&!e.isFactsheet),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.SELL_INVESTMENT_STRATEGY&&!e.isFactsheet)}}function Vn(e,t){if(1&e&&o.od(0,Ln,7,13,"form",130),2&e){const e=o.Dc();o.Mc("ngIf",e.validateBuyBondCalculatorForm&&!e.isOrderpad)}}function Nn(e,t){1&e&&(o.rc(0,"span"),o.qd(1,"Buy Now"),o.qc())}function Yn(e,t){1&e&&(o.rc(0,"span"),o.qd(1,"Open Account or Login to Buy"),o.qc())}function jn(e,t){1&e&&(o.rc(0,"span"),o.qd(1,"Buy Now"),o.qc())}function Hn(e,t){if(1&e){const e=o.sc();o.rc(0,"uic-button",78),o.zc("click",(function(){o.dd(e);const t=o.Dc();return t.onBuyClick(null==t.bondData?null:t.bondData.issueCode)})),o.od(1,Nn,2,0,"span",0),o.od(2,Yn,2,0,"span",0),o.od(3,jn,2,0,"span",0),o.qc()}if(2&e){const e=o.Dc();o.Mc("nzRound",!0)("nzBlock",!0)("disabled",!e.bondData||e.isBondDataLoading),o.Ub(1),o.Mc("ngIf",!e.isFactsheet),o.Ub(1),o.Mc("ngIf",e.isFactsheet&&!e.isAuthenticated),o.Ub(1),o.Mc("ngIf",e.isFactsheet&&e.isAuthenticated)}}function Gn(e,t){if(1&e){const e=o.sc();o.rc(0,"img",79),o.zc("click",(function(){return o.dd(e),o.Dc(2).onClickWatchlistIcon()})),o.qc()}2&e&&o.Mc("src","assets/images/search/watchlist-o.svg",o.gd)}function Wn(e,t){if(1&e&&o.od(0,Gn,1,1,"img",163),2&e){const e=o.Dc();o.Mc("ngIf",!e.isFactsheet)}}function Qn(e,t){if(1&e){const e=o.sc();o.rc(0,"uic-list-item",167),o.zc("click",(function(t){o.dd(e);const n=o.Dc(3),i=o.ad(25);return n.isMobileView?n.onClickTooltip(i):t.stopPropagation()})),o.Ec(1,"async"),o.Ec(2,"date"),o.Ec(3,"async"),o.qc()}if(2&e){const e=o.Dc(3),t=o.ad(25);o.Nc("value",o.Gc(2,9,null==e.bondCalculatorData?null:e.bondCalculatorData.callDate,e.dateFormat)),o.Mc("info","Call Date")("infoClass",o.Fc(1,7,e.isMobile)?"t-md text-content-tertiary font-family-inter":"t-xs text-content-tertiary font-family-inter")("toolTips",t)("isTooltipFilled",!1)("tooltipTrigger",e.isMobileView?"focus":"hover")("valueClass",o.Fc(3,12,e.isMobile)?"t-md text-content-primary font-family-inter font-weight-normal":"t-xs text-content-primary font-family-inter font-weight-normal")}}function $n(e,t){if(1&e){const e=o.sc();o.rc(0,"uic-list-item",167),o.zc("click",(function(t){o.dd(e);const n=o.Dc(3),i=o.ad(27);return n.isMobileView?n.onClickTooltip(i):t.stopPropagation()})),o.Ec(1,"async"),o.Ec(2,"date"),o.Ec(3,"async"),o.qc()}if(2&e){const e=o.Dc(3),t=o.ad(27);o.Nc("value",o.Gc(2,9,null==e.bondData?null:e.bondData.maturityDate,e.dateFormat)),o.Mc("info","Maturity Date")("infoClass",o.Fc(1,7,e.isMobile)?"t-md text-content-tertiary font-family-inter":"t-xs text-content-tertiary font-family-inter")("toolTips",t)("isTooltipFilled",!1)("tooltipTrigger",e.isMobileView?"focus":"hover")("valueClass",o.Fc(3,12,e.isMobile)?"t-md text-content-primary font-family-inter font-weight-normal":"t-xs text-content-primary font-family-inter font-weight-normal")}}function Kn(e,t){if(1&e&&(o.rc(0,"div",165),o.Ec(1,"async"),o.Ec(2,"async"),o.od(3,Qn,4,14,"uic-list-item",166),o.od(4,$n,4,14,"uic-list-item",166),o.qc()),2&e){const e=o.Dc(2);o.nd("padding-top",o.Fc(1,6,e.isMobile)?"0":"12px")("padding-bottom",o.Fc(2,8,e.isMobile)?"48px":"8px"),o.Ub(3),o.Mc("ngIf",null==e.bondCalculatorData?null:e.bondCalculatorData.callDate),o.Ub(1),o.Mc("ngIf",(null==e.bondData?null:e.bondData.maturityDate)&&!e.isPerpetualBond())}}function Xn(e,t){if(1&e&&o.od(0,Kn,5,10,"div",164),2&e){const e=o.Dc();o.Mc("ngIf",e.isFactsheet)}}function Jn(e,t){1&e&&o.nc(0)}function Zn(e,t){if(1&e&&(o.rc(0,"div"),o.od(1,Jn,1,0,"ng-container",41),o.qc()),2&e){o.Dc(2);const e=o.ad(41);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function eo(e,t){1&e&&o.nc(0)}function to(e,t){if(1&e&&(o.pc(0),o.od(1,eo,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(43);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function no(e,t){1&e&&o.nc(0)}function oo(e,t){if(1&e&&(o.pc(0),o.od(1,no,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(45);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function io(e,t){1&e&&o.nc(0)}function lo(e,t){if(1&e&&(o.pc(0),o.od(1,io,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(57);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function ao(e,t){1&e&&o.nc(0)}function co(e,t){if(1&e&&(o.pc(0),o.od(1,ao,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(59);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function so(e,t){1&e&&o.nc(0)}function ro(e,t){if(1&e&&(o.pc(0),o.od(1,so,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(61);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function uo(e,t){if(1&e&&(o.od(0,Zn,2,1,"div",0),o.Ec(1,"async"),o.od(2,to,2,1,"ng-container",0),o.Ec(3,"async"),o.od(4,oo,2,1,"ng-container",0),o.Ec(5,"async"),o.od(6,lo,2,1,"ng-container",0),o.Ec(7,"async"),o.od(8,co,2,1,"ng-container",0),o.Ec(9,"async"),o.od(10,ro,2,1,"ng-container",0),o.Ec(11,"async")),2&e){const e=o.Dc();o.Mc("ngIf",!o.Fc(1,6,e.isMobile)&&!e.isFactsheet&&!e.isOrderpad),o.Ub(2),o.Mc("ngIf",o.Fc(3,8,e.isMobile)&&e.showResult&&!e.isFactsheet&&!e.isOrderpad),o.Ub(2),o.Mc("ngIf",!o.Fc(5,10,e.isMobile)&&e.isFactsheet),o.Ub(2),o.Mc("ngIf",o.Fc(7,12,e.isMobile)&&e.showResult&&e.isFactsheet),o.Ub(2),o.Mc("ngIf",!o.Fc(9,14,e.isMobile)&&e.isOrderpad),o.Ub(2),o.Mc("ngIf",o.Fc(11,16,e.isMobile)&&e.isOrderpad&&e.showResult)}}function po(e,t){if(1&e&&o.mc(0,"uic-statistic",185),2&e){const e=o.Dc(3),t=o.ad(89);o.Mc("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtm)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function ho(e,t){if(1&e&&o.mc(0,"uic-statistic",186),2&e){const e=o.Dc(3),t=o.ad(89);o.Mc("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtc)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function bo(e,t){if(1&e&&o.mc(0,"uic-statistic",187),2&e){const e=o.Dc(3),t=o.ad(89);o.Mc("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYts)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function mo(e,t){if(1&e&&(o.rc(0,"div",170),o.rc(1,"div",171),o.rc(2,"div",172),o.mc(3,"uic-statistic",173),o.qc(),o.rc(4,"div",174),o.rc(5,"div",175),o.mc(6,"uic-statistic",176),o.qc(),o.rc(7,"div"),o.mc(8,"uic-icon",177),o.qc(),o.rc(9,"div",175),o.mc(10,"uic-statistic",178),o.qc(),o.qc(),o.qc(),o.rc(11,"div",179),o.rc(12,"div",172),o.od(13,po,1,7,"uic-statistic",180),o.od(14,ho,1,7,"uic-statistic",181),o.od(15,bo,1,7,"uic-statistic",182),o.qc(),o.rc(16,"div",183),o.rc(17,"div",175),o.mc(18,"uic-statistic",184),o.qc(),o.qc(),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(3),o.Mc("isProfitLoss",!0)("nzValue",e.estTotalReturn)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(1),o.Mc("ngClass",e.estTotalReturn>0?"green-bg":"grey-bg"),o.Ub(2),o.Mc("isProfitLoss",!0)("nzValue",e.couponIncome)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(4),o.Mc("isProfitLoss",!0)("nzValue",e.capitalGains)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(3),o.Mc("ngIf",e.investmentStrategySelected===e.MATURITY_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.CALL_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.SELL_INVESTMENT_STRATEGY),o.Ub(3),o.Mc("nzValue",e.daysHeld<0?0:e.daysHeld)("nzDecimal","1.0-0")}}function go(e,t){if(1&e&&(o.rc(0,"div",168),o.qd(1),o.qc(),o.od(2,mo,19,15,"div",169),o.Ec(3,"async")),2&e){const e=o.Dc();o.Ub(1),o.rd("Profit you could earn"),o.Ub(1),o.Mc("ngIf",!o.Fc(3,2,e.isMobile))}}function fo(e,t){if(1&e&&o.mc(0,"uic-statistic",198),2&e){const e=o.Dc(2),t=
1o.ad(89);o.Mc("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtm)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function vo(e,t){if(1&e&&o.mc(0,"uic-statistic",199),2&e){const e=o.Dc(2),t=o.ad(89);o.Mc("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtc)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function yo(e,t){if(1&e&&o.mc(0,"uic-statistic",200),2&e){const e=o.Dc(2),t=o.ad(89);o.Mc("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYts)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function Co(e,t){if(1&e&&(o.rc(0,"div",183),o.rc(1,"div",175),o.mc(2,"uic-statistic",201),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(2),o.Mc("nzValue",e.daysHeld<0?0:e.daysHeld)("nzDecimal","1.0-0")}}function Mo(e,t){if(1&e&&(o.rc(0,"div",188),o.rc(1,"div",189),o.rc(2,"div",172),o.mc(3,"uic-statistic",190),o.qc(),o.rc(4,"div",174),o.rc(5,"div",175),o.mc(6,"uic-statistic",191),o.qc(),o.rc(7,"div"),o.mc(8,"uic-icon",177),o.qc(),o.rc(9,"div",175),o.mc(10,"uic-statistic",192),o.qc(),o.qc(),o.rc(11,"div",193),o.rc(12,"div",172),o.od(13,fo,1,7,"uic-statistic",194),o.od(14,vo,1,7,"uic-statistic",195),o.od(15,yo,1,7,"uic-statistic",196),o.qc(),o.od(16,Co,3,2,"div",197),o.qc(),o.qc(),o.qc()),2&e){const e=o.Dc();o.bc("p-0",e.isFactsheet),o.Ub(3),o.Mc("isProfitLoss",!0)("nzValue",e.estTotalReturn)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(1),o.Mc("ngClass",e.estTotalReturn>0?"green-bg":"grey-bg"),o.Ub(2),o.Mc("isProfitLoss",!0)("nzValue",e.couponIncome)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(4),o.Mc("isProfitLoss",!0)("nzValue",e.capitalGains)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(3),o.Mc("ngIf",e.investmentStrategySelected===e.MATURITY_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.CALL_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.SELL_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",!e.isFactsheet)}}function To(e,t){if(1&e&&(o.rc(0,"div",202),o.rc(1,"div",203),o.mc(2,"uic-statistic",204),o.qc(),o.rc(3,"div",205),o.rc(4,"div",206),o.mc(5,"uic-list-item",207),o.Ec(6,"currency"),o.mc(7,"uic-list-item",208),o.Ec(8,"couponFrequency"),o.Ec(9,"currency"),o.qc(),o.mc(10,"uic-statistic",209),o.qc(),o.rc(11,"div",210),o.mc(12,"uic-statistic",211),o.qc(),o.qc()),2&e){const e=o.Dc(),t=o.ad(55);o.Ub(2),o.Mc("nzTitle",null==e.netYtw?null:e.netYtw.title)("isProfitLoss",!0)("nzValue",(null==e.netYtw?null:e.netYtw.value)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("isTooltipFilled",!1)("nzTooltip",null!=(null==e.netYtw?null:e.netYtw.toolTips)||null!=(null==e.netYtw?null:e.netYtw.toolTips))("nzTooltipTitle",e.netYtw.toolTips),o.Ub(3),o.Nc("value",o.Ic(6,24,e.couponIncome,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","Coupon Income")("infoClass","t-xs text-content-tertiary mb-0")("isTooltipFilled",!1)("toolTips",t)("valueClass","t-xs font-weight-normal text-content-primary"),o.Ub(2),o.Nc("value",o.Ic(9,31,e.payoutAmount?e.payoutAmount:0,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")+" x "+e.cashflows.length),o.Mc("info","Coupon Receive ("+o.Fc(8,29,null==e.bondCalculatorData?null:e.bondCalculatorData.couponFrequency)+")")("infoClass","t-xs text-content-tertiary mb-0")("valueClass","t-xs font-weight-normal text-content-tertiary"),o.Ub(3),o.Mc("isProfitLoss",!0)("nzValue",e.capitalGains)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(2),o.Mc("isProfitLoss",!0)("nzValue",e.estTotalReturn)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode)}}function Oo(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2,"Est. Net Yield to Call"),o.qc(),o.rc(3,"div",66),o.Ec(4,"async"),o.qd(5," The estimated net yield (after upfront processing & platform fees) from buying the bond at its current market price and holding until the next call date. "),o.qc()),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,2,e.isMobile)?"font-weight-semibold text-18px line-height-normal pb-12px tooltip-title-color":"font-weight-bold text-14px line-height-20px"),o.Ub(3),o.Mc("ngClass",o.Fc(4,4,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function Bo(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2,"Est. Net Yield to Maturity"),o.qc(),o.rc(3,"div",66),o.Ec(4,"async"),o.qd(5," The estimated net yield (after upfront processing & platform fees) from buying the bond at its current market price and holding until the maturity date. "),o.qc()),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,2,e.isMobile)?"font-weight-semibold text-18px line-height-normal pb-12px tooltip-title-color":"font-weight-bold text-14px line-height-20px"),o.Ub(3),o.Mc("ngClass",o.Fc(4,4,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function So(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2," The estimated net yield (after upfront, processing & platform fees) from buying the bond at its current market price and holding until the next call date. "),o.qc()),2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function xo(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2," The estimated net yield (after upfront, processing & platform fees) from buying the bond at its current market price and holding until the next call date. "),o.qc()),2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function Po(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2," The estimated net yield (after upfront, processing & platform fees) from buying the bond at its estimated market price and holding until the next call date. "),o.qc()),2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}const Eo=function(e,t,n){return[e,t,n]};function wo(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2,"Est. Net Yield to Call"),o.qc(),o.od(3,So,3,3,"div",124),o.od(4,xo,3,3,"div",124),o.od(5,Po,3,3,"div",124)),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,4,e.isMobile)?"font-weight-semibold text-18px line-height-normal pb-12px tooltip-title-color":"font-weight-bold text-14px line-height-20px"),o.Ub(3),o.Mc("ngIf",e.bondType===e.bondConstant.ODD_LOT||e.bondType===e.bondConstant.FULL_LOT),o.Ub(1),o.Mc("ngIf",e.bondType===e.bondConstant.BOND_EXPRESS),o.Ub(1),o.Mc("ngIf",!o.Uc(6,Eo,e.bondConstant.ODD_LOT,e.bondConstant.FULL_LOT,e.bondConstant.BOND_EXPRESS).includes(e.bondType))}}function Do(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2," The estimated net yield (after upfront, processing & platform fees) from buying the bond at its current market price and holding until the maturity date. "),o.qc()),2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function zo(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2," The estimated net yield (after upfront, processing & platform fees) from buying the bond at its current market price and holding until the maturity date. "),o.qc()),2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function Ao(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2," The estimated net yield (after upfront, processing & platform fees) from buying the bond at its estimated market price and holding until the maturity date. "),o.qc()),2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function Fo(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2,"Est. Net Yield to Maturity"),o.qc(),o.od(3,Do,3,3,"div",124),o.od(4,zo,3,3,"div",124),o.od(5,Ao,3,3,"div",124)),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,4,e.isMobile)?"font-weight-semibold text-18px line-height-normal pb-12px tooltip-title-color":"font-weight-bold text-14px line-height-20px"),o.Ub(3),o.Mc("ngIf",e.bondType===e.bondConstant.ODD_LOT||e.bondType===e.bondConstant.FULL_LOT),o.Ub(1),o.Mc("ngIf",e.bondType===e.bondConstant.BOND_EXPRESS),o.Ub(1),o.Mc("ngIf",!o.Uc(6,Eo,e.bondConstant.ODD_LOT,e.bondConstant.FULL_LOT,e.bondConstant.BOND_EXPRESS).includes(e.bondType))}}function qo(e,t){if(1&e&&(o.rc(0,"div",66),o.Ec(1,"async"),o.qd(2,"Coupon Income"),o.qc(),o.rc(3,"div",66),o.Ec(4,"async"),o.qd(5," Net Coupon Income = Total Coupon Received - Paid Accrued Interest "),o.qc()),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,2,e.isMobile)?"font-weight-semibold text-18px line-height-normal pb-12px tooltip-title-color":"font-weight-bold text-14px line-height-20px"),o.Ub(3),o.Mc("ngClass",o.Fc(4,4,e.isMobile)?"font-weight-normal text-14px line-height-normal tooltip-content-color":"font-weight-normal text-12px line-height-16px")}}function Io(e,t){if(1&e){const e=o.sc();o.rc(0,"div",212),o.rc(1,"div",189),o.rc(2,"div",172),o.mc(3,"uic-statistic",190),o.qc(),o.rc(4,"div",174),o.rc(5,"div",175),o.mc(6,"uic-statistic",191),o.qc(),o.rc(7,"div"),o.mc(8,"uic-icon",177),o.qc(),o.rc(9,"div",175),o.mc(10,"uic-statistic",192),o.qc(),o.qc(),o.rc(11,"div",193),o.rc(12,"div",172),o.rc(13,"uic-statistic",213),o.zc("click",(function(){o.dd(e);const t=o.Dc();return t.onClickTooltip(t.netYtw.toolTips)})),o.qc(),o.qc(),o.qc(),o.qc(),o.qc()}if(2&e){const e=o.Dc();o.Ub(3),o.Mc("isProfitLoss",!0)("nzValue",e.estTotalReturn)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(1),o.Mc("ngClass",e.estTotalReturn>0?"green-bg":"grey-bg"),o.Ub(2),o.Mc("isProfitLoss",!0)("nzValue",e.couponIncome)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(4),o.Mc("isProfitLoss",!0)("nzValue",e.capitalGains)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(3),o.Mc("nzTitle",null==e.netYtw?null:e.netYtw.title)("tooltipTrigger","focus")("isProfitLoss",!0)("nzValue",(null==e.netYtw?null:e.netYtw.value)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("isTooltipFilled",!1)("nzTooltip",null!=(null==e.netYtw?null:e.netYtw.toolTips)||null!=(null==e.netYtw?null:e.netYtw.toolTips))("nzTooltipTitle",e.netYtw.toolTips)}}function _o(e,t){if(1&e&&o.mc(0,"uic-statistic",220),2&e){const e=o.Dc(3),t=o.ad(89);o.Mc("nzTitle","OTC"===e.bondType?"Est. Net Yield to Maturity":"Net Yield to Maturity")("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtm)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function Ro(e,t){if(1&e&&o.mc(0,"uic-statistic",220),2&e){const e=o.Dc(3),t=o.ad(89);o.Mc("nzTitle","OTC"===e.bondType?"Est. Net Yield to Next Call":"Net Yield to Next Call")("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtc)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function ko(e,t){if(1&e&&(o.rc(0,"div",215),o.rc(1,"div",216),o.qd(2),o.qc(),o.rc(3,"div",217),o.rc(4,"div",172),o.mc(5,"uic-statistic",218),o.qc(),o.rc(6,"div",193),o.rc(7,"div",172),o.od(8,_o,1,8,"uic-statistic",219),o.od(9,Ro,1,8,"uic-statistic",219),o.qc(),o.qc(),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(2),o.rd("Profit you could earn"),o.Ub(3),o.Mc("isProfitLoss",!0)("nzValue",e.estTotalReturn)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(3),o.Mc("ngIf",e.investmentStrategySelected===e.MATURITY_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected!==e.MATURITY_INVESTMENT_STRATEGY)}}function Uo(e,t){if(1&e&&o.od(0,ko,10,6,"div",214),2&e){const e=o.Dc();o.Mc("ngIf",!e.isSellOrderpad)}}function Lo(e,t){if(1&e&&o.mc(0,"uic-statistic",226),2&e){const e=o.Dc(3),t=o.ad(89);o.Mc("nzTitle","OTC"===e.bondType?"Est. Net Yield to Maturity":"Net Yield to Maturity")("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtm)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function Vo(e,t){if(1&e&&o.mc(0,"uic-statistic",226),2&e){const e=o.Dc(3),t=o.ad(89);o.Mc("nzTitle","OTC"===e.bondType?"Est. Net Yield to Next Call":"Net Yield to Next Call")("isProfitLoss",!0)("nzValue",(null==e.bondCalculatorData?null:e.bondCalculatorData.offerNetYtc)||0)("nzSuffix","% p.a.")("nzDecimal","1.3-3")("nzTooltip",!0)("nzTooltipTitle",t)("isTooltipFilled",!1)}}function No(e,t){1&e&&o.nc(0)}function Yo(e,t){if(1&e&&(o.pc(0),o.od(1,No,1,0,"ng-container",41),o.oc()),2&e){o.Dc(3);const e=o.ad(91);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function jo(e,t){if(1&e&&(o.rc(0,"div",222),o.rc(1,"div",223),o.rc(2,"div",172),o.mc(3,"uic-statistic",224),o.qc(),o.rc(4,"div",193),o.rc(5,"div",172),o.od(6,Lo,1,8,"uic-statistic",225),o.od(7,Vo,1,8,"uic-statistic",225),o.qc(),o.qc(),o.od(8,Yo,2,1,"ng-container",0),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(3),o.Mc("isProfitLoss",!0)("nzValue",e.estTotalReturn)("nzPrefix",null==e.bondData?null:e.bondData.bondCurrencyCode),o.Ub(3),o.Mc("ngIf",e.investmentStrategySelected===e.MATURITY_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected!==e.MATURITY_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.showMobileYieldToCallTooltip)}}function Ho(e,t){if(1&e&&o.od(0,jo,9,6,"div",221),2&e){const e=o.Dc();o.Mc("ngIf",!e.isSellOrderpad)}}function Go(e,t){1&e&&o.nc(0)}function Wo(e,t){if(1&e&&(o.pc(0),o.od(1,Go,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(65);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Qo(e,t){1&e&&o.nc(0)}function $o(e,t){if(1&e&&(o.pc(0),o.od(1,Qo,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(67);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}function Ko(e,t){1&e&&o.nc(0)}function Xo(e,t){if(1&e&&(o.pc(0),o.od(1,Ko,1,0,"ng-container",41),o.oc()),2&e){o.Dc(2);const e=o.ad(69);o.Ub(1),o.Mc("ngTemplateOutlet",e)}}const Jo=function(e,t,n,o){return{mobile:e,factsheet:t,orderpad:n,"mobile-orderpad":o}};function Zo(e,t){if(1&e&&(o.rc(0,"div",227),o.Ec(1,"async"),o.Ec(2,"async"),o.Ec(3,"async"),o.od(4,Wo,2,1,"ng-container",0),o.Ec(5,"async"),o.Ec(6,"async"),o.od(7,$o,2,1,"ng-container",0),o.Ec(8,"async"),o.Ec(9,"async"),o.od(10,Xo,2,1,"ng-container",0),o.Ec(11,"async"),o.Ec(12,"async"),o.qc()),2&e){const e=o.Dc();o.Mc("ngClass",o.Vc(22,Jo,o.Fc(1,4,e.isMobile),e.isFactsheet,e.isOrderpad&&!o.Fc(2,6,e.isMobile),e.isOrderpad&&o.Fc(3,8,e.isMobile))),o.Ub(4),o.Mc("ngIf",(!o.Fc(5,10,e.isMobile)||o.Fc(6,12,e.isMobile)&&e.showResult)&&!e.isFactsheet&&!e.isOrderpad),o.Ub(3),o.Mc("ngIf",(!o.Fc(8,14,e.isMobile)||o.Fc(9,16,e.isMobile)&&e.showResult)&&e.isFactsheet),o.Ub(3),o.Mc("ngIf",(!o.Fc(11,18,e.isMobile)||o.Fc(12,20,e.isMobile)&&e.showResult)&&e.isOrderpad)}}function ei(e,t){if(1&e&&(o.rc(0,"div",230),o.Ec(1,"async"),o.qd(2,"What you get"),o.qc()),2&e){const e=o.Dc(2);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-bold t-2xl":"font-weight-semibold t-lg")}}function ti(e,t){1&e&&o.nc(0)}const ni=function(e,t){return{"gap-8px":e,"gap-4px":t}};function oi(e,t){if(1&e&&(o.rc(0,"div",228),o.rc(1,"div",229),o.rc(2,"div",230),o.Ec(3,"async"),o.qd(4,"What you pay"),o.qc(),o.rc(5,"div",231),o.rc(6,"div",232),o.mc(7,"uic-list-item",233),o.Ec(8,"currency"),o.mc(9,"uic-list-item",234),o.Ec(10,"currency"),o.mc(11,"uic-list-item",234),o.Ec(12,"currency"),o.mc(13,"uic-list-item",235),o.Ec(14,"currency"),o.qc(),o.qc(),o.qc(),o.qc(),o.rc(15,"div",236),o.od(16,ei,3,3,"div",237),o.od(17,ti,1,0,"ng-container",41),o.qc()),2&e){const e=o.Dc(),t=o.ad(87),n=o.ad(85),i=o.ad(73);o.Ub(2),o.Mc("ngClass",o.Fc(3,24,e.isMobile)?"font-weight-bold t-2xl":"font-weight-semibold t-lg"),o.Ub(4),o.Mc("ngClass",o.Tc(46,ni,!e.isFactsheet,e.isFactsheet)),o.Ub(1),o.Nc("va
1lue",o.Ic(8,26,e.principalAmount,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","Principal Amount")("infoClass","t-sm")("valueClass","t-sm font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(10,31,e.buyIndicativeAccruedInt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Accrued Interest")("infoClass","t-sm")("valueClass","t-sm font-weight-normal")("toolTips",t)("isTooltipFilled",!1),o.Ub(2),o.Nc("value",o.Ic(12,36,e.buyProcessingFee,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info",e.sstRate>0?"+ Buy Processing Fee (Incl. of SST)":"+ Buy Processing Fee")("infoClass","t-sm")("valueClass","t-sm font-weight-normal")("toolTips",e.sstRate>0?n:null)("isTooltipFilled",!1),o.Ub(2),o.Nc("value",o.Ic(14,41,e.totalPayableAmt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Est. Payable Amount")("infoClass","t-sm")("valueClass","t-sm font-weight-bold"),o.Ub(3),o.Mc("ngIf",(null==e.cashflows?null:e.cashflows.length)>0),o.Ub(1),o.Mc("ngTemplateOutlet",i)}}function ii(e,t){if(1&e&&(o.rc(0,"div",230),o.Ec(1,"async"),o.qd(2,"What you get"),o.qc()),2&e){const e=o.Dc(3);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-bold t-2xl":"font-weight-semibold t-lg")}}function li(e,t){1&e&&o.nc(0)}function ai(e,t){if(1&e&&(o.pc(0),o.rc(1,"div",228),o.rc(2,"div",239),o.rc(3,"div",230),o.Ec(4,"async"),o.qd(5,"What you pay"),o.qc(),o.rc(6,"div",231),o.rc(7,"div",232),o.mc(8,"uic-list-item",233),o.Ec(9,"currency"),o.mc(10,"uic-list-item",233),o.Ec(11,"currency"),o.mc(12,"uic-list-item",234),o.Ec(13,"currency"),o.mc(14,"uic-list-item",235),o.Ec(15,"currency"),o.qc(),o.qc(),o.qc(),o.qc(),o.rc(16,"div",240),o.od(17,ii,3,3,"div",237),o.od(18,li,1,0,"ng-container",41),o.qc(),o.oc()),2&e){const e=o.Dc(2),t=o.ad(85),n=o.ad(73);o.Ub(3),o.Mc("ngClass",o.Fc(4,22,e.isMobile)?"font-weight-bold t-2xl":"font-weight-semibold t-lg"),o.Ub(4),o.Mc("ngClass",o.Tc(44,ni,!e.isFactsheet,e.isFactsheet)),o.Ub(1),o.Nc("value",o.Ic(9,24,e.principalAmount,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","Principal Amount")("infoClass","t-sm")("valueClass","t-sm font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(11,29,e.buyIndicativeAccruedInt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Accrued Interest")("infoClass","t-sm")("valueClass","t-sm font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(13,34,e.buyProcessingFee,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info",e.sstRate>0?"+ Buy Processing Fee (Incl. of SST)":"+ Buy Processing Fee")("infoClass","t-sm")("valueClass","t-sm font-weight-normal")("toolTips",e.sstRate>0?t:null)("isTooltipFilled",!1),o.Ub(2),o.Nc("value",o.Ic(15,39,e.totalPayableAmt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Total buy payable amount")("infoClass","t-sm")("valueClass","t-sm font-weight-bold"),o.Ub(3),o.Mc("ngIf",(null==e.cashflows?null:e.cashflows.length)>0),o.Ub(1),o.Mc("ngTemplateOutlet",n)}}function ci(e,t){if(1&e){const e=o.sc();o.rc(0,"div",241),o.rc(1,"uic-button",242),o.zc("click",(function(){return o.dd(e),o.Dc(2).onClickCashFlowDetails()})),o.qd(2),o.qc(),o.qc()}2&e&&(o.Ub(1),o.Mc("nzRound",!0)("nzBlock",!0),o.Ub(1),o.rd("See Cash Flow Details"))}function si(e,t){if(1&e&&(o.od(0,ai,19,47,"ng-container",0),o.Ec(1,"async"),o.od(2,ci,3,3,"div",238),o.Ec(3,"async")),2&e){const e=o.Dc();o.Mc("ngIf",o.Fc(1,2,e.isMobile)),o.Ub(2),o.Mc("ngIf",e.isFactsheet&&!o.Fc(3,4,e.isMobile))}}function ri(e,t){if(1&e&&(o.mc(0,"uic-list-item",233),o.Ec(1,"currency")),2&e){const e=o.Dc(3);o.Nc("value",o.Ic(1,4,e.bufferAmt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Buffer Amount ("+e.bufferRate+"%)")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-normal text-content-tertiary")}}function di(e,t){if(1&e&&(o.mc(0,"uic-list-item",233),o.Ec(1,"async"),o.Ec(2,"number")),2&e){const e=o.Dc(3);o.Nc("value",o.Gc(2,6,e.fxRate,"1.6-6")),o.Mc("info","FX Conversion Rate")("infoClass",(o.Fc(1,4,e.isMobile),"t-xs text-content-tertiary"))("valueClass","t-xs font-weight-normal text-content-tertiary")}}function ui(e,t){if(1&e&&(o.pc(0),o.mc(1,"uic-list-item",235),o.Ec(2,"currency"),o.oc()),2&e){const e=o.Dc(3);o.Ub(1),o.Nc("value",o.Ic(2,4,e.totalPayableAmt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Est. Payable Amou
1nt")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-bold")}}function pi(e,t){if(1&e&&(o.mc(0,"uic-list-item",235),o.Ec(1,"currency")),2&e){const e=o.Dc(3);o.Nc("value",o.Ic(1,4,(null==e.bondCalculatorInput?null:e.bondCalculatorInput.fxCurrency)!==(null==e.bondData?null:e.bondData.bondCurrencyCode)?e.totalFxPayableAmt:e.totalPayableAmt,(e.fxRate?e.fxCurrency:null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Est. Payable Amount")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-bold")}}function hi(e,t){if(1&e&&(o.rc(0,"div",228),o.rc(1,"div",245),o.rc(2,"div",230),o.Ec(3,"async"),o.qd(4,"What you pay"),o.qc(),o.rc(5,"div",246),o.rc(6,"div",247),o.mc(7,"uic-list-item",233),o.Ec(8,"currency"),o.mc(9,"uic-list-item",234),o.Ec(10,"currency"),o.mc(11,"uic-list-item",234),o.Ec(12,"currency"),o.od(13,ri,2,9,"uic-list-item",248),o.od(14,di,3,9,"uic-list-item",248),o.od(15,ui,3,9,"ng-container",50),o.od(16,pi,2,9,"ng-template",null,249,o.pd),o.qc(),o.qc(),o.qc(),o.qc()),2&e){const e=o.ad(17),t=o.Dc(2),n=o.ad(87),i=o.ad(85);o.Ub(2),o.Mc("ngClass",o.Fc(3,21,t.isMobile)?"font-weight-bold t-2xl":"font-weight-bold t-sm"),o.Ub(5),o.Nc("value",o.Ic(8,23,t.principalAmount,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","Principal Amount")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-normal text-content-tertiary"),o.Ub(2),o.Nc("value",o.Ic(10,28,t.buyIndicativeAccruedInt,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","OTC"===t.bondType?"+ Ind Accrued Interest ("+t.buyAccruedDays+" days)":"+ Accrued Interest ("+t.buyAccruedDays+" days)")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-normal text-content-tertiary")("toolTips",n)("isTooltipFilled",!1),o.Ub(2),o.Nc("value",o.Ic(12,33,t.buyProcessingFee,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info",t.sstRate>0?"+ Buy Processing Fee (Incl. of SST)":"+ Buy Processing Fee")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-normal text-content-tertiary")("toolTips",t.sstRate>0?i:null)("isTooltipFilled",!1),o.Ub(2),o.Mc("ngIf",t.isOrderpad&&(t.bondType!==t.bondConstant.BOND_EXPRESS||(null==t.bondCalculatorInput?null:t.bondCalculatorInput.fxCurrency)!==(null==t.bondData?null:t.bondData.bondCurrencyCode))),o.Ub(1),o.Mc("ngIf",t.isOrderpad&&(null==t.bondCalculatorInput?null:t.bondCalculatorInput.fxCurrency)&&(null==t.bondData?null:t.bondData.bondCurrencyCode)&&(null==t.bondCalculatorInput?null:t.bondCalculatorInput.fxCurrency)!==(null==t.bondData?null:t.bondData.bondCurrencyCode)),o.Ub(1),o.Mc("ngIf",(null==t.bondCalculatorInput?null:t.bondCalculatorInput.fxCurrency)!==(null==t.bondData?null:t.bondData.bondCurrencyCode)&&void 0===(null==t.bondCalculatorInput?null:t.bondCalculatorInput.fxCurrency))("ngIfElse",e)}}function bi(e,t){if(1&e&&(o.rc(0,"div",228),o.rc(1,"div",250),o.rc(2,"div",230),o.Ec(3,"async"),o.qd(4,"What you get"),o.qc(),o.rc(5,"div",231),o.rc(6,"div",247),o.mc(7,"uic-list-item",233),o.Ec(8,"currency"),o.mc(9,"uic-list-item",233),o.Ec(10,"currency"),o.mc(11,"uic-list-item",233),o.Ec(12,"currency"),o.mc(13,"uic-list-item",235),o.Ec(14,"currency"),o.qc(),o.qc(),o.qc(),o.qc()),2&e){const e=o.Dc(2);o.Ub(2),o.Mc("ngClass",o.Fc(3,17,e.isMobile)?"font-weight-bold t-2xl":"font-weight-semibold t-lg"),o.Ub(5),o.Nc("value",o.Ic(8,19,e.principalAmount,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","Principal Amount")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-normal text-content-tertiary"),o.Ub(2),o.Nc("value",o.Ic(10,24,e.sellOrderpadTotalIndicativeAccruedInt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Accrued Interest Receivable")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-normal text-content-tertiary"),o.Ub(2),o.Nc("value",o.Ic(12,29,e.sellOrderpadProcessingFee,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","- Sell processing fee")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-normal text-content-tertiary"),o.Ub(2),o.Nc("value",o.Ic(14,34,e.sellOrderpadEstTotalRedemptionAmt,(null==e.bondData?null:e.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Est. Total Redemption Amount")("infoClass","t-xs text-content-tertiary")("valueClass","t-xs font-weight-bold")}}function mi(e,t){if(1&e&&(o.rc(0,"div",230),o.Ec(1,"async"),o.qd(2,"What you get"),o.qc()),2&e){const e=o.Dc(3);o.Mc("ngClass",o.Fc(1,1,e.isMobile)?"font-weight-bold t-2xl":"font-weight-bold t-sm")}}function gi(e,t){1&e&&o.nc(0)}function fi(e,t){if(1&e&&(o.rc(0,"div",236),o.od(1,mi,3,3,"div",237),o.od(2,gi,1,0,"ng-container",41),o.qc()),2&e){const e=o.Dc(2),t=
1o.ad(73);o.Ub(1),o.Mc("ngIf",(null==e.cashflows?null:e.cashflows.length)>0),o.Ub(1),o.Mc("ngTemplateOutlet",t)}}function vi(e,t){if(1&e&&(o.od(0,hi,18,38,"div",243),o.od(1,bi,15,39,"div",243),o.od(2,fi,3,2,"div",244)),2&e){const e=o.Dc();o.Mc("ngIf",!e.isSellOrderpad),o.Ub(1),o.Mc("ngIf",e.isSellOrderpad),o.Ub(1),o.Mc("ngIf",!e.isSellOrderpad)}}function yi(e,t){1&e&&(o.rc(0,"div",251),o.rc(1,"div",252),o.qd(2,"Estimated total return"),o.qc(),o.rc(3,"div",253),o.qd(4,"Try filling in the form to start calculate."),o.qc(),o.qc())}function Ci(e,t){if(1&e&&(o.pc(0),o.mc(1,"uic-coupon-cashflow",257),o.oc()),2&e){o.Dc();const e=o.ad(4),t=o.ad(6),n=o.Dc().last;o.Ub(1),o.Mc("dateTemplate",e)("contentTemplate",t)("showDash",!n)("notFirst",!1)}}function Mi(e,t){if(1&e&&(o.pc(0),o.mc(1,"uic-coupon-cashflow",257),o.oc()),2&e){o.Dc();const e=o.ad(4),t=o.ad(8),n=o.Dc().last;o.Ub(1),o.Mc("dateTemplate",e)("contentTemplate",t)("showDash",!n)("notFirst",!0)}}function Ti(e,t){if(1&e&&(o.rc(0,"div",259),o.qd(1),o.Ec(2,"date"),o.qc()),2&e){const e=o.Dc(3).$implicit;o.Ub(1),o.rd(o.Gc(2,1,null==e?null:e.payoutDate,"yyyy"))}}function Oi(e,t){if(1&e&&(o.od(0,Ti,3,4,"div",258),o.Ec(1,"async")),2&e){const e=o.Dc(4);o.Mc("ngIf",!o.Fc(1,1,e.isMobile))}}function Bi(e,t){if(1&e&&(o.rc(0,"div",229),o.rc(1,"div",261),o.qd(2),o.Ec(3,"date"),o.Ec(4,"async"),o.qc(),o.rc(5,"div",262),o.mc(6,"uic-list-item",263),o.Ec(7,"currency"),o.mc(8,"uic-list-item",263),o.Ec(9,"currency"),o.mc(10,"uic-list-item",263),o.Ec(11,"currency"),o.qc(),o.qc()),2&e){const e=o.Dc(3).$implicit,t=o.Dc(2);o.Ub(1),o.Mc("ngClass",t.isOrderpad?"t-xs":""),o.Ub(1),o.rd(o.Gc(3,14,null==e?null:e.payoutDate,o.Fc(4,17,t.isMobile)?"dd MMM yyyy":"dd MMM")),o.Ub(4),o.Nc("value",o.Ic(7,19,t.maturityProceeds,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info",t.isFactsheet?"+ Maturity Proceeds":"Maturity Proceeds")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(9,24,null==e?null:e.payoutAmount,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Coupon Receive")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(11,29,(null==e?null:e.payoutAmount)+t.maturityProceeds,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Total Amount")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass","t-xs font-weight-bold")}}function Si(e,t){if(1&e&&(o.rc(0,"div",229),o.rc(1,"div",261),o.qd(2),o.Ec(3,"date"),o.Ec(4,"async"),o.qc(),o.rc(5,"div",262),o.mc(6,"uic-list-item",263),o.Ec(7,"currency"),o.mc(8,"uic-list-item",263),o.Ec(9,"currency"),o.mc(10,"uic-list-item",263),o.Ec(11,"currency"),o.qc(),o.qc()),2&e){const e=o.Dc(3).$implicit,t=o.Dc(2);o.Ub(1),o.Mc("ngClass",t.isOrderpad?"t-xs":""),o.Ub(1),o.rd(o.Gc(3,14,null==e?null:e.payoutDate,o.Fc(4,17,t.isMobile)?"dd MMM yyyy":"dd MMM")),o.Ub(4),o.Nc("value",o.Ic(7,19,t.earlyRedemption,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info",t.isFactsheet?"+ Early Redemption":"Early Redemption")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(9,24,null==e?null:e.payoutAmount,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Coupon Receive")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(11,29,(null==e?null:e.payoutAmount)+t.earlyRedemption,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Total Amount")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass","t-xs font-weight-bold")}}function xi(e,t){if(1&e&&(o.mc(0,"uic-list-item",263),o.Ec(1,"currency")),2&e){const e=o.Dc(4).$implicit,t=o.Dc(2);o.Nc("value",o.Ic(1,4,null==e?null:e.payoutAmount,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Coupon Receive")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal")}}function Pi(e,t){if(1&e&&(o.rc(0,"div",229),o.rc(1,"div",261),o.qd(2),o.Ec(3,"date"),o.Ec(4,"async"),o.qc(),o.rc(5,"div",262),o.mc(6,"uic-list-item",263),o.Ec(7,"currency"),o.mc(8,"uic-list-item",263),o.Ec(9,"currency"),o.mc(10,"uic-list-item",263),o.Ec(11,"currency"),o.od(12,xi,2,9,"uic-list-item",264),o.mc(13,"uic-list-item",263),o.Ec(14,"currency"),o.qc(),o.qc()),2&e){const e=o.Dc(3).$implicit,t=o.Dc(2);o.Ub(1),o.Mc("ngClass",t.isOrderpad?"t-xs":""),o.Ub(1),o.sd("",o.Gc(3,19,null==e?null:e.payoutDate,o.Fc(4,22,t.isMobile)?"dd MMM yyyy":"dd MMM")," (Sell before Maturity/Call)"),o.Ub(4),o.Nc("value",o.Ic(7,24,t.sellEarlyRedemption,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","Early Redemption")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(9,29,t.sellIndicativeAccruedInt,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Total Indicative Accrued Interest ("+t.sellAccruedDays+" days)")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal"),o.Ub(2),o.Nc("value",o.Ic(11,34,t.sellProcessingFee,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","- Sell Processing Fee")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass",t.isOrderpad?"t-xs font-weight-normal text-content-tertiary":"t-xs font-weight-normal"),o.Ub(2),o.Mc("ngIf",(null==e?null:e.payoutAmount)&&0!==(null==e?null:e.payoutAmount)),o.Ub(1),o.Nc("value",o.Ic(14,39,(null==e?null:e.payoutAmount)+t.sellEarlyRedemption+t.sellIndicativeAccruedInt-t.
1sellProcessingFee,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","= Total Sell Amount")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass","t-xs font-weight-bold")}}function Ei(e,t){if(1&e&&(o.od(0,Bi,12,34,"div",260),o.od(1,Si,12,34,"div",260),o.od(2,Pi,15,44,"div",260)),2&e){const e=o.Dc(4);o.Mc("ngIf",e.investmentStrategySelected===e.MATURITY_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.CALL_INVESTMENT_STRATEGY),o.Ub(1),o.Mc("ngIf",e.investmentStrategySelected===e.SELL_INVESTMENT_STRATEGY)}}function wi(e,t){if(1&e&&(o.rc(0,"div",229),o.rc(1,"div",261),o.qd(2),o.Ec(3,"date"),o.Ec(4,"async"),o.qc(),o.rc(5,"div",262),o.mc(6,"uic-list-item",263),o.Ec(7,"currency"),o.qc(),o.qc()),2&e){const e=o.Dc(2).$implicit,t=o.Dc(2);o.Ub(1),o.Mc("ngClass",t.isOrderpad?"t-xs":""),o.Ub(1),o.rd(o.Gc(3,6,null==e?null:e.payoutDate,o.Fc(4,9,t.isMobile)?"dd MMM yyyy":"dd MMM")),o.Ub(4),o.Nc("value",o.Ic(7,11,null==e?null:e.payoutAmount,(null==t.bondData?null:t.bondData.bondCurrencyCode)+" ","code","1.2-2")),o.Mc("info","+ Coupon Receive")("infoClass",t.isOrderpad?"t-xs text-content-tertiary":"t-xs")("valueClass","t-xs font-weight-bold")}}function Di(e,t){if(1&e&&(o.pc(0),o.od(1,Ci,2,4,"ng-container",0),o.od(2,Mi,2,4,"ng-container",0),o.od(3,Oi,2,3,"ng-template",null,255,o.pd),o.od(5,Ei,3,3,"ng-template",null,82,o.pd),o.od(7,wi,8,16,"ng-template",null,256,o.pd),o.oc()),2&e){const e=o.Dc().index;o.Ub(1),o.Mc("ngIf",0===e),o.Ub(1),o.Mc("ngIf",0!==e)}}function zi(e,t){if(1&e&&(o.pc(0),o.od(1,Di,9,2,"ng-container",0),o.Ec(2,"async"),o.oc()),2&e){const e=t.index,n=o.Dc(2);o.Ub(1),o.Mc("ngIf",!(!o.Fc(2,1,n.isMobile)&&!n.isExpandCashFlow)||e<(n.isFactsheet||n.isOrderpad?2:4))}}function Ai(e,t){if(1&e){const e=o.sc();o.rc(0,"div",241),o.rc(1,"uic-button",242),o.zc("click",(function(){return o.dd(e),o.Dc(2).onShowCashFlowDetails()})),o.qd(2),o.qc(),o.qc()}2&e&&(o.Ub(1),o.Mc("nzRound",!0)("nzBlock",!0),o.Ub(1),o.rd("See cash flow details"))}function Fi(e,t){if(1&e&&(o.rc(0,"div",254),o.od(1,zi,3,3,"ng-container",119),o.od(2,Ai,3,3,"div",238),o.Ec(3,"async"),o.qc()),2&e){const e=o.Dc();o.Ub(1),o.Mc("ngForOf",e.cashflows),o.Ub(1),o.Mc("ngIf",!e.isFactsheet&&(null==e.cashflows?null:e.cashflows.length)>(e.isFactsheet||e.isOrderpad?2:4)&&!e.isExpandCashFlow&&!o.Fc(3,2,e.isMobile))}}function qi(e,t){1&e&&(o.rc(0,"span",268),o.qd(1," Return and Cash flow calculations are computed based on current coupon rate till next possible call or maturity date. Figures reflected are indicative and subjected to changes in case of any corporate actions. "),o.qc())}function Ii(e,t){1&e&&(o.rc(0,"span",268),o.qd(1," Total redemption amount are calculated based on the current coupon rate until the next call or maturity. Figures are indicative and may change due to corporate actions. "),o.qc())}const _i=function(e){return{"margin-top":e}};function Ri(e,t){if(1&e&&(o.rc(0,"div",265),o.Ec(1,"async"),o.rc(2,"span",266),o.qd(3," Disclaimer: "),o.qc(),o.od(4,qi,2,0,"span",267),o.od(5,Ii,2,0,"span",267),o.qc()),2&e){const e=o.Dc();o.Mc("ngStyle",o.Sc(5,_i,e.isOrderpad&&(null==e.cashflows?null:e.cashflows.length)>(e.isFactsheet||e.isOrderpad?2:4)&&!e.isExpandCashFlow&&!o.Fc(1,3,e.isMobile)?"-20px":e.isOrderpad?"-24px":"0")),o.Ub(4),o.Mc("ngIf",!e.isSellOrderpad),o.Ub(1),o.Mc("ngIf",e.isSellOrderpad)}}const ki=function(e){return{rows:e}};function Ui(e,t){if(1&e&&(o.mc(0,"nz-skeleton",269),o.Ec(1,"async")),2&e){const e=o.Dc();o.Mc("ngClass",o.Fc(1,3,e.isMobile)?"pl-24px pr-24px":"")("nzLoading",!0)("nzParagraph",o.Sc(5,ki,e.isOrderpad?16:7))}}function Li(e,t){1&e&&o.mc(0,"uic-empty-state",270),2&e&&o.Mc("emptyResultImgPath","assets/images/bond-calculator/magnifying-glass.svg")("emptyResultTitle","No bond selected")("emptyResultContent","Try add a bond to start calculate")}function Vi(e,t){1&e&&o.nc(0)}function Ni(e,t){1&e&&(o.rc(0,"span"),o.qd(1,"8% SST, applicable to the Processing Fee."),o.qc())}function Yi(e,t){1&e&&(o.rc(0,"span"),o.qd(1,'Accrued interest is the interest that has been built up on a bond but has not yet been collected. When a buyer pays for a bond, they pay the seller (or holder) the interest that has "accumulated" up to the settlement date.\nIt ensures that both the seller and the buyer get a fair deal based on how long each has held the bond.'),o.qc())}function ji(e,t){1&e&&(o.rc(0,"span"),o.qd(1,"The yield is the annualized return that you can expect to earn from the bond per annum at the indicated price that is calculated to its stated convention (i.e. to its maturity or its next call date) and expressed as a percentage. This figure is also net of FSMOne's one-off upfront processing fees and annual platform fees."),o.qc())}function Hi(e,t){if(1&e){const e=o.sc();o.rc(0,"div",271),o.zc("click",(function(){return o.dd(e),o.Dc().openYieldToCallTooltip()})),o.rc(1,"div",272),o.zc("click",(function(t){return o.dd(e),t.stopPropagation()})),o.rc(2,"div",273),o.mc(3,"div",274),o.qc(),o.rc(4,"div",275),o.rc(5,"h4",276),o.qd(6,"Est. Yield to Call/Yield to Maturity"),o.qc(),o.rc(7,"span"),o.qd(8,"The yield is the annualized return that you can expect to earn from the bond per annum at the indicated price that is calculated to its stated convention (i.e. to its maturity or its next call date) and expressed as a percentage."),o.qc(),o.mc(9,"br"),o.rc(10,"span"),o.qd(11,"This figure is also net of FSMOne's one-off upfront processing fees and annual platform fees."),o.qc(),o.qc(),o.qc(),o.qc()}}let Gi=(()=>{class e{constructor(e,t,n,a,r,d,u,p,h,b,m,g,v){this.router=e,this.fb=t,this.responsiveService=n,this.store=a,this.bondRestService=r,this.subHandlingService=d,this.watchlistService=u,this.route=p,this.datePipe=h,this.bondCalculatorService=b,this.lightstreamerBondInitService=m,this.decimalPipe=g,this.renderer=v,this.ImagePathConstant=i.g,this.GlobalSearchConstant=i.e,this.DISPLAY_DATE_FORMAT="dd MMM yyyy",this.CALL_INVESTMENT_STRATEGY="call",this.MATURITY_INVESTMENT_STRATEGY="maturity",this.SELL_INVESTMENT_STRATEGY="sell",this.investmentStrategyList=[{label:"Hold to Call",value:this.CALL_INVESTMENT_STRATEGY},{label:"Hold to Maturity",value:this.MATURITY_INVESTMENT_STRATEGY},{label:"Sell before Call/Maturity",value:this.SELL_INVESTMENT_STRATEGY}],this.settlementDateFormat="dd-MM-yyyy",this.settlementDateBondDataFormat="yyyy-MM-dd",this.dateFormat=f.a.DATE_FORMAT_WITHOUT_DASH,this.BOND="bond",this.bondConstant=O.a,this.bondCalculatorInput=null,this.isFactsheet=!1,this.isOrderpad=!1,this.showBondDetails=!1,this.selectedIssueC
1ode=null,this.bondType=null,this.isSellOrderpad=!1,this.showBondDetailsChange=new o.s,this.selectedIssueCodeChange=new o.s,this.netYieldEmitter=new o.s,this.estPayableAmtEmitter=new o.s,this.estTotalReturnEmitter=new o.s,this.estRedemptionAmtEmitter=new o.s,this.onClickBuyButton=new o.s,this.lsClientChange=new o.s,this.isMobileView=!1,this.rmoEnabled=!1,this.isAuthenticated=this.store.selectSnapshot(M.a.isAuthenticated),this.showMobileYieldToCallTooltip=!1,this.subHandler=[],this.isSearchModalVisible=!1,this.bondData=null,this.isBondDataLoading=!1,this.isNominalValueUpdating=!1,this.isBondDataLoaded=!1,this.showResult=!1,this.isExpandCashFlow=!1,this.startOfToday=new Date,this.investmentStrategySelected="",this.cashflows=[],this.validateBuyBondCalculatorForm=this.fb.group({nominalValue:[1e4,[l.H.required]],buySettlementDate:[null,[l.H.required]],sellSettlementDate:[null],buyPrice:[0,[l.H.required]],sellPrice:[null]}),this.askPrice=0,this.bidPrice=0,this.yearsToMaturity="",this.yearsToCall="",this.yearsToSell="",this.minInvest=0,this.incrementalAmt=0,this.bondCalculatorData=null,this.estTotalReturn=0,this.couponIncome=0,this.payoutAmount=0,this.capitalGains=0,this.principalAmount=0,this.buyIndicativeAccruedInt=0,this.buyAccruedDays=0,this.buyProcessingFee=0,this.sellIndicativeAccruedInt=0,this.sellAccruedDays=0,this.sellProcessingFee=0,this.totalIndicativeAccruedInt=0,this.totalAccruedDays=0,this.totalPayableAmt=0,this.totalFxPayableAmt=0,this.bufferAmt=0,this.bufferRate=0,this.daysHeld=0,this.maturityProceeds=0,this.earlyRedemption=0,this.sellEarlyRedemption=0,this.fxRate=0,this.fxCurrency="",this.sstRate=0,this.sellOrderpadTotalIndicativeAccruedInt=0,this.sellOrderpadProcessingFee=0,this.sellOrderpadEstTotalRedemptionAmt=0,this.calculateSubject$=new s.a,this.addedWatchListIssueCode="",this.isAddBondModalVisible=!1,this.watchlistLoading=!0,this.watchlist=[],this.allBondMarkupRate=[],this.showTooltipDrawer=!1,this.calculatorChangesSubject$=new s.a,this.disabledDate=e=>{var t,n,o;if(!e)return!1;const l=Object(c.K)(e,f.a.DATE_FORMAT_WITHOUT_DASH,i.a.LOCALE_EN),a=Object(c.K)(this.startOfToday,f.a.DATE_FORMAT_WITHOUT_DASH,i.a.LOCALE_EN);return 0===e.getDay()||6===e.getDay()||l!==a&&((null===(t=this.bondCalculatorData)||void 0===t?void 0:t.maturityDate)?(null===(n=this.bondCalculatorData)||void 0===n?void 0:n.issueDate)?e.getTime()<this.startOfToday.getTime()||e.getTime()>new Date(this.bondCalculatorData.maturityDate).getTime()||e.getTime()<new Date(this.bondCalculatorData.issueDate).getTime():e.getTime()<this.startOfToday.getTime()||e.getTime()>new Date(this.bondCalculatorData.maturityDate).getTime():(null===(o=this.bondCalculatorData)||void 0===o?void 0:o.issueDate)?e.getTime()<this.startOfToday.getTime()||e.getTime()<new Date(this.bondCalculatorData.issueDate).getTime():e.getTime()<this.startOfToday.getTime())},this.disabledSellDate=e=>{var t,n,o;if(!e)return!1;Object(c.K)(e,f.a.DATE_FORMAT_WITHOUT_DASH,i.a.LOCALE_EN),Object(c.K)(this.startOfToday,f.a.DATE_FORMAT_WITHOUT_DASH,i.a.LOCALE_EN);const l=new Date(this.validateBuyBondCalculatorForm.get("buySettlementDate").value);return 0===e.getDay()||6===e.getDay()||((null===(t=this.bondCalculatorData)||void 0===t?void 0:t.maturityDate)?(null===(n=this.bondCalculatorData)||void 0===n?void 0:n.issueDate)?e.getTime()<this.startOfToday.getTime()||e.getTime()>new Date(this.bondCalculatorData.maturityDate).getTime()||e.getTime()<new Date(this.bondCalculatorData.issueDate).getTime()||e.getTime()<l.getTime():e.getTime()<this.startOfToday.getTime()||e.getTime()>new Date(this.bondCalculatorData.maturityDate).getTime()||e.getTime()<l.getTime():(null===(o=this.bondCalculatorData)||void 0===o?void 0:o.issueDate)?e.getTime()<this.startOfToday.getTime()||e.getTime()<new Date(this.bondCalculatorData.issueDate).getTime()||e.getTime()<l.getTime():e.getTime()<this.startOfToday.getTime()||e.getTime()<l.getTime())},this.isMobile=this.store.select(e=>e.global.mobile),this.isMobile.subscribe(e=>{this.isMobileView=e})}set addSub(e){this.subHandler.push(e)}ngOnInit(){var e;this.initSStRate(),this.startOfToday.setHours(0),this.startOfToday.setMinutes(0),this.startOfToday.setSeconds(0),this.validateBuyBondCalculatorForm=this.fb.group({nominalValue:[1e4,[l.H.required]],buySettlementDate:[null,[l.H.required]],sellSettlementDate:[null],buyPrice:[0,[l.H.required]],sellPrice:[null]}),this.bondCalculatorInput&&this.isOrderpad&&this.selectBond({productC
1ode:this.bondCalculatorInput.issueCode}),this.validateBuyBondCalculatorForm.get("nominalValue").valueChanges.subscribe(e=>{this.changeNominalValue(e)}),this.validateBuyBondCalculatorForm.get("buySettlementDate").valueChanges.subscribe(()=>{this.changeBuySettlementDate()}),this.validateBuyBondCalculatorForm.get("sellSettlementDate").valueChanges.subscribe(()=>{this.changeSellSettlementDate()}),this.validateBuyBondCalculatorForm.get("buyPrice").valueChanges.subscribe(e=>{this.changeBuyPrice(e)}),this.validateBuyBondCalculatorForm.get("sellPrice").valueChanges.subscribe(e=>{this.changeSellPrice(e)}),this.checkRmoEnable(),this.calculateSubscription=this.calculateSubject$.pipe(Object(u.a)(1e3),Object(p.a)()).subscribe(()=>{this.reloadBondCalculatorData()}),this.calculatorChangesSubscription=this.calculatorChangesSubject$.pipe(Object(u.a)(300)).subscribe(()=>{var e;(null===(e=this.bondCalculatorInput)||void 0===e?void 0:e.issueCode)&&this.selectBond({productCode:this.bondCalculatorInput.issueCode})}),this.isAuthenticated&&(this.refno=null===(e=this.store.selectSnapshot(M.a.getPrimaryAccount))||void 0===e?void 0:e.refno),this.updateFormControlState(),this.getAllWatchlistByAccountId()}ngOnDestroy(){var e,t;null!=this.lsClient&&null!=(null===(e=this.lightstreamerBondInitService)||void 0===e?void 0:e.getLsClient())&&(null===(t=this.lightstreamerBondInitService)||void 0===t||t.destroyLightStreamer())}ngOnChanges(e){var t,n,o,i,l;this.initSStRate(),this.validateBuyBondCalculatorForm&&((null==e?void 0:e.bondCalculatorInput)&&this.bondCalculatorInput&&(this.validateBuyBondCalculatorForm.get("nominalValue").setValue(null===(n=null===(t=null==e?void 0:e.bondCalculatorInput)||void 0===t?void 0:t.currentValue)||void 0===n?void 0:n.nominalValue,{emitEvent:!1}),this.validateBuyBondCalculatorForm.get("buyPrice").setValue(Number(((null===(i=null===(o=null==e?void 0:e.bondCalculatorInput)||void 0===o?void 0:o.currentValue)||void 0===i?void 0:i.price)||0).toFixed(3)),{emitEvent:!1})),null===(l=this.calculatorChangesSubject$)||void 0===l||l.next())}openSearch(){this.isSearchModalVisible=!0}selectBond(e,t=!1,n=null,o=null){var l;this.isBondDataLoading=!0,this.updateFormControlState(),this.selectedIssueCode=null==e?void 0:e.productCode,this.closeSearch();const a=null===(l=this.store.selectSnapshot(M.a.getPrimaryAccount))||void 0===l?void 0:l.refno;this.subHandlingService.once(this.bondRestService.initBondCalculatorData(null==e?void 0:e.productCode,a).pipe(Object(h.a)(e=>{var t,l;(null==e?void 0:e.status)===i.a.RESPONSE_SUCCESS&&"active"===(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.status)&&(this.bondData=e.data,this.selectedIssueCode=null===(l=this.bondData)||void 0===l?void 0:l.issueCode,this.isFactsheet||this.isOrderpad?this.checkBondDefaultValueAndValidationForFactsheetOrderpad():this.checkBondDefaultValueAndValidation(),n&&this.validateBuyBondCalculatorForm.get("nominalValue").setValue(Number(n),{emitEvent:!1}),o&&this.validateBuyBondCalculatorForm.get("buyPrice").setValue(Object(c.L)(Number(o),i.a.LOCALE_EN,"0.3-3"),{emitEvent:!1}))}),Object(b.a)(e=>(this.bondData=null,console.log(e),Object(r.a)(null))),Object(m.a)(()=>this.bondData?this.getBondCalculatorData():Object(r.a)(null)),Object(g.a)(()=>{this.calculateTotalAmount(),this.isBondDataLoading=!1,this.isBondDataLoaded=!0,this.updateFormControlState(),t&&this.isAuthenticated&&this.showOrderpad(this.selectedIssueCode),this.formatNominalValue()})))}checkBondDefaultValueAndValidation(){var e,t,n,o,a,s,r,d,u,p,h,b,m,g,f,v,y,C,M,T,O,B,S,x,P,E,w,D;this.rmoEnabled&&"Y"===(null===(e=this.bondData)||void 0===e?void 0:e.bexOddEnabled)?(this.minInvest=null===(t=this.bondData)||void 0===t?void 0:t.bexOddLotMinLotSize,this.askPrice=Number(this.decimalPipe.transform(null===(n=this.bondData)||void 0===n?void 0:n.offerPriceBeOdd,"1.3-3"))||0,this.bidPrice=(null===(o=this.bondData)||void 0===o?void 0:o.bidPriceBeOdd)||0,this.incrementalAmt=null===(a=this.bondData)||void 0===a?void 0:a.bexOddLotSubLotSize,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(s=this.bondData)||void 0===s?void 0:s.rmoSettlementDate)||(null===(r=this.bondData)||void 0===r?void 0:r.defaultSettlementDate),{emitEvent:!1})):this.rmoEnabled&&"Y"===(null===(d=this.bondData)||void 0===d?void 0:d.bexFullEnabled)?(this.minInvest=null===(u=this.bondData)||void 0===u?void 0:u.bexFullLotMinLotSize,this.askPrice=Number(this.decimalPipe.transform(null===(p=this.bondData)||void 0===p?void 0:p.offerPriceBeFull,"1.3-3"))||0,this.bidPrice=(null===(h=this.bondData)||void 0===h?void 0:h.bidPriceBeFull)||0,this.incrementalAmt=null===(b=this.bondData)||void 0===b?void 0:b.bexFullLotSubLotSize,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(m=this.bondData)||void 0===m?void 0:m.rmoSettlementDate)||(null===(g=this.bondData)||void 0===g?void 0:g.defaultSettlementDate),{emitEvent:!1})):"Y"===(null===(f=this.bondData)||void 0===f?void 0:f.bmpMyEnabled)?(this.minInvest=null===(v=this.bondData)||void 0===v?void 0:v.bmpMyMinLotSize,this.askPrice=Number(this.decimalPipe.transform(null===(y=this.bondData)||void 0===y?void 0:y.offerPriceBmp,"1.3-3"))||0,this.bidPrice=(null===(C=this.bondData)||void 0===C?void 0:C.bidPriceBmp)||0,this.incrementalAmt=null===(M=this.bondData)||void 0===M?void 0:M.bmpMySubLotSize,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(T=this.bondData)||void 0===T?void 0:T.beSettlementDate)||(null===(O=this.bondData)||void 0===O?void 0:O.defaultSettlementDate),{emitEvent:!1})):(this.minInvest=null===(B=this.bondData)||void 0===B?void 0:B.minInitialAmt,this.askPrice=Number(this.decimalPipe.transform(null===(S=this.bondData)||void 0===S?void 0:S.offerPriceOtc,"1.3-3"))||0,this.bidPrice=(null===(x=this.bondData)||void 0===x?void 0:x.bidPriceOtc)||0,this.incrementalAmt=null===(P=this.bondData)||void 0===P?void 0:P.incrementalAmt,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(E=this.bondData)||void 0===E?void 0:E.otcSettlementDate)||(null===(w=this.bondData)||void 0===w?void 0:w.defaultSettlementDate),{emitEvent:!1})),this.validateBuyBondCalculatorForm.get("buyPrice").setValue(Object(c.L)(this.askPrice,i.a.LOCALE_EN,"0.3-3"),{emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellSettlementDate").setValue(null,{emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellPrice").setValue(null,{emitEvent:!1}),this.minInvest<1e4?this.validateBuyBondCalculatorForm.get("nominalValue").setValue(1e4,{emitEvent:!1}):this.validateBuyBondCalculatorForm.get("nominalValue").setValue(this.minInvest,{emitEvent:!1}),(null===(D=this.bondData)||void 0===D?void 0:D.callDate)?(this.investmentStrategySelected=this.CALL_INVESTMENT_STRATEGY,this.validateBuyBondCalculatorForm.get("sellSettlementDate").setValidators(null),this.validateBuyBondCalculatorForm.get("sellPrice").setValidators(null),this.validateBuyBondCalculatorForm.get("sellSettlementDate").markAsDirty(),this.validateBuyBondCalculatorForm.get("sellSettlementDate").updateV
1alueAndValidity({emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellPrice").updateValueAndValidity({emitEvent:!1})):this.isPerpetualBond()?(this.investmentStrategySelected=this.SELL_INVESTMENT_STRATEGY,this.validateBuyBondCalculatorForm.get("sellSettlementDate").setValidators([l.H.required]),this.validateBuyBondCalculatorForm.get("sellPrice").setValidators([l.H.required]),this.validateBuyBondCalculatorForm.get("sellSettlementDate").markAsDirty(),this.validateBuyBondCalculatorForm.get("sellSettlementDate").updateValueAndValidity({emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellPrice").updateValueAndValidity({emitEvent:!1})):(this.investmentStrategySelected=this.MATURITY_INVESTMENT_STRATEGY,this.validateBuyBondCalculatorForm.get("sellSettlementDate").setValidators(null),this.validateBuyBondCalculatorForm.get("sellPrice").setValidators(null),this.validateBuyBondCalculatorForm.get("sellSettlementDate").markAsDirty(),this.validateBuyBondCalculatorForm.get("sellSettlementDate").updateValueAndValidity({emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellPrice").updateValueAndValidity({emitEvent:!1}))}checkBondDefaultValueAndValidationForFactsheetOrderpad(){var e,t,n,o,l,a,s,r,d,u,p,h,b,m,g,f,v,y,C,M,T,B,S,x,P,E,w,D,z,A,F,q,I,_,R,k,U,L,V;this.rmoEnabled&&this.bondType===O.a.ODD_LOT?(this.minInvest=(null===(e=this.bondCalculatorInput)||void 0===e?void 0:e.nominalValue)||(null===(t=this.bondData)||void 0===t?void 0:t.bexOddLotMinLotSize),this.incrementalAmt=null===(n=this.bondData)||void 0===n?void 0:n.bexOddLotSubLotSize,this.askPrice=null!==(null===(o=this.bondCalculatorInput)||void 0===o?void 0:o.price)&&void 0!==(null===(l=this.bondCalculatorInput)||void 0===l?void 0:l.price)?null===(a=this.bondCalculatorInput)||void 0===a?void 0:a.price:Number(this.decimalPipe.transform(null===(s=this.bondData)||void 0===s?void 0:s.offerPriceBeOdd,"1.3-3"))||0,this.bidPrice=(null===(r=this.bondData)||void 0===r?void 0:r.bidPriceBeOdd)||0,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(d=this.bondData)||void 0===d?void 0:d.rmoSettlementDate)||(null===(u=this.bondData)||void 0===u?void 0:u.defaultSettlementDate),{emitEvent:!1})):this.rmoEnabled&&this.bondType===O.a.FULL_LOT?(this.minInvest=(null===(p=this.bondCalculatorInput)||void 0===p?void 0:p.nominalValue)||(null===(h=this.bondData)||void 0===h?void 0:h.bexFullLotMinLotSize),this.incrementalAmt=null===(b=this.bondData)||void 0===b?void 0:b.bexFullLotSubLotSize,this.askPrice=null!==(null===(m=this.bondCalculatorInput)||void 0===m?void 0:m.price)&&void 0!==(null===(g=this.bondCalculatorInput)||void 0===g?void 0:g.price)?null===(f=this.bondCalculatorInput)||void 0===f?void 0:f.price:Number(this.decimalPipe.transform(null===(v=this.bondData)||void 0===v?void 0:v.offerPriceBeFull,"1.3-3"))||0,this.bidPrice=(null===(y=this.bondData)||void 0===y?void 0:y.bidPriceBeFull)||0,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(C=this.bondData)||void 0===C?void 0:C.rmoSettlementDate)||(null===(M=this.bondData)||void 0===M?void 0:M.defaultSettlementDate),{emitEvent:!1})):this.bondType===O.a.BOND_EXPRESS?(this.minInvest=(null===(T=this.bondCalculatorInput)||void 0===T?void 0:T.nominalValue)||(null===(B=this.bondData)||void 0===B?void 0:B.bmpMyMinLotSize),this.incrementalAmt=null===(S=this.bondData)||void 0===S?void 0:S.bmpMySubLotSize,this.askPrice=null!==(null===(x=this.bondCalculatorInput)||void 0===x?void 0:x.price)&&void 0!==(null===(P=this.bondCalculatorInput)||void 0===P?void 0:P.price)?null===(E=this.bondCalculatorInput)||void 0===E?void 0:E.price:Number(this.decimalPipe.transform(null===(w=this.bondData)||void 0===w?void 0:w.offerPriceBmp,"1.3-3"))||0,this.bidPrice=(null===(D=this.bondData)||void 0===D?void 0:D.bidPriceBmp)||0,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(z=this.bondData)||void 0===z?void 0:z.beSettlementDate)||(null===(A=this.bondData)||void 0===A?void 0:A.defaultSettlementDate),{emitEvent:!1})):(this.minInvest=(null===(F=this.bondCalculatorInput)||void 0===F?void 0:F.nominalValue)||(null===(q=this.bondData)||void 0===q?void 0:q.minInitialAmt),this.incrementalAmt=null===(I=this.bondData)||void 0===I?void 0:I.incrementalAmt,this.askPrice=(null===(_=this.bondCalculatorInput)||void 0===_?void 0:_.price)||Number(this.decimalPipe.transform(null===(R=this.bondData)||void 0===R?void 0:R.offerPriceOtc,"1.3-3"))||0,this.bidPrice=(null===(k=this.bondData)||void 0===k?void 0:k.bidPriceOtc)||0,this.validateBuyBondCalculatorForm.get("buySettlementDate").setValue((null===(U=this.bondData)||void 0===U?void 0:U.otcSettlementDate)||(null===(L=this.bondData)||void 0===L?void 0:L.defaultSettlementDate),{emitEvent:!1})),this.validateBuyBondCalculatorForm.get("buyPrice").setValue(Object(c.L)(this.isSellOrderpad?this.bidPrice:this.askPrice,i.a.LOCALE_EN,"0.3-3"),{emitEvent:!1}),this.minInvest<1e4&&this.isFactsheet?this.validateBuyBondCalculatorForm.get("nominalValue").setValue(1e4,{emitEvent:!1}):this.validateBuyBondCalculatorForm.get("nominalValue").setValue(this.minInvest,{emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellSettlementDate").setValidators(null),this.validateBuyBondCalculatorForm.get("sellPrice").setValidators(null),this.validateBuyBondCalculatorForm.get("sellSettlementDate").markAsDirty(),this.validateBuyBondCalculatorForm.get("sellSettlementDate").updateV
1alueAndValidity({emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellPrice").updateValueAndValidity({emitEvent:!1}),this.investmentStrategySelected=(null===(V=this.bondData)||void 0===V?void 0:V.callDate)||this.isPerpetualBond()?this.CALL_INVESTMENT_STRATEGY:this.MATURITY_INVESTMENT_STRATEGY}getBondCalculatorData(){var e,t,n,o,l,a,c,s,d,u,p,b,g;const f=null===(e=this.store.selectSnapshot(M.a.getPrimaryAccount))||void 0===e?void 0:e.refno,v={issueCode:null===(t=this.bondData)||void 0===t?void 0:t.issueCode,nominalValue:null===(o=null===(n=this.validateBuyBondCalculatorForm)||void 0===n?void 0:n.get("nominalValue"))||void 0===o?void 0:o.value,settlementDate:this.datePipe.transform(null===(a=null===(l=this.validateBuyBondCalculatorForm)||void 0===l?void 0:l.get("buySettlementDate"))||void 0===a?void 0:a.value,this.settlementDateBondDataFormat),sellSettlementDate:this.investmentStrategySelected===this.SELL_INVESTMENT_STRATEGY?this.datePipe.transform(null===(s=null===(c=this.validateBuyBondCalculatorForm)||void 0===c?void 0:c.get("sellSettlementDate"))||void 0===s?void 0:s.value,this.settlementDateBondDataFormat):null,forTransaction:!0,isBondBuy:!0,isExpress:"Y"===(null===(d=this.bondData)||void 0===d?void 0:d.bexEnabled),price:null===(p=null===(u=this.validateBuyBondCalculatorForm)||void 0===u?void 0:u.get("buyPrice"))||void 0===p?void 0:p.value,sellPrice:this.investmentStrategySelected===this.SELL_INVESTMENT_STRATEGY?null===(g=null===(b=this.validateBuyBondCalculatorForm)||void 0===b?void 0:b.get("sellPrice"))||void 0===g?void 0:g.value:null,isRmo:!0,refno:f,expiredDate:this.datePipe.transform(this.getGtdDate(),this.settlementDateBondDataFormat),yieldType:"rmo"};return this.bondCalculatorData=null,this.bondRestService.bondCalculatorDataBySettlementDateAndPrice(v).pipe(Object(h.a)(e=>{(null==e?void 0:e.status)===i.a.RESPONSE_SUCCESS&&(this.bondCalculatorData=null==e?void 0:e.data,this.netYtw=this.getNetYtw(null==e?void 0:e.data))})).pipe(Object(m.a)(()=>{var e,t,n;if(this.isSellOrderpad)return Object(r.a)(null);{const o=this.datePipe.transform(this.validateBuyBondCalculatorForm.get("buySettlementDate").value,this.settlementDateFormat),i=this.investmentStrategySelected===this.SELL_INVESTMENT_STRATEGY?this.datePipe.transform(this.validateBuyBondCalculatorForm.get("sellSettlementDate").value,this.settlementDateFormat):null,l=this.isFactsheet||this.isOrderpad?!!(null===(e=this.bondCalculatorData)||void 0===e?void 0:e.offerNetYtc)&&(!(null===(t=this.bondCalculatorData)||void 0===t?void 0:t.offerNetYtm)||this.bondCalculatorData.offerNetYtc<(null===(n=this.bondCalculatorData)||void 0===n?void 0:n.offerNetYtm))||this.isPerpetualBond():this.investmentStrategySelected===this.CALL_INVESTMENT_STRATEGY;return this.getCashFlow(o,l,i)}}))}getCashFlow(e,t,n){var o;return this.bondRestService.cashflowBySettlementDate(null===(o=this.bondData)||void 0===o?void 0:o.issueCode,this.validateBuyBondCalculatorForm.get("nominalValue").value,e,t,n).pipe(Object(h.a)(e=>{var t,o,l,a,c,s;this.cashflows=[],(null==e?void 0:e.status)===i.a.RESPONSE_SUCCESS&&(this.investmentStrategySelected!==this.SELL_INVESTMENT_STRATEGY||n)&&(this.bondTradingWithoutAi()?(null===(a=null===(l=null==e?void 0:e.data)||void 0===l?void 0:l.reverse())||void 0===a?void 0:a[0])&&(this.cashflows=[Object.assign(Object.assign({},null===(s=null===(c=null==e?void 0:e.data)||void 0===c?void 0:c.reverse())||void 0===s?void 0:s[0]),{payoutAmount:0})]):this.cashflows=null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.reverse())||void 0===o?void 0:o.map(e=>Object.assign(Object.assign({},e),{year:new Date(e.payoutDate).getFullYear()})))}))}reloadBondCalculatorData(){this.isNominalValueUpdating=!0,this.updateFormControlState(),this.subHandlingService.once(Object(d.a)(this.getBondCalculatorData()).pipe(Object(g.a)(()=>{this.isNominalValueUpdating=!1,this.updateFormControlState(),this.calculateTotalAmount()})))}closeSearch(){this.isSearchModalVisible=!1}changeNominalValue(e){e&&this.calculateSubject$.next(e+"nominalValue")}changeBuyPrice(e){e&&this.calculateSubject$.next(e+"buyPrice")}changeSellPrice(e){e&&this.calculateSubject$.next(e+"sellPrice")}changeBuySettlementDate(){this.reloadBondCalculatorData()}changeSellSettlementDate(){this.reloadBondCalculatorData()}onInvestmentStrategyChange(e){switch(this.investmentStrategySelected=e,this.investmentStrategySelected){case this.CALL_INVESTMENT_STRATEGY:case this.MATURITY_INVESTMENT_STRATEGY:this.validateBuyBondCalculatorForm.get("sellSettlementDate").setValidators(null),this.validateBuyBondCalculatorForm.get("sellPrice").setValidators(null);break;case this.SELL_INVESTMENT_STRATEGY:this.validateBuyBondCalculatorForm.get("sellSettlementDate").setValidators([l.H.required]),this.validateBuyBondCalculatorForm.get("sellPrice").setValidators([l.H.required])}this.validateBuyBondCalculatorForm.get("sellSettlementDate").markAsDirty(),this.validateBuyBondCalculatorForm.get("sellSettlementDate").updateV
1alueAndValidity({emitEvent:!1}),this.validateBuyBondCalculatorForm.get("sellPrice").updateValueAndValidity({emitEvent:!1}),this.reloadBondCalculatorData()}isBondExchange(){var e,t;return"Y"===(null===(e=this.bondData)||void 0===e?void 0:e.bexFullEnabled)||"Y"===(null===(t=this.bondData)||void 0===t?void 0:t.bexOddEnabled)}isBondExpress(){var e;return"Y"===(null===(e=this.bondData)||void 0===e?void 0:e.bmpMyEnabled)}initSStRate(){const e=new Date;this.bondRestService.getBondSSTRate(e.toISOString().split("T")[0]).subscribe(e=>{this.sstRate=e.data,console.log("SST Rate:",this.sstRate)})}calculateTotalAmount(){var e,t,n,o,i,l,a,c,s,r,d,u,p,h,b,m,g,f,v,y,C;const M=Number(this.validateBuyBondCalculatorForm.get("nominalValue").value),T=Number(this.validateBuyBondCalculatorForm.get("buyPrice").value),S=Number(this.validateBuyBondCalculatorForm.get("sellPrice").value);let x=0;const P=null===(e=this.bondCalculatorData)||void 0===e?void 0:e.upfrontFee;P>0&&(x+=P);const E=null===(t=this.bondCalculatorData)||void 0===t?void 0:t.transactionFeeAmt;let w=(null===(n=this.bondCalculatorData)||void 0===n?void 0:n.aiPercentage)||0,D=(null===(o=this.bondCalculatorData)||void 0===o?void 0:o.sellAiPercentage)||0,z=(null===(i=this.bondCalculatorData)||void 0===i?void 0:i.daysDifference)||0,A=(null===(l=this.bondCalculatorData)||void 0===l?void 0:l.sellDaysDifference)||0;this.bondTradingWithoutAi()&&(w=0,D=0,z=0,A=0);const F=null===(a=this.cashflows)||void 0===a?void 0:a.reduce((e,t)=>e+Number(t.payoutAmount),0),q=null===(c=this.cashflows)||void 0===c?void 0:c.map(e=>e.payoutAmount)[0],I=new Date(this.validateBuyBondCalculatorForm.get("buySettlementDate").value),_=new Date(this.validateBuyBondCalculatorForm.get("sellSettlementDate").value),R=new Date(null===(s=this.bondCalculatorData)||void 0===s?void 0:s.maturityDate),k=new Date(null===(r=this.bondCalculatorData)||void 0===r?void 0:r.callDate),U=null===(d=this.bondCalculatorData)||void 0===d?void 0:d.callValue,L=Object(B.b)(T*M/100),V=Object(B.b)(M*w/100),N=Object(B.b)(this.bondCalculatorService.calculateProcessingFee(M,x,E,this.sstRate)),Y=Object(B.b)(M*D/100),j=Object(B.b)(this.bondCalculatorService.calculateProcessingFee(M,x,E,this.sstRate));let H=F-V;this.investmentStrategySelected===this.SELL_INVESTMENT_STRATEGY&&(H=F-V+Y);let G=M*(100-T)-N,W=null;switch(this.investmentStrategySelected){case this.CALL_INVESTMENT_STRATEGY:W=k,G=M*(U-T)/100-N;break;case this.MATURITY_INVESTMENT_STRATEGY:W=R,G=M*(100-T)/100-N;break;case this.SELL_INVESTMENT_STRATEGY:W=_,G=M*(S-T)/100-N-j;break;default:W=k}const Q=this.getDaysBetweenDates(I,W),$=null!==U?U*M/100:0,K=null!==S?S*M/100:M,X=M,J=this.getDurationBetweenDates(I,R),Z=this.getDurationBetweenDates(I,k),ee=this.getDurationBetweenDates(I,_);this.totalAccruedDays=z+A,this.totalIndicativeAccruedInt=Y-V,this.estTotalReturn=H+G,this.couponIncome=H,this.payoutAmount=q,this.capitalGains=G,this.principalAmount=L,this.buyIndicativeAccruedInt=V,this.buyProcessingFee=N,this.sellIndicativeAccruedInt=Y,this.buyAccruedDays=z,this.sellAccruedDays=A,this.sellProcessingFee=j;const te=Object(B.b)(L+V+N);this.totalPayableAmt=te,this.isSellOrderpad&&(this.sellOrderpadTotalIndicativeAccruedInt=V,this.sellOrderpadProcessingFee=N,this.sellOrderpadEstTotalRedemptionAmt=L+V-N,this.estRedemptionAmtEmitter.emit(this.sellOrderpadEstTotalRedemptionAmt)),this.isOrderpad&&((null===(u=this.bondCalculatorInput)||void 0===u?void 0:u.bufferRate)?(this.bufferRate=Object(B.b)(this.bondCalculatorInput.bufferRate),this.bondType===O.a.BOND_EXPRESS&&(null===(p=this.bondCalculatorInput)||void 0===p?void 0:p.fxCurrency)===(null===(h=this.bondData)||void 0===h?void 0:h.bondCurrencyCode)||(this.totalPayableAmt=this.totalPayableAmt*(this.bufferRate/100+1),this.bufferAmt=this.totalPayableAmt-te)):(this.bufferRate=0,this.bufferAmt=0),(null===(b=this.bondCalculatorInput)||void 0===b?void 0:b.fxCurrency)!==(null===(m=this.bondData)||void 0===m?void 0:m.bondCurrencyCode)?(this.fxRate=null===(g=this.bondCalculatorInput)||void 0===g?void 0:g.fxRate,this.fxCurrency=null===(f=this.bondCalculatorInput)||void 0===f?void 0:f.fxCurrency,this.totalFxPayableAmt=this.totalPayableAmt*this.fxRate):this.fxRate=0,this.estPayableAmtEmitter.emit(null===(v=this.totalPayableAmt)||void 0===v?void 0:v.toString()),this.estTotalReturnEmitter.emit(null===(y=this.estTotalReturn)||void 0===y?void 0:y.toString())),this.isFactsheet&&this.estTotalReturnEmitter.emit(null===(C=this.estTotalReturn)||void 0===C?void 0:C.toString()),this.daysHeld=Q,this.earlyRedemption=$,this.maturityProceeds=X,this.sellEarlyRedemption=K,this.yearsToMaturity=J,this.yearsToCall=Z,this.yearsToSell=ee}getDaysBetweenDates(e,t){const n=t.getTime()-e.getTime();return Math.round(n/864e5)+1}getDurationBetweenDates(e,t){if(t<e)return"-";const n=e.getFullYear(),o=e.getMonth();let i=t.getFullYear()-n,l=t.getMonth()-o;return l<0&&(i--,l+=12),0===i?l+"M":`${i}Y ${l}M`}navigateToBondFactsheet(e,t){const n=Object(v.f)(y.b.BOND,e,"",t);Object(C.a)(n.route,n.params)}isPerpetualBond(){var e,t;return"Y"===(null===(e=this.bondData)||void 0===e?void 0:e.perpetual)||2165===new Date(null===(t=this.bondData)||void 0===t?void 0:t.maturityDate).getFullYear()}bondTradingWithoutAi(){var e,t,n,o,i;return this.isFactsheet||this.isOrderpad?this.rmoEnabled&&this.bondType===O.a.ODD_LOT?"Y"===(null===(e=this.bondData)||void 0===e?void 0:e.bexTradingWithoutAi):this.rmoEnabled&&this.bondType===O.a.FULL_LOT?"Y"===(null===(t=this.bondData)||void 0===t?void 0:t.bexTradingWithoutAi):"Y"===(null===(n=this.bondData)||void 0===n?void 0:n.tradingWithoutAi):this.rmoEnabled&&this.isBondExchange()?"Y"===(null===(o=this.bondData)||void 0===o?void 0:o.bexTradingWithoutAi):"Y"===(null===(i=this.bondData)||void 0===i?void 0:i.tradingWithoutAi)}checkRmoEnable(){var e;this.store.selectSnapshot(M.a.isAuthenticated)?this.rmoEnabled=null===(e=this.store.selectSnapshot(M.a.getAuthData))||void 0===e?void 0:e.rmoEnabled:this.bondRestService.checkBondRmoEnable().pipe(Object(h.a)(e=>{e&&(this.rmoEnabled=null==e?void 0:e.data)}),Object(g.a)(()=>{})).subscribe(),this.isFactsheet||this.isOrderpad||this.initRouteParam()}initRouteParam(){this.route.queryParams.subscribe(e=>{(null==e?void 0:e.nominalValue)||(null==e?void 0:e.buyPrice)?this.selectBond({productC
1ode:null==e?void 0:e.issueCode},!1,null==e?void 0:e.nominalValue,null==e?void 0:e.buyPrice):(null==e?void 0:e.issueCode)&&this.selectBond({productCode:null==e?void 0:e.issueCode},!0)})}showOrderpad(e){var t;this.store.selectSnapshot(M.a.isAuthenticated)?(this.lsClient||(this.lsClient=this.lightstreamerBondInitService.initLightstreamer()),this.refno=null===(t=this.store.selectSnapshot(M.a.getPrimaryAccount))||void 0===t?void 0:t.refno,this.selectedIssueCode=e,this.lsClientChange.emit(this.lsClient),this.showBondDetails=!0,this.selectedIssueCodeChange.emit(this.selectedIssueCode),this.showBondDetailsChange.emit(this.showBondDetails)):this.router.navigate([i.o.MULTIFACTOR_AUTHENTICATION_LOGIN],{queryParams:{redirect:`/${this.router.url}?issueCode=${e}`}})}onBuyClick(e){var t;this.isFactsheet?null===(t=this.onClickBuyButton)||void 0===t||t.emit():e&&this.showOrderpad(e)}onShowResult(){this.showResult=!0}onHideResult(){this.showResult=!1}onClickCashFlowDetails(){var e;const t={queryParams:{issueCode:null===(e=this.bondData)||void 0===e?void 0:e.issueCode,nominalValue:this.validateBuyBondCalculatorForm.get("nominalValue").value,buyPrice:this.validateBuyBondCalculatorForm.get("buyPrice").value}},n=this.router.createUrlTree([i.o.BONDS,i.o.BOND_TOOLS,i.o.BOND_CALCULATOR],t).toString();window.open(n,"_blank")}onShowCashFlowDetails(){this.isExpandCashFlow=!0}onHideCashFlowDetails(){this.isExpandCashFlow=!1}onBondBuyDetailVisibleChange(e){this.showBondDetails=e}updateFormControlState(){var e,t,n,o,i,l;this.bondData?(null===(o=this.validateBuyBondCalculatorForm.get("nominalValue"))||void 0===o||o.enable({emitEvent:!1}),null===(i=this.validateBuyBondCalculatorForm.get("buyPrice"))||void 0===i||i.enable({emitEvent:!1}),null===(l=this.validateBuyBondCalculatorForm.get("sellPrice"))||void 0===l||l.enable({emitEvent:!1})):(null===(e=this.validateBuyBondCalculatorForm.get("nominalValue"))||void 0===e||e.disable({emitEvent:!1}),null===(t=this.validateBuyBondCalculatorForm.get("buyPrice"))||void 0===t||t.disable({emitEvent:!1}),null===(n=this.validateBuyBondCalculatorForm.get("sellPrice"))||void 0===n||n.disable({emitEvent:!1}))}onClickWatchlistIcon(){var e,t,n,o,l,a,c,s,r;const d=this.store.selectSnapshot(M.a.isTempAccount)||this.store.selectSnapshot(M.a.isPendingAccount)||this.store.selectSnapshot(M.a.isProcessingAccount);if(this.addedWatchListIssueCode=null===(e=this.bondData)||void 0===e?void 0:e.issueCode,this.bondToAddWatchlist={issueCode:null===(t=this.bondData)||void 0===t?void 0:t.issueCode,bondName:null===(n=this.bondData)||void 0===n?void 0:n.bondName,bidPrice:this.bidPrice,bidYtm:"Y"===(null===(o=this.bondData)||void 0===o?void 0:o.bmpMyEnabled)?null===(l=this.bondData)||void 0===l?void 0:l.bidYtmBmp:null===(a=this.bondData)||void 0===a?void 0:a.bidYtm,offerPrice:this.askPrice,offerYtm:"Y"===(null===(c=this.bondData)||void 0===c?void 0:c.bmpMyEnabled)?null===(s=this.bondData)||void 0===s?void 0:s.offerYtmBmp:null===(r=this.bondData)||void 0===r?void 0:r.offerYtm,offerYldToWorst:null,bidYldToWorst:null},!this.isAuthenticated||d)if(this.isAuthenticated)this.router.navigate([Object(T.a)(i.o.APP,i.o.WATCHLIST)]);else{const e={queryParams:{info:JSON.stringify(this.bondToAddWatchlist),type:this.BOND}};this.router.navigate([Object(T.a)(i.o.APP,i.o.WATCHLIST)],e)}else this.isAddBondModalVisible=!0}onCloseAddToWatchlist(){this.isAddBondModalVisible=!1}getAllWatchlistByAccountId(){this.isAuthenticated&&this.subHandlingService.once(this.watchlistService.findWatchlistByAccountId().pipe(Object(h.a)(e=>{e.status===i.a.RESPONSE_SUCCESS&&(this.watchlist=e.data,this.watchlistLoading=!1)})))}onClickTooltip(e){this.showTooltipDrawer=!0,this.tooltipDesc=e}onCloseTooltip(){this.showTooltipDrawer=!1,this.tooltipDesc=null}openYieldToCallTooltip(){this.showMobileYieldToCallTooltip=!this.showMobileYieldToCallTooltip}onModalOpen(){var e;const t=null===(e=document.querySelector(".custom-result-modal"))||void 0===e?void 0:e.closest(".ant-modal");t&&t.classList.add("custom-modal-width")}getGtdDate(){var e,t,n;return this.isOrderpad&&"GTD"===(null===(e=this.bondCalculatorInput)||void 0===e?void 0:e.orderValidity)&&(null===(t=this.bondCalculatorInput)||void 0===t?void 0:t.gtdDate)?null===(n=this.bondCalculatorInput)||void 0===n?void 0:n.gtdDate:new Date}getNetYtw(e){var t,n;const o=null==e?void 0:e.offerNetYtc,i=null==e?void 0:e.offerNetYtm,l=this.isOrderpad;return!o&&0!==o||!i&&0!==i?o||0===o||this.isPerpetualBond()?(l&&(this.investmentStrategySelected=this.CALL_INVESTMENT_STRATEGY,this.netYieldEmitter.emit({yield:this.decimalPipe.transform(o,"1.3-3"),yieldType:"YTC"})),{title:"Est. Net Yield to Call",value:o,toolTips:this.factsheetEstNetYieldToCallTpl}):i||0===i?(l&&(this.investmentStrategySelected=this.MATURITY_INVESTMENT_STRATEGY,this.netYieldEmitter.emit({yield:this.decimalPipe.transform(i,"1.3-3"),yieldType:"YTM"})),{title:"Est. Net Yield to Maturity",value:i,toolTips:this.factsheetEstNetYieldToMaturityTpl}):(l&&(this.investmentStrategySelected=this.MATURITY_INVESTMENT_STRATEGY,this.netYieldEmitter.emit({yield:this.decimalPipe.transform(i,"1.3-3"),yieldType:"YTM"})),{title:(null===(t=this.bondCalculatorData)||void 0===t?void 0:t.callDate)?"Est. Net Yield to Call":"Est. Net Yield to Maturity",value:0,toolTips:(null===(n=this.bondCalculatorData)||void 0===n?void 0:n.callDate)?this.factsheetEstNetYieldToCallTpl:this.factsheetEstNetYieldToMaturityTpl}):i<o&&!this.isPerpetualBond()?(l&&(this.investmentStrategySelected=this.MATURITY_INVESTMENT_STRATEGY,this.netYieldEmitter.emit({yield:this.decimalPipe.transform(i,"1.3-3"),yieldType:"YTM"})),{title:"Est. Net Yield to Maturity",value:i,toolTips:this.factsheetEstNetYieldToMaturityTpl}):(l&&(this.investmentStrategySelected=this.CALL_INVESTMENT_STRATEGY,this.netYieldEmitter.emit({yield:this.decimalPipe.transform(o,"1.3-3"),yieldType:"YTC"})),{title:"Est. Net Yield to Call",value:o,toolTips:this.factsheetEstNetYieldToCallTpl})}onAddNominalValue(){var e;const t=Number(null===(e=this.validateBuyBondCalculatorForm.get("nominalValue"))||void 0===e?void 0:e.value)+this.incrementalAmt;this.validateBuyBondCalculatorForm.get("nominalValue").setValue(t),this.formatNominalValue()}onMinusNominalValue(){var e;const t=Number(null===(e=this.validateBuyBondCalculatorForm.get("nominalValue"))||void 0===e?void 0:e.value)-this.incrementalAmt;this.validateBuyBondCalculatorForm.get("nominalValue").setValue(t<0?0:t),this.formatNominalValue()}onAddBuyPrice(){var e;const t=Number(null===(e=this.validateBuyBondCalculatorForm.get("buyPrice"))||void 0===e?void 0:e.value)+1;this.validateBuyBondCalculatorForm.get("buyPrice").setValue(Object(c.L)(t,i.a.LOCALE_EN,"0.3-3"))}
1onMinusBuyPrice(){var e;const t=Number(null===(e=this.validateBuyBondCalculatorForm.get("buyPrice"))||void 0===e?void 0:e.value)-1;this.validateBuyBondCalculatorForm.get("buyPrice").setValue(Object(c.L)(t<0?0:t,i.a.LOCALE_EN,"0.3-3"))}formatNominalValue(){var e,t,n,o,i,l;const a=null===(t=null===(e=this.nominalValue)||void 0===e?void 0:e.nativeElement)||void 0===t?void 0:t.value,c=null===(o=null===(n=this.nonFactsheetNominalValue)||void 0===n?void 0:n.nativeElement)||void 0===o?void 0:o.value;if(a&&!isNaN(+a)){const e=parseFloat(a).toLocaleString("en-US");this.renderer.setProperty(null===(i=this.nominalValue)||void 0===i?void 0:i.nativeElement,"value",e)}if(c&&!isNaN(+c)){const e=parseFloat(c).toLocaleString("en-US");this.renderer.setProperty(null===(l=this.nonFactsheetNominalValue)||void 0===l?void 0:l.nativeElement,"value",e)}}limitDecimals(e){const t=e.target,n=t.value;if(!/^\d+(\.\d{0,3})?$/.test(n)){e.preventDefault();const o=n.match(/^\d+(\.\d{0,3})?/);this.renderer.setProperty(t,"value",o?o[0]:"")}}}return e.\u0275fac=function(t){return new(t||e)(o.lc(S.e),o.lc(l.g),o.lc(x.a),o.lc(P.i),o.lc(E.a),o.lc(w.a),o.lc(D.a),o.lc(S.a),o.lc(c.f),o.lc(a.a),o.lc(z.a),o.lc(c.g),o.lc(o.Q))},e.\u0275cmp=o.fc({type:e,selectors:[["app-bond-calculator-shared-v2"]],viewQuery:function(e,t){var n;1&e&&(o.kd(re,!0),o.kd(de,!0),o.kd(ue,!0),o.kd(pe,!0),o.yd(he,!0),o.yd(be,!0)),2&e&&(o.Zc(n=o.Ac())&&(t.estNetYieldToCallTpl=n.first),o.Zc(n=o.Ac())&&(t.estNetYieldToMaturityTpl=n.first),o.Zc(n=o.Ac())&&(t.factsheetEstNetYieldToCallTpl=n.first),o.Zc(n=o.Ac())&&(t.factsheetEstNetYieldToMaturityTpl=n.first),o.Zc(n=o.Ac())&&(t.nominalValue=n.first),o.Zc(n=o.Ac())&&(t.nonFactsheetNominalValue=n.first))},inputs:{bondCalculatorInput:"bondCalculatorInput",isFactsheet:"isFactsheet",isOrderpad:"isOrderpad",showBondDetails:"showBondDetails",selectedIssueCode:"selectedIssueCode",bondType:"bondType",isSellOrderpad:"isSellOrderpad",lsClient:"lsClient"},outputs:{showBondDetailsChange:"showBondDetailsChange",selectedIssueCodeChange:"selectedIssueCodeChange",netYieldEmitter:"netYieldEmitter",estPayableAmtEmitter:"estPayableAmtEmitter",estTotalReturnEmitter:"estTotalReturnEmitter",estRedemptionAmtEmitter:"estRedemptionAmtEmitter",onClickBuyButton:"onClickBuyButton",lsClientChange:"lsClientChange"},features:[o.Tb([a.a]),o.Sb],decls:92,vars:28,consts:[[4,"ngIf"],[3,"showModal","defaultCategory","showProductTab","customOpenProduct","showWatchlist","customOpenProductEvent","closeModalEvent",4,"ngIf"],[3,"nzVisible","nzTitle","nzContent","nzFooter","nzClosable",4,"ngIf"],[3,"nzVisible","nzTitle","nzContent","nzFooter","nzBodyStyle","nzClosable","nzClassName","nzOnCancel","nzAfterOpen",4,"ngIf"],[3,"nzVisible","nzTitle","nzContent","nzFooter","nzCloseIcon","nzBodyStyle","nzOnCancel",4,"ngIf"],["bondDetailsHeaderTpl",""],["bondCalculatorForm",""],["bondCalculatorResultTpl",""],["searchBarTpl",""],["investmentStrategyTpl",""],["bondDatesTpl",""],["callDateTooltipTpl",""],["maturityDateTooltipTpl",""],["investTodayTitleTpl",""],["formInputsTpl",""],["buyButtonTpl",""],["watchlistButtonTpl",""],["callMaturityDateTpl",""],["estimatedReturns",""],["webEstimatedReturns",""],["mobileEstimatedReturns",""],["webFactsheetEstimatedReturns",""],["estNetYieldToCallTpl",""],["estNetYieldToMaturityTpl",""],["factsheetEstNetYieldToCallTpl",""],["factsheetEstNetYieldToMaturityTpl",""],["couponIncomeTpl",""],["mobileFactsheetEstimatedReturns",""],["webOrderpadEstimatedReturns",""],["mobileOrderpadEstimatedReturns",""],["estimatedReturnsInDetails",""],["originalEstimatedReturnsInDetails",""],["factsheetEstimatedReturnsInDetails",""],["orderpadEstimatedReturnsInDetails",""],["noEstimatedReturnsTpl",""],["cashflowTpl",""],["bondDisclaimerTpl",""],["loadingResultTpl",""],["emptyResultTpl",""],[3,"bondToAddWatchlist","watchlistLoading","allWatchlist","showAddBondModal","onWatchlistClose"],["nzClassName","modal-custom-left-padding modal-title-border",3,"nzVisible","nzClosable","nzMaskClosable","isMobileFullScreen","nzOnCancel"],[4,"ngTemplateOutlet"],["orderPadProcessingFeeTooltip",""],["orderPadAccruedInterestTooltip",""],["orderPadYieldToCallTooltip",""],["mobileOrderPadYieldToCallTooltip",""],[1,"calculator",3,"ngClass"],["class","bond-calculator-footer pl-16px pr-16px pt-8px pb-8px",4,"ngIf"],["class","bond-calculator-content",4,"ngIf","ngIfElse"],[1,"bond-calculator-content"],[4,"ngIf","ngIfElse"],[1,"bond-calculator-footer","pl-16px","pr-16px","pt-8px","pb-8px"],["nzType","black","nzSize","large",1,"w-100",3,"nzRound","nzBlock","click"],[3,"componentStyleOnly"],["class","bond-calculator-content flex-column gap-12px-imp",4,"ngIf","ngIfElse"],[1,"bond-calculator-content","flex-column","gap-12px-imp"],[3,"nzSpinning"],[1,"calculator"],["class","bond-calculator-content flex-column",4,"ngIf","ngIfElse"],[1,"bond-calculator-content","flex-column"],[3,"showModal","defaultCategory","showProductTab","customOpenProduct","showWatchlist","customOpenProductEvent","closeModalEvent"],[3,"nzVisible","nzTitle","nzContent","nzFooter","nzClosable"],["searchContentTpl",""],[3,"nzVisible","nzTitle","nzContent","nzFooter","nzBodyStyle","nzClosable","nzClassName","nzOnCancel","nzAfterOpen"],["calculatorResultTpl",""],[1,"calculator-result-header","gap-12px","pb-24px"],[3,"ngClass"],[1,"text-black","text-18px","font-weight-bold","line-height-normal","font-jakarta"],["class","font-weight-normal font-style-normal line-height-normal text-black t-base",4,"ngIf"],["class","buy-button mobile pt-8px pb-8px w-100",4,"ngIf"],[1,"icon",3,"ngClass","click"],[3,"click"],["alt","factsheet mobile close btn",3,"src"],[1,"font-weight-normal","font-style-normal","line-height-normal","text-black","t-base"],["class","bond-calculator-content",4,"ngIf"],["class","text-black t-2xl font-weight-bold line-height-normal mb-16px",4,"ngIf"],[1,"text-black","t-2xl","font-weight-bold","line-height-normal","mb-16px"],[1,"buy-button","mobile","pt-8px","pb-8px","w-100"],["nzType","buy","nzSize","large",1,"w-100",3,"nzRound","nzBlock","disabled","click"],["width","24","height","24","alt","watchlist",1,"pointer",3,"src","click"],[3,"nzVisible","nzTitle","nzContent","nzFooter","nzCloseIcon","nzBodyStyle","nzOnCancel"],["cashflowHeaderTpl",""],["cashflowContentTpl",""],[1,"d-flex","justify-content-between","align-item-center"],[1,"t-lg","font-weight-bold","font-style-normal","line-height-normal"],["nzType","tonal",3,"nzIcon","click"],[1,"bond-details-header"],[1,"header-wrapper"],[1,"title-container",3,"ngClass"],[3,"isFullLotType","isOddLotType","isRetail",4,"ngIf"],[3,"isRetail",4,"ngIf"],["class","bond-name pointer",3,"ngClass","click",4,"ngIf"],[1,"bond-issuer",3,"ngClass"],[1,"bond-basic-detail
1s"],[1,"detail-container"],[1,"line-height-24px","font-weight-semibold","text-black","font-style-normal",3,"ngClass"],["class","detail-container",4,"ngIf"],[1,"font-weight-normal","text-color-content-secondary","font-style-normal","line-height-normal",3,"ngClass"],[3,"isFullLotType","isOddLotType","isRetail"],[3,"isRetail"],[1,"bond-name","pointer",3,"ngClass","click"],[3,"innerHTML"],[1,"font-weight-normal","text-color-content-secondary","font-style-normal","line-height-normal","t-sm"],[1,"font-weight-normal","text-color-content-secondary","font-style-normal","line-height-normal","t-xs"],[1,"bond-calculator-container",3,"ngClass"],["class","invest-strategy gap-12px",4,"ngIf"],["class","buy-button",3,"ngClass",4,"ngIf"],[1,"invest-strategy","gap-12px"],[1,"buy-button",3,"ngClass"],["class","bond-calculator-result",3,"ngClass",4,"ngIf","ngIfElse"],[1,"bond-calculator-result",3,"ngClass"],[1,"calculator-header","d-flex","w-100","flex-column","align-items-center",3,"ngClass"],[3,"defaultActiveItem","itemGroup"],[1,"calculator-search-box","pointer","d-flex","w-100",3,"click"],[1,"search-content"],["width","16","height","16",3,"src"],[1,"search-placeholder"],[1,"bond-calculator-tabs",3,"ngClass"],[1,"tab-button",3,"ngClass"],[4,"ngFor","ngForOf"],[3,"ngClass","value","displayText","activeValue","customBtnClass","disabled","activeValueChange","activeValueAfterChanged",4,"ngIf"],[3,"ngClass","value","displayText","activeValue","customBtnClass","disabled","activeValueChange","activeValueAfterChanged"],["class","bond-calculator-dates",4,"ngIf"],[1,"bond-calculator-dates"],[3,"ngClass",4,"ngIf"],["type","interface-icon/info-o","height","12","width","12","class","mr-8px vertical-align-text-bottom",3,"click",4,"ngIf"],["type","interface-icon/info-o","height","12","width","12","nz-tooltip","","class","mr-8px vertical-align-text-bottom",3,"nzTooltipTitle",4,"ngIf"],["type","interface-icon/info-o","height","12","width","12",1,"mr-8px","vertical-align-text-bottom",3,"click"],["type","interface-icon/info-o","height","12","width","12","nz-tooltip","",1,"mr-8px","vertical-align-text-bottom",3,"nzTooltipTitle"],[1,"font-weight-bold","font-style-normal","line-height-normal","text-black","t-2xl"],["nz-form","","class","inputs-container",3,"formGroup","ngClass",4,"ngIf"],["nz-form","",1,"inputs-container",3,"formGroup","ngClass"],["class","date-input",3,"ngClass",4,"ngIf"],["class","price-input",3,"ngClass",4,"ngIf"],[1,"d-flex","justify-content-between","nominal-input-factsheet",2,"flex-flow","row",3,"ngClass"],[1,"d-flex","flex-column","flex-1"],[1,"nominal-value-factsheet"],[1,"d-flex","align-items-center",2,"line-height","1"],[1,"t-sm","font-weight-bold","mr-1",2,"margin-bottom","1px"],["type","text","ui-input","","numberSeparator","","formControlName","nominalValue",1,"pr-3"],["nominalValue",""],[1,"d-flex","align-items-center"],["type","interface-icon/minus-long","width","16px","height","16px",1,"pointer",3,"click"],["type","interface-icon/plus-o","width","16px","height","16px",1,"pointer",3,"ngClass","click"],["class","text-danger mr-2 text-12px",4,"ngIf"],[1,"justify-content-between","price-input-factsheet",2,"flex-flow","row",3,"ngClass"],[1,"buyprice-value-factsheet"],["type","number","ui-input","","numberOnly","","formControlName","buyPrice",1,"no-spinner","pr-3",3,"min","input"],[1,"text-danger","mr-2","text-12px"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-warning","mr-2"],[1,"nominal-input",3,"ngClass"],[1,"text-14px","text-align-start"],[1,"input-div",3,"ngClass"],["type","text","ui-input","","numberSeparator","","formControlName","nominalValue",1,"no-spinner","pr-3",3,"step","min"],["nonFactsheetNominalValue",""],[1,"price-input",3,"ngClass"],[1,"input-div"],[3,"ngClass","nzPrefix"],["type","number","ui-input","","numberOnly","","formControlName","buyPrice",1,"no-spinner","pr-3",3,"min","ngClass","input"],[1,"date-input",3,"ngClass"],["formControlName","buySettlementDate",1,"w-100","date-picker",3,"nzFormat","nzDisabled","nzAllowClear","nzDisabledDate","ngClass"],["type","number","ui-input","","numberOnly","","formControlName","sellPrice",3,"ngClass"],["formControlName","sellSettlementDate",1,"w-100","date-picker",3,"nzFormat","nzDisabled","nzAllowClear","nzDisabledDate","ngClass"],["width","24","height","24","class","pointer","alt","watchlist",3,"src","click",4,"ngIf"],["class","d-flex flex-column gap-4px w-100",3,"padding-top","padding-bottom",4,"ngIf"],[1,"d-flex","flex-column","gap-4px","w-100"],[3,"info","infoClass","value","toolTips","isTooltipFilled","tooltipTrigger","valueClass","click",4,"ngIf"],[3,"info","infoClass","value","toolTips","isTooltipFilled","tooltipTrigger","valueClass","click"],[1,"text-black","t-xl","font-weight-bold","line-height-normal","pl-16px"],["class","estimated-returns-container",4,"ngIf"],[1,"estimated-returns-container"],[1,"profit-return-card"],[1,"estimated-return"],["nzTitle","Est. Total Return","nzTitleClass","t-xs","nzType","calculator","nzValueClass","font-family-jakarta",3,"isProfitLoss","nzValue","nzPrefix"],[1,"estimated-returns-detail","gap-12px",3,"ngClass"],[1,"card"],["nzTitle","Coupon Income","nzType","calculator","nzValueClass","t-lg","nzTitleClass","t-xs",1,"text-center",3,"isProfitLoss","nzValue","nzPrefix"],["type","interface-icon/plus-o",1,"dropdown-icon"],["nzTitle","Capital Gains","
1nzType","calculator","nzValueClass","t-lg","nzTitleClass","t-xs",1,"text-center",3,"isProfitLoss","nzValue","nzPrefix"],[1,"profit-return-card","card-2"],["nzTitle","Est. Yield to Maturity (Incl. Fee)","nzType","calculator","nzTitleClass","t-xs","nzValueClass","font-family-jakarta",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],["nzTitle","Est. Yield to Next Call (Incl. Fee)","nzType","calculator","nzTitleClass","t-xs","nzValueClass","font-family-jakarta",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],["nzTitle","Est. Yield to Sell (Incl. Fee)","nzType","calculator","nzTitleClass","t-xs","nzValueClass","font-family-jakarta",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],[1,"estimated-returns-detail","no-padding","gap-12px"],["nzTitle","Days Held","nzPrefix"," ","nzType","calculator","nzTitleClass","t-xs",3,"nzValue","nzDecimal"],["nzTitle","Est. Yield to Maturity (Incl. Fee)","nzType","calculator","nzTitleClass","t-xs","nzValueClass","font-family-jakarta",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],["nzTitle","Est. Yield to Next Call (Incl. Fee)","nzType","calculator","nzTitleClass","t-xs","nzValueClass","font-family-jakarta",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],["nzTitle","Est. Yield to Sell (Incl. Fee)","nzType","calculator","nzTitleClass","t-xs","nzValueClass","font-family-jakarta",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],[1,"estimated-returns-container","mobile"],[1,"profit-return-card","card-2","flex-1","align-items-stretch"],["nzTitle","Est. Total Return","nzTitleClass","t-xs","nzType","calculator","nzValueClass","t-2xl font-family-jakarta",3,"isProfitLoss","nzValue","nzPrefix"],["nzTitle","Coupon Income","nzType","calculator","nzValueClass","t-sm","nzTitleClass","t-xs",1,"text-center",3,"isProfitLoss","nzValue","nzPrefix"],["nzTitle","Capital Gains","nzType","calculator","nzValueClass","t-sm","nzTitleClass","t-xs",1,"text-center",3,"isProfitLoss","nzValue","nzPrefix"],[1,"profit-return-card","card-2","mobile"],["nzTitle","Est. Yield to Maturity (Incl. Fee)","nzType","calculator","nzValueClass","t-2xl font-family-jakarta","nzTitleClass","t-xs",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],["nzTitle","Est. Yield to Next Call (Incl. Fee)","nzType","calculator","nzValueClass","t-2xl font-family-jakarta","nzTitleClass","t-xs",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],["nzTitle","Est. Yield to Sell (Incl. Fee)","nzType","calculator","nzValueClass","t-2xl font-family-jakarta","nzTitleClass","t-xs",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],["class","estimated-returns-detail no-padding gap-12px",4,"ngIf"],["nzTitle","Est. Yield to Maturity (Incl. Fee)","nzType","calculator","nzValueClass","t-2xl font-family-jakarta","nzTitleClass","t-xs",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],["nzTitle","Est. Yield to Next Call (Incl. Fee)","nzType","calculator","nzValueClass","t-2xl font-family-jakarta","nzTitleClass","t-xs",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],["nzTitle","Est. Yield to Sell (Incl. Fee)","nzType","calculator","nzValueClass","t-2xl font-family-jakarta","nzTitleClass","t-xs",3,"isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],["nzTitle","Days Held","nzPrefix"," ","nzType","calculator","nzValueClass","t-2xl","nzTitleClass","t-xs",3,"nzValue","nzDecimal"],[1,"d-flex","flex-column","align-items-stretch","gap-12px","w-100"],[1,"border-top","border-bottom","pt-20px","pb-20px"],["nzType","vertical","nzValueClass","t-md font-weight-bold","nzTitleClass","t-sm text-content-tertiary",3,"nzTitle","isProfitLoss","nzValue","nzSuffix","nzDecimal","isTooltipFilled","nzTooltip","nzTooltipTitle"],[1,"pt-8px","pb-20px","d-flex","flex-column","gap-12px","border-bottom"],[1,"d-flex","flex-column","gap-2px"],["itemWrapperClass","d-flex align-items-center",1,"w-100",3,"info","infoClass","value","isTooltipFilled","toolTips","valueClass"],["
1itemWrapperClass","d-flex align-items-center",1,"w-100",3,"info","infoClass","value","valueClass"],["nzTitle","Capital Gain","nzTitleClass","t-xs text-content-tertiary mb-0","nzType","vertical","nzValueClass","t-xs font-weight-normal",3,"isProfitLoss","nzValue","nzPrefix"],[1,"pb-12px"],["nzTitle","Est. Total Return","nzTitleClass","t-sm text-content-tertiary mb-0","nzType","vertical","nzValueClass","t-md font-weight-bold",3,"isProfitLoss","nzValue","nzPrefix"],[1,"estimated-returns-container","mobile","p-0"],["nzType","calculator","nzValueClass","t-2xl font-family-jakarta","nzTitleClass","t-xs",3,"nzTitle","tooltipTrigger","isProfitLoss","nzValue","nzSuffix","nzDecimal","isTooltipFilled","nzTooltip","nzTooltipTitle","click"],["class","estimated-returns-container mobile orderpad pb-0",4,"ngIf"],[1,"estimated-returns-container","mobile","orderpad","pb-0"],[1,"text-black","t-sm","pb-4px","font-weight-bold","line-height-normal"],[1,"profit-return-card","orderpad","pl-12px"],["nzTitle","Est. Total Return (Coupon + Capital Gains)","nzTitleClass","t-sm","nzType","calculator","nzValueClass","t-md font-family-jakarta",3,"isProfitLoss","nzValue","nzPrefix"],["nzType","calculator","nzValueClass","t-md font-family-jakarta","nzTitleClass","t-sm",3,"nzTitle","isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],["nzType","calculator","nzValueClass","t-md font-family-jakarta","nzTitleClass","t-sm",3,"nzTitle","isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],["class","estimated-returns-container mobile-orderpad",4,"ngIf"],[1,"estimated-returns-container","mobile-orderpad"],[1,"profit-return-card","card-2","orderpad"],["nzTitle","Est. Total Return (Coupon + Capital Gains)","nzTitleClass","t-sm","nzType","calculator","nzValueClass","t-3xl font-family-jakarta font-weight-600",3,"isProfitLoss","nzValue","nzPrefix"],["nzType","calculator","nzValueClass","t-3xl font-family-jakarta font-weight-600","nzTitleClass","t-sm",3,"nzTitle","isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled",4,"ngIf"],["nzType","calculator","nzValueClass","t-3xl font-family-jakarta font-weight-600","nzTitleClass","t-sm",3,"nzTitle","isProfitLoss","nzValue","nzSuffix","nzDecimal","nzTooltip","nzTooltipTitle","isTooltipFilled"],[1,"estimated-returns-in-details",3,"ngClass"],[1,"what-you-pay","w-100"],[1,"content"],[1,"title","text-black","font-style-normal",3,"ngClass"],["nz-row","",1,"w-full"],["nz-col","","nzSpan","24",1,"d-flex","flex-column",3,"ngClass"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass","toolTips","isTooltipFilled"],["itemWrapperClass","d-flex align-items-center",1,"border-top","pt-8px",3,"info","infoClass","value","valueClass"],[1,"what-you-get","w-100"],["class","title text-black font-style-normal",3,"ngClass",4,"ngIf"],["class","d-flex w-100",4,"ngIf"],[1,"content","factsheet"],[1,"what-you-get","w-100","pb-12px"],[1,"d-flex","w-100"],["nzType","outlined-grey-border","nzSize","large",1,"w-100",3,"nzRound","nzBlock","click"],["class","what-you-pay w-100",4,"ngIf"],["class","what-you-get w-100",4,"ngIf"],[1,"content","orderpad","mobile"],["nz-row","",1,"w-full","pl-12px"],["nz-col","","nzSpan","24",1,"d-flex","flex-column","gap-4px"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass",4,"ngIf"],["defaultEstimatedPayableAmount",""],[1,"content","orderpad"],[1,"no-estimated-returns","d-flex","flex-column","align-item-center","w-100","border","pb-5","pt-5"],[1,"pb-2","text-20px","font-style-normal","font-weight-bold","line-height-normal","text-black"],[1,"text-14px","font-style-normal","font-weight-normal","line-height-normal","text-color-content-secondary"],[1,"cashflow","w-100"],["cashflowDateTpl",""],["couponContentTpl",""],[3,"dateTemplate","contentTemplate","showDash","notFirst"],["class","year t-xs",4,"ngIf"],[1,"year","t-xs"],["class","content",4,"ngIf"],[1,"title",3,"ngClass"],[1,"box"],["itemWrapperClass","d-flex align-items-center",3,"info","value","infoClass","valueClass"],["
1itemWrapperClass","d-flex align-items-center",3,"info","value","infoClass","valueClass",4,"ngIf"],[1,"bond-calculator-disclaimer","font-style-normal","text-12px","line-height-normal",3,"ngStyle"],[1,"disclaimer","font-weight-bold"],["class","disclaimer-text font-weight-normal",4,"ngIf"],[1,"disclaimer-text","font-weight-normal"],[3,"ngClass","nzLoading","nzParagraph"],[1,"bond-calculator-empty-state","align-item-center",3,"emptyResultImgPath","emptyResultTitle","emptyResultContent"],[1,"modal-overlay",3,"click"],[1,"bg-white","bond-footer-mobile",3,"click"],[1,"swipe-area"],[1,"swipe-line"],[1,"px-3"],[1,"mt-3","mb-3","font-weight-bold"]],template:function(e,t){1&e&&(o.od(0,xe,11,18,"ng-container",0),o.od(1,Re,10,18,"ng-container",0),o.od(2,Ve,6,5,"ng-container",0),o.od(3,Ne,1,5,"shared-global-search-revamp",1),o.Ec(4,"async"),o.od(5,He,4,7,"nz-modal",2),o.Ec(6,"async"),o.od(7,lt,4,10,"nz-modal",3),o.Ec(8,"async"),o.Ec(9,"async"),o.od(10,ut,6,9,"nz-modal",4),o.Ec(11,"async"),o.od(12,Et,34,42,"ng-template",null,5,o.pd),o.od(14,Nt,8,14,"ng-template",null,6,o.pd),o.od(16,ln,1,2,"ng-template",null,7,o.pd),o.od(18,an,8,6,"ng-template",null,8,o.pd),o.od(20,rn,7,7,"ng-template",null,9,o.pd),o.od(22,fn,1,1,"ng-template",null,10,o.pd),o.od(24,vn,6,6,"ng-template",null,11,o.pd),o.od(26,yn,6,6,"ng-template",null,12,o.pd),o.od(28,Tn,2,3,"ng-template",null,13,o.pd),o.od(30,Vn,1,1,"ng-template",null,14,o.pd),o.od(32,Hn,4,6,"ng-template",null,15,o.pd),o.od(34,Wn,1,1,"ng-template",null,16,o.pd),o.od(36,Xn,1,1,"ng-template",null,17,o.pd),o.od(38,uo,12,18,"ng-template",null,18,o.pd),o.od(40,go,4,4,"ng-template",null,19,o.pd),o.od(42,Mo,17,16,"ng-template",null,20,o.pd),o.od(44,To,13,36,"ng-template",null,21,o.pd),o.od(46,Oo,6,6,"ng-template",null,22,o.pd),o.od(48,Bo,6,6,"ng-template",null,23,o.pd),o.od(50,wo,6,10,"ng-template",null,24,o.pd),o.od(52,Fo,6,10,"ng-template",null,25,o.pd),o.od(54,qo,6,6,"ng-template",null,26,o.pd),o.od(56,Io,14,19,"ng-template",null,27,o.pd),o.od(58,Uo,1,1,"ng-template",null,28,o.pd),o.od(60,Ho,1,1,"ng-template",null,29,o.pd),o.od(62,Zo,13,27,"ng-template",null,30,o.pd),o.od(64,oi,18,49,"ng-template",null,31,o.pd),o.od(66,si,4,6,"ng-template",null,32,o.pd),o.od(68,vi,3,3,"ng-template",null,33,o.pd),o.od(70,yi,5,0,"ng-template",null,34,o.pd),o.od(72,Fi,4,4,"ng-template",null,35,o.pd),o.od(74,Ri,6,7,"ng-template",null,36,o.pd),o.od(76,Ui,2,7,"ng-template",null,37,o.pd),o.od(78,Li,1,3,"ng-template",null,38,o.pd),o.rc(80,"bond-watchlist-icon",39),o.zc("onWatchlistClose",(function(){return t.onCloseAddToWatchlist()})),o.qc(),o.rc(81,"ui-modal-pc-drawer-mobile",40),o.zc("nzOnCancel",(function(){return t.onCloseTooltip()})),o.Ec(82,"async"),o.od(83,Vi,1,0,"ng-container",41),o.qc(),o.od(84,Ni,2,0,"ng-template",null,42,o.pd),o.od(86,Yi,2,0,"ng-template",null,43,o.pd),o.od(88,ji,2,0,"ng-template",null,44,o.pd),o.od(90,Hi,12,0,"ng-template",null,45,o.pd)),2&e&&(o.Mc("ngIf",!t.isFactsheet&&!t.isOrderpad),o.Ub(1),o.Mc("ngIf",t.isFactsheet),o.Ub(1),o.Mc("ngIf",t.isOrderpad),o.Ub(1),o.Mc("ngIf",t.isSearchModalVisible&&!o.Fc(4,16,t.isMobile)),o.Ub(2),o.Mc("ngIf",t.isSearchModalVisible&&o.Fc(6,18,t.isMobile)),o.Ub(2),o.Mc("ngIf",t.showResult&&(t.isFactsheet||t.isOrderpad?o.Fc(8,20,t.isMobile):o.Fc(9,22,t.isMobile)&&!t.showBondDetails)),o.Ub(3),o.Mc("ngIf",t.isExpandCashFlow&&!o.Fc(11,24,t.isMobile)),o.Ub(70),o.Mc("bondToAddWatchlist",t.bondToAddWatchlist)("watchlistLoading",t.watchlistLoading)("allWatchlist",t.watchlist)("showAddBondModal",t.isAddBondModalVisible),o.Ub(1),o.Mc("nzVisible",o.Fc(82,26,t.isMobile)&&t.showTooltipDrawer)("nzClosable",!1)("nzMaskClosable",!0)("isMobileFullScreen",!1),o.Ub(2),o.Mc("ngTemplateOutlet",t.tooltipDesc))},directives:[c.t,A.a,F.a,c.A,c.q,q.a,I.a,_.a,R.a,k.a,U.a,L.a,V.a,N.a,Y.a,j.a,H.a,c.s,G.a,W.a,Q.e,l.J,l.u,$.b,l.l,K.c,l.c,K.b,X.a,l.t,l.j,l.z,J.a,Z.b,ee.a,te.a,ne.a,U.c,oe.a,c.w,ie.a,le.a],pipes:[c.b,c.f,ae.a,c.g,c.d,ce.a,se.a],styles:['@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans");.calculator[_ngcontent-%COMP%]{max-width:1200px;margin-left:auto;margin-right:auto}.calculator.mobile[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:24px}.calculator.factsheet[_ngcontent-%COMP%]{width:100%;border-radius:8px;border:1px solid #e0e0e0;background:#fff;padding:24px}.calculator.factsheet-mobile[_ngcontent-%COMP%]{width:100%;padding-left:0;padding-right:0;padding-bottom:24px}
1.calculator[_ngcontent-%COMP%] .calculator-header[_ngcontent-%COMP%]{max-width:1200px;gap:0}.calculator[_ngcontent-%COMP%] .calculator-header[_ngcontent-%COMP%] .calculator-search-box[_ngcontent-%COMP%]{max-width:1100px;height:48px;padding:0 24px;align-items:center;gap:8px;border-radius:360px;border:1px solid #e0e0e0;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.15)}.calculator[_ngcontent-%COMP%] .calculator-header[_ngcontent-%COMP%] .calculator-search-box[_ngcontent-%COMP%] .search-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex:1 0 0}.calculator[_ngcontent-%COMP%] .calculator-header[_ngcontent-%COMP%] .calculator-search-box[_ngcontent-%COMP%] .search-content[_ngcontent-%COMP%] .search-placeholder[_ngcontent-%COMP%]{color:#616161;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.calculator[_ngcontent-%COMP%] .bond-calculator-empty-state[_ngcontent-%COMP%]{width:100%;margin-top:auto;margin-bottom:auto;height:55vh;display:flex}.calculator[_ngcontent-%COMP%] .bond-calculator-footer[_ngcontent-%COMP%]{position:sticky;bottom:0;display:flex;z-index:10001;background:#fff}.text-color-content-secondary[_ngcontent-%COMP%]{color:var(--color-content-secondary)}.font-style-normal[_ngcontent-%COMP%]{font-style:normal}.line-height-normal[_ngcontent-%COMP%]{line-height:normal}.line-height-16px[_ngcontent-%COMP%]{line-height:16px}.line-height-20px[_ngcontent-%COMP%]{line-height:20px}.line-height-24px[_ngcontent-%COMP%]{line-height:24px}.w-full[_ngcontent-%COMP%]{width:100%}.gap-12px[_ngcontent-%COMP%]{gap:12px}.gap-12px-imp[_ngcontent-%COMP%]{gap:12px!important}.gap-8px[_ngcontent-%COMP%]{gap:8px}.vertical-align-text-bottom[_ngcontent-%COMP%]{vertical-align:text-bottom}.flex-none[_ngcontent-%COMP%]{flex:none}.background-white[_ngcontent-%COMP%]{background-color:#fff}.bond-calculator-content[_ngcontent-%COMP%]{max-width:1100px;width:100%;display:inline-flex;align-items:flex-start;gap:24px}.bond-calculator-content.flex-column[_ngcontent-%COMP%]{flex-direction:column}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%]{display:flex;padding:16px 24px;flex-direction:column;align-items:flex-start;gap:24px;max-width:324px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container.mobile[_ngcontent-%COMP%]{max-width:none;width:100%;padding-top:0;padding-left:16px;padding-right:16px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container.factsheet[_ngcontent-%COMP%]{padding:0;width:100%;max-width:none;gap:12px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container.orderpad[_ngcontent-%COMP%]{padding:0;width:100%;max-width:none}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .invest-strategy[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .invest-strategy[_ngcontent-%COMP%] .bond-calculator-tabs[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;align-self:stretch}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .invest-strategy[_ngcontent-%COMP%] .bond-calculator-tabs.mobile[_ngcontent-%COMP%]{margin-top:12px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .invest-strategy[_ngcontent-%COMP%] .bond-calculator-tabs[_ngcontent-%COMP%] .tab-button[_ngcontent-%COMP%]{display:flex;align-items:flex-start;align-content:flex-start;gap:8px;align-self:stretch;flex-wrap:wrap}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .invest-strategy[_ngcontent-%COMP%] .bond-calculator-tabs[_ngcontent-%COMP%] .tab-button.mobile[_ngcontent-%COMP%]{flex-wrap:nowrap;overflow-x:auto}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .invest-strategy[_ngcontent-%COMP%] .bond-calculator-dates[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container.mobile[_ngcontent-%COMP%]{width:100%}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container.factsheet[_ngcontent-%COMP%]{gap:12px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input-factsheet[_ngcontent-%COMP%]{display:flex;height:45px;padding:8px 12px;flex-direction:column;justify-content:center;align-items:flex-start;gap:0;align-self:stretch;border-radius:8px;background:#f5f5f5}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input-factsheet.mobile[_ngcontent-%COMP%]{width:100%}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input-factsheet[_ngcontent-%COMP%] .ant-input[_ngcontent-%COMP%]{flex:1 0 0;color:var(--color-content-primary,#282828)!important;font-family:var(--font-family-inter,Inter);font-size:14px;font-style:normal;font-weight:600;line-height:normal;height:auto;background-color:transparent;border:none;text-align:left;padding:0}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input-factsheet[_ngcontent-%COMP%] .ant-input-group[_ngcontent-%COMP%] .ant-input-cover[_ngcontent-%COMP%] .ant-label-placeholder[_ngcontent-%COMP%]{top:12px;font-size:14px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-value-factsheet[_ngcontent-%COMP%]{color:#757575;font-family:var(--font-family-inter,Inter);font-size:12px;font-style:normal;font-weight:400;line-height:normal}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input-factsheet[_ngcontent-%COMP%]{display:flex;height:45px;padding:8px 12px;flex-direction:column;justify-content:center;align-items:flex-start;gap:0;align-self:stretch;border-radius:8px;background:#f5f5f5}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input-factsheet.mobile[_ngcontent-%COMP%]{width:100%}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input-factsheet[_ngcontent-%COMP%] .ant-input[_ngcontent-%COMP%]{flex:1 0 0;color:var(--color-content-primary,#282828)!important;font-family:var(--font-family-inter,Inter);font-size:14px;font-style:normal;font-weight:600;line-height:normal;height:auto;background-color:transparent;border:none;text-align:left;padding:0}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input-factsheet[_ngcontent-%COMP%] .ant-input-group[_ngcontent-%COMP%] .ant-input-cover[_ngcontent-%COMP%] .ant-label-placeholder[_ngcontent-%COMP%]{top:12px;font-size:14px;padding-left:40px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .buyprice-value-factsheet[_ngcontent-%COMP%]{color:#757575;font-family:var(--font-family-inter,Inter);font-size:12px;font-style:normal;font-weight:400;line-height:normal}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input[_ngcontent-%COMP%]{display:flex;width:300px;flex-direction:column;align-items:flex-start;gap:4px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input.mobile[_ngcontent-%COMP%]{width:100%}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input[_ngcontent-%COMP%] .input-div[_ngcontent-%COMP%]{display:flex;height:45px;padding:12px;align-items:center;justify-content:space-between;gap:0;align-self:stretch;border-radius:8px;background:#f5f5f5;border:none}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input[_ngcontent-%COMP%] .ant-input[_ngcontent-%COMP%]{flex:1;text-align:left;background:transparent;border:none;padding:0}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .nominal-input[_ngcontent-%COMP%] .ant-input-group[_ngcontent-%COMP%] .ant-input-cover[_ngcontent-%COMP%] .ant-label-placeholder[_ngcontent-%COMP%]{top:12px;font-size:14px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input[_ngcontent-%COMP%]{display:flex;width:300px;flex-direction:column;align-items:flex-start;gap:4px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input.mobile[_ngcontent-%COMP%]{width:100%}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input[_ngcontent-%COMP%] .input-div[_ngcontent-%COMP%]{display:flex;height:45px;padding:12px 12px 12px 0;align-items:center;justify-content:space-between;gap:0;align-self:stretch;border-radius:8px;background:#f5f5f5;border:none}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input[_ngcontent-%COMP%] .ant-input[_ngcontent-%COMP%]{flex:1;text-align:left;background:transparent;border:none;padding:0 0 0 48px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input[_ngcontent-%COMP%] .ant-input-prefix[_ngcontent-%COMP%]{font-size:14px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .price-input[_ngcontent-%COMP%] .ant-input-group[_ngcontent-%COMP%] .ant-input-cover[_ngcontent-%COMP%] .ant-label-placeholder[_ngcontent-%COMP%]{top:12px;font-size:14px;padding-left:40px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .date-input[_ngcontent-%COMP%]{display:flex;width:300px;flex-direction:column;align-items:flex-start;gap:4px}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .date-input.mobile[_ngcontent-%COMP%]{width:100%}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .inputs-container[_ngcontent-%COMP%] .date-input[_ngcontent-%COMP%] .date-picker[_ngcontent-%COMP%] nz-picker .ant-calendar-picker .ant-calendar-picker-input{display:flex;height:45px;padding:12px;align-items:center;gap:0;align-self:stretch;border-radius:8px;background:#f5f5f5;border:none}.bond-calculator-content[_ngcontent-%COMP%] .bond-calculator-container[_ngcontent-%COMP%] .text-align-start[_ngcontent-%COMP%]{text-align:start}.bond-details-header[_ngcontent-%COMP%]{display:flex;max-width:1000px;width:100%;padding:16px;flex-direction:column;justify-content:center;align-items:flex-start;gap:16px;border-radius:8px;background:linear-gradient(90deg,#f5f5f5,#fff)}.bond-details-header[_ngcontent-%COMP%] .header-wrapper[_ngcontent-%COMP%]{gap:4px}.bond-details-header[_ngcontent-%COMP%] .header-wrapper[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{display:flex}.bond-details-header[_ngcontent-%COMP%] .header-wrapper[_ngcontent-%COMP%] .title-container.mobile[_ngcontent-%COMP%]{display:block}.bond-details-header[_ngcontent-%COMP%] .header-wrapper[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%] .bond-name[_ng
1content-%COMP%]{color:#000;font-size:24px;font-style:normal;font-weight:600;line-height:normal}.bond-details-header[_ngcontent-%COMP%] .header-wrapper[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%] .bond-name.mobile[_ngcontent-%COMP%]{font-size:13px;font-weight:500}.bond-details-header[_ngcontent-%COMP%] .bond-issuer[_ngcontent-%COMP%]{text-align:start;font-size:14px}.bond-details-header[_ngcontent-%COMP%] .bond-issuer.mobile[_ngcontent-%COMP%]{color:var(--color-content-secondary);font-size:12px;font-style:normal;font-weight:400;line-height:normal}.bond-details-header[_ngcontent-%COMP%] .bond-basic-details[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:0;align-self:stretch}.bond-details-header[_ngcontent-%COMP%] .bond-basic-details[_ngcontent-%COMP%] .detail-container[_ngcontent-%COMP%]{display:flex;height:44px;flex-direction:column;justify-content:center;align-items:flex-start;gap:0;flex:1 0 0}.bond-calculator-result[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.bond-calculator-result.orderpad[_ngcontent-%COMP%]{gap:24px}.bond-calculator-result.mobile-orderpad[_ngcontent-%COMP%]{gap:16px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%]{display:flex;padding:0 24px 0 16px;align-items:center;gap:16px;align-self:stretch}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container.mobile[_ngcontent-%COMP%]{border:none;padding:0 0 24px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container.mobile-orderpad[_ngcontent-%COMP%]{border:none;padding:0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container.orderpad[_ngcontent-%COMP%]{gap:0;flex-direction:column;align-items:flex-start}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card.factsheet[_ngcontent-%COMP%]{width:100%;flex-direction:row;gap:24px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card.orderpad[_ngcontent-%COMP%]{width:100%;gap:12px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card.card-2[_ngcontent-%COMP%]{gap:16px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card.mobile[_ngcontent-%COMP%]{flex-direction:row;align-items:center;align-self:stretch;flex:1 0 0;padding-bottom:24px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card.flex-1[_ngcontent-%COMP%]{flex:1 0 0;align-items:flex-start}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-return[_ngcontent-%COMP%]{display:flex;max-width:400px;flex-direction:column;justify-content:center;align-items:flex-start;gap:0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-return.factsheet[_ngcontent-%COMP%]{flex:1 0 0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-returns-detail[_ngcontent-%COMP%]{border-radius:8px;display:flex;padding:8px 16px;justify-content:center;align-items:center}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-returns-detail.factsheet[_ngcontent-%COMP%]{width:100%}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-returns-detail.no-padding[_ngcontent-%COMP%]{padding:0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-returns-detail.green-bg[_ngcontent-%COMP%]{background:linear-gradient(90deg,#e5ffee,#fff)}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-returns-detail.grey-bg[_ngcontent-%COMP%]{background:linear-gradient(90deg,#f5f5f5,#fff)}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-container[_ngcontent-%COMP%] .profit-return-card[_ngcontent-%COMP%] .estimated-returns-detail[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-detail
1s[_ngcontent-%COMP%]{display:flex;padding:0 16px;align-items:flex-start;gap:48px;align-self:stretch}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details.factsheet[_ngcontent-%COMP%], .bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details.mobile[_ngcontent-%COMP%]{flex-direction:column;padding:0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details.orderpad[_ngcontent-%COMP%]{flex-direction:column;padding:0;gap:24px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details.mobile-orderpad[_ngcontent-%COMP%]{flex-direction:column;padding:0;gap:16px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px;flex:1 0 0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;align-self:stretch}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .content.orderpad[_ngcontent-%COMP%]{gap:8px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .content.mobile[_ngcontent-%COMP%]{padding-bottom:24px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .content.factsheet[_ngcontent-%COMP%]{gap:12px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;align-self:stretch}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:4px;align-self:stretch}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%]{display:flex;padding:0;justify-content:space-between;align-items:flex-start;align-self:stretch}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-pay[_ngcontent-%COMP%] .banner[_ngcontent-%COMP%]{height:260px;align-self:stretch;border-radius:var(--Radius-radius-16,16px);background:url(/src/app/src/assets/images/transaction/transaction-buy-solid.png) #d3d3d3 -153.938px -14.507px/231.779% 136.154% no-repeat}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-get[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;flex:1 0 0}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-get.factsheet[_ngcontent-%COMP%]{gap:12px}.bond-calculator-result[_ngcontent-%COMP%] .estimated-returns-in-details[_ngcontent-%COMP%] .what-you-get[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;align-self:stretch}.cashflow[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;padding-bottom:24px;flex-direction:column;align-items:flex-start;gap:8px;flex:1 0 0;align-self:stretch}.cashflow[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#000;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.cashflow[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{display:flex;padding:8px;flex-direction:column;justify-content:center;gap:4px;align-self:stretch;border-radius:8px;background:linear-gradient(90deg,#e5ffee,#fff)}.cashflow[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;padding:0;align-items:center;gap:4px;align-self:stretch}.buy-button[_ngcontent-%COMP%]{display:flex;width:300px;align-items:center;gap:8px}.buy-button.mobile[_ngcontent-%COMP%]{position:sticky;bottom:0;display:flex;z-index:2;background:#fff}.no-estimated-returns[_ngcontent-%COMP%]{border-radius:8px}.has-error[_ngcontent-%COMP%]{border:1px solid #f60!important;border-radius:8px!important}.box-return[_ngcontent-%COMP%]{padding:8px;justify-content:space-between;border-radius:8px;background:linear-gradient(90deg,#e5ffee,#fff)}.box-return[_ngcontent-%COMP%], .box-return[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{display:flex;gap:4px;align-items:center;align-self:stretch}.box-return[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{padding:0}.bottom-sheet-affix[_ngcontent-%COMP%]{width:100%!important;background:#fff;z-index:1050;position:fixed;bottom:0;left:0}.modal-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:flex-end;z-index:1000}.bond-footer-mobile[_ngcontent-%COMP%]{border-radius:16px 16px 0 0;box-shadow:0 -8px 16px rgba(0,0,0,.24);padding:8px 16px 16px}.bond-footer-mobile[_ngcontent-%COMP%] .swipe-area[_ngcontent-%COMP%] .swipe-line[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center}.bond-footer-mobile[_ngcontent-%COMP%] .swipe-area[_ngcontent-%COMP%] .swipe-line[_ngcontent-%COMP%]:after{content:"";border:2px solid #d3d3d3;width:48px;border-radius:9999px} .custom-modal-width{max-width:100%!important;top:0;bottom:0;padding:0} .custom-modal-width .ant-modal-content{border-radius:0;height:100%}.calculator-result-header[_ngcontent-%COMP%]{display:flex;align-items:center;position:sticky;top:0;z-index:1000;background-color:#fff;padding:16px 0}.font-jakarta[_ngcontent-%COMP%]{font-family:var(--Font-Family-Display-Title,"Plus Jakarta Sans")}.font-weight-600[_ngcontent-%COMP%]{font-weight:600}.no-spinner[_ngcontent-%COMP%]::-webkit-inner-spin-button, .no-spinner[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.no-spinner[_ngcontent-%COMP%]{-moz-appearance:textfield;appearance:textfield}.pb-12px[_ngcontent-%COMP%]{padding-bottom:12px}.tooltip-title-color[_ngcontent-%COMP%]{color:#282828}.tooltip-content-color[_ngcontent-%COMP%]{color:#484848}']}),e})()},gJKs:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n("xeZY"),i=n("fXoL"),l=n("tk/3"),a=n("31Y2");let c=(()=>{class e{constructor(e,t){this.http=e,this.paramService=t,this.BASE_URL=o.a.ACCOUNT+o.a.PROTECTED+o.a.FEP_LIMIT}getFepAccount(e){return this.http.post(this.BASE_URL+o.a.READ,e)}updateFepAccount(e,t){const n=this.paramService.buildHttpParams(t);return this.http.post(this.BASE_URL+o.a.UPDATE,e,{params:n})}getFepBalance(e){return this.http.post(this.BASE_URL+o.a.BALANCE+o.a.READ,e)}}return e.\u0275fac=function(t){return new(t||e)(i.vc(l.c),i.vc(a.a))},e.\u0275prov=i.hc({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},hRIC:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n("fXoL");let i=(()=>{class e{PVIF(e,t){return Math.pow(1+e,t)}FVIFA(e,t){return 0==e?t:(this.PVIF(e,t)-1)/e}PMT(e,t,n,o,i){if(o||(o=0),i||(i=0),0==e)return-(n+o)/t;const l=Math.pow(1+e,t);let a=e/(l-1)*-(n*l+o);return 1==i&&(a/=1+e),a}IPMT(e,t,n,o){const i=Math.pow(1+n,o);return 0-(e*i*n+t*(i-1))}PPMT(e,t,n,o,i,l){if(t<1||t>=n+1)return null;const a=this.PMT(e,n,o,i,l);return a-this.IPMT(o,a,e,t-1)}XNPV(e,t){let n=0,o=new Date(t[0].Date);for(let i=0;i<t.length;i++){let l=t[i].Flow,a=new Date(t[i].Date);n+=l/Math.pow(1+e,this.daysBetween(o,a)/365)}return n}XIRR(e,t){t||(t=.1);let n=0,o=t,i=this.XNPV(n,e),l=this.XNPV(o,e);for(let s=0;s<1024&&!(i*l<0);s++)Math.abs(i)<Math.abs(l)?i=this.XNPV(n+=1.6*(n-o),e):l=this.XNPV(o+=1.6*(o-n),e);if(i*l>0)return null;if(this.XNPV(n,e)<0)var a=n,c=o-n;else a=o,c=n-o;for(let s=0;s<1024;s++){let t=a+(c*=.5),n=this.XNPV(t,e);if(n<=0&&(a=t),Math.abs(n)<1e-6||Math.abs(c)<1e-6)return t}return null}daysBetween(e,t){return Math.abs(e.getTime()-t.getTime())/864e5+1}isMoreThanOneYear(e,t){const n=new Date(e),o=new Date(t);return!(Math.floor(this.daysBetween(n,o))<365)}calculateProcessingFee(e,t,n,o){let i=t,l=n;isNaN(o)||(i=Number(t+t*o),l=Number(n+n*o));const a=Number(e*i);return a<l?l:a}calculateYieldToMaturity(e,t,n,o,i,l,a,c,s,r){const d=100*(o-s)/i,u=12/i;let p=[];const h=new Date(n),b=new Date(t),m=Math.floor(this.daysBetween(b,h));if(m<365){let t=0;for(h.setMonth(h.getMonth()-u);h.getTime()>b.getTime();)t+=d,h.setMonth(h.getMonth()-u);return Math.pow((e+d+t-a)/(l+c/r*100),365/m)-1}{let t=0;for(p[t]={},p[t].Date=new Date(h),p[t].Flow=e+d,h.setMonth(h.getMonth()-u);h.getTime()>b.getTime();)t++,p[t]={},p[t].Date=new Date(h),p[t].Flow=d,h.setMonth(h.getMonth()-u);const n=l+a+c/r*100;return t++,p[t]={},p[t].Date=new Date(b),p[t].Flow=-n,this.XIRR(p.reverse(),.1)}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.hc({token:e,factory:e.\u0275fac}),e})()},j2hF:function(e,t,n){"use strict";n.d(t,"a",(function(){return Q}));
1var o=n("mrSG"),i=n("fXoL"),l=n("3Pt+"),a=n("P+IN"),c=n("AcyG"),s=n("H8v0"),r=n("6h7t"),d=n("/gji"),u=n("vkgz"),p=n("bOdf"),h=n("eIep"),b=n("2VHv"),m=n("nY4S"),g=n("Acs3"),f=n("gFZo"),v=n("8M/t"),y=n("XRmg"),C=n("gJKs"),M=n("tyNb"),T=n("bNXi"),O=n("dEAy"),B=n("rOij"),S=n("xIeq"),x=n("J9tp"),P=n("ofXK"),E=n("FwiY"),w=n("uL2V"),D=n("ocnv"),z=n("B+r4"),A=n("nJia"),F=n("bE2y"),q=n("OzZK"),I=n("u52B");function _(e,t){1&e&&(i.rc(0,"h3"),i.mc(1,"i",8),i.qd(2,"Currency Conversion Limit Notice"),i.qc())}function R(e,t){if(1&e&&(i.rc(0,"label",26),i.qd(1),i.qc()),2&e){const e=t.$implicit;i.Mc("nzValue",e.value),i.Ub(1),i.rd(e.label)}}function k(e,t){if(1&e&&(i.rc(0,"label",26),i.qd(1),i.qc()),2&e){const e=t.$implicit;i.Mc("nzValue",e.value),i.Ub(1),i.rd(e.label)}}function U(e,t){1&e&&(i.rc(0,"div",23),i.rc(1,"p"),i.qd(2,"To proceed with your transaction, you may:"),i.qc(),i.rc(3,"p"),i.rc(4,"b"),i.qd(5,"Edit Orderpad:"),i.qc(),i.qd(6," Lower your investment amount to stay within the limit. "),i.qc(),i.mc(7,"p"),i.rc(8,"p"),i.rc(9,"b"),i.qd(10,"Contact Us:"),i.qc(),i.qd(11," If you've obtained special approval from Bank Negara Malaysia to uplift the limit, please email a copy of the approval letter to "),i.rc(12,"a",27),i.qd(13,"[email protected]"),i.qc(),i.qc(),i.mc(14,"p"),i.qc())}function L(e,t){1&e&&(i.rc(0,"div",23),i.rc(1,"p",28),i.qd(2,"I declare that I am fully aware of the exchange control regulations imposed by BNM and agree that it is my responsibility to ensure that investments at all times shall be maintained within the prescribed limit imposed by Bank Negara Malaysia (\u201cBNM\u201d) from time to time."),i.qc(),i.rc(3,"p",28),i.qd(4,"I further agree that iFAST/FSMOne may suspend my/our account from trading in securities quoted in foreign currency or any currency conversion without any notice given to me should the accumulated conversion amount for a calendar year exceeds the prescribed limit imposed by BNM and I shall hold iFAST/FSMOne harmless against any losses incurred by iFAST/FSMOne arising from the suspension. "),i.qc(),i.mc(5,"p",28),i.rc(6,"p"),i.qd(7,"Should my circumstances change and any of the information contained in this declaration becomes incorrect, I undertake to notify iFAST/FSMOne of the changes immediately. "),i.qc(),i.mc(8,"p"),i.qc())}function V(e,t){if(1&e){const e=i.sc();i.rc(0,"div",23),i.rc(1,"p",28),i.qd(2,"You've declared yourself as a non-resident in Malaysia. This means that you are not subjected to the "),i.rc(3,"a",22),i.zc("click",(function(){return i.dd(e),i.Dc(2).toggleDRBModal(!0)})),i.qd(4,"Foreign Exchange Policy"),i.qc(),i.qd(5,". Your annual conversion limit will be uplifted instantly once you proceed. "),i.qc(),i.qc()}}function N(e,t){if(1&e){const e=i.sc();i.rc(0,"div",9),i.mc(1,"app-fep-balance",10),i.qc(),i.rc(2,"div",11),i.rc(3,"form",12),i.rc(4,"nz-row"),i.rc(5,"nz-form-item"),i.rc(6,"nz-form-control"),i.rc(7,"nz-col",13),i.rc(8,"p",14),i.qd(9,"Are you a resident of Malaysia? "),i.rc(10,"i",15),i.zc("click",(function(){return i.dd(e),i.Dc().toggleResidencyModal(!0)})),i.qc(),i.qc(),i.qc(),i.rc(11,"nz-col",16),i.rc(12,"nz-radio-group",17),i.od(13,R,2,2,"label",18),i.qc(),i.qc(),i.qc(),i.rc(14,"div",19),i.mc(15,"em",20),i.rc(16,"h5",21),i.qd(17," If you wish to update your resident status, please "),i.rc(18,"a",22),i.zc("click",(function(){return i.dd(e),i.Dc().navigateToContactUs()})),i.qd(19,"contact us"),i.qc(),i.qd(20,". "),i.qc(),i.qc(),i.qc(),i.qc(),i.rc(21,"div",23),i.rc(22,"p"),i.qd(23,"You\u2019ve exceeded the annual conversion limit of "),i.rc(24,"b"),i.qd(25),i.qc(),i.qd(26," for foreign currency assets, as stated in the "),i.rc(27,"a",22),i.zc("click",(function(){return i.dd(e),i.Dc().toggleDRBModal(!0)})),i.qd(28,"Foreign Exchange Policy"),i.qc(),i.qd(29," notices for residents in Malaysia with "),i.rc(30,"a",22),i.zc("click",(function(){return i.dd(e),i.Dc().toggleCurrencyConversionModal(!0)})),i.qd(31,"Domestic Ringgit Borrowing."),i.qc(),i.qc(),i.qc(),i.rc(32,"nz-row",24),i.rc(33,"nz-form-item"),i.rc(34,"nz-form-control"),i.rc(35,"nz-col",13),i.rc(36,"p",14),i.qd(37,"Do you have Domestic Ringgit Borrowing? "),i.rc(38,"i",15),i.zc("click",(function(){return i.dd(e),i.Dc().toggleCurrencyConversionModal(!0)})),i.qc(),i.qc(),i.qc(),i.rc(39,"nz-col",16),i.rc(40,"nz-radio-group",17),i.od(41,k,2,2,"label",18),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.od(42,U,15,0,"div",25),i.od(43,L,9,0,"div",25),i.od(44,V,6,0,"div",25),i.qc(),i.qc()}if(2&e){const e=i.Dc();
1i.Ub(1),i.Mc("refno",e.refno)("nric",e.nric)("isShowHeader",!1),i.Ub(2),i.Mc("formGroup",e.fepForm),i.Ub(4),i.Mc("nzSpan",13),i.Ub(4),i.Mc("nzSpan",11),i.Ub(1),i.Mc("formControl",e.isMalaysiaResidency)("nzButtonStyle","solid")("nzDisabled",!0),i.Ub(1),i.Mc("ngForOf",e.yesNoTxtOptions),i.Ub(12),i.rd(e.isCorporate?"RM 50,000,000.00":"RM 1,000,000.00"),i.Ub(10),i.Mc("nzSpan",13),i.Ub(4),i.Mc("nzSpan",11),i.Ub(1),i.Mc("formControl",e.isDRB)("nzButtonStyle","solid")("nzDisabled",!e.isMalaysiaResidency.value),i.Ub(1),i.Mc("ngForOf",e.yesNoTxtOptions),i.Ub(1),i.Mc("ngIf",e.isMalaysiaResidency.value&&(null==e.isDRB?null:e.isDRB.value)),i.Ub(1),i.Mc("ngIf",e.isMalaysiaResidency.value&&!(null!=e.isDRB&&e.isDRB.value)),i.Ub(1),i.Mc("ngIf",!e.isMalaysiaResidency.value)}}const Y=function(e){return{"mt-2":e}};function j(e,t){if(1&e){const e=i.sc();i.rc(0,"button",32),i.zc("click",(function(){return i.dd(e),i.Dc(2).navigateToContactUs()})),i.Ec(1,"async"),i.Ec(2,"async"),i.qd(3,"CONTACT US"),i.qc()}if(2&e){const e=i.Dc(2);i.Mc("nzBlock",i.Fc(1,2,e.isMobile$))("ngClass",i.Sc(6,Y,i.Fc(2,4,e.isMobile$)))}}function H(e,t){if(1&e){const e=i.sc();i.rc(0,"button",33),i.zc("click",(function(){return i.dd(e),i.Dc(2).checkTwoFA()})),i.Ec(1,"async"),i.Ec(2,"async"),i.qd(3,"DECLARE NOW "),i.qc()}if(2&e){const e=i.Dc(2);i.Mc("nzBlock",i.Fc(1,3,e.isMobile$))("ngClass",i.Sc(7,Y,i.Fc(2,5,e.isMobile$)))("nzLoading",e.approving)}}function G(e,t){if(1&e){const e=i.sc();i.rc(0,"div"),i.od(1,j,4,8,"button",29),i.rc(2,"button",30),i.zc("click",(function(){return i.dd(e),i.Dc().closeModal()})),i.Ec(3,"async"),i.Ec(4,"async"),i.qd(5,"EDIT ORDERPAD"),i.qc(),i.od(6,H,4,9,"button",31),i.qc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("ngIf",null==e.isDRB?null:e.isDRB.value),i.Ub(1),i.Nc("nzType",null!=e.isDRB&&e.isDRB.value?"primary":"outline"),i.Mc("nzBlock",i.Fc(3,5,e.isMobile$))("ngClass",i.Sc(9,Y,i.Fc(4,7,e.isMobile$))),i.Ub(4),i.Mc("ngIf",!(null!=e.isDRB&&e.isDRB.value))}}function W(e,t){if(1&e){const e=i.sc();i.pc(0),i.rc(1,"shared-approve-action",34),i.zc("emitCancel",(function(){return i.dd(e),i.Dc().onHandleCancel()}))("onApprove",(function(t){return i.dd(e),i.Dc().onClickApprove(t)}))("on2FaMethodChecked",(function(){return i.dd(e),i.Dc().on2FaMethodChecked()})),i.qc(),i.oc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("refno",e.refno)("requestKey",e.UPDATE_ACCOUNT_REQUEST_KEY)("actionKey",e.UPDATE_ACCOUNT_ACTION_KEY)("width",600)}}let Q=(()=>{class e{constructor(e,t,n,o,l,c,s){this.fb=e,this.fepRestService=t,this.store=n,this.router=o,this.subHandlingService=l,this.twoFaService=c,this.nzNotificationService=s,this.showModal=!1,this.showModalChange=new i.s,this.proceedTransaction=new i.s,this.refno="",this.nric="",this.bnmPortalUrl="https://www.iteps.bnm.gov.my/iteps/public/jsp/publicSignIn.jsp?page=../jsp/ecams/frmPECMSubStatusBrowse.jsp?filename=frmPOECMSubStatusBrowse&criteria=2&pubInd=O",this.yesNoTxtOptions=a.a.YES_NO_BOOLEAN_OPTIONS,this.showDRBModal=!1,this.showResidencyModal=!1,this.showCurrencyConversionLimitModal=!1,this.isCorporate=!1,this.approving=!1,this.UPDATE_ACCOUNT_REQUEST_KEY=v.a.UPDATE_ACCOUNT,this.UPDATE_ACCOUNT_ACTION_KEY=g.a.AC_INFO_UPDATE}ngOnInit(){this.store.dispatch(new y.b);const e=this.store.selectSnapshot(s.a.getAccounts).find(e=>e.refno==this.refno);null!=e&&(this.nric=e.nric,this.isCorporate=e.accountType.includes("C")),this.initFormGroup(),this.subscribeIsMalaysiaResidency(),this.getFepAccount()}initFormGroup(){this.fepForm=this.fb.group({isMalaysiaResidency:[!1,[l.H.required]],isDRB:[null,[l.H.required]]})}subscribeIsMalaysiaResidency(){this.fepForm.get("isMalaysiaResidency").valueChanges.subscribe(e=>{e?this.fepForm.get("isDRB").patchValue(!0):this.fepForm.get("isDRB").patchValue(!1)})}closeModal(){this.showModal=!1,this.showModalChange.emit(!1)}navigateToContactUs(){this.router.navigate([r.o.SUPPORT,r.o.CONTACT_US]),this.closeModal()}getFepAccount(){0!=this.nric.length&&this.subHandlingService.once(this.fepRestService.getFepAccount(this.nric).pipe(Object(u.a)(e=>{e.status==d.a.SUCCESS&&this.fepForm.patchValue(e.data)})))}get isDRB(){return this.fepForm.get("isDRB")}get isMalaysiaResidency(){return this.fepForm.get("isMalaysiaResidency")}toggleDRBModal(e){this.showDRBModal=e,this.showModal=!this.showDRBModal}toggleResidencyModal(e){this.showResidencyModal=e,this.showModal=!this.showResidencyModal}toggleCurrencyConversionModal(e){this.showCurrencyConversionLimitModal=e,this.showModal=!this.showCurrencyConversionLimitModal}checkTwoFA(){this.approving=!0}on2FaMethodChecked(){this.showModal=!1}onHandleCancel(){this.approving=!1,this.showModal||(this.showModal=!0)}onClickApprove(e){this.subHandlingService.once(e.pipe(Object(p.a)(e=>{const t={nric:this.nric,isMalaysiaResidency:this.fepForm.get("isMalaysiaResidency").value,isDRB:this.fepForm.get("isDRB").value};return this.fepRestService.updateFepAccount(t,e).pipe(this.twoFaService.intercept())}),Object(u.a)(e=>{this.approving=!1,e.status===d.a.SUCCESS&&e.data?(this.closeModal(),this.proceedTransaction.emit()):(this.showModal=!0,this.nzNotificationService.error("Error",e.errorMessage))}),Object(h.a)(()=>this.store.dispatch(new y.e(!1,!0)))))}}return e.\u0275fac=function(t){return new(t||e)(i.lc(l.g),i.lc(C.a),i.lc(c.i),i.lc(M.e),i.lc(b.a),i.lc(m.a),i.lc(T.b))},e.\u0275cmp=i.fc({type:e,selectors:[["fep-breached-modal"]],inputs:{showModal:"showModal",refno:"refno"},outputs:{showModalChange:"showModalChange",proceedTransaction:"proceedTransaction"},features:[i.Tb([b.a,m.a])],decls:11,vars:13,consts:[["nzWidth","700","nzVisible","true",3,"nzVisible","nzWrapClassName","nzTitle","nzContent","nzFooter","nzCancelText","nzVisibleChange","nzOnOk","nzOnCancel"],["modalTitle",""],["modalContent",""],["modalFooter",""],[3,"isCtaBtnVisible","visibleFepAgreement","changeVisibleFepAgreement"],[3,"showModal","showModalChange"],[3,"showModal","refno","nric","showModalChange"],[4,"ngIf"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-warning","mr-3"],[1,"mb-5"],[3,"refno","nric","isShowHeader"],[1,"overflow-y-auto",2,"height","300px"],["nz-form","",1,"text-base",3,"formGroup"],[1,"pr-3",3,"nzSpan"],[1,"mb-0"],["nz-icon","","nz-tooltip","","nzTheme","fill","nzTooltipPlacement","right","nzType","info-circle",1,"pointer",3,"click"],[3,"nzSpan"],["nzSize","small",3,"formControl","nzButtonStyle","nzDisabled"],["nz-radio-button","",3,"nz
1Value",4,"ngFor","ngForOf"],[1,"mt-3","d-flex"],["nz-icon","","nzType","info-circle","nzTheme","outline",1,"text-danger"],[1,"ml-2",2,"vertical-align","middle"],[3,"click"],[1,"text-sm"],[1,"mt-4"],["class","text-sm",4,"ngIf"],["nz-radio-button","",3,"nzValue"],["href","mailto: [email protected]"],[1,"mb-3"],["nz-button","","nzType","outline",3,"nzBlock","ngClass","click",4,"ngIf"],["nz-button","",3,"nzBlock","nzType","ngClass","click"],["nz-button","","nzType","primary",3,"nzBlock","ngClass","nzLoading","click",4,"ngIf"],["nz-button","","nzType","outline",3,"nzBlock","ngClass","click"],["nz-button","","nzType","primary",3,"nzBlock","ngClass","nzLoading","click"],[3,"refno","requestKey","actionKey","width","emitCancel","onApprove","on2FaMethodChecked"]],template:function(e,t){if(1&e&&(i.rc(0,"nz-modal",0),i.zc("nzVisibleChange",(function(e){return t.showModal=e}))("nzOnOk",(function(){return null}))("nzOnCancel",(function(){return t.closeModal()})),i.od(1,_,3,0,"ng-template",null,1,i.pd),i.od(3,N,45,20,"ng-template",null,2,i.pd),i.od(5,G,7,11,"ng-template",null,3,i.pd),i.qc(),i.rc(7,"app-fep-agreement-modal",4),i.zc("changeVisibleFepAgreement",(function(e){return t.toggleDRBModal(e)})),i.qc(),i.rc(8,"app-fep-resident-definition-modal",5),i.zc("showModalChange",(function(e){return t.toggleResidencyModal(e)})),i.qc(),i.rc(9,"app-fep-currency-conversion-limit-modal",6),i.zc("showModalChange",(function(e){return t.toggleCurrencyConversionModal(e)})),i.qc(),i.od(10,W,2,4,"ng-container",7)),2&e){const e=i.ad(2),n=i.ad(4),o=i.ad(6);i.Mc("nzVisible",t.showModal)("nzWrapClassName","vertical-center-modal")("nzTitle",e)("nzContent",n)("nzFooter",o)("nzCancelText",null),i.Ub(7),i.Mc("isCtaBtnVisible",!1)("visibleFepAgreement",t.showDRBModal),i.Ub(1),i.Mc("showModal",t.showResidencyModal),i.Ub(1),i.Mc("showModal",t.showCurrencyConversionLimitModal)("refno",t.refno)("nric",t.nric),i.Ub(1),i.Mc("ngIf",t.approving)}},directives:[O.a,B.a,S.a,x.a,P.t,E.b,w.a,l.J,l.u,D.b,l.l,z.c,D.e,D.a,z.a,A.e,F.c,l.t,l.i,P.s,F.a,q.a,P.q,I.a],pipes:[P.b],encapsulation:2}),Object(o.c)([Object(c.e)(f.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},jser:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ae}));var o=n("mrSG"),i=n("fXoL"),l=n("3Pt+"),a=n("AcyG"),c=n("6h7t"),s=n("2VHv"),r=n("Kj3r"),d=n("vkgz"),u=n("JIr8"),p=n("lJxs"),h=n("/uUt"),b=n("bOdf"),m=n("eIep"),g=n("XNiG"),f=n("cp0P"),v=n("LRne"),y=n("G/fY"),C=n("gFZo"),M=n("Q1wu"),T=n("iFlv"),O=n("ildK"),B=n("ofXK"),S=n("mV2b"),x=n("+NfP"),P=n("nhH0"),E=n("6l6k"),w=n("66kx"),D=n("W7Oe"),z=n("hRIC"),A=n("Na7k"),F=n("bNXi"),q=n("URyx"),I=n("z7QD"),_=n("B+r4"),R=n("X7a2"),k=n("/spw"),U=n("PtUS"),L=n("eXWG"),V=n("fyyF"),N=n("PTRe"),Y=n("6oRW"),j=n("k4tz"),H=n("PpG7"),G=n("HtrM"),W=n("vcRD"),Q=n("FwiY"),$=n("OtHt"),K=n("zaiM");const X=["bondCalculatorV2"];function J(e,t){1&e&&i.nc(0)}function Z(e,t){if(1&e){const e=i.sc();i.rc(0,"div",20),i.rc(1,"div",21),i.rc(2,"div",22),i.zc("click",(function(){return i.dd(e),i.Dc(2).onClickView()})),i.rc(3,"p",23),i.qd(4,"Est. Total Return"),i.qc(),i.rc(5,"div",24),i.rc(6,"p",25),i.qd(7),i.Ec(8,"number"),i.qc(),i.mc(9,"img",26),i.qc(),i.qc(),i.rc(10,"div",27),i.rc(11,"uic-button",28),i.zc("click",(function(){return i.dd(e),i.Dc(2).onPreview()})),i.rc(12,"span"),i.qd(13,"Buy Preview"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc(2);i.Ub(7),i.td("",e.selectedBond.bondCurrencyCode," ",i.Gc(8,7,e.parseFloatRemoveCommaSeperator(e.estTotalReturn),"1.2-2"),""),i.Ub(2),i.Mc("src",e.imagePath+"bond-orderpad-arrow-right-slide.svg",i.gd),i.Ub(2),i.Mc("nzRound",!0)("nzBlock",!0)("nzLoading",e.isLoadingData||e.readingPaymentMethod||e.isLoading)("disabled",(null==e.form?null:e.form.invalid)||e.isLoadingData||e.readingPaymentMethod||e.isLoading||!e.estPayableAmt)}}const ee=function(e,t,n,o,i,l){return{issueCode:e,nominalValue:t,price:n,fxRate:o,fxCurrency:i,bufferRate:l}};function te(e,t){if(1&e){const e=i.sc();i.rc(0,"app-bond-calculator-shared-v2",29,30),i.zc("estPayableAmtEmitter",(function(t){return i.dd(e),i.Dc(2).setEstPayableAmt(t)}))("estTotalReturnEmitter",(function(t){return i.dd(e),i.Dc(2).setEstTotalReturn(t)}))("netYieldEmitter",(function(t){return i.dd(e),i.Dc(2).setNetYtm(t)})),i.qc()}if(2&e){const e=i.Dc(2);i.Mc("bondCalculatorInput",i.Xc(3,ee,null==e.selectedBond?null:e.selectedBond.issueC
1ode,e.form.get("buyQuantity").value,e.form.get("offerPrice").value,e.paymentCurrencyFromPaymentMode===(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)||null==e.bondCalculatorData?null:e.bondCalculatorData.fxAskRate,e.paymentCurrencyFromPaymentMode,e.bufferRate))("isOrderpad",!0)("bondType","bondExpress")}}function ne(e,t){if(1&e&&(i.pc(0),i.rc(1,"uic-body",1),i.nc(2,4),i.od(3,J,1,0,"ng-container",5),i.mc(4,"ui-form-card",6),i.od(5,Z,14,10,"div",19),i.Ec(6,"async"),i.od(7,te,2,10,"app-bond-calculator-shared-v2",9),i.qc(),i.oc()),2&e){const e=i.Dc(),t=i.ad(13),n=i.ad(15);i.Ub(1),i.Mc("componentStyleOnly",!0),i.Ub(1),i.Mc("ngTemplateOutlet",t),i.Ub(1),i.Mc("ngTemplateOutlet",e.buySellToggleTemplate),i.Ub(1),i.Mc("formCardBody",n),i.Ub(1),i.Mc("ngIf",i.Fc(6,6,e.isMobile$)),i.Ub(2),i.Mc("ngIf",null==e.selectedBond?null:e.selectedBond.issueCode)}}function oe(e,t){1&e&&i.nc(0)}function ie(e,t){if(1&e){const e=i.sc();i.rc(0,"app-bond-calculator-shared-v2",29),i.zc("estPayableAmtEmitter",(function(t){return i.dd(e),i.Dc().setEstPayableAmt(t)}))("estTotalReturnEmitter",(function(t){return i.dd(e),i.Dc().setEstTotalReturn(t)}))("netYieldEmitter",(function(t){return i.dd(e),i.Dc().setNetYtm(t)})),i.qc()}if(2&e){const e=i.Dc();i.Mc("bondCalculatorInput",i.Xc(3,ee,null==e.selectedBond?null:e.selectedBond.issueCode,e.form.get("buyQuantity").value,e.form.get("offerPrice").value,e.paymentCurrencyFromPaymentMode===(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)||null==e.bondCalculatorData?null:e.bondCalculatorData.fxAskRate,e.paymentCurrencyFromPaymentMode,e.bufferRate))("isOrderpad",!0)("bondType","bondExpress")}}function le(e,t){if(1&e&&(i.rc(0,"span"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.sd("",i.Gc(2,1,e.netAskYield,"1.3-3"),"%")}}function ae(e,t){if(1&e&&(i.rc(0,"span"),i.qd(1),i.Ec(2,"number"),i.qc()),2&e){const e=i.Dc(2);i.Ub(1),i.sd("",i.Gc(2,1,null==e.selectedBond?null:e.selectedBond.bidYield,"1.3-3"),"%")}}function ce(e,t){if(1&e&&(i.rc(0,"div",31),i.rc(1,"div",32),i.rc(2,"div",33),i.rc(3,"div",34),i.qd(4,"Live Ask Price/Yield"),i.qc(),i.rc(5,"span",35),i.qd(6),i.Ec(7,"number"),i.qc(),i.rc(8,"div",36),i.od(9,le,3,4,"span",37),i.qc(),i.qc(),i.rc(10,"div",38),i.rc(11,"div",27),i.rc(12,"div"),i.rc(13,"span",39),i.qd(14,"Ask Vol."),i.qc(),i.qc(),i.rc(15,"div"),i.rc(16,"span",39),i.qd(17),i.Ec(18,"thousandSeparator"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.rc(19,"div",32),i.rc(20,"div",40),i.rc(21,"div",34),i.qd(22,"Live Bid Price/Yield"),i.qc(),i.rc(23,"span",35),i.qd(24),i.Ec(25,"number"),i.qc(),i.rc(26,"div",36),i.od(27,ae,3,4,"span",37),i.qc(),i.qc(),i.rc(28,"div",41),i.rc(29,"div",27),i.rc(30,"div"),i.rc(31,"span",39),i.qd(32,"Bid Vol."),i.qc(),i.qc(),i.rc(33,"div"),i.rc(34,"span",39),i.qd(35),i.Ec(36,"thousandSeparator"),i.qc(),i.qc(),i.qc(),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(),t=i.ad(27);i.Ub(6),i.sd(" ",i.Gc(7,8,null==e.selectedBond?null:e.selectedBond.offerPrice,"1.3-3")," "),i.Ub(3),i.Mc("ngIf",e.netAskYield)("ngIfElse",t),i.Ub(8),i.rd(i.Fc(18,11,null==e.selectedBond?null:e.selectedBond.offerVolume)),i.Ub(7),i.sd(" ",i.Gc(25,13,null==e.selectedBond?null:e.selectedBond.bidPrice,"1.3-3")," "),i.Ub(3),i.Mc("ngIf",null==e.selectedBond?null:e.selectedBond.bidYield)("ngIfElse",t),i.Ub(8),i.rd(i.Fc(36,16,null==e.selectedBond?null:e.selectedBond.bidVolume))}}function se(e,t){if(1&e&&i.mc(0,"ui-option",59),2&e){const e=t.$implicit;i.Mc("nzLabel",e.accountTypeDisplay)("nzValue",e.refno)}}function re(e,t){1&e&&(i.rc(0,"div",60),i.rc(1,"div"),i.qd(2," Please choose an account. "),i.qc(),i.qc())}function de(e,t){if(1&e&&(i.rc(0,"div",44),i.rc(1,"nz-col",45),i.rc(2,"span",46),i.qd(3,"Account"),i.qc(),i.qc(),i.rc(4,"nz-col",47),i.rc(5,"uic-select-wrapper"),i.rc(6,"ui-select",57),i.od(7,se,1,2,"ui-option",58),i.qc(),i.qc(),i.od(8,re,3,0,"div",52),i.qc(),i.qc()),2&e){const e=i.Dc(3);var n=null;const t=(null==(n=e.form.get("refno"))?null:n.dirty)&&(null==(n=e.form.get("refno"))?null:n.hasError("required"));i.Ub(1),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("formControl",e.refno)("nzShowArrow",(null==e.accountSelectorOption?null:e.accountSelectorOption.length)>1)("nzDisabled",(null==e.accountSelectorOption?null:e.accountSelectorOption.length)<=1),i.Ub(1),i.Mc("ngForOf",e.accountSelectorOption),i.Ub(1),i.Mc("ngIf",t)}}function ue(e,t){if(1&e){const e=i.sc();i.rc(0,"div",61),i.rc(1,"uic-icon",62),i.zc("click",(function(){return i.dd(e),i.Dc(3).onMinusPrice()})),i.qc(),i.rc(2,"uic-icon",63),i.zc("click",(function(){return i.dd(e),i.Dc(3).onAddPrice()})),i.qc(),i.qc()}2&e&&(i.Ub(2),i.Mc("ngClass","ml-12px"))}function pe(e,t){if(1&e&&(i.rc(0,"div",60),i.rc(1,"div",64),i.qd(2),i.qc(),i.qc()),2&e){const e=i.Dc(3);i.Ub(2),i.sd("Minimum nominal value of this bond is ",null==e.selectedBond?null:e.selectedBond.bmpMyMinLotSize,"")}}function he(e,t){if(1&e&&(i.rc(0,"div",60),i.rc(1,"div",64),i.qd(2),i.qc(),i.qc()),2&e){const e=i.Dc(3);i.Ub(2),i.sd("Maximum offer volume of this bond is ",null==e.selectedBond?null:e.selectedBond.offerVolume,"")}}function be(e,t){if(1&e&&(i.rc(0,"div",60),i.rc(1,"div",64),i.qd(2),i.qc(),i.qc()),2&e){const e=i.Dc(3);i.Ub(2),i.sd("Minimum incremental nominal value is ",null==e.selectedBond?null:e.selectedBond.bmpMySubLotSize,".")}}function me(e,t){if(1&e&&i.mc(0,"ui-option",65),2&e){const e=t.$implicit;i.Mc("nzValue",e.id)("nzLabel",e.name)}}function ge(e,t){1&e&&(i.rc(0,"div",60),i.rc(1,"div"),i.qd(2," Please make sure you select a method. "),i.qc(),i.qc())}function fe(e,t){if(1&e&&i.mc(0,"uic-list-item",68),2&e){const e=i.Dc(4);i.Nc("value",null!=e.netYtm?e.netYtm+" %":"-"),i.Mc("info",e.getNetYieldPlaceHolder())("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function ve(e,t){if(1&e&&(i.rc(0,"div",66),i.od(1,fe,1,4,"uic-list-item",67),i.Ec(2,"async"),i.mc(3,"uic-list-item",68),i.Ec(4,"number"),i.Ec(5,"number"),i.qc()),2&e){const e=i.Dc(3);var n=null;i.Ub(1),i.Mc("ngIf",i.Fc(2,5,e.isMobile$)),i.Ub(2),i.Nc("value",(null==e.form||null==(n=e.form.get("paymentCurrency"))?null:n.value)+" "+(e.paymentCurrencyFromPaymentMode===e.selectedBond.bondCurrencyCode?i.Gc(4,7,e.parseFloatRemoveCommaSeperator(e.estPayableAmt),"1.2-2"):i.Gc(5,10,e.parseFloatRemoveCommaSeperator(e.estPayableAmt)*(null==e.bondCalculatorData?null:e.bondCalculatorData.fxAskRate),"1.2-2"))),i.Mc("info","Est. Payable Amou
1nt")("infoClass","t-xs")("valueClass","t-xs font-weight-bold")}}function ye(e,t){1&e&&(i.pc(0),i.qd(1,"Cash Account"),i.oc())}function Ce(e,t){1&e&&(i.pc(0),i.qd(1,"Auto-Sweep"),i.oc())}function Me(e,t){1&e&&(i.pc(0),i.qd(1,"Cash Account"),i.oc())}function Te(e,t){1&e&&(i.pc(0),i.qd(1,"Auto-Sweep"),i.oc())}function Oe(e,t){if(1&e&&(i.rc(0,"div",69),i.rc(1,"div",70),i.mc(2,"i",71),i.qc(),i.rc(3,"div"),i.rc(4,"span",72),i.qd(5," Insufficient "),i.od(6,ye,2,0,"ng-container",0),i.od(7,Ce,2,0,"ng-container",0),i.qd(8," balance. Kindly "),i.rc(9,"a",73),i.qd(10,"top up"),i.qc(),i.qd(11),i.Ec(12,"number"),i.od(13,Me,2,0,"ng-container",0),i.od(14,Te,2,0,"ng-container",0),i.qd(15," to complete the transaction. "),i.qc(),i.qc(),i.qc()),2&e){const e=i.Dc(3);i.Ub(6),i.Mc("ngIf",(null==e.paymentMode?null:e.paymentMode.value)!==e.transactionConstant.AUTO_SWEEP),i.Ub(1),i.Mc("ngIf",(null==e.paymentMode?null:e.paymentMode.value)===e.transactionConstant.AUTO_SWEEP),i.Ub(2),i.Mc("href",(null==e.paymentMode?null:e.paymentMode.value)===e.transactionConstant.AUTO_SWEEP?e.getAutoSweepTopUpUrl(e.paymentCurrencyFromPaymentMode):"/app/cash-account",i.gd),i.Ub(2),i.td(" ",e.paymentCurrencyFromPaymentMode," ",i.Gc(12,7,e.beShortfallAmt,"1.2-2")," to your "),i.Ub(2),i.Mc("ngIf",(null==e.paymentMode?null:e.paymentMode.value)!==e.transactionConstant.AUTO_SWEEP),i.Ub(1),i.Mc("ngIf",(null==e.paymentMode?null:e.paymentMode.value)===e.transactionConstant.AUTO_SWEEP)}}function Be(e,t){if(1&e&&(i.pc(0),i.rc(1,"form",42),i.od(2,de,9,7,"div",43),i.rc(3,"div"),i.rc(4,"div",44),i.rc(5,"nz-col",45),i.rc(6,"span",46),i.qd(7,"Nominal Value"),i.qc(),i.qc(),i.rc(8,"nz-col",47),i.rc(9,"uic-input-wrapper"),i.rc(10,"nz-input-group",48),i.mc(11,"input",49),i.qc(),i.qc(),i.od(12,ue,3,1,"ng-template",null,50,i.pd),i.qc(),i.qc(),i.rc(14,"nz-col",51),i.od(15,pe,3,1,"div",52),i.od(16,he,3,1,"div",52),i.od(17,be,3,1,"div",52),i.qc(),i.qc(),i.rc(18,"div",44),i.rc(19,"nz-col",45),i.rc(20,"span",46),i.qd(21," Payment Method "),i.qc(),i.qc(),i.rc(22,"nz-col",47),i.rc(23,"uic-select-wrapper"),i.rc(24,"ui-select",53),i.od(25,me,1,2,"ui-option",54),i.qc(),i.qc(),i.od(26,ge,3,0,"div",52),i.qc(),i.qc(),i.qc(),i.od(27,ve,6,13,"div",55),i.Ec(28,"async"),i.od(29,Oe,16,10,"div",56),i.oc()),2&e){const e=i.ad(13),t=i.Dc(2);var n=null;const l=null!=(n=t.form.get("paymentModeId"))&&n.dirty&&null!=(n=t.form.get("paymentModeId"))&&n.hasError("required")?"error-bg":"background-grey";var o=null;const a=(null==(o=t.form.get("paymentModeId"))?null:o.dirty)&&(null==(o=t.form.get("paymentModeId"))?null:o.hasError("required"));i.Ub(1),i.Mc("formGroup",t.form),i.Ub(1),i.Mc("ngIf",(null==t.accountSelectorOption?null:t.accountSelectorOption.length)>1),i.Ub(3),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzSuffix",e)("ngClass",null!=t.buyQuantity&&t.buyQuantity.hasError("min")||null!=t.buyQuantity&&t.buyQuantity.hasError("required")||null!=t.buyQuantity&&t.buyQuantity.hasError("max")||null!=t.buyQuantity&&t.buyQuantity.hasError("invalidIncremental")&&(null==t.buyQuantity?null:t.buyQuantity.value)>=(null==t.selectedBond?null:t.selectedBond.bmpMySubLotSize)?"error-bg":"background-grey"),i.Ub(1),i.Mc("ngClass",null!=t.buyQuantity&&t.buyQuantity.hasError("min")||null!=t.buyQuantity&&t.buyQuantity.hasError("required")||null!=t.buyQuantity&&t.buyQuantity.hasError("max")||null!=t.buyQuantity&&t.buyQuantity.hasError("invalidIncremental")&&(null==t.buyQuantity?null:t.buyQuantity.value)>=(null==t.selectedBond?null:t.selectedBond.bmpMySubLotSize)?"error-bg":"background-grey")("formControl",t.buyQuantity)("step",null==t.selectedBond?null:t.selectedBond.bmpMySubLotSize),i.Ub(4),i.Mc("ngIf",(null==t.buyQuantity?null:t.buyQuantity.hasError("min"))||(null==t.buyQuantity?null:t.buyQuantity.hasError("required"))),i.Ub(1),i.Mc("ngIf",null==t.buyQuantity?null:t.buyQuantity.hasError("max")),i.Ub(1),i.Mc("ngIf",(null==t.buyQuantity?null:t.buyQuantity.hasError("invalidIncremental"))&&(null==t.buyQuantity?null:t.buyQuantity.value)>=(null==t.selectedBond?null:t.selectedBond.bmpMySubLotSize)&&!(null!=t.buyQuantity&&t.buyQuantity.hasError("min")||null!=t.buyQuantity&&t.buyQuantity.hasError("required")||null!=t.buyQuantity&&t.buyQuantity.hasError("max"))),i.Ub(2),i.Mc("nzSpan",5),i.Ub(3),i.Mc("nzSpan",18),i.Ub(2),i.Mc("nzLoading",t.readingPaymentMethod)("nzShowArrow",(null==t.displayPaymentMethodOptions?null:t.displayPaymentMethodOptions.length)>1)("ngClass",l)("nzDisabled",1===(null==t.displayPaymentMethodOptions?null:t.displayPaymentMethodOptions.length)),i.Ub(1),i.Mc("ngForOf",t.displayPaymentMethodOptions),i.Ub(1),i.Mc("ngIf",a),i.Ub(1),i.Mc("ngIf",i.Fc(28,22,t.isMobile$)),i.Ub(2),i.Mc("ngIf",t.beShortfallAmt>0)}}function Se(e,t){if(1&e&&i.od(0,Be,30,24,"ng-container",37),2&e){const e=i.Dc(),t=i.ad(19);i.Mc("ngIf",!e.isLoading)("ngIfElse",t)}}function xe(e,t){if(1&e){const e=i.sc();i.rc(0,"div",74),i.rc(1,"div",75),i.Ec(2,"async"),i.rc(3,"uic-button",76),i.zc("click",(function(){return i.dd(e),i.Dc().onPreview()})),i.rc(4,"span"),i.qd(5,"Buy"),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Ub(1),i.Mc("nzSpan",i.Fc(2,5,e.isMobile$)?12:24),i.Ub(2),i.Mc("nzRound",!0)("nzBlock",!0)("nzLoading",e.isLoadingData||e.readingPaymentMethod||e.isLoading)("disabled",(null==e.form?null:e.form.invali
1d)||e.isLoadingData||e.readingPaymentMethod||e.isLoading||!e.estPayableAmt)}}function Pe(e,t){if(1&e&&i.mc(0,"nz-skeleton",77),2&e){const e=i.Dc();i.Mc("nzLoading",e.isLoading)("nzActive",!0)}}function Ee(e,t){if(1&e&&(i.rc(0,"strong"),i.qd(1),i.qc()),2&e){const e=t.$implicit;i.Ub(1),i.rd(null==e?null:e.nzLabel)}}function we(e,t){1&e&&(i.rc(0,"span",78),i.qd(1,"-"),i.qc())}function De(e,t){1&e&&(i.rc(0,"span",79),i.qd(1,"-"),i.qc())}function ze(e,t){1&e&&(i.rc(0,"span"),i.qd(1,"-"),i.qc())}let Ae=(()=>{class e{constructor(e,t,n,o,l,a,s,r,d,u,p){this.store=e,this.accountService=t,this.subHandlingService=n,this.transactionBondRestService=o,this.bondRestService=l,this.bondCalculatorService=a,this.transactionBondExpressService=s,this.nzNotificationService=r,this.decimalPipe=d,this.datePipe=u,this.passportExpiryNotificationService=p,this.getAutoSweepTopUpUrl=e=>Object(P.c)({action:P.a.TOP_UP,refno:this.defaultRefno,autoSweep:!0,autoSweepCurrency:e}),this.platformFee=0,this.beShortFallAmtOutput=new i.s,this.previewOrder=new i.s,this.cancel=new i.s,this.netYieldEmitter=new i.s,this.imagePath=c.g.STOCKS_IMG_PATH,this.isMobile=!1,this.accountSelectorOption=[],this.paymentMethodOptions=[],this.displayPaymentMethodOptions=[],this.investmentCurrencyOptions=["MYR"],this.processingFee=0,this.totalPurchaseAmount=0,this.principalAmount=0,this.totalPurchaseAmountFx=0,this.calculatedAccruedInt=0,this.nextCallEnabled=!1,this.isBotSheetExpand=!1,this.cashFlowNominalValue=0,this.bufferRate=0,this.buyQtySubject=new g.a,this.buttonGroupClass={"px-4":!this.isMobile$},this.beShortfallAmt=0,this.transactionConstant=y.a,this.netAskYield=0,this.passportNoticeVisible=!1}ngOnInit(){var e,t,n,o,i,a;this.isMobile$.subscribe(e=>{this.isMobile=e}),this.accountSelectorOption=this.accountService.accounts,this.form=new l.k({refno:new l.h(this.defaultRefno,[l.H.required]),buyQuantity:new l.h(null===(e=this.selectedBond)||void 0===e?void 0:e.bmpMyMinLotSize,[l.H.min(null===(t=this.selectedBond)||void 0===t?void 0:t.bmpMyMinLotSize),l.H.required,l.H.max(null===(n=this.selectedBond)||void 0===n?void 0:n.offerVolume),Object(T.i)(null===(o=this.selectedBond)||void 0===o?void 0:o.bmpMySubLotSize)]),bondCurrencyCode:new l.h,paymentModeId:new l.h("",l.H.required),offerPrice:new l.h(null===(i=this.selectedBond)||void 0===i?void 0:i.offerPrice),paymentMode:new l.h(y.a.TRUST_ACCOUNT),issueCode:new l.h(null===(a=this.selectedBond)||void 0===a?void 0:a.issueCode),paymentCurrency:new l.h,accruedInt:new l.h}),this.subHandlingService.subscribe(this.buyQtySubject.pipe(Object(r.a)(1e3),Object(d.a)(e=>{const t=e%this.selectedBond.bmpMySubLotSize;0!==t&&(t>=this.selectedBond.bmpMySubLotSize/2?this.form.get("buyQuantity").setValue(e-t+this.selectedBond.bmpMySubLotSize):this.form.get("buyQuantity").setValue(e-t)),e<this.selectedBond.bmpMyMinLotSize&&this.form.get("buyQuantity").setValue(this.selectedBond.bmpMyMinLotSize),this.cashFlowNominalValue=e}))),this.subscribeRefnoChange(),this.refreshBondData(!0),this.getInitDataNew(),this.getBondCalculatorNetYield(),this.refreshBondInterval=this.refreshDataInterval()}getInitData(){this.isLoading=!0,this.subHandlingService.once(this.getPaymentMethod().pipe(Object(d.a)(e=>{this.isLoading=!1,this.paymentMethodOptions=e,this.checkBondCurrency()})))}getInitDataNew(){var e,t;this.isLoading=!0,Object(f.a)([this.getPaymentMethod().pipe(Object(u.a)(e=>Object(v.a)(null))),this.bondRestService.findBondTransactionAutoSweepList(null===(e=this.refno)||void 0===e?void 0:e.value,!0,null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode).pipe(Object(u.a)(e=>Object(v.a)(null)))]).subscribe(([e,t])=>{var n;e&&(this.paymentMethodOptions=e),(null==t?void 0:t.status)===c.a.RESPONSE_SUCCESS&&(null==t?void 0:t.data)&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length)>0&&Object(x.a)(t.data).forEach(e=>{var t;(null==e?void 0:e.currency)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)&&this.paymentMethodOptions.push({name:(null==e?void 0:e.purchasingPower)?(null==e?void 0:e.currency)+" Auto-Sweep - ["+(null==e?void 0:e.currency)+" "+Object(B.L)(null==e?void 0:e.purchasingPower,c.a.LOCALE_EN,"0.2-2")+"]":(null==e?void 0:e.currency)+" Auto-Sweep - ["+(null==e?void 0:e.currency)+" 0.00]",currencyCode:null==e?void 0:e.currency,availableBalance:(null==e?void 0:e.purchasingPower)?null==e?void 0:e.purchasingPower:0,id:null==e?void 0:e.trustId,transactionMode:y.a.AUTO_SWEEP,transactionMethod:y.a.AUTO_SWEEP})}),this.subscribePaymentModeIdChange(),this.checkBondCurrency(),this.isLoading=!1},e=>{this.isLoading=!1})}onClickBotSheet(){this.isBotSheetExpand=!this.isBotSheetExpand}refreshBondData(e){this.isLoadingData=!0,this.subHandlingService.once(this.getBondData(e).pipe(Object(d.a)(()=>{this.isLoadingData=!1})))}getBondData(e){return this.bondRestService.findBondExpressList("FMY").pipe(Object(p.a)(t=>{var n,o,i,a,c,s,r,d,u,p,h;
1if(t&&t.data){const b=[...null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.bondRetailList,...null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.bondWholesaleList],m=null==b?void 0:b.find(e=>{var t;return e.issueCode===(null===(t=this.issueCode)||void 0===t?void 0:t.value)});this.selectedBond=m,e&&this.buyQuantity.patchValue(null===(i=this.selectedBond)||void 0===i?void 0:i.bmpMyMinLotSize),null===(a=this.offerPrice)||void 0===a||a.patchValue(null===(c=this.selectedBond)||void 0===c?void 0:c.offerPrice),null===(s=this.buyQuantity)||void 0===s||s.setValidators([l.H.min(null===(r=this.selectedBond)||void 0===r?void 0:r.bmpMyMinLotSize),l.H.required,l.H.max(null===(d=this.selectedBond)||void 0===d?void 0:d.offerVolume),Object(T.i)(null===(u=this.selectedBond)||void 0===u?void 0:u.bmpMySubLotSize)]),null===(p=this.accruedInt)||void 0===p||p.patchValue(null===(h=this.selectedBond)||void 0===h?void 0:h.myAccruedInt),this.form.updateValueAndValidity(),this.compareMaturityWithNextCall()}}))}checkBondCurrency(){var e,t,n,o,i,l,a,c,s,r,d,u,p,h,b,m,g,f,v,C,M,T;if(this.paymentMethodOptions.sort((e,t)=>t.availableBalance-e.availableBalance),(null===(e=this.investmentCurrencyOptions)||void 0===e?void 0:e.includes(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode))||
1!(null===(n=this.paymentMethodOptions)||void 0===n?void 0:n.find(e=>{var t;return e.currencyCode===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)})))null===(h=this.paymentCurrency)||void 0===h||h.patchValue(y.a.PAYMENT_CURRENCY_MYR),null===(b=this.bondCurrencyCode)||void 0===b||b.patchValue(y.a.PAYMENT_CURRENCY_MYR),this.displayPaymentMethodOptions=null===(m=this.paymentMethodOptions)||void 0===m?void 0:m.filter(e=>{var t;return null===(t=this.investmentCurrencyOptions)||void 0===t?void 0:t.includes(null==e?void 0:e.currencyCode)}),null===(g=this.paymentModeId)||void 0===g||g.patchValue((null===(f=this.bondExpressTransactionModel)||void 0===f?void 0:f.paymentModeId)?null===(v=this.bondExpressTransactionModel)||void 0===v?void 0:v.paymentModeId:null!==(T=null===(M=null===(C=this.paymentMethodOptions)||void 0===C?void 0:C.find(e=>e.currencyCode===y.a.PAYMENT_CURRENCY_MYR))||void 0===M?void 0:M.id)&&void 0!==T?T:null);else{this.investmentCurrencyOptions.push(null===(o=this.selectedBond)||void 0===o?void 0:o.bondCurrencyCode),null===(i=this.paymentCurrency)||void 0===i||i.patchValue(null===(l=this.selectedBond)||void 0===l?void 0:l.bondCurrencyCode),null===(a=this.bondCurrencyCode)||void 0===a||a.patchValue(null===(c=this.selectedBond)||void 0===c?void 0:c.bondCurrencyCode),this.displayPaymentMethodOptions=null===(s=this.paymentMethodOptions)||void 0===s?void 0:s.filter(e=>{var t;return null===(t=this.investmentCurrencyOptions)||void 0===t?void 0:t.includes(null==e?void 0:e.currencyCode)});const e=null===(r=this.paymentMethodOptions)||void 0===r?void 0:r.filter(e=>{var t;return(null==e?void 0:e.currencyCode)===(null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode)}),t=null==e?void 0:e.reduce((e,t)=>t.availableBalance>((null==e?void 0:e.availableBalance)||0)?t:e,null),n=(null===(d=this.bondExpressTransactionModel)||void 0===d?void 0:d.paymentModeId)?null===(u=this.bondExpressTransactionModel)||void 0===u?void 0:u.paymentModeId:null==t?void 0:t.id;n&&(null===(p=this.paymentModeId)||void 0===p||p.patchValue(null!=n?n:null))}}getPaymentMethod(){var e;return this.transactionBondRestService.getBondExpressAvailablePaymentMethod(null===(e=this.refno)||void 0===e?void 0:e.value).pipe(Object(p.a)(e=>{var t;return(null==e?void 0:e.status)!==c.a.RESPONSE_SUCCESS?[]:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{name:e.currencyCode+" Cash Account - ["+e.currencyCode+" "+Object(B.L)(e.availableBalance,c.a.LOCALE_EN,"0.2-2")+"]",currencyCode:null==e?void 0:e.currencyCode,availableBalance:null==e?void 0:e.availableBalance}))}))}subscribeInvestmentCurrencyChange(){var e;this.subHandlingService.subscribe(null===(e=this.paymentCurrency)||void 0===e?void 0:e.valueChanges.pipe(Object(h.a)(),Object(d.a)(e=>{var t,n,o;this.displayPaymentMethodOptions=null===(t=this.paymentMethodOptions)||void 0===t?void 0:t.filter(e=>{var t;return null===(t=this.investmentCurrencyOptions)||void 0===t?void 0:t.includes(null==e?void 0:e.currencyCode)});const i=null===(o=null===(n=this.paymentMethodOptions)||void 0===n?void 0:n.find(t=>t.currencyCode===e))||void 0===o?void 0:o.id;this.paymentModeId.patchValue(i)})))}subscribePaymentModeIdChange(){var e;this.subHandlingService.subscribe(null===(e=this.paymentModeId)||void 0===e?void 0:e.valueChanges.pipe(Object(h.a)(),Object(d.a)(e=>{var t;const n=null===(t=this.paymentMethodOptions)||void 0===t?void 0:t.find(t=>(null==t?void 0:t.id)===e);if(this.paymentMode.patchValue(null==n?void 0:n.transactionMode),this.paymentCurrency.patchValue(null==n?void 0:n.currencyCode),this.bufferRate=0,this.paymentCurrencyFromPaymentMode!==this.selectedBond.bondCurrencyCode){let e=1.03;const t=this.allBondMarkupRate.filter(e=>"Y"===e.fx&&"FIRM"===e.orderType.toUpperCase());t&&(e=1+t[0].rate/100),this.bufferRate=Object(S.b)(100*(e-1))}this.calculateShortfall()})))}get refno(){return this.form.get("refno")}get paymentCurrency(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("paymentCurrency")}get paymentCurrencyFromPaymentMode(){var e;const t=this.paymentMethodOptions.find(e=>{var t;return(null==e?void 0:e.id)===(null===(t=this.paymentModeId)||void 0===t?void 0:t.value)});return null===(e=null==t?void 0:t.currencyCode)||void 0===e?void 0:e.toUpperCase()}get buyQuantity(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("buyQuantity")}get bondCurrencyCode(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("bondCurrencyCode")}get paymentModeId(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("paymentModeId")}get paymentMode(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("paymentMode")}get issueCode(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("issueCode")}get offerPrice(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("offerPrice")}get accruedInt(){var e;return null===(e=this.form)||void 0===e?void 0:e.get("accruedInt")}subscribeRefnoChange(){var e;this.subHandlingService.subscribe(null===(e=this.refno)||void 0===e?void 0:e.valueChanges.pipe(Object(h.a)(),Object(d.a)(e=>{clearInterval(this.refreshBondInterval),this.getInitDataNew(),this.refreshBondInterval=this.refreshDataInterval()})))}refreshDataInterval(){return setInterval(()=>{this.getBondPurchaseData()},1e4)}onPreview(){var e,t;let n=this.passportExpiryNotificationService.isPersonalAccountPassportExpired(),o=!1;if(this.refno&&this.refno.value&&(o=this.passportExpiryNotificationService.checkPassportExpiredByAccount(this.refno.value)),n||o)return void(this.passportNoticeVisible=!0);let i=this.parseFloatRemoveCommaSeperator(this.estPayableAmt);const l=this.paymentCurrencyFromPaymentMode;if(console.log(l),l!==(null===(e=this.selectedBond)||void 0===e?void 0:e.bondCurrencyCode)&&(i=Object(S.b)(i*(null===(t=this.bondCalculatorData)||void 0===t?void 0:t.fxRate))),Object(M.c)(this.form),this.form.invali
1d)return;if(!i)return;let a=this.paymentMethodOptions.find(e=>e.id===this.paymentModeId.value).availableBalance;if(null!==a&&a<i)return void this.nzNotificationService.error("Error","Insuficient Balance");this.form.updateValueAndValidity();const c=Object.assign({},this.form.value);console.log(this.parseFloatRemoveCommaSeperator(this.estPayableAmt)),this.previewOrder.emit({bondExpressTransactionModel:c,fromBondExpress:!0,beEstTotalAmtPayable:this.parseFloatRemoveCommaSeperator(this.estPayableAmt),beBufferRate:this.bufferRate})}onCancel(){this.cancel.emit()}ngOnDestroy(){clearInterval(this.refreshBondInterval)}getBondPurchaseData(){this.isRefreshing=!0,this.subHandlingService.once(this.getBondData().pipe(Object(b.a)(()=>{var e,t,n,o,i,l,a,c,s;return this.principalAmount=(null===(e=this.buyQuantity)||void 0===e?void 0:e.value)*((null===(t=this.selectedBond)||void 0===t?void 0:t.offerPrice)/100),this.calculatedAccruedInt=this.transactionBondExpressService.calculateAccruedInt(null===(n=this.buyQuantity)||void 0===n?void 0:n.value,null===(o=this.selectedBond)||void 0===o?void 0:o.myAccruedInt),this.transactionBondExpressService.getBondProcessingFee(null===(i=this.buyQuantity)||void 0===i?void 0:i.value,null===(l=this.selectedBond)||void 0===l?void 0:l.bondCurrencyCode,null===(a=this.selectedBond)||void 0===a?void 0:a.bondCurrencyCode,null===(c=this.refno)||void 0===c?void 0:c.value,null===(s=this.selectedBond)||void 0===s?void 0:s.issueCode)}),Object(b.a)(()=>{var e,t;this.processingFee=this.transactionBondExpressService.processingFee;const n=this.paymentCurrencyFromPaymentMode;return n!==(null===(e=this.selectedBond)||void 0===e?void 0:e.bondCurrencyCode)?this.transactionBondExpressService.getBondTotalPurchaseAmountFx(this.principalAmount,this.calculatedAccruedInt,this.processingFee,null===(t=this.selectedBond)||void 0===t?void 0:t.bondCurrencyCode,n):this.transactionBondExpressService.getBondTotalPurchaseAmount(this.principalAmount,this.calculatedAccruedInt,this.processingFee)}),Object(d.a)(()=>{this.isRefreshing=!1,this.totalPurchaseAmount=this.transactionBondExpressService.totalAmount,this.totalPurchaseAmountFx=this.transactionBondExpressService.totalAmountFx})))}compareMaturityWithNextCall(){this.nextCallEnabled=!1,null!=this.nextCallDate&&new Date(this.nextCallDate)<(this.bondCalculatorData.settlementDate?new Date(this.bondCalculatorData.settlementDate):new Date)||null!=this.nextCallDate&&null!=this.offerYldToWorst&&(this.nextCallEnabled=!0)}setNetYtm(e){this.netYieldType=null==e?void 0:e.yieldType,this.netYtm=null==e?void 0:e.yield,this.netYieldEmitter.emit(e)}setEstTotalReturn(e){this.estTotalReturn=e}redirectToFactsheetPage(e){e&&Object(O.a)(["/"+c.o.BONDS,c.o.BOND_FACTSHEET],{issueCode:e})}setEstPayableAmt(e){this.estPayableAmt=e,this.calculateShortfall()}onAddPrice(){const e=this.form.get("buyQuantity").value;this.form.get("buyQuantity").setValue(e+this.selectedBond.bmpMySubLotSize,{onlySelf:!0,emitEvent:!0}),this.form.get("buyQuantity").markAsDirty(),this.form.get("buyQuantity").updateValueAndValidity()}onMinusPrice(){const e=this.form.get("buyQuantity").value,t=e-this.selectedBond.bmpMySubLotSize<0?0:e-this.selectedBond.bmpMySubLotSize;this.form.get("buyQuantity").setValue(t,{onlySelf:!0,emitEvent:!0}),this.form.get("buyQuantity").markAsDirty(),this.form.get("buyQuantity").updateValueAndValidity()}calculateShortfall(){if(this.paymentMethodOptions&&this.paymentMethodOptions.length>0){const e=this.paymentMethodOptions.find(e=>e.id===this.paymentModeId.value),t=e?e.availableBalance:0;this.beShortfallAmt=this.paymentCurrencyFromPaymentMode===this.selectedBond.bondCurrencyCode?-1*(t-this.parseFloatRemoveCommaSeperator(this.estPayableAmt)):-1*(t-this.parseFloatRemoveCommaSeperator(this.estPayableAmt)*this.bondCalculatorData.fxAskRate),this.beShortFallAmtOutput.emit(Object(B.L)(this.beShortfallAmt,c.a.LOCALE_EN,"1.2-2"))}else this.beShortfallAmt=0,this.beShortFallAmtOutput.emit("-")}parseFloatRemoveCommaSeperator(e){return e?parseFloat(this.removeCommaSeperator(e)):0}removeCommaSeperator(e){let t="";for(let n=0;n<e.length;n++)t+=","!==e[n]?e[n]:"";return t}onClickView(){var e;null===(e=this.bondCalculatorV2)||void 0===e||e.onShowResult()}convertToInteger(e){return e?parseInt(e,10):0}getNetYieldPlaceHolder(){return"YTC"===this.netYieldType?"Net Yield to Next Call":"Net Yield to Maturity"}addThousandToKSeperator(e){return e?e>=1e3?e/1e3+"k":e.toString():"0"}getBondCalculatorNetYield(){let e=0,t=0,n=new Date,o=!1;this.subHandlingService.once(this.bondRestService.initBondCalculatorData(this.selectedBond.issueC
1ode,this.defaultRefno).pipe(Object(d.a)(i=>{var l,a,s,r,d,u;(null==i?void 0:i.status)===c.a.RESPONSE_SUCCESS&&"active"===(null===(l=null==i?void 0:i.data)||void 0===l?void 0:l.status)&&(o="Y"===(null===(a=i.data)||void 0===a?void 0:a.perpetual)||2165===new Date(null===(s=i.data)||void 0===s?void 0:s.maturityDate).getFullYear(),e=null===(r=i.data)||void 0===r?void 0:r.bmpMyMinLotSize,t=Number(this.decimalPipe.transform(null===(d=i.data)||void 0===d?void 0:d.offerPriceBmp,"1.3-3")),n=null===(u=i.data)||void 0===u?void 0:u.beSettlementDate)}),Object(u.a)(e=>(console.log(e),Object(v.a)(null))),Object(m.a)(()=>{const i={issueCode:this.selectedBond.issueCode,nominalValue:e>1e4?e:1e4,settlementDate:this.datePipe.transform(n,"yyyy-MM-dd"),forTransaction:!0,isBondBuy:!0,price:t,isRmo:!0,refno:this.defaultRefno,expiredDate:this.datePipe.transform(new Date,"yyyy-MM-dd"),yieldType:"rmo"};return this.bondRestService.bondCalculatorDataBySettlementDateAndPrice(i).pipe(Object(d.a)(e=>{var t,n;const i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.offerNetYtc,l=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.offerNetYtm;(null==e?void 0:e.status)===c.a.RESPONSE_SUCCESS&&(this.netAskYield=!i&&0!==i||!l&&0!==l?i||0===i||o?i:l:l<i&&!o?l:i)}))})))}}return e.\u0275fac=function(t){return new(t||e)(i.lc(a.i),i.lc(E.a),i.lc(s.a),i.lc(w.a),i.lc(D.a),i.lc(z.a),i.lc(A.a),i.lc(F.b),i.lc(B.g),i.lc(B.f),i.lc(q.a))},e.\u0275cmp=i.fc({type:e,selectors:[["app-bond-express-buy-form"]],viewQuery:function(e,t){var n;1&e&&i.yd(X,!0),2&e&&i.Zc(n=i.Ac())&&(t.bondCalculatorV2=n.first)},inputs:{selectedBond:"selectedBond",platformFee:"platformFee",defaultRefno:"defaultRefno",bondCalculatorData:"bondCalculatorData",offerYldToWorst:"offerYldToWorst",nextCallDate:"nextCallDate",allBondMarkupRate:"allBondMarkupRate",buySellToggleTemplate:"buySellToggleTemplate",bondExpressTransactionModel:"bondExpressTransactionModel"},outputs:{beShortFallAmtOutput:"beShortFallAmtOutput",previewOrder:"previewOrder",cancel:"cancel",netYieldEmitter:"netYieldEmitter"},features:[i.Tb([s.a])],decls:29,vars:13,consts:[[4,"ngIf"],[3,"componentStyleOnly"],["nz-row","","nzGutter","16",1,"m-0",3,"ngClass"],["nz-col","","nzSpan","14",1,"orderpad-form"],[3,"ngTemplateOutlet"],[4,"ngTemplateOutlet"],[3,"formCardBody"],[1,"mt-4",3,"ngTemplateOutlet"],["nz-col","","nzSpan","10",1,"bond-calculator-embedded","pr-4"],[3,"bondCalculatorInput","isOrderpad","bondType","estPayableAmtEmitter","estTotalReturnEmitter","netYieldEmitter",4,"ngIf"],["bondExpressDetailInfoTpl",""],["bondExpressBuyFormTpl",""],["bondExpressBuyFormButtonTpl",""],["loadingTemplate",""],["paymentMethodTemplate",""],["showDashForAskYield",""],["showDashForBidYield",""],["defaultDash",""],[3,"modalVisible","isPopUp","footerFunc","onOkEmit","onUpdateEmit"],["class","w-100 bottom-sheet-affix ",4,"ngIf"],[1,"w-100","bottom-sheet-affix"],[1,"bg-white","bond-footer-mobile"],[1,"d-flex","justify-content-between",3,"click"],[1,"text-grey"],[1,"d-flex"],[1,"font-weight-bold","text-profit"],[1,"arrow-icon",3,"src"],[1,"d-flex","justify-content-between"],["nzType","buy","nzSize","large",1,"w-100",3,"nzRound","nzBlock","nzLoading","disabled","click"],[3,"bondCalculatorInput","isOrderpad","bondType","estPayableAmtEmitter","estTotalReturnEmitter","netYieldEmitter"],["bondCalculatorV2",""],[1,"pb-12px","d-flex","align-item-center",2,"gap","13px"],[1,"w-100"],[1,"rounded-top","center-text","active-ask-price-wrapper","bottom-border","border-profit-color","top","bottom"],["nzType","flex","nzJustify","left",1,"t-xs","font-weight-normal","line-height-normal","font-style-normal","text-content-tertiary"],[1,"t-xl","font-weight-bold","my-2","line-height-normal"],["nzType","flex","nzJustify","left",1,"t-xs","text-content-primary","line-height-normal"],[4,"ngIf","ngIfElse"],[1,"rounded-bottom","center-text","active-ask-price-wrapper","border-profit-color","bottom"],[1,"text-10px","font-weight-normal","line-height-normal","font-style-normal","text-content-primary"],[1,"rounded-top","center-text","active-bid-price-wrapper","bottom-border"],[1,"rounded-bottom","center-text","active-bid-price-wrapper"],[1,"d-flex","flex-column","gap-12px","border-0",3,"formGroup"],["class","d-flex align-item-center justify-content-between",4,"ngIf"],[1,"d-flex","align-item-center","justify-content-between"],[1,"line-height-18px",3,"nzSpan"],[1,"input-label"],[3,"nzSpan"],[3,"nzSuffix","ngClass"],["type","number","ui-input","",1,"no-arrow","input-text","h-45px","border-0","pl-12px","pr-12px","pt-8px","pb-8px","w-100",3,"ngClass","formControl","step"],["norminalSuffixTemplate",""],["nzOffset","6","nzSpan","18"],["class","form-red-warning-wrapper",4,"ngIf"],["nzLabelPlaceholder","Payment Method","nzPlaceHolder","Payment Method","formControlName","paymentModeId",1,"compact-view","no-placeholder","border-0","border-radius-8px",3,"nzLoading","nzShowArrow","ngClass","nzDisabled"],["class","rounded-bottom",3,"nz
1Value","nzLabel",4,"ngFor","ngForOf"],["class","pt-12px",4,"ngIf"],["class","d-flex text-sm mt-2",4,"ngIf"],["nzPlaceHolder","Investment Account",1,"compact-view","no-placeholder","border-0",3,"formControl","nzShowArrow","nzDisabled"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],[3,"nzLabel","nzValue"],[1,"form-red-warning-wrapper"],[1,"d-flex","align-items-center"],["type","interface-icon/minus-long","width","16px","height","16px",1,"pointer",3,"click"],["type","interface-icon/plus-o","width","16px","height","16px",1,"pointer",3,"ngClass","click"],[1,"mb-0"],[1,"rounded-bottom",3,"nzValue","nzLabel"],[1,"pt-12px"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass",4,"ngIf"],["itemWrapperClass","d-flex align-items-center",3,"info","infoClass","value","valueClass"],[1,"d-flex","text-sm","mt-2"],[1,"pr-2"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-danger","text-sm"],[1,"d-block"],["target","_blank",3,"href"],["nz-row","","nzGutter","16"],["nz-col","",3,"nzSpan"],["nzType","buy","nzSize","large",1,"mx-1","w-100",3,"nzRound","nzBlock","nzLoading","disabled","click"],[1,"border-0",3,"nzLoading","nzActive"],[1,"text-right","right"],[1,"text-left"]],template:function(e,t){if(1&e&&(i.od(0,ne,8,8,"ng-container",0),i.Ec(1,"async"),i.pc(2),i.rc(3,"uic-body",1),i.rc(4,"div",2),i.rc(5,"div",3),i.nc(6,4),i.od(7,oe,1,0,"ng-container",5),i.mc(8,"ui-form-card",6),i.mc(9,"div",7),i.qc(),i.rc(10,"div",8),i.od(11,ie,1,10,"app-bond-calculator-shared-v2",9),i.qc(),i.qc(),i.qc(),i.oc(),i.od(12,ce,37,18,"ng-template",null,10,i.pd),i.od(14,Se,1,2,"ng-template",null,11,i.pd),i.od(16,xe,6,7,"ng-template",null,12,i.pd),i.od(18,Pe,1,2,"ng-template",null,13,i.pd),i.od(20,Ee,2,1,"ng-template",null,14,i.pd),i.od(22,we,2,0,"ng-template",null,15,i.pd),i.od(24,De,2,0,"ng-template",null,16,i.pd),i.od(26,ze,2,0,"ng-template",null,17,i.pd),i.rc(28,"passport-expiry-notification",18),i.zc("onOkEmit",(function(){return t.passportNoticeVisible=!1}))("onUpdateEmit",(function(){return t.passportNoticeVisible=!1})),i.qc()),2&e){const e=i.ad(13),n=i.ad(15),o=i.ad(17);
1i.Mc("ngIf",i.Fc(1,11,t.isMobile$)),i.Ub(3),i.Mc("componentStyleOnly",!0),i.Ub(1),i.Mc("ngClass",t.isMobile?"hide":"d-flex flex-row-reverse"),i.Ub(2),i.Mc("ngTemplateOutlet",e),i.Ub(1),i.Mc("ngTemplateOutlet",t.buySellToggleTemplate),i.Ub(1),i.Mc("formCardBody",n),i.Ub(1),i.Mc("ngTemplateOutlet",o),i.Ub(2),i.Mc("ngIf",null==t.selectedBond?null:t.selectedBond.issueCode),i.Ub(17),i.Mc("modalVisible",t.passportNoticeVisible)("isPopUp",!1)("footerFunc",!0)}},directives:[B.t,I.a,_.c,B.q,_.a,B.A,R.a,k.a,U.a,L.a,l.J,l.u,l.l,V.a,N.c,l.z,l.c,Y.b,l.t,l.i,j.a,H.d,l.j,B.s,H.a,G.a,W.a,Q.b,$.a],pipes:[B.b,B.g,K.a],styles:['.hide[_ngcontent-%COMP%]{display:none}.bottom-sheet-affix[_ngcontent-%COMP%]{width:100%!important;background:#fff;z-index:1050;position:fixed;bottom:0;left:0}.min-vh-100[_ngcontent-%COMP%]{height:100vh}.bond-footer-mobile[_ngcontent-%COMP%]{box-shadow:0 -8px 16px rgba(0,0,0,.24);padding:16px}.bond-footer-mobile[_ngcontent-%COMP%] .swipe-area[_ngcontent-%COMP%] .swipe-line[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center}.bond-footer-mobile[_ngcontent-%COMP%] .swipe-area[_ngcontent-%COMP%] .swipe-line[_ngcontent-%COMP%]:after{content:"";border:2px solid #d3d3d3;width:48px;border-radius:9999px}.bond-footer-mobile[_ngcontent-%COMP%] .h-expand[_ngcontent-%COMP%]{transition:.2s;height:calc(100vh - 320px);overflow-y:scroll}.bond-footer-mobile[_ngcontent-%COMP%] .h-shrink[_ngcontent-%COMP%]{transition:.2s;height:0;overflow:hidden}.hidden[_ngcontent-%COMP%]{display:none!important}.no-arrow[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button, .no-arrow[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none;display:none;margin:0}.orderpad-form[_ngcontent-%COMP%]{border-radius:16px;border:1px solid #e0e0e0;background:#fff;padding:24px!important}.background-grey[_ngcontent-%COMP%]{background-color:#f5f5f5!important}.rounded-8px[_ngcontent-%COMP%]{border-radius:8px}.rounded-top-8px[_ngcontent-%COMP%]{border-top-left-radius:8px;border-top-right-radius:8px}.rounded-bottom-8px[_ngcontent-%COMP%]{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.h-45px[_ngcontent-%COMP%]{height:45px}.input-text[_ngcontent-%COMP%]{color:#282828;font-size:14px;font-weight:600}.input-label[_ngcontent-%COMP%], .input-text[_ngcontent-%COMP%]{font-style:normal;line-height:normal}.input-label[_ngcontent-%COMP%]{color:#616161;font-size:12px;font-weight:400}.arrow-icon[_ngcontent-%COMP%]{padding:0 5px;height:16px;width:26px}.bid-price-wrapper[_ngcontent-%COMP%]{border:1px solid transparent;padding:8px}.active-bid-price-wrapper[_ngcontent-%COMP%]{background:#fff5f6;padding:8px}.active-bid-price-wrapper.bottom-border[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.border-loss-color[_ngcontent-%COMP%]{border-left:1px solid #ff333a;border-right:1px solid #ff333a}.border-loss-color.top[_ngcontent-%COMP%]{border-top:1px solid #ff333a}.border-loss-color.bottom[_ngcontent-%COMP%]{border-bottom:1px solid #ff333a}.active-ask-price-wrapper[_ngcontent-%COMP%]{background:#edf9f3;padding:8px}.active-ask-price-wrapper.bottom-border[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.ask-price-wrapper[_ngcontent-%COMP%]{border:1px solid transparent;padding:8px}.border-profit-color[_ngcontent-%COMP%]{border-left:1px solid #093;border-right:1px solid #093}.border-profit-color.top[_ngcontent-%COMP%]{border-top:1px solid #093}.border-profit-color.bottom[_ngcontent-%COMP%]{border-bottom:1px solid #093}.center-text[_ngcontent-%COMP%]{text-align:center}.bid-yield-line[_ngcontent-%COMP%]{background-size:100% 5px;background:linear-gradient(90deg,#093 var(--ask-percent),#ff333a var(--bid-percent)) no-repeat;height:5px;width:100%}.profit-bg-custom[_ngcontent-%COMP%]{background:linear-gradient(270deg,#eafeef var(--fill-percent),#fff var(--fill-percent))}.loss-bg-custom[_ngcontent-%COMP%]{background:linear-gradient(90deg,#fdf5f6 var(--fill-percent),#fff var(--fill-percent))}.text-profit[_ngcontent-%COMP%]{color:#093!important}.text-loss[_ngcontent-%COMP%]{color:#ff333a!important}.right[_ngcontent-%COMP%]{float:right;padding-right:5px}.ask-percent[_ngcontent-%COMP%]{padding-left:5px}.bid-yield[_ngcontent-%COMP%]{padding-right:2px!important}.ask-yield[_ngcontent-%COMP%]{padding-left:2px!important}.font-style-normal[_ngcontent-%COMP%]{font-style:normal}.text-content-tertiary[_ngcontent-%COMP%]{color:#616161}.text-content-primary[_ngcontent-%COMP%]{color:#282828}.error-bg[_ngcontent-%COMP%]{background-color:#f9edec!important}.border-radius-8px[_ngcontent-%COMP%]{border-radius:8px}']}
1),Object(o.c)([Object(a.e)(C.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},kd8c:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("coHg"),i=n("zRW6"),l=n("fXoL"),a=n("W7Oe"),c=n("iJSt");let s=(()=>{class e{constructor(e,t){this.bondRestService=e,this.articleRestService=t}getBondInfo(e){return this.bondRestService.getBondInfo(e)}findArticles(e){return this.articleRestService.getLatestRcmsArticleListByCriteria({categoryList:[o.b.BONDS],includeChinese:!1,limit:e}).pipe(Object(i.b)())}getBondLatestAskBidPriceList(e){return this.bondRestService.getBondLatestAskBidPriceList(e)}getYearsCompareCurrent(e){if(e){const t=new Date(e),n=new Date;let o=12*(t.getFullYear()-n.getFullYear());o-=n.getMonth(),o+=t.getMonth();let i=0;for(;o>=12;)i+=1,o-=12;return i+(o>0?"Y "+o+"M":" Years")}return"-"}getBondFeatureImgSrc(e){switch(e){case"Additional Note":return"./assets/images/bond-feature/additional-note.svg";case"Cessation/Suspension of Trading Put":return"./assets/images/bond-feature/cessation-put.svg";case"Change of Control Call":return"./assets/images/bond-feature/change-put-call.svg";case"Change of Control Put":return"./assets/images/bond-feature/change-control-put.svg";case"Coupon Step-Up":return"./assets/images/bond-feature/coupon-step.svg";case"Deferred Interest Payment":return"./assets/images/bond-feature/deferral-interest-payment.svg";case"Equity Call":return"./assets/images/bond-feature/equity-call.svg";case"Exchangeable":return"./assets/images/bond-feature/exchangeable.svg";case"Extendable Tenure":return"./assets/images/bond-feature/extendable-tenor.svg";case"Holder Put":return"./assets/images/bond-feature/holder-put.svg";case"Interest Reserve":return"./assets/images/bond-feature/interest-reserve.svg";case"Issuer Call":return"./assets/images/bond-feature/issuer-call.svg";case"Keepwell Deed":return"./assets/images/bond-feature/keepwell-deed.svg";case"Stand by Letter of Credit":return"./assets/images/bond-feature/letter-credit.svg";case"Letter of Support":return"./assets/images/bond-feature/letter-support.svg";case"Loss Absorption":return"./assets/images/bond-feature/loss-absorption.svg";case"Make-Whole Call":return"./assets/images/bond-feature/make-whole-call.svg";default:return"./assets/images/bond-feature/icon-high-complexity.svg"}}}return e.\u0275fac=function(t){return new(t||e)(l.vc(a.a),l.vc(c.a))},e.\u0275prov=l.hc({token:e,factory:e.\u0275fac,providedIn:"any"}),e})()},m9O6:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n("mrSG"),i=n("AcyG"),l=n("gFZo"),a=n("fXoL"),c=n("ofXK"),s=n("5vDB");function r(e,t){1&e&&a.nc(0)}function d(e,t){if(1&e&&a.mc(0,"nz-divider",5),2&e){const e=a.Dc();a.Mc("ngClass",e.notFirst?"grey":"")}}function u(e,t){1&e&&a.nc(0)}let p=(()=>{class e{constructor(){this.mobileView=!1,this.showDash=!0,this.notFirst=!1}ngOnInit(){this.isMobile$.subscribe(e=>{this.mobileView=e})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=a.fc({type:e,selectors:[["uic-coupon-cashflow"]],inputs:{dateTemplate:"dateTemplate",contentTemplate:"contentTemplate",showDash:"showDash",notFirst:"notFirst"},decls:6,vars:4,consts:[[1,"flow"],[4,"ngTemplateOutlet"],[1,"line-container"],[1,"custom-dot",3,"ngClass"],["nzType","vertical","class","line","nzDashed","",3,"ngClass",4,"ngIf"],["nzType","vertical","nzDashed","",1,"line",3,"ngClass"]],template:function(e,t){1&e&&(a.rc(0,"div",0),a.od(1,r,1,0,"ng-container",1),a.rc(2,"div",2),a.mc(3,"div",3),a.od(4,d,1,1,"nz-divider",4),a.qc(),a.od(5,u,1,0,"ng-container",1),a.qc()),2&e&&(a.Ub(1),a.Mc("ngTemplateOutlet",t.dateTemplate),a.Ub(2),a.Mc("ngClass",t.notFirst?"grey":""),a.Ub(1),a.Mc("ngIf",t.showDash),a.Ub(1),a.Mc("ngTemplateOutlet",t.contentTemplate))},directives:[c.A,c.q,c.t,s.a],styles:['.flow[_ngcontent-%COMP%]{align-items:flex-start;gap:12px}.flow[_ngcontent-%COMP%], .flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%]{display:flex;align-self:stretch}.flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%]{flex-direction:column;align-items:center}.flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%] .custom-dot[_ng
1content-%COMP%]{height:18px;width:18px;background:#fff;border-radius:50%;border:1px solid #00a838;position:relative;display:block}.flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%] .custom-dot[_ngcontent-%COMP%]:before{border-radius:50%;background:#00a838;position:absolute;height:11px;width:11px;top:50%;left:50%;transform:translate(-50%,-50%);content:""}.flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%] .custom-dot.grey[_ngcontent-%COMP%]{border:1px solid #292929}.flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%] .custom-dot.grey[_ngcontent-%COMP%]:before{background:#616161}.flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{stroke-width:1px;border-color:#00a838;flex:1 0 0}.flow[_ngcontent-%COMP%] .line-container[_ngcontent-%COMP%] .line.grey[_ngcontent-%COMP%]{border-color:#616161}.flow[_ngcontent-%COMP%] .date-containter[_ngcontent-%COMP%]{width:100%;gap:15px;display:flex;flex-direction:column}.flow[_ngcontent-%COMP%] .date-containter[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-size:14px}']}),Object(o.c)([Object(i.e)(l.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},mPOW:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var o=n("mrSG"),i=n("fXoL"),l=n("6h7t"),a=n("6n/F"),c=n("qTPb"),s=n("AcyG"),r=n("gFZo"),d=n("ofXK"),u=n("MV2b"),p=n("W7Oe"),h=n("B+r4"),b=n("kAVD"),m=n("wCsM");const g=function(e){return{container:e}};function f(e,t){if(1&e){const e=i.sc();i.rc(0,"div",2),i.rc(1,"div",3),i.rc(2,"div",4),i.Ec(3,"async"),i.rc(4,"highcharts-chart",5),i.zc("updateChange",(function(t){return i.dd(e),i.Dc().updateFlag=t}))("chartInstance",(function(t){return i.dd(e),i.Dc().getChartInstance(t)})),i.qc(),i.qc(),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Ub(2),i.Mc("ngClass",i.Sc(8,g,!i.Fc(3,6,e.isMobile$))),i.Ub(2),i.Mc("Highcharts",e.Highcharts)("options",e.chartOptions)("runOutsideAngular",!0)("oneToOne",!0)("update",e.updateFlag)}}function v(e,t){if(1&e){const e=i.sc();i.rc(0,"div",4),i.rc(1,"uic-segmented",6),i.zc("selectionChange",(function(t){return i.dd(e),i.Dc().populateData(t)})),i.qc(),i.qc()}if(2&e){const e=i.Dc();i.Mc("ngClass","chart-tab chart-period"),i.Ub(1),i.Mc("options",e.ONE_DAY_PERIOD_TABS)("selectedValue",e.selectedPeriod)}}let y=(()=>{class e{constructor(e,t){this.bondRestService=e,this.elementRef=t,this.isPeriodTabRight=!1,this.showChartData=!0,this.showChart=!1,this.chartOutput=new i.s,this.dateFormat="dd MMM yyyy",this.PERIOD_TABS=[{label:"1D",value:"ONE_DAY",key:"ONE_DAY"},{label:"1M",value:"ONE_MONTH",key:"ONE_MONTH",dateRange:[u.a.ONE_MONTH_AGO,u.a.TODAY]},{label:"6M",value:"SIX_MONTH",key:"SIX_MONTH",dateRange:[u.a.SIX_MONTHS_AGO,u.a.TODAY]},{label:"1Y",value:"ONE_YEAR",key:"ONE_YEAR",dateRange:[u.a.ONE_YEAR_AGO,u.a.TODAY]},{label:"3Y",value:"THREE_YEAR",key:"THREE_YEAR",dateRange:[u.a.THREE_YEARS_AGO,u.a.TODAY]},{label:"Since Inception",value:"SINCE_INCEPTION",key:"SINCE_INCEPTION"}],this.OTC_SELL_PERIOD_TABS=[{label:"1M",value:"ONE_MONTH",key:"ONE_MONTH",dateRange:[u.a.ONE_MONTH_AGO,u.a.TODAY]},{label:"6M",value:"SIX_MONTH",key:"SIX_MONTH",dateRange:[u.a.SIX_MONTHS_AGO,u.a.TODAY]},{label:"1Y",value:"ONE_YEAR",key:"ONE_YEAR",dateRange:[u.a.ONE_YEAR_AGO,u.a.TODAY]},{label:"3Y",value:"THREE_YEAR",key:"THREE_YEAR",dateRange:[u.a.THREE_YEARS_AGO,u.a.TODAY]},{label:"Since Inception",value:"SINCE_INCEPTION",key:"SINCE_INCEPTION"}],this.ONE_DAY_PERIOD_TABS=[{label:"1D",value:"ONE_DAY",key:"ONE_DAY"}],this.Highcharts=a,this.chartOptions={xAxis:{crosshair:{width:1,color:"#dadada"},type:l.f.DATETIME,lineWidth:2,lineColor:"#ccc"},yAxis:{title:null},legend:{enabled:!0},title:{text:""},tooltip:{shared:!0,formatter(){return this.points.reduce((e,t)=>{var n,o,i,a;return e+'<br/> <b style="color: '+t.color+'">'+t.series.name+": "+Object(d.L)(t.y,l.a.LOCALE_EN,"1.3-3")+("Percentage"===(null===(o=null===(n=t.series.userOptions)||void 0===n?void 0:n.formatter)||void 0===o?void 0:o.format)?null===(a=null===(i=t.series.userOptions)||void 0===i?void 0:i.formatter)||void 0===a?void 0:a.value:"")+"</b>"},"<small>"+Object(d.K)(Object(c.a)(this.x),l.a.DATE_FORMAT,l.a.LOCALE_EN)+"</small>")}},credits:Object.assign({},l.f.CREDIT_CONFIG),chart:Object.assign({reflow:!0,events:{render(){setTimeout(()=>{this.reflow()},0)}}},l.f.ZOOM_OPTIONS),plotOptions:{area:{lineColor:"#004BAD",fillColor:{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,"rgba(144, 175, 214, 0.4)"],[1,"rgba(255, 255, 255, 0.5)"]]}},series:{marker:{enabled:!1}}}}}displayPeriodTabsControl(e){return e?this.PERIOD_TABS:this.OTC_SELL_PERIOD_TABS}ngOnChanges(e){this.chartOptions&&this.populateData(this.displayPeriodTabsControl(this.show1Dselection)[0].value),
1console.log(e)}ngOnInit(){this.populateData(this.displayPeriodTabsControl(this.show1Dselection)[0].value)}getTooltipFormatterY(){var e;if(this.tooltipFormatterY){if("Percentage"===this.tooltipFormatterY)return"%";if("Currency"===this.tooltipFormatterY)return null===(e=this.bondInfoModel)||void 0===e?void 0:e.bondCurrencyCode}return""}changeChartDataOnPeriod(e){this.populateData(this.PERIOD_TABS[e].value)}populateData(e){console.log(this.chartDataMap),console.log(this.bondIntraDataModel),console.log(this.selectedPeriod),this.selectedPeriod=e;const t={};this.bondIntraDataModel&&this.selectedPeriod==this.PERIOD_TABS[0].value?this.populateIntradayDisplayChartData(this.bondIntraDataModel):(this.chartOptions.xAxis.min=null,this.chartOptions.xAxis.max=null,this.chartOptions.xAxis.tickInterval=null,t.chartData=this.chartDataMap?this.chartDataMap[this.selectedPeriod]:[],t.chartDisplayModel=this.chartDisplayModelMap?this.chartDisplayModelMap[this.selectedPeriod]:null,this.populateDisplayData(t.chartDisplayModel),this.populateChartData(t.chartData))}populateDisplayData(e){this.bondFactSheetChartDisplayData=e}populateIntradayDisplayChartData(e){var t,n,o,i;this.chartOptions.xAxis.min=this.convertIntraDate(null===(t=this.bondIntraDataModel)||void 0===t?void 0:t.startTime),this.chartOptions.xAxis.max=this.convertIntraDate(null===(n=this.bondIntraDataModel)||void 0===n?void 0:n.endTime),this.chartOptions.xAxis.tickInterval=36e5;const l=[],a=[];if((null===(o=null==e?void 0:e.seriesDataList)||void 0===o?void 0:o.length)>0){for(let o=e.seriesDataList.length;o>0;o--){let t=o-1;console.log(new Date(e.seriesDataList[t][0])),console.log(e.seriesDataList[t][1]),a.push([this.convertIntraDate(e.seriesDataList[t][0]),e.seriesDataList[t][1]])}let t=this.getCurrentDate(),n=a.length-1;if(n>-1){let e=a[n];t>e[0]&&a.push([t,e[1]])}}l.push({type:"area",name:null===(i=this.bondInfoModel)||void 0===i?void 0:i.bondName,data:a}),this.chartOptions.series=[...l],this.updateFlag=!0;const c=l[0].data.map(e=>e[1]),s=Math.min(...c),r=Math.max(...c);console.log(s+" + "+r);const d=Math.max(.1*(r-s),.05);this.chartOptions.yAxis.min=s-d,this.chartOptions.yAxis.max=r+d,this.chart&&this.chart.reflow()}populateChartData(e){let t=[];e&&e.forEach(e=>{t.push({type:"line",name:e.name,data:this.convertChartSeriesShowDate(e.data),formatter:{format:this.tooltipFormatterY,value:this.getTooltipFormatterY()}})}),this.chartOptions.series=t,this.updateFlag=!0,this.chart&&this.chart.reflow()}convertChartSeriesShowDate(e){const t=[];return e.forEach(e=>{t.push([Object(c.a)(new Date(e[0])),e[1]])}),t}getClassProfitLoss(e){return e>0?" text-profit":e<0?" text-loss":""}getChartInstance(e){this.chart=e,this.chart.reflow(),this.chartOutput.emit(this.chart)}convertIntraDate(e){return e instanceof Date||(e=new Date(e)),console.log(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),0)),Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),0)}getCurrentDate(){let e=Date.now(),t=Math.floor(e/6e4);const n=new Date(60*t*1e3);return Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),0)}}return e.\u0275fac=function(t){return new(t||e)(i.lc(p.a),i.lc(i.q))},e.\u0275cmp=i.fc({type:e,selectors:[["bond-rmo-orderpad-chart"]],inputs:{chartDisplayModelMap:"chartDisplayModelMap",chartDataMap:"chartDataMap",tooltipFormatterY:"tooltipFormatterY",bondInfoModel:"bondInfoModel",bondIntraDataModel:"bondIntraDataModel",chartType:"chartType",isPeriodTabRight:"isPeriodTabRight",showChartData:"showChartData",show1Dselection:"show1Dselection",periodTabClass:"periodTabClass",showChart:"showChart"},outputs:{chartOutput:"chartOutput"},features:[i.Sb],decls:4,vars:1,consts:[["nz-row","","class","w-100 mt-3",4,"ngIf"],["chartPeriods",""],["nz-row","",1,"w-100","mt-3"],["nz-col","","nzSpan","24",1,"pb-1","text-center","w-100","d-block"],[3,"ngClass"],[1,"d-block","text-center","px-3",3,"Highcharts","options","runOutsideAngular","oneToOne","update","updateChange","chartInstance"],["name","segmentedGroup",3,"options","selectedValue","selectionChange"]],template:function(e,t){1&e&&(i.od(0,f,5,10,"div",0),i.nc(1),i.od(2,v,2,3,"ng-template",null,1,i.pd)),2&e&&i.Mc("ngIf",t.showChart)},directives:[d.t,h.c,h.a,d.q,b.a,m.a],pipes:[d.b],styles:[".max-width-limit[_ngcontent-%COMP%]{max-width:750px} .ant-radio-button-wrapper{border-radius:20px}.chart-tab[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap}.chart-tab[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{flex-grow:1;text-align:center;font-color:#7A7A7A}
1.chart-tab.chart-period[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.chart-tab.chart-period[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border-radius:15px;font-size:12px;background:#fff}.chart-tab.chart-period[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]{box-shadow:none;color:#fff}.chart-tab.chart-period[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled){background:var(--black)!important}.chart-tab.chart-period[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled) span[_ngcontent-%COMP%]{color:#fff!important}.chart-tab.chart-period[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled):hover{box-shadow:0 3px 8px 0 rgba(0,0,0,.5)}.chart-tab[_ngcontent-%COMP%] .ant-radio-button-wrapper[_ngcontent-%COMP%]{border-radius:8px;font-size:14px;font-weight:600}.chart-tab[_ngcontent-%COMP%] .ant-radio-button-wrapper[_ngcontent-%COMP%]:hover{color:var(--black)}.chart-tab.ant-radio-group-small[_ngcontent-%COMP%] .ant-radio-button-wrapper[_ngcontent-%COMP%]{padding:0 8px;margin:0 2px}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%]{border-radius:8px;padding:4px 6px}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]{box-shadow:none}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled){color:var(--black)!important;background:#fff}.chart-tab.ant-radio-group-solid[_ngcontent-%COMP%] .ant-radio-button-wrapper-checked[_ngcontent-%COMP%]:not(.ant-radio-button-wrapper-disabled):hover{box-shadow:0 3px 8px 0 rgba(0,0,0,.5)}.chart-tab[_ngcontent-%COMP%] .highcharts-container.fullscreen[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%}"]}),Object(o.c)([Object(s.e)(r.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},"mo+6":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("mrSG"),i=n("AcyG"),l=n("gFZo"),a=n("fXoL"),c=n("ofXK");let s=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=a.fc({type:e,selectors:[["app-bond-live-streaming-tag"]],decls:5,vars:3,consts:[[1,"bond-status-tag",3,"ngClass"],["src","assets/images/shared/live-streaming.svg","alt","edit"]],template:function(e,t){1&e&&(a.rc(0,"div",0),a.Ec(1,"async"),a.mc(2,"img",1),a.rc(3,"span"),a.qd(4,"LIVE"),a.qc(),a.qc()),2&e&&a.Mc("ngClass",a.Fc(1,1,t.isMobile$)?"mobile":"")},directives:[c.q],pipes:[c.b],styles:[".bond-status-tag[_ngcontent-%COMP%]{padding:2px 4px;display:flex;width:-moz-fit-content;width:fit-content;align-items:center;gap:4px;border:1px solid #00a838;border-radius:4px;color:#00a838;font-size:13px}.bond-status-tag.mobile[_ngcontent-%COMP%]{font-size:11px}"]}),Object(o.c)([Object(i.e)(l.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},qH5C:function(e,t,n){"use strict";n.d(t,"a",(function(){return ie}));var o=n("mrSG"),i=n("IzEk"),l=n("bOdf"),a=n("eIep"),c=n("vkgz"),s=n("lJxs"),r=n("6h7t"),d=n("2VHv"),u=n("hRIC"),p=n("gFZo"),h=n("AcyG"),b=n("ofXK"),m=n("MV2b"),g=n("G/fY"),f=n("fXoL"),v=n("W7Oe"),y=n("Na7k"),C=n("FD1F"),M=n("yPVp"),T=n("qAZ0"),O=n("FwiY"),B=n("nJia"),S=n("45Og");const x=function(e){return{title:"Next Call Date",value:e}};function P(e,t){if(1&e&&(f.nc(0,2),f.Ec(1,"sdate")),2&e){const e=f.Dc(),t=f.ad(29);f.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",f.Sc(4,x,f.Fc(1,2,null==e.bondCalculatorData?null:e.bondCalculatorData.callDate)))}}const E=function(e){return{title:"Payable Amount (Bond Currency)",withBreakdown:!0,value:e}};function w(e,t){if(1&e&&(f.nc(0,2),f.Ec(1,"number")),2&e){const e=f.Dc(),t=f.ad(29);f.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",f.Sc(5,E,(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" "+f.Gc(1,2,e.estTotalAmtPayable,"1.2-2")))}}const D=function(e){return{title:"Estimated Payable Amount (Bond Currency)",withBreakdown:!0,value:e,estPayRemark:!0}};function z(e,t){if(1&e&&(f.nc(0,2),f.Ec(1,"number")),2&e){const e=f.Dc(),t=f.ad(29);f.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",f.Sc(5,D,(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" "+f.Gc(1,2,e.estTotalAmtPayable,"1.2-2")))}}const A=function(e,t){return{title:e,value:t,bufferRemark:!0}};function F(e,t){if(1&e&&(f.nc(0,2),f.Ec(1,"number")),2&e){const e=f.Dc(),t=f.ad(29);f.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",f.Tc(5,A,"Buffer Amount ("+e.bufferRate+"%)",(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" "+f.Gc(1,2,e.buffer,"1.2-2")))}}const q=function(e){return{title:"FX Conversion Rate",value:e}};function I(e,t){if(1&e&&f.nc(0,2),2&e){const e=f.Dc(),t=f.ad(29);f.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",f.Sc(2,q,"1 "+(null==e.selectedBond?null:e.selectedBond.bondCurrencyCode)+" = "+e.fxRate+" "+(null==e.bondExpressTransactionModel?null:e.bondExpressTransactionModel.paymentCurrency)))}}
1const _=function(e){return{title:"Estimated Payable Amount (Investment Currency)",value:e}};function R(e,t){if(1&e&&(f.pc(0),f.nc(1,2),f.Ec(2,"number"),f.oc()),2&e){const e=f.Dc(),t=f.ad(29);f.Ub(1),f.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",f.Sc(5,_,(null==e.bondExpressTransactionModel?null:e.bondExpressTransactionModel.paymentCurrency)+" "+f.Gc(2,2,e.estTotalAmtPayable*e.fxRate,"1.2-2")))}}function k(e,t){if(1&e&&f.mc(0,"i",16),2&e){f.Dc(2);const e=f.ad(33);f.Mc("nzTooltipTitle",e)}}function U(e,t){if(1&e&&f.mc(0,"i",16),2&e){f.Dc(2);const e=f.ad(31);f.Mc("nzTooltipTitle",e)}}function L(e,t){1&e&&f.mc(0,"i",17)}function V(e,t){1&e&&f.mc(0,"i",18)}const N=function(e){return{"with-breakdown":e}},Y=function(e){return{"text-profit":e}};function j(e,t){if(1&e&&(f.rc(0,"div",10),f.rc(1,"span",11),f.qd(2),f.qc(),f.rc(3,"strong",12),f.qd(4),f.od(5,k,1,1,"i",13),f.od(6,U,1,1,"i",13),f.od(7,L,1,0,"i",14),f.od(8,V,1,0,"i",15),f.qc(),f.qc()),2&e){const e=t.title,n=t.value,o=t.remark,i=t.accruedInterest,l=t.bufferRemark,a=t.estPayRemark,c=t.valueColor;f.Mc("ngClass",f.Sc(8,N,t.withBreakdown)),f.Ub(2),f.rd(e),f.Ub(1),f.Mc("ngClass",f.Sc(10,Y,c)),f.Ub(1),f.sd("",n," "),f.Ub(1),f.Mc("ngIf",o),f.Ub(1),f.Mc("ngIf",i),f.Ub(1),f.Mc("ngIf",a),f.Ub(1),f.Mc("ngIf",l)}}function H(e,t){1&e&&f.qd(0," Accrued Interest is calculated based on the settlement date ( T day) of the bond.\n")}function G(e,t){if(1&e&&f.qd(0),2&e){const e=f.Dc();f.sd(" Either FSMOne Rewards Program or promotional sales charge (whichever is lower, where applicable) will be reflected here. ",e.systemSstRate>0?"8% SST, applicable to the Processing Fee.":"","\n")}}const W=function(e){return{title:"Investment Account",value:e}},Q=function(){return{title:"Action",value:"BUY",valueColor:!0}},$=function(){return{title:"Order Type",value:"Bond Express"}},K=function(e){return{title:"Payment Method",value:e}},X=function(e){return{title:"Nominal Value",value:e}},J=function(e){return{title:"Live Ask Price",value:e}},Z=function(e,t){return{title:e,value:t}},ee=function(e){return{title:"Principal Amount",value:e}},te=function(e){return{title:"Accrued Interest",value:e,accruedInterest:!0}},ne=function(e){return{title:"Processing Fee (Incl. of SST)",value:e,remark:!0}},oe=function(e){return{title:"Platform Fee Rate",value:e}};let ie=(()=>{class e{constructor(e,t,n,o,i,l){this.bondRestService=e,this.bondCalculatorService=t,this.transactionBondExpressService=n,this.subHandlingService=o,this.foreignExchangeRestService=i,this.utilityRestService=l,this.AUTO_SWEEP=g.a.AUTO_SWEEP,this.processingFee=0,this.totalPurchaseAmount=0,this.totalPurchaseAmountFx=0,this.accruedInt=0,this.principalAmount=0,this.nextCallEnabled=!1,this.buffer=0,this.systemSstRate=0}ngOnInit(){this.getSystemSstRate(),this.getBondPurchaseData(),this.refreshDataInterval=setInterval(()=>{this.getBondPurchaseData()},1e4)}getSystemSstRate(){this.utilityRestService.getSstRate().pipe(Object(i.a)(1)).subscribe(e=>{e.status===r.a.RESPONSE_SUCCESS?this.systemSstRate=e.data:console.error("[getSystemSstRate] error retrieving system sst rate")})}getBondPurchaseData(){console.log(this.bondExpressTransactionModel),console.log(this.estTotalAmtPayable),console.log(this.bondCalculatorData),this.isRefreshing=!0,this.subHandlingService.once(this.getBondExpressDetail().pipe(Object(l.a)(()=>{var e,t,n,o,i,l,a,c,s;return this.accruedInt=this.calculateAccruedInterest(null===(e=this.bondExpressTransactionModel)||void 0===e?void 0:e.buyQuantity,null===(t=this.bondCalculatorData)||void 0===t?void 0:t.aiPercentage),this.principalAmount=(null===(n=this.bondExpressTransactionModel)||void 0===n?void 0:n.buyQuantity)*((null===(o=this.selectedBond)||void 0===o?void 0:o.offerPrice)/100),this.transactionBondExpressService.getBondProcessingFee(null===(i=this.bondExpressTransactionModel)||void 0===i?void 0:i.buyQuantity,null===(l=this.selectedBond)||void 0===l?void 0:l.bondCurrencyCode,null===(a=this.selectedBond)||void 0===a?void 0:a.bondCurrencyCode,null===(c=this.bondExpressTransactionModel)||void 0===c?void 0:c.refno,null===(s=this.selectedBond)||void 0===s?void 0:s.issueCode)}),Object(a.a)(e=>{var t,n,o,i;return this.processingFee=e,(null===(t=this.bondExpressTransactionModel)||void 0===t?void 0:t.paymentCurrency)!==(null===(n=this.selectedBond)||void 0===n?void 0:n.bondCurrencyCode)?this.transactionBondExpressService.getBondTotalPurchaseAmountFx(this.principalAmount,this.accruedInt,this.processingFee,null===(o=this.selectedBond)||void 0===o?void 0:o.bondCurrencyCode,null===(i=this.bondExpressTransactionModel)||void 0===i?void 0:i.paymentCurrency):this.transactionBondExpressService.getBondTotalPurchaseAmount(this.principalAmount,this.accruedInt,this.processingFee)}),Object(c.a)(()=>{var e;this.totalPurchaseAmount=this.transactionBondExpressService.totalAmount,this.totalPurchaseAmountFx=this.transactionBondExpressService.totalAmountFx,this.bondExpressTransactionModel.paymentCurrency!==(null===(e=this.selectedBond)||void 0===e?void 0:e.bondCurrencyCode)?(console.log(this.estTotalAmtPayable),this.buffer=this.estTotalAmtPayable-this.totalPurchaseAmount,this.getFxRate()):(console.log(this.estTotalAmtPayable),this.isRefreshing=!1)})))}getFxRate(){var e,t;this.subHandlingService.once(this.utilityRestService.getFxIndicativeRate(null===(e=this.selectedBond)||void 0===e?void 0:e.bondCurrencyCode,null===(t=this.bondExpressTransactionModel)||void 0===t?void 0:t.paymentCurrency,!0,"ut").pipe(Object(c.a)(e=>{r.a.RESPONSE_SUCCESS===(null==e?void 0:e.status)&&null!=(null==e?void 0:e.data)&&(this.fxRate=null==e?void 0:e.data,this.isRefreshing=!1)})))}getBondExpressDetail(){return this.bondRestService.findBondExpressList("FMY").pipe(Object(s.a)(e=>{var t,n;if((null==e?void 0:e.status)!==r.a.RESPONSE_SUCCESS)return;const o=[...null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.bondWholesaleList,...null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.bondRetailList];if(this.bondExpressTransactionModel){const e=null==o?void 0:o.find(e=>e.issueCode===this.bondExpressTransactionModel.issueCode);this.selectedBond=e}}))}ngOnDestroy(){clearInterval(this.refreshDataInterval)}calculateAccruedInterest(e,t){return this.transactionBondExpressService.calculateAccruedInt(e,t)}calculateNetYtm(){var e,t,n,o,i,l,a,c,s,d,u,p,h;
1if(this.netYtm=100*this.bondCalculatorService.calculateYieldToMaturity(100,Object(b.K)((null===(e=this.bondCalculatorData)||void 0===e?void 0:e.settlementDate)?null===(t=this.bondCalculatorData)||void 0===t?void 0:t.settlementDate:new Date,m.a.DATE_FORMAT,r.a.LOCALE_EN),Object(b.K)(null===(n=this.bondCalculatorData)||void 0===n?void 0:n.maturityDate,m.a.DATE_FORMAT,r.a.LOCALE_EN).toString(),(null===(o=this.bondCalculatorData)||void 0===o?void 0:o.couponRate)/100,parseFloat(null===(i=this.bondCalculatorData)||void 0===i?void 0:i.couponFrequency),null===(l=this.selectedBond)||void 0===l?void 0:l.offerPrice,this.bondCalculatorData.aiPercentage,this.processingFee,(null===(a=this.bondCalculatorData)||void 0===a?void 0:a.platformFee)/100,null===(c=this.bondExpressTransactionModel)||void 0===c?void 0:c.buyQuantity),(null===(s=this.bondCalculatorData)||void 0===s?void 0:s.callDate)&&(null===(d=this.bondCalculatorData)||void 0===d?void 0:d.callValue)){if(new Date(null===(u=this.bondCalculatorData)||void 0===u?void 0:u.callDate)<(this.bondCalculatorData.settlementDate?new Date(this.bondCalculatorData.settlementDate):new Date))return;const e=100*this.bondCalculatorService.calculateYieldToMaturity(this.bondCalculatorData.callValue,Object(b.K)(this.bondCalculatorData.settlementDate?this.bondCalculatorData.settlementDate:new Date,m.a.DATE_FORMAT,r.a.LOCALE_EN),Object(b.K)(this.bondCalculatorData.callDate,m.a.DATE_FORMAT,r.a.LOCALE_EN).toString(),this.bondCalculatorData.couponRate/100,parseFloat(this.bondCalculatorData.couponFrequency),null===(p=this.selectedBond)||void 0===p?void 0:p.offerPrice,this.bondCalculatorData.aiPercentage,this.processingFee,this.bondCalculatorData.platformFee/100,null===(h=this.bondExpressTransactionModel)||void 0===h?void 0:h.buyQuantity);this.netYtm=e,this.nextCallEnabled=!0}}}return e.\u0275fac=function(t){return new(t||e)(f.lc(v.a),f.lc(u.a),f.lc(y.a),f.lc(d.a),f.lc(C.a),f.lc(M.a))},e.\u0275cmp=f.fc({type:e,selectors:[["app-bond-express-buy-preview-order"]],inputs:{bondExpressTransactionModel:"bondExpressTransactionModel",bondCalculatorData:"bondCalculatorData",estTotalAmtPayable:"estTotalAmtPayable",bufferRate:"bufferRate",netYtm:"netYtm",netYieldType:"netYieldType"},features:[f.Tb([d.a,u.a])],decls:34,vars:67,consts:[[3,"nzSpinning"],[1,"post-preview-order-wrapper"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[1,"font-weight-bold","text-sm","mb-0","mt-1"],[1,"break-down"],[4,"ngIf"],["detailInfoTemplate",""],["accruedInterestToolTip",""],["processingFeeTooltip",""],[3,"ngClass"],[1,"text-sm","text-black-8"],[1,"text-base","font-weight-bold",3,"ngClass"],["class","pl-1 text-info pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",3,"nzTooltipTitle",4,"ngIf"],["class","pl-1 text-info pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","The Estimated Payable Amount is the estimated total investment cost to set aside at the current indicative market price or the limit price entered, factoring in a buffer amount, indicative accrued interest, and FSMOne processing fee.","nzType","info-circle",4,"ngIf"],["class","pl-1 text-info pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","The buffer amount is in place to accommodate potential changes in bond prices during execution, accrued interest of the actual settlement date and foreign exchange rates (if applicable).","nzType","info-circle",4,"ngIf"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",1,"pl-1","text-info","pointer",3,"nzTooltipTitle"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","The Estimated Payable Amount is the estimated total investment cost to set aside at the current indicative market price or the limit price entered, factoring in a buffer amount, indicative accrued interest, and FSMOne processing fee.","nzType","info-circle",1,"pl-1","text-info","pointer"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","The buffer amount is in place to accommodate potential changes in bond prices during execution, accrued interest of the actual settlement date and foreign exchange rates (if applicable).","nzType","info-circle",1,"pl-1","text-info","pointer"]],template:function(e,t){if(1&e&&(f.rc(0,"nz-spin",0),f.rc(1,"div",1),f.nc(2,2),f.nc(3,2),f.nc(4,2),f.nc(5,2),f.nc(6,2),f.Ec(7,"number"),f.nc(8,2),f.Ec(9,"number"),f.nc(10,2),f.od(11,P,2,6,"ng-container",3),f.od(12,w,2,7,"ng-container",3),f.od(13,z,2,7,"ng-container",3),f.rc(14,"p",4),f.qd(15,"Breakdown Below:"),f.qc(),f.rc(16,"div",5),f.nc(17,2),f.Ec(18,"number"),f.nc(19,2),f.Ec(20,"number"),f.nc(21,2),f.Ec(22,"number"),f.od(23,F,2,8,"ng-container",3),f.qc(),f.od(24,I,1,4,"ng-container",3),f.od(25,R,3,7,"ng-container",6),f.nc(26,2),f.Ec(27,"number"),f.qc(),f.qc(),f.od(28,j,9,12,"ng-template",null,7,f.pd),f.od(30,H,1,0,"ng-template",null,8,f.pd),f.od(32,G,1,1,"ng-template",null,9,f.pd)),2&e){const e=f.ad(29);f.Mc("nzSpinning",t.isRefreshing),f.Ub(2),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(46,W,null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.refno)),f.Ub(1),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Rc(48,Q)),f.Ub(1),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Rc(49,$)),f.Ub(1),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(50,K,(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentMode)===t.AUTO_SWEEP?(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)+" Auto-Sweep":"Cash Account "+(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency))),f.Ub(1),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(52,X,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+f.Fc(7,29,null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.buyQuantity))),f.Ub(2),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(54,J,f.Gc(9,31,null==t.selectedBond?null:t.selectedBond.offerPrice,"1.3-3"))),f.Ub(2),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Tc(56,Z,"YTM"===t.netYieldType?"Net Yield To Maturity":"Net Yield To Next Call",t.netYtm)),f.Ub(1),f.Mc("ngIf",!(null!=t.bondCalculatorData&&t.bondCalculatorData.callDate)),f.Ub(1),f.Mc("ngIf",(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)===(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)),f.Ub(1),f.Mc("ngIf",(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)!==(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)),f.Ub(4),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(59,ee,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+f.Gc(18,34,t.principalAmount,"1.2-2"))),f.Ub(2),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(61,te,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+f.Gc(20,37,t.accruedInt,"1.2-2"))),f.Ub(2),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(63,ne,(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)+" "+f.Gc(22,40,t.processingFee,"1.2-2"))),f.Ub(2),f.Mc("ngIf",(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)!==(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)),f.Ub(1),f.Mc("ngIf",(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)!==(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)),f.Ub(1),f.Mc("ngIf",(null==t.bondExpressTransactionModel?null:t.bondExpressTransactionModel.paymentCurrency)!==(null==t.selectedBond?null:t.selectedBond.bondCurrencyCode)),f.Ub(1),f.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",f.Sc(65,oe,f.Gc(27,43,null==t.bondCalculatorData?null:t.bondCalculatorData.platformFee,"1.2-2")+"% per annum"))}},directives:[T.a,b.A,b.t,b.q,O.b,B.e],pipes:[b.g,S.a],styles:[".post-preview-order-wrapper[_ngcontent-%COMP%]{margin-bottom:8px}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 0;display:flex;justify-content:space-between;border-bottom:1px dashed var(--black-6)}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--black-6)}.post-preview-order-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{text-align:right}.post-preview-order-wrapper[_ngcontent-%COMP%] .with-breakdown[_ngcontent-%COMP%]{border-bottom:none}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%]{display:block;padding-top:2px}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:2px 0;display:flex;font-size:12px!important;justify-content:space-between}.post-preview-order-wrapper[_ngcontent-%COMP%] .break-down[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .text-sm[_ngcontent-%COMP%]{font-size:12px!important}"]}),Object(o.c)([Object(h.e)(p.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},qTPb:function(e,t,n){"use strict";function o(e){return e instanceof Date||(e=new Date(e)),Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}n.d(t,"a",(function(){return o}
1))},qf4f:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n("fXoL");let i=(()=>{class e{initDefaultBondSelectorFilterModel(e){return{bondIssuer:["all"],bondSector:["all"],bondSectorSub:["all"],bondType:["all"],bondCurrencyCode:["all"],couponFrequency:["all"],bondCreditRating:["all"],bondSuitability:["all"],investmentPrincipal:null,yieldMaturityMinValue:null,yieldWorstMinValue:null,yearsMaturityMinValue:null,couponRateMinValue:null,minInvestmentMinValue:null,yieldMaturityMaxValue:null,yieldWorstMaxValue:null,yearsMaturityMaxValue:null,couponRateMaxValue:null,minInvestmentMaxValue:null,minMaturityYear:null,maxMaturityYear:null,page:0,newBond:null,maxResultLimit:10,isSovereign:e,issueCode:null,couponRateList:[],yieldToMaturityList:[],yearsToMaturityList:[],yieldToWorstList:[],productCategory:[],issueCodeList:[],period:null,totalResultLimit:0,pageNum:null,limitNum:null,isFullLot:null,isOddLot:null,isRetailBond:null}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.hc({token:e,factory:e.\u0275fac,providedIn:"any"}),e})()},uL2V:function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var o=n("mrSG"),i=n("2VHv"),l=n("6n/F"),a=n("vkgz"),c=n("AcyG"),s=n("gFZo"),r=n("fXoL"),d=n("gJKs"),u=n("ofXK"),p=n("B+r4"),h=n("kAVD"),b=n("OtHt");function m(e,t){if(1&e&&(r.rc(0,"p",10),r.qd(1,"Currency Conversion Limit"),r.qc()),2&e){const e=r.Dc(2);r.Mc("ngClass",0==e.fepAvailableBalanceModel.availableBalance?"no-balance-text":"normal-balance-text")}}function g(e,t){if(1&e&&(r.rc(0,"p",11),r.rc(1,"span",12),r.qd(2,"Remaining Limit (MYR)"),r.qc(),r.rc(3,"span",13),r.mc(4,"br"),r.qd(5),r.Ec(6,"number"),r.qc(),r.rc(7,"span",14),r.qd(8," out of "),r.qc(),r.rc(9,"span",13),r.qd(10),r.qc(),r.qc()),2&e){const e=r.Dc(2);r.Ub(1),r.Mc("ngClass",0==e.fepAvailableBalanceModel.availableBalance?"no-balance-text":"normal-balance-text"),r.Ub(2),r.Mc("ngClass",0==e.fepAvailableBalanceModel.availableBalance?"no-balance-orange-text":"normal-balance-text"),r.Ub(2),r.rd(r.Gc(6,6,e.availableBalanceWording,"1.2-2")),r.Ub(2),r.Mc("ngClass",0==e.fepAvailableBalanceModel.availableBalance?"no-balance-text":"normal-balance-text"),r.Ub(2),r.Mc("ngClass",0==e.fepAvailableBalanceModel.availableBalance?"no-balance-text":"normal-balance-text"),r.Ub(1),r.rd(e.fcaLimitAmountWording)}}function f(e,t){if(1&e&&(r.rc(0,"p",11),r.rc(1,"span",12),r.qd(2,"Remaining Limit (MYR)"),r.qc(),r.rc(3,"span",13),r.mc(4,"br"),r.qd(5,"Unlimited"),r.qc(),r.qc()),2&e){const e=r.Dc(2);r.Ub(1),r.Mc("ngClass",0==e.fepAvailableBalanceModel.availableBalance?"no-balance-text":"normal-balance-text"),r.Ub(2),r.Mc("ngClass",0==e.fepAvailableBalanceModel.availableBalance?"no-balance-orange-text":"normal-balance-text")}}const v=function(e,t,n,o){return{"no-balance-card":e,"normal-balance-card":t,"mb-3":n,"mb-2":o}};function y(e,t){if(1&e&&(r.rc(0,"div",3),r.Ec(1,"async"),r.Ec(2,"async"),r.od(3,m,2,1,"p",4),r.rc(4,"nz-row"),r.rc(5,"nz-col",5),r.nc(6,6),r.qc(),r.rc(7,"nz-col",7),r.rc(8,"div",8),r.od(9,g,11,9,"p",9),r.od(10,f,6,2,"p",9),r.qc(),r.qc(),r.qc(),r.qc()),2&e){const e=r.Dc(),t=r.ad(2);r.Mc("ngClass",r.Vc(9,v,0==e.fepAvailableBalanceModel.availableBalance,0!=e.fepAvailableBalanceModel.availableBalance,r.Fc(1,5,e.isMobile$),!r.Fc(2,7,e.isMobile$))),r.Ub(3),r.Mc("ngIf",e.isShowHeader),r.Ub(3),r.Mc("ngTemplateOutlet",t),r.Ub(3),r.Mc("ngIf",!e.isUnlimited),r.Ub(1),r.Mc("ngIf",e.isUnlimited)}}function C(e,t){if(1&e){const e=r.sc();r.rc(0,"highcharts-chart",15),r.zc("chartInstance",(function(t){return r.dd(e),r.Dc().getFepBalanceChartInstance(t)}))("updateChange",(function(t){return r.dd(e),r.Dc().updateFepBalanceChart=t})),r.qc()}if(2&e){const e=r.Dc();r.Mc("Highcharts",e.Highcharts)("update",e.updateFepBalanceChart)("oneToOne",!0)("options",e.fepBalanceChartOption)("runOutsideAngular",!0)}}function M(e,t){if(1&e&&r.mc(0,"nz-skeleton",16),2&e){const e=r.Dc();r.Mc("nzActive",!0)("nzLoading",e.loading)}}let T=(()=>{class e{constructor(e,t){this.subHandlingService=e,this.fepRestService=t,this.isShowHeader=!1,this.Highcharts=l,this.updateFepBalanceChart=!1,this.fepBalanceChartColours=["#B4CCEB","#F8F6CE"],this.loading=!1,this.isUnlimited=!1}ngOnInit(){}ngOnChanges(e){this.getFepAvailableBalance(this.refno,this.nric)}getFepAvailableBalance(e,t){this.loading=!0,this.subHandlingService.once(this.fepRestService.getFepBalance({fepHolderNric:this.nric,refno:this.refno}).pipe(Object(a.a)(e=>{var t,n;this.loading=!1,e&&(this.fepAvailableBalanceModel=e.data,this.fepAvailableBalanceModel.fcaLimitAmount>0?(this.fcaLimitAmountWording=1e6==(null===(t=this.fepAvailableBalanceModel)||void 0===t?void 0:t.fcaLimitAmount)?"1M":"50M",this.availableBalanceWording=null===(n=this.fepAvailableBalanceModel)||void 0===n?void 0:n.availableBalance.toFixed(2)):this.isUnlimited=!0,this.constructFepBalanceChart())})))}getFepBalanceChartInstance(e){this.fepBalanceChart=e}constructFepBalanceChart(){let e=this.calculateFepAvailableBalancePercentage();this.fepBalanceChartColours=this.getFepBalanceChartColor(),this.fepBalanceChartOption=this.constructFepBalanceChartConfig(e+"%",this.fepBalanceChartColours,0==this.fepAvailableBalanceModel.availableBalance?"#FE8424":"#ffffff"),this.fepBalanceChartData=[{name:"Remaining Limit",y:Number(e)},{name:"Used Amount",y:100-Number(e)}],this.fepBalanceChartOption.series=[{dataLabels:{enabled:!1},innerSize:"70%",data:this.fepBalanceChartData}],this.updateFepBalanceChart=!0,this.loading=!1}calculateFepAvailableBalancePercentage(){return(this.fepAvailableBalanceModel.availableBalance/(0!==this.fepAvailableBalanceModel.fcaLimitAmount?this.fepAvailableBalanceModel.fcaLimitAmount:1)*100).toFixed(2)}getFepBalanceChartColor(){return 0==this.fepAvailableBalanceModel.availableBalance?["#FE8424"]:["#B4CCEB","#F8F6CE"]}constructFepBalanceChartConfig(e,t,n){return{chart:{type:"pie",margin:0,backgroundColor:"transparent",spacingLeft:0,spacingRight:0,width:120,height:120,events:{load:function(){var t,o=this.plotLeft+this.series[0].center[0],i=this.plotTop+this.series[0].center[1];this.pieCenter=this.renderer.text(e,o,i,!0).css({fontFamily:"SF Pro Text","font-weight":200,color:n,transform:"translateY(38%)",fontSize:"8px","text-align":"center"}).add(),t=this.pieCenter.getBBox(),this.pieCenter.attr({x:o-t.width/2,y:i-t.height/4})},redraw:function(){var t,o=this.plotLeft+this.series[0].center[0],i=this.plotTop+this.series[0].center[1];this.pieCenter=this.renderer.text(e,o,i,!0).css({fontFamily:"SF Pro Text","font-weight":200,color:n,transform:"translateY(38%)",fontSize:"8px","text-align":"center"}).add(),t=this.pieCenter.getBBox(),this.pieCenter.attr({x:o-t.width/2,y:i-t.height/4})}}},exporting:{enabled:!1},title:{text:null},subtitle:{text:""},legend:{borderRadius:0,borderColor:"black",enabled:!0,floating:!0,symbolWi
1dth:8,symbolHeight:8,symbolRadius:8,itemMarginBottom:10},credits:{enabled:!1},plotOptions:{series:{dataLabels:{enabled:!1}},pie:{shadow:!1,innerSize:"50%",center:["50%","50%"],colors:t,dataLabels:{enabled:!0}},exporting:{enabled:!1}},series:[],drilldown:{},tooltip:{enabled:!1}}}}return e.\u0275fac=function(t){return new(t||e)(r.lc(i.a),r.lc(d.a))},e.\u0275cmp=r.fc({type:e,selectors:[["app-fep-balance"]],inputs:{refno:"refno",nric:"nric",isShowHeader:"isShowHeader"},features:[r.Tb([i.a]),r.Sb],decls:5,vars:2,consts:[["class","px-3 py-3",3,"ngClass",4,"ngIf","ngIfElse"],["fepBalanceChartTemplate",""],["loadingTemplate",""],[1,"px-3","py-3",3,"ngClass"],["class","text-sm mb-0 font-weight-bold",3,"ngClass",4,"ngIf"],["nzSpan","10"],[3,"ngTemplateOutlet"],["nzSpan","14",2,"height","120px"],[2,"display","flex","align-items","center","height","100%"],["class","mb-0",4,"ngIf"],[1,"text-sm","mb-0","font-weight-bold",3,"ngClass"],[1,"mb-0"],[1,"text-xs",3,"ngClass"],[1,"font-weight-bold","font-size-18",3,"ngClass"],[1,"opacity-1","font-size-18",3,"ngClass"],[1,"d-print-none",3,"Highcharts","update","oneToOne","options","runOutsideAngular","chartInstance","updateChange"],[3,"nzActive","nzLoading"]],template:function(e,t){if(1&e&&(r.od(0,y,11,14,"div",0),r.od(1,C,1,5,"ng-template",null,1,r.pd),r.od(3,M,1,2,"ng-template",null,2,r.pd)),2&e){const e=r.ad(4);r.Mc("ngIf",!t.loading)("ngIfElse",e)}},directives:[u.t,u.q,p.c,p.a,u.A,h.a,b.a],pipes:[u.b,u.g],styles:[".normal-balance-text[_ngcontent-%COMP%]{color:#ddeaf8;opacity:1}.no-balance-text[_ngcontent-%COMP%]{color:#212121;opacity:1}.no-balance-orange-text[_ngcontent-%COMP%]{color:#fe8424;opacity:1}.normal-balance-card[_ngcontent-%COMP%]{background-color:#0057be;border-radius:8px}.no-balance-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:8px;border-color:#d3d3d3!important;border:solid;border-width:1px}.font-size-18[_ngcontent-%COMP%]{font-size:18px}"]}),Object(o.c)([Object(c.e)(s.a.isMobile)],e.prototype,"isMobile$",void 0),e})()},xIeq:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n("fXoL"),i=n("dEAy");function l(e,t){1&e&&(o.rc(0,"h4",3),o.qd(1,"Definition of Malaysia Resident"),o.qc())}function a(e,t){1&e&&(o.rc(0,"p"),o.rc(1,"b",4),o.qd(2,"\u201cResident\u201d means"),o.qc(),o.qc(),o.rc(3,"ol",5),o.rc(4,"li"),o.qd(5," (a) a citizen of Malaysia, excluding a citizen who has obtained permanent resident status in a country or a territory outside Malaysia and is residing outside Malaysia; "),o.qc(),o.rc(6,"li"),o.qd(7," (b) a non-citizen of Malaysia who has obtained permanent resident status in Malaysia and is ordinarily residing in Malaysia for more than 182 days; "),o.qc(),o.rc(8,"li"),o.qd(9," (c) a body corporate incorporated or established, or registered with or approved by any authority, in Malaysia; "),o.qc(),o.rc(10,"li"),o.qd(11," (d) an unincorporated body registered with or approved by any authority in Malaysia; or "),o.qc(),o.rc(12,"li"),o.qd(13," (e) the Government or any State Government. "),o.qc(),o.qc())}let c=(()=>{class e{constructor(){this.showModal=!1,this.showModalChange=new o.s}closeModal(){this.showModal=!1,this.showModalChange.emit(!1)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.fc({type:e,selectors:[["app-fep-resident-definition-modal"]],inputs:{showModal:"showModal"},outputs:{showModalChange:"showModalChange"},decls:5,vars:6,consts:[["nzWidth","700","nzVisible","true",3,"nzVisible","nzWrapClassName","nzTitle","nzContent","nzFooter","nzCancelText","nzVisibleChange","nzOnOk","nzOnCancel"],["modalTitle",""],["modalContent",""],[1,"rd-header"],[1,"text-xs"],[1,"mb-3","list-unstyled","text-xs"]],template:function(e,t){if(1&e&&(o.rc(0,"nz-modal",0),o.zc("nzVisibleChange",(function(e){return t.showModal=e}))("nzOnOk",(function(){return null}))("nzOnCancel",(function(){return t.closeModal()})),o.od(1,l,2,0,"ng-template",null,1,o.pd),o.od(3,a,14,0,"ng-template",null,2,o.pd),o.qc()),2&e){const e=o.ad(2),n=o.ad(4);o.Mc("nzVisible",t.showModal)("nzWrapClassName","vertical-center-modal")("nzTitle",e)("nzContent",n)("nzFooter",null)("nzCancelText",null)}},directives:[i.a],styles:[".rd-header[_ngcontent-%COMP%]{font-size:17px;margin-bottom:0}"]}),e})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.