You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/angular/6.a0ce69bc4fc32a59e836.js

1 line
256 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{YoDt:function(t,e,n){"use strict";n.r(e),n.d(e,"ECLModule",function(){return Dl});var a=n("SVse"),i=n("iInd"),o=n("8Y7J"),s=n("BTe0");function c(t,e){1&t&&o.Qb(0,"mat-progress-bar",2)}function l(t,e){1&t&&o.Qb(0,"router-outlet")}let r=(()=>{class t{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(t=>{switch(!0){case t instanceof i.e:this.loading=!0;break;case t instanceof i.c:case t instanceof i.b:case t instanceof i.d:this.loading=!1}})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-root"]],decls:2,vars:2,consts:[["color","primary","mode","indeterminate",4,"ngIf"],[4,"ngIf"],["color","primary","mode","indeterminate"]],template:function(t,e){1&t&&(o.Ic(0,c,1,0,"mat-progress-bar",0),o.Ic(1,l,1,0,"router-outlet",1)),2&t&&(o.oc("ngIf",e.loading),o.Db(1),o.oc("ngIf",!e.loading))},directives:[a.o,s.a,i.l],styles:[""]}),t})();var b=n("XNiG"),d=n("1G5W"),u=n("pLZG"),h=n("twK/"),m=n("wHSu"),f=n("7nzP"),p=n("lF6s"),g=n("cpEJ"),y=n("tqRt"),x=n("7bNT"),v=n("7o2P"),S=n("VDRc"),w=n("Nv++"),D=n("40+f"),V=n("PDjf"),C=n("rJgo"),U=n("Dxy4"),I=n("Tj54"),L=n("ura0");const A=function(t){return{backgroundColor:t}};function F(t,e){if(1&t&&o.Qb(0,"span",6),2&t){const t=o.hc();o.oc("ngStyle",o.sc(1,A,t.information.color))}}function k(t,e){if(1&t&&(o.Vb(0,"div"),o.Vb(1,"h4",1),o.Kc(2,"Color"),o.Ub(),o.Vb(3,"div",2),o.Qb(4,"span",7),o.Kc(5),o.ic(6,"uppercase"),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(4),o.oc("ngStyle",o.sc(4,A,t.information.color)),o.Db(1),o.Mc(" ",o.jc(6,2,t.information.color)," ")}}function P(t,e){if(1&t&&(o.Vb(0,"span",2),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(t)}}let O=(()=>{class t{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.chains=[],this.chains.push("Bitcoin "+(this.information.network?this.commonService.titleCase(this.information.network):"Testnet"))}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[o.Bb],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Alias"),o.Ub(),o.Vb(4,"div",2),o.Kc(5),o.Ic(6,F,1,3,"span",3),o.Ub(),o.Ub(),o.Ic(7,k,7,6,"div",4),o.Vb(8,"div"),o.Vb(9,"h4",1),o.Kc(10,"Implementation"),o.Ub(),o.Vb(11,"div",2),o.Kc(12),o.Ub(),o.Ub(),o.Vb(13,"div"),o.Vb(14,"h4",1),o.Kc(15,"Chain"),o.Ub(),o.Ic(16,P,2,1,"span",5),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.Mc(" ",e.information.alias," "),o.Db(1),o.oc("ngIf",!e.showColorFieldSeparately),o.Db(1),o.oc("ngIf",e.showColorFieldSeparately),o.Db(5),o.Lc(e.information.lnImplementation||e.information.version?e.information.lnImplementation+" "+e.information.version:""),o.Db(4),o.oc("ngForOf",e.chains))},directives:[S.c,S.a,S.b,a.o,a.n,a.p,L.b],pipes:[a.y],styles:[""]}),t})(),T=(()=>{class t{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-balances-info"]],inputs:{balances:"balances"},decls:21,vars:11,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["mode","determinate",1,"dashboard-progress-bar",3,"value"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Lightning"),o.Ub(),o.Vb(4,"div",2),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Qb(7,"mat-progress-bar",3),o.Ub(),o.Vb(8,"div"),o.Vb(9,"h4",1),o.Kc(10,"On-chain"),o.Ub(),o.Vb(11,"div",2),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Qb(14,"mat-progress-bar",3),o.Ub(),o.Vb(15,"div"),o.Vb(16,"h4",1),o.Kc(17,"Total"),o.Ub(),o.Vb(18,"div",2),o.Kc(19),o.ic(20,"number"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.Mc("",o.jc(6,5,e.balances.lightning)," Sats"),o.Db(2),o.pc("value",e.balances.lightning/e.balances.total*100),o.Db(5),o.Mc("",o.jc(13,7,e.balances.onchain)," Sats"),o.Db(2),o.pc("value",e.balances.onchain/e.balances.total*100),o.Db(5),o.Mc("",o.jc(20,9,e.balances.total)," Sats"))},directives:[S.c,S.a,S.b,s.a],pipes:[a.f],styles:[""]}),t})();var R=n("Q2Ze"),K=n("ZFy/"),M=n("BSbQ"),E=n("aLe/");function z(t,e){if(1&t&&(o.Vb(0,"div",17),o.Vb(1,"span",18),o.Kc(2),o.ic(3,"slice"),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-hint",19),o.Vb(6,"strong",5),o.Kc(7,"Local:"),o.Ub(),o.Kc(8),o.ic(9,"number"),o.Ub(),o.Vb(10,"mat-hint",20),o.Qb(11,"fa-icon",21),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Vb(14,"mat-hint",22),o.Vb(15,"strong",5),o.Kc(16,"Remote:"),o.Ub(),o.Kc(17),o.ic(18,"number"),o.Ub(),o.Ub(),o.Qb(19,"mat-progress-bar",23),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.pc("matTooltip",t.alias||t.shortChannelId),o.pc("matTooltipDisabled",(t.alias||t.shortChannelId).length<26),o.Db(1),o.Nc("",o.lc(3,9,(null==t?null:t.alias)||(null==t?null:t.shortChannelId),0,24),"",((null==t?null:t.alias)||(null==t?null:t.shortChannelId)).length>25?"...":"",""),o.Db(6),o.Mc("",o.kc(9,13,(null==t?null:t.toLocal)||0,"1.0-0")," Sats"),o.Db(3),o.oc("icon",n.faBalanceScale),o.Db(1),o.Mc(" (",o.jc(13,16,(null==t?null:t.balancedness)||0),") "),o.Db(5),o.Mc("",o.kc(18,18,(null==t?null:t.toRemote)||0,"1.0-0")," Sats"),o.Db(2),o.pc("value",t.toLocal&&t.toLocal>0?+t.toLocal/(+t.toLocal+ +t.toRemote)*100:0)}}function B(t,e){if(1&t&&(o.Vb(0,"div",15),o.Ic(1,z,20,21,"div",16),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngForOf",t.allChannels)}}function q(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",24),o.Kc(1," No channels available. "),o.Vb(2,"button",25),o.dc("click",function(){return o.zc(t),o.hc().goToChannels()}),o.Kc(3,"Open Channel"),o.Ub(),o.Ub()}}let N=(()=>{class t{constructor(t){this.router=t,this.faBalanceScale=m.d,this.faDumbbell=m.l,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy"},decls:26,vars:15,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["fxLayout","column","fxFlex","100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"matTooltip","matTooltipDisabled"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90","color-primary"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90","color-primary"],["matTooltip","Balance Score",1,"color-primary","mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90","color-primary"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"span",2),o.Kc(3,"Total Capacity"),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-hint",4),o.Vb(6,"strong",5),o.Kc(7,"Local:"),o.Ub(),o.Kc(8),o.ic(9,"number"),o.Ub(),o.Vb(10,"mat-hint",6),o.Qb(11,"fa-icon",7),o.Kc(12),o.ic(13,"number"),o.Ub(),o.Vb(14,"mat-hint",8),o.Vb(15,"strong",5),o.Kc(16,"Remote:"),o.Ub(),o.Kc(17),o.ic(18,"number"),o.Ub(),o.Ub(),o.Qb(19,"mat-progress-bar",9),o.Ub(),o.Vb(20,"div",10),o.Qb(21,"mat-divider",11),o.Ub(),o.Vb(22,"div",12),o.Ic(23,B,2,1,"div",13),o.Ub(),o.Ub(),o.Ic(24,q,4,0,"ng-template",null,14,o.Jc)),2&t){const t=o.wc(25);o.Db(8),o.Mc("",o.kc(9,7,e.channelBalances.localBalance||0,"1.0-0")," Sats"),o.Db(3),o.oc("icon",e.faBalanceScale),o.Db(1),o.Mc(" (",o.jc(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),o.Db(5),o.Mc("",o.kc(18,12,e.channelBalances.remoteBalance||0,"1.0-0")," Sats"),o.Db(2),o.pc("value",e.channelBalances.localBalance&&e.channelBalances.localBalance>0?+e.channelBalances.localBalance/(+e.channelBalances.localBalance+ +e.channelBalances.remoteBalance)*100:0),o.Db(4),o.oc("ngIf",e.allChannels&&(null==e.allChannels?null:e.allChannels.length)>0)("ngIfElse",t)}},directives:[S.c,S.b,S.a,R.f,w.a,K.a,s.a,M.a,E.b,a.o,a.n,U.a],pipes:[a.f,a.w],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),t})(),H=(()=>{class t{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){if(this.fees.monthly_fee){this.totalFees=[{name:"Monthly",value:this.fees.monthly_fee},{name:"Weekly",value:this.fees.weekly_fee},{name:"Daily ",value:this.fees.daily_fee}];let t=Math.ceil(Math.log(this.fees.monthly_fee+1)/Math.LN10),e=Math.pow(10,t-1);this.maxFeeValue=Math.ceil(this.fees.monthly_fee/e)*e/5||100,Object.assign(this,this.totalFees)}else this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100,Object.assign(this,this.totalFees)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-fee-info"]],inputs:{fees:"fees"},features:[o.Bb],decls:38,vars:18,consts:[["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Daily"),o.Ub(),o.Vb(4,"div",2),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Ub(),o.Vb(7,"div"),o.Vb(8,"h4",1),o.Kc(9,"Weekly"),o.Ub(),o.Vb(10,"div",2),o.Kc(11),o.ic(12,"number"),o.Ub(),o.Ub(),o.Vb(13,"div"),o.Vb(14,"h4",1),o.Kc(15,"Monthly"),o.Ub(),o.Vb(16,"div",2),o.Kc(17),o.ic(18,"number"),o.Ub(),o.Ub(),o.Ub(),o.Vb(19,"div",0),o.Vb(20,"div"),o.Vb(21,"h4",1),o.Kc(22,"Transactions"),o.Ub(),o.Vb(23,"div",2),o.Kc(24),o.ic(25,"number"),o.Ub(),o.Ub(),o.Vb(26,"div"),o.Vb(27,"h4",1),o.Kc(28,"Transactions"),o.Ub(),o.Vb(29,"div",2),o.Kc(30),o.ic(31,"number"),o.Ub(),o.Ub(),o.Vb(32,"div"),o.Vb(33,"h4",1),o.Kc(34,"Transactions"),o.Ub(),o.Vb(35,"div",2),o.Kc(36),o.ic(37,"number"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.Mc("",o.jc(6,6,null==e.fees?null:e.fees.daily_fee)," Sats"),o.Db(6),o.Mc("",o.jc(12,8,null==e.fees?null:e.fees.weekly_fee)," Sats"),o.Db(6),o.Mc("",o.jc(18,10,null==e.fees?null:e.fees.monthly_fee)," Sats"),o.Db(7),o.Lc(o.jc(25,12,null==e.fees?null:e.fees.daily_txs)),o.Db(6),o.Lc(o.jc(31,14,null==e.fees?null:e.fees.weekly_txs)),o.Db(6),o.Lc(o.jc(37,16,null==e.fees?null:e.fees.monthly_txs)))},directives:[S.c,S.a,S.b],pipes:[a.f],styles:[""]}),t})(),Q=(()=>{class t{constructor(){this.channelsStatus={}}ngOnChanges(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus"},features:[o.Bb],decls:41,vars:18,consts:[["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],[1,"dot","tiny-dot","green"],[1,"dot","tiny-dot","yellow"],[1,"dot","tiny-dot","grey"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div"),o.Vb(2,"h4",1),o.Kc(3,"Active"),o.Ub(),o.Vb(4,"div",2),o.Qb(5,"span",3),o.Kc(6),o.ic(7,"number"),o.Ub(),o.Ub(),o.Vb(8,"div"),o.Vb(9,"h4",1),o.Kc(10,"Pending"),o.Ub(),o.Vb(11,"div",2),o.Qb(12,"span",4),o.Kc(13),o.ic(14,"number"),o.Ub(),o.Ub(),o.Vb(15,"div"),o.Vb(16,"h4",1),o.Kc(17,"Inactive"),o.Ub(),o.Vb(18,"div",2),o.Qb(19,"span",5),o.Kc(20),o.ic(21,"number"),o.Ub(),o.Ub(),o.Ub(),o.Vb(22,"div",0),o.Vb(23,"div"),o.Vb(24,"h4",1),o.Kc(25,"Capacity"),o.Ub(),o.Vb(26,"div",2),o.Kc(27),o.ic(28,"number"),o.Ub(),o.Ub(),o.Vb(29,"div"),o.Vb(30,"h4",1),o.Kc(31,"Capacity"),o.Ub(),o.Vb(32,"div",2),o.Kc(33),o.ic(34,"number"),o.Ub(),o.Ub(),o.Vb(35,"div"),o.Vb(36,"h4",1),o.Kc(37,"Capacity"),o.Ub(),o.Vb(38,"div",2),o.Kc(39),o.ic(40,"number"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(6),o.Lc(o.jc(7,6,(null==e.channelsStatus.active?null:e.channelsStatus.active.channels)||0)),o.Db(7),o.Lc(o.jc(14,8,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.channels)||0)),o.Db(7),o.Lc(o.jc(21,10,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.channels)||0)),o.Db(7),o.Mc("",o.jc(28,12,(null==e.channelsStatus.active?null:e.channelsStatus.active.capacity)||0)," Sats"),o.Db(6),o.Mc("",o.jc(34,14,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.capacity)||0)," Sats"),o.Db(6),o.Mc("",o.jc(40,16,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.capacity)||0)," Sats"))},directives:[S.c,S.a,S.b],pipes:[a.f],styles:[""]}),t})();function j(t,e){if(1&t&&(o.Vb(0,"mat-hint",17),o.Vb(1,"strong",18),o.Kc(2,"Capacity: "),o.Ub(),o.Kc(3),o.ic(4,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(3),o.Mc("",o.kc(4,1,t.toRemote||0,"1.0-0")," Sats")}}function $(t,e){if(1&t&&(o.Vb(0,"mat-hint",17),o.Vb(1,"strong",18),o.Kc(2,"Capacity: "),o.Ub(),o.Kc(3),o.ic(4,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(3),o.Mc("",o.kc(4,1,t.toLocal||0,"1.0-0")," Sats")}}function _(t,e){if(1&t&&o.Qb(0,"mat-progress-bar",19),2&t){const t=o.hc().$implicit,e=o.hc(2);o.pc("value",e.totalLiquidity>0?(+t.toRemote||0)/e.totalLiquidity*100:0)}}function J(t,e){if(1&t&&o.Qb(0,"mat-progress-bar",19),2&t){const t=o.hc().$implicit,e=o.hc(2);o.pc("value",e.totalLiquidity>0?(+t.toLocal||0)/e.totalLiquidity*100:0)}}function X(t,e){if(1&t&&(o.Vb(0,"div",12),o.Vb(1,"span",13),o.Kc(2),o.ic(3,"slice"),o.Ub(),o.Vb(4,"div",14),o.Ic(5,j,5,4,"mat-hint",15),o.Ic(6,$,5,4,"mat-hint",15),o.Ub(),o.Ic(7,_,1,1,"mat-progress-bar",16),o.Ic(8,J,1,1,"mat-progress-bar",16),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.pc("matTooltip",t.alias||t.shortChannelId),o.pc("matTooltipDisabled",(t.alias||t.shortChannelId).length<26),o.Db(1),o.Nc("",o.lc(3,8,t.alias||t.shortChannelId,0,24),"",(t.alias||t.shortChannelId).length>25?"...":"",""),o.Db(3),o.oc("ngIf","In"===n.direction),o.Db(1),o.oc("ngIf","Out"===n.direction),o.Db(1),o.oc("ngIf","In"===n.direction),o.Db(1),o.oc("ngIf","Out"===n.direction)}}function G(t,e){if(1&t&&(o.Vb(0,"div",10),o.Ic(1,X,9,12,"div",11),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngForOf",t.allChannels)}}function W(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",22),o.dc("click",function(){return o.zc(t),o.hc(2).goToChannels()}),o.Kc(1,"Open Channel"),o.Ub()}}function Y(t,e){if(1&t&&(o.Vb(0,"div",20),o.Kc(1," No channels available. "),o.Ic(2,W,2,0,"button",21),o.Ub()),2&t){const t=o.hc();o.Db(2),o.oc("ngIf","Out"===t.direction)}}const Z=function(t,e,n){return{"mb-4":t,"mb-2":e,"mb-1":n}};let tt=(()=>{class t{constructor(t,e){this.router=t,this.commonService=e,this.screenSize="",this.screenSizeEnum=f.q}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(i.g),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels"},decls:14,vars:11,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["fxLayout","column","fxFlex","100",1,"w-100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"matTooltip","matTooltipDisabled"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","100","fxLayoutAlign","start center","class","font-size-90 color-primary",4,"ngIf"],["class","dashboard-progress-bar","mode","determinate",3,"value",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"font-size-90","color-primary"],[1,"font-weight-900","mr-5px"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","1",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"span",2),o.Kc(3,"Total Capacity"),o.Ub(),o.Vb(4,"mat-hint",3),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Qb(7,"mat-progress-bar",4),o.Ub(),o.Vb(8,"div",5),o.Qb(9,"mat-divider",6),o.Ub(),o.Vb(10,"div",7),o.Ic(11,G,2,1,"div",8),o.Ub(),o.Ub(),o.Ic(12,Y,3,1,"ng-template",null,9,o.Jc)),2&t){const t=o.wc(13);o.oc("ngClass",o.uc(7,Z,e.screenSize===e.screenSizeEnum.XS||e.screenSize===e.screenSizeEnum.SM,e.screenSize===e.screenSizeEnum.MD,e.screenSize===e.screenSizeEnum.LG||e.screenSize===e.screenSizeEnum.XL)),o.Db(5),o.Mc("",o.kc(6,4,e.totalLiquidity,"1.0-0")," Sats"),o.Db(6),o.oc("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",t)}},directives:[S.c,S.b,S.a,a.m,L.a,R.f,s.a,M.a,E.b,a.o,a.n,K.a,U.a],pipes:[a.f,a.w],styles:[""]}),t})();var et=n("M9ds"),nt=n("5QHs"),at=n("LUZP"),it=n("OaSA"),ot=n("iELJ"),st=n("/uX3"),ct=n("s7LF"),lt=n("e6WT"),rt=n("O4ig"),bt=n("B0X+"),dt=n("ZTz/"),ut=n("UhP/");function ht(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Description is required."),o.Ub())}function mt(t,e){if(1&t&&(o.Vb(0,"mat-option",25),o.Kc(1),o.ic(2,"titlecase"),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Lc(o.jc(2,2,t))}}function ft(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.invoiceError)}}function pt(t,e){if(1&t&&(o.Vb(0,"div",26),o.Qb(1,"fa-icon",27),o.Ic(2,ft,2,1,"span",11),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.invoiceError)}}let gt=(()=>{class t{constructor(t,e,n,a,i,o){this.dialogRef=t,this.data=e,this.store=n,this.decimalPipe=a,this.commonService=i,this.actions$=o,this.faExclamationTriangle=m.o,this.selNode={},this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=f.n,this.timeUnitEnum=f.v,this.timeUnits=f.t,this.selTimeUnit=f.v.SECS,this.invoiceError="",this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.j||t.type===p.p)).subscribe(t=>{t.type===p.p&&this.dialogRef.close(),t.type===p.j&&"CreateInvoice"===t.payload.action&&(this.invoiceError=t.payload.message)})}onAddInvoice(t){if(this.invoiceError="",!this.description)return!0;let e=this.expiry?this.expiry:3600;this.selTimeUnit!==f.v.SECS&&(e=this.commonService.convertTime(this.expiry,this.selTimeUnit,f.v.SECS));let n=null;n=this.invoiceValue?{description:this.description,expireIn:e,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:e},this.store.dispatch(new st.F("Creating Invoice...")),this.store.dispatch(new p.g(n))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=void 0,this.invoiceValueHint="",this.selTimeUnit=f.v.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[2])).subscribe(t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,f.f.OTHER)+" "+t.unit}))}onTimeUnitChange(t){this.expiry&&this.selTimeUnit!==t.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,t.value)),this.selTimeUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(y.h),o.Pb(a.f),o.Pb(v.a),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-create-invoices"]],decls:35,vars:17,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"mt-5px"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","placeholder","Expiry","type","number","name","exp","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Create Invoice"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"form",7,8),o.Vb(11,"mat-form-field",9),o.Vb(12,"input",10),o.dc("ngModelChange",function(t){return e.description=t}),o.Ub(),o.Ic(13,ht,2,0,"mat-error",11),o.Ub(),o.Vb(14,"div",12),o.Vb(15,"mat-form-field",13),o.Vb(16,"input",14),o.dc("ngModelChange",function(t){return e.invoiceValue=t})("keyup",function(){return e.onInvoiceValueChange()}),o.Ub(),o.Vb(17,"span",15),o.Kc(18),o.Ub(),o.Vb(19,"mat-hint"),o.Kc(20),o.Ub(),o.Ub(),o.Vb(21,"mat-form-field",16),o.Vb(22,"input",17),o.dc("ngModelChange",function(t){return e.expiry=t}),o.Ub(),o.Vb(23,"span",15),o.Kc(24),o.ic(25,"titlecase"),o.Ub(),o.Ub(),o.Vb(26,"mat-form-field",18),o.Vb(27,"mat-select",19),o.dc("selectionChange",function(t){return e.onTimeUnitChange(t)}),o.Ic(28,mt,3,4,"mat-option",20),o.Ub(),o.Ub(),o.Ub(),o.Ic(29,pt,3,2,"div",21),o.Vb(30,"div",22),o.Vb(31,"button",23),o.dc("click",function(){return e.resetData()}),o.Kc(32,"Clear Field"),o.Ub(),o.Vb(33,"button",24),o.dc("click",function(){o.zc(t);const n=o.wc(10);return e.onAddInvoice(n)}),o.Kc(34,"Create Invoice"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()}2&t&&(o.Db(6),o.oc("mat-dialog-close",!1),o.Db(6),o.oc("ngModel",e.description),o.Db(1),o.oc("ngIf",!e.description),o.Db(3),o.oc("ngModel",e.invoiceValue)("step",100)("min",1),o.Db(2),o.Mc(" ",null==e.information?null:e.information.smaller_currency_unit," "),o.Db(2),o.Lc(e.invoiceValueHint),o.Db(2),o.oc("ngModel",e.expiry)("step",e.selTimeUnit===e.timeUnitEnum.SECS?300:e.selTimeUnit===e.timeUnitEnum.MINS?10:e.selTimeUnit===e.timeUnitEnum.HOURS?2:1)("min",1),o.Db(2),o.Mc(" ",o.jc(25,15,e.selTimeUnit)," "),o.Db(3),o.oc("value",e.selTimeUnit),o.Db(1),o.oc("ngForOf",e.timeUnits),o.Db(1),o.oc("ngIf",""!==e.invoiceError))},directives:[S.c,S.a,V.c,S.b,U.a,ot.d,V.b,ct.u,ct.n,ct.o,R.c,lt.b,ct.c,rt.a,ct.s,ct.m,ct.p,a.o,ct.q,bt.a,R.g,R.f,dt.a,a.n,R.b,ut.m,w.a],pipes:[a.x],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();var yt=n("bdpe"),xt=n("mNcL"),vt=n("X9mX");function St(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Description is required."),o.Ub())}function wt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"form",4,5),o.Vb(2,"mat-form-field",6),o.Vb(3,"input",7),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().description=e}),o.Ub(),o.Ic(4,St,2,0,"mat-error",8),o.Ub(),o.Vb(5,"mat-form-field",9),o.Vb(6,"input",10,11),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().invoiceValue=e})("keyup",function(){return o.zc(t),o.hc().onInvoiceValueChange()}),o.Ub(),o.Vb(8,"span",12),o.Kc(9),o.Ub(),o.Vb(10,"mat-hint"),o.Kc(11),o.Ub(),o.Ub(),o.Vb(12,"div",13),o.Vb(13,"button",14),o.dc("click",function(){return o.zc(t),o.hc().resetData()}),o.Kc(14,"Clear Field"),o.Ub(),o.Vb(15,"button",15),o.dc("click",function(){o.zc(t);const e=o.wc(1);return o.hc().onAddInvoice(e)}),o.Kc(16,"Create Invoice"),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("ngModel",t.description),o.Db(1),o.oc("ngIf",!t.description),o.Db(2),o.oc("ngModel",t.invoiceValue)("step",100)("min",1),o.Db(3),o.Mc(" ",null==t.information?null:t.information.smaller_currency_unit," "),o.Db(2),o.Lc(t.invoiceValueHint)}}function Dt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",16),o.Vb(1,"button",17),o.dc("click",function(){return o.zc(t),o.hc().openCreateInvoiceModal()}),o.Kc(2,"Create Invoice"),o.Ub(),o.Ub()}}function Vt(t,e){1&t&&o.Qb(0,"mat-progress-bar",47)}function Ct(t,e){1&t&&(o.Vb(0,"th",48),o.Kc(1," Date Created "),o.Ub())}const Ut=function(t){return{"mr-0":t}};function It(t,e){if(1&t&&o.Qb(0,"span",53),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ut,t.screenSize===t.screenSizeEnum.XS))}}function Lt(t,e){if(1&t&&o.Qb(0,"span",54),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ut,t.screenSize===t.screenSizeEnum.XS))}}function At(t,e){if(1&t&&o.Qb(0,"span",55),2&t){const t=o.hc(3);o.oc("ngClass",o.sc(1,Ut,t.screenSize===t.screenSizeEnum.XS))}}function Ft(t,e){if(1&t&&(o.Vb(0,"td",49),o.Ic(1,It,1,3,"span",50),o.Ic(2,Lt,1,3,"span",51),o.Ic(3,At,1,3,"span",52),o.Kc(4),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.oc("ngIf","received"===t.status),o.Db(1),o.oc("ngIf","unpaid"===t.status),o.Db(1),o.oc("ngIf","expired"===t.status||"unknown"===t.status),o.Db(1),o.Mc(" ",t.timestampStr," ")}}function kt(t,e){1&t&&(o.Vb(0,"th",48),o.Kc(1," Date Settled "),o.Ub())}function Pt(t,e){if(1&t&&(o.Vb(0,"td",49),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(t.receivedAtStr||"-")}}function Ot(t,e){1&t&&(o.Vb(0,"th",48),o.Kc(1," Description "),o.Ub())}const Tt=function(t){return{"max-width":t}};function Rt(t,e){if(1&t&&(o.Vb(0,"td",49),o.Vb(1,"div",56),o.Vb(2,"span",57),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.oc("ngStyle",o.sc(2,Tt,n.screenSize===n.screenSizeEnum.XS?"10rem":"32rem")),o.Db(2),o.Lc(t.description)}}function Kt(t,e){1&t&&(o.Vb(0,"th",58),o.Kc(1," Amount (Sats) "),o.Ub())}function Mt(t,e){if(1&t&&(o.Vb(0,"td",59),o.Vb(1,"span",60),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",t.amount?o.kc(3,1,t.amount,"1.0-0"):"-","")}}function Et(t,e){1&t&&(o.Vb(0,"th",58),o.Kc(1," Amount Settled (Sats) "),o.Ub())}function zt(t,e){if(1&t&&(o.Vb(0,"td",59),o.Vb(1,"span",60),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",t.amountSettled?o.kc(3,1,t.amountSettled,"1.0-0"):"-","")}}function Bt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",61),o.Vb(1,"div",62),o.Vb(2,"mat-select",63),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",64),o.dc("click",function(){return o.zc(t),o.hc(2).onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}const qt=function(t){return{"px-3":t}};function Nt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",65),o.Vb(1,"button",66),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc(2).onInvoiceClick(a,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}if(2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,qt,t.screenSize!==t.screenSizeEnum.XS))}}function Ht(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No invoices available."),o.Ub())}function Qt(t,e){if(1&t&&(o.Vb(0,"td",67),o.Ic(1,Ht,2,0,"p",8),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)}}const jt=function(t){return{"display-none":t}};function $t(t,e){if(1&t&&o.Qb(0,"tr",68),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,jt,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function _t(t,e){1&t&&o.Qb(0,"tr",69)}function Jt(t,e){if(1&t&&o.Qb(0,"tr",70),2&t){const t=e.$implicit,n=o.hc(2);o.oc("@newlyAddedRowAnimation",t.label==n.newlyAddedInvoiceMemo&&t.value==n.newlyAddedInvoiceValue&&n.flgAnimate?"added":"notAdded")}}const Xt=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Gt=function(){return["no_invoice"]};function Wt(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",18),o.Vb(1,"div",19),o.Vb(2,"div",20),o.Qb(3,"fa-icon",21),o.Vb(4,"span",22),o.Kc(5,"Invoices History"),o.Ub(),o.Ub(),o.Vb(6,"mat-form-field",23),o.Vb(7,"input",24),o.dc("keyup",function(e){return o.zc(t),o.hc().applyFilter(e.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",25),o.Ic(9,Vt,1,0,"mat-progress-bar",26),o.Vb(10,"table",27,28),o.Tb(12,29),o.Ic(13,Ct,2,0,"th",30),o.Ic(14,Ft,5,4,"td",31),o.Sb(),o.Tb(15,32),o.Ic(16,kt,2,0,"th",30),o.Ic(17,Pt,2,1,"td",31),o.Sb(),o.Tb(18,33),o.Ic(19,Ot,2,0,"th",30),o.Ic(20,Rt,4,4,"td",31),o.Sb(),o.Tb(21,34),o.Ic(22,Kt,2,0,"th",35),o.Ic(23,Mt,4,4,"td",36),o.Sb(),o.Tb(24,37),o.Ic(25,Et,2,0,"th",35),o.Ic(26,zt,4,4,"td",36),o.Sb(),o.Tb(27,38),o.Ic(28,Bt,6,0,"th",39),o.Ic(29,Nt,3,3,"td",40),o.Sb(),o.Tb(30,41),o.Ic(31,Qt,2,1,"td",42),o.Sb(),o.Ic(32,$t,1,3,"tr",43),o.Ic(33,_t,1,0,"tr",44),o.Ic(34,Jt,1,1,"tr",45),o.Ub(),o.Ub(),o.Qb(35,"mat-paginator",46),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("icon",t.faHistory),o.Db(6),o.oc("ngIf",!0===t.flgLoading[0]),o.Db(1),o.oc("dataSource",t.invoices)("ngClass",o.sc(11,Xt,"error"===t.flgLoading[0])),o.Db(22),o.oc("matFooterRowDef",o.rc(13,Gt)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns),o.Db(1),o.oc("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Yt=(()=>{class t{constructor(t,e,n,a,i){this.logger=t,this.store=e,this.decimalPipe=n,this.commonService=a,this.rtlEffects=i,this.calledFrom="transactions",this.faHistory=m.r,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.flgAnimate=!0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","amountSettled","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","receivedAt","description","amount","amountSettled","actions"])}ngOnInit(){this.store.dispatch(new p.x),this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchInvoices"===t.action&&(this.flgLoading[0]="error")}),this.selNode=t.nodeSettings,this.information=t.information,this.invoiceJSONArr=t.invoices&&t.invoices.length>0?t.invoices:[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.loadInvoicesTable(this.invoiceJSONArr),setTimeout(()=>{this.flgAnimate=!1},5e3),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.invoices),this.logger.info(t)})}openCreateInvoiceModal(){this.store.dispatch(new st.C({data:{pageSize:this.pageSize,component:gt}}))}onAddInvoice(t){if(!this.description)return!0;let e=this.expiry?this.expiry:3600;this.flgAnimate=!0,this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue;let n=null;n=this.invoiceValue?{description:this.description,expireIn:e,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:e},this.store.dispatch(new st.F("Creating Invoice...")),this.store.dispatch(new p.g(n)),this.resetData()}onInvoiceClick(t,e){this.store.dispatch(new st.C({data:{invoice:t,newlyAdded:!1,component:yt.a}}))}loadInvoicesTable(t){this.invoices=new it.o([...t]),this.invoices.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.invoices.sort=this.sort,this.invoices.paginator=this.paginator}resetData(){this.description="",this.invoiceValue=null,this.expiry=null,this.invoiceValueHint=""}applyFilter(t){this.invoices.filter=t.value}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,f.f.OTHER)+" "+t.unit}))}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(a.f),o.Pb(v.a),o.Pb(vt.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-lightning-invoices"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},inputs:{calledFrom:"calledFrom"},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description","required","true",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["invcVal","ngModel"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","receivedAt"],["matColumnDef","description"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pr-3",4,"matCellDef"],["matColumnDef","amountSettled"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Received","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Received","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unpaid","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Expired","matTooltipPosition","right",1,"dot","red",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-3"],["mat-cell","",1,"pr-3"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Ic(1,wt,17,7,"form",1),o.Ic(2,Dt,3,0,"div",2),o.Ic(3,Wt,36,14,"div",3),o.Ub()),2&t&&(o.Db(1),o.oc("ngIf","home"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom))},directives:[S.c,S.a,S.b,a.o,ct.u,ct.n,ct.o,R.c,lt.b,ct.c,ct.s,ct.m,ct.p,ct.q,bt.a,R.g,R.f,U.a,R.b,w.a,E.b,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,nt.a,s.a,it.h,at.b,it.a,K.a,a.p,L.b,dt.a,dt.c,ut.m,it.d,it.f,it.j,it.l],pipes:[a.f],styles:[".mat-column-description[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"],data:{animation:[xt.a]}}),t})();var Zt=n("cp0P"),te=n("IzEk"),ee=n("D9sq"),ne=n("iiaH");const ae=["paymentReq"];function ie(t,e){if(1&t&&(o.Vb(0,"mat-hint"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Lc(t.paymentDecodedHint)}}function oe(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Payment request is required."),o.Ub())}function se(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Lc(t.paymentDecodedHint)}}function ce(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Payment amount is required."),o.Ub())}function le(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-form-field",9),o.Vb(1,"input",18,19),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().paymentAmount=e})("change",function(e){return o.zc(t),o.hc().onAmountChange(e)}),o.Ub(),o.Vb(3,"mat-hint"),o.Kc(4,"It is a zero amount invoice, enter amount to be paid."),o.Ub(),o.Ic(5,ce,2,0,"mat-error",12),o.Ub()}if(2&t){const t=o.hc();o.Db(1),o.oc("ngModel",t.paymentAmount),o.Db(4),o.oc("ngIf",!t.paymentAmount)}}function re(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.paymentError)}}function be(t,e){if(1&t&&(o.Vb(0,"div",20),o.Qb(1,"fa-icon",21),o.Ic(2,re,2,1,"span",12),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.paymentError)}}let de=(()=>{class t{constructor(t,e,n,a,i,o,s,c){this.dialogRef=t,this.store=e,this.eclEffects=n,this.logger=a,this.commonService=i,this.decimalPipe=o,this.actions$=s,this.dataService=c,this.faExclamationTriangle=m.o,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=f.i[0],this.feeLimitTypes=f.i,this.paymentError="",this.unSubs=[new b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.selNode=t.nodeSettings,this.activeChannels=t.activeChannels,this.logger.info(t)}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.j||t.type===p.S)).subscribe(t=>{t.type===p.S&&this.dialogRef.close(),t.type===p.j&&"SendPayment"===t.payload.action&&(delete this.paymentDecoded.amount,this.paymentError=t.payload.message)})}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():(this.paymentAmount=null,this.paymentError="",this.paymentDecodedHint="",this.paymentReq.control.setErrors(null),this.dataService.decodePayment(this.paymentRequest,!0).pipe(Object(te.a)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(+this.paymentDecoded.amount,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[2])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.f.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description}))},t=>{this.logger.error(t),this.paymentDecodedHint="ERROR: "+(t.message?t.message:"string"==typeof t?t:JSON.stringify(t)),this.paymentReq.control.setErrors({decodeError:!0})}))}sendPayment(){this.store.dispatch(new st.F("Sending Payment...")),this.store.dispatch(new p.nb(this.zeroAmtInvoice?{invoice:this.paymentRequest,amountMsat:1e3*this.paymentAmount,fromDialog:!0}:{invoice:this.paymentRequest,fromDialog:!0}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.dataService.decodePayment(this.paymentRequest,!0).pipe(Object(te.a)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(+this.paymentDecoded.amount,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[3])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.f.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description}))},t=>{this.logger.error(t),this.paymentDecodedHint="ERROR: "+(t.message?t.message:"string"==typeof t?t:JSON.stringify(t)),this.paymentReq.control.setErrors({decodeError:!0})}))}onAmountChange(t){delete this.paymentDecoded.amount,this.paymentDecoded.amount=t}resetData(){this.paymentDecoded={},this.paymentRequest="",this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=f.i[0],this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(y.h),o.Pb(ee.a),o.Pb(g.b),o.Pb(v.a),o.Pb(a.f),o.Pb(x.a),o.Pb(ne.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-lightning-send-payments"]],viewQuery:function(t,e){if(1&t&&o.Pc(ae,!0),2&t){let t;o.vc(t=o.ec())&&(e.paymentReq=t.first)}},decls:24,vars:7,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"mt-5px"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["fxFlex","100"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxFlex","100",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Send Payment"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"form",7,8),o.Vb(11,"mat-form-field",9),o.Vb(12,"textarea",10,11),o.dc("ngModelChange",function(t){return e.onPaymentRequestEntry(t)})("matTextareaAutosize",function(){return!0}),o.Ub(),o.Ic(14,ie,2,1,"mat-hint",12),o.Ic(15,oe,2,0,"mat-error",12),o.Ic(16,se,2,1,"mat-error",12),o.Ub(),o.Ic(17,le,6,2,"mat-form-field",13),o.Ic(18,be,3,2,"div",14),o.Vb(19,"div",15),o.Vb(20,"button",16),o.dc("click",function(){return e.resetData()}),o.Kc(21,"Clear Fields"),o.Ub(),o.Vb(22,"button",17),o.dc("click",function(){return e.onSendPayment()}),o.Kc(23,"Send Payment"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.wc(13);o.Db(6),o.oc("mat-dialog-close",!1),o.Db(6),o.oc("ngModel",e.paymentRequest),o.Db(2),o.oc("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),o.Db(1),o.oc("ngIf",!e.paymentRequest),o.Db(1),o.oc("ngIf",null==t.errors?null:t.errors.decodeError),o.Db(1),o.oc("ngIf",e.zeroAmtInvoice),o.Db(1),o.oc("ngIf",""!==e.paymentError)}},directives:[S.c,S.a,V.c,S.b,U.a,ot.d,V.b,ct.u,ct.n,ct.o,R.c,lt.b,ct.c,lt.d,rt.a,ct.s,ct.m,ct.p,a.o,R.f,R.b,w.a],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();var ue=n("o4Yh");const he=["scrollContainer"];function me(t,e){if(1&t&&(o.Vb(0,"div",9),o.Vb(1,"div",15),o.Vb(2,"h4",11),o.Kc(3,"Description"),o.Ub(),o.Vb(4,"span",12),o.Kc(5),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(5),o.Lc(t.description)}}function fe(t,e){1&t&&o.Qb(0,"mat-divider",14)}function pe(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-expansion-panel",24),o.dc("opened",function(){return o.zc(t),o.hc().onExpansionOpen(!0)})("closed",function(){return o.zc(t),o.hc().onExpansionOpen(!1)}),o.Vb(1,"mat-expansion-panel-header"),o.Vb(2,"mat-panel-title"),o.Vb(3,"h4",25),o.Kc(4),o.Ub(),o.Vb(5,"h4",26),o.Kc(6),o.ic(7,"number"),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",8),o.Vb(9,"div",9),o.Vb(10,"div",27),o.Vb(11,"h4",11),o.Kc(12,"Fees (mSats)"),o.Ub(),o.Vb(13,"span",12),o.Kc(14),o.ic(15,"number"),o.Ub(),o.Ub(),o.Vb(16,"div",27),o.Vb(17,"h4",11),o.Kc(18,"Date/Time"),o.Ub(),o.Vb(19,"span",12),o.Kc(20),o.Ub(),o.Ub(),o.Ub(),o.Qb(21,"mat-divider",14),o.Vb(22,"div",9),o.Vb(23,"div",15),o.Vb(24,"h4",11),o.Kc(25,"ID"),o.Ub(),o.Vb(26,"span",28),o.Kc(27),o.Ub(),o.Ub(),o.Ub(),o.Qb(28,"mat-divider",14),o.Vb(29,"div",9),o.Vb(30,"div",15),o.Vb(31,"h4",11),o.Kc(32,"To Channel"),o.Ub(),o.Vb(33,"span",28),o.Kc(34),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit,n=e.index,a=o.hc();o.oc("expanded",a.expansionOpen),o.Db(4),o.Mc("Part ",n+1,""),o.Db(2),o.Mc("",o.jc(7,7,t.amount)," (Sats)"),o.Db(8),o.Lc(o.jc(15,9,t.feesPaid)),o.Db(6),o.Lc(t.timestampStr),o.Db(7),o.Lc(t.id),o.Db(7),o.Lc(t.toChannelAlias)}}let ge=(()=>{class t{constructor(t,e){this.dialogRef=t,this.data=e,this.description=null,this.shouldScroll=!0,this.expansionOpen=!0}ngOnInit(){this.payment=this.data.payment,this.data.sentPaymentInfo.length>0&&this.data.sentPaymentInfo[0].paymentRequest&&this.data.sentPaymentInfo[0].paymentRequest.description&&""!==this.data.sentPaymentInfo[0].paymentRequest.description&&(this.description=this.data.sentPaymentInfo[0].paymentRequest.description)}ngAfterViewChecked(){this.shouldScroll=this.scrollContainer.nativeElement.classList.value.includes("ps--active-y")}onScrollDown(){this.scrollContainer.nativeElement.scrollTop=this.scrollContainer.nativeElement.scrollTop+62.6}onExpansionOpen(t){this.expansionOpen=t}onClose(){this.dialogRef.close(!1)}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-payment-information"]],viewQuery:function(t,e){if(1&t&&o.Pc(he,!0),2&t){let t;o.vc(t=o.ec())&&(e.scrollContainer=t.first)}},decls:65,vars:12,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"padding-gap-large","pl-3"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"mt-5px","mb-0","pr-2","h-40",3,"perfectScrollbar"],["scrollContainer",""],["fxLayout","column"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],["fxFlex","70"],[1,"w-100","my-1"],["fxFlex","100"],["fxLayout","row",4,"ngIf"],["class","w-100 my-1",4,"ngIf"],["class","flat-expansion-panel my-1",3,"expanded","opened","closed",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start end",1,"btn-sticky-container"],["mat-mini-fab","","aria-label","Scroll Down","fxLayoutAlign","center center",3,"click"],["fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-1"],["fxLayoutAlign","center center","tabindex","1","mat-stroked-button","","color","primary","type","button","default","",1,"mr-1",3,"mat-dialog-close"],[1,"flat-expansion-panel","my-1",3,"expanded","opened","closed"],["fxFlex","30","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","70","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Payment Information"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.dc("click",function(){return e.onClose()}),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6,7),o.Vb(10,"div",8),o.Vb(11,"div",9),o.Vb(12,"div",10),o.Vb(13,"h4",11),o.Kc(14,"Amount (Sats)"),o.Ub(),o.Vb(15,"span",12),o.Kc(16),o.ic(17,"number"),o.Ub(),o.Ub(),o.Vb(18,"div",13),o.Vb(19,"h4",11),o.Kc(20,"Date/Time"),o.Ub(),o.Vb(21,"span",12),o.Kc(22),o.Ub(),o.Ub(),o.Ub(),o.Qb(23,"mat-divider",14),o.Vb(24,"div",9),o.Vb(25,"div",15),o.Vb(26,"h4",11),o.Kc(27,"ID"),o.Ub(),o.Vb(28,"span",12),o.Kc(29),o.Ub(),o.Ub(),o.Ub(),o.Qb(30,"mat-divider",14),o.Vb(31,"div",9),o.Vb(32,"div",15),o.Vb(33,"h4",11),o.Kc(34,"Payment Hash"),o.Ub(),o.Vb(35,"span",12),o.Kc(36),o.Ub(),o.Ub(),o.Ub(),o.Qb(37,"mat-divider",14),o.Vb(38,"div",9),o.Vb(39,"div",15),o.Vb(40,"h4",11),o.Kc(41,"Payment Preimage"),o.Ub(),o.Vb(42,"span",12),o.Kc(43),o.Ub(),o.Ub(),o.Ub(),o.Qb(44,"mat-divider",14),o.Vb(45,"div",9),o.Vb(46,"div",15),o.Vb(47,"h4",11),o.Kc(48,"Recipient Node"),o.Ub(),o.Vb(49,"span",12),o.Kc(50),o.Ub(),o.Ub(),o.Ub(),o.Qb(51,"mat-divider",14),o.Ic(52,me,6,1,"div",16),o.Ic(53,fe,1,0,"mat-divider",17),o.Vb(54,"div",9),o.Vb(55,"div",15),o.Vb(56,"mat-accordion"),o.Ic(57,pe,35,11,"mat-expansion-panel",18),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(58,"div",19),o.Vb(59,"button",20),o.dc("click",function(){return e.onScrollDown()}),o.Vb(60,"mat-icon",21),o.Kc(61,"arrow_downward"),o.Ub(),o.Ub(),o.Ub(),o.Vb(62,"div",22),o.Vb(63,"button",23),o.Kc(64,"OK"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(16),o.Lc(o.jc(17,10,e.payment.recipientAmount)),o.Db(6),o.Lc(e.payment.firstPartTimestampStr),o.Db(7),o.Lc(e.payment.id),o.Db(7),o.Lc(e.payment.paymentHash),o.Db(7),o.Lc(e.payment.paymentPreimage),o.Db(7),o.Lc(e.payment.recipientNodeAlias),o.Db(2),o.oc("ngIf",e.description),o.Db(1),o.oc("ngIf",e.description),o.Db(4),o.oc("ngForOf",e.payment.parts),o.Db(6),o.oc("mat-dialog-close",!1))},directives:[S.c,S.b,S.a,V.c,U.a,V.b,E.b,M.a,a.o,ue.a,a.n,I.a,ot.d,ue.c,ue.e,ue.f],pipes:[a.f],styles:[""]}),t})();const ye=["sendPaymentForm"];function xe(t,e){if(1&t&&(o.Vb(0,"mat-hint"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.paymentDecodedHint)}}function ve(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Payment request is required."),o.Ub())}function Se(t,e){if(1&t){const t=o.Wb();o.Vb(0,"form",4,5),o.Vb(2,"mat-form-field",6),o.Vb(3,"textarea",7,8),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().onPaymentRequestEntry(e)})("matTextareaAutosize",function(){return!0}),o.Ub(),o.Ic(5,xe,2,1,"mat-hint",9),o.Ic(6,ve,2,0,"mat-error",9),o.Ub(),o.Vb(7,"div",10),o.Vb(8,"button",11),o.dc("click",function(){return o.zc(t),o.hc().resetData()}),o.Kc(9,"Clear Field"),o.Ub(),o.Vb(10,"button",12),o.dc("click",function(){return o.zc(t),o.hc().onSendPayment()}),o.Kc(11,"Send Payment"),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("ngModel",t.paymentRequest),o.Db(2),o.oc("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),o.Db(1),o.oc("ngIf",!t.paymentRequest)}}function we(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",13),o.Vb(1,"button",12),o.dc("click",function(){return o.zc(t),o.hc().openSendPaymentModal()}),o.Kc(2,"Send Payment"),o.Ub(),o.Ub()}}function De(t,e){1&t&&o.Qb(0,"mat-progress-bar",48)}function Ve(t,e){1&t&&(o.Vb(0,"th",49),o.Kc(1,"Date/Time"),o.Ub())}function Ce(t,e){if(1&t&&(o.Vb(0,"td",50),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.firstPartTimestampStr)}}function Ue(t,e){1&t&&(o.Vb(0,"th",49),o.Kc(1,"ID"),o.Ub())}const Ie=function(t){return{"max-width":t}};function Le(t,e){if(1&t&&(o.Vb(0,"td",50),o.Vb(1,"div",51),o.Vb(2,"span",52),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.oc("ngStyle",o.sc(2,Ie,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(2),o.Lc(t.id)}}function Ae(t,e){1&t&&(o.Vb(0,"th",49),o.Kc(1,"Destination"),o.Ub())}function Fe(t,e){if(1&t&&(o.Vb(0,"td",50),o.Vb(1,"div",51),o.Vb(2,"span",52),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.oc("ngStyle",o.sc(2,Ie,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(2),o.Lc(t.recipientNodeAlias)}}function ke(t,e){1&t&&(o.Vb(0,"th",53),o.Kc(1,"Amount (Sats)"),o.Ub())}function Pe(t,e){if(1&t&&(o.Vb(0,"td",50),o.Vb(1,"span",54),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,null==t?null:t.recipientAmount))}}function Oe(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",55),o.Vb(1,"div",56),o.Vb(2,"mat-select",57),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",58),o.dc("click",function(){return o.zc(t),o.hc(2).onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function Te(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",59),o.Vb(1,"button",60),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc(2).onPaymentClick(n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function Re(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No payments available."),o.Ub())}function Ke(t,e){if(1&t&&(o.Vb(0,"td",61),o.Ic(1,Re,2,0,"p",9),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)}}function Me(t,e){if(1&t&&(o.Vb(0,"span",64),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",t.timestampStr," ")}}function Ee(t,e){if(1&t&&(o.Tb(0),o.Ic(1,Me,2,1,"span",63),o.Sb()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.parts)}}function ze(t,e){if(1&t&&(o.Vb(0,"td",50),o.Vb(1,"span",62),o.Kc(2),o.Ub(),o.Ic(3,Ee,2,1,"ng-container",9),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" Total Attempts: ",null==t||null==t.parts?null:t.parts.length," "),o.Db(1),o.oc("ngIf",t.is_expanded)}}function Be(t,e){if(1&t&&(o.Vb(0,"span",62),o.Vb(1,"span",65),o.Vb(2,"span",52),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc(4);o.Db(1),o.oc("ngStyle",o.sc(2,Ie,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(2),o.Lc(t.id)}}function qe(t,e){if(1&t&&(o.Vb(0,"span"),o.Ic(1,Be,4,4,"span",66),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.parts)}}function Ne(t,e){if(1&t&&(o.Vb(0,"td",50),o.Vb(1,"div",65),o.Vb(2,"span",52),o.Kc(3),o.Ub(),o.Ub(),o.Ic(4,qe,2,1,"span",9),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.oc("ngStyle",o.sc(3,Ie,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(2),o.Lc(t.id),o.Db(1),o.oc("ngIf",t.is_expanded)}}function He(t,e){if(1&t&&(o.Vb(0,"span",62),o.Vb(1,"span",65),o.Vb(2,"span",52),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc(4);o.Db(1),o.oc("ngStyle",o.sc(2,Ie,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(2),o.Lc(t.toChannelAlias)}}function Qe(t,e){if(1&t&&(o.Vb(0,"span"),o.Ic(1,He,4,4,"span",66),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.parts)}}function je(t,e){if(1&t&&(o.Vb(0,"td",50),o.Vb(1,"div",65),o.Vb(2,"span",52),o.Kc(3),o.Ub(),o.Ub(),o.Ic(4,Qe,2,1,"span",9),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.Db(1),o.oc("ngStyle",o.sc(3,Ie,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(2),o.Lc(null==t?null:t.recipientNodeAlias),o.Db(1),o.oc("ngIf",t.is_expanded)}}function $e(t,e){if(1&t&&(o.Vb(0,"span",67),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",o.kc(2,1,t.amount,"1.0-0")," ")}}function _e(t,e){if(1&t&&(o.Vb(0,"span"),o.Ic(1,$e,3,4,"span",68),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.parts)}}function Je(t,e){if(1&t&&(o.Vb(0,"td",50),o.Vb(1,"span",67),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ic(4,_e,2,1,"span",9),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.kc(3,2,null==t?null:t.recipientAmount,"1.0-0")),o.Db(2),o.oc("ngIf",t.is_expanded)}}function Xe(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",70),o.Vb(1,"button",73),o.dc("click",function(){o.zc(t);const n=e.$implicit,a=o.hc(2).$implicit;return o.hc(2).onPartClick(n,a)}),o.Kc(2),o.Ub(),o.Ub()}if(2&t){const t=e.index;o.Db(2),o.Mc("View ",t+1,"")}}function Ge(t,e){if(1&t&&(o.Vb(0,"div"),o.Ic(1,Xe,3,1,"div",72),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.oc("ngForOf",null==t?null:t.parts)}}function We(t,e){if(1&t&&(o.Vb(0,"td",69),o.Vb(1,"span",70),o.Vb(2,"button",71),o.dc("click",function(){const t=e.$implicit;return t.is_expanded=!t.is_expanded}),o.Kc(3),o.Ub(),o.Ub(),o.Ic(4,Ge,2,1,"div",9),o.Ub()),2&t){const t=e.$implicit;o.Db(3),o.Lc(t.is_expanded?"Hide":"Show"),o.Db(1),o.oc("ngIf",t.is_expanded)}}function Ye(t,e){if(1&t&&o.Qb(0,"tr",74),2&t){const t=e.$implicit,n=o.hc(2);o.oc("@newlyAddedRowAnimation",t.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const Ze=function(t){return{"display-none":t}};function tn(t,e){if(1&t&&o.Qb(0,"tr",75),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,Ze,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function en(t,e){1&t&&o.Qb(0,"tr",76)}function nn(t,e){if(1&t&&o.Qb(0,"tr",74),2&t){const t=e.$implicit,n=o.hc(2);o.oc("@newlyAddedRowAnimation",t.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const an=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},on=function(){return["no_payment"]};function sn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",14),o.Vb(1,"div",15),o.Vb(2,"div",16),o.Qb(3,"fa-icon",17),o.Vb(4,"span",18),o.Kc(5,"Payments History"),o.Ub(),o.Ub(),o.Vb(6,"mat-form-field",19),o.Vb(7,"input",20),o.dc("keyup",function(e){return o.zc(t),o.hc().applyFilter(e.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",21),o.Ic(9,De,1,0,"mat-progress-bar",22),o.Vb(10,"table",23,24),o.Tb(12,25),o.Ic(13,Ve,2,0,"th",26),o.Ic(14,Ce,2,1,"td",27),o.Sb(),o.Tb(15,28),o.Ic(16,Ue,2,0,"th",26),o.Ic(17,Le,4,4,"td",27),o.Sb(),o.Tb(18,29),o.Ic(19,Ae,2,0,"th",26),o.Ic(20,Fe,4,4,"td",27),o.Sb(),o.Tb(21,30),o.Ic(22,ke,2,0,"th",31),o.Ic(23,Pe,4,3,"td",27),o.Sb(),o.Tb(24,32),o.Ic(25,Oe,6,0,"th",33),o.Ic(26,Te,3,0,"td",34),o.Sb(),o.Tb(27,35),o.Ic(28,Ke,2,1,"td",36),o.Sb(),o.Tb(29,37),o.Ic(30,ze,4,2,"td",27),o.Sb(),o.Tb(31,38),o.Ic(32,Ne,5,5,"td",27),o.Sb(),o.Tb(33,39),o.Ic(34,je,5,5,"td",27),o.Sb(),o.Tb(35,40),o.Ic(36,Je,5,5,"td",27),o.Sb(),o.Tb(37,41),o.Ic(38,We,5,2,"td",42),o.Sb(),o.Ic(39,Ye,1,1,"tr",43),o.Ic(40,tn,1,3,"tr",44),o.Ic(41,en,1,0,"tr",45),o.Ic(42,nn,1,1,"tr",46),o.Ub(),o.Ub(),o.Qb(43,"mat-paginator",47),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("icon",t.faHistory),o.Db(6),o.oc("ngIf",!0===t.flgLoading[0]),o.Db(1),o.oc("dataSource",t.payments)("ngClass",o.sc(13,an,"error"===t.flgLoading[0])),o.Db(29),o.oc("matRowDefColumns",t.partColumns)("matRowDefWhen",t.is_group),o.Db(1),o.oc("matFooterRowDef",o.rc(15,on)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns),o.Db(1),o.oc("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let cn=(()=>{class t{constructor(t,e,n,a,i,o,s){this.logger=t,this.commonService=e,this.store=n,this.rtlEffects=a,this.eclEffects=i,this.decimalPipe=o,this.dataService=s,this.calledFrom="transactions",this.faHistory=m.r,this.newlyAddedPayment="",this.flgAnimate=!0,this.selNode={},this.flgLoading=[!0],this.information={},this.paymentJSONArr=[],this.paymentDecoded={},this.displayedColumns=[],this.partColumns=[],this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","actions"],this.partColumns=["groupTotal","groupAction"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","recipientAmount","actions"],this.partColumns=["groupTotal","groupAmount","groupAction"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","id","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupAmount","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["firstPartTimestamp","id","recipientNodeAlias","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupChannelAlias","groupAmount","groupAction"])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchPayments"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.selNode=t.nodeSettings,t.payments.sent&&t.payments.sent.map(e=>{let n=t.peers.find(t=>t.nodeId===e.recipientNodeId);e.recipientNodeAlias=n?n.alias:e.recipientNodeId,e.parts&&e.parts.map(e=>{let n=t.activeChannels.find(t=>t.channelId===e.toChannelId);e.toChannelAlias=n?n.alias:e.toChannelId})}),this.paymentJSONArr=t.payments&&t.payments.sent&&t.payments.sent.length>0?t.payments.sent:[],this.loadPaymentsTable(this.paymentJSONArr),setTimeout(()=>{this.flgAnimate=!1},3e3),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.loadPaymentsTable(this.paymentJSONArr)}loadPaymentsTable(t){this.payments=new it.o([...t]),this.payments.sort=this.sort,this.payments.sortingDataAccessor=(t,e)=>{switch(e){case"firstPartTimestamp":return this.commonService.sortByKey(t.parts,"timestamp","number",this.sort.direction),t.firstPartTimestamp;case"id":return this.commonService.sortByKey(t.parts,"id","string",this.sort.direction),t.id;case"recipientNodeAlias":return this.commonService.sortByKey(t.parts,"toChannelAlias","string",this.sort.direction),t.recipientNodeAlias;case"recipientAmount":return this.commonService.sortByKey(t.parts,"amount","number",this.sort.direction),t.recipientAmount;default:return t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null}},this.payments.paginator=this.paginator}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe(Object(te.a)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp?(this.paymentDecoded.amount||(this.paymentDecoded.amount=0),this.sendPayment()):this.resetData()})}sendPayment(){this.flgAnimate=!0,this.newlyAddedPayment=this.paymentDecoded.paymentHash,this.paymentDecoded.amount&&0!==this.paymentDecoded.amount?(this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestampStr",value:this.paymentDecoded.timestampStr,title:"Creation Date",width:50},{key:"amount",value:this.paymentDecoded.amount,title:"Amount (Sats)",width:50,type:f.h.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:f.h.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:50}]]}})),this.rtlEffects.closeConfirm.pipe(Object(te.a)(1)).subscribe(t=>{t&&(this.store.dispatch(new st.F("Sending Payment...")),this.store.dispatch(new p.nb({invoice:this.paymentRequest,fromDialog:!1})),this.resetData())})):(this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestampStr",value:this.paymentDecoded.timestampStr,title:"Creation Date",width:40},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:f.h.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:f.h.NUMBER.toLowerCase(),inputValue:"",width:30}]}})),this.rtlEffects.closeConfirm.pipe(Object(te.a)(1)).subscribe(t=>{t&&(this.paymentDecoded.amount=t[0].inputValue,this.store.dispatch(new st.F("Sending Payment...")),this.store.dispatch(new p.nb({invoice:this.paymentRequest,amountMsat:1e3*t[0].inputValue,fromDialog:!1})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe(Object(te.a)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.amount?this.commonService.convertCurrency(+this.paymentDecoded.amount,f.g.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,f.f.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description}):this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}openSendPaymentModal(){this.store.dispatch(new st.C({data:{component:de}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}is_group(t,e){return e.parts&&e.parts.length>1}onPaymentClick(t){t.paymentHash&&""!==t.paymentHash.trim()?this.dataService.decodePayments(t.paymentHash).pipe(Object(te.a)(1)).subscribe(e=>{this.showPaymentView(t,e.length&&e.length>0?e[0]:[])},e=>{this.showPaymentView(t,[])}):this.showPaymentView(t,[])}showPaymentView(t,e){this.store.dispatch(new st.C({data:{sentPaymentInfo:e,payment:t,component:ge}}))}onPartClick(t,e){e.paymentHash&&""!==e.paymentHash.trim()?this.dataService.decodePayments(e.paymentHash).pipe(Object(te.a)(1)).subscribe(n=>{this.showPartView(t,e,n)},n=>{this.showPartView(t,e,[])}):this.showPartView(t,e,[])}showPartView(t,e,n){const a=[[{key:"paymentHash",value:e.paymentHash,title:"Payment Hash",width:100,type:f.h.STRING}],[{key:"paymentPreimage",value:e.paymentPreimage,title:"Payment Preimage",width:100,type:f.h.STRING}],[{key:"toChannelId",value:t.toChannelId,title:"Channel",width:100,type:f.h.STRING}],[{key:"id",value:t.id,title:"Part ID",width:50,type:f.h.STRING},{key:"timestampStr",value:t.timestampStr,title:"Time",width:50,type:f.h.DATE_TIME}],[{key:"amount",value:t.amount,title:"Amount (Sats)",width:50,type:f.h.NUMBER},{key:"feesPaid",value:t.feesPaid,title:"Fee (Sats)",width:50,type:f.h.NUMBER}]];n.length>0&&n[0].paymentRequest&&n[0].paymentRequest.description&&""!==n[0].paymentRequest.description&&a.splice(3,0,[{key:"description",value:n[0].paymentRequest.description,title:"Description",width:100,type:f.h.STRING}]),this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Payment Part Information",message:a}}))}applyFilter(t){this.payments.filter=t.value}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){let t=JSON.parse(JSON.stringify(this.payments.data)),e=t.reduce((t,e)=>(e.paymentHash&&""!==e.paymentHash.trim()&&(t=""===t?e.paymentHash:t+","+e.paymentHash),t),"");Object(Zt.a)(this.dataService.decodePayments(e).pipe(Object(d.a)(this.unSubs[2])).subscribe(e=>{e.forEach((e,n)=>{e.length>0&&e[0].paymentRequest&&e[0].paymentRequest.description&&""!==e[0].paymentRequest.description&&(t[n].description=e[0].paymentRequest.description)});let n=t.reduce((t,e)=>t.concat(e),[]);this.commonService.downloadFile(n,"Payments")}))}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(v.a),o.Pb(y.h),o.Pb(vt.a),o.Pb(ee.a),o.Pb(a.f),o.Pb(ne.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-lightning-payments"]],viewQuery:function(t,e){if(1&t&&(o.Pc(ye,!0),o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first),o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},inputs:{calledFrom:"calledFrom"},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","firstPartTimestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","recipientNodeAlias"],["matColumnDef","recipientAmount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupId"],["matColumnDef","groupChannelAlias"],["matColumnDef","groupAmount"],["matColumnDef","groupAction"],["mat-cell","","class","px-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"part-row-span"],["fxLayoutAlign","start center","class","part-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"part-row-span","pl-3"],["fxLayoutAlign","start center",1,"ellipsis-parent","part-row-span",3,"ngStyle"],["fxLayoutAlign","start center","class","part-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"part-row-span"],["fxLayoutAlign","end center","class","part-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["fxLayoutAlign","end start"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-part-expand",3,"click"],["fxLayoutAlign","end start",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-part-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Ic(1,Se,12,3,"form",1),o.Ic(2,we,3,0,"div",2),o.Ic(3,sn,44,16,"div",3),o.Ub()),2&t&&(o.Db(1),o.oc("ngIf","home"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom),o.Db(1),o.oc("ngIf","transactions"===e.calledFrom))},directives:[S.c,S.a,S.b,a.o,ct.u,ct.n,ct.o,R.c,lt.b,ct.c,lt.d,ct.s,E.b,ct.m,ct.p,U.a,R.f,R.b,w.a,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.e,it.m,it.g,it.k,nt.a,s.a,it.h,at.b,it.a,a.p,L.b,dt.a,dt.c,ut.m,it.d,a.n,it.l,it.f,it.j],pipes:[a.f],styles:[".mat-column-groupChannelAlias[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%]{padding:0 1rem;flex:0 0 25%;width:25%}.mat-column-groupChannelAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.part-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:15rem}"],data:{animation:[xt.a]}}),t})();function ln(t,e){if(1&t&&(o.Vb(0,"button",25),o.Vb(1,"mat-icon"),o.Kc(2,"more_vert"),o.Ub(),o.Ub()),2&t){o.hc();const t=o.wc(11);o.oc("matMenuTriggerFor",t)}}function rn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",15),o.dc("click",function(){return o.zc(t),o.hc(3).onNavigateTo("/ecl/reports")}),o.Kc(1,"Fees Summary"),o.Ub()}}function bn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",15),o.dc("click",function(){return o.zc(t),o.hc(3).onsortChannelsBy()}),o.Kc(1),o.Ub()}if(2&t){const t=o.hc(3);o.Db(1),o.Mc("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}const dn=function(t){return{"error-border":t}};function un(t,e){if(1&t&&o.Qb(0,"rtl-ecl-node-info",26),2&t){const t=o.hc(3);o.oc("information",t.information)("showColorFieldSeparately",!1)("ngClass",o.sc(3,dn,"error"===t.flgLoading[0]))}}function hn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-balances-info",27),2&t){const t=o.hc(3);o.oc("balances",t.balances)("ngClass",o.sc(2,dn,"error"===t.flgLoading[2]))}}function mn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-channel-capacity-info",28),2&t){const t=o.hc(3);o.oc("sortBy",t.sortField)("channelBalances",t.channelBalances)("allChannels",t.allChannelsCapacity)("ngClass",o.sc(4,dn,"error"===t.flgLoading[5]))}}function fn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-fee-info",29),2&t){const t=o.hc(3);o.oc("fees",t.fees)("ngClass",o.sc(2,dn,"error"===t.flgLoading[1]))}}function pn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-channel-status-info",30),2&t){const t=o.hc(3);o.oc("channelsStatus",t.channelsStatus)("ngClass",o.sc(2,dn,"error"===t.flgLoading[0]))}}function gn(t,e){1&t&&(o.Vb(0,"h3"),o.Kc(1,"Error! Unable to find information!"),o.Ub())}function yn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-grid-tile",8),o.Vb(1,"mat-card",9),o.Vb(2,"mat-card-header"),o.Vb(3,"mat-card-title",10),o.Vb(4,"div"),o.Qb(5,"fa-icon",11),o.Vb(6,"span"),o.Kc(7),o.Ub(),o.Ub(),o.Vb(8,"div"),o.Ic(9,ln,3,1,"button",12),o.Vb(10,"mat-menu",13,14),o.Vb(12,"button",15),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc(2).onNavigateTo(n.link)}),o.Kc(13),o.Ub(),o.Ic(14,rn,2,0,"button",16),o.Ic(15,bn,2,1,"button",16),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(16,"mat-card-content",17),o.Vb(17,"div",18),o.Ic(18,un,1,5,"rtl-ecl-node-info",19),o.Ic(19,hn,1,4,"rtl-ecl-balances-info",20),o.Ic(20,mn,1,6,"rtl-ecl-channel-capacity-info",21),o.Ic(21,fn,1,4,"rtl-ecl-fee-info",22),o.Ic(22,pn,1,4,"rtl-ecl-channel-status-info",23),o.Ic(23,gn,2,0,"h3",24),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit;o.oc("colspan",t.cols)("rowspan",t.rows),o.Db(5),o.oc("icon",t.icon),o.Db(2),o.Lc(t.title),o.Db(2),o.oc("ngIf",t.link),o.Db(4),o.Mc("Go To ",t.goTo,""),o.Db(1),o.oc("ngIf","fee"===t.id),o.Db(1),o.oc("ngIf","capacity"===t.id),o.Db(1),o.pc("fxFlex","capacity"===t.id?90:70),o.Db(1),o.oc("ngSwitch",t.id),o.Db(1),o.oc("ngSwitchCase","node"),o.Db(1),o.oc("ngSwitchCase","balance"),o.Db(1),o.oc("ngSwitchCase","capacity"),o.Db(1),o.oc("ngSwitchCase","fee"),o.Db(1),o.oc("ngSwitchCase","status")}}function xn(t,e){if(1&t&&(o.Vb(0,"div",2),o.Vb(1,"div",3),o.Qb(2,"fa-icon",4),o.Vb(3,"span",5),o.Kc(4),o.Ub(),o.Ub(),o.Vb(5,"mat-grid-list",6),o.Ic(6,yn,24,15,"mat-grid-tile",7),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(2),o.oc("icon",t.flgLoading[0]?t.faFrown:t.faSmile),o.Db(2),o.Lc(t.flgLoading[0]?"Error! Please check the server connection.":"Welcome "+t.information.alias+"! Your node is up and running."),o.Db(1),o.oc("rowHeight",t.operatorCardHeight),o.Db(1),o.oc("ngForOf",t.operatorCards)}}function vn(t,e){if(1&t&&(o.Vb(0,"button",25),o.Vb(1,"mat-icon"),o.Kc(2,"more_vert"),o.Ub(),o.Ub()),2&t){o.hc();const t=o.wc(9);o.oc("matMenuTriggerFor",t)}}function Sn(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-card-header"),o.Vb(1,"mat-card-title",10),o.Vb(2,"div"),o.Qb(3,"fa-icon",11),o.Vb(4,"span"),o.Kc(5),o.Ub(),o.Ub(),o.Vb(6,"div"),o.Ic(7,vn,3,1,"button",12),o.Vb(8,"mat-menu",13,39),o.Vb(10,"button",15),o.dc("click",function(){o.zc(t);const e=o.hc().$implicit;return o.hc(2).onNavigateTo(e.link)}),o.Kc(11),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc().$implicit;o.Db(3),o.oc("icon",t.icon),o.Db(2),o.Lc(t.title),o.Db(2),o.oc("ngIf",t.link),o.Db(4),o.Mc("Go To ",t.goTo,"")}}function wn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-node-info",40),2&t){const t=o.hc(3);o.oc("information",t.information)("ngClass",o.sc(2,dn,"error"===t.flgLoading[0]))}}function Dn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-balances-info",27),2&t){const t=o.hc(3);o.oc("balances",t.balances)("ngClass",o.sc(2,dn,"error"===t.flgLoading[2]))}}function Vn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-channel-liquidity-info",41),2&t){const t=o.hc(3);o.oc("direction","In")("totalLiquidity",t.totalInboundLiquidity)("allChannels",t.allInboundChannels)("ngClass",o.sc(4,dn,"error"===t.flgLoading[5]))}}function Cn(t,e){if(1&t&&o.Qb(0,"rtl-ecl-channel-liquidity-info",41),2&t){const t=o.hc(3);o.oc("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("allChannels",t.allOutboundChannels)("ngClass",o.sc(4,dn,"error"===t.flgLoading[5]))}}function Un(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",50),o.Vb(1,"mat-icon"),o.Kc(2,"more_vert"),o.Ub(),o.Ub(),o.Vb(3,"mat-menu",13,51),o.Vb(5,"button",15),o.dc("click",function(){o.zc(t);const e=o.hc(2).$implicit;return o.hc(2).onNavigateTo(e.link)}),o.Kc(6),o.Ub(),o.Vb(7,"button",15),o.dc("click",function(){return o.zc(t),o.hc(4).onNavigateTo("/ecl/reports/transactions")}),o.Kc(8,"Transactions Summary"),o.Ub(),o.Ub()}if(2&t){const t=o.wc(4),e=o.hc(2).$implicit;o.oc("matMenuTriggerFor",t),o.Db(6),o.Mc("Go To ",e.goTo,"")}}function In(t,e){1&t&&(o.Vb(0,"span",42),o.Vb(1,"mat-tab-group",43),o.Vb(2,"mat-tab",44),o.Qb(3,"rtl-ecl-lightning-invoices",45),o.Ub(),o.Vb(4,"mat-tab",46),o.Qb(5,"rtl-ecl-lightning-payments",47),o.Ub(),o.Vb(6,"mat-tab",48),o.Ic(7,Un,9,2,"ng-template",49),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("calledFrom","home"),o.Db(2),o.oc("calledFrom","home"),o.Db(1),o.oc("disabled",!0))}function Ln(t,e){1&t&&(o.Vb(0,"h3"),o.Kc(1,"Error! Unable to find information!"),o.Ub())}const An=function(t){return{"p-0":t}};function Fn(t,e){if(1&t&&(o.Vb(0,"mat-grid-tile",8),o.Vb(1,"mat-card",33),o.Ic(2,Sn,12,4,"mat-card-header",34),o.Vb(3,"mat-card-content",35),o.Vb(4,"div",18),o.Ic(5,wn,1,4,"rtl-ecl-node-info",36),o.Ic(6,Dn,1,4,"rtl-ecl-balances-info",20),o.Ic(7,Vn,1,6,"rtl-ecl-channel-liquidity-info",37),o.Ic(8,Cn,1,6,"rtl-ecl-channel-liquidity-info",37),o.Ic(9,In,8,3,"span",38),o.Ic(10,Ln,2,0,"h3",24),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.oc("colspan",t.cols)("rowspan",t.rows),o.Db(1),o.oc("ngClass",o.sc(11,An,"transactions"===t.id)),o.Db(1),o.oc("ngIf","transactions"!==t.id),o.Db(1),o.pc("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),o.Db(1),o.oc("ngSwitch",t.id),o.Db(1),o.oc("ngSwitchCase","node"),o.Db(1),o.oc("ngSwitchCase","balance"),o.Db(1),o.oc("ngSwitchCase","inboundLiq"),o.Db(1),o.oc("ngSwitchCase","outboundLiq"),o.Db(1),o.oc("ngSwitchCase","transactions")}}function kn(t,e){if(1&t&&(o.Vb(0,"div",31),o.Qb(1,"fa-icon",4),o.Vb(2,"span",5),o.Kc(3),o.Ub(),o.Ub(),o.Vb(4,"mat-grid-list",32),o.Ic(5,Fn,11,13,"mat-grid-tile",7),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faSmile),o.Db(2),o.Mc("Welcome ",t.information.alias,"! Your node is up and running."),o.Db(1),o.oc("rowHeight",t.merchantCardHeight),o.Db(1),o.oc("ngForOf",t.merchantCards)}}let Pn=(()=>{class t{constructor(t,e,n,a,i){this.logger=t,this.store=e,this.actions$=n,this.commonService=a,this.router=i,this.faSmile=h.b,this.faFrown=h.a,this.faAngleDoubleDown=m.a,this.faAngleDoubleUp=m.b,this.faChartPie=m.g,this.faBolt=m.e,this.faServer=m.G,this.faNetworkWired=m.y,this.flgChildInfoUpdated=!1,this.userPersonaEnum=f.w,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.channels=[],this.onchainBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.flgLoading=[!0,!0,!0,!0,!0,!0,!0,!0],this.unSubs=[new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goTo:"Routing",link:"/ecl/routing",icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goTo:"Transactions",link:"/ecl/transactions",title:"",cols:6,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goTo:"Routing",link:"/ecl/routing",icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goTo:"Transactions",link:"/ecl/transactions",title:"",cols:3,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCardHeight=(window.screen.height-200)/2+"px",this.merchantCardHeight=(window.screen.height-210)/10+"px",this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goTo:"Routing",link:"/ecl/routing",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goTo:"Channels",link:"/ecl/connections",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/ecl/onchain",icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goTo:"Channels",link:"/ecl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goTo:"Transactions",link:"/ecl/transactions",title:"",cols:2,rows:5}])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.flgLoading=[!0,!0,!0,!0,!0,!0,!0,!0],t.effectErrors.forEach(t=>{"FetchInfo"===t.action&&(this.flgLoading[0]="error"),"FetchFees"===t.action&&(this.flgLoading[1]="error"),"FetchChannels"===t.action&&(this.flgLoading[2]="error")}),this.selNode=t.nodeSettings,this.information=t.information,"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.information.nodeId),this.fees=t.fees,"error"!==this.flgLoading[1]&&(this.flgLoading[1]=!this.fees.daily_fee),this.channels=t.activeChannels,this.onchainBalance=t.onchainBalance,this.balances.onchain=this.onchainBalance.total,this.balances.lightning=t.lightningBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);let e=t.lightningBalance.localBalance?+t.lightningBalance.localBalance:0,n=t.lightningBalance.remoteBalance?+t.lightningBalance.remoteBalance:0;this.channelBalances={localBalance:e,remoteBalance:n,balancedness:+(1-Math.abs((e-n)/(e+n))).toFixed(3)},this.channelsStatus=t.channelsStatus,this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels,"balancedness"))),this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(t=>t.toRemote>0),"toRemote"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(t=>t.toLocal>0),"toLocal"))),this.channels.forEach(t=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(t.toRemote),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(t.toLocal)}),"error"!==this.flgLoading[2]&&(this.flgLoading[2]=!this.channels),this.flgChildInfoUpdated=this.balances.lightning>=0&&this.balances.onchain>=0&&this.fees.monthly_fee>=0,this.logger.info(t)}),this.actions$.pipe(Object(d.a)(this.unSubs[2]),Object(u.a)(t=>t.type===p.n||t.type===p.X)).subscribe(t=>{t.type===p.n&&(this.flgChildInfoUpdated=!1),t.type===p.X&&(this.flgChildInfoUpdated=!0)})}onNavigateTo(t){this.router.navigateByUrl(t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.channels.sort(function(t,e){const n=+t.toLocal+ +t.toRemote,a=+e.toLocal+ +e.toRemote;return n>a?-1:n<a?1:0})):(this.sortField="Balance Score",this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels,"balancedness"))))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(x.a),o.Pb(v.a),o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"click",4,"ngIf"],["fxLayout","column",1,"dashboard-card-content",3,"fxFlex"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"balances","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"fees","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","ngClass",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass"],["fxFlex","100",3,"balances","ngClass"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","ngClass"],["fxFlex","100",3,"fees","ngClass"],["fxFlex","100",3,"channelsStatus","ngClass"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container","mb-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",1,"dashboard-card-content",3,"fxFlex"],["fxFlex","100",3,"information","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","ngClass",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information","ngClass"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","ngClass"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",2,"max-width","20px",3,"matMenuTriggerFor"],["menuTransactions","matMenu"]],template:function(t,e){if(1&t&&(o.Ic(0,xn,7,4,"div",0),o.Ic(1,kn,6,4,"ng-template",null,1,o.Jc)),2&t){const t=o.wc(2);o.oc("ngIf",e.selNode.userPersona===e.userPersonaEnum.OPERATOR)("ngIfElse",t)}},directives:[a.o,S.c,S.b,w.a,D.a,a.n,D.c,V.a,S.a,V.c,V.f,C.a,C.b,V.b,a.q,a.r,a.s,U.a,C.d,I.a,O,a.m,L.a,T,N,H,Q,tt,et.b,et.a,Yt,cn,et.c],styles:[""]}),t})();const On=["form"];function Tn(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Bitcoin address is required."),o.Ub())}function Rn(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function Kn(t,e){if(1&t&&(o.Vb(0,"mat-option",29),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Lc(t)}}function Mn(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Target Confirmation Blocks is required."),o.Ub())}function En(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.sendFundError)}}function zn(t,e){if(1&t&&(o.Vb(0,"div",30),o.Qb(1,"fa-icon",31),o.Ic(2,En,2,1,"span",12),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.sendFundError)}}let Bn=(()=>{class t{constructor(t,e,n,a,i,o){this.dialogRef=t,this.logger=e,this.store=n,this.commonService=a,this.decimalPipe=i,this.actions$=o,this.faExclamationTriangle=m.o,this.selNode={},this.addressTypes=[],this.flgLoadingWallet=!0,this.selectedAddress=f.a[1],this.blockchainBalance={},this.information={},this.newAddress="",this.transaction={},this.sendFundError="",this.fiatConversion=!1,this.amountUnits=f.e,this.selAmountUnit=f.e[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=f.f,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.store.select("root").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.fiatConversion=t.selNode.settings.fiatConversion,this.amountUnits=t.selNode.settings.currencyUnits,this.appConfig=t.appConfig,this.nodeData=t.nodeData,this.logger.info(t)}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.j||t.type===p.Q)).subscribe(t=>{t.type===p.Q&&(this.store.dispatch(new st.E("Fund Sent Successfully!")),this.dialogRef.close()),t.type===p.j&&"SendOnchainFunds"===t.payload.action&&(this.sendFundError=t.payload.message)})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.store.dispatch(new st.F("Sending Funds...")),this.transaction.amount&&this.selAmountUnit!==f.g.SATS?this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?f.g.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe(Object(d.a)(this.unSubs[2])).subscribe(t=>{this.transaction.amount=parseInt(t[f.g.SATS]),this.selAmountUnit=f.g.SATS,this.store.dispatch(new p.mb(this.transaction))}):this.store.dispatch(new p.mb(this.transaction))}get invalidValues(){return!this.transaction.address||""===this.transaction.address||!this.transaction.amount||this.transaction.amount<=0||!this.transaction.blocks||this.transaction.blocks<=0}resetData(){this.sendFundError="",this.transaction={}}onAmountUnitChange(t){let e=this,n=t.value===this.amountUnits[2]?f.g.OTHER:t.value;this.transaction.amount&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?f.g.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe(Object(d.a)(this.unSubs[3])).subscribe(t=>{e.transaction.amount=+e.decimalPipe.transform(t[n],e.currencyUnitFormats[n]).replace(/,/g,"")}),this.selAmountUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(g.b),o.Pb(y.h),o.Pb(v.a),o.Pb(a.f),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-on-chain-send-modal"]],viewQuery:function(t,e){if(1&t&&o.Ec(On,!0),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first)}},decls:36,vars:15,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"mt-5px"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"padding-gap","overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","addr","required","",3,"ngModel","ngModelChange"],["addrs","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amt","type","number","tabindex","2","required","",3,"ngModel","step","min","ngModelChange"],["amnt","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","60","fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","placeholder","Target Confirmation Blocks","type","number","name","blocks","tabindex","8","required","true",3,"ngModel","step","min","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-flat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Send Payment"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"form",7,8),o.dc("submit",function(){return e.onSendFunds()})("reset",function(){return e.resetData()}),o.Vb(11,"mat-form-field",9),o.Vb(12,"input",10,11),o.dc("ngModelChange",function(t){return e.transaction.address=t}),o.Ub(),o.Ic(14,Tn,2,0,"mat-error",12),o.Ub(),o.Vb(15,"mat-form-field",13),o.Vb(16,"input",14,15),o.dc("ngModelChange",function(t){return e.transaction.amount=t}),o.Ub(),o.Vb(18,"span",16),o.Kc(19),o.Ub(),o.Ic(20,Rn,2,0,"mat-error",12),o.Ub(),o.Vb(21,"mat-form-field",17),o.Vb(22,"mat-select",18),o.dc("selectionChange",function(t){return e.onAmountUnitChange(t)}),o.Ic(23,Kn,2,2,"mat-option",19),o.Ub(),o.Ub(),o.Vb(24,"div",20),o.Vb(25,"mat-form-field",21),o.Vb(26,"input",22,23),o.dc("ngModelChange",function(t){return e.transaction.blocks=t}),o.Ub(),o.Ic(28,Mn,2,0,"mat-error",12),o.Ub(),o.Ub(),o.Qb(29,"div",24),o.Ic(30,zn,3,2,"div",25),o.Vb(31,"div",26),o.Vb(32,"button",27),o.Kc(33,"Clear Fields"),o.Ub(),o.Vb(34,"button",28),o.Kc(35,"Send Funds"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(6),o.oc("mat-dialog-close",!1),o.Db(6),o.oc("ngModel",e.transaction.address),o.Db(2),o.oc("ngIf",!e.transaction.address),o.Db(2),o.oc("ngModel",e.transaction.amount)("step",100)("min",0),o.Db(3),o.Mc(" ",e.selAmountUnit," "),o.Db(1),o.oc("ngIf",!e.transaction.amount),o.Db(2),o.oc("value",e.selAmountUnit),o.Db(1),o.oc("ngForOf",e.amountUnits),o.Db(3),o.oc("ngModel",e.transaction.blocks)("step",1)("min",0),o.Db(2),o.oc("ngIf",!e.transaction.blocks),o.Db(2),o.oc("ngIf",""!==e.sendFundError))},directives:[S.c,S.a,V.c,S.b,U.a,ot.d,V.b,ct.u,ct.n,ct.o,R.c,lt.b,ct.c,rt.a,ct.s,ct.m,ct.p,a.o,ct.q,bt.a,R.g,dt.a,a.n,R.b,ut.m,w.a],styles:[""]}),t})();var qn=n("qmev");function Nn(t,e){1&t&&o.Qb(0,"mat-progress-bar",31)}function Hn(t,e){1&t&&(o.Vb(0,"th",32),o.Kc(1," Date/Time "),o.Ub())}function Qn(t,e){if(1&t&&(o.Vb(0,"td",33),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(t.timestampStr)}}function jn(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1," Amount (Sats) "),o.Ub())}function $n(t,e){if(1&t&&(o.Vb(0,"span",37),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.Lc(o.jc(2,1,t.amount))}}function _n(t,e){if(1&t&&(o.Vb(0,"span",38),o.Kc(1),o.ic(2,"number"),o.Ub()),2&t){const t=o.hc().$implicit;o.Db(1),o.Mc("(",o.jc(2,1,-1*t.amount),")")}}function Jn(t,e){if(1&t&&(o.Vb(0,"td",33),o.Ic(1,$n,3,3,"span",35),o.Ic(2,_n,3,3,"span",36),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.oc("ngIf",t.amount>0||0===t.amount),o.Db(1),o.oc("ngIf",t.amount<0)}}function Xn(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1," Fees (Sats) "),o.Ub())}function Gn(t,e){if(1&t&&(o.Vb(0,"td",33),o.Vb(1,"span",37),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,t.fees))}}function Wn(t,e){1&t&&(o.Vb(0,"th",39),o.Kc(1," Confirmations "),o.Ub())}function Yn(t,e){if(1&t&&(o.Vb(0,"td",40),o.Vb(1,"span",37),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.jc(3,1,null==t?null:t.confirmations)," ")}}function Zn(t,e){1&t&&(o.Vb(0,"th",32),o.Kc(1," Address "),o.Ub())}function ta(t,e){if(1&t&&(o.Vb(0,"td",33),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(t.address)}}function ea(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",41),o.Vb(1,"div",42),o.Vb(2,"mat-select",43),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",44),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function na(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",45),o.Vb(1,"button",46),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc().onTransactionClick(a,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function aa(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No transactions available."),o.Ub())}function ia(t,e){if(1&t&&(o.Vb(0,"td",47),o.Ic(1,aa,2,0,"p",48),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)}}const oa=function(t){return{"display-none":t}};function sa(t,e){if(1&t&&o.Qb(0,"tr",49),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,oa,(null==t.listTransactions?null:t.listTransactions.data)&&(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)>0))}}function ca(t,e){1&t&&o.Qb(0,"tr",50)}function la(t,e){1&t&&o.Qb(0,"tr",51)}const ra=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},ba=function(){return["no_transaction"]};let da=(()=>{class t{constructor(t,e,n,a){this.logger=t,this.commonService=e,this.store=n,this.actions$=a,this.faHistory=m.r,this.displayedColumns=[],this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unsub=[new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","confirmations","fees","actions"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"])}ngOnInit(){this.store.dispatch(new p.B),this.store.select("ecl").pipe(Object(d.a)(this.unsub[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchTransactions"===t.action&&(this.flgLoading[0]="error")}),t.transactions&&this.loadTransactionsTable(t.transactions),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.transactions),this.logger.info(t)})}applyFilter(t){this.listTransactions.filter=t.value}onTransactionClick(t,e){this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"blockHash",value:t.blockHash,title:"Block Hash",width:100}],[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"timestampStr",value:t.timestampStr,title:"Date/Time",width:50,type:f.h.DATE_TIME},{key:"confirmations",value:t.confirmations,title:"Number of Confirmations",width:50,type:f.h.NUMBER}],[{key:"fees",value:t.fees,title:"Fees (Sats)",width:50,type:f.h.NUMBER},{key:"amount",value:t.amount,title:"Amount (Sats)",width:50,type:f.h.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100,type:f.h.STRING}]]}}))}loadTransactionsTable(t){this.listTransactions=new it.o([...t]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.listTransactions.paginator=this.paginator,this.logger.info(this.listTransactions)}onDownloadCSV(){this.listTransactions.data&&this.listTransactions.data.length>0&&this.commonService.downloadFile(this.listTransactions.data,"Transactions")}ngOnDestroy(){this.unsub.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(v.a),o.Pb(y.h),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-on-chain-transaction-history"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Transactions")}])],decls:37,vars:14,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","fees"],["matColumnDef","confirmations"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"div",2),o.Qb(3,"fa-icon",3),o.Vb(4,"span",4),o.Kc(5,"Transaction History"),o.Ub(),o.Ub(),o.Vb(6,"mat-form-field",5),o.Vb(7,"input",6),o.dc("keyup",function(t){return e.applyFilter(t.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",7),o.Vb(9,"div",8),o.Ic(10,Nn,1,0,"mat-progress-bar",9),o.Vb(11,"table",10,11),o.Tb(13,12),o.Ic(14,Hn,2,0,"th",13),o.Ic(15,Qn,2,1,"td",14),o.Sb(),o.Tb(16,15),o.Ic(17,jn,2,0,"th",16),o.Ic(18,Jn,3,2,"td",14),o.Sb(),o.Tb(19,17),o.Ic(20,Xn,2,0,"th",16),o.Ic(21,Gn,4,3,"td",14),o.Sb(),o.Tb(22,18),o.Ic(23,Wn,2,0,"th",19),o.Ic(24,Yn,4,3,"td",20),o.Sb(),o.Tb(25,21),o.Ic(26,Zn,2,0,"th",13),o.Ic(27,ta,2,1,"td",14),o.Sb(),o.Tb(28,22),o.Ic(29,ea,6,0,"th",23),o.Ic(30,na,3,0,"td",24),o.Sb(),o.Tb(31,25),o.Ic(32,ia,2,1,"td",26),o.Sb(),o.Ic(33,sa,1,3,"tr",27),o.Ic(34,ca,1,0,"tr",28),o.Ic(35,la,1,0,"tr",29),o.Ub(),o.Qb(36,"mat-paginator",30),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("icon",e.faHistory),o.Db(7),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.listTransactions)("ngClass",o.sc(11,ra,"error"===e.flgLoading[0])),o.Db(22),o.oc("matFooterRowDef",o.rc(13,ba)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[S.c,S.b,S.a,w.a,R.c,lt.b,E.b,a.o,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,nt.a,s.a,it.h,at.b,it.a,dt.a,dt.c,ut.m,U.a,it.d,it.f,it.j,it.l],pipes:[a.f],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function ua(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",12),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let ha=(()=>{class t{constructor(t,e){this.store=t,this.router=e,this.selNode={},this.faExchangeAlt=m.n,this.faChartPie=m.g,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof i.f)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link}),this.store.select("ecl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.balances=[{title:"Total Balance",dataValue:t.onchainBalance.total||0},{title:"Confirmed",dataValue:t.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:t.onchainBalance.unconfirmed}]})}openSendFundsModal(){this.store.dispatch(new st.C({data:{component:Bn}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-on-chain"]],decls:21,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large","mt-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"On-chain Balance"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Qb(7,"rtl-currency-unit-converter",5),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",0),o.Qb(9,"fa-icon",1),o.Vb(10,"span",2),o.Kc(11,"On-chain Transactions"),o.Ub(),o.Ub(),o.Vb(12,"div",6),o.Vb(13,"mat-card"),o.Vb(14,"mat-card-content",4),o.Vb(15,"nav",7),o.Ic(16,ua,2,3,"div",8),o.Ub(),o.Vb(17,"div",9),o.Qb(18,"router-outlet"),o.Ub(),o.Vb(19,"div",10),o.Qb(20,"rtl-ecl-on-chain-transaction-history",11),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartPie),o.Db(6),o.oc("values",e.balances),o.Db(2),o.oc("icon",e.faExchangeAlt),o.Db(7),o.oc("ngForOf",e.links))},directives:[S.c,S.b,w.a,V.a,V.b,qn.a,et.e,a.n,S.a,i.l,da,et.d,i.h],styles:[""]}),t})();var ma=n("8Qe2");function fa(t,e){if(1&t&&(o.Vb(0,"span",10),o.Kc(1,"Channels"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.activeChannels)}}function pa(t,e){if(1&t&&(o.Vb(0,"span",10),o.Kc(1,"Peers"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.activePeers)}}let ga=(()=>{class t{constructor(t,e){this.store=t,this.router=e,this.activePeers=0,this.activeChannels=0,this.faUsers=m.O,this.faChartPie=m.g,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof i.f)).subscribe(t=>{this.activeLink=this.links.findIndex(e=>e.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("ecl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.activeChannels=t.channelsStatus&&t.channelsStatus.active&&t.channelsStatus.active.channels?t.channelsStatus.active.channels:0,this.balances=[{title:"Total Balance",dataValue:t.onchainBalance.total||0},{title:"Confirmed",dataValue:t.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:t.onchainBalance.unconfirmed}]})}onSelectedTabChange(t){this.router.navigateByUrl("/ecl/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"On-chain Balance"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Qb(7,"rtl-currency-unit-converter",5),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",0),o.Qb(9,"fa-icon",1),o.Vb(10,"span",2),o.Kc(11,"Connections"),o.Ub(),o.Ub(),o.Vb(12,"div",6),o.Vb(13,"mat-card"),o.Vb(14,"mat-card-content",4),o.Vb(15,"mat-tab-group",7),o.dc("selectedIndexChange",function(t){return e.activeLink=t})("selectedTabChange",function(t){return e.onSelectedTabChange(t)}),o.Vb(16,"mat-tab"),o.Ic(17,fa,2,1,"ng-template",8),o.Ub(),o.Vb(18,"mat-tab"),o.Ic(19,pa,2,1,"ng-template",8),o.Ub(),o.Ub(),o.Vb(20,"div",9),o.Qb(21,"router-outlet"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartPie),o.Db(6),o.oc("values",e.balances),o.Db(2),o.oc("icon",e.faUsers),o.Db(6),o.oc("selectedIndex",e.activeLink))},directives:[S.c,S.b,w.a,V.a,V.b,qn.a,et.b,et.a,et.c,S.a,i.l,ma.a],styles:[""]}),t})();function ya(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",11),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let xa=(()=>{class t{constructor(t,e,n){this.logger=t,this.store=e,this.router=n,this.faExchangeAlt=m.n,this.faChartPie=m.g,this.currencyUnits=[],this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof i.f)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link}),this.store.select("ecl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.currencyUnits=t.nodeSettings.currencyUnits,this.balances=t.nodeSettings.userPersona===f.w.OPERATOR?[{title:"Local Capacity",dataValue:t.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:t.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:t.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:t.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(t)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"Lightning Balance"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Qb(7,"rtl-currency-unit-converter",5),o.Ub(),o.Ub(),o.Ub(),o.Vb(8,"div",6),o.Qb(9,"fa-icon",1),o.Vb(10,"span",2),o.Kc(11,"Lightning Transactions"),o.Ub(),o.Ub(),o.Vb(12,"div",7),o.Vb(13,"mat-card"),o.Vb(14,"mat-card-content",4),o.Vb(15,"nav",8),o.Ic(16,ya,2,3,"div",9),o.Ub(),o.Vb(17,"div",10),o.Qb(18,"router-outlet"),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartPie),o.Db(6),o.oc("values",e.balances),o.Db(2),o.oc("icon",e.faExchangeAlt),o.Db(7),o.oc("ngForOf",e.links))},directives:[S.c,S.b,w.a,V.a,V.b,qn.a,et.e,a.n,S.a,i.l,et.d,i.h],styles:[""]}),t})();function va(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",11),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let Sa=(()=>{class t{constructor(t){this.router=t,this.faMapSigns=m.w,this.events=[],this.flgLoading=[!0],this.errorMessage="",this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"peers",name:"Routing Peers"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a,new b.a]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof i.f)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-routing"]],decls:13,vars:2,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"fa-icon",2),o.Vb(3,"span",3),o.Kc(4,"Routing"),o.Ub(),o.Ub(),o.Vb(5,"div",4),o.Vb(6,"mat-card",5),o.Vb(7,"mat-card-content",6),o.Vb(8,"div",7),o.Vb(9,"nav",8),o.Ic(10,va,2,3,"div",9),o.Ub(),o.Ub(),o.Vb(11,"div",10),o.Qb(12,"router-outlet"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(2),o.oc("icon",e.faMapSigns),o.Db(8),o.oc("ngForOf",e.links))},directives:[S.c,S.b,w.a,S.a,V.a,V.b,et.e,a.n,i.l,et.d,i.h],styles:[""]}),t})();var wa=n("zQhy"),Da=n("zHaW"),Va=n("dEYt");function Ca(t,e){1&t&&(o.Vb(0,"th",24),o.Kc(1,"Address"),o.Ub())}function Ua(t,e){if(1&t&&(o.Vb(0,"td",25),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",t," ")}}function Ia(t,e){1&t&&(o.Vb(0,"th",26),o.Vb(1,"span",27),o.Kc(2,"Actions"),o.Ub(),o.Ub())}function La(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",28),o.Vb(1,"span",27),o.Vb(2,"button",29),o.dc("copied",function(e){return o.zc(t),o.hc(2).onCopyNodeURI(e)}),o.Kc(3,"Copy Node URI"),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc(2);o.Db(2),o.oc("payload",n.lookupResult.nodeId+"@"+t)}}function Aa(t,e){1&t&&o.Qb(0,"tr",30)}function Fa(t,e){1&t&&o.Qb(0,"tr",31)}const ka=function(t){return{"background-color":t}};function Pa(t,e){if(1&t&&(o.Vb(0,"div",1),o.Qb(1,"mat-divider",2),o.Vb(2,"div",3),o.Vb(3,"div",4),o.Vb(4,"h4",5),o.Kc(5,"Pub Key"),o.Ub(),o.Vb(6,"span",6),o.Kc(7),o.Ub(),o.Ub(),o.Ub(),o.Qb(8,"mat-divider",7),o.Vb(9,"div",3),o.Vb(10,"div",4),o.Vb(11,"h4",5),o.Kc(12,"Signature"),o.Ub(),o.Vb(13,"span",8),o.Kc(14),o.Ub(),o.Ub(),o.Ub(),o.Qb(15,"mat-divider",7),o.Vb(16,"div",3),o.Vb(17,"div",9),o.Vb(18,"h4",5),o.Kc(19,"Alias"),o.Ub(),o.Vb(20,"span",8),o.Kc(21),o.Vb(22,"span",10),o.Kc(23),o.Ub(),o.Ub(),o.Ub(),o.Vb(24,"div",9),o.Vb(25,"h4",5),o.Kc(26,"Date/Time"),o.Ub(),o.Vb(27,"span",8),o.Kc(28),o.Ub(),o.Ub(),o.Ub(),o.Vb(29,"div",11),o.Vb(30,"h4",12),o.Kc(31,"Addresses"),o.Ub(),o.Vb(32,"div",13),o.Vb(33,"table",14,15),o.Tb(35,16),o.Ic(36,Ca,2,0,"th",17),o.Ic(37,Ua,2,1,"td",18),o.Sb(),o.Tb(38,19),o.Ic(39,Ia,3,0,"th",20),o.Ic(40,La,4,1,"td",21),o.Sb(),o.Ic(41,Aa,1,0,"tr",22),o.Ic(42,Fa,1,0,"tr",23),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(t.lookupResult.nodeId),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(t.lookupResult.signature),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(t.lookupResult.alias),o.Db(1),o.oc("ngStyle",o.sc(12,ka,t.lookupResult.rgbColor)),o.Db(1),o.Lc(t.lookupResult.rgbColor?t.lookupResult.rgbColor:""),o.Db(5),o.Lc(t.lookupResult.timestampStr),o.Db(5),o.oc("dataSource",t.addresses),o.Db(8),o.oc("matHeaderRowDef",t.displayedColumns),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns)}}let Oa=(()=>{class t{constructor(t,e){this.logger=t,this.snackBar=e,this.displayedColumns=["address","actions"]}ngOnInit(){this.addresses=new it.o(this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses?this.lookupResult.addresses:[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null}onCopyNodeURI(t){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+t)}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(Da.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-node-lookup"]],viewQuery:function(t,e){if(1&t&&o.Pc(at.a,!0),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],[1,"mb-1",3,"inset"],["fxLayout","row"],["fxFlex","100"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text","w-100"],[1,"my-1",3,"inset"],[1,"foreground-secondary-text"],["fxFlex","50"],[1,"ml-2",3,"ngStyle"],["fxLayout","column",1,"mt-2"],["fxFlex","100","fxLayoutAlign","start",1,"font-bold-500","mb-1"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","address"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","1","rtlClipboard","",3,"payload","copied"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&o.Ic(0,Pa,43,14,"div",0),2&t&&o.oc("ngIf",e.lookupResult)},directives:[a.o,S.c,M.a,S.a,S.b,a.p,L.b,E.b,it.n,at.a,it.c,it.i,it.b,it.k,it.m,it.h,at.b,it.a,U.a,Va.a,it.j,it.l],styles:[""]}),t})();const Ta=["form"];function Ra(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Mc("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function Ka(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Mc("Invalid ",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder,".")}}function Ma(t,e){if(1&t&&(o.Vb(0,"div"),o.Qb(1,"rtl-ecl-node-lookup",29),o.Ub()),2&t){const t=o.hc(3);o.Db(1),o.oc("lookupResult",t.nodeLookupValue)}}function Ea(t,e){if(1&t&&(o.Vb(0,"span",27),o.Ic(1,Ma,2,1,"div",28),o.Ub()),2&t){const t=o.hc(2),e=o.wc(26);o.Db(1),o.oc("ngIf",t.nodeLookupValue.nodeId)("ngIfElse",e)}}function za(t,e){1&t&&(o.Vb(0,"span",27),o.Vb(1,"h3"),o.Kc(2,"Error! Unable to find details!"),o.Ub(),o.Ub())}function Ba(t,e){if(1&t&&(o.Vb(0,"div",21),o.Vb(1,"div",22),o.Vb(2,"span",23),o.Kc(3),o.Ub(),o.Ub(),o.Vb(4,"div",24),o.Ic(5,Ea,2,2,"span",25),o.Ic(6,za,3,0,"span",26),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(3),o.Mc("",t.lookupFields[t.selectedFieldId].name," Details"),o.Db(1),o.oc("ngSwitch",t.selectedFieldId),o.Db(1),o.oc("ngSwitchCase",0)}}function qa(t,e){1&t&&(o.Vb(0,"h3"),o.Kc(1,"Error! Unable to find details!"),o.Ub())}const Na=function(t){return{"mt-2":t}};let Ha=(()=>{class t{constructor(t,e,n,a){this.logger=t,this.commonService=e,this.store=n,this.actions$=a,this.lookupKeyCtrl=new ct.e,this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Node ID"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=m.F,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions$.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t.type===p.cb||t.type===p.j)).subscribe(t=>{if(t.type===p.cb){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue=t.payload[0]?JSON.parse(JSON.stringify(t.payload[0])):{nodeid:""};break;case 1:this.channelLookupValue=t.payload?JSON.parse(JSON.stringify(t.payload)):[]}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}t.type===p.j&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")}),this.lookupKeyCtrl.valueChanges.pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1})}onLookup(){if(!this.lookupKeyCtrl.value)return this.lookupKeyCtrl.setErrors({required:!0}),!0;if(this.lookupKeyCtrl.value&&(this.lookupKeyCtrl.value.includes("@")||this.lookupKeyCtrl.value.includes(",")))return this.lookupKeyCtrl.setErrors({invalid:!0}),!0;switch(this.selectedFieldId||(this.selectedFieldId=0),this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.store.dispatch(new st.F("Searching "+this.lookupFields[this.selectedFieldId].name+"...")),this.selectedFieldId){case 0:this.store.dispatch(new p.I(this.lookupKeyCtrl.value.trim()))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.lookupKeyCtrl.setValue(""),this.lookupKeyCtrl.setErrors(null),this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(v.a),o.Pb(y.h),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-lookups"]],viewQuery:function(t,e){if(1&t&&o.Ec(Ta,!0),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first)}},decls:27,vars:10,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"card-content-gap","mt-1"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start space-between",1,"w-100"],["form","ngForm"],["fxFlex","20","fxFlex.gt-md","15","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField"],["checked","",1,"mr-4",3,"value"],["fxFlex","80","fxFlex.gt-md","85","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"formControl","placeholder"],["key",""],[4,"ngIf"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch","class","w-100 mt-2",4,"ngIf"],["errorBlock",""],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"fa-icon",2),o.Vb(3,"span",3),o.Kc(4,"Graph Lookups"),o.Ub(),o.Ub(),o.Vb(5,"div",4),o.Vb(6,"mat-card",5),o.Vb(7,"mat-card-content",6),o.Vb(8,"form",7,8),o.Vb(10,"div",9),o.Vb(11,"mat-radio-group",10),o.Vb(12,"mat-radio-button",11),o.Kc(13,"Node"),o.Ub(),o.Ub(),o.Ub(),o.Vb(14,"mat-form-field",12),o.Qb(15,"input",13,14),o.Ic(17,Ra,2,1,"mat-error",15),o.Ic(18,Ka,2,1,"mat-error",15),o.Ub(),o.Vb(19,"div",16),o.Vb(20,"button",17),o.dc("click",function(){return e.resetData()}),o.Kc(21,"Clear"),o.Ub(),o.Vb(22,"button",18),o.dc("click",function(){return e.onLookup()}),o.Kc(23,"Lookup"),o.Ub(),o.Ub(),o.Ub(),o.Ic(24,Ba,7,3,"div",19),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(25,qa,2,0,"ng-template",null,20,o.Jc)),2&t&&(o.Db(2),o.oc("icon",e.faSearch),o.Db(10),o.oc("value",0),o.Db(2),o.oc("ngClass",o.sc(8,Na,e.screenSize===e.screenSizeEnum.XS||e.screenSize===e.screenSizeEnum.SM)),o.Db(1),o.oc("formControl",e.lookupKeyCtrl)("placeholder",(null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder)||"Lookup Key"),o.Db(2),o.oc("ngIf",null==e.lookupKeyCtrl.errors?null:e.lookupKeyCtrl.errors.required),o.Db(1),o.oc("ngIf",null==e.lookupKeyCtrl.errors?null:e.lookupKeyCtrl.errors.invalid),o.Db(6),o.oc("ngIf",e.flgSetLookupValue))},directives:[S.c,S.b,w.a,S.a,V.a,V.b,ct.u,ct.n,ct.o,wa.b,wa.a,R.c,a.m,L.a,lt.b,ct.c,ct.s,ct.m,ct.f,a.o,U.a,R.b,a.q,a.r,a.s,Oa],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),t})();var Qa=n("Ysfc");let ja=(()=>{class t{constructor(t,e){this.store=t,this.eclEffects=e,this.newAddress=""}ngOnInit(){}onGenerateAddress(){this.store.dispatch(new st.F("Getting New Address...")),this.store.dispatch(new p.E),this.eclEffects.setNewAddress.pipe(Object(te.a)(1)).subscribe(t=>{this.newAddress=t,this.store.dispatch(new st.C({width:"58%",data:{address:this.newAddress,addressType:"",component:Qa.a}}))})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(ee.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-on-chain-receive"]],decls:4,vars:0,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row",1,"mt-1"],["mat-flat-button","","color","primary","tabindex","1",1,"top-minus-15px",3,"click"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"button",2),o.dc("click",function(){return e.onGenerateAddress()}),o.Kc(3,"Generate Address"),o.Ub(),o.Ub(),o.Ub())},directives:[S.c,S.a,S.b,U.a],styles:[""]}),t})(),$a=(()=>{class t{constructor(t,e){this.store=t,this.activatedRoute=e,this.sweepAll=!1,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.activatedRoute.data.pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>this.sweepAll=t.sweepAll)}openSendFundsModal(){this.store.dispatch(new st.C({data:{sweepAll:this.sweepAll,component:Bn}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(i.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"button",2),o.dc("click",function(){return e.openSendFundsModal()}),o.Kc(3),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.Lc(e.sweepAll?"Sweep All":"Send Funds"))},directives:[S.c,S.a,S.b,U.a],styles:[""]}),t})();var _a=n("JX91"),Ja=n("lJxs"),Xa=n("hNFU"),Ga=n("jMqV"),Wa=n("vrAh");const Ya=["form"];function Za(t,e){if(1&t&&(o.Vb(0,"mat-option",35),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.oc("value",t),o.Db(1),o.Lc(t.alias?t.alias:t.nodeId?t.nodeId:"")}}function ti(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Peer alias is required."),o.Ub())}function ei(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Peer not found in the list."),o.Ub())}function ni(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-form-field",23),o.Vb(1,"input",31),o.dc("change",function(){return o.zc(t),o.hc().onSelectedPeerChanged()}),o.Ub(),o.Vb(2,"mat-autocomplete",32,33),o.dc("optionSelected",function(){return o.zc(t),o.hc().onSelectedPeerChanged()}),o.Ic(4,Za,2,2,"mat-option",34),o.ic(5,"async"),o.Ub(),o.Ic(6,ti,2,0,"mat-error",17),o.Ic(7,ei,2,0,"mat-error",17),o.Ub()}if(2&t){const t=o.wc(3),e=o.hc();o.Db(1),o.oc("formControl",e.selectedPeer)("matAutocomplete",t),o.Db(1),o.oc("displayWith",e.displayFn),o.Db(2),o.oc("ngForOf",o.jc(5,6,e.filteredPeers)),o.Db(2),o.oc("ngIf",null==e.selectedPeer.errors?null:e.selectedPeer.errors.required),o.Db(1),o.oc("ngIf",null==e.selectedPeer.errors?null:e.selectedPeer.errors.notfound)}}function ai(t,e){1&t&&o.Rb(0)}function ii(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function oi(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Mc("Amount must be less than or equal to ",t.totalBalance,".")}}function si(t,e){if(1&t&&(o.Vb(0,"span"),o.Kc(1),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Lc(t.channelConnectionError)}}function ci(t,e){if(1&t&&(o.Vb(0,"div",36),o.Qb(1,"fa-icon",37),o.Ic(2,si,2,1,"span",17),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(1),o.oc("ngIf",""!==t.channelConnectionError)}}function li(t,e){if(1&t&&(o.Vb(0,"mat-expansion-panel",39),o.Vb(1,"mat-expansion-panel-header"),o.Vb(2,"mat-panel-title"),o.Vb(3,"span"),o.Kc(4,"Peer: \xa0"),o.Ub(),o.Vb(5,"strong",40),o.Kc(6),o.Ub(),o.Ub(),o.Ub(),o.Vb(7,"div",9),o.Vb(8,"div",0),o.Vb(9,"div",23),o.Vb(10,"h4",41),o.Kc(11,"Pubkey"),o.Ub(),o.Vb(12,"span",42),o.Kc(13),o.Ub(),o.Ub(),o.Ub(),o.Qb(14,"mat-divider",43),o.Vb(15,"div",0),o.Vb(16,"div",44),o.Vb(17,"h4",41),o.Kc(18,"Address"),o.Ub(),o.Vb(19,"span",45),o.Kc(20),o.Ub(),o.Ub(),o.Vb(21,"div",44),o.Vb(22,"h4",41),o.Kc(23,"State"),o.Ub(),o.Vb(24,"span",45),o.Kc(25),o.ic(26,"titlecase"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t){const t=o.hc(2);o.Db(6),o.Lc((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.nodeId)),o.Db(7),o.Lc(t.peer.nodeId),o.Db(7),o.Lc(null==t.peer?null:t.peer.address),o.Db(5),o.Lc(o.jc(26,4,null==t.peer?null:t.peer.state))}}function ri(t,e){if(1&t&&o.Ic(0,li,27,6,"mat-expansion-panel",38),2&t){const t=o.hc();o.oc("ngIf",t.peer)}}let bi=(()=>{class t{constructor(t,e,n,a){this.dialogRef=t,this.data=e,this.store=n,this.actions$=a,this.selectedPeer=new ct.e,this.faExclamationTriangle=m.o,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.feeRate=null,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer?this.data.message.peer:null,this.peers=this.data.message.peers&&this.data.message.peers.length?this.data.message.peers:[],this.actions$.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t.type===p.j||t.type===p.l)).subscribe(t=>{t.type===p.j&&"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message),t.type===p.l&&this.dialogRef.close()});let t="",e="";this.sortedPeers=this.peers.sort((n,a)=>(t=n.alias?n.alias.toLowerCase():n.nodeId?n.nodeId.toLowerCase():"",e=a.alias?a.alias.toLowerCase():n.nodeId.toLowerCase(),t<e?-1:t>e?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe(Object(d.a)(this.unSubs[1]),Object(_a.a)(""),Object(Ja.a)(t=>"string"==typeof t?t:t.alias?t.alias:t.nodeId),Object(Ja.a)(t=>t?this.filterPeers(t):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(e=>0===e.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.nodeId?t.nodeId:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.nodeId?this.selectedPeer.value.nodeId:void 0,"string"==typeof this.selectedPeer.value){let t=this.peers.filter(t=>t.alias.length===this.selectedPeer.value.length&&0===t.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].nodeId&&(this.selectedPubkey=t[0].nodeId)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.feeRate=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.feeRate&&this.feeRate>0?"Advanced Options | Fee (Sats/Byte): "+this.feeRate:"Advanced Options"}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0)return!0;this.store.dispatch(new st.F("Opening Channel...")),this.store.dispatch(new p.kb({nodeId:this.peer&&this.peer.nodeId?this.peer.nodeId:this.selectedPubkey,amount:this.fundingAmount,private:this.isPrivate,feeRate:this.feeRate}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(y.h),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-open-channel"]],viewQuery:function(t,e){if(1&t&&o.Ec(Ya,!0),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first)}},decls:48,vars:19,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"mt-5px"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","100"],["matInput","","placeholder","Fee (Sats/Byte)","type","number","name","fee","tabindex","7",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-flat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,e){if(1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.dc("click",function(){return e.onClose()}),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"form",7,8),o.dc("submit",function(){return e.onOpenChannel()})("reset",function(){return e.resetData()}),o.Vb(11,"div",9),o.Ic(12,ni,8,8,"mat-form-field",10),o.Ub(),o.Ic(13,ai,1,0,"ng-container",11),o.Vb(14,"div",9),o.Vb(15,"div",12),o.Vb(16,"mat-form-field",13),o.Vb(17,"input",14,15),o.dc("ngModelChange",function(t){return e.fundingAmount=t}),o.Ub(),o.Vb(19,"mat-hint"),o.Kc(20),o.ic(21,"number"),o.Ub(),o.Vb(22,"span",16),o.Kc(23),o.Ub(),o.Ic(24,ii,2,0,"mat-error",17),o.Ic(25,oi,2,1,"mat-error",17),o.Ub(),o.Vb(26,"div",18),o.Vb(27,"mat-slide-toggle",19),o.dc("ngModelChange",function(t){return e.isPrivate=t}),o.Kc(28,"Private Channel"),o.Ub(),o.Ub(),o.Ub(),o.Vb(29,"mat-expansion-panel",20),o.dc("closed",function(){return e.onAdvancedPanelToggle(!0)})("opened",function(){return e.onAdvancedPanelToggle(!1)}),o.Vb(30,"mat-expansion-panel-header"),o.Vb(31,"mat-panel-title"),o.Vb(32,"span"),o.Kc(33),o.Ub(),o.Ub(),o.Ub(),o.Vb(34,"div",21),o.Vb(35,"div",12),o.Vb(36,"div",22),o.Vb(37,"mat-form-field",23),o.Vb(38,"input",24,25),o.dc("ngModelChange",function(t){return e.feeRate=t}),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(40,ci,3,2,"div",26),o.Vb(41,"div",27),o.Vb(42,"button",28),o.Kc(43,"Clear Fields"),o.Ub(),o.Vb(44,"button",29),o.Kc(45,"Open Channel"),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(46,ri,1,1,"ng-template",null,30,o.Jc)),2&t){const t=o.wc(18),n=o.wc(47);o.Db(5),o.Lc(e.alertTitle),o.Db(7),o.oc("ngIf",!e.peer&&e.peers&&e.peers.length>0),o.Db(1),o.oc("ngTemplateOutlet",n),o.Db(4),o.oc("ngModel",e.fundingAmount)("step",1e3)("min",1)("max",e.totalBalance),o.Db(3),o.Mc("Remaining Bal: ",o.jc(21,17,e.totalBalance-(e.fundingAmount?e.fundingAmount:0)),""),o.Db(3),o.Mc(" ",null==e.information?null:e.information.smaller_currency_unit," "),o.Db(1),o.oc("ngIf",null==t.errors?null:t.errors.required),o.Db(1),o.oc("ngIf",null==t.errors?null:t.errors.max),o.Db(2),o.oc("ngModel",e.isPrivate),o.Db(6),o.Lc(e.advancedTitle),o.Db(5),o.oc("ngModel",e.feeRate)("step",1)("min",0),o.Db(2),o.oc("ngIf",""!==e.channelConnectionError)}},directives:[S.c,S.a,V.c,S.b,U.a,V.b,ct.u,ct.n,ct.o,a.o,a.t,R.c,lt.b,ct.q,ct.c,bt.a,Xa.a,ct.s,ct.m,ct.p,R.f,R.g,Ga.a,ue.c,ue.e,ue.f,rt.a,Wa.c,ct.f,Wa.a,a.n,ut.m,R.b,w.a,M.a],pipes:[a.f,a.b,a.x],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),t})();function di(t,e){if(1&t&&(o.Vb(0,"span",7),o.Kc(1,"Open"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.numOfOpenChannels)}}function ui(t,e){if(1&t&&(o.Vb(0,"span",7),o.Kc(1,"Pending"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.numOfPendingChannels)}}function hi(t,e){if(1&t&&(o.Vb(0,"span",7),o.Kc(1,"Inactive"),o.Ub()),2&t){const t=o.hc();o.pc("matBadge",t.numOfInactiveChannels)}}let mi=(()=>{class t{constructor(t,e,n){this.logger=t,this.store=e,this.router=n,this.numOfOpenChannels=0,this.numOfPendingChannels=0,this.numOfInactiveChannels=0,this.selNode={},this.information={},this.peers=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending"},{link:"inactive",name:"Inactive"}],this.activeLink=0,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof i.f)).subscribe(t=>{this.activeLink=this.links.findIndex(e=>e.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("ecl").pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.numOfOpenChannels=t.channelsStatus&&t.channelsStatus.active&&t.channelsStatus.active.channels?t.channelsStatus.active.channels:0,this.numOfPendingChannels=t.channelsStatus&&t.channelsStatus.pending&&t.channelsStatus.pending.channels?t.channelsStatus.pending.channels:0,this.numOfInactiveChannels=t.channelsStatus&&t.channelsStatus.inactive&&t.channelsStatus.inactive.channels?t.channelsStatus.inactive.channels:0,this.selNode=t.nodeSettings,this.information=t.information,this.peers=t.peers,this.totalBalance=t.onchainBalance.total,this.logger.info(t)})}onOpenChannel(){this.store.dispatch(new st.C({data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:bi}}))}onSelectedTabChange(t){this.router.navigateByUrl("/ecl/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channels-tables"]],decls:14,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"mt-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"button",2),o.dc("click",function(){return e.onOpenChannel()}),o.Kc(3,"Open Channel"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-tab-group",4),o.dc("selectedIndexChange",function(t){return e.activeLink=t})("selectedTabChange",function(t){return e.onSelectedTabChange(t)}),o.Vb(6,"mat-tab"),o.Ic(7,di,2,1,"ng-template",5),o.Ub(),o.Vb(8,"mat-tab"),o.Ic(9,ui,2,1,"ng-template",5),o.Ub(),o.Vb(10,"mat-tab"),o.Ic(11,hi,2,1,"ng-template",5),o.Ub(),o.Ub(),o.Vb(12,"div",6),o.Qb(13,"router-outlet"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(5),o.oc("selectedIndex",e.activeLink))},directives:[S.c,S.a,S.b,U.a,et.b,et.a,et.c,i.l,ma.a],styles:[""]}),t})();function fi(t,e){if(1&t&&(o.Vb(0,"div",11),o.Vb(1,"h4",12),o.Kc(2,"Short Channel ID"),o.Ub(),o.Vb(3,"span",13),o.Kc(4),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(4),o.Lc(t.channel.shortChannelId)}}function pi(t,e){if(1&t&&(o.Vb(0,"div",11),o.Vb(1,"h4",12),o.Kc(2,"State"),o.Ub(),o.Vb(3,"span",16),o.Kc(4),o.ic(5,"titlecase"),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(4),o.Lc(o.jc(5,1,t.channel.state))}}function gi(t,e){if(1&t&&(o.Vb(0,"div"),o.Qb(1,"mat-divider",14),o.Vb(2,"div",9),o.Vb(3,"div",11),o.Vb(4,"h4",12),o.Kc(5,"Base Fee (mSats)"),o.Ub(),o.Vb(6,"span",16),o.Kc(7),o.ic(8,"number"),o.Ub(),o.Ub(),o.Vb(9,"div",11),o.Vb(10,"h4",12),o.Kc(11,"Fee Rate (mSats)"),o.Ub(),o.Vb(12,"span",16),o.Kc(13),o.Ub(),o.Ub(),o.Ub(),o.Qb(14,"mat-divider",14),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(o.jc(8,4,t.channel.feeBaseMsat)),o.Db(6),o.Lc(t.channel.feeProportionalMillionths),o.Db(1),o.oc("inset",!0)}}function yi(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"Show Advanced"),o.Ub())}function xi(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"Hide Advanced"),o.Ub())}function vi(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",22),o.dc("click",function(){return o.zc(t),o.hc().onShowAdvanced()}),o.Ic(1,yi,2,0,"p",23),o.Ic(2,xi,2,0,"ng-template",null,24,o.Jc),o.Ub()}if(2&t){const t=o.wc(3),e=o.hc();o.Db(1),o.oc("ngIf",!e.showAdvanced)("ngIfElse",t)}}function Si(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",25),o.dc("copied",function(e){return o.zc(t),o.hc().onCopyChanID(e)}),o.Kc(1,"Copy Short Channel ID"),o.Ub()}if(2&t){const t=o.hc();o.oc("payload",t.channel.shortChannelId)}}function wi(t,e){if(1&t){const t=o.Wb();o.Vb(0,"button",26),o.dc("copied",function(e){return o.zc(t),o.hc().onCopyChanID(e)}),o.Kc(1,"Copy Channel ID"),o.Ub()}if(2&t){const t=o.hc();o.oc("payload",t.channel.channelId)}}const Di=function(t){return{"xs-scroll-y":t}},Vi=function(t,e){return{"mt-2":t,"mt-1":e}};let Ci=(()=>{class t{constructor(t,e,n,a,i){this.dialogRef=t,this.data=e,this.logger=n,this.commonService=a,this.snackBar=i,this.faReceipt=m.D,this.showAdvanced=!1,this.channelsType="open",this.screenSize="",this.screenSizeEnum=f.q}ngOnInit(){this.channel=this.data.channel,this.channelsType=this.data.channelsType,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("open"===this.channelsType?"Short channel ID "+t+" copied.":"Channel ID copied."),this.logger.info("Copied Text: "+t)}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(g.b),o.Pb(v.a),o.Pb(Da.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channel-information"]],decls:64,vars:29,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"padding-gap-large","pl-3"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header","mb-1"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50",4,"ngIf"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","100"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-stroked-button","","color","primary","type","reset","tabindex","1","class","mr-1",3,"click",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["mat-stroked-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-flat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Qb(4,"fa-icon",4),o.Vb(5,"span",5),o.Kc(6,"Channel Information"),o.Ub(),o.Ub(),o.Vb(7,"button",6),o.dc("click",function(){return e.onClose()}),o.Kc(8,"X"),o.Ub(),o.Ub(),o.Vb(9,"mat-card-content",7),o.Vb(10,"div",8),o.Vb(11,"div",9),o.Ic(12,fi,5,1,"div",10),o.Vb(13,"div",11),o.Vb(14,"h4",12),o.Kc(15,"Peer Alias"),o.Ub(),o.Vb(16,"span",13),o.Kc(17),o.Ub(),o.Ub(),o.Ic(18,pi,6,3,"div",10),o.Ub(),o.Qb(19,"mat-divider",14),o.Vb(20,"div",9),o.Vb(21,"div",15),o.Vb(22,"h4",12),o.Kc(23,"Channel ID"),o.Ub(),o.Vb(24,"span",13),o.Kc(25),o.Ub(),o.Ub(),o.Ub(),o.Qb(26,"mat-divider",14),o.Vb(27,"div",9),o.Vb(28,"div",15),o.Vb(29,"h4",12),o.Kc(30,"Peer Public Key"),o.Ub(),o.Vb(31,"span",13),o.Kc(32),o.Ub(),o.Ub(),o.Ub(),o.Qb(33,"mat-divider",14),o.Vb(34,"div",9),o.Vb(35,"div",11),o.Vb(36,"h4",12),o.Kc(37,"Local Balance (Sats)"),o.Ub(),o.Vb(38,"span",16),o.Kc(39),o.ic(40,"number"),o.Ub(),o.Ub(),o.Vb(41,"div",11),o.Vb(42,"h4",12),o.Kc(43,"Remote Balance (Sats)"),o.Ub(),o.Vb(44,"span",16),o.Kc(45),o.ic(46,"number"),o.Ub(),o.Ub(),o.Ub(),o.Qb(47,"mat-divider",14),o.Vb(48,"div",9),o.Vb(49,"div",11),o.Vb(50,"h4",12),o.Kc(51,"Private"),o.Ub(),o.Vb(52,"span",16),o.Kc(53),o.Ub(),o.Ub(),o.Vb(54,"div",11),o.Vb(55,"h4",12),o.Kc(56,"Funder"),o.Ub(),o.Vb(57,"span",16),o.Kc(58),o.Ub(),o.Ub(),o.Ub(),o.Ic(59,gi,15,6,"div",17),o.Vb(60,"div",18),o.Ic(61,vi,4,2,"button",19),o.Ic(62,Si,2,1,"button",20),o.Ic(63,wi,2,1,"button",21),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(4),o.oc("icon",e.faReceipt),o.Db(5),o.oc("ngClass",o.sc(24,Di,e.screenSize===e.screenSizeEnum.XS)),o.Db(3),o.oc("ngIf","open"===e.channelsType),o.Db(5),o.Lc(e.channel.alias),o.Db(1),o.oc("ngIf","open"!==e.channelsType),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(e.channel.channelId),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(e.channel.nodeId),o.Db(1),o.oc("inset",!0),o.Db(6),o.Lc(o.jc(40,20,e.channel.toLocal)),o.Db(6),o.Lc(o.jc(46,22,e.channel.toRemote)),o.Db(2),o.oc("inset",!0),o.Db(6),o.Lc(0===e.channel.channelFlags?"Yes":"No"),o.Db(5),o.Lc(e.channel.isFunder?"Yes":"No"),o.Db(1),o.oc("ngIf",e.showAdvanced&&"open"===e.channelsType),o.Db(1),o.oc("ngClass",o.tc(26,Vi,!e.showAdvanced,e.showAdvanced)),o.Db(1),o.oc("ngIf","open"===e.channelsType),o.Db(1),o.oc("ngIf","open"===e.channelsType),o.Db(1),o.oc("ngIf","open"!==e.channelsType))},directives:[S.c,S.b,S.a,V.c,w.a,U.a,V.b,a.m,L.a,a.o,M.a,rt.a,Va.a],pipes:[a.f,a.x],styles:[""]}),t})();function Ui(t,e){1&t&&o.Qb(0,"mat-progress-bar",28)}function Ii(t,e){1&t&&(o.Vb(0,"th",29),o.Kc(1," Short Channel ID "),o.Ub())}function Li(t,e){if(1&t&&(o.Vb(0,"span",35),o.Qb(1,"fa-icon",36),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("icon",t.faEyeSlash)}}function Ai(t,e){if(1&t&&(o.Vb(0,"span",37),o.Qb(1,"fa-icon",36),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("icon",t.faEye)}}const Fi=function(t){return{"max-width":t}};function ki(t,e){if(1&t&&(o.Vb(0,"td",30),o.Vb(1,"div",31),o.Ic(2,Li,2,1,"span",32),o.Ic(3,Ai,2,1,"span",33),o.Vb(4,"span",34),o.Kc(5),o.Ub(),o.Ub(),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.Db(1),o.oc("ngStyle",o.sc(4,Fi,n.screenSize===n.screenSizeEnum.XS?"10rem":"22rem")),o.Db(1),o.oc("ngIf",0===t.channelFlags),o.Db(1),o.oc("ngIf",0!==t.channelFlags),o.Db(2),o.Lc(null==t?null:t.shortChannelId)}}function Pi(t,e){1&t&&(o.Vb(0,"th",29),o.Kc(1," Alias "),o.Ub())}function Oi(t,e){if(1&t&&(o.Vb(0,"td",30),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(t.alias)}}function Ti(t,e){1&t&&(o.Vb(0,"th",38),o.Kc(1," Local Balance (Sats) "),o.Ub())}function Ri(t,e){if(1&t&&(o.Vb(0,"td",30),o.Vb(1,"span",39),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,null==t?null:t.toLocal,"1.0-0")," ")}}function Ki(t,e){1&t&&(o.Vb(0,"th",38),o.Kc(1," Remote Balance (Sats) "),o.Ub())}function Mi(t,e){if(1&t&&(o.Vb(0,"td",30),o.Vb(1,"span",39),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,null==t?null:t.toRemote,"1.0-0")," ")}}function Ei(t,e){1&t&&(o.Vb(0,"th",40),o.Kc(1,"Balance Score "),o.Ub())}function zi(t,e){if(1&t&&(o.Vb(0,"td",41),o.Vb(1,"div",42),o.Vb(2,"mat-hint",43),o.Kc(3),o.ic(4,"number"),o.Ub(),o.Ub(),o.Qb(5,"mat-progress-bar",44),o.Ub()),2&t){const t=e.$implicit;o.Db(3),o.Lc(o.jc(4,2,(null==t?null:t.balancedness)||0)),o.Db(2),o.pc("value",t.toLocal&&t.toLocal>0?+t.toLocal/(+t.toLocal+ +t.toRemote)*100:0)}}function Bi(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",45),o.Vb(1,"div",46),o.Vb(2,"mat-select",47),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",48),o.dc("click",function(){return o.zc(t),o.hc().onChannelUpdate("all")}),o.Kc(5,"Update Fee Policy"),o.Ub(),o.Vb(6,"mat-option",48),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(7,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function qi(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",49),o.Vb(1,"div",50),o.Vb(2,"mat-select",51),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",48),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc().onChannelClick(a,n)}),o.Kc(5,"View Info"),o.Ub(),o.Vb(6,"mat-option",48),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onChannelUpdate(n)}),o.Kc(7,"Update Fee Policy"),o.Ub(),o.Vb(8,"mat-option",48),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onChannelClose(n,!1)}),o.Kc(9,"Close Channel"),o.Ub(),o.Vb(10,"mat-option",48),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onChannelClose(n,!0)}),o.Kc(11,"Force Close"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function Ni(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No peers connected. Add a peer in order to open a channel."),o.Ub())}function Hi(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No open channels available."),o.Ub())}function Qi(t,e){if(1&t&&(o.Vb(0,"td",52),o.Ic(1,Ni,2,0,"p",53),o.Ic(2,Hi,2,0,"p",53),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)),o.Db(1),o.oc("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1))}}const ji=function(t){return{"display-none":t}};function $i(t,e){if(1&t&&o.Qb(0,"tr",54),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,ji,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function _i(t,e){1&t&&o.Qb(0,"tr",55)}function Ji(t,e){1&t&&o.Qb(0,"tr",56)}const Xi=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Gi=function(){return["no_peer"]};let Wi=(()=>{class t{constructor(t,e,n,a,i){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=a,this.commonService=i,this.faEye=m.p,this.faEyeSlash=m.q,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.j,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["shortChannelId","alias","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchChannels"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.numPeers=t.peers&&t.peers.length?t.peers.length:0,this.totalBalance=t.onchainBalance.total,this.activeChannels=t.activeChannels,this.loadChannelsTable(),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.activeChannels),this.logger.info(t)})}ngAfterViewInit(){this.activeChannels.length>0&&this.loadChannelsTable()}onChannelUpdate(t){"all"!==t&&"NORMAL"!==t.state||(this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"all"===t?"Update fee policy for selected/all channels":"Update fee policy for Channel: "+t.channelId,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:t&&t.feeBaseMsat?t.feeBaseMsat:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:t&&t.feeProportionalMillionths?t.feeProportionalMillionths:100,min:1,width:48}]}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[1])).subscribe(e=>{if(e){const n=e[0].inputValue,a=e[1].inputValue;let i=null,o="";"all"===t?(this.activeChannels.forEach(t=>{o=o+","+t.channelId}),o=o.substring(1),i={baseFeeMsat:n,feeRate:a,channelIds:o}):i={baseFeeMsat:n,feeRate:a,channelId:t.channelId},this.store.dispatch(new st.F("Updating Channel Policy...")),this.store.dispatch(new p.xb(i))}}),this.applyFilter())}onChannelClose(t,e){this.store.dispatch(new st.D({data:{type:f.b.CONFIRM,alertTitle:e?"Force Close Channel":"Close Channel",titleMessage:e?"Force closing channel: "+t.channelId:"Closing channel: "+t.channelId,noBtnText:"Cancel",yesBtnText:e?"Force Close":"Close Channel"}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[3])).subscribe(n=>{n&&(this.store.dispatch(new st.F(e?"Force Closing Channel...":"Closing Channel...")),this.store.dispatch(new p.f({channelId:t.channelId,force:e})))})}applyFilter(){this.channels.filter=this.selFilter}onChannelClick(t,e){this.store.dispatch(new st.C({data:{channel:t,channelsType:"open",component:Ci}}))}loadChannelsTable(){this.activeChannels.sort(function(t,e){return t.alias===e.alias?0:e.alias?1:-1}),this.channels=new it.o([...this.activeChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"ActiveChannels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(vt.a),o.Pb(ee.a),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channel-open-table"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Channels")}])],decls:33,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","shortChannelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxFlex","100","fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"div",2),o.Vb(3,"mat-form-field",3),o.Vb(4,"input",4),o.dc("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),o.Ub(),o.Ub(),o.Ub(),o.Vb(5,"div",5),o.Ic(6,Ui,1,0,"mat-progress-bar",6),o.Vb(7,"table",7,8),o.Tb(9,9),o.Ic(10,Ii,2,0,"th",10),o.Ic(11,ki,6,6,"td",11),o.Sb(),o.Tb(12,12),o.Ic(13,Pi,2,0,"th",10),o.Ic(14,Oi,2,1,"td",11),o.Sb(),o.Tb(15,13),o.Ic(16,Ti,2,0,"th",14),o.Ic(17,Ri,4,4,"td",11),o.Sb(),o.Tb(18,15),o.Ic(19,Ki,2,0,"th",14),o.Ic(20,Mi,4,4,"td",11),o.Sb(),o.Tb(21,16),o.Ic(22,Ei,2,0,"th",17),o.Ic(23,zi,6,4,"td",18),o.Sb(),o.Tb(24,19),o.Ic(25,Bi,8,0,"th",20),o.Ic(26,qi,12,0,"td",21),o.Sb(),o.Tb(27,22),o.Ic(28,Qi,3,2,"td",23),o.Sb(),o.Ic(29,$i,1,3,"tr",24),o.Ic(30,_i,1,0,"tr",25),o.Ic(31,Ji,1,0,"tr",26),o.Ub(),o.Ub(),o.Qb(32,"mat-paginator",27),o.Ub()),2&t&&(o.Db(4),o.oc("ngModel",e.selFilter),o.Db(2),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.channels)("ngClass",o.sc(11,Xi,"error"===e.flgLoading[0])),o.Db(22),o.oc("matFooterRowDef",o.rc(13,Gi)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[S.c,S.b,S.a,R.c,lt.b,ct.c,ct.m,ct.p,E.b,a.o,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,nt.a,s.a,it.h,at.b,it.a,a.p,L.b,K.a,w.a,R.f,dt.a,dt.c,ut.m,it.d,it.f,it.j,it.l],pipes:[a.f],styles:[".mat-column-shortChannelId[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-shortChannelId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 22%;width:22%}.mat-column-state[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:0 0 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function Yi(t,e){1&t&&o.Qb(0,"mat-progress-bar",25)}function Zi(t,e){1&t&&(o.Vb(0,"th",26),o.Kc(1," State "),o.Ub())}function to(t,e){if(1&t&&(o.Vb(0,"td",27),o.Kc(1),o.ic(2,"titlecase"),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",o.jc(2,1,null==t?null:t.state),"")}}function eo(t,e){1&t&&(o.Vb(0,"th",26),o.Kc(1," Alias "),o.Ub())}function no(t,e){if(1&t&&(o.Vb(0,"td",27),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.alias)}}function ao(t,e){1&t&&(o.Vb(0,"th",28),o.Kc(1," Local Balance (Sats) "),o.Ub())}function io(t,e){if(1&t&&(o.Vb(0,"td",27),o.Vb(1,"span",29),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,null==t?null:t.toLocal,"1.0-0")," ")}}function oo(t,e){1&t&&(o.Vb(0,"th",28),o.Kc(1," Remote Balance (Sats) "),o.Ub())}function so(t,e){if(1&t&&(o.Vb(0,"td",27),o.Vb(1,"span",29),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,null==t?null:t.toRemote,"1.0-0")," ")}}function co(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",30),o.Vb(1,"div",31),o.Vb(2,"mat-select",32),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",33),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function lo(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",34),o.Vb(1,"button",35),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc().onChannelClick(a,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function ro(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No pending channels available."),o.Ub())}function bo(t,e){if(1&t&&(o.Vb(0,"td",36),o.Ic(1,ro,2,0,"p",37),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)}}const uo=function(t){return{"display-none":t}};function ho(t,e){if(1&t&&o.Qb(0,"tr",38),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,uo,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function mo(t,e){1&t&&o.Qb(0,"tr",39)}function fo(t,e){1&t&&o.Qb(0,"tr",40)}const po=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},go=function(){return["no_channel"]};let yo=(()=>{class t{constructor(t,e,n,a,i){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=a,this.commonService=i,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.j,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["state","alias","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","alias","toLocal","toRemote","actions"])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchChannels"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.numPeers=t.peers&&t.peers.length?t.peers.length:0,this.totalBalance=t.onchainBalance.total,this.pendingChannels=t.pendingChannels,this.loadChannelsTable(),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.pendingChannels),this.logger.info(t)})}ngAfterViewInit(){this.pendingChannels.length>0&&this.loadChannelsTable()}applyFilter(){this.channels.filter=this.selFilter}onChannelClick(t,e){this.store.dispatch(new st.C({data:{channel:t,channelsType:"pending",component:Ci}}))}loadChannelsTable(){this.pendingChannels.sort(function(t,e){return t.alias===e.alias?0:e.alias?1:-1}),this.channels=new it.o([...this.pendingChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"PendingChannels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(vt.a),o.Pb(ee.a),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channel-pending-table"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Channels")}])],decls:30,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"div",2),o.Vb(3,"mat-form-field",3),o.Vb(4,"input",4),o.dc("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),o.Ub(),o.Ub(),o.Ub(),o.Vb(5,"div",5),o.Ic(6,Yi,1,0,"mat-progress-bar",6),o.Vb(7,"table",7,8),o.Tb(9,9),o.Ic(10,Zi,2,0,"th",10),o.Ic(11,to,3,3,"td",11),o.Sb(),o.Tb(12,12),o.Ic(13,eo,2,0,"th",10),o.Ic(14,no,2,1,"td",11),o.Sb(),o.Tb(15,13),o.Ic(16,ao,2,0,"th",14),o.Ic(17,io,4,4,"td",11),o.Sb(),o.Tb(18,15),o.Ic(19,oo,2,0,"th",14),o.Ic(20,so,4,4,"td",11),o.Sb(),o.Tb(21,16),o.Ic(22,co,6,0,"th",17),o.Ic(23,lo,3,0,"td",18),o.Sb(),o.Tb(24,19),o.Ic(25,bo,2,1,"td",20),o.Sb(),o.Ic(26,ho,1,3,"tr",21),o.Ic(27,mo,1,0,"tr",22),o.Ic(28,fo,1,0,"tr",23),o.Ub(),o.Ub(),o.Qb(29,"mat-paginator",24),o.Ub()),2&t&&(o.Db(4),o.oc("ngModel",e.selFilter),o.Db(2),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.channels)("ngClass",o.sc(11,po,"error"===e.flgLoading[0])),o.Db(19),o.oc("matFooterRowDef",o.rc(13,go)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[S.c,S.b,S.a,R.c,lt.b,ct.c,ct.m,ct.p,E.b,a.o,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,nt.a,s.a,it.h,at.b,it.a,dt.a,dt.c,ut.m,U.a,it.d,it.f,it.j,it.l],pipes:[a.x,a.f],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();var xo=n("hzfI");const vo=["peersForm"],So=["stepper"];function wo(t,e){if(1&t&&o.Kc(0),2&t){const t=o.hc();o.Lc(t.peerFormLabel)}}function Do(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Address is required."),o.Ub())}function Vo(t,e){if(1&t&&(o.Vb(0,"div",34),o.Qb(1,"fa-icon",35),o.Vb(2,"span"),o.Kc(3),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(2),o.Lc(t.peerConnectionError)}}function Co(t,e){if(1&t&&o.Kc(0),2&t){const t=o.hc();o.Lc(t.channelFormLabel)}}function Uo(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function Io(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount must be a positive number."),o.Ub())}function Lo(t,e){if(1&t&&(o.Vb(0,"mat-error"),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Mc("Amount must be less than or equal to ",t.totalBalance,".")}}function Ao(t,e){if(1&t&&(o.Vb(0,"div",34),o.Qb(1,"fa-icon",35),o.Vb(2,"span"),o.Kc(3),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("icon",t.faExclamationTriangle),o.Db(2),o.Lc(t.channelConnectionError)}}let Fo=(()=>{class t{constructor(t,e,n,a,i,o,s){this.dialogRef=t,this.data=e,this.store=n,this.eclEffects=a,this.formBuilder=i,this.actions$=o,this.logger=s,this.faExclamationTriangle=m.o,this.peerAddress="",this.totalBalance=0,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.unSubs=[new b.a,new b.a]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.nodeId&&this.data.message.peer.address?this.data.message.peer.nodeId+"@"+this.data.message.peer.address:this.data.message.peer&&this.data.message.peer.nodeId&&!this.data.message.peer.address?this.data.message.peer.nodeId:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[ct.t.required]],peerAddress:[this.peerAddress,[ct.t.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[ct.t.required,ct.t.min(1),ct.t.max(this.totalBalance)]],isPrivate:[!1],feeRate:[null],hiddenAmount:["",[ct.t.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.G||t.type===p.l||t.type===p.j)).subscribe(t=>{t.type===p.G&&(this.logger.info(t.payload),this.flgEditable=!1,this.newlyAddedPeer=t.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),t.type===p.l&&this.dialogRef.close(),t.type===p.j&&("SaveNewPeer"===t.payload.action?this.peerConnectionError=t.payload.message:"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch(new st.F("Adding Peer...")),this.store.dispatch(new p.lb({id:this.peerFormGroup.controls.peerAddress.value}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0)return!0;this.channelConnectionError="",this.store.dispatch(new st.F("Opening Channel...")),this.store.dispatch(new p.kb({nodeId:this.newlyAddedPeer.nodeId,amount:this.channelFormGroup.controls.fundingAmount.value,private:this.channelFormGroup.controls.isPrivate.value,feeRate:this.channelFormGroup.controls.feeRate.value}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.selectedIndex){case 0:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 1:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.nodeId):"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.nodeId):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)";break;default:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)"}t.selectedIndex<t.previouslySelectedIndex&&(0===t.selectedIndex?this.peerFormGroup.controls.hiddenAddress.setValue(""):1===t.selectedIndex&&this.channelFormGroup.controls.hiddenAmount.setValue(""))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ot.f),o.Pb(ot.a),o.Pb(y.h),o.Pb(ee.a),o.Pb(ct.d),o.Pb(x.a),o.Pb(g.b))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-connect-peer"]],viewQuery:function(t,e){if(1&t&&(o.Pc(vo,!0),o.Pc(So,!0)),2&t){let t;o.vc(t=o.ec())&&(e.form=t.first),o.vc(t=o.ec())&&(e.stepper=t.first)}},decls:50,vars:20,consts:[["fxLayout","row"],["fxFlex","100",1,"padding-gap-large"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"mt-5px"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100"],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","formControlName","feeRate","placeholder","Fee (Sats/Byte)","type","number","name","feeRate","tabindex","7",3,"step","min"],["mat-stroked-button","","color","primary","tabindex","8","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","tabindex","12","type","button","default","",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Vb(2,"mat-card-header",2),o.Vb(3,"div",3),o.Vb(4,"span",4),o.Kc(5,"Connect to a new peer"),o.Ub(),o.Ub(),o.Vb(6,"button",5),o.dc("click",function(){return e.onClose()}),o.Kc(7,"X"),o.Ub(),o.Ub(),o.Vb(8,"mat-card-content",6),o.Vb(9,"div",7),o.Vb(10,"mat-vertical-stepper",8,9),o.dc("selectionChange",function(t){return e.stepSelectionChanged(t)}),o.Vb(12,"mat-step",10),o.Vb(13,"form",11),o.Ic(14,wo,1,1,"ng-template",12),o.Vb(15,"mat-form-field",13),o.Qb(16,"input",14),o.Ic(17,Do,2,0,"mat-error",15),o.Ub(),o.Ic(18,Vo,4,2,"div",16),o.Vb(19,"div",17),o.Vb(20,"button",18),o.dc("click",function(){return e.onConnectPeer()}),o.Kc(21),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(22,"mat-step",10),o.Vb(23,"form",19),o.Ic(24,Co,1,1,"ng-template",20),o.Vb(25,"div",21),o.Vb(26,"div",22),o.Vb(27,"mat-form-field",23),o.Qb(28,"input",24),o.Vb(29,"mat-hint"),o.Kc(30),o.Ub(),o.Vb(31,"span",25),o.Kc(32," Sats "),o.Ub(),o.Ic(33,Uo,2,0,"mat-error",15),o.Ic(34,Io,2,0,"mat-error",15),o.Ic(35,Lo,2,1,"mat-error",15),o.Ub(),o.Vb(36,"div",26),o.Vb(37,"mat-slide-toggle",27),o.Kc(38,"Private Channel"),o.Ub(),o.Ub(),o.Ub(),o.Vb(39,"div",28),o.Vb(40,"div",29),o.Vb(41,"mat-form-field",13),o.Qb(42,"input",30),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ic(43,Ao,4,2,"div",16),o.Vb(44,"div",17),o.Vb(45,"button",31),o.dc("click",function(){return e.onOpenChannel()}),o.Kc(46),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(47,"div",32),o.Vb(48,"button",33),o.dc("click",function(){return e.onClose()}),o.Kc(49),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(10),o.oc("linear",!0),o.Db(2),o.oc("stepControl",e.peerFormGroup)("editable",e.flgEditable),o.Db(1),o.oc("formGroup",e.peerFormGroup),o.Db(4),o.oc("ngIf",null==e.peerFormGroup.controls.peerAddress.errors?null:e.peerFormGroup.controls.peerAddress.errors.required),o.Db(1),o.oc("ngIf",""!==e.peerConnectionError),o.Db(3),o.Lc(""!==e.peerConnectionError?"Retry":"Add Peer"),o.Db(1),o.oc("stepControl",e.channelFormGroup)("editable",e.flgEditable),o.Db(1),o.oc("formGroup",e.channelFormGroup),o.Db(5),o.oc("step",1e3),o.Db(2),o.Mc("Remaining Bal: ",e.totalBalance-(e.channelFormGroup.controls.fundingAmount.value?e.channelFormGroup.controls.fundingAmount.value:0),""),o.Db(3),o.oc("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.required),o.Db(1),o.oc("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.min),o.Db(1),o.oc("ngIf",null==e.channelFormGroup.controls.fundingAmount.errors?null:e.channelFormGroup.controls.fundingAmount.errors.max),o.Db(7),o.oc("step",1)("min",0),o.Db(1),o.oc("ngIf",""!==e.channelConnectionError),o.Db(3),o.Lc(""!==e.channelConnectionError?"Retry":"Open Channel"),o.Db(3),o.Lc(null!=e.newlyAddedPeer&&e.newlyAddedPeer.nodeId?"Do It Later":"Close"))},directives:[S.c,S.a,V.c,S.b,U.a,V.b,xo.h,xo.a,ct.u,ct.n,ct.h,xo.b,R.c,lt.b,ct.c,rt.a,ct.m,ct.g,ct.s,a.o,ct.q,R.f,R.g,Ga.a,bt.a,R.b,w.a],styles:[""]}),t})();function ko(t,e){1&t&&o.Qb(0,"mat-progress-bar",35)}function Po(t,e){1&t&&(o.Vb(0,"th",36),o.Kc(1," ID "),o.Ub())}const Oo=function(t){return{"max-width":t}};function To(t,e){if(1&t&&(o.Vb(0,"td",37),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.oc("ngStyle",o.sc(2,Oo,n.screenSize===n.screenSizeEnum.XS?"10rem":"30rem")),o.Db(1),o.Mc(" ",null==t?null:t.nodeId," ")}}function Ro(t,e){1&t&&(o.Vb(0,"th",38),o.Kc(1," Alias "),o.Ub())}const Ko=function(t){return{"mr-0":t}};function Mo(t,e){if(1&t&&o.Qb(0,"span",42),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,Ko,t.screenSize===t.screenSizeEnum.XS))}}function Eo(t,e){if(1&t&&o.Qb(0,"span",43),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,Ko,t.screenSize===t.screenSizeEnum.XS))}}function zo(t,e){if(1&t&&(o.Vb(0,"td",39),o.Ic(1,Mo,1,3,"span",40),o.Ic(2,Eo,1,3,"span",41),o.Kc(3),o.Ub()),2&t){const t=e.$implicit,n=o.hc();o.oc("ngStyle",o.sc(4,Oo,n.screenSize===n.screenSizeEnum.XS?"10rem":"25rem")),o.Db(1),o.oc("ngIf","CONNECTED"===t.state),o.Db(1),o.oc("ngIf","DISCONNECTED"===t.state),o.Db(1),o.Mc(" ",null==t?null:t.alias," ")}}function Bo(t,e){1&t&&(o.Vb(0,"th",36),o.Kc(1," State "),o.Ub())}function qo(t,e){if(1&t&&(o.Vb(0,"td",44),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.state," ")}}function No(t,e){1&t&&(o.Vb(0,"th",36),o.Kc(1," Network Address "),o.Ub())}function Ho(t,e){if(1&t&&(o.Vb(0,"td",44),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.address," ")}}function Qo(t,e){1&t&&(o.Vb(0,"th",36),o.Kc(1," Channels "),o.Ub())}function jo(t,e){if(1&t&&(o.Vb(0,"td",44),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.channels," ")}}function $o(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",45),o.Vb(1,"div",46),o.Vb(2,"mat-select",47),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",48),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function _o(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-option",48),o.dc("click",function(){o.zc(t);const e=o.hc().$implicit;return o.hc().onPeerDetach(e)}),o.Kc(1,"Disconnect"),o.Ub()}}function Jo(t,e){if(1&t){const t=o.Wb();o.Vb(0,"mat-option",48),o.dc("click",function(){o.zc(t);const e=o.hc().$implicit;return o.hc().onConnectPeer(e)}),o.Kc(1,"Reconnect"),o.Ub()}}function Xo(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",49),o.Vb(1,"div",46),o.Vb(2,"mat-select",47),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",48),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc().onPeerClick(a,n)}),o.Kc(5,"View Info"),o.Ub(),o.Vb(6,"mat-option",48),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().onOpenChannel(n)}),o.Kc(7,"Open Channel"),o.Ub(),o.Ic(8,_o,2,0,"mat-option",50),o.Ic(9,Jo,2,0,"mat-option",50),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=e.$implicit;o.Db(8),o.oc("ngIf","CONNECTED"===t.state),o.Db(1),o.oc("ngIf","DISCONNECTED"===t.state)}}function Go(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No connected peers."),o.Ub())}function Wo(t,e){if(1&t&&(o.Vb(0,"td",51),o.Ic(1,Go,2,0,"p",52),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)}}const Yo=function(t){return{"display-none":t}};function Zo(t,e){if(1&t&&o.Qb(0,"tr",53),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,Yo,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function ts(t,e){1&t&&o.Qb(0,"tr",54)}function es(t,e){if(1&t&&o.Qb(0,"tr",55),2&t){const t=e.$implicit,n=o.hc();o.oc("@newlyAddedRowAnimation",t.pub_key===n.newlyAddedPeer&&n.flgAnimate?"added":"notAdded")}}const ns=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},as=function(){return["no_peer"]};let is=(()=>{class t{constructor(t,e,n,a,i,o){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=a,this.actions$=i,this.commonService=o,this.faUsers=m.O,this.newlyAddedPeer="",this.flgAnimate=!0,this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","actions"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","channels","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","address","channels","actions"])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchPeers"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.availableBalance=t.onchainBalance.total||0,this.peersData=t.peers,this.loadPeersTable(this.peersData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!1),setTimeout(()=>{this.flgAnimate=!1},3e3),this.logger.info(t)}),this.actions$.pipe(Object(d.a)(this.unSubs[1]),Object(u.a)(t=>t.type===p.gb)).subscribe(t=>{this.peerAddress=void 0,this.flgAnimate=!0})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,e){const n=[[{key:"nodeId",value:t.nodeId,title:"Public Key",width:100}],[{key:"address",value:t.address,title:"Address",width:50},{key:"alias",value:t.alias,title:"Alias",width:50}],[{key:"state",value:this.commonService.titleCase(t.state),title:"State",width:50},{key:"channels",value:t.channels,title:"Channels",width:50}]];this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.nodeId,message:n}}))}onConnectPeer(t){this.store.dispatch(new st.C({data:{message:{peer:t.nodeId?t:null,information:this.information,balance:this.availableBalance},component:Fo}}))}onOpenChannel(t){this.store.dispatch(new st.C({data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:bi}}))}onPeerDetach(t){this.store.dispatch(t.channels>0?new st.C({data:{type:f.b.ERROR,alertTitle:"Disconnect Not Allowed",titleMessage:"Channel active with this peer."}}):new st.D({data:{type:f.b.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.nodeId),noBtnText:"Cancel",yesBtnText:"Disconnect"}})),this.rtlEffects.closeConfirm.pipe(Object(d.a)(this.unSubs[3])).subscribe(e=>{e&&(this.store.dispatch(new st.F("Disconnecting Peer...")),this.store.dispatch(new p.i({nodeId:t.nodeId})))})}applyFilter(t){this.peers.filter=t.value}loadPeersTable(t){this.peers=new it.o(t?[...t]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.peers.paginator=this.paginator}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(vt.a),o.Pb(ee.a),o.Pb(x.a),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-peers"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Peers")}])],decls:42,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","nodeId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","state"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","channels"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-cell",""],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"form",1,2),o.Vb(3,"button",3),o.dc("click",function(){return e.onConnectPeer({})}),o.Kc(4,"Add Peer"),o.Ub(),o.Ub(),o.Vb(5,"div",4),o.Vb(6,"div",5),o.Vb(7,"div",6),o.Qb(8,"fa-icon",7),o.Vb(9,"span",8),o.Kc(10,"Peers"),o.Ub(),o.Ub(),o.Vb(11,"mat-form-field",9),o.Vb(12,"div",10),o.Vb(13,"input",11),o.dc("keyup",function(t){return e.applyFilter(t.target)}),o.Ub(),o.Ub(),o.Ub(),o.Ub(),o.Vb(14,"div",12),o.Ic(15,ko,1,0,"mat-progress-bar",13),o.Vb(16,"table",14,15),o.Tb(18,16),o.Ic(19,Po,2,0,"th",17),o.Ic(20,To,2,4,"td",18),o.Sb(),o.Tb(21,19),o.Ic(22,Ro,2,0,"th",20),o.Ic(23,zo,4,6,"td",21),o.Sb(),o.Tb(24,22),o.Ic(25,Bo,2,0,"th",17),o.Ic(26,qo,2,1,"td",23),o.Sb(),o.Tb(27,24),o.Ic(28,No,2,0,"th",17),o.Ic(29,Ho,2,1,"td",23),o.Sb(),o.Tb(30,25),o.Ic(31,Qo,2,0,"th",17),o.Ic(32,jo,2,1,"td",23),o.Sb(),o.Tb(33,26),o.Ic(34,$o,6,0,"th",27),o.Ic(35,Xo,10,2,"td",28),o.Sb(),o.Tb(36,29),o.Ic(37,Wo,2,1,"td",30),o.Sb(),o.Ic(38,Zo,1,3,"tr",31),o.Ic(39,ts,1,0,"tr",32),o.Ic(40,es,1,1,"tr",33),o.Ub(),o.Ub(),o.Qb(41,"mat-paginator",34),o.Ub(),o.Ub()),2&t&&(o.Db(8),o.oc("icon",e.faUsers),o.Db(7),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.peers)("ngClass",o.sc(11,ns,"error"===e.flgLoading[0])),o.Db(22),o.oc("matFooterRowDef",o.rc(13,as)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[S.c,S.a,S.b,ct.u,ct.n,ct.o,U.a,w.a,R.c,lt.b,E.b,a.o,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,nt.a,s.a,it.h,at.b,it.a,a.p,L.b,K.a,dt.a,dt.c,ut.m,it.d,it.f,it.j,it.l],styles:[".mat-column-alias[_ngcontent-%COMP%], .mat-column-nodeId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-nodeId[_ngcontent-%COMP%]{padding-right:2rem}.mat-column-address[_ngcontent-%COMP%]{flex:1 1 15%;width:15%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"],data:{animation:[xt.a]}}),t})();const os=["queryRoutesForm"];function ss(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Destination Node ID is required."),o.Ub())}function cs(t,e){1&t&&(o.Vb(0,"mat-error"),o.Kc(1,"Amount is required."),o.Ub())}function ls(t,e){1&t&&o.Qb(0,"mat-progress-bar",31)}function rs(t,e){1&t&&(o.Vb(0,"th",32),o.Kc(1," Alias "),o.Ub())}function bs(t,e){if(1&t&&(o.Vb(0,"td",33),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.alias," ")}}function ds(t,e){1&t&&(o.Vb(0,"th",32),o.Kc(1," ID "),o.Ub())}function us(t,e){if(1&t&&(o.Vb(0,"td",33),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",null==t?null:t.nodeId," ")}}function hs(t,e){1&t&&(o.Vb(0,"th",34),o.Vb(1,"span",35),o.Kc(2,"Actions"),o.Ub(),o.Ub())}function ms(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",36),o.Vb(1,"button",37),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc().onHopClick(a,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function fs(t,e){1&t&&o.Qb(0,"tr",38)}function ps(t,e){1&t&&o.Qb(0,"tr",39)}const gs=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}};let ys=(()=>{class t{constructor(t,e,n){this.store=t,this.eclEffects=e,this.commonService=n,this.nodeId="",this.amount=0,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=m.E,this.faExclamationTriangle=m.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","actions"])}ngOnInit(){this.qrHops=new it.o([]),this.eclEffects.setQueryRoutes.pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.qrHops.data=[],t?(this.flgLoading[0]=!1,this.qrHops=new it.o([...t]),this.qrHops.data=t):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null})}onQueryRoutes(){if(!this.nodeId||!this.amount)return!0;this.qrHops.data=[],this.flgLoading[0]=!0,this.store.dispatch(new p.F({nodeId:this.nodeId,amount:1e3*this.amount}))}resetData(){this.nodeId="",this.amount=0,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,e){this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Route Information",message:[[{key:"alias",value:t.alias,title:"Alias",width:100,type:f.h.STRING}],[{key:"nodeId",value:t.nodeId,title:"Node ID",width:100,type:f.h.STRING}]]}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(y.h),o.Pb(ee.a),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-query-routes"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Ec(os,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.form=t.first)}},decls:39,vars:16,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Node ID","name","nodeId","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","4"],["fxLayout","row","fxLayoutAlign","start center",1,"padding-gap-x","page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","nodeId"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-4","pr-3"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",0),o.Vb(1,"form",1,2),o.dc("ngSubmit",function(){return o.zc(t),o.wc(2).form.valid&&e.onQueryRoutes()}),o.Vb(3,"div",3),o.Qb(4,"fa-icon",4),o.Vb(5,"span"),o.Kc(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),o.Ub(),o.Ub(),o.Vb(7,"mat-form-field",5),o.Vb(8,"input",6,7),o.dc("ngModelChange",function(t){return e.nodeId=t}),o.Ub(),o.Ic(10,ss,2,0,"mat-error",8),o.Ub(),o.Vb(11,"mat-form-field",9),o.Vb(12,"input",10),o.dc("ngModelChange",function(t){return e.amount=t}),o.Ub(),o.Ic(13,cs,2,0,"mat-error",8),o.Ub(),o.Vb(14,"div",11),o.Vb(15,"button",12),o.dc("click",function(){return e.resetData()}),o.Kc(16,"Clear"),o.Ub(),o.Vb(17,"button",13),o.Kc(18,"Query Route"),o.Ub(),o.Ub(),o.Ub(),o.Vb(19,"div",14),o.Vb(20,"div",15),o.Qb(21,"fa-icon",16),o.Vb(22,"span",17),o.Kc(23,"Transaction Route"),o.Ub(),o.Ub(),o.Ub(),o.Vb(24,"div",18),o.Ic(25,ls,1,0,"mat-progress-bar",19),o.Vb(26,"table",20,21),o.Tb(28,22),o.Ic(29,rs,2,0,"th",23),o.Ic(30,bs,2,1,"td",24),o.Sb(),o.Tb(31,25),o.Ic(32,ds,2,0,"th",23),o.Ic(33,us,2,1,"td",24),o.Sb(),o.Tb(34,26),o.Ic(35,hs,3,0,"th",27),o.Ic(36,ms,3,0,"td",28),o.Sb(),o.Ic(37,fs,1,0,"tr",29),o.Ic(38,ps,1,0,"tr",30),o.Ub(),o.Ub(),o.Ub()}2&t&&(o.Db(4),o.oc("icon",e.faExclamationTriangle),o.Db(4),o.oc("ngModel",e.nodeId),o.Db(2),o.oc("ngIf",!e.nodeId),o.Db(2),o.oc("ngModel",e.amount)("step",1e3)("min",0),o.Db(1),o.oc("ngIf",!e.amount),o.Db(8),o.oc("icon",e.faRoute),o.Db(4),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.qrHops)("ngClass",o.sc(14,gs,"error"===e.flgLoading[0])),o.Db(11),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns))},directives:[S.c,S.a,ct.u,ct.n,ct.o,S.b,w.a,R.c,lt.b,ct.c,ct.s,ct.m,ct.p,a.o,ct.q,bt.a,U.a,E.b,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.k,it.m,R.b,s.a,it.h,at.b,it.a,it.j,it.l],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();function xs(t,e){1&t&&o.Qb(0,"mat-progress-bar",25)}function vs(t,e){1&t&&(o.Vb(0,"th",26),o.Kc(1," State "),o.Ub())}function Ss(t,e){if(1&t&&(o.Vb(0,"td",27),o.Kc(1),o.ic(2,"titlecase"),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Mc(" ",o.jc(2,1,null==t?null:t.state),"")}}function ws(t,e){1&t&&(o.Vb(0,"th",26),o.Kc(1," Alias "),o.Ub())}function Ds(t,e){if(1&t&&(o.Vb(0,"td",27),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.alias)}}function Vs(t,e){1&t&&(o.Vb(0,"th",28),o.Kc(1," Local Balance (Sats) "),o.Ub())}function Cs(t,e){if(1&t&&(o.Vb(0,"td",27),o.Vb(1,"span",29),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,null==t?null:t.toLocal,"1.0-0")," ")}}function Us(t,e){1&t&&(o.Vb(0,"th",28),o.Kc(1," Remote Balance (Sats) "),o.Ub())}function Is(t,e){if(1&t&&(o.Vb(0,"td",27),o.Vb(1,"span",29),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Mc(" ",o.kc(3,1,null==t?null:t.toRemote,"1.0-0")," ")}}function Ls(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",30),o.Vb(1,"div",31),o.Vb(2,"mat-select",32),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",33),o.dc("click",function(){return o.zc(t),o.hc().onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function As(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",34),o.Vb(1,"button",35),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc().onChannelClick(a,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function Fs(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No inactive channels available."),o.Ub())}function ks(t,e){if(1&t&&(o.Vb(0,"td",36),o.Ic(1,Fs,2,0,"p",37),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("ngIf",!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)}}const Ps=function(t){return{"display-none":t}};function Os(t,e){if(1&t&&o.Qb(0,"tr",38),2&t){const t=o.hc();o.oc("ngClass",o.sc(1,Ps,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Ts(t,e){1&t&&o.Qb(0,"tr",39)}function Rs(t,e){1&t&&o.Qb(0,"tr",40)}const Ks=function(t){return{"overflow-auto error-border":t,"overflow-auto":!0}},Ms=function(){return["no_channel"]};let Es=(()=>{class t{constructor(t,e,n,a,i){this.logger=t,this.store=e,this.rtlEffects=n,this.eclEffects=a,this.commonService=i,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=f.j,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a,new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["state","alias","actions"]):this.screenSize===f.q.SM||this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","alias","toLocal","toRemote","actions"])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{t.effectErrors.forEach(t=>{"FetchChannels"===t.action&&(this.flgLoading[0]="error")}),this.information=t.information,this.numPeers=t.peers&&t.peers.length?t.peers.length:0,this.totalBalance=t.onchainBalance.total,this.inactiveChannels=t.inactiveChannels,this.loadChannelsTable(),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!t.inactiveChannels),this.logger.info(t)})}ngAfterViewInit(){this.inactiveChannels.length>0&&this.loadChannelsTable()}applyFilter(){this.channels.filter=this.selFilter}onChannelClick(t,e){this.store.dispatch(new st.C({data:{channel:t,channelsType:"inactive",component:Ci}}))}loadChannelsTable(){this.inactiveChannels.sort(function(t,e){return t.alias===e.alias?0:e.alias?1:-1}),this.channels=new it.o([...this.inactiveChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(t,e)=>t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null,this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"InactiveChannels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(y.h),o.Pb(vt.a),o.Pb(ee.a),o.Pb(v.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-channel-inactive-table"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Channels")}])],decls:30,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"div",1),o.Qb(2,"div",2),o.Vb(3,"mat-form-field",3),o.Vb(4,"input",4),o.dc("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.selFilter=t}),o.Ub(),o.Ub(),o.Ub(),o.Vb(5,"div",5),o.Ic(6,xs,1,0,"mat-progress-bar",6),o.Vb(7,"table",7,8),o.Tb(9,9),o.Ic(10,vs,2,0,"th",10),o.Ic(11,Ss,3,3,"td",11),o.Sb(),o.Tb(12,12),o.Ic(13,ws,2,0,"th",10),o.Ic(14,Ds,2,1,"td",11),o.Sb(),o.Tb(15,13),o.Ic(16,Vs,2,0,"th",14),o.Ic(17,Cs,4,4,"td",11),o.Sb(),o.Tb(18,15),o.Ic(19,Us,2,0,"th",14),o.Ic(20,Is,4,4,"td",11),o.Sb(),o.Tb(21,16),o.Ic(22,Ls,6,0,"th",17),o.Ic(23,As,3,0,"td",18),o.Sb(),o.Tb(24,19),o.Ic(25,ks,2,1,"td",20),o.Sb(),o.Ic(26,Os,1,3,"tr",21),o.Ic(27,Ts,1,0,"tr",22),o.Ic(28,Rs,1,0,"tr",23),o.Ub(),o.Ub(),o.Qb(29,"mat-paginator",24),o.Ub()),2&t&&(o.Db(4),o.oc("ngModel",e.selFilter),o.Db(2),o.oc("ngIf",!0===e.flgLoading[0]),o.Db(1),o.oc("dataSource",e.channels)("ngClass",o.sc(11,Ks,"error"===e.flgLoading[0])),o.Db(19),o.oc("matFooterRowDef",o.rc(13,Ms)),o.Db(1),o.oc("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),o.Db(1),o.oc("matRowDefColumns",e.displayedColumns),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[S.c,S.b,S.a,R.c,lt.b,ct.c,ct.m,ct.p,E.b,a.o,it.n,at.a,a.m,L.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,nt.a,s.a,it.h,at.b,it.a,dt.a,dt.c,ut.m,U.a,it.d,it.f,it.j,it.l],pipes:[a.x,a.f],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();function zs(t,e){if(1&t&&(o.Vb(0,"div",5),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Lc(t.errorMessage)}}function Bs(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",6),o.Qb(1,"div",7),o.Vb(2,"mat-form-field",8),o.Vb(3,"input",9),o.dc("ngModelChange",function(e){return o.zc(t),o.hc().filterValue=e})("input",function(){return o.zc(t),o.hc().applyFilter()})("keyup",function(){return o.zc(t),o.hc().applyFilter()}),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(3),o.oc("ngModel",t.filterValue)}}function qs(t,e){1&t&&(o.Vb(0,"th",31),o.Kc(1,"Date/Time"),o.Ub())}function Ns(t,e){if(1&t&&(o.Vb(0,"td",32),o.Kc(1),o.Ub()),2&t){const t=e.$implicit;o.Db(1),o.Lc(null==t?null:t.timestampStr)}}function Hs(t,e){1&t&&(o.Vb(0,"th",31),o.Kc(1,"In Channel"),o.Ub())}const Qs=function(t){return{"max-width":t}};function js(t,e){if(1&t&&(o.Vb(0,"td",33),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.oc("ngStyle",o.sc(2,Qs,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),o.Db(1),o.Lc(null==t?null:t.fromChannelAlias)}}function $s(t,e){1&t&&(o.Vb(0,"th",31),o.Kc(1,"Out Channel"),o.Ub())}function _s(t,e){if(1&t&&(o.Vb(0,"td",33),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.oc("ngStyle",o.sc(2,Qs,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),o.Db(1),o.Lc(null==t?null:t.toChannelAlias)}}function Js(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1,"Amount In (Sats)"),o.Ub())}function Xs(t,e){if(1&t&&(o.Vb(0,"td",32),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,null==t?null:t.amountIn))}}function Gs(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1,"Amount Out (Sats)"),o.Ub())}function Ws(t,e){if(1&t&&(o.Vb(0,"td",32),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,null==t?null:t.amountOut))}}function Ys(t,e){1&t&&(o.Vb(0,"th",34),o.Kc(1,"Fee Earned (Sats)"),o.Ub())}function Zs(t,e){if(1&t&&(o.Vb(0,"td",32),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,(null==t?null:t.amountIn)-(null==t?null:t.amountOut)))}}function tc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"th",36),o.Vb(1,"div",37),o.Vb(2,"mat-select",38),o.Qb(3,"mat-select-trigger"),o.Vb(4,"mat-option",39),o.dc("click",function(){return o.zc(t),o.hc(2).onDownloadCSV()}),o.Kc(5,"Download CSV"),o.Ub(),o.Ub(),o.Ub(),o.Ub()}}function ec(t,e){if(1&t){const t=o.Wb();o.Vb(0,"td",40),o.Vb(1,"button",41),o.dc("click",function(n){o.zc(t);const a=e.$implicit;return o.hc(2).onForwardingEventClick(a,n)}),o.Kc(2,"View Info"),o.Ub(),o.Ub()}}function nc(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No forwarding event available."),o.Ub())}function ac(t,e){if(1&t&&(o.Vb(0,"td",42),o.Ic(1,nc,2,0,"p",43),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)}}const ic=function(t){return{"display-none":t}};function oc(t,e){if(1&t&&o.Qb(0,"tr",44),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,ic,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function sc(t,e){1&t&&o.Qb(0,"tr",45)}function cc(t,e){1&t&&o.Qb(0,"tr",46)}const lc=function(){return["no_event"]};function rc(t,e){if(1&t&&(o.Vb(0,"div",10),o.Vb(1,"table",11,12),o.Tb(3,13),o.Ic(4,qs,2,0,"th",14),o.Ic(5,Ns,2,1,"td",15),o.Sb(),o.Tb(6,16),o.Ic(7,Hs,2,0,"th",14),o.Ic(8,js,2,4,"td",17),o.Sb(),o.Tb(9,18),o.Ic(10,$s,2,0,"th",14),o.Ic(11,_s,2,4,"td",17),o.Sb(),o.Tb(12,19),o.Ic(13,Js,2,0,"th",20),o.Ic(14,Xs,4,3,"td",15),o.Sb(),o.Tb(15,21),o.Ic(16,Gs,2,0,"th",20),o.Ic(17,Ws,4,3,"td",15),o.Sb(),o.Tb(18,22),o.Ic(19,Ys,2,0,"th",20),o.Ic(20,Zs,4,3,"td",15),o.Sb(),o.Tb(21,23),o.Ic(22,tc,6,0,"th",24),o.Ic(23,ec,3,0,"td",25),o.Sb(),o.Tb(24,26),o.Ic(25,ac,2,1,"td",27),o.Sb(),o.Ic(26,oc,1,3,"tr",28),o.Ic(27,sc,1,0,"tr",29),o.Ic(28,cc,1,0,"tr",30),o.Ub(),o.Ub()),2&t){const t=o.hc();o.Db(1),o.oc("dataSource",t.forwardingHistoryEvents),o.Db(25),o.oc("matFooterRowDef",o.rc(5,lc)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns)}}const bc=function(t){return{"error-border":t,"padding-gap-x":!0}};let dc=(()=>{class t{constructor(t,e,n){this.logger=t,this.commonService=e,this.store=n,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=f.n,this.pageSizeOptions=f.o,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","actions"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","fee","actions"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","amountOut","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","fromChannelAlias","toChannelAlias","amountIn","amountOut","fee","actions"])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",t.effectErrors.forEach(t=>{"FetchPayments"===t.action&&(this.errorMessage="object"==typeof t.message?JSON.stringify(t.message):t.message)}),this.successfulEvents=t.payments&&t.payments.relayed?t.payments.relayed:[],this.loadForwardingEventsTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,this.loadForwardingEventsTable(this.successfulEvents)),t.filterValue&&this.applyFilter()}onForwardingEventClick(t,e){this.store.dispatch(new st.C({data:{type:f.b.INFORMATION,alertTitle:"Event Information",message:[[{key:"paymentHash",value:t.paymentHash,title:"Payment Hash",width:100,type:f.h.STRING}],[{key:"timestampStr",value:t.timestampStr,title:"Date/Time",width:50,type:f.h.DATE_TIME},{key:"fee",value:t.amountIn-t.amountOut,title:"Fee Earned (Sats)",width:50,type:f.h.NUMBER}],[{key:"amountIn",value:t.amountIn,title:"Amount In (Sats)",width:50,type:f.h.NUMBER},{key:"amountOut",value:t.amountOut,title:"Amount Out (Sats)",width:50,type:f.h.NUMBER}],[{key:"fromChannelAlias",value:t.fromChannelAlias,title:"From Channel Alias",width:50,type:f.h.STRING},{key:"fromShortChannelId",value:t.fromShortChannelId,title:"From Short Channel ID",width:50,type:f.h.STRING}],[{key:"fromChannelId",value:t.fromChannelId,title:"From Channel Id",width:100,type:f.h.STRING}],[{key:"toChannelAlias",value:t.toChannelAlias,title:"To Channel Alias",width:50,type:f.h.STRING},{key:"toShortChannelId",value:t.toShortChannelId,title:"To Short Channel ID",width:50,type:f.h.STRING}],[{key:"toChannelId",value:t.toChannelId,title:"To Channel Id",width:100,type:f.h.STRING}]]}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new it.o([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(t,e)=>{switch(e){case"fee":return t.amountIn-t.amountOut;default:return t[e]&&isNaN(t[e])?t[e].toLocaleLowerCase():t[e]?+t[e]:null}},this.forwardingHistoryEvents.paginator=this.paginator,this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents.filter=this.filterValue}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(v.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-forwarding-history"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(nt.a,!0)),2&t){let t;o.vc(t=o.ec())&&(e.sort=t.first),o.vc(t=o.ec())&&(e.paginator=t.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[o.Cb([{provide:nt.b,useValue:Object(f.y)("Events")}]),o.Bb],decls:5,vars:9,consts:[["fxLayout","column","fxLayoutAlign","start stretch",3,"ngClass"],["class","p-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","padding-gap-x page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-4",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[1,"p-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"padding-gap-x","page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromChannelAlias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","toChannelAlias"],["matColumnDef","amountIn"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amountOut"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Ic(1,zs,2,1,"div",1),o.Ic(2,Bs,4,1,"div",2),o.Ic(3,rc,29,6,"div",3),o.Qb(4,"mat-paginator",4),o.Ub()),2&t&&(o.oc("ngClass",o.sc(7,bc,""!==e.errorMessage)),o.Db(1),o.oc("ngIf",""!==e.errorMessage),o.Db(1),o.oc("ngIf",""===e.errorMessage),o.Db(1),o.oc("ngIf",""===e.errorMessage),o.Db(1),o.oc("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS))},directives:[S.c,S.b,a.m,L.a,a.o,nt.a,S.a,R.c,lt.b,ct.c,ct.m,ct.p,E.b,it.n,at.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,it.h,at.b,it.a,a.p,L.b,dt.a,dt.c,ut.m,U.a,it.d,it.f,it.j,it.l],pipes:[a.f],styles:[".mat-column-fromAlias[_ngcontent-%COMP%]{padding-left:2rem}.mat-column-fromAlias[_ngcontent-%COMP%], .mat-column-toAlias[_ngcontent-%COMP%]{flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-toAlias[_ngcontent-%COMP%]{padding-left:1rem}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),t})();const uc=["tableOut"];function hc(t,e){if(1&t&&(o.Vb(0,"div",3),o.Kc(1),o.Ub()),2&t){const t=o.hc();o.Db(1),o.Lc(t.errorMessage)}}function mc(t,e){1&t&&(o.Vb(0,"th",31),o.Kc(1,"Channel ID"),o.Ub())}const fc=function(t){return{"max-width":t}};function pc(t,e){if(1&t&&(o.Vb(0,"td",32),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.oc("ngStyle",o.sc(2,fc,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),o.Db(1),o.Lc(t.channelId)}}function gc(t,e){1&t&&(o.Vb(0,"th",31),o.Kc(1,"Peer Alias"),o.Ub())}function yc(t,e){if(1&t&&(o.Vb(0,"td",32),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.oc("ngStyle",o.sc(2,fc,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),o.Db(1),o.Lc(t.alias)}}function xc(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1,"Events"),o.Ub())}function vc(t,e){if(1&t&&(o.Vb(0,"td",34),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,t.events))}}function Sc(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1,"Amount (Sats)"),o.Ub())}function wc(t,e){if(1&t&&(o.Vb(0,"td",34),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,t.totalAmount))}}function Dc(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1,"Fee (Sats)"),o.Ub())}function Vc(t,e){if(1&t&&(o.Vb(0,"td",34),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,t.totalFee))}}function Cc(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No incoming routing peer available."),o.Ub())}function Uc(t,e){if(1&t&&(o.Vb(0,"td",36),o.Ic(1,Cc,2,0,"p",37),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)}}const Ic=function(t){return{"display-none":t}};function Lc(t,e){if(1&t&&o.Qb(0,"tr",38),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,Ic,(null==t.RoutingPeersIncoming?null:t.RoutingPeersIncoming.data)&&(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function Ac(t,e){1&t&&o.Qb(0,"tr",39)}function Fc(t,e){1&t&&o.Qb(0,"tr",40)}function kc(t,e){1&t&&(o.Vb(0,"th",31),o.Kc(1,"Channel ID"),o.Ub())}function Pc(t,e){if(1&t&&(o.Vb(0,"td",32),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.oc("ngStyle",o.sc(2,fc,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),o.Db(1),o.Lc(t.channelId)}}function Oc(t,e){1&t&&(o.Vb(0,"th",31),o.Kc(1,"Peer Alias"),o.Ub())}function Tc(t,e){if(1&t&&(o.Vb(0,"td",32),o.Kc(1),o.Ub()),2&t){const t=e.$implicit,n=o.hc(2);o.oc("ngStyle",o.sc(2,fc,n.screenSize===n.screenSizeEnum.XS?"5rem":"10rem")),o.Db(1),o.Lc(t.alias)}}function Rc(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1,"Events"),o.Ub())}function Kc(t,e){if(1&t&&(o.Vb(0,"td",34),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,t.events))}}function Mc(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1,"Amount (Sats)"),o.Ub())}function Ec(t,e){if(1&t&&(o.Vb(0,"td",34),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,t.totalAmount))}}function zc(t,e){1&t&&(o.Vb(0,"th",33),o.Kc(1,"Fee (Sats)"),o.Ub())}function Bc(t,e){if(1&t&&(o.Vb(0,"td",34),o.Vb(1,"span",35),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Ub()),2&t){const t=e.$implicit;o.Db(2),o.Lc(o.jc(3,1,t.totalFee))}}function qc(t,e){1&t&&(o.Vb(0,"p"),o.Kc(1,"No outgoing routing peer available."),o.Ub())}function Nc(t,e){if(1&t&&(o.Vb(0,"td",36),o.Ic(1,qc,2,0,"p",37),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.oc("ngIf",!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)}}function Hc(t,e){if(1&t&&o.Qb(0,"tr",38),2&t){const t=o.hc(2);o.oc("ngClass",o.sc(1,Ic,(null==t.RoutingPeersOutgoing?null:t.RoutingPeersOutgoing.data)&&(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function Qc(t,e){1&t&&o.Qb(0,"tr",39)}function jc(t,e){1&t&&o.Qb(0,"tr",40)}const $c=function(t,e){return{"mt-2":t,"mt-1":e}},_c=function(){return["no_incoming_event"]},Jc=function(t){return{"mt-2":t}},Xc=function(){return["no_outgoing_event"]};function Gc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",4),o.Vb(1,"div",5),o.Vb(2,"div",6),o.Vb(3,"div",7),o.Kc(4,"Incoming"),o.Ub(),o.Vb(5,"mat-form-field",8),o.Vb(6,"input",9),o.dc("keyup",function(e){return o.zc(t),o.hc().applyIncomingFilter(e.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(7,"div",10),o.Vb(8,"table",11,12),o.Tb(10,13),o.Ic(11,mc,2,0,"th",14),o.Ic(12,pc,2,4,"td",15),o.Sb(),o.Tb(13,16),o.Ic(14,gc,2,0,"th",14),o.Ic(15,yc,2,4,"td",15),o.Sb(),o.Tb(16,17),o.Ic(17,xc,2,0,"th",18),o.Ic(18,vc,4,3,"td",19),o.Sb(),o.Tb(19,20),o.Ic(20,Sc,2,0,"th",18),o.Ic(21,wc,4,3,"td",19),o.Sb(),o.Tb(22,21),o.Ic(23,Dc,2,0,"th",18),o.Ic(24,Vc,4,3,"td",19),o.Sb(),o.Tb(25,22),o.Ic(26,Uc,2,1,"td",23),o.Sb(),o.Ic(27,Lc,1,3,"tr",24),o.Ic(28,Ac,1,0,"tr",25),o.Ic(29,Fc,1,0,"tr",26),o.Ub(),o.Ub(),o.Ub(),o.Vb(30,"div",5),o.Vb(31,"div",6),o.Vb(32,"div",7),o.Kc(33,"Outgoing"),o.Ub(),o.Vb(34,"mat-form-field",8),o.Vb(35,"input",9),o.dc("keyup",function(e){return o.zc(t),o.hc().applyOutgoingFilter(e.target)}),o.Ub(),o.Ub(),o.Ub(),o.Vb(36,"div",27),o.Vb(37,"table",28,29),o.Tb(39,13),o.Ic(40,kc,2,0,"th",14),o.Ic(41,Pc,2,4,"td",15),o.Sb(),o.Tb(42,16),o.Ic(43,Oc,2,0,"th",14),o.Ic(44,Tc,2,4,"td",15),o.Sb(),o.Tb(45,17),o.Ic(46,Rc,2,0,"th",18),o.Ic(47,Kc,4,3,"td",19),o.Sb(),o.Tb(48,20),o.Ic(49,Mc,2,0,"th",18),o.Ic(50,Ec,4,3,"td",19),o.Sb(),o.Tb(51,21),o.Ic(52,zc,2,0,"th",18),o.Ic(53,Bc,4,3,"td",19),o.Sb(),o.Tb(54,30),o.Ic(55,Nc,2,1,"td",23),o.Sb(),o.Ic(56,Hc,1,3,"tr",24),o.Ic(57,Qc,1,0,"tr",25),o.Ic(58,jc,1,0,"tr",26),o.Ub(),o.Ub(),o.Ub(),o.Ub()}if(2&t){const t=o.hc();o.Db(2),o.oc("ngClass",o.tc(12,$c,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),o.Db(6),o.oc("dataSource",t.RoutingPeersIncoming),o.Db(19),o.oc("matFooterRowDef",o.rc(15,_c)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns),o.Db(2),o.oc("ngClass",o.sc(16,Jc,t.screenSize!==t.screenSizeEnum.LG)),o.Db(6),o.oc("dataSource",t.RoutingPeersOutgoing),o.Db(19),o.oc("matFooterRowDef",o.rc(18,Xc)),o.Db(1),o.oc("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),o.Db(1),o.oc("matRowDefColumns",t.displayedColumns)}}const Wc=function(t){return{"error-border":t,"padding-gap":!0}};let Yc=(()=>{class t{constructor(t,e,n,a){this.logger=t,this.commonService=e,this.store=n,this.actions$=a,this.routingPeersData=[],this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a,new b.a],this.screenSize=this.commonService.getScreenSize(),this.screenSize===f.q.XS?(this.flgSticky=!1,this.displayedColumns=["alias","totalFee"]):this.screenSize===f.q.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalFee"]):this.screenSize===f.q.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalAmount","totalFee"]):(this.flgSticky=!0,this.displayedColumns=["channelId","alias","events","totalAmount","totalFee"])}ngOnInit(){this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",t.effectErrors.forEach(t=>{"FetchPayments"===t.action&&(this.errorMessage="object"==typeof t.message?JSON.stringify(t.message):t.message)}),this.routingPeersData=t.payments&&t.payments.relayed?t.payments.relayed:[],this.loadRoutingPeersTable(this.routingPeersData),this.logger.info(t)})}loadRoutingPeersTable(t){if(t.length>0){const e=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new it.o(e[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new it.o(e[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new it.o([]),this.RoutingPeersOutgoing=new it.o([])}groupRoutingPeers(t){const e=[],n=[];return t.forEach(t=>{const a=e.find(e=>e.channelId===t.fromChannelId),i=n.find(e=>e.channelId===t.toChannelId);a?(a.events++,a.totalAmount=+a.totalAmount+ +t.amountIn,a.totalFee=t.amountIn-t.amountOut+ +a.totalFee):e.push({channelId:t.fromChannelId,alias:t.fromChannelAlias,events:1,totalAmount:+t.amountIn,totalFee:t.amountIn-t.amountOut}),i?(i.events++,i.totalAmount=+i.totalAmount+ +t.amountOut,i.totalFee=t.amountIn-t.amountOut+ +i.totalFee):n.push({channelId:t.toChannelId,alias:t.toChannelAlias,events:1,totalAmount:+t.amountOut,totalFee:t.amountIn-t.amountOut})}),[this.commonService.sortDescByKey(e,"totalFee"),this.commonService.sortDescByKey(n,"totalFee")]}applyIncomingFilter(t){this.RoutingPeersIncoming.filter=t.value}applyOutgoingFilter(t){this.RoutingPeersOutgoing.filter=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(v.a),o.Pb(y.h),o.Pb(x.a))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-routing-peers"]],viewQuery:function(t,e){if(1&t&&(o.Pc(at.a,!0),o.Pc(uc,!0,at.a)),2&t){let t;o.vc(t=o.ec())&&(e.sortIn=t.first),o.vc(t=o.ec())&&(e.sortOut=t.first)}},decls:3,vars:5,consts:[["fxLayout","column","fxLayoutAlign","start stretch",3,"ngClass"],["class","p-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","padding-gap-x page-sub-title-container",4,"ngIf"],[1,"p-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x","page-sub-title-container"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"padding-gap-x","page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start start","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","","fxFlex","100",1,"overflow-auto","incoming-table",3,"dataSource"],["tableIn",""],["matColumnDef","channelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalAmount"],["matColumnDef","totalFee"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","","fxFlex","100",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Ic(1,hc,2,1,"div",1),o.Ic(2,Gc,59,19,"div",2),o.Ub()),2&t&&(o.oc("ngClass",o.sc(3,Wc,""!==e.errorMessage)),o.Db(1),o.oc("ngIf",""!==e.errorMessage),o.Db(1),o.oc("ngIf",""===e.errorMessage))},directives:[S.c,S.b,a.m,L.a,a.o,S.a,R.c,lt.b,E.b,it.n,at.a,it.c,it.i,it.b,it.e,it.g,it.k,it.m,it.h,at.b,it.a,a.p,L.b,it.d,it.f,it.j,it.l],pipes:[a.f],styles:[".mat-column-alias[_ngcontent-%COMP%], .mat-column-channelId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();function Zc(t,e){if(1&t){const t=o.Wb();o.Vb(0,"div",7),o.dc("click",function(){o.zc(t);const n=e.$implicit;return o.hc().activeLink=n.link}),o.Kc(1),o.Ub()}if(2&t){const t=e.$implicit,n=o.hc();o.pc("routerLink",t.link),o.oc("active",n.activeLink===t.link),o.Db(1),o.Lc(t.name)}}let tl=(()=>{class t{constructor(t){this.router=t,this.faChartBar=m.f,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new b.a,new b.a,new b.a,new b.a]}ngOnInit(){let t=this.links.find(t=>this.router.url.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe(Object(d.a)(this.unSubs[0]),Object(u.a)(t=>t instanceof i.f)).subscribe(t=>{let e=this.links.find(e=>t.urlAfterRedirects.includes(e.link));this.activeLink=e?e.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(i.g))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Qb(1,"fa-icon",1),o.Vb(2,"span",2),o.Kc(3,"Reports"),o.Ub(),o.Ub(),o.Vb(4,"div",3),o.Vb(5,"mat-card"),o.Vb(6,"mat-card-content",4),o.Vb(7,"nav",5),o.Ic(8,Zc,2,3,"div",6),o.Ub(),o.Qb(9,"router-outlet"),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(1),o.oc("icon",e.faChartBar),o.Db(7),o.oc("ngForOf",e.links))},directives:[S.c,S.b,w.a,V.a,V.b,et.e,a.n,i.l,et.d,i.h],styles:[""]}),t})();var el=n("2yzq"),nl=n("LQLF"),al=n("Lnru");function il(t,e){if(1&t&&(o.Vb(0,"div",8),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=o.hc();o.oc("@fadeIn",t.totalFeeSat),o.Db(1),o.Nc("",o.kc(2,3,t.totalFeeSat||0,"1.0-0")," Sats/",o.jc(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function ol(t,e){1&t&&(o.Vb(0,"div",9),o.Kc(1,"No fee report for the selected period"),o.Ub())}function sl(t,e){if(1&t&&(o.Vb(0,"span"),o.Vb(1,"span",12),o.Kc(2),o.ic(3,"number"),o.Ub(),o.Vb(4,"span",12),o.Kc(5),o.ic(6,"number"),o.Ub(),o.Ub()),2&t){const t=e.model;o.Db(2),o.Mc("Events: ",o.jc(3,2,t.extra.totalEvents||0),""),o.Db(3),o.Mc("Fee: ",o.kc(6,4,t.value||0,"1.0-0"),"")}}function cl(t,e){if(1&t){const t=o.Wb();o.Vb(0,"ngx-charts-bar-vertical",10),o.dc("select",function(e){return o.zc(t),o.hc().onChartBarSelected(e)})("mouseup",function(e){return o.zc(t),o.hc().onChartMouseUp(e)}),o.Ic(1,sl,7,7,"ng-template",null,11,o.Jc),o.Ub()}if(2&t){const t=o.hc();o.oc("view",t.view)("results",t.feeReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function ll(t,e){if(1&t&&o.Qb(0,"rtl-ecl-forwarding-history",13),2&t){const t=o.hc();o.oc("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let rl=(()=>{class t{constructor(t,e,n,a){this.logger=t,this.dataService=e,this.commonService=n,this.store=a,this.reportPeriod=f.p[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.totalFeeSat=null,this.today=new Date(Date.now()),this.timezoneOffset=60*this.today.getTimezoneOffset(),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.feeReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Fee (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===f.q.XS||this.screenSize===f.q.SM),this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{this.events=t.payments&&t.payments.relayed?t.payments.relayed:[],this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(t)})}ngAfterViewInit(){const t=this.commonService.getContainerSize();switch(this.screenSize){case f.q.MD:this.screenPaddingX=t.width/10;break;case f.q.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2]}filterForwardingEvents(t,e){const n=Math.round(t.getTime()/1e3)-this.timezoneOffset,a=Math.round(e.getTime()/1e3)-this.timezoneOffset;this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeSat=null,this.events&&this.events.length>0&&(this.events.forEach(t=>{Math.floor(t.timestamp/1e3)>=n&&Math.floor(t.timestamp/1e3)<a&&this.filteredEventsBySelectedPeriod.push(t)}),this.feeReportData=this.prepareFeeReport(t))}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===f.p[1]?t.name.toUpperCase()+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+f.l[this.startDate.getMonth()].name.toUpperCase()+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const e=Math.round(t.getTime()/1e3)-this.timezoneOffset;let n=[];if(this.reportPeriod===f.p[1]){for(let t=0;t<12;t++)n.push({name:f.l[t].name,value:1e-9,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(t=>{let e=new Date(t.timestamp+1e3*this.timezoneOffset).getMonth();n[e].value=n[e].value+(t.amountIn-t.amountOut),n[e].extra.totalEvents=n[e].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(t.amountIn-t.amountOut)})}else{for(let e=0;e<this.getMonthDays(t.getMonth(),t.getFullYear());e++)n.push({name:e+1,value:1e-9,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(t=>{let a=Math.floor((Math.floor(t.timestamp/1e3)-e)/this.secondsInADay);n[a].value=n[a].value+(t.amountIn-t.amountOut),n[a].extra.totalEvents=n[a].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(t.amountIn-t.amountOut)})}return n}onSelectionChange(t){const e=t.selDate.getMonth(),n=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===f.p[1]?(this.startDate=new Date(n,0,1,0,0,0),this.endDate=new Date(n,11,31,23,59,59)):(this.startDate=new Date(n,e,1,0,0,0),this.endDate=new Date(n,e,this.getMonthDays(e,n),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,e){return 1===t&&e%4==0?f.l[t].days+1:f.l[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(g.b),o.Pb(ne.a),o.Pb(v.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-fee-report"]],hostBindings:function(t,e){1&t&&o.dc("mouseup",function(t){return e.onChartMouseUp(t)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],[3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],[3,"eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"rtl-horizontal-scroller",1),o.dc("stepChanged",function(t){return e.onSelectionChange(t)}),o.Ub(),o.Vb(2,"div",2),o.Ic(3,il,4,8,"div",3),o.Ic(4,ol,2,0,"div",4),o.Vb(5,"div",5),o.Ic(6,cl,3,11,"ngx-charts-bar-vertical",6),o.Ub(),o.Vb(7,"div",5),o.Ic(8,ll,1,2,"rtl-ecl-forwarding-history",7),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("ngIf",e.feeReportData.length>0&&e.filteredEventsBySelectedPeriod.length>0),o.Db(1),o.oc("ngIf",e.feeReportData.length<=0||e.filteredEventsBySelectedPeriod.length<=0),o.Db(2),o.oc("ngIf",e.feeReportData.length>0&&e.filteredEventsBySelectedPeriod.length>0),o.Db(2),o.oc("ngIf",e.filteredEventsBySelectedPeriod.length>0))},directives:[S.c,S.b,S.a,nl.a,a.o,al.b,dc],pipes:[a.f],styles:[""],data:{animation:[el.a]}}),t})();var bl=n("d4ms");function dl(t,e){if(1&t&&(o.Vb(0,"div",10),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Nc(" Paid ",o.kc(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod||0,"1.0-0")," Sats/",o.jc(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function ul(t,e){if(1&t&&(o.Vb(0,"div",10),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=o.hc(2);o.Db(1),o.Nc(" Received ",o.kc(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod||0,"1.0-0")," Sats/",o.jc(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function hl(t,e){if(1&t&&(o.Vb(0,"div",8),o.Ic(1,dl,4,7,"div",9),o.Ic(2,ul,4,7,"div",9),o.Ub()),2&t){const t=o.hc();o.oc("@fadeIn",t.transactionsReportSummary),o.Db(1),o.oc("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),o.Db(1),o.oc("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function ml(t,e){1&t&&(o.Vb(0,"div",11),o.Kc(1,"No transactions report for the selected period"),o.Ub())}function fl(t,e){if(1&t&&(o.Vb(0,"span",14),o.Kc(1),o.ic(2,"number"),o.ic(3,"number"),o.Ub()),2&t){const t=e.model;o.Db(1),o.Oc("",t.name,": ",o.kc(2,4,t.value||0,"1.0-0"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",o.jc(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function pl(t,e){if(1&t){const t=o.Wb();o.Vb(0,"ngx-charts-bar-vertical-2d",12),o.dc("select",function(e){return o.zc(t),o.hc().onChartBarSelected(e)})("mouseup",function(e){return o.zc(t),o.hc().onChartMouseUp(e)}),o.Ic(1,fl,4,9,"ng-template",null,13,o.Jc),o.Ub()}if(2&t){const t=o.hc();o.oc("view",t.view)("results",t.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",t.reportPeriod===t.scrollRanges[0]?2:8)}}function gl(t,e){if(1&t&&o.Qb(0,"rtl-transactions-report-table",15),2&t){const t=o.hc();o.oc("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let yl=(()=>{class t{constructor(t,e,n){this.dataService=t,this.commonService=e,this.store=n,this.scrollRanges=f.p,this.reportPeriod=f.p[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.timezoneOffset=60*this.today.getTimezoneOffset(),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=f.q,this.unSubs=[new b.a,new b.a]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===f.q.XS||this.screenSize===f.q.SM),this.store.select("ecl").pipe(Object(d.a)(this.unSubs[0])).subscribe(t=>{"COMPLETE"===t.initialAPIResponseStatus[0]&&this.dataService.getTransactionsForReport().pipe(Object(d.a)(this.unSubs[1])).subscribe(t=>{this.payments=t.payments.sent,this.invoices=t.invoices,this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()})})}ngAfterViewInit(){const t=this.commonService.getContainerSize();switch(this.screenSize){case f.q.MD:this.screenPaddingX=t.width/10;break;case f.q.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2]}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(t){this.transactionFilterValue=this.reportPeriod===f.p[1]?t.series.toUpperCase()+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+f.l[this.startDate.getMonth()].name.toUpperCase()+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,e){const n=Math.round(t.getTime()/1e3)-this.timezoneOffset,a=Math.round(e.getTime()/1e3)-this.timezoneOffset;let i=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};let o=this.payments.filter(t=>Math.floor(t.firstPartTimestamp/1e3)>=n&&Math.floor(t.firstPartTimestamp/1e3)<a),s=this.invoices.filter(t=>"received"===t.status&&t.timestamp>=n&&t.timestamp<a);if(this.transactionsReportSummary.paymentsSelectedPeriod=o.length,this.transactionsReportSummary.invoicesSelectedPeriod=s.length,this.reportPeriod===f.p[1]){for(let e=0;e<12;e++)i.push({name:f.l[e].name,date:new Date(t.getFullYear(),e,1,0,0,0,0),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});o.map(t=>{let e=new Date(t.firstPartTimestamp+1e3*this.timezoneOffset).getMonth();this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+t.recipientAmount,i[e].series[0].value=i[e].series[0].value+t.recipientAmount,i[e].series[0].extra.total=i[e].series[0].extra.total+1}),s.map(t=>{let e=new Date(1e3*(t.timestamp+this.timezoneOffset)).getMonth();this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+t.amountSettled,i[e].series[1].value=i[e].series[1].value+t.amountSettled,i[e].series[1].extra.total=i[e].series[1].extra.total+1})}else{for(let e=0;e<this.getMonthDays(t.getMonth(),t.getFullYear());e++)i.push({name:(e+1).toString(),date:new Date(1e3*((e+1)*this.secondsInADay+n)),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});o.map(t=>{let e=Math.floor((Math.floor(t.firstPartTimestamp/1e3)-n)/this.secondsInADay);this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+t.recipientAmount,i[e].series[0].value=i[e].series[0].value+t.recipientAmount,i[e].series[0].extra.total=i[e].series[0].extra.total+1}),s.map(t=>{let e=Math.floor((t.timestamp-n)/this.secondsInADay);this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+t.amountSettled,i[e].series[1].value=i[e].series[1].value+t.amountSettled,i[e].series[1].extra.total=i[e].series[1].extra.total+1})}return i}prepareTableData(){return this.transactionsReportData.reduce((t,e)=>e.series[0].value>0||e.series[1].value>0?t.concat({date:e.date,date_str:this.commonService.convertTimestampToDate(e.date.getTime()/1e3),amount_paid:e.series[0].value,num_payments:e.series[0].extra.total,amount_received:e.series[1].value,num_invoices:e.series[1].extra.total}):t,[])}onSelectionChange(t){const e=t.selDate.getMonth(),n=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===f.p[1]?(this.startDate=new Date(n,0,1,0,0,0),this.endDate=new Date(n,11,31,23,59,59)):(this.startDate=new Date(n,e,1,0,0,0),this.endDate=new Date(n,e,this.getMonthDays(e,n),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,e){return 1===t&&e%4==0?f.l[t].days+1:f.l[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(),t.complete()})}}return t.\u0275fac=function(e){return new(e||t)(o.Pb(ne.a),o.Pb(v.a),o.Pb(y.h))},t.\u0275cmp=o.Jb({type:t,selectors:[["rtl-ecl-transactions-report"]],hostBindings:function(t,e){1&t&&o.dc("mouseup",function(t){return e.onChartMouseUp(t)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],[3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(t,e){1&t&&(o.Vb(0,"div",0),o.Vb(1,"rtl-horizontal-scroller",1),o.dc("stepChanged",function(t){return e.onSelectionChange(t)}),o.Ub(),o.Vb(2,"div",2),o.Ic(3,hl,3,3,"div",3),o.Ic(4,ml,2,0,"div",4),o.Vb(5,"div",5),o.Ic(6,pl,3,13,"ngx-charts-bar-vertical-2d",6),o.Ub(),o.Vb(7,"div",5),o.Ic(8,gl,1,3,"rtl-transactions-report-table",7),o.Ub(),o.Ub(),o.Ub()),2&t&&(o.Db(3),o.oc("ngIf",e.transactionsNonZeroReportData.length>0),o.Db(1),o.oc("ngIf",e.transactionsNonZeroReportData.length<=0),o.Db(2),o.oc("ngIf",e.transactionsNonZeroReportData.length>0),o.Db(2),o.oc("ngIf",e.transactionsNonZeroReportData.length>0))},directives:[S.c,S.b,S.a,nl.a,a.o,al.a,bl.a],pipes:[a.f],styles:[""],data:{animation:[el.a]}}),t})();var xl=n("2h+y"),vl=n("0dfH");const Sl=i.k.forChild([{path:"",component:r,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Pn,canActivate:[xl.c]},{path:"onchain",component:ha,canActivate:[xl.c],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:ja,canActivate:[xl.c]},{path:"send",component:$a,canActivate:[xl.c]}]},{path:"connections",component:ga,canActivate:[xl.c],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:mi,canActivate:[xl.c],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:Wi,canActivate:[xl.c]},{path:"pending",component:yo,canActivate:[xl.c]},{path:"inactive",component:Es,canActivate:[xl.c]}]},{path:"peers",component:is,data:{sweepAll:!1},canActivate:[xl.c]}]},{path:"transactions",component:xa,canActivate:[xl.c],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:cn,canActivate:[xl.c]},{path:"invoices",component:Yt,canActivate:[xl.c]},{path:"queryroutes",component:ys,canActivate:[xl.c]}]},{path:"routing",component:Sa,canActivate:[xl.c],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:dc,canActivate:[xl.c]},{path:"peers",component:Yc,canActivate:[xl.c]}]},{path:"reports",component:tl,canActivate:[xl.c],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:rl,canActivate:[xl.c]},{path:"transactions",component:yl,canActivate:[xl.c]}]},{path:"lookups",component:Ha,canActivate:[xl.c]},{path:"**",component:vl.a}]}]);var wl=n("PCNd");let Dl=(()=>{class t{}return t.\u0275mod=o.Nb({type:t,bootstrap:[r]}),t.\u0275inj=o.Mb({factory:function(e){return new(e||t)},providers:[xl.c],imports:[[a.c,wl.a,Sl]]}),t})()}}]);